Advertisement

Linux tty 操作函数集

阅读量:

我们知道,tty驱动分为3层:tty内核层、tty线路规程层、tty驱动层。

包含以下功能集合:struct file_opertaions;其中,在源代码中已实现该结构体

tty线路规程层函数操作集为:struct tty_ldisc_ops; //需要我们来实现

ty驱动层的功能集合定义为:struct tty_operations; //在serial_core.c中已经完成内核层面的实现。该结构体不具备read成员函数但具备receive_buf成员功能。

另外,UART驱动的函数操作集为:struct uart_ops; //需要我们来实现

这四个操作集之间存在逐层调用的关联。以write函数为例,在其具体的执行流程中会依次触发多个相关操作集。

用户-space execution involves a series of sequential tasks: the user-space write operation, followed by file-I/O operations writing, terminal I/O operations for device discs, terminal device I/O operations writing, and finally uart-I/O operations terminating.

以串口

全部评论 (0)

还没有任何评论哟~