From 2c2c284482ee57595ad4eef542f4867f6f87bf12 Mon Sep 17 00:00:00 2001 From: Dion Dokter Date: Tue, 12 Oct 2021 11:43:57 +0200 Subject: Undoing unnecessary changes --- embassy-nrf/src/timer.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'embassy-nrf/src/timer.rs') diff --git a/embassy-nrf/src/timer.rs b/embassy-nrf/src/timer.rs index 066609ec6..5690ff0d8 100644 --- a/embassy-nrf/src/timer.rs +++ b/embassy-nrf/src/timer.rs @@ -15,11 +15,6 @@ use crate::pac; use crate::ppi::Event; use crate::ppi::Task; -#[cfg(not(feature = "nrf9160"))] -pub(crate) use pac::timer0; -#[cfg(feature = "nrf9160")] -pub(crate) use pac::timer0_ns as timer0; - pub(crate) mod sealed { use super::*; @@ -27,7 +22,7 @@ pub(crate) mod sealed { pub trait Instance { /// The number of CC registers this instance has. const CCS: usize; - fn regs() -> &'static timer0::RegisterBlock; + fn regs() -> &'static pac::timer0::RegisterBlock; /// Storage for the waker for CC register `n`. fn waker(n: usize) -> &'static AtomicWaker; } @@ -45,8 +40,8 @@ macro_rules! impl_timer { ($type:ident, $pac_type:ident, $irq:ident, $ccs:literal) => { impl crate::timer::sealed::Instance for peripherals::$type { const CCS: usize = $ccs; - fn regs() -> &'static crate::timer::timer0::RegisterBlock { - unsafe { &*(pac::$pac_type::ptr() as *const crate::timer::timer0::RegisterBlock) } + fn regs() -> &'static pac::timer0::RegisterBlock { + unsafe { &*(pac::$pac_type::ptr() as *const pac::timer0::RegisterBlock) } } fn waker(n: usize) -> &'static ::embassy::waitqueue::AtomicWaker { use ::embassy::waitqueue::AtomicWaker; -- cgit