diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-29 07:25:11 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-29 07:25:11 +0000 |
commit | 80d4ec8d07aa1945a173acdb18933a4719937509 (patch) | |
tree | c588ed3d02bd66610eda25308b07569e0ef45065 /testhal/STM32F37x/EXT/main.c | |
parent | 81f5ffb330ab4670bec7e79d6e0009378efa81c4 (diff) | |
download | ChibiOS-80d4ec8d07aa1945a173acdb18933a4719937509.tar.gz ChibiOS-80d4ec8d07aa1945a173acdb18933a4719937509.tar.bz2 ChibiOS-80d4ec8d07aa1945a173acdb18933a4719937509.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6328 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F37x/EXT/main.c')
-rw-r--r-- | testhal/STM32F37x/EXT/main.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/testhal/STM32F37x/EXT/main.c b/testhal/STM32F37x/EXT/main.c index 7c158e306..ed42de752 100644 --- a/testhal/STM32F37x/EXT/main.c +++ b/testhal/STM32F37x/EXT/main.c @@ -20,24 +20,23 @@ static void led5off(void *arg) {
(void)arg;
- palClearPad(GPIOC, GPIOC_LED1);
+ palSetPad(GPIOC, GPIOC_LED1);
}
/* 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(GPIOC, GPIOC_LED1);
- chSysLockFromIsr();
- if (chVTIsArmedI(&vt4))
- chVTResetI(&vt4);
+ palClearPad(GPIOC, GPIOC_LED1);
+ chSysLockFromISR();
+ chVTResetI(&vt4);
/* LED4 set to OFF after 200mS.*/
- chVTSetI(&vt4, MS2ST(200), led5off, NULL);
- chSysUnlockFromIsr();
+ chVTDoSetI(&vt4, MS2ST(200), led5off, NULL);
+ chSysUnlockFromISR();
}
static const EXTConfig extcfg = {
|