Skip to content

Commit 2d6ea13

Browse files
Provide README section about backlight control
1 parent 11c240d commit 2d6ea13

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ For a ready to use ESP32 project take look at the [lv_port_esp32](https://github
77
- [Supported indev controllers](#supported-indev-controllers)
88
- [Support for predefined development kits](#support-for-predefined-development-kits)
99
- [Thread-safe I2C with I2C Manager](#thread-safe-i2c-with-i2c-manager)
10+
- [Backlight control](#backlight-control)
1011

1112
**NOTE:** You need to set the display horizontal and vertical size, color depth and
1213
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
7980
use a built-in copy of I2C Manager to talk to the I2C port, but you can also use
8081
the I2C Manager component itself and have others play nice with LVGL and vice-versa.
8182
[Click here](i2c_manager/README.md) for details.
83+
84+
85+
## Backlight control
86+
87+
Control of LCD's backlight is provided by separate module that is independent from the display driver.
88+
Configuration of the backlight controller can be found in menuconfig `LVGL ESP Drivers -> LVGL TFT Display controller`.
89+
90+
There are three modes of operation:
91+
1. Off - No backlight control
92+
2. Switch - Allows ON/OFF control
93+
3. PWM - Allows brightness control (by Pulse-Width-Modulated signal)

lvgl_tft/esp_lcd_backlight.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ typedef void * disp_backlight_h;
2727
/**
2828
* @brief Configuration structure of backlight controller
2929
*
30+
* Must be passed to disp_backlight_new() for correct configuration
3031
*/
3132
typedef struct {
3233
bool pwm_control;
@@ -35,7 +36,7 @@ typedef struct {
3536

3637
// Relevant only for PWM controlled backlight
3738
// Ignored for switch (ON/OFF) backlight control
38-
int timer_idx; // ledc_timer_t
39+
int timer_idx; // ledc_timer_t
3940
int channel_idx; // ledc_channel_t
4041
} disp_backlight_config_t;
4142

0 commit comments

Comments
 (0)