RTEMS 6.1-rc2
|
Data Structures | |
struct | _asrc_p2p_edma_config |
destination peripheral configuration More... | |
struct | _asrc_in_edma_handle |
struct | _asrc_out_edma_handle |
struct | _asrc_edma_handle |
ASRC DMA transfer handle. More... | |
Driver version | |
typedef struct _asrc_edma_handle | asrc_edma_handle_t |
typedef void(* | asrc_edma_callback_t) (ASRC_Type *base, asrc_edma_handle_t *handle, status_t status, void *userData) |
ASRC eDMA transfer callback function for finish and error. | |
typedef void(* | asrc_start_peripheral_t) (bool start) |
ASRC trigger peripheral function pointer. | |
typedef struct _asrc_p2p_edma_config | asrc_p2p_edma_config_t |
destination peripheral configuration | |
typedef struct _asrc_in_edma_handle | asrc_in_edma_handle_t |
typedef struct _asrc_out_edma_handle | asrc_out_edma_handle_t |
#define | FSL_ASRC_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
#define | ASRC_XFER_IN_QUEUE_SIZE 4U |
ASRC IN edma QUEUE size. | |
#define | ASRC_XFER_OUT_QUEUE_SIZE (ASRC_XFER_QUEUE_SIZE * 2U) |
eDMA Transactional | |
void | ASRC_TransferInCreateHandleEDMA (ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_t channelPair, asrc_edma_callback_t callback, edma_handle_t *inDmaHandle, const asrc_p2p_edma_config_t *periphConfig, void *userData) |
Initializes the ASRC IN eDMA handle. | |
void | ASRC_TransferOutCreateHandleEDMA (ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_t channelPair, asrc_edma_callback_t callback, edma_handle_t *outDmaHandle, const asrc_p2p_edma_config_t *periphConfig, void *userData) |
Initializes the ASRC OUT eDMA handle. | |
status_t | ASRC_TransferSetChannelPairConfigEDMA (ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_config_t *asrcConfig, uint32_t inSampleRate, uint32_t outSampleRate) |
Configures the ASRC P2P channel pair. | |
uint32_t | ASRC_GetOutSamplesSizeEDMA (ASRC_Type *base, asrc_edma_handle_t *handle, uint32_t inSampleRate, uint32_t outSampleRate, uint32_t inSamplesize) |
Get output sample buffer size can be transferred by edma. | |
status_t | ASRC_TransferEDMA (ASRC_Type *base, asrc_edma_handle_t *handle, asrc_transfer_t *xfer) |
Performs a non-blocking ASRC m2m convert using EDMA. | |
void | ASRC_TransferInAbortEDMA (ASRC_Type *base, asrc_edma_handle_t *handle) |
Aborts a ASRC IN transfer using eDMA. | |
void | ASRC_TransferOutAbortEDMA (ASRC_Type *base, asrc_edma_handle_t *handle) |
Aborts a ASRC OUT transfer using eDMA. | |
void | ASRC_TransferInTerminalEDMA (ASRC_Type *base, asrc_edma_handle_t *handle) |
Terminate In ASRC Convert. | |
void | ASRC_TransferOutTerminalEDMA (ASRC_Type *base, asrc_edma_handle_t *handle) |
Terminate Out ASRC Convert. | |
#define ASRC_XFER_IN_QUEUE_SIZE 4U |
ASRC IN edma QUEUE size.
<
#define FSL_ASRC_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 1, 0)) |
Version 2.1.0
typedef struct _asrc_in_edma_handle asrc_in_edma_handle_t |
@ brief asrc in edma handler
typedef struct _asrc_out_edma_handle asrc_out_edma_handle_t |
@ brief asrc out edma handler
uint32_t ASRC_GetOutSamplesSizeEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle, | ||
uint32_t | inSampleRate, | ||
uint32_t | outSampleRate, | ||
uint32_t | inSamplesize | ||
) |
Get output sample buffer size can be transferred by edma.
base | asrc base pointer. |
handle | ASRC channel pair edma handle. |
inSampleRate | input sample rate. |
outSampleRate | output sample rate. |
inSamplesize | input sampleS size. |
output | buffer size in byte. |
brief Get output sample buffer size can be transferred by edma.
note This API is depends on the ASRC output configuration, should be called after the ASRC_TransferSetChannelPairConfigEDMA.
param base asrc base pointer. param handle ASRC channel pair edma handle. param inSampleRate input sample rate. param outSampleRate output sample rate. param inSamples input sampleS size. retval output buffer size in byte.
status_t ASRC_TransferEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle, | ||
asrc_transfer_t * | xfer | ||
) |
Performs a non-blocking ASRC m2m convert using EDMA.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
xfer | Pointer to the DMA transfer structure. |
kStatus_Success | Start a ASRC eDMA send successfully. |
kStatus_InvalidArgument | The input argument is invalid. |
kStatus_ASRCQueueFull | ASRC EDMA driver queue is full. |
brief Performs a non-blocking ASRC convert using EDMA.
note This interface returns immediately after the transfer initiates.
param base ASRC base pointer. param handle ASRC eDMA handle pointer. param xfer Pointer to the DMA transfer structure. retval kStatus_Success Start a ASRC eDMA send successfully. retval kStatus_InvalidArgument The input argument is invalid. retval kStatus_ASRCQueueFull ASRC EDMA driver queue is full.
void ASRC_TransferInAbortEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle | ||
) |
Aborts a ASRC IN 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 ASRC_TransferTerminalP2PEDMA.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
brief Aborts a ASRC IN 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 ASRC_TransferTerminalP2PEDMA.
param base ASRC base pointer. param handle ASRC eDMA handle pointer.
void ASRC_TransferInCreateHandleEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle, | ||
asrc_channel_pair_t | channelPair, | ||
asrc_edma_callback_t | callback, | ||
edma_handle_t * | inDmaHandle, | ||
const asrc_p2p_edma_config_t * | periphConfig, | ||
void * | userData | ||
) |
Initializes the ASRC IN eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
base | ASRC base pointer. |
channelPair | ASRC channel pair |
handle | ASRC eDMA handle pointer. |
callback | Pointer to user callback function. |
inDmaHandle | DMA handler for ASRC in. |
periphConfig | peripheral configuration. |
userData | User parameter passed to the callback function. |
brief Initializes the ASRC IN eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
param base ASRC base pointer. param channelPair ASRC channel pair param handle ASRC eDMA handle pointer. param callback Pointer to user callback function. param txDmaHandle ASRC send edma handle pointer. param periphConfig peripheral configuration. param userData User parameter passed to the callback function.
void ASRC_TransferInTerminalEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle | ||
) |
Terminate In ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
brief Terminate In ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
param base ASRC base pointer. param handle ASRC eDMA handle pointer.
void ASRC_TransferOutAbortEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle | ||
) |
Aborts a ASRC OUT 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 ASRC_TransferTerminalP2PEDMA.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
brief Aborts a ASRC OUT 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 ASRC_TransferTerminalP2PEDMA.
param base ASRC base pointer. param handle ASRC eDMA handle pointer.
void ASRC_TransferOutCreateHandleEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle, | ||
asrc_channel_pair_t | channelPair, | ||
asrc_edma_callback_t | callback, | ||
edma_handle_t * | outDmaHandle, | ||
const asrc_p2p_edma_config_t * | periphConfig, | ||
void * | userData | ||
) |
Initializes the ASRC OUT eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
base | ASRC base pointer. |
channelPair | ASRC channel pair |
handle | ASRC eDMA handle pointer. |
callback | Pointer to user callback function. |
outDmaHandle | DMA handler for ASRC out. |
periphConfig | peripheral configuration. |
userData | User parameter passed to the callback function. |
brief Initializes the ASRC OUT eDMA handle.
This function initializes the ASRC DMA handle, which can be used for other ASRC transactional APIs. Usually, for a specified ASRC channel pair, call this API once to get the initialized handle.
param base ASRC base pointer. param channelPair ASRC channel pair param handle ASRC eDMA handle pointer. param callback Pointer to user callback function. param txDmaHandle ASRC send edma handle pointer. param periphConfig peripheral configuration. param userData User parameter passed to the callback function.
void ASRC_TransferOutTerminalEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle | ||
) |
Terminate Out ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
brief Terminate Out ASRC Convert.
This function will clear all transfer slots buffered in the asrc queue. If users only want to abort the current transfer slot, please call ASRC_TransferAbortPP2PEDMA.
param base ASRC base pointer. param handle ASRC eDMA handle pointer.
status_t ASRC_TransferSetChannelPairConfigEDMA | ( | ASRC_Type * | base, |
asrc_edma_handle_t * | handle, | ||
asrc_channel_pair_config_t * | asrcConfig, | ||
uint32_t | inSampleRate, | ||
uint32_t | outSampleRate | ||
) |
Configures the ASRC P2P channel pair.
base | ASRC base pointer. |
handle | ASRC eDMA handle pointer. |
asrcConfig | asrc configurations. |
inSampleRate | ASRC input sample rate. |
outSampleRate | ASRC output sample rate. |
brief Configures the ASRC channel pair.
param base ASRC base pointer. param handle ASRC eDMA handle pointer. param asrcConfig asrc configurations. param periphConfig peripheral configuration. param inputSampleRate ASRC input sample rate. param outputSampleRate ASRC output sample rate.