rp2/machine_uart: Clear timeout_char when UART is first constructed.
Otherwise a previous value of `timeout_char` may be left over after a soft reset. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
b33f64792f
commit
51663b9aa7
|
@ -390,6 +390,7 @@ static void mp_machine_uart_init_helper(machine_uart_obj_t *self, size_t n_args,
|
|||
if (n_args > 0 || kw_args->used > 0 || self->baudrate == 0) {
|
||||
if (self->baudrate == 0) {
|
||||
self->baudrate = DEFAULT_UART_BAUDRATE;
|
||||
self->timeout_char = 0;
|
||||
}
|
||||
|
||||
// Make sure timeout_char is at least as long as a whole character (13 bits to be safe).
|
||||
|
|
Loading…
Reference in New Issue