3 from spec
.base
import PinSpec
5 from spec
.ifaceprint
import display
, display_fns
, check_functions
6 from spec
.ifaceprint
import display_fixed
22 function_names
= {'EINT': 'External Interrupt',
23 'FB': 'MC68k FlexBus',
25 'JTAG0': 'JTAG (same as JTAG1, JTAG_SEL=LOW)',
26 'JTAG1': 'JTAG (same as JTAG0, JTAG_SEL=HIGH)',
27 'LCD': '24-pin RGB/TTL LCD',
28 'RG': 'RGMII Ethernet',
29 'MMC': 'eMMC 1/2/4/8 pin',
30 'PWM': 'PWM (pulse-width modulation)',
34 'SPI0': 'SPI (Serial Peripheral Interface) 0',
35 'SPI1': 'SPI (Serial Peripheral Interface) 1',
36 'QSPI': 'Quad SPI (Serial Peripheral Interface) 1',
40 'QUART0': 'UART (TX/RX/CTS/RTS) 0',
41 'QUART1': 'UART (TX/RX/CTS/RTS) 1',
42 'UART0': 'UART (TX/RX) 0',
43 'UART1': 'UART (TX/RX) 1',
44 'UART2': 'UART (TX/RX) 2',
45 'ULPI0': 'ULPI (USB Low Pin-count) 0',
46 'ULPI1': 'ULPI (USB Low Pin-count) 1',
47 'ULPI2': 'ULPI (USB Low Pin-count) 2',
50 ps
= PinSpec(pinbanks
, fixedpins
, function_names
)
53 ps
.gpio("", ('A', 0), 0, 0, 3)
54 ps
.uart("", ('A', 0), 1)
55 #ps.uart("0", ('A', 0), 1)
56 #ps.uart("1", ('A', 2), 1)
57 ps
.i2c("", ('A', 1), 2)
58 ps
.i2c("", ('A', 0), 3, limit
=1)
59 #ps.i2c("0", ('A', 1), 2)
60 #ps.i2c("1", ('A', 2), 4)
62 microtest
= ['UART', 'TWI', ]
70 'B1:LCD/22': '18-bit RGB/TTL LCD',
71 'ULPI0/8': 'user-facing: internal (on Card), USB-OTG ULPI PHY',
72 'ULPI1': 'dual USB2 Host ULPI PHY'
75 ps
.add_scenario("MicroTest", microtest
, microtest_eint
, microtest_pwm
,