![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
The QSCI_EDMA module provide a method for QSCI transfer operation based on EDMA.
Data Structures | |
struct | qsci_edma_transfer_handle_t |
QSCI edma transfer handle. More... | |
Typedefs | |
typedef void(* | qsci_edma_transfer_callback_t )(qsci_edma_transfer_handle_t *psHandle) |
QSCI edma transfer callback function definition. More... | |
Driver version | |
#define | FSL_QSCI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
QSCI EDMA driver version. More... | |
eDMA transactional | |
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_TransferGetReceivedCountEDMA (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 |
Forward declaration of the qsci edma handle typedef.
This struct address should be sizeof(edma_channel_tcd_t) aligned.
Data Fields | |
edma_channel_tcd_t | sTxTcd |
TCD for EDMA TX transfer. More... | |
edma_channel_tcd_t | sRxTcd |
TCD for EDMA RX transfer. More... | |
QSCI_Type * | base |
Pointer to the QSCI base that belongs to this handle. More... | |
qsci_edma_transfer_callback_t | pfCallback |
Callback function. More... | |
uint32_t | u32RxDataSizeAll |
Size of the data to receive. More... | |
uint32_t | u32TxDataSizeAll |
Size of the data to send out. More... | |
edma_handle_t | sTxEdmaHandle |
The eDMA TX channel used. More... | |
edma_handle_t | sRxEdmaHandle |
The eDMA RX channel used. More... | |
volatile uint8_t | u8TxState |
TX transfer state. More... | |
volatile uint8_t | u8RxState |
RX transfer state. | |
status_t | busStatus |
QSCI bus status. More... | |
void * | pUserData |
User configurable pointer to any data, function, structure etc that user wish to use in the callback | |
edma_channel_tcd_t qsci_edma_transfer_handle_t::sTxTcd |
edma_channel_tcd_t qsci_edma_transfer_handle_t::sRxTcd |
QSCI_Type* qsci_edma_transfer_handle_t::base |
qsci_edma_transfer_callback_t qsci_edma_transfer_handle_t::pfCallback |
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 |
#define FSL_QSCI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
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.
psHandle | Transfer handle that contains bus status, user data. |
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 | ||
) |
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.
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. |
status_t QSCI_TransferSendEDMA | ( | qsci_edma_transfer_handle_t * | psHandle, |
qsci_transfer_t * | psTransfer | ||
) |
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.
psHandle | QSCI handle pointer. |
psTransfer | QSCI eDMA transfer structure. See qsci_transfer_t. |
kStatus_Success | if succeed, others failed. |
kStatus_QSCI_TxBusy | Previous transfer on going. |
kStatus_InvalidArgument | Invalid argument. |
status_t QSCI_TransferReceiveEDMA | ( | qsci_edma_transfer_handle_t * | psHandle, |
qsci_transfer_t * | psTransfer | ||
) |
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.
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
psTransfer | QSCI eDMA transfer structure, see qsci_transfer_t. |
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 | ) |
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
void QSCI_TransferAbortReceiveEDMA | ( | qsci_edma_transfer_handle_t * | psHandle | ) |
psHandle | Pointer to qsci_edma_transfer_handle_t structure. |
status_t QSCI_TransferGetReceivedCountEDMA | ( | qsci_edma_transfer_handle_t * | psHandle, |
uint32_t * | pu32Count | ||
) |
This function gets the number of received bytes.
psHandle | QSCI handle pointer. |
pu32Count | Receive bytes count. |
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.
psHandle | QSCI handle pointer. |
pu32Count | Send bytes count. |
kStatus_NoTransferInProgress | No send in progress. |
kStatus_Success | Get successfully through the parameter count ; |