diff options
Diffstat (limited to 'demos/ARM7-AT91SAM7X-GCC/main.c')
-rw-r--r-- | demos/ARM7-AT91SAM7X-GCC/main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c index abd84bd87..c280e5489 100644 --- a/demos/ARM7-AT91SAM7X-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-GCC/main.c @@ -36,18 +36,20 @@ static msg_t Thread1(void *arg) { }
/*
- * Entry point, the interrupts are disabled on entry.
+ * Entry point, note, the main() function is already a thread in the system
+ * on entry.
*/
int main(int argc, char **argv) {
+
/*
- * The main() function becomes a thread here then the interrupts are
- * enabled and ChibiOS/RT goes live.
+ * Creates the blinker thread.
*/
- chSysInit();
-
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
+ /*
+ * Normal main() thread activity.
+ */
while (TRUE) {
chThdSleep(500);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW1))
|