from spec.ifaceprint import display_fixed
-def pinspec():
+def pinspec(of):
pinbanks = {
'B': 28,
}
pinouts.uart("1", ('B', 2), "B", 2)
pinouts.uart("2", ('B', 14), "B", 2)
- print ("""# Pinouts (PinMux)
+ of.write("""# Pinouts (PinMux)
auto-generated by [[pinouts.py]]
[[!toc ]]
+
""")
- display(pinouts)
+ display(of, pinouts)
- print ("\n# Pinouts (Fixed function)\n")
+ of.write("\n# Pinouts (Fixed function)\n\n")
fixedpins = {
'CTRL_SYS': [
'GND_GPIOB',
]}
- fixedpins = display_fixed(fixedpins, len(pinouts))
+ fixedpins = display_fixed(of, fixedpins, len(pinouts))
- print ("""# Functions (PinMux)
+ of.write("""# Functions (PinMux)
auto-generated by [[pinouts.py]]
+
""")
function_names = {'EINT': 'External Interrupt',
'ULPI2': 'ULPI (USB Low Pin-count) 2',
}
- fns = display_fns(bankspec, pinouts, function_names)
- print
+ fns = display_fns(of, bankspec, pinouts, function_names)
+ of.write("\n")
# Scenarios below can be spec'd out as either "find first interface"
# by name/number e.g. SPI1, or as "find in bank/mux" which must be
'ULPI1': 'dual USB2 Host ULPI PHY'
}
- unused_pins = check_functions("MiniTest", bankspec, fns, pinouts,
+ unused_pins = check_functions(of, "MiniTest", bankspec, fns, pinouts,
minitest, minitest_eint, minitest_pwm,
descriptions)
- print ("""# Reference Datasheets
+ of.write("""# Reference Datasheets
datasheets and pinout links
* <http://datasheets.chipdb.org/AMD/8018x/80186/amd-80186.pdf>
* <https://www.nxp.com/docs/en/data-sheet/MCF54418.pdf>
* ULPI OTG PHY, ST <http://www.st.com/en/interfaces-and-transceivers/stulpi01a.html>
* ULPI OTG PHY, TI TUSB1210 <http://ti.com/product/TUSB1210/>
+
""")
return pinouts, bankspec, pinbanks, fixedpins