pub struct ErasedPin<MODE> { /* private fields */ }Expand description
A pin whose identity has moved into runtime values, keeping its mode.
Port and number become fields, so pins of different ports share a type and fit
in one array. MODE stays a type parameter — an ErasedPin<Input> still has
no set_high. One-way: the checks that need the exact pin have already run by
the time it is erased.
Implementations§
Source§impl<OTYPE> ErasedPin<Output<OTYPE>>
impl<OTYPE> ErasedPin<Output<OTYPE>>
Sourcepub fn is_set_high(&self) -> bool
pub fn is_set_high(&self) -> bool
Returns whether the pin is being driven high.
Reads back OCTL, i.e. what was last written, not what the wire is at —
for the latter on an open-drain pin see is_high.
Sourcepub fn is_set_low(&self) -> bool
pub fn is_set_low(&self) -> bool
Returns whether the pin is being driven low.
Trait Implementations§
Source§impl<OTYPE> StatefulOutputPin for ErasedPin<Output<OTYPE>>
impl<OTYPE> StatefulOutputPin for ErasedPin<Output<OTYPE>>
Auto Trait Implementations§
impl<MODE> Freeze for ErasedPin<MODE>where
PhantomData<MODE>: Freeze,
impl<MODE> RefUnwindSafe for ErasedPin<MODE>where
PhantomData<MODE>: RefUnwindSafe,
impl<MODE> Send for ErasedPin<MODE>where
PhantomData<MODE>: Send,
impl<MODE> Sync for ErasedPin<MODE>where
PhantomData<MODE>: Sync,
impl<MODE> Unpin for ErasedPin<MODE>where
PhantomData<MODE>: Unpin,
impl<MODE> UnsafeUnpin for ErasedPin<MODE>where
PhantomData<MODE>: UnsafeUnpin,
impl<MODE> UnwindSafe for ErasedPin<MODE>where
PhantomData<MODE>: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more