Skip to content

Commit 13716c9

Browse files
committed
tweak the UART in use message on RP2040
1 parent fd3c691 commit 13716c9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

locale/circuitpython.pot

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,6 @@ msgid "All SPI peripherals are in use"
438438
msgstr ""
439439

440440
#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
441-
#: ports/raspberrypi/common-hal/busio/UART.c
442441
msgid "All UART peripherals are in use"
443442
msgstr ""
444443

@@ -2149,6 +2148,10 @@ msgstr ""
21492148
msgid "UART init"
21502149
msgstr ""
21512150

2151+
#: ports/raspberrypi/common-hal/busio/UART.c
2152+
msgid "UART peripheral in use"
2153+
msgstr ""
2154+
21522155
#: ports/stm/common-hal/busio/UART.c
21532156
msgid "UART re-init"
21542157
msgstr ""

ports/raspberrypi/common-hal/busio/UART.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
111111
uint8_t uart_id = ((((tx != NULL) ? tx->number : rx->number) + 4) / 8) % NUM_UARTS;
112112

113113
if (uart_status[uart_id] != STATUS_FREE) {
114-
mp_raise_RuntimeError(translate("All UART peripherals are in use"));
114+
mp_raise_ValueError(translate("UART peripheral in use"));
115115
}
116116
// These may raise exceptions if pins are already in use.
117117
self->tx_pin = pin_init(uart_id, tx, 0);

0 commit comments

Comments
 (0)