diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-12-28 13:40:49 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-12-28 13:40:49 +0000 |
commit | 18dee1262ee4a0ad33dfc95683dda1dddc708877 (patch) | |
tree | faec4756e5995d5868ff77a92d3be5186c4a7a39 /src/lib | |
parent | 458a2834834986bc13171439b2f6889ad14044b8 (diff) | |
download | ChibiOS-18dee1262ee4a0ad33dfc95683dda1dddc708877.tar.gz ChibiOS-18dee1262ee4a0ad33dfc95683dda1dddc708877.tar.bz2 ChibiOS-18dee1262ee4a0ad33dfc95683dda1dddc708877.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@550 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evtimer.h | 14 |
1 files changed, 10 insertions, 4 deletions
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_ */
|