9#ifndef _FSL_SPDIF_EDMA_H_
10#define _FSL_SPDIF_EDMA_H_
26#define FSL_SPDIF_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 5))
64#if defined(__cplusplus)
185#if defined(__cplusplus)
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
status_t SPDIF_TransferGetReceiveCountEDMA(SPDIF_Type *base, spdif_edma_handle_t *handle, size_t *count)
Gets byte count received by SPDIF.
Definition: fsl_spdif_edma.c:580
void SPDIF_TransferAbortReceiveEDMA(SPDIF_Type *base, spdif_edma_handle_t *handle)
Aborts a SPDIF receive using eDMA.
Definition: fsl_spdif_edma.c:521
void SPDIF_TransferAbortSendEDMA(SPDIF_Type *base, spdif_edma_handle_t *handle)
Aborts a SPDIF transfer using eDMA.
Definition: fsl_spdif_edma.c:494
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.
Definition: fsl_spdif_edma.c:429
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.
Definition: fsl_spdif_edma.h:32
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.
Definition: fsl_spdif_edma.c:358
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.
Definition: fsl_spdif_edma.c:308
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.
Definition: fsl_spdif_edma.c:256
status_t SPDIF_TransferGetSendCountEDMA(SPDIF_Type *base, spdif_edma_handle_t *handle, size_t *count)
Gets byte count sent by SPDIF.
Definition: fsl_spdif_edma.c:551
struct _spdif_edma_transfer spdif_edma_transfer_t
SPDIF transfer structure.
#define SPDIF_XFER_QUEUE_SIZE
SPDIF transfer queue size, user can refine it according to use case.
Definition: fsl_spdif.h:156
Definition: MIMXRT1052.h:42276
eDMA transfer handle structure
Definition: fsl_edma.h:244
eDMA TCD.
Definition: fsl_edma.h:205
SPDIF DMA transfer handle, users should not touch the content of the handle.
Definition: fsl_spdif_edma.h:44
volatile uint8_t queueUser
Definition: fsl_spdif_edma.h:57
edma_handle_t * dmaRightHandle
Definition: fsl_spdif_edma.h:46
uint32_t state
Definition: fsl_spdif_edma.h:49
void * userData
Definition: fsl_spdif_edma.h:51
spdif_edma_callback_t callback
Definition: fsl_spdif_edma.h:50
size_t transferSize[SPDIF_XFER_QUEUE_SIZE]
Definition: fsl_spdif_edma.h:55
edma_tcd_t rightTcd[SPDIF_XFER_QUEUE_SIZE+1U]
Definition: fsl_spdif_edma.h:53
edma_tcd_t leftTcd[SPDIF_XFER_QUEUE_SIZE+1U]
Definition: fsl_spdif_edma.h:52
uint8_t nbytes
Definition: fsl_spdif_edma.h:47
spdif_edma_transfer_t spdifQueue[SPDIF_XFER_QUEUE_SIZE]
Definition: fsl_spdif_edma.h:54
uint8_t count
Definition: fsl_spdif_edma.h:48
edma_handle_t * dmaLeftHandle
Definition: fsl_spdif_edma.h:45
volatile uint8_t queueDriver
Definition: fsl_spdif_edma.h:58
SPDIF transfer structure.
Definition: fsl_spdif_edma.h:36
size_t dataSize
Definition: fsl_spdif_edma.h:39
uint8_t * rightData
Definition: fsl_spdif_edma.h:38
uint8_t * leftData
Definition: fsl_spdif_edma.h:37