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 26, 2019
1 parent 1d744ba commit d3b11fc
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 @@ -203,10 +203,10 @@ void pwm_set(pwm_t pwm, uint8_t channel, uint16_t value)

next_off = next_on + value;

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

Expand Down

0 comments on commit d3b11fc

Please sign in to comment.