Skip to content

Commit 6a99a7b

Browse files
committed
stm: Use 'Invalid %q pin selection' more places
1 parent 92d2f47 commit 6a99a7b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ports/stm/common-hal/busio/I2C.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
112112
if (i2c_taken) {
113113
mp_raise_ValueError(translate("Hardware busy, try alternative pins"));
114114
} else {
115-
mp_raise_ValueError(translate("Invalid I2C pin selection"));
115+
mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_I2C);
116116
}
117117
}
118118

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ STATIC USART_TypeDef * assign_uart_or_throw(busio_uart_obj_t* self, bool pin_eva
5858
if (uart_taken) {
5959
mp_raise_ValueError(translate("Hardware in use, try alternative pins"));
6060
} else {
61-
mp_raise_ValueError(translate("Invalid UART pin selection"));
61+
mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_UART);
6262
}
6363
}
6464
}

0 commit comments

Comments
 (0)