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.
This commit is contained in:
Damien George 2017-06-26 17:48:05 +10:00
parent 118173013f
commit 683df1c8d5

View File

@ -14,7 +14,7 @@ class OneWire:
def __init__(self, pin): def __init__(self, pin):
self.pin = pin self.pin = pin
self.pin.init(pin.OPEN_DRAIN) self.pin.init(pin.OPEN_DRAIN, pin.PULL_UP)
def reset(self, required=False): def reset(self, required=False):
reset = _ow.reset(self.pin) reset = _ow.reset(self.pin)