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
|
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)
} |
| LCDIF v2 pixel format. More...
|
|
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...
|
|
|
status_t | LCDIFV2_SetLut (LCDIFV2_Type *base, uint8_t layerIndex, const uint32_t *lutData, uint16_t count, bool useShadowLoad) |
| Set the LUT data. More...
|
|
|
static void | LCDIFV2_SetLayerSize (LCDIFV2_Type *base, uint8_t layerIndex, uint16_t width, uint16_t height) |
| Set the layer dimension. More...
|
|
static void | LCDIFV2_SetLayerOffset (LCDIFV2_Type *base, uint8_t layerIndex, uint16_t offsetX, uint16_t offsetY) |
| Set the layer position in output frame. More...
|
|
void | LCDIFV2_SetLayerBufferConfig (LCDIFV2_Type *base, uint8_t layerIndex, const lcdifv2_buffer_config_t *config) |
| Set the layer source buffer configuration. More...
|
|
static void | LCDIFV2_SetLayerBufferAddr (LCDIFV2_Type *base, uint8_t layerIndex, uint32_t addr) |
| Set the layer source buffer address. More...
|
|
static void | LCDIFV2_EnableLayer (LCDIFV2_Type *base, uint8_t layerIndex, bool enable) |
| Enable or disable the layer. More...
|
|
static void | LCDIFV2_TriggerLayerShadowLoad (LCDIFV2_Type *base, uint8_t layerIndex) |
| Trigger the layer configuration shadow load. More...
|
|
static void | LCDIFV2_SetLayerBackGroundColor (LCDIFV2_Type *base, uint8_t layerIndex, uint32_t backGroundColor) |
| Set the layer back ground color. More...
|
|
void | LCDIFV2_SetLayerBlendConfig (LCDIFV2_Type *base, uint8_t layerIndex, const lcdifv2_blend_config_t *config) |
| Set the layer alpha blend mode. More...
|
|
void | LCDIFV2_SetCscMode (LCDIFV2_Type *base, uint8_t layerIndex, lcdifv2_csc_mode_t mode) |
| Set the color space conversion mode. More...
|
|
struct lcdifv2_display_config_t |
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 |
struct lcdifv2_buffer_config_t |
uint16_t lcdifv2_buffer_config_t::strideBytes |
struct lcdifv2_blend_config_t |
#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)) |
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.
|
void LCDIFV2_Init |
( |
LCDIFV2_Type * |
base | ) |
|
This function ungates the LCDIF v2 clock and release the peripheral reset.
- Parameters
-
base | LCDIF v2 peripheral base address. |
void LCDIFV2_Deinit |
( |
LCDIFV2_Type * |
base | ) |
|
- Parameters
-
base | LCDIF peripheral base address. |
void LCDIFV2_Reset |
( |
LCDIFV2_Type * |
base | ) |
|
- Parameters
-
base | LCDIF peripheral base address. |
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;
- Parameters
-
config | Pointer to the LCDIF configuration structure. |
- Parameters
-
base | LCDIF peripheral base address. |
config | Pointer to the LCDIF configuration structure. |
static void LCDIFV2_EnableDisplay |
( |
LCDIFV2_Type * |
base, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIF peripheral base address. |
enable | Enable or disable. |
static void LCDIFV2_EnableInterrupts |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
domain, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIF peripheral base address. |
domain | CPU domain the interrupt signal routed to. |
mask | interrupt source, OR'ed value of _lcdifv2_interrupt. |
static void LCDIFV2_DisableInterrupts |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
domain, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIF peripheral base address. |
domain | CPU domain the interrupt signal routed to. |
mask | interrupt source, OR'ed value of _lcdifv2_interrupt. |
static uint32_t LCDIFV2_GetInterruptStatus |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
domain |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIF peripheral base address. |
domain | CPU domain the interrupt signal routed to. |
- Returns
- Interrupt pending status, OR'ed value of _lcdifv2_interrupt.
static void LCDIFV2_ClearInterruptStatus |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
domain, |
|
|
uint32_t |
mask |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIF peripheral base address. |
domain | CPU domain the interrupt signal routed to. |
mask | of the flags to clear, OR'ed value of _lcdifv2_interrupt. |
status_t LCDIFV2_SetLut |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
const uint32_t * |
lutData, |
|
|
uint16_t |
count, |
|
|
bool |
useShadowLoad |
|
) |
| |
This function sets the specific layer LUT data, if useShadowLoad
is true, call LCDIFV2_TriggerLayerShadowLoad after this function, the LUT will be loaded to the hardware during next vertical blanking period. If useShadowLoad
is false, the LUT data is loaded to hardware directly.
- Parameters
-
base | LCDIF v2 peripheral base address. |
layerIndex | Which layer to set. |
lutData | The LUT data to load. |
count | Count of lutData . |
useShadowLoad | Use shadow load. |
- Return values
-
kStatus_Success | Set success. |
kStatus_Fail | Previous LUT data is not loaded to hardware yet. |
static void LCDIFV2_SetLayerSize |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
uint16_t |
width, |
|
|
uint16_t |
height |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
width | Layer width in pixel. |
height | Layer height. |
- Note
- The layer width must be in multiples of the number of pixels that can be stored in 32 bits
static void LCDIFV2_SetLayerOffset |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
uint16_t |
offsetX, |
|
|
uint16_t |
offsetY |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
offsetX | Horizontal offset, start from 0. |
offsetY | Vertical offset, start from 0. |
void LCDIFV2_SetLayerBufferConfig |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
const lcdifv2_buffer_config_t * |
config |
|
) |
| |
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
config | Pointer to the configuration. |
static void LCDIFV2_SetLayerBufferAddr |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
uint32_t |
addr |
|
) |
| |
|
inlinestatic |
This function is used for fast runtime source buffer change.
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
addr | The new source buffer address passed to the layer, should be 64-bit aligned. |
static void LCDIFV2_EnableLayer |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
bool |
enable |
|
) |
| |
|
inlinestatic |
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
enable | Pass in true to enable, false to disable. |
static void LCDIFV2_TriggerLayerShadowLoad |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex |
|
) |
| |
|
inlinestatic |
The new layer configurations are written to the shadow registers first, When all configurations written finished, call this function, then shadowed control registers are updated to the active control registers on VSYNC of next frame.
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Layer layerIndex. |
static void LCDIFV2_SetLayerBackGroundColor |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
uint32_t |
backGroundColor |
|
) |
| |
|
inlinestatic |
The back ground color is used when layer not actived.
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Index of the layer. |
backGroundColor | Background color to use when this layer is not active. |
void LCDIFV2_SetLayerBlendConfig |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
const lcdifv2_blend_config_t * |
config |
|
) |
| |
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Index of the CSC unit. |
config | Pointer to the blend configuration. |
void LCDIFV2_SetCscMode |
( |
LCDIFV2_Type * |
base, |
|
|
uint8_t |
layerIndex, |
|
|
lcdifv2_csc_mode_t |
mode |
|
) |
| |
Supports YUV2RGB and YCbCr2RGB.
- Parameters
-
base | LCDIFv2 peripheral base address. |
layerIndex | Index of the layer. |
mode | The conversion mode. |
This function gets the blend configuration for Porter Duff blend, config->pdFactorMode is set according to layer
and mode
, other blend configurations are set to:
config->pdColorMode = kLCDIFV2_PD_ColorStraight;
This is the basic Porter Duff blend configuration, user still could modify the configurations after this function.
- Parameters
-
mode | Porter Duff blend mode. |
layer | The configuration for source layer or destination layer. |
config | Pointer to the configuration. |
- Return values
-
kStatus_Success | Get the configuration successfully. |
kStatus_InvalidArgument | The argument is invalid. |