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-04-29
- Revision:
- 39:e128071a95b0
- Parent:
- 31:69fedaa9b171
File content as of revision 39:e128071a95b0:
#ifndef INPUT_H
#define INPUT_H
/**
* Input Namespace
* @brief Namespace providing functions to
* interface with SampledIn objects for each button used.
*/
namespace Input {
/**
* @brief Button Enum represeting each button used for controling the game
* The directional button are labeled as follows on the pcb
* LEFT -> A
* RIGHT -> Y
* UP -> X
* DOWN -> B
*/
enum Button {LEFT, RIGHT, UP, DOWN, START};
/**
* @input A button from the Button enum
* @see Button
* @returns True if the button was hit this frame, else false
*/
bool buttonHit(Button button);
/**
* @returns A random seed for the random generator,
* based on the Analogue Input from the joystick.
*/
int getSeed();
};
#endif
