Open
Conversation
crasbe
reviewed
Mar 30, 2026
Contributor
crasbe
left a comment
There was a problem hiding this comment.
The static test has some comments too and why is mtd_eeprom.h sometimes conditionally and sometimes unconditionally included? 🤔
| #if MODULE_MTD_EEPROM | ||
| static mtd_eeprom_t eeprom_mtd = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(eeprom_mtd, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
Contributor
There was a problem hiding this comment.
The closing bracket for Doxygen is misisng.
| #endif | ||
|
|
||
| #if MODULE_MTD_EEPROM | ||
| #include "mtd_eeprom.h" |
Contributor
There was a problem hiding this comment.
Suggested change
| #include "mtd_eeprom.h" | |
| # include "mtd_eeprom.h" |
| #if MODULE_MTD_EEPROM | ||
| static mtd_eeprom_t eeprom_mtd = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(eeprom_mtd, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
boards/common/nucleo/board_common.c
Outdated
| * @{ | ||
| * | ||
| * @file | ||
| * @brief Definitions for all atmega boards. |
| #if MODULE_MTD_EEPROM | ||
| static mtd_eeprom_t eeprom_mtd = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(eeprom_mtd, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
Contributor
Author
There was a problem hiding this comment.
in this file the Doxygen closing bracket is present
| #if MODULE_MTD_EEPROM | ||
| static mtd_eeprom_t eeprom_mtd = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(eeprom_mtd, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
| #if MODULE_MTD_EEPROM | ||
| static mtd_eeprom_t eeprom_mtd = MTD_EEPROM_INIT_VAL; | ||
| MTD_XFA_ADD(eeprom_mtd, 0); | ||
| #endif /* MODULE_MTD_EEPROM */ |
|
|
||
| /** | ||
| * @{ | ||
| * |
Comment on lines
+3
to
+7
| # Copyright (C) 2026 ML!PA Consulting GmbH | ||
| # | ||
| # This file is subject to the terms and conditions of the GNU Lesser | ||
| # General Public License v2.1. See the file LICENSE in the top level | ||
| # directory for more details. |
Contributor
There was a problem hiding this comment.
Please migrate this to SPDX.
tests/sys/eepreg/main.c
Outdated
|
|
||
| #define DAT_START (EEPROM_SIZE - EEPROM_RESERV_CPU_HI \ | ||
| #ifndef TEST_EEPREG_MTD | ||
| #define TEST_EEPREG_MTD MTD_0 |
Contributor
There was a problem hiding this comment.
Suggested change
| #define TEST_EEPREG_MTD MTD_0 | |
| # define TEST_EEPREG_MTD MTD_0 |
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
Add an MTD to the EEPROM registry API, so that other MTD (EEPROMS) can also be used.
mtd_eepromto boards that supportperiph/eepromTesting procedure
USEMODULE+=at24mac CFLAGS+=-DTEST_EEPREG_MTD="mtd_dev_get\(1\)" DEVELHELP=1 VERBOSE_ASSERT=1 make -C tests/sys/eepreg/ BOARD=same54-xpro flash termIssues/PRs references