Provide README section about backlight control
This commit is contained in:
parent
11c240daca
commit
2d6ea1330c
12
README.md
12
README.md
|
@ -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)
|
||||||
|
|
|
@ -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;
|
||||||
|
@ -35,7 +36,7 @@ typedef struct {
|
||||||
|
|
||||||
// Relevant only for PWM controlled backlight
|
// Relevant only for PWM controlled backlight
|
||||||
// Ignored for switch (ON/OFF) backlight control
|
// Ignored for switch (ON/OFF) backlight control
|
||||||
int timer_idx; // ledc_timer_t
|
int timer_idx; // ledc_timer_t
|
||||||
int channel_idx; // ledc_channel_t
|
int channel_idx; // ledc_channel_t
|
||||||
} disp_backlight_config_t;
|
} disp_backlight_config_t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue