Commit 5e442672 authored by Ralf's avatar Ralf
Browse files

pins: change default I2C state to 1

parent 67962c39
...@@ -40,7 +40,7 @@ class I2C: ...@@ -40,7 +40,7 @@ class I2C:
def setPin(self, pin, state): def setPin(self, pin, state):
'''Set the gien pin: An (address, bit) pair''' '''Set the gien pin: An (address, bit) pair'''
with self._lock: with self._lock:
byte = self._bytes.get(pin.addr, 0x00) byte = self._bytes.get(pin.addr, 0xFF) # default: all-1. That's also the HW default state, inherently.
# set the bit # set the bit
if state: if state:
byte |= (1 << pin.bit) byte |= (1 << pin.bit)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment