diff options
Diffstat (limited to 'os/kernel/include/chvt.h')
-rw-r--r-- | os/kernel/include/chvt.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/os/kernel/include/chvt.h b/os/kernel/include/chvt.h index e75e966d5..fe4ba11df 100644 --- a/os/kernel/include/chvt.h +++ b/os/kernel/include/chvt.h @@ -30,6 +30,10 @@ #define _CHVT_H_
/**
+ * @name Time conversion utilities
+ * @{
+ */
+/**
* @brief Time conversion utility.
* @details Converts from seconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
@@ -49,6 +53,7 @@ * @note The result is rounded upward to the next tick boundary.
*/
#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / 1000000L) + 1L))
+/** @} */
/**
* @brief Virtual Timer callback function.
@@ -115,20 +120,6 @@ extern VTList vtlist; } \
}
-/*
- * Virtual Timers APIs.
- */
-#ifdef __cplusplus
-extern "C" {
-#endif
- void _vt_init(void);
- void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par);
- void chVTResetI(VirtualTimer *vtp);
- bool_t chTimeIsWithin(systime_t start, systime_t end);
-#ifdef __cplusplus
-}
-#endif
-
/**
* @brief Returns TRUE if the speciified timer is armed.
*
@@ -149,6 +140,20 @@ extern "C" { */
#define chTimeNow() (vtlist.vt_systime)
+/*
+ * Virtual Timers APIs.
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void _vt_init(void);
+ void chVTSetI(VirtualTimer *vtp, systime_t time, vtfunc_t vtfunc, void *par);
+ void chVTResetI(VirtualTimer *vtp);
+ bool_t chTimeIsWithin(systime_t start, systime_t end);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _CHVT_H_ */
/** @} */
|