aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authormarcoveeneman <marco-veeneman@hotmail.com>2015-04-24 22:00:47 +0200
committermarcoveeneman <marco-veeneman@hotmail.com>2015-04-24 22:00:47 +0200
commitca60a9cba242dcff3a04e517d6a07defea942b54 (patch)
treeb27f4c079543b850d9448e3be2afb3f1d4672419 /os
parent9f7ac7abf94b4b5be86cf4b70b74954000657205 (diff)
downloadChibiOS-Contrib-ca60a9cba242dcff3a04e517d6a07defea942b54.tar.gz
ChibiOS-Contrib-ca60a9cba242dcff3a04e517d6a07defea942b54.tar.bz2
ChibiOS-Contrib-ca60a9cba242dcff3a04e517d6a07defea942b54.zip
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.
Diffstat (limited to 'os')
-rw-r--r--os/hal/ports/TIVA/LLD/i2c_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/ports/TIVA/LLD/i2c_lld.c b/os/hal/ports/TIVA/LLD/i2c_lld.c
index 4019a3b..f4c555b 100644
--- a/os/hal/ports/TIVA/LLD/i2c_lld.c
+++ b/os/hal/ports/TIVA/LLD/i2c_lld.c
@@ -216,7 +216,7 @@ static void i2c_lld_serve_interrupt(I2CDriver *i2cp)
break;
}
case STATE_READ_NEXT: {
- if(i2cp->rxbytes == 0) {
+ if(i2cp->rxbytes == 2) {
i2cp->intstate = STATE_READ_FINAL;
}
*(i2cp->rxbuf) = dp->MDR;