8static const char *
const TAG =
"deep_sleep";
13 ESP_LOGCONFIG(TAG,
"Setting up Deep Sleep...");
18 ESP_LOGI(TAG,
"Scheduling Deep Sleep to start in %" PRIu32
" ms", *run_duration);
21 ESP_LOGD(TAG,
"Not scheduling Deep Sleep, as no run duration is configured.");
26 ESP_LOGCONFIG(TAG,
"Setting up Deep Sleep...");
29 ESP_LOGCONFIG(TAG,
" Sleep Duration: %" PRIu32
" ms",
duration);
32 ESP_LOGCONFIG(TAG,
" Run Duration: %" PRIu32
" ms", *this->
run_duration_);
60 ESP_LOGI(TAG,
"Beginning Deep Sleep");
void run_safe_shutdown_hooks()
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
void set_run_duration(WakeupCauseToRunDuration wakeup_cause_to_run_duration)
void dump_config() override
optional< uint64_t > sleep_duration_
optional< uint32_t > get_run_duration_() const
void prevent_deep_sleep()
bool next_enter_deep_sleep_
void begin_sleep(bool manual=false)
Helper to enter deep sleep mode.
float get_loop_priority() const override
void set_sleep_duration(uint32_t time_ms)
Set the duration in ms the component should sleep once it's in deep sleep mode.
optional< uint32_t > run_duration_
void dump_config_platform_()
float get_setup_priority() const override
bool global_has_deep_sleep
const float LATE
For components that should be initialized at the very end of the setup process.
Providing packet encoding functions for exchanging data with a remote host.
Application App
Global storage of Application pointer - only one Application can exist.