RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures
PDM SDMA Driver

Data Structures

struct  _pdm_sdma_handle
 PDM DMA transfer handle, users should not touch the content of the handle. More...
 

Driver version

typedef struct _pdm_sdma_handle pdm_sdma_handle_t
 
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.
 
#define FSL_PDM_SDMA_DRIVER_VERSION   (MAKE_VERSION(2, 7, 0))
 

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.
 
status_t PDM_TransferReceiveSDMA (PDM_Type *base, pdm_sdma_handle_t *handle, pdm_transfer_t *xfer)
 Performs a non-blocking PDM receive using eDMA.
 
void PDM_TransferAbortReceiveSDMA (PDM_Type *base, pdm_sdma_handle_t *handle)
 Aborts a PDM receive using eDMA.
 
void PDM_SetChannelConfigSDMA (PDM_Type *base, pdm_sdma_handle_t *handle, uint32_t channel, const pdm_channel_config_t *config)
 PDM channel configurations.
 
void PDM_TransferTerminateReceiveSDMA (PDM_Type *base, pdm_sdma_handle_t *handle)
 Terminate all the PDM sdma receive transfer.
 

Detailed Description

Macro Definition Documentation

◆ FSL_PDM_SDMA_DRIVER_VERSION

#define FSL_PDM_SDMA_DRIVER_VERSION   (MAKE_VERSION(2, 7, 0))

Version 2.7.0

Function Documentation

◆ PDM_SetChannelConfigSDMA()

void PDM_SetChannelConfigSDMA ( PDM_Type base,
pdm_sdma_handle_t handle,
uint32_t  channel,
const pdm_channel_config_t config 
)

PDM channel configurations.

Parameters
basePDM base pointer.
handlePDM eDMA handle pointer.
channelchannel number.
configchannel configurations.

◆ PDM_TransferAbortReceiveSDMA()

void PDM_TransferAbortReceiveSDMA ( PDM_Type base,
pdm_sdma_handle_t handle 
)

Aborts a PDM receive using eDMA.

Parameters
basePDM base pointer
handlePDM eDMA handle pointer.

◆ PDM_TransferCreateHandleSDMA()

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.

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.

Parameters
basePDM base pointer.
handlePDM eDMA handle pointer.
callbackPointer to user callback function.
userDataUser parameter passed to the callback function.
dmaHandleeDMA handle pointer, this handle shall be static allocated by users.
eventSourcePDM event source number.

◆ PDM_TransferReceiveSDMA()

status_t PDM_TransferReceiveSDMA ( PDM_Type base,
pdm_sdma_handle_t handle,
pdm_transfer_t xfer 
)

Performs a non-blocking PDM receive using eDMA.

Note
This interface returns immediately after the transfer initiates. Call the PDM_GetReceiveRemainingBytes to poll the transfer status and check whether the PDM transfer is finished.
Parameters
basePDM base pointer
handlePDM eDMA handle pointer.
xferPointer to DMA transfer structure.
Return values
kStatus_SuccessStart a PDM eDMA receive successfully.
kStatus_InvalidArgumentThe input argument is invalid.
kStatus_RxBusyPDM is busy receiving data.

◆ PDM_TransferTerminateReceiveSDMA()

void PDM_TransferTerminateReceiveSDMA ( PDM_Type base,
pdm_sdma_handle_t handle 
)

Terminate all the PDM sdma receive transfer.

Parameters
basePDM base pointer.
handlePDM SDMA handle pointer.