summaryrefslogtreecommitdiff
path: root/components/utilities
diff options
context:
space:
mode:
Diffstat (limited to 'components/utilities')
-rw-r--r--components/utilities/rt-link/inc/rtlink_dev.h10
-rw-r--r--components/utilities/rt-link/src/rtlink_dev.c2
2 files changed, 6 insertions, 6 deletions
diff --git a/components/utilities/rt-link/inc/rtlink_dev.h b/components/utilities/rt-link/inc/rtlink_dev.h
index 01fd04373c..0445e4d868 100644
--- a/components/utilities/rt-link/inc/rtlink_dev.h
+++ b/components/utilities/rt-link/inc/rtlink_dev.h
@@ -11,11 +11,11 @@
#include <rtthread.h>
#include <rtlink.h>
-#define RT_LINK_RX_NONBLOCKING 0x1000
-#define RT_LINK_RX_BLOCKING 0x2000
-#define RT_LINK_TX_NONBLOCKING 0x4000
-#define RT_LINK_TX_BLOCKING 0x8000
-#define RT_LINK_DEVICE_MASK 0xf000
+#define RT_LINK_RX_NONBLOCKING 0x01000000
+#define RT_LINK_RX_BLOCKING 0x02000000
+#define RT_LINK_TX_NONBLOCKING 0x04000000
+#define RT_LINK_TX_BLOCKING 0x08000000
+#define RT_LINK_DEVICE_MASK 0x0f000000
struct rtlink_recv_list
{
diff --git a/components/utilities/rt-link/src/rtlink_dev.c b/components/utilities/rt-link/src/rtlink_dev.c
index b4f1add678..b130b27927 100644
--- a/components/utilities/rt-link/src/rtlink_dev.c
+++ b/components/utilities/rt-link/src/rtlink_dev.c
@@ -320,7 +320,7 @@ rt_err_t rt_link_dev_control(rt_device_t dev, int cmd, void *args)
{
RT_ASSERT(dev != RT_NULL);
- if (cmd & RT_DEVICE_CTRL_CONFIG)
+ if ((cmd & ~RT_LINK_DEVICE_MASK) == RT_DEVICE_CTRL_CONFIG)
{
if (args == RT_NULL)
return -RT_EINVAL;