diff options
| author | Dion Dokter <[email protected]> | 2021-10-12 11:43:57 +0200 |
|---|---|---|
| committer | Dion Dokter <[email protected]> | 2021-10-12 11:55:38 +0200 |
| commit | 2c2c284482ee57595ad4eef542f4867f6f87bf12 (patch) | |
| tree | 68a5fac20355ad7451a4e10d82f396573942e7f8 /embassy-nrf/src/timer.rs | |
| parent | 995cd01cbcb2470b9ecdd953daae0cfb3aaa2e99 (diff) | |
Undoing unnecessary changes
Diffstat (limited to 'embassy-nrf/src/timer.rs')
| -rw-r--r-- | embassy-nrf/src/timer.rs | 11 |
1 files changed, 3 insertions, 8 deletions
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; | |||
| 15 | use crate::ppi::Event; | 15 | use crate::ppi::Event; |
| 16 | use crate::ppi::Task; | 16 | use crate::ppi::Task; |
| 17 | 17 | ||
| 18 | #[cfg(not(feature = "nrf9160"))] | ||
| 19 | pub(crate) use pac::timer0; | ||
| 20 | #[cfg(feature = "nrf9160")] | ||
| 21 | pub(crate) use pac::timer0_ns as timer0; | ||
| 22 | |||
| 23 | pub(crate) mod sealed { | 18 | pub(crate) mod sealed { |
| 24 | 19 | ||
| 25 | use super::*; | 20 | use super::*; |
| @@ -27,7 +22,7 @@ pub(crate) mod sealed { | |||
| 27 | pub trait Instance { | 22 | pub trait Instance { |
| 28 | /// The number of CC registers this instance has. | 23 | /// The number of CC registers this instance has. |
| 29 | const CCS: usize; | 24 | const CCS: usize; |
| 30 | fn regs() -> &'static timer0::RegisterBlock; | 25 | fn regs() -> &'static pac::timer0::RegisterBlock; |
| 31 | /// Storage for the waker for CC register `n`. | 26 | /// Storage for the waker for CC register `n`. |
| 32 | fn waker(n: usize) -> &'static AtomicWaker; | 27 | fn waker(n: usize) -> &'static AtomicWaker; |
| 33 | } | 28 | } |
| @@ -45,8 +40,8 @@ macro_rules! impl_timer { | |||
| 45 | ($type:ident, $pac_type:ident, $irq:ident, $ccs:literal) => { | 40 | ($type:ident, $pac_type:ident, $irq:ident, $ccs:literal) => { |
| 46 | impl crate::timer::sealed::Instance for peripherals::$type { | 41 | impl crate::timer::sealed::Instance for peripherals::$type { |
| 47 | const CCS: usize = $ccs; | 42 | const CCS: usize = $ccs; |
| 48 | fn regs() -> &'static crate::timer::timer0::RegisterBlock { | 43 | fn regs() -> &'static pac::timer0::RegisterBlock { |
| 49 | unsafe { &*(pac::$pac_type::ptr() as *const crate::timer::timer0::RegisterBlock) } | 44 | unsafe { &*(pac::$pac_type::ptr() as *const pac::timer0::RegisterBlock) } |
| 50 | } | 45 | } |
| 51 | fn waker(n: usize) -> &'static ::embassy::waitqueue::AtomicWaker { | 46 | fn waker(n: usize) -> &'static ::embassy::waitqueue::AtomicWaker { |
| 52 | use ::embassy::waitqueue::AtomicWaker; | 47 | use ::embassy::waitqueue::AtomicWaker; |
