Debounce an input pin.

Files at this revision

API Documentation at this revision

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;