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

Overview

The MCUXpresso SDK provides a peripheral driver for the LCD interface (LCDIF) module of MCUXpresso SDK devices.

Data Structures

struct  lcdif_dpi_config_t
 Configuration for LCDIF module to work in DBI mode. More...
 
struct  lcdif_fb_config_t
 LCDIF frame buffer configuration. More...
 
struct  lcdif_cursor_config_t
 LCDIF cursor configuration. More...
 
struct  lcdif_dither_config_t
 LCDIF dither configuration. More...
 
struct  lcdif_dbi_config_t
 LCDIF DBI configuration. More...
 

Macros

#define LCDIF_MAKE_CURSOR_COLOR(r, g, b)   (((r) << 16U) | ((g) << 8U) | ((b) << 0U))
 Construct the cursor color, every element should be in the range of 0 ~ 255. More...
 
#define LCDIF_MAKE_GAMMA_VALUE(r, g, b)   (((r) << 16U) | ((g) << 8U) | ((b) << 0U))
 Construct the gamma value set to LCDIF gamma table, every element should be in the range of 0~255. More...
 
#define LCDIF_ALIGN_ADDR(addr, align)   (((addr) + (align)-1U) & ~((align)-1U))
 Calculate the aligned address for LCDIF buffer. More...
 
#define LCDIF_FB_ALIGN   128U
 The frame buffer should be 128 byte aligned. More...
 
#define LCDIF_GAMMA_INDEX_MAX   256U
 Gamma index max value. More...
 
#define LCDIF_CURSOR_SIZE   32U
 The cursor size is 32 x 32.
 

Enumerations

enum  _lcdif_polarity_flags {
  kLCDIF_VsyncActiveLow = 0U,
  kLCDIF_VsyncActiveHigh = (1U << 0U),
  kLCDIF_HsyncActiveLow = 0U,
  kLCDIF_HsyncActiveHigh = (1U << 1U),
  kLCDIF_DataEnableActiveLow = 0U,
  kLCDIF_DataEnableActiveHigh = (1U << 2U),
  kLCDIF_DriveDataOnFallingClkEdge = 0U,
  kLCDIF_DriveDataOnRisingClkEdge = (1U << 3U)
}
 LCDIF signal polarity flags. More...
 
enum  lcdif_output_format_t {
  kLCDIF_Output16BitConfig1 = 0U,
  kLCDIF_Output16BitConfig2 = 1U,
  kLCDIF_Output16BitConfig3 = 2U,
  kLCDIF_Output18BitConfig1 = 3U,
  kLCDIF_Output18BitConfig2 = 4U,
  kLCDIF_Output24Bit = 5U
}
 LCDIF DPI output format. More...
 
enum  lcdif_fb_format_t {
  kLCDIF_PixelFormatXRGB444 = 1,
  kLCDIF_PixelFormatXRGB4444 = 1,
  kLCDIF_PixelFormatXRGB1555 = 2,
  kLCDIF_PixelFormatRGB565 = 3,
  kLCDIF_PixelFormatXRGB8888 = 4
}
 LCDIF frame buffer pixel format. More...
 
enum  _lcdif_interrupt { kLCDIF_Display0FrameDoneInterrupt }
 LCDIF interrupt and status. More...
 
enum  lcdif_cursor_format_t {
  kLCDIF_CursorMasked = 1,
  kLCDIF_CursorARGB8888 = 2
}
 LCDIF cursor format. More...
 
enum  _lcdif_dbi_cmd_flag {
  kLCDIF_DbiCmdAddress = 0U,
  kLCDIF_DbiCmdWriteMem,
  kLCDIF_DbiCmdData,
  kLCDIF_DbiCmdReadMem
}
 LCDIF DBI command flag. More...
 
