mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
Merge pull request #17912 from benpicco/pkg/fatfs-rtt_rtc
pkg/fatfs, shell: enable RTC support if rtt_rtc is used
This commit is contained in:
commit
b94dd60978
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
@ -278,7 +278,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
|
||||
|
Loading…
Reference in New Issue
Block a user