修复低概率终端无法输入问题 (#6464)

* [ulog] Fix the problem that the terminal cannot input

* [mem] Fix NULL pointer access
This commit is contained in:
Tangyuxin
2022-09-27 11:11:29 +08:00
committed by GitHub
parent 82bf18b771
commit ca30428cee
2 changed files with 5 additions and 10 deletions

View File

@@ -31,11 +31,7 @@ void ulog_console_backend_output(struct ulog_backend *backend, rt_uint32_t level
}
else
{
rt_uint16_t old_flag = dev->open_flag;
dev->open_flag |= RT_DEVICE_FLAG_STREAM;
rt_device_write(dev, 0, log, len);
dev->open_flag = old_flag;
}
#else
rt_hw_console_output(log);