if (uart_handle_sysrq_char(&up->port, ch)) continue; uart_insert_char(&up->port, fsr, RX_OVER_IF, ch, flag); } while (!(fsr & RX_EMPTY) && (max_count-- > 0)); spin_lock(&up->port.lock); tty_flip_buffer_push(&up->port.state->port); spin_unlock(&up->port.lock);...
——>内核调用cdev结构中的file-operations指针所指向结构里的tty-open()函数——>tty-open()函数紧接着调用tty_struct 结构中的tty_operations指针所指向的结构里的uart_open() 函数——>该函数接着调用uart_satarup()函数——>该函数会调用uart_port 结构中的ops 指针所指向是操作函数集合中文件操作函数。 打...
void*dest,size_tsize);externintusb_serial_handle_sysrq_char(structusb_serial_port *port,unsignedintch);externintusb_serial_handle_break(structusb_serial_port *port);externvoidusb_serial_handle
@@ -564,7 +564,7 @@ static int pch_uart_hal_read(struct eg20t_port *priv, unsigned char *buf, if (uart_handle_break(port)) continue; } if (uart_handle_sysrq_char(port, rbr)) if (uart_prepare_sysrq_char(port, rbr))
void uart_handle_cts_change(struct uart_port *uport, bool active) void uart_insert_char(struct...
private * memory structure allocation at this point in time. * 指向驱动断开连接函数,这个函数将在设备被断开活被释放的时候被调⽤ * @disconnect: pointer to the driver's disconnect function. This will be * called when the device is unplugged or unbound from the driver. * 指向驱动释放函数,...
struct uart_driver {struct module *owner; /*拥有该uart_driver的模块,一般为THIS_MODULE*/constchar*driver_name; /*驱动串口名,串口设备名以驱动名为基础*/constchar*dev_name; /*串口设备名*/intmajor; /*主设备号*/intminor; /*次设备号*/intnr; /*该uart_driver支持的串口数*/struct console *co...
uart_console_write用于向串口端口写一控制台信息*参数:* port:要写信息的串口端口* s:要写的信息* count:信息的大小* putchar:用于向串口端口写字符的函数,该函数有两个参数:串口端口和要写的字符*/Void uart_console_write(struct uart_port *port,const char *s, unsigned int count,viod(*putchar)(...
uart_console_write用于向串口端口写一控制台信息 *参数: * port:要写信息的串口端口 * s:要写的信息 * count:信息的大小 * putchar:用于向串口端口写字符的函数,该函数有两个参数:串口端口和要写的字符 */Voiduart_console_write(structuart_port *port,constchar*s,unsignedintcount,viod(*putchar)(...
structuart_driver{structmodule*owner;/*拥有该uart_driver的模块,一般为THIS_MODULE*/constchar*driver_name;/*驱动串口名,串口设备名以驱动名为基础*/constchar*dev_name;/*串口设备名*/intmajor;/*主设备号*/intminor;/*次设备号*/intnr;/*该uart_driver支持的串口数*/structconsole*cons;/*其对应的cons...