diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-10 21:05:51 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2009-12-10 21:05:51 +0000 |
commit | 4bb9e7735d4a84e6ddee2b5778906e6cd54db577 (patch) | |
tree | 12ebe014bb3cec9bb42308fc2b10cc82f9b48b2b | |
parent | dea70dbc797e0936c2532ae55881437e06e169fa (diff) | |
download | ChibiOS-4bb9e7735d4a84e6ddee2b5778906e6cd54db577.tar.gz ChibiOS-4bb9e7735d4a84e6ddee2b5778906e6cd54db577.tar.bz2 ChibiOS-4bb9e7735d4a84e6ddee2b5778906e6cd54db577.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1412 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r-- | demos/Win32-MinGW/chconf.h | 2 | ||||
-rw-r--r-- | demos/Win32-MinGW/main.c | 24 | ||||
-rw-r--r-- | os/various/shell.h | 2 |
3 files changed, 24 insertions, 4 deletions
diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index ddd00b0f8..34575541a 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -80,7 +80,7 @@ * @note Requires @p CH_USE_COREMEM.
*/
#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
-#define CH_MEMCORE_SIZE 0x20000
+#define CH_MEMCORE_SIZE 0x40000
#endif
/*===========================================================================*/
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
};
/*
diff --git a/os/various/shell.h b/os/various/shell.h index d96acc4c4..c3433bc21 100644 --- a/os/various/shell.h +++ b/os/various/shell.h @@ -35,7 +35,7 @@ #endif
/**
- * @brief Shell maximum input line length.
+ * @brief Shell maximum arguments per command.
*/
#if !defined(SHELL_MAX_ARGUMENTS) || defined(__DOXYGEN__)
#define SHELL_MAX_ARGUMENTS 4
|