aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/EXT/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-23 09:17:33 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-08-23 09:17:33 +0000
commit19745e5d5857dad5ed80ad3465434a9cfc5f5b65 (patch)
treeeb02b2c5fe99c7fe3319fc14e3cd1a20fbbbb025 /testhal/STM32F4xx/EXT/main.c
parent32c2d2fca06f0cc2122a5fc944716b629f8f8fcd (diff)
downloadChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.tar.gz
ChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.tar.bz2
ChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6208 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/EXT/main.c')
-rw-r--r--testhal/STM32F4xx/EXT/main.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/testhal/STM32F4xx/EXT/main.c b/testhal/STM32F4xx/EXT/main.c
index 1bdce5a09..2963f52a1 100644
--- a/testhal/STM32F4xx/EXT/main.c
+++ b/testhal/STM32F4xx/EXT/main.c
@@ -25,19 +25,18 @@ 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(GPIOD, GPIOD_LED5);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt4))
- chVTResetI(&vt4);
+ chSysLockFromISR();
+ chVTResetI(&vt4);
/* LED4 set to OFF after 200mS.*/
chVTSetI(&vt4, MS2ST(200), led5off, NULL);
- chSysUnlockFromIsr();
+ chSysUnlockFromISR();
}
static const EXTConfig extcfg = {