Fixed bug 3581304.

git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4786 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
gdisirio 2012-10-28 07:42:57 +00:00
parent 7ea2ed1e47
commit 950cacebb0
2 changed files with 4 additions and 10 deletions

View File

@ -55,16 +55,10 @@ int main(void) {
chSysInit(); chSysInit();
/* /*
* Activates the serial driver 2 using the driver default configuration. * Activates the serial driver 1 using the driver default configuration.
*/ */
sdStart(&SD1, NULL); sdStart(&SD1, NULL);
/*
* The main() function becomes a thread here then the interrupts are
* enabled and ChibiOS/RT goes live.
*/
chSysInit();
/* /*
* Creates the blinker thread. * Creates the blinker thread.
*/ */
@ -72,7 +66,7 @@ int main(void) {
/* /*
* Normal main() thread activity, in this demo it does nothing except * Normal main() thread activity, in this demo it does nothing except
* sleeping in a loop. * checking a button and run a test suite if button was pressed.
*/ */
while (TRUE) { while (TRUE) {
if (!palReadPad(IOPORT6, P6_I_BUTTON)) if (!palReadPad(IOPORT6, P6_I_BUTTON))

View File

@ -11,8 +11,8 @@ I/O is simulated over TCP/IP sockets.
The demo listens on the two serial ports, when a connection is detected a The demo listens on the two serial ports, when a connection is detected a
thread is started that serves a small command shell. thread is started that serves a small command shell.
The demo shows how create/terminate threads at runtime, how listen to events, The demo shows how to create/terminate threads at runtime, how to listen to
how ho work with serial ports, how use the messages. events, how to work with serial ports, how to use the messages.
You can develop your ChibiOS/RT application using this demo as a simulator You can develop your ChibiOS/RT application using this demo as a simulator
then you can recompile it for a different architecture. then you can recompile it for a different architecture.
See demo.c for details. See demo.c for details.