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 4DGL-uLCD-SE MMA8452
Diff: inputs/inputs.h
- Revision:
- 4:fb7d49e660f2
- Parent:
- 3:0e14def93d4e
diff -r 0e14def93d4e -r fb7d49e660f2 inputs/inputs.h
--- a/inputs/inputs.h Fri Mar 15 20:46:37 2019 -0400
+++ b/inputs/inputs.h Sat Mar 16 05:25:19 2019 +0000
@@ -1,11 +1,29 @@
#pragma once
+#include "MMA8452.h"
+#include "mbed.h"
+
+#define NO_ACTION 0
+#define ACTION_BUTTON 1
+#define BOMB_BUTTON 2
+#define GO_LEFT 3
+#define GO_RIGHT 4
+#define GO_UP 5
+#define GO_DOWN 6
typedef struct{
//buttons
char b1, b2, b3;
//accelerometer
- char a_x, a_y;
+ double a_x, a_y, a_z;
//implement more inputs here if needed
- }conditions;
\ No newline at end of file
+ }inputs;
+
+extern "C" {
+ int get_inputs(void);
+}
+
+extern "C" {
+ void inputs_init(void);
+}
\ No newline at end of file