Fix the page end calculation in eeprom_i2c.py for multiple chip arrays.

pull/23/head
Abel Deuring 2024-01-08 16:21:29 +01:00
rodzic 4a8c00bf98
commit d3bdef839a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7A404F866F0DAED0
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