From f586ba5a137530a6297eebe155ca383430b0a0a0 Mon Sep 17 00:00:00 2001 From: mwojcik Date: Fri, 26 Aug 2022 11:43:23 +0800 Subject: [PATCH] experiments: add error led test for kasli_soc --- experiments/src/main.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/experiments/src/main.rs b/experiments/src/main.rs index a75aa83..05e1f06 100644 --- a/experiments/src/main.rs +++ b/experiments/src/main.rs @@ -183,6 +183,20 @@ pub fn main_core0() { println!(""); } + #[cfg(feature = "target_kasli_soc")] + { + let mut err_cdwn = timer.countdown(); + let mut err_state = true; + let mut led = zynq::error_led::ErrorLED::error_led(); + task::spawn( async move { + loop { + led.toggle(err_state); + err_state = !err_state; + delay(&mut err_cdwn, Milliseconds(1000)).await; + } + }); + } + let eth = zynq::eth::Eth::eth0(HWADDR.clone()); println!("Eth on");