Commit 9bd66772 authored by Florent Kermarrec's avatar Florent Kermarrec

targets/ecpix5: add LedChaser with red leds.

Fits nicely LambdaConcept colors and Blue/Green leds are too bright and would need to be controlled through a PWM.
parent aa20fca1
......@@ -20,6 +20,7 @@ from import trellis_args, trellis_argdict
from litex.soc.cores.clock import *
from litex.soc.integration.soc_core import *
from litex.soc.integration.builder import *
from litex.soc.cores.led import LedChaser
from litedram.modules import MT41K256M16
from litedram.phy import ECP5DDRPHY
......@@ -116,11 +117,16 @@ class BaseSoC(SoCCore):
# Leds (Disable...) ------------------------------------------------------------------------
# Leds -------------------------------------------------------------------------------------
leds_pads = []
for i in range(4):
rgb_led_pads = platform.request("rgb_led", i)
for c in "rgb":
self.comb += getattr(rgb_led_pads, c).eq(1)
self.comb += [getattr(rgb_led_pads, n).eq(1) for n in "gb"] # Disable Green/Blue Leds.
leds_pads += [getattr(rgb_led_pads, n) for n in "r"]
self.submodules.leds = LedChaser(
pads = Cat(leds_pads),
sys_clk_freq = sys_clk_freq)
# Build --------------------------------------------------------------------------------------------
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment