summaryrefslogtreecommitdiffstatshomepage
path: root/esp8266/modules/onewire.py
diff options
context:
space:
mode:
Diffstat (limited to 'esp8266/modules/onewire.py')
-rw-r--r--esp8266/modules/onewire.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/esp8266/modules/onewire.py b/esp8266/modules/onewire.py
index af5675649b..06b216a57a 100644
--- a/esp8266/modules/onewire.py
+++ b/esp8266/modules/onewire.py
@@ -27,11 +27,9 @@ class OneWire:
def readbyte(self):
return _ow.readbyte(self.pin)
- def read(self, count):
- buf = bytearray(count)
- for i in range(count):
+ def readinto(self, buf):
+ for i in range(len(buf)):
buf[i] = _ow.readbyte(self.pin)
- return buf
def writebit(self, value):
return _ow.writebit(self.pin, value)