Skip to content

Commit 379a3fa

Browse files
committed
cc3200: Change UART.print() to make it consistent with the rest.
1 parent 88b7f52 commit 379a3fa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cc3200/mods/pybuart.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ STATIC void UART1IntHandler(void) {
322322
STATIC void pyb_uart_print(void (*print)(void *env, const char *fmt, ...), void *env, mp_obj_t self_in, mp_print_kind_t kind) {
323323
pyb_uart_obj_t *self = self_in;
324324
if (!self->enabled) {
325-
print(env, "UART(%u)", self->uart_id);
325+
print(env, "<UART%u>", self->uart_id);
326326
} else {
327-
print(env, "UART(%u, baudrate=%u, bits=", self->uart_id, self->baudrate);
327+
print(env, "<UART%u baudrate=%u, bits=", self->uart_id, self->baudrate);
328328
switch (self->config & UART_CONFIG_WLEN_MASK) {
329329
case UART_CONFIG_WLEN_5:
330330
print(env, "5");
@@ -346,7 +346,7 @@ STATIC void pyb_uart_print(void (*print)(void *env, const char *fmt, ...), void
346346
} else {
347347
print(env, ", parity=%u", (self->config & UART_CONFIG_PAR_MASK) == UART_CONFIG_PAR_EVEN ? 0 : 1);
348348
}
349-
print(env, ", stop=%u, timeout=%u, timeout_char=%u, read_buf_len=%u)",
349+
print(env, ", stop=%u, timeout=%u, timeout_char=%u, read_buf_len=%u>",
350350
(self->config & UART_CONFIG_STOP_MASK) == UART_CONFIG_STOP_ONE ? 1 : 2,
351351
self->timeout, self->timeout_char, self->read_buf_len);
352352
}

0 commit comments

Comments
 (0)