version_2.0

Dependents:   cc3000_ping_demo_try_2

Fork of mbed by mbed official

Revision:
64:e3affc9e7238
Parent:
59:0883845fe643
Child:
66:9c8f0e3462fb
--- a/i2c_api.h	Wed May 08 14:50:20 2013 +0100
+++ b/i2c_api.h	Mon Aug 05 12:28:09 2013 +0300
@@ -26,10 +26,15 @@
 
 typedef struct i2c_s i2c_t;
 
+enum {
+  I2C_ERROR_NO_SLAVE = -1,
+  I2C_ERROR_BUS_BUSY = -2
+};
+
 void i2c_init         (i2c_t *obj, PinName sda, PinName scl);
 void i2c_frequency    (i2c_t *obj, int hz);
 int  i2c_start        (i2c_t *obj);
-void i2c_stop         (i2c_t *obj);
+int  i2c_stop         (i2c_t *obj);
 int  i2c_read         (i2c_t *obj, int address, char *data, int length, int stop);
 int  i2c_write        (i2c_t *obj, int address, const char *data, int length, int stop);
 void i2c_reset        (i2c_t *obj);