aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/evtimer.c1
-rw-r--r--src/lib/evtimer.h6
2 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/evtimer.c b/src/lib/evtimer.c
index 212c8f124..1ab384086 100644
--- a/src/lib/evtimer.c
+++ b/src/lib/evtimer.c
@@ -32,6 +32,7 @@
static void tmrcb(void *p) {
EvTimer *etp = p;
+ chEvtSendI(&etp->et_es);
chVTSetI(&etp->et_vt, etp->et_interval, tmrcb, etp);
}
diff --git a/src/lib/evtimer.h b/src/lib/evtimer.h
index 43b0374ee..dfe09f0be 100644
--- a/src/lib/evtimer.h
+++ b/src/lib/evtimer.h
@@ -46,9 +46,9 @@ extern "C" {
/**
* Initializes an \p EvTimer structure.
*/
-#define evtInit(et, i) (chEvtInit(&(etp)->et_es), \
- (etp)->et_vt.vt_func = NULL, \
- (etp)->et_interval = (i))
+#define evtInit(etp, i) (chEvtInit(&(etp)->et_es), \
+ (etp)->et_vt.vt_func = NULL, \
+ (etp)->et_interval = (i))
/**
* Registers the invoking thread as listener on the timer event.