![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
baseline features - a little buggy
Dependencies: mbed wave_player 4DGL-uLCD-SE MMA8452
Diff: hardware.h
- Revision:
- 0:95264f964374
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hardware.h Mon Mar 29 21:17:26 2021 -0400 @@ -0,0 +1,26 @@ +#ifndef HARDWARE_H +#define HARDWARE_H + +/** + * Structure that represents all the inputs to the game. + * If additional hardware is added, new elements should be added to this struct. + */ +struct GameInputs { + int b1, b2, b3; // Button presses + double ax, ay, az; // Accelerometer readings +}; + +/** + * Initialize all the hardware. + */ +int hardware_init(); + +/** + * Read all the user inputs. + * This is all input hardware interaction should happen. + * Returns a GameInputs struct that has all the inputs recorded. + * This GameInputs is used elsewhere to compute the game update. + */ +GameInputs read_inputs(); + +#endif // HARDWARE_H \ No newline at end of file