reorder menu and add sound settings
All checks were successful
ESP32 Build & Release / build (push) Successful in 1m18s
All checks were successful
ESP32 Build & Release / build (push) Successful in 1m18s
This commit is contained in:
@@ -114,4 +114,24 @@ esp_err_t display_manager_init(void)
|
||||
lv_disp_t *display_get_disp(void)
|
||||
{
|
||||
return s_disp;
|
||||
}
|
||||
|
||||
static bool s_sleeping = false;
|
||||
|
||||
esp_err_t display_set_sleep(bool sleep)
|
||||
{
|
||||
if (s_panel == NULL) {
|
||||
return ESP_ERR_INVALID_STATE;
|
||||
}
|
||||
if (s_sleeping == sleep) {
|
||||
return ESP_OK;
|
||||
}
|
||||
s_sleeping = sleep;
|
||||
ESP_LOGI(TAG, "Display %s", sleep ? "sleep (off)" : "wake (on)");
|
||||
return esp_lcd_panel_disp_on_off(s_panel, !sleep);
|
||||
}
|
||||
|
||||
bool display_is_sleeping(void)
|
||||
{
|
||||
return s_sleeping;
|
||||
}
|
||||
Reference in New Issue
Block a user