stm: Use 'Invalid %q pin selection' more places
This commit is contained in:
parent
92d2f47503
commit
6a99a7b551
@ -112,7 +112,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self,
|
||||
if (i2c_taken) {
|
||||
mp_raise_ValueError(translate("Hardware busy, try alternative pins"));
|
||||
} else {
|
||||
mp_raise_ValueError(translate("Invalid I2C pin selection"));
|
||||
mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_I2C);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ STATIC USART_TypeDef * assign_uart_or_throw(busio_uart_obj_t* self, bool pin_eva
|
||||
if (uart_taken) {
|
||||
mp_raise_ValueError(translate("Hardware in use, try alternative pins"));
|
||||
} else {
|
||||
mp_raise_ValueError(translate("Invalid UART pin selection"));
|
||||
mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_UART);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user