aboutsummaryrefslogtreecommitdiff
path: root/i2c.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 /i2c.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 'i2c.h')
-rw-r--r--i2c.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/i2c.h b/i2c.h
index 1090ee2..fb481e3 100644
--- a/i2c.h
+++ b/i2c.h
@@ -1,17 +1,17 @@
#ifndef TW_H
#define TW_H
-typedef enum {
- TWM_INVALID = 0,
- TWM_WRITE,
- TWM_READ,
-} twMode;
-
-typedef enum {
- TWST_WAIT = 0,
- TWST_OK = 1,
- TWST_ERR = 2,
-} twStatus;
+#include <stdint.h>
+
+typedef uint8_t twMode;
+#define TWM_INVALID 0
+#define TWM_WRITE 1
+#define TWM_READ 2
+
+typedef uint8_t twStatus;
+#define TWST_WAIT 0
+#define TWST_OK 1
+#define TWST_ERR 2
#include <stdint.h>