fix naming in spi
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 09:03:24 +0000 (10:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 24 Jul 2018 09:03:24 +0000 (10:03 +0100)
src/bsv/peripheral_gen/nspi.py

index 9f8cd04554cd896224038a321a8ad525a44604e1..d9999597b3c189c7b1c3666d79fb23359bd68e6f 100644 (file)
@@ -38,8 +38,8 @@ class nspi(PBase):
         # special-case for gpio in, store in a temporary vector
         plen = len(self.peripheral.pinspecs)
         template = "      mkConnection({0}.{1},\n\t\t\t{2}.{1});"
-        ps = "pinmux.peripheral_side.%s" % name
         name = self.get_iname(count)
+        ps = "pinmux.peripheral_side.%s" % name
         n = "{0}.out".format(name)
         for ptype in ['io_out', 'io_out_en', 'io_in']:
             ret.append(template.format(ps, ptype, n))