ESPHome  2024.10.2
deep_sleep_esp8266.cpp
Go to the documentation of this file.
1 #ifdef USE_ESP8266
2 #include "deep_sleep_component.h"
3 
4 #include <Esp.h>
5 
6 namespace esphome {
7 namespace deep_sleep {
8 
9 static const char *const TAG = "deep_sleep";
10 
11 optional<uint32_t> DeepSleepComponent::get_run_duration_() const { return this->run_duration_; }
12 
14 
15 bool DeepSleepComponent::prepare_to_sleep_() { return true; }
16 
18  ESP.deepSleep(*this->sleep_duration_); // NOLINT(readability-static-accessed-through-instance)
19 }
20 
21 } // namespace deep_sleep
22 } // namespace esphome
23 #endif
optional< uint32_t > get_run_duration_() const
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7