SNAKE GAME

Dependencies:   mbed wave_player 4DGL-uLCD-SE MMA8452

Revision:
0:24041b847eb5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hardware.h	Wed Nov 25 04:25:25 2020 +0000
@@ -0,0 +1,32 @@
+// Copyright 2020 Georgia Tech.  All rights reserved.
+// The materials provided by the instructor in this course are for
+// the use of the students currently enrolled in the course.
+// Copyrighted course materials may not be further disseminated.
+// This file must not be made publicly available anywhere.
+
+#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