Debounce_Library

Dependents:   EJ3_Cafetera EJ1

Revision:
0:16d62113f1d5
Child:
1:8db2c2a203d9
Child:
2:d1e2599de47c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/antirrebote.h	Thu May 03 23:32:45 2018 +0000
@@ -0,0 +1,28 @@
+#ifndef _ANTIRREBOTE_H_
+#define _ANTIRREBOTE_H_
+#include "mbed.h"
+
+enum{NO_APRETADO,ENCENDIDO=0, APRETADO, APAGADO = 1};
+typedef int pinEstado_t;
+
+
+class AntReb{
+    
+    public:
+
+        AntReb();
+        ~AntReb();
+
+        pinEstado_t antiRebote();
+        
+        void setPin(DigitalIn pin);
+
+    private:
+
+        
+        char e_PULS;
+        char P_PULS;
+    
+};
+    
+#endif
\ No newline at end of file