Wykres commitów

47 Commity (f84eb5cec211ed86fe2938f91de72eaebdf805ad)

Autor SHA1 Wiadomość Data
Bohdan Danishevsky f84eb5cec2 Add support of Microchip AT24C32 and support of single chip for `EEPROM` class
[Description]

Adds support of:

1. Microchip AT24C32 (4 KiB)
2. Support of single chip setup for `EEPROM` class when single chip has address is
 0x57 so entire set of chips (1 chip in our case) addresses are not started from 0x50.

Example:

```python
from eeprom_i2c import EEPROM, T24C32

eeprom = PROM(machine.I2C(0), T24C32)
```

Improves tests implementation by adding dependency injection of `EEPROM`
object used during testing with support of old use case when object
had not been provided for testing.

Example (for AT24C32 connected to I2C0 of my Raspberry Pi Pico W) when we
creating instance of `EEPROM` and then passing it to `full_test` and also
providing proper block size for this chip:

```python
import machine
from eeprom_i2c import EEPROM, T24C32
from eep_i2c import full_test

def get_eep():
    return EEPROM(machine.I2C(0), T24C32)

def main():
    print("App started")

    print("Running tests")
    eep = get_eep()
    full_test(eep, block_size=32)
    print("App finished")

if __name__ == "__main__":
    main()
```

[Motivation]

Have DS3231 with soldered AT24C32 chip and want to use both RTC and EEPROM.
In my case AT24C32 has 0x57 as it's address and `EEPROM` class refused to
work with this setup.

[Testing]

Executed `full_test` from `eep_i2c` against AT24C32 (with address 0x57)
connected to my Raspberry Pi Pico W.

Test code:

```python
import machine
from eeprom_i2c import EEPROM, T24C32
from eep_i2c import full_test

def get_eep():
    return EEPROM(machine.I2C(0), T24C32)

def main():
    print("App started")

    print("Running tests")
    eep = get_eep()
    full_test(eep, block_size=32)
    print("App finished")

if __name__ == "__main__":
    main()
```
2022-09-24 17:42:58 +01:00
Peter Hinch 9d77347007 Run black over all Python files. 2022-09-22 10:04:29 +01:00
Peter Hinch 79ef80fa25 README: Add reference to test scripts. 2022-06-13 10:27:21 +01:00
Peter Hinch 295a103965 Add 25LC512 support, make eep_spi.py more self-explanatory. 2022-02-19 09:56:47 +00:00
Peter Hinch 9748b15389 README: fix broken link. 2022-02-11 18:22:47 +00:00
Peter Hinch 2f4bb08820 Add SPIRAM (PSRAM) support. 2021-10-31 17:35:53 +00:00
Peter Hinch da8c9f54f1 fram_spi.py: Correct code comments. 2021-10-29 18:42:21 +01:00
Peter Hinch 65ac90a559 Reference Winbond W25Q128JV support. Add ioctl code comments. 2021-09-13 07:20:01 +01:00
Peter Hinch 2792ab31d3 EEPROM: replace exception with warning for unsupported chips. 2021-04-25 12:16:02 +01:00
Peter Hinch 36f67b7b54 Support SPI FRAM 256 and 512KiB devices. 2020-09-04 18:44:30 +01:00
Peter Hinch 9ebeeda5b0 Support SPI FRAM 256 and 512KiB devices. 2020-09-04 18:37:03 +01:00
Peter Hinch 55f62ce514 Flash: cmdlen constructor arg renamed cmd5. 2020-06-10 14:08:42 +01:00
Peter Hinch e8a29df07b Flash: support override of default command set. 2020-06-08 18:37:54 +01:00
Peter Hinch 33f4dc0658 Document support for extra flash chips. 2020-02-13 14:01:02 +00:00
Peter Hinch cb1c33303e Save problematic version. 2020-02-13 09:09:07 +00:00
Peter Hinch 82104ac4cc Add delay after Pyboard D 3V3 enable - docs and test scripts. 2020-02-11 17:07:22 +00:00
Peter Hinch 4a55115a5d FLASH.md correction. 2020-02-11 14:36:54 +00:00
Peter Hinch 9c35fb6e98 Flash: extend support to smaller chips. Add note re CS pullups. 2020-02-11 12:16:02 +00:00
Daniel Thompson 8105da265b flash_spi: Generalize to support chips with 24-bit addresses
Currently flash_spi.py is hardcoded for a small set of devices, all of
which can use 4-byte addressing. Fix this by allowing the command set and
address generation to be switched dynamically.

