From 18dee1262ee4a0ad33dfc95683dda1dddc708877 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 28 Dec 2008 13:40:49 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@550 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- src/lib/evtimer.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/evtimer.h b/src/lib/evtimer.h index 7b2e01c6d..661b29cd4 100644 --- a/src/lib/evtimer.h +++ b/src/lib/evtimer.h @@ -27,7 +27,9 @@ #ifndef _EVTIMER_H_ #define _EVTIMER_H_ - +/** + * Event timer structure. + */ typedef struct { VirtualTimer et_vt; EventSource et_es; @@ -45,10 +47,14 @@ extern "C" { /** * Initializes an \p EvTimer structure. + * @param etp the EvTimer structure to be initialized + * @param time the interval in system ticks */ -#define evtInit(etp, i) (chEvtInit(&(etp)->et_es), \ - (etp)->et_vt.vt_func = NULL, \ - (etp)->et_interval = (i)) +#define evtInit(etp, time) { \ + chEvtInit(&(etp)->et_es); \ + (etp)->et_vt.vt_func = NULL; \ + (etp)->et_interval = (time); \ +} #endif /* _EVTIMER_H_ */ -- cgit v1.2.3