diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-04 10:03:33 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-04 10:03:33 +0000 |
commit | 983920ddc9e3f074defd7ab68e72248401d8ca3c (patch) | |
tree | 912a100d599ac2e2232b8683ee41f8251badaefe /demos/ARM7-AT91SAM7X-WEB-GCC/main.c | |
parent | b7affa79a14cc90a38b3e48c9393cd87710512b9 (diff) | |
download | ChibiOS-983920ddc9e3f074defd7ab68e72248401d8ca3c.tar.gz ChibiOS-983920ddc9e3f074defd7ab68e72248401d8ca3c.tar.bz2 ChibiOS-983920ddc9e3f074defd7ab68e72248401d8ca3c.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@456 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-AT91SAM7X-WEB-GCC/main.c')
-rw-r--r-- | demos/ARM7-AT91SAM7X-WEB-GCC/main.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c index 5887beedf..00dc9193e 100644 --- a/demos/ARM7-AT91SAM7X-WEB-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-WEB-GCC/main.c @@ -41,19 +41,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 and web server threads.
*/
- chSysInit();
-
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
chThdCreateStatic(waWebThread, sizeof(waWebThread), NORMALPRIO - 1, WebThread, NULL);
+ /*
+ * Normal main() thread activity.
+ */
while (TRUE) {
chThdSleep(500);
if (!(AT91C_BASE_PIOB->PIO_PDSR & PIOB_SW1))
|