From: asterix Date: Thu, 29 Jul 2010 15:17:31 +0000 (+0000) Subject: Fix flag test. X-Git-Tag: 2.6.0~288^2~5 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=81ac65c13c2ec5bded2b0a872095733e1196e33a;p=bertos.git Fix flag test. git-svn-id: https://src.develer.com/svnoss/bertos/branches/i2c@4090 38d2e660-2303-0410-9eaa-f027e97ec537 --- 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;