Enum stm32_hal2::gpio::PinMode
source · [−]#[repr(u8)]
pub enum PinMode {
Input,
Output,
Alt(u8),
Analog,
}
Expand description
Values for GPIOx_MODER
. Sets pin to input, output, and other functionality.
Variants
Input
An input pin; read by firmware; set by something connected to the pin.
Output
An input pin; set by firmware; read by something connected to the pin.
Alt(u8)
An alternate function, as defined in the MCU’s user manual. Used for various onboard peripherals like buses, timers etc.
Analog
For use with the onboard ADC and DAC. Prevent parasitic power loss on the pin
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PinMode
impl Send for PinMode
impl Sync for PinMode
impl Unpin for PinMode
impl UnwindSafe for PinMode
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