aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/ppi/mod.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2022-07-23 14:00:19 +0200
committerDario Nieuwenhuis <[email protected]>2022-07-23 14:00:19 +0200
commit4901c34d9c4cd326ab9bca02dd099a663da2567f (patch)
tree8225afebb595fb10c1d67148c0d19b7b732853da /embassy-nrf/src/ppi/mod.rs
parent8a9d2f59af004902d3978a2922843833b98bcce0 (diff)
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-nrf/src/ppi/mod.rs')
-rw-r--r--embassy-nrf/src/ppi/mod.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/embassy-nrf/src/ppi/mod.rs b/embassy-nrf/src/ppi/mod.rs
index fd1d0cf8c..796de2170 100644
--- a/embassy-nrf/src/ppi/mod.rs
+++ b/embassy-nrf/src/ppi/mod.rs
@@ -17,9 +17,9 @@
17 17
18use core::ptr::NonNull; 18use core::ptr::NonNull;
19 19
20use embassy_hal_common::{impl_unborrow, Unborrowed}; 20use embassy_hal_common::{impl_peripheral, PeripheralRef};
21 21
22use crate::{peripherals, Unborrow}; 22use crate::{peripherals, Peripheral};
23 23
24#[cfg(feature = "_dppi")] 24#[cfg(feature = "_dppi")]
25mod dppi; 25mod dppi;
@@ -27,7 +27,7 @@ mod dppi;
27mod ppi; 27mod ppi;
28 28
29pub struct Ppi<'d, C: Channel, const EVENT_COUNT: usize, const TASK_COUNT: usize> { 29pub struct Ppi<'d, C: Channel, const EVENT_COUNT: usize, const TASK_COUNT: usize> {
30 ch: Unborrowed<'d, C>, 30 ch: PeripheralRef<'d, C>,
31 #[cfg(feature = "_dppi")] 31 #[cfg(feature = "_dppi")]
32 events: [Event; EVENT_COUNT], 32 events: [Event; EVENT_COUNT],
33 #[cfg(feature = "_dppi")] 33 #[cfg(feature = "_dppi")]
@@ -87,7 +87,7 @@ pub(crate) mod sealed {
87 pub trait Group {} 87 pub trait Group {}
88} 88}
89 89
90pub trait Channel: sealed::Channel + Unborrow<Target = Self> + Sized { 90pub trait Channel: sealed::Channel + Peripheral<P = Self> + Sized {
91 /// Returns the number of the channel 91 /// Returns the number of the channel
92 fn number(&self) -> usize; 92 fn number(&self) -> usize;
93} 93}
@@ -117,7 +117,7 @@ pub trait Group: sealed::Group + Sized {
117pub struct AnyStaticChannel { 117pub struct AnyStaticChannel {
118 pub(crate) number: u8, 118 pub(crate) number: u8,
119} 119}
120impl_unborrow!(AnyStaticChannel); 120impl_peripheral!(AnyStaticChannel);
121impl sealed::Channel for AnyStaticChannel {} 121impl sealed::Channel for AnyStaticChannel {}
122impl Channel for AnyStaticChannel { 122impl Channel for AnyStaticChannel {
123 fn number(&self) -> usize { 123 fn number(&self) -> usize {
@@ -135,7 +135,7 @@ impl StaticChannel for AnyStaticChannel {
135pub struct AnyConfigurableChannel { 135pub struct AnyConfigurableChannel {
136 pub(crate) number: u8, 136 pub(crate) number: u8,
137} 137}
138impl_unborrow!(AnyConfigurableChannel); 138impl_peripheral!(AnyConfigurableChannel);
139impl sealed::Channel for AnyConfigurableChannel {} 139impl sealed::Channel for AnyConfigurableChannel {}
140impl Channel for AnyConfigurableChannel { 140impl Channel for AnyConfigurableChannel {
141 fn number(&self) -> usize { 141 fn number(&self) -> usize {
@@ -187,7 +187,7 @@ macro_rules! impl_ppi_channel {
187pub struct AnyGroup { 187pub struct AnyGroup {
188 number: u8, 188 number: u8,
189} 189}
190impl_unborrow!(AnyGroup); 190impl_peripheral!(AnyGroup);
191impl sealed::Group for AnyGroup {} 191impl sealed::Group for AnyGroup {}
192impl Group for AnyGroup { 192impl Group for AnyGroup {
193 fn number(&self) -> usize { 193 fn number(&self) -> usize {