diff --git a/README.md b/README.md index 1908417..a664636 100644 --- a/README.md +++ b/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) - [Support for predefined development kits](#support-for-predefined-development-kits) - [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 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 the I2C Manager component itself and have others play nice with LVGL and vice-versa. [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) diff --git a/lvgl_tft/esp_lcd_backlight.h b/lvgl_tft/esp_lcd_backlight.h index a04817b..8deda9f 100644 --- a/lvgl_tft/esp_lcd_backlight.h +++ b/lvgl_tft/esp_lcd_backlight.h @@ -27,6 +27,7 @@ typedef void * disp_backlight_h; /** * @brief Configuration structure of backlight controller * + * Must be passed to disp_backlight_new() for correct configuration */ typedef struct { bool pwm_control; @@ -35,7 +36,7 @@ typedef struct { // Relevant only for PWM controlled backlight // 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 } disp_backlight_config_t;