aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F0xx/EXT/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F0xx/EXT/main.c')
-rw-r--r--testhal/STM32F0xx/EXT/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/testhal/STM32F0xx/EXT/main.c b/testhal/STM32F0xx/EXT/main.c
index cdba37eff..2fdcc247e 100644
--- a/testhal/STM32F0xx/EXT/main.c
+++ b/testhal/STM32F0xx/EXT/main.c
@@ -25,17 +25,16 @@ static void led4off(void *arg) {
/* Triggered when the button is pressed or released. The LED4 is set to ON.*/
static void extcb1(EXTDriver *extp, expchannel_t channel) {
- static VirtualTimer vt4;
+ static virtual_timer_t vt4;
(void)extp;
(void)channel;
palSetPad(GPIOC, GPIOC_LED4);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt4))
- chVTResetI(&vt4);
+ chSysLockFromISR();
+ chVTResetI(&vt4);
/* LED4 set to OFF after 200mS.*/
chVTSetI(&vt4, MS2ST(200), led4off, NULL);
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
static const EXTConfig extcfg = {