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.
Fork of FivePosSwitch by
Diff: FivePosSwitch.h
- Revision:
- 3:dcb9eef119cf
- Parent:
- 2:a415472059c3
- Child:
- 4:10c4b7cb4e8c
diff -r a415472059c3 -r dcb9eef119cf FivePosSwitch.h --- 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