ESPHome
2024.11.0
esphome
esphome
components
deep_sleep
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
13
void
DeepSleepComponent::dump_config_platform_
() {}
14
15
bool
DeepSleepComponent::prepare_to_sleep_
() {
return
true
; }
16
17
void
DeepSleepComponent::deep_sleep_
() {
18
ESP.deepSleep(*this->
sleep_duration_
);
// NOLINT(readability-static-accessed-through-instance)
19
}
20
21
}
// namespace deep_sleep
22
}
// namespace esphome
23
#endif
esphome::deep_sleep::DeepSleepComponent::get_run_duration_
optional< uint32_t > get_run_duration_() const
Definition:
deep_sleep_esp32.cpp:10
esphome::deep_sleep::DeepSleepComponent::sleep_duration_
optional< uint64_t > sleep_duration_
Definition:
deep_sleep_component.h:115
esphome::deep_sleep::DeepSleepComponent::dump_config_platform_
void dump_config_platform_()
Definition:
deep_sleep_esp32.cpp:41
esphome::deep_sleep::DeepSleepComponent::run_duration_
optional< uint32_t > run_duration_
Definition:
deep_sleep_component.h:127
esphome::deep_sleep::DeepSleepComponent::prepare_to_sleep_
bool prepare_to_sleep_()
Definition:
deep_sleep_esp32.cpp:53
esphome::deep_sleep::DeepSleepComponent::deep_sleep_
void deep_sleep_()
Definition:
deep_sleep_esp32.cpp:67
deep_sleep_component.h
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
Generated by
1.8.13