aboutsummaryrefslogtreecommitdiffstats
path: root/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 10:25:31 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-12-19 10:25:31 +0000
commit35c315a77a92d8ca0efefea329770c6bf9adca2d (patch)
treea8aa8da453470d587a2ee236de7bfe2f4c859676 /demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
parentf131e4297dc619b3f3148a079c634f2cec0fd687 (diff)
downloadChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.tar.gz
ChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.tar.bz2
ChibiOS-35c315a77a92d8ca0efefea329770c6bf9adca2d.zip
AT91SAM7x board files and demos updated.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2500 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'demos/ARM7-AT91SAM7X-FATFS-GCC/main.c')
-rw-r--r--demos/ARM7-AT91SAM7X-FATFS-GCC/main.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
index 3ed2ab0e6..5708cb3b3 100644
--- a/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
+++ b/demos/ARM7-AT91SAM7X-FATFS-GCC/main.c
@@ -274,8 +274,7 @@ static void RemoveHandler(eventid_t id) {
}
/*
- * Entry point, note, the main() function is already a thread in the system
- * on entry.
+ * Application entry point.
*/
int main(int argc, char **argv) {
static const evhandler_t evhndl[] = {
@@ -289,6 +288,16 @@ int main(int argc, char **argv) {
(void)argv;
/*
+ * System initializations.
+ * - HAL initialization, this also initializes the configured device drivers
+ * and performs the board-specific initializations.
+ * - Kernel initialization, the main() function becomes a thread and the
+ * RTOS is active.
+ */
+ halInit();
+ chSysInit();
+
+ /*
* Activates the serial driver 1 using the driver default configuration.
*/
sdStart(&SD1, NULL);