pub struct PB12<MODE> { /* private fields */ }
Expand description
Pin
Implementations
sourceimpl<MODE: PinMode> PB12<MODE>
impl<MODE: PinMode> PB12<MODE>
sourcepub fn into_floating_input(self) -> PB12<Input<Floating>>
pub fn into_floating_input(self) -> PB12<Input<Floating>>
Configures the pin to operate as a floating input pin.
sourcepub fn with_floating_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<Floating>>) -> R
) -> R
pub fn with_floating_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<Floating>>) -> R
) -> R
Temporarily configures this pin as a floating input.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
sourcepub fn into_pull_down_input(self) -> PB12<Input<PullDown>>
pub fn into_pull_down_input(self) -> PB12<Input<PullDown>>
Configures the pin to operate as a pulled-down input pin.
sourcepub fn with_pull_down_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<PullDown>>) -> R
) -> R
pub fn with_pull_down_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<PullDown>>) -> R
) -> R
Temporarily configures this pin as a pulled-down input.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
sourcepub fn into_pull_up_input(self) -> PB12<Input<PullUp>>
pub fn into_pull_up_input(self) -> PB12<Input<PullUp>>
Configures the pin to operate as a pulled-up input pin.
sourcepub fn with_pull_up_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<PullUp>>) -> R
) -> R
pub fn with_pull_up_input<R>(
&mut self,
f: impl FnOnce(&mut PB12<Input<PullUp>>) -> R
) -> R
Temporarily configures this pin as a pulled-up input.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
sourcepub fn into_analog(self) -> PB12<Analog>
pub fn into_analog(self) -> PB12<Analog>
Configures the pin to operate as an analog pin.
sourcepub fn with_analog<R>(&mut self, f: impl FnOnce(&mut PB12<Analog>) -> R) -> R
pub fn with_analog<R>(&mut self, f: impl FnOnce(&mut PB12<Analog>) -> R) -> R
Temporarily configures this pin as an analog pin.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
sourcepub fn into_open_drain_output(self) -> PB12<Output<OpenDrain>>
pub fn into_open_drain_output(self) -> PB12<Output<OpenDrain>>
Configures the pin to operate as an open drain output pin.
sourcepub fn with_open_drain_output<R>(
&mut self,
f: impl FnOnce(&mut PB12<Output<OpenDrain>>) -> R
) -> R
pub fn with_open_drain_output<R>(
&mut self,
f: impl FnOnce(&mut PB12<Output<OpenDrain>>) -> R
) -> R
Temporarily configures this pin as an open drain output.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
sourcepub fn into_push_pull_output(self) -> PB12<Output<PushPull>>
pub fn into_push_pull_output(self) -> PB12<Output<PushPull>>
Configures the pin to operate as an push-pull output pin.
Trait Implementations
sourceimpl<MODE> StatefulOutputPin for PB12<Output<MODE>>
impl<MODE> StatefulOutputPin for PB12<Output<MODE>>
impl<MODE> Default for PB12<Output<MODE>>
Auto Trait Implementations
impl<MODE> RefUnwindSafe for PB12<MODE> where
MODE: RefUnwindSafe,
impl<MODE> Send for PB12<MODE> where
MODE: Send,
impl<MODE> Sync for PB12<MODE> where
MODE: Sync,
impl<MODE> Unpin for PB12<MODE> where
MODE: Unpin,
impl<MODE> UnwindSafe for PB12<MODE> where
MODE: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more