MT2523 API Reference  LinkIt SDK v4
DISPLAY_LCD

This section introduces the LCD APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, LCD function groups, all enumerations, structures and functions. More...

Overview

This section introduces the LCD APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, LCD function groups, all enumerations, structures and functions.

DSI is an optional output interface for the LCD engine. Add the compile option #define HAL_DISPLAY_DSI_MODULE_ENABLED in hal_feature_config.h to enable the DSI engine.

Terms and acronyms

Terms Details
ROI Region of Interest, indicates the region to be transferred, including width and height.
DMA Direct Memory Access, the data can be accessed through the LCD engine without CPU. For more information, please refer to Direct memory access in Wikipedia.
TE Synchronize signals sent from LCM to LCD engine to prevent tearing effect (TE).
DSI The Display Serial Interface (DSI) is a specification by the Mobile Industry Processor Interface (MIPI). For more information, please refer ro Display Serial Interface in Wikipedia.
MTCMOS Multi-threshold CMOS is a variation of CMOS chip technology that has transistors with multiple threshold voltages (Vth) in order to optimize delay or power. For more information, please refer toMulti-threshold CMOS in Wikipedia.

Supported features

How to use this driver

Enumerations

enum  hal_display_lcd_layer_rotate_t {
  HAL_DISPLAY_LCD_LAYER_ROTATE_0 = 0x0,
  HAL_DISPLAY_LCD_LAYER_ROTATE_90 = 0x1,
  HAL_DISPLAY_LCD_LAYER_ROTATE_180 = 0x2,
  HAL_DISPLAY_LCD_LAYER_ROTATE_270 = 0x3,
  HAL_DISPLAY_LCD_LAYER_ROTATE_0_FLIP = 0x4,
  HAL_DISPLAY_LCD_LAYER_ROTATE_90_FLIP = 0x5,
  HAL_DISPLAY_LCD_LAYER_ROTATE_180_FLIP = 0x6,
  HAL_DISPLAY_LCD_LAYER_ROTATE_270_FLIP = 0x7,
  HAL_DISPLAY_LCD_LAYER_ROTATE_NUM
}
 The layer rotation degree. More...
 
enum  hal_display_lcd_status_t {
  HAL_DISPLAY_LCD_STATUS_INITIALIZATION_FAILED = -8,
  HAL_DISPLAY_LCD_STATUS_COLOR_INITIALIZATION_FAILED = -7,
  HAL_DISPLAY_LCD_STATUS_DSI_INITIALIZATION_FAILED = -6,
  HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER = -5,
  HAL_DISPLAY_LCD_STATUS_COLOR_INVALID_PARAMETER = -4,
  HAL_DISPLAY_LCD_STATUS_DSI_INVALID_PARAMETER = -3,
  HAL_DISPLAY_LCD_STATUS_POWER_FAILED = -2,
  HAL_DISPLAY_LCD_STATUS_ERROR = -1,
  HAL_DISPLAY_LCD_STATUS_OK = 0
}
 The return status of display LCD API. More...
 
enum  hal_display_lcd_interface_width_t {
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_8 = 0,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_9,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_16,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_18,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_24,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_32,
  HAL_DISPLAY_LCD_INTERFACE_WIDTH_NUM
}
 The serial interface width options. More...
 
enum  hal_display_lcd_interface_2pin_width_t {
  HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_16 = 2,
  HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_18 = 3,
  HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_24 = 4,
  HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_12 = 6,
  HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_NUM
}
 The serial interface width options for the 2-data lane mode. More...
 
enum  hal_display_lcd_interface_start_byte_width_t {
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_8 = 0,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_9,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_16,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_18,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_24,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_32,
  HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_NUM
}
 The starting byte width options. More...
 
enum  hal_display_lcd_interface_clock_t {
  HAL_DISPLAY_LCD_INTERFACE_CLOCK_124MHZ = 0,
  HAL_DISPLAY_LCD_INTERFACE_CLOCK_104MHZ = 1,
  HAL_DISPLAY_LCD_INTERFACE_CLOCK_91MHZ = 2,
  HAL_DISPLAY_LCD_INTERFACE_CLOCK_26MHZ = 3,
  HAL_DISPLAY_LCD_INTERFACE_CLOCK_RSVD = 4
}
 The input clock speed options for the LCD engine. More...
 
