* UART interface */
| 579 | * UART interface |
| 580 | */ |
| 581 | static rt_err_t _uart_configure(struct rt_serial_device *serial, struct serial_configure *cfg) |
| 582 | { |
| 583 | struct sunxi_uart *uart; |
| 584 | |
| 585 | RT_ASSERT(serial != RT_NULL); |
| 586 | |
| 587 | serial->config = *cfg; |
| 588 | uart = serial->parent.user_data; |
| 589 | |
| 590 | uart_set_format(uart->uart_port, cfg->data_bits, cfg->stop_bits, cfg->parity); |
| 591 | uart_set_baudrate(uart->uart_port, cfg->baud_rate); |
| 592 | uart_set_fifo(uart->uart_port); |
| 593 | uart_forcechange(uart->uart_port); |
| 594 | |
| 595 | return RT_EOK; |
| 596 | } |
| 597 | |
| 598 | static rt_err_t _uart_control(struct rt_serial_device *serial, int cmd, void *arg) |
| 599 | { |
nothing calls this directly
no test coverage detected