RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures
Flexio_edma_i2s

Data Structures

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

Driver version

typedef struct _flexio_i2s_edma_handle flexio_i2s_edma_handle_t
 
typedef void(* flexio_i2s_edma_callback_t) (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, status_t status, void *userData)
 FlexIO I2S eDMA transfer callback function for finish and error.
 
#define FSL_FLEXIO_I2S_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 1, 7))
 FlexIO I2S EDMA driver version 2.1.7.
 

eDMA Transactional

void FLEXIO_I2S_TransferTxCreateHandleEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
 Initializes the FlexIO I2S eDMA handle.
 
void FLEXIO_I2S_TransferRxCreateHandleEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
 Initializes the FlexIO I2S Rx eDMA handle.
 
void FLEXIO_I2S_TransferSetFormatEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_format_t *format, uint32_t srcClock_Hz)
 Configures the FlexIO I2S Tx audio format.
 
status_t FLEXIO_I2S_TransferSendEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_transfer_t *xfer)
 Performs a non-blocking FlexIO I2S transfer using DMA.
 
status_t FLEXIO_I2S_TransferReceiveEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, flexio_i2s_transfer_t *xfer)
 Performs a non-blocking FlexIO I2S receive using eDMA.
 
void FLEXIO_I2S_TransferAbortSendEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle)
 Aborts a FlexIO I2S transfer using eDMA.
 
void FLEXIO_I2S_TransferAbortReceiveEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle)
 Aborts a FlexIO I2S receive using eDMA.
 
status_t FLEXIO_I2S_TransferGetSendCountEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, size_t *count)
 Gets the remaining bytes to be sent.
 
status_t FLEXIO_I2S_TransferGetReceiveCountEDMA (FLEXIO_I2S_Type *base, flexio_i2s_edma_handle_t *handle, size_t *count)
 Get the remaining bytes to be received.
 

Detailed Description

Function Documentation

◆ FLEXIO_I2S_TransferAbortReceiveEDMA()

void FLEXIO_I2S_TransferAbortReceiveEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle 
)

Aborts a FlexIO I2S receive using eDMA.

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

brief Aborts a FlexIO I2S receive using eDMA.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer.

◆ FLEXIO_I2S_TransferAbortSendEDMA()

void FLEXIO_I2S_TransferAbortSendEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle 
)

Aborts a FlexIO I2S transfer using eDMA.

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

brief Aborts a FlexIO I2S transfer using eDMA.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer.

◆ FLEXIO_I2S_TransferGetReceiveCountEDMA()

status_t FLEXIO_I2S_TransferGetReceiveCountEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
size_t *  count 
)

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

brief Get the remaining bytes to be received.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param count Bytes received. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is not a non-blocking transaction currently in progress.

◆ FLEXIO_I2S_TransferGetSendCountEDMA()

status_t FLEXIO_I2S_TransferGetSendCountEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_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.

brief Gets the remaining bytes to be sent.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param count Bytes sent. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is not a non-blocking transaction currently in progress.

◆ FLEXIO_I2S_TransferReceiveEDMA()

status_t FLEXIO_I2S_TransferReceiveEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
flexio_i2s_transfer_t xfer 
)

Performs a non-blocking FlexIO I2S receive using eDMA.

Note
This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetReceiveRemainingBytes to poll the transfer status and 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 eDMA receive successfully.
kStatus_InvalidArgumentThe input arguments is invalid.
kStatus_RxBusyFlexIO I2S is busy receiving data.

brief Performs a non-blocking FlexIO I2S receive using eDMA.

note This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetReceiveRemainingBytes to poll the transfer status and check whether the FlexIO I2S transfer is finished.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param xfer Pointer to DMA transfer structure. retval kStatus_Success Start a FlexIO I2S eDMA receive successfully. retval kStatus_InvalidArgument The input arguments is invalid. retval kStatus_RxBusy FlexIO I2S is busy receiving data.

◆ FLEXIO_I2S_TransferRxCreateHandleEDMA()

void FLEXIO_I2S_TransferRxCreateHandleEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
flexio_i2s_edma_callback_t  callback,
void *  userData,
edma_handle_t dmaHandle 
)

Initializes the FlexIO I2S Rx eDMA 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 eDMA handle pointer.
callbackFlexIO I2S eDMA callback function called while finished a block.
userDataUser parameter for callback.
dmaHandleeDMA handle for FlexIO I2S. This handle is a static value allocated by users.

brief Initializes the FlexIO I2S Rx eDMA 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.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S eDMA handle pointer. param callback FlexIO I2S eDMA callback function called while finished a block. param userData User parameter for callback. param dmaHandle eDMA handle for FlexIO I2S. This handle is a static value allocated by users.

◆ FLEXIO_I2S_TransferSendEDMA()

status_t FLEXIO_I2S_TransferSendEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
flexio_i2s_transfer_t xfer 
)

Performs a non-blocking FlexIO I2S transfer using DMA.

Note
This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetTransferStatus to poll the transfer status and 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 eDMA send successfully.
kStatus_InvalidArgumentThe input arguments is invalid.
kStatus_TxBusyFlexIO I2S is busy sending data.

brief Performs a non-blocking FlexIO I2S transfer using DMA.

note This interface returned immediately after transfer initiates. Users should call FLEXIO_I2S_GetTransferStatus to poll the transfer status and check whether the FlexIO I2S transfer is finished.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S DMA handle pointer. param xfer Pointer to DMA transfer structure. retval kStatus_Success Start a FlexIO I2S eDMA send successfully. retval kStatus_InvalidArgument The input arguments is invalid. retval kStatus_TxBusy FlexIO I2S is busy sending data.

◆ FLEXIO_I2S_TransferSetFormatEDMA()

void FLEXIO_I2S_TransferSetFormatEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
flexio_i2s_format_t format,
uint32_t  srcClock_Hz 
)

Configures the FlexIO I2S Tx audio format.

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

Parameters
baseFlexIO I2S peripheral base address.
handleFlexIO I2S eDMA 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.

brief Configures the FlexIO I2S Tx audio format.

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

param base FlexIO I2S peripheral base address. param handle FlexIO I2S eDMA handle pointer param format Pointer to FlexIO I2S audio data format structure. param srcClock_Hz FlexIO I2S clock source frequency in Hz, it should be 0 while in slave mode.

◆ FLEXIO_I2S_TransferTxCreateHandleEDMA()

void FLEXIO_I2S_TransferTxCreateHandleEDMA ( FLEXIO_I2S_Type base,
flexio_i2s_edma_handle_t handle,
flexio_i2s_edma_callback_t  callback,
void *  userData,
edma_handle_t dmaHandle 
)

Initializes the FlexIO I2S eDMA 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 eDMA handle pointer.
callbackFlexIO I2S eDMA callback function called while finished a block.
userDataUser parameter for callback.
dmaHandleeDMA handle for FlexIO I2S. This handle is a static value allocated by users.

brief Initializes the FlexIO I2S eDMA 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.

param base FlexIO I2S peripheral base address. param handle FlexIO I2S eDMA handle pointer. param callback FlexIO I2S eDMA callback function called while finished a block. param userData User parameter for callback. param dmaHandle eDMA handle for FlexIO I2S. This handle is a static value allocated by users.