mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'refactor/esp_lcd_panel_disp_on_off' into 'release/v4.4'
lcd: alias esp_lcd_panel_disp_on_off to esp_lcd_panel_disp_off (v4.4) See merge request espressif/esp-idf!20949
This commit is contained in:
@@ -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
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@@ -110,9 +110,22 @@ 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);
|
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
|
* @brief Turn off the display
|
||||||
*
|
*
|
||||||
|
* @deprecated This function has similar functionality to `esp_lcd_panel_disp_on_off`.
|
||||||
|
*
|
||||||
* @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()`
|
* @param[in] panel LCD panel handle, which is created by other factory API like `esp_lcd_new_panel_st7789()`
|
||||||
* @param[in] off Whether to turn off the screen
|
* @param[in] off Whether to turn off the screen
|
||||||
* @return
|
* @return
|
||||||
|
@@ -63,3 +63,8 @@ esp_err_t esp_lcd_panel_disp_off(esp_lcd_panel_handle_t panel, bool off)
|
|||||||
ESP_RETURN_ON_FALSE(panel, ESP_ERR_INVALID_ARG, TAG, "invalid panel handle");
|
ESP_RETURN_ON_FALSE(panel, ESP_ERR_INVALID_ARG, TAG, "invalid panel handle");
|
||||||
return panel->disp_off(panel, off);
|
return panel->disp_off(panel, off);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
esp_err_t esp_lcd_panel_disp_on_off(esp_lcd_panel_handle_t panel, bool on_off)
|
||||||
|
{
|
||||||
|
return esp_lcd_panel_disp_off(panel, !on_off);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user