diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 14:29:02 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2012-01-04 14:29:02 +0000 |
commit | c498fdc4d64f1de8706f9d3b224dc244c5e91dc2 (patch) | |
tree | 0c96b48c552f7df4179910711fb3d37eeea3a2aa /os/kernel | |
parent | 8bd4ec7b8474fcfce5c4441131f841175d62e0b0 (diff) | |
download | ChibiOS-c498fdc4d64f1de8706f9d3b224dc244c5e91dc2.tar.gz ChibiOS-c498fdc4d64f1de8706f9d3b224dc244c5e91dc2.tar.bz2 ChibiOS-c498fdc4d64f1de8706f9d3b224dc244c5e91dc2.zip |
Added time conversions to RT counter code. Documentation improvements.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3728 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel')
-rw-r--r-- | os/kernel/include/chvt.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/os/kernel/include/chvt.h b/os/kernel/include/chvt.h index 0038e3d0a..e74a7f713 100644 --- a/os/kernel/include/chvt.h +++ b/os/kernel/include/chvt.h @@ -37,6 +37,11 @@ * @brief Seconds to system ticks.
* @details Converts from seconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
+ *
+ * @param[in] sec number of seconds
+ * @return The number of ticks.
+ *
+ * @api
*/
#define S2ST(sec) ((systime_t)((sec) * CH_FREQUENCY))
@@ -44,6 +49,11 @@ * @brief Milliseconds t0 system ticks.
* @details Converts from milliseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
+ *
+ * @param[in] msec number of milliseconds
+ * @return The number of ticks.
+ *
+ * @api
*/
#define MS2ST(msec) ((systime_t)(((((msec) - 1L) * CH_FREQUENCY) / 1000L) + 1L))
@@ -51,6 +61,11 @@ * @brief Microseconds to system ticks.
* @details Converts from microseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
+ *
+ * @param[in] usec number of microseconds
+ * @return The number of ticks.
+ *
+ * @api
*/
#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / 1000000L) + 1L))
/** @} */
|