aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F30x/EXT
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32F30x/EXT')
-rw-r--r--testhal/STM32F30x/EXT/.project2
-rw-r--r--testhal/STM32F30x/EXT/main.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/testhal/STM32F30x/EXT/.project b/testhal/STM32F30x/EXT/.project
index 7c6f467a6..1504226d3 100644
--- a/testhal/STM32F30x/EXT/.project
+++ b/testhal/STM32F30x/EXT/.project
@@ -79,7 +79,7 @@
<link>
<name>board</name>
<type>2</type>
- <locationURI>CHIBIOS/boards/ST_STM32F3_DISCOVERY</locationURI>
+ <locationURI>CHIBIOS/os/hal/boards/ST_STM32F3_DISCOVERY</locationURI>
</link>
<link>
<name>os</name>
diff --git a/testhal/STM32F30x/EXT/main.c b/testhal/STM32F30x/EXT/main.c
index 9ef548d87..bd8b4359c 100644
--- a/testhal/STM32F30x/EXT/main.c
+++ b/testhal/STM32F30x/EXT/main.c
@@ -25,19 +25,20 @@ static void led5off(void *arg) {
/* Triggered when the button is pressed or released. The LED5 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(GPIOE, GPIOE_LED10_RED);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt4))
- chVTResetI(&vt4);
+ chSysLockFromISR();
+
+ /* Timer reset, if still active.*/
+ chVTResetI(&vt4);
/* LED4 set to OFF after 200mS.*/
chVTSetI(&vt4, MS2ST(200), led5off, NULL);
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
static const EXTConfig extcfg = {