Skip to content

Commit 5bc8e6a

Browse files
committedSep 29, 2024
fix
1 parent c9027c5 commit 5bc8e6a

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed
 

‎tests/validation/sleep/sleep.ino

+9-3
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,31 @@ void setup_timer() {
5252
}
5353

5454
void setup_touchpad() {
55+
#if SOC_TOUCH_SENSOR_SUPPORTED
5556
touchSleepWakeUpEnable(T1, THRESHOLD);
57+
#endif
5658
}
5759

5860
void setup_rtc_io() {
61+
#if SOC_RTCIO_WAKE_SUPPORTED
5962
esp_sleep_enable_ext0_wakeup(WAKEUP_GPIO, 1);
6063
rtc_gpio_pullup_en(WAKEUP_GPIO);
6164
rtc_gpio_pulldown_dis(WAKEUP_GPIO);
65+
#endif
6266
}
6367

6468
void setup_rtc_cntl() {
69+
#if SOC_RTCIO_WAKE_SUPPORTED
6570
esp_sleep_enable_ext1_wakeup_io(BUTTON_PIN_BITMASK(WAKEUP_GPIO), ESP_EXT1_WAKEUP_ANY_HIGH);
6671
rtc_gpio_pulldown_dis(WAKEUP_GPIO);
6772
rtc_gpio_pullup_en(WAKEUP_GPIO);
73+
#endif
6874
}
6975

7076
void setup_gpio() {
7177
esp_sleep_pd_config(ESP_PD_DOMAIN_VDDSDIO, ESP_PD_OPTION_ON);
72-
rtc_gpio_pullup_dis(WAKEUP_GPIO);
73-
rtc_gpio_pulldown_en(WAKEUP_GPIO);
78+
gpio_pullup_dis(WAKEUP_GPIO);
79+
gpio_pulldown_en(WAKEUP_GPIO);
7480
gpio_wakeup_enable(WAKEUP_GPIO, GPIO_INTR_HIGH_LEVEL);
7581
esp_sleep_enable_gpio_wakeup();
7682
}
@@ -156,6 +162,6 @@ void loop() {
156162
Serial.println("Woke up from light sleep");
157163
print_wakeup_reason();
158164
Serial.flush();
159-
rtc_gpio_hold_dis(WAKEUP_GPIO);
165+
gpio_hold_dis(WAKEUP_GPIO);
160166
}
161167
}

‎tests/validation/sleep/test_sleep.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
capabilities = {
44
"timer": ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"],
5-
"touchpad": ["esp32", "esp32s2", "esp32s3", "esp32c3"],
6-
"rtc_io": ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"],
7-
"rtc_cntl": ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"],
5+
"touchpad": ["esp32", "esp32s2", "esp32s3"],
6+
"rtc_io": ["esp32", "esp32s2", "esp32s3", "esp32c6"],
7+
"rtc_cntl": ["esp32", "esp32s2", "esp32s3", "esp32c6"],
88
"gpio": ["esp32", "esp32s2", "esp32s3"],
99
"uart": ["esp32", "esp32s2", "esp32s3", "esp32c3", "esp32c6", "esp32h2"]
1010
}

0 commit comments

Comments
 (0)