Fix start argument. Add arblst flag.
authorasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Jul 2010 15:49:13 +0000 (15:49 +0000)
committerasterix <asterix@38d2e660-2303-0410-9eaa-f027e97ec537>
Fri, 23 Jul 2010 15:49:13 +0000 (15:49 +0000)
git-svn-id: https://src.develer.com/svnoss/bertos/branches/i2c@4057 38d2e660-2303-0410-9eaa-f027e97ec537

bertos/drv/i2c.h

index 93ba3dfc58739be09e6abf97fac926cff026dd54..361bd49d6beb1a5664013e1c5061aa1000350a94 100644 (file)
@@ -136,6 +136,7 @@ bool i2c_recv(void *_buf, size_t count);
 #define I2C_OK               0
 #define I2C_START_ERR     BV(0)
 #define I2C_NO_ACK        BV(1)
+#define I2C_ARBLST        BV(2)
 
 
 #define I2C_NOSTOP           0
@@ -192,14 +193,14 @@ INLINE void i2c_start_r(I2c *i2c, uint16_t slave_addr, size_t size, int flags)
 {
        ASSERT(i2c);
        i2c->flags = flags | I2C_START_R;
-       i2c_start(i2c, slave_addr)
+       i2c_start(i2c, slave_addr, size);
 }
 
 INLINE void i2c_start_w(I2c *i2c, uint16_t slave_addr, size_t size, int flags)
 {
        ASSERT(i2c);
        i2c->flags = flags & ~I2C_START_R;
-       i2c_start(i2c, slave_addr);
+       i2c_start(i2c, slave_addr, size);
 }
 
 INLINE uint8_t i2c_get(I2c *i2c)