MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
LCDIFv2: LCD Interface v2

Overview

The MCUXpresso SDK provides a peripheral driver for the LCD Interface v2(LCDIFv2)

The LCDIFv2 supports RGB mode (dot clock mode), it supports up to maximum 8 layers of alpha blending.

Shadow load

Shadow registers are used for LCDIFv2 layer configuration, when layer configurations are set, they are written to the shadow registers and do not take effect, after the function LCDIFV2_TriggerLayerShadowLoad is called, the new configuration are loaded to the active control registers at next vertical blank period. This mechanism ensures that all configurations are loaded at the same time.

Typical use case

Refer to the driver examples codes located at <SDK_ROOT>/boards/<BOARD>/driver_examples/lcdifv2

Data Structures

struct  lcdifv2_display_config_t
 LCDIF v2 display configure structure. More...
 
struct  lcdifv2_buffer_config_t
 LCDIF v2 source buffer configuration. More...
 
struct  lcdifv2_blend_config_t
 LCDIF v2 layer alpha blending configuration. More...
 

Macros

#define LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(layer)   (1U << ((uint32_t)(layer) + 24U))
 LCDIF v2 FIFO empty interrupt. More...
 
#define LCDIFV2_MAKE_DMA_DONE_INTERRUPT(layer)   (1U << ((uint32_t)(layer) + 16U))
 LCDIF v2 DMA done interrupt. More...
 
#define LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(layer)   (1U << ((uint32_t)(layer) + 8U))
 LCDIF v2 DMA error interrupt. More...
 

Enumerations

enum  _lcdifv2_polarity_flags {
  kLCDIFV2_VsyncActiveLow = LCDIFV2_CTRL_INV_VS_MASK,
  kLCDIFV2_VsyncActiveHigh = 0U,
  kLCDIFV2_HsyncActiveLow = LCDIFV2_CTRL_INV_HS_MASK,
  kLCDIFV2_HsyncActiveHigh = 0U,
  kLCDIFV2_DataEnableActiveLow = LCDIFV2_CTRL_INV_DE_MASK,
  kLCDIFV2_DataEnableActiveHigh = 0U,
  kLCDIFV2_DriveDataOnFallingClkEdge = LCDIFV2_CTRL_INV_PXCK_MASK,
  kLCDIFV2_DriveDataOnRisingClkEdge = 0U,
  kLCDIFV2_DataActiveLow = LCDIFV2_CTRL_NEG_MASK,
  kLCDIFV2_DataActiveHigh = 0U
}
 LCDIF v2 signal polarity flags. More...
 
enum  _lcdifv2_interrupt {
  kLCDIFV2_Layer0FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(0),
  kLCDIFV2_Layer1FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(1),
  kLCDIFV2_Layer2FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(2),
  kLCDIFV2_Layer3FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(3),
  kLCDIFV2_Layer4FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(4),
  kLCDIFV2_Layer5FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(5),
  kLCDIFV2_Layer6FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(6),
  kLCDIFV2_Layer7FifoEmptyInterrupt = LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT(7),
  kLCDIFV2_Layer0DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(0),
  kLCDIFV2_Layer1DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(1),
  kLCDIFV2_Layer2DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(2),
  kLCDIFV2_Layer3DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(3),
  kLCDIFV2_Layer4DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(4),
  kLCDIFV2_Layer5DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(5),
  kLCDIFV2_Layer6DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(6),
  kLCDIFV2_Layer7DmaDoneInterrupt = LCDIFV2_MAKE_DMA_DONE_INTERRUPT(7),
  kLCDIFV2_Layer0DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(0),
  kLCDIFV2_Layer1DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(1),
  kLCDIFV2_Layer2DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(2),
  kLCDIFV2_Layer3DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(3),
  kLCDIFV2_Layer4DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(4),
  kLCDIFV2_Layer5DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(5),
  kLCDIFV2_Layer6DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(6),
  kLCDIFV2_Layer7DmaErrorInterrupt = LCDIFV2_MAKE_DMA_ERROR_INTERRUPT(7),
  kLCDIFV2_VerticalBlankingInterrupt = (1U << 2U),
  kLCDIFV2_OutputUnderrunInterrupt = (1U << 1U),
  kLCDIFV2_VsyncEdgeInterrupt = (1U << 0U)
}
 The LCDIF v2 interrupts. More...
 