enum  lcdif_dbi_out_format_t {
  kLCDIF_DbiOutD8RGB332 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(0),
  kLCDIF_DbiOutD8RGB444 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(1),
  kLCDIF_DbiOutD8RGB565 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(2),
  kLCDIF_DbiOutD8RGB666 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(3),
  kLCDIF_DbiOutD8RGB888 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(4),
  kLCDIF_DbiOutD9RGB666 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(5),
  kLCDIF_DbiOutD16RGB332 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(6),
  kLCDIF_DbiOutD16RGB444 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(7),
  kLCDIF_DbiOutD16RGB565 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(8),
  kLCDIF_DbiOutD16RGB666Option1 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(9),
  kLCDIF_DbiOutD16RGB666Option2 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(10),
  kLCDIF_DbiOutD16RGB888Option1 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(11),
  kLCDIF_DbiOutD16RGB888Option2 = LCDIF_DBICONFIG0_DBI_DATA_FORMAT(12)
}
 LCDIF DBI output format. More...
 
enum  lcdif_dbi_type_t {
  kLCDIF_DbiTypeA_FixedE = 0U,
  kLCDIF_DbiTypeA_ClockedE = 1U,
  kLCDIF_DbiTypeB = 2U
}
 LCDIF DBI type. More...
 
enum  lcdif_dbi_out_swizzle_t {
  kLCDIF_DbiOutSwizzleRGB = 0U,
  kLCDIF_DbiOutSwizzleBGR = 1U
}
 LCDIF DBI output swizzle. More...
 

Driver version

#define FSL_LCDIF_DRIVER_VERSION   (MAKE_VERSION(2, 2, 0))
 

Initialization and deinitialization

status_t LCDIF_Init (LCDIF_Type *base)
 Initialize the LCDIF. More...
 
void LCDIF_Deinit (LCDIF_Type *base)
 De-initialize the LCDIF. More...
 

DPI mode

void LCDIF_DpiModeGetDefaultConfig (lcdif_dpi_config_t *config)
 Get the default configuration for to initialize the LCDIF. More...
 
status_t LCDIF_DpiModeSetConfig (LCDIF_Type *base, uint8_t displayIndex, const lcdif_dpi_config_t *config)
 Initialize the LCDIF to work in DPI mode. More...
 

DBI mode

status_t LCDIF_DbiModeSetConfig (LCDIF_Type *base, uint8_t displayIndex, const lcdif_dbi_config_t *config)
 Initialize the LCDIF to work in DBI mode. More...
 
void LCDIF_DbiModeGetDefaultConfig (lcdif_dbi_config_t *config)
 Get the default configuration to initialize the LCDIF DBI mode. More...
 
static void LCDIF_DbiReset (LCDIF_Type *base, uint8_t displayIndex)
 Reset the DBI module. More...
 
void LCDIF_DbiSelectArea (LCDIF_Type *base, uint8_t displayIndex, uint16_t startX, uint16_t startY, uint16_t endX, uint16_t endY, bool isTiled)
 Select the update area in DBI mode. More...
 
static void LCDIF_DbiSendCommand (LCDIF_Type *base, uint8_t displayIndex, uint8_t cmd)
 Send command to DBI port. More...
 
void LCDIF_DbiSendData (LCDIF_Type *base, uint8_t displayIndex, const uint8_t *data, uint32_t dataLen_Byte)
 brief Send data to DBI port. More...
 
void LCDIF_DbiSendCommandAndData (LCDIF_Type *base, uint8_t displayIndex, uint8_t cmd, const uint8_t *data, uint32_t dataLen_Byte)
 Send command followed by data to DBI port. More...
 
static void LCDIF_DbiWriteMem (LCDIF_Type *base, uint8_t displayIndex)
 Send pixel data in frame buffer to panel controller memory. More...
 

Frame buffer

void LCDIF_SetFrameBufferConfig (LCDIF_Type *base, uint8_t displayIndex, const lcdif_fb_config_t *config)
 Configure the LCDIF frame buffer. More...
 
void LCDIF_FrameBufferGetDefaultConfig (lcdif_fb_config_t *config)
 Get default frame buffer configuration. More...
 
