From 4bb9e7735d4a84e6ddee2b5778906e6cd54db577 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 10 Dec 2009 21:05:51 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1412 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/main.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'demos/Win32-MinGW/main.c') diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index c2ead083e..22ea086c3 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -24,6 +24,7 @@ #define SHELL_WA_SIZE THD_WA_SIZE(4096) #define CONSOLE_WA_SIZE THD_WA_SIZE(4096) +#define TEST_WA_SIZE THD_WA_SIZE(4096) #define cprint(msg) chMsgSend(cdtp, (msg_t)msg) @@ -31,14 +32,33 @@ static Thread *cdtp; static Thread *shelltp1; static Thread *shelltp2; +void cmd_test(BaseChannel *chp, int argc, char *argv[]) { + Thread *tp; + + (void)argv; + if (argc > 0) { + shellPrintLine(chp, "Usage: test"); + return; + } + tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(), + TestThread, chp); + chThdWait(tp); +// TestThread(chp); +} + +static const ShellCommand commands[] = { + {"test", cmd_test}, + {NULL, NULL} +}; + static const ShellConfig shell_cfg1 = { (BaseChannel *)&SD1, - NULL + commands }; static const ShellConfig shell_cfg2 = { (BaseChannel *)&SD2, - NULL + commands }; /* -- cgit v1.2.3