Skip to content
Snippets Groups Projects
Unverified Commit c7de150e authored by Gaëtan Harter's avatar Gaëtan Harter
Browse files

pkg/fatfs: fix declaration of periph_rtc optional dependency

* Declare optional dependency to periph_rtc
* Move CFLAGS definition to Makefile.include
parent 58500f92
Branches
No related tags found
No related merge requests found
......@@ -2,11 +2,5 @@ USEMODULE += fatfs_diskio_mtd
USEMODULE += auto_init_storage
USEMODULE += mtd
include $(RIOTBASE)/boards/$(BOARD)/Makefile.features
#if periph_rtc is available use it. Otherwise use static timestamps
ifneq (, $(filter periph_rtc, $(FEATURES_PROVIDED)))
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=0
else
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
endif
# Use RTC for timestamps if available
FEATURES_OPTIONAL += periph_rtc
......@@ -9,6 +9,13 @@ ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
DIRS += $(RIOTBASE)/pkg/fatfs/fatfs_vfs
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
CFLAGS += -DFATFS_FFCONF_OPT_FS_NORTC=1
endif
ifeq ($(shell uname -s),Darwin)
CFLAGS += -Wno-empty-body
endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment