Unverified Commit 7acd875b authored by Jan Procházka's avatar Jan Procházka Committed by GitHub

fix(ledc): Match channel number with groups (#9638)

parent 3d92edec
......@@ -92,7 +92,7 @@ bool ledcAttachChannel(uint8_t pin, uint32_t freq, uint8_t resolution, uint8_t c
return false;
}
uint32_t duty = ledc_get_duty(group, channel);
uint32_t duty = ledc_get_duty(group, (channel % 8));
ledc_channel_config_t ledc_channel = {
.speed_mode = group, .channel = (channel % 8), .timer_sel = timer, .intr_type = LEDC_INTR_DISABLE, .gpio_num = pin, .duty = duty, .hpoint = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment