Robrecht Daems
/
PGO6_VoteController_template
Robrecht Daems
Fork of PGO6_VoteController_template by
Diff: debounce_button.h
- Revision:
- 2:b47f54fdea91
- Parent:
- 0:fd29cd85e75e
diff -r 34e76c0cbe5a -r b47f54fdea91 debounce_button.h --- a/debounce_button.h Sun Oct 29 23:01:06 2017 +0000 +++ b/debounce_button.h Mon Oct 30 16:44:56 2017 +0000 @@ -12,7 +12,9 @@ extern volatile bool button1_pressed; // Used in the main loop extern volatile bool button1_enabled; // Used for debouncing extern volatile int multiclick_state; // Counts how many clicks occured in the time slot, used in main loop +extern volatile int last_multiclick_state; // Counts how many clicks occured in the previous timeslot extern volatile bool button1_busy; // Informs the mainloop that the user is clicking the button +extern volatile bool result_ready; void button1_multiclick_reset_cb(void); // Resets the amount of clicks, but stores this value for the usage in the main loop void button1_enabled_cb(void); // Enables the button again after a timeout, used for debouncing the button