8#ifndef _FSL_FLEXIO_I2S_DMA_H_
9#define _FSL_FLEXIO_I2S_DMA_H_
11#include "fsl_flexio_i2s.h"
26#define FSL_FLEXIO_I2S_DMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 7))
33 flexio_i2s_dma_handle_t *handle,
54#if defined(__cplusplus)
77 flexio_i2s_dma_handle_t *handle,
80 dma_handle_t *dmaHandle);
96 flexio_i2s_dma_handle_t *handle,
99 dma_handle_t *dmaHandle);
113 flexio_i2s_dma_handle_t *handle,
115 uint32_t srcClock_Hz);
131 flexio_i2s_dma_handle_t *handle,
148 flexio_i2s_dma_handle_t *handle,
191#if defined(__cplusplus)
status_t FLEXIO_I2S_TransferGetSendCountDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, size_t *count)
Gets the remaining bytes to be sent.
void FLEXIO_I2S_TransferSetFormatDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_format_t *format, uint32_t srcClock_Hz)
Configures the FlexIO I2S Tx audio format.
void FLEXIO_I2S_TransferTxCreateHandleDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_dma_callback_t callback, void *userData, dma_handle_t *dmaHandle)
Initializes the FlexIO I2S DMA handle.
status_t FLEXIO_I2S_TransferGetReceiveCountDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, size_t *count)
Gets the remaining bytes to be received.
void(*) flexio_i2s_dma_callback_t(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, status_t status, void *userData)
FlexIO I2S DMA transfer callback function for finish and error.
Definition fsl_flexio_i2s_dma.h:32
void FLEXIO_I2S_TransferRxCreateHandleDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_dma_callback_t callback, void *userData, dma_handle_t *dmaHandle)
Initializes the FlexIO I2S Rx DMA handle.
status_t FLEXIO_I2S_TransferSendDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_transfer_t *xfer)
Performs a non-blocking FlexIO I2S transfer using DMA.
status_t FLEXIO_I2S_TransferReceiveDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle, flexio_i2s_transfer_t *xfer)
Performs a non-blocking FlexIO I2S receive using DMA.
void FLEXIO_I2S_TransferAbortSendDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle)
Aborts a FlexIO I2S transfer using DMA.
void FLEXIO_I2S_TransferAbortReceiveDMA(FLEXIO_I2S_Type *base, flexio_i2s_dma_handle_t *handle)
Aborts a FlexIO I2S receive using DMA.
struct _flexio_i2s_transfer flexio_i2s_transfer_t
Define FlexIO I2S transfer structure.
#define FLEXIO_I2S_XFER_QUEUE_SIZE
FlexIO I2S transfer queue size, user can refine it according to use case.
Definition fsl_flexio_i2s.h:102
struct _flexio_i2s_type FLEXIO_I2S_Type
Define FlexIO I2S access structure typedef.
struct _flexio_i2s_format flexio_i2s_format_t
FlexIO I2S audio format, FlexIO I2S only support the same format in Tx and Rx.
int32_t status_t
Type used for all status and error return values.
Definition fsl_common.h:225
FlexIO I2S DMA transfer handle, users should not touch the content of the handle.
Definition fsl_flexio_i2s_dma.h:39
volatile uint8_t queueUser
Definition fsl_flexio_i2s_dma.h:47
void * userData
Definition fsl_flexio_i2s_dma.h:44
uint32_t state
Definition fsl_flexio_i2s_dma.h:42
dma_handle_t * dmaHandle
Definition fsl_flexio_i2s_dma.h:40
size_t transferSize[FLEXIO_I2S_XFER_QUEUE_SIZE]
Definition fsl_flexio_i2s_dma.h:46
flexio_i2s_transfer_t queue[FLEXIO_I2S_XFER_QUEUE_SIZE]
Definition fsl_flexio_i2s_dma.h:45
volatile uint8_t queueDriver
Definition fsl_flexio_i2s_dma.h:48
uint8_t bytesPerFrame
Definition fsl_flexio_i2s_dma.h:41
flexio_i2s_dma_callback_t callback
Definition fsl_flexio_i2s_dma.h:43