![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
serial
Hacker_Albert
If I am not for myself, who will be for me?
If I am only for myself, what am I?
If not now, when?
展开
-
linux serial framework (3) - serial example
1.The following C program reads lines (i.e. canonical mode) from a serial terminal, and is configured to detect a Mark (or 1) as the parity bit with an 8-bit character frame.#define SERIALTERMINAL "/dev/ttyS0"#include <errno.h>#include <fc原创 2020-11-12 20:41:58 · 471 阅读 · 0 评论 -
linux serial framework (2) - serial 8250 driver
uart1.UART 框架图2.8250/16550芯片 该类芯片的驱动文件为8250.c,位于内核源码的/drivers/serial/目录下面。serial8250_init为该驱动的入口函数,nr_uarts和UART_NR在内核配置中定义,跟具体的平台相关,通常定义为4。由于CONFIG_SPARC没有被定义,所以做的第一件事情就是注册一个名为serial_8250_reg的UART驱动。重点分析:serial8250_init()—>uart_register_driv.原创 2020-10-30 09:51:28 · 3209 阅读 · 0 评论 -
linux serial framework (1) - 概述
了解linux serial framework1.uart 串口设备(serial or uart)是TTY设备的一种,Linux kernel为了方便串口驱动的开发,在TTY framework的基础上,封装了一层串口框架(serial framework)。该框架尽可能的屏蔽了TTY有关的技术细节,驱动工程师在编写串口驱动的时候,只需要把精力放在串口以及串口控制器本身即可。2.软件架构 Linux kernel serial framework位于“drivers/tty/serial.原创 2020-10-29 16:32:31 · 584 阅读 · 0 评论