From 02faf9edb8162a4e8f60cb818ece20c7357a3abf Mon Sep 17 00:00:00 2001 From: bernard Date: Sun, 20 Jul 2014 13:57:49 +0800 Subject: [Finsh] fix device_open issue when set_device in finsh. --- components/finsh/shell.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'components/finsh/shell.c') diff --git a/components/finsh/shell.c b/components/finsh/shell.c index 5489cedf3d..a9559954e6 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -112,7 +112,7 @@ 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_EOK) + if (rt_device_open(dev, RT_DEVICE_OFLAG_RDWR | RT_DEVICE_FLAG_INT_RX) == RT_EOK) { if (shell->device != RT_NULL) { -- cgit v1.3.1