Explorar o código

[LogTrace] Use OFLAG_RDWR to replace FLAG_RDWR when opening a device.

bernard %!s(int64=11) %!d(string=hai) anos
pai
achega
6045b3a075
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      components/utilities/logtrace/log_trace.c

+ 1 - 1
components/utilities/logtrace/log_trace.c

@@ -404,7 +404,7 @@ rt_err_t log_trace_set_device(const char *device_name)
         rt_err_t result;
 
         /* open device */
-        result = rt_device_open(output_device, RT_DEVICE_FLAG_STREAM | RT_DEVICE_FLAG_RDWR);
+        result = rt_device_open(output_device, RT_DEVICE_FLAG_STREAM | RT_DEVICE_OFLAG_RDWR);
         if (result != RT_EOK)
         {
             rt_kprintf("Open trace device failed.\n");