MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | pdm_sdma_handle_t |
PDM DMA transfer handle, users should not touch the content of the handle. More... | |
Typedefs | |
typedef void(* | pdm_sdma_callback_t )(PDM_Type *base, pdm_sdma_handle_t *handle, status_t status, void *userData) |
PDM eDMA transfer callback function for finish and error. | |
Driver version | |
#define | FSL_PDM_SDMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 2)) |
Version 2.1.2. | |
eDMA Transactional | |
void | PDM_TransferCreateHandleSDMA (PDM_Type *base, pdm_sdma_handle_t *handle, pdm_sdma_callback_t callback, void *userData, sdma_handle_t *dmaHandle, uint32_t eventSource) |
Initializes the PDM eDMA handle. More... | |
status_t | PDM_TransferReceiveSDMA (PDM_Type *base, pdm_sdma_handle_t *handle, pdm_transfer_t *xfer) |
Performs a non-blocking PDM receive using eDMA. More... | |
void | PDM_TransferAbortReceiveSDMA (PDM_Type *base, pdm_sdma_handle_t *handle) |
Aborts a PDM receive using eDMA. More... | |
void | PDM_SetChannelConfigSDMA (PDM_Type *base, pdm_sdma_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config) |
PDM channel configurations. More... | |
struct _pdm_sdma_handle |
Data Fields | |
sdma_handle_t * | dmaHandle |
DMA handler for PDM send. | |
uint8_t | nbytes |
eDMA minor byte transfer count initially configured. More... | |
uint8_t | fifoWidth |
fifo width | |
uint8_t | endChannel |
The last enabled channel. | |
uint8_t | channelNums |
total channel numbers | |
uint8_t | count |
The transfer data count in a DMA request. | |
uint32_t | state |
Internal state for PDM eDMA transfer. | |
uint32_t | eventSource |
PDM event source number. | |
pdm_sdma_callback_t | callback |
Callback for users while transfer finish or error occurs. | |
void * | userData |
User callback parameter. | |
sdma_buffer_descriptor_t | bdPool [PDM_XFER_QUEUE_SIZE] |
BD pool for SDMA transfer. More... | |
pdm_transfer_t | pdmQueue [PDM_XFER_QUEUE_SIZE] |
Transfer queue storing queued transfer. More... | |
size_t | transferSize [PDM_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. | |
uint8_t pdm_sdma_handle_t::nbytes |
sdma_buffer_descriptor_t pdm_sdma_handle_t::bdPool[PDM_XFER_QUEUE_SIZE] |
pdm_transfer_t pdm_sdma_handle_t::pdmQueue[PDM_XFER_QUEUE_SIZE] |
volatile uint8_t pdm_sdma_handle_t::queueUser |
void PDM_TransferCreateHandleSDMA | ( | PDM_Type * | base, |
pdm_sdma_handle_t * | handle, | ||
pdm_sdma_callback_t | callback, | ||
void * | userData, | ||
sdma_handle_t * | dmaHandle, | ||
uint32_t | eventSource | ||
) |
This function initializes the PDM DMA handle, which can be used for other PDM master transactional APIs. Usually, for a specified PDM instance, call this API once to get the initialized handle.
base | PDM base pointer. |
handle | PDM eDMA handle pointer. |
base | PDM peripheral base address. |
callback | Pointer to user callback function. |
userData | User parameter passed to the callback function. |
dmaHandle | eDMA handle pointer, this handle shall be static allocated by users. |
dma | request source. |
status_t PDM_TransferReceiveSDMA | ( | PDM_Type * | base, |
pdm_sdma_handle_t * | handle, | ||
pdm_transfer_t * | xfer | ||
) |
base | PDM base pointer |
handle | PDM eDMA handle pointer. |
xfer | Pointer to DMA transfer structure. |
kStatus_Success | Start a PDM eDMA receive successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_RxBusy | PDM is busy receiving data. |
void PDM_TransferAbortReceiveSDMA | ( | PDM_Type * | base, |
pdm_sdma_handle_t * | handle | ||
) |
base | PDM base pointer |
handle | PDM eDMA handle pointer. |
void PDM_SetChannelConfigSDMA | ( | PDM_Type * | base, |
pdm_sdma_handle_t * | handle, | ||
uint32_t | channel, | ||
const pdm_channel_config_t * | config | ||
) |
base | PDM base pointer. |
handle | PDM eDMA handle pointer. |
channel | channel number. |
config | channel configurations. |