aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/vt.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-26 10:45:42 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2008-10-26 10:45:42 +0000
commit3c4cadc596f201c3377de40a62685b3b9d7b9de1 (patch)
tree1b02fbfeb8823d24ad53a6860a070fd5e0a70bce /src/include/vt.h
parent79280551050445d86045df9e160af2f9c85b40a3 (diff)
downloadChibiOS-3c4cadc596f201c3377de40a62685b3b9d7b9de1.tar.gz
ChibiOS-3c4cadc596f201c3377de40a62685b3b9d7b9de1.tar.bz2
ChibiOS-3c4cadc596f201c3377de40a62685b3b9d7b9de1.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@484 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/include/vt.h')
-rw-r--r--src/include/vt.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/include/vt.h b/src/include/vt.h
index 954c87da5..72385715b 100644
--- a/src/include/vt.h
+++ b/src/include/vt.h
@@ -34,13 +34,13 @@
* Time conversion utility. Converts from milliseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
*/
-#define MS2ST(msec) ((systime_t)(((((msec) - 1L) * CH_FREQUENCY) / 1000) + 1))
+#define MS2ST(msec) ((systime_t)(((((msec) - 1L) * CH_FREQUENCY) / 1000L) + 1L))
/**
* Time conversion utility. Converts from microseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
*/
-#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / 1000000) + 1))
+#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / 1000000L) + 1L))
/** Virtual Timer callback function.*/
typedef void (*vtfunc_t)(void *);
@@ -85,12 +85,12 @@ typedef struct {
extern VTList vtlist;
#define chVTDoTickI() { \
- vtlist.vt_systime++; \
+ vtlist.vt_systime++; \
if (&vtlist != (VTList *)vtlist.vt_next) { \
VirtualTimer *vtp; \
\
- --vtlist.vt_next->vt_time; \
- while (!(vtp = vtlist.vt_next)->vt_time) { \
+ --vtlist.vt_next->vt_time; \
+ while (!(vtp = vtlist.vt_next)->vt_time) { \
vtfunc_t fn = vtp->vt_func; \
vtp->vt_func = NULL; \
(vtp->vt_next->vt_prev = (void *)&vtlist)->vt_next = vtp->vt_next;\
@@ -99,9 +99,6 @@ extern VTList vtlist;
} \
}
-/** Infinite time specification.*/
-#define TIME_INFINITE 0
-
/*
* Virtual Timers APIs.
*/