mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-18 22:05:37 +01:00
Added enable/disable timer calls
This commit is contained in:
parent
e52088bbd8
commit
82d051e8e9
2 changed files with 19 additions and 7 deletions
|
|
@ -29,6 +29,7 @@ where
|
|||
nr: NotReady<Mono, Task>,
|
||||
enable_interrupt: F1,
|
||||
pend_handler: F2,
|
||||
mono: &mut Mono,
|
||||
) where
|
||||
F1: FnOnce(),
|
||||
F2: FnOnce(),
|
||||
|
|
@ -46,7 +47,8 @@ where
|
|||
.unwrap_or(true);
|
||||
if if_heap_max_greater_than_nr {
|
||||
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE && is_empty {
|
||||
// mem::transmute::<_, SYST>(()).enable_interrupt();
|
||||
// mem::transmute::<_, SYST>(()).enable_interrupt();A
|
||||
mono.enable_timer();
|
||||
enable_interrupt();
|
||||
}
|
||||
|
||||
|
|
@ -108,6 +110,7 @@ where
|
|||
// The queue is empty, disable the interrupt.
|
||||
if Mono::DISABLE_INTERRUPT_ON_EMPTY_QUEUE {
|
||||
disable_interrupt();
|
||||
mono.disable_timer();
|
||||
}
|
||||
|
||||
None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue