1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/fatfs: fix declaration of periph_rtc optional dependency

* Declare optional dependency to periph_rtc
* Move CFLAGS definition to Makefile.include
This commit is contained in:
Gaëtan Harter 2018-06-05 10:12:03 +02:00
parent 58500f92c5
commit c7de150ec3
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B
2 changed files with 9 additions and 8 deletions

View File

@ -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

View File

@ -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