Skip to content

Fix pin printing #3460

@tannewt

Description

@tannewt

When a pin is listed in board, it should print out with its first board name instead of microcontroller.pin.

Code is here: 168aa39#diff-df3dad56701b150d4292baceaa18e2c2R77

With a pin definition like:

STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
    { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) },
    { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO17) },
}

This

>>> print(board.A0)
microcontroller.pin.A0
>>> print(board.D14)
microcontroller.pin.A0

should be

>>> print(board.A0)
board.A0
>>> print(board.D14)
board.A0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions