mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-06-03 19:38:30 +02:00
Allow setting htop for ledc (#6340)
This commit is contained in:
@@ -19,6 +19,7 @@ class LEDCOutput : public output::FloatOutput, public Component {
|
||||
|
||||
void set_channel(uint8_t channel) { this->channel_ = channel; }
|
||||
void set_frequency(float frequency) { this->frequency_ = frequency; }
|
||||
void set_phase_angle(float angle) { this->phase_angle_ = angle; }
|
||||
/// Dynamically change frequency at runtime
|
||||
void update_frequency(float frequency) override;
|
||||
|
||||
@@ -35,6 +36,7 @@ class LEDCOutput : public output::FloatOutput, public Component {
|
||||
InternalGPIOPin *pin_;
|
||||
uint8_t channel_{};
|
||||
uint8_t bit_depth_{};
|
||||
float phase_angle_{0.0f};
|
||||
float frequency_{};
|
||||
float duty_{0.0f};
|
||||
bool initialized_ = false;
|
||||
|
||||
Reference in New Issue
Block a user