MCUXpresso SDK API Reference Manual  Rev 2.12.0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
SMARTDMA: SMART DMA Driver

Overview

The MCUXpresso SDK provides a peripheral driver for the SMART DMA module of MCUXpresso SDK devices.

Data Structures

struct  smartdma_flexio_mculcd_param_t
 Parameter for FlexIO MCULCD except kSMARTDMA_FlexIO_DMA_ONELANE. More...
 
struct  smartdma_flexio_onelane_mculcd_param_t
 Parameter for kSMARTDMA_FlexIO_DMA_ONELANE. More...
 
struct  smartdma_dsi_param_t
 Parameter for MIPI DSI. More...
 
struct  smartdma_rgb565_rgb888_param_t
 Parameter for RGB565To888. More...
 

Macros

#define SMARTDMA_DISPLAY_MEM_ADDR   0x24100000
 The s_smartdmaDisplayFirmware firmware memory address. More...
 
#define SMARTDMA_DISPLAY_FIRMWARE_SIZE   (s_smartdmaDisplayFirmwareSize)
 Size of s_smartdmaDisplayFirmware.
 
#define s_smartdmaFlexioMcuLcdFirmware   s_smartdmaDisplayFirmware
 Compatibility redefinition. More...
 

Typedefs

typedef void(* smartdma_callback_t )(void *param)
 Callback function prototype for the smartdma driver. More...
 

Enumerations

enum  _smartdma_flexio_mculcd_api { ,
  kSMARTDMA_FlexIO_DMA_Reverse,
  kSMARTDMA_RGB565To888,
  kSMARTDMA_FlexIO_DMA_RGB565To888,
  kSMARTDMA_FlexIO_DMA_ARGB2RGB,
  kSMARTDMA_FlexIO_DMA_ARGB2RGB_Endian_Swap,
  kSMARTDMA_FlexIO_DMA_ARGB2RGB_Endian_Swap_Reverse,
  kSMARTDMA_MIPI_RGB565_DMA,
  kSMARTDMA_MIPI_RGB888_DMA,
  kSMARTDMA_MIPI_XRGB2RGB_DMA,
  kSMARTDMA_MIPI_RGB565_R180_DMA,
  kSMARTDMA_MIPI_RGB888_R180_DMA,
  kSMARTDMA_FlexIO_DMA_ONELANE
}
 The API index when using s_smartdmaFlexioMcuLcdFirmware. More...
 

Functions

void SMARTDMA_Init (uint32_t apiMemAddr, const void *firmware, uint32_t firmwareSizeByte)
 Initialize the SMARTDMA. More...
 
void SMARTDMA_InitWithoutFirmware (void)
 Initialize the SMARTDMA. More...
 
void SMARTDMA_InstallFirmware (uint32_t apiMemAddr, const void *firmware, uint32_t firmwareSizeByte)
 Install the firmware. More...
 
void SMARTDMA_InstallCallback (smartdma_callback_t callback, void *param)
 Install the complete callback function. More...
 
void SMARTDMA_Boot (uint32_t apiIndex, void *pParam, uint8_t mask)
 Boot the SMARTDMA to run program. More...
 
void SMARTDMA_Deinit (void)
 Deinitialize the SMARTDMA.
 
void SMARTDMA_Reset (void)
 Reset the SMARTDMA.
 
void SMARTDMA_HandleIRQ (void)
 SMARTDMA IRQ.
 

Variables

const uint8_t s_smartdmaDisplayFirmware []
 The firmware used for display. More...
 
const uint32_t s_smartdmaDisplayFirmwareSize
 Size of s_smartdmaDisplayFirmware.
 

Driver version

#define FSL_SMARTDMA_DRIVER_VERSION   (MAKE_VERSION(2, 6, 3))
 SMARTDMA driver version.
 

Data Structure Documentation

struct smartdma_flexio_mculcd_param_t
struct smartdma_flexio_onelane_mculcd_param_t
struct smartdma_dsi_param_t

Data Fields

const uint8_t * p_buffer
 Pointer to the buffer to send. More...
 
uint32_t buffersize
 Buffer size in byte. More...
 
uint32_t * smartdma_stack
 Stack used by SMARTDMA. More...
 
uint32_t disablePixelByteSwap
 If set to 1, the pixels are filled to MIPI DSI FIFO directly. More...
 

Field Documentation

