Browse Source

stmhal: Fix printing of pin name in error message.

pull/803/head
Damien George 10 years ago
parent
commit
b0accc8571
  1. 2
      stmhal/adc.c

2
stmhal/adc.c

@ -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;
}

Loading…
Cancel
Save