Skip to content

Commit c469c7c

Browse files
committed
esp32/machine_uart: Uninstall the UART driver before installing it.
To allow to create the same UART a second time without error.
1 parent e7aefc7 commit c469c7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

esp32/machine_uart.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ STATIC mp_obj_t machine_uart_make_new(const mp_obj_type_t *type, size_t n_args,
230230
break;
231231
}
232232

233+
// Remove any existing configuration
234+
uart_driver_delete(self->uart_num);
235+
233236
// init the peripheral
234237
// Setup
235238
uart_param_config(self->uart_num, &uartcfg);

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