Typical use case
More...
Multi fifo transfer use sai sdma driver
The SDMA multi fifo script support transfer data between multi peripheral fifos and memory, a typical user case is that receiving multi sai channel data and put it into memory as
| channel 0 | channel 1 | channel 2 | channel 3 | channel 4 | ......... |
Multi fifo script is target to implement above feature, it can supports 1.configurable fifo watermark range from 1~(2^12-1), it is a value of fifo_watermark * channel_numbers 2.configurable fifo numbers, support up to 15 continuous fifos 3.configurable fifo address offset, support address offset up to 64
Transmitting data using multi fifo is same as above.
|
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...
|
|
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) |
| brief Configures the SAI RX. More...
|
|
void | SAI_TransferTxSetConfigSDMA (I2S_Type *base, sai_sdma_handle_t *handle, sai_transceiver_t *saiConfig) |
| brief Configures the SAI Tx. More...
|
|
volatile uint8_t _sai_sdma_handle::queueUser |
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.
- Parameters
-
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. |
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.
- Parameters
-
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. |
- Note
- This interface returns immediately after the transfer initiates. Call SAI_GetTransferStatus to poll the transfer status and check whether the SAI transfer is finished.
- Parameters
-
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
xfer | Pointer to the DMA transfer structure. |
- Return values
-
kStatus_Success | Start a SAI SDMA send successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_TxBusy | SAI is busy sending data. |
- Note
- This interface returns immediately after the transfer initiates. Call the SAI_GetReceiveRemainingBytes to poll the transfer status and check whether the SAI transfer is finished.
- Parameters
-
base | SAI base pointer |
handle | SAI SDMA handle pointer. |
xfer | Pointer to DMA transfer structure. |
- Return values
-
kStatus_Success | Start a SAI SDMA receive successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_RxBusy | SAI is busy receiving data. |
- Parameters
-
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
- Parameters
-
base | SAI base pointer |
handle | SAI SDMA handle pointer. |
void SAI_TransferTerminateReceiveSDMA |
( |
I2S_Type * |
base, |
|
|
sai_sdma_handle_t * |
handle |
|
) |
| |
- Parameters
-
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
- Parameters
-
base | SAI base pointer. |
handle | SAI SDMA handle pointer. |
param base SAI base pointer. param handle SAI SDMA handle pointer. param saiConig sai configurations.
param base SAI base pointer. param handle SAI SDMA handle pointer. param saiConig sai configurations.