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'

Driver_TEC = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'MAX1968xUI', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'MAX1968xUI'}), 'ref_prefix':'U', 'fplist':['Package_SO:HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm'], 'footprint':'Package_SO:HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm', 'keywords':'thermoelectric cooler', 'description':'', 'datasheet':'https://datasheets.maximintegrated.com/en/ds/MAX1968-MAX1969.pdf', 'search_text':'/usr/share/kicad/symbols/Driver_TEC.kicad_sym\nMAX1968xUI\n\nthermoelectric cooler', 'pins':[
            Pin(num='1',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='LX2',func=pin_types.PASSIVE,unit=1),
            Pin(num='11',name='PVDD2',func=pin_types.PASSIVE,unit=1),
            Pin(num='12',name='FREQ',func=pin_types.INPUT,unit=1),
            Pin(num='13',name='ITEC',func=pin_types.OUTPUT,unit=1),
            Pin(num='14',name='OS2',func=pin_types.INPUT,unit=1),
            Pin(num='15',name='OS1',func=pin_types.INPUT,unit=1),
            Pin(num='16',name='CS',func=pin_types.INPUT,unit=1),
            Pin(num='17',name='~{SHDN}',func=pin_types.INPUT,unit=1),
            Pin(num='18',name='PVDD1',func=pin_types.PWRIN,unit=1),
            Pin(num='19',name='LX1',func=pin_types.PWROUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='PVDD1',func=pin_types.PASSIVE,unit=1),
            Pin(num='21',name='LX1',func=pin_types.PASSIVE,unit=1),
            Pin(num='22',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='23',name='LX1',func=pin_types.PASSIVE,unit=1),
            Pin(num='24',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='25',name='COMP',func=pin_types.PASSIVE,unit=1),
            Pin(num='26',name='MAXIN',func=pin_types.INPUT,unit=1),
            Pin(num='27',name='MAXIP',func=pin_types.INPUT,unit=1),
            Pin(num='28',name='MAXV',func=pin_types.INPUT,unit=1),
            Pin(num='29',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='3',name='CTLI',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='REF',func=pin_types.OUTPUT,unit=1),
            Pin(num='5',name='PGND',func=pin_types.PWRIN,unit=1),
            Pin(num='6',name='LX2',func=pin_types.PWROUT,unit=1),
            Pin(num='7',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='8',name='LX2',func=pin_types.PASSIVE,unit=1),
            Pin(num='9',name='PVDD2',func=pin_types.PWRIN,unit=1)], 'unit_defs':[] }),
        Part(**{ 'name':'MAX1969xUI', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'MAX1969xUI'}), 'ref_prefix':'U', 'fplist':['Package_SO:HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm', 'Package_SO:HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm'], 'footprint':'Package_SO:HTSSOP-28-1EP_4.4x9.7mm_P0.65mm_EP2.85x5.4mm', 'keywords':'thermoelectric cooler', 'description':'', 'datasheet':'https://datasheets.maximintegrated.com/en/ds/MAX1968-MAX1969.pdf', 'search_text':'/usr/share/kicad/symbols/Driver_TEC.kicad_sym\nMAX1969xUI\n\nthermoelectric cooler', 'pins':[
            Pin(num='1',name='VDD',func=pin_types.PWRIN,unit=1),
            Pin(num='10',name='LX2',func=pin_types.PASSIVE,unit=1),
            Pin(num='11',name='PVDD2',func=pin_types.PASSIVE,unit=1),
            Pin(num='12',name='FREQ',func=pin_types.INPUT,unit=1),
            Pin(num='13',name='ITEC',func=pin_types.OUTPUT,unit=1),
            Pin(num='14',name='OS2',func=pin_types.INPUT,unit=1),
            Pin(num='15',name='OS1',func=pin_types.INPUT,unit=1),
            Pin(num='16',name='CS',func=pin_types.INPUT,unit=1),
            Pin(num='17',name='~{SHDN}',func=pin_types.INPUT,unit=1),
            Pin(num='18',name='PVDD1',func=pin_types.PWRIN,unit=1),
            Pin(num='19',name='LX1',func=pin_types.PWROUT,unit=1),
            Pin(num='2',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='20',name='PVDD1',func=pin_types.PASSIVE,unit=1),
            Pin(num='21',name='LX1',func=pin_types.PASSIVE,unit=1),
            Pin(num='22',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='23',name='LX1',func=pin_types.PASSIVE,unit=1),
            Pin(num='24',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='25',name='COMP',func=pin_types.PASSIVE,unit=1),
            Pin(num='26',name='MAXIN',func=pin_types.INPUT,unit=1),
            Pin(num='27',name='MAXIP',func=pin_types.INPUT,unit=1),
            Pin(num='28',name='MAXV',func=pin_types.INPUT,unit=1),
            Pin(num='29',name='GND',func=pin_types.PASSIVE,unit=1),
            Pin(num='3',name='CTLI',func=pin_types.INPUT,unit=1),
            Pin(num='4',name='REF',func=pin_types.OUTPUT,unit=1),
            Pin(num='5',name='PGND',func=pin_types.PWRIN,unit=1),
            Pin(num='6',name='LX2',func=pin_types.PWROUT,unit=1),
            Pin(num='7',name='PGND',func=pin_types.PASSIVE,unit=1),
            Pin(num='8',name='LX2',func=pin_types.PASSIVE,unit=1),
            Pin(num='9',name='PVDD2',func=pin_types.PWRIN,unit=1)], 'unit_defs':[] })])