Merge pull request #7605 from Neradoc/pico-uart-in-use-error
Tweak the UART in use message on RP2040
This commit is contained in:
commit
508f2015b6
@ -450,7 +450,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 ""
|
||||
|
||||
@ -2111,6 +2110,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 ""
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user