- I2C_DAT = *buf++;
- I2C_CONCLR = BV(I2CON_SIC);
- count--;
-
- WAIT_SI();
-
- status = GET_STATUS();
-
- if (status == I2C_STAT_DATA_ACK)
- continue;
- else if (status == I2C_STAT_DATA_NACK)
- {
- LOG_ERR("Data NACK\n");
- return false;
- }
- else if (status == I2C_STAT_ERROR)
- {
- LOG_ERR("I2C error.\n");
- return false;
- }
- else if (status == I2C_STAT_UNKNOW)
- {
- LOG_ERR("I2C unable to read status.\n");
- return false;
- }
-
+ LOG_ERR("Data NACK\n");
+ return false;
+ }
+ else if (status == I2C_STAT_ERROR)
+ {
+ LOG_ERR("I2C error.\n");
+ return false;
+ }
+ else if (status == I2C_STAT_UNKNOW)
+ {
+ LOG_ERR("I2C unable to read status.\n");
+ return false;