aboutsummaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-01-29 11:29:43 +0100
committerLars-Dominik Braun <lars@6xq.net>2015-01-29 11:29:43 +0100
commit708e9eb417ddf41ec345f2be70c4a32721608e4c (patch)
treed33c3c341f4a0aeac3966be3c6e1ca27eb94a7bc /common.h
parentaf4ea653a341f3c25cfbb2e7ec4b633bf73913a7 (diff)
downloadhourglass-708e9eb417ddf41ec345f2be70c4a32721608e4c.tar.gz
hourglass-708e9eb417ddf41ec345f2be70c4a32721608e4c.tar.bz2
hourglass-708e9eb417ddf41ec345f2be70c4a32721608e4c.zip
Replace enums with uint8_t
Saves a few bytes, since enums are 16 bit
Diffstat (limited to 'common.h')
-rw-r--r--common.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/common.h b/common.h
index e879e92..42737eb 100644
--- a/common.h
+++ b/common.h
@@ -27,12 +27,10 @@
extern volatile uint8_t wakeup;
/* wakeup sources */
-enum {
- WAKE_ACCEL = 0,
- WAKE_GYRO = 1,
- WAKE_I2C = 2,
- WAKE_TIMER = 3,
-};
+#define WAKE_ACCEL 0
+#define WAKE_GYRO 1
+#define WAKE_I2C 2
+#define WAKE_TIMER 3
#define shouldWakeup(x) (wakeup & (1 << x))
#define enableWakeup(x) wakeup |= 1 << x;