[HAL][KSDK] Fixed ACK/NACK received inverted (https://github.com/mbedmicro/mbed/issues/661)

As reported by Geremia G
(http://developer.mbed.org/forum/bugs-suggestions/topic/5220/)
pull/684/head
Sissors 2014-11-11 20:32:07 +01:00
parent 57a79c08a9
commit d3e2cacff3
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ static int i2c_wait_end_tx_transfer(i2c_t *obj) {
}
// check if we received the ACK or not
return I2C_HAL_GetStatusFlag(i2c_addrs[obj->instance], kI2CReceivedNak) ? 0 : 1;
return I2C_HAL_GetStatusFlag(i2c_addrs[obj->instance], kI2CReceivedNak) ? 1 : 0;
}
// this function waits the end of a rx transfer and return the status of the transaction: