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... | |
Enumerations | |
enum | dmic_bitwidth_t { kDMICBitWidth16Bits = 2U, kDMICBitWidth32Bits = 4U } |
DMIC transfer structure. More... | |
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... | |
static void | DMIC_TransferSetBitWidthDMA (DMIC_Type *base, dmic_dma_handle_t *handle, dmic_bitwidth_t width) |
Configure the transfer data width. 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... | |
struct dmic_transfer_t |
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... | |
uint8_t | dataWidth |
Data bit width. | |
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. | |
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) |
enum dmic_bitwidth_t |
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. |
|
inlinestatic |
This function is optional to users, the default data width is set to 16 bits if not call this fuction. DMIC only support 16 bits and 32 bits setting. As DMA cannot support 24 bits directly, please set to 32 bits while need a 24 bits data. In 32 bit mode, the MSB 8 bits always 0, as the register can only have 24 bits valid bits.
base | DMIC peripheral base address. |
handle | Pointer to usart_dma_handle_t structure. |
width | DMIC width. See dmic_bitwidth_t. |
kStatus_Success |
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 | DMIC peripheral base address. |
handle | Pointer to usart_dma_handle_t structure. |
xfer | DMIC DMA transfer structure. See dmic_transfer_t. |
dmic_channel | DMIC channel |
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; |