Struct stm32_hal2::gpio::GpioBPin[][src]

pub struct GpioBPin {
    pub port: PortLetter,
    pub pin: PinNum,
}

Represents a single GPIO pin. Provides methods that, when passed a mutable reference to its port’s register block, can change and read various properties of the pin.

Fields

port: PortLetterpin: PinNum

Implementations

impl GpioBPin[src]

pub fn mode(&mut self, value: PinMode, regs: &mut GPIOB)[src]

Set pin mode.

pub fn output_type(&mut self, value: OutputType, regs: &mut GPIOB)[src]

Set output type.

pub fn output_speed(&mut self, value: OutputSpeed, regs: &mut GPIOB)[src]

Set output speed.

pub fn pull(&mut self, value: Pull, regs: &mut GPIOB)[src]

Set internal pull resistor: Pull up, pull down, or floating.

pub fn output_data(&mut self, value: PinState, regs: &mut GPIOB)[src]

Set the output_data register.

pub fn cfg_lock(&mut self, value: CfgLock, regs: &mut GPIOB)[src]

Lock or unlock a port configuration.

pub fn input_data(&mut self, regs: &mut GPIOB) -> PinState[src]

Read the input data register.

pub fn set_state(&mut self, value: PinState, regs: &mut GPIOB)[src]

Set a pin state (ie set high or low output voltage level).

pub fn enable_interrupt(
    &mut self,
    edge: Edge,
    exti: &mut EXTI,
    syscfg: &mut SYSCFG
)
[src]

Configure this pin as an interrupt source.

pub fn disable_interrupt()[src]

Disable interrupts on this pin.

Trait Implementations

impl InputPin for GpioBPin[src]

type Error = Infallible

Error type

impl OutputPin for GpioBPin[src]

type Error = Infallible

Error type

impl ToggleableOutputPin for GpioBPin[src]

type Error = Infallible

Error type

Auto Trait Implementations

impl Send for GpioBPin

impl Sync for GpioBPin

impl Unpin for GpioBPin

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.