![]()  | 
  
    MCUXpresso SDK API Reference Manual
    Rev. 0
    
   NXP Semiconductors 
   | 
 
Data Structures | |
| struct | flexio_i2s_dma_handle_t | 
| FlexIO I2S DMA transfer handle, users should not touch the content of the handle.  More... | |
Typedefs | |
| typedef void(* | flexio_i2s_dma_callback_t )(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, status_t status, void *userData) | 
| FlexIO I2S DMA transfer callback function for finish and error.  | |
Driver version | |
| #define | FSL_FLEXIO_I2S_DMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 7)) | 
| FlexIO I2S DMA driver version 2.1.7.  More... | |
DMA Transactional | |
| void | FLEXIO_I2S_TransferTxCreateHandleDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_dma_callback_t callback, void *userData, dma_handle_t *dmaHandle) | 
| Initializes the FlexIO I2S DMA handle.  More... | |
| void | FLEXIO_I2S_TransferRxCreateHandleDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_dma_callback_t callback, void *userData, dma_handle_t *dmaHandle) | 
| Initializes the FlexIO I2S Rx DMA handle.  More... | |
| void | FLEXIO_I2S_TransferSetFormatDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_format_t *format, uint32_t srcClock_Hz) | 
| Configures the FlexIO I2S Tx audio format.  More... | |
| status_t | FLEXIO_I2S_TransferSendDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_transfer_t *xfer) | 
| Performs a non-blocking FlexIO I2S transfer using DMA.  More... | |
| status_t | FLEXIO_I2S_TransferReceiveDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_transfer_t *xfer) | 
| Performs a non-blocking FlexIO I2S receive using DMA.  More... | |
| void | FLEXIO_I2S_TransferAbortSendDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle) | 
| Aborts a FlexIO I2S transfer using DMA.  More... | |
| void | FLEXIO_I2S_TransferAbortReceiveDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle) | 
| Aborts a FlexIO I2S receive using DMA.  More... | |
| status_t | FLEXIO_I2S_TransferGetSendCountDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, size_t *count) | 
| Gets the remaining bytes to be sent.  More... | |
| status_t | FLEXIO_I2S_TransferGetReceiveCountDMA (FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, size_t *count) | 
| Gets the remaining bytes to be received.  More... | |
| struct _flexio_i2s_dma_handle | 
Data Fields | |
| dma_handle_t * | dmaHandle | 
| DMA handler for FlexIO I2S send.  | |
| uint8_t | bytesPerFrame | 
| Bytes in a frame.  | |
| uint32_t | state | 
| Internal state for FlexIO I2S DMA transfer.  | |
| flexio_i2s_dma_callback_t | callback | 
| Callback for users while transfer finish or error occurred.  | |
| void * | userData | 
| User callback parameter.  | |
| flexio_i2s_transfer_t | queue [FLEXIO_I2S_XFER_QUEUE_SIZE] | 
| Transfer queue storing queued transfer.  More... | |
| size_t | transferSize [FLEXIO_I2S_XFER_QUEUE_SIZE] | 
| Data bytes need to transfer.  | |
| volatile uint8_t | queueUser | 
| Index for user to queue transfer.  More... | |
| volatile uint8_t | queueDriver | 
| Index for driver to get the transfer data and size.  | |
| flexio_i2s_transfer_t flexio_i2s_dma_handle_t::queue[FLEXIO_I2S_XFER_QUEUE_SIZE] | 
| volatile uint8_t flexio_i2s_dma_handle_t::queueUser | 
| #define FSL_FLEXIO_I2S_DMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 7)) | 
| void FLEXIO_I2S_TransferTxCreateHandleDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| flexio_i2s_dma_callback_t | callback, | ||
| void * | userData, | ||
| dma_handle_t * | dmaHandle | ||
| ) | 
This function initializes the FlexIO I2S master DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| callback | FlexIO I2S DMA callback function called while finished a block. | 
| userData | User parameter for callback. | 
| dmaHandle | DMA handle for FlexIO I2S. This handle is a static value allocated by users. | 
| void FLEXIO_I2S_TransferRxCreateHandleDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| flexio_i2s_dma_callback_t | callback, | ||
| void * | userData, | ||
| dma_handle_t * | dmaHandle | ||
| ) | 
This function initializes the FlexIO I2S slave DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| callback | FlexIO I2S DMA callback function called while finished a block. | 
| userData | User parameter for callback. | 
| dmaHandle | DMA handle for FlexIO I2S. This handle is a static value allocated by users. | 
| void FLEXIO_I2S_TransferSetFormatDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| flexio_i2s_format_t * | format, | ||
| uint32_t | srcClock_Hz | ||
| ) | 
Audio format can be changed at run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred. This function also sets the DMA parameter according to the format.
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer | 
| format | Pointer to FlexIO I2S audio data format structure. | 
| srcClock_Hz | FlexIO I2S clock source frequency in Hz. It should be 0 while in slave mode. | 
| kStatus_Success | Audio format set successfully. | 
| kStatus_InvalidArgument | The input arguments is invalid. | 
| status_t FLEXIO_I2S_TransferSendDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| flexio_i2s_transfer_t * | xfer | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| xfer | Pointer to DMA transfer structure. | 
| kStatus_Success | Start a FlexIO I2S DMA send successfully. | 
| kStatus_InvalidArgument | The input arguments is invalid. | 
| kStatus_TxBusy | FlexIO I2S is busy sending data. | 
| status_t FLEXIO_I2S_TransferReceiveDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| flexio_i2s_transfer_t * | xfer | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| xfer | Pointer to DMA transfer structure. | 
| kStatus_Success | Start a FlexIO I2S DMA receive successfully. | 
| kStatus_InvalidArgument | The input arguments is invalid. | 
| kStatus_RxBusy | FlexIO I2S is busy receiving data. | 
| void FLEXIO_I2S_TransferAbortSendDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| void FLEXIO_I2S_TransferAbortReceiveDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| status_t FLEXIO_I2S_TransferGetSendCountDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| size_t * | count | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| count | Bytes sent. | 
| kStatus_Success | Succeed get the transfer count. | 
| kStatus_NoTransferInProgress | There is not a non-blocking transaction currently in progress. | 
| status_t FLEXIO_I2S_TransferGetReceiveCountDMA | ( | FLEXIO_I2S_Type * | base, | 
| flexio_i2s_dma_handle_t * | handle, | ||
| size_t * | count | ||
| ) | 
| base | FlexIO I2S peripheral base address. | 
| handle | FlexIO I2S DMA handle pointer. | 
| count | Bytes received. | 
| kStatus_Success | Succeed get the transfer count. | 
| kStatus_NoTransferInProgress | There is not a non-blocking transaction currently in progress. |