static void LCDIF_SetFrameBufferAddr (LCDIF_Type *base, uint8_t displayIndex, uint32_t address)
 Set the frame buffer to LCDIF. More...
 
void LCDIF_SetFrameBufferStride (LCDIF_Type *base, uint8_t displayIndex, uint32_t strideBytes)
 Set the frame buffer stride. More...
 

Dither

void LCDIF_SetDitherConfig (LCDIF_Type *base, uint8_t displayIndex, const lcdif_dither_config_t *config)
 Set the dither configuration. More...
 

Gamma correction

void LCDIF_SetGammaData (LCDIF_Type *base, uint8_t displayIndex, uint16_t startIndex, const uint32_t *gamma, uint16_t gammaLen)
 Set the gamma translation values to the LCDIF gamma table. More...
 

Interrupts

The interrupt must be enabled, otherwise the interrupt flags will not assert.

static void LCDIF_EnableInterrupts (LCDIF_Type *base, uint32_t mask)
 Enables LCDIF interrupt requests. More...
 
static void LCDIF_DisableInterrupts (LCDIF_Type *base, uint32_t mask)
 Disable LCDIF interrupt requests. More...
 
static uint32_t LCDIF_GetAndClearInterruptPendingFlags (LCDIF_Type *base)
 Get and clear LCDIF interrupt pending status. More...
 

Cursor

Top-left point and Hot spot are two different cursor point.

Top-left point is used as the base address for the cursor. Hot spot is used in a search for a corresponding screen coordinate when a selection is made, such as when the "Enter" key or left mouse button is pushed.

  Top-left point
       +-------------------------------+
       |                               |
       |   Hot spot                    |
       |      +-------                 |
       |      |    \                   |
       |      | \   \                  |
       |      |  \   \                 |
       |          \   \                |
       |           \   \               |
       |            \   \              |
       |             \   \             |
       |              \                |
       |                               |
       +-------------------------------+

For format masked, one cursor pixel is 2bits. 32x32 cursor pixels have 32 cursor color rows. Each cursor color row is 64bits.

cursorColorRow_H[31:0] = colorRow[63:32] cursorColorRow_L[31:0] = colorRow[31:0] xorCursor = cursorColorRow_H[cursorXPos[4:0]] andCursor = cursorColorRow_L[cursorXPos[4:0]]

The output cursor color is:

andCursor xorCursor cursor color 0 0 Background register color 0 1 Foreground register color 1 0 Frame buffer pixel color 1 1 Invert frame buffer pixel color

void LCDIF_CursorGetDefaultConfig (lcdif_cursor_config_t *config)
 Get the hardware cursor default configuration. More...
 
void LCDIF_SetCursorConfig (LCDIF_Type *base, const lcdif_cursor_config_t *config)
 Configure the cursor. More...
 
static void LCDIF_SetCursorHotspotPosition (LCDIF_Type *base, uint16_t x, uint16_t y)
 Set the cursor hotspot postion. More...
 
static void LCDIF_SetCursorBufferAddress (LCDIF_Type *base, uint32_t address)
 Set the cursor memory address. More...
 
void LCDIF_SetCursorColor (LCDIF_Type *base, uint32_t background, uint32_t foreground)
 Set the cursor color. More...
 

Data Structure Documentation

struct lcdif_dpi_config_t

Data Fields

uint16_t panelWidth
 Display panel width, pixels per line. More...
 
uint16_t panelHeight
 Display panel height, how many lines per panel. More...
 
uint8_t hsw
 HSYNC pulse width. More...
 
uint8_t hfp
 Horizontal front porch. More...
 
uint8_t hbp
 Horizontal back porch. More...
 
uint8_t vsw
 VSYNC pulse width. More...
 
uint8_t vfp
 Vrtical front porch. More...
 
uint8_t vbp
 Vertical back porch. More...
 
uint32_t polarityFlags
 OR'ed value of _lcdif_polarity_flags, used to contol the signal polarity. More...
 
