aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/src/mmc_spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/hal/src/mmc_spi.c')
-rw-r--r--os/hal/src/mmc_spi.c2
1 files changed, 2 insertions, 0 deletions
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();
}
/**