Struct stm32f4xx_hal::gpio::Pin [−][src]
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
Configures the pin to operate alternate mode
Configures the pin to operate in alternate open drain mode
Configures the pin to operate as a floating input pin
Configures the pin to operate as a pulled down input pin
Configures the pin to operate as a pulled up input pin
Configures the pin to operate as an open drain output pin Initial state will be low.
Configures the pin to operate as an open-drain output pin.
initial_state
specifies whether the pin should be initially high or low.
Configures the pin to operate as an push pull output pin Initial state will be low.
Configures the pin to operate as an push-pull output pin.
initial_state
specifies whether the pin should be initially high or low.
Configures the pin to operate as an analog input pin
Configures the pin as a pin that can change between input and output without changing the type. It starts out as a floating input
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.
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.
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.
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.
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
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
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
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
Enables / disables the internal pull up
Enables / disables the internal pull down
Enables / disables the internal pull up
Enables / disables the internal pull down
Turns pin alternate configuration pin into open drain
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
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type.
Tries to convert this pin to input mode. Read more
type Error = Infallible
type Error = Infallible
Error type