SAM3/4 I2C: Fix reversed logic in twi_startmessage().

This commit is contained in:
Wolfgang Reissnegger 2016-07-09 06:50:32 -06:00 committed by Gregory Nutt
parent 1925df8faa
commit d89e062c06

View File

@ -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);
}