MCUXpresso SDK API Reference Manual  Rev 2.12.0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
MIPI DSI SMARTDMA driver

Overview

Data Structures

struct  dsi_smartdma_write_mem_transfer_t
 The pixel format sent on MIPI DSI data lanes. More...
 
struct  dsi_smartdma_handle_t
 MIPI DSI transfer handle structure. More...
 

Typedefs

typedef void(* dsi_smartdma_callback_t )(MIPI_DSI_HOST_Type *base, dsi_smartdma_handle_t *handle, status_t status, void *userData)
 MIPI DSI callback for finished transfer. More...
 

Enumerations

enum  dsi_smartdma_input_pixel_format_t {
  kDSI_SMARTDMA_InputPixelFormatRGB565,
  kDSI_SMARTDMA_InputPixelFormatRGB888,
  kDSI_SMARTDMA_InputPixelFormatXRGB8888
}
 The pixel format feed SMARTDMA. More...
 
enum  dsi_smartdma_output_pixel_format_t {
  kDSI_SMARTDMA_OutputPixelFormatRGB565,
  kDSI_SMARTDMA_OutputPixelFormatRGB888
}
 The pixel format sent on MIPI DSI data lanes. More...
 

Driver version

#define FSL_MIPI_DSI_SMARTDMA_DRIVER_VERSION   (MAKE_VERSION(2, 2, 1))
 

Transactional

status_t DSI_TransferCreateHandleSMARTDMA (MIPI_DSI_HOST_Type *base, dsi_smartdma_handle_t *handle, dsi_smartdma_callback_t callback, void *userData)
 Create the MIPI DSI SMARTDMA handle. More...
 
status_t DSI_TransferWriteMemorySMARTDMA (MIPI_DSI_HOST_Type *base, dsi_smartdma_handle_t *handle, dsi_smartdma_write_mem_transfer_t *xfer)
 Write display controller video memory using SMARTDMA. More...
 
void DSI_TransferAbortSMARTDMA (MIPI_DSI_HOST_Type *base, dsi_smartdma_handle_t *handle)
 Abort current APB data transfer. More...
 

Data Structure Documentation

struct dsi_smartdma_write_mem_transfer_t

Data Fields

dsi_smartdma_input_pixel_format_t inputFormat
 Input format. More...
 
dsi_smartdma_output_pixel_format_t outputFormat
 Output format. More...
 
const uint8_t * data
 Data to send. More...
 
size_t dataSize
 The byte count to be write. More...
 
uint8_t virtualChannel
 Virtual channel used in the transfer, current driver always use channel 0, added for future enhancement. More...
 
bool disablePixelByteSwap
 If set to true, the pixels are filled to MIPI DSI FIFO directly. More...
 

Field Documentation

dsi_smartdma_input_pixel_format_t dsi_smartdma_write_mem_transfer_t::inputFormat
dsi_smartdma_output_pixel_format_t dsi_smartdma_write_mem_transfer_t::outputFormat
const uint8_t* dsi_smartdma_write_mem_transfer_t::data
size_t dsi_smartdma_write_mem_transfer_t::dataSize
uint8_t dsi_smartdma_write_mem_transfer_t::virtualChannel
bool dsi_smartdma_write_mem_transfer_t::disablePixelByteSwap

If set to false, the pixel bytes are swapped then filled to MIPI DSI FIFO. For example, when set to false and frame buffer pixel format is RGB565: LSB MSB B0 B1 B2 B3 B4 G0 G1 G2 | G3 G4 G5 R0 R1 R2 R3 R4 Then the pixel filled to DSI FIFO is: LSB MSB G3 G4 G5 R0 R1 R2 R3 R4 | B0 B1 B2 B3 B4 G0 G1 G2

struct _dsi_smartdma_handle

Data Fields

MIPI_DSI_HOST_Type * dsi
 MIPI DSI peripheral. More...
 
volatile bool isBusy
 MIPI DSI is busy with data transfer. More...
 
dsi_smartdma_callback_t callback
 DSI callback.
 
void * userData
 Callback parameter.
 
smartdma_dsi_param_t param
 Parameter for smartdma function. More...
 
uint32_t smartdmaStack [16]
 Stack for smartdma function. More...
 

Field Documentation

MIPI_DSI_HOST_Type* dsi_smartdma_handle_t::dsi
volatile bool dsi_smartdma_handle_t::isBusy
smartdma_dsi_param_t dsi_smartdma_handle_t::param
uint32_t dsi_smartdma_handle_t::smartdmaStack[16]

Typedef Documentation

typedef void(* dsi_smartdma_callback_t)(MIPI_DSI_HOST_Type *base, dsi_smartdma_handle_t *handle, status_t status, void *userData)

When transfer finished, one of these status values will be passed to the user:

Enumeration Type Documentation

Enumerator
kDSI_SMARTDMA_InputPixelFormatRGB565 

RGB565.

kDSI_SMARTDMA_InputPixelFormatRGB888 

RGB888.

kDSI_SMARTDMA_InputPixelFormatXRGB8888 

XRGB8888.

Enumerator
kDSI_SMARTDMA_OutputPixelFormatRGB565 

RGB565.

kDSI_SMARTDMA_OutputPixelFormatRGB888 

RGB888.

Function Documentation

status_t DSI_TransferCreateHandleSMARTDMA ( MIPI_DSI_HOST_Type *  base,
dsi_smartdma_handle_t *  handle,
dsi_smartdma_callback_t  callback,
void *  userData 
)
Parameters
baseMIPI DSI host peripheral base address.
handleHandle pointer.
callbackCallback function.
userDataUser data.
status_t DSI_TransferWriteMemorySMARTDMA ( MIPI_DSI_HOST_Type *  base,
dsi_smartdma_handle_t *  handle,
dsi_smartdma_write_mem_transfer_t xfer 
)

Perform data transfer using SMARTDMA, when transfer finished, upper layer could be informed through callback function.

Parameters
baseMIPI DSI host peripheral base address.
handlepointer to dsi_smartdma_handle_t structure which stores the transfer state.
xferPointer to the transfer structure.
Return values
kStatus_SuccessData transfer started successfully.
kStatus_DSI_BusyFailed to start transfer because DSI is busy with pervious transfer.
kStatus_DSI_NotSupportedTransfer format not supported.
void DSI_TransferAbortSMARTDMA ( MIPI_DSI_HOST_Type *  base,
dsi_smartdma_handle_t *  handle 
)
Parameters
baseMIPI DSI host peripheral base address.
handlepointer to dsi_smartdma_handle_t structure which stores the transfer state.