aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/e300/rev_b/i2c.h
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-10-07 11:32:14 +0200
committerMartin Braun <martin.braun@ettus.com>2014-10-07 12:09:33 +0200
commit1b149f561370687ad65e3aa644a402f00dbd16ea (patch)
treeab86042840fa1369d64bca56c5f3a64d1a4f1f72 /firmware/e300/rev_b/i2c.h
parentfd3e84941de463fa1a7ebab0a69515b4bf2614cd (diff)
downloaduhd-1b149f561370687ad65e3aa644a402f00dbd16ea.tar.gz
uhd-1b149f561370687ad65e3aa644a402f00dbd16ea.tar.bz2
uhd-1b149f561370687ad65e3aa644a402f00dbd16ea.zip
Initial commit E300 support.
Diffstat (limited to 'firmware/e300/rev_b/i2c.h')
-rw-r--r--firmware/e300/rev_b/i2c.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/firmware/e300/rev_b/i2c.h b/firmware/e300/rev_b/i2c.h
new file mode 100644
index 000000000..5898e7e43
--- /dev/null
+++ b/firmware/e300/rev_b/i2c.h
@@ -0,0 +1,17 @@
+#ifndef I2C_H
+#define I2C_H
+
+#include "io.h"
+
+void i2c_init(io_pin_t sda, io_pin_t scl);
+bool i2c_read(io_pin_t sda, io_pin_t scl, uint8_t addr, uint8_t subaddr, uint8_t* value);
+bool i2c_write(io_pin_t sda, io_pin_t scl, uint8_t addr, uint8_t subaddr, uint8_t value);
+
+void i2c_init_ex(io_pin_t sda, io_pin_t scl, bool pull_up);
+bool i2c_read_ex(io_pin_t sda, io_pin_t scl, uint8_t addr, uint8_t subaddr, uint8_t* value, bool pull_up);
+bool i2c_read2_ex(io_pin_t sda, io_pin_t scl, uint8_t addr, uint8_t subaddr, uint8_t* value, bool pull_up);
+bool i2c_write_ex(io_pin_t sda, io_pin_t scl, uint8_t addr, uint8_t subaddr, uint8_t value, bool pull_up);
+
+extern volatile bool _i2c_disable_ack_check;
+
+#endif // I2C_H