5 namespace power_supply {
7 static const char *
const TAG =
"power_supply";
10 ESP_LOGCONFIG(TAG,
"Setting up Power Supply...");
18 ESP_LOGCONFIG(TAG,
"Power Supply:");
19 LOG_PIN(
" Pin: ", this->
pin_);
20 ESP_LOGCONFIG(TAG,
" Time to enable: %" PRIu32
" ms", this->
enable_time_);
21 ESP_LOGCONFIG(TAG,
" Keep on time: %.1f s", this->
keep_on_time_ / 1000.0f);
23 ESP_LOGCONFIG(TAG,
" Enabled at startup: True");
33 ESP_LOGD(TAG,
"Enabling power supply.");
42 ESP_LOGW(TAG,
"Invalid call to unrequest_high_power");
48 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.
Implementation of SPI Controller mode.
void IRAM_ATTR HOT delay(uint32_t ms)