add Cypress/Ramtron FRAM support + add readManufacturerId() function#14
add Cypress/Ramtron FRAM support + add readManufacturerId() function#14martinayotte wants to merge 4 commits intoLowPowerLab:masterfrom
Conversation
|
Hi Felix ! |
|
Thanks much, I need to look into this in more detail! |
|
Hi Felix, |
|
Hi Felix, |
| uint32_t jedecid = SPI.transfer(0) << 16; | ||
| jedecid |= SPI.transfer(0) << 8; | ||
| 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.
Device specific logic should be kept out of library code.
There was a problem hiding this comment.
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