diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-03-29 00:44:11 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-03-29 00:58:58 +0200 |
| commit | b9e709403d8073861ae9f5010ddf2cfa6d90f41e (patch) | |
| tree | 07472806cff0688f193425bf57188062264decc4 /embassy-nrf/src/timer.rs | |
| parent | 48cf1f6ebf0906de1b043b7e6213a0f6ec70b207 (diff) | |
nrf: better macro naming.
Diffstat (limited to 'embassy-nrf/src/timer.rs')
| -rw-r--r-- | embassy-nrf/src/timer.rs | 14 |
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 | } |
| 17 | pub trait ExtendedInstance: Instance + sealed::ExtendedInstance {} | 17 | pub trait ExtendedInstance: Instance + sealed::ExtendedInstance {} |
| 18 | 18 | ||
| 19 | macro_rules! make_impl { | 19 | macro_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 | ||
| 37 | make_impl!(TIMER0, TIMER0); | 37 | impl_instance!(TIMER0, TIMER0); |
| 38 | make_impl!(TIMER1, TIMER1); | 38 | impl_instance!(TIMER1, TIMER1); |
| 39 | make_impl!(TIMER2, TIMER2); | 39 | impl_instance!(TIMER2, TIMER2); |
| 40 | #[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] | 40 | #[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] |
| 41 | make_impl!(TIMER3, TIMER3, extended); | 41 | impl_instance!(TIMER3, TIMER3, extended); |
| 42 | #[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] | 42 | #[cfg(any(feature = "52832", feature = "52833", feature = "52840"))] |
| 43 | make_impl!(TIMER4, TIMER4, extended); | 43 | impl_instance!(TIMER4, TIMER4, extended); |
