diff options
Diffstat (limited to 'src/button.h')
| -rw-r--r-- | src/button.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/button.h b/src/button.h index 8aa7442..5152336 100644 --- a/src/button.h +++ b/src/button.h @@ -1,19 +1,22 @@ #ifndef _LOADED_BUTTON #define _LOADED_BUTTON #include <stdbool.h> -#include <stdint.h> + +#include "mode.h" #define DEBOUNCE_TICK_COUNT 10 #define LONG_PRESS_TICK_COUNT 60 #define MAX_TICK_COUNT 80 +#define BUTTON_INACTIVE_TICK_COUNT 10 + +bool extern is_button_active; -enum ButtonState { - BUTTON_IDLE = 0, - BUTTON_PRESSED = 1, - BUTTON_LONG_PRESSED = 2, -}; +void button_tick(); +enum ButtonState check_button_state(); + +// Exposed for test uint16_t extern button_tick_count; +uint16_t extern button_inactive_for_ticks; -void button_tick(); #endif |
