From 444915d1eac7eb1059a1a5b02eb8c0393ce4a79c Mon Sep 17 00:00:00 2001 From: bernard Date: Fri, 13 Oct 2017 11:50:18 +0800 Subject: [PATCH] [finsh] Add RT_USING_POSIX_STDIN options. --- components/finsh/KConfig | 4 ++++ components/finsh/shell.c | 6 +++--- components/finsh/shell.h | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components/finsh/KConfig b/components/finsh/KConfig index 7b69f0e6b8..7d05d21af7 100644 --- a/components/finsh/KConfig +++ b/components/finsh/KConfig @@ -18,6 +18,10 @@ config FINSH_USING_DESCRIPTION bool "Keeping description in symbol table" default y +config FINSH_THREAD_PRIORITY + int "The priority level value of finsh thread" + default 20 + config FINSH_THREAD_STACK_SIZE int "The stack size for finsh thread" default 4096 diff --git a/components/finsh/shell.c b/components/finsh/shell.c index d9ec4f6839..462d4643e5 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -86,7 +86,7 @@ static char finsh_getchar(void) { RT_ASSERT(shell != RT_NULL); -#ifdef RT_USING_DFS +#ifdef RT_USING_POSIX_STDIN return getchar(); #else char ch; @@ -98,7 +98,7 @@ static char finsh_getchar(void) #endif } -#ifndef RT_USING_DFS +#ifndef RT_USING_POSIX_STDIN static rt_err_t finsh_rx_ind(rt_device_t dev, rt_size_t size) { RT_ASSERT(shell != RT_NULL); @@ -421,7 +421,7 @@ void finsh_thread_entry(void *parameter) finsh_init(&shell->parser); #endif -#ifndef RT_USING_DFS +#ifndef RT_USING_POSIX_STDIN /* set console device as shell device */ if (shell->device == RT_NULL) { diff --git a/components/finsh/shell.h b/components/finsh/shell.h index 71bda9809c..1393d15970 100644 --- a/components/finsh/shell.h +++ b/components/finsh/shell.h @@ -102,7 +102,7 @@ struct finsh_shell rt_uint8_t line_position; rt_uint8_t line_curpos; -#ifndef RT_USING_DFS +#ifndef RT_USING_POSIX_STDIN rt_device_t device; #endif @@ -124,3 +124,4 @@ const char *finsh_get_password(void); #endif #endif +