MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _uart_configure

Function _uart_configure

bsp/allwinner/libraries/drivers/drv_uart.c:581–596  ·  view source on GitHub ↗

* UART interface */

Source from the content-addressed store, hash-verified

579 * UART interface
580 */
581static 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
598static rt_err_t _uart_control(struct rt_serial_device *serial, int cmd, void *arg)
599{

Callers

nothing calls this directly

Calls 4

uart_forcechangeFunction · 0.85
uart_set_formatFunction · 0.70
uart_set_baudrateFunction · 0.70
uart_set_fifoFunction · 0.70

Tested by

no test coverage detected