summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hylands <dhylands@gmail.com>2017-01-02 13:02:22 -0800
committerDamien George <damien.p.george@gmail.com>2017-01-03 17:19:22 +1100
commit3c84197f17d27a991f50cb6e5ed268edbc796991 (patch)
treeb4fc5ca2da9b8c0489e5eb435de9f055a5acc0e4
parent3d962011653a349308369795c0b010ce67db8d0f (diff)
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.
-rw-r--r--drivers/onewire/onewire.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/onewire/onewire.py b/drivers/onewire/onewire.py
index ffeb130d6..c8016c0da 100644
--- a/drivers/onewire/onewire.py
+++ b/drivers/onewire/onewire.py
@@ -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)