diff options
author | 2021-02-22 20:59:03 +0100 | |
---|---|---|
committer | 2021-02-22 20:59:03 +0100 | |
commit | 82d051e8e967522af735fff47a1738ce4952f950 (patch) | |
tree | c4e921ef5d6203e732b8ec7a0b25b3ad42d05066 /src | |
parent | e52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f (diff) | |
download | rtic-82d051e8e967522af735fff47a1738ce4952f950.tar.gz rtic-82d051e8e967522af735fff47a1738ce4952f950.tar.zst rtic-82d051e8e967522af735fff47a1738ce4952f950.zip |
Added enable/disable timer calls
Diffstat (limited to 'src')
-rw-r--r-- | src/tq.rs | 5 |
1 files changed, 4 insertions, 1 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 |