Add channel parameter to ledcAttach function

keep same behaviour as in previous V4 code
This commit is contained in:
Frank Möhle
2026-02-12 18:10:40 +01:00
committed by GitHub
parent 993ab49b15
commit f2cbf0cc50

View File

@@ -418,7 +418,7 @@ BusPwm::BusPwm(const BusConfig &bc)
ledcSetup(channel, _frequency, _depth - (dithering*4)); // with dithering _frequency doesn't really matter as resolution is 8 bit
ledcAttachPin(_pins[i], channel);
#else
ledcAttach(_pins[i], _frequency, _depth - (dithering*4));
ledcAttach(_pins[i], _frequency, _depth - (dithering*4), channel);
// LEDC timer reset credit @dedehai
#endif
// LEDC timer reset credit @dedehai