mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
queue, async_systic2
This commit is contained in:
parent
28490f5caa
commit
5df1f59f47
1 changed files with 6 additions and 1 deletions
|
@ -109,6 +109,11 @@ mod app {
|
||||||
s.syst.disable_interrupt();
|
s.syst.disable_interrupt();
|
||||||
s.state = State::Done;
|
s.state = State::Done;
|
||||||
s.queue.pop().map(|w| w.waker.wake());
|
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<F: Future + 'static> Task<F> {
|
||||||
//use core::cmp::{Ord, Ordering, PartialOrd};
|
//use core::cmp::{Ord, Ordering, PartialOrd};
|
||||||
use core::cmp::Ordering;
|
use core::cmp::Ordering;
|
||||||
use heapless::binary_heap::{BinaryHeap, Max};
|
use heapless::binary_heap::{BinaryHeap, Max};
|
||||||
use heapless::consts::*;
|
use heapless::consts::U8;
|
||||||
|
|
||||||
pub enum State {
|
pub enum State {
|
||||||
Started,
|
Started,
|
||||||
|
|
Loading…
Reference in a new issue