drivers: add driver for AT25xxx family of EEPROMs#11945
Merged
aabadie merged 2 commits intoRIOT-OS:masterfrom Apr 7, 2020
Merged
drivers: add driver for AT25xxx family of EEPROMs#11945aabadie merged 2 commits intoRIOT-OS:masterfrom
aabadie merged 2 commits intoRIOT-OS:masterfrom
Conversation
612968d to
46e3d18
Compare
46e3d18 to
d6dd452
Compare
maribu
reviewed
Aug 27, 2019
Member
maribu
left a comment
There was a problem hiding this comment.
Looks very good to me. I have some inline-comments. But I guess we should wait if an agreement about a common EEPROM API can be reached within reasonable time, so that using external EEPROM devices becomes easier.
kaspar030
reviewed
Feb 24, 2020
kaspar030
reviewed
Feb 24, 2020
fabian18
reviewed
Feb 25, 2020
Contributor
fabian18
left a comment
There was a problem hiding this comment.
The code looks pretty slim and clean in my eyes. Have a look at inline comments.
939103d to
37a7aba
Compare
Contributor
Author
|
Rebased to current master |
3cd680e to
ee0f483
Compare
Contributor
|
@benpicco could you post some test output? |
Contributor
Author
Which reminds me - I should probably remove that additional debug output. |
Contributor
Author
|
aabadie
reviewed
Apr 7, 2020
aabadie
reviewed
Apr 7, 2020
aabadie
reviewed
Apr 7, 2020
Contributor
|
Sorry, I just noticed one last thing regarding doxygen. Without this, the module would have appeared in the first level modules list. |
This adds a driver for the ST M95xxx series SPI EEPROMs. The driver has been tested with the M95M01 EEPROM, but should work with other chips from that family. SPI-EEPROMs from other vendors from the families AT25xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx should also in the same way.
aabadie
approved these changes
Apr 7, 2020
Contributor
Author
|
Thank you for the review! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
ST offers SPI based EEPROMs from the M95xxx family.
I've tested it with the M95M01 EEPROM. Other variants exist that differ in page size and address length, but follow the same command scheme.
Devices from other vendors that function in the same way include the families AT25xxx, 25AAxxx, 25LCxxx, CAT25xxx & BR25Sxxx.
I've decided to make
both page size andaddress 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
at25xxx_params_tif desired.The EEPROM interface definition is blatantly stolen from #11929, but no
periph_eepromcompatibility wrapper is provided yet.Testing procedure
AT25XXX_PARAM_…according do your board and EEPROM devicetests/driver_at25xxxIssues/PRs references
will be converted to the new EEPROM API once #12091 is finalized.
This provides an SPI Implementation analogous to the I2C EEPROM implementation in #11929
So we'll have