File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class GPIOPins(wiring.PureInterface):
1313 class Signature (wiring .Signature ):
1414 def __init__ (self , width ):
1515 if width > 32 :
16- raise ValueError (f"Pin width must be lesser than or equal to 32, not { len ( pins . o ) } " )
16+ raise ValueError (f"Pin width must be lesser than or equal to 32, not { width } " )
1717 self ._width = width
1818 super ().__init__ (
1919 # each pin has seperate output enable
@@ -51,14 +51,11 @@ class DI(csr.Register, access="r"):
5151 def __init__ (self , width ):
5252 super ().__init__ ({"pins" : csr .Field (csr .action .R , unsigned (width ))})
5353
54- """Simple GPIO peripheral.
55-
56- All pins default to input at power up.
57- """
58- def __init__ (self , * , pins ):
59- if len (pins .o ) > 32 :
60- raise ValueError (f"Pin width must be lesser than or equal to 32, not { len (pins .o )} " )
54+ def __init__ (self , * , pins : GPIOPins ):
55+ """Simple GPIO peripheral.
6156
57+ All pins default to input at power up.
58+ """
6259 self .width = pins .width
6360 self .pins = pins
6461
You can’t perform that action at this time.
0 commit comments