uart_match
时间: 2023-08-07 22:08:10 浏览: 277
引用\[1\]:上面真正回调probe的是匹配platform_driver, 而不是uart_driver。所以我们会看到调用了uart_register_driver和platform_driver_register 。 。 引用\[2\]:(3) 串口操作函数(uart_ops) static const struct uart_ops imx_uart_pops = { .tx_empty = imx_uart_tx_empty, .set_mctrl = imx_uart_set_mctrl, .get_mctrl = imx_uart_get_mctrl, .stop_tx = imx_uart_stop_tx, .start_tx = imx_uart_start_tx, .stop_rx = imx_uart_stop_rx, .enable_ms = imx_uart_enable_ms, .break_ctl = imx_uart_break_ctl, .startup = imx_uart_startup, .shutdown = imx_uart_shutdown, .flush_buffer = imx_uart_flush_buffer, .set_termios = imx_uart_set_termios, //对串口进行配置 .type = imx_uart_type, .config_port = imx_uart_config_port, .verify_port = imx_uart_verify_port, #if defined(CONFIG_CONSOLE_POLL) .poll_init = imx_uart_poll_init, .poll_get_char = imx_uart_poll_get_char, .poll_put_char = imx_uart_poll_put_char, #endif }; 。 引用\[3\]:imx_uart_start_tx --- 串口发送 static void imx_uart_start_tx(struct uart_port *port) { struct imx_port *sport = (struct imx_port *)port; u32 ucr1; //判断是否有高优先级数据和环形buffer是否有数据 if (!sport->port.x_char && uart_circ_empty(&port->state->xmit)) return; //省略...... //没有开启DMA,则使用Tx中断 if (!sport->dma_is_enabled) { //触发Tx中断 ucr1 = imx_uart_readl(sport, UCR1); imx_uart_writel(sport, ucr1 | UCR1_TXMPTYEN, UCR1); } if (sport->dma_is_enabled) { if (sport->port.x_char) { //有高优先级的数据要发送,则使用Tx中断,关闭DMA ucr1 = imx_uart_readl(sport, UCR1); ucr1 &= ~UCR1_TXDMAEN; ucr1 |= UCR1_TXMPTYEN; imx_uart_writel(sport, ucr1, UCR1); return; } //环形buffer有数据,并且串口没有停止,则使用DMA进行发送 if (!uart_circ_empty(&port->state->xmit) && !uart_tx_stopped(port)) imx_uart_dma_tx(sport); //DMA发送 return; } } 。
问题:uart_match是什么?
回答: 在提供的引用中,没有提到uart_match的具体定义或使用。因此,无法提供关于uart_match的详细信息。请提供更多上下文或引用以便我能够更好地回答您的问题。
#### 引用[.reference_title]
- *1* *2* *3* [Linux驱动分析之Uart驱动](https://blog.csdn.net/u012041204/article/details/107032091)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文