aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-04 08:03:01 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-04 08:03:01 +0000
commitfb0563fbd223cd0bfcddaf1ae4745efc1e5f281b (patch)
tree5b806792d4099e927be61c4dbfb0566b79a398ab
parentcbce43930a29bf4afac6cffa9a80f489ac11e9a4 (diff)
downloadChibiOS-fb0563fbd223cd0bfcddaf1ae4745efc1e5f281b.tar.gz
ChibiOS-fb0563fbd223cd0bfcddaf1ae4745efc1e5f281b.tar.bz2
ChibiOS-fb0563fbd223cd0bfcddaf1ae4745efc1e5f281b.zip
Fixed bug #415.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5810 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/kernel/include/chvt.h11
-rw-r--r--readme.txt2
-rw-r--r--testhal/SPC563Mxx/SPI/main.c1
3 files changed, 9 insertions, 5 deletions
diff --git a/os/kernel/include/chvt.h b/os/kernel/include/chvt.h
index 63ff3c4b3..97a04d81e 100644
--- a/os/kernel/include/chvt.h
+++ b/os/kernel/include/chvt.h
@@ -43,7 +43,8 @@
*
* @api
*/
-#define S2ST(sec) ((systime_t)((sec) * CH_FREQUENCY))
+#define S2ST(sec) \
+ ((systime_t)((sec) * CH_FREQUENCY))
/**
* @brief Milliseconds to system ticks.
@@ -55,8 +56,8 @@
*
* @api
*/
-#define MS2ST(msec) ((systime_t)(((((msec) - 1L) * CH_FREQUENCY) / \
- 1000L) + 1L))
+#define MS2ST(msec) \
+ ((systime_t)((((msec) * CH_FREQUENCY - 1L) / 1000L) + 1L))
/**
* @brief Microseconds to system ticks.
@@ -68,8 +69,8 @@
*
* @api
*/
-#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / \
- 1000000L) + 1L))
+#define US2ST(usec) \
+ ((systime_t)((((usec) * CH_FREQUENCY - 1L) / 1000000L) + 1L))
/** @} */
/**
diff --git a/readme.txt b/readme.txt
index 953b51cec..adf5773f2 100644
--- a/readme.txt
+++ b/readme.txt
@@ -89,6 +89,8 @@
*****************************************************************************
*** 2.5.2 ***
+- FIX: Fixed MS2ST() and US2ST() macros error (bug #415)(backported to 2.4.4,
+ 2.2.10, NilRTOS).
- FIX: Fixed lwipthread.h should explicitly include lwip/opts.h (bug #414).
- FIX: Fixed STM32_PLLI2SCLKOUT miscalculated (bug #413)(backported to 2.4.4).
- FIX: Fixed wrong RTC vector name in STM32F1/F4/L1 EXT drivers (bug #412).
diff --git a/testhal/SPC563Mxx/SPI/main.c b/testhal/SPC563Mxx/SPI/main.c
index 25b67546b..46378a5f8 100644
--- a/testhal/SPC563Mxx/SPI/main.c
+++ b/testhal/SPC563Mxx/SPI/main.c
@@ -152,6 +152,7 @@ int main(void) {
*/
while (TRUE) {
chThdSleepMilliseconds(500);
+ palTogglePad(PORT11, P11_LED2);
}
return 0;
}