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
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,5 @@ USEMODULE += fatfs_diskio_mtd ...@@ -2,11 +2,5 @@ USEMODULE += fatfs_diskio_mtd
USEMODULE += auto_init_storage USEMODULE += auto_init_storage
USEMODULE += mtd USEMODULE += mtd
include $(RIOTBASE)/boards/$(BOARD)/Makefile.features # Use RTC for timestamps if available
FEATURES_OPTIONAL += periph_rtc
#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
...@@ -9,6 +9,13 @@ ifneq (,$(filter fatfs_vfs,$(USEMODULE))) ...@@ -9,6 +9,13 @@ ifneq (,$(filter fatfs_vfs,$(USEMODULE)))
DIRS += $(RIOTBASE)/pkg/fatfs/fatfs_vfs DIRS += $(RIOTBASE)/pkg/fatfs/fatfs_vfs
endif 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) ifeq ($(shell uname -s),Darwin)
CFLAGS += -Wno-empty-body CFLAGS += -Wno-empty-body
endif endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment