aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-07 05:44:33 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-07 05:44:33 +0000
commit80043ff2a01e97bacf9b2f30833b196e031cb20d (patch)
treee61a0c18141c27a7cca80b37edb616f6b382abe5 /os
parent2db3c769f1abba36a1e7a843d83e5006de58cbd5 (diff)
downloadChibiOS-80043ff2a01e97bacf9b2f30833b196e031cb20d.tar.gz
ChibiOS-80043ff2a01e97bacf9b2f30833b196e031cb20d.tar.bz2
ChibiOS-80043ff2a01e97bacf9b2f30833b196e031cb20d.zip
I2C. Minor code improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3564 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/hal/include/i2c.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index 18e93119e..1923742c7 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -211,8 +211,9 @@ struct I2CSlaveConfig{
((i2cp)->id_slave_config)->id_callback(i2cp, i2cscfg); \
(i2cp)->id_state = I2C_READY; \
} \
- else \
+ else{ \
(i2cp)->id_state = I2C_READY; \
+ } \
_i2c_wakeup_isr(i2cp); \
}
@@ -236,8 +237,9 @@ struct I2CSlaveConfig{
((i2cp)->id_slave_config)->id_err_callback(i2cp, i2cscfg); \
(i2cp)->id_state = I2C_READY; \
} \
- else \
+ else{ \
(i2cp)->id_state = I2C_READY; \
+ } \
_i2c_wakeup_isr(i2cp); \
}