Tiva. I2C. Fixed bug where number of bytes read is 2 more then requested. This only occurs when the number of bytes to read is 3 or more.
This commit is contained in:
parent
9f7ac7abf9
commit
ca60a9cba2
|
@ -216,7 +216,7 @@ static void i2c_lld_serve_interrupt(I2CDriver *i2cp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case STATE_READ_NEXT: {
|
case STATE_READ_NEXT: {
|
||||||
if(i2cp->rxbytes == 0) {
|
if(i2cp->rxbytes == 2) {
|
||||||
i2cp->intstate = STATE_READ_FINAL;
|
i2cp->intstate = STATE_READ_FINAL;
|
||||||
}
|
}
|
||||||
*(i2cp->rxbuf) = dp->MDR;
|
*(i2cp->rxbuf) = dp->MDR;
|
||||||
|
|
Loading…
Reference in New Issue