From 73813bb1b803ed055fbaa310d6d261212ff573ce Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sat, 6 Jan 2024 14:38:46 -0300 Subject: [PATCH 1/2] Fixes EspClass::deepSleep(64 bits) This will change time in microseconds from 32 bits to 64 bits as defined in IDF. --- cores/esp32/Esp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/Esp.cpp b/cores/esp32/Esp.cpp index aa73e698bbe..ecbf4877d90 100644 --- a/cores/esp32/Esp.cpp +++ b/cores/esp32/Esp.cpp @@ -131,7 +131,7 @@ unsigned long long operator"" _GB(unsigned long long x) EspClass ESP; -void EspClass::deepSleep(uint32_t time_us) +void EspClass::deepSleep(uint64_t time_us) { esp_deep_sleep(time_us); } From 8a7f578f764b35e28b548c664344f50006115836 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Sat, 6 Jan 2024 15:06:29 -0300 Subject: [PATCH 2/2] updates function declaration --- cores/esp32/Esp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cores/esp32/Esp.h b/cores/esp32/Esp.h index 478158ddf1f..82dd25e3c25 100644 --- a/cores/esp32/Esp.h +++ b/cores/esp32/Esp.h @@ -86,7 +86,7 @@ class EspClass const char * getSdkVersion(); //version of ESP-IDF const char * getCoreVersion();//version of this core - void deepSleep(uint32_t time_us); + void deepSleep(uint64_t time_us); uint32_t getFlashChipSize(); uint32_t getFlashChipSpeed();