lcdif_output_format_t format
 DPI output format. More...
 

Field Documentation

uint16_t lcdif_dpi_config_t::panelWidth
uint16_t lcdif_dpi_config_t::panelHeight
uint8_t lcdif_dpi_config_t::hsw
uint8_t lcdif_dpi_config_t::hfp
uint8_t lcdif_dpi_config_t::hbp
uint8_t lcdif_dpi_config_t::vsw
uint8_t lcdif_dpi_config_t::vfp
uint8_t lcdif_dpi_config_t::vbp
uint32_t lcdif_dpi_config_t::polarityFlags
lcdif_output_format_t lcdif_dpi_config_t::format
struct lcdif_fb_config_t

Data Fields

bool enable
 Enable the frame buffer output. More...
 
bool enableGamma
 Enable the gamma correction. More...
 
lcdif_fb_format_t format
 Frame buffer pixel format. More...
 

Field Documentation

bool lcdif_fb_config_t::enable
bool lcdif_fb_config_t::enableGamma
lcdif_fb_format_t lcdif_fb_config_t::format
struct lcdif_cursor_config_t

Data Fields

bool enable
 Enable the cursor or not. More...
 
lcdif_cursor_format_t format
 Cursor format. More...
 
uint8_t hotspotOffsetX
 Offset of the hotspot to top left point, range 0 ~ 31.
 
uint8_t hotspotOffsetY
 Offset of the hotspot to top left point, range 0 ~ 31.
 

Field Documentation

bool lcdif_cursor_config_t::enable
lcdif_cursor_format_t lcdif_cursor_config_t::format
struct lcdif_dither_config_t
  1. Decide which bit of pixel color to enhance. This is configured by the lcdif_dither_config_t::redSize, lcdif_dither_config_t::greenSize, and lcdif_dither_config_t::blueSize. For example, setting redSize=6 means it is the 6th bit starting from the MSB that we want to enhance, in other words, it is the RedColor[2]bit from RedColor[7:0]. greenSize and blueSize function in the same way.
  2. Create the look-up table. a. The Look-Up Table includes 16 entries, 4 bits for each. b. The Look-Up Table provides a value U[3:0] through the index X[1:0] and Y[1:0]. c. The color value RedColor[3:0] is used to compare with this U[3:0]. d. If RedColor[3:0] > U[3:0], and RedColor[7:2] is not 6'b111111, then the final color value is: NewRedColor = RedColor[7:2] + 1'b1. e. If RedColor[3:0] <= U[3:0], then NewRedColor = RedColor[7:2].

Data Fields

bool enable
 Enable or not. More...
 
uint8_t redSize
 Red color size, valid region 4-8. More...
 
uint8_t greenSize
 Green color size, valid region 4-8. More...
 
uint8_t blueSize
 Blue color size, valid region 4-8. More...
 
uint32_t low
 Low part of the look up table. More...
 
uint32_t high
 High part of the look up table. More...
 

Field Documentation

bool lcdif_dither_config_t::enable
uint8_t lcdif_dither_config_t::redSize
uint8_t lcdif_dither_config_t::greenSize
uint8_t lcdif_dither_config_t::blueSize
uint32_t lcdif_dither_config_t::low
uint32_t lcdif_dither_config_t::high
struct lcdif_dbi_config_t

Data Fields

lcdif_dbi_out_swizzle_t swizzle
 Swizzle. More...
 
lcdif_dbi_out_format_t format
 Output format. More...
 
uint8_t acTimeUnit
 Time unit for AC characteristics. More...
 
lcdif_dbi_type_t type
 DBI type. More...
 
uint16_t writeWRPeriod
 WR signal period, Cycle number = writeWRPeriod * (acTimeUnit + 1), must be no less than 3. More...
 
uint8_t writeWRAssert
 Cycle number = writeWRAssert * (acTimeUnit + 1), only for type A and type B. More...
 
uint8_t writeCSAssert
 Cycle number = writeCSAssert * (acTimeUnit + 1), only for type A and type B. More...
 
