浏览代码

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
Bernard Xiong 7 年之前
父节点
当前提交
228c820e4d
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      components/finsh/Kconfig
  2. 4 0
      components/finsh/shell.c

+ 4 - 0
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

+ 4 - 0
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);