RTEMS 6.1-rc5
Loading...
Searching...
No Matches
Data Structures
Flexio_dma_spi

Data Structures

struct  _flexio_spi_master_dma_handle
 FlexIO SPI DMA transfer handle, users should not touch the content of the handle. More...
 

Driver version

typedef struct _flexio_spi_master_dma_handle flexio_spi_master_dma_handle_t
 typedef for flexio_spi_master_dma_handle_t in advance.
 
typedef flexio_spi_master_dma_handle_t flexio_spi_slave_dma_handle_t
 Slave handle is the same with master handle.
 
typedef void(* flexio_spi_master_dma_transfer_callback_t) (FLEXIO_SPI_Type *base, flexio_spi_master_dma_handle_t *handle, status_t status, void *userData)
 FlexIO SPI master callback for finished transmit.
 
typedef void(* flexio_spi_slave_dma_transfer_callback_t) (FLEXIO_SPI_Type *base, flexio_spi_slave_dma_handle_t *handle, status_t status, void *userData)
 FlexIO SPI slave callback for finished transmit.
 
#define FSL_FLEXIO_SPI_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
 FlexIO SPI DMA driver version 2.3.0.
 

DMA Transactional

status_t FLEXIO_SPI_MasterTransferCreateHandleDMA (FLEXIO_SPI_Type *base, flexio_spi_master_dma_handle_t *handle, flexio_spi_master_dma_transfer_callback_t callback, void *userData, dma_handle_t *txHandle, dma_handle_t *rxHandle)
 Initializes the FLEXO SPI master DMA handle.
 
status_t FLEXIO_SPI_MasterTransferDMA (FLEXIO_SPI_Type *base, flexio_spi_master_dma_handle_t *handle, flexio_spi_transfer_t *xfer)
 Performs a non-blocking FlexIO SPI transfer using DMA.
 
void FLEXIO_SPI_MasterTransferAbortDMA (FLEXIO_SPI_Type *base, flexio_spi_master_dma_handle_t *handle)
 Aborts a FlexIO SPI transfer using DMA.
 
status_t FLEXIO_SPI_MasterTransferGetCountDMA (FLEXIO_SPI_Type *base, flexio_spi_master_dma_handle_t *handle, size_t *count)
 Gets the remaining bytes for FlexIO SPI DMA transfer.
 
status_t FLEXIO_SPI_SlaveTransferDMA (FLEXIO_SPI_Type *base, flexio_spi_slave_dma_handle_t *handle, flexio_spi_transfer_t *xfer)
 Performs a non-blocking FlexIO SPI transfer using DMA.
 

Detailed Description

Function Documentation

◆ FLEXIO_SPI_MasterTransferAbortDMA()

void FLEXIO_SPI_MasterTransferAbortDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_dma_handle_t handle 
)

Aborts a FlexIO SPI transfer using DMA.

Parameters
basePointer to FLEXIO_SPI_Type structure.
handleFlexIO SPI DMA handle pointer.

◆ FLEXIO_SPI_MasterTransferCreateHandleDMA()

status_t FLEXIO_SPI_MasterTransferCreateHandleDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_dma_handle_t handle,
flexio_spi_master_dma_transfer_callback_t  callback,
void *  userData,
dma_handle_t *  txHandle,
dma_handle_t *  rxHandle 
)

Initializes the FLEXO SPI master DMA handle.

This function initializes the FLEXO SPI master DMA handle which can be used for other FLEXO SPI master transactional APIs. Usually, for a specified FLEXO SPI instance, call this API once to get the initialized handle.

Parameters
basePointer to FLEXIO_SPI_Type structure.
handlePointer to flexio_spi_master_dma_handle_t structure to store the transfer state.
callbackSPI callback, NULL means no callback.
userDatacallback function parameter.
txHandleUser requested DMA handle for FlexIO SPI RX DMA transfer.
rxHandleUser requested DMA handle for FlexIO SPI TX DMA transfer.
Return values
kStatus_SuccessSuccessfully create the handle.
kStatus_OutOfRangeThe FlexIO SPI DMA type/handle table out of range.

◆ FLEXIO_SPI_MasterTransferDMA()

status_t FLEXIO_SPI_MasterTransferDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_dma_handle_t handle,
flexio_spi_transfer_t xfer 
)

Performs a non-blocking FlexIO SPI transfer using DMA.

Note
This interface returned immediately after transfer initiates. Call FLEXIO_SPI_MasterGetTransferCountDMA to poll the transfer status to check whether the FlexIO SPI transfer is finished.
Parameters
basePointer to FLEXIO_SPI_Type structure.
handlePointer to flexio_spi_master_dma_handle_t structure to store the transfer state.
xferPointer to FlexIO SPI transfer structure.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_FLEXIO_SPI_BusyFlexIO SPI is not idle, is running another transfer.

◆ FLEXIO_SPI_MasterTransferGetCountDMA()

status_t FLEXIO_SPI_MasterTransferGetCountDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_dma_handle_t handle,
size_t *  count 
)

Gets the remaining bytes for FlexIO SPI DMA transfer.

Parameters
basePointer to FLEXIO_SPI_Type structure.
handleFlexIO SPI DMA handle pointer.
countNumber of bytes transferred so far by the non-blocking transaction.

◆ FLEXIO_SPI_SlaveTransferDMA()

status_t FLEXIO_SPI_SlaveTransferDMA ( FLEXIO_SPI_Type base,
flexio_spi_slave_dma_handle_t handle,
flexio_spi_transfer_t xfer 
)

Performs a non-blocking FlexIO SPI transfer using DMA.

Note
This interface returns immediately after transfer initiates. Call FLEXIO_SPI_SlaveGetTransferCountDMA to poll the transfer status and check whether the FlexIO SPI transfer is finished.
Parameters
basePointer to FLEXIO_SPI_Type structure.
handlePointer to flexio_spi_slave_dma_handle_t structure to store the transfer state.
xferPointer to FlexIO SPI transfer structure.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_FLEXIO_SPI_BusyFlexIO SPI is not idle, is running another transfer.