diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-nrf/src/egu.rs | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-nrf/src/egu.rs')
| -rw-r--r-- | embassy-nrf/src/egu.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/embassy-nrf/src/egu.rs b/embassy-nrf/src/egu.rs index 7f9abdac4..028396c7c 100644 --- a/embassy-nrf/src/egu.rs +++ b/embassy-nrf/src/egu.rs | |||
| @@ -7,20 +7,19 @@ | |||
| 7 | 7 | ||
| 8 | use core::marker::PhantomData; | 8 | use core::marker::PhantomData; |
| 9 | 9 | ||
| 10 | use embassy_hal_internal::into_ref; | 10 | use embassy_hal_internal::PeripheralType; |
| 11 | 11 | ||
| 12 | use crate::ppi::{Event, Task}; | 12 | use crate::ppi::{Event, Task}; |
| 13 | use crate::{interrupt, pac, Peripheral, PeripheralRef}; | 13 | use crate::{interrupt, pac, Peri}; |
| 14 | 14 | ||
| 15 | /// An instance of the EGU. | 15 | /// An instance of the EGU. |
| 16 | pub struct Egu<'d, T: Instance> { | 16 | pub struct Egu<'d, T: Instance> { |
| 17 | _p: PeripheralRef<'d, T>, | 17 | _p: Peri<'d, T>, |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | impl<'d, T: Instance> Egu<'d, T> { | 20 | impl<'d, T: Instance> Egu<'d, T> { |
| 21 | /// Create a new EGU instance. | 21 | /// Create a new EGU instance. |
| 22 | pub fn new(_p: impl Peripheral<P = T> + 'd) -> Self { | 22 | pub fn new(_p: Peri<'d, T>) -> Self { |
| 23 | into_ref!(_p); | ||
| 24 | Self { _p } | 23 | Self { _p } |
| 25 | } | 24 | } |
| 26 | 25 | ||
| @@ -39,7 +38,7 @@ pub(crate) trait SealedInstance { | |||
| 39 | 38 | ||
| 40 | /// Basic Egu instance. | 39 | /// Basic Egu instance. |
| 41 | #[allow(private_bounds)] | 40 | #[allow(private_bounds)] |
| 42 | pub trait Instance: Peripheral<P = Self> + SealedInstance + 'static + Send { | 41 | pub trait Instance: SealedInstance + PeripheralType + 'static + Send { |
| 43 | /// Interrupt for this peripheral. | 42 | /// Interrupt for this peripheral. |
| 44 | type Interrupt: interrupt::typelevel::Interrupt; | 43 | type Interrupt: interrupt::typelevel::Interrupt; |
| 45 | } | 44 | } |
