Skip to content

Commit da6a256

Browse files
authored
Merge pull request #12 from alustig3/master
Update adafruit_bitbangio.py
2 parents c5cec5c + e2ac237 commit da6a256

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

adafruit_bitbangio.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ def scan(self):
121121
found.append(address)
122122
return found
123123

124-
def writeto(self, address, buffer, *, start=0, end=None, stop=True):
124+
def writeto(self, address, buffer, *, start=0, end=None):
125125
"""Write data from the buffer to an address"""
126126
if end is None:
127127
end = len(buffer)
128128
if self._check_lock():
129-
self._write(address, buffer[start:end], stop)
129+
self._write(address, buffer[start:end], True)
130130

131131
def readfrom_into(self, address, buffer, *, start=0, end=None):
132132
"""Read data from an address and into the buffer"""
@@ -147,8 +147,7 @@ def writeto_then_readfrom(
147147
out_start=0,
148148
out_end=None,
149149
in_start=0,
150-
in_end=None,
151-
stop=True
150+
in_end=None
152151
):
153152
"""Write data from buffer_out to an address and then
154153
read data from an address and into buffer_in
@@ -158,7 +157,7 @@ def writeto_then_readfrom(
158157
if in_end is None:
159158
in_end = len(buffer_in)
160159
if self._check_lock():
161-
self.writeto(address, buffer_out, start=out_start, end=out_end, stop=stop)
160+
self.writeto(address, buffer_out, start=out_start, end=out_end)
162161
self.readfrom_into(address, buffer_in, start=in_start, end=in_end)
163162

164163
def _scl_low(self):

0 commit comments

Comments
 (0)