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