diff --git a/CHANGELOG.md b/CHANGELOG.md index b5511385..535e92e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # ChangeLog -## v1.0.2 - 2025-03-24 +## v1.0.2 - 2025-04-23 + +### Enhancements: + +* feat(backlight): add PWM parameters configuration (#188) ### Bugfixes: @@ -9,6 +13,7 @@ * fix(docs): update README * fix(conf): update comments of custom config file * fix(examples): enable CPU 240M and task WDT default in esp_idf/lvgl_v8_port +* fix(lcd): fix ST7701 mirror issue ## v1.0.1 - 2025-03-13 diff --git a/esp_panel_board_custom_conf.h b/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/esp_panel_board_custom_conf.h +++ b/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h b/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h +++ b/examples/arduino/board/board_static_config/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/simple_port/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/simple_rotation/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/squareline_port/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h b/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h +++ b/examples/arduino/gui/lvgl_v8/squareline_wifi_clock/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h b/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h index 1921269b..aa417d4b 100644 --- a/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h +++ b/examples/platformio/lvgl_v8_port/src/esp_panel_board_custom_conf.h @@ -476,6 +476,22 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (5000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_CUSTOM /** @@ -735,8 +751,8 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 #endif // ESP_PANEL_BOARD_DEFAULT_USE_CUSTOM diff --git a/src/board/custom/Kconfig.board_custom.backlight b/src/board/custom/Kconfig.board_custom.backlight index 9411de34..ffa5f5e5 100644 --- a/src/board/custom/Kconfig.board_custom.backlight +++ b/src/board/custom/Kconfig.board_custom.backlight @@ -57,6 +57,23 @@ if ESP_PANEL_BOARD_USE_BACKLIGHT Active level for backlight control. endmenu + menu "PWM parameters" + depends on ESP_PANEL_BOARD_BACKLIGHT_TYPE_PWM_LEDC + + config ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ + int "Frequency" + default 5000 + help + Frequency for PWM control. + + config ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION + int "Duty resolution" + default 10 + range 1 20 + help + Duty resolution for PWM control. + endmenu + config ESP_PANEL_BOARD_BACKLIGHT_IDLE_OFF bool "Idle off" default n diff --git a/src/board/custom/esp_panel_board_kconfig_custom_backlight.h b/src/board/custom/esp_panel_board_kconfig_custom_backlight.h index c9501fd5..ba6c8f94 100644 --- a/src/board/custom/esp_panel_board_kconfig_custom_backlight.h +++ b/src/board/custom/esp_panel_board_kconfig_custom_backlight.h @@ -42,6 +42,26 @@ #error "Missing configuration: ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL" #endif #endif + + #if (ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC) + #ifndef ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ + #ifdef CONFIG_ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ CONFIG_ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ + #else + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ 5000 // Keep the backward compatibility + #endif + #endif + #endif + + #if (ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC) + #ifndef ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION + #ifdef CONFIG_ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION CONFIG_ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION + #else + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION 10 // Keep the backward compatibility + #endif + #endif + #endif #endif #ifndef ESP_PANEL_BOARD_BACKLIGHT_IDLE_OFF diff --git a/src/board/esp_panel_board_default_config.cpp b/src/board/esp_panel_board_default_config.cpp index 4cdfe7c2..9733e64d 100644 --- a/src/board/esp_panel_board_default_config.cpp +++ b/src/board/esp_panel_board_default_config.cpp @@ -293,6 +293,10 @@ const BoardConfig ESP_PANEL_BOARD_DEFAULT_CONFIG = { }, #elif ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC .config = BacklightPWM_LEDC::Config{ + .ledc_timer = BacklightPWM_LEDC::LEDC_TimerPartialConfig{ + .freq_hz = ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ, + .duty_resolution = ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION, + }, .ledc_channel = BacklightPWM_LEDC::LEDC_ChannelPartialConfig{ .io_num = ESP_PANEL_BOARD_BACKLIGHT_IO, .on_level = ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL, diff --git a/src/board/supported/jingcai/BOARD_JINGCAI_ESP32_4848S040C_I_Y_3.h b/src/board/supported/jingcai/BOARD_JINGCAI_ESP32_4848S040C_I_Y_3.h index 20e78e1f..ec2c2004 100644 --- a/src/board/supported/jingcai/BOARD_JINGCAI_ESP32_4848S040C_I_Y_3.h +++ b/src/board/supported/jingcai/BOARD_JINGCAI_ESP32_4848S040C_I_Y_3.h @@ -345,6 +345,23 @@ #define ESP_PANEL_BOARD_BACKLIGHT_IO (38) // Output GPIO pin number #define ESP_PANEL_BOARD_BACKLIGHT_ON_LEVEL (1) // Active level, 0: low, 1: high + +#if ESP_PANEL_BOARD_BACKLIGHT_TYPE == ESP_PANEL_BACKLIGHT_TYPE_PWM_LEDC + /** + * @brief PWM parameters configuration + */ + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_FREQ_HZ (1000) // LEDC timer frequency. + // Different backlight driver chips may have different + // frequency limits, please refer to the datasheet of + // the specific chip. + // https://github.com/esp-arduino-libs/ESP32_Display_Panel/issues/188 + + #define ESP_PANEL_BOARD_BACKLIGHT_PWM_DUTY_RESOLUTION (10) // LEDC timer duty resolution. + // The frequency and duty resolution of the LEDC timer + // need to be properly matched, please refer to: + // https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#supported-range-of-frequency-and-duty-resolutions +#endif + #endif // ESP_PANEL_BOARD_BACKLIGHT_TYPE /** @@ -381,7 +398,7 @@ * 3. Patch version mismatch: No impact on functionality */ #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 0 +#define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_MINOR 1 #define ESP_PANEL_BOARD_CUSTOM_FILE_VERSION_PATCH 0 // *INDENT-ON* diff --git a/src/drivers/lcd/port/esp_lcd_st7701_rgb.c b/src/drivers/lcd/port/esp_lcd_st7701_rgb.c index d14a3cd0..36c26fb4 100644 --- a/src/drivers/lcd/port/esp_lcd_st7701_rgb.c +++ b/src/drivers/lcd/port/esp_lcd_st7701_rgb.c @@ -348,9 +348,20 @@ static esp_err_t panel_st7701_mirror(esp_lcd_panel_t *panel, bool mirror_x, bool } else { st7701->madctl_val &= ~LCD_CMD_ML_BIT; } + + // Enable the Command2 BK0 + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7701_CMD_CND2BKxSEL, (uint8_t []) { + ST7701_CMD_BKxSEL_BYTE0, ST7701_CMD_BKxSEL_BYTE1, ST7701_CMD_BKxSEL_BYTE2, ST7701_CMD_BKxSEL_BYTE3, + ST7701_CMD_BKxSEL_BK0 | ST7701_CMD_CN2_BIT, + }, 5), TAG, "send command failed"); ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7701_CMD_SDIR, (uint8_t[]) { sdir_val, }, 1), TAG, "send command failed");; + + // Disable Command2 + ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, ST7701_CMD_CND2BKxSEL, (uint8_t []) { + ST7701_CMD_BKxSEL_BYTE0, ST7701_CMD_BKxSEL_BYTE1, ST7701_CMD_BKxSEL_BYTE2, ST7701_CMD_BKxSEL_BYTE3, 0, + }, 5), TAG, "send command failed"); ESP_RETURN_ON_ERROR(esp_lcd_panel_io_tx_param(io, LCD_CMD_MADCTL, (uint8_t[]) { st7701->madctl_val, }, 1), TAG, "send command failed");; diff --git a/src/esp_panel_versions.h b/src/esp_panel_versions.h index 397b04bd..81ff9553 100644 --- a/src/esp_panel_versions.h +++ b/src/esp_panel_versions.h @@ -17,8 +17,8 @@ /* File `esp_panel_board_custom_conf.h` */ #define ESP_PANEL_BOARD_CUSTOM_VERSION_MAJOR 1 -#define ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR 0 -#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 2 +#define ESP_PANEL_BOARD_CUSTOM_VERSION_MINOR 1 +#define ESP_PANEL_BOARD_CUSTOM_VERSION_PATCH 0 /* File `esp_panel_board_supported_conf.h` */ #define ESP_PANEL_BOARD_SUPPORTED_VERSION_MAJOR 1 diff --git a/tools/check_file_version.py b/tools/check_file_version.py index 4f88afe3..99148ccd 100644 --- a/tools/check_file_version.py +++ b/tools/check_file_version.py @@ -7,6 +7,7 @@ exclude_dirs = [ './build', + './examples/platformio/lvgl_v8_port/.pio' ] internal_version_file = 'src/esp_panel_versions.h' include_files = [