Print package if it exists for pin or module only if it does not
This commit is contained in:
parent
dd86cb00ad
commit
33952023e8
@ -71,7 +71,11 @@ STATIC void mcu_pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ki
|
|||||||
qstr name;
|
qstr name;
|
||||||
|
|
||||||
get_pin_name(self, &package, &module, &name);
|
get_pin_name(self, &package, &module, &name);
|
||||||
mp_printf(print, "%q.%q.%q", MP_QSTR_microcontroller, MP_QSTR_pin, name);
|
if (package){
|
||||||
|
mp_printf(print, "%q.%q.%q", package, module, name);
|
||||||
|
} else {
|
||||||
|
mp_printf(print, "%q.%q", module , name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mp_obj_type_t mcu_pin_type = {
|
const mp_obj_type_t mcu_pin_type = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user