1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
//! Digital I/O /// Single digital output pin pub trait OutputPin { /// Is the output pin high? fn is_high(&self) -> bool; /// Is the output pin low? fn is_low(&self) -> bool; /// Sets the pin low fn set_low(&mut self); /// Sets the pin high fn set_high(&mut self); } /// Single digital input pin #[cfg(feature = "unproven")] pub trait InputPin { /// Is the input pin high? fn is_high(&self) -> bool; /// Is the input pin low? fn is_low(&self) -> bool; }