![]() |
MCUXpresso SDK API Reference Manual
Rev 2.12.1
NXP Semiconductors
|
Files | |
| file | fsl_spi_gpdma.h |
Data Structures | |
| struct | spi_gpdma_handle_t |
| SPI GPDMA transfer handle, users should not touch the content of the handle. More... | |
Typedefs | |
| typedef void(* | spi_gpdma_callback_t )(SPI_Type *base, spi_gpdma_handle_t *handle, status_t status, void *userData) |
| SPI GPDMA callback called at the end of transfer. More... | |
Driver version | |
| #define | FSL_SPI_GPDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
| SPI GPDMA driver version 2.0.1. More... | |
GPDMA Transactional | |
| status_t | SPI_MasterTransferCreateHandleGPDMA (SPI_Type *base, spi_gpdma_handle_t *handle, spi_gpdma_callback_t callback, void *userData, gpdma_handle_t *txHandle, gpdma_handle_t *rxHandle) |
| Initialize the SPI master GPDMA handle. More... | |
| status_t | SPI_MasterTransferGPDMA (SPI_Type *base, spi_gpdma_handle_t *handle, spi_transfer_t *xfer) |
| Perform a non-blocking SPI transfer using GPDMA. More... | |
| void | SPI_MasterTransferAbortGPDMA (SPI_Type *base, spi_gpdma_handle_t *handle) |
| Abort a SPI transfer using GPDMA. More... | |
| struct _spi_gpdma_handle |
Data Fields | |
| volatile bool | txInProgress |
| Send transfer finished. | |
| volatile bool | rxInProgress |
| Receive transfer finished. | |
| gpdma_handle_t * | txHandle |
| GPDMA handler for SPI send. | |
| gpdma_handle_t * | rxHandle |
| GPDMA handler for SPI receive. | |
| uint8_t | bytesPerFrame |
| Bytes in a frame for SPI transfer. | |
| spi_gpdma_callback_t | callback |
| Callback for SPI GPDMA transfer. | |
| void * | userData |
| User Data for SPI GPDMA callback. | |
| uint32_t | state |
| Internal state of SPI GPDMA transfer. | |
| size_t | transferSize |
| Bytes need to be transfer. | |
| #define FSL_SPI_GPDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 1)) |
| typedef void(* spi_gpdma_callback_t)(SPI_Type *base, spi_gpdma_handle_t *handle, status_t status, void *userData) |
| status_t SPI_MasterTransferCreateHandleGPDMA | ( | SPI_Type * | base, |
| spi_gpdma_handle_t * | handle, | ||
| spi_gpdma_callback_t | callback, | ||
| void * | userData, | ||
| gpdma_handle_t * | txHandle, | ||
| gpdma_handle_t * | rxHandle | ||
| ) |
This function initializes the SPI master GPDMA handle which can be used for other SPI master transactional APIs. Usually, for a specified SPI instance, user need only call this API once to get the initialized handle.
| base | SPI peripheral base address. |
| handle | SPI handle pointer. |
| callback | User callback function called at the end of a transfer. |
| userData | User data for callback. |
| txHandle | GPDMA handle pointer for SPI Tx, the handle shall be static allocated by users. |
| rxHandle | GPDMA handle pointer for SPI Rx, the handle shall be static allocated by users. |
| status_t SPI_MasterTransferGPDMA | ( | SPI_Type * | base, |
| spi_gpdma_handle_t * | handle, | ||
| spi_transfer_t * | xfer | ||
| ) |
| base | SPI peripheral base address. |
| handle | SPI GPDMA handle pointer. |
| xfer | Pointer to gpdma transfer structure. |
| kStatus_Success | Successfully start a transfer. |
| kStatus_InvalidArgument | Input argument is invalid. |
| kStatus_SPI_Busy | SPI is not idle, is running another transfer. |
| void SPI_MasterTransferAbortGPDMA | ( | SPI_Type * | base, |
| spi_gpdma_handle_t * | handle | ||
| ) |
| base | SPI peripheral base address. |
| handle | SPI GPDMA handle pointer. |