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 SDFileSystem mbed-rtos mbed wave_player
Nav_Switch.h
- Committer:
- nini1294
- Date:
- 2016-10-31
- Revision:
- 0:c9df12bcc92d
File content as of revision 0:c9df12bcc92d:
#include "mbed.h"
class Nav_Switch
{
public:
Nav_Switch(PinName up,PinName down,PinName left,PinName right,PinName fire);
int read();
//boolean functions to test each switch
bool up();
bool down();
bool left();
bool right();
bool fire();
//automatic read on RHS
operator int ();
//index to any switch array style
bool operator[](int index) {
return _pins[index];
};
private:
BusIn _pins;
};