-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for other compatible ICs #4
Comments
Yeah, I think this makes sense. To be honest, I’m not sure I would define special structure for this and maybe just pass in the memory size. Argument for: I don’t need to have an array of every size defined and usually the page size is in the part number. Argument against: guarantees sizes are followed properly? |
I see that it would be comfortable for this driver not to have to deal with the page size but if the user passes a too big page size, data will be overwritten. Given an EEPROM IC, I would say that is one of the worst things that can happen. As you said, the page size is something that is immutable for an IC and I would simply expect a driver to abstract me from such a parameter . |
Yeah, I think that’s alright. It’s a difference of opinion and what matters is that it exists and is usable by people. :) |
I added support for many other ICs and got rid of the duplicated code via macros. |
All this has been fixed in https://github.com/eldruin/eeprom24x-rs/releases/tag/v0.3.0 |
There are further ICs that would be supported by this crate. The differences are mostly just the page size. See here.
Because of #2 I would like to wait with adding support for further ICs because it creates even more duplicated code.
Nevertheless, if you need support for a specific compatible IC, post a comment in this issue and I will add support for it and release a new version of the crate.
The text was updated successfully, but these errors were encountered: