aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F1xx/EXT/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-10-03 14:18:56 +0000
commit4b049c1f175144f8583df5eb9e3a620ac306ee98 (patch)
treed20a3ec4de726fbfb746c6062061e24b7ac3d3be /testhal/STM32F1xx/EXT/main.c
parentfe65d988275f509d3e7b71014c19c1d1aefac035 (diff)
downloadChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.gz
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.tar.bz2
ChibiOS-4b049c1f175144f8583df5eb9e3a620ac306ee98.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6353 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F1xx/EXT/main.c')
-rw-r--r--testhal/STM32F1xx/EXT/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/testhal/STM32F1xx/EXT/main.c b/testhal/STM32F1xx/EXT/main.c
index e0fcd896c..1ca4260d0 100644
--- a/testhal/STM32F1xx/EXT/main.c
+++ b/testhal/STM32F1xx/EXT/main.c
@@ -17,7 +17,7 @@
#include "ch.h"
#include "hal.h"
-static VirtualTimer vt;
+static virtual_timer_t vt;
/* LED set to OFF after 200mS.*/
static void ledoff(void *arg) {
@@ -32,10 +32,9 @@ static void extcb1(EXTDriver *extp, expchannel_t channel) {
(void)extp;
(void)channel;
palClearPad(GPIOC, GPIOC_LED);
- chSysLockFromIsr();
- if (!chVTIsArmedI(&vt))
- chVTSetI(&vt, MS2ST(200), ledoff, NULL);
- chSysUnlockFromIsr();
+ chSysLockFromISR();
+ chVTSetI(&vt, MS2ST(200), ledoff, NULL);
+ chSysUnlockFromISR();
}
/* Triggered when the LED goes OFF.*/