9 namespace power_supply {
30 void setup()
override;
49 if (!this->requested_ && this->parent_ !=
nullptr) {
50 this->parent_->request_high_power();
51 this->requested_ =
true;
55 if (this->requested_ && this->parent_ !=
nullptr) {
56 this->parent_->unrequest_high_power();
57 this->requested_ =
false;
63 bool requested_{
false};
float get_setup_priority() const override
Hardware setup priority (+1).
void setup() override
Register callbacks.
void set_keep_on_time(uint32_t keep_on_time)
void set_parent(PowerSupply *parent)
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
void set_pin(GPIOPin *pin)
bool is_enabled() const
Is this power supply currently on?
Implementation of SPI Controller mode.
void set_enable_time(uint32_t enable_time)
void set_enable_on_boot(bool enable_on_boot)