aboutsummaryrefslogtreecommitdiff
path: root/embassy-nrf/src/egu.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-03-26 16:01:37 +0100
committerDario Nieuwenhuis <[email protected]>2025-03-27 15:18:06 +0100
commitd41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch)
tree678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-nrf/src/egu.rs
parent9edf5b7f049f95742b60b041e4443967d8a6b708 (diff)
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-nrf/src/egu.rs')
-rw-r--r--embassy-nrf/src/egu.rs11
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
8use core::marker::PhantomData; 8use core::marker::PhantomData;
9 9
10use embassy_hal_internal::into_ref; 10use embassy_hal_internal::PeripheralType;
11 11
12use crate::ppi::{Event, Task}; 12use crate::ppi::{Event, Task};
13use crate::{interrupt, pac, Peripheral, PeripheralRef}; 13use crate::{interrupt, pac, Peri};
14 14
15/// An instance of the EGU. 15/// An instance of the EGU.
16pub struct Egu<'d, T: Instance> { 16pub struct Egu<'d, T: Instance> {
17 _p: PeripheralRef<'d, T>, 17 _p: Peri<'d, T>,
18} 18}
19 19
20impl<'d, T: Instance> Egu<'d, T> { 20impl<'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)]
42pub trait Instance: Peripheral<P = Self> + SealedInstance + 'static + Send { 41pub 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}