Skip to content

Commit

Permalink
Merge remote-tracking branch 'qmk/develop' into develop
Browse files Browse the repository at this point in the history
* qmk/develop: (138 commits)
  Revert 14083 && 14144 (qmk#14150)
  [Keyboard] Update Technik ortholinear RGB matrix points (qmk#14124)
  Fix merge artifacts (qmk#14146)
  Align some quantum sub-directories (qmk#14134)
  [Keyboard] Add yoichiro/lunakey_macro (qmk#13849)
  Short term bodge for firmware size bloat (qmk#14144)
  add wait_cpuclock() macro for AVR and CPU_CLOCK macro (qmk#12755)
  Tidy up quantum.c now some of tmk_core has been merged (qmk#14083)
  [Keyboard] Add serneity65 (qmk#13889)
  fix (qmk#14142)
  [Keyboard] Fix keyprez qmk configurator (qmk#14119)
  [Keyboard] Add QEZ keyboard (qmk#14131)
  [Keyboard] Update Technik staggered RGB matrix points (qmk#14125)
  [Keymap] Fixed GMMK Pro -> stickandgum keymap readme.md (qmk#14123)
  [Keyboard] Update info.json for ocean/gin_v2 (qmk#14121)
  [Keymap] Drashna keymap fixups (qmk#14140)
  [Keyboard] Fix default keymap for quark squared keyboard (qmk#14139)
  [Core] Refactor OLED to allow easy addition of other types  (qmk#13454)
  Remove more unused files (qmk#14135)
  Fix Mouse Shared EP functionality (qmk#14136)
  ...
  • Loading branch information
Carlos Cardoso committed Aug 25, 2021
2 parents fc384fe + a84de5e commit a388c3c
Show file tree
Hide file tree
Showing 2,990 changed files with 31,498 additions and 11,826 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
api_data/v1
doxygen/
quantum/version.h
!quantum/tools/eeprom_reset.hex
*.bin
*.eep
*.hex
Expand Down
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

24 changes: 0 additions & 24 deletions CODE_OF_CONDUCT.md

This file was deleted.

14 changes: 0 additions & 14 deletions build_json.mk
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@
# Look for a json keymap file
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
endif

# Load the keymap-level rules.mk if exists
ifneq ("$(wildcard $(KEYMAP_PATH))", "")
-include $(KEYMAP_PATH)/rules.mk
endif

# Generate the keymap.c
$(KEYMAP_C): $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
55 changes: 42 additions & 13 deletions build_keyboard.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
# Force expansion
TARGET := $(TARGET)

ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif

# Object files and generated keymap directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)

# For split boards we need to set a master half.
MASTER ?= left
ifdef master
Expand Down Expand Up @@ -100,18 +109,9 @@ MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)

# Pull in rules from info.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/rules.mk)
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_rules.mk)
include $(INFO_RULES_MK)

ifneq ($(FORCE_LAYOUT),)
TARGET := $(TARGET)_$(FORCE_LAYOUT)
endif

# Object files and generated keymap directory
# To put object files in current directory, use a dot (.), do NOT make
# this an empty or blank macro!
KEYMAP_OUTPUT := $(BUILD_DIR)/obj_$(TARGET)

# Check for keymap.json first, so we can regenerate keymap.c
include build_json.mk

Expand Down Expand Up @@ -146,12 +146,35 @@ ifeq ("$(wildcard $(KEYMAP_PATH))", "")
endif
endif

# Have we found a keymap.json?
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
KEYMAP_C := $(KEYMAP_OUTPUT)/src/keymap.c
KEYMAP_H := $(KEYMAP_OUTPUT)/src/config.h

# Load the keymap-level rules.mk if exists
-include $(KEYMAP_PATH)/rules.mk

# Load any rules.mk content from keymap.json
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_OUTPUT)/src/rules.mk)
include $(INFO_RULES_MK)

# Add rules to generate the keymap files - indentation here is important
$(KEYMAP_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)

$(KEYMAP_OUTPUT)/src/config.h: $(KEYMAP_JSON)
$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --keymap $(KEYMAP) --output $(KEYMAP_H)

generated-files: $(KEYMAP_OUTPUT)/src/config.h $(KEYMAP_OUTPUT)/src/keymap.c

endif

ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif

ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
include platforms/chibios/QMK_PROTON_C/convert_to_proton_c.mk
include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk
endif

include quantum/mcu_selection.mk
Expand Down Expand Up @@ -336,11 +359,16 @@ endif
ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H += $(KEYMAP_PATH)/config.h
endif
ifneq ("$(KEYMAP_H)","")
CONFIG_H += $(KEYMAP_H)
endif

# project specific files
SRC += $(KEYBOARD_SRC) \
SRC += \
$(KEYBOARD_SRC) \
$(KEYMAP_C) \
$(QUANTUM_SRC)
$(QUANTUM_SRC) \
$(QUANTUM_DIR)/main.c \

# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
Expand Down Expand Up @@ -375,6 +403,7 @@ ifneq ($(strip $(PROTOCOL)),)
else
include $(TMK_PATH)/protocol/$(PLATFORM_KEY).mk
endif
-include $(TOP_DIR)/platforms/$(PLATFORM_KEY)/flash.mk

# TODO: remove this bodge?
PROJECT_DEFS := $(OPT_DEFS)
Expand Down
5 changes: 0 additions & 5 deletions build_layout.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ define SEARCH_LAYOUTS_REPO
LAYOUT_KEYMAP_C := $$(LAYOUT_KEYMAP_PATH)/keymap.c
ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_JSON))","")
-include $$(LAYOUT_KEYMAP_PATH)/rules.mk
KEYMAP_C := $(KEYMAP_OUTPUT)/keymap.c
KEYMAP_JSON := $$(LAYOUT_KEYMAP_JSON)
KEYMAP_PATH := $$(LAYOUT_KEYMAP_PATH)
else ifneq ("$$(wildcard $$(LAYOUT_KEYMAP_C))","")
Expand All @@ -31,7 +30,3 @@ ifneq ($(FORCE_LAYOUT),)
endif

$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))

# Use rule from build_json.mk, but update prerequisite in case KEYMAP_JSON was updated
$(KEYMAP_C): $(KEYMAP_JSON)
$(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
1 change: 1 addition & 0 deletions build_test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ include $(TMK_PATH)/common.mk
include $(QUANTUM_PATH)/debounce/tests/rules.mk
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
include $(TMK_PATH)/common/test/rules.mk
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
include build_full_test.mk
endif
Expand Down
3 changes: 3 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ QUANTUM_PATH = $(QUANTUM_DIR)
DRIVER_DIR = drivers
DRIVER_PATH = $(DRIVER_DIR)

PLATFORM_DIR = platforms
PLATFORM_PATH = $(PLATFORM_DIR)

BUILD_DIR := .build

COMMON_VPATH := $(TOP_DIR)
Expand Down
39 changes: 31 additions & 8 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ QUANTUM_SRC += \
$(QUANTUM_DIR)/send_string.c \
$(QUANTUM_DIR)/bitwise.c \
$(QUANTUM_DIR)/led.c \
$(QUANTUM_DIR)/action.c \
$(QUANTUM_DIR)/action_layer.c \
$(QUANTUM_DIR)/action_macro.c \
$(QUANTUM_DIR)/action_tapping.c \
$(QUANTUM_DIR)/action_util.c \
$(QUANTUM_DIR)/eeconfig.c \
$(QUANTUM_DIR)/keyboard.c \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/logging/debug.c \
Expand Down Expand Up @@ -110,13 +117,13 @@ endif

ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
OPT_DEFS += -DMOUSEKEY_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/mousekey.c
endif

ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
OPT_DEFS += -DMOUSE_ENABLE
MOUSE_ENABLE := yes
SRC += $(QUANTUM_DIR)/pointing_device.c
endif

Expand Down Expand Up @@ -178,6 +185,7 @@ else
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom
SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
else
# This will effectively work the same as "transient" if not supported by the chip
Expand Down Expand Up @@ -580,15 +588,25 @@ ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
endif

ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += drivers/avr/hd44780.c
SRC += platforms/avr/drivers/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
endif

ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
OPT_DEFS += -DOLED_DRIVER_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled
QUANTUM_LIB_SRC += i2c_master.c
SRC += oled_driver.c
VALID_OLED_DRIVER_TYPES := SSD1306 custom
OLED_DRIVER ?= SSD1306
ifeq ($(strip $(OLED_ENABLE)), yes)
ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),)
$(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver)
else
OPT_DEFS += -DOLED_ENABLE
COMMON_VPATH += $(DRIVER_PATH)/oled

OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
ifeq ($(strip $(OLED_DRIVER)), SSD1306)
SRC += ssd1306_sh1106.c
QUANTUM_LIB_SRC += i2c_master.c
endif
endif
endif

ifeq ($(strip $(ST7565_ENABLE)), yes)
Expand Down Expand Up @@ -695,6 +713,11 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), digital)
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
endif

DIGITIZER_ENABLE ?= no
ifneq ($(strip $(DIGITIZER_ENABLE)), no)
SRC += $(QUANTUM_DIR)/digitizer.c
endif

USBPD_ENABLE ?= no
VALID_USBPD_DRIVER_TYPES = custom vendor
USBPD_DRIVER ?= vendor
Expand Down
Loading

0 comments on commit a388c3c

Please sign in to comment.