add dummy LPC interface
[pinmux.git] / src / spec / microtest.py
index 002aac7364e5f7f0024e067b85d10444ae882f02..ab957b6ae8dc6c596ecf820c6ec3c30d80b449ea 100644 (file)
@@ -6,9 +6,9 @@ from spec.ifaceprint import display, display_fns, check_functions
 from spec.ifaceprint import display_fixed
 
 
-def pinspec(of):
+def pinspec():
     pinbanks = {
-        'A': 4,
+        'A': (3, 4),
     }
     fixedpins = {
         'CTRL_SYS': [
@@ -37,8 +37,8 @@ def pinspec(of):
                       'TWI0': 'I2C 0',
                       'TWI1': 'I2C 1',
                       'TWI2': 'I2C 2',
-                      'UARTQ0': 'UART (TX/RX/CTS/RTS) 0',
-                      'UARTQ1': 'UART (TX/RX/CTS/RTS) 1',
+                      'QUART0': 'UART (TX/RX/CTS/RTS) 0',
+                      'QUART1': 'UART (TX/RX/CTS/RTS) 1',
                       'UART0': 'UART (TX/RX) 0',
                       'UART1': 'UART (TX/RX) 1',
                       'UART2': 'UART (TX/RX) 2',
@@ -47,17 +47,27 @@ def pinspec(of):
                       'ULPI2': 'ULPI (USB Low Pin-count) 2',
                       }
 
-    ps = PinSpec(pinbanks, fixedpins, function_names)
+    ps = PinSpec(pinbanks, fixedpins, function_names,
+                 {"gpioa":
+                  {
+                      "muxconfig": "011000"
+                  }
+                  }
+                 )
 
     # Bank A, 0-3
-    #ps.gpio("", ('A', 0), 0, 0, 4)
-    ps.uart("0", ('A', 0), 0)
-    #ps.uart("1", ('A', 2), 1)
-    ps.i2c("0", ('A', 1), 1)
+    ps.gpio("", ('A', 0), 0, 0, 3)
+    #ps.uart("", ('A', 0), 1)
+    ps.uart("0", ('A', 0), 1)
+    ps.uart("1", ('A', 2), 1)
+    ps.i2c("0", ('A', 1), 2)
+    ps.i2c("0", ('A', 3), 3, limit=1)
+    #ps.i2c("0", ('A', 1), 2)
+    #ps.i2c("1", ('A', 2), 4)
 
-    minitest = ['UART0', 'TWI0', ]
-    minitest_eint = []
-    minitest_pwm = []
+    microtest = ['UART0', 'TWI0', ]
+    microtest_eint = []
+    microtest_pwm = []
     descriptions = {
         'TWI0': 'I2C',
         'E2:SD1': '',
@@ -68,7 +78,7 @@ def pinspec(of):
         'ULPI1': 'dual USB2 Host ULPI PHY'
     }
 
-    ps.add_scenario("MiniTest", minitest, minitest_eint, minitest_pwm,
+    ps.add_scenario("MicroTest", microtest, microtest_eint, microtest_pwm,
                     descriptions)
 
-    return ps.write(of)
+    return ps