From d3e2cacff3778da8777565688a40a9520b4618b5 Mon Sep 17 00:00:00 2001 From: Sissors Date: Tue, 11 Nov 2014 20:32:07 +0100 Subject: [PATCH] [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/) --- .../targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/i2c_api.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/i2c_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/i2c_api.c index f652ad1f0a..ff9cc65d43 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_KPSDK_MCUS/i2c_api.c @@ -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: