aboutsummaryrefslogtreecommitdiff
path: root/common_features.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common_features.mk')
-rw-r--r--common_features.mk46
1 files changed, 33 insertions, 13 deletions
diff --git a/common_features.mk b/common_features.mk
index 8c9d0a90c..1a9fd46b5 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -223,14 +223,17 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
223 223
224ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) 224ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
225 ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),) 225 ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
226 $(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type) 226 $(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
227 else
228 BACKLIGHT_ENABLE = yes
229 BACKLIGHT_DRIVER = custom
230 OPT_DEFS += -DLED_MATRIX_ENABLE
231 SRC += $(QUANTUM_DIR)/led_matrix.c
232 SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
233 endif 227 endif
228 OPT_DEFS += -DLED_MATRIX_ENABLE
229ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
230 # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
231 OPT_DEFS += -DLIB8_ATTINY
232endif
233 SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
234 SRC += $(QUANTUM_DIR)/led_matrix.c
235 SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
236 CIE1931_CURVE := yes
234 237
235 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731) 238 ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
236 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE 239 OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
@@ -347,7 +350,11 @@ endif
347VALID_BACKLIGHT_TYPES := pwm timer software custom 350VALID_BACKLIGHT_TYPES := pwm timer software custom
348 351
349BACKLIGHT_ENABLE ?= no 352BACKLIGHT_ENABLE ?= no
350BACKLIGHT_DRIVER ?= pwm 353ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
354 BACKLIGHT_DRIVER ?= software
355else
356 BACKLIGHT_DRIVER ?= pwm
357endif
351ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) 358ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
352 ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) 359 ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
353 $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) 360 $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
@@ -422,10 +429,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
422 OPT_DEFS += -DUSER_PRINT 429 OPT_DEFS += -DUSER_PRINT
423endif 430endif
424 431
425ifeq ($(strip $(USB_HID_ENABLE)), yes)
426 include $(TMK_DIR)/protocol/usb_hid.mk
427endif
428
429ifeq ($(strip $(WPM_ENABLE)), yes) 432ifeq ($(strip $(WPM_ENABLE)), yes)
430 SRC += $(QUANTUM_DIR)/wpm.c 433 SRC += $(QUANTUM_DIR)/wpm.c
431 OPT_DEFS += -DWPM_ENABLE 434 OPT_DEFS += -DWPM_ENABLE
@@ -459,6 +462,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
459 SRC += $(QUANTUM_DIR)/dip_switch.c 462 SRC += $(QUANTUM_DIR)/dip_switch.c
460endif 463endif
461 464
465VALID_MAGIC_TYPES := yes full lite
466BOOTMAGIC_ENABLE ?= no
467ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
468 ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
469 $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
470 endif
471 ifneq ($(strip $(BOOTMAGIC_ENABLE)), full)
472 OPT_DEFS += -DBOOTMAGIC_LITE
473 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
474 else
475 OPT_DEFS += -DBOOTMAGIC_ENABLE
476 QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.c
477 endif
478endif
479COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
480QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
481
462VALID_CUSTOM_MATRIX_TYPES:= yes lite no 482VALID_CUSTOM_MATRIX_TYPES:= yes lite no
463 483
464CUSTOM_MATRIX ?= no 484CUSTOM_MATRIX ?= no
@@ -673,4 +693,4 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
673 # Board designers can add their own driver to $(SRC) 693 # Board designers can add their own driver to $(SRC)
674 endif 694 endif
675 endif 695 endif
676endif \ No newline at end of file 696endif