Struct stm32f4xx_hal::gpio::Pin
source · [−]Expand description
Generic pin type
MODE
is one of the pin modes (see Modes section).P
is port name:A
for GPIOA,B
for GPIOB, etc.N
is pin number: from0
to15
.
Implementations
sourceimpl<MODE, const P: char, const N: u8> Pin<MODE, P, N>
impl<MODE, const P: char, const N: u8> Pin<MODE, P, N>
sourcepub fn into_alternate<const A: u8>(self) -> Pin<Alternate<PushPull, A>, P, N>
pub fn into_alternate<const A: u8>(self) -> Pin<Alternate<PushPull, A>, P, N>
Configures the pin to operate alternate mode
sourcepub fn into_alternate_open_drain<const A: u8>(
self
) -> Pin<Alternate<OpenDrain, A>, P, N>
pub fn into_alternate_open_drain<const A: u8>(
self
) -> Pin<Alternate<OpenDrain, A>, P, N>
Configures the pin to operate in alternate open drain mode
sourcepub fn into_floating_input(self) -> Pin<Input<Floating>, P, N>
pub fn into_floating_input(self) -> Pin<Input<Floating>, P, N>
Configures the pin to operate as a floating input pin
sourcepub fn into_pull_down_input(self) -> Pin<Input<PullDown>, P, N>
pub fn into_pull_down_input(self) -> Pin<Input<PullDown>, P, N>
Configures the pin to operate as a pulled down input pin
sourcepub fn into_pull_up_input(self) -> Pin<Input<PullUp>, P, N>
pub fn into_pull_up_input(self) -> Pin<Input<PullUp>, P, N>
Configures the pin to operate as a pulled up input pin
sourcepub fn into_open_drain_output(self) -> Pin<Output<OpenDrain>, P, N>
pub fn into_open_drain_output(self) -> Pin<Output<OpenDrain>, P, N>
Configures the pin to operate as an open drain output pin Initial state will be low.
sourcepub fn into_open_drain_output_in_state(
self,
initial_state: PinState
) -> Pin<Output<OpenDrain>, P, N>
pub fn into_open_drain_output_in_state(
self,
initial_state: PinState
) -> Pin<Output<OpenDrain>, P, N>
Configures the pin to operate as an open-drain output pin.
initial_state
specifies whether the pin should be initially high or low.
sourcepub fn into_push_pull_output(self) -> Pin<Output<PushPull>, P, N>
pub fn into_push_pull_output(self) -> Pin<Output<PushPull>, P, N>
Configures the pin to operate as an push pull output pin Initial state will be low.
sourcepub fn into_push_pull_output_in_state(
self,
initial_state: PinState
) -> Pin<Output<PushPull>, P, N>
pub fn into_push_pull_output_in_state(
self,
initial_state: PinState
) -> Pin<Output<PushPull>, P, N>
Configures the pin to operate as an push-pull output pin.
initial_state
specifies whether the pin should be initially high or low.
sourcepub fn into_analog(self) -> Pin<Analog, P, N>
pub fn into_analog(self) -> Pin<Analog, P, N>
Configures the pin to operate as an analog input pin
sourcepub fn into_dynamic(self) -> DynamicPin<P, N>
pub fn into_dynamic(self) -> DynamicPin<P, N>
Configures the pin as a pin that can change between input and output without changing the type. It starts out as a floating input
sourceimpl<MODE, const P: char, const N: u8> Pin<MODE, P, N> where
MODE: PinMode,
impl<MODE, const P: char, const N: u8> Pin<MODE, P, N> where
MODE: PinMode,
sourcepub fn with_floating_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<Floating>, P, N>) -> R
) -> R
pub fn with_floating_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<Floating>, P, N>) -> 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 with_pull_down_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<PullDown>, P, N>) -> R
) -> R
pub fn with_pull_down_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<PullDown>, P, N>) -> 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 with_pull_up_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<PullUp>, P, N>) -> R
) -> R
pub fn with_pull_up_input<R>(
&mut self,
f: impl FnOnce(&mut Pin<Input<PullUp>, P, N>) -> 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 with_analog<R>(
&mut self,
f: impl FnOnce(&mut Pin<Analog, P, N>) -> R
) -> R
pub fn with_analog<R>(
&mut self,
f: impl FnOnce(&mut Pin<Analog, P, N>) -> 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 with_open_drain_output<R>(
&mut self,
f: impl FnOnce(&mut Pin<Output<OpenDrain>, P, N>) -> R
) -> R
pub fn with_open_drain_output<R>(
&mut self,
f: impl FnOnce(&mut Pin<Output<OpenDrain>, P, N>) -> 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.
The value of the pin after conversion is undefined. If you
want to control it, use with_open_drain_output_in_state
sourcepub fn with_open_drain_output_in_state<R>(
&mut self,
state: PinState,
f: impl FnOnce(&mut Pin<Output<OpenDrain>, P, N>) -> R
) -> R
pub fn with_open_drain_output_in_state<R>(
&mut self,
state: PinState,
f: impl FnOnce(&mut Pin<Output<OpenDrain>, P, N>) -> 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.
Note that the new state is set slightly before conversion
happens. This can cause a short output glitch if switching
between output modes
sourcepub fn with_push_pull_output<R>(
&mut self,
f: impl FnOnce(&mut Pin<Output<PushPull>, P, N>) -> R
) -> R
pub fn with_push_pull_output<R>(
&mut self,
f: impl FnOnce(&mut Pin<Output<PushPull>, P, N>) -> R
) -> R
Temporarily configures this pin as a push-pull output.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
The value of the pin after conversion is undefined. If you
want to control it, use with_push_pull_output_in_state
sourcepub fn with_push_pull_output_in_state<R>(
&mut self,
state: PinState,
f: impl FnOnce(&mut Pin<Output<PushPull>, P, N>) -> R
) -> R
pub fn with_push_pull_output_in_state<R>(
&mut self,
state: PinState,
f: impl FnOnce(&mut Pin<Output<PushPull>, P, N>) -> R
) -> R
Temporarily configures this pin as a push-pull output.
The closure f
is called with the reconfigured pin. After it returns,
the pin will be configured back.
Note that the new state is set slightly before conversion
happens. This can cause a short output glitch if switching
between output modes
sourceimpl<const P: char, const N: u8> Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> Pin<Output<OpenDrain>, P, N>
sourcepub fn internal_pull_up(self, on: bool) -> Self
pub fn internal_pull_up(self, on: bool) -> Self
Enables / disables the internal pull up
sourcepub fn internal_pull_down(self, on: bool) -> Self
pub fn internal_pull_down(self, on: bool) -> Self
Enables / disables the internal pull down
sourceimpl<const P: char, const N: u8, const A: u8> Pin<Alternate<PushPull, A>, P, N>
impl<const P: char, const N: u8, const A: u8> Pin<Alternate<PushPull, A>, P, N>
sourcepub fn internal_pull_up(self, on: bool) -> Self
pub fn internal_pull_up(self, on: bool) -> Self
Enables / disables the internal pull up
sourcepub fn internal_pull_down(self, on: bool) -> Self
pub fn internal_pull_down(self, on: bool) -> Self
Enables / disables the internal pull down
sourceimpl<const P: char, const N: u8, const A: u8> Pin<Alternate<PushPull, A>, P, N>
impl<const P: char, const N: u8, const A: u8> Pin<Alternate<PushPull, A>, P, N>
sourcepub fn set_open_drain(self) -> Pin<Alternate<OpenDrain, A>, P, N>
pub fn set_open_drain(self) -> Pin<Alternate<OpenDrain, A>, P, N>
Turns pin alternate configuration pin into open drain
sourceimpl<MODE, const P: char, const N: u8> Pin<MODE, P, N>
impl<MODE, const P: char, const N: u8> Pin<MODE, P, N>
sourcepub fn erase_number(self) -> PEPin<MODE, P>
pub fn erase_number(self) -> PEPin<MODE, P>
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
Trait Implementations
sourceimpl<MODE, const P: char, const N: u8> ErrorType for Pin<MODE, P, N>
impl<MODE, const P: char, const N: u8> ErrorType for Pin<MODE, P, N>
type Error = Infallible
type Error = Infallible
Error type
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<PullDown>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<PullUp>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Input<Floating>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Output<OpenDrain>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Output<PushPull>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Analog, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<OpenDrain, A>, P, N>> for Pin<Analog, P, N>
sourceimpl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<Alternate<OpenDrain, B>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
impl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<Alternate<OpenDrain, B>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<PullDown>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<PullUp>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Input<Floating>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Output<OpenDrain>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Output<PushPull>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Analog, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Alternate<PushPull, A>, P, N>> for Pin<Analog, P, N>
sourceimpl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<Alternate<PushPull, B>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
impl<const P: char, const N: u8, const A: u8, const B: u8> From<Pin<Alternate<PushPull, B>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Analog, P, N>> for Pin<Alternate<PushPull, A>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Analog, P, N>> for Pin<Alternate<PushPull, A>, P, N>
sourceimpl<const P: char, const N: u8, const A: u8> From<Pin<Analog, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
impl<const P: char, const N: u8, const A: u8> From<Pin<Analog, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<Floating>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<Floating>, P, N>> for Pin<Input<PullDown>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<Floating>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<Floating>, P, N>> for Pin<Input<PullUp>, P, N>
sourceimpl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Input<MODE>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
impl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Input<MODE>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
sourceimpl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Input<MODE>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
impl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Input<MODE>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
sourceimpl<MODE, const P: char, const N: u8> From<Pin<Input<MODE>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<MODE, const P: char, const N: u8> From<Pin<Input<MODE>, P, N>> for Pin<Output<OpenDrain>, P, N>
sourceimpl<MODE, const P: char, const N: u8> From<Pin<Input<MODE>, P, N>> for Pin<Output<PushPull>, P, N>
impl<MODE, const P: char, const N: u8> From<Pin<Input<MODE>, P, N>> for Pin<Output<PushPull>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<PullDown>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<PullDown>, P, N>> for Pin<Input<PullUp>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<PullDown>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<PullDown>, P, N>> for Pin<Input<Floating>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<PullUp>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<PullUp>, P, N>> for Pin<Input<PullDown>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Input<PullUp>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> From<Pin<Input<PullUp>, P, N>> for Pin<Input<Floating>, P, N>
sourceimpl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Output<MODE>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
impl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Output<MODE>, P, N>> for Pin<Alternate<PushPull, A>, P, N>
sourceimpl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Output<MODE>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
impl<MODE, const P: char, const N: u8, const A: u8> From<Pin<Output<MODE>, P, N>> for Pin<Alternate<OpenDrain, A>, P, N>
sourceimpl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<PullDown>, P, N>
impl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<PullDown>, P, N>
sourceimpl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<PullUp>, P, N>
impl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<PullUp>, P, N>
sourceimpl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<Floating>, P, N>
impl<MODE, const P: char, const N: u8> From<Pin<Output<MODE>, P, N>> for Pin<Input<Floating>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Output<OpenDrain>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> From<Pin<Output<OpenDrain>, P, N>> for Pin<Output<PushPull>, P, N>
sourceimpl<const P: char, const N: u8> From<Pin<Output<PushPull>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> From<Pin<Output<PushPull>, P, N>> for Pin<Output<OpenDrain>, P, N>
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Input<Floating>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Input<Floating>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<Floating>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<Floating>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<Floating>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<Floating>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullDown>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullDown>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullDown>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullDown>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullUp>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Output<PushPull>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourceimpl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullUp>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Input<PullUp>, P, N>, Pin<Output<PushPull>, P, N>> for Pin<Input<PullUp>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Output<OpenDrain>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Output<OpenDrain>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<const P: char, const N: u8> IoPin<Pin<Output<OpenDrain>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
impl<const P: char, const N: u8> IoPin<Pin<Output<OpenDrain>, P, N>, Pin<Output<OpenDrain>, P, N>> for Pin<Output<OpenDrain>, P, N>
type Error = Infallible
type Error = Infallible
Error type.
sourcefn into_input_pin(self) -> Result<Self, Self::Error>
fn into_input_pin(self) -> Result<Self, Self::Error>
Tries to convert this pin to input mode. Read more
sourceimpl<MODE, const P: char, const N: u8> OutputPin for Pin<Output<MODE>, P, N>
impl<MODE, const P: char, const N: u8> OutputPin for Pin<Output<MODE>, P, N>
type Error = Infallible
type Error = Infallible
Error type
Auto Trait Implementations
impl<MODE, const P: char, const N: u8> RefUnwindSafe for Pin<MODE, P, N> where
MODE: RefUnwindSafe,
impl<MODE, const P: char, const N: u8> Send for Pin<MODE, P, N> where
MODE: Send,
impl<MODE, const P: char, const N: u8> Sync for Pin<MODE, P, N> where
MODE: Sync,
impl<MODE, const P: char, const N: u8> Unpin for Pin<MODE, P, N> where
MODE: Unpin,
impl<MODE, const P: char, const N: u8> UnwindSafe for Pin<MODE, P, N> 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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more