ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
esp32_power_management.h
Go to the documentation of this file.
1#pragma once
2
3#ifdef USE_ESP32
4
7// Lets a YAML lambda call esp_pm_dump_locks().
8#include "esp_pm.h"
9
11
13 public:
14 float get_setup_priority() const override { return setup_priority::POWER; }
15 void setup() override;
16 void dump_config() override;
17 void set_max_freq_mhz(uint16_t max_freq_mhz) { this->max_freq_mhz_ = max_freq_mhz; }
18 void set_min_freq_mhz(uint16_t min_freq_mhz) { this->min_freq_mhz_ = min_freq_mhz; }
19
20 protected:
21 // Zero means the build default; setup() replaces it with the value applied.
22 uint16_t max_freq_mhz_{0};
23 uint16_t min_freq_mhz_{0};
24};
25
26} // namespace esphome::esp32_power_management
27
28#endif
constexpr float POWER
For power supply components that must be on before buses like i2c can work.
Definition component.h:37