8#ifndef _FSL_SAI_EDMA_H_
9#define _FSL_SAI_EDMA_H_
26#define FSL_SAI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 5, 0))
57#if defined(__cplusplus)
124 uint32_t mclkSourceClockHz,
125 uint32_t bclkSourceClockHz);
147 uint32_t mclkSourceClockHz,
148 uint32_t bclkSourceClockHz);
255 uint32_t loopTransferCount);
277 uint32_t loopTransferCount);
360#if defined(__cplusplus)
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define SAI_XFER_QUEUE_SIZE
SAI transfer queue size, user can refine it according to use case.
Definition: fsl_sai.h:204
status_t SAI_TransferGetSendCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
Gets byte count sent by SAI.
Definition: fsl_sai_edma.c:960
void SAI_TransferAbortSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Aborts a SAI transfer using eDMA.
Definition: fsl_sai_edma.c:830
status_t SAI_TransferSendLoopEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)
Performs a non-blocking SAI loop transfer using eDMA.
Definition: fsl_sai_edma.c:671
uint32_t SAI_TransferGetValidTransferSlotsEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Gets valid transfer slot.
Definition: fsl_sai_edma.c:1020
void SAI_TransferAbortReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Aborts a SAI receive using eDMA.
Definition: fsl_sai_edma.c:870
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.
Definition: fsl_sai_edma.c:225
void SAI_TransferTxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Tx.
Definition: fsl_sai_edma.c:322
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.
Definition: fsl_sai_edma.c:377
void SAI_TransferTerminateSendEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Terminate all SAI send.
Definition: fsl_sai_edma.c:910
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.
Definition: fsl_sai_edma.c:270
status_t SAI_TransferSendEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
Performs a non-blocking SAI transfer using DMA.
Definition: fsl_sai_edma.c:486
void SAI_TransferTerminateReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle)
Terminate all SAI receive.
Definition: fsl_sai_edma.c:935
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.
Definition: fsl_sai_edma.c:184
status_t SAI_TransferReceiveEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
Performs a non-blocking SAI receive using eDMA.
Definition: fsl_sai_edma.c:580
status_t SAI_TransferReceiveLoopEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)
Performs a non-blocking SAI loop transfer using eDMA.
Definition: fsl_sai_edma.c:755
status_t SAI_TransferGetReceiveCountEDMA(I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
Gets byte count received by SAI.
Definition: fsl_sai_edma.c:989
void SAI_TransferRxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Rx.
Definition: fsl_sai_edma.c:429
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.
Definition: fsl_sai_edma.h:32
Definition: MIMXRT1052.h:23296
eDMA transfer handle structure
Definition: fsl_edma.h:244
eDMA TCD.
Definition: fsl_edma.h:205
sai transceiver configurations
Definition: fsl_sai.h:395
SAI transfer structure.
Definition: fsl_sai.h:415
SAI DMA transfer handle, users should not touch the content of the handle.
Definition: fsl_sai_edma.h:36
edma_handle_t * dmaHandle
Definition: fsl_sai_edma.h:37
uint8_t nbytes
Definition: fsl_sai_edma.h:38
uint8_t channelNums
Definition: fsl_sai_edma.h:41
uint8_t tcd[(SAI_XFER_QUEUE_SIZE+1U) *sizeof(edma_tcd_t)]
Definition: fsl_sai_edma.h:47
uint32_t state
Definition: fsl_sai_edma.h:44
uint8_t channel
Definition: fsl_sai_edma.h:42
uint8_t count
Definition: fsl_sai_edma.h:43
uint8_t bytesPerFrame
Definition: fsl_sai_edma.h:39
size_t transferSize[SAI_XFER_QUEUE_SIZE]
Definition: fsl_sai_edma.h:49
uint8_t channelMask
Definition: fsl_sai_edma.h:40
volatile uint8_t queueDriver
Definition: fsl_sai_edma.h:51
void * userData
Definition: fsl_sai_edma.h:46
sai_transfer_t saiQueue[SAI_XFER_QUEUE_SIZE]
Definition: fsl_sai_edma.h:48
volatile uint8_t queueUser
Definition: fsl_sai_edma.h:50
sai_edma_callback_t callback
Definition: fsl_sai_edma.h:45