We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent de567b8 commit 12a4bb1Copy full SHA for 12a4bb1
src/device.c
@@ -235,7 +235,7 @@ rt_err_t rt_device_open(rt_device_t dev, rt_uint16_t oflag)
235
236
/* device is not opened or opened by other oflag, call device_open interface */
237
if (!(dev->open_flag & RT_DEVICE_OFLAG_OPEN) ||
238
- ((dev->open_flag & RT_DEVICE_OFLAG_MASK) | (oflag & RT_DEVICE_OFLAG_MASK)))
+ ((dev->open_flag & RT_DEVICE_OFLAG_MASK) != (oflag & RT_DEVICE_OFLAG_MASK)))
239
{
240
if (device_open != RT_NULL)
241
0 commit comments