enum  lcdifv2_line_order_t {
  kLCDIFV2_LineOrderRGB = 0,
  kLCDIFV2_LineOrderRBG,
  kLCDIFV2_LineOrderGBR,
  kLCDIFV2_LineOrderGRB,
  kLCDIFV2_LineOrderBRG,
  kLCDIFV2_LineOrderBGR
}
 The LCDIF v2 output line order. More...
 
enum  lcdifv2_csc_mode_t {
  kLCDIFV2_CscDisable = 0U,
  kLCDIFV2_CscYUV2RGB,
  kLCDIFV2_CscYCbCr2RGB
}
 LCDIF v2 color space conversion mode. More...
 
enum  lcdifv2_pixel_format_t {
  kLCDIFV2_PixelFormatIndex1BPP = LCDIFV2_CTRLDESCL5_BPP(0U),
  kLCDIFV2_PixelFormatIndex2BPP = LCDIFV2_CTRLDESCL5_BPP(1U),
  kLCDIFV2_PixelFormatIndex4BPP = LCDIFV2_CTRLDESCL5_BPP(2U),
  kLCDIFV2_PixelFormatIndex8BPP = LCDIFV2_CTRLDESCL5_BPP(3U),
  kLCDIFV2_PixelFormatRGB565 = LCDIFV2_CTRLDESCL5_BPP(4U),
  kLCDIFV2_PixelFormatARGB1555 = LCDIFV2_CTRLDESCL5_BPP(5U),
  kLCDIFV2_PixelFormatARGB4444 = LCDIFV2_CTRLDESCL5_BPP(6U),
  kLCDIFV2_PixelFormatUYVY,
  kLCDIFV2_PixelFormatVYUY,
  kLCDIFV2_PixelFormatYUYV,
  kLCDIFV2_PixelFormatYVYU,
  kLCDIFV2_PixelFormatRGB888 = LCDIFV2_CTRLDESCL5_BPP(8U),
  kLCDIFV2_PixelFormatARGB8888 = LCDIFV2_CTRLDESCL5_BPP(9U),
  kLCDIFV2_PixelFormatABGR8888 = LCDIFV2_CTRLDESCL5_BPP(10U)
}
 
enum  lcdifv2_alpha_mode_t {
  kLCDIFV2_AlphaDisable,
  kLCDIFV2_AlphaOverride,
  kLCDIFV2_AlphaEmbedded,
  kLCDIFV2_AlphaPoterDuff
}
 LCDIF v2 layer alpha blending mode. More...
 
enum  lcdifv2_pd_alpha_mode_t {
  kLCDIFV2_PD_AlphaStraight = 0,
  kLCDIFV2_PD_AlphaInversed = 1
}
 LCDIF v2 PoterDuff alpha mode. More...
 
enum  lcdifv2_pd_color_mode_t {
  kLCDIFV2_PD_ColorNoAlpha = 0,
  kLCDIFV2_PD_ColorWithAlpha = 1
}
 LCDIF v2 PoterDuff color mode. More...
 
enum  lcdifv2_pd_global_alpha_mode_t {
  kLCDIFV2_PD_GlobalAlpha = 0,
  kLCDIFV2_PD_LocalAlpha = 1,
  kLCDIFV2_PD_ScaledAlpha = 2
}
 LCDIF v2 PoterDuff global alpha mode. More...
 
enum  lcdifv2_pd_factor_mode_t {
  kLCDIFV2_PD_FactorOne = 0,
  kLCDIFV2_PD_FactorZero = 1,
  kLCDIFV2_PD_FactorStraightAlpha = 2,
  kLCDIFV2_PD_FactorInversedAlpha = 3
}
 LCDIF v2 PoterDuff factor mode. More...
 
enum  lcdifv2_pd_blend_mode_t {
  kLCDIFV2_PD_Src = 0,
  kLCDIFV2_PD_Atop,
  kLCDIFV2_PD_Over,
  kLCDIFV2_PD_In,
  kLCDIFV2_PD_Out,
  kLCDIFV2_PD_Dst,
  kLCDIFV2_PD_DstAtop,
  kLCDIFV2_PD_DstOver,
  kLCDIFV2_PD_DstIn,
  kLCDIFV2_PD_DstOut,
  kLCDIFV2_PD_Xor,
  kLCDIFV2_PD_Clear,
  kLCDIFV2_PD_Max
}
 LCDIFv2 Porter Duff blend mode. More...
 