enum  hal_display_lcd_layer_source_color_format_t {
  HAL_DISPLAY_LCD_LAYER_COLOR_8BPP_INDEX = 0,
  HAL_DISPLAY_LCD_LAYER_COLOR_RGB565,
  HAL_DISPLAY_LCD_LAYER_COLOR_UYVY422,
  HAL_DISPLAY_LCD_LAYER_COLOR_RGB888,
  HAL_DISPLAY_LCD_LAYER_COLOR_ARGB8888,
  HAL_DISPLAY_LCD_LAYER_COLOR_PARGB8888,
  HAL_DISPLAY_LCD_LAYER_COLOR_XRGB,
  HAL_DISPLAY_LCD_LAYER_COLOR_ARGB6666,
  HAL_DISPLAY_LCD_LAYER_COLOR_PARGB6666,
  HAL_DISPLAY_LCD_LAYER_COLOR_4BIT_INDEX,
  HAL_DISPLAY_LCD_LAYER_COLOR_2BIT_INDEX,
  HAL_DISPLAY_LCD_LAYER_COLOR_1BIT_INDEX,
  HAL_DISPLAY_LCD_LAYER_COLOR_NUM
}
 The color formats of the input layer. More...
 
enum  hal_display_lcd_output_color_format_t {
  HAL_DISPLAY_LCD_ROI_OUTPUT_RGB332 = 0,
  HAL_DISPLAY_LCD_ROI_OUTPUT_RGB444,
  HAL_DISPLAY_LCD_ROI_OUTPUT_RGB565,
  HAL_DISPLAY_LCD_ROI_OUTPUT_RGB666,
  HAL_DISPLAY_LCD_ROI_OUTPUT_RGB888,
  HAL_DISPLAY_LCD_ROI_OUTPUT_NUM
}
 The output color format to the LCM. More...
 
enum  hal_display_lcd_layer_t {
  HAL_DISPLAY_LCD_LAYER0 = 0,
  HAL_DISPLAY_LCD_LAYER1,
  HAL_DISPLAY_LCD_LAYER2,
  HAL_DISPLAY_LCD_LAYER3,
  HAL_DISPLAY_LCD_LAYER_NUM
}
 The layers. More...
 
enum  hal_display_lcd_driving_current_t {
  HAL_DISPLAY_LCD_DRIVING_CURRENT_4MA = 0,
  HAL_DISPLAY_LCD_DRIVING_CURRENT_8MA,
  HAL_DISPLAY_LCD_DRIVING_CURRENT_12MA,
  HAL_DISPLAY_LCD_DRIVING_CURRENT_16MA,
  HAL_DISPLAY_LCD_DRIVING_CURRENT_NUM
}
 The driving current options. More...
 
enum  hal_display_lcd_power_domain_t {
  HAL_DISPLAY_LCD_POWER_DOMAIN_1V8 = 0,
  HAL_DISPLAY_LCD_POWER_DOMAIN_2V8,
  HAL_DISPLAY_LCD_POWER_DOMAIN_NUM
}
 Power domain voltage options of the output pin. More...
 
enum  hal_display_lcd_interface_port_t {
  HAL_DISPLAY_LCD_INTERFACE_SERIAL_0 = 0,
  HAL_DISPLAY_LCD_INTERFACE_SERIAL_1,
  HAL_DISPLAY_LCD_INTERFACE_NUM
}
 The output ports of serial interface. More...
 

Functions

hal_display_lcd_status_t hal_display_lcd_init (uint32_t main_command_address, uint32_t main_data_address, uint32_t main_lcd_output_format)
 This function initializes the LCD engine's hardware registers. More...
 
