We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d92ede commit 7acd875Copy full SHA for 7acd875
cores/esp32/esp32-hal-ledc.c
@@ -92,7 +92,7 @@ bool ledcAttachChannel(uint8_t pin, uint32_t freq, uint8_t resolution, uint8_t c
92
return false;
93
}
94
95
- uint32_t duty = ledc_get_duty(group, channel);
+ uint32_t duty = ledc_get_duty(group, (channel % 8));
96
97
ledc_channel_config_t ledc_channel = {
98
.speed_mode = group, .channel = (channel % 8), .timer_sel = timer, .intr_type = LEDC_INTR_DISABLE, .gpio_num = pin, .duty = duty, .hpoint = 0
0 commit comments