From f4726ff98cd054670e41e90cbcd29ffb70ddbfbf Mon Sep 17 00:00:00 2001 From: Paul Staron Date: Fri, 27 Nov 2015 19:41:30 +0000 Subject: [PATCH] Update i2c_api.c --- .../targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c index df1aa5c18d..38279f54a9 100644 --- a/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c +++ b/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c @@ -85,13 +85,7 @@ int i2c_stop(i2c_t *obj) { volatile uint32_t n = 0; obj->i2c->C1 &= ~I2C_C1_MST_MASK; obj->i2c->C1 &= ~I2C_C1_TX_MASK; - - // It seems that there are timing problems - // when there is no waiting time after a STOP. - // This wait is also included on the samples - // code provided with the freedom board - for (n = 0; n < 100; n++) - __NOP(); + while(obj->i2c->S & I2C_S_BUSY_MASK); return 0; }