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

Function lwp_ctty_register

components/lwp/terminal/tty_ctty.c:85–98  ·  view source on GitHub ↗

register device to DFS */

Source from the content-addressed store, hash-verified

83
84/* register device to DFS */
85static int lwp_ctty_register(rt_device_t ctty)
86{
87 rt_err_t rc = -RT_ENOMEM;
88 const char *tty_name = "tty";
89
90 device_setup(ctty);
91 rc = rt_device_register(ctty, tty_name, RT_DEVICE_FLAG_DYNAMIC);
92 if (rc == RT_EOK)
93 {
94 ctty->readlink = &ctty_readlink;
95 ctty->fops = &ctty_file_ops;
96 }
97 return rc;
98}
99
100static struct rt_device ctty;
101

Callers 1

lwp_ctty_initFunction · 0.85

Calls 2

rt_device_registerFunction · 0.85
device_setupFunction · 0.70

Tested by

no test coverage detected