Lines Matching refs:transfer
62 … status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer);
68 static uint16_t I2S_GetTransferBytes(volatile i2s_transfer_t *transfer);
100 …c status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer) in I2S_EnqueueUserBuffer() argument
113 assert((((uint32_t)transfer.data) % 4U) == 0U); in I2S_EnqueueUserBuffer()
114 if ((((uint32_t)transfer.data) % 4U) != 0U) in I2S_EnqueueUserBuffer()
120 assert(transfer.dataSize != 0U); in I2S_EnqueueUserBuffer()
121 if (transfer.dataSize == 0U) in I2S_EnqueueUserBuffer()
127 assert((transfer.dataSize % 4U) == 0U); in I2S_EnqueueUserBuffer()
128 if ((transfer.dataSize % 4U) != 0U) in I2S_EnqueueUserBuffer()
141 privateHandle->descriptorQueue[handle->queueUser].data = transfer.data; in I2S_EnqueueUserBuffer()
142 privateHandle->descriptorQueue[handle->queueUser].dataSize = transfer.dataSize; in I2S_EnqueueUserBuffer()
143 handle->i2sQueue[handle->queueUser].data = transfer.data; in I2S_EnqueueUserBuffer()
144 handle->i2sQueue[handle->queueUser].dataSize = transfer.dataSize; in I2S_EnqueueUserBuffer()
237 status_t I2S_TxTransferSendDMA(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer) in I2S_TxTransferSendDMA() argument
244 status = I2S_EnqueueUserBuffer(base, handle, transfer); in I2S_TxTransferSendDMA()
360 status_t I2S_RxTransferReceiveDMA(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer) in I2S_RxTransferReceiveDMA() argument
367 status = I2S_EnqueueUserBuffer(base, handle, transfer); in I2S_RxTransferReceiveDMA()
418 static uint16_t I2S_GetTransferBytes(volatile i2s_transfer_t *transfer) in I2S_GetTransferBytes() argument
420 assert(transfer != NULL); in I2S_GetTransferBytes()
424 if (transfer->dataSize >= (2UL * DMA_MAX_TRANSFER_BYTES)) in I2S_GetTransferBytes()
428 else if (transfer->dataSize > DMA_MAX_TRANSFER_BYTES) in I2S_GetTransferBytes()
430 transferBytes = (uint16_t)(transfer->dataSize / 2U); in I2S_GetTransferBytes()
438 transferBytes = (uint16_t)transfer->dataSize; in I2S_GetTransferBytes()
448 …volatile i2s_transfer_t *transfer = &(privateHandle->descriptorQueue[privateHandle->queueDes… in I2S_StartTransferDMA() local
449 uint16_t transferBytes = I2S_GetTransferBytes(transfer); in I2S_StartTransferDMA()
456 srcAddr = (uint32_t *)(uint32_t)transfer->data; in I2S_StartTransferDMA()
464 destAddr = (uint32_t *)(uint32_t)transfer->data; in I2S_StartTransferDMA()
481 transfer->dataSize -= transferBytes; in I2S_StartTransferDMA()
482 transfer->data = (uint8_t *)((uint32_t)transfer->data + transferBytes); in I2S_StartTransferDMA()
484 if (transfer->dataSize == 0U) in I2S_StartTransferDMA()
486 transfer->data = NULL; in I2S_StartTransferDMA()
526 volatile i2s_transfer_t *transfer; in I2S_AddTransferDMA() local
541 transfer = &(privateHandle->descriptorQueue[privateHandle->queueDescriptor]); in I2S_AddTransferDMA()
543 if (transfer->dataSize == 0U) in I2S_AddTransferDMA()
551 srcAddr = (uint32_t *)(uint32_t)transfer->data; in I2S_AddTransferDMA()
559 destAddr = (uint32_t *)(uint32_t)transfer->data; in I2S_AddTransferDMA()
569 … transferBytes = I2S_GetTransferBytes(transfer); in I2S_AddTransferDMA()
582 transfer->dataSize -= transferBytes; in I2S_AddTransferDMA()
583 transfer->data += transferBytes; in I2S_AddTransferDMA()
584 if (transfer->dataSize == 0U) in I2S_AddTransferDMA()
586 transfer->data = NULL; in I2S_AddTransferDMA()