aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/include
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-07 21:53:01 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-07-07 21:53:01 +0000
commit6eca6554847f7a824fbbafd892c4b3797e74983d (patch)
tree81dc7b8103006602b21416c4940c7c4941a7178a /os/hal/include
parentff535c27e64be34157fa37908bac9b9d460eaf57 (diff)
downloadChibiOS-6eca6554847f7a824fbbafd892c4b3797e74983d.tar.gz
ChibiOS-6eca6554847f7a824fbbafd892c4b3797e74983d.tar.bz2
ChibiOS-6eca6554847f7a824fbbafd892c4b3797e74983d.zip
I2C. Driver still cause stack overflows.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3134 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/include')
-rw-r--r--os/hal/include/i2c.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/os/hal/include/i2c.h b/os/hal/include/i2c.h
index 774c0cf22..1e7ce3e1e 100644
--- a/os/hal/include/i2c.h
+++ b/os/hal/include/i2c.h
@@ -167,8 +167,10 @@ struct I2CSlaveConfig{
#define _i2c_wait_s(i2cp) { \
chDbgAssert((i2cp)->id_thread == NULL, \
"_i2c_wait(), #1", "already waiting"); \
+ chSysLock(); \
(i2cp)->id_thread = chThdSelf(); \
chSchGoSleepS(THD_STATE_SUSPENDED); \
+ chSysUnlock(); \
}
/**