diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-03-11 20:12:00 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-11 20:12:00 +0000 |
| commit | dd899ab77f3d95ebb04fb8b02eadf6275d7524ac (patch) | |
| tree | a7d9a606e223463c0f122b38e3884b5298f9f261 /rtic-monotonics/src/rp2040.rs | |
| parent | 7c7d6558f6d9c50fbb4d2487c98c9a5be15f2f7b (diff) | |
| parent | 19bab47bba8f8a4f5dd3255bb7ad37bf1597b02d (diff) | |
Merge #701
701: rtic-monotonics: Unmask the RP2040 timer r=AfoHT a=korken89
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'rtic-monotonics/src/rp2040.rs')
| -rw-r--r-- | rtic-monotonics/src/rp2040.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rtic-monotonics/src/rp2040.rs b/rtic-monotonics/src/rp2040.rs index e42c148..6599dc6 100644 --- a/rtic-monotonics/src/rp2040.rs +++ b/rtic-monotonics/src/rp2040.rs @@ -4,7 +4,7 @@ use super::Monotonic; pub use super::{TimeoutError, TimerQueue}; use core::future::Future; pub use fugit::ExtU64; -use rp2040_pac::{timer, Interrupt, RESETS, TIMER}; +use rp2040_pac::{timer, Interrupt, NVIC, RESETS, TIMER}; /// Timer implementing `rtic_monotonic::Monotonic` which runs at 1 MHz. pub struct Timer; @@ -17,6 +17,8 @@ impl Timer { timer.inte.modify(|_, w| w.alarm_0().set_bit()); TIMER_QUEUE.initialize(Self {}); + + unsafe { NVIC::unmask(Interrupt::TIMER_IRQ_0) }; } fn timer() -> &'static timer::RegisterBlock { |
