Provide README section about backlight control

This commit is contained in:
Tomas Rezucha 2021-08-04 09:38:05 +02:00
parent 11c240daca
commit 2d6ea1330c
2 changed files with 14 additions and 1 deletions

View file

@ -7,6 +7,7 @@ For a ready to use ESP32 project take look at the [lv_port_esp32](https://github
- [Supported indev controllers](#supported-indev-controllers) - [Supported indev controllers](#supported-indev-controllers)
- [Support for predefined development kits](#support-for-predefined-development-kits) - [Support for predefined development kits](#support-for-predefined-development-kits)
- [Thread-safe I2C with I2C Manager](#thread-safe-i2c-with-i2c-manager) - [Thread-safe I2C with I2C Manager](#thread-safe-i2c-with-i2c-manager)
- [Backlight control](#backlight-control)
**NOTE:** You need to set the display horizontal and vertical size, color depth and **NOTE:** You need to set the display horizontal and vertical size, color depth and
swap of RGB565 color on the LVGL configuration menuconfig (it's not handled automatically). swap of RGB565 color on the LVGL configuration menuconfig (it's not handled automatically).
@ -79,3 +80,14 @@ talk to devices on the I2C ports without getting in each other's way. These driv
use a built-in copy of I2C Manager to talk to the I2C port, but you can also use use a built-in copy of I2C Manager to talk to the I2C port, but you can also use
the I2C Manager component itself and have others play nice with LVGL and vice-versa. the I2C Manager component itself and have others play nice with LVGL and vice-versa.
[Click here](i2c_manager/README.md) for details. [Click here](i2c_manager/README.md) for details.
## Backlight control
Control of LCD's backlight is provided by separate module that is independent from the display driver.
Configuration of the backlight controller can be found in menuconfig `LVGL ESP Drivers -> LVGL TFT Display controller`.
There are three modes of operation:
1. Off - No backlight control
2. Switch - Allows ON/OFF control
3. PWM - Allows brightness control (by Pulse-Width-Modulated signal)

View file

@ -27,6 +27,7 @@ typedef void * disp_backlight_h;
/** /**
* @brief Configuration structure of backlight controller * @brief Configuration structure of backlight controller
* *
* Must be passed to disp_backlight_new() for correct configuration
*/ */
typedef struct { typedef struct {
bool pwm_control; bool pwm_control;