summaryrefslogtreecommitdiffstats
path: root/keyboards/helix/rev2/local_features.mk
diff options
context:
space:
mode:
authorMakotoKurauchi <pluis@me.com>2020-03-10 17:33:46 +0900
committerGitHub <noreply@github.com>2020-03-10 01:33:46 -0700
commit2d14d12c7409e8de3f8d465635be115e06ba26f7 (patch)
tree7e16f8a48b5f1d2fcc400869cc02244c6c2cc167 /keyboards/helix/rev2/local_features.mk
parent0ba352356deaa741064acc770fa5a8bc57fa8904 (diff)
[Keyboard] Helix add split common option (#7718)
* is_master, has_usb() move to rev2.[hc] * Do recent helix/rev2 changes to helix/pico as well. helix/pico/matrix.c: remove 'is_master' helix/pico/pico.c: add 'is_master' helix/pico/pico.h: add 'has_usb()' macro helix/pico/split_util.c: remove 'setup_handedness()' 'has_usb()', add 'is_helix_master()' etc * add HELIX=scan option into {rev2/pico}/local_features.mk Made DEBUG_MATRIX_SCAN_RATE easy to use. * Changed rules.mk to link "helix/local_drivers/ssd1306.c" only when OLED_ENABLE = yes. * Added option to use split_common for helix/rev2, helix/pico keyboard. how to build: ### build helix/pico (HelixPico) with helix current codes $ make helix/pico:KEY_MAP $ make helix/pico/back:KEY_MAP ### build helix/rev2 (Helix or Helix beta) with helix current codes $ make helix:KEY_MAP $ make helix/rev2/back:KEY_MAP $ make helix/rev2/under:KEY_MAP $ make helix/rev2/oled:KEY_MAP $ make helix/rev2/oled/back:KEY_MAP $ make helix/rev2/oled/under:KEY_MAP ### build helix/pico (HelixPico) with split_common codes $ make helix/pico/sc:KEY_MAP $ make helix/pico/sc/back:KEY_MAP $ make helix/pico/sc/under:KEY_MAP ### build helix/rev2 (Helix) with split_common codes $ make helix/rev2/sc:KEY_MAP $ make helix/rev2/sc/back:KEY_MAP $ make helix/rev2/sc/under:KEY_MAP $ make helix/rev2/sc/oled:KEY_MAP $ make helix/rev2/sc/oledback:KEY_MAP $ make helix/rev2/sc/oledunder:KEY_MAP * add matrix_slave_scan_user() to helix/rev2/rev2.c, helix/pico/pico.h * Changed 'helix:xulkal' to always use split_common and removed ad hoc code. Added the following line to 'helix/rev2/keymaps/xulkal/rules.mk': SPLIT_KEYBOARD = yes Removed the following ad hoc code from 'users/xulkal/custom_oled.c': #if KEYBOARD_helix_rev2 extern uint8_t is_master; bool is_keyboard_master(void) { return is_master; } #endif * add '#define DIODE_DIRECTION COL2ROW' into helix/{rev2|pico}/config.h This commit does not change the build result. * update helix readme * keyboards/helix/readme.md * keyboards/helix/pico/keymaps/default/readme.md * keyboards/helix/rev2/keymaps/default/readme.md Co-authored-by: mtei <2170248+mtei@users.noreply.github.com>
Diffstat (limited to 'keyboards/helix/rev2/local_features.mk')
-rw-r--r--keyboards/helix/rev2/local_features.mk43
1 files changed, 35 insertions, 8 deletions
diff --git a/keyboards/helix/rev2/local_features.mk b/keyboards/helix/rev2/local_features.mk
index 0f4285eea9..4b120936de 100644
--- a/keyboards/helix/rev2/local_features.mk
+++ b/keyboards/helix/rev2/local_features.mk
@@ -10,7 +10,7 @@ define HELIX_CUSTOMISE_MSG
$(info - OLED_ENABLE = $(OLED_ENABLE))
$(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE))
$(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE))
- $(info - LED_ANIMATION = $(LED_ANIMATIONS))
+ $(info - LED_ANIMATIONS = $(LED_ANIMATIONS))
$(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE))
$(info )
endef
@@ -43,12 +43,35 @@ endef
ifeq ($(findstring ios,$(HELIX)), ios)
IOS_DEVICE_ENABLE = yes
endif
+ ifeq ($(findstring scan,$(HELIX)), scan)
+ # use DEBUG_MATRIX_SCAN_RATE
+ # see docs/newbs_testing_debugging.md
+ OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
+ CONSOLE_ENABLE = yes
+ SHOW_VERBOSE_INFO = yes
+ endif
ifeq ($(findstring verbose,$(HELIX)), verbose)
- SHOW_VERBOSE_INFO = yes
+ SHOW_VERBOSE_INFO = yes
endif
SHOW_HELIX_OPTIONS = yes
endif
+ifneq ($(strip $(SPLIT_KEYBOARD)), yes)
+ SRC += local_drivers/serial.c
+ KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
+
+ # A workaround until #7089 is merged.
+ # serial.c must not be compiled with the -lto option.
+ # The current LIB_SRC has a side effect with the -fno-lto option, so use it.
+ LIB_SRC += local_drivers/serial.c
+
+ CUSTOM_MATRIX = yes
+
+ SRC += rev2/matrix.c
+ SRC += rev2/split_util.c
+ SRC += rev2/split_scomm.c
+endif
+
########
# convert Helix-specific options (that represent combinations of standard options)
# into QMK standard options.
@@ -80,18 +103,22 @@ ifeq ($(strip $(LED_ANIMATIONS)), yes)
endif
ifeq ($(strip $(OLED_ENABLE)), yes)
+ SRC += local_drivers/i2c.c
+ SRC += local_drivers/ssd1306.c
+ KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers
OPT_DEFS += -DOLED_ENABLE
-endif
-
-ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
- OPT_DEFS += -DLOCAL_GLCDFONT
+ ifeq ($(strip $(LOCAL_GLCDFONT)), yes)
+ OPT_DEFS += -DLOCAL_GLCDFONT
+ endif
endif
ifneq ($(strip $(SHOW_HELIX_OPTIONS)),)
$(eval $(call HELIX_CUSTOMISE_MSG))
ifneq ($(strip $(SHOW_VERBOSE_INFO)),)
- $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
- $(info -- OPT_DEFS = $(OPT_DEFS))
+ $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE))
+ $(info -- OLED_DRIVER_ENABLE = $(OLED_DRIVER_ENABLE))
+ $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE))
+ $(info -- OPT_DEFS = $(OPT_DEFS))
$(info -- LINK_TIME_OPTIMIZATION_ENABLE = $(LINK_TIME_OPTIMIZATION_ENABLE))
$(info )
endif