Skip to content

Commit

Permalink
Describe a wider branching to free the blink state
Browse files Browse the repository at this point in the history
  • Loading branch information
Enophi committed Oct 20, 2021
1 parent 0c12abd commit b2ad22f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/mgos_pcf857x.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ bool mgos_pcf857x_gpio_set_button_handler(struct mgos_pcf857x *dev, int pin, enu

/*
* A utility function that takes care of blinking an LED.
* Set to (0, 0) to disable.
* Set either on_ms or off_ms to 0 to disable
*/
bool mgos_pcf857x_gpio_blink(struct mgos_pcf857x *dev, int pin, int on_ms, int off_ms);

Expand Down
2 changes: 1 addition & 1 deletion src/mgos_pcf857x.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ bool mgos_pcf857x_gpio_blink(struct mgos_pcf857x *dev, int pin, int on_ms, int o
mgos_pcf857x_gpio_blink_cb, bs);
res = (bs->timer_id != MGOS_INVALID_TIMER_ID);
LD("Set timer for PIN-%d (on=%dms, off=%dms)", bs->pin, bs->on_ms, bs->off_ms);
} else if(on_ms == 0 && off_ms == 0) {
} else {
mgos_pcf857x_clear_blink_state(bs->pin);
}
}
Expand Down

0 comments on commit b2ad22f

Please sign in to comment.