diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-08 17:53:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-08 17:53:52 +0000 |
commit | 18b8b495244411bb33254ea0d8b868259077be7d (patch) | |
tree | be8ecfe583b4de2ad67d2b2196cabf8992e87d13 /os/hal | |
parent | 6894617b8ebc8453a1ed5e672fb225d0c4f2f51b (diff) | |
download | ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.tar.gz ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.tar.bz2 ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3946 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r-- | os/hal/platforms/STM32/i2c_lld.c | 2 | ||||
-rw-r--r-- | os/hal/src/mmc_spi.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/os/hal/platforms/STM32/i2c_lld.c b/os/hal/platforms/STM32/i2c_lld.c index 996033da5..7458d9252 100644 --- a/os/hal/platforms/STM32/i2c_lld.c +++ b/os/hal/platforms/STM32/i2c_lld.c @@ -167,8 +167,10 @@ static void i2c_lld_safety_timeout(void *p) { if (i2cp->thread) {
i2c_lld_abort_operation(i2cp);
+ chSysLockFromIsr();
i2cp->thread->p_u.rdymsg = RDY_TIMEOUT;
chSchReadyI(i2cp->thread);
+ chSysUnlockFromIsr();
}
}
diff --git a/os/hal/src/mmc_spi.c b/os/hal/src/mmc_spi.c index 8f11355b8..f4bcb51fd 100644 --- a/os/hal/src/mmc_spi.c +++ b/os/hal/src/mmc_spi.c @@ -105,6 +105,7 @@ static uint8_t crc7(uint8_t crc, const uint8_t *buffer, size_t len) { static void tmrfunc(void *p) {
MMCDriver *mmcp = p;
+ chSysLockFromIsr();
if (mmcp->cnt > 0) {
if (mmcp->is_inserted()) {
if (--mmcp->cnt == 0) {
@@ -123,6 +124,7 @@ static void tmrfunc(void *p) { }
}
chVTSetI(&mmcp->vt, MS2ST(MMC_POLLING_DELAY), tmrfunc, mmcp);
+ chSysUnlockFromIsr();
}
/**
|