File tree 3 files changed +17
-17
lines changed
libraries/ESP32/examples/DeepSleep
3 files changed +17
-17
lines changed Original file line number Diff line number Diff line change @@ -36,12 +36,12 @@ void print_wakeup_reason(){
36
36
37
37
switch (wakeup_reason)
38
38
{
39
- case 1 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
40
- case 2 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
41
- case 3 : Serial.println (" Wakeup caused by timer" ); break ;
42
- case 4 : Serial.println (" Wakeup caused by touchpad" ); break ;
43
- case 5 : Serial.println (" Wakeup caused by ULP program" ); break ;
44
- default : Serial.println (" Wakeup was not caused by deep sleep" ); break ;
39
+ case ESP_SLEEP_WAKEUP_EXT0 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
40
+ case ESP_SLEEP_WAKEUP_EXT1 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
41
+ case ESP_SLEEP_WAKEUP_TIMER : Serial.println (" Wakeup caused by timer" ); break ;
42
+ case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println (" Wakeup caused by touchpad" ); break ;
43
+ case ESP_SLEEP_WAKEUP_ULP : Serial.println (" Wakeup caused by ULP program" ); break ;
44
+ default : Serial.printf (" Wakeup was not caused by deep sleep: %d \n " ,wakeup_reason ); break ;
45
45
}
46
46
}
47
47
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ void print_wakeup_reason(){
35
35
36
36
switch (wakeup_reason)
37
37
{
38
- case 1 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
39
- case 2 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
40
- case 3 : Serial.println (" Wakeup caused by timer" ); break ;
41
- case 4 : Serial.println (" Wakeup caused by touchpad" ); break ;
42
- case 5 : Serial.println (" Wakeup caused by ULP program" ); break ;
38
+ case ESP_SLEEP_WAKEUP_EXT0 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
39
+ case ESP_SLEEP_WAKEUP_EXT1 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
40
+ case ESP_SLEEP_WAKEUP_TIMER : Serial.println (" Wakeup caused by timer" ); break ;
41
+ case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println (" Wakeup caused by touchpad" ); break ;
42
+ case ESP_SLEEP_WAKEUP_ULP : Serial.println (" Wakeup caused by ULP program" ); break ;
43
43
default : Serial.printf (" Wakeup was not caused by deep sleep: %d\n " ,wakeup_reason); break ;
44
44
}
45
45
}
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ void print_wakeup_reason(){
26
26
27
27
switch (wakeup_reason)
28
28
{
29
- case 1 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
30
- case 2 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
31
- case 3 : Serial.println (" Wakeup caused by timer" ); break ;
32
- case 4 : Serial.println (" Wakeup caused by touchpad" ); break ;
33
- case 5 : Serial.println (" Wakeup caused by ULP program" ); break ;
34
- default : Serial.println (" Wakeup was not caused by deep sleep" ); break ;
29
+ case ESP_SLEEP_WAKEUP_EXT0 : Serial.println (" Wakeup caused by external signal using RTC_IO" ); break ;
30
+ case ESP_SLEEP_WAKEUP_EXT1 : Serial.println (" Wakeup caused by external signal using RTC_CNTL" ); break ;
31
+ case ESP_SLEEP_WAKEUP_TIMER : Serial.println (" Wakeup caused by timer" ); break ;
32
+ case ESP_SLEEP_WAKEUP_TOUCHPAD : Serial.println (" Wakeup caused by touchpad" ); break ;
33
+ case ESP_SLEEP_WAKEUP_ULP : Serial.println (" Wakeup caused by ULP program" ); break ;
34
+ default : Serial.printf (" Wakeup was not caused by deep sleep: %d \n " ,wakeup_reason ); break ;
35
35
}
36
36
}
37
37
You can’t perform that action at this time.
0 commit comments