8 static const char *
const TAG =
"deep_sleep";
13 ESP_LOGCONFIG(TAG,
"Setting up Deep Sleep...");
14 global_has_deep_sleep =
true;
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");
optional< uint32_t > get_run_duration_() const
void set_sleep_duration(uint32_t time_ms)
Set the duration in ms the component should sleep once it's in deep sleep mode.
bool global_has_deep_sleep
void prevent_deep_sleep()
optional< uint64_t > sleep_duration_
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
const float LATE
For components that should be initialized at the very end of the setup process.
void dump_config_platform_()
bool next_enter_deep_sleep_
float get_setup_priority() const override
optional< uint32_t > run_duration_
void run_safe_shutdown_hooks()
void set_run_duration(WakeupCauseToRunDuration wakeup_cause_to_run_duration)
void begin_sleep(bool manual=false)
Helper to enter deep sleep mode.
Application App
Global storage of Application pointer - only one Application can exist.
Implementation of SPI Controller mode.
float get_loop_priority() const override
void dump_config() override