decided to use new spec
[pinmux.git] / src / spec / microtest.py
index 528cc344b5d025dbbb62b264bad5b3333c83e636..2a8e66314f0504fbc92f1741034ff562e0499bf4 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,16 +47,25 @@ 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, 6)
-    ps.uart("0", ('A', 0), 1)
-    ps.uart("1", ('A', 2), 1)
-    ps.i2c("0", ('A', 1), 2)
-    ps.i2c("1", ('A', 2), 4)
+    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("", ('A', 1), 2)
+    ps.i2c("", ('A', 0), 3, limit=1)
+    #ps.i2c("0", ('A', 1), 2)
+    #ps.i2c("1", ('A', 2), 4)
 
-    microtest = ['UART0', 'TWI0', ]
+    microtest = ['UART', 'TWI', ]
     microtest_eint = []
     microtest_pwm = []
     descriptions = {
@@ -69,7 +78,7 @@ def pinspec(of):
         'ULPI1': 'dual USB2 Host ULPI PHY'
     }
 
-    ps.add_scenario("MiniTest", microtest, microtest_eint, microtest_pwm,
+    ps.add_scenario("MicroTest", microtest, microtest_eint, microtest_pwm,
                     descriptions)
 
-    return ps.write(of)
+    return ps