from collections import defaultdict
from skidl import Pin, Part, Alias, SchLib, SKIDL, TEMPLATE

from skidl.pin import pin_types

SKIDL_lib_version = '0.0.1'

MCU_NXP_MCore = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'MMC2114CFCPU', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'MMC2114CFCPU'}), 'ref_prefix':'U', 'fplist':[''], 'footprint':'', 'keywords':'', 'description':'', 'datasheet':'motorola/mmc2114.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_NXP_MCore.kicad_sym\nMMC2114CFCPU\n\n', 'pins':[
            Pin(num='1',name='PA6',func=pin_types.BIDIR,unit=1),
            Pin(num='10',name='PB5',func=pin_types.BIDIR,unit=1),
            Pin(num='100',name='PA7',func=pin_types.BIDIR,unit=1),
            Pin(num='11',name='PB4',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='13',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='14',name='PB3',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='PB2',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='PB1',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='PB0',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='PC7',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='PC6',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='PA5',func=pin_types.BIDIR,unit=1),
            Pin(num='20',name='PC5',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='22',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='23',name='PC4',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='PC3',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='PC2',func=pin_types.BIDIR,unit=1),
            Pin(num='26',name='PC1',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='PC0',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='PD7',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='PD6',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='PA4',func=pin_types.BIDIR,unit=1),
            Pin(num='30',name='PD5',func=pin_types.BIDIR,unit=1),
            Pin(num='31',name='PD4',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='PD3',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='PD2',func=pin_types.BIDIR,unit=1),
            Pin(num='34',name='PD1',func=pin_types.BIDIR,unit=1),
            Pin(num='35',name='PD0',func=pin_types.BIDIR,unit=1),
            Pin(num='36',name='ICOC23',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='ICOC22',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='ICOC21',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='ICOC20',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='PA3',func=pin_types.BIDIR,unit=1),
            Pin(num='40',name='ICOC13',func=pin_types.BIDIR,unit=1),
            Pin(num='41',name='ICOC12',func=pin_types.BIDIR,unit=1),
            Pin(num='42',name='IC0C11',func=pin_types.BIDIR,unit=1),
            Pin(num='43',name='ICOC10',func=pin_types.BIDIR,unit=1),
            Pin(num='44',name='TEST',func=pin_types.BIDIR,unit=1),
            Pin(num='45',name='TXD2',func=pin_types.BIDIR,unit=1),
            Pin(num='46',name='RXD2',func=pin_types.BIDIR,unit=1),
            Pin(num='47',name='TXD1',func=pin_types.BIDIR,unit=1),
            Pin(num='48',name='RXD1',func=pin_types.BIDIR,unit=1),
            Pin(num='49',name='INT0',func=pin_types.BIDIR,unit=1),
            Pin(num='5',name='PA2',func=pin_types.BIDIR,unit=1),
            Pin(num='50',name='INT1',func=pin_types.BIDIR,unit=1),
            Pin(num='51',name='VSSF',func=pin_types.PWRIN,unit=1),
            Pin(num='52',name='VDDF',func=pin_types.PWRIN,unit=1),
            Pin(num='53',name='INT2',func=pin_types.BIDIR,unit=1),
            Pin(num='54',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='55',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='56',name='INT3',func=pin_types.BIDIR,unit=1),
            Pin(num='57',name='INT4',func=pin_types.BIDIR,unit=1),
            Pin(num='58',name='INT5',func=pin_types.BIDIR,unit=1),
            Pin(num='6',name='PA1',func=pin_types.BIDIR,unit=1),
            Pin(num='60',name='INT6',func=pin_types.BIDIR,unit=1),
            Pin(num='61',name='INT7',func=pin_types.BIDIR,unit=1),
            Pin(num='62',name='MOSI',func=pin_types.BIDIR,unit=1),
            Pin(num='63',name='MISO',func=pin_types.BIDIR,unit=1),
            Pin(num='64',name='VSTBY',func=pin_types.PWRIN,unit=1),
            Pin(num='65',name='SCK',func=pin_types.BIDIR,unit=1),
            Pin(num='66',name='SS',func=pin_types.BIDIR,unit=1),
            Pin(num='67',name='PE7',func=pin_types.BIDIR,unit=1),
            Pin(num='68',name='PE6',func=pin_types.BIDIR,unit=1),
            Pin(num='69',name='PE5',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='PA0',func=pin_types.BIDIR,unit=1),
            Pin(num='70',name='VDDH',func=pin_types.PWRIN,unit=1),
            Pin(num='71',name='PQB3',func=pin_types.BIDIR,unit=1),
            Pin(num='72',name='PQB2',func=pin_types.BIDIR,unit=1),
            Pin(num='73',name='PQB1',func=pin_types.BIDIR,unit=1),
            Pin(num='74',name='PQB0',func=pin_types.BIDIR,unit=1),
            Pin(num='75',name='PQA4',func=pin_types.BIDIR,unit=1),
            Pin(num='76',name='PQA3',func=pin_types.BIDIR,unit=1),
            Pin(num='77',name='PQA1',func=pin_types.BIDIR,unit=1),
            Pin(num='78',name='PQA0',func=pin_types.BIDIR,unit=1),
            Pin(num='79',name='VrL',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='PB7',func=pin_types.BIDIR,unit=1),
            Pin(num='80',name='VrH',func=pin_types.INPUT,unit=1),
            Pin(num='81',name='VSSA',func=pin_types.PWRIN,unit=1),
            Pin(num='82',name='VDDA',func=pin_types.PWRIN,unit=1),
            Pin(num='83',name='RESET',func=pin_types.INPUT,unit=1),
            Pin(num='84',name='RSTOUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='85',name='PLLEN',func=pin_types.INPUT,unit=1),
            Pin(num='86',name='XTAL',func=pin_types.OUTPUT,unit=1),
            Pin(num='87',name='EXTAL',func=pin_types.INPUT,unit=1),
            Pin(num='88',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='89',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='9',name='PB6',func=pin_types.BIDIR,unit=1),
            Pin(num='90',name='CLKOUT',func=pin_types.OUTPUT,unit=1),
            Pin(num='91',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='92',name='TCLK',func=pin_types.INPUT,unit=1),
            Pin(num='93',name='TDI',func=pin_types.INPUT,unit=1),
            Pin(num='94',name='TDO',func=pin_types.OUTPUT,unit=1),
            Pin(num='95',name='TMS',func=pin_types.INPUT,unit=1),
            Pin(num='96',name='VSS',func=pin_types.PWRIN,unit=1),
            Pin(num='97',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='98',name='TRST',func=pin_types.INPUT,unit=1),
            Pin(num='99',name='DE',func=pin_types.OUTPUT,unit=1)], 'unit_defs':[] })])