hal_display_lcd_status_t hal_display_lcd_set_interface_timing (hal_display_lcd_interface_timing_t timing_settings)
 This function sets the timing configuration to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_set_interface_mode (hal_display_lcd_interface_mode_t mode_settings)
 This function sets the serial interface mode configuration to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_set_interface_2data_lane_mode (hal_display_lcd_interface_port_t port, bool flag, hal_display_lcd_interface_2pin_width_t two_data_width)
 This function sets the serial interface 2-data lane mode configuration to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_config_layer (hal_display_lcd_layer_input_t *layer_data)
 This function sets the layer information to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_config_roi (hal_display_lcd_roi_output_t *roi_settings)
 This function sets the ROI settings to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_config_start_byte (hal_display_lcd_interface_start_byte_mode_t *start_byte_settings)
 This function sets the start byte mode's settings to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_set_index_color_table (uint32_t *index_table)
 This function sets the index color table settings to the LCD engine. More...
 
hal_display_lcd_callback_t hal_display_lcd_register_callback (hal_display_lcd_callback_t lcd_callback)
 This function sets the callback function when the LCD DMA transfer is complete. More...
 
hal_display_lcd_status_t hal_display_lcd_init_te (uint32_t frame_rate, uint32_t back_porch, uint32_t front_porch, uint32_t width, uint32_t height, uint32_t main_lcd_output)
 This function sets the TE settings to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_calculate_te (uint32_t width, uint32_t height)
 This function calculates the delay lines and sets the delay lines to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_toggle_reset (uint32_t low_time, uint32_t high_time)
 This function produces a reset waveform and reset the LCM. More...
 
hal_display_lcd_status_t hal_display_lcd_start_dma (bool wait_te)
 This function starts the LCD engine transfer in DMA mode. More...
 
uint32_t hal_display_lcd_get_layer_address (hal_display_lcd_layer_t layer)
 This function gets the address to the layer buffer. More...
 
void hal_display_lcd_restore_callback (void)
 This function executes the restore functions when exiting from deep sleep. More...
 
hal_display_lcd_status_t hal_display_lcd_turn_on_mtcmos (void)
 This function turns on the MTCMOS. More...
 
hal_display_lcd_status_t hal_display_lcd_turn_off_mtcmos (void)
 This function turns off the MTCMOS. More...
 
hal_display_lcd_status_t hal_display_lcd_set_clock (hal_display_lcd_interface_clock_t clock)
 This function sets the input clock of the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_apply_setting (void)
 This function applies all settings to the LCD engine. More...
 
hal_display_lcd_status_t hal_display_lcd_set_layer_to_default (void)
 This function resets the layer to default settings after updating the screen. More...
 

Modules

 Struct
 
 Typedef
 

Enumeration Type Documentation

The driving current options.

Enumerator
HAL_DISPLAY_LCD_DRIVING_CURRENT_4MA 

4mA.

HAL_DISPLAY_LCD_DRIVING_CURRENT_8MA 

8mA.

HAL_DISPLAY_LCD_DRIVING_CURRENT_12MA 

12mA.

HAL_DISPLAY_LCD_DRIVING_CURRENT_16MA 

16mA.

HAL_DISPLAY_LCD_DRIVING_CURRENT_NUM 

The number of driving current options (invalid driving current).

The serial interface width options for the 2-data lane mode.

Enumerator
HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_16 

16 bits.

HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_18 

18 bits.

HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_24 

24 bits.

HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_12 

12 bits.

HAL_DISPLAY_LCD_INTERFACE_2PIN_WIDTH_NUM 

The number of width selections (invalid width).

The input clock speed options for the LCD engine.

Enumerator
HAL_DISPLAY_LCD_INTERFACE_CLOCK_124MHZ 

124MHz.

HAL_DISPLAY_LCD_INTERFACE_CLOCK_104MHZ 

104MHz.

HAL_DISPLAY_LCD_INTERFACE_CLOCK_91MHZ 

91MHz.

HAL_DISPLAY_LCD_INTERFACE_CLOCK_26MHZ 

26MHz.

HAL_DISPLAY_LCD_INTERFACE_CLOCK_RSVD 

Reserved (invalid clock speed).

The output ports of serial interface.

