From dd7b576814827ca3f5cb1dfc88f7a3acbd190e02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20=C3=96sterberg?= <carl.vilhelms.osterberg@gmail.com> Date: Wed, 10 Mar 2021 17:25:51 +0100 Subject: [PATCH] bare7_2 --- examples/rtic_bare7.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/examples/rtic_bare7.rs b/examples/rtic_bare7.rs index 8d31e38..9d62c24 100644 --- a/examples/rtic_bare7.rs +++ b/examples/rtic_bare7.rs @@ -77,15 +77,16 @@ const APP: () = { rprintln!("toggle @ {:?}", Instant::now()); //use the set high/low for push pull output - if *TOGGLE { - cx.resources.led.set_high().ok(); + // if *TOGGLE { + // cx.resources.led.set_high().ok(); - } else { - cx.resources.led.set_low().ok(); - } + // } else { + // cx.resources.led.set_low().ok(); + // } - *TOGGLE = !*TOGGLE; + // *TOGGLE = !*TOGGLE; + _toggle_generic(cx.resources.led, TOGGLE); cx.schedule.toggle(cx.scheduled + OFFSET.cycles()).unwrap(); } -- GitLab