Skip to content

Commit c66df16

Browse files
authored
2020 November 28 Breaking Changes Update (#11053)
* Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
1 parent 15385d4 commit c66df16

File tree

884 files changed

+8112
-11676
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

884 files changed

+8112
-11676
lines changed

Makefile

+20-4
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,24 @@ endef
272272
define PARSE_RULE
273273
RULE := $1
274274
COMMANDS :=
275+
REQUIRE_PLATFORM_KEY :=
275276
# If the rule starts with all, then continue the parsing from
276277
# PARSE_ALL_KEYBOARDS
277278
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
278279
KEYBOARD_RULE=all
279280
$$(eval $$(call PARSE_ALL_KEYBOARDS))
281+
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-avr),true)
282+
KEYBOARD_RULE=all
283+
REQUIRE_PLATFORM_KEY := avr
284+
$$(eval $$(call PARSE_ALL_KEYBOARDS))
285+
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true)
286+
KEYBOARD_RULE=all
287+
REQUIRE_PLATFORM_KEY := chibios
288+
$$(eval $$(call PARSE_ALL_KEYBOARDS))
289+
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true)
290+
KEYBOARD_RULE=all
291+
REQUIRE_PLATFORM_KEY := arm_atsam
292+
$$(eval $$(call PARSE_ALL_KEYBOARDS))
280293
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
281294
$$(eval $$(call PARSE_TEST))
282295
# If the rule starts with the name of a known keyboard, then continue
@@ -447,7 +460,7 @@ define PARSE_KEYMAP
447460
# Format it in bold
448461
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
449462
# Specify the variables that we are passing forward to submake
450-
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM)
463+
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
451464
# And the first part of the make command
452465
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
453466
# The message to display
@@ -466,6 +479,8 @@ define BUILD
466479
LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
467480
if [ $$$$? -gt 0 ]; \
468481
then $$(PRINT_ERROR_PLAIN); \
482+
elif [ "$$$$LOG" = "skipped" ] ; \
483+
then $$(PRINT_SKIPPED_PLAIN); \
469484
elif [ "$$$$LOG" != "" ] ; \
470485
then $$(PRINT_WARNING_PLAIN); \
471486
else \
@@ -637,12 +652,13 @@ else
637652
endif
638653
ifndef SKIP_VERSION
639654
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
655+
else
656+
BUILD_DATE := 2020-01-01-00:00:00
657+
endif
658+
640659
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
641660
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
642661
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
643662
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
644-
else
645-
BUILD_DATE := NA
646-
endif
647663

648664
include $(ROOT_DIR)/testlist.mk

build_keyboard.mk

+13
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,13 @@ SRC += $(TMK_COMMON_SRC)
317317
OPT_DEFS += $(TMK_COMMON_DEFS)
318318
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
319319

320+
SKIP_COMPILE := no
321+
ifneq ($(REQUIRE_PLATFORM_KEY),)
322+
ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
323+
SKIP_COMPILE := yes
324+
endif
325+
endif
326+
320327
include $(TMK_PATH)/$(PLATFORM_KEY).mk
321328
ifneq ($(strip $(PROTOCOL)),)
322329
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
@@ -352,7 +359,13 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
352359
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
353360

354361
# Default target.
362+
ifeq ($(SKIP_COMPILE),no)
355363
all: build check-size
364+
else
365+
all:
366+
echo "skipped" >&2
367+
endif
368+
356369
build: elf cpfirmware
357370
check-size: build
358371
objs-size: build

build_test.mk

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ endif
4949

5050
include common_features.mk
5151
include $(TMK_PATH)/common.mk
52+
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
5253
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
5354
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
5455
include build_full_test.mk

common.mk

+1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
2121
COMMON_VPATH += $(QUANTUM_PATH)/audio
2222
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
2323
COMMON_VPATH += $(QUANTUM_PATH)/api
24+
COMMON_VPATH += $(QUANTUM_PATH)/sequencer
2425
COMMON_VPATH += $(DRIVER_PATH)

common_features.mk

+68-54
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ QUANTUM_SRC += \
2121
$(QUANTUM_DIR)/keymap_common.c \
2222
$(QUANTUM_DIR)/keycode_config.c
2323

24+
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
25+
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
26+
CONSOLE_ENABLE = yes
27+
endif
28+
2429
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
2530
OPT_DEFS += -DAPI_SYSEX_ENABLE
2631
OPT_DEFS += -DAPI_ENABLE
@@ -39,6 +44,13 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
3944
SRC += $(QUANTUM_DIR)/audio/luts.c
4045
endif
4146

