1.tty概念分析
- 串口终端是使用计算机串口连接的终端设备。Linux把每个串行端口都看作是一个字符设备。这些串行端口所对应的设备名称是 /dev/ttySAC0;/dev/ttySAC1……
2.tty架构解析
3.回溯串口数据发送
-
static void s3c24xx_serial_start_tx(struct uart_port *port)
-
{
-
struct s3c24xx_uart_port *ourport = to_ourport(port);
-
-
dump_stack();
// 回溯函数的调用关系
-
-
if (!tx_enabled(port)) {
-
if (port->flags & UPF_CONS_FLOW)
-
s3c24xx_serial_rx_disable(port);
-
-
enable_irq(ourport->tx_irq);
-
tx_enabled(port) =
1;
-
}
-
}
-
[
] (s3c24xx_serial_start_tx+
0x0/
0x64) from [] (uart_start+
0x68/
0x6c)
-
r5:c38c5800 r4:
60000013
-
-
[
] (uart_start+
0x0/
0x6c) from [] (uart_write+
0xc0/
0xe0)
-
r5:c38c5800 r4:
00000000
-
[
] (uart_write+
0x0/
0xe0) from [] (n_tty_write+
0x1d8/
0x448)
-
[
] (n_tty_write+
0x0/
0x448) from [] (tty_write+
0x14c/
0x244)
-
-
[
] (tty_write+
0x0/
0x244) from [] (redirected_tty_write+
0x88/
0x98)
-
[
] (redirected_tty_write+
0x0/
0x98) from [] (vfs_write+
0xb4/
0xe8)
-
r9:c397e000 r8:c00300c8 r7:
00000004 r6:c397ff78 r5:
40000000
-
r4:c3960100