Thanks to visit codestin.com Credit goes to github.com
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 f300bdd commit 2cea579Copy full SHA for 2cea579
Adafruit_GPIO/MCP230xx.py
@@ -100,9 +100,9 @@ def input_pins(self, pins):
100
"""
101
[self._validate_pin(pin) for pin in pins]
102
# Get GPIO state.
103
- gpio = self._device.readList(self.GPIO, self.gpio_bytes)
+ self.gpio = self._device.readList(self.GPIO, self.gpio_bytes)
104
# Return True if pin's bit is set.
105
- return [(gpio[int(pin/8)] & 1 << (int(pin%8))) > 0 for pin in pins]
+ return [(self.gpio[int(pin/8)] & 1 << (int(pin%8))) > 0 for pin in pins]
106
107
108
def pullup(self, pin, enabled):
0 commit comments