mirror of
https://github.com/saymrwulf/litex-boards.git
synced 2026-11-19 09:50:49 +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 ------------------------------------------------------------------------------------------
|
# BaseSoC ------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
class BaseSoC(SoCCore):
|
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()
|
platform = quicklogic_quickfeather.Platform()
|
||||||
|
|
||||||
# SoCCore ----------------------------------------------------------------------------------
|
# SoCCore ----------------------------------------------------------------------------------
|
||||||
|
|
@ -60,17 +60,18 @@ class BaseSoC(SoCCore):
|
||||||
# CRG --------------------------------------------------------------------------------------
|
# CRG --------------------------------------------------------------------------------------
|
||||||
self.submodules.crg = _CRG(platform, with_eos_s3=kwargs["cpu_type"] == "eos-s3")
|
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 -------------------------------------------------------------------------------------
|
# Leds -------------------------------------------------------------------------------------
|
||||||
if with_led_chaser:
|
if with_led_chaser:
|
||||||
self.submodules.leds = LedChaser(
|
self.submodules.leds = LedChaser(
|
||||||
pads = platform.request_all("user_led"),
|
pads = platform.request_all("user_led"),
|
||||||
sys_clk_freq = sys_clk_freq)
|
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 --------------------------------------------------------------------------------------------
|
# Build --------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue