sleep: fix gpio wakeup not working properly in some cases

Before this fix, when we call esp_pm_configure after gpio_wakeup_enable,
the configuration of GPIO in sleep state in gpio_wakeup_enable will be
overwritten by esp_pm_configure.
This commit is contained in:
jingli
2023-02-11 01:06:18 +00:00
committed by morris
parent 557a1ed1a5
commit 28c7620cba
3 changed files with 5 additions and 12 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ void esp_deep_sleep_wakeup_io_reset(void)
#endif
}
#if CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND && !CONFIG_PM_SLP_DISABLE_GPIO
#if CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND || CONFIG_PM_SLP_DISABLE_GPIO
ESP_SYSTEM_INIT_FN(esp_sleep_startup_init, BIT(0), 105)
{
// Configure to isolate (disable the Input/Output/Pullup/Pulldown