Skip to content
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

drivers/mtd_sdcard : Expose Configurations to Kconfig #13932

Merged
merged 2 commits into from
May 4, 2020

Conversation

akshaim
Copy link
Member

@akshaim akshaim commented Apr 23, 2020

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.

#define STR(x)   #x
#define SHOW_DEFINE(x) printf("%s=%s\n", #x, STR(x))

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

CFLAGS += -DCONFIG_MTD_SDCARD_ERASE=1

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

make menuconfig

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

@leandrolanzieri leandrolanzieri added Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration Type: new feature The issue requests / The PR implemements a new feature for RIOT labels Apr 23, 2020
@leandrolanzieri leandrolanzieri added this to the Release 2020.07 milestone Apr 23, 2020
@leandrolanzieri leandrolanzieri added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 23, 2020
drivers/Kconfig.net Outdated Show resolved Hide resolved
@akshaim akshaim force-pushed the Kconfig_mtd_sdcard_1 branch from 233c780 to ec80878 Compare May 4, 2020 12:25
@akshaim akshaim force-pushed the Kconfig_mtd_sdcard_1 branch from f08f59c to 5be8069 Compare May 4, 2020 16:38
akshaim added 2 commits May 4, 2020 22:12
Replace MTD_SDCARD_SKIP_ERASE with MTD_SDCARD_ERASE
Add CONFIG_ Prefix to MTD_SDCARD_ERASE
Model CONFIG_MTD_SDCARD_ERASE as bool
Expose Configurations to Kconfig
@akshaim akshaim force-pushed the Kconfig_mtd_sdcard_1 branch from 5be8069 to 9737db9 Compare May 4, 2020 16:42
Copy link
Contributor

@leandrolanzieri leandrolanzieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@leandrolanzieri leandrolanzieri merged commit 1fe30c1 into RIOT-OS:master May 4, 2020
@akshaim akshaim deleted the Kconfig_mtd_sdcard_1 branch May 5, 2020 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: drivers Area: Device drivers Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants