summaryrefslogtreecommitdiff
path: root/src/kernel/ao_data.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-02 16:19:39 -0700
committerKeith Packard <keithp@keithp.com>2016-05-02 16:19:39 -0700
commitb540f6f5b034f33b8e1d1c3b91e2403a56479caa (patch)
tree3a46c6fbacdf87631ce429d1ef137ba0ac0ca519 /src/kernel/ao_data.h
parent0b0b359cbce6b818257b44b2a6aee0edcbaee40d (diff)
altos: Make sure AO_MMA655X_INVERT is declared where needed
Add #define AO_MMA655X_INVERT 0 to existing products which didn't declare it at all. This will make sure the value is set correctly for each new board. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_data.h')
-rw-r--r--src/kernel/ao_data.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/kernel/ao_data.h b/src/kernel/ao_data.h
index 8f75ad87..6ee0965d 100644
--- a/src/kernel/ao_data.h
+++ b/src/kernel/ao_data.h
@@ -269,6 +269,10 @@ typedef int16_t accel_t;
#define AO_ACCEL_INVERT 4095
+#ifndef AO_MMA655X_INVERT
+#error AO_MMA655X_INVERT not defined
+#endif
+
#define ao_data_accel(packet) ((packet)->mma655x)
#if AO_MMA655X_INVERT
#define ao_data_accel_cook(packet) (AO_ACCEL_INVERT - (packet)->mma655x)