diff options
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();
}
/**
|