summaryrefslogtreecommitdiff
path: root/firmware/export/generic_i2c.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/generic_i2c.h')
-rw-r--r--firmware/export/generic_i2c.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/firmware/export/generic_i2c.h b/firmware/export/generic_i2c.h
index f38728589d..6679b78415 100644
--- a/firmware/export/generic_i2c.h
+++ b/firmware/export/generic_i2c.h
@@ -23,9 +23,6 @@
23 23
24struct i2c_interface 24struct i2c_interface
25{ 25{
26 unsigned char address; /* Address of the chip that this interface
27 describes */
28
29 void (*scl_hi)(void); /* Drive SCL high, might sleep on clk stretch */ 26 void (*scl_hi)(void); /* Drive SCL high, might sleep on clk stretch */
30 void (*scl_lo)(void); /* Drive SCL low */ 27 void (*scl_lo)(void); /* Drive SCL low */
31 void (*sda_hi)(void); /* Drive SDA high */ 28 void (*sda_hi)(void); /* Drive SDA high */
@@ -47,9 +44,11 @@ struct i2c_interface
47 void (*delay_thigh)(void); /* SCL high period (tHIGH) 4.0us/0.6us */ 44 void (*delay_thigh)(void); /* SCL high period (tHIGH) 4.0us/0.6us */
48}; 45};
49 46
50extern int i2c_add_node(struct i2c_interface *iface); 47int i2c_add_node(const struct i2c_interface *iface);
51extern int i2c_write_data(int bus_address, int address, 48int i2c_write_data(int bus_index, int bus_address, int address,
52 const unsigned char* buf, int count); 49 const unsigned char* buf, int count);
53extern int i2c_read_data(int bus_address, int address, 50int i2c_read_data(int bus_index, int bus_address, int address,
54 unsigned char* buf, int count); 51 unsigned char* buf, int count);
55#endif 52
53#endif /* _GEN_I2C_ */
54