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.
Dependencies: 4DGL-uLCD-SE PinDetect mbed
joystick.h
00001 #ifndef JOYSTICK_H 00002 #define JOYSTICK_H 00003 00004 #include "mbed.h" 00005 00006 class Nav_Switch 00007 { 00008 public: 00009 Nav_Switch(PinName up,PinName down,PinName left,PinName right,PinName fire); 00010 int read(); 00011 //boolean functions to test each switch 00012 bool up(); 00013 bool down(); 00014 bool left(); 00015 bool right(); 00016 bool fire(); 00017 //automatic read on RHS 00018 operator int (); 00019 //index to any switch array style 00020 bool operator[](int index) { 00021 return _pins[index]; 00022 }; 00023 private: 00024 BusIn _pins; 00025 }; 00026 00027 00028 00029 #endif
Generated on Tue Nov 22 2022 16:42:34 by
1.7.2