Enumerator
HAL_DISPLAY_LCD_INTERFACE_SERIAL_0 

The output port is serial 0.

HAL_DISPLAY_LCD_INTERFACE_SERIAL_1 

The output port is serial 1.

HAL_DISPLAY_LCD_INTERFACE_NUM 

The number of output ports (invalid output ports).

The starting byte width options.

Enumerator
HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_8 

8 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_9 

9 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_16 

16 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_18 

18 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_24 

24 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_32 

32 bits.

HAL_DISPLAY_LCD_INTERFACE_START_BYTE_WIDTH_NUM 

The number of the width selections (invalid width).

The serial interface width options.

Enumerator
HAL_DISPLAY_LCD_INTERFACE_WIDTH_8 

8 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_9 

9 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_16 

16 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_18 

18 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_24 

24 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_32 

32 bits.

HAL_DISPLAY_LCD_INTERFACE_WIDTH_NUM 

The number of the width selections (invalid width).

The layer rotation degree.

Enumerator
HAL_DISPLAY_LCD_LAYER_ROTATE_0 

0 degree.

HAL_DISPLAY_LCD_LAYER_ROTATE_90 

90 degrees.

HAL_DISPLAY_LCD_LAYER_ROTATE_180 

180 degrees.

HAL_DISPLAY_LCD_LAYER_ROTATE_270 

270 degrees.

HAL_DISPLAY_LCD_LAYER_ROTATE_0_FLIP 

0 degree rotation and flip.

HAL_DISPLAY_LCD_LAYER_ROTATE_90_FLIP 

90 degrees rotation and flip.

HAL_DISPLAY_LCD_LAYER_ROTATE_180_FLIP 

180 degrees rotation and flip.

HAL_DISPLAY_LCD_LAYER_ROTATE_270_FLIP 

270 degrees rotation and flip.

HAL_DISPLAY_LCD_LAYER_ROTATE_NUM 

The number of layer rotation options (invalid layer rotation).

The color formats of the input layer.

Enumerator
HAL_DISPLAY_LCD_LAYER_COLOR_8BPP_INDEX 

8 bits per pixel index mode.

HAL_DISPLAY_LCD_LAYER_COLOR_RGB565 

RGB565.

HAL_DISPLAY_LCD_LAYER_COLOR_UYVY422 

YUV422.

HAL_DISPLAY_LCD_LAYER_COLOR_RGB888 

RGB888.

HAL_DISPLAY_LCD_LAYER_COLOR_ARGB8888 

ARGB8888.

HAL_DISPLAY_LCD_LAYER_COLOR_PARGB8888 

PARGB8888.

HAL_DISPLAY_LCD_LAYER_COLOR_XRGB 

XRGB.

HAL_DISPLAY_LCD_LAYER_COLOR_ARGB6666 

ARGB6666.

HAL_DISPLAY_LCD_LAYER_COLOR_PARGB6666 

PARGB6666.

HAL_DISPLAY_LCD_LAYER_COLOR_4BIT_INDEX 

4 bits per pixel index mode.

HAL_DISPLAY_LCD_LAYER_COLOR_2BIT_INDEX 

2 bits per pixel index mode.

HAL_DISPLAY_LCD_LAYER_COLOR_1BIT_INDEX 

1 bit per pixel index mode.

HAL_DISPLAY_LCD_LAYER_COLOR_NUM 

The number of the color formats (invalid color format).

The layers.

Enumerator
HAL_DISPLAY_LCD_LAYER0 

Layer 0.

HAL_DISPLAY_LCD_LAYER1 

Layer 1.

HAL_DISPLAY_LCD_LAYER2 

Layer 2.

HAL_DISPLAY_LCD_LAYER3 

Layer 3.

HAL_DISPLAY_LCD_LAYER_NUM 

The number of layers (invalid layer).

The output color format to the LCM.

Enumerator
HAL_DISPLAY_LCD_ROI_OUTPUT_RGB332 

RGB332.

HAL_DISPLAY_LCD_ROI_OUTPUT_RGB444 

RGB444.

HAL_DISPLAY_LCD_ROI_OUTPUT_RGB565 

