We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 236e8f3 commit 285e898Copy full SHA for 285e898
cores/esp32/esp32-hal-ledc.c
@@ -89,7 +89,7 @@ void ledcWrite(uint8_t chan, uint32_t duty)
89
//Fixing if all bits in resolution is set = LEDC FULL ON
90
uint32_t max_duty = (1 << channels_resolution[chan]) - 1;
91
92
- if(duty == max_duty){
+ if((duty == max_duty) && (max_duty != 1)){
93
duty = max_duty + 1;
94
}
95
0 commit comments