mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 18:50:34 +03:00
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:
@@ -131,6 +131,17 @@ struct esp_lcd_panel_t {
|
||||
*/
|
||||
esp_err_t (*disp_sleep)(esp_lcd_panel_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 (*set_brightness)(esp_lcd_panel_t *panel, int brightness);
|
||||
|
||||
void *user_data; /*!< User data, used to store externally customized data */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user