Merge pull request #23 from adeuring/master

Fix the page end calculation in eeprom_i2c.py for multiple chip arrays.
pull/24/head
Peter Hinch 2024-01-09 09:51:51 +00:00 zatwierdzone przez GitHub
commit b26867febc
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -69,7 +69,7 @@ class EEPROM(BlockDevice):
self._addrbuf[0] = (la >> 8) & 0xFF
self._addrbuf[1] = la & 0xFF
self._i2c_addr = self._min_chip_address + ca
pe = (addr & self._page_mask) + self._page_size # byte 0 of next page
pe = (la & self._page_mask) + self._page_size # byte 0 of next page
return min(nbytes, pe - la)
# Read or write multiple bytes at an arbitrary address