diff options
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 | } |
