mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-19 09:50:49 +00:00
Merge pull request #415 from lschuermann/dev/arty-button-irq
digilent_arty: make GPIOs interrupt-capable if SoC has IRQs enabled
This commit is contained in:
commit
6548dec149
1 changed files with 6 additions and 2 deletions
|
|
@ -138,12 +138,16 @@ class BaseSoC(SoCCore):
|
||||||
|
|
||||||
# Buttons ----------------------------------------------------------------------------------
|
# Buttons ----------------------------------------------------------------------------------
|
||||||
if with_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 ------------------------------------------------------------------------------------
|
# GPIOs ------------------------------------------------------------------------------------
|
||||||
if with_pmod_gpio:
|
if with_pmod_gpio:
|
||||||
platform.add_extension(digilent_arty.raw_pmod_io("pmoda"))
|
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 --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue