Skip to content

Commit 683df1c

Browse files
committed
drivers/onewire: Enable pull-up when init'ing the 1-wire pin.
A previous version of the 1-wire driver (which was recently replaced by the current one) had this behaviour and it allows to create a 1-wire bus without any external pull-up resistors.
1 parent 1181730 commit 683df1c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/onewire/onewire.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class OneWire:
1414

1515
def __init__(self, pin):
1616
self.pin = pin
17-
self.pin.init(pin.OPEN_DRAIN)
17+
self.pin.init(pin.OPEN_DRAIN, pin.PULL_UP)
1818

1919
def reset(self, required=False):
2020
reset = _ow.reset(self.pin)

0 commit comments

Comments
 (0)