From 9867c74b90cf552650677bc88e883e15c25b6bab Mon Sep 17 00:00:00 2001 From: asterix Date: Fri, 23 Jul 2010 15:49:13 +0000 Subject: [PATCH] Fix start argument. Add arblst flag. git-svn-id: https://src.develer.com/svnoss/bertos/branches/i2c@4057 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/i2c.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bertos/drv/i2c.h b/bertos/drv/i2c.h index 93ba3dfc..361bd49d 100644 --- a/bertos/drv/i2c.h +++ b/bertos/drv/i2c.h @@ -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) -- 2.25.1