RGB565.

HAL_DISPLAY_LCD_ROI_OUTPUT_RGB666 

RGB666.

HAL_DISPLAY_LCD_ROI_OUTPUT_RGB888 

RGB888.

HAL_DISPLAY_LCD_ROI_OUTPUT_NUM 

The number of output color formats (invalid color format).

Power domain voltage options of the output pin.

Enumerator
HAL_DISPLAY_LCD_POWER_DOMAIN_1V8 

1.8V.

HAL_DISPLAY_LCD_POWER_DOMAIN_2V8 

2.8V.

HAL_DISPLAY_LCD_POWER_DOMAIN_NUM 

The number of power domains (invalid power domain).

The return status of display LCD API.

Enumerator
HAL_DISPLAY_LCD_STATUS_INITIALIZATION_FAILED 

The LCD initialization failed.

HAL_DISPLAY_LCD_STATUS_COLOR_INITIALIZATION_FAILED 

The color initialization failed.

HAL_DISPLAY_LCD_STATUS_DSI_INITIALIZATION_FAILED 

The DSI initialization failed.

HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER 

Invalid parameter.

HAL_DISPLAY_LCD_STATUS_COLOR_INVALID_PARAMETER 

Invalid color parameter.

HAL_DISPLAY_LCD_STATUS_DSI_INVALID_PARAMETER 

Invalid DSI parameter.

HAL_DISPLAY_LCD_STATUS_POWER_FAILED 

Failed to apply display power settings.

HAL_DISPLAY_LCD_STATUS_ERROR 

An error occurred; please check the LCD engine status.

HAL_DISPLAY_LCD_STATUS_OK 

Successful.

Function Documentation

hal_display_lcd_status_t hal_display_lcd_apply_setting ( void  )

This function applies all settings to the LCD engine.

To save power, keep the MTCMOS mostly turned off. During the screen update, turn the MTCMOS on and then apply all settings to the LCD engine to ensure the parameters are set to the LCD engine.

Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_ERROR, the operation has failed.
hal_display_lcd_status_t hal_display_lcd_calculate_te ( uint32_t  width,
uint32_t  height 
)

This function calculates the delay lines and sets the delay lines to the LCD engine.

Parameters
[in]widthis the width of the LCM.
[in]heightis the height of the LCM.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_config_layer ( hal_display_lcd_layer_input_t layer_data)

This function sets the layer information to the LCD engine.

Parameters
[in]layer_datais the layer information, please refer to hal_display_lcd_layer_input_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_config_roi ( hal_display_lcd_roi_output_t roi_settings)

This function sets the ROI settings to the LCD engine.

Parameters
[in]roi_settingsare the roi settings, please refer to hal_display_lcd_roi_output_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_config_start_byte ( hal_display_lcd_interface_start_byte_mode_t start_byte_settings)

This function sets the start byte mode's settings to the LCD engine.

Parameters
[in]start_byte_settingsare the start byte settings, please refer to hal_display_lcd_interface_start_byte_mode_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
uint32_t hal_display_lcd_get_layer_address ( hal_display_lcd_layer_t  layer)

This function gets the address to the layer buffer.

Parameters
[in]layeris the layer to return the address for.
Returns
The address to the specific layer.
hal_display_lcd_status_t hal_display_lcd_init ( uint32_t  main_command_address,
uint32_t  main_data_address,
uint32_t  main_lcd_output_format 
)

This function initializes the LCD engine's hardware registers.

It sets the default values of the LCD engine.

Parameters
[in]main_command_addressis the register address to be written when sending a command to the LCM.
[in]main_data_addressis the register address to be written when sending data to the LCM.
[in]main_lcd_output_formatis the output color format that the LCD engine sends to the LCM.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INITIALIZATION_FAILED, the LCD engine's registers failed to initialize. Call hal_display_lcd_turn_on_mtcmos() before initializing the LCD engine's registers. HAL_DISPLAY_LCD_STATUS_COLOR_INITIALIZATION_FAILED, the color engine's registers failed to initialize. Call hal_display_lcd_turn_on_mtcmos() before initializing the color engine's registers.
hal_display_lcd_status_t hal_display_lcd_init_te ( uint32_t  frame_rate,
uint32_t  back_porch,
uint32_t  front_porch,
uint32_t  width,
uint32_t  height,
uint32_t  main_lcd_output 
)

