From 6eca6554847f7a824fbbafd892c4b3797e74983d Mon Sep 17 00:00:00 2001 From: barthess Date: Thu, 7 Jul 2011 21:53:01 +0000 Subject: 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 --- os/hal/include/i2c.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'os/hal/include') 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(); \ } /** -- cgit v1.2.3