Skip to content

Commit

Permalink
fixup! cpu/esp8266: fix of set func in periph/pwm
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Jun 24, 2019
1 parent ace61bd commit 1d744ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpu/esp8266/periph/pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ void pwm_set(pwm_t pwm, uint8_t channel, uint16_t value)
next_off = next_on + value;

if (_pwm_dev.cycles < next_on) {
next_on = next_on + _pwm_dev.res;
next_on += _pwm_dev.res;
}
if (_pwm_dev.cycles < next_off) {
next_off = next_off + _pwm_dev.res;
next_off += _pwm_dev.res;
}

_pwm_dev.chn[channel].next_on = next_on;
Expand Down

0 comments on commit 1d744ba

Please sign in to comment.