diff options
| author | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
|---|---|---|
| committer | chenyingchun0312 <[email protected]> | 2021-08-23 18:54:03 +0800 |
| commit | 39689ea5edfca9dc267cfa125b99d4d86a8a20bd (patch) | |
| tree | 446d9f9d2f7a374f62f06524b36e0cc7cfb7bc24 /components/finsh/shell.c | |
| parent | 5e02709c5533b5741b7ae8eae4945c8c43f86beb (diff) | |
| parent | f0c963bf53e03c19bce171c6d52c9a39440cf7c0 (diff) | |
Merge branch 'develop' of https://github.com/chenyingchun0312/rt-thread into develop
Diffstat (limited to 'components/finsh/shell.c')
| -rw-r--r-- | components/finsh/shell.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c index c89139c0ed..87dc6e0745 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -164,7 +164,7 @@ void finsh_set_prompt_mode(rt_uint32_t prompt_mode) shell->prompt_mode = prompt_mode; } -static int finsh_getchar(void) +char finsh_getchar(void) { #ifdef RT_USING_DEVICE #ifdef RT_USING_POSIX @@ -176,7 +176,7 @@ static int finsh_getchar(void) while (rt_device_read(shell->device, -1, &ch, 1) != 1) rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER); - return (int)ch; + return ch; #endif #else extern char rt_hw_console_getchar(void); @@ -329,7 +329,7 @@ static void finsh_wait_auth(void) while (1) { /* read one character from device */ - ch = finsh_getchar(); + ch = (int)finsh_getchar(); if (ch < 0) { continue; @@ -541,7 +541,7 @@ void finsh_thread_entry(void *parameter) while (1) { - ch = finsh_getchar(); + ch = (int)finsh_getchar(); if (ch < 0) { continue; |
