X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=common_features.mk;h=8c3361732cd018691be945344770977308947396;hb=bcb18154206332c85e500ef65bffa98be6ac1cb7;hp=8f53a82aaecaabef5b56cd5b6a7b37363742fa63;hpb=40313cfa3b4a4f1643382f0446e0a889ef3e76dc;p=qmk_firmware.git diff --git a/common_features.mk b/common_features.mk index 8f53a82aa..8c3361732 100644 --- a/common_features.mk +++ b/common_features.mk @@ -225,6 +225,13 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes) OPT_DEFS += -DENCODER_ENABLE endif +ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L) + COMMON_VPATH += $(DRIVER_PATH)/haptic + SRC += DRV2605L.c + SRC += i2c_master.c + OPT_DEFS += -DDRV2605L +endif + ifeq ($(strip $(HD44780_ENABLE)), yes) SRC += drivers/avr/hd44780.c OPT_DEFS += -DHD44780_ENABLE @@ -240,11 +247,14 @@ ifeq ($(strip $(LEADER_ENABLE)), yes) OPT_DEFS += -DLEADER_ENABLE endif +include $(DRIVER_PATH)/qwiic/qwiic.mk + QUANTUM_SRC:= \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c +# Include the standard or split matrix code if needed ifneq ($(strip $(CUSTOM_MATRIX)), yes) ifeq ($(strip $(SPLIT_KEYBOARD)), yes) QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c @@ -253,10 +263,25 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes) endif endif +# Include the standard debounce code if needed +ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes) + QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c +endif + ifeq ($(strip $(SPLIT_KEYBOARD)), yes) OPT_DEFS += -DSPLIT_KEYBOARD + + # Include files used by all split keyboards QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \ - $(QUANTUM_DIR)/split_common/split_util.c \ - $(QUANTUM_DIR)/split_common/i2c.c \ - $(QUANTUM_DIR)/split_common/serial.c + $(QUANTUM_DIR)/split_common/split_util.c + + # Determine which (if any) transport files are required + ifneq ($(strip $(SPLIT_TRANSPORT)), custom) + QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c + # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called. + # Unused functions are pruned away, which is why we can add both drivers here without bloat. + QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \ + $(QUANTUM_DIR)/split_common/serial.c + endif + COMMON_VPATH += $(QUANTUM_PATH)/split_common endif