diff options
Diffstat (limited to 'embassy-nrf/src/time_driver.rs')
| -rw-r--r-- | embassy-nrf/src/time_driver.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/embassy-nrf/src/time_driver.rs b/embassy-nrf/src/time_driver.rs index 4feff8a75..f1ab4f8fd 100644 --- a/embassy-nrf/src/time_driver.rs +++ b/embassy-nrf/src/time_driver.rs | |||
| @@ -7,7 +7,7 @@ use embassy_sync::blocking_mutex::raw::CriticalSectionRawMutex; | |||
| 7 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; | 7 | use embassy_sync::blocking_mutex::CriticalSectionMutex as Mutex; |
| 8 | use embassy_time::driver::{AlarmHandle, Driver}; | 8 | use embassy_time::driver::{AlarmHandle, Driver}; |
| 9 | 9 | ||
| 10 | use crate::interrupt::Interrupt; | 10 | use crate::interrupt::InterruptExt; |
| 11 | use crate::{interrupt, pac}; | 11 | use crate::{interrupt, pac}; |
| 12 | 12 | ||
| 13 | fn rtc() -> &'static pac::rtc0::RegisterBlock { | 13 | fn rtc() -> &'static pac::rtc0::RegisterBlock { |
| @@ -142,8 +142,8 @@ impl RtcDriver { | |||
| 142 | // Wait for clear | 142 | // Wait for clear |
| 143 | while r.counter.read().bits() != 0 {} | 143 | while r.counter.read().bits() != 0 {} |
| 144 | 144 | ||
| 145 | interrupt::RTC1::set_priority(irq_prio); | 145 | interrupt::RTC1.set_priority(irq_prio); |
| 146 | unsafe { interrupt::RTC1::enable() }; | 146 | unsafe { interrupt::RTC1.enable() }; |
| 147 | } | 147 | } |
| 148 | 148 | ||
| 149 | fn on_interrupt(&self) { | 149 | fn on_interrupt(&self) { |
| @@ -295,6 +295,7 @@ impl Driver for RtcDriver { | |||
| 295 | } | 295 | } |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | #[cfg(feature = "rt")] | ||
| 298 | #[interrupt] | 299 | #[interrupt] |
| 299 | fn RTC1() { | 300 | fn RTC1() { |
| 300 | DRIVER.on_interrupt() | 301 | DRIVER.on_interrupt() |
