diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-15 19:09:34 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-04-15 19:09:34 +0000 |
commit | d48d8da22f12a51daa278d3d29bc4f4572e93943 (patch) | |
tree | 4c5a659f6b39759914291cf9ea0ded995cdbe894 | |
parent | 2ec316ae746b1427aaef14433b050e51c2a9bc2f (diff) | |
download | ChibiOS-d48d8da22f12a51daa278d3d29bc4f4572e93943.tar.gz ChibiOS-d48d8da22f12a51daa278d3d29bc4f4572e93943.tar.bz2 ChibiOS-d48d8da22f12a51daa278d3d29bc4f4572e93943.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7896 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c b/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c index f348121dd..2ea78ca89 100644 --- a/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c +++ b/os/hal/ports/STM32/LLD/I2Cv2/i2c_lld.c @@ -161,14 +161,15 @@ static void i2c_lld_serve_interrupt(I2CDriver *i2cp, uint32_t isr) { /* Stops the associated DMA streams.*/
dmaStreamDisable(i2cp->dmatx);
dmaStreamDisable(i2cp->dmarx);
-
- /* Errors are propagated to the upper layer.*/
- if (i2cp->errors) {
- _i2c_wakeup_error_isr(i2cp);
- return;
- }
}
- _i2c_wakeup_isr(i2cp);
+ if (i2cp->errors) {
+ /* Errors are signaled to the upper layer.*/
+ _i2c_wakeup_error_isr(i2cp);
+ }
+ else {
+ /* Normal transaction end.*/
+ _i2c_wakeup_isr(i2cp);
+ }
}
/**
|