diff --git a/components/esp_hw_support/sleep_modes.c b/components/esp_hw_support/sleep_modes.c index 81d91ca8dca..9702fdc1730 100644 --- a/components/esp_hw_support/sleep_modes.c +++ b/components/esp_hw_support/sleep_modes.c @@ -372,7 +372,7 @@ static void touch_wakeup_prepare(void); #if SOC_VBAT_SUPPORTED static void vbat_under_volt_wakeup_prepare(void); #endif -#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP static void esp_sleep_gpio_wakeup_prepare_on_hp_periph_powerdown(void); #endif @@ -1039,8 +1039,8 @@ static esp_err_t SLEEP_FN_ATTR esp_sleep_start(uint32_t sleep_flags, uint32_t cl // for !(s_config.wakeup_triggers & RTC_EXT1_TRIG_EN), ext1 wakeup will be turned off in hardware in the real call to sleep #endif -#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED - if (deep_sleep && (s_config.wakeup_triggers & RTC_GPIO_TRIG_EN)) { +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP + if ((sleep_flags & RTC_SLEEP_PD_DIG) && (s_config.wakeup_triggers & RTC_GPIO_TRIG_EN)) { esp_sleep_gpio_wakeup_prepare_on_hp_periph_powerdown(); } #endif @@ -2173,7 +2173,7 @@ uint64_t esp_sleep_get_ext1_wakeup_status(void) #endif // SOC_PM_SUPPORT_EXT1_WAKEUP && SOC_RTCIO_PIN_COUNT > 0 -#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP && SOC_DEEP_SLEEP_SUPPORTED +#if SOC_GPIO_SUPPORT_HP_PERIPH_PD_SLEEP_WAKEUP uint64_t esp_sleep_get_gpio_wakeup_status(void) { if (!(esp_sleep_get_wakeup_causes() & BIT(ESP_SLEEP_WAKEUP_GPIO))) {