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: mbed
Fork of el17ajf by
Input/Input.h
- Committer:
- el17ajf
- Date:
- 2019-03-15
- Revision:
- 9:3a7776a29a11
- Parent:
- 5:3efbdcb3efaf
- Child:
- 12:beb0d7632531
File content as of revision 9:3a7776a29a11:
class Input { public: static const int NUMBER_OF_BUTTONS = 4; enum Button {LEFT, RIGHT, UP, DOWN}; enum State {RELEASED, RELEASED_FRAME, HIT_FRAME, HELD}; static void init(); static void deinit(); static void update(); static bool buttonHit(Button button); static bool buttonHeld(Button button); private: static State states[NUMBER_OF_BUTTONS]; };