RTEMS 6.1-rc6
Loading...
Searching...
No Matches
Data Structures
SAI EDMA Driver

Data Structures

struct  sai_edma_handle
 SAI DMA transfer handle, users should not touch the content of the handle. More...
 

Driver version

typedef struct sai_edma_handle sai_edma_handle_t
 
typedef void(* sai_edma_callback_t) (I2S_Type *base, sai_edma_handle_t *handle, status_t status, void *userData)
 SAI eDMA transfer callback function for finish and error.
 
#define FSL_SAI_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 5, 0))
 

eDMA Transactional

void SAI_TransferTxCreateHandleEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle)
 Initializes the SAI eDMA handle.
 
void SAI_TransferRxCreateHandleEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle)
 Initializes the SAI Rx eDMA handle.
 
void SAI_TransferTxSetFormatEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
 Configures the SAI Tx audio format.
 
void SAI_TransferRxSetFormatEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_format_t *format, uint32_t mclkSourceClockHz, uint32_t bclkSourceClockHz)
 Configures the SAI Rx audio format.
 
void SAI_TransferTxSetConfigEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
 Configures the SAI Tx.
 
void SAI_TransferRxSetConfigEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
 Configures the SAI Rx.
 
status_t SAI_TransferSendEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
 Performs a non-blocking SAI transfer using DMA.
 
status_t SAI_TransferReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer)
 Performs a non-blocking SAI receive using eDMA.
 
status_t SAI_TransferSendLoopEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)
 Performs a non-blocking SAI loop transfer using eDMA.
 
status_t SAI_TransferReceiveLoopEDMA (I2S_Type *base, sai_edma_handle_t *handle, sai_transfer_t *xfer, uint32_t loopTransferCount)
 Performs a non-blocking SAI loop transfer using eDMA.
 
void SAI_TransferTerminateSendEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Terminate all SAI send.
 
void SAI_TransferTerminateReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Terminate all SAI receive.
 
void SAI_TransferAbortSendEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Aborts a SAI transfer using eDMA.
 
void SAI_TransferAbortReceiveEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Aborts a SAI receive using eDMA.
 
