RTEMS 6.1-rc4
Loading...
Searching...
No Matches
Data Structures | Enumerator | Variables
Flexspi_edma

Data Structures

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

Variables

edma_handle_t_flexspi_edma_handle::txDmaHandle
 
edma_handle_t_flexspi_edma_handle::rxDmaHandle
 
size_t _flexspi_edma_handle::transferSize
 
flexspi_edma_transfer_nsize_t _flexspi_edma_handle::nsize
 
uint8_t _flexspi_edma_handle::nbytes
 
uint8_t _flexspi_edma_handle::count
 
uint32_t _flexspi_edma_handle::state
 
flexspi_edma_callback_t _flexspi_edma_handle::completionCallback
 
void * _flexspi_edma_handle::userData
 

Driver version

enum  _flexspi_edma_ntransfer_size {
  kFLEXPSI_EDMAnSize1Bytes = 0x1U , kFLEXPSI_EDMAnSize2Bytes = 0x2U , kFLEXPSI_EDMAnSize4Bytes = 0x4U , kFLEXPSI_EDMAnSize8Bytes = 0x8U ,
  kFLEXPSI_EDMAnSize32Bytes = 0x20U
}
 eDMA transfer configuration More...
 
typedef struct _flexspi_edma_handle flexspi_edma_handle_t
 
typedef void(* flexspi_edma_callback_t) (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, status_t status, void *userData)
 FLEXSPI eDMA transfer callback function for finish and error.
 
typedef enum _flexspi_edma_ntransfer_size flexspi_edma_transfer_nsize_t
 eDMA transfer configuration
 
#define FSL_FLEXSPI_EDMA_DRIVER_VERSION   (MAKE_VERSION(2, 3, 2))
 FLEXSPI EDMA driver version 2.3.2.
 

FLEXSPI eDMA Transactional

void FLEXSPI_TransferCreateHandleEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_edma_callback_t callback, void *userData, edma_handle_t *txDmaHandle, edma_handle_t *rxDmaHandle)
 Initializes the FLEXSPI handle for transfer which is used in transactional functions and set the callback.
 
void FLEXSPI_TransferUpdateSizeEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_edma_transfer_nsize_t nsize)
 Update FLEXSPI EDMA transfer source data transfer size(SSIZE) and destination data transfer size(DSIZE).
 
status_t FLEXSPI_TransferEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, flexspi_transfer_t *xfer)
 Transfers FLEXSPI data using an eDMA non-blocking method.
 
void FLEXSPI_TransferAbortEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle)
 Aborts the transfer data using eDMA.
 
status_t FLEXSPI_TransferGetTransferCountEDMA (FLEXSPI_Type *base, flexspi_edma_handle_t *handle, size_t *count)
 Gets the transferred counts of transfer.
 

Detailed Description

Enumeration Type Documentation

◆ _flexspi_edma_ntransfer_size

eDMA transfer configuration

Enumerator
kFLEXPSI_EDMAnSize1Bytes 

Source/Destination data transfer size is 1 byte every time

kFLEXPSI_EDMAnSize2Bytes 

Source/Destination data transfer size is 2 bytes every time

kFLEXPSI_EDMAnSize4Bytes 

Source/Destination data transfer size is 4 bytes every time

kFLEXPSI_EDMAnSize8Bytes 

Source/Destination data transfer size is 8 bytes every time

kFLEXPSI_EDMAnSize32Bytes 

Source/Destination data transfer size is 32 bytes every time

Function Documentation

◆ FLEXSPI_TransferAbortEDMA()

void FLEXSPI_TransferAbortEDMA ( FLEXSPI_Type base,
flexspi_edma_handle_t handle 
)

Aborts the transfer data using eDMA.

This function aborts the transfer data using eDMA.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_edma_handle_t structure

brief Aborts the transfer data using eDMA.

This function aborts the transfer data using eDMA.

param base FLEXSPI peripheral base address. param handle Pointer to flexspi_edma_handle_t structure

◆ FLEXSPI_TransferCreateHandleEDMA()

void FLEXSPI_TransferCreateHandleEDMA ( FLEXSPI_Type base,
flexspi_edma_handle_t handle,
flexspi_edma_callback_t  callback,
void *  userData,
edma_handle_t txDmaHandle,
edma_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_edma_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.

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

param base FLEXSPI peripheral base address param handle Pointer to flexspi_edma_handle_t structure param callback FLEXSPI callback, NULL means no callback. param userData User callback function data. param txDmaHandle User requested DMA handle for TX DMA transfer. param rxDmaHandle User requested DMA handle for RX DMA transfer.

◆ FLEXSPI_TransferEDMA()

status_t FLEXSPI_TransferEDMA ( FLEXSPI_Type base,
flexspi_edma_handle_t handle,
flexspi_transfer_t xfer 
)

Transfers FLEXSPI data using an eDMA 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_edma_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 EDMA transfer.
kStatus_SuccessFLEXSPI successfully start edma transfer.

brief Transfers FLEXSPI data using an eDMA non-blocking method.

This function writes/receives data to/from the FLEXSPI transmit/receive FIFO. This function is non-blocking. param base FLEXSPI peripheral base address. param handle Pointer to flexspi_edma_handle_t structure param xfer FLEXSPI transfer structure. retval kStatus_FLEXSPI_Busy FLEXSPI is busy transfer. retval kStatus_InvalidArgument The watermark configuration is invalid, the watermark should be power of 2 to do successfully EDMA transfer. retval kStatus_Success FLEXSPI successfully start edma transfer.

◆ FLEXSPI_TransferGetTransferCountEDMA()

status_t FLEXSPI_TransferGetTransferCountEDMA ( FLEXSPI_Type base,
flexspi_edma_handle_t handle,
size_t *  count 
)

Gets the transferred counts of transfer.

Parameters
baseFLEXSPI peripheral base address.
handlePointer to flexspi_edma_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_TransferUpdateSizeEDMA()

void FLEXSPI_TransferUpdateSizeEDMA ( FLEXSPI_Type base,
flexspi_edma_handle_t handle,
flexspi_edma_transfer_nsize_t  nsize 
)

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

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

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

param base FLEXSPI peripheral base address param handle Pointer to flexspi_edma_handle_t structure param nsize FLEXSPI DMA transfer data transfer size(SSIZE/DSIZE), by default the size is kFLEXPSI_EDMAnSize1Bytes(one byte). see flexspi_edma_transfer_nsize_t .

Variable Documentation

◆ completionCallback

flexspi_edma_callback_t _flexspi_edma_handle::completionCallback

A callback function called after the eDMA transfer is finished.

◆ count

uint8_t _flexspi_edma_handle::count

The transfer data count in a DMA request.

◆ nbytes

uint8_t _flexspi_edma_handle::nbytes

eDMA minor byte transfer count initially configured.

◆ nsize

flexspi_edma_transfer_nsize_t _flexspi_edma_handle::nsize

eDMA SSIZE/DSIZE in each transfer.

◆ rxDmaHandle

edma_handle_t* _flexspi_edma_handle::rxDmaHandle

eDMA handler for FLEXSPI Rx.

◆ state

uint32_t _flexspi_edma_handle::state

Internal state for FLEXSPI eDMA transfer.

◆ transferSize

size_t _flexspi_edma_handle::transferSize

Bytes need to transfer.

◆ txDmaHandle

edma_handle_t* _flexspi_edma_handle::txDmaHandle

eDMA handler for FLEXSPI Tx.

◆ userData

void* _flexspi_edma_handle::userData

User callback parameter