|  | MCUXpresso SDK API Reference Manual
    Rev. 0
    NXP Semiconductors | 
| Files | |
| file | fsl_dmic_dma.h | 
| Data Structures | |
| struct | dmic_transfer_t | 
| DMIC transfer structure.  More... | |
| struct | dmic_dma_handle_t | 
| DMIC DMA handle.  More... | |
| Typedefs | |
| typedef void(* | dmic_dma_transfer_callback_t )(DMIC_Type *base, dmic_dma_handle_t *handle, status_t status, void *userData) | 
| DMIC transfer callback function.  More... | |
| DMIC DMA version | |
| #define | FSL_DMIC_DMA_DRIVER_VERSION (MAKE_VERSION(2, 2, 0)) | 
| DMIC DMA driver version 2.2.0. | |
| DMA transactional | |
| status_t | DMIC_TransferCreateHandleDMA (DMIC_Type *base, dmic_dma_handle_t *handle, dmic_dma_transfer_callback_t callback, void *userData, dma_handle_t *rxDmaHandle) | 
| Initializes the DMIC handle which is used in transactional functions.  More... | |
| status_t | DMIC_TransferReceiveDMA (DMIC_Type *base, dmic_dma_handle_t *handle, dmic_transfer_t *xfer, uint32_t dmic_channel) | 
| Receives data using DMA.  More... | |
| void | DMIC_TransferAbortReceiveDMA (DMIC_Type *base, dmic_dma_handle_t *handle) | 
| Aborts the received data using DMA.  More... | |
| status_t | DMIC_TransferGetReceiveCountDMA (DMIC_Type *base, dmic_dma_handle_t *handle, uint32_t *count) | 
| Get the number of bytes that have been received.  More... | |
| void | DMIC_InstallDMADescriptorMemory (dmic_dma_handle_t *handle, void *linkAddr, size_t linkNum) | 
| Install DMA descriptor memory.  More... | |
| struct dmic_transfer_t | 
| Data Fields | |
| void * | data | 
| The buffer of data to be transfer.  More... | |
| uint8_t | dataWidth | 
| DMIC support 16bit/32bit. | |
| size_t | dataSize | 
| The byte count to be transfer.  More... | |
| uint8_t | dataAddrInterleaveSize | 
| destination address interleave size | |
| struct _dmic_transfer * | linkTransfer | 
| use to support link transfer | |
| void* dmic_transfer_t::data | 
| size_t dmic_transfer_t::dataSize | 
| struct _dmic_dma_handle | 
| Data Fields | |
| DMIC_Type * | base | 
| DMIC peripheral base address.  More... | |
| dma_handle_t * | rxDmaHandle | 
| The DMA RX channel used.  More... | |
| dmic_dma_transfer_callback_t | callback | 
| Callback function.  More... | |
| void * | userData | 
| DMIC callback function parameter.  More... | |
| size_t | transferSize | 
| Size of the data to receive.  More... | |
| volatile uint8_t | state | 
| Internal state of DMIC DMA transfer. | |
| dma_descriptor_t * | desLink | 
| descriptor pool pointer | |
| size_t | linkNum | 
| number of descriptor in descriptors pool | |
| DMIC_Type* dmic_dma_handle_t::base | 
| dma_handle_t* dmic_dma_handle_t::rxDmaHandle | 
| dmic_dma_transfer_callback_t dmic_dma_handle_t::callback | 
| void* dmic_dma_handle_t::userData | 
| size_t dmic_dma_handle_t::transferSize | 
| typedef void(* dmic_dma_transfer_callback_t)(DMIC_Type *base, dmic_dma_handle_t *handle, status_t status, void *userData) | 
| status_t DMIC_TransferCreateHandleDMA | ( | DMIC_Type * | base, | 
| dmic_dma_handle_t * | handle, | ||
| dmic_dma_transfer_callback_t | callback, | ||
| void * | userData, | ||
| dma_handle_t * | rxDmaHandle | ||
| ) | 
| base | DMIC peripheral base address. | 
| handle | Pointer to dmic_dma_handle_t structure. | 
| callback | Callback function. | 
| userData | User data. | 
| rxDmaHandle | User-requested DMA handle for RX DMA transfer. | 
| status_t DMIC_TransferReceiveDMA | ( | DMIC_Type * | base, | 
| dmic_dma_handle_t * | handle, | ||
| dmic_transfer_t * | xfer, | ||
| uint32_t | dmic_channel | ||
| ) | 
This function receives data using DMA. This is a non-blocking function, which returns right away. When all data is received, the receive callback function is called.
| base | USART peripheral base address. | 
| handle | Pointer to usart_dma_handle_t structure. | 
| xfer | DMIC DMA transfer structure. See dmic_transfer_t. | 
| dmic_channel | DMIC start channel number. | 
| kStatus_Success | 
| void DMIC_TransferAbortReceiveDMA | ( | DMIC_Type * | base, | 
| dmic_dma_handle_t * | handle | ||
| ) | 
This function aborts the received data using DMA.
| base | DMIC peripheral base address | 
| handle | Pointer to dmic_dma_handle_t structure | 
| status_t DMIC_TransferGetReceiveCountDMA | ( | DMIC_Type * | base, | 
| dmic_dma_handle_t * | handle, | ||
| uint32_t * | count | ||
| ) | 
This function gets the number of bytes that have been received.
| base | DMIC peripheral base address. | 
| handle | DMIC handle pointer. | 
| count | Receive bytes count. | 
| kStatus_NoTransferInProgress | No receive in progress. | 
| kStatus_InvalidArgument | Parameter is invalid. | 
| kStatus_Success | Get successfully through the parameter count; | 
| void DMIC_InstallDMADescriptorMemory | ( | dmic_dma_handle_t * | handle, | 
| void * | linkAddr, | ||
| size_t | linkNum | ||
| ) | 
This function used to register DMA descriptor memory for linked transfer, a typical case is ping pong transfer which will request more than one DMA descriptor memory space, it should be called after DMIC_TransferCreateHandleDMA. User should be take care about the address of DMA descriptor pool which required align with 16BYTE at least.
| handle | Pointer to DMA channel transfer handle. | 
| linkAddr | DMA link descriptor address. | 
| num | DMA link descriptor number. |