summaryrefslogtreecommitdiff
path: root/components/finsh/shell.c
diff options
context:
space:
mode:
authormisonyo <[email protected]>2019-03-23 09:47:45 +0800
committermisonyo <[email protected]>2019-03-23 09:47:45 +0800
commit97c930cd657561dd243dd47bc71e736c61a58a7b (patch)
tree3ec316d46541c48fd86d8557cc0c7bfa2a4ec624 /components/finsh/shell.c
parentefd8b404a3fc6ee8c98b6a735fceaf29fd42c76c (diff)
[components]add rt_device_ops for adc device and fix finsh_getchar() return wrong value in Big-endian status.
Diffstat (limited to 'components/finsh/shell.c')
-rw-r--r--components/finsh/shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index 1033e2c998..0b3cc41699 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -139,13 +139,13 @@ static int finsh_getchar(void)
#ifdef RT_USING_POSIX
return getchar();
#else
- int ch = 0;
+ char ch = 0;
RT_ASSERT(shell != RT_NULL);
while (rt_device_read(shell->device, -1, &ch, 1) != 1)
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
- return ch;
+ return (int)ch;
#endif
}