diff options
| author | bernard <[email protected]> | 2014-07-20 13:57:49 +0800 |
|---|---|---|
| committer | bernard <[email protected]> | 2014-07-20 13:57:49 +0800 |
| commit | 02faf9edb8162a4e8f60cb818ece20c7357a3abf (patch) | |
| tree | 778c8b921b24ab5f6de9cfe3ec6cb55b1d063411 | |
| parent | 99e18f008c716d43c31591983414c728a1f313e4 (diff) | |
[Finsh] fix device_open issue when set_device in finsh.
| -rw-r--r-- | components/finsh/finsh.h | 1 | ||||
| -rw-r--r-- | components/finsh/shell.c | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index cf7ee05808..0b270ddeaf 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -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 */ 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) { |
