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

Function _sys_ptmx_init

components/lwp/terminal/tty_ptmx.c:326–341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324}
325
326static int _sys_ptmx_init(void)
327{
328 rt_err_t rc;
329 rt_device_t sysptmx_rtdev = &sysptmx;
330
331 /* setup system level device */
332 sysptmx_rtdev->type = RT_Device_Class_Char;
333 sysptmx_rtdev->ops = RT_NULL;
334 rc = rt_device_register(sysptmx_rtdev, "ptmx", RT_DEVICE_FLAG_DYNAMIC);
335 if (rc == RT_EOK)
336 {
337 sysptmx_rtdev->readlink = &sysptmx_readlink;
338 sysptmx_rtdev->fops = &sysptmx_file_ops;
339 }
340 return rc;
341}
342INIT_DEVICE_EXPORT(_sys_ptmx_init);

Callers

nothing calls this directly

Calls 1

rt_device_registerFunction · 0.85

Tested by

no test coverage detected