uint16_t writeWRDeassert
 Cycle number = writeWRDeassert * (acTimeUnit + 1), only for type A and type B. More...
 
uint16_t writeCSDeassert
 Cycle number = writeCSDeassert * (acTimeUnit + 1), only for type A and type B. More...
 

Field Documentation

lcdif_dbi_out_swizzle_t lcdif_dbi_config_t::swizzle
lcdif_dbi_out_format_t lcdif_dbi_config_t::format
uint8_t lcdif_dbi_config_t::acTimeUnit
lcdif_dbi_type_t lcdif_dbi_config_t::type
uint16_t lcdif_dbi_config_t::writeWRPeriod

Only for type A and type b.

uint8_t lcdif_dbi_config_t::writeWRAssert

With kLCDIF_DbiTypeA_FixedE: Not used. With kLCDIF_DbiTypeA_ClockedE: Time to assert E. With kLCDIF_DbiTypeB: Time to assert WRX.

uint8_t lcdif_dbi_config_t::writeCSAssert

With kLCDIF_DbiTypeA_FixedE: Time to assert CSX. With kLCDIF_DbiTypeA_ClockedE: Not used. With kLCDIF_DbiTypeB: Time to assert CSX.

uint16_t lcdif_dbi_config_t::writeWRDeassert

With kLCDIF_DbiTypeA_FixedE: Not used. With kLCDIF_DbiTypeA_ClockedE: Time to de-assert E. With kLCDIF_DbiTypeB: Time to de-assert WRX.

uint16_t lcdif_dbi_config_t::writeCSDeassert

With kLCDIF_DbiTypeA_FixedE: Time to de-assert CSX. With kLCDIF_DbiTypeA_ClockedE: Not used. With kLCDIF_DbiTypeB: Time to de-assert CSX.

Macro Definition Documentation

#define LCDIF_MAKE_CURSOR_COLOR (   r,
  g,
 
)    (((r) << 16U) | ((g) << 8U) | ((b) << 0U))
#define LCDIF_MAKE_GAMMA_VALUE (   r,
  g,
 
)    (((r) << 16U) | ((g) << 8U) | ((b) << 0U))
#define LCDIF_ALIGN_ADDR (   addr,
  align 
)    (((addr) + (align)-1U) & ~((align)-1U))
#define LCDIF_FB_ALIGN   128U
#define LCDIF_GAMMA_INDEX_MAX   256U

Enumeration Type Documentation

Enumerator
kLCDIF_VsyncActiveLow 

VSYNC active low.

kLCDIF_VsyncActiveHigh 

VSYNC active high.

kLCDIF_HsyncActiveLow 

HSYNC active low.

kLCDIF_HsyncActiveHigh 

HSYNC active high.

kLCDIF_DataEnableActiveLow 

Data enable line active low.

kLCDIF_DataEnableActiveHigh 

Data enable line active high.

kLCDIF_DriveDataOnFallingClkEdge 

Drive data on falling clock edge, capture data on rising clock edge.

kLCDIF_DriveDataOnRisingClkEdge 

Drive data on falling clock edge, capture data on rising clock edge.

Enumerator
kLCDIF_Output16BitConfig1 

16-bit configuration 1.

RGB565: XXXXXXXX_RRRRRGGG_GGGBBBBB.

kLCDIF_Output16BitConfig2 

16-bit configuration 2.

RGB565: XXXRRRRR_XXGGGGGG_XXXBBBBB.

kLCDIF_Output16BitConfig3 

16-bit configuration 3.

RGB565: XXRRRRRX_XXGGGGGG_XXBBBBBX.

kLCDIF_Output18BitConfig1 

18-bit configuration 1.

RGB666: XXXXXXRR_RRRRGGGG_GGBBBBBB.

kLCDIF_Output18BitConfig2 

18-bit configuration 2.

RGB666: XXRRRRRR_XXGGGGGG_XXBBBBBB.

