Struct tm4c123x_hal::gpio::gpioa::PA2
source · pub struct PA2<MODE> { /* private fields */ }
Expand description
Pin
Implementations
sourceimpl<MODE> PA2<MODE>where
MODE: IsUnlocked,
impl<MODE> PA2<MODE>where
MODE: IsUnlocked,
sourcepub fn into_af_push_pull<AF>(
self,
_gpio_control: &mut GpioControl
) -> PA2<AlternateFunction<AF, PushPull>>where
AF: AlternateFunctionChoice,
pub fn into_af_push_pull<AF>(
self,
_gpio_control: &mut GpioControl
) -> PA2<AlternateFunction<AF, PushPull>>where
AF: AlternateFunctionChoice,
Configures the pin to serve as alternate function 1 through 15. Disables open-drain to make the output a push-pull.
sourcepub fn into_af_open_drain<AF, ODM>(
self,
_gpio_control: &mut GpioControl
) -> PA2<AlternateFunction<AF, OpenDrain<ODM>>>where
AF: AlternateFunctionChoice,
ODM: OpenDrainMode,
pub fn into_af_open_drain<AF, ODM>(
self,
_gpio_control: &mut GpioControl
) -> PA2<AlternateFunction<AF, OpenDrain<ODM>>>where
AF: AlternateFunctionChoice,
ODM: OpenDrainMode,
Configures the pin to serve as alternate function 1 through 15. Enables open-drain (useful for I2C SDA, for example).
sourcepub fn into_floating_input(self) -> PA2<Input<Floating>>
pub fn into_floating_input(self) -> PA2<Input<Floating>>
Configures the pin to operate as a floating input pin
sourcepub fn into_pull_down_input(self) -> PA2<Input<PullDown>>
pub fn into_pull_down_input(self) -> PA2<Input<PullDown>>
Configures the pin to operate as a pulled down input pin
sourcepub fn into_pull_up_input(self) -> PA2<Input<PullUp>>
pub fn into_pull_up_input(self) -> PA2<Input<PullUp>>
Configures the pin to operate as a pulled up input pin
sourcepub fn into_open_drain_output<ODM>(self) -> PA2<Output<OpenDrain<ODM>>>where
ODM: OpenDrainMode,
pub fn into_open_drain_output<ODM>(self) -> PA2<Output<OpenDrain<ODM>>>where
ODM: OpenDrainMode,
Configures the pin to operate as an open drain output pin
sourcepub fn into_push_pull_output(self) -> PA2<Output<PushPull>>
pub fn into_push_pull_output(self) -> PA2<Output<PushPull>>
Configures the pin to operate as an push pull output pin
sourcepub fn into_tri_state(self) -> PA2<Tristate>
pub fn into_tri_state(self) -> PA2<Tristate>
Configures the pin as tri-state
sourceimpl<MODE> PA2<Input<MODE>>where
MODE: InputMode,
impl<MODE> PA2<Input<MODE>>where
MODE: InputMode,
sourcepub fn set_interrupt_mode(&mut self, mode: InterruptMode)
pub fn set_interrupt_mode(&mut self, mode: InterruptMode)
Enables or disables interrupts on this GPIO pin.
sourcepub fn clear_interrupt(&self)
pub fn clear_interrupt(&self)
Marks the interrupt for this pin as handled. You should call this (or perform its functionality) from the ISR.
Trait Implementations
sourceimpl<MODE> InputPin for PA2<Input<MODE>>where
MODE: InputMode,
impl<MODE> InputPin for PA2<Input<MODE>>where
MODE: InputMode,
sourceimpl<MODE> OutputPin for PA2<Output<MODE>>where
MODE: OutputMode,
impl<MODE> OutputPin for PA2<Output<MODE>>where
MODE: OutputMode,
sourceimpl<MODE> StatefulOutputPin for PA2<Output<MODE>>where
MODE: OutputMode,
impl<MODE> StatefulOutputPin for PA2<Output<MODE>>where
MODE: OutputMode,
sourcefn 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
sourcefn 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
impl<T> SckPin<SSI0> for PA2<AlternateFunction<AF2, T>>where
T: OutputMode,
Auto Trait Implementations
impl<MODE> RefUnwindSafe for PA2<MODE>where
MODE: RefUnwindSafe,
impl<MODE> Send for PA2<MODE>where
MODE: Send,
impl<MODE> Sync for PA2<MODE>where
MODE: Sync,
impl<MODE> Unpin for PA2<MODE>where
MODE: Unpin,
impl<MODE> UnwindSafe for PA2<MODE>where
MODE: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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