fixed 1bit mode duty (#7079)
This commit is contained in:
parent
236e8f31ee
commit
285e898604
1 changed files with 1 additions and 1 deletions
|
|
@ -89,7 +89,7 @@ void ledcWrite(uint8_t chan, uint32_t duty)
|
||||||
//Fixing if all bits in resolution is set = LEDC FULL ON
|
//Fixing if all bits in resolution is set = LEDC FULL ON
|
||||||
uint32_t max_duty = (1 << channels_resolution[chan]) - 1;
|
uint32_t max_duty = (1 << channels_resolution[chan]) - 1;
|
||||||
|
|
||||||
if(duty == max_duty){
|
if((duty == max_duty) && (max_duty != 1)){
|
||||||
duty = max_duty + 1;
|
duty = max_duty + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue