diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-23 14:00:19 +0200 |
| commit | 4901c34d9c4cd326ab9bca02dd099a663da2567f (patch) | |
| tree | 8225afebb595fb10c1d67148c0d19b7b732853da /embassy-nrf/src/ppi/mod.rs | |
| parent | 8a9d2f59af004902d3978a2922843833b98bcce0 (diff) | |
Rename Unborrowed -> PeripheralRef, Unborrow -> Peripheral
Diffstat (limited to 'embassy-nrf/src/ppi/mod.rs')
| -rw-r--r-- | embassy-nrf/src/ppi/mod.rs | 14 |
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 | ||
| 18 | use core::ptr::NonNull; | 18 | use core::ptr::NonNull; |
| 19 | 19 | ||
| 20 | use embassy_hal_common::{impl_unborrow, Unborrowed}; | 20 | use embassy_hal_common::{impl_peripheral, PeripheralRef}; |
| 21 | 21 | ||
| 22 | use crate::{peripherals, Unborrow}; | 22 | use crate::{peripherals, Peripheral}; |
| 23 | 23 | ||
| 24 | #[cfg(feature = "_dppi")] | 24 | #[cfg(feature = "_dppi")] |
| 25 | mod dppi; | 25 | mod dppi; |
| @@ -27,7 +27,7 @@ mod dppi; | |||
| 27 | mod ppi; | 27 | mod ppi; |
| 28 | 28 | ||
| 29 | pub struct Ppi<'d, C: Channel, const EVENT_COUNT: usize, const TASK_COUNT: usize> { | 29 | pub 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 | ||
| 90 | pub trait Channel: sealed::Channel + Unborrow<Target = Self> + Sized { | 90 | pub 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 { | |||
| 117 | pub struct AnyStaticChannel { | 117 | pub struct AnyStaticChannel { |
| 118 | pub(crate) number: u8, | 118 | pub(crate) number: u8, |
| 119 | } | 119 | } |
| 120 | impl_unborrow!(AnyStaticChannel); | 120 | impl_peripheral!(AnyStaticChannel); |
| 121 | impl sealed::Channel for AnyStaticChannel {} | 121 | impl sealed::Channel for AnyStaticChannel {} |
| 122 | impl Channel for AnyStaticChannel { | 122 | impl Channel for AnyStaticChannel { |
| 123 | fn number(&self) -> usize { | 123 | fn number(&self) -> usize { |
| @@ -135,7 +135,7 @@ impl StaticChannel for AnyStaticChannel { | |||
| 135 | pub struct AnyConfigurableChannel { | 135 | pub struct AnyConfigurableChannel { |
| 136 | pub(crate) number: u8, | 136 | pub(crate) number: u8, |
| 137 | } | 137 | } |
| 138 | impl_unborrow!(AnyConfigurableChannel); | 138 | impl_peripheral!(AnyConfigurableChannel); |
| 139 | impl sealed::Channel for AnyConfigurableChannel {} | 139 | impl sealed::Channel for AnyConfigurableChannel {} |
| 140 | impl Channel for AnyConfigurableChannel { | 140 | impl Channel for AnyConfigurableChannel { |
| 141 | fn number(&self) -> usize { | 141 | fn number(&self) -> usize { |
| @@ -187,7 +187,7 @@ macro_rules! impl_ppi_channel { | |||
| 187 | pub struct AnyGroup { | 187 | pub struct AnyGroup { |
| 188 | number: u8, | 188 | number: u8, |
| 189 | } | 189 | } |
| 190 | impl_unborrow!(AnyGroup); | 190 | impl_peripheral!(AnyGroup); |
| 191 | impl sealed::Group for AnyGroup {} | 191 | impl sealed::Group for AnyGroup {} |
| 192 | impl Group for AnyGroup { | 192 | impl Group for AnyGroup { |
| 193 | fn number(&self) -> usize { | 193 | fn number(&self) -> usize { |
