Skip to content

Commit 285e898

Browse files
authored
fixed 1bit mode duty (#7079)
1 parent 236e8f3 commit 285e898

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cores/esp32/esp32-hal-ledc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ void ledcWrite(uint8_t chan, uint32_t duty)
8989
//Fixing if all bits in resolution is set = LEDC FULL ON
9090
uint32_t max_duty = (1 << channels_resolution[chan]) - 1;
9191

92-
if(duty == max_duty){
92+
if((duty == max_duty) && (max_duty != 1)){
9393
duty = max_duty + 1;
9494
}
9595

0 commit comments

Comments
 (0)