enum  lcdifv2_pd_layer_t {
  kLCDIFV2_PD_SrcLayer = 0,
  kLCDIFV2_PD_DestLayer = 1,
  kLCDIFV2_PD_LayerMax = 2
}
 LCDIFv2 Porter Duff layer. More...
 

Driver version

#define FSL_LCDIFV2_DRIVER_VERSION   (MAKE_VERSION(2, 2, 2))
 LCDIF v2 driver version.
 

LCDIF v2 initialization and de-initialization

void LCDIFV2_Init (LCDIFV2_Type *base)
 Initializes the LCDIF v2. More...
 
void LCDIFV2_Deinit (LCDIFV2_Type *base)
 Deinitializes the LCDIF peripheral. More...
 
void LCDIFV2_Reset (LCDIFV2_Type *base)
 Reset the LCDIF v2. More...
 

Display

status_t LCDIFV2_GetPorterDuffConfig (lcdifv2_pd_blend_mode_t mode, lcdifv2_pd_layer_t layer, lcdifv2_blend_config_t *config)
 Gets the LCDIF display default configuration structure. More...
 

Data Structure Documentation

struct lcdifv2_display_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 _lcdifv2_polarity_flags, used to contol the signal polarity. More...
 
lcdifv2_line_order_t lineOrder
 Line order. More...
 

Field Documentation

uint16_t lcdifv2_display_config_t::panelWidth
uint16_t lcdifv2_display_config_t::panelHeight
uint8_t lcdifv2_display_config_t::hsw
uint8_t lcdifv2_display_config_t::hfp
uint8_t lcdifv2_display_config_t::hbp
uint8_t lcdifv2_display_config_t::vsw
uint8_t lcdifv2_display_config_t::vfp
uint8_t lcdifv2_display_config_t::vbp
uint32_t lcdifv2_display_config_t::polarityFlags
lcdifv2_line_order_t lcdifv2_display_config_t::lineOrder
struct lcdifv2_buffer_config_t

Data Fields

uint16_t strideBytes
 Number of bytes between two vertically adjacent pixels, suggest 64-bit aligned. More...
 
lcdifv2_pixel_format_t pixelFormat
 Source buffer pixel format. More...
 

Field Documentation

uint16_t lcdifv2_buffer_config_t::strideBytes
lcdifv2_pixel_format_t lcdifv2_buffer_config_t::pixelFormat
struct lcdifv2_blend_config_t

Data Fields

uint8_t globalAlpha
 Global alpha value, only used when alphaMode is kLCDIFV2_AlphaOverride or kLCDIFV2_AlphaPoterDuff.
 
lcdifv2_alpha_mode_t alphaMode
 Alpha mode. More...
 
lcdifv2_pd_alpha_mode_t pdAlphaMode
 PoterDuff alpha mode, only used when alphaMode is kLCDIFV2_AlphaPoterDuff.
 
lcdifv2_pd_color_mode_t pdColorMode
 PoterDuff color mode, only used when alphaMode is kLCDIFV2_AlphaPoterDuff.
 
lcdifv2_pd_global_alpha_mode_t pdGlobalAlphaMode
 
            PoterDuff global alpha mode, only used when @ref alphaMode is

kLCDIFV2_AlphaPoterDuff

 
lcdifv2_pd_factor_mode_t pdFactorMode
 
 PoterDuff factor mode, only used when @ref alphaMode is @ref

kLCDIFV2_AlphaPoterDuff

 

Field Documentation

lcdifv2_alpha_mode_t lcdifv2_blend_config_t::alphaMode

Macro Definition Documentation

#define LCDIFV2_MAKE_FIFO_EMPTY_INTERRUPT (   layer)    (1U << ((uint32_t)(layer) + 24U))
#define LCDIFV2_MAKE_DMA_DONE_INTERRUPT (   layer)    (1U << ((uint32_t)(layer) + 16U))
#define LCDIFV2_MAKE_DMA_ERROR_INTERRUPT (   layer)    (1U << ((uint32_t)(layer) + 8U))

Enumeration Type Documentation

Enumerator
kLCDIFV2_VsyncActiveLow 

VSYNC active low.

kLCDIFV2_VsyncActiveHigh 

VSYNC active high.

kLCDIFV2_HsyncActiveLow 

HSYNC active low.

