diff options
| author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-30 10:00:19 +0000 | 
|---|---|---|
| committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-09-30 10:00:19 +0000 | 
| commit | 984148e9dbda3053aec71ea7da545bc75cd33e94 (patch) | |
| tree | 18ef26443394093f7e2ca7ced34e75d06f627e9a /testhal/STM32L1xx/EXT/main.c | |
| parent | 17cb6b9bb62820acc954db2fde2ea79696b34325 (diff) | |
| download | ChibiOS-984148e9dbda3053aec71ea7da545bc75cd33e94.tar.gz ChibiOS-984148e9dbda3053aec71ea7da545bc75cd33e94.tar.bz2 ChibiOS-984148e9dbda3053aec71ea7da545bc75cd33e94.zip | |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6334 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32L1xx/EXT/main.c')
| -rw-r--r-- | testhal/STM32L1xx/EXT/main.c | 11 | 
1 files changed, 5 insertions, 6 deletions
| diff --git a/testhal/STM32L1xx/EXT/main.c b/testhal/STM32L1xx/EXT/main.c index c0820d139..218826786 100644 --- a/testhal/STM32L1xx/EXT/main.c +++ b/testhal/STM32L1xx/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(GPIOB, GPIOB_LED4);
 -  chSysLockFromIsr();
 -  if (chVTIsArmedI(&vt4))
 -    chVTResetI(&vt4);
 +  chSysLockFromISR();
 +  chVTResetI(&vt4);
    /* LED4 set to OFF after 200mS.*/
 -  chVTSetI(&vt4, MS2ST(200), led4off, NULL);
 -  chSysUnlockFromIsr();
 +  chVTDoSetI(&vt4, MS2ST(200), led4off, NULL);
 +  chSysUnlockFromISR();
  }
  static const EXTConfig extcfg = {
 | 
