diff options
Diffstat (limited to 'embassy-hal-internal/src/peripheral.rs')
| -rw-r--r-- | embassy-hal-internal/src/peripheral.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/embassy-hal-internal/src/peripheral.rs b/embassy-hal-internal/src/peripheral.rs index 16d49edfb..f03f41507 100644 --- a/embassy-hal-internal/src/peripheral.rs +++ b/embassy-hal-internal/src/peripheral.rs | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | use core::marker::PhantomData; | 1 | use core::marker::PhantomData; |
| 2 | use core::ops::{Deref, DerefMut}; | 2 | use core::ops::Deref; |
| 3 | 3 | ||
| 4 | /// An exclusive reference to a peripheral. | 4 | /// An exclusive reference to a peripheral. |
| 5 | /// | 5 | /// |
| @@ -86,13 +86,6 @@ impl<'a, T> Deref for PeripheralRef<'a, T> { | |||
| 86 | } | 86 | } |
| 87 | } | 87 | } |
| 88 | 88 | ||
| 89 | impl<'a, T> DerefMut for PeripheralRef<'a, T> { | ||
| 90 | #[inline] | ||
| 91 | fn deref_mut(&mut self) -> &mut Self::Target { | ||
| 92 | &mut self.inner | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 96 | /// Trait for any type that can be used as a peripheral of type `P`. | 89 | /// Trait for any type that can be used as a peripheral of type `P`. |
| 97 | /// | 90 | /// |
| 98 | /// This is used in driver constructors, to allow passing either owned peripherals (e.g. `TWISPI0`), | 91 | /// This is used in driver constructors, to allow passing either owned peripherals (e.g. `TWISPI0`), |
| @@ -162,7 +155,7 @@ pub trait Peripheral: Sized { | |||
| 162 | } | 155 | } |
| 163 | } | 156 | } |
| 164 | 157 | ||
| 165 | impl<'b, T: DerefMut> Peripheral for T | 158 | impl<'b, T: Deref> Peripheral for T |
| 166 | where | 159 | where |
| 167 | T::Target: Peripheral, | 160 | T::Target: Peripheral, |
| 168 | { | 161 | { |
