mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'doc/lcd_add_manufacture_parameters' into 'master'
lcd: add doc about adding manufacture specific initialization code Closes IDFGH-10039 See merge request espressif/esp-idf!23617
This commit is contained in:
commit
66c999fcf8
@ -447,10 +447,31 @@ LCD Panel IO Operations
|
||||
-----------------------
|
||||
|
||||
* :cpp:func:`esp_lcd_panel_reset` can reset the LCD panel.
|
||||
* Use :cpp:func:`esp_lcd_panel_swap_xy` and :cpp:func:`esp_lcd_panel_mirror`, you can rotate the LCD screen.
|
||||
* :cpp:func:`esp_lcd_panel_init` will perform a basic initialization of the panel. To perform more manufacture specific initialization, please go to :ref:`steps_add_manufacture_init`.
|
||||
* Through combined use of :cpp:func:`esp_lcd_panel_swap_xy` and :cpp:func:`esp_lcd_panel_mirror`, you can rotate the LCD screen.
|
||||
* :cpp:func:`esp_lcd_panel_disp_on_off` can turn on or off the LCD screen (different from LCD backlight).
|
||||
* :cpp:func:`esp_lcd_panel_draw_bitmap` is the most significant function, that will do the magic to draw the user provided color buffer to the LCD screen, where the draw window is also configurable.
|
||||
|
||||
.. _steps_add_manufacture_init:
|
||||
|
||||
Steps to Add Manufacture Specific Initialization
|
||||
-------------------------------------------------
|
||||
|
||||
The LCD controller drivers (e.g. st7789) in esp-idf only provide basic initialization in the :cpp:func:`esp_lcd_panel_init`, leaving the vast majority of settings to the default values. Some LCD modules needs to set a bunch of manufacture specific configurations before it can display normally. These configurations usually include gamma, power voltage and so on. If you want to add manufacture specific initialization, please follow the steps below:
|
||||
|
||||
.. code:: c
|
||||
|
||||
esp_lcd_panel_reset(panel_handle);
|
||||
esp_lcd_panel_init(panel_handle);
|
||||
// set extra configurations e.g. gamma control
|
||||
// with the underlying IO handle
|
||||
// please consult your manufacture for special commands and corresponding values
|
||||
esp_lcd_panel_io_tx_param(io_handle, GAMMA_CMD, (uint8_t[]) {
|
||||
GAMMA_ARRAY
|
||||
}, N);
|
||||
// turn on the display
|
||||
esp_lcd_panel_disp_on_off(panel_handle, true);
|
||||
|
||||
Application Example
|
||||
-------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user