diff options
Diffstat (limited to 'os/kernel/src/chvt.c')
-rw-r--r-- | os/kernel/src/chvt.c | 59 |
1 files changed, 32 insertions, 27 deletions
diff --git a/os/kernel/src/chvt.c b/os/kernel/src/chvt.c index 5acde49aa..9558a1cb7 100644 --- a/os/kernel/src/chvt.c +++ b/os/kernel/src/chvt.c @@ -18,20 +18,23 @@ */
/**
- * @file chvt.c
- * @brief Time and Virtual Timers related code.
+ * @file chvt.c
+ * @brief Time and Virtual Timers related code.
+ *
* @addtogroup time
* @{
*/
#include "ch.h"
+/**
+ * @brief Virtual timers delta list header. + */
VTList vtlist;
/**
- * @brief Virtual Timers initialization.
- *
- * @note Internal use only.
+ * @brief Virtual Timers initialization.
+ * @note Internal use only.
*/
void vt_init(void) {
@@ -41,19 +44,20 @@ void vt_init(void) { }
/**
- * @brief Enables a virtual timer.
+ * @brief Enables a virtual timer.
+ * @note The associated function is invoked by an interrupt handler within
+ * the I-Locked state, see @ref system_states.
*
- * @param[out] vtp the @p VirtualTimer structure pointer
- * @param[in] time the number of time ticks, the value @p TIME_INFINITE is not
- * allowed. The value @p TIME_IMMEDIATE is allowed but
- * interpreted as a normal time specification not as an
- * immediate timeout specification.
- * @param[in] vtfunc the timer callback function. After invoking the callback
- * the timer is disabled and the structure can be disposed or
- * reused.
- * @param[in] par a parameter that will be passed to the callback function
- * @note The associated function is invoked by an interrupt handler within
- * the I-Locked state, see @ref system_states.
+ * @param[out] vtp the @p VirtualTimer structure pointer
+ * @param[in] time the number of time ticks, the value @p TIME_INFINITE
+ * is notallowed. The value @p TIME_IMMEDIATE is allowed
+ * but interpreted as a normal time specification not as
+ * an immediate timeout specification.
+ * @param[in] vtfunc the timer callback function. After invoking the
+ * callback the timer is disabled and the structure can
+ * be disposed or reused.
+ * @param[in] par a parameter that will be passed to the callback
+ * function
*/
void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par) {
VirtualTimer *p;
@@ -77,10 +81,10 @@ void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par) { }
/**
- * @brief Disables a Virtual Timer.
+ * @brief Disables a Virtual Timer.
+ * @note The timer MUST be active when this function is invoked.
*
- * @param[in] vtp the @p VirtualTimer structure pointer
- * @note The timer MUST be active when this function is invoked.
+ * @param[in] vtp the @p VirtualTimer structure pointer
*/
void chVTResetI(VirtualTimer *vtp) {
@@ -97,14 +101,15 @@ void chVTResetI(VirtualTimer *vtp) { }
/**
- * @brief Checks if the current system time is within the specified time window.
+ * @brief Checks if the current system time is within the specified time
+ * window.
+ * @note When start==end then the function returns always true because the
+ * whole time range is specified.
*
- * @param[in] start the start of the time window (inclusive)
- * @param[in] end the end of the time window (non inclusive)
- * @retval TRUE current time within the specified time window.
- * @retval FALSE current time not within the specified time window.
- * @note When start==end then the function returns always true because the
- * whole time range is specified.
+ * @param[in] start the start of the time window (inclusive)
+ * @param[in] end the end of the time window (non inclusive)
+ * @retval TRUE current time within the specified time window.
+ * @retval FALSE current time not within the specified time window.
*/
bool_t chTimeIsWithin(systime_t start, systime_t end) {
|