diff options
| author | askpatricw <4002194+askpatrickw@users.noreply.github.com> | 2020-09-25 10:08:26 -0700 |
|---|---|---|
| committer | askpatricw <4002194+askpatrickw@users.noreply.github.com> | 2020-09-25 10:08:26 -0700 |
| commit | 33952023e89b96530bc2acaaf6a5f03da01d9a3c (patch) | |
| tree | 1aeaf8411447bcaed03cbb372b21daf3ac823d91 /shared-bindings/microcontroller | |
| parent | dd86cb00adb2ecb1e0cdf256d9a4e0f96a0c6de1 (diff) | |
Print package if it exists for pin or module only if it does not
Diffstat (limited to 'shared-bindings/microcontroller')
| -rw-r--r-- | shared-bindings/microcontroller/Pin.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/shared-bindings/microcontroller/Pin.c b/shared-bindings/microcontroller/Pin.c index 1294b78f0..6ba02a0e7 100644 --- a/shared-bindings/microcontroller/Pin.c +++ b/shared-bindings/microcontroller/Pin.c @@ -71,7 +71,11 @@ STATIC void mcu_pin_print(const mp_print_t *print, mp_obj_t self_in, mp_print_ki qstr 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 = { |
