Skip to content

Commit 508f201

Browse files
authored
Merge pull request adafruit#7605 from Neradoc/pico-uart-in-use-error
Tweak the UART in use message on RP2040
2 parents a33c34b + 13716c9 commit 508f201

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
@@ -450,7 +450,6 @@ msgid "All SPI peripherals are in use"
450450
msgstr ""
451451

452452
#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
453-
#: ports/raspberrypi/common-hal/busio/UART.c
454453
msgid "All UART peripherals are in use"
455454
msgstr ""
456455

@@ -2111,6 +2110,10 @@ msgstr ""
21112110
msgid "UART init"
21122111
msgstr ""
21132112

2113+
#: ports/raspberrypi/common-hal/busio/UART.c
2114+
msgid "UART peripheral in use"
2115+
msgstr ""
2116+
21142117
#: ports/stm/common-hal/busio/UART.c
21152118
msgid "UART re-init"
21162119
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)