-
Notifications
You must be signed in to change notification settings - Fork 94
add Cypress/Ramtron FRAM support + add readManufacturerId() function #14
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Hi Felix ! |
Thanks much, I need to look into this in more detail! |
Hi Felix, |
Hi Felix, |
jedecid |= SPI.transfer(0); | ||
if (jedecid == 0x7F7F) { // The 0x7F7F signature means it is a Cypress/Ramtron chip, the real ID will follow in additionnal bytes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Device specific logic should be kept out of library code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the whole Cypress/Ramtron family is using the 7F7F as a "continuation" ID because the returned ID is in fact 72 bits instead 24 bits like most other chips.
I looked at the code a while ago and I think the conclusion was that because there is device specific code in there, my gut tells me I should not merge that. It's too specific to a particular chip, this is a generic library. An inherited class derivation is more appropriate. If you submit that I can probably merge something like that. Thanks |
As mentioned above, the whole Cypress/Ramtron family is using the 7F7F as a "continuation" ID because the returned ID is in fact 72 bits instead 24 bits like most other chips. So, your library will simply not support them ... |
add Cypress/Ramtron FRAM support + add readManufacturerId() function