status_t SAI_TransferGetSendCountEDMA (I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
 Gets byte count sent by SAI.
 
status_t SAI_TransferGetReceiveCountEDMA (I2S_Type *base, sai_edma_handle_t *handle, size_t *count)
 Gets byte count received by SAI.
 
uint32_t SAI_TransferGetValidTransferSlotsEDMA (I2S_Type *base, sai_edma_handle_t *handle)
 Gets valid transfer slot.
 

Detailed Description

Macro Definition Documentation

◆ FSL_SAI_EDMA_DRIVER_VERSION

#define FSL_SAI_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 5, 0))

Version 2.5.0

Function Documentation

◆ SAI_TransferAbortReceiveEDMA()

void SAI_TransferAbortReceiveEDMA ( I2S_Type base,
sai_edma_handle_t handle 
)

Aborts a SAI receive using eDMA.

This function only aborts the current transfer slots, the other transfer slots' information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateReceiveEDMA.

Parameters
baseSAI base pointer
handleSAI eDMA handle pointer.

brief Aborts a SAI receive using eDMA.

This function only aborts the current transfer slots, the other transfer slots' information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateReceiveEDMA.

param base SAI base pointer. param handle SAI eDMA handle pointer.

◆ SAI_TransferAbortSendEDMA()

void SAI_TransferAbortSendEDMA ( I2S_Type base,
sai_edma_handle_t handle 
)

Aborts a SAI transfer using eDMA.

This function only aborts the current transfer slots, the other transfer slots' information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateSendEDMA.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.

brief Aborts a SAI transfer using eDMA.

This function only aborts the current transfer slots, the other transfer slots' information still kept in the handler. If users want to terminate all transfer slots, just call SAI_TransferTerminateSendEDMA.

param base SAI base pointer. param handle SAI eDMA handle pointer.

◆ SAI_TransferGetReceiveCountEDMA()

status_t SAI_TransferGetReceiveCountEDMA ( I2S_Type base,
sai_edma_handle_t handle,
size_t *  count 
)

Gets byte count received by SAI.

Parameters
baseSAI base pointer
handleSAI eDMA handle pointer.
countBytes count received by SAI.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is no non-blocking transaction in progress.

brief Gets byte count received by SAI.

param base SAI base pointer param handle SAI eDMA handle pointer. param count Bytes count received by SAI. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is no non-blocking transaction in progress.

◆ SAI_TransferGetSendCountEDMA()

status_t SAI_TransferGetSendCountEDMA ( I2S_Type base,
sai_edma_handle_t handle,
size_t *  count 
)

Gets byte count sent by SAI.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
countBytes count sent by SAI.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is no non-blocking transaction in progress.

brief Gets byte count sent by SAI.

param base SAI base pointer. param handle SAI eDMA handle pointer. param count Bytes count sent by SAI. retval kStatus_Success Succeed get the transfer count. retval kStatus_NoTransferInProgress There is no non-blocking transaction in progress.

◆ SAI_TransferGetValidTransferSlotsEDMA()

uint32_t SAI_TransferGetValidTransferSlotsEDMA ( I2S_Type base,
sai_edma_handle_t handle 
)

Gets valid transfer slot.

This function can be used to query the valid transfer request slot that the application can submit. It should be called in the critical section, that means the application could call it in the corresponding callback function or disable IRQ before calling it in the application, otherwise, the returned value may not correct.

Parameters
baseSAI base pointer
handleSAI eDMA handle pointer.
Return values
validslot count that application submit.

@rief Gets valid transfer slot.

This function can be used to query the valid transfer request slot that the application can submit. It should be called in the critical section, that means the application could call it in the corresponding callback function or disable IRQ before calling it in the application, otherwise, the returned value may not correct.

param base SAI base pointer param handle SAI eDMA handle pointer. retval valid slot count that application submit.

◆ SAI_TransferReceiveEDMA()

status_t SAI_TransferReceiveEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_t xfer 
)

Performs a non-blocking SAI receive using eDMA.

Note
This interface returns immediately after the transfer initiates. Call the SAI_GetReceiveRemainingBytes to poll the transfer status and check whether the SAI transfer is finished.

This function support multi channel transfer,

  1. for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
  2. for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.
Parameters
baseSAI base pointer
handleSAI eDMA handle pointer.
xferPointer to DMA transfer structure.
Return values
kStatus_SuccessStart a SAI eDMA receive successfully.
kStatus_InvalidArgumentThe input argument is invalid.
kStatus_RxBusySAI is busy receiving data.

brief Performs a non-blocking SAI receive using eDMA.

note This interface returns immediately after the transfer initiates. Call the SAI_GetReceiveRemainingBytes to poll the transfer status and check whether the SAI transfer is finished.

This function support multi channel transfer,

  1. for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
  2. for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.

param base SAI base pointer param handle SAI eDMA handle pointer. param xfer Pointer to DMA transfer structure. retval kStatus_Success Start a SAI eDMA receive successfully. retval kStatus_InvalidArgument The input argument is invalid. retval kStatus_RxBusy SAI is busy receiving data.

◆ SAI_TransferReceiveLoopEDMA()

status_t SAI_TransferReceiveLoopEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_t xfer,
uint32_t  loopTransferCount 
)

Performs a non-blocking SAI loop transfer using eDMA.

Note
This function support loop transfer only,such as A->B->...->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.

Once the loop transfer start, application can use function SAI_TransferAbortReceiveEDMA to stop the loop transfer.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
xferPointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount).
loopTransferCountthe counts of xfer array.
Return values
kStatus_SuccessStart a SAI eDMA receive successfully.
kStatus_InvalidArgumentThe input argument is invalid.

