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 wave_player 4DGL-uLCD-SE MMA8452
hardware.h
00001 // Copyright 2020 Georgia Tech. All rights reserved. 00002 // The materials provided by the instructor in this course are for 00003 // the use of the students currently enrolled in the course. 00004 // Copyrighted course materials may not be further disseminated. 00005 // This file must not be made publicly available anywhere. 00006 00007 #ifndef HARDWARE_H 00008 #define HARDWARE_H 00009 00010 /** 00011 * Structure that represents all the inputs to the game. 00012 * If additional hardware is added, new elements should be added to this struct. 00013 */ 00014 struct GameInputs { 00015 int b1, b2, b3; // Button presses 00016 double ax, ay, az; // Accelerometer readings 00017 }; 00018 00019 /** 00020 * Initialize all the hardware. 00021 */ 00022 int hardware_init(); 00023 00024 /** 00025 * Read all the user inputs. 00026 * This is all input hardware interaction should happen. 00027 * Returns a GameInputs struct that has all the inputs recorded. 00028 * This GameInputs is used elsewhere to compute the game update. 00029 */ 00030 GameInputs read_inputs(); 00031 00032 #endif // HARDWARE_H
Generated on Mon Aug 1 2022 15:08:58 by
