RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures
Flexio_edma_spi

Data Structures

struct  _flexio_spi_master_edma_handle
 FlexIO SPI eDMA transfer handle, users should not touch the content of the handle. More...
 

Driver version

typedef struct _flexio_spi_master_edma_handle flexio_spi_master_edma_handle_t
 typedef for flexio_spi_master_edma_handle_t in advance.
 
typedef flexio_spi_master_edma_handle_t flexio_spi_slave_edma_handle_t
 Slave handle is the same with master handle.
 
typedef void(* flexio_spi_master_edma_transfer_callback_t) (FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, status_t status, void *userData)
 FlexIO SPI master callback for finished transmit.
 
typedef void(* flexio_spi_slave_edma_transfer_callback_t) (FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, status_t status, void *userData)
 FlexIO SPI slave callback for finished transmit.
 
#define FSL_FLEXIO_SPI_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 3, 0))
 FlexIO SPI EDMA driver version.
 

eDMA Transactional

status_t FLEXIO_SPI_MasterTransferCreateHandleEDMA (FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, flexio_spi_master_edma_transfer_callback_t callback, void *userData, edma_handle_t *txHandle, edma_handle_t *rxHandle)
 Initializes the FlexIO SPI master eDMA handle.
 
status_t FLEXIO_SPI_MasterTransferEDMA (FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, flexio_spi_transfer_t *xfer)
 Performs a non-blocking FlexIO SPI transfer using eDMA.
 
void FLEXIO_SPI_MasterTransferAbortEDMA (FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle)
 Aborts a FlexIO SPI transfer using eDMA.
 
status_t FLEXIO_SPI_MasterTransferGetCountEDMA (FLEXIO_SPI_Type *base, flexio_spi_master_edma_handle_t *handle, size_t *count)
 Gets the number of bytes transferred so far using FlexIO SPI master eDMA.
 
status_t FLEXIO_SPI_SlaveTransferEDMA (FLEXIO_SPI_Type *base, flexio_spi_slave_edma_handle_t *handle, flexio_spi_transfer_t *xfer)
 Performs a non-blocking FlexIO SPI transfer using eDMA.
 

Detailed Description

Function Documentation

◆ FLEXIO_SPI_MasterTransferAbortEDMA()

void FLEXIO_SPI_MasterTransferAbortEDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_edma_handle_t handle 
)

Aborts a FlexIO SPI transfer using eDMA.

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

brief Aborts a FlexIO SPI transfer using eDMA.

param base Pointer to FLEXIO_SPI_Type structure. param handle FlexIO SPI eDMA handle pointer.

◆ FLEXIO_SPI_MasterTransferCreateHandleEDMA()

status_t FLEXIO_SPI_MasterTransferCreateHandleEDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_edma_handle_t handle,
flexio_spi_master_edma_transfer_callback_t  callback,
void *  userData,
edma_handle_t txHandle,
edma_handle_t rxHandle 
)

Initializes the FlexIO SPI master eDMA handle.

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

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

brief Initializes the FlexIO SPI master eDMA handle.

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

param base Pointer to FLEXIO_SPI_Type structure. param handle Pointer to flexio_spi_master_edma_handle_t structure to store the transfer state. param callback SPI callback, NULL means no callback. param userData callback function parameter. param txHandle User requested eDMA handle for FlexIO SPI RX eDMA transfer. param rxHandle User requested eDMA handle for FlexIO SPI TX eDMA transfer. retval kStatus_Success Successfully create the handle. retval kStatus_OutOfRange The FlexIO SPI eDMA type/handle table out of range.

◆ FLEXIO_SPI_MasterTransferEDMA()

status_t FLEXIO_SPI_MasterTransferEDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_edma_handle_t handle,
flexio_spi_transfer_t xfer 
)

Performs a non-blocking FlexIO SPI transfer using eDMA.

Note
This interface returns immediately after transfer initiates. Call FLEXIO_SPI_MasterGetTransferCountEDMA 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_master_edma_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.

brief Performs a non-blocking FlexIO SPI transfer using eDMA.

note This interface returns immediately after transfer initiates. Call FLEXIO_SPI_MasterGetTransferCountEDMA to poll the transfer status and check whether the FlexIO SPI transfer is finished.

param base Pointer to FLEXIO_SPI_Type structure. param handle Pointer to flexio_spi_master_edma_handle_t structure to store the transfer state. param xfer Pointer to FlexIO SPI transfer structure. retval kStatus_Success Successfully start a transfer. retval kStatus_InvalidArgument Input argument is invalid. retval kStatus_FLEXIO_SPI_Busy FlexIO SPI is not idle, is running another transfer.

◆ FLEXIO_SPI_MasterTransferGetCountEDMA()

status_t FLEXIO_SPI_MasterTransferGetCountEDMA ( FLEXIO_SPI_Type base,
flexio_spi_master_edma_handle_t handle,
size_t *  count 
)

Gets the number of bytes transferred so far using FlexIO SPI master eDMA.

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

brief Gets the remaining bytes for FlexIO SPI eDMA transfer.

param base Pointer to FLEXIO_SPI_Type structure. param handle FlexIO SPI eDMA handle pointer. param count Number of bytes transferred so far by the non-blocking transaction.

◆ FLEXIO_SPI_SlaveTransferEDMA()

status_t FLEXIO_SPI_SlaveTransferEDMA ( FLEXIO_SPI_Type base,
flexio_spi_slave_edma_handle_t handle,
flexio_spi_transfer_t xfer 
)

Performs a non-blocking FlexIO SPI transfer using eDMA.

Note
This interface returns immediately after transfer initiates. Call FLEXIO_SPI_SlaveGetTransferCountEDMA 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_edma_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.

brief Performs a non-blocking FlexIO SPI transfer using eDMA.

note This interface returns immediately after transfer initiates. Call FLEXIO_SPI_SlaveGetTransferCountEDMA to poll the transfer status and check whether the FlexIO SPI transfer is finished.

param base Pointer to FLEXIO_SPI_Type structure. param handle Pointer to flexio_spi_slave_edma_handle_t structure to store the transfer state. param xfer Pointer to FlexIO SPI transfer structure. retval kStatus_Success Successfully start a transfer. retval kStatus_InvalidArgument Input argument is invalid. retval kStatus_FLEXIO_SPI_Busy FlexIO SPI is not idle, is running another transfer.