diff options
author | Mike Fiore <mfiore@multitech.com> | 2015-11-13 15:52:30 -0600 |
---|---|---|
committer | Mike Fiore <mfiore@multitech.com> | 2015-11-13 15:52:30 -0600 |
commit | 200cc21381486ccec1f4855f638a8e1046a401d8 (patch) | |
tree | 04c396de4d8d54d198a15178458153a843fad1b1 /ButtonHandler/ButtonHandler.h | |
parent | 5d2d8214d69d6a20066ff01a1f9c3861331ef014 (diff) | |
download | mtdot-box-evb-factory-firmware-200cc21381486ccec1f4855f638a8e1046a401d8.tar.gz mtdot-box-evb-factory-firmware-200cc21381486ccec1f4855f638a8e1046a401d8.tar.bz2 mtdot-box-evb-factory-firmware-200cc21381486ccec1f4855f638a8e1046a401d8.zip |
refactor button class to run a thread - handle button holds when the threshold is reached, not when the button is released
Diffstat (limited to 'ButtonHandler/ButtonHandler.h')
-rw-r--r-- | ButtonHandler/ButtonHandler.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ButtonHandler/ButtonHandler.h b/ButtonHandler/ButtonHandler.h index cfca1d7..57f768d 100644 --- a/ButtonHandler/ButtonHandler.h +++ b/ButtonHandler/ButtonHandler.h @@ -20,13 +20,13 @@ class ButtonHandler { ButtonEvent getButtonEvent(); - private: void sw1_fall(); void sw1_rise(); void sw2_fall(); void sw2_rise(); osThreadId _main; + Thread _thread; InterruptIn _sw1; InterruptIn _sw2; Timer _sw1_timer; |