Skip to content

Commit c07f208

Browse files
authored
Merge pull request #10 from blemasle/bugfixes-digitalread
digitalRead comparison fix
2 parents 0f36a34 + fe73650 commit c07f208

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MCP23017.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ uint8_t MCP23017::digitalRead(uint8_t pin)
7272
}
7373

7474
gpio = readRegister(gpioreg);
75-
if(gpio & _BV(pin) == _BV(pin)) return HIGH;
75+
if((gpio & _BV(pin)) == _BV(pin)) return HIGH;
7676
return LOW;
7777
}
7878

0 commit comments

Comments
 (0)