mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-17 08:54:59 +00:00
quicklogic_quickfeather: Fix build with GPIOIn when cpu-type=None (IRQ not supported).
This commit is contained in:
parent
ed67b91fcc
commit
138dc1467e
1 changed files with 7 additions and 6 deletions
|
|
@ -46,7 +46,7 @@ class _CRG(Module):
|
|||
# BaseSoC ------------------------------------------------------------------------------------------
|
||||
|
||||
class BaseSoC(SoCCore):
|
||||
def __init__(self, sys_clk_freq=int(10e6), with_led_chaser=True, with_gpioin=True, **kwargs):
|
||||
def __init__(self, sys_clk_freq=int(10e6), with_led_chaser=True, with_gpio_in=True, **kwargs):
|
||||
platform = quicklogic_quickfeather.Platform()
|
||||
|
||||
# SoCCore ----------------------------------------------------------------------------------
|
||||
|
|
@ -60,17 +60,18 @@ class BaseSoC(SoCCore):
|
|||
# CRG --------------------------------------------------------------------------------------
|
||||
self.submodules.crg = _CRG(platform, with_eos_s3=kwargs["cpu_type"] == "eos-s3")
|
||||
|
||||
# GPIOIn -> interrupt test
|
||||
if with_gpioin:
|
||||
self.submodules.gpio = GPIOIn(
|
||||
pads = platform.request_all("user_btn_n"), with_irq=True)
|
||||
self.irq.add("gpio", use_loc_if_exists=True)
|
||||
# Leds -------------------------------------------------------------------------------------
|
||||
if with_led_chaser:
|
||||
self.submodules.leds = LedChaser(
|
||||
pads = platform.request_all("user_led"),
|
||||
sys_clk_freq = sys_clk_freq)
|
||||
|
||||
# GPIOIn (Interrupt test) ------------------------------------------------------------------
|
||||
if with_gpio_in:
|
||||
self.submodules.gpio = GPIOIn(platform.request_all("user_btn_n"), with_irq=True)
|
||||
if kwargs["cpu_type"] == "eos-s3":
|
||||
self.irq.add("gpio", use_loc_if_exists=True)
|
||||
|
||||
# Build --------------------------------------------------------------------------------------------
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Reference in a new issue