From 3a97244b8346bc4e1ca5eebcdccbfbde10f66a32 Mon Sep 17 00:00:00 2001 From: Anton Sergunov Date: Wed, 12 Jun 2024 04:42:20 +0600 Subject: [PATCH] [Deep sleep] Compilation error with IDF >= 5.* (#6879) --- esphome/components/deep_sleep/deep_sleep_component.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/esphome/components/deep_sleep/deep_sleep_component.h b/esphome/components/deep_sleep/deep_sleep_component.h index be56b529ba..7a640b9ea5 100644 --- a/esphome/components/deep_sleep/deep_sleep_component.h +++ b/esphome/components/deep_sleep/deep_sleep_component.h @@ -34,10 +34,12 @@ enum WakeupPinMode { WAKEUP_PIN_MODE_INVERT_WAKEUP, }; +#if defined(USE_ESP32) && !defined(USE_ESP32_VARIANT_ESP32C3) struct Ext1Wakeup { uint64_t mask; esp_sleep_ext1_wakeup_mode_t wakeup_mode; }; +#endif struct WakeupCauseToRunDuration { // Run duration if woken up by timer or any other reason besides those below. @@ -114,7 +116,11 @@ class DeepSleepComponent : public Component { #ifdef USE_ESP32 InternalGPIOPin *wakeup_pin_; WakeupPinMode wakeup_pin_mode_{WAKEUP_PIN_MODE_IGNORE}; + +#if !defined(USE_ESP32_VARIANT_ESP32C3) optional ext1_wakeup_; +#endif + optional touch_wakeup_; optional wakeup_cause_to_run_duration_; #endif