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

pkg/fatfs, shell: enable RTC support if rtt_rtc is used #17912

Merged
merged 2 commits into from
May 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/fatfs/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ ifneq (,$(filter vfs_auto_format,$(USEMODULE)))
endif

# Use RTC for timestamps if available
FEATURES_OPTIONAL += periph_rtc
ifeq (,$(filter rtt_rtc,$(USEMODULE)))
FEATURES_OPTIONAL += periph_rtc
endif
6 changes: 3 additions & 3 deletions pkg/fatfs/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
endif

#if periph_rtc is available use it. Otherwise use static timestamps
ifneq (,$(filter periph_rtc,$(USEMODULE)))
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=0
else
ifeq (,$(filter rtt_rtc periph_rtc,$(USEMODULE)))
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
else
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=0
endif

ifeq ($(OS),Darwin)
Expand Down
2 changes: 1 addition & 1 deletion sys/shell/commands/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ifneq (,$(filter lwip_netif,$(USEMODULE)))
SRC += sc_lwip_netif.c
endif

ifneq (,$(filter periph_rtc,$(USEMODULE)))
ifneq (,$(filter rtt_rtc periph_rtc,$(USEMODULE)))
SRC += sc_rtc.c
endif

Expand Down
4 changes: 2 additions & 2 deletions sys/shell/commands/shell_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extern int _at30tse75x_handler(int argc, char **argv);
extern int _saul(int argc, char **argv);
#endif

#ifdef MODULE_PERIPH_RTC
#if defined(MODULE_PERIPH_RTC) || defined(MODULE_RTT_RTC)
extern int _rtc_handler(int argc, char **argv);
#endif

Expand Down Expand Up @@ -262,7 +262,7 @@ const shell_command_t _shell_command_list[] = {
{ "random_init", "initializes the PRNG", _random_init },
{ "random_get", "returns 32 bit of pseudo randomness", _random_get },
#endif
#ifdef MODULE_PERIPH_RTC
#if defined(MODULE_PERIPH_RTC) || defined(MODULE_RTT_RTC)
{"rtc", "control RTC peripheral interface", _rtc_handler},
#endif
#ifdef MODULE_RTT_CMD
Expand Down