eldruin / eeprom24x-rs

Platform agnostic Rust driver for 24x series serial EEPROM devices using embedded-hal

Home Page:https://blog.eldruin.com/24x-serial-eeprom-driver-in-rust/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for 24CSx parts

kiranshila opened this issue · comments

Hey, thanks for the great library! Quick question - is there support yet for the 24CSx parts (the ones with baked in unique IDs)? I'm working specifically with the AT24CSW010. If not, would you be interested in a PR?

Hi. There is no support for those parts yet. I would indeed be glad for a PR adding support for them.
This could be done by adding a new marker type to Eeprom24x, so that additional CS-series-specific methods are available only when using such device. This spares everybody else of matching errors that can never happen due to the chip choice.
Then you will need to tweak the creation macros to add a method like new_24csw01 or similar.
I would not bother adding support for the x in AT24CSW01x since that can already be achieved through the SlaveAddr type.