Skip to content

Commit 22ac81f

Browse files
committed
Merge pull request #1459 from star297/master
Teensy3.1 - K20D50M Update i2c_api.c
2 parents eb05ae4 + f4726ff commit 22ac81f

File tree

1 file changed

+1
-7
lines changed
  • libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX

1 file changed

+1
-7
lines changed

libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@ int i2c_stop(i2c_t *obj) {
8585
volatile uint32_t n = 0;
8686
obj->i2c->C1 &= ~I2C_C1_MST_MASK;
8787
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();
88+
while(obj->i2c->S & I2C_S_BUSY_MASK);
9589
return 0;
9690
}
9791

0 commit comments

Comments
 (0)