47+
ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
48+
OPT_DEFS += -DSEQUENCER_ENABLE
49+
MUSIC_ENABLE = yes
50+
SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
51+
SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
52+
endif
53+
4254
ifeq ($(strip $(MIDI_ENABLE)), yes)
4355
OPT_DEFS += -DMIDI_ENABLE
4456
MUSIC_ENABLE = yes
@@ -156,34 +168,37 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
156168
endif
157169
endif
158170

159-
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
160171

161172
LED_MATRIX_ENABLE ?= no
162-
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
163-
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
164-
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
173+
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
174+
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
175+
176+
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
177+
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
178+
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
165179
else
166180
BACKLIGHT_ENABLE = yes
167181
BACKLIGHT_DRIVER = custom
168182
OPT_DEFS += -DLED_MATRIX_ENABLE
169183
SRC += $(QUANTUM_DIR)/led_matrix.c
170184
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
171185
endif
172-
endif
173186

174-
ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
175-
OPT_DEFS += -DIS31FL3731
176-
COMMON_VPATH += $(DRIVER_PATH)/issi
177-
SRC += is31fl3731-simple.c
178-
QUANTUM_LIB_SRC += i2c_master.c
187+
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
188+
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
189+
COMMON_VPATH += $(DRIVER_PATH)/issi
190+
SRC += is31fl3731-simple.c
191+
QUANTUM_LIB_SRC += i2c_master.c
192+
endif
179193
endif
180194

181195
RGB_MATRIX_ENABLE ?= no
196+
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
182197

183-
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
184-
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
185-
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
186-
endif
198+
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
199+
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
200+
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
201+
endif
187202
OPT_DEFS += -DRGB_MATRIX_ENABLE
188203
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
189204
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
@@ -194,51 +209,47 @@ endif
194209
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
195210
CIE1931_CURVE := yes
196211
RGB_KEYCODES_ENABLE := yes
197-
endif
198-
199-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
200-
RGB_MATRIX_ENABLE := IS31FL3731
201-
endif
202212

203-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
204-
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
205-
COMMON_VPATH += $(DRIVER_PATH)/issi
206-
SRC += is31fl3731.c
207-
QUANTUM_LIB_SRC += i2c_master.c
208-
endif
213+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
214+
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
215+
COMMON_VPATH += $(DRIVER_PATH)/issi
216+
SRC += is31fl3731.c
217+
QUANTUM_LIB_SRC += i2c_master.c
218+
endif
209219

210-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
211-
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
212-
COMMON_VPATH += $(DRIVER_PATH)/issi
213-
SRC += is31fl3733.c
214-
QUANTUM_LIB_SRC += i2c_master.c
215-
endif
220+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
221+
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
222+
COMMON_VPATH += $(DRIVER_PATH)/issi
223+
SRC += is31fl3733.c
224+
QUANTUM_LIB_SRC += i2c_master.c
225+
endif
216226

217-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
218-
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
219-
COMMON_VPATH += $(DRIVER_PATH)/issi
220-
SRC += is31fl3737.c
221-
QUANTUM_LIB_SRC += i2c_master.c
222-
endif
227+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
228+
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
229+
COMMON_VPATH += $(DRIVER_PATH)/issi
230+
SRC += is31fl3737.c
231+
QUANTUM_LIB_SRC += i2c_master.c
232+
endif
223233

224-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
225-
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
226-
COMMON_VPATH += $(DRIVER_PATH)/issi
227-
SRC += is31fl3741.c
228-
QUANTUM_LIB_SRC += i2c_master.c
229-
endif
234+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
235+
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
236+
COMMON_VPATH += $(DRIVER_PATH)/issi
237+
SRC += is31fl3741.c
238+
QUANTUM_LIB_SRC += i2c_master.c
239+
endif
230240

231-
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
232-
OPT_DEFS += -DWS2812
233-
WS2812_DRIVER_REQUIRED := yes
234-
endif
241+
ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812)
242+
OPT_DEFS += -DWS2812
243+
WS2812_DRIVER_REQUIRED := yes
244+
endif
235245

236-
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
237-
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
238-
endif
246+
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
247+
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
248+
endif
239249

240-
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
241-
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
250+
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
251+
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
252+
endif
242253
endif
243254

244255
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
@@ -444,11 +455,14 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
444455
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
445456
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
446457
ifeq ($(PLATFORM),AVR)
447-
QUANTUM_LIB_SRC += i2c_master.c \
448-
i2c_slave.c
458+
ifneq ($(NO_I2C),yes)
459+
QUANTUM_LIB_SRC += i2c_master.c \
460+
i2c_slave.c
461+
endif
449462
endif
450463

451464
SERIAL_DRIVER ?= bitbang
465+
OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
452466
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
453467
QUANTUM_LIB_SRC += serial.c
454468
else

0 commit comments

Comments
 (0)