From 138dc1467ec37435a164ed2c535e428b20c0e2ea Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Sun, 14 Nov 2021 09:30:52 +0100 Subject: [PATCH] quicklogic_quickfeather: Fix build with GPIOIn when cpu-type=None (IRQ not supported). --- litex_boards/targets/quicklogic_quickfeather.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/litex_boards/targets/quicklogic_quickfeather.py b/litex_boards/targets/quicklogic_quickfeather.py index ee34cefc..98d0d19f 100755 --- a/litex_boards/targets/quicklogic_quickfeather.py +++ b/litex_boards/targets/quicklogic_quickfeather.py @@ -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():