aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/timer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-nrf/src/timer.rs')
-rw-r--r--embassy-nrf/src/timer.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-nrf/src/timer.rs b/embassy-nrf/src/timer.rs
index 6307a15ee..d74e3cfad 100644
--- a/embassy-nrf/src/timer.rs
+++ b/embassy-nrf/src/timer.rs
@@ -16,7 +16,7 @@ pub trait Instance: sealed::Instance + 'static {
16} 16}
17pub trait ExtendedInstance: Instance + sealed::ExtendedInstance {} 17pub trait ExtendedInstance: Instance + sealed::ExtendedInstance {}
18 18
19macro_rules! make_impl { 19macro_rules! impl_instance {
20 ($type:ident, $irq:ident) => { 20 ($type:ident, $irq:ident) => {
21 impl sealed::Instance for peripherals::$type { 21 impl sealed::Instance for peripherals::$type {
22 fn regs(&self) -> &pac::timer0::RegisterBlock { 22 fn regs(&self) -> &pac::timer0::RegisterBlock {
@@ -28,16 +28,16 @@ macro_rules! make_impl {
28 } 28 }
29 }; 29 };
30 ($type:ident, $irq:ident, extended) => { 30 ($type:ident, $irq:ident, extended) => {
31 make_impl!($type, $irq); 31 impl_instance!($type, $irq);
32 impl sealed::ExtendedInstance for peripherals::$type {} 32 impl sealed::ExtendedInstance for peripherals::$type {}
33 impl ExtendedInstance for peripherals::$type {} 33 impl ExtendedInstance for peripherals::$type {}
34 }; 34 };
35} 35}
36 36
37make_impl!(TIMER0, TIMER0); 37impl_instance!(TIMER0, TIMER0);
38make_impl!(TIMER1, TIMER1); 38impl_instance!(TIMER1, TIMER1);
39make_impl!(TIMER2, TIMER2); 39impl_instance!(TIMER2, TIMER2);
40#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] 40#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
41make_impl!(TIMER3, TIMER3, extended); 41impl_instance!(TIMER3, TIMER3, extended);
42#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] 42#[cfg(any(feature = "52832", feature = "52833", feature = "52840"))]
43make_impl!(TIMER4, TIMER4, extended); 43impl_instance!(TIMER4, TIMER4, extended);