Skip to content

Commit 4f3c3a4

Browse files
committed
Move gpio size warning from signature to GPIOPeripheral
1 parent 0068aa9 commit 4f3c3a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

chipflow_digital_ip/io/_gpio.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class GPIOPeripheral(wiring.Component):
4444
"""
4545

4646
def __init__(self, *, pin_count, addr_width=4, data_width=8, input_stages=2):
47+
if pin_count > 32:
48+
# TODO: why?
49+
raise ValueError(f"Pin pin_count must be lesser than or equal to 32, not {pin_count}")
4750
self._gpio = gpio.Peripheral(pin_count=pin_count,
4851
addr_width=addr_width,
4952
data_width=data_width,

0 commit comments

Comments
 (0)