Debounce InterruptIn

Dependents:   led_sigfox Allumag_lampe_sigfox Case_study_02_Turnstile B18_MP3_PLAYER ... more

Revision:
12:7022ffaa74f5
Parent:
11:af6d7dc34062
Child:
13:09b53a088a9c
--- a/DebouncedInterrupt.h	Tue Feb 18 16:34:23 2014 +0000
+++ b/DebouncedInterrupt.h	Tue Feb 18 16:47:32 2014 +0000
@@ -35,8 +35,8 @@
 class DebouncedInterrupt {
 private:
     unsigned int _debounce_us;
-    unsigned int _debounce_count;
-    unsigned int _last_debounce_count;
+    volatile unsigned int _debounce_count;
+    volatile unsigned int _last_debounce_count;
     InterruptIn *_in;
     
     void (*fCallback)(void);