brief Performs a non-blocking SAI loop transfer using eDMA.

note This function support loop transfer only,such as A->B->...->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.

Once the loop transfer start, application can use function SAI_TransferAbortReceiveEDMA to stop the loop transfer.

param base SAI base pointer. param handle SAI eDMA handle pointer. param xfer Pointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount). param loopTransferCount the counts of xfer array. retval kStatus_Success Start a SAI eDMA receive successfully. retval kStatus_InvalidArgument The input argument is invalid.

◆ SAI_TransferRxCreateHandleEDMA()

void SAI_TransferRxCreateHandleEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_edma_callback_t  callback,
void *  userData,
edma_handle_t rxDmaHandle 
)

Initializes the SAI Rx eDMA handle.

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

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
baseSAI peripheral base address.
callbackPointer to user callback function.
userDataUser parameter passed to the callback function.
rxDmaHandleeDMA handle pointer, this handle shall be static allocated by users.

brief Initializes the SAI Rx eDMA handle.

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

param base SAI base pointer. param handle SAI eDMA handle pointer. param base SAI peripheral base address. param callback Pointer to user callback function. param userData User parameter passed to the callback function. param dmaHandle eDMA handle pointer, this handle shall be static allocated by users.

◆ SAI_TransferRxSetConfigEDMA()

void SAI_TransferRxSetConfigEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transceiver_t saiConfig 
)

Configures the SAI Rx.

Note
SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_FifoCombineModeEnabledOnRead to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step.
config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead;
SAI_TransferRxSetConfigEDMA(I2S0, &edmaHandle, &config);
void SAI_GetClassicI2SConfig(sai_transceiver_t *config, sai_word_width_t bitWidth, sai_mono_stereo_t mode, uint32_t saiChannelMask)
Get classic I2S mode configurations.
Definition: fsl_sai.c:1698
@ kSAI_Channel1Mask
Definition: fsl_sai.h:44
@ kSAI_Channel0Mask
Definition: fsl_sai.h:43
@ kSAI_Stereo
Definition: fsl_sai.h:75
@ kSAI_WordWidth16bits
Definition: fsl_sai.h:228
void SAI_TransferRxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Rx.
Definition: fsl_sai_edma.c:429
sai transceiver configurations
Definition: fsl_sai.h:395
Definition: deflate.c:114
Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
saiConfigsai configurations.

brief Configures the SAI Rx.

note SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_FifoCombineModeEnabledOnRead to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step. code sai_transceiver_t config; SAI_GetClassicI2SConfig(&config, kSAI_WordWidth16bits, kSAI_Stereo, kSAI_Channel0Mask|kSAI_Channel1Mask); config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead; SAI_TransferRxSetConfigEDMA(I2S0, &edmaHandle, &config); endcode param base SAI base pointer. param handle SAI eDMA handle pointer. param saiConfig sai configurations.

◆ SAI_TransferRxSetFormatEDMA()

void SAI_TransferRxSetFormatEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_format_t format,
uint32_t  mclkSourceClockHz,
uint32_t  bclkSourceClockHz 
)

Configures the SAI Rx audio format.

Deprecated:
Do not use this function. It has been superceded by SAI_TransferRxSetConfigEDMA

The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to formatting requirements.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
formatPointer to SAI audio data format structure.
mclkSourceClockHzSAI master clock source frequency in Hz.
bclkSourceClockHzSAI bit clock source frequency in Hz. If a bit clock source is the master clock, this value should equal to masterClockHz in format.
Return values
kStatus_SuccessAudio format set successfully.
kStatus_InvalidArgumentThe input argument is invalid.

brief Configures the SAI Rx audio format.

deprecated Do not use this function. It has been superceded by ref SAI_TransferRxSetConfigEDMA

The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to formatting requirements.

