summaryrefslogtreecommitdiff
path: root/src/i2c.h
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-01-24 16:42:58 +0100
committerDaniel Friesel <derf@finalrewind.org>2016-01-24 16:42:58 +0100
commitd6b2c7707b92f6daada2577dac51ba226f7b5046 (patch)
tree8cbf1c696da5363cf3c9451f27a6fa833202bb38 /src/i2c.h
parentb69f2a177a4613d1d9ccf93b5fe2f7dff68f468a (diff)
I2C proof of concept: works!
Diffstat (limited to 'src/i2c.h')
-rw-r--r--src/i2c.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/i2c.h b/src/i2c.h
new file mode 100644
index 0000000..818db23
--- /dev/null
+++ b/src/i2c.h
@@ -0,0 +1,14 @@
+#include <avr/io.h>
+#include <avr/interrupt.h>
+#include <stdlib.h>
+
+#define I2C_EEPROM_ADDR 0x50
+
+class I2C {
+ public:
+ I2C() {};
+ void enable();
+ void xmit(int num_tx, int num_rx, uint8_t *txbuf, uint8_t *rxbuf);
+};
+
+extern I2C i2c;