Chris Dick
/
Gameduino_Invaders_game
Invaders game for the Gameduino
Diff: joystick.h
- Revision:
- 4:e82f4a87df9e
- Parent:
- 2:20a89dc286d5
--- a/joystick.h Fri Dec 21 13:53:46 2012 +0000 +++ b/joystick.h Sat Oct 26 22:32:18 2013 +0000 @@ -13,6 +13,14 @@ //#include "WProgram.h" #include "arduino.h" + +#define STICK_LEFT_BIT 0x01 +#define STICK_RIGHT_BIT 0x02 +#define STICK_UP_BIT 0x04 +#define STICK_DOWN_BIT 0x08 +#define ANALOG_STICK_BIT 0x80 +#define STICK_INFO_MASK (ANALOG_STICK_BIT) + class Joystick { byte buttons; // State of buttons, packed into a byte byte prev; // State of the buttons on previous read