param base SAI base pointer. param handle SAI eDMA handle pointer. param format Pointer to SAI audio data format structure. param mclkSourceClockHz SAI master clock source frequency in Hz. param bclkSourceClockHz SAI bit clock source frequency in Hz. If a bit clock source is the master clock, this value should equal to masterClockHz in format. retval kStatus_Success Audio format set successfully. retval kStatus_InvalidArgument The input argument is invalid.

◆ SAI_TransferSendEDMA()

status_t SAI_TransferSendEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_t xfer 
)

Performs a non-blocking SAI transfer using DMA.

Note
This interface returns immediately after the transfer initiates. Call SAI_GetTransferStatus to poll the transfer status and check whether the SAI transfer is finished.

This function support multi channel transfer,

  1. for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
  2. for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.
Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
xferPointer to the DMA transfer structure.
Return values
kStatus_SuccessStart a SAI eDMA send successfully.
kStatus_InvalidArgumentThe input argument is invalid.
kStatus_TxBusySAI is busy sending data.

brief Performs a non-blocking SAI transfer using DMA.

note This interface returns immediately after the transfer initiates. Call SAI_GetTransferStatus to poll the transfer status and check whether the SAI transfer is finished.

This function support multi channel transfer,

  1. for the sai IP support fifo combine mode, application should enable the fifo combine mode, no limitation on channel numbers
  2. for the sai IP not support fifo combine mode, sai edma provide another solution which using EDMA modulo feature, but support 2 or 4 channels only.

param base SAI base pointer. param handle SAI eDMA handle pointer. param xfer Pointer to the DMA transfer structure. retval kStatus_Success Start a SAI eDMA send successfully. retval kStatus_InvalidArgument The input argument is invalid. retval kStatus_TxBusy SAI is busy sending data.

◆ SAI_TransferSendLoopEDMA()

status_t SAI_TransferSendLoopEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_t xfer,
uint32_t  loopTransferCount 
)

Performs a non-blocking SAI loop transfer using eDMA.

Note
This function support loop transfer only,such as A->B->...->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.

Once the loop transfer start, application can use function SAI_TransferAbortSendEDMA to stop the loop transfer.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
xferPointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount).
loopTransferCountthe counts of xfer array.
Return values
kStatus_SuccessStart a SAI eDMA send successfully.
kStatus_InvalidArgumentThe input argument is invalid.

brief Performs a non-blocking SAI loop transfer using eDMA.

note This function support loop transfer only,such as A->B->...->A, application must be aware of that the more counts of the loop transfer, then more tcd memory required, as the function use the tcd pool in sai_edma_handle_t, so application could redefine the SAI_XFER_QUEUE_SIZE to determine the proper TCD pool size. This function support one sai channel only.

Once the loop transfer start, application can use function SAI_TransferAbortSendEDMA to stop the loop transfer.

param base SAI base pointer. param handle SAI eDMA handle pointer. param xfer Pointer to the DMA transfer structure, should be a array with elements counts >=1(loopTransferCount). param loopTransferCount the counts of xfer array. retval kStatus_Success Start a SAI eDMA send successfully. retval kStatus_InvalidArgument The input argument is invalid.

◆ SAI_TransferTerminateReceiveEDMA()

void SAI_TransferTerminateReceiveEDMA ( I2S_Type base,
sai_edma_handle_t handle 
)

Terminate all SAI receive.

This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortReceiveEDMA.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.

brief Terminate all SAI receive.

This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortReceiveEDMA.

param base SAI base pointer. param handle SAI eDMA handle pointer.

◆ SAI_TransferTerminateSendEDMA()

void SAI_TransferTerminateSendEDMA ( I2S_Type base,
sai_edma_handle_t handle 
)

Terminate all SAI send.

This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortSendEDMA.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.

brief Terminate all SAI send.

This function will clear all transfer slots buffered in the sai queue. If users only want to abort the current transfer slot, please call SAI_TransferAbortSendEDMA.

param base SAI base pointer. param handle SAI eDMA handle pointer.

