Skip to content

Commit 51663b9

Browse files
committed
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 <[email protected]>
1 parent b33f647 commit 51663b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ports/rp2/machine_uart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ static void mp_machine_uart_init_helper(machine_uart_obj_t *self, size_t n_args,
390390
if (n_args > 0 || kw_args->used > 0 || self->baudrate == 0) {
391391
if (self->baudrate == 0) {
392392
self->baudrate = DEFAULT_UART_BAUDRATE;
393+
self->timeout_char = 0;
393394
}
394395

395396
// Make sure timeout_char is at least as long as a whole character (13 bits to be safe).

0 commit comments

Comments
 (0)