[riot-notifications] [RIOT-OS/RIOT] drivers: add driver for M95xxx family of EEPROMs (#11945)

benpicco notifications at github.com
Wed Jul 31 20:54:19 CEST 2019

### Contribution description

ST offers SPI based EEPROMs from the M95xxx family.
I've tested it with the [M95M01](https://www.st.com/resource/en/datasheet/m95m01-r.pdf) EEPROM. Other variants exist that differ in page size and address length, but follow the same command scheme.

I've decided to make both page size and address length a compile-time constant as it allows for compile-time optimizations and the I considered likelihood of having two EEPROMs of different type on the same board to be rather slim.

I can move those parameters to `m95xxx_params_t` if desired.

The EEPROM interface definition is blatantly stolen from #11929, but no `periph_eeprom` compatibility wrapper is provided yet. 

### Testing procedure
- connect an EEPROM to the SPI bus
- set `M95XXX_PARAM_…` according do your board and EEPROM device
- run `tests/driver_m95xxx`

### Issues/PRs references
This provides an SPI Implementation analogous to the I2C EEPROM implementation in #11929

### Further Note
I just realized I should better rename this driver [AT25xxx](https://www.espruino.com/AT25) since that seems to be the common name for these modules.

So we'll have
 - AT24xxx -> I2C EEPROM
 - AT25xxx -> SPI EEPROM
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * drivers: add M95xxx series EEPROM
  * tests: add test for m95xxx EEPROM driver

-- File Changes --

    M drivers/Makefile.dep (4)
    M drivers/Makefile.include (4)
    A drivers/include/m95xxx.h (145)
    A drivers/m95xxx/Makefile (1)
    A drivers/m95xxx/include/m95xxx_params.h (80)
    A drivers/m95xxx/m95xxx.c (205)
    A tests/driver_m95xxx/Makefile (7)
    A tests/driver_m95xxx/README.md (8)
    A tests/driver_m95xxx/main.c (114)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190731/f99e90ec/attachment.htm>

More information about the notifications mailing list