kLCDIFV2_HsyncActiveHigh 

HSYNC active high.

kLCDIFV2_DataEnableActiveLow 

Data enable line active low.

kLCDIFV2_DataEnableActiveHigh 

Data enable line active high.

kLCDIFV2_DriveDataOnFallingClkEdge 

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

kLCDIFV2_DriveDataOnRisingClkEdge 

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

kLCDIFV2_DataActiveLow 

Data active high.

kLCDIFV2_DataActiveHigh 

Data active high.

Enumerator
kLCDIFV2_Layer0FifoEmptyInterrupt 

Layer 0 FIFO empty.

kLCDIFV2_Layer1FifoEmptyInterrupt 

Layer 1 FIFO empty.

kLCDIFV2_Layer2FifoEmptyInterrupt 

Layer 2 FIFO empty.

kLCDIFV2_Layer3FifoEmptyInterrupt 

Layer 3 FIFO empty.

kLCDIFV2_Layer4FifoEmptyInterrupt 

Layer 4 FIFO empty.

kLCDIFV2_Layer5FifoEmptyInterrupt 

Layer 5 FIFO empty.

kLCDIFV2_Layer6FifoEmptyInterrupt 

Layer 6 FIFO empty.

kLCDIFV2_Layer7FifoEmptyInterrupt 

Layer 7 FIFO empty.

kLCDIFV2_Layer0DmaDoneInterrupt 

Layer 0 DMA done.

kLCDIFV2_Layer1DmaDoneInterrupt 

Layer 1 DMA done.

kLCDIFV2_Layer2DmaDoneInterrupt 

Layer 2 DMA done.

kLCDIFV2_Layer3DmaDoneInterrupt 

Layer 3 DMA done.

kLCDIFV2_Layer4DmaDoneInterrupt 

Layer 4 DMA done.

kLCDIFV2_Layer5DmaDoneInterrupt 

Layer 5 DMA done.

kLCDIFV2_Layer6DmaDoneInterrupt 

Layer 6 DMA done.

kLCDIFV2_Layer7DmaDoneInterrupt 

Layer 7 DMA done.

kLCDIFV2_Layer0DmaErrorInterrupt 

Layer 0 DMA error.

kLCDIFV2_Layer1DmaErrorInterrupt 

Layer 1 DMA error.

kLCDIFV2_Layer2DmaErrorInterrupt 

Layer 2 DMA error.

kLCDIFV2_Layer3DmaErrorInterrupt 

Layer 3 DMA error.

kLCDIFV2_Layer4DmaErrorInterrupt 

Layer 4 DMA error.

kLCDIFV2_Layer5DmaErrorInterrupt 

Layer 5 DMA error.

kLCDIFV2_Layer6DmaErrorInterrupt 

Layer 6 DMA error.

kLCDIFV2_Layer7DmaErrorInterrupt 

Layer 7 DMA error.

kLCDIFV2_VerticalBlankingInterrupt 

Start of vertical blanking period.

kLCDIFV2_OutputUnderrunInterrupt 

Output buffer underrun.

kLCDIFV2_VsyncEdgeInterrupt 

Interrupt at VSYNC edge.

Enumerator
kLCDIFV2_LineOrderRGB 

RGB.

kLCDIFV2_LineOrderRBG 

RBG.

kLCDIFV2_LineOrderGBR 

GBR.

kLCDIFV2_LineOrderGRB 

GRB.

kLCDIFV2_LineOrderBRG 

BRG.

kLCDIFV2_LineOrderBGR 

BGR.

Enumerator
kLCDIFV2_CscDisable 

Disable the CSC.

kLCDIFV2_CscYUV2RGB 

YUV to RGB.

kLCDIFV2_CscYCbCr2RGB 

YCbCr to RGB.

Enumerator
kLCDIFV2_PixelFormatIndex1BPP 

LUT index 1 bit.

kLCDIFV2_PixelFormatIndex2BPP 

LUT index 2 bit.

kLCDIFV2_PixelFormatIndex4BPP 

LUT index 4 bit.

kLCDIFV2_PixelFormatIndex8BPP 

LUT index 8 bit.

kLCDIFV2_PixelFormatRGB565 

RGB565, two pixels use 32 bits.

kLCDIFV2_PixelFormatARGB1555 

ARGB1555, two pixels use 32 bits.

kLCDIFV2_PixelFormatARGB4444 

