diff options
author | Joy Lee <chang.li@westberrytech.com> | 2022-02-12 04:26:16 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 20:26:16 +0000 |
commit | 71c0b97bced7722abaa0adefd57066cc065538b5 (patch) | |
tree | 6f50c8a53fb7a7faae949154351be658ce5144e8 /builddefs | |
parent | 00cc64638c7ffa90b1acc10c420daaa3795a87ba (diff) | |
download | qmk_firmware-71c0b97bced7722abaa0adefd57066cc065538b5.tar.gz qmk_firmware-71c0b97bced7722abaa0adefd57066cc065538b5.zip |
Added external spi flash driver. (#15419)
Diffstat (limited to 'builddefs')
-rw-r--r-- | builddefs/common_features.mk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index db9b580286..08d186d656 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -219,6 +219,21 @@ else endif endif +VALID_FLASH_DRIVER_TYPES := spi +FLASH_DRIVER ?= no +ifneq ($(strip $(FLASH_DRIVER)), no) + ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),) + $(error FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid FLASH driver) + else + OPT_DEFS += -DFLASH_ENABLE + ifeq ($(strip $(FLASH_DRIVER)), spi) + OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI + COMMON_VPATH += $(DRIVER_PATH)/flash + SRC += flash_spi.c + endif + endif +endif + RGBLIGHT_ENABLE ?= no VALID_RGBLIGHT_TYPES := WS2812 APA102 custom |