MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _cons_init

Function _cons_init

components/lwp/terminal/tty_cons.c:110–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static int _cons_init(void)
111{
112 rt_err_t rc;
113
114 rt_list_init(&_bakend_list);
115
116 /* setup system level device */
117 _cons_rtdev.type = RT_Device_Class_Char;
118 _cons_rtdev.ops = &cons_rtdev_ops;
119 rc = rt_device_register(&_cons_rtdev, "console", RT_DEVICE_FLAG_DYNAMIC);
120 if (rc == RT_EOK)
121 {
122 _cons_rtdev.readlink = &_cons_readlink;
123 _cons_rtdev.fops = &_cons_fops;
124 }
125
126 return rc;
127}
128INIT_DEVICE_EXPORT(_cons_init);

Callers

nothing calls this directly

Calls 2

rt_list_initFunction · 0.85
rt_device_registerFunction · 0.85

Tested by

no test coverage detected