git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@472 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2008-10-15 18:53:15 +00:00
parent 8c778229e5
commit e3974196a3
5 changed files with 7 additions and 8 deletions

View File

@ -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>

View File

@ -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

View File

@ -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" {

View File

@ -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 ");

View File

@ -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