def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. # pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; # pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; # pinutils.findpin(pins, "PD5", True)["functions"]["RTS"]=0; # pinutils.findpin(pins, "PD6", True)["functions"]["TXD"]=0; # pinutils.findpin(pins, "PD7", True)["functions"]["CTS"]=0; # pinutils.findpin(pins, "PD8", True)["functions"]["RXD"]=0; # pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"]=0; # pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; # Make buttons and LEDs negated # pinutils.findpin(pins, "PD13", True)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD14", True)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD15", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PD16", True)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD17", True)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD18", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PD19", True)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD20", True)["functions"]["NEGATED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = [ { "name":"PD0", "sortingname":"D00", "port":"D", "num":"1", "functions":{ "ADC1_IN2":0 }, "csv":{} }, { "name":"PD1", "sortingname":"D01", "port":"D", "num":"2", "functions":{ "ADC1_IN3":0 }, "csv":{} }, { "name":"PD2", "sortingname":"D02", "port":"D", "num":"3", "functions":{ "ADC1_IN4":0 }, "csv":{} }, { "name":"PD3", "sortingname":"D03", "port":"D", "num":"4", "functions":{ "ADC1_IN5":0 }, "csv":{} }, # LED col 1 { "name":"PD4", "sortingname":"D04", "port":"D", "num":"5", "functions":{ "ADC1_IN6":0 }, "csv":{} }, # BTNA { "name":"PD5", "sortingname":"D05", "port":"D", "num":"17", "functions":{}, "csv":{} }, # LED col 2 { "name":"PD6", "sortingname":"D06", "port":"D", "num":"12", "functions":{}, "csv":{} }, # LED row 2 { "name":"PD7", "sortingname":"D07", "port":"D", "num":"11", "functions":{}, "csv":{} }, # LED row 1 { "name":"PD8", "sortingname":"D08", "port":"D", "num":"18", "functions":{}, "csv":{} }, { "name":"PD9", "sortingname":"D09", "port":"D", "num":"10", "functions":{}, "csv":{} }, # LED row 3 { "name":"PD10", "sortingname":"D10", "port":"D", "num":"6", "functions":{ "ADC1_IN7":0 }, "csv":{} }, # LED col 3 { "name":"PD11", "sortingname":"D11", "port":"D", "num":"26", "functions":{ "ADC1_IN0":0 }, "csv":{} }, # BTNB { "name":"PD12", "sortingname":"D12", "port":"D", "num":"20", "functions":{}, "csv":{} }, { "name":"PD13", "sortingname":"D13", "port":"D", "num":"23", "functions":{ "SPI1_SCK":0 }, "csv":{} }, { "name":"PD14", "sortingname":"D14", "port":"D", "num":"22", "functions":{ "SPI1_MISO":0 }, "csv":{} }, { "name":"PD15", "sortingname":"D15", "port":"D", "num":"21", "functions":{ "SPI1_MOSI":0 }, "csv":{} }, { "name":"PD16", "sortingname":"D16", "port":"D", "num":"16", "functions":{}, "csv":{} }, { "name":"PD17", "sortingname":"D17", "port":"D", "num":"31", "functions":{}, "csv":{} }, # FIXME 3.3v { "name":"PD18", "sortingname":"D18", "port":"D", "num":"31", "functions":{}, "csv":{} }, # FIXME 3.3v { "name":"PD19", "sortingname":"D19", "port":"D", "num":"0", "functions":{ "I2C1_SCL":0, "ADC1_IN0":0 }, "csv":{} }, { "name":"PD20", "sortingname":"D20", "port":"D", "num":"30", "functions":{ "I2C1_SDA":0 }, "csv":{} }, { "name":"PH0", "sortingname":"H0", "port":"D", "num":"24", "functions":{}, "csv":{} }, { "name":"PH1", "sortingname":"H1", "port":"D", "num":"25", "functions":{}, "csv":{} }, { "name":"PV0", "sortingname":"V0", "port":"V", "num":"0", "functions":{}, "csv":{} } ]; # Make buttons negated pinutils.findpin(pins, "PD5", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; return pins
def get_pins(): pins = [ { "name":"PD0", "sortingname":"D00", "port":"D", "num":"1", "functions":{ "ADC1_IN2":0 }, "csv":{} }, { "name":"PD1", "sortingname":"D01", "port":"D", "num":"2", "functions":{ "ADC1_IN3":0 }, "csv":{} }, { "name":"PD2", "sortingname":"D02", "port":"D", "num":"3", "functions":{ "ADC1_IN4":0 }, "csv":{} }, { "name":"PD3", "sortingname":"D03", "port":"D", "num":"4", "functions":{ "ADC1_IN5":0 }, "csv":{} }, # LED col 1 { "name":"PD4", "sortingname":"D04", "port":"D", "num":"5", "functions":{ "ADC1_IN6":0 }, "csv":{} }, # BTNA { "name":"PD5", "sortingname":"D05", "port":"D", "num":"17", "functions":{}, "csv":{} }, # LED col 2 { "name":"PD6", "sortingname":"D06", "port":"D", "num":"12", "functions":{}, "csv":{} }, # LED row 2 { "name":"PD7", "sortingname":"D07", "port":"D", "num":"11", "functions":{}, "csv":{} }, # LED row 1 { "name":"PD8", "sortingname":"D08", "port":"D", "num":"18", "functions":{}, "csv":{} }, { "name":"PD9", "sortingname":"D09", "port":"D", "num":"10", "functions":{}, "csv":{} }, # LED row 3 { "name":"PD10", "sortingname":"D10", "port":"D", "num":"6", "functions":{ "ADC1_IN7":0 }, "csv":{} }, # LED col 3 { "name":"PD11", "sortingname":"D11", "port":"D", "num":"26", "functions":{ "ADC1_IN0":0 }, "csv":{} }, # BTNB { "name":"PD12", "sortingname":"D12", "port":"D", "num":"20", "functions":{}, "csv":{} }, { "name":"PD13", "sortingname":"D13", "port":"D", "num":"23", "functions":{ "SPI1_SCK":0 }, "csv":{} }, { "name":"PD14", "sortingname":"D14", "port":"D", "num":"22", "functions":{ "SPI1_MISO":0 }, "csv":{} }, { "name":"PD15", "sortingname":"D15", "port":"D", "num":"21", "functions":{ "SPI1_MOSI":0 }, "csv":{} }, { "name":"PD16", "sortingname":"D16", "port":"D", "num":"16", "functions":{}, "csv":{} }, { "name":"PD17", "sortingname":"D17", "port":"D", "num":"31", "functions":{}, "csv":{} }, # FIXME 3.3v { "name":"PD18", "sortingname":"D18", "port":"D", "num":"31", "functions":{}, "csv":{} }, # FIXME 3.3v { "name":"PD19", "sortingname":"D19", "port":"D", "num":"0", "functions":{ "I2C1_SCL":0, "ADC1_IN0":0 }, "csv":{} }, { "name":"PD20", "sortingname":"D20", "port":"D", "num":"30", "functions":{ "I2C1_SDA":0 }, "csv":{} }, { "name":"PH0", "sortingname":"H0", "port":"D", "num":"24", "functions":{}, "csv":{} }, { "name":"PH1", "sortingname":"H1", "port":"D", "num":"25", "functions":{}, "csv":{} } ]; # Make buttons negated pinutils.findpin(pins, "PD5", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; return pins
def get_pins(): pins = pinutils.generate_pins(0, 16) pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["USART0_TX"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["USART1_TX"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["USART0_RX"] = 0 # just fake pins D0 .. D16 return pins
def get_pins(): pins = pinutils.generate_pins(0,15) pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["USART0_TX"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["USART1_TX"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["USART0_RX"]=0; # just fake pins D0 .. D15 return pins
def get_pins(): pins = pinutils.generate_pins(0,69) pinutils.findpin(pins, "PD0", True)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["TXD"]=0; pinutils.findpin(pins, "PD13", True)["functions"]["LED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 return pins
def get_pins(): pins = pinutils.generate_pins(0,31) pinutils.findpin(pins, "PD0", True)["functions"]["I2C1_SDA"]=0; # Rev 1 pinutils.findpin(pins, "PD1", True)["functions"]["I2C1_SCL"]=0; # Rev 1 pinutils.findpin(pins, "PD2", True)["functions"]["I2C1_SDA"]=0; # Rev 2 pinutils.findpin(pins, "PD3", True)["functions"]["I2C1_SCL"]=0; # Rev 2 pinutils.findpin(pins, "PD9", True)["functions"]["SPI1_MISO"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["SPI1_MOSI"]=0; pinutils.findpin(pins, "PD11", True)["functions"]["SPI1_SCK"]=0; pinutils.findpin(pins, "PD14", True)["functions"]["UART1_TX"]=0; pinutils.findpin(pins, "PD15", True)["functions"]["UART1_RX"]=0; return pins
def dump_pin(pin, pinstrip): if pin in pinmap: pin = pinmap[pin]; pininfo = pinutils.findpin(pins, pin, False) not_five_volt = False # print(json.dumps(pininfo)) if ("csv" in pininfo) and ("IO" in pininfo["csv"]) and ("Type" in pininfo["csv"]) and (pininfo["csv"]["Type"]=="I/O") and (pininfo["csv"]["IO"]!="FT") : not_five_volt = True writeHTML(' <DIV class="'+pinstrip+'pin pin">'); pinHTML = ' <SPAN class="pinname">'+pin+"</SPAN>"; pinHTML2 = ''; if not_five_volt: pinHTML2 += '<SPAN class="pinfunction NOT_5V" title="Not 5v Tolerant">3.3v</SPAN>\n'; if ("_notes" in board.board) and (pin in board.board["_notes"]): pinHTML2 += '<SPAN class="pinfunction NOTE" title="'+board.board["_notes"][pin]+'">!</SPAN>\n'; reverse = pinstrip=="left" or pinstrip=="right2"; if not reverse: writeHTML(pinHTML+"\n"+pinHTML2) pinfuncs = {} for func in sorted(pininfo["functions"]): # writeHTML(' '+func) if func in pinutils.CLASSES: funcdata = str(pininfo["functions"][func]) cls = pinutils.CLASSES[func] name = cls title = func if cls=="I2C" or cls=="SPI" or cls=="USART": name=func.replace("_"," ") if cls=="DEVICE" and funcdata[:4]=="pin_": title = title + " ("+funcdata[4:]+")"; # print title if func in pinutils.NAMES: name = pinutils.NAMES[func] writeHTML('<!-- '+func+' -->') if name in pinfuncs: pinfuncs[name]["title"] = pinfuncs[name]["title"] + " " + title else: pinfuncs[name] = { 'cls': cls, 'title': "["+pin+"] "+title, 'name': name, 'id': pin+"_"+func, 'func' : func }; for func in sorted(pinfuncs.items(),key=lambda x: x[1]['cls']): pf = func[1] url = False if pf["cls"] in pinutils.URLS: url = pinutils.URLS[pf["cls"]] if pf["func"] in pinutils.URLS: url = pinutils.URLS[pf["func"]] if url != False: writeHTML(' <A href="'+url+'" class="pinfunctionlink">'); writeHTML(' <SPAN class="pinfunction '+pf["cls"]+'" title="'+pf["title"]+'" onMouseOver="showTT(\''+pf["id"]+'\')" onMouseOut="hideTT(\''+pf["id"]+'\')">'+pf["name"]+'</SPAN>') if url != False: writeHTML(' </A>'); writeHTML(' <SPAN class="pintooltip" id="'+pf["id"]+'" style="display:none;">'+pf["title"]+'</SPAN>') if reverse: writeHTML(pinHTML2+"\n"+pinHTML) writeHTML(' </DIV>')
def get_pins(): pins = [ { "name":"PD0", "sortingname":"D00", "port":"D", "num":"25", "functions":{}, "csv":{} }, { "name":"PD1", "sortingname":"D01", "port":"D", "num":"26", "functions":{}, "csv":{} }, { "name":"PD2", "sortingname":"D02", "port":"D", "num":"27", "functions":{}, "csv":{} }, { "name":"PD3", "sortingname":"D03", "port":"D", "num":"30", "functions":{ "ADC1_IN6":0 }, "csv":{} }, { "name":"PD4", "sortingname":"D04", "port":"D", "num":"31", "functions":{ "ADC1_IN7":0 }, "csv":{} }, { "name":"PD5", "sortingname":"D05", "port":"D", "num":"0", "functions":{}, "csv":{} }, { "name":"PD6", "sortingname":"D06", "port":"D", "num":"1", "functions":{}, "csv":{} }, { "name":"PD7", "sortingname":"D07", "port":"D", "num":"6", "functions":{}, "csv":{} }, { "name":"PD8", "sortingname":"D08", "port":"D", "num":"7", "functions":{}, "csv":{} }, { "name":"PD9", "sortingname":"D09", "port":"D", "num":"8", "functions":{}, "csv":{} }, { "name":"PD10", "sortingname":"D10", "port":"D", "num":"17", "functions":{}, "csv":{} }, { "name":"PD11", "sortingname":"D11", "port":"D", "num":"18", "functions":{}, "csv":{} }, { "name":"PD12", "sortingname":"D12", "port":"D", "num":"19", "functions":{}, "csv":{} }, { "name":"PD13", "sortingname":"D13", "port":"D", "num":"20", "functions":{}, "csv":{} }, { "name":"PA0", "sortingname":"A00", "port":"A", "num":"2", "functions":{ "ADC1_IN0":0 }, "csv":{} }, { "name":"PA1", "sortingname":"A01", "port":"A", "num":"3", "functions":{ "ADC1_IN1":0 }, "csv":{} }, { "name":"PA2", "sortingname":"A02", "port":"A", "num":"4", "functions":{ "ADC1_IN2":0 }, "csv":{} }, { "name":"PA3", "sortingname":"A03", "port":"A", "num":"5", "functions":{ "ADC1_IN3":0 }, "csv":{} }, { "name":"PA4", "sortingname":"A04", "port":"A", "num":"28", "functions":{ "ADC1_IN4":0 }, "csv":{} }, { "name":"PA5", "sortingname":"A05", "port":"A", "num":"29", "functions":{ "ADC1_IN5":0 }, "csv":{} }, { "name":"PH0", "sortingname":"H0", "port":"H", "num":"16", "functions":{}, "csv":{} }, # LED { "name":"PH1", "sortingname":"H1", "port":"H", "num":"23", "functions":{}, "csv":{} }, # BTN1 { "name":"PH2", "sortingname":"H2", "port":"H", "num":"21", "functions":{}, "csv":{} }, # 2 { "name":"PH3", "sortingname":"H3", "port":"H", "num":"22", "functions":{}, "csv":{} }, # 3 { "name":"PH4", "sortingname":"H4", "port":"H", "num":"24", "functions":{}, "csv":{} }, # 4 { "name":"PH5", "sortingname":"H5", "port":"H", "num":"13", "functions":{}, "csv":{} }, # LCD DC { "name":"PH6", "sortingname":"H6", "port":"H", "num":"12", "functions":{}, "csv":{} }, # LCD CS { "name":"PH7", "sortingname":"H7", "port":"H", "num":"11", "functions":{}, "csv":{} }, # LCD RST { "name":"PH8", "sortingname":"H8", "port":"H", "num":"14", "functions":{}, "csv":{} }, # LCD SCK { "name":"PH9", "sortingname":"H9", "port":"H", "num":"15", "functions":{}, "csv":{} }, # LCD MOSI ]; # Make buttons and LEDs negated pinutils.findpin(pins, "PH0", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PH1", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PH2", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PH3", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PH4", True)["functions"]["NEGATED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.scan_pin_file([], 'stm32f103xb.csv', 6, 10, 11) # Olimexino/Maple pins have stupid names pinmapping = { 'D0' :'PA3', 'D1' :'PA2', 'D2' :'PA0', 'D3' :'PA1', 'D4' :'PB5', 'D5' :'PB6', 'D6' :'PA8', 'D7' :'PA9', 'D8' :'PA10', 'D9' :'PB7', 'D10':'PA4', 'D11':'PA7', 'D12':'PA6', 'D13':'PA5', 'D14':'PB8', 'D15':'PC0', # shared with A0-A15 'D16':'PC1', 'D17':'PC2', 'D18':'PC3', 'D19':'PC4', 'D20':'PC5', 'D21':'PC13', 'D22':'PC14', 'D23':'PC15', 'D24':'PB9', 'D25':'PD2', 'D26':'PC10', 'D27':'PB0', 'D28':'PB1', 'D29':'PB10', 'D30':'PB11', 'D31':'PB12', 'D32':'PB13', 'D33':'PB14', 'D34':'PB15', 'D35':'PC6', 'D36':'PC7', 'D37':'PC8', 'D38':'PC9', # for button 'D39':'PC12', # for USB disc 'D40':'PA11', # for USB dm 'D41':'PA12', # for USB dp }; newpins = [] for newname in pinmapping: # print newname pin = pinutils.findpin(pins, pinmapping[newname], True) pin["name"] = "P"+newname pin["sortingname"] = newname[0] + newname[1:].rjust(2,'0') newpins.append(pin) # Because 'pinmapping' is NOT stored in order!!! newpins = sorted(newpins, key=lambda pin: pin["sortingname"]) # print(json.dumps(newpins, sort_keys=True, indent=2)) return newpins
def get_pins(): pins = pinutils.scan_pin_file([], 'stm32f103xe.csv', 6, 10, 11) # Olimexino/Maple pins have stupid names pinmapping = { 'D0': 'PA3', 'D1': 'PA2', 'D2': 'PA0', 'D3': 'PA1', 'D4': 'PB5', 'D5': 'PB6', 'D6': 'PA8', 'D7': 'PA9', 'D8': 'PA10', 'D9': 'PB7', 'D10': 'PA4', 'D11': 'PA7', 'D12': 'PA6', 'D13': 'PA5', 'D14': 'PB8', 'D15': 'PC0', # shared with A0-A15 'D16': 'PC1', 'D17': 'PC2', 'D18': 'PC3', 'D19': 'PC4', 'D20': 'PC5', 'D21': 'PC13', 'D22': 'PC14', 'D23': 'PC15', 'D24': 'PB9', 'D25': 'PD2', 'D26': 'PC10', 'D27': 'PB0', 'D28': 'PB1', 'D29': 'PB10', 'D30': 'PB11', 'D31': 'PB12', 'D32': 'PB13', 'D33': 'PB14', 'D34': 'PB15', 'D35': 'PC6', 'D36': 'PC7', 'D37': 'PC8', 'D38': 'PC9', # for button 'D39': 'PC12', # for USB disc 'D40': 'PA11', # for USB dm 'D41': 'PA12', # for USB dp } newpins = [] for newname in pinmapping: # print newname pin = pinutils.findpin(pins, pinmapping[newname], True) pin["name"] = "P" + newname pin["sortingname"] = newname[0] + newname[1:].rjust(2, '0') newpins.append(pin) # Because 'pinmapping' is NOT stored in order!!! newpins = sorted(newpins, key=lambda pin: pin["sortingname"]) # print(json.dumps(newpins, sort_keys=True, indent=2)) return newpins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"] = 0 pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"] = 0 pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"] = 0 pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"] = 0 pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"] = 0 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0,14) pinutils.findpin(pins, "PD1", True)["functions"]["I2C_SDA"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["I2C_SCK"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["SPI1_SCK"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["SPI1_MOSI"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["SPI1_MISO"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["UART1_TX"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["UART1_RX"]=0; return pins
def get_pins(): pins = pinutils.scan_pin_file([], "stm32f103xb.csv", 6, 10, 11) # Olimexino/Maple pins have stupid names pinmapping = { "D0": "PB11", "D1": "PB10", "D2": "PB2", "D3": "PB0", "D4": "PA7", "D5": "PA6", "D6": "PA5", "D7": "PA4", "D8": "PA3", "D9": "PA2", "D10": "PA1", "D11": "PA0", "D12": "PC15", "D13": "PC14", "D14": "PC13", "D15": "PB7", "D16": "PB6", "D17": "PB5", "D18": "PB4", "D19": "PB3", "D20": "PA15", "D21": "PA14", "D22": "PA13", "D23": "PA12", # for USB dp "D24": "PA11", # for USB dm "D25": "PA10", "D26": "PA9", "D27": "PA8", "D28": "PB15", "D29": "PB14", "D30": "PB13", "D31": "PB12", "D32": "PB8", # for button "D33": "PB1", "D34": "PB9", # for USB disc } newpins = [] for newname in pinmapping: # print newname pin = pinutils.findpin(pins, pinmapping[newname], True) pin["name"] = "P" + newname pin["sortingname"] = newname[0] + newname[1:].rjust(2, "0") newpins.append(pin) # Because 'pinmapping' is NOT stored in order!!! newpins = sorted(newpins, key=lambda pin: pin["sortingname"]) # print(json.dumps(newpins, sort_keys=True, indent=2)) return newpins
def get_pins(): pins = pinutils.generate_pins(0, 15) pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"] = 0 # PA0 is the analog input pin #pinutils.findpin(pins, "PA0", False)["functions"]["ADC"]=0; # PB16 is the RTC GPIO pin, also called GPIO16 #pinutils.findpin(pins, "PB16", False) #for pin in pins: # pin["functions"] = { # "I2C1_SCL": "JSH_I2C1_SCL", # "I2C1_SDA": "JSH_I2C1_SDA", # "ADC": 0, # } return pins
def get_pins(): pins = [ { "name": "PD5", "sortingname": "D05", "port": "D", "num": "34", "functions": {}, "csv": {} }, # P1.02 = 34 ] pinutils.findpin(pins, "PD5", True)["functions"]["NEGATED"] = 0 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 return pins
def get_pins(): pins = pinutils.generate_pins(0,15) pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"]=0; # PA0 is the analog input pin #pinutils.findpin(pins, "PA0", False)["functions"]["ADC"]=0; # PB16 is the RTC GPIO pin, also called GPIO16 #pinutils.findpin(pins, "PB16", False) #for pin in pins: # pin["functions"] = { # "I2C1_SCL": "JSH_I2C1_SCL", # "I2C1_SDA": "JSH_I2C1_SDA", # "ADC": 0, # } return pins
def get_pins(): pins = pinutils.generate_pins(0, 39) # 40 General Purpose I/O Pins. pinutils.findpin(pins, "PD39", True)["functions"]["NEGATED"] = 0 # pins = [ # { "name":"PD19", "sortingname":"D19", "port":"D", "num":"19", "functions":{}, "csv":{} }, # { "name":"PD21", "sortingname":"D21", "port":"D", "num":"21", "functions":{}, "csv":{} }, # { "name":"PD22", "sortingname":"D22", "port":"D", "num":"22", "functions":{}, "csv":{} }, # { "name":"PD23", "sortingname":"D23", "port":"D", "num":"23", "functions":{}, "csv":{} }, # { "name":"PD25", "sortingname":"D25", "port":"D", "num":"25", "functions":{}, "csv":{} }, # { "name":"PD33", "sortingname":"D33", "port":"D", "num":"33", "functions":{}, "csv":{} }, # { "name":"PD39", "sortingname":"D39", "port":"D", "num":"39", "functions":{}, "csv":{} }, # ]; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 return pins
def dump_pin(pin, pinstrip): writeHTML(' <DIV class="'+pinstrip+'pin pin">'); pinHTML = ' <SPAN class="pinname">'+pin+"</SPAN>"; reverse = pinstrip=="left" or pinstrip=="right2"; if not reverse: writeHTML(pinHTML) if pin in pinmap: pin = pinmap[pin]; pininfo = pinutils.findpin(pins, pin, False) pinfuncs = {} for func in sorted(pininfo["functions"]): # writeHTML(' '+func) if func in pinutils.CLASSES: funcdata = str(pininfo["functions"][func]) cls = pinutils.CLASSES[func] name = cls title = func if cls=="I2C" or cls=="SPI" or cls=="USART": name=func.replace("_"," ") if cls=="DEVICE" and funcdata[:4]=="pin_": title = title + " ("+funcdata[4:]+")"; print title if func in pinutils.NAMES: name = pinutils.NAMES[func] writeHTML('<!-- '+func+' -->') if name in pinfuncs: pinfuncs[name]["title"] = pinfuncs[name]["title"] + " " + title else: pinfuncs[name] = { 'cls': cls, 'title': "["+pin+"] "+title, 'name': name }; for func in sorted(pinfuncs.items(),key=lambda x: x[1]['cls']): pf = func[1] writeHTML(' <SPAN class="pinfunction '+pf["cls"]+'" title="'+pf["title"]+'">'+pf["name"]+'</SPAN>') if reverse: writeHTML(pinHTML) writeHTML(' </DIV>')
def get_pins(): pins = pinutils.generate_pins(2, 127) pinutils.findpin(pins, "PD19", True)["functions"]["I2C2_SCL"] = 0 pinutils.findpin(pins, "PD20", True)["functions"]["I2C2_SDA"] = 0 return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD28", True)["functions"]["USART1_TX"] = 0 pinutils.findpin(pins, "PD29", True)["functions"]["USART1_RX"] = 0 pinutils.findpin(pins, "PD12", True)["functions"]["GPRS_TX"] = 0 pinutils.findpin(pins, "PD20", True)["functions"]["GPRS_RX"] = 0 pinutils.findpin(pins, "PD14", True)["functions"]["GPRS_RESET"] = 0 pinutils.findpin(pins, "PD15", True)["functions"]["GPRS_PWRKEY"] = 0 pinutils.findpin(pins, "PD6", True)["functions"]["GPRS_PWN_ON"] = 0 pinutils.findpin(pins, "PD9", True)["functions"]["GPS_TX"] = 0 pinutils.findpin(pins, "PD8", True)["functions"]["GPS_RX"] = 0 pinutils.findpin(pins, "PD7", True)["functions"]["GPS_STANDBY"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["GPS_PWR_ON"] = 0 pinutils.findpin(pins, "PD31", True)["functions"]["GPS_RESET"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["BME_CS"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["BME_SDI"] = 0 pinutils.findpin(pins, "PD4", True)["functions"]["BME_SCK"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["BME_SDO"] = 0 pinutils.findpin(pins, "PD11", True)["functions"]["LIS2MDL_SCL"] = 0 pinutils.findpin(pins, "PD13", True)["functions"]["LIS2MDL_SDA"] = 0 pinutils.findpin(pins, "PD16", True)["functions"]["LIS2MDL_INT"] = 0 pinutils.findpin(pins, "PD18", True)["functions"]["LIS3DH_SCL"] = 0 pinutils.findpin(pins, "PD19", True)["functions"]["LIS3DH_SDA"] = 0 pinutils.findpin(pins, "PD25", True)["functions"]["LIS3DH_INT1"] = 0 pinutils.findpin(pins, "PD27", True)["functions"]["LIS3DH_INT2"] = 0 pinutils.findpin(pins, "PD26", True)["functions"]["LIS3DH_RES"] = 0 pinutils.findpin(pins, "PD21", True)["functions"]["OPT_SDA"] = 0 pinutils.findpin(pins, "PD23", True)["functions"]["OPT_SCL"] = 0 pinutils.findpin(pins, "PD22", True)["functions"]["OPT_INT"] = 0 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.scan_pin_file([], 'stm32f103xb.csv', 6, 10, 11) # Embedded Pi Mapping pinmapping = { 'D0' :'PC11', 'D1' :'PC10', 'D2' :'PC12', 'D3' :'PC6', 'D4' :'PC7', 'D5' :'PC8', 'D6' :'PC9', 'D7' :'PD2', 'D8' :'PA15', 'D9' :'PA8', 'D10':'PB12', 'D11':'PB15', 'D12':'PB14', 'D13':'PB13', 'D14':'PB7', 'D15':'PB6', 'D16':'PC0', # share with D40 'D17':'PC1', # share with D41 'D18':'PC2', # share with D42 'D19':'PC3', # share with D43 'D20':'PB7', # share with D14 'D21':'PB6', # share with D15 'D22':'PA3', 'D23':'PA2', 'D24':'PA1', 'D25':'PA0', 'D26':'PA9', 'D27':'PB0', 'D28':'PA10', 'D29':'PB1', 'D30':'PB8', 'D31':'PB9', 'D32':'PA4', 'D33':'PA7', 'D34':'PA6', 'D35':'PA5', 'D36':'PC13', 'D37':'PB5', 'D38':'PB11', 'D39':'PB10', 'D40':'PC0', 'D41':'PC1', 'D42':'PC2', 'D43':'PC3', 'D44':'PC4', 'D45':'PC5', }; newpins = [] for newname in pinmapping: print newname+" => "+pinmapping[newname] pin = copy.deepcopy(pinutils.findpin(pins, pinmapping[newname], True)) pin["name"] = "P"+newname pin["sortingname"] = newname[0] + newname[1:].rjust(2,'0') newpins.append(pin) # Because 'pinmapping' is NOT stored in order!!! newpins = sorted(newpins, key=lambda pin: pin["sortingname"]) # print(json.dumps(newpins, sort_keys=True, indent=2)) return newpins
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD27", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD26", True)["functions"]["XL2"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD27", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD26", True)["functions"]["XL2"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
codeOutDevicePin("LCD", "pin_bl", "LCD_BL") if board.devices["LCD"]["controller"]=="ssd1306" or board.devices["LCD"]["controller"]=="st7567": codeOutDevicePin("LCD", "pin_mosi", "LCD_SPI_MOSI") codeOutDevicePin("LCD", "pin_sck", "LCD_SPI_SCK") codeOutDevicePin("LCD", "pin_cs", "LCD_SPI_CS") codeOutDevicePin("LCD", "pin_dc", "LCD_SPI_DC") codeOutDevicePin("LCD", "pin_rst", "LCD_SPI_RST") if "SD" in board.devices: if not "pin_d3" in board.devices["SD"]: # NOT SDIO - normal SD if "pin_cs" in board.devices["SD"]: codeOutDevicePin("SD", "pin_cs", "SD_CS_PIN") if "pin_di" in board.devices["SD"]: codeOutDevicePin("SD", "pin_di", "SD_DI_PIN") if "pin_do" in board.devices["SD"]: codeOutDevicePin("SD", "pin_do", "SD_DO_PIN") if "pin_clk" in board.devices["SD"]: codeOutDevicePin("SD", "pin_clk", "SD_CLK_PIN") sdClkPin = pinutils.findpin(pins, "P"+board.devices["SD"]["pin_clk"], False) spiNum = 0 for func in sdClkPin["functions"]: if func[:3]=="SPI": spiNum = int(func[3]) if spiNum==0: die("No SPI peripheral found for SD card's CLK pin") codeOut("#define SD_SPI EV_SPI"+str(spiNum)) if "IR" in board.devices: codeOutDevicePin("IR", "pin_anode", "IR_ANODE_PIN") codeOutDevicePin("IR", "pin_cathode", "IR_CATHODE_PIN") if "CAPSENSE" in board.devices: codeOutDevicePin("CAPSENSE", "pin_rx", "CAPSENSE_RX_PIN") codeOutDevicePin("CAPSENSE", "pin_tx", "CAPSENSE_TX_PIN") for device in ["USB","SD","LCD","JTAG","ESP8266","IR"]:
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["RTS"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["TXD"]=0; pinutils.findpin(pins, "PD7", True)["functions"]["CTS"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = [] pinutils.findpin(pins, "PD0", False)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", False)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD2", False)["functions"]["ADC1_IN0"]=0; # 0.3 not connected pin pinutils.findpin(pins, "PD4", False)["functions"]["ADC1_IN2"]=0; # 0.5 not connected pin pinutils.findpin(pins, "PD6", False)["functions"]["NEGATED"]=0; # LED1 (G) # 0.7 not connected pin pinutils.findpin(pins, "PD8", False)["functions"]["NEGATED"]=0; # RGB LED / red P0.08 pinutils.findpin(pins, "PD9", False) pinutils.findpin(pins, "PD10", False) pinutils.findpin(pins, "PD11", False) pinutils.findpin(pins, "PD12", False)["functions"]["NEGATED"]=0; # RGB LED / blue P0.12 pinutils.findpin(pins, "PD13", False)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD14", False) pinutils.findpin(pins, "PD15", False)["functions"]["TXD"]=0; # 0.16 not connected pin pinutils.findpin(pins, "PD17", False) pinutils.findpin(pins, "PD18", False) # SW2 is also connected to P0.19, P0.21, P0.23, and P0.25. This is done to simplify PCB routing. These # GPIOs should not be used and should be left as input with no pull or be disconnected by firmware. # pinutils.findpin(pins, "PD19", False) pinutils.findpin(pins, "PD20", False) # pinutils.findpin(pins, "PD21", False) pinutils.findpin(pins, "PD22", False) # pinutils.findpin(pins, "PD23", False) pinutils.findpin(pins, "PD24", False) # pinutils.findpin(pins, "PD25", False) pinutils.findpin(pins, "PD26", False) # 0.27 not connected pin # 0.28 not connected pin pinutils.findpin(pins, "PD29", False)["functions"]["ADC1_IN5"]=0; # 0.30 not connected pin pinutils.findpin(pins, "PD31", False)["functions"]["ADC1_IN7"]=0; pinutils.findpin(pins, "PD32", False) pinutils.findpin(pins, "PD33", False) pinutils.findpin(pins, "PD34", False) # 1.3 not connected pin pinutils.findpin(pins, "PD36", False) # 1.5 not connected pin pinutils.findpin(pins, "PD38", False)["functions"]["NEGATED"]=0; # the button is at P1.06 pinutils.findpin(pins, "PD39", False) # 1.8 not connected pin pinutils.findpin(pins, "PD41", False)["functions"]["NEGATED"]=0; # RGB LED / green P1.09 pinutils.findpin(pins, "PD42", False) pinutils.findpin(pins, "PD43", False) # 1.12 not connected pin pinutils.findpin(pins, "PD45", False) # 1.14 not connected pin pinutils.findpin(pins, "PD47", False) # # pins = pinutils.generate_pins(0,47) # 48 General Purpose I/O Pins. # pinutils.findpin(pins, "PD0", False)["functions"]["XL1"]=0; # pinutils.findpin(pins, "PD1", False)["functions"]["XL2"]=0; # pinutils.findpin(pins, "PD2", False)["functions"]["ADC1_IN0"]=0; # # NC # pinutils.findpin(pins, "PD4", False)["functions"]["ADC1_IN2"]=0; # # pinutils.findpin(pins, "PD5", False)["functions"]["ADC1_IN3"]=0; # NC # pinutils.findpin(pins, "PD6", False)["functions"]["NEGATED"]=0; # LED1 (G) # # pinutils.findpin(pins, "PD28", False)["functions"]["ADC1_IN4"]=0; # NC # pinutils.findpin(pins, "PD29", False)["functions"]["ADC1_IN5"]=0; # # pinutils.findpin(pins, "PD30", False)["functions"]["ADC1_IN6"]=0; # NC # pinutils.findpin(pins, "PD31", False)["functions"]["ADC1_IN7"]=0; # pinutils.findpin(pins, "PD13", False)["functions"]["RXD"]=0; # pinutils.findpin(pins, "PD15", False)["functions"]["TXD"]=0; # # Make button and LEDs negated # pinutils.findpin(pins, "PD8", False)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD41", False)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD12", False)["functions"]["NEGATED"]=0; # pinutils.findpin(pins, "PD38", False)["functions"]["NEGATED"]=0; # # pins.remove(pinutils.findpin(pins, "PD3", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD5", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD7", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD16", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD26", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD27", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD30", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD35", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD37", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD40", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD44", False)) # Not connected pin # # pins.remove(pinutils.findpin(pins, "PD46", False)) # Not connected pin # # # Remove these pins, because: # # # SW2 is also connected to P0.19, P0.21, P0.23, and P0.25. This is done to simplify PCB routing. These # # # GPIOs should not be used and should be left as input with no pull or be disconnected by firmware. # # pins.remove(pinutils.findpin(pins, "PD19", False)) # # pins.remove(pinutils.findpin(pins, "PD21", False)) # # pins.remove(pinutils.findpin(pins, "PD23", False)) # # pins.remove(pinutils.findpin(pins, "PD25", False)) # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; print('pins:', pins) return pins
def get_pins(): # { "name":"PD20", "sortingname":"D20", "port":"D", "num":"30", "functions":{ "I2C1_SDA":0 }, "csv":{} }, # pins = pinutils.generate_pins(0,5); ##6-11 are used by Flash chip # pins.extend(pinutils.generate_pins(12,23)); # pins.extend(pinutils.generate_pins(25,27)); ##32-33 are routed to rtc for xtal # pins.extend(pinutils.generate_pins(34,39)); # pins = pinutils.fill_gaps_in_pin_list(pins); pins = pinutils.generate_pins(0, 39) # 40 General Purpose I/O Pins. pinutils.findpin(pins, "PD36", True)["functions"]["ADC1_IN0"] = 0 pinutils.findpin(pins, "PD37", True)["functions"]["ADC1_IN1"] = 0 pinutils.findpin(pins, "PD38", True)["functions"]["ADC1_IN2"] = 0 pinutils.findpin(pins, "PD39", True)["functions"]["ADC1_IN3"] = 0 pinutils.findpin(pins, "PD32", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD33", True)["functions"]["ADC1_IN5"] = 0 pinutils.findpin(pins, "PD34", True)["functions"]["ADC1_IN6"] = 0 pinutils.findpin(pins, "PD35", True)["functions"]["ADC1_IN7"] = 0 #ADC2 not supported yet, waiting for driver from espressif pinutils.findpin(pins, "PD4", True)["functions"]["ADC2_IN0"] = 0 pinutils.findpin(pins, "PD0", True)["functions"]["ADC2_IN1"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["ADC2_IN2"] = 0 pinutils.findpin(pins, "PD15", True)["functions"]["ADC2_IN3"] = 0 pinutils.findpin(pins, "PD13", True)["functions"]["ADC2_IN4"] = 0 pinutils.findpin(pins, "PD12", True)["functions"]["ADC2_IN5"] = 0 pinutils.findpin(pins, "PD14", True)["functions"]["ADC2_IN6"] = 0 pinutils.findpin(pins, "PD27", True)["functions"]["ADC2_IN7"] = 0 pinutils.findpin(pins, "PD25", True)["functions"]["DAC_OUT1"] = 0 pinutils.findpin(pins, "PD26", True)["functions"]["DAC_OUT2"] = 0 pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["USART0_TX"] = 0 pinutils.findpin(pins, "PD16", True)["functions"]["USART2_RX"] = 0 pinutils.findpin(pins, "PD17", True)["functions"]["USART2_TX"] = 0 pinutils.findpin(pins, "PD32", True)["functions"]["USART0_RX"] = 0 # everything is non-5v tolerant #for pin in pins: # pin["functions"]["3.3"]=0; return pins
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD27", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD26", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["RTS"]=0; pinutils.findpin(pins, "PD9", True)["functions"]["TXD"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["CTS"]=0; pinutils.findpin(pins, "PD11", True)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD17", True)["functions"]["Button_1"]=0; pinutils.findpin(pins, "PD18", True)["functions"]["Button_2"]=0; pinutils.findpin(pins, "PD19", True)["functions"]["Button_3"]=0; pinutils.findpin(pins, "PD20", True)["functions"]["Button_4"]=0; pinutils.findpin(pins, "PD21", True)["functions"]["LED_1"]=0; pinutils.findpin(pins, "PD22", True)["functions"]["LED_2"]=0; pinutils.findpin(pins, "PD23", True)["functions"]["LED_3"]=0; pinutils.findpin(pins, "PD24", True)["functions"]["LED_4"]=0; pinutils.findpin(pins, "PD0", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["ADC1_IN7"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0, 47) # 48 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 # NC pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 # NC pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"] = 0 pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"] = 0 # NC pinutils.findpin(pins, "PD5", True)["functions"]["RTS"] = 0 pinutils.findpin(pins, "PD6", True)["functions"]["TXD"] = 0 pinutils.findpin(pins, "PD7", True)["functions"]["CTS"] = 0 pinutils.findpin(pins, "PD8", True)["functions"]["RXD"] = 0 pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"] = 0 pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"] = 0 # BTN1 pinutils.findpin(pins, "PD12", True)["functions"]["NEGATED"] = 0 # BTN2 pinutils.findpin(pins, "PD13", True)["functions"]["NEGATED"] = 0 # LED1 pinutils.findpin(pins, "PD14", True)["functions"]["NEGATED"] = 0 # LED2 pinutils.findpin(pins, "PD15", True)["functions"]["NEGATED"] = 0 # LED3 pinutils.findpin(pins, "PD16", True)["functions"]["NEGATED"] = 0 # LED4 # pinutils.findpin(pins, "PD17", False) # pinutils.findpin(pins, "PD18", False) # neopixel SCK # NC # pinutils.findpin(pins, "PD19", False) # pinutils.findpin(pins, "PD20", False) # pinutils.findpin(pins, "PD21", False) # pinutils.findpin(pins, "PD22", False) # pinutils.findpin(pins, "PD23", False) # neopixel LRCK # NC # pinutils.findpin(pins, "PD26", False) # pinutils.findpin(pins, "PD27", False) pinutils.findpin(pins, "PD24", True)["functions"]["NEGATED"] = 0 # BTN3 pinutils.findpin(pins, "PD25", True)["functions"]["NEGATED"] = 0 # BTN4 pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"] = 0 pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"] = 0 pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"] = 0 # pinutils.findpin(pins, "PD32", False) # 1.00 # NC # pinutils.findpin(pins, "PD33", False) # 1.01 # pinutils.findpin(pins, "PD34", False) # 1.02 # pinutils.findpin(pins, "PD35", False) # 1.03 # NC # pinutils.findpin(pins, "PD36", False) # 1.04 # NC # pinutils.findpin(pins, "PD37", False) # 1.05 # NC # pinutils.findpin(pins, "PD38", False) # 1.06 # NC # pinutils.findpin(pins, "PD39", False) # 1.07 # NC # pinutils.findpin(pins, "PD40", False) # 1.08 # NC # pinutils.findpin(pins, "PD41", False) # 1.09 # NC # pinutils.findpin(pins, "PD42", False) # 1.10 # NC # pinutils.findpin(pins, "PD43", False) # 1.11 # NC # pinutils.findpin(pins, "PD44", False) # 1.12 # pinutils.findpin(pins, "PD45", False) # 1.13 # pinutils.findpin(pins, "PD46", False) # 1.14 # pinutils.findpin(pins, "PD47", False) # 1.15 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0,31) pinutils.findpin(pins, "PD7", True)["functions"]["SPI1_SCK"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["SPI1_MOSI"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["SPI1_MISO"]=0; return pins
def get_pins(): # 32 General Purpose I/O Pins, 16 'virtual' Port Expanded pins pins = pinutils.generate_pins(0, 31, "D") + pinutils.generate_pins( 0, 15, "V") pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["RTS"] = 0 pinutils.findpin(pins, "PD6", True)["functions"]["TXD"] = 0 pinutils.findpin(pins, "PD7", True)["functions"]["CTS"] = 0 pinutils.findpin(pins, "PD8", True)["functions"]["RXD"] = 0 pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"] = 0 pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"] = 0 pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"] = 0 pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"] = 0 pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"] = 0 # Make buttons and LEDs negated pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"] = 0 pinutils.findpin(pins, "PV5", True)["functions"]["NEGATED"] = 0 pinutils.findpin(pins, "PV6", True)["functions"]["NEGATED"] = 0 pinutils.findpin(pins, "PV7", True)["functions"]["NEGATED"] = 0 # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
codeOutDevicePin("LCD", "pin_cs", "LCD_SPI_CS") codeOutDevicePin("LCD", "pin_dc", "LCD_SPI_DC") codeOutDevicePin("LCD", "pin_rst", "LCD_SPI_RST") if "SD" in board.devices: if not "pin_d3" in board.devices["SD"]: # NOT SDIO - normal SD if "pin_cs" in board.devices["SD"]: codeOutDevicePin("SD", "pin_cs", "SD_CS_PIN") if "pin_di" in board.devices["SD"]: codeOutDevicePin("SD", "pin_di", "SD_DI_PIN") if "pin_do" in board.devices["SD"]: codeOutDevicePin("SD", "pin_do", "SD_DO_PIN") if "pin_clk" in board.devices["SD"]: codeOutDevicePin("SD", "pin_clk", "SD_CLK_PIN") sdClkPin = pinutils.findpin(pins, "P" + board.devices["SD"]["pin_clk"], False) spiNum = 0 for func in sdClkPin["functions"]: if func[:3] == "SPI": spiNum = int(func[3]) if spiNum == 0: die("No SPI peripheral found for SD card's CLK pin") codeOut("#define SD_SPI EV_SPI" + str(spiNum)) if "IR" in board.devices: codeOutDevicePin("IR", "pin_anode", "IR_ANODE_PIN") codeOutDevicePin("IR", "pin_cathode", "IR_CATHODE_PIN") if "CAPSENSE" in board.devices: codeOutDevicePin("CAPSENSE", "pin_rx", "CAPSENSE_RX_PIN") codeOutDevicePin("CAPSENSE", "pin_tx", "CAPSENSE_TX_PIN")
def get_pins(): pins = pinutils.generate_pins(0,19); pins.extend(pinutils.generate_pins(21,22)); pins.extend(pinutils.generate_pins(25,27)); pins.extend(pinutils.generate_pins(32,39)); pinutils.findpin(pins, "PD36", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD37", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD38", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD39", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD32", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD33", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD34", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD35", True)["functions"]["ADC1_IN7"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC2_IN0"]=0; pinutils.findpin(pins, "PD0", True)["functions"]["ADC2_IN1"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC2_IN2"]=0; pinutils.findpin(pins, "PD15", True)["functions"]["ADC2_IN3"]=0; pinutils.findpin(pins, "PD13", True)["functions"]["ADC2_IN4"]=0; pinutils.findpin(pins, "PD12", True)["functions"]["ADC2_IN5"]=0; pinutils.findpin(pins, "PD14", True)["functions"]["ADC2_IN6"]=0; pinutils.findpin(pins, "PD27", True)["functions"]["ADC2_IN7"]=0; pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["USART0_TX"]=0; pinutils.findpin(pins, "PD17", True)["functions"]["USART2_TX"]=0; pinutils.findpin(pins, "PD32", True)["functions"]["USART0_RX"]=0; return pins
def get_pins(): # 32 General Purpose I/O Pins, 16 'virtual' Port Expanded pins pins = pinutils.generate_pins(0,31,"D") + pinutils.generate_pins(0,15,"V"); pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["RTS"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["TXD"]=0; pinutils.findpin(pins, "PD7", True)["functions"]["CTS"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; # Make buttons and LEDs negated pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PV5", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PV6", True)["functions"]["NEGATED"]=0; pinutils.findpin(pins, "PV7", True)["functions"]["NEGATED"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = [] pinutils.findpin(pins, "PD0", False)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", False)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD2", False)["functions"]["ADC1_IN0"] = 0 # 0.3 not connected pin pinutils.findpin(pins, "PD4", False)["functions"]["ADC1_IN2"] = 0 # 0.5 not connected pin pinutils.findpin(pins, "PD6", False)["functions"]["NEGATED"] = 0 # LED1 (G) # 0.7 not connected pin pinutils.findpin(pins, "PD8", False)["functions"]["NEGATED"] = 0 # RGB LED / red P0.08 pinutils.findpin(pins, "PD9", False) pinutils.findpin(pins, "PD10", False) pinutils.findpin(pins, "PD11", False) pinutils.findpin(pins, "PD12", False)["functions"]["NEGATED"] = 0 # RGB LED / blue P0.12 pinutils.findpin(pins, "PD13", False)["functions"]["RXD"] = 0 pinutils.findpin(pins, "PD14", False) pinutils.findpin(pins, "PD15", False)["functions"]["TXD"] = 0 # 0.16 not connected pin pinutils.findpin(pins, "PD17", False) pinutils.findpin(pins, "PD18", False) # SW2 is also connected to P0.19, P0.21, P0.23, and P0.25. This is done to simplify PCB routing. These # GPIOs should not be used and should be left as input with no pull or be disconnected by firmware. # pinutils.findpin(pins, "PD19", False) pinutils.findpin(pins, "PD20", False) # pinutils.findpin(pins, "PD21", False) pinutils.findpin(pins, "PD22", False) # pinutils.findpin(pins, "PD23", False) pinutils.findpin(pins, "PD24", False) # pinutils.findpin(pins, "PD25", False) pinutils.findpin(pins, "PD26", False) # 0.27 not connected pin # 0.28 not connected pin pinutils.findpin(pins, "PD29", False)["functions"]["ADC1_IN5"] = 0 # 0.30 not connected pin pinutils.findpin(pins, "PD31", False)["functions"]["ADC1_IN7"] = 0 pinutils.findpin(pins, "PD32", False) pinutils.findpin(pins, "PD33", False) pinutils.findpin(pins, "PD34", False) # 1.3 not connected pin pinutils.findpin(pins, "PD36", False) # 1.5 not connected pin pinutils.findpin(pins, "PD38", False)["functions"]["NEGATED"] = 0 # the button is at P1.06 pinutils.findpin(pins, "PD39", False) # 1.8 not connected pin pinutils.findpin(pins, "PD41", False)["functions"]["NEGATED"] = 0 # RGB LED / green P1.09 pinutils.findpin(pins, "PD42", False) pinutils.findpin(pins, "PD43", False) # 1.12 not connected pin pinutils.findpin(pins, "PD45", False) # 1.14 not connected pin pinutils.findpin(pins, "PD47", False) # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"] = 0 print('pins:', pins) return pins
def get_pins(): pins = pinutils.generate_pins(0,47) # 48 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; # Make buttons and LEDs negated pinutils.findpin(pins, "PD17", True)["functions"]["NEGATED"]=0; # button return pins
def get_pins(): # { "name":"PD20", "sortingname":"D20", "port":"D", "num":"30", "functions":{ "I2C1_SDA":0 }, "csv":{} }, # pins = pinutils.generate_pins(0,5); ##6-11 are used by Flash chip # pins.extend(pinutils.generate_pins(12,23)); # pins.extend(pinutils.generate_pins(25,27)); ##32-33 are routed to rtc for xtal # pins.extend(pinutils.generate_pins(34,39)); # pins = pinutils.fill_gaps_in_pin_list(pins); pins = pinutils.generate_pins(0,39) # 40 General Purpose I/O Pins. pinutils.findpin(pins, "PD36", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD37", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD38", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD39", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD32", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD33", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD34", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD35", True)["functions"]["ADC1_IN7"]=0; #ADC2 not supported yet, waiting for driver from espressif pinutils.findpin(pins, "PD4", True)["functions"]["ADC2_IN0"]=0; pinutils.findpin(pins, "PD0", True)["functions"]["ADC2_IN1"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC2_IN2"]=0; pinutils.findpin(pins, "PD15", True)["functions"]["ADC2_IN3"]=0; pinutils.findpin(pins, "PD13", True)["functions"]["ADC2_IN4"]=0; pinutils.findpin(pins, "PD12", True)["functions"]["ADC2_IN5"]=0; pinutils.findpin(pins, "PD14", True)["functions"]["ADC2_IN6"]=0; pinutils.findpin(pins, "PD27", True)["functions"]["ADC2_IN7"]=0; pinutils.findpin(pins, "PD25", True)["functions"]["DAC_OUT1"]=0; pinutils.findpin(pins, "PD26", True)["functions"]["DAC_OUT2"]=0; pinutils.findpin(pins, "PD0", True)["functions"]["LED_1"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["USART0_TX"]=0; pinutils.findpin(pins, "PD16", True)["functions"]["USART2_RX"]=0; pinutils.findpin(pins, "PD17", True)["functions"]["USART2_TX"]=0; pinutils.findpin(pins, "PD32", True)["functions"]["USART0_RX"]=0; # everything is non-5v tolerant #for pin in pins: # pin["functions"]["3.3"]=0; return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) pinutils.findpin(pins, "PD7", True)["functions"]["SPI1_SCK"] = 0 pinutils.findpin(pins, "PD8", True)["functions"]["SPI1_MOSI"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["SPI1_MISO"] = 0 return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["RTS"] = 0 pinutils.findpin(pins, "PD6", True)["functions"]["TXD"] = 0 pinutils.findpin(pins, "PD7", True)["functions"]["CTS"] = 0 pinutils.findpin(pins, "PD8", True)["functions"]["RXD"] = 0 pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"] = 0 pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"] = 0 pinutils.findpin(pins, "PD13", True)["functions"]["Button_1"] = 0 pinutils.findpin(pins, "PD14", True)["functions"]["Button_2"] = 0 pinutils.findpin(pins, "PD15", True)["functions"]["Button_3"] = 0 pinutils.findpin(pins, "PD16", True)["functions"]["Button_4"] = 0 pinutils.findpin(pins, "PD17", True)["functions"]["LED_1"] = 0 pinutils.findpin(pins, "PD18", True)["functions"]["LED_2"] = 0 pinutils.findpin(pins, "PD19", True)["functions"]["LED_3"] = 0 pinutils.findpin(pins, "PD20", True)["functions"]["LED_4"] = 0 #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.scan_pin_file([], 'stm32f103xb.csv', 6, 10, 11) # Embedded Pi Mapping pinmapping = { 'D0': 'PC11', 'D1': 'PC10', 'D2': 'PC12', 'D3': 'PC6', 'D4': 'PC7', 'D5': 'PC8', 'D6': 'PC9', 'D7': 'PD2', 'D8': 'PA15', 'D9': 'PA8', 'D10': 'PB12', 'D11': 'PB15', 'D12': 'PB14', 'D13': 'PB13', 'D14': 'PB7', 'D15': 'PB6', 'D16': 'PC0', # share with D40 'D17': 'PC1', # share with D41 'D18': 'PC2', # share with D42 'D19': 'PC3', # share with D43 'D20': 'PB7', # share with D14 'D21': 'PB6', # share with D15 'D22': 'PA3', 'D23': 'PA2', 'D24': 'PA1', 'D25': 'PA0', 'D26': 'PA9', 'D27': 'PB0', 'D28': 'PA10', 'D29': 'PB1', 'D30': 'PB8', 'D31': 'PB9', 'D32': 'PA4', 'D33': 'PA7', 'D34': 'PA6', 'D35': 'PA5', 'D36': 'PC13', 'D37': 'PB5', 'D38': 'PB11', 'D39': 'PB10', 'D40': 'PC0', 'D41': 'PC1', 'D42': 'PC2', 'D43': 'PC3', 'D44': 'PC4', 'D45': 'PC5', } newpins = [] for newname in pinmapping: print newname + " => " + pinmapping[newname] pin = copy.deepcopy(pinutils.findpin(pins, pinmapping[newname], True)) pin["name"] = "P" + newname pin["sortingname"] = newname[0] + newname[1:].rjust(2, '0') newpins.append(pin) # Because 'pinmapping' is NOT stored in order!!! newpins = sorted(newpins, key=lambda pin: pin["sortingname"]) # print(json.dumps(newpins, sort_keys=True, indent=2)) return newpins
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["RTS"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["TXD"]=0; pinutils.findpin(pins, "PD7", True)["functions"]["CTS"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["RXD"]=0; pinutils.findpin(pins, "PD9", True)["functions"]["NFC1"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["NFC2"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"]=0; pinutils.findpin(pins, "PD1", True)["functions"]["XL2"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["USART1_TX"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["USART1_RX"]=0; pinutils.findpin(pins, "PD12", True)["functions"]["GPRS_TX"]=0; pinutils.findpin(pins, "PD20", True)["functions"]["GPRS_RX"]=0; pinutils.findpin(pins, "PD14", True)["functions"]["GPRS_RESET"]=0; pinutils.findpin(pins, "PD15", True)["functions"]["GPRS_PWRKEY"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["GPRS_PWN_ON"]=0; pinutils.findpin(pins, "PD9", True)["functions"]["GPS_TX"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["GPS_RX"]=0; pinutils.findpin(pins, "PD7", True)["functions"]["GPS_STANDBY"]=0; pinutils.findpin(pins, "PD10", True)["functions"]["GPS_PWR_ON"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["GPS_RESET"]=0; pinutils.findpin(pins, "PD2", True)["functions"]["BME_CS"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["BME_SDI"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["BME_SCK"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["BME_SDO"]=0; pinutils.findpin(pins, "PD11", True)["functions"]["LIS2MDL_SCL"]=0; pinutils.findpin(pins, "PD13", True)["functions"]["LIS2MDL_SDA"]=0; pinutils.findpin(pins, "PD16", True)["functions"]["LIS2MDL_INT"]=0; pinutils.findpin(pins, "PD18", True)["functions"]["LIS3DH_SCL"]=0; pinutils.findpin(pins, "PD19", True)["functions"]["LIS3DH_SDA"]=0; pinutils.findpin(pins, "PD25", True)["functions"]["LIS3DH_INT1"]=0; pinutils.findpin(pins, "PD27", True)["functions"]["LIS3DH_INT2"]=0; pinutils.findpin(pins, "PD26", True)["functions"]["OPT_SDA"]=0; pinutils.findpin(pins, "PD23", True)["functions"]["OPT_SCL"]=0; pinutils.findpin(pins, "PD22", True)["functions"]["OPT_INT"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0,31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD5", True)["functions"]["SPI1_SCK"]=0; pinutils.findpin(pins, "PD6", True)["functions"]["SPI1_MOSI"]=0; pinutils.findpin(pins, "PD7", True)["functions"]["I2C1_SCL"]=0; pinutils.findpin(pins, "PD8", True)["functions"]["I2C1_SDA"]=0; #only 1 I2C available in Espruino # pinutils.findpin(pins, "PD13", True)["functions"]["I2C2_SCL"]=0; # pinutils.findpin(pins, "PD14", True)["functions"]["I2C2_SDA"]=0; pinutils.findpin(pins, "PD22", True)["functions"]["USART1_RX"]=0; pinutils.findpin(pins, "PD23", True)["functions"]["USART1_TX"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["NEGATED"]=0; # button goes low when pressed, negate # hardwired NRF52 analog inputs pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"]=0; pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"]=0; pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"]=0; pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"]=0; pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"]=0; pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"]=0; pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"]=0; pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"]=0; # everything is non-5v tolerant for pin in pins: pin["functions"]["3.3"]=0; #The boot/reset button will function as a reset button in normal operation. Pin reset on PD21 needs to be enabled on the nRF52832 device for this to work. return pins
def get_pins(): pins = pinutils.generate_pins(0, 31) # 32 General Purpose I/O Pins. pinutils.findpin(pins, "PD0", True)["functions"]["XL1"] = 0 pinutils.findpin(pins, "PD1", True)["functions"]["XL2"] = 0 pinutils.findpin(pins, "PD2", True)["functions"]["ADC1_IN0"] = 0 pinutils.findpin(pins, "PD3", True)["functions"]["ADC1_IN1"] = 0 pinutils.findpin(pins, "PD4", True)["functions"]["ADC1_IN2"] = 0 pinutils.findpin(pins, "PD5", True)["functions"]["ADC1_IN3"] = 0 pinutils.findpin(pins, "PD28", True)["functions"]["ADC1_IN4"] = 0 pinutils.findpin(pins, "PD29", True)["functions"]["ADC1_IN5"] = 0 pinutils.findpin(pins, "PD30", True)["functions"]["ADC1_IN6"] = 0 pinutils.findpin(pins, "PD31", True)["functions"]["ADC1_IN7"] = 0 # negate buttons pinutils.findpin(pins, "PD11", True)["functions"]["NEGATED"] = 0 # btn pinutils.findpin(pins, "PD16", True)["functions"]["NEGATED"] = 0 # btn pinutils.findpin(pins, "PD22", True)["functions"]["NEGATED"] = 0 # btn pinutils.findpin(pins, "PD23", True)["functions"]["NEGATED"] = 0 # btn pinutils.findpin(pins, "PD24", True)["functions"]["NEGATED"] = 0 # btn return pins