drivers/mtd_sdcard : Expose Configurations to Kconfig #13932
Merged
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
This PR exposes compile configurations in MTD SD Card Storage driver to Kconfig.
Important
MTD_SDCARD_SKIP_ERASE to be deprecated and CONFIG_MTD_SDCARD_ERASE introduced.MTD_SDCARD_SKIP_ERASE removed and CONFIG_MTD_SDCARD_ERASE introduced, since the feature is not implemented yet.
Testing procedure
Doxygen build works fine.
Following Macro was introduced in main.c for testing.
USEMODULE += mtd_sdcard introduced in make file.
Default State:
Firmware Output
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2020.07-devel-174-g79e16-Kconfig_mtd_sdcard_tests)
CONFIG_MTD_SDCARD_ERASE=CONFIG_MTD_SDCARD_ERASE
MTD_SDCARD_SKIP_ERASE=(1)
Usage with CFLAGS
New File -> /tests/driver_mtd_sdcard/Makefile
Firmware Output
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2020.07-devel-174-g79e16-Kconfig_mtd_sdcard_tests)
CONFIG_MTD_SDCARD_ERASE=1
MTD_SDCARD_SKIP_ERASE=(0)
Usage with Kconfig
New Folder -> /tests/driver_mtd_sdcard
Firmware Output
RIOT native interrupts/signals initialized.
LED_RED_OFF
LED_GREEN_ON
RIOT native board initialized.
RIOT native hardware initialization complete.
main(): This is RIOT! (Version: 2020.07-devel-174-g79e16-Kconfig_mtd_sdcard_tests)
CONFIG_MTD_SDCARD_ERASE=1
MTD_SDCARD_SKIP_ERASE=(0)
Note : Hardware is not available fro interfacing hence configurability of macros were only tested.
Issues/PRs references
#12888
@leandrolanzieri