finsh: open the finsh device with RT_DEVICE_FLAG_STREAM

This commit is contained in:
Grissiom 2015-01-04 19:42:58 +08:00
parent 09602fd9d8
commit 099ada6699
1 changed files with 2 additions and 1 deletions

View File

@ -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)
{