ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
9:3a7776a29a11
Parent:
5:3efbdcb3efaf
Child:
12:beb0d7632531
--- a/Input/Input.h	Fri Mar 15 16:39:06 2019 +0000
+++ b/Input/Input.h	Fri Mar 15 20:30:01 2019 +0000
@@ -1,4 +1,13 @@
 class Input {
 public:
+    static const int NUMBER_OF_BUTTONS = 4; 
+    enum Button {LEFT, RIGHT, UP, DOWN};
+    enum State {RELEASED, RELEASED_FRAME, HIT_FRAME, HELD};
+    static void init();
+    static void deinit();
     static void update();
+    static bool buttonHit(Button button);
+    static bool buttonHeld(Button button);
+private:
+    static State states[NUMBER_OF_BUTTONS];
 };
\ No newline at end of file