drivers/onewire: Enable pull up on data pin.

The driver seems to be be enabling the pullup resistor in most places, but
not this one. Making this one little change allows onewire devices to be
used with no external pullup resistor.
This commit is contained in:
Dave Hylands 2017-01-02 13:02:22 -08:00 committed by Damien George
parent 3d96201165
commit 3c84197f17

View File

@ -60,7 +60,7 @@ class OneWire:
# cache a bunch of methods and attributes. This is necessary in _write_bit and
# _read_bit to achieve the timing required by the OneWire protocol.
self.cache = (pin.init, pin.value, pin.OUT_PP, pin.IN, pin.PULL_NONE)
self.cache = (pin.init, pin.value, pin.OUT_PP, pin.IN, pin.PULL_UP)
pin.init(pin.IN, pin.PULL_UP)