-
Notifications
You must be signed in to change notification settings - Fork 2.1k
sys/eepreg: use MTD #22158
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
Open
fabian18
wants to merge
8
commits into
RIOT-OS:master
Choose a base branch
from
fabian18:pr/eepreg_mtd
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
sys/eepreg: use MTD #22158
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
63d6a26
sys/eepreg: API change: use MTD
fabian18 61c2efa
drivers: add mtd_eeprom for internal EEPROM
fabian18 5e51433
boards: add mtd_eeprom for atmega boards
fabian18 e68eb3a
boards: add mtd_eeprom for nucleo boards
fabian18 a6231bb
boards: add mtd_eeprom for native
fabian18 9cf6b13
tests/drivers: add mtd_eeprom test
fabian18 9e199f3
boards: expose default EEPROM MTD
fabian18 3843d2b
boards: drop MTD_0 for MTD EEPROM
fabian18 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| USEMODULE += boards_common_arduino-atmega | ||
|
|
||
| include $(RIOTBOARD)/common/arduino-atmega/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| USEMODULE += boards_common_arduino-atmega | ||
|
|
||
| include $(RIOTBOARD)/common/arduino-atmega/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| USEMODULE += boards_common_arduino-atmega | ||
|
|
||
| include $(RIOTBOARD)/common/arduino-atmega/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| USEMODULE += boards_common_arduino-atmega | ||
|
|
||
| include $(RIOTBOARD)/common/arduino-atmega/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| USEMODULE += boards_common_atmega | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_common_atmega | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Definitions for all atmega boards. | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ | ||
|
crasbe marked this conversation as resolved.
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_common_nucleo | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Definitions for all nucleo boards. | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ | ||
|
crasbe marked this conversation as resolved.
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| USEMODULE += boards_common_atmega | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_i-nucleo-lrwan1 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific initialization for I-Nucleo-LRWAN1 | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ | ||
|
crasbe marked this conversation as resolved.
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ifneq (,$(filter netdev_default,$(USEMODULE))) | ||
| USEMODULE += sx1272 | ||
| endif | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_im880b | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific initialization for IM880B | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ | ||
|
crasbe marked this conversation as resolved.
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ifneq (,$(filter saul_default,$(USEMODULE))) | ||
| USEMODULE += lis3mdl | ||
| endif | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_limifrog-v1 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific initialization for LIMIFROG-V1 | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ | ||
|
crasbe marked this conversation as resolved.
|
||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,7 @@ | ||
| ifneq (,$(filter netdev_default,$(USEMODULE))) | ||
| USEMODULE += sx1276 | ||
| endif | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2026 ML!PA Consulting GmbH | ||
| * SPDX-License-Identifier: LGPL-2.1-only | ||
| */ | ||
|
|
||
| /** | ||
| * @ingroup boards_lsn50 | ||
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Board specific initialization for Dragino LSN50 | ||
| * | ||
| * @author Fabian Hüßler <fabian.huessler@ml-pa.com> | ||
| * | ||
| * @} | ||
| */ | ||
|
|
||
| #include "board.h" | ||
| #include "mtd_eeprom.h" | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| mtd_eeprom_t mtd_eeprom = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(mtd_eeprom, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| USEMODULE += boards_common_atmega | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| include $(RIOTBOARD)/common/nucleo32/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| include $(RIOTBOARD)/common/nucleo64/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| include $(RIOTBOARD)/common/nucleo64/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,5 @@ | ||
| include $(RIOTBOARD)/common/nucleo64/Makefile.dep | ||
|
|
||
| ifneq (,$(filter mtd,$(USEMODULE))) | ||
| USEMODULE += mtd_eeprom | ||
| endif |
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Even though this is not a define, I'd propose to call it
MTD_EEPROMto reduce the confusion with the module.But still, there is confusion potential between the module and the MTD device when both have the same name 😅
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.
But I don't have a better name for the MTD device unfortunately :(