aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2024-01-24 20:19:34 +0100
committerUlf Lilleengen <[email protected]>2024-01-24 21:23:54 +0100
commitdb0f4a0b91cc89aef58a6345743fb51ffe1be3a4 (patch)
treeee5c17d87b7d7ab20c853dcfa89512bffdecd9e4 /embassy-nrf/src
parent85d7779668ce14abbde4cd8fb1ea9395df529206 (diff)
cleanup
Diffstat (limited to 'embassy-nrf/src')
-rw-r--r--embassy-nrf/src/chips/nrf51.rs8
-rw-r--r--embassy-nrf/src/ppi/mod.rs1
-rw-r--r--embassy-nrf/src/ppi/ppi.rs4
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); 105impl_timer!(TIMER0, TIMER0, TIMER0);
106// impl_timer!(TIMER1, TIMER1, TIMER1); 106impl_timer!(TIMER1, TIMER1, TIMER1);
107// impl_timer!(TIMER2, TIMER2, TIMER2); 107impl_timer!(TIMER2, TIMER2, TIMER2);
108
109impl_rng!(RNG, RNG, RNG);
108 110
109impl_pin!(P0_00, 0, 0); 111impl_pin!(P0_00, 0, 0);
110impl_pin!(P0_01, 0, 1); 112impl_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"))]
287macro_rules! impl_ppi_channel { 288macro_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 @@
1use embassy_hal_internal::into_ref; 1use embassy_hal_internal::into_ref;
2 2
3use super::{Channel, ConfigurableChannel, Event, Ppi, StaticChannel, Task}; 3use super::{Channel, ConfigurableChannel, Event, Ppi, Task};
4use crate::{pac, Peripheral}; 4use crate::{pac, Peripheral};
5 5
6impl<'d> Task<'d> { 6impl<'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
22impl<'d, C: StaticChannel> Ppi<'d, C, 0, 1> { 22impl<'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);