Skip to content

Commit 5cc2dd4

Browse files
robert-hhdpgeorge
authored andcommitted
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.
1 parent 767f2ce commit 5cc2dd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/mimxrt/machine_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ STATIC mp_obj_t machine_uart_init_helper(machine_uart_obj_t *self, size_t n_args
208208
}
209209

210210
// Initialise the UART peripheral if any arguments given, or it was not initialised previously.
211-
if (n_args > 1 || self->new) {
211+
if (n_args > 0 || kw_args->used > 0 || self->new) {
212212
self->new = false;
213213
// may be obsolete
214214
if (self->config.baudRate_Bps == 0) {

0 commit comments

Comments
 (0)