Skip to content

Tweak the UART in use message on RP2040 #7605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ msgid "All SPI peripherals are in use"
msgstr ""

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

Expand Down Expand Up @@ -2149,6 +2148,10 @@ msgstr ""
msgid "UART init"
msgstr ""

#: ports/raspberrypi/common-hal/busio/UART.c
msgid "UART peripheral in use"
msgstr ""

#: ports/stm/common-hal/busio/UART.c
msgid "UART re-init"
msgstr ""
Expand Down
2 changes: 1 addition & 1 deletion ports/raspberrypi/common-hal/busio/UART.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
uint8_t uart_id = ((((tx != NULL) ? tx->number : rx->number) + 4) / 8) % NUM_UARTS;

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