| 293 | }; |
| 294 | |
| 295 | rt_inline void device_setup(lwp_tty_t terminal) |
| 296 | { |
| 297 | terminal->parent.type = RT_Device_Class_Char; |
| 298 | #ifdef RT_USING_DEVICE_OPS |
| 299 | terminal->parent.ops = &tty_dev_ops; |
| 300 | #else |
| 301 | #error Must enable RT_USING_DEVICE_OPS in Kconfig |
| 302 | #endif |
| 303 | } |
| 304 | |
| 305 | /* register TTY device */ |
| 306 | rt_err_t lwp_tty_register(lwp_tty_t terminal, const char *name) |