From 228b7b672d1825dc88f73423e3650386f480a0ac Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Fri, 13 Mar 2015 16:01:59 +0000 Subject: [PATCH] i2c: flip the msg flags for mraa_i2c_read_bytes_data Fixes 168. Signed-off-by: Brendan Le Foll --- src/i2c/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i2c/i2c.c b/src/i2c/i2c.c index 48590f9..edfd392 100644 --- a/src/i2c/i2c.c +++ b/src/i2c/i2c.c @@ -207,11 +207,11 @@ mraa_i2c_read_bytes_data(mraa_i2c_context dev, uint8_t command, uint8_t* data, i struct i2c_msg m[2]; m[0].addr = dev->addr; - m[0].flags = I2C_M_RD; + m[0].flags = 0x00; m[0].len = 1; m[0].buf = &command; m[1].addr = dev->addr; - m[1].flags = 0x00; + m[1].flags = I2C_M_RD; m[1].len = length; m[1].buf = data;