diff options
Diffstat (limited to 'demos/ARMCM3-STM32F103ZG-FATFS/main.c')
-rw-r--r-- | demos/ARMCM3-STM32F103ZG-FATFS/main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/demos/ARMCM3-STM32F103ZG-FATFS/main.c b/demos/ARMCM3-STM32F103ZG-FATFS/main.c index 4181c7004..8199275cd 100644 --- a/demos/ARMCM3-STM32F103ZG-FATFS/main.c +++ b/demos/ARMCM3-STM32F103ZG-FATFS/main.c @@ -89,6 +89,7 @@ bool_t sdc_lld_is_write_protected(SDCDriver *sdcp) { static void tmrfunc(void *p) {
SDCDriver *sdcp = p;
+ chSysLockFromIsr();
if (cnt > 0) {
if (sdcIsCardInserted(sdcp)) {
if (--cnt == 0) {
@@ -105,6 +106,7 @@ static void tmrfunc(void *p) { }
}
chVTSetI(&tmr, MS2ST(SDC_POLLING_DELAY), tmrfunc, sdcp);
+ chSysUnlockFromIsr();
}
/**
|