diff options
| author | Ulf Lilleengen <[email protected]> | 2024-01-24 20:19:34 +0100 |
|---|---|---|
| committer | Ulf Lilleengen <[email protected]> | 2024-01-24 21:23:54 +0100 |
| commit | db0f4a0b91cc89aef58a6345743fb51ffe1be3a4 (patch) | |
| tree | ee5c17d87b7d7ab20c853dcfa89512bffdecd9e4 | |
| parent | 85d7779668ce14abbde4cd8fb1ea9395df529206 (diff) | |
cleanup
| -rw-r--r-- | embassy-nrf/src/chips/nrf51.rs | 8 | ||||
| -rw-r--r-- | embassy-nrf/src/ppi/mod.rs | 1 | ||||
| -rw-r--r-- | embassy-nrf/src/ppi/ppi.rs | 4 |
3 files changed, 8 insertions, 5 deletions
diff --git a/embassy-nrf/src/chips/nrf51.rs b/embassy-nrf/src/chips/nrf51.rs index f5db4b847..e7147ac93 100644 --- a/embassy-nrf/src/chips/nrf51.rs +++ b/embassy-nrf/src/chips/nrf51.rs | |||
| @@ -102,9 +102,11 @@ embassy_hal_internal::peripherals! { | |||
| 102 | TEMP, | 102 | TEMP, |
| 103 | } | 103 | } |
| 104 | 104 | ||
| 105 | // impl_timer!(TIMER0, TIMER0, TIMER0); | 105 | impl_timer!(TIMER0, TIMER0, TIMER0); |
| 106 | // impl_timer!(TIMER1, TIMER1, TIMER1); | 106 | impl_timer!(TIMER1, TIMER1, TIMER1); |
| 107 | // impl_timer!(TIMER2, TIMER2, TIMER2); | 107 | impl_timer!(TIMER2, TIMER2, TIMER2); |
| 108 | |||
| 109 | impl_rng!(RNG, RNG, RNG); | ||
| 108 | 110 | ||
| 109 | impl_pin!(P0_00, 0, 0); | 111 | impl_pin!(P0_00, 0, 0); |
| 110 | impl_pin!(P0_01, 0, 1); | 112 | impl_pin!(P0_01, 0, 1); |
diff --git a/embassy-nrf/src/ppi/mod.rs b/embassy-nrf/src/ppi/mod.rs index 5b4a64388..f5764b8b7 100644 --- a/embassy-nrf/src/ppi/mod.rs +++ b/embassy-nrf/src/ppi/mod.rs | |||
| @@ -284,6 +284,7 @@ impl ConfigurableChannel for AnyConfigurableChannel { | |||
| 284 | } | 284 | } |
| 285 | } | 285 | } |
| 286 | 286 | ||
| 287 | #[cfg(not(feature = "nrf51"))] | ||
| 287 | macro_rules! impl_ppi_channel { | 288 | macro_rules! impl_ppi_channel { |
| 288 | ($type:ident, $number:expr) => { | 289 | ($type:ident, $number:expr) => { |
| 289 | impl crate::ppi::sealed::Channel for peripherals::$type {} | 290 | impl crate::ppi::sealed::Channel for peripherals::$type {} |
diff --git a/embassy-nrf/src/ppi/ppi.rs b/embassy-nrf/src/ppi/ppi.rs index 4a12764ad..8ff52ece3 100644 --- a/embassy-nrf/src/ppi/ppi.rs +++ b/embassy-nrf/src/ppi/ppi.rs | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | use embassy_hal_internal::into_ref; | 1 | use embassy_hal_internal::into_ref; |
| 2 | 2 | ||
| 3 | use super::{Channel, ConfigurableChannel, Event, Ppi, StaticChannel, Task}; | 3 | use super::{Channel, ConfigurableChannel, Event, Ppi, Task}; |
| 4 | use crate::{pac, Peripheral}; | 4 | use crate::{pac, Peripheral}; |
| 5 | 5 | ||
| 6 | impl<'d> Task<'d> { | 6 | impl<'d> Task<'d> { |
| @@ -19,7 +19,7 @@ pub(crate) fn regs() -> &'static pac::ppi::RegisterBlock { | |||
| 19 | } | 19 | } |
| 20 | 20 | ||
| 21 | #[cfg(not(feature = "nrf51"))] // Not for nrf51 because of the fork task | 21 | #[cfg(not(feature = "nrf51"))] // Not for nrf51 because of the fork task |
| 22 | impl<'d, C: StaticChannel> Ppi<'d, C, 0, 1> { | 22 | impl<'d, C: super::StaticChannel> Ppi<'d, C, 0, 1> { |
| 23 | /// Configure PPI channel to trigger `task`. | 23 | /// Configure PPI channel to trigger `task`. |
| 24 | pub fn new_zero_to_one(ch: impl Peripheral<P = C> + 'd, task: Task) -> Self { | 24 | pub fn new_zero_to_one(ch: impl Peripheral<P = C> + 'd, task: Task) -> Self { |
| 25 | into_ref!(ch); | 25 | into_ref!(ch); |
