Bryce Williams / FivePosSwitch

Fork of FivePosSwitch by Bryce Williams

Revision:
3:dcb9eef119cf
Parent:
2:a415472059c3
Child:
4:10c4b7cb4e8c
--- a/FivePosSwitch.h	Sun Oct 04 19:31:36 2015 +0000
+++ b/FivePosSwitch.h	Sun Oct 04 19:50:26 2015 +0000
@@ -48,7 +48,7 @@
 #define FIVE_POS_SWITCH
 #include "mbed.h"
 
-enum ACTIVE_POSITION{NONE, UP, CENTER, LEFT, DOWN, RIGHT};
+typedef enum {NONE, UP, CENTER, LEFT, DOWN, RIGHT}ACTIVE_POSITION_t;
 
 class FivePosSwitch{
     public:
@@ -59,7 +59,7 @@
         /** Get the currently pressed switch position
             @return The currently pressed switch position 
         */
-        ACTIVE_POSITION getPosition();
+        ACTIVE_POSITION_t getPosition();
     private:
         AnalogIn _pin;
         static const float TOLERANCE = 0.075;     // Allowable tolerance in evaluating for active switch