浏览代码

【修正】mp_putsn_init 未清除 console open_flag 的问题。

Signed-off-by: armink <armink.ztl@gmail.com>
armink 6 年之前
父节点
当前提交
ec7f9e4537
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      port/mpputsnport.c

+ 1 - 0
port/mpputsnport.c

@@ -62,6 +62,7 @@ void mp_putsn_init(void) {
     /* backup the console device */
     console_dev = rt_console_get_device();
     console_open_flag = console_dev->open_flag;
+    console_dev->open_flag = 0;
 
     /* set the new console device to dummy console */
     rt_console_set_device(dummy_console.parent.name);