mimxrt/machine_uart: Fix an inconsistency for UART.init() arg handling.

With keyword arguments only or just a single non-keyword argument,
UART.init() did not perform the settings.
pull/8734/head
robert-hh 2022-05-08 07:58:51 +02:00 zatwierdzone przez Damien George
rodzic 767f2ce9a7
commit 5cc2dd4f5d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -208,7 +208,7 @@ STATIC mp_obj_t machine_uart_init_helper(machine_uart_obj_t *self, size_t n_args
}
// Initialise the UART peripheral if any arguments given, or it was not initialised previously.
if (n_args > 1 || self->new) {
if (n_args > 0 || kw_args->used > 0 || self->new) {
self->new = false;
// may be obsolete
if (self->config.baudRate_Bps == 0) {