aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/include/chvt.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt/include/chvt.h')
-rw-r--r--os/rt/include/chvt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h
index 2ddfc26c7..4e257887d 100644
--- a/os/rt/include/chvt.h
+++ b/os/rt/include/chvt.h
@@ -146,7 +146,7 @@
*
* @api
*/
-#define ST2S(n) ((((n) - 1UL) / CH_CFG_ST_FREQUENCY) + 1UL)
+#define ST2S(n) (((((n) - 1UL) * 1UL) / CH_CFG_ST_FREQUENCY) + 1UL)
/**
* @brief System ticks to milliseconds.
@@ -158,7 +158,7 @@
*
* @api
*/
-#define ST2MS(n) ((((n) - 1UL) / (CH_CFG_ST_FREQUENCY / 1000UL)) + 1UL)
+#define ST2MS(n) (((((n) - 1UL) * 1000UL) / CH_CFG_ST_FREQUENCY) + 1UL)
/**
* @brief System ticks to microseconds.
@@ -170,7 +170,7 @@
*
* @api
*/
-#define ST2US(n) ((((n) - 1UL) / (CH_CFG_ST_FREQUENCY / 1000000UL)) + 1UL)
+#define ST2US(n) (((((n) - 1UL) * 1000000UL) / CH_CFG_ST_FREQUENCY) + 1UL)
/** @} */
/*===========================================================================*/