diff options
Diffstat (limited to 'components/finsh/shell.c')
| -rw-r--r-- | components/finsh/shell.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 76ac726597..c35ed1cd86 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -41,6 +41,14 @@ static char finsh_thread_stack[FINSH_THREAD_STACK_SIZE]; struct finsh_shell _shell; #endif +/* finsh symtab */ +#ifdef FINSH_USING_SYMTAB +struct finsh_syscall *_syscall_table_begin = NULL; +struct finsh_syscall *_syscall_table_end = NULL; +struct finsh_sysvar *_sysvar_table_begin = NULL; +struct finsh_sysvar *_sysvar_table_end = NULL; +#endif + struct finsh_shell *shell; static char *finsh_prompt_custom = RT_NULL; @@ -158,6 +166,7 @@ void finsh_set_prompt_mode(rt_uint32_t prompt_mode) static int finsh_getchar(void) { +#ifdef RT_USING_DEVICE #ifdef RT_USING_POSIX return getchar(); #else @@ -169,9 +178,13 @@ static int finsh_getchar(void) return (int)ch; #endif +#else + extern char rt_hw_console_getchar(void); + return rt_hw_console_getchar(); +#endif } -#ifndef RT_USING_POSIX +#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE) static rt_err_t finsh_rx_ind(rt_device_t dev, rt_size_t size) { RT_ASSERT(shell != RT_NULL); @@ -499,7 +512,7 @@ void finsh_thread_entry(void *parameter) finsh_init(&shell->parser); #endif -#ifndef RT_USING_POSIX +#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE) /* set console device as shell device */ if (shell->device == RT_NULL) { |
