5 namespace power_supply {
7 static const char *
const TAG =
"power_supply";
10 ESP_LOGCONFIG(TAG,
"Setting up Power Supply...");
17 ESP_LOGCONFIG(TAG,
"Power Supply:");
18 LOG_PIN(
" Pin: ", this->
pin_);
19 ESP_LOGCONFIG(TAG,
" Time to enable: %u ms", this->
enable_time_);
20 ESP_LOGCONFIG(TAG,
" Keep on time: %.1f s", this->
keep_on_time_ / 1000.0f);
34 ESP_LOGD(TAG,
"Enabling power supply.");
52 ESP_LOGD(TAG,
"Disabling power supply.");
virtual void digital_write(bool value)=0
float get_setup_priority() const override
Hardware setup priority (+1).
void setup() override
Register callbacks.
bool cancel_timeout(const std::string &name)
Cancel a timeout function.
void set_timeout(const std::string &name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
void request_high_power()
Request high power mode. Use unrequest_high_power() to remove this request.
void dump_config() override
void unrequest_high_power()
Un-request high power mode.
void on_shutdown() override
bool is_enabled() const
Is this power supply currently on?
const float IO
For components that represent GPIO pins like PCF8573.
void IRAM_ATTR HOT delay(uint32_t ms)