RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures
Flexio_dma_i2s

Data Structures

struct  _flexio_i2s_dma_handle
 FlexIO I2S DMA transfer handle, users should not touch the content of the handle. More...
 

Driver version

typedef struct _flexio_i2s_dma_handle flexio_i2s_dma_handle_t
 
typedef 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.
 
#define FSL_FLEXIO_I2S_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 1, 7))
 FlexIO I2S DMA driver version 2.1.7.
 

DMA Transactional

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 

Detailed Description

Function Documentation

◆ FLEXIO_I2S_TransferAbortReceiveDMA()

void FLEXIO_I2S_TransferAbortReceiveDMA ( FLEXIO_I2S_Type base,
flexio_i2s_dma_handle_t handle 
)

Aborts a FlexIO I2S receive using DMA.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.

◆ FLEXIO_I2S_TransferAbortSendDMA()

void FLEXIO_I2S_TransferAbortSendDMA ( FLEXIO_I2S_Type base,
flexio_i2s_dma_handle_t handle 
)

Aborts a FlexIO I2S transfer using DMA.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.

◆ FLEXIO_I2S_TransferGetReceiveCountDMA()

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.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
countBytes received.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is not a non-blocking transaction currently in progress.

◆ FLEXIO_I2S_TransferGetSendCountDMA()

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.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
countBytes sent.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is not a non-blocking transaction currently in progress.

◆ FLEXIO_I2S_TransferReceiveDMA()

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.

Note
This interface returns immediately after transfer initiates. Call FLEXIO_I2S_GetReceiveRemainingBytes to poll the transfer status to check whether the FlexIO I2S transfer is finished.
Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
xferPointer to DMA transfer structure.
Return values
kStatus_SuccessStart a FlexIO I2S DMA receive successfully.
kStatus_InvalidArgumentThe input arguments is invalid.
kStatus_RxBusyFlexIO I2S is busy receiving data.

◆ FLEXIO_I2S_TransferRxCreateHandleDMA()

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.

This function initializes the FlexIO I2S slave DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
callbackFlexIO I2S DMA callback function called while finished a block.
userDataUser parameter for callback.
dmaHandleDMA handle for FlexIO I2S. This handle is a static value allocated by users.

◆ FLEXIO_I2S_TransferSendDMA()

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.

Note
This interface returns immediately after transfer initiates. Call FLEXIO_I2S_GetTransferStatus to poll the transfer status and check whether FLEXIO I2S transfer finished.
Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
xferPointer to DMA transfer structure.
Return values
kStatus_SuccessStart a FlexIO I2S DMA send successfully.
kStatus_InvalidArgumentThe input arguments is invalid.
kStatus_TxBusyFlexIO I2S is busy sending data.

◆ FLEXIO_I2S_TransferSetFormatDMA()

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.

Audio format can be changed at run-time of FlexIO I2S. This function configures the sample rate and audio data format to be transferred. This function also sets the DMA parameter according to the format.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer
formatPointer to FlexIO I2S audio data format structure.
srcClock_HzFlexIO I2S clock source frequency in Hz. It should be 0 while in slave mode.

◆ FLEXIO_I2S_TransferTxCreateHandleDMA()

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.

This function initializes the FlexIO I2S master DMA handle which can be used for other FlexIO I2S master transactional APIs. Usually, for a specified FlexIO I2S instance, call this API once to get the initialized handle.

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S DMA handle pointer.
callbackFlexIO I2S DMA callback function called while finished a block.
userDataUser parameter for callback.
dmaHandleDMA handle for FlexIO I2S. This handle is a static value allocated by users.