From: lottaviano Date: Fri, 22 Apr 2011 11:06:40 +0000 (+0000) Subject: doc: Improve timer documentation. X-Git-Tag: 2.7.0~99 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=0088022a7741d4636b054f47c67be353d9242af2;p=bertos.git doc: Improve timer documentation. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@4867 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/drv/timer.c b/bertos/drv/timer.c index 91784f9a..a411dc4e 100644 --- a/bertos/drv/timer.c +++ b/bertos/drv/timer.c @@ -158,6 +158,8 @@ INLINE void timer_addToList(Timer *timer, List *queue) * When the delay indicated by the timer expires, the timer * device will execute the event associated with it. * + * You should not call this function on an already running timer. + * * \note Interrupt safe */ void timer_add(Timer *timer) diff --git a/bertos/drv/timer.h b/bertos/drv/timer.h index 06f19ed3..b006c5f4 100644 --- a/bertos/drv/timer.h +++ b/bertos/drv/timer.h @@ -291,7 +291,12 @@ INLINE void timer_setSoftint(Timer *timer, Hook func, iptr_t user_data) event_initSoftint(&timer->expire, func, user_data); } -/** Set the timer delay (the time before the event will be triggered) */ +/** + * Set the timer delay (the time before the event will be triggered) + * + * \note It's illegal to change the delay of the timer when it's + * still running. + */ INLINE void timer_setDelay(Timer *timer, ticks_t delay) { timer->_delay = delay;