diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-08 17:53:52 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-02-08 17:53:52 +0000 |
commit | 18b8b495244411bb33254ea0d8b868259077be7d (patch) | |
tree | be8ecfe583b4de2ad67d2b2196cabf8992e87d13 /os/various/evtimer.c | |
parent | 6894617b8ebc8453a1ed5e672fb225d0c4f2f51b (diff) | |
download | ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.tar.gz ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.tar.bz2 ChibiOS-18b8b495244411bb33254ea0d8b868259077be7d.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3946 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various/evtimer.c')
-rw-r--r-- | os/various/evtimer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/os/various/evtimer.c b/os/various/evtimer.c index 314e0cc12..fedc5d6e4 100644 --- a/os/various/evtimer.c +++ b/os/various/evtimer.c @@ -32,8 +32,10 @@ static void tmrcb(void *p) {
EvTimer *etp = p;
+ chSysLockFromIsr();
chEvtBroadcastI(&etp->et_es);
chVTSetI(&etp->et_vt, etp->et_interval, tmrcb, etp);
+ chSysUnlockFromIsr();
}
/**
@@ -60,12 +62,7 @@ void evtStart(EvTimer *etp) { */
void evtStop(EvTimer *etp) {
- chSysLock();
-
- if (chVTIsArmedI(&etp->et_vt))
- chVTResetI(&etp->et_vt);
-
- chSysUnlock();
+ chVTReset(&etp->et_vt);
}
/** @} */
|