summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>2017-01-24 10:18:26 +0100
committerJukka Rissanen <jukka.rissanen@linux.intel.com>2017-01-27 12:35:53 +0200
commit587335c6cfb05e5c5104051e21d98f1ffcbfdafe (patch)
tree3c5561269a7415c10ceceb42528812126a74c6e5
parent2f1af492eeb1106d8af0cfbdbafdf3fbfe9f822d (diff)
shell: Make the command queue size configurable via Kconfig
Change-Id: I80551c76903118bfe831776c87135e89d32552da Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
-rw-r--r--subsys/shell/Kconfig11
-rw-r--r--subsys/shell/shell.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/subsys/shell/Kconfig b/subsys/shell/Kconfig
index 4b599179b..6cfee29f9 100644
--- a/subsys/shell/Kconfig
+++ b/subsys/shell/Kconfig
@@ -14,18 +14,23 @@ config CONSOLE_SHELL
default n
select CONSOLE_HANDLER
help
- Shell implementation based on CONSOLE_HANDLER.
+ Shell implementation based on CONSOLE_HANDLER.
if CONSOLE_SHELL
+
config CONSOLE_SHELL_STACKSIZE
int
prompt "Console handler shell stack size"
default 2000
- depends on CONSOLE_SHELL
help
- Stack size for the console handler shell.
+ Stack size for the console handler shell.
+config CONSOLE_SHELL_MAX_CMD_QUEUED
+ int "Shell's command queue size"
+ default 3
+ help
+ Maximum size of the queue for input commands.
source "subsys/shell/modules/Kconfig"
diff --git a/subsys/shell/shell.c b/subsys/shell/shell.c
index 2301583b3..3ec2f725c 100644
--- a/subsys/shell/shell.c
+++ b/subsys/shell/shell.c
@@ -43,7 +43,7 @@ static int default_module = -1;
#define STACKSIZE CONFIG_CONSOLE_SHELL_STACKSIZE
static char __stack stack[STACKSIZE];
-#define MAX_CMD_QUEUED 3
+#define MAX_CMD_QUEUED CONFIG_CONSOLE_SHELL_MAX_CMD_QUEUED
static struct console_input buf[MAX_CMD_QUEUED];
static struct k_fifo avail_queue;