The QSPI_DMA module provide a method for QSPI transfer operation based on DMA.
|
void | QSPI_MasterTransferCreateHandleDMA (QSPI_Type *base, qspi_master_dma_handle_t *psHandle, qspi_dma_transfer_callback_t pfCallback, void *pUserData, DMA_Type *psDmaBase, dma_channel_t eDmaTxChannel, dma_channel_t eDmaRxChannel) |
| Initialize the QUEUEDSPI master DMA handle. More...
|
|
status_t | QSPI_MasterTransferDMA (qspi_master_dma_handle_t *psHandle, qspi_transfer_t *psXfer) |
| DMA method of QUEUEDSPI master transfer. More...
|
|
status_t | QSPI_MasterTransferGetCountDMA (qspi_master_dma_handle_t *psHandle, uint16_t *pu16Count) |
| Get the master DMA transfer count. More...
|
|
void | QSPI_MasterTransferAbortDMA (qspi_master_dma_handle_t *psHandle) |
| Abort a transfer that uses DMA for master. More...
|
|
void | QSPI_SlaveTransferCreateHandleDMA (QSPI_Type *base, qspi_slave_dma_handle_t *psHandle, qspi_dma_transfer_callback_t pfCallback, void *pUserData, DMA_Type *psDmaBase, dma_channel_t eDmaTxChannel, dma_channel_t eDmaRxChannel) |
| Initialize the QUEUEDSPI slave DMA handle. More...
|
|
status_t | QSPI_SlaveTransferDMA (qspi_slave_dma_handle_t *psHandle, qspi_transfer_t *psXfer) |
| DMA method of QUEUEDSPI slave transfer. More...
|
|
status_t | QSPI_SlaveTransferGetCountDMA (qspi_slave_dma_handle_t *psHandle, uint16_t *pu16Count) |
| Get the slave DMA transfer count. More...
|
|
void | QSPI_SlaveTransferAbortDMA (qspi_slave_dma_handle_t *psHandle) |
| Abort a transfer that uses DMA for slave. More...
|
|
struct _qspi_master_dma_handle |
Forward declaration of the _qspi_master_dma_handle typedefs.
volatile uint8_t qspi_slave_dma_handle_t::u8State |
uint16_t qspi_slave_dma_handle_t::u16TotalByteCount |
uint16_t qspi_slave_dma_handle_t::u16TxDummyData |
uint16_t qspi_slave_dma_handle_t::u16RxDummyData |
dma_handle_t qspi_slave_dma_handle_t::sTxHandle |
dma_handle_t qspi_slave_dma_handle_t::sRxHandle |
bool qspi_slave_dma_handle_t::bIsTxInProgress |
bool qspi_slave_dma_handle_t::bIsRxInProgress |
void* qspi_slave_dma_handle_t::pUserData |
volatile bool qspi_slave_dma_handle_t::bIsPcsActiveAfterTransfer |
typedef void(* qspi_dma_transfer_callback_t)(qspi_master_dma_handle_t *psHandle, status_t eCompletionStatus, void *pUserData) |
- Parameters
-
base | QUEUEDSPI peripheral base address. |
psHandle | Pointer to the handle for the QUEUEDSPI master. |
eCompletionStatus | Success or error code describing whether the transfer completed. |
pUserData | Arbitrary pointer-dataSized value passed from the application. |
This function initializes the QUEUEDSPI DMA master handle which can be used for QUEUEDSPI DMA master transactional APIs. Usually, for a specified QUEUEDSPI instance, call this API once to get the initialized handle.
- Parameters
-
base | QUEUEDSPI peripheral base address. |
psHandle | QUEUEDSPI handle pointer to qspi_master_dma_handle_t. |
pfCallback | QUEUEDSPI callback. |
pUserData | callback function parameter. |
psDmaBase | base address for the DMA |
eDmaTxChannel | Channel of the DMA used for QSPI Tx |
eDmaRxChannel | Channel of the DMA used for QSPI Rx |
This function transfers data using DMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
- Note
- : The transfer data size should be even, if the transfer data width is larger than 8.
- Parameters
-
psHandle | pointer to qspi_master_dma_handle_t structure which stores the transfer state. |
psXfer | pointer to qspi_transfer_t structure. |
- Returns
- status of status_t.
status_t QSPI_MasterTransferGetCountDMA |
( |
qspi_master_dma_handle_t * |
psHandle, |
|
|
uint16_t * |
pu16Count |
|
) |
| |
- Parameters
-
psHandle | Pointer to the qspi_master_dma_handle_t structure which stores the transfer state. |
pu16Count | The number of bytes transferred by using the DMA transaction. |
- Returns
- status of status_t.
void QSPI_MasterTransferAbortDMA |
( |
qspi_master_dma_handle_t * |
psHandle | ) |
|
- Parameters
-
psHandle | Pointer to the qspi_master_dma_handle_t structure which stores the transfer state. |
This function initializes the QUEUEDSPI DMA handle which can be used for other QUEUEDSPI transactional APIs. Usually, for a specified QUEUEDSPI instance, call this API once to get the initialized handle.
- Parameters
-
base | QUEUEDSPI peripheral base address. |
psHandle | QUEUEDSPI handle pointer to qspi_slave_dma_handle_t. |
pfCallback | QUEUEDSPI callback. |
pUserData | callback function parameter. |
psDmaBase | base address for the DMA |
eDmaTxChannel | Channel of the DMA used for QSPI Tx |
eDmaRxChannel | Channel of the DMA used for QSPI Rx |
This function transfers data using DMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
- Note
- : The transfer data size should be even if the transfer data width is larger than 8.
- Parameters
-
psHandle | pointer to qspi_slave_dma_handle_t structure which stores the transfer state. |
psXfer | pointer to qspi_transfer_t structure. |
- Returns
- status of status_t.
status_t QSPI_SlaveTransferGetCountDMA |
( |
qspi_slave_dma_handle_t * |
psHandle, |
|
|
uint16_t * |
pu16Count |
|
) |
| |
- Parameters
-
psHandle | Pointer to the qspi_slave_dma_handle_t structure which stores the transfer state. |
pu16Count | The number of bytes transferred by using the DMA transaction. |
- Returns
- status of status_t.
void QSPI_SlaveTransferAbortDMA |
( |
qspi_slave_dma_handle_t * |
psHandle | ) |
|
- Parameters
-
psHandle | Pointer to the qspi_slave_dma_handle_t structure which stores the transfer state. |