MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
struct | spdif_edma_transfer_t |
SPDIF transfer structure. More... | |
struct | spdif_edma_handle_t |
SPDIF DMA transfer handle, users should not touch the content of the handle. More... | |
Typedefs | |
typedef void(* | spdif_edma_callback_t )(SPDIF_Type *base, spdif_edma_handle_t *handle, status_t status, void *userData) |
SPDIF eDMA transfer callback function for finish and error. | |
Driver version | |
#define | FSL_SPDIF_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 5)) |
Version 2.0.5. | |
eDMA Transactional | |
void | SPDIF_TransferTxCreateHandleEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, spdif_edma_callback_t callback, void *userData, edma_handle_t *dmaLeftHandle, edma_handle_t *dmaRightHandle) |
Initializes the SPDIF eDMA handle. More... | |
void | SPDIF_TransferRxCreateHandleEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, spdif_edma_callback_t callback, void *userData, edma_handle_t *dmaLeftHandle, edma_handle_t *dmaRightHandle) |
Initializes the SPDIF Rx eDMA handle. More... | |
status_t | SPDIF_TransferSendEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, spdif_edma_transfer_t *xfer) |
Performs a non-blocking SPDIF transfer using DMA. More... | |
status_t | SPDIF_TransferReceiveEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, spdif_edma_transfer_t *xfer) |
Performs a non-blocking SPDIF receive using eDMA. More... | |
void | SPDIF_TransferAbortSendEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle) |
Aborts a SPDIF transfer using eDMA. More... | |
void | SPDIF_TransferAbortReceiveEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle) |
Aborts a SPDIF receive using eDMA. More... | |
status_t | SPDIF_TransferGetSendCountEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, size_t *count) |
Gets byte count sent by SPDIF. More... | |
status_t | SPDIF_TransferGetReceiveCountEDMA (SPDIF_Type *base, spdif_edma_handle_t *handle, size_t *count) |
Gets byte count received by SPDIF. More... | |
struct spdif_edma_transfer_t |
Data Fields | |
uint8_t * | leftData |
Data start address to transfer. More... | |
uint8_t * | rightData |
Data start address to transfer. More... | |
size_t | dataSize |
Transfer size. More... | |
uint8_t* spdif_edma_transfer_t::leftData |
uint8_t* spdif_edma_transfer_t::rightData |
size_t spdif_edma_transfer_t::dataSize |
struct _spdif_edma_handle |
Data Fields | |
edma_handle_t * | dmaLeftHandle |
DMA handler for SPDIF left channel. | |
edma_handle_t * | dmaRightHandle |
DMA handler for SPDIF right channel. | |
uint8_t | nbytes |
eDMA minor byte transfer count initially configured. More... | |
uint8_t | count |
The transfer data count in a DMA request. | |
uint32_t | state |
Internal state for SPDIF eDMA transfer. | |
spdif_edma_callback_t | callback |
Callback for users while transfer finish or error occurs. | |
void * | userData |
User callback parameter. | |
edma_tcd_t | leftTcd [SPDIF_XFER_QUEUE_SIZE+1U] |
TCD pool for eDMA transfer. More... | |
edma_tcd_t | rightTcd [SPDIF_XFER_QUEUE_SIZE+1U] |
TCD pool for eDMA transfer. More... | |
spdif_edma_transfer_t | spdifQueue [SPDIF_XFER_QUEUE_SIZE] |
Transfer queue storing queued transfer. More... | |
size_t | transferSize [SPDIF_XFER_QUEUE_SIZE] |
Data bytes need to transfer, left and right are the same, so use one. | |
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 spdif_edma_handle_t::nbytes |
edma_tcd_t spdif_edma_handle_t::leftTcd[SPDIF_XFER_QUEUE_SIZE+1U] |
edma_tcd_t spdif_edma_handle_t::rightTcd[SPDIF_XFER_QUEUE_SIZE+1U] |
spdif_edma_transfer_t spdif_edma_handle_t::spdifQueue[SPDIF_XFER_QUEUE_SIZE] |
volatile uint8_t spdif_edma_handle_t::queueUser |
void SPDIF_TransferTxCreateHandleEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
spdif_edma_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | dmaLeftHandle, | ||
edma_handle_t * | dmaRightHandle | ||
) |
This function initializes the SPDIF master DMA handle, which can be used for other SPDIF master transactional APIs. Usually, for a specified SPDIF instance, call this API once to get the initialized handle.
base | SPDIF base pointer. |
handle | SPDIF eDMA handle pointer. |
base | SPDIF peripheral base address. |
callback | Pointer to user callback function. |
userData | User parameter passed to the callback function. |
dmaLeftHandle | eDMA handle pointer for left channel, this handle shall be static allocated by users. |
dmaRightHandle | eDMA handle pointer for right channel, this handle shall be static allocated by users. |
void SPDIF_TransferRxCreateHandleEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
spdif_edma_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | dmaLeftHandle, | ||
edma_handle_t * | dmaRightHandle | ||
) |
This function initializes the SPDIF slave DMA handle, which can be used for other SPDIF master transactional APIs. Usually, for a specified SPDIF instance, call this API once to get the initialized handle.
base | SPDIF base pointer. |
handle | SPDIF eDMA handle pointer. |
base | SPDIF peripheral base address. |
callback | Pointer to user callback function. |
userData | User parameter passed to the callback function. |
dmaLeftHandle | eDMA handle pointer for left channel, this handle shall be static allocated by users. |
dmaRightHandle | eDMA handle pointer for right channel, this handle shall be static allocated by users. |
status_t SPDIF_TransferSendEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
spdif_edma_transfer_t * | xfer | ||
) |
base | SPDIF base pointer. |
handle | SPDIF eDMA handle pointer. |
xfer | Pointer to the DMA transfer structure. |
kStatus_Success | Start a SPDIF eDMA send successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_TxBusy | SPDIF is busy sending data. |
status_t SPDIF_TransferReceiveEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
spdif_edma_transfer_t * | xfer | ||
) |
base | SPDIF base pointer |
handle | SPDIF eDMA handle pointer. |
xfer | Pointer to DMA transfer structure. |
kStatus_Success | Start a SPDIF eDMA receive successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_RxBusy | SPDIF is busy receiving data. |
void SPDIF_TransferAbortSendEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle | ||
) |
base | SPDIF base pointer. |
handle | SPDIF eDMA handle pointer. |
void SPDIF_TransferAbortReceiveEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle | ||
) |
base | SPDIF base pointer |
handle | SPDIF eDMA handle pointer. |
status_t SPDIF_TransferGetSendCountEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
size_t * | count | ||
) |
base | SPDIF base pointer. |
handle | SPDIF eDMA handle pointer. |
count | Bytes count sent by SPDIF. |
kStatus_Success | Succeed get the transfer count. |
kStatus_NoTransferInProgress | There is no non-blocking transaction in progress. |
status_t SPDIF_TransferGetReceiveCountEDMA | ( | SPDIF_Type * | base, |
spdif_edma_handle_t * | handle, | ||
size_t * | count | ||
) |
base | SPDIF base pointer |
handle | SPDIF eDMA handle pointer. |
count | Bytes count received by SPDIF. |
kStatus_Success | Succeed get the transfer count. |
kStatus_NoTransferInProgress | There is no non-blocking transaction in progress. |