Skip to content

Commit

Permalink
Add missing PeripheralRef impl
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Oct 12, 2024
1 parent 4afb9db commit 7386ec0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions esp-hal/src/peripheral.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,16 @@ where
}

impl<T> crate::private::Sealed for &mut T where T: crate::private::Sealed {}
impl<T> crate::private::Sealed for PeripheralRef<'_, T> where T: crate::private::Sealed {}

impl<T: Peripheral> Peripheral for PeripheralRef<'_, T> {
type P = T::P;

#[inline]
unsafe fn clone_unchecked(&self) -> Self::P {
T::clone_unchecked(self)
}
}

mod peripheral_macros {
#[doc(hidden)]
Expand Down

0 comments on commit 7386ec0

Please sign in to comment.