The QSCI_EDMA module provide a method for QSCI transfer operation based on EDMA.
|
#define | FSL_QSCI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
|
|
void | QSCI_TransferCreateHandleEDMA (QSCI_Type *base, qsci_edma_transfer_handle_t *psHandle, qsci_edma_transfer_callback_t pfCallback, void *pUserData, DMA_Type *edmaBase, edma_channel_t eEdmaTxChannel, edma_channel_t eEdmaRxChannel) |
| Initializes the QSCI edma handle. More...
|
|
status_t | QSCI_TransferSendEDMA (qsci_edma_transfer_handle_t *psHandle, qsci_transfer_t *psTransfer) |
| Initiate data transmit using EDMA. More...
|
|
status_t | QSCI_TransferReceiveEDMA (qsci_edma_transfer_handle_t *psHandle, qsci_transfer_t *psTransfer) |
| Initiate data receive using EDMA. More...
|
|
void | QSCI_TransferAbortSendEDMA (qsci_edma_transfer_handle_t *psHandle) |
| Aborts the data transmit process using EDMA. More...
|
|
void | QSCI_TransferAbortReceiveEDMA (qsci_edma_transfer_handle_t *psHandle) |
| Aborts the data receive process using EDMA. More...
|
|
status_t | QSCI_TransferGetReceiveCountEDMA (qsci_edma_transfer_handle_t *psHandle, uint32_t *pu32Count) |
| Gets the number of received bytes. More...
|
|
status_t | QSCI_TransferGetSendCountEDMA (qsci_edma_transfer_handle_t *psHandle, uint32_t *pu32Count) |
| Gets the number of bytes written to the QSCI TX register. More...
|
|
struct _qsci_edma_transfer_handle |
- Note
- If user wants to use the transactional API to transfer data in edma way, one QSCI instance should and can only be allocated one handle.
-
The handle is maintained by QSCI driver internally, which means the transfer state is retained and user shall not modify its state u8TxState or u8RxState in application level. If user only wish to use transactional APIs without understanding its machanism, it is not necessary to understand these members.
QSCI_Type* qsci_edma_transfer_handle_t::base |
uint32_t qsci_edma_transfer_handle_t::u32RxDataSizeAll |
uint32_t qsci_edma_transfer_handle_t::u32TxDataSizeAll |
edma_handle_t qsci_edma_transfer_handle_t::sTxEdmaHandle |
edma_handle_t qsci_edma_transfer_handle_t::sRxEdmaHandle |
volatile uint8_t qsci_edma_transfer_handle_t::u8TxState |
status_t qsci_edma_transfer_handle_t::busStatus |
typedef void(* qsci_edma_transfer_callback_t)(qsci_edma_transfer_handle_t *psHandle) |
Defines the interface of user callback function used in QSCI edma transfer using transactional APIs. The callback function shall be defined and declared in application level by user. Before starting QSCI transmiting or receiving by calling QSCI_TransferSendEDMA or QSCI_TransferReceiveEDMA, call QSCI_TransferCreateHandleEDMA to install the user callback. When the transmiting or receiving ends, user callback will be invoked by driver.
- Parameters
-
psHandle | Transfer handle that contains bus status, user data. |
This function initializes the QSCI edma handle which can be used for other QSCI transactional APIs. Usually, for a specified QSCI instance, call this API once to get the initialized handle.
- Parameters
-
base | QSCI peripheral base address. |
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
pfCallback | Callback function. |
pUserData | User data. |
edmaBase | Edma base address. |
eEdmaTxChannel | eDMA channel for TX transfer. |
eEdmaRxChannel | eDMA channel for RX transfer. |
This function initiates a data transmit process using eDMA. This is a non-blocking function, which returns right away. When all the data is sent, the send callback function is called.
- Parameters
-
psHandle | QSCI handle pointer. |
psTransfer | QSCI eDMA transfer structure. See qsci_transfer_t. |
- Return values
-
kStatus_Success | if succeed, others failed. |
kStatus_QSCI_TxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid argument. |
This function initiates a data receive process using eDMA. This is a non-blocking function, which returns right away. When all the data is received, the receive callback function is called.
- Parameters
-
handle | Pointer to qsci_edma_transfer_handle_t structure. |
psTransfer | QSCI eDMA transfer structure, see qsci_transfer_t. |
- Return values
-
kStatus_Success | if succeed, others fail. |
kStatus_QSCI_RxBusy | Previous transfer ongoing. |
kStatus_InvalidArgument | Invalid argument. |
void QSCI_TransferAbortSendEDMA |
( |
qsci_edma_transfer_handle_t * |
psHandle | ) |
|
- Parameters
-
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
void QSCI_TransferAbortReceiveEDMA |
( |
qsci_edma_transfer_handle_t * |
psHandle | ) |
|
- Parameters
-
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
status_t QSCI_TransferGetReceiveCountEDMA |
( |
qsci_edma_transfer_handle_t * |
psHandle, |
|
|
uint32_t * |
pu32Count |
|
) |
| |
This function gets the number of received bytes.
- Parameters
-
psHandle | QSCI handle pointer. |
pu32Count | Receive bytes count. |
- Return values
-
kStatus_NoTransferInProgress | No receive in progress. |
kStatus_Success | Get successfully through the parameter count ; |
status_t QSCI_TransferGetSendCountEDMA |
( |
qsci_edma_transfer_handle_t * |
psHandle, |
|
|
uint32_t * |
pu32Count |
|
) |
| |
This function gets the number of bytes written to the QSCI TX register by DMA.
- Parameters
-
psHandle | QSCI handle pointer. |
pu32Count | Send bytes count. |
- Return values
-
kStatus_NoTransferInProgress | No send in progress. |
kStatus_Success | Get successfully through the parameter count ; |