aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src
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/src
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/src')
-rw-r--r--os/hal/src/i2c.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/os/hal/src/i2c.c b/os/hal/src/i2c.c
index 4aade6fe9..4882330bd 100644
--- a/os/hal/src/i2c.c
+++ b/os/hal/src/i2c.c
@@ -178,11 +178,11 @@ void i2cMasterTransmit(I2CDriver *i2cp,
};
#endif /* CH_DBG_ENABLE_ASSERTS */
- chSysLock();
chDbgAssert(i2cp->id_state == I2C_READY,
"i2cMasterTransmit(), #1", "not ready");
i2cp->id_state = I2C_ACTIVE;
+ chSysLock();
i2c_lld_master_transmit(i2cp, slave_addr, txbuf, txbytes, rxbuf, rxbytes);
_i2c_wait_s(i2cp);
chSysUnlock();
@@ -226,14 +226,12 @@ void i2cMasterReceive(I2CDriver *i2cp,
};
#endif /* CH_DBG_ENABLE_ASSERTS */
- chSysLock();
chDbgAssert(i2cp->id_state == I2C_READY,
"i2cMasterReceive(), #1", "not ready");
i2cp->id_state = I2C_ACTIVE;
i2c_lld_master_receive(i2cp, slave_addr, rxbuf, rxbytes);
_i2c_wait_s(i2cp);
- chSysUnlock();
}