Go to the documentation of this file.
8 #ifndef _FSL_SAI_EDMA_H_
9 #define _FSL_SAI_EDMA_H_
25 #define FSL_SAI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 3, 1))
54 #if defined(__cplusplus)
119 uint32_t mclkSourceClockHz,
120 uint32_t bclkSourceClockHz);
140 uint32_t mclkSourceClockHz,
141 uint32_t bclkSourceClockHz);
261 #if defined(__cplusplus)
eDMA transfer handle structure
void SAI_TransferRxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Rx.
SAI DMA transfer handle, users should not touch the content of the handle.
sai_transfer_t saiQueue[SAI_XFER_QUEUE_SIZE]
void SAI_TransferRxSetFormatEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
Configures the SAI Rx audio format.
void SAI_TransferTerminateReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Terminate all SAI receive.
status_t SAI_TransferSendEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
Performs a non-blocking SAI transfer using DMA.
#define SAI_XFER_QUEUE_SIZE
SAI transfer queue size, user can refine it according to use case.
void SAI_TransferRxCreateHandleEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle)
Initializes the SAI Rx eDMA handle.
sai_edma_callback_t callback
status_t SAI_TransferGetSendCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
Gets byte count sent by SAI.
void SAI_TransferTxSetFormatEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
Configures the SAI Tx audio format.
sai transceiver configurations
size_t transferSize[SAI_XFER_QUEUE_SIZE]
status_t SAI_TransferGetReceiveCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
Gets byte count received by SAI.
volatile uint8_t queueDriver
void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Aborts a SAI receive using eDMA.
volatile uint8_t queueUser
void(* sai_edma_callback_t)(I2S_Type *base, sai_edma_handle_t *handle, status_t status, void *userData)
SAI eDMA transfer callback function for finish and error.
void SAI_TransferTxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Tx.
void SAI_TransferTxCreateHandleEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle)
Initializes the SAI eDMA handle.
status_t SAI_TransferReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
Performs a non-blocking SAI receive using eDMA.
int32_t status_t
Type used for all status and error return values.
uint8_t tcd[(SAI_XFER_QUEUE_SIZE+1U) *sizeof(edma_tcd_t)]
edma_handle_t * dmaHandle
void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Aborts a SAI transfer using eDMA.
void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Terminate all SAI send.