tweak the UART in use message on RP2040
This commit is contained in:
parent
fd3c691af5
commit
13716c9c30
|
@ -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 ""
|
||||
|
||||
|
@ -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 ""
|
||||
|
|
|
@ -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