Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

Commit f300bdd

Browse files
authored
Default MCP230xx direction to input, fix #44.
1 parent 8042997 commit f300bdd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Adafruit_GPIO/MCP230xx.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, address, i2c=None, **kwargs):
4343
# Compute how many bytes are needed to store count of GPIO.
4444
self.gpio_bytes = int(math.ceil(self.NUM_GPIO/8.0))
4545
# Buffer register values so they can be changed without reading.
46-
self.iodir = [0x00]*self.gpio_bytes # Default direction to all inputs.
46+
self.iodir = [0xFF]*self.gpio_bytes # Default direction to all inputs.
4747
self.gppu = [0x00]*self.gpio_bytes # Default to pullups disabled.
4848
self.gpio = [0x00]*self.gpio_bytes
4949
# Write current direction and pullup buffer state.

0 commit comments

Comments
 (0)