6#ifdef USE_DEEP_SLEEP_ON_WAKE
8#include <user_interface.h>
14static const char *
const TAG =
"deep_sleep";
16#ifdef USE_DEEP_SLEEP_ON_WAKE
20 if (ESP.getResetInfoPtr()->reason == REASON_DEEP_SLEEP_AWAKE) {
optional< uint64_t > sleep_duration_
optional< uint32_t > get_run_duration_() const
optional< uint32_t > run_duration_
void dump_config_platform_()
WakeupCause get_wakeup_cause()
Return why the device woke from deep sleep. Implemented per platform.
WakeupCause
Why the device woke from deep sleep. Passed to on_wake automations.
@ WAKEUP_CAUSE_TIMER
The device was woken by the sleep timer.
@ WAKEUP_CAUSE_NONE
The device did not wake from deep sleep (for example a cold boot, reset or OTA restart).