shell: Make the command queue size configurable via Kconfig

Change-Id: I80551c76903118bfe831776c87135e89d32552da
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
Tomasz Bursztyka 2017-01-24 10:18:26 +01:00 committed by Jukka Rissanen
commit 587335c6cf
2 changed files with 9 additions and 4 deletions

View file

@ -18,14 +18,19 @@ config CONSOLE_SHELL
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.
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"

View file

@ -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;