mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
stmhal: Fix printing of pin name in error message.
This commit is contained in:
@@ -167,7 +167,7 @@ STATIC mp_obj_t adc_make_new(mp_obj_t type_in, uint n_args, uint n_kw, const mp_
|
||||
const pin_obj_t *pin = pin_find(pin_obj);
|
||||
if ((pin->adc_num & PIN_ADC1) == 0) {
|
||||
// No ADC1 function on that pin
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "pin %s does not have ADC capabilities", pin->name));
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, "pin %s does not have ADC capabilities", qstr_str(pin->name)));
|
||||
}
|
||||
channel = pin->adc_channel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user