5namespace power_supply {
7static const char *
const TAG =
"power_supply";
18 " Time to enable: %" PRIu32
" ms\n"
19 " Keep on time: %" PRIu32
" s\n"
20 " Enable at startup: %s",
22 LOG_PIN(
" Pin: ", this->
pin_);
32 ESP_LOGV(TAG,
"Enabling");
41 ESP_LOGW(TAG,
"Invalid call to unrequest_high_power");
47 ESP_LOGV(TAG,
"Disabling");
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.
virtual void digital_write(bool value)=0
void dump_config() override
void request_high_power()
Request high power mode. Use unrequest_high_power() to remove this request.
void on_powerdown() override
bool is_enabled() const
Is this power supply currently on?
void unrequest_high_power()
Un-request high power mode.
void setup() override
Register callbacks.
float get_setup_priority() const override
Hardware setup priority (+1).
const float IO
For components that represent GPIO pins like PCF8573.
Providing packet encoding functions for exchanging data with a remote host.
void IRAM_ATTR HOT delay(uint32_t ms)