lcd: don't turn on disp in init

Closes https://github.com/espressif/esp-idf/issues/8516
This commit is contained in:
morris
2022-04-11 18:48:29 +08:00
parent 4280164be4
commit de433105a2
16 changed files with 81 additions and 48 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -110,6 +110,17 @@ esp_err_t esp_lcd_panel_set_gap(esp_lcd_panel_handle_t panel, int x_gap, int y_g
*/
esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_color_data);
/**
* @brief Turn on or off the display
*
* @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()`
* @param[in] on_off True to turns on display, False to turns off display
* @return
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
*/
esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off);
/**
* @brief Turn off the display
*
@@ -119,7 +130,8 @@ esp_err_t esp_lcd_panel_invert_color(esp_lcd_panel_handle_t panel, bool invert_c
* - ESP_OK on success
* - ESP_ERR_NOT_SUPPORTED if this function is not supported by the panel
*/
esp_err_t esp_lcd_panel_disp_off(esp_lcd_panel_handle_t panel, bool off);
esp_err_t esp_lcd_panel_disp_off(esp_lcd_panel_handle_t panel, bool off)
__attribute__((deprecated("use esp_lcd_panel_disp_on_off instead")));
#ifdef __cplusplus
}