You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defmt::trace!("blink time {}", ctx.scheduled.counts());
192
+
if*LED_STATE{
193
+
ctx.resources.led_power.set_low().unwrap();
194
+
*LED_STATE = false;
195
+
}else{
196
+
ctx.resources.led_power.set_high().unwrap();
197
+
*LED_STATE = true;
198
+
}
199
+
let next = ctx.scheduled + LED_PERIOD_MS.millis();
200
+
defmt::trace!("Next blink at {}", next.counts());
201
+
ctx.schedule.led_power_blink(next).unwrap();
198
202
}
199
-
let next = ctx.scheduled + LED_PERIOD_MS.millis();
200
-
defmt::trace!("Next blink at {}", next.counts());
201
-
ctx.schedule.led_status_blink(next).unwrap();
202
203
}
203
204
204
205
/// This task polls our power and reset buttons.
205
206
///
206
207
/// We poll them rather than setting up an interrupt as we need to debounce them, which involves waiting a short period and checking them again. Given that we have to do that, we might as well not bother with the interrupt.
0 commit comments