const uint8_t* smartdma_dsi_param_t::p_buffer
uint32_t smartdma_dsi_param_t::buffersize
uint32_t* smartdma_dsi_param_t::smartdma_stack
uint32_t smartdma_dsi_param_t::disablePixelByteSwap

If set to 0, the pixel bytes are swapped then filled to MIPI DSI FIFO. For example, when set to 0 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 smartdma_rgb565_rgb888_param_t

Macro Definition Documentation

#define SMARTDMA_DISPLAY_MEM_ADDR   0x24100000
#define s_smartdmaFlexioMcuLcdFirmware   s_smartdmaDisplayFirmware

Typedef Documentation

typedef void(* smartdma_callback_t)(void *param)

Enumeration Type Documentation

Enumerator
kSMARTDMA_FlexIO_DMA_Reverse 

Send data to FlexIO with reverse order.

kSMARTDMA_RGB565To888 

Convert RGB565 to RGB888 and save to output memory, use parameter smartdma_rgb565_rgb888_param_t.

kSMARTDMA_FlexIO_DMA_RGB565To888 

Convert RGB565 to RGB888 and send to FlexIO, use parameter smartdma_flexio_mculcd_param_t.

kSMARTDMA_FlexIO_DMA_ARGB2RGB 

Convert ARGB to RGB and send to FlexIO, use parameter smartdma_flexio_mculcd_param_t.

kSMARTDMA_FlexIO_DMA_ARGB2RGB_Endian_Swap 

Convert ARGB to RGB, then swap endian, and send to FlexIO, use parameter smartdma_flexio_mculcd_param_t.

kSMARTDMA_FlexIO_DMA_ARGB2RGB_Endian_Swap_Reverse 

Convert ARGB to RGB, then swap endian and reverse, and send to FlexIO, use parameter smartdma_flexio_mculcd_param_t.

kSMARTDMA_MIPI_RGB565_DMA 

Send RGB565 data to MIPI DSI, use parameter smartdma_dsi_param_t.

kSMARTDMA_MIPI_RGB888_DMA 

Send RGB888 data to MIPI DSI, use parameter smartdma_dsi_param_t.

kSMARTDMA_MIPI_XRGB2RGB_DMA 

Send XRGB8888 data to MIPI DSI, use parameter smartdma_param_t.

kSMARTDMA_MIPI_RGB565_R180_DMA 

Send RGB565 data to MIPI DSI, Rotate 180, use parameter smartdma_dsi_param_t.

kSMARTDMA_MIPI_RGB888_R180_DMA 

Send RGB888 data to MIPI DSI, Rotate 180, use parameter smartdma_dsi_param_t.

kSMARTDMA_FlexIO_DMA_ONELANE 

FlexIO DMA for one SHIFTBUF, Write Data to SHIFTBUF[OFFSET].

Function Documentation

void SMARTDMA_Init ( uint32_t  apiMemAddr,
const void *  firmware,
uint32_t  firmwareSizeByte 
)
Parameters
apiMemAddrThe address firmware will be copied to.
firmwareThe firmware to use.
firmwareSizeByteSize of firmware.
Deprecated:
Do not use this function. It has been superceded by GPIO_PinWrite. SMARTDMA_InitWithoutFirmware and SMARTDMA_InstallFirmware.
void SMARTDMA_InitWithoutFirmware ( void  )

This function is similar with SMARTDMA_Init, the difference is this function does not install the firmware, the firmware could be installed using SMARTDMA_InstallFirmware.

void SMARTDMA_InstallFirmware ( uint32_t  apiMemAddr,
const void *  firmware,
uint32_t  firmwareSizeByte 
)
Parameters
apiMemAddrThe address firmware will be copied to.
firmwareThe firmware to use.
firmwareSizeByteSize of firmware.
Note
Only call this function when SMARTDMA is not busy.
void SMARTDMA_InstallCallback ( smartdma_callback_t  callback,
void *  param 
)
Parameters
callbackThe callback called when smartdma program finished.
paramParameter for the callback.
Note
Only call this function when SMARTDMA is not busy.
void SMARTDMA_Boot ( uint32_t  apiIndex,
void *  pParam,
uint8_t  mask 
)
Parameters
apiIndexIndex of the API to call.
pParamPointer to the parameter.
maskValue set to SMARTDMA_ARM2SMARTDMA[0:1].
Note
Only call this function when SMARTDMA is not busy.

Variable Documentation

const uint8_t s_smartdmaDisplayFirmware[]