RTEMS 6.1-rc2
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Flexspi_dma

Data Structures

struct  _flexspi_dma_handle
 FLEXSPI DMA transfer handle, users should not touch the content of the handle. More...
 

Variables

dma_handle_t * _flexspi_dma_handle::txDmaHandle
 
dma_handle_t * _flexspi_dma_handle::rxDmaHandle
 
size_t _flexspi_dma_handle::transferSize
 
flexspi_dma_transfer_nsize_t _flexspi_dma_handle::nsize
 
uint8_t _flexspi_dma_handle::nbytes
 
uint8_t _flexspi_dma_handle::count
 
uint32_t _flexspi_dma_handle::state
 
flexspi_dma_callback_t _flexspi_dma_handle::completionCallback
 
void * _flexspi_dma_handle::userData
 

Driver version

enum  _flexspi_dma_ntransfer_size { kFLEXPSI_DMAnSize1Bytes = 0x1U , kFLEXPSI_DMAnSize2Bytes = 0x2U , kFLEXPSI_DMAnSize4Bytes = 0x4U }
 dma transfer configuration More...
 
typedef struct _flexspi_dma_handle flexspi_dma_handle_t
 
typedef void(* flexspi_dma_callback_t) (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, status_t status, void *userData)
 FLEXSPI dma transfer callback function for finish and error.
 
typedef enum _flexspi_dma_ntransfer_size flexspi_dma_transfer_nsize_t
 dma transfer configuration
 
#define FSL_FLEXSPI_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))
 FLEXSPI DMA driver version 2.2.1.
 

FLEXSPI dma Transactional

void FLEXSPI_TransferCreateHandleDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
 Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the callback.
 
void FLEXSPI_TransferUpdateSizeDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_transfer_nsize_t nsize)
 Update FLEXSPI DMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZE).
 
status_t FLEXSPI_TransferDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_transfer_t *xfer)
 Transfers FLEXSPI data using an dma non-blocking method.
 
void FLEXSPI_TransferAbortDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle)
 Aborts the transfer data using dma.
 
status_t FLEXSPI_TransferGetTransferCountDMA (FLEXSPI_Type *base, flexspi_dma_handle_t *handle, size_t *count)
 Gets the transferred counts of transfer.
 

Detailed Description

Enumeration Type Documentation

◆ _flexspi_dma_ntransfer_size

dma transfer configuration

Enumerator
kFLEXPSI_DMAnSize1Bytes 

Source/Destination data transfer size is 1 byte every time

kFLEXPSI_DMAnSize2Bytes 

Source/Destination data transfer size is 2 bytes every time

kFLEXPSI_DMAnSize4Bytes 

Source/Destination data transfer size is 4 bytes every time

Function Documentation

◆ FLEXSPI_TransferAbortDMA()

void FLEXSPI_TransferAbortDMA ( FLEXSPI_Type base,
flexspi_dma_handle_t handle 
)

Aborts the transfer data using dma.

This function aborts the transfer data using dma.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure

◆ FLEXSPI_TransferCreateHandleDMA()

void FLEXSPI_TransferCreateHandleDMA ( FLEXSPI_Type base,
flexspi_dma_handle_t handle,
flexspi_dma_callback_t  callback,
void *  userData,
dma_handle_t *  txDmaHandle,
dma_handle_t *  rxDmaHandle 
)

Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the callback.

Parameters
baseFLEXSPI peripheral base address
handlePointer to flexspi_dma_handle_t structure
callbackFLEXSPI callback, NULL means no callback.
userDataUser callback function data.
txDmaHandleUser requested DMA handle for TX DMA transfer.
rxDmaHandleUser requested DMA handle for RX DMA transfer.

◆ FLEXSPI_TransferDMA()

status_t FLEXSPI_TransferDMA ( FLEXSPI_Type base,
flexspi_dma_handle_t handle,
flexspi_transfer_t xfer 
)

Transfers FLEXSPI data using an dma non-blocking method.

This function writes/receives data to/from the FLEXSPI transmit/receive FIFO. This function is non-blocking.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure
xferFLEXSPI transfer structure.
Return values
kStatus_FLEXSPI_BusyFLEXSPI is busy transfer.
kStatus_InvalidArgumentThe watermark configuration is invalid, the watermark should be power of 2 to do successfully DMA transfer.
kStatus_SuccessFLEXSPI successfully start dma transfer.

◆ FLEXSPI_TransferGetTransferCountDMA()

status_t FLEXSPI_TransferGetTransferCountDMA ( FLEXSPI_Type base,
flexspi_dma_handle_t handle,
size_t *  count 
)

Gets the transferred counts of transfer.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_dma_handle_t structure.
countBytes transfer.
Return values
kStatus_SuccessSucceed get the transfer count.
kStatus_NoTransferInProgressThere is not a non-blocking transaction currently in progress.

◆ FLEXSPI_TransferUpdateSizeDMA()

void FLEXSPI_TransferUpdateSizeDMA ( FLEXSPI_Type base,
flexspi_dma_handle_t handle,
flexspi_dma_transfer_nsize_t  nsize 
)

Update FLEXSPI DMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZE).

Parameters
baseFLEXSPI peripheral base address
handlePointer to flexspi_dma_handle_t structure
nsizeFLEXSPI DMA transfer data transfer size(SSIZE/DSIZE), by default the size is kFLEXPSI_DMAnSize1Bytes(one byte).
See also
flexspi_dma_transfer_nsize_t .

Variable Documentation

◆ completionCallback

flexspi_dma_callback_t _flexspi_dma_handle::completionCallback

A callback function called after the dma transfer is finished.

◆ count

uint8_t _flexspi_dma_handle::count

The transfer data count in a DMA request.

◆ nbytes

uint8_t _flexspi_dma_handle::nbytes

dma minor byte transfer count initially configured.

◆ nsize

flexspi_dma_transfer_nsize_t _flexspi_dma_handle::nsize

dma SSIZE/DSIZE in each transfer.

◆ rxDmaHandle

dma_handle_t* _flexspi_dma_handle::rxDmaHandle

dma handler for FLEXSPI Rx.

◆ state

uint32_t _flexspi_dma_handle::state

Internal state for FLEXSPI dma transfer.

◆ transferSize

size_t _flexspi_dma_handle::transferSize

Bytes need to transfer.

◆ txDmaHandle

dma_handle_t* _flexspi_dma_handle::txDmaHandle

dma handler for FLEXSPI Tx.

◆ userData

void* _flexspi_dma_handle::userData

User callback parameter