From 575db6949abb76d7f75ba69311a9492d7b79108a Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sat, 22 Oct 2022 20:39:39 +0100 Subject: [PATCH] Generalise CTPC logic from common_features (#18803) --- builddefs/build_keyboard.mk | 4 ++++ builddefs/common_features.mk | 6 +----- .../converters/promicro_to_proton_c/post_converter.mk | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 platforms/chibios/converters/promicro_to_proton_c/post_converter.mk diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index cfec9cdebe..499e6ffc69 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -368,6 +368,10 @@ endif # Disable features that a keyboard doesn't support -include $(BUILDDEFS_PATH)/disable_features.mk +ifneq ("$(CONVERTER)","") + -include $(CONVERTER)/post_converter.mk +endif + # Pull in post_rules.mk files from all our subfolders ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","") include $(KEYBOARD_PATH_1)/post_rules.mk diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index 8814d8b0f9..9939e0e5df 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -539,11 +539,7 @@ endif VALID_BACKLIGHT_TYPES := pwm timer software custom BACKLIGHT_ENABLE ?= no -ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) - BACKLIGHT_DRIVER ?= software -else - BACKLIGHT_DRIVER ?= pwm -endif +BACKLIGHT_DRIVER ?= pwm ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),) $(call CATASTROPHIC_ERROR,Invalid BACKLIGHT_DRIVER,BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type) diff --git a/platforms/chibios/converters/promicro_to_proton_c/post_converter.mk b/platforms/chibios/converters/promicro_to_proton_c/post_converter.mk new file mode 100644 index 0000000000..12651bd87c --- /dev/null +++ b/platforms/chibios/converters/promicro_to_proton_c/post_converter.mk @@ -0,0 +1 @@ +BACKLIGHT_DRIVER ?= software