aboutsummaryrefslogtreecommitdiffstats
path: root/src/chvt.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-07 11:47:38 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-03-07 11:47:38 +0000
commitd785c8a7e5e58dc2ef41afdfee47e605ef1216f5 (patch)
tree332a887d2eacc9a5e836d63792f882f68b0a46fe /src/chvt.c
parent719cf5fa8d01d6660fa85708c03fcf3cdac8bf37 (diff)
downloadChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.tar.gz
ChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.tar.bz2
ChibiOS-d785c8a7e5e58dc2ef41afdfee47e605ef1216f5.zip
Documentation fixes about timeouts, improved checks in chVTSetI().
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@812 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src/chvt.c')
-rw-r--r--src/chvt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/chvt.c b/src/chvt.c
index 1fdd198f0..0e2eae794 100644
--- a/src/chvt.c
+++ b/src/chvt.c
@@ -44,7 +44,8 @@ void vt_init(void) {
* @brief Enables a virtual timer.
*
* @param vtp the @p VirtualTimer structure pointer
- * @param time the number of time ticks, the value zero is not allowed
+ * @param time the number of time ticks, the values @p TIME_ZERO and
+ * @p TIME_INFINITE are not allowed
* @param vtfunc the timer callback function. After invoking the callback
* the timer is disabled and the structure can be disposed or
* reused.
@@ -55,7 +56,8 @@ void vt_init(void) {
void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par) {
VirtualTimer *p;
- chDbgCheck((vtp != NULL) && (time != 0) && (vtfunc != NULL), "chVTSetI");
+ chDbgCheck((vtp != NULL) && (time != TIME_ZERO) &&
+ (time != TIME_INFINITE) && (vtfunc != NULL), "chVTSetI");
vtp->vt_par = par;
vtp->vt_func = vtfunc;