feat(lcd): add brightness control for LCD panels

Merges https://github.com/espressif/esp-idf/pull/18273
Closes https://github.com/espressif/esp-idf/issues/16230
This commit is contained in:
Ldab
2026-02-28 15:19:49 +08:00
committed by morris
parent b25bd4e3bf
commit 711aea0593
4 changed files with 43 additions and 0 deletions
@@ -157,6 +157,17 @@ esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off);
*/
esp_err_t esp_lcd_panel_disp_sleep(esp_lcd_panel_handle_t panel, bool sleep);
/**
* @brief Set the brightness of the display
*
* @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()`
* @param[in] brightness Brightness value (range depends on panel implementation, typically 0-255, 0-1023, or 0-100)
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
*/
esp_err_t esp_lcd_panel_set_brightness(esp_lcd_panel_handle_t panel, int brightness);
#ifdef __cplusplus
}
#endif