def print(self):
    for pin in self.pins:
        pin.print()
    print('')
    print('STATIC const mp_rom_map_elem_t pins_locals_dict_table[] = {')
    for pin in self.pins:
        print('    {{ MP_ROM_QSTR(MP_QSTR_{:5s}),  MP_ROM_PTR(&pin_{:5s}) }},'.format(pin.name, pin.name))
    print('};')
    print('')
    print('MP_DEFINE_CONST_DICT(pins_locals_dict, pins_locals_dict_table);')
def print(self):
    for pin in self.pins:
        pin.print()
    print()
    print('STATIC const mp_rom_map_elem_t pins_locals_dict_table[] = {')
    for pin in self.pins:
        print('    {{ MP_ROM_QSTR(MP_QSTR_{:5s}),  MP_ROM_PTR(&pin_{:5s}) }},'.format(pin.name, pin.name))
    print('};')
    print()
    print('MP_DEFINE_CONST_DICT(pins_locals_dict, pins_locals_dict_table);')