提交 02faf9ed 编写于 作者: B bernard

[Finsh] fix device_open issue when set_device in finsh.

上级 99e18f00
......@@ -411,7 +411,6 @@ struct finsh_parser
*
* The basic data type in finsh shell
*/
enum finsh_type {
finsh_type_unknown = 0, /**< unknown data type */
finsh_type_void, /**< void */
......
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册