Struct embedded_c_sdk_bind_hal::gpio::Pin
source · pub struct Pin<MODE> { /* private fields */ }
Implementations§
source§impl Pin<Input>
impl Pin<Input>
sourcepub fn exti_config(&self, mode: ExtiMode)
pub fn exti_config(&self, mode: ExtiMode)
Configures the EXTI (External Interrupt) mode for the pin.
§Arguments
mode
- The EXTI mode to set. This can be rising edge, falling edge, both edges, etc.
sourcepub fn enable_interrupt(&self)
pub fn enable_interrupt(&self)
Enables the interrupt for the pin.
This function can be reenabled after disabling it.
sourcepub fn disable_interrupt(&self)
pub fn disable_interrupt(&self)
Disables the interrupt for the pin.
This function can be used to temporarily disable the interrupt without changing the EXTI mode.
source§impl Pin<()>
impl Pin<()>
sourcepub fn into_input(&self, mode: PinModeInput) -> Pin<Input>
pub fn into_input(&self, mode: PinModeInput) -> Pin<Input>
sourcepub fn into_output(&self, mode: PinModeOutput) -> Pin<Output>
pub fn into_output(&self, mode: PinModeOutput) -> Pin<Output>
sourcepub fn into_alternate(&self, mode: PinModeAlternate) -> Pin<Alternate>
pub fn into_alternate(&self, mode: PinModeAlternate) -> Pin<Alternate>
sourcepub fn into_analog(&self, mode: PinModeAnalog) -> Pin<Analog>
pub fn into_analog(&self, mode: PinModeAnalog) -> Pin<Analog>
Trait Implementations§
source§impl StatefulOutputPin for Pin<Output>
impl StatefulOutputPin for Pin<Output>
Auto Trait Implementations§
impl<MODE> Freeze for Pin<MODE>
impl<MODE> RefUnwindSafe for Pin<MODE>where
MODE: RefUnwindSafe,
impl<MODE> Send for Pin<MODE>where
MODE: Send,
impl<MODE> Sync for Pin<MODE>where
MODE: Sync,
impl<MODE> Unpin for Pin<MODE>where
MODE: Unpin,
impl<MODE> UnwindSafe for Pin<MODE>where
MODE: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more