resources.display: Apply inversion setting to dp
authorStuart Olsen <stuart@sj-olsen.com>
Sat, 14 Mar 2020 09:02:03 +0000 (02:02 -0700)
committerwhitequark <whitequark@whitequark.org>
Sat, 14 Mar 2020 21:46:25 +0000 (21:46 +0000)
nmigen_boards/resources/display.py

index 43a5279aa0a725577228594986209466d67278fc..f1451199b1a945d2c891426fac2f900df4f5a197 100644 (file)
@@ -15,7 +15,7 @@ def Display7SegResource(*args, a, b, c, d, e, f, g, dp=None, invert=False,
     ios.append(Subsignal("f", Pins(f, dir="o", invert=invert, conn=conn, assert_width=1)))
     ios.append(Subsignal("g", Pins(g, dir="o", invert=invert, conn=conn, assert_width=1)))
     if dp is not None:
-        ios.append(Subsignal("dp", Pins(dp, dir="o", conn=conn, assert_width=1)))
+        ios.append(Subsignal("dp", Pins(dp, dir="o", invert=invert, conn=conn, assert_width=1)))
     if attrs is not None:
         ios.append(attrs)
     return Resource.family(*args, default_name="display_7seg", ios=ios)