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_Texas_SimpleLink = SchLib(tool=SKIDL).add_parts(*[
        Part(**{ 'name':'CC1312R1F3RGZ', 'dest':TEMPLATE, 'tool':SKIDL, 'aliases':Alias({'CC1312R1F3RGZ'}), 'ref_prefix':'U', 'fplist':['Package_DFN_QFN:VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm'], 'footprint':'Package_DFN_QFN:VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm', 'keywords':'32-bit ARM Cortex-M4 MCU Microcontroller', 'description':'', 'datasheet':'http://www.ti.com/lit/ds/symlink/cc1312r.pdf', 'search_text':'/usr/share/kicad/symbols/MCU_Texas_SimpleLink.kicad_sym\nCC1312R1F3RGZ\n\n32-bit ARM Cortex-M4 MCU Microcontroller', 'pins':[
            Pin(num='1',name='RF_P',func=pin_types.PASSIVE,unit=1),
            Pin(num='10',name='DIO_5',func=pin_types.BIDIR,unit=1),
            Pin(num='11',name='DIO_6',func=pin_types.BIDIR,unit=1),
            Pin(num='12',name='DIO_7',func=pin_types.BIDIR,unit=1),
            Pin(num='13',name='VDDS2',func=pin_types.PWRIN,unit=1),
            Pin(num='14',name='DIO_8',func=pin_types.BIDIR,unit=1),
            Pin(num='15',name='DIO_9',func=pin_types.BIDIR,unit=1),
            Pin(num='16',name='DIO_10',func=pin_types.BIDIR,unit=1),
            Pin(num='17',name='DIO_11',func=pin_types.BIDIR,unit=1),
            Pin(num='18',name='DIO_12',func=pin_types.BIDIR,unit=1),
            Pin(num='19',name='DIO_13',func=pin_types.BIDIR,unit=1),
            Pin(num='2',name='RF_N',func=pin_types.PASSIVE,unit=1),
            Pin(num='20',name='DIO_14',func=pin_types.BIDIR,unit=1),
            Pin(num='21',name='DIO_15',func=pin_types.BIDIR,unit=1),
            Pin(num='22',name='VDDS3',func=pin_types.PWRIN,unit=1),
            Pin(num='23',name='DCOUPL',func=pin_types.PWROUT,unit=1),
            Pin(num='24',name='JTAG_TMSC',func=pin_types.BIDIR,unit=1),
            Pin(num='25',name='JTAG_TCKC',func=pin_types.INPUT,unit=1),
            Pin(num='26',name='DIO_16/JTAG_TDO',func=pin_types.BIDIR,unit=1),
            Pin(num='27',name='DIO_17/JTAG_TDI',func=pin_types.BIDIR,unit=1),
            Pin(num='28',name='DIO_18',func=pin_types.BIDIR,unit=1),
            Pin(num='29',name='DIO_19',func=pin_types.BIDIR,unit=1),
            Pin(num='3',name='RX_TX',func=pin_types.PASSIVE,unit=1),
            Pin(num='30',name='DIO_20',func=pin_types.BIDIR,unit=1),
            Pin(num='31',name='DIO_21',func=pin_types.BIDIR,unit=1),
            Pin(num='32',name='DIO_22',func=pin_types.BIDIR,unit=1),
            Pin(num='33',name='DCDC_SW',func=pin_types.PWROUT,unit=1),
            Pin(num='34',name='VDDS_DCDC',func=pin_types.PWRIN,unit=1),
            Pin(num='35',name='~{RESET}',func=pin_types.INPUT,unit=1),
            Pin(num='36',name='DIO_23',func=pin_types.BIDIR,unit=1),
            Pin(num='37',name='DIO_24',func=pin_types.BIDIR,unit=1),
            Pin(num='38',name='DIO_25',func=pin_types.BIDIR,unit=1),
            Pin(num='39',name='DIO_26',func=pin_types.BIDIR,unit=1),
            Pin(num='4',name='X32K_Q1',func=pin_types.INPUT,unit=1),
            Pin(num='40',name='DIO_27',func=pin_types.BIDIR,unit=1),
            Pin(num='41',name='DIO_28',func=pin_types.BIDIR,unit=1),
            Pin(num='42',name='DIO_29',func=pin_types.BIDIR,unit=1),
            Pin(num='43',name='DIO_30',func=pin_types.BIDIR,unit=1),
            Pin(num='44',name='VDDS',func=pin_types.PWRIN,unit=1),
            Pin(num='45',name='VDDR',func=pin_types.PWRIN,unit=1),
            Pin(num='46',name='X48M_N',func=pin_types.INPUT,unit=1),
            Pin(num='47',name='X48M_P',func=pin_types.INPUT,unit=1),
            Pin(num='48',name='VDDR_RF',func=pin_types.PWRIN,unit=1),
            Pin(num='49',name='GND',func=pin_types.PWRIN,unit=1),
            Pin(num='5',name='X32K_Q2',func=pin_types.INPUT,unit=1),
            Pin(num='6',name='DIO_1',func=pin_types.BIDIR,unit=1),
            Pin(num='7',name='DIO_2',func=pin_types.BIDIR,unit=1),
            Pin(num='8',name='DIO_3',func=pin_types.BIDIR,unit=1),
            Pin(num='9',name='DIO_4',func=pin_types.BIDIR,unit=1)], 'unit_defs':[] })])