Debounce an input pin.
Revision 1:b80f4620fbbd, committed 2015-03-28
- Comitter:
- michaelruck
- Date:
- Sat Mar 28 18:42:14 2015 +0000
- Parent:
- 0:d73a3ab5ce11
- Commit message:
- Debounce an input pin.
Changed in this revision
Debounce.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Debounce.cpp Sat Mar 28 18:36:46 2015 +0000 +++ b/Debounce.cpp Sat Mar 28 18:42:14 2015 +0000 @@ -20,7 +20,7 @@ if((encbutton_state != encbutton_state_old) && (systime > systime_old+_delay)) { encbutton=encbutton_state; systime_old=systime; - printf("Button=%i\r\n", encbutton); + //printf("Button=%i\r\n", encbutton); } encbutton_state_old=encbutton_state; return encbutton;