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());
206
+
if*LED_STATE{
207
+
ctx.resources.led_power.set_low().unwrap();
208
+
*LED_STATE = false;
209
+
}else{
210
+
ctx.resources.led_power.set_high().unwrap();
211
+
*LED_STATE = true;
212
+
}
213
+
let next = ctx.scheduled + LED_PERIOD_MS.millis();
214
+
defmt::trace!("Next blink at {}", next.counts());
215
+
ctx.schedule.led_power_blink(next).unwrap();
212
216
}
213
-
let next = ctx.scheduled + LED_PERIOD_MS.millis();
214
-
defmt::trace!("Next blink at {}", next.counts());
215
-
ctx.schedule.led_status_blink(next).unwrap();
216
217
}
217
218
218
219
/// This task polls our power and reset buttons.
219
220
///
220
221
/// 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