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

This commit is contained in:
gdisirio 2010-12-19 11:07:54 +00:00
parent fa1b222c21
commit 1f18297e2a
6 changed files with 63 additions and 13 deletions

View File

@ -82,14 +82,23 @@ static msg_t Thread1(void *arg) {
} }
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)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();
/* /*
* Setting up analog inputs used by the demo. * Setting up analog inputs used by the demo.
*/ */

View File

@ -78,14 +78,23 @@ static msg_t can_tx(void * p) {
} }
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)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 CAN driver 1. * Activates the CAN driver 1.
*/ */

View File

@ -60,14 +60,23 @@ static PWMConfig pwmcfg = {
}; };
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)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();
/* /*
* Creates the blinker thread. * Creates the blinker thread.
*/ */

View File

@ -87,8 +87,7 @@ static msg_t spi_thread_2(void *p) {
} }
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
unsigned i; unsigned i;
@ -96,6 +95,16 @@ int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)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();
/* /*
* SPI1 I/O pins setup. * SPI1 I/O pins setup.
*/ */

View File

@ -111,14 +111,23 @@ static UARTConfig uart_cfg_1 = {
}; };
/* /*
* Entry point, note, the main() function is already a thread in the system * Application entry point.
* on entry.
*/ */
int main(int argc, char **argv) { int main(int argc, char **argv) {
(void)argc; (void)argc;
(void)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 2 using the driver default configuration. * Activates the serial driver 2 using the driver default configuration.
*/ */

View File

@ -46,14 +46,19 @@ static ROMCONST uint8_t digits[32] = {
static uint8_t buffer[32]; static uint8_t buffer[32];
/* /*
* Entry point. * Application entry point.
*/ */
void main(void) { void main(void) {
/* /*
* Board/HAL initialization. * 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.
*/ */
hwinit(); halInit();
chSysInit();
/* /*
* OS initialization. * OS initialization.