kLCDIF_Output24Bit 

24-bit.

Enumerator
kLCDIF_PixelFormatXRGB444 

XRGB4444, deprecated, use kLCDIF_PixelFormatXRGB4444 instead.

kLCDIF_PixelFormatXRGB4444 

XRGB4444, 16-bit each pixel, 4-bit each element.

R4G4B4 in reference manual.

kLCDIF_PixelFormatXRGB1555 

XRGB1555, 16-bit each pixel, 5-bit each element.

R5G5B5 in reference manual.

kLCDIF_PixelFormatRGB565 

RGB565, 16-bit each pixel.

R5G6B5 in reference manual.

kLCDIF_PixelFormatXRGB8888 

XRGB8888, 32-bit each pixel, 8-bit each element.

R8G8B8 in reference manual.

Enumerator
kLCDIF_Display0FrameDoneInterrupt 

The last pixel of visible area in frame is shown.

Enumerator
kLCDIF_CursorMasked 

Masked format.

kLCDIF_CursorARGB8888 

ARGB8888.

Enumerator
kLCDIF_DbiCmdAddress 

Send address (or command).

kLCDIF_DbiCmdWriteMem 

Start write memory.

kLCDIF_DbiCmdData 

Send data.

kLCDIF_DbiCmdReadMem 

Start read memory.

Enumerator
kLCDIF_DbiOutD8RGB332 

8-bit data bus width, pixel RGB332.

For type A or B. 1 pixel sent in 1 cycle.

kLCDIF_DbiOutD8RGB444 

8-bit data bus width, pixel RGB444.

For type A or B. 2 pixels sent in 3 cycles.

kLCDIF_DbiOutD8RGB565 

8-bit data bus width, pixel RGB565.

For type A or B. 1 pixel sent in 2 cycles.

kLCDIF_DbiOutD8RGB666 

8-bit data bus width, pixel RGB666.

For type A or B. 1 pixel sent in 3 cycles, data bus 2 LSB not used.

kLCDIF_DbiOutD8RGB888 

8-bit data bus width, pixel RGB888.

For type A or B. 1 pixel sent in 3 cycles.

kLCDIF_DbiOutD9RGB666 

9-bit data bus width, pixel RGB666.

For type A or B. 1 pixel sent in 2 cycles.

kLCDIF_DbiOutD16RGB332 

16-bit data bus width, pixel RGB332.

For type A or B. 2 pixels sent in 1 cycle.

kLCDIF_DbiOutD16RGB444 

16-bit data bus width, pixel RGB444.

For type A or B. 1 pixel sent in 1 cycle, data bus 4 MSB not used.

kLCDIF_DbiOutD16RGB565 

16-bit data bus width, pixel RGB565.

For type A or B. 1 pixel sent in 1 cycle.

kLCDIF_DbiOutD16RGB666Option1 

16-bit data bus width, pixel RGB666.

For type A or B. 2 pixels sent in 3 cycles.

kLCDIF_DbiOutD16RGB666Option2 

16-bit data bus width, pixel RGB666.

For type A or B. 1 pixel sent in 2 cycles.

kLCDIF_DbiOutD16RGB888Option1 

16-bit data bus width, pixel RGB888.

For type A or B. 2 pixels sent in 3 cycles.

kLCDIF_DbiOutD16RGB888Option2 

16-bit data bus width, pixel RGB888.

For type A or B. 1 pixel sent in 2 cycles.

Enumerator
kLCDIF_DbiTypeA_FixedE 

Selects DBI type A fixed E mode, 68000, Motorola mode.

kLCDIF_DbiTypeA_ClockedE 

Selects DBI Type A Clocked E mode, 68000, Motorola mode.

kLCDIF_DbiTypeB 

Selects DBI type B, 8080, Intel mode.

Enumerator
kLCDIF_DbiOutSwizzleRGB 

RGB.

kLCDIF_DbiOutSwizzleBGR 

BGR.

Function Documentation

