Fixed bug #418.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5899 35acf78f-673a-0410-8e92-d51de3d6d3f4master
parent
cf4c8b5281
commit
1a100c442a
|
@ -44,7 +44,7 @@
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define S2ST(sec) \
|
#define S2ST(sec) \
|
||||||
((systime_t)((sec) * CH_FREQUENCY))
|
((systime_t)(((uint32_t)(sec)) * ((uint32_t)CH_FREQUENCY)))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Milliseconds to system ticks.
|
* @brief Milliseconds to system ticks.
|
||||||
|
@ -57,7 +57,8 @@
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define MS2ST(msec) \
|
#define MS2ST(msec) \
|
||||||
((systime_t)((((msec) * CH_FREQUENCY - 1L) / 1000L) + 1L))
|
((systime_t)(((((uint32_t)(msec)) * ((uint32_t)CH_FREQUENCY) - 1UL) / \
|
||||||
|
1000UL) + 1UL))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Microseconds to system ticks.
|
* @brief Microseconds to system ticks.
|
||||||
|
@ -70,7 +71,8 @@
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
#define US2ST(usec) \
|
#define US2ST(usec) \
|
||||||
((systime_t)((((usec) * CH_FREQUENCY - 1L) / 1000000L) + 1L))
|
((systime_t)(((((uint32_t)(usec)) * ((uint32_t)CH_FREQUENCY) - 1UL) / \
|
||||||
|
1000000UL) + 1UL))
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -89,6 +89,8 @@
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
*** 2.7.0 ***
|
*** 2.7.0 ***
|
||||||
|
- FIX: Fixed missing casts in time-conversion macros (bug #418)(backported
|
||||||
|
to 2.6.1, 2.4.4 and 2.2.10).
|
||||||
- FIX: Fixed STM32 Serial (v2) driver invalid CR registers size (bug #416)
|
- FIX: Fixed STM32 Serial (v2) driver invalid CR registers size (bug #416)
|
||||||
(backported to 2.6.0).
|
(backported to 2.6.0).
|
||||||
- FIX: Fixed MS2ST() and US2ST() macros error (bug #415)(backported to 2.6.0,
|
- FIX: Fixed MS2ST() and US2ST() macros error (bug #415)(backported to 2.6.0,
|
||||||
|
|
Loading…
Reference in New Issue