summaryrefslogtreecommitdiff
path: root/components/finsh
diff options
context:
space:
mode:
authormoebius.ever <[email protected]>2018-03-15 10:12:17 +0800
committermoebius.ever <[email protected]>2018-03-15 10:12:17 +0800
commit5444c90ecfe0a2bb4e8332b09f170daf848cad0a (patch)
tree2f0581b5cd8cd716b6ae45cc2658bd2d96e97e6f /components/finsh
parent93f5e3e466af0e89a3cbce55443cad491844e9fc (diff)
[finsh] add FINSH_ENABLE_ECHO macro to config the finsh needs echo or not
Diffstat (limited to 'components/finsh')
-rw-r--r--components/finsh/Kconfig4
-rw-r--r--components/finsh/shell.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/components/finsh/Kconfig b/components/finsh/Kconfig
index f36c73e1fb..f3931c68b7 100644
--- a/components/finsh/Kconfig
+++ b/components/finsh/Kconfig
@@ -26,6 +26,10 @@ config FINSH_USING_DESCRIPTION
bool "Keeping description in symbol table"
default y
+config FINSH_ENABLE_ECHO
+ int "Enble the command echo mode"
+ default 1
+
config FINSH_THREAD_PRIORITY
int "The priority level value of finsh thread"
default 20
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index fc13a92b13..a98c2531b5 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -414,7 +414,7 @@ void finsh_thread_entry(void *parameter)
char ch;
/* normal is echo mode */
- shell->echo_mode = 1;
+ shell->echo_mode = FINSH_ENABLE_ECHO;
#ifndef FINSH_USING_MSH_ONLY
finsh_init(&shell->parser);