diff --git a/examples/async_systick2.rs b/examples/async_systick2.rs index 2aca343a61..3f1245332a 100644 --- a/examples/async_systick2.rs +++ b/examples/async_systick2.rs @@ -109,6 +109,11 @@ mod app { s.syst.disable_interrupt(); s.state = State::Done; s.queue.pop().map(|w| w.waker.wake()); + if let Some(w) = s.queue.peek() { + s.syst.set_reload(w.time); + } else { + s.syst.disable_interrupt(); + } }); } } @@ -176,7 +181,7 @@ impl Task { //use core::cmp::{Ord, Ordering, PartialOrd}; use core::cmp::Ordering; use heapless::binary_heap::{BinaryHeap, Max}; -use heapless::consts::*; +use heapless::consts::U8; pub enum State { Started,