mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 19:20:22 +01:00
stm32/uart: Add uart_set_baudrate function.
This allows changing the baudrate of the UART without reinitialising it (reinitialising can lead to spurious characters sent on the TX line). Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -86,6 +86,8 @@ void uart_irq_handler(mp_uint_t uart_id);
|
||||
|
||||
void uart_attach_to_repl(pyb_uart_obj_t *self, bool attached);
|
||||
uint32_t uart_get_baudrate(pyb_uart_obj_t *self);
|
||||
void uart_set_baudrate(pyb_uart_obj_t *self, uint32_t baudrate);
|
||||
|
||||
mp_uint_t uart_rx_any(pyb_uart_obj_t *uart_obj);
|
||||
bool uart_rx_wait(pyb_uart_obj_t *self, uint32_t timeout);
|
||||
int uart_rx_char(pyb_uart_obj_t *uart_obj);
|
||||
|
||||
Reference in New Issue
Block a user