Permalink
Browse files

Changed readGPIO(void) to read the MCP23008_GPIO register instead of …

…the output latch register (MCP23008_OLAT).
  • Loading branch information...
1 parent 1539a5a commit 64c835f57b9562f281ccc3ccfc5de4d511c0dc5f @driverblock driverblock committed Jul 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 Adafruit_MCP23008.cpp
View
4 Adafruit_MCP23008.cpp
@@ -89,8 +89,8 @@ void Adafruit_MCP23008::pinMode(uint8_t p, uint8_t d) {
}
uint8_t Adafruit_MCP23008::readGPIO(void) {
- // read the current GPIO output latches
- return read8(MCP23008_OLAT);
+ // read the current GPIO input
+ return read8(MCP23008_GPIO);
}
void Adafruit_MCP23008::writeGPIO(uint8_t gpio) {

0 comments on commit 64c835f

Please sign in to comment.