add spi interface
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 16:57:10 +0000 (16:57 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 16:57:10 +0000 (16:57 +0000)
src/interface_decl.py

index f1a3b4efa9f2d7763fcfb6484dd4e76ac178ab2e..9b420e9cccc68fe00d7ff8945732979163533d91 100644 (file)
@@ -190,3 +190,12 @@ if __name__ == '__main__':
     print
     assert pinmunge(str(twi)) == pinmunge(twiinterface_decl)
 
+    spi = Interface([{'name': 'sclk_{0}', 'action': True},
+                      {'name': 'mosi_{0}', 'action': True},
+                      {'name': 'ss_{0}', 'action': True},
+                      {'name': 'miso_{0}'},
+                    ])
+    print spi
+    print
+    assert pinmunge(str(spi)) == pinmunge(spiinterface_decl)
+