From 4896dd69283e9f3285fa1467cf3d9382947bebab Mon Sep 17 00:00:00 2001 From: zvecr Date: Sun, 17 Oct 2021 20:43:47 +0100 Subject: [PATCH 1/3] DRIVER -> ENABLE --- common_features.mk | 26 +++++++------------ docs/feature_haptic_feedback.md | 7 +++-- docs/ja/feature_haptic_feedback.md | 7 +++-- generic_features.mk | 1 + keyboards/boston_meetup/2019/rules.mk | 3 ++- keyboards/c39/keymaps/drashna/rules.mk | 3 ++- keyboards/hadron/ver3/rules.mk | 3 ++- .../model_m_4th_gen/overnumpad_1xb/rules.mk | 3 ++- keyboards/splitkb/zima/rules.mk | 7 ++--- .../overnumpad_1xb/rules.mk | 3 ++- .../overnumpad_1xb/rules.mk | 4 ++- .../overnumpad_1xb/rules.mk | 3 ++- .../overnumpad_1xb/rules.mk | 3 ++- keyboards/xw60/rules.mk | 3 ++- layouts/community/ortho_4x12/drashna/rules.mk | 1 - lib/python/qmk/info.py | 5 ---- 16 files changed, 44 insertions(+), 38 deletions(-) diff --git a/common_features.mk b/common_features.mk index aff91641e42a..58689622821a 100644 --- a/common_features.mk +++ b/common_features.mk @@ -495,23 +495,17 @@ ifeq ($(strip $(CRC_ENABLE)), yes) SRC += crc.c endif -HAPTIC_ENABLE ?= no -ifneq ($(strip $(HAPTIC_ENABLE)),no) - COMMON_VPATH += $(DRIVER_PATH)/haptic - OPT_DEFS += -DHAPTIC_ENABLE - SRC += $(QUANTUM_DIR)/haptic.c - SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c -endif - -ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), ) - SRC += DRV2605L.c - QUANTUM_LIB_SRC += i2c_master.c - OPT_DEFS += -DDRV2605L -endif +ifeq ($(strip $(HAPTIC_ENABLE)),yes) + ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), ) + SRC += DRV2605L.c + QUANTUM_LIB_SRC += i2c_master.c + OPT_DEFS += -DDRV2605L + endif -ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), ) - SRC += solenoid.c - OPT_DEFS += -DSOLENOID_ENABLE + ifneq ($(filter SOLENOID, $(HAPTIC_DRIVER)), ) + SRC += solenoid.c + OPT_DEFS += -DSOLENOID_ENABLE + endif endif ifeq ($(strip $(HD44780_ENABLE)), yes) diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index a12bb4bcd085..4054c5d9b743 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -4,9 +4,12 @@ The following options are currently available for haptic feedback in `rules.mk`: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes -`HAPTIC_ENABLE += SOLENOID` +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` ## Known Supported Hardware diff --git a/docs/ja/feature_haptic_feedback.md b/docs/ja/feature_haptic_feedback.md index 158079725329..687788014aa5 100644 --- a/docs/ja/feature_haptic_feedback.md +++ b/docs/ja/feature_haptic_feedback.md @@ -9,9 +9,12 @@ 現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes -`HAPTIC_ENABLE += SOLENOID` +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` ## サポートされる既知のハードウェア diff --git a/generic_features.mk b/generic_features.mk index c455c83dd5e5..e5b84e30dff2 100644 --- a/generic_features.mk +++ b/generic_features.mk @@ -25,6 +25,7 @@ GENERIC_FEATURES = \ DYNAMIC_MACRO \ ENCODER \ GRAVE_ESC \ + HAPTIC_ENABLE \ KEY_LOCK \ KEY_OVERRIDE \ LEADER \ diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk index b7b6870a2bee..6468f47b7d90 100644 --- a/keyboards/boston_meetup/2019/rules.mk +++ b/keyboards/boston_meetup/2019/rules.mk @@ -22,6 +22,7 @@ AUDIO_ENABLE = yes # Audio output RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L OLED_ENABLE = yes OLED_DRIVER = SSD1306 diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index c05f6a4be4df..0e5a4cbebdaf 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -13,6 +13,7 @@ COMMAND_ENABLE = yes NKRO_ENABLE = yes AUDIO_ENABLE = yes UNICODE_ENABLE = yes -HAPTIC_ENABLE = SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index ad753a5ff19e..c8681a141898 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -21,7 +21,8 @@ AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no # once arm_rgb is implemented RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLER = yes diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk index 507f4fcd377f..7837adcbd358 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/splitkb/zima/rules.mk b/keyboards/splitkb/zima/rules.mk index ecb6fd7cf175..657475a0208d 100644 --- a/keyboards/splitkb/zima/rules.mk +++ b/keyboards/splitkb/zima/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,8 @@ AUDIO_ENABLE = yes # Audio output ENCODER_ENABLE = yes # ENables the use of one or more encoders OLED_ENABLE = yes -OLED_DRIVER = SSD1306 # Enables the use of OLED displays -HAPTIC_ENABLE += DRV2605L # Supported but not included by defaut +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +HAPTIC_ENABLE = yes # Supported but not included by defaut +HAPTIC_DRIVER = DRV2605L LTO_ENABLE = yes diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk index 507f4fcd377f..7837adcbd358 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk index 30eb89bb7e51..2886985a0d2b 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk @@ -22,5 +22,7 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID + LAYOUTS = fullsize_ansi fullsize_iso diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk index 507f4fcd377f..7837adcbd358 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk index 507f4fcd377f..7837adcbd358 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 5921be64c393..fc192e059328 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -17,6 +17,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 775ad8e6eb47..8c3e126636e1 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -28,7 +28,6 @@ ifeq ($(strip $(KEYBOARD)), planck/light) RGBLIGHT_ENABLE = yes RGBLIGHT_STARTUP_ANIMATION = yes AUDIO_ENABLE = yes - # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) RGBLIGHT_ENABLE = no diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 5eb10e3cef47..c3bbcf3eb0b7 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -112,11 +112,6 @@ def _extract_features(info_data, rules): if rules.get('BOOTMAGIC_ENABLE') == 'full': rules['BOOTMAGIC_ENABLE'] = 'on' - # Skip non-boolean features we haven't implemented special handling for - for feature in ('HAPTIC_ENABLE',): - if rules.get(feature): - del rules[feature] - # Process the rest of the rules as booleans for key, value in rules.items(): if key.endswith('_ENABLE'): From ce2d40a60793bc9bef2acea6a83b7653107fcc6e Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 17 Oct 2021 23:21:37 +0100 Subject: [PATCH 2/3] Update generic_features.mk Co-authored-by: Ryan --- generic_features.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic_features.mk b/generic_features.mk index e5b84e30dff2..ff02d56bbe0a 100644 --- a/generic_features.mk +++ b/generic_features.mk @@ -25,7 +25,7 @@ GENERIC_FEATURES = \ DYNAMIC_MACRO \ ENCODER \ GRAVE_ESC \ - HAPTIC_ENABLE \ + HAPTIC \ KEY_LOCK \ KEY_OVERRIDE \ LEADER \ From e3d39912d3aba876d0f28bdf18888f56087477ae Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Sun, 17 Oct 2021 23:24:16 +0100 Subject: [PATCH 3/3] Update common_features.mk --- common_features.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common_features.mk b/common_features.mk index 58689622821a..7674d8576edb 100644 --- a/common_features.mk +++ b/common_features.mk @@ -496,6 +496,8 @@ ifeq ($(strip $(CRC_ENABLE)), yes) endif ifeq ($(strip $(HAPTIC_ENABLE)),yes) + COMMON_VPATH += $(DRIVER_PATH)/haptic + ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), ) SRC += DRV2605L.c QUANTUM_LIB_SRC += i2c_master.c