Struct stm32_hal2::gpio::GpioCPin [−][src]
Represents a single GPIO pin.
Fields
port: PortLetter
pin: PinNum
Implementations
impl GpioCPin
[src]
pub fn mode(&mut self, value: PinMode, regs: &mut GPIOC)
[src]
Set pin mode.
pub fn output_type(&mut self, value: OutputType, regs: &mut GPIOC)
[src]
Set output type
pub fn output_speed(&mut self, value: OutputSpeed, regs: &mut GPIOC)
[src]
Set output speed.
pub fn pull(&mut self, value: Pull, regs: &mut GPIOC)
[src]
Set internal pull resistor: Pull up, pull down, or floating.
pub fn output_data(&mut self, value: PinState, regs: &mut GPIOC)
[src]
Set the output_data register.
pub fn cfg_lock(&mut self, value: CfgLock, regs: &mut GPIOC)
[src]
Lock or unlock a port configuration.
pub fn input_data(&mut self, regs: &mut GPIOC) -> PinState
[src]
Set internal pull up/down resistor, or leave floating.
pub fn set_state(&mut self, value: PinState, regs: &mut GPIOC)
[src]
Set a pin state.
pub fn enable_interrupt(
&mut self,
edge: Edge,
exti: &mut EXTI,
syscfg: &mut SYSCFG
)
[src]
&mut self,
edge: Edge,
exti: &mut EXTI,
syscfg: &mut SYSCFG
)
Configure this pin as an interrupt source.
pub fn disable_interrupt()
[src]
Disable interrupts on this pin.
Trait Implementations
impl GpioPin for GpioCPin
[src]
fn get_port(&self) -> PortLetter
[src]
fn get_pin(&self) -> PinNum
[src]
fn get_mode(&self) -> PinMode
[src]
fn get_output_type(&self) -> OutputType
[src]
impl InputPin for GpioCPin
[src]
type Error = Infallible
Error type
fn is_high(&self) -> Result<bool, Self::Error>
[src]
fn is_low(&self) -> Result<bool, Self::Error>
[src]
impl OutputPin for GpioCPin
[src]
type Error = Infallible
Error type
fn set_low(&mut self) -> Result<(), Self::Error>
[src]
fn set_high(&mut self) -> Result<(), Self::Error>
[src]
impl ToggleableOutputPin for GpioCPin
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,