MCUXpresso SDK API Reference Manual  Rev 2.16.000
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Data Structures

struct  lcdic_dma_handle_t
 LCDIC DMA transfer handle, users should not touch the content of the handle. More...
 

Typedefs

typedef void(* lcdic_dma_callback_t )(LCDIC_Type *base, lcdic_dma_handle_t *handle, status_t status, void *userData)
 LCDIC DMA callback called at the end of transfer. More...
 

Driver version

#define FSL_LCDIC_DMA_DRIVER_VERSION   (MAKE_VERSION(2, 1, 0))
 

DMA Transactional

status_t LCDIC_TransferCreateHandleDMA (LCDIC_Type *base, lcdic_dma_handle_t *handle, lcdic_dma_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle, dma_descriptor_t dmaDesc[2])
 Initialize the LCDIC DMA handle. More...
 
status_t LCDIC_TransferDMA (LCDIC_Type *base, lcdic_dma_handle_t *handle, const lcdic_xfer_t *xfer)
 Perform a non-blocking LCDIC transfer using DMA. More...
 
status_t LCDIC_SendDataArrayDMA (LCDIC_Type *base, lcdic_dma_handle_t *handle, const lcdic_tx_xfer_t *xfer)
 Send data array using DMA. More...
 
status_t LCDIC_ReadDataArrayDMA (LCDIC_Type *base, lcdic_dma_handle_t *handle, const lcdic_rx_xfer_t *xfer)
 Read data array using DMA. More...
 
void LCDIC_TransferHandleIRQDMA (LCDIC_Type *base, void *handle)
 LCDIC IRQ handler function work with DMA transactional APIs. More...
 

Data Structure Documentation

struct _lcdic_dma_handle

Data Fields

volatile bool xferInProgress
 Transfer in progress.
 
lcdic_xfer_mode_t xferMode
 On-going transfer mode. More...
 
dma_handle_ttxDmaHandle
 DMA handler for send.
 
dma_handle_trxDmaHandle
 DMA handler for receive.
 
lcdic_dma_callback_t callback
 Callback when transfer finished. More...
 
void * userData
 User Data for callback.
 
uint32_t xferSizeWordAligned
 4-byte size aligned part or the transfer data size. More...
 
uint8_t xferSizeWordUnaligned
 4-byte size unaligned part of the transfer data size. More...
 
uint8_t rxSizeWordUnaligned
 Same as xferSizeWordUnaligned, it is only used for RX. More...
 
uint32_t tmpData
 To save temporary data during transfer. More...
 
dma_descriptor_tdmaDesc
 Pointer to two DMA descriptor, should be 16-byte aligned. More...
 
const uint8_t * txData
 Pointer to the TX data. More...
 
uint8_t * rxData
 Pointer to the RX data. More...
 

Field Documentation

lcdic_xfer_mode_t lcdic_dma_handle_t::xferMode
lcdic_dma_callback_t lcdic_dma_handle_t::callback
const uint8_t* lcdic_dma_handle_t::txData
uint8_t* lcdic_dma_handle_t::rxData
uint32_t lcdic_dma_handle_t::xferSizeWordAligned
uint8_t lcdic_dma_handle_t::xferSizeWordUnaligned
uint8_t lcdic_dma_handle_t::rxSizeWordUnaligned
uint32_t lcdic_dma_handle_t::tmpData
dma_descriptor_t* lcdic_dma_handle_t::dmaDesc

Typedef Documentation

typedef void(* lcdic_dma_callback_t)(LCDIC_Type *base, lcdic_dma_handle_t *handle, status_t status, void *userData)

Function Documentation

status_t LCDIC_TransferCreateHandleDMA ( LCDIC_Type *  base,
lcdic_dma_handle_t *  handle,
lcdic_dma_callback_t  callback,
void *  userData,
dma_handle_t txDmaHandle,
dma_handle_t rxDmaHandle,
dma_descriptor_t  dmaDesc[2] 
)

This function initializes the LCDIC DMA handle which can be used for other LCDIC transactional APIs. Usually, for a specified LCDIC instance, user need only call this API once to get the initialized handle.

Parameters
baseLCDIC peripheral base address.
handleLCDIC handle pointer.
callbackUser callback function called at the end of a transfer.
userDataUser data for callback.
txDmaHandleDMA handle pointer for LCDIC Tx, the handle shall be static allocated by users.
rxDmaHandleDMA handle pointer for LCDIC Rx, the handle shall be static allocated by users.
dmaDescUser allocated dma descriptor, it should be in non-cacheable region and 16-byte aligned.
status_t LCDIC_TransferDMA ( LCDIC_Type *  base,
lcdic_dma_handle_t *  handle,
const lcdic_xfer_t xfer 
)

This function returned immediately after transfer initiates, monitor the transfer done by callback.

Parameters
baseLCDIC peripheral base address.
handleLCDIC DMA handle pointer.
xferPointer to dma transfer structure.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_BusyLCDIC is not idle, is running another transfer.
status_t LCDIC_SendDataArrayDMA ( LCDIC_Type *  base,
lcdic_dma_handle_t *  handle,
const lcdic_tx_xfer_t xfer 
)
Parameters
baseLCDIC peripheral base address.
handlePointer to the lcdic_handle_t structure to store the transfer state.
xferLCDIC transfer structure.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_BusyLCDIC driver is busy with another transfer.
status_t LCDIC_ReadDataArrayDMA ( LCDIC_Type *  base,
lcdic_dma_handle_t *  handle,
const lcdic_rx_xfer_t xfer 
)
Parameters
baseLCDIC peripheral base address.
handlePointer to the lcdic_handle_t structure to store the transfer state.
xferLCDIC transfer structure.
Return values
kStatus_SuccessSuccessfully start a transfer.
kStatus_InvalidArgumentInput argument is invalid.
kStatus_BusyLCDIC driver is busy with another transfer.
void LCDIC_TransferHandleIRQDMA ( LCDIC_Type *  base,
void *  handle 
)

IRQ handler to work with LCDIC_TransferDMA.

Parameters
baseLCDIC peripheral base address.
handlePointer to the lcdic_dma_handle_t structure to store the transfer state.