RTEMS 6.1-rc1
|
Data Structures | |
struct | _sai_sdma_handle |
SAI DMA transfer handle, users should not touch the content of the handle. More... | |
Driver version | |
typedef struct _sai_sdma_handle | sai_sdma_handle_t |
typedef void(* | sai_sdma_callback_t) (I2S_Type *base, sai_sdma_handle_t *handle, status_t status, void *userData) |
SAI SDMA transfer callback function for finish and error. | |
#define | FSL_SAI_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 5, 3)) |
SDMA Transactional | |
void | SAI_TransferTxCreateHandleSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_sdma_callback_t callback, void *userData, sdma_handle_t *dmaHandle, uint32_t eventSource) |
Initializes the SAI SDMA handle. More... | |
void | SAI_TransferRxCreateHandleSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_sdma_callback_t callback, void *userData, sdma_handle_t *dmaHandle, uint32_t eventSource) |
Initializes the SAI Rx SDMA handle. More... | |
void | SAI_TransferTxSetFormatSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz) |
Configures the SAI Tx audio format. More... | |
void | SAI_TransferRxSetFormatSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz) |
Configures the SAI Rx audio format. More... | |
status_t | SAI_TransferSendSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transfer_t *xfer) |
Performs a non-blocking SAI transfer using DMA. More... | |
status_t | SAI_TransferReceiveSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transfer_t *xfer) |
Performs a non-blocking SAI receive using SDMA. More... | |
void | SAI_TransferAbortSendSDMA (I2S_Type *base, sai_sdma_handle_t *handle) |
Aborts a SAI transfer using SDMA. More... | |
void | SAI_TransferAbortReceiveSDMA (I2S_Type *base, sai_sdma_handle_t *handle) |
Aborts a SAI receive using SDMA. More... | |
void | SAI_TransferTerminateReceiveSDMA (I2S_Type *base, sai_sdma_handle_t *handle) |
Terminate all the SAI sdma receive transfer. More... | |
void | SAI_TransferTerminateSendSDMA (I2S_Type *base, sai_sdma_handle_t *handle) |
Terminate all the SAI sdma send transfer. More... | |
void | SAI_TransferRxSetConfigSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transceiver_t *saiConfig) |
void | SAI_TransferTxSetConfigSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transceiver_t *saiConfig) |
#define FSL_SAI_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 5, 3)) |
Version 2.5.3
void SAI_TransferAbortReceiveSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle | ||
) |
Aborts a SAI receive using SDMA.
base | SAI base pointer |
handle | SAI SDMA handle pointer. |
void SAI_TransferAbortSendSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle | ||
) |
Aborts a SAI transfer using SDMA.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
status_t SAI_TransferReceiveSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transfer_t * | xfer | ||
) |
Performs a non-blocking SAI receive using SDMA.
base | SAI base pointer |
handle | SAI SDMA handle pointer. |
xfer | Pointer to DMA transfer structure. |
kStatus_Success | Start a SAI SDMA receive successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_RxBusy | SAI is busy receiving data. |
void SAI_TransferRxCreateHandleSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_sdma_callback_t | callback, | ||
void * | userData, | ||
sdma_handle_t * | dmaHandle, | ||
uint32_t | eventSource | ||
) |
Initializes the SAI Rx SDMA handle.
This function initializes the SAI slave DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
base | SAI peripheral base address. |
callback | Pointer to user callback function. |
userData | User parameter passed to the callback function. |
dmaHandle | SDMA handle pointer, this handle shall be static allocated by users. |
eventSource | SAI event source number. |
void SAI_TransferRxSetConfigSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transceiver_t * | saiConfig | ||
) |
brief Configures the SAI RX.
param base SAI base pointer. param handle SAI SDMA handle pointer. param saiConig sai configurations.
void SAI_TransferRxSetFormatSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transfer_format_t * | format, | ||
uint32_t | mclkSourceClockHz, | ||
uint32_t | bclkSourceClockHz | ||
) |
Configures the SAI Rx audio format.
The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the SDMA parameter according to formatting requirements.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
format | Pointer to SAI audio data format structure. |
mclkSourceClockHz | SAI master clock source frequency in Hz. |
bclkSourceClockHz | SAI bit clock source frequency in Hz. If a bit clock source is the master clock, this value should equal to masterClockHz in format. |
kStatus_Success | Audio format set successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
status_t SAI_TransferSendSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transfer_t * | xfer | ||
) |
Performs a non-blocking SAI transfer using DMA.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
xfer | Pointer to the DMA transfer structure. |
kStatus_Success | Start a SAI SDMA send successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_TxBusy | SAI is busy sending data. |
void SAI_TransferTerminateReceiveSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle | ||
) |
Terminate all the SAI sdma receive transfer.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
void SAI_TransferTerminateSendSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle | ||
) |
Terminate all the SAI sdma send transfer.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
void SAI_TransferTxCreateHandleSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_sdma_callback_t | callback, | ||
void * | userData, | ||
sdma_handle_t * | dmaHandle, | ||
uint32_t | eventSource | ||
) |
Initializes the SAI SDMA handle.
This function initializes the SAI master DMA handle, which can be used for other SAI master transactional APIs. Usually, for a specified SAI instance, call this API once to get the initialized handle.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
base | SAI peripheral base address. |
callback | Pointer to user callback function. |
userData | User parameter passed to the callback function. |
dmaHandle | SDMA handle pointer, this handle shall be static allocated by users. |
eventSource | SAI event source number. |
void SAI_TransferTxSetConfigSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transceiver_t * | saiConfig | ||
) |
brief Configures the SAI Tx.
param base SAI base pointer. param handle SAI SDMA handle pointer. param saiConig sai configurations.
void SAI_TransferTxSetFormatSDMA | ( | I2S_Type * | base, |
sai_sdma_handle_t * | handle, | ||
sai_transfer_format_t * | format, | ||
uint32_t | mclkSourceClockHz, | ||
uint32_t | bclkSourceClockHz | ||
) |
Configures the SAI Tx audio format.
The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the SDMA parameter according to formatting requirements.
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
format | Pointer to SAI audio data format structure. |
mclkSourceClockHz | SAI master clock source frequency in Hz. |
bclkSourceClockHz | SAI bit clock source frequency in Hz. If bit clock source is master clock, this value should equals to masterClockHz in format. |
kStatus_Success | Audio format set successfully. |
kStatus_InvalidArgument | The input argument is invalid. |