pub struct PD12<PT: PullType, PM: PinMode> { /* private fields */ }
Expand description
Pin
Implementations§
Source§impl<PT: PullType, PM: PinMode> PD12<PT, PM>
impl<PT: PullType, PM: PinMode> PD12<PT, PM>
Sourcepub fn downgrade(self) -> PDx<PT, PM>
pub fn downgrade(self) -> PDx<PT, PM>
Erases the pin number from the type
This is useful when you want to collect the pins into an array where you need all the elements to have the same type
Source§impl<PT: PullType, OT: OutputType, OS: OutputSpeed> PD12<PT, Output<OT, OS>>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> PD12<PT, Output<OT, OS>>
Sourcepub fn output_type<NOT: OutputType>(self, ot: NOT) -> PD12<PT, Output<NOT, OS>>
pub fn output_type<NOT: OutputType>(self, ot: NOT) -> PD12<PT, Output<NOT, OS>>
Set output type
Sourcepub fn open_drain(self) -> PD12<PT, Output<OpenDrain, OS>>
pub fn open_drain(self) -> PD12<PT, Output<OpenDrain, OS>>
Set output type to OpenDrain
Sourcepub fn output_speed<NOS: OutputSpeed>(
self,
os: NOS,
) -> PD12<PT, Output<OT, NOS>>
pub fn output_speed<NOS: OutputSpeed>( self, os: NOS, ) -> PD12<PT, Output<OT, NOS>>
Set output speed
Source§impl<PT: PullType, AFN: AltFnNum, OT: OutputType, OS: OutputSpeed> PD12<PT, AltFn<AFN, OT, OS>>
impl<PT: PullType, AFN: AltFnNum, OT: OutputType, OS: OutputSpeed> PD12<PT, AltFn<AFN, OT, OS>>
Sourcepub fn output_type<NOT: OutputType>(
self,
ot: NOT,
) -> PD12<PT, AltFn<AFN, NOT, OS>>
pub fn output_type<NOT: OutputType>( self, ot: NOT, ) -> PD12<PT, AltFn<AFN, NOT, OS>>
Set output type
Sourcepub fn output_speed<NOS: OutputSpeed>(
self,
os: NOS,
) -> PD12<PT, AltFn<AFN, OT, NOS>>
pub fn output_speed<NOS: OutputSpeed>( self, os: NOS, ) -> PD12<PT, AltFn<AFN, OT, NOS>>
Set output speed
Trait Implementations§
Source§impl<PT: PullType, OT: OutputType, OS: OutputSpeed> StatefulOutputPin for PD12<PT, Output<OT, OS>>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> StatefulOutputPin for PD12<PT, Output<OT, OS>>
Source§fn is_set_high(&self) -> bool
fn is_set_high(&self) -> bool
👎Deprecated since 0.2.2: Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
Is the pin in drive high mode? Read more
Source§fn is_set_low(&self) -> bool
fn is_set_low(&self) -> bool
👎Deprecated since 0.2.2: Deprecated because the methods cannot return errors. Users should use the traits in digital::v2.
Is the pin in drive low mode? Read more
Source§impl<PT: PullType> InputPin for PD12<PT, Input>
impl<PT: PullType> InputPin for PD12<PT, Input>
Source§impl<PT: PullType, AN: AltFnNum, OT: OutputType, OS: OutputSpeed> OutputPin for PD12<PT, AltFn<AN, OT, OS>>
impl<PT: PullType, AN: AltFnNum, OT: OutputType, OS: OutputSpeed> OutputPin for PD12<PT, AltFn<AN, OT, OS>>
Source§impl<PT: PullType, OT: OutputType, OS: OutputSpeed> OutputPin for PD12<PT, Output<OT, OS>>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> OutputPin for PD12<PT, Output<OT, OS>>
impl<PT: PullType, OT: OutputType, OS: OutputSpeed> Default for PD12<PT, Output<OT, OS>>
Auto Trait Implementations§
impl<PT, PM> Freeze for PD12<PT, PM>
impl<PT, PM> RefUnwindSafe for PD12<PT, PM>where
PT: RefUnwindSafe,
PM: RefUnwindSafe,
impl<PT, PM> Send for PD12<PT, PM>
impl<PT, PM> Sync for PD12<PT, PM>
impl<PT, PM> Unpin for PD12<PT, PM>
impl<PT, PM> UnwindSafe for PD12<PT, PM>where
PT: UnwindSafe,
PM: 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