MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
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 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.
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... | |
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... | |
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... | |
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... | |
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 | |
lcdifv2_pd_factor_mode_t | pdFactorMode |
PoterDuff factor mode, only used when @ref alphaMode is @ref kLCDIFV2_AlphaPoterDuff | |
lcdifv2_alpha_mode_t lcdifv2_blend_config_t::alphaMode |
#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)) |
enum _lcdifv2_interrupt |
enum lcdifv2_line_order_t |
enum lcdifv2_csc_mode_t |
enum lcdifv2_alpha_mode_t |
Note: Don't change the enum item value
enum lcdifv2_pd_layer_t |
void LCDIFV2_Init | ( | LCDIFV2_Type * | base | ) |
This function ungates the LCDIF v2 clock and release the peripheral reset.
base | LCDIF v2 peripheral base address. |
void LCDIFV2_Deinit | ( | LCDIFV2_Type * | base | ) |
base | LCDIF peripheral base address. |
void LCDIFV2_Reset | ( | LCDIFV2_Type * | base | ) |
base | LCDIF 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.
This is the basic Porter Duff blend configuration, user still could modify the configurations after this function.
mode | Porter Duff blend mode. |
layer | The configuration for source layer or destination layer. |
config | Pointer to the configuration. |
kStatus_Success | Get the configuration successfully. |
kStatus_InvalidArgument | The argument is invalid. |