Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Gamepad.h
- Revision:
- 16:3ea3d9714b0c
- Parent:
- 15:c582b3326d44
- Child:
- 17:cf1e1ffcf773
diff -r c582b3326d44 -r 3ea3d9714b0c Gamepad.h
--- a/Gamepad.h	Fri Mar 03 13:12:03 2017 +0000
+++ b/Gamepad.h	Fri Mar 03 13:19:19 2017 +0000
@@ -42,23 +42,6 @@
     float angle; /**< float for angle (in degrees) */
 };
 
-
-/** Gamepad events 
- * @brief List of events that can be registered on the gamepad
- */
-enum GamepadEvent {
-    EVENT_A_PRESSED,     ///< Button A has been pressed
-    EVENT_B_PRESSED,     ///< Button B has been pressed
-    EVENT_X_PRESSED,     ///< Button X has been pressed
-    EVENT_Y_PRESSED,     ///< Button Y has been pressed
-    EVENT_L_PRESSED,     ///< Button L has been pressed
-    EVENT_R_PRESSED,     ///< Button R has been pressed
-    EVENT_BACK_PRESSED,  ///< Button "Back" has been pressed
-    EVENT_START_PRESSED, ///< Button "Start" has been pressed
-    EVENT_JOY_PRESSED,   ///< Joystick button has been pressed
-    N_EVENTS             ///< A dummy flag that marks the end of the list
-};
-
 /** Gamepad Class
 @brief Library for interfacing with ELEC2645 Gamepad PCB, University of Leeds
 @author Dr Craig A. Evans
@@ -66,6 +49,22 @@
 */
 class Gamepad
 {
+    public:
+    /** Gamepad events 
+ * @brief List of events that can be registered on the gamepad
+ */
+enum GamepadEvent {
+    A_PRESSED,     ///< Button A has been pressed
+    B_PRESSED,     ///< Button B has been pressed
+    X_PRESSED,     ///< Button X has been pressed
+    Y_PRESSED,     ///< Button Y has been pressed
+    L_PRESSED,     ///< Button L has been pressed
+    R_PRESSED,     ///< Button R has been pressed
+    BACK_PRESSED,  ///< Button "Back" has been pressed
+    START_PRESSED, ///< Button "Start" has been pressed
+    JOY_PRESSED,   ///< Joystick button has been pressed
+    N_EVENTS       ///< A dummy flag that marks the end of the list
+};
 private:
     mbed::PwmOut *_led1;
     mbed::PwmOut *_led2;