status_t LCDIF_Init ( LCDIF_Type *  base)

This function initializes the LCDIF to work.

Parameters
baseLCDIF peripheral base address.
Return values
kStatus_SuccessInitialize successfully.
void LCDIF_Deinit ( LCDIF_Type *  base)

This function disables the LCDIF peripheral clock.

Parameters
baseLCDIF peripheral base address.
void LCDIF_DpiModeGetDefaultConfig ( lcdif_dpi_config_t config)

The default configuration value is:

config->panelWidth = 0;
config->panelHeight = 0;
config->hsw = 0;
config->hfp = 0;
config->hbp = 0;
config->vsw = 0;
config->vfp = 0;
config->vbp = 0;
Parameters
configPointer to the LCDIF configuration.
status_t LCDIF_DpiModeSetConfig ( LCDIF_Type *  base,
uint8_t  displayIndex,
const lcdif_dpi_config_t config 
)

This function configures the LCDIF DPI display.

Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
configPointer to the configuration structure.
Return values
kStatus_SuccessInitialize successfully.
kStatus_InvalidArgumentInitialize failed because of invalid argument.
status_t LCDIF_DbiModeSetConfig ( LCDIF_Type *  base,
uint8_t  displayIndex,
const lcdif_dbi_config_t config 
)

This function configures the LCDIF DBI display.

Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
configPointer to the configuration structure.
Return values
kStatus_SuccessInitialize successfully.
kStatus_InvalidArgumentInitialize failed because of invalid argument.
void LCDIF_DbiModeGetDefaultConfig ( lcdif_dbi_config_t config)

The default configuration value is:

config->swizzle = kLCDIF_DbiOutSwizzleRGB;
config->format = kLCDIF_DbiOutD8RGB332;
config->acTimeUnit = 0;
config->type = kLCDIF_DbiTypeA_ClockedE;
config->reversePolarity = false;
config->writeWRPeriod = 3U;
config->writeWRAssert = 0U;
config->writeCSAssert = 0U;
config->writeWRDeassert = 0U;
config->writeCSDeassert = 0U;
config->typeCTas = 1U;
config->typeCSCLTwrl = 1U;
config->typeCSCLTwrh = 1U;
Parameters
configPointer to the LCDIF DBI configuration.
static void LCDIF_DbiReset ( LCDIF_Type *  base,
uint8_t  displayIndex 
)
inlinestatic
Parameters
displayIndexDisplay index.
baseLCDIF peripheral base address.
void LCDIF_DbiSelectArea ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint16_t  startX,
uint16_t  startY,
uint16_t  endX,
uint16_t  endY,
bool  isTiled 
)
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
startXX coordinate for start pixel.
startYY coordinate for start pixel.
endXX coordinate for end pixel.
endYY coordinate for end pixel.
isTiledtrue if the pixel data is tiled.
static void LCDIF_DbiSendCommand ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint8_t  cmd 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
cmdthe DBI command to send.
void LCDIF_DbiSendData ( LCDIF_Type *  base,
uint8_t  displayIndex,
const uint8_t *  data,
uint32_t  dataLen_Byte 
)

Can be used to send light weight data to panel. To send pixel data in frame buffer, use LCDIF_DbiWriteMem.

param base LCDIF peripheral base address. param displayIndex Display index. param data pointer to data buffer. param dataLen_Byte data buffer length in byte.

void LCDIF_DbiSendCommandAndData ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint8_t  cmd,
const uint8_t *  data,
uint32_t  dataLen_Byte 
)
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
cmdthe DBI command to send.
datapointer to data buffer.
dataLen_Bytedata buffer length in byte.
static void LCDIF_DbiWriteMem ( LCDIF_Type *  base,
uint8_t  displayIndex 
)
inlinestatic

This function starts sending the pixel data in frame buffer to panel controller, user can monitor interrupt kLCDIF_Display0FrameDoneInterrupt to know when then data sending finished.

Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
void LCDIF_SetFrameBufferConfig ( LCDIF_Type *  base,
uint8_t  displayIndex,
const lcdif_fb_config_t config 
)

