We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eb05ae4 + f4726ff commit 22ac81fCopy full SHA for 22ac81f
libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c
@@ -85,13 +85,7 @@ int i2c_stop(i2c_t *obj) {
85
volatile uint32_t n = 0;
86
obj->i2c->C1 &= ~I2C_C1_MST_MASK;
87
obj->i2c->C1 &= ~I2C_C1_TX_MASK;
88
-
89
- // It seems that there are timing problems
90
- // when there is no waiting time after a STOP.
91
- // This wait is also included on the samples
92
- // code provided with the freedom board
93
- for (n = 0; n < 100; n++)
94
- __NOP();
+ while(obj->i2c->S & I2C_S_BUSY_MASK);
95
return 0;
96
}
97
0 commit comments