aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rwxr-xr-xapp/src/main.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/app/src/main.rs b/app/src/main.rs
index d091a9e..ded4dac 100755
--- a/app/src/main.rs
+++ b/app/src/main.rs
@@ -123,9 +123,11 @@ fn main() -> ! {
let mut last_tick = 0;
loop {
- dotstar
- .write(black.iter().cloned())
- .expect("turning off dotstar");
+ cortex_m::interrupt::free(|_cs| {
+ dotstar
+ .write(black.iter().cloned())
+ .expect("turning off dotstar");
+ });
let tick = rtc::millis();
if tick >= last_tick + 1_024 {
@@ -135,9 +137,11 @@ fn main() -> ! {
usb_host.task();
- dotstar
- .write(blue.iter().cloned())
- .expect("turning on dotstar");
+ cortex_m::interrupt::free(|_cs| {
+ dotstar
+ .write(blue.iter().cloned())
+ .expect("turning on dotstar");
+ });
wfi();
}
});