Struct stm32f30x_hal::gpio::gpioa::PA2
[−]
[src]
pub struct PA2<MODE> { /* fields omitted */ }
Pin
Methods
impl<MODE> PA2<MODE>
[src]
fn into_af4(self, moder: &mut MODER, afr: &mut AFRL) -> PA2<AF4>
[src]
Configures the pin to serve as alternate function 4 (AF4)
fn into_af5(self, moder: &mut MODER, afr: &mut AFRL) -> PA2<AF5>
[src]
Configures the pin to serve as alternate function 5 (AF5)
fn into_af6(self, moder: &mut MODER, afr: &mut AFRL) -> PA2<AF6>
[src]
Configures the pin to serve as alternate function 6 (AF6)
fn into_af7(self, moder: &mut MODER, afr: &mut AFRL) -> PA2<AF7>
[src]
Configures the pin to serve as alternate function 7 (AF7)
fn into_floating_input(
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<Floating>>
[src]
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<Floating>>
Configures the pin to operate as a floating input pin
fn into_pull_down_input(
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<PullDown>>
[src]
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<PullDown>>
Configures the pin to operate as a pulled down input pin
fn into_pull_up_input(
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<PullUp>>
[src]
self,
moder: &mut MODER,
pupdr: &mut PUPDR
) -> PA2<Input<PullUp>>
Configures the pin to operate as a pulled up input pin
fn into_open_drain_output(
self,
moder: &mut MODER,
otyper: &mut OTYPER
) -> PA2<Output<OpenDrain>>
[src]
self,
moder: &mut MODER,
otyper: &mut OTYPER
) -> PA2<Output<OpenDrain>>
Configures the pin to operate as an open drain output pin
fn into_push_pull_output(
self,
moder: &mut MODER,
otyper: &mut OTYPER
) -> PA2<Output<PushPull>>
[src]
self,
moder: &mut MODER,
otyper: &mut OTYPER
) -> PA2<Output<PushPull>>
Configures the pin to operate as an push pull output pin
impl PA2<Output<OpenDrain>>
[src]
fn internal_pull_up(&mut self, pupdr: &mut PUPDR, on: bool)
[src]
Enables / disables the internal pull up
impl<MODE> PA2<Output<MODE>>
[src]
fn downgrade(self) -> PAx<Output<MODE>>
[src]
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
impl<MODE> OutputPin for PA2<Output<MODE>>
[src]
fn is_high(&self) -> bool
[src]
Is the output pin high?
fn is_low(&self) -> bool
[src]
Is the output pin low?
fn set_high(&mut self)
[src]
Sets the pin high
fn set_low(&mut self)
[src]
Sets the pin low