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'

Interface_HDMI = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'ADV7611', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'ADV7611'}), 'ref_prefix':'U', 'fplist':['Package_QFP:LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm'], 'footprint':'Package_QFP:LQFP-64-1EP_10x10mm_P0.5mm_EP5x5mm', 'keywords':'hdmi', 'description':'', 'datasheet':'https://www.analog.com/media/en/technical-documentation/data-sheets/adv7611.pdf', 'search_text':'/usr/share/kicad/symbols/Interface_HDMI.kicad_sym\nADV7611\n\nhdmi', 'pins':[
            Pin(num='1',name='HPA_A/INT2',func=pin_types.BIDIR,unit=1),
            Pin(num='10',name='RXA_1+',func=pin_types.INPUT,unit=1),
            Pin(num='11',name='TVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='12',name='RXA_2-',func=pin_types.INPUT,unit=1),
            Pin(num='13',name='RXA_2+',func=pin_types.INPUT,unit=1),
            Pin(num='14',name='CVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='15',name='P23',func=pin_types.OUTPUT,unit=1),
            Pin(num='16',name='P22',func=pin_types.OUTPUT,unit=1),
            Pin(num='17',name='P21',func=pin_types.OUTPUT,unit=1),
            Pin(num='18',name='P20',func=pin_types.OUTPUT,unit=1),
            Pin(num='19',name='P19',func=pin_types.OUTPUT,unit=1),
            Pin(num='2',name='CVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='P18',func=pin_types.OUTPUT,unit=1),
            Pin(num='21',name='P17',func=pin_types.OUTPUT,unit=1),
            Pin(num='22',name='P16',func=pin_types.OUTPUT,unit=1),
            Pin(num='23',name='DVDDIO',func=pin_types.PWRIN,unit=1),
            Pin(num='24',name='DVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='25',name='LLC',func=pin_types.OUTPUT,unit=1),
            Pin(num='26',name='P15',func=pin_types.OUTPUT,unit=1),
            Pin(num='27',name='P14',func=pin_types.OUTPUT,unit=1),
            Pin(num='28',name='P13',func=pin_types.OUTPUT,unit=1),
            Pin(num='29',name='P12',func=pin_types.OUTPUT,unit=1),
            Pin(num='3',name='RXA_C-',func=pin_types.INPUT,unit=1),
            Pin(num='30',name='P11',func=pin_types.OUTPUT,unit=1),
            Pin(num='31',name='P10',func=pin_types.OUTPUT,unit=1),
            Pin(num='32',name='P9',func=pin_types.OUTPUT,unit=1),
            Pin(num='33',name='P8',func=pin_types.OUTPUT,unit=1),
            Pin(num='34',name='DVDDIO',func=pin_types.PWRIN,unit=1),
            Pin(num='35',name='P7',func=pin_types.OUTPUT,unit=1),
            Pin(num='36',name='P6',func=pin_types.OUTPUT,unit=1),
            Pin(num='37',name='P5',func=pin_types.OUTPUT,unit=1),
            Pin(num='38',name='P4',func=pin_types.OUTPUT,unit=1),
            Pin(num='39',name='P3',func=pin_types.OUTPUT,unit=1),
            Pin(num='4',name='RXA_C+',func=pin_types.INPUT,unit=1),
            Pin(num='40',name='DVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='41',name='P2',func=pin_types.OUTPUT,unit=1),
            Pin(num='42',name='P1',func=pin_types.OUTPUT,unit=1),
            Pin(num='43',name='P0',func=pin_types.OUTPUT,unit=1),
            Pin(num='44',name='DVDDIO',func=pin_types.PWRIN,unit=1),
            Pin(num='45',name='DE',func=pin_types.OUTPUT,unit=1),
            Pin(num='46',name='HS',func=pin_types.OUTPUT,unit=1),
            Pin(num='47',name='VS/FIELD/ALSB',func=pin_types.BIDIR,unit=1),
            Pin(num='48',name='AP',func=pin_types.OUTPUT,unit=1),
            Pin(num='49',name='SCLK/INT2',func=pin_types.OUTPUT,unit=1),
            Pin(num='5',name='TVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='50',name='LRCLK',func=pin_types.OUTPUT,unit=1),
            Pin(num='51',name='MCLK/INT2',func=pin_types.OUTPUT,unit=1),
            Pin(num='52',name='DVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='53',name='SCL',func=pin_types.INPUT,unit=1),
            Pin(num='54',name='SDA',func=pin_types.BIDIR,unit=1),
            Pin(num='55',name='INT1',func=pin_types.OUTPUT,unit=1),
            Pin(num='56',name='~{RESET}',func=pin_types.INPUT,unit=1),
            Pin(num='57',name='PVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='58',name='XTALP',func=pin_types.INPUT,unit=1),
            Pin(num='59',name='XTALN',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='RXA_0-',func=pin_types.INPUT,unit=1),
            Pin(num='60',name='DVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='61',name='CEC',func=pin_types.BIDIR,unit=1),
            Pin(num='62',name='DDCA_SCL',func=pin_types.INPUT,unit=1),
            Pin(num='63',name='DDCA_SDA',func=pin_types.BIDIR,unit=1),
            Pin(num='64',name='RXA_5V',func=pin_types.INPUT,unit=1),
            Pin(num='65',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='7',name='RXA_0+',func=pin_types.INPUT,unit=1),
            Pin(num='8',name='TVDD',func=pin_types.PWRIN,unit=1),
            Pin(num='9',name='RXA_1-',func=pin_types.INPUT,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'TPD12S520DBT', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'TPD12S520DBT'}), 'ref_prefix':'U', 'fplist':['Package_SO:TSSOP-38_4.4x9.7mm_P0.5mm'], 'footprint':'Package_SO:TSSOP-38_4.4x9.7mm_P0.5mm', 'keywords':'hdmi', 'description':'', 'datasheet':'http://www.ti.com/lit/ds/symlink/tpd12s520.pdf', 'search_text':'/usr/share/kicad/symbols/Interface_HDMI.kicad_sym\nTPD12S520DBT\n\nhdmi', 'pins':[
            Pin(num='1',name='5V_SUPPLY',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='TMDS_D0+',func=pin_types.PASSIVE,unit=1),
            Pin(num='11',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='12',name='TMDS_D0-',func=pin_types.PASSIVE,unit=1),
            Pin(num='13',name='TMDS_CK+',func=pin_types.PASSIVE,unit=1),
            Pin(num='14',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='15',name='TMDS_CK-',func=pin_types.PASSIVE,unit=1),
            Pin(num='16',name='CE_REMOTE_IN',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='DDC_CLK_IN',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='DDC_DAT_IN',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='HOTPLUG_DET_IN',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='LV_SUPPLY',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='HOTPLUG_DET_OUT',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='DDC_DAT_OUT',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='DDC_CLK_OUT',func=pin_types.BIDIR,unit=1),
            Pin(num='23',name='CE_REMOTE_OUT',func=pin_types.BIDIR,unit=1),
            Pin(num='24',name='TMDS_CK-',func=pin_types.PASSIVE,unit=1),
            Pin(num='25',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='26',name='TMDS_CK+',func=pin_types.PASSIVE,unit=1),
            Pin(num='27',name='TMDS_D0-',func=pin_types.PASSIVE,unit=1),
            Pin(num='28',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='29',name='TMDS_D0+',func=pin_types.PASSIVE,unit=1),
            Pin(num='3',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='30',name='TMDS_D1-',func=pin_types.PASSIVE,unit=1),
            Pin(num='31',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='32',name='TMDS_D1+',func=pin_types.PASSIVE,unit=1),
            Pin(num='33',name='TMDS_D2-',func=pin_types.PASSIVE,unit=1),
            Pin(num='34',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='35',name='TMDS_D2+',func=pin_types.PASSIVE,unit=1),
            Pin(num='36',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='37',name='ESD_BYP',func=pin_types.PASSIVE,unit=1),
            Pin(num='38',name='NC',func=pin_types.NOCONNECT,unit=1),
            Pin(num='4',name='TMDS_D2+',func=pin_types.PASSIVE,unit=1),
            Pin(num='5',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='6',name='TMDS_D2-',func=pin_types.PASSIVE,unit=1),
            Pin(num='7',name='TMDS_D1+',func=pin_types.PASSIVE,unit=1),
            Pin(num='8',name='TMDS_GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='9',name='TMDS_D1-',func=pin_types.PASSIVE,unit=1)], 'unit_defs':[] })])