We also remove the whitelist of tested devices since the interfaces used
is very common amoung different flash devices. However as a safety measure
the user can provide the expected flash size and this will be checked
against the density field.
2020-02-09 16:51:01 +00:00
Peter Hinch 9466ad2061 Add ESP8266 tests. 2020-01-11 18:02:19 +00:00
Peter Hinch bc8b29ea84 Testing complete. 2020-01-10 18:46:57 +00:00
Peter Hinch cdef377f38 Prior to refactor branch. 2020-01-01 14:15:40 +00:00
Peter Hinch e7a47ad1fb Directory structure: technology/interface. 2019-12-30 10:51:19 +00:00
Peter Hinch fb0b7ab371 Directory structure: technology/interface. 2019-12-30 10:48:46 +00:00
Peter Hinch 7f997f2746 Flash: filesystem now automatically synchronised. _dirty flag implemented. 2019-12-30 09:51:10 +00:00
Peter Hinch 4b27d4ce3d flash driver checks prior sector erasure. Add littlefs_test. 2019-12-26 18:08:59 +00:00
Peter Hinch 49991d1e02 First pass at flash driver. 2019-12-24 15:16:09 +00:00
Peter Hinch 04d8c9b85a Tested with 256KiB STM chip. SPI bug fixed. 2019-12-21 09:26:47 +00:00
Peter Hinch 07def0505c Tested with 256KiB STM chip. SPI bug fixed. 2019-12-21 09:25:32 +00:00
Peter Hinch 4624fb41c6 Littlefs support. Test scripts adapted to use it. 2019-12-20 15:19:21 +00:00
Peter Hinch d792a2be7f Prepare for STM chip. Devolve further code to base class. 2019-12-18 17:24:50 +00:00
Peter Hinch ebea14bd6f Remove outdated info on ESP8266 2019-12-17 19:39:08 +00:00
Peter Hinch 801504bfb9 SPI.md tidy up table. 2019-12-17 17:40:57 +00:00
Peter Hinch 912e6629d5 Grappling with markdown. 2019-12-17 17:33:47 +00:00
Peter Hinch ea252e0308 Grappling with markdown. 2019-12-17 17:32:33 +00:00
Peter Hinch 236f46265b Grappling with markdown. 2019-12-17 17:30:39 +00:00
Peter Hinch ce9f220d30 Grappling with markdown. 2019-12-17 17:29:15 +00:00
Peter Hinch 590a9c4c7e Grappling with markdown. 2019-12-17 17:25:05 +00:00
Peter Hinch aafae3262a Grappling with markdown. 2019-12-17 17:23:20 +00:00
Peter Hinch f52ec86c32 Add FRAM. Various minor changes. 2019-12-17 17:16:50 +00:00
Peter Hinch 985c09ae4f Add FRAM. Various minor changes. 2019-12-17 17:10:43 +00:00
Peter Hinch 6a86e2aadd Doc improvements 2019-12-15 06:30:52 +00:00
Peter Hinch 1c659ce333 Refactor: common base class in bdevice.py 2019-12-14 12:20:49 +00:00
Peter Hinch 992e35b994 Add SPI support. Reorganise directories. 2019-12-13 18:49:48 +00:00
Peter Hinch 43421c55e7 README fixes. 2019-12-11 09:35:37 +00:00
Peter Hinch efe6e366b3 Initial commit. 2019-12-11 09:23:17 +00:00
Peter Hinch e31ff3983d
Initial commit 2019-12-11 06:59:32 +00:00