summaryrefslogtreecommitdiff
path: root/ButtonHandler/ButtonHandler.h
diff options
context:
space:
mode:
authorMike Fiore <mfiore@multitech.com>2015-11-13 13:07:21 -0600
committerMike Fiore <mfiore@multitech.com>2015-11-13 13:07:21 -0600
commit1c3cf27c5676d976d3a4b6b70420119b6541250e (patch)
tree5412794cf16acd0b36fffe1bcd869de29bb28cd2 /ButtonHandler/ButtonHandler.h
parent85d312c5b3231941ba01bfe2f2fdcd1bc9a59444 (diff)
downloadmtdot-box-evb-factory-firmware-1c3cf27c5676d976d3a4b6b70420119b6541250e.tar.gz
mtdot-box-evb-factory-firmware-1c3cf27c5676d976d3a4b6b70420119b6541250e.tar.bz2
mtdot-box-evb-factory-firmware-1c3cf27c5676d976d3a4b6b70420119b6541250e.zip
update ButtonHandler - ignore presses less than 20 ms
Diffstat (limited to 'ButtonHandler/ButtonHandler.h')
-rw-r--r--ButtonHandler/ButtonHandler.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/ButtonHandler/ButtonHandler.h b/ButtonHandler/ButtonHandler.h
index 3eb8298..cfca1d7 100644
--- a/ButtonHandler/ButtonHandler.h
+++ b/ButtonHandler/ButtonHandler.h
@@ -24,13 +24,20 @@ class ButtonHandler {
void sw1_fall();
void sw1_rise();
void sw2_fall();
+ void sw2_rise();
osThreadId _main;
InterruptIn _sw1;
InterruptIn _sw2;
Timer _sw1_timer;
+ Timer _sw2_timer;
time_t _sw1_time;
+ time_t _sw2_time;
+ bool _sw1_running;
+ bool _sw2_running;
ButtonEvent _event;
+ time_t _debounce_time;
+ time_t _hold_threshold;
};
#endif