MCUXpresso SDK API Reference Manual  Rev 2.16.000
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
 The pixel format sent on MIPI DSI data lanes. More...
 
struct  _dsi_smartdma_handle
 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...
 
typedef enum
_dsi_smartdma_input_pixel_format 
dsi_smartdma_input_pixel_format_t
 The pixel format feed SMARTDMA. More...
 
typedef enum
_dsi_smartdma_output_pixel_format 
dsi_smartdma_output_pixel_format_t
 The pixel format sent on MIPI DSI data lanes. More...
 
typedef struct
_dsi_smartdma_write_mem_transfer 
dsi_smartdma_write_mem_transfer_t
 The pixel format sent on MIPI DSI data lanes. More...
 

Enumerations

enum  _dsi_smartdma_input_pixel_format {
  kDSI_SMARTDMA_InputPixelFormatRGB565,
  kDSI_SMARTDMA_InputPixelFormatRGB888,
  kDSI_SMARTDMA_InputPixelFormatXRGB8888
}
 The pixel format feed SMARTDMA. More...
 
enum  _dsi_smartdma_output_pixel_format {
  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, 3, 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

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
 Pointer to the data to send. More...
 
bool twoDimension
 Whether to use 2-dimensional transfer. More...
 
size_t dataSize
 The byte count to be write. More...
 
size_t minorLoop
 SRC data transfer byte count in a minor loop, only used in 2-dimensional transfer. More...
 
size_t minorLoopOffset
 SRC data byte offset added after a minor loop, only used in 2-dimensional transfer. More...
 
size_t majorLoop
 SRC data transfer in a major loop of maw many minor loop is transfered, only used in 2-dimensional transfer. 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::inputFormat
dsi_smartdma_output_pixel_format_t _dsi_smartdma_write_mem_transfer::outputFormat
const uint8_t* _dsi_smartdma_write_mem_transfer::data
bool _dsi_smartdma_write_mem_transfer::twoDimension
size_t _dsi_smartdma_write_mem_transfer::dataSize

In 2-dimensional transfer, this parameter is ignored.

size_t _dsi_smartdma_write_mem_transfer::minorLoop
size_t _dsi_smartdma_write_mem_transfer::minorLoopOffset
size_t _dsi_smartdma_write_mem_transfer::majorLoop
uint8_t _dsi_smartdma_write_mem_transfer::virtualChannel
bool _dsi_smartdma_write_mem_transfer::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.
 
uint32_t smartdmaStack [16]
 Stack for smartdma function. More...
 
smartdma_dsi_param_t param
 Parameter for smartdma function. More...
 
smartdma_dsi_2d_param_t param2d
 Parameter for 2-dimensional smartdma function. More...
 

Field Documentation

MIPI_DSI_HOST_Type* _dsi_smartdma_handle::dsi
volatile bool _dsi_smartdma_handle::isBusy
smartdma_dsi_param_t _dsi_smartdma_handle::param
smartdma_dsi_2d_param_t _dsi_smartdma_handle::param2d
uint32_t _dsi_smartdma_handle::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.