summaryrefslogtreecommitdiff
path: root/components/finsh
diff options
context:
space:
mode:
authorGrissiom <[email protected]>2015-01-04 19:42:58 +0800
committerGrissiom <[email protected]>2015-01-04 19:42:58 +0800
commit099ada66992796a08d765a97bb00a418a5745423 (patch)
treeb29b5395f362b8db3f159c5d6468d8ad3f731865 /components/finsh
parent09602fd9d856fe19fc7cff85ead0b5a3846b136c (diff)
finsh: open the finsh device with RT_DEVICE_FLAG_STREAM
Diffstat (limited to 'components/finsh')
-rw-r--r--components/finsh/shell.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/finsh/shell.c b/components/finsh/shell.c
index ad3b49534d..125dcec198 100644
--- a/components/finsh/shell.c
+++ b/components/finsh/shell.c
@@ -113,7 +113,8 @@ void finsh_set_device(const char* device_name)
/* check whether it's a same device */
if (dev == shell->device) return;
/* open this device and set the new device in finsh shell */
- if (rt_device_open(dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX) == RT_EOK)
+ if (rt_device_open(dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX |\
+ RT_DEVICE_FLAG_STREAM) == RT_EOK)
{
if (shell->device != RT_NULL)
{