ARGB4444, two pixels use 32 bits.

kLCDIFV2_PixelFormatUYVY 

UYVY, only layer 0 and layer 1 support this.

kLCDIFV2_PixelFormatVYUY 

VYUY, only layer 0 and layer 1 support this.

kLCDIFV2_PixelFormatYUYV 

YUYV, only layer 0 and layer 1 support this.

kLCDIFV2_PixelFormatYVYU 

YVYU, only layer 0 and layer 1 support this.

kLCDIFV2_PixelFormatRGB888 

RGB888 packed, one pixel uses 24 bits.

kLCDIFV2_PixelFormatARGB8888 

ARGB8888 unpacked, one pixel uses 32 bits.

kLCDIFV2_PixelFormatABGR8888 

ABGR8888 unpacked, one pixel uses 32 bits.

Enumerator
kLCDIFV2_AlphaDisable 

Disable alpha blend.

kLCDIFV2_AlphaOverride 

Use the gobal alpha value, pixel defined alpha value is overridden.

kLCDIFV2_AlphaEmbedded 

Use the pixel defined alpha value.

kLCDIFV2_AlphaPoterDuff 

Use the PoterDuff alpha blending.

Enumerator
kLCDIFV2_PD_AlphaStraight 

Straight mode.

kLCDIFV2_PD_AlphaInversed 

Inversed mode.

Enumerator
kLCDIFV2_PD_ColorNoAlpha 

Output color directly.

kLCDIFV2_PD_ColorWithAlpha 

Output color multiples alpha.

Enumerator
kLCDIFV2_PD_GlobalAlpha 

Use global alpha.

kLCDIFV2_PD_LocalAlpha 

Use local alpha.

kLCDIFV2_PD_ScaledAlpha 

Use scaled alpha.

Enumerator
kLCDIFV2_PD_FactorOne 

Use 1.

kLCDIFV2_PD_FactorZero 

Use 0.

kLCDIFV2_PD_FactorStraightAlpha 

Use straight alpha.

kLCDIFV2_PD_FactorInversedAlpha 

Use inversed alpha.

Note: Don't change the enum item value

Enumerator
kLCDIFV2_PD_Src 

Source Only.

kLCDIFV2_PD_Atop 

Source Atop.

kLCDIFV2_PD_Over 

Source Over.

kLCDIFV2_PD_In 

Source In.

kLCDIFV2_PD_Out 

Source Out.

kLCDIFV2_PD_Dst 

Destination Only.

kLCDIFV2_PD_DstAtop 

Destination Atop.

kLCDIFV2_PD_DstOver 

Destination Over.

kLCDIFV2_PD_DstIn 

Destination In.

kLCDIFV2_PD_DstOut 

Destination Out.

kLCDIFV2_PD_Xor 

XOR.

kLCDIFV2_PD_Clear 

Clear.

kLCDIFV2_PD_Max 

Used for boarder detection.

Note: Don't change the enum item value

Enumerator
kLCDIFV2_PD_SrcLayer 

Source layer.

kLCDIFV2_PD_DestLayer 

Destination layer.

kLCDIFV2_PD_LayerMax 

Used for boarder detection.

Function Documentation

void LCDIFV2_Init ( LCDIFV2_Type *  base)

This function ungates the LCDIF v2 clock and release the peripheral reset.

Parameters
baseLCDIF v2 peripheral base address.
void LCDIFV2_Deinit ( LCDIFV2_Type *  base)
Parameters
baseLCDIF peripheral base address.
void LCDIFV2_Reset ( LCDIFV2_Type *  base)
Parameters
baseLCDIF peripheral base address.
status_t LCDIFV2_GetPorterDuffConfig ( lcdifv2_pd_blend_mode_t  mode,
lcdifv2_pd_layer_t  layer,
lcdifv2_blend_config_t config 
)

This function sets the configuration structure to default values. The default configuration is set to the following values.