: For LCDIF of version DC8000 there can be 3 layers in the pre-processing, compared with the older version. Apart from the video layer, there are also 2 overlay layers which shares the same configurations. Use this API to configure the legacy video layer, and use LCDIF_SetOverlayFrameBufferConfig to configure the overlay layers.

Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
configPointer to the configuration structure.
void LCDIF_FrameBufferGetDefaultConfig ( lcdif_fb_config_t config)

: For LCDIF of version DC8000 there can be 3 layers in the pre-processing, compared with the older version. Apart from the video layer, there are also 2 overlay layers which shares the same configurations. Use this API to get the default configuration for all the 3 layers.

The default configuration is

config->enable = true;
config->enableGamma = false;
config->format = kLCDIF_PixelFormatRGB565;
Parameters
configPointer to the configuration structure.
static void LCDIF_SetFrameBufferAddr ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint32_t  address 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
addressFrame buffer address.
Note
The address must be 128 bytes aligned.
void LCDIF_SetFrameBufferStride ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint32_t  strideBytes 
)
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
strideBytesThe stride in byte.
void LCDIF_SetDitherConfig ( LCDIF_Type *  base,
uint8_t  displayIndex,
const lcdif_dither_config_t config 
)
Parameters
baseLCDIF peripheral base address.
displayIndexIndex to configure.
configPointer to the configuration structure.
void LCDIF_SetGammaData ( LCDIF_Type *  base,
uint8_t  displayIndex,
uint16_t  startIndex,
const uint32_t *  gamma,
uint16_t  gammaLen 
)
Parameters
baseLCDIF peripheral base address.
displayIndexDisplay index.
startIndexStart index in the gamma table that the value will be set to.
gammaThe gamma values to set to the gamma table in LCDIF, could be defined using LCDIF_MAKE_GAMMA_VALUE.
gammaLenThe length of the gamma.
static void LCDIF_EnableInterrupts ( LCDIF_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
maskThe interrupts to enable, pass in as OR'ed value of _lcdif_interrupt.
static void LCDIF_DisableInterrupts ( LCDIF_Type *  base,
uint32_t  mask 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
maskThe interrupts to disable, pass in as OR'ed value of _lcdif_interrupt.
static uint32_t LCDIF_GetAndClearInterruptPendingFlags ( LCDIF_Type *  base)
inlinestatic
Parameters
baseLCDIF peripheral base address.
Returns
The interrupt pending status.
Note
The interrupt must be enabled, otherwise the interrupt flags will not assert.
void LCDIF_CursorGetDefaultConfig ( lcdif_cursor_config_t config)

The default configuration values are:

config->enable = true;
config->format = kLCDIF_CursorMasked;
config->hotspotOffsetX = 0;
config->hotspotOffsetY = 0;
Parameters
configPointer to the hardware cursor configuration structure.
void LCDIF_SetCursorConfig ( LCDIF_Type *  base,
const lcdif_cursor_config_t config 
)
Parameters
baseLCDIF peripheral base address.
configCursor configuration.
static void LCDIF_SetCursorHotspotPosition ( LCDIF_Type *  base,
uint16_t  x,
uint16_t  y 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
xX coordinate of the hotspot, range 0 ~ 8191.
yY coordinate of the hotspot, range 0 ~ 8191.
static void LCDIF_SetCursorBufferAddress ( LCDIF_Type *  base,
uint32_t  address 
)
inlinestatic
Parameters
baseLCDIF peripheral base address.
addressMemory address.
void LCDIF_SetCursorColor ( LCDIF_Type *  base,
uint32_t  background,
uint32_t  foreground 
)
Parameters
baseLCDIF peripheral base address.
backgroundBackground color, could be defined use LCDIF_MAKE_CURSOR_COLOR
foregroundForeground color, could be defined use LCDIF_MAKE_CURSOR_COLOR