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.
hardware.h
00001 #ifndef HARDWARE_H 00002 #define HARDWARE_H 00003 00004 /** 00005 * Structure that represents all the inputs to the game. 00006 * If additional hardware is added, new elements should be added to this struct. 00007 */ 00008 struct UserInputs { 00009 int b1, b2, b3, b4; // Button presses 00010 double ax, ay, az; // Accelerometer readings 00011 }; 00012 00013 /** 00014 * Initialize all the hardware. 00015 */ 00016 int hardware_init(); 00017 00018 /** 00019 * Read all the user inputs. 00020 * This is all input hardware interaction should happen. 00021 * Returns a GameInputs struct that has all the inputs recorded. 00022 * This GameInputs is used elsewhere to compute the game update. 00023 */ 00024 UserInputs read_inputs(); 00025 00026 #endif // HARDWARE_H
Generated on Thu Sep 1 2022 20:44:59 by
1.7.2