MCUXpresso SDK API Reference Manual  Rev. 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. 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...
 
#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...
 
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_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
}
 The API index when using s_smartdmaFlexioMcuLcdFirmware. More...
 
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_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
}
 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.
 
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, 2, 0))
 SMARTDMA driver version.
 

Driver version

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

Data Structure Documentation

struct smartdma_flexio_mculcd_param_t
struct smartdma_dsi_param_t
struct smartdma_rgb565_rgb888_param_t

Macro Definition Documentation

#define SMARTDMA_DISPLAY_MEM_ADDR   0x24100000
#define s_smartdmaFlexioMcuLcdFirmware   s_smartdmaDisplayFirmware
#define SMARTDMA_DISPLAY_MEM_ADDR   0x24100000
#define s_smartdmaFlexioMcuLcdFirmware   s_smartdmaDisplayFirmware

Typedef Documentation

typedef void(* smartdma_callback_t)(void *param)
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_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.

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_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.

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.
Parameters
apiMemAddrThe address firmware will be copied to.
firmwareThe firmware to use.
firmwareSizeByteSize of firmware.
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[]
const uint8_t s_smartdmaDisplayFirmware[]