Skip to content

Commit 71de1eb

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 <damien@micropython.org>
1 parent 846d87c commit 71de1eb

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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy