diff options
Diffstat (limited to 'examples/nrf52840_blinky/src/bin/blinky_rtc.rs')
| -rw-r--r-- | examples/nrf52840_blinky/src/bin/blinky_rtc.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/examples/nrf52840_blinky/src/bin/blinky_rtc.rs b/examples/nrf52840_blinky/src/bin/blinky_rtc.rs index dbdd0b0..fa654b8 100644 --- a/examples/nrf52840_blinky/src/bin/blinky_rtc.rs +++ b/examples/nrf52840_blinky/src/bin/blinky_rtc.rs @@ -5,6 +5,9 @@ use nrf52840_blinky::hal; +use rtic_monotonics::nrf::rtc::prelude::*; +nrf_rtc0_monotonic!(Mono); + #[rtic::app(device = hal::pac, dispatchers = [SWI0_EGU0])] mod app { use super::*; @@ -12,10 +15,6 @@ mod app { use hal::gpio::{Level, Output, Pin, PushPull}; use hal::prelude::*; - use rtic_monotonics::nrf::rtc::Rtc0 as Mono; - use rtic_monotonics::nrf::rtc::*; - use rtic_monotonics::Monotonic; - #[shared] struct Shared {} @@ -30,8 +29,7 @@ mod app { hal::clocks::Clocks::new(cx.device.CLOCK).start_lfclk(); // Initialize Monotonic - let token = rtic_monotonics::create_nrf_rtc0_monotonic_token!(); - Mono::start(cx.device.RTC0, token); + Mono::start(cx.device.RTC0); // Setup LED let port0 = hal::gpio::p0::Parts::new(cx.device.P0); |
