Henk Meewis / Mbed 2 deprecated USB_serial_LED_controller

Dependencies:   mbed

Fork of frdm_echo by Henk Meewis

Revision:
13:019e24491f32
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PushButtons.h	Fri Apr 18 21:33:57 2014 +0000
@@ -0,0 +1,22 @@
+#ifndef pushbuttons_h__
+#define pushbuttons_h__
+
+typedef enum {pb2 = 0, pb3} ePushButton;
+
+class PushButtons {
+public:
+    PushButtons();
+    bool tick10ms();
+    bool getJustPressed(ePushButton);
+    bool getPressed(ePushButton);
+private:
+    void reset(ePushButton);
+    void process(ePushButton);
+    DigitalIn *getPointer(ePushButton);
+
+    DigitalIn *sw2, *sw3;
+    uint32_t timer[2];
+    bool justPressed[2], oldPressed[2];
+};
+
+#endif
\ No newline at end of file