mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-30 02:51:33 +08:00
[DFS] "console" device check.
[DFS] To make sure the "console" device exist or not when initialize console device.
This commit is contained in:
parent
a453b3318b
commit
6e63cbb9be
@ -78,6 +78,9 @@ void rt_console_init(const char* device_name)
|
||||
rt_device_t device;
|
||||
/* register to device framework */
|
||||
|
||||
device = rt_device_find("console");
|
||||
if (device) return; /* not register a same name device */
|
||||
|
||||
device = rt_device_find(device_name);
|
||||
if (device != RT_NULL)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user