This function sets the TE settings to the LCD engine.

Parameters
[in]frame_rateis the frame rate of the LCM self-refresh.
[in]back_porchis the line number of the back porch.
[in]front_porchis the line number of the front porch.
[in]widthis the width of the LCM.
[in]heightis the height of the LCM.
[in]main_lcd_outputis the LCD output format, please refer to hal_display_lcd_output_color_format_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_callback_t hal_display_lcd_register_callback ( hal_display_lcd_callback_t  lcd_callback)

This function sets the callback function when the LCD DMA transfer is complete.

Parameters
[in]lcd_callbackrepresents the callback function.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
void hal_display_lcd_restore_callback ( void  )

This function executes the restore functions when exiting from deep sleep.

Returns
None.
hal_display_lcd_status_t hal_display_lcd_set_clock ( hal_display_lcd_interface_clock_t  clock)

This function sets the input clock of the LCD engine.

Parameters
[in]clockspecifies the speed of input clock of the LCD engine.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_set_index_color_table ( uint32_t *  index_table)

This function sets the index color table settings to the LCD engine.

Parameters
[in]index_tablespecifies the color mapping table.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_set_interface_2data_lane_mode ( hal_display_lcd_interface_port_t  port,
bool  flag,
hal_display_lcd_interface_2pin_width_t  two_data_width 
)

This function sets the serial interface 2-data lane mode configuration to the LCD engine.

Parameters
[in]portis the serial port to be configured.
[in]flagspecifies if 2-data lane is enabled or not.
[in]two_data_widthis the data width in 2-data lane mode, please refer to hal_display_lcd_interface_2pin_width_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_set_interface_mode ( hal_display_lcd_interface_mode_t  mode_settings)

This function sets the serial interface mode configuration to the LCD engine.

Parameters
[in]mode_settingsare the interface parameters, please refer to hal_display_lcd_interface_mode_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_set_interface_timing ( hal_display_lcd_interface_timing_t  timing_settings)

This function sets the timing configuration to the LCD engine.

Parameters
[in]timing_settingsare the timing parameters, please refer to hal_display_lcd_interface_timing_t.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_set_layer_to_default ( void  )

This function resets the layer to default settings after updating the screen.

Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_ERROR, the operation has failed.
hal_display_lcd_status_t hal_display_lcd_start_dma ( bool  wait_te)

This function starts the LCD engine transfer in DMA mode.

Parameters
[in]wait_tespecifies whether the LCD engine has to wait for the TE signals to start the DMA transfer. If the TE is connected to MT2523, the parameter is set to 1, otherwise it is set to 0.
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_toggle_reset ( uint32_t  low_time,
uint32_t  high_time 
)

This function produces a reset waveform and reset the LCM.

Parameters
[in]low_timespecifies the duration of reset pin keeps in low (ms).
[in]high_timespecifies the duration of reset pin keeps in high (ms).
Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_INVALID_PARAMETER, the parameter needs to be verified. The parameter is out of bound.
hal_display_lcd_status_t hal_display_lcd_turn_off_mtcmos ( void  )

This function turns off the MTCMOS.

To save power, turn the MTCMOS off after the LCD engine completes the transfer.

Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_POWER_FAILED, turning off the LCD engine's power has failed.
hal_display_lcd_status_t hal_display_lcd_turn_on_mtcmos ( void  )

This function turns on the MTCMOS.

To save power, no need to turn the MTCMOS on. During the screen update, turn the MTCMOS on and then apply all settings to the LCD engine to ensure the parameters are set to the LCD engine.

Returns
To indicate whether this function call is successful or not. HAL_DISPLAY_LCD_STATUS_OK, the operation completed successfully. HAL_DISPLAY_LCD_STATUS_POWER_FAILED, turning on the LCD engine's power has failed.