From d89e062c06f790adcbec018db83442fa7b465f44 Mon Sep 17 00:00:00 2001 From: Wolfgang Reissnegger Date: Sat, 9 Jul 2016 06:50:32 -0600 Subject: [PATCH] SAM3/4 I2C: Fix reversed logic in twi_startmessage(). --- arch/arm/src/sam34/sam_twi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/sam34/sam_twi.c b/arch/arm/src/sam34/sam_twi.c index 6e4aae1427..74d0e7d6ed 100644 --- a/arch/arm/src/sam34/sam_twi.c +++ b/arch/arm/src/sam34/sam_twi.c @@ -666,7 +666,7 @@ static void twi_startwrite(struct twi_dev_s *priv, struct i2c_msg_s *msg) static void twi_startmessage(struct twi_dev_s *priv, struct i2c_msg_s *msg) { - if ((msg->flags & I2C_M_READ) == 0) + if ((msg->flags & I2C_M_READ) != 0) { twi_startread(priv, msg); }