mbed library sources. Supersedes mbed-src.

Fork of mbed-dev by mbed official

Files at this revision

API Documentation at this revision

Comitter:
mbed_official
Date:
Tue Dec 01 09:00:10 2015 +0000
Parent:
30:748c8b6e75b1
Child:
32:58d485b73390
Commit message:
Synchronized with git revision 22ac81f5d791ecbea4cd49f1ff27f8f93127f1d0

Full URL: https://github.com/mbedmicro/mbed/commit/22ac81f5d791ecbea4cd49f1ff27f8f93127f1d0/

Teensy3.1 - K20D50M Update i2c_api.c

Changed in this revision

targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c Show annotated file Show diff for this revision Revisions of this file
--- a/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c	Thu Nov 26 13:30:11 2015 +0000
+++ b/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c	Tue Dec 01 09:00:10 2015 +0000
@@ -85,13 +85,7 @@
     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;
 }