kopia lustrzana https://github.com/peterhinch/micropython_eeprom
Porównaj commity
2 Commity
b80fde066f
...
0b08e08b74
Autor | SHA1 | Data |
---|---|---|
Rinaldi Jandrinata | 0b08e08b74 | |
Rinaldi Jandrinata | 95215ebf3c |
|
@ -130,6 +130,8 @@ Arguments:
|
|||
devices it has detected.
|
||||
4. `block_size=9` The block size reported to the filesystem. The size in bytes
|
||||
is `2**block_size` so is 512 bytes by default.
|
||||
5. `addr` override base address for first chip
|
||||
6. 'max_chips_count` override max_chips_count
|
||||
|
||||
### 4.1.2 Methods providing byte level access
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ class EEPROM(BlockDevice):
|
|||
self._i2c = i2c
|
||||
if chip_size not in (T24C32, T24C64, T24C128, T24C256, T24C512):
|
||||
print("Warning: possible unsupported chip. Size:", chip_size)
|
||||
nchips, min_chip_address = self.scan(verbose, chip_size) # No. of EEPROM chips
|
||||
nchips, min_chip_address = self.scan(verbose, chip_size, addr, max_chips_count) # No. of EEPROM chips
|
||||
super().__init__(block_size, nchips, chip_size)
|
||||
self._min_chip_address = min_chip_address
|
||||
self._i2c_addr = 0 # I2C address of current chip
|
||||
|
|
Ładowanie…
Reference in New Issue