config->panelWidth = 0U;
config->panelHeight = 0U;
config->hsw = 3U;
config->hfp = 3U;
config->hbp = 3U;
config->vsw = 3U;
config->vfp = 3U;
config->vbp = 3U;
config->lineOrder = kLCDIFV2_LineOrderRGB;
@code
*
* @param config Pointer to the LCDIF configuration structure.
*/
void LCDIFV2_DisplayGetDefaultConfig(lcdifv2_display_config_t *config);
void LCDIFV2_SetDisplayConfig(LCDIFV2_Type *base, const lcdifv2_display_config_t *config);
static inline void LCDIFV2_EnableDisplay(LCDIFV2_Type *base, bool enable)
{
if (enable)
{
base->DISP_PARA |= LCDIFV2_DISP_PARA_DISP_ON_MASK;
}
else
{
base->DISP_PARA &= ~LCDIFV2_DISP_PARA_DISP_ON_MASK;
}
}
/* @} */
static inline void LCDIFV2_EnableInterrupts(LCDIFV2_Type *base, uint8_t domain, uint32_t mask)
{
base->INT[domain].INT_ENABLE |= mask;
}
static inline void LCDIFV2_DisableInterrupts(LCDIFV2_Type *base, uint8_t domain, uint32_t mask)
{
base->INT[domain].INT_ENABLE &= ~mask;
}
static inline uint32_t LCDIFV2_GetInterruptStatus(LCDIFV2_Type *base, uint8_t domain)
{
return base->INT[domain].INT_STATUS;
}
static inline void LCDIFV2_ClearInterruptStatus(LCDIFV2_Type *base, uint8_t domain, uint32_t mask)
{
base->INT[domain].INT_STATUS = mask;
}
/* @} */
status_t LCDIFV2_SetLut(
LCDIFV2_Type *base, uint8_t layerIndex, const uint32_t *lutData, uint16_t count, bool useShadowLoad);
/* @} */
static inline void LCDIFV2_SetLayerSize(LCDIFV2_Type *base, uint8_t layerIndex, uint16_t width, uint16_t height)
{
base->LAYER[layerIndex].CTRLDESCL1 =
((uint32_t)height << LCDIFV2_CTRLDESCL1_HEIGHT_SHIFT) | ((uint32_t)width << LCDIFV2_CTRLDESCL1_WIDTH_SHIFT);
}
static inline void LCDIFV2_SetLayerOffset(LCDIFV2_Type *base, uint8_t layerIndex, uint16_t offsetX, uint16_t offsetY)
{
base->LAYER[layerIndex].CTRLDESCL2 =
((uint32_t)offsetX << LCDIFV2_CTRLDESCL2_POSX_SHIFT) | ((uint32_t)offsetY << LCDIFV2_CTRLDESCL2_POSY_SHIFT);
}
void LCDIFV2_SetLayerBufferConfig(LCDIFV2_Type *base, uint8_t layerIndex, const lcdifv2_buffer_config_t *config);
static inline void LCDIFV2_SetLayerBufferAddr(LCDIFV2_Type *base, uint8_t layerIndex, uint32_t addr)
{
base->LAYER[layerIndex].CTRLDESCL4 = addr;
}
static inline void LCDIFV2_EnableLayer(LCDIFV2_Type *base, uint8_t layerIndex, bool enable)
{
if (enable)
{
base->LAYER[layerIndex].CTRLDESCL5 |= LCDIFV2_CTRLDESCL5_EN_MASK;
}
else
{
base->LAYER[layerIndex].CTRLDESCL5 &= ~LCDIFV2_CTRLDESCL5_EN_MASK;
}
}
static inline void LCDIFV2_TriggerLayerShadowLoad(LCDIFV2_Type *base, uint8_t layerIndex)
{
base->LAYER[layerIndex].CTRLDESCL5 |= LCDIFV2_CTRLDESCL5_SHADOW_LOAD_EN_MASK;
}
static inline void LCDIFV2_SetLayerBackGroundColor(LCDIFV2_Type *base, uint8_t layerIndex, uint32_t backGroundColor)
{
base->LAYER[layerIndex].CTRLDESCL6 = backGroundColor;
}
void LCDIFV2_SetLayerBlendConfig(LCDIFV2_Type *base, uint8_t layerIndex, const lcdifv2_blend_config_t *config);
void LCDIFV2_SetCscMode(LCDIFV2_Type *base, uint8_t layerIndex, lcdifv2_csc_mode_t mode);
/* @} */

This is the basic Porter Duff blend configuration, user still could modify the configurations after this function.

Parameters
modePorter Duff blend mode.
layerThe configuration for source layer or destination layer.
configPointer to the configuration.
Return values
kStatus_SuccessGet the configuration successfully.
kStatus_InvalidArgumentThe argument is invalid.