pub enum Pull {
None,
Up,
Down,
}Expand description
The internal pull resistor applied to an input pin.
A floating input drifts and reads noise, so a pin reading a switch needs a defined resting level from a pull resistor (internal where the chip offers one, external otherwise).
Variants§
None
No internal pull; the line floats unless something external holds it.
Up
An internal pull-up holds the line high when nothing drives it.
Down
An internal pull-down holds the line low when nothing drives it.
Trait Implementations§
impl Copy for Pull
impl Eq for Pull
impl StructuralPartialEq for Pull
Auto Trait Implementations§
impl Freeze for Pull
impl RefUnwindSafe for Pull
impl Send for Pull
impl Sync for Pull
impl Unpin for Pull
impl UnsafeUnpin for Pull
impl UnwindSafe for Pull
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