◆ SAI_TransferTxCreateHandleEDMA()

void SAI_TransferTxCreateHandleEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_edma_callback_t  callback,
void *  userData,
edma_handle_t txDmaHandle 
)

Initializes the SAI eDMA handle.

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

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
baseSAI peripheral base address.
callbackPointer to user callback function.
userDataUser parameter passed to the callback function.
txDmaHandleeDMA handle pointer, this handle shall be static allocated by users.

brief Initializes the SAI eDMA handle.

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

param base SAI base pointer. param handle SAI eDMA handle pointer. param base SAI peripheral base address. param callback Pointer to user callback function. param userData User parameter passed to the callback function. param dmaHandle eDMA handle pointer, this handle shall be static allocated by users.

◆ SAI_TransferTxSetConfigEDMA()

void SAI_TransferTxSetConfigEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transceiver_t saiConfig 
)

Configures the SAI Tx.

Note
SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_FifoCombineModeEnabledOnWrite to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step.
config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnWrite;
SAI_TransferTxSetConfigEDMA(I2S0, &edmaHandle, &config);
void SAI_TransferTxSetConfigEDMA(I2S_Type *base, sai_edma_handle_t *handle, sai_transceiver_t *saiConfig)
Configures the SAI Tx.
Definition: fsl_sai_edma.c:322
Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
saiConfigsai configurations.

brief Configures the SAI Tx.

note SAI eDMA supports data transfer in a multiple SAI channels if the FIFO Combine feature is supported. To activate the multi-channel transfer enable SAI channels by filling the channelMask of sai_transceiver_t with the corresponding values of _sai_channel_mask enum, enable the FIFO Combine mode by assigning kSAI_FifoCombineModeEnabledOnWrite to the fifoCombine member of sai_fifo_combine_t which is a member of sai_transceiver_t. This is an example of multi-channel data transfer configuration step. code sai_transceiver_t config; SAI_GetClassicI2SConfig(&config, kSAI_WordWidth16bits, kSAI_Stereo, kSAI_Channel0Mask|kSAI_Channel1Mask); config.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnWrite; SAI_TransferTxSetConfigEDMA(I2S0, &edmaHandle, &config); endcode param base SAI base pointer. param handle SAI eDMA handle pointer. param saiConfig sai configurations.

◆ SAI_TransferTxSetFormatEDMA()

void SAI_TransferTxSetFormatEDMA ( I2S_Type base,
sai_edma_handle_t handle,
sai_transfer_format_t format,
uint32_t  mclkSourceClockHz,
uint32_t  bclkSourceClockHz 
)

Configures the SAI Tx audio format.

Deprecated:
Do not use this function. It has been superceded by SAI_TransferTxSetConfigEDMA

The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to formatting requirements.

Parameters
baseSAI base pointer.
handleSAI eDMA handle pointer.
formatPointer to SAI audio data format structure.
mclkSourceClockHzSAI master clock source frequency in Hz.
bclkSourceClockHzSAI bit clock source frequency in Hz. If bit clock source is master clock, this value should equals to masterClockHz in format.
Return values
kStatus_SuccessAudio format set successfully.
kStatus_InvalidArgumentThe input argument is invalid.

brief Configures the SAI Tx audio format.

deprecated Do not use this function. It has been superceded by ref SAI_TransferTxSetConfigEDMA

The audio format can be changed at run-time. This function configures the sample rate and audio data format to be transferred. This function also sets the eDMA parameter according to formatting requirements.

param base SAI base pointer. param handle SAI eDMA handle pointer. param format Pointer to SAI audio data format structure. param mclkSourceClockHz SAI master clock source frequency in Hz. param bclkSourceClockHz SAI bit clock source frequency in Hz. If bit clock source is master clock, this value should equals to masterClockHz in format. retval kStatus_Success Audio format set successfully. retval kStatus_InvalidArgument The input argument is invalid.