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.
simmel
Damien George 5 years ago
parent 118173013f
commit 683df1c8d5
  1. 2
      drivers/onewire/onewire.py

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

Loading…
Cancel
Save