summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-03-24 08:38:13 +0800
committerGitHub <[email protected]>2018-03-24 08:38:13 +0800
commit228c820e4d86dfcb0644f4c1781ae6952179e18e (patch)
treeda8e49039a178046701538fa8f897a4da8c04591
parent8ed3470d2a485c49ec4f5d4a5ec53e94edf7a2c8 (diff)
parent22bcdd4bdb3d1463fc36bf1efdd52953f486ae98 (diff)
Merge pull request #1289 from moebiusever/master
[finsh] add FINSH_ECHO_DISABLE_DEFAULT and remove FINSH_ECHO_MODE_DEFAULT, to control the finsh default echo mode
-rw-r--r--components/finsh/Kconfig4
-rw-r--r--components/finsh/shell.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/components/finsh/Kconfig b/components/finsh/Kconfig
index f36c73e1fb..610db05eb6 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_ECHO_DISABLE_DEFAULT
+ bool "Disable the echo mode in default"
+ default n
+
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..ea68a57ffa 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -414,7 +414,11 @@ void finsh_thread_entry(void *parameter)
char ch;
/* normal is echo mode */
+#ifndef FINSH_ECHO_DISABLE_DEFAULT
shell->echo_mode = 1;
+#else
+ shell->echo_mode = 0;
+#endif
#ifndef FINSH_USING_MSH_ONLY
finsh_init(&shell->parser);