We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61a2ef0 commit 4513004Copy full SHA for 4513004
src/lib.rs
@@ -121,11 +121,15 @@ impl hal::digital::OutputPin for Pin {
121
122
impl hal::digital::InputPin for Pin {
123
fn is_high(&self) -> bool{
124
- self.0.get_value().unwrap() != 0
+ if !self.0.get_active_low().unwrap() {
125
+ self.0.get_value().unwrap() != 0
126
+ } else {
127
+ self.0.get_value().unwrap() == 0
128
+ }
129
}
130
131
fn is_low(&self) -> bool{
- self.0.get_value().unwrap() == 0
132
+ !self.is_high()
133
134
135
0 commit comments