diff --git a/components/esp32/freertos_hooks.c b/components/esp32/freertos_hooks.c index ed88be883..abe88a97e 100644 --- a/components/esp32/freertos_hooks.c +++ b/components/esp32/freertos_hooks.c @@ -20,6 +20,10 @@ #include "esp_attr.h" #include "esp_freertos_hooks.h" +#include "sdkconfig.h" +#include "esp_pm.h" +#include "pm_impl.h" + //We use just a static array here because it's not expected many components will need //an idle or tick hook. #define MAX_HOOKS 8 @@ -41,20 +45,21 @@ void IRAM_ATTR esp_vApplicationTickHook() void esp_vApplicationIdleHook() { - bool doWait=true; - bool r; - int n; + bool can_go_idle=true; int core = xPortGetCoreID(); - for (n=0; n