Skip to content

Commit dc14672

Browse files
committed
Fix writing of slice to FRAM
1 parent 2656d7a commit dc14672

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

adafruit_fram.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,8 @@ def __setitem__(self, address, value):
201201
"Cannot set values with a list smaller than the number of indexes"
202202
)
203203

204-
address_range = range(address.start, address.stop)
205-
value = [value] * len(address_range) if isinstance(value, int) else value
206-
slice_iterable = zip(value, list(address_range))
207-
for index in slice_iterable:
208-
self._write(index, value, self._wraparound)
204+
self._write(address.start, value, self._wraparound)
205+
209206

210207
def _read_address(self, address, read_buffer):
211208
# Implemented by subclass

0 commit comments

Comments
 (0)