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

Function lwp_console_register_backend

components/lwp/terminal/tty_cons.c:55–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55rt_err_t lwp_console_register_backend(struct rt_device *bakdev, int prio)
56{
57 rt_err_t ret = RT_EOK;
58 struct backend_entry *bent;
59 bent = rt_malloc(sizeof(struct backend_entry));
60 if (bent)
61 {
62 rt_list_init(&bent->bakend_list_node);
63 bent->prio = prio;
64 bent->bakdev = bakdev;
65
66 _bent_enqueue(bent);
67 }
68 else
69 {
70 ret = -RT_ENOMEM;
71 }
72 return ret;
73}
74
75static struct rt_device _cons_rtdev;
76

Callers 1

_default_console_setupFunction · 0.85

Calls 3

rt_mallocFunction · 0.85
rt_list_initFunction · 0.85
_bent_enqueueFunction · 0.85

Tested by

no test coverage detected