digilent_arty: make GPIOs interrupt-capable if SoC has IRQs enabled
Signed-off-by: Leon Schuermann <leon@is.currently.online>
This commit is contained in:
parent
bf458e388e
commit
94ad22aceb
|
@ -138,12 +138,16 @@ class BaseSoC(SoCCore):
|
|||
|
||||
# Buttons ----------------------------------------------------------------------------------
|
||||
if with_buttons:
|
||||
self.submodules.buttons = GPIOIn(pads=platform.request_all("user_btn"))
|
||||
self.submodules.buttons = GPIOIn(
|
||||
pads=platform.request_all("user_btn"),
|
||||
with_irq=self.irq.enabled)
|
||||
|
||||
# GPIOs ------------------------------------------------------------------------------------
|
||||
if with_pmod_gpio:
|
||||
platform.add_extension(digilent_arty.raw_pmod_io("pmoda"))
|
||||
self.submodules.gpio = GPIOTristate(platform.request("pmoda"))
|
||||
self.submodules.gpio = GPIOTristate(
|
||||
platform.request("pmoda"),
|
||||
with_irq=self.irq.enabled)
|
||||
|
||||
# Build --------------------------------------------------------------------------------------------
|
||||
|
||||
|
|
Loading…
Reference in New Issue