Skip to content

Commit

Permalink
Merge branch 'vial' of https://github.com/vial-kb/vial-qmk into updat…
Browse files Browse the repository at this point in the history
…ed-wireless-develop
  • Loading branch information
adophoxia committed Jun 26, 2024
2 parents 0219465 + b02ff54 commit 9d4dcb9
Show file tree
Hide file tree
Showing 9,141 changed files with 121,333 additions and 418,491 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 23 additions & 23 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,39 +4,39 @@
root = true

[*]
end_of_line = lf
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{*.yaml,*.yml}] # To match GitHub Actions formatting
indent_size = 2

[*.md]
trim_trailing_whitespace = false
indent_size = 4

[{qmk,*.py}]
charset = utf-8
max_line_length = 200

# Make these match what we have in .gitattributes
[*.mk]
end_of_line = lf
indent_style = tab

[Makefile]
end_of_line = lf
[{Makefile,*.mk}]
indent_style = tab

[*.sh]
end_of_line = lf

# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files


# We don't have gitattributes properly for these
# So if the user have for example core.autocrlf set to true
# the line endings would be wrong.
# Don't override anything in `lib/`...
[lib/**]
indent_style = unset
indent_size = unset
tab_width = unset
end_of_line = unset
charset = unset
spelling_language = unset
trim_trailing_whitespace = unset
insert_final_newline = unset

# ...except QMK's `lib/python`.
[{*.py,lib/python/**.py}]
end_of_line = lf
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 200
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
*.lst
*.map
*.o
*.a
*.so
*.dylib
*.dll
*.la
*.stackdump
*.sym

Expand Down
27 changes: 15 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -337,24 +337,23 @@ define BUILD_TEST
endif
endef

define LIST_TEST
include $(BUILDDEFS_PATH)/testlist.mk
FOUND_TESTS := $$(patsubst ./tests/%,%,$$(TEST_LIST))
$$(info $$(FOUND_TESTS))
endef

define PARSE_TEST
TESTS :=
# list of possible targets, colon-delimited, to reassign to MAKE_TARGET and remove
TARGETS := :clean:
ifneq (,$$(findstring :$$(lastword $$(subst :, ,$$(RULE))):, $$(TARGETS)))
MAKE_TARGET := $$(lastword $$(subst :, ,$$(RULE)))
TEST_SUBPATH := $$(subst $$(eval) ,/,$$(wordlist 2, $$(words $$(subst :, ,$$(RULE))), _ $$(subst :, ,$$(RULE))))
else
MAKE_TARGET :=
TEST_SUBPATH := $$(subst :,/,$$(RULE))
endif
TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME):,,$$(RULE)))
include $(BUILDDEFS_PATH)/testlist.mk
ifeq ($$(RULE),all)
ifeq ($$(TEST_NAME),all)
MATCHED_TESTS := $$(TEST_LIST)
else
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring /$$(TEST_SUBPATH)/, $$(patsubst %,%/,$$(TEST))), $$(TEST),))
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring x$$(TEST_NAME)x, x$$(patsubst ./tests/%,%,$$(TEST)x)), $$(TEST),))
endif
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(MAKE_TARGET))))
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
endef


Expand Down Expand Up @@ -437,6 +436,10 @@ git-submodules: git-submodule
list-keyboards:
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '

.PHONY: list-tests
list-tests:
$(eval $(call LIST_TEST))

.PHONY: generate-keyboards-file
generate-keyboards-file:
$(QMK_BIN) list-keyboards --no-resolve-defaults
Expand Down
105 changes: 61 additions & 44 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
CIE1931_CURVE := yes
RGB_KEYCODES_ENABLE := yes
endif
Expand Down Expand Up @@ -361,71 +362,73 @@ ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3218)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3218-simple.c
SRC += is31fl3218-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3729)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3729-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3731)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3731-simple.c
SRC += is31fl3731-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3733)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3733-simple.c
SRC += is31fl3733-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3736)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3736-simple.c
SRC += is31fl3736-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3737)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3737-simple.c
SRC += is31fl3737-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3741)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3741-simple.c
SRC += is31fl3741-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3742a-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3743a-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3745-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3746a-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led
SRC += snled27351-simple.c
SRC += snled27351-mono.c
endif

ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351_spi)
Expand Down Expand Up @@ -477,6 +480,12 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
SRC += is31fl3218.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3729)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31fl3729.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3731)
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
Expand Down Expand Up @@ -508,31 +517,27 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3742a.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3743a.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3745.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
OPT_DEFS += -DIS31FLCOMMON
I2C_DRIVER_REQUIRED = yes
COMMON_VPATH += $(DRIVER_PATH)/led/issi
SRC += is31flcommon.c
SRC += is31fl3746a.c
endif

ifeq ($(strip $(RGB_MATRIX_DRIVER)), snled27351)
Expand Down Expand Up @@ -631,24 +636,9 @@ ifeq ($(strip $(VIAL_ENABLE)), yes)
include $(BUILDDEFS_PATH)/build_vial.mk
endif

VALID_MAGIC_TYPES := yes
BOOTMAGIC_ENABLE ?= no
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid BOOTMAGIC_ENABLE,BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
endif
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
OPT_DEFS += -DBOOTMAGIC_LITE
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
endif
endif
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c

VALID_CUSTOM_MATRIX_TYPES:= yes lite no

CUSTOM_MATRIX ?= no

ifneq ($(strip $(CUSTOM_MATRIX)), yes)
ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid CUSTOM_MATRIX,CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type)
Expand Down Expand Up @@ -853,15 +843,12 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
$(call CATASTROPHIC_ERROR,Invalid JOYSTICK_DRIVER,JOYSTICK_DRIVER="$(JOYSTICK_DRIVER)" is not a valid joystick driver)
endif
OPT_DEFS += -DJOYSTICK_ENABLE
OPT_DEFS += -DJOYSTICK_$(strip $(shell echo $(JOYSTICK_DRIVER) | tr '[:lower:]' '[:upper:]'))
SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
SRC += $(QUANTUM_DIR)/joystick.c

ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
ANALOG_DRIVER_REQUIRED = yes
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
endif
ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif
endif

Expand Down Expand Up @@ -915,14 +902,35 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
endif
endif

ENCODER_ENABLE ?= no
ENCODER_DRIVER ?= quadrature
VALID_ENCODER_DRIVER_TYPES := quadrature custom
ifeq ($(strip $(ENCODER_ENABLE)), yes)
ifeq ($(filter $(ENCODER_DRIVER),$(VALID_ENCODER_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid ENCODER_DRIVER,ENCODER_DRIVER="$(ENCODER_DRIVER)" is not a valid encoder driver)
endif
SRC += $(QUANTUM_DIR)/encoder.c
OPT_DEFS += -DENCODER_ENABLE
OPT_DEFS += -DENCODER_DRIVER_$(strip $(shell echo $(ENCODER_DRIVER) | tr '[:lower:]' '[:upper:]'))

COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/encoder
COMMON_VPATH += $(DRIVER_PATH)/encoder

ifneq ($(strip $(ENCODER_DRIVER)), custom)
SRC += encoder_$(strip $(ENCODER_DRIVER)).c
endif

ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes)
OPT_DEFS += -DENCODER_MAP_ENABLE
endif
endif

ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
ifeq ($(strip $(DIP_SWITCH_MAP_ENABLE)), yes)
OPT_DEFS += -DDIP_SWITCH_MAP_ENABLE
endif
endif

VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor

WS2812_DRIVER ?= bitbang
Expand Down Expand Up @@ -968,6 +976,15 @@ ifeq ($(strip $(SPI_DRIVER_REQUIRED)), yes)
endif

ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes)
OPT_DEFS += -DHAL_USE_SERIAL=TRUE
QUANTUM_LIB_SRC += uart.c
ifeq ($(strip $(PLATFORM)), CHIBIOS)
ifneq ($(filter $(MCU_SERIES),RP2040),)
OPT_DEFS += -DHAL_USE_SIO=TRUE
QUANTUM_LIB_SRC += uart_sio.c
else
OPT_DEFS += -DHAL_USE_SERIAL=TRUE
QUANTUM_LIB_SRC += uart_serial.c
endif
else
QUANTUM_LIB_SRC += uart.c
endif
endif
10 changes: 8 additions & 2 deletions builddefs/converters.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
endif

# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
ifneq (,$(filter $(MCU),atmega32u4))
# TODO: opt in rather than assume everything uses a pro micro
PIN_COMPATIBLE ?= promicro
endif

# Remove whitespace from any rule.mk provided vars
# - env cannot be overwritten but cannot have whitespace anyway
Expand All @@ -16,6 +18,10 @@ ifneq ($(CONVERT_TO),)
# stash so we can overwrite env provided vars if needed
ACTIVE_CONVERTER=$(CONVERT_TO)

ifeq ($(PIN_COMPATIBLE),)
$(call CATASTROPHIC_ERROR,Converting to '$(CONVERT_TO)' not possible!)
endif

# glob to search each platfrorm and/or check for valid converter
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
ifeq ($(CONVERTER),)
Expand Down
1 change: 1 addition & 0 deletions builddefs/generic_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ SPACE_CADET_ENABLE ?= yes
GENERIC_FEATURES = \
AUTO_SHIFT \
AUTOCORRECT \
BOOTMAGIC \
CAPS_WORD \
COMBO \
COMMAND \
Expand Down
Loading

0 comments on commit 9d4dcb9

Please sign in to comment.