pub struct Alternate<const AF: u8, OTYPE = PushPull> { /* private fields */ }Expand description
Mode: alternate function AF, routing the pin to a peripheral, driven as
OTYPE (PushPull or OpenDrain).
The output type is part of the mode because some peripherals accept only
one: I²C needs open-drain lines, and a push-pull pin there fights whoever
pulls the line low. Drivers bind to the type they need. Defaults to
PushPull.
Trait Implementations§
Auto Trait Implementations§
impl<const AF: u8, OTYPE> Freeze for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: Freeze,
impl<const AF: u8, OTYPE> RefUnwindSafe for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: RefUnwindSafe,
impl<const AF: u8, OTYPE> Send for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: Send,
impl<const AF: u8, OTYPE> Sync for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: Sync,
impl<const AF: u8, OTYPE> Unpin for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: Unpin,
impl<const AF: u8, OTYPE> UnsafeUnpin for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: UnsafeUnpin,
impl<const AF: u8, OTYPE> UnwindSafe for Alternate<AF, OTYPE>where
PhantomData<OTYPE>: 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