-
Notifications
You must be signed in to change notification settings - Fork 2k
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
drivers/mtd_spi_eeprom: add MTD wrapper for AT25XXX EEPROMs #13877
drivers/mtd_spi_eeprom: add MTD wrapper for AT25XXX EEPROMs #13877
Conversation
It looks like there are many unrelated changes, am I correct here? I would like to see the base implementation + tests in one PR and then changes to the boards if needed. |
@JokoMLPA please do a Alternatively, since this is only one commit, you can also do a
|
b1ce9f4
to
5d50077
Compare
Can you please also add a simple test application to |
a6d5e9c
to
1e8535b
Compare
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.
Works like a charm - tested with examples/filesystem
(requires #14006).
One more thing - can you please add this patch:
--- a/drivers/Makefile.dep
+++ b/drivers/Makefile.dep
@@ -509,6 +509,10 @@ endif
ifneq (,$(filter mtd_%,$(USEMODULE)))
USEMODULE += mtd
+ ifneq (,$(filter mtd_at25xxx,$(USEMODULE)))
+ USEMODULE += at25xxx
+ endif
+
ifneq (,$(filter mtd_sdcard,$(USEMODULE)))
USEMODULE += sdcard_spi
endif
So all the user has to do is USEMODULE += mtd_at25xxx
and then dependencies will be resolved automatically.
Please squash! |
253cda6
to
16d6ce5
Compare
Nitpick: Add a colon to the commit message after the subsystem ( |
drivers/at25xxx: add mtd_wrapper as submodule tests: add mtd_at25xxx test module for mtd wrapper drivers/Makefile.dep: add at25xxx dep for mtd_at25xxx module
16d6ce5
to
177a653
Compare
Contribution description
Adding mtd wrapper for SPI-EEPROMs like at25xxx or M95xxx using mtd interface.
The structure is similar to mtd_flashpage or mtd_sdcard.
Testing procedure
You can test the driver using RIOT/examples/filesystem (via littlefs). You need to define MTD0 in your board.h and create a mtd_spi_eeprom_t configuration containing the driver parameters, which has to be passed to the mtd layer.
Issues/PRs references