summaryrefslogtreecommitdiff
path: root/firmware/export/generic_i2c.h
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2008-12-07 19:25:51 +0000
committerRafaël Carré <rafael.carre@gmail.com>2008-12-07 19:25:51 +0000
commit95d58d30588e13b016b4653b6b14020dcb61ff67 (patch)
treec8aa7fcd1a263c741e3f865deae56d22c4d23a34 /firmware/export/generic_i2c.h
parent43f238f6dc32e1e12fff872e0957f4f6c5d6144a (diff)
downloadrockbox-95d58d30588e13b016b4653b6b14020dcb61ff67.tar.gz
rockbox-95d58d30588e13b016b4653b6b14020dcb61ff67.zip
Generic I2C: fix various problems with this (now) unused driver
Explicit if SDA is input or output in static functions Do not use logf() but return codes Check for overflow when adding an interface Indent on 4 spaces Rewrite i2c_read_data() and i2c_write_data() using goto for error cases Make subaddress optional (not sent if == -1) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19360 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/generic_i2c.h')
-rw-r--r--firmware/export/generic_i2c.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/export/generic_i2c.h b/firmware/export/generic_i2c.h
index 7b598039fa..f38728589d 100644
--- a/firmware/export/generic_i2c.h
+++ b/firmware/export/generic_i2c.h
@@ -47,7 +47,7 @@ struct i2c_interface
47 void (*delay_thigh)(void); /* SCL high period (tHIGH) 4.0us/0.6us */ 47 void (*delay_thigh)(void); /* SCL high period (tHIGH) 4.0us/0.6us */
48}; 48};
49 49
50extern void i2c_add_node(struct i2c_interface *iface); 50extern int i2c_add_node(struct i2c_interface *iface);
51extern int i2c_write_data(int bus_address, int address, 51extern int i2c_write_data(int bus_address, int address,
52 const unsigned char* buf, int count); 52 const unsigned char* buf, int count);
53extern int i2c_read_data(int bus_address, int address, 53extern int i2c_read_data(int bus_address, int address,