Class used to interface with the handheld gamepad.

Fork of Gamepad by Craig Evans

Revision:
0:a6288c29b936
Child:
1:6d25cd49059b
diff -r 000000000000 -r a6288c29b936 Gamepad.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Gamepad.h	Sat Feb 04 15:31:44 2017 +0000
@@ -0,0 +1,44 @@
+#ifndef GAMEPAD_H
+#define GAMEPAD_H
+
+#include "mbed.h"
+#include "N5110.h"
+#include "Joystick.h"
+
+class Gamepad
+{
+
+public:
+
+    Gamepad();
+    N5110 *lcd;
+    Joystick *joystick;
+
+    void init();
+    void leds_on();
+    void leds_off();
+
+private:
+
+    PwmOut *led_1;
+    PwmOut *led_2;
+    PwmOut *led_3;
+    PwmOut *led_4;
+    PwmOut *led_5;
+    PwmOut *led_6;
+
+    InterruptIn *button_A(PTB9);
+    InterruptIn *button_B(D10);
+    InterruptIn *button_X(PTC17);
+    InterruptIn *button_Y(PTC12);  // changed pin
+    InterruptIn *button_back(PTB19);
+    InterruptIn *button_start(PTC5);
+    InterruptIn *button_L(PTB18);
+    InterruptIn *button_R(PTB3);
+    
+    PwmOut *buzzer(PTC10);
+    AnalogIn *pot(PTB2);
+
+};
+
+#endif
\ No newline at end of file