diff options
Diffstat (limited to 'common_features.mk')
| -rw-r--r-- | common_features.mk | 46 |
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 | ||
| 224 | ifeq ($(strip $(LED_MATRIX_ENABLE)), yes) | 224 | ifeq ($(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 | ||
| 229 | ifneq (,$(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 | ||
| 232 | endif | ||
| 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 | |||
| 347 | VALID_BACKLIGHT_TYPES := pwm timer software custom | 350 | VALID_BACKLIGHT_TYPES := pwm timer software custom |
| 348 | 351 | ||
| 349 | BACKLIGHT_ENABLE ?= no | 352 | BACKLIGHT_ENABLE ?= no |
| 350 | BACKLIGHT_DRIVER ?= pwm | 353 | ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) |
| 354 | BACKLIGHT_DRIVER ?= software | ||
| 355 | else | ||
| 356 | BACKLIGHT_DRIVER ?= pwm | ||
| 357 | endif | ||
| 351 | ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) | 358 | ifeq ($(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 |
| 423 | endif | 430 | endif |
| 424 | 431 | ||
| 425 | ifeq ($(strip $(USB_HID_ENABLE)), yes) | ||
| 426 | include $(TMK_DIR)/protocol/usb_hid.mk | ||
| 427 | endif | ||
| 428 | |||
| 429 | ifeq ($(strip $(WPM_ENABLE)), yes) | 432 | ifeq ($(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 |
| 460 | endif | 463 | endif |
| 461 | 464 | ||
| 465 | VALID_MAGIC_TYPES := yes full lite | ||
| 466 | BOOTMAGIC_ENABLE ?= no | ||
| 467 | ifneq ($(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 | ||
| 478 | endif | ||
| 479 | COMMON_VPATH += $(QUANTUM_DIR)/bootmagic | ||
| 480 | QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c | ||
| 481 | |||
| 462 | VALID_CUSTOM_MATRIX_TYPES:= yes lite no | 482 | VALID_CUSTOM_MATRIX_TYPES:= yes lite no |
| 463 | 483 | ||
| 464 | CUSTOM_MATRIX ?= no | 484 | CUSTOM_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 |
| 676 | endif \ No newline at end of file | 696 | endif |
