diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/i2c_api.c index 394b65ae89..09d7ec6b55 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC15XX/i2c_api.c @@ -138,7 +138,7 @@ int i2c_read(i2c_t *obj, int address, char *data, int length, int stop) { LPC_I2C0->MSTCTL = (1 << 0); data[count] = (LPC_I2C0->MSTDAT & 0xFF); status = ((LPC_I2C0->STAT >> 1) & (0x07)); - if (status != 0x00) { + if (status != 0x01) { i2c_stop(obj); return count; }