aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-04 13:12:00 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2014-08-04 13:12:00 +0000
commit3e71eee97c73bdac8fec33bfdc4f343bc267d049 (patch)
treef3bb206b1a8988015635375b4b5debbe07ee5e43 /os
parent6e81c34c57d58b541125015a41b274a3aed8c16a (diff)
downloadChibiOS-3e71eee97c73bdac8fec33bfdc4f343bc267d049.tar.gz
ChibiOS-3e71eee97c73bdac8fec33bfdc4f343bc267d049.tar.bz2
ChibiOS-3e71eee97c73bdac8fec33bfdc4f343bc267d049.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7120 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-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)
/** @} */
/*===========================================================================*/