1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-16 02:02:21 +01:00

rp2040_pwm frequency is per pair of pins (#4061)

This commit is contained in:
Jesse Hills
2022-11-22 21:12:33 +13:00
committed by GitHub
parent c1f696c32a
commit 7258a82875
2 changed files with 4 additions and 5 deletions

View File

@@ -42,9 +42,9 @@ void HOT RP2040PWM::write_state(float state) {
state = 1.0f - state;
}
if (frequency_changed_) {
if (this->frequency_changed_) {
this->setup_pwm_();
frequency_changed_ = false;
this->frequency_changed_ = false;
}
gpio_set_function(this->pin_->get_pin(), GPIO_FUNC_PWM);