From 0873332c30f78769147f0cb16d71f38ed846a814 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 24 Dec 2009 09:38:50 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1463 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/GNU-Linux-GCC/Makefile | 2 +- demos/GNU-Linux-GCC/main.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'demos') diff --git a/demos/GNU-Linux-GCC/Makefile b/demos/GNU-Linux-GCC/Makefile index 6e433a990..9d38e2637 100644 --- a/demos/GNU-Linux-GCC/Makefile +++ b/demos/GNU-Linux-GCC/Makefile @@ -21,7 +21,7 @@ CC = $(TRGT)gcc AS = $(TRGT)gcc -x assembler-with-cpp # List all default C defines here, like -D_DEBUG=1 -DDEFS = -DSHELL_USE_IPRINTF=FALSE +DDEFS = -DSIMULATOR -DSHELL_USE_IPRINTF=FALSE # List all default ASM defines here, like -D_DEBUG=1 DADEFS = diff --git a/demos/GNU-Linux-GCC/main.c b/demos/GNU-Linux-GCC/main.c index c969f2208..4153b219a 100644 --- a/demos/GNU-Linux-GCC/main.c +++ b/demos/GNU-Linux-GCC/main.c @@ -28,7 +28,7 @@ #define CONSOLE_WA_SIZE THD_WA_SIZE(4096) #define TEST_WA_SIZE THD_WA_SIZE(4096) -#define cprint(msg) chMsgSend(cdtp, (msg_t)msg) +#define cputs(msg) chMsgSend(cdtp, (msg_t)msg) static Thread *cdtp; static Thread *shelltp1; @@ -94,7 +94,7 @@ static void termination_handler(eventid_t id) { chThdWait(shelltp1); shelltp1 = NULL; chThdSleepMilliseconds(10); - cprint("Init: shell on SD1 terminated\n"); + cputs("Init: shell on SD1 terminated"); chSysLock(); chOQResetI(&SD1.d2.oqueue); chSysUnlock(); @@ -103,7 +103,7 @@ static void termination_handler(eventid_t id) { chThdWait(shelltp2); shelltp2 = NULL; chThdSleepMilliseconds(10); - cprint("Init: shell on SD2 terminated\n"); + cputs("Init: shell on SD2 terminated"); chSysLock(); chOQResetI(&SD2.d2.oqueue); chSysUnlock(); @@ -122,11 +122,11 @@ static void sd1_handler(eventid_t id) { (void)id; flags = sdGetAndClearFlags(&SD1); if ((flags & SD_CONNECTED) && (shelltp1 == NULL)) { - cprint("Init: connection on SD1\n"); + cputs("Init: connection on SD1"); shelltp1 = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO + 1); } if (flags & SD_DISCONNECTED) { - cprint("Init: disconnection on SD1\n"); + cputs("Init: disconnection on SD1"); chSysLock(); chIQResetI(&SD1.d2.iqueue); chSysUnlock(); @@ -145,11 +145,11 @@ static void sd2_handler(eventid_t id) { (void)id; flags = sdGetAndClearFlags(&SD2); if ((flags & SD_CONNECTED) && (shelltp2 == NULL)) { - cprint("Init: connection on SD2\n"); + cputs("Init: connection on SD2"); shelltp2 = shellCreate(&shell_cfg2, SHELL_WA_SIZE, NORMALPRIO + 10); } if (flags & SD_DISCONNECTED) { - cprint("Init: disconnection on SD2\n"); + cputs("Init: disconnection on SD2"); chSysLock(); chIQResetI(&SD2.d2.iqueue); chSysUnlock(); @@ -199,11 +199,11 @@ int main(void) { /* * Initializing connection/disconnection events. */ - cprint("Shell service started on SD1, SD2\n"); - cprint(" - Listening for connections on SD1\n"); + cputs("Shell service started on SD1, SD2"); + cputs(" - Listening for connections on SD1"); (void) sdGetAndClearFlags(&SD1); chEvtRegister(&SD1.d2.sevent, &sd1fel, 1); - cprint(" - Listening for connections on SD2\n"); + cputs(" - Listening for connections on SD2"); (void) sdGetAndClearFlags(&SD2); chEvtRegister(&SD2.d2.sevent, &sd2fel, 2); -- cgit v1.2.3