Merge pull request #53 from jstruebel/master

[KINETIS] Fix I2C TX to not wait for RX if requested rxbytes is 0
This commit is contained in:
Fabio Utzig 2016-04-09 09:25:46 -03:00
commit 03a3309578
1 changed files with 1 additions and 1 deletions

View File

@ -330,7 +330,7 @@ static inline msg_t _i2c_txrx_timeout(I2CDriver *i2cp, i2caddr_t addr,
//if (i2cp->i2c->S & I2Cx_S_RXAK)
// i2cp->errors |= I2C_ACK_FAILURE;
if (msg == MSG_OK && txbuf != NULL && rxbuf != NULL) {
if (msg == MSG_OK && txbuf != NULL && rxbuf != NULL && rxbytes > 0) {
i2cp->i2c->C1 |= I2Cx_C1_RSTA;
/* FIXME */
while (!(i2cp->i2c->S & I2Cx_S_BUSY));