ECE 2035 final project

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Committer:
npatel387
Date:
Mon Apr 15 12:25:08 2019 +0000
Revision:
2:22d36e7740f1
Parent:
0:35660d7952f7
final;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
rconnorlawson 0:35660d7952f7 1 #ifndef HARDWARE_H
rconnorlawson 0:35660d7952f7 2 #define HARDWARE_H
rconnorlawson 0:35660d7952f7 3
rconnorlawson 0:35660d7952f7 4 /**
rconnorlawson 0:35660d7952f7 5 * Structure that represents all the inputs to the game.
rconnorlawson 0:35660d7952f7 6 * If additional hardware is added, new elements should be added to this struct.
rconnorlawson 0:35660d7952f7 7 */
rconnorlawson 0:35660d7952f7 8 struct GameInputs {
rconnorlawson 0:35660d7952f7 9 int b1, b2, b3; // Button presses
rconnorlawson 0:35660d7952f7 10 double ax, ay, az; // Accelerometer readings
rconnorlawson 0:35660d7952f7 11 };
rconnorlawson 0:35660d7952f7 12
rconnorlawson 0:35660d7952f7 13 /**
rconnorlawson 0:35660d7952f7 14 * Initialize all the hardware.
rconnorlawson 0:35660d7952f7 15 */
rconnorlawson 0:35660d7952f7 16 int hardware_init();
rconnorlawson 0:35660d7952f7 17
rconnorlawson 0:35660d7952f7 18 /**
rconnorlawson 0:35660d7952f7 19 * Read all the user inputs.
rconnorlawson 0:35660d7952f7 20 * This is all input hardware interaction should happen.
rconnorlawson 0:35660d7952f7 21 * Returns a GameInputs struct that has all the inputs recorded.
rconnorlawson 0:35660d7952f7 22 * This GameInputs is used elsewhere to compute the game update.
rconnorlawson 0:35660d7952f7 23 */
rconnorlawson 0:35660d7952f7 24 GameInputs read_inputs();
rconnorlawson 0:35660d7952f7 25
rconnorlawson 0:35660d7952f7 26 #endif // HARDWARE_H