aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/ch.txt3
-rw-r--r--readme.txt2
-rw-r--r--src/include/sleep.h6
-rw-r--r--test/test.c2
-rw-r--r--test/test.h2
5 files changed, 7 insertions, 8 deletions
diff --git a/docs/ch.txt b/docs/ch.txt
index 2ec40d9c6..8f813d62f 100644
--- a/docs/ch.txt
+++ b/docs/ch.txt
@@ -141,8 +141,7 @@
* <p>
* The ARM7 port makes some assumptions on the application code organization:
* <ul>
- * <li>The \p main() function is invoked in system mode and with interrupts
- * disabled.</li>
+ * <li>The \p main() function is invoked in system mode.</li>
* <li>Each thread has a private user/system stack, the system has a single
* interrupt stack where all the interrupts are processed.</li>
* <li>The threads are started in system mode.</li>
diff --git a/readme.txt b/readme.txt
index 55f19bb64..a6a399d03 100644
--- a/readme.txt
+++ b/readme.txt
@@ -83,7 +83,7 @@ Win32-MinGW - ChibiOS/RT simulator and demo into a WIN32 process,
ports.
- CHANGE: Modified the test suite to use the new time conversion macros.
- CHANGE: Modified the CM3 startup file in order to implement an early
- initializaiton phase: hwinit0, the late initialization phase is now named
+ initialization phase: hwinit0, the late initialization phase is now named
hwinit1. The demo now initializes the PLL before initializing the BSS and
DATA segments, this greatly optimizes the system start up time.
- NEW: Unified ARM7 startup file, it is shared by the LPC and SAM7 demo
diff --git a/src/include/sleep.h b/src/include/sleep.h
index ac76b3fe8..109d9d072 100644
--- a/src/include/sleep.h
+++ b/src/include/sleep.h
@@ -28,19 +28,19 @@
/**
* Time conversion utility. Converts from seconds to system ticks number.
*/
-#define S2ST(sec) ((sec) * CH_FREQUENCY)
+#define S2ST(sec) ((systime_t)((sec) * CH_FREQUENCY))
/**
* Time conversion utility. Converts from milliseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
*/
-#define MS2ST(msec) (((((msec) - 1L) * CH_FREQUENCY) / 1000) + 1)
+#define MS2ST(msec) ((systime_t)(((((msec) - 1L) * CH_FREQUENCY) / 1000) + 1))
/**
* Time conversion utility. Converts from microseconds to system ticks number.
* @note The result is rounded upward to the next tick boundary.
*/
-#define US2ST(usec) (((((usec) - 1L) * CH_FREQUENCY) / 1000000) + 1)
+#define US2ST(usec) ((systime_t)(((((usec) - 1L) * CH_FREQUENCY) / 1000000) + 1))
#ifdef __cplusplus
extern "C" {
diff --git a/test/test.c b/test/test.c
index bd39b1371..eacb2a9e3 100644
--- a/test/test.c
+++ b/test/test.c
@@ -250,7 +250,7 @@ msg_t TestThread(void *p) {
i = 0;
while (tests[i]) {
#if DELAY_BETWEEN_TESTS > 0
- chThdSleep(DELAY_BETWEEN_TESTS);
+ chThdSleep(MS2ST(DELAY_BETWEEN_TESTS));
#endif
test_println("---------------------------------------------------------------------------");
test_print("--- Test Case ");
diff --git a/test/test.h b/test/test.h
index 524907b76..bc777fabb 100644
--- a/test/test.h
+++ b/test/test.h
@@ -22,7 +22,7 @@
#define MAX_THREADS 5
#define MAX_TOKENS 16
-#define DELAY_BETWEEN_TESTS MS2ST(200)
+#define DELAY_BETWEEN_TESTS 200
#if defined(CH_ARCHITECTURE_AVR) || defined(CH_ARCHITECTURE_MSP430)
#define THREADS_STACK_SIZE 64