File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ void finsh_set_prompt_mode(rt_uint32_t prompt_mode)
164164 shell -> prompt_mode = prompt_mode ;
165165}
166166
167- static int finsh_getchar (void )
167+ char finsh_getchar (void )
168168{
169169#ifdef RT_USING_DEVICE
170170#ifdef RT_USING_POSIX
@@ -176,7 +176,7 @@ static int finsh_getchar(void)
176176 while (rt_device_read (shell -> device , -1 , & ch , 1 ) != 1 )
177177 rt_sem_take (& shell -> rx_sem , RT_WAITING_FOREVER );
178178
179- return ( int ) ch ;
179+ return ch ;
180180#endif
181181#else
182182 extern char rt_hw_console_getchar (void );
@@ -329,7 +329,7 @@ static void finsh_wait_auth(void)
329329 while (1 )
330330 {
331331 /* read one character from device */
332- ch = finsh_getchar ();
332+ ch = ( int ) finsh_getchar ();
333333 if (ch < 0 )
334334 {
335335 continue ;
@@ -541,7 +541,7 @@ void finsh_thread_entry(void *parameter)
541541
542542 while (1 )
543543 {
544- ch = finsh_getchar ();
544+ ch = ( int ) finsh_getchar ();
545545 if (ch < 0 )
546546 {
547547 continue ;
Original file line number Diff line number Diff line change @@ -97,6 +97,7 @@ rt_uint32_t finsh_get_echo(void);
9797int finsh_system_init (void );
9898void finsh_set_device (const char * device_name );
9999const char * finsh_get_device (void );
100+ char finsh_getchar (void );
100101
101102rt_uint32_t finsh_get_prompt_mode (void );
102103void finsh_set_prompt_mode (rt_uint32_t prompt_mode );
You can’t perform that action at this time.
0 commit comments