From 95d58d30588e13b016b4653b6b14020dcb61ff67 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Sun, 7 Dec 2008 19:25:51 +0000 Subject: 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 --- firmware/export/generic_i2c.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'firmware/export') 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 void (*delay_thigh)(void); /* SCL high period (tHIGH) 4.0us/0.6us */ }; -extern void i2c_add_node(struct i2c_interface *iface); +extern int i2c_add_node(struct i2c_interface *iface); extern int i2c_write_data(int bus_address, int address, const unsigned char* buf, int count); extern int i2c_read_data(int bus_address, int address, -- cgit v1.2.3