avr: initial commit
[z80.git] / avr / i2c.h
diff --git a/avr/i2c.h b/avr/i2c.h
new file mode 100644 (file)
index 0000000..6b327f1
--- /dev/null
+++ b/avr/i2c.h
@@ -0,0 +1,14 @@
+/* I2C communication header */
+#ifndef _I2C_H_
+#define _I2C_H_
+
+#define I2C_ALOW       0x20
+#define I2C_AHIGH      0x21
+#define I2C_DATA       0x22
+
+void i2c_init(void);
+void i2c_test(void);
+uint8_t i2c_read(uint8_t addr);
+void i2c_write(uint8_t addr, uint8_t data);
+
+#endif /* _I2C_H_ */