Split out HAPTIC_ENABLE to have separate DRIVER option (#14854)
* DRIVER -> ENABLE * Update generic_features.mk Co-authored-by: Ryan <fauxpark@gmail.com> * Update common_features.mk Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
e50867d52d
commit
01b702bece
16 changed files with 44 additions and 36 deletions
|
@ -495,24 +495,20 @@ ifeq ($(strip $(CRC_ENABLE)), yes)
|
||||||
SRC += crc.c
|
SRC += crc.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HAPTIC_ENABLE ?= no
|
ifeq ($(strip $(HAPTIC_ENABLE)),yes)
|
||||||
ifneq ($(strip $(HAPTIC_ENABLE)),no)
|
|
||||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
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)), )
|
ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), )
|
||||||
SRC += DRV2605L.c
|
SRC += DRV2605L.c
|
||||||
QUANTUM_LIB_SRC += i2c_master.c
|
QUANTUM_LIB_SRC += i2c_master.c
|
||||||
OPT_DEFS += -DDRV2605L
|
OPT_DEFS += -DDRV2605L
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
|
ifneq ($(filter SOLENOID, $(HAPTIC_DRIVER)), )
|
||||||
SRC += solenoid.c
|
SRC += solenoid.c
|
||||||
OPT_DEFS += -DSOLENOID_ENABLE
|
OPT_DEFS += -DSOLENOID_ENABLE
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||||
SRC += platforms/avr/drivers/hd44780.c
|
SRC += platforms/avr/drivers/hd44780.c
|
||||||
|
|
|
@ -4,9 +4,12 @@
|
||||||
|
|
||||||
The following options are currently available for haptic feedback in `rules.mk`:
|
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
|
## Known Supported Hardware
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,12 @@
|
||||||
|
|
||||||
現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です:
|
現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です:
|
||||||
|
|
||||||
`HAPTIC_ENABLE += DRV2605L`
|
```
|
||||||
|
HAPTIC_ENABLE = yes
|
||||||
|
|
||||||
`HAPTIC_ENABLE += SOLENOID`
|
HAPTIC_DRIVER += DRV2605L
|
||||||
|
HAPTIC_DRIVER += SOLENOID
|
||||||
|
```
|
||||||
|
|
||||||
## サポートされる既知のハードウェア
|
## サポートされる既知のハードウェア
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ GENERIC_FEATURES = \
|
||||||
DYNAMIC_MACRO \
|
DYNAMIC_MACRO \
|
||||||
ENCODER \
|
ENCODER \
|
||||||
GRAVE_ESC \
|
GRAVE_ESC \
|
||||||
|
HAPTIC \
|
||||||
KEY_LOCK \
|
KEY_LOCK \
|
||||||
KEY_OVERRIDE \
|
KEY_OVERRIDE \
|
||||||
LEADER \
|
LEADER \
|
||||||
|
|
|
@ -22,6 +22,7 @@ AUDIO_ENABLE = yes # Audio output
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
RGB_MATRIX_ENABLE = no
|
RGB_MATRIX_ENABLE = no
|
||||||
RGB_MATRIX_DRIVER = WS2812
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
HAPTIC_ENABLE += DRV2605L
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = DRV2605L
|
||||||
OLED_ENABLE = yes
|
OLED_ENABLE = yes
|
||||||
OLED_DRIVER = SSD1306
|
OLED_DRIVER = SSD1306
|
||||||
|
|
|
@ -13,6 +13,7 @@ COMMAND_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
UNICODE_ENABLE = yes
|
UNICODE_ENABLE = yes
|
||||||
HAPTIC_ENABLE = SOLENOID
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = SOLENOID
|
||||||
|
|
||||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
|
|
|
@ -21,7 +21,8 @@ AUDIO_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
RGB_MATRIX_ENABLE = no # once arm_rgb is implemented
|
RGB_MATRIX_ENABLE = no # once arm_rgb is implemented
|
||||||
RGB_MATRIX_DRIVER = WS2812
|
RGB_MATRIX_DRIVER = WS2812
|
||||||
HAPTIC_ENABLE += DRV2605L
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = DRV2605L
|
||||||
OLED_ENABLE = yes
|
OLED_ENABLE = yes
|
||||||
OLED_DRIVER = SSD1306
|
OLED_DRIVER = SSD1306
|
||||||
ENCODER_ENABLER = yes
|
ENCODER_ENABLER = yes
|
||||||
|
|
|
@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
||||||
|
|
||||||
HAPTIC_ENABLE += SOLENOID
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = SOLENOID
|
||||||
|
|
|
@ -23,6 +23,7 @@ AUDIO_ENABLE = yes # Audio output
|
||||||
ENCODER_ENABLE = yes # ENables the use of one or more encoders
|
ENCODER_ENABLE = yes # ENables the use of one or more encoders
|
||||||
OLED_ENABLE = yes
|
OLED_ENABLE = yes
|
||||||
OLED_DRIVER = SSD1306 # Enables the use of OLED displays
|
OLED_DRIVER = SSD1306 # Enables the use of OLED displays
|
||||||
HAPTIC_ENABLE += DRV2605L # Supported but not included by defaut
|
HAPTIC_ENABLE = yes # Supported but not included by defaut
|
||||||
|
HAPTIC_DRIVER = DRV2605L
|
||||||
|
|
||||||
LTO_ENABLE = yes
|
LTO_ENABLE = yes
|
||||||
|
|
|
@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
||||||
|
|
||||||
HAPTIC_ENABLE += SOLENOID
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = SOLENOID
|
||||||
|
|
|
@ -22,5 +22,7 @@ ENCODER_ENABLE = no # Enable rotary encoder support
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
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
|
LAYOUTS = fullsize_ansi fullsize_iso
|
||||||
|
|
|
@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
||||||
|
|
||||||
HAPTIC_ENABLE += SOLENOID
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = SOLENOID
|
||||||
|
|
|
@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra
|
||||||
|
|
||||||
HAPTIC_ENABLE += SOLENOID
|
HAPTIC_ENABLE = yes
|
||||||
|
HAPTIC_DRIVER = SOLENOID
|
||||||
|
|
|
@ -17,6 +17,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht
|
||||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
AUDIO_ENABLE = no # Audio output
|
AUDIO_ENABLE = no # Audio output
|
||||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
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
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
|
|
@ -28,7 +28,6 @@ ifeq ($(strip $(KEYBOARD)), planck/light)
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
# HAPTIC_ENABLE += SOLENOID
|
|
||||||
endif
|
endif
|
||||||
ifeq ($(strip $(KEYBOARD)), planck/ez)
|
ifeq ($(strip $(KEYBOARD)), planck/ez)
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
|
|
|
@ -112,11 +112,6 @@ def _extract_features(info_data, rules):
|
||||||
if rules.get('BOOTMAGIC_ENABLE') == 'full':
|
if rules.get('BOOTMAGIC_ENABLE') == 'full':
|
||||||
rules['BOOTMAGIC_ENABLE'] = 'on'
|
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
|
# Process the rest of the rules as booleans
|
||||||
for key, value in rules.items():
|
for key, value in rules.items():
|
||||||
if key.endswith('_ENABLE'):
|
if key.endswith('_ENABLE'):
|
||||||
|
|
Loading…
Reference in a new issue