mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Merge #701
701: rtic-monotonics: Unmask the RP2040 timer r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
This commit is contained in:
commit
dd899ab77f
2 changed files with 5 additions and 1 deletions
|
@ -13,4 +13,6 @@ For each category, *Added*, *Changed*, *Fixed* add new entries at the top!
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Unmask the `rp2040` interrupt
|
||||||
|
|
||||||
## [v1.0.0] - 2023-xx-xx
|
## [v1.0.0] - 2023-xx-xx
|
||||||
|
|
|
@ -4,7 +4,7 @@ use super::Monotonic;
|
||||||
pub use super::{TimeoutError, TimerQueue};
|
pub use super::{TimeoutError, TimerQueue};
|
||||||
use core::future::Future;
|
use core::future::Future;
|
||||||
pub use fugit::ExtU64;
|
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.
|
/// Timer implementing `rtic_monotonic::Monotonic` which runs at 1 MHz.
|
||||||
pub struct Timer;
|
pub struct Timer;
|
||||||
|
@ -17,6 +17,8 @@ impl Timer {
|
||||||
timer.inte.modify(|_, w| w.alarm_0().set_bit());
|
timer.inte.modify(|_, w| w.alarm_0().set_bit());
|
||||||
|
|
||||||
TIMER_QUEUE.initialize(Self {});
|
TIMER_QUEUE.initialize(Self {});
|
||||||
|
|
||||||
|
unsafe { NVIC::unmask(Interrupt::TIMER_IRQ_0) };
|
||||||
}
|
}
|
||||||
|
|
||||||
fn timer() -> &'static timer::RegisterBlock {
|
fn timer() -> &'static timer::RegisterBlock {
|
||||||
|
|
Loading…
Reference in a new issue