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");
ESPDEPRECATED("Use const char* or uint32_t overload instead. Removed in 2026.7.0", "2026.1.0") void set_timeout(const std voi set_timeout)(const char *name, uint32_t timeout, std::function< void()> &&f)
Set a timeout function with a unique name.
ESPDEPRECATED("Use const char* or uint32_t overload instead. Removed in 2026.7.0", "2026.1.0") bool cancel_timeout(const std boo cancel_timeout)(const char *name)
Cancel a timeout function.
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)