MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

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...
 

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...
 

Data Structure Documentation

struct dmic_transfer_t

Data Fields

uint16_t * data
 The buffer of data to be transfer. More...
 
size_t dataSize
 The byte count to be transfer. More...
 

Field Documentation

uint16_t* 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_trxDmaHandle
 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.
 

Field Documentation

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 Documentation

typedef void(* dmic_dma_transfer_callback_t)(DMIC_Type *base, dmic_dma_handle_t *handle, status_t status, void *userData)

Function Documentation

status_t DMIC_TransferCreateHandleDMA ( DMIC_Type *  base,
dmic_dma_handle_t *  handle,
dmic_dma_transfer_callback_t  callback,
void *  userData,
dma_handle_t rxDmaHandle 
)
Parameters
baseDMIC peripheral base address.
handlePointer to dmic_dma_handle_t structure.
callbackCallback function.
userDataUser data.
rxDmaHandleUser-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.

Parameters
baseUSART peripheral base address.
handlePointer to usart_dma_handle_t structure.
xferDMIC DMA transfer structure. See dmic_transfer_t.
dmic_channelDMIC channel
Return values
kStatus_Success
void DMIC_TransferAbortReceiveDMA ( DMIC_Type *  base,
dmic_dma_handle_t *  handle 
)

This function aborts the received data using DMA.

Parameters
baseDMIC peripheral base address
handlePointer 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.

Parameters
baseDMIC peripheral base address.
handleDMIC handle pointer.
countReceive bytes count.
Return values
kStatus_NoTransferInProgressNo receive in progress.
kStatus_InvalidArgumentParameter is invalid.
kStatus_SuccessGet successfully through the parameter count;