diff options
author | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-03 15:08:54 +0000 |
---|---|---|
committer | Giovanni Di Sirio <gdisirio@gmail.com> | 2015-03-03 15:08:54 +0000 |
commit | 880d6916b3fb25b3972ed78b380db630524623e7 (patch) | |
tree | 9f57ae70320f161adcb84b75ed8870754190016e /os/rt/include | |
parent | e2d1dd382a9739c2c9b970f32167d1ae12d2f499 (diff) | |
download | ChibiOS-880d6916b3fb25b3972ed78b380db630524623e7.tar.gz ChibiOS-880d6916b3fb25b3972ed78b380db630524623e7.tar.bz2 ChibiOS-880d6916b3fb25b3972ed78b380db630524623e7.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7713 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/rt/include')
-rw-r--r-- | os/rt/include/chschd.h | 2 | ||||
-rw-r--r-- | os/rt/include/chvt.h | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/os/rt/include/chschd.h b/os/rt/include/chschd.h index 0679cadd5..12a6762fa 100644 --- a/os/rt/include/chschd.h +++ b/os/rt/include/chschd.h @@ -116,7 +116,7 @@ * @api
*/
#define THD_ALIGN_STACK_SIZE(n) \
- ((((n) - 1) | (sizeof(stkalign_t) - 1)) + 1)
+ (((((size_t)(n)) - 1U) | (sizeof(stkalign_t) - 1U)) + 1U)
/**
* @brief Calculates the total Working Area size.
diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index 0a4b3a94c..f0a8f00d6 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -118,8 +118,8 @@ * @api
*/
#define MS2ST(msec) \
- ((systime_t)(((((uint32_t)(msec)) * \
- ((uint32_t)CH_CFG_ST_FREQUENCY) - 1UL) / 1000UL) + 1UL))
+ ((systime_t)((((((uint32_t)(msec)) * \
+ ((uint32_t)CH_CFG_ST_FREQUENCY)) - 1UL) / 1000UL) + 1UL))
/**
* @brief Microseconds to system ticks.
@@ -132,8 +132,8 @@ * @api
*/
#define US2ST(usec) \
- ((systime_t)(((((uint32_t)(usec)) * \
- ((uint32_t)CH_CFG_ST_FREQUENCY) - 1UL) / 1000000UL) + 1UL))
+ ((systime_t)((((((uint32_t)(usec)) * \
+ ((uint32_t)CH_CFG_ST_FREQUENCY)) - 1UL) / 1000000UL) + 1UL))
/**
* @brief System ticks to seconds.
|