diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-04 09:59:39 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-10-04 09:59:39 +0000 |
commit | b7affa79a14cc90a38b3e48c9393cd87710512b9 (patch) | |
tree | 1554dbf5822d1fa680d624e8e73525c5a63e4305 /demos/ARM7-AT91SAM7X-GCC/main.c | |
parent | 88d9fc3ce959134051241fd261f9f56026248648 (diff) | |
download | ChibiOS-b7affa79a14cc90a38b3e48c9393cd87710512b9.tar.gz ChibiOS-b7affa79a14cc90a38b3e48c9393cd87710512b9.tar.bz2 ChibiOS-b7affa79a14cc90a38b3e48c9393cd87710512b9.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@455 35acf78f-673a-0410-8e92-d51de3d6d3f4
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))
|