From 81ac65c13c2ec5bded2b0a872095733e1196e33a Mon Sep 17 00:00:00 2001 From: asterix Date: Thu, 29 Jul 2010 15:17:31 +0000 Subject: [PATCH] Fix flag test. git-svn-id: https://src.develer.com/svnoss/bertos/branches/i2c@4090 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cpu/avr/drv/i2c_avr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bertos/cpu/avr/drv/i2c_avr.c b/bertos/cpu/avr/drv/i2c_avr.c index 739e4ab3..9a1bb14c 100644 --- a/bertos/cpu/avr/drv/i2c_avr.c +++ b/bertos/cpu/avr/drv/i2c_avr.c @@ -378,7 +378,7 @@ static uint8_t i2c_avr_getc(I2c *i2c) WAIT_READY(); - if (TW_STATUS != TW_MR_DATA_ACK) + if (TW_STATUS != data_flag) { LOG_ERR("Data nack[%x]\n", TWSR); i2c->errors |= I2C_DATA_NACK; -- 2.25.1