diff options
-rw-r--r-- | .gitmodules | 3 | ||||
-rw-r--r-- | .travis.yml | 10 | ||||
-rw-r--r-- | Makefile | 71 | ||||
-rw-r--r-- | build_keyboard.mk | 52 | ||||
-rw-r--r-- | build_test.mk | 57 | ||||
-rw-r--r-- | common.mk | 26 | ||||
-rw-r--r-- | keyboards/infinity60/MEMO.txt (renamed from keyboards/infinity_chibios/MEMO.txt) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/Makefile (renamed from keyboards/infinity_chibios/Makefile) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/bootloader_defs.h (renamed from keyboards/infinity_chibios/bootloader_defs.h) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/chconf.h (renamed from keyboards/infinity_chibios/chconf.h) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/config.h (renamed from keyboards/infinity_chibios/config.h) | 9 | ||||
-rw-r--r-- | keyboards/infinity60/halconf.h (renamed from keyboards/infinity_chibios/halconf.h) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/infinity60.c (renamed from keyboards/infinity_chibios/infinity_chibios.c) | 2 | ||||
-rw-r--r-- | keyboards/infinity60/infinity60.h (renamed from keyboards/infinity_chibios/infinity_chibios.h) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/keymaps/default/keymap.c (renamed from keyboards/infinity_chibios/keymaps/default/keymap.c) | 2 | ||||
-rwxr-xr-x | keyboards/infinity60/keymaps/depariel/keymap.c (renamed from keyboards/infinity_chibios/keymaps/depariel/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/infinity60/keymaps/hasu/keymap.c (renamed from keyboards/infinity_chibios/keymaps/hasu/keymap.c) | 2 | ||||
-rw-r--r-- | keyboards/infinity60/led.c (renamed from keyboards/infinity_chibios/led.c) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/matrix.c (renamed from keyboards/infinity_chibios/matrix.c) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/mcuconf.h (renamed from keyboards/infinity_chibios/mcuconf.h) | 0 | ||||
-rw-r--r-- | keyboards/infinity60/readme.md | 29 | ||||
-rw-r--r-- | keyboards/infinity60/rules.mk (renamed from keyboards/infinity_chibios/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/kc60/keymaps/workman-dead/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/kc60/keymaps/workman-dead/readme.md (renamed from keyboards/kc60/keymaps/workman-dead/README.md) | 0 | ||||
-rw-r--r-- | keyboards/tv44/keymaps/jeebak/Makefile | 21 | ||||
-rw-r--r-- | keyboards/tv44/keymaps/jeebak/config.h | 21 | ||||
-rw-r--r-- | keyboards/tv44/keymaps/jeebak/keymap.c | 425 | ||||
-rw-r--r-- | keyboards/tv44/keymaps/jeebak/readme.md | 129 | ||||
m--------- | lib/googletest | 0 | ||||
-rw-r--r-- | message.mk | 8 | ||||
-rw-r--r-- | quantum/serial_link/protocol/byte_stuffer.c | 3 | ||||
-rw-r--r-- | quantum/serial_link/protocol/byte_stuffer.h | 3 | ||||
-rw-r--r-- | quantum/serial_link/protocol/transport.c | 4 | ||||
-rw-r--r-- | quantum/serial_link/protocol/transport.h | 7 | ||||
-rw-r--r-- | quantum/serial_link/tests/byte_stuffer_tests.cpp (renamed from quantum/serial_link/tests/byte_stuffer_tests.c) | 313 | ||||
-rw-r--r-- | quantum/serial_link/tests/frame_router_tests.c | 231 | ||||
-rw-r--r-- | quantum/serial_link/tests/frame_router_tests.cpp | 229 | ||||
-rw-r--r-- | quantum/serial_link/tests/frame_validator_tests.cpp (renamed from quantum/serial_link/tests/frame_validator_tests.c) | 90 | ||||
-rw-r--r-- | quantum/serial_link/tests/rules.mk | 22 | ||||
-rw-r--r-- | quantum/serial_link/tests/testlist.mk | 6 | ||||
-rw-r--r-- | quantum/serial_link/tests/transport_tests.c | 168 | ||||
-rw-r--r-- | quantum/serial_link/tests/transport_tests.cpp | 188 | ||||
-rw-r--r-- | quantum/serial_link/tests/triple_buffered_object_tests.cpp (renamed from quantum/serial_link/tests/triple_buffered_object_tests.c) | 52 | ||||
-rw-r--r-- | quantum/template/readme.md | 10 | ||||
-rw-r--r-- | readme.md | 66 | ||||
-rw-r--r-- | testlist.mk | 13 | ||||
-rw-r--r-- | tmk_core/common.mk | 71 | ||||
-rw-r--r-- | tmk_core/native.mk | 24 | ||||
-rw-r--r-- | tmk_core/rules.mk | 29 |
49 files changed, 1659 insertions, 747 deletions
diff --git a/.gitmodules b/.gitmodules index 7e3c92d031..12b7cb918f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "lib/ugfx"] path = lib/ugfx url = https://bitbucket.org/Tectu/ugfx +[submodule "lib/googletest"] + path = lib/googletest + url = https://github.com/google/googletest diff --git a/.travis.yml b/.travis.yml index 138a2c5532..f4c918a5ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,10 @@ env: global: - secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM= script: -- make all-keyboards AUTOGEN=true +- make $TARGET AUTOGEN=$AUTOGEN +env: +- TARGET=all-keyboards AUTOGEN=true +- TARGET=test AUTOGEN=false addons: apt: packages: @@ -22,4 +25,7 @@ addons: - binutils-arm-none-eabi - libnewlib-arm-none-eabi - diffutils -after_success: bash util/travis_compiled_push.sh +after_success: + if [ "$AUTOGEN" == "true" ]; then + bash util/travis_compiled_push.sh; + fi @@ -2,6 +2,10 @@ ifndef VERBOSE .SILENT: endif +# Never run this makefile in parallel, as it could screw things up +# It won't affect the submakes, so you still get the speedup from specifying -jx +.NOTPARALLEL: + # Allow the silent with lower caps to work the same way as upper caps ifdef silent SILENT = $(silent) @@ -28,6 +32,7 @@ ABS_ROOT_MAKEFILE := $(abspath $(ROOT_MAKEFILE)) ABS_STARTING_DIR := $(dir $(ABS_STARTING_MAKEFILE)) ABS_ROOT_DIR := $(dir $(ABS_ROOT_MAKEFILE)) STARTING_DIR := $(subst $(ABS_ROOT_DIR),,$(ABS_STARTING_DIR)) +TEST_DIR := $(ROOT_DIR)/.build/test MAKEFILE_INCLUDED=yes @@ -224,6 +229,8 @@ define PARSE_RULE # PARSE_ALL_KEYBOARDS ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,allkb),true) $$(eval $$(call PARSE_ALL_KEYBOARDS)) + else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true) + $$(eval $$(call PARSE_TEST)) # If the rule starts with the name of a known keyboard, then continue # the parsing from PARSE_KEYBOARD else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true) @@ -356,7 +363,6 @@ define PARSE_KEYMAP MAKE_TARGET := $$(patsubst -%,%,$$(RULE)) # We need to generate an unique indentifer to append to the COMMANDS list COMMAND := COMMAND_KEYBOARD_$$(CURRENT_KB)_SUBPROJECT_$(CURRENT_SP)_KEYMAP_$$(CURRENT_KM) - COMMANDS += $$(COMMAND) # If we are compiling a keyboard without a subproject, we want to display just the name # of the keyboard, otherwise keyboard/subproject ifeq ($$(CURRENT_SP),) @@ -368,13 +374,18 @@ define PARSE_KEYMAP KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR) # Specify the variables that we are passing forward to submake MAKE_VARS := KEYBOARD=$$(CURRENT_KB) SUBPROJECT=$$(CURRENT_SP) KEYMAP=$$(CURRENT_KM) - MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) # And the first part of the make command MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET) # The message to display MAKE_MSG := $$(MSG_MAKE_KB) # We run the command differently, depending on if we want more output or not # The true version for silent output and the false version otherwise + $$(eval $$(call BUILD)) +endef + +define BUILD + MAKE_VARS += VERBOSE=$(VERBOSE) COLOR=$(COLOR) + COMMANDS += $$(COMMAND) COMMAND_true_$$(COMMAND) := \ printf "$$(MAKE_MSG)" | \ $$(MAKE_MSG_FORMAT); \ @@ -388,7 +399,10 @@ define PARSE_KEYMAP fi; COMMAND_false_$$(COMMAND) := \ printf "$$(MAKE_MSG)\n\n"; \ - $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; + $$(MAKE_CMD) $$(MAKE_VARS) SILENT=false; \ + if [ $$$$? -gt 0 ]; \ + then error_occured=1; \ + fi; endef # Just parse all the keymaps for a specifc keyboard @@ -396,6 +410,41 @@ define PARSE_ALL_KEYMAPS $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYMAP,$$(KEYMAPS))) endef +define BUILD_TEST + TEST_NAME := $1 + MAKE_TARGET := $2 + COMMAND := $1 + MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) + MAKE_VARS := TEST=$$(TEST_NAME) + MAKE_MSG := $$(MSG_MAKE_TEST) + $$(eval $$(call BUILD)) + ifneq ($$(MAKE_TARGET),clean) + TEST_EXECUTABLE := $$(TEST_DIR)/$$(TEST_NAME).elf + TESTS += $$(TEST_NAME) + TEST_MSG := $$(MSG_TEST) + $$(TEST_NAME)_COMMAND := \ + printf "$$(TEST_MSG)\n"; \ + $$(TEST_EXECUTABLE); \ + if [ $$$$? -gt 0 ]; \ + then error_occured=1; \ + fi; \ + printf "\n"; + endif +endef + +define PARSE_TEST + TESTS := + TEST_NAME := $$(firstword $$(subst -, ,$$(RULE))) + TEST_TARGET := $$(subst $$(TEST_NAME),,$$(subst $$(TEST_NAME)-,,$$(RULE))) + ifeq ($$(TEST_NAME),all) + MATCHED_TESTS := $$(TEST_LIST) + else + MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),)) + endif + $$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET)))) +endef + + # Set the silent mode depending on if we are trying to compile multiple keyboards or not # By default it's on in that case, but it can be overriden by specifying silent=false # from the command line @@ -440,12 +489,13 @@ $(SUBPROJECTS): %: %-allkm # But we return the error code at the end, to trigger travis failures +error_occured=0; \ $(foreach COMMAND,$(COMMANDS),$(RUN_COMMAND)) \ - if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi - + if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ + $(foreach TEST,$(TESTS),$($(TEST)_COMMAND)) \ + if [ $$error_occured -gt 0 ]; then printf "$(MSG_ERRORS)" & exit $$error_occured; fi;\ # All should compile everything .PHONY: all -all: all-keyboards +all: all-keyboards test-all # Define some shortcuts, mostly for compability with the old syntax .PHONY: all-keyboards @@ -454,9 +504,16 @@ all-keyboards: allkb-allsp-allkm .PHONY: all-keyboards-defaults all-keyboards-defaults: allkb-allsp-default +.PHONY: test +test: test-all + +.PHONY: test-clean +test-clean: test-all-clean # Generate the version.h file GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags 2>/dev/null || date +"%Y-%m-%d-%H:%M:%S") BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S") $(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h) -$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
\ No newline at end of file +$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h) + +include $(ROOT_DIR)/testlist.mk
\ No newline at end of file diff --git a/build_keyboard.mk b/build_keyboard.mk index f843572f66..04632c1c94 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -4,19 +4,7 @@ endif .DEFAULT_GOAL := all -include message.mk - - -# Directory common source filess exist -TOP_DIR = . -TMK_DIR = tmk_core -TMK_PATH = $(TOP_DIR)/$(TMK_DIR) -LIB_PATH = $(TOP_DIR)/lib - -QUANTUM_DIR = quantum -QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) - -BUILD_DIR := $(TOP_DIR)/.build +include common.mk ifneq ($(SUBPROJECT),) TARGET ?= $(KEYBOARD)_$(SUBPROJECT)_$(KEYMAP) @@ -35,6 +23,16 @@ ifdef master MASTER = $(master) endif +ifeq ($(MASTER),right) + OPT_DEFS += -DMASTER_IS_ON_RIGHT +else + ifneq ($(MASTER),left) +$(error MASTER does not have a valid value(left/right)) + endif +endif + + + KEYBOARD_PATH := keyboards/$(KEYBOARD) KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c @@ -167,12 +165,8 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) endif ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) - SERIAL_DIR = $(QUANTUM_DIR)/serial_link - SERIAL_PATH = $(QUANTUM_PATH)/serial_link - SERIAL_SRC = $(wildcard $(SERIAL_PATH)/protocol/*.c) - SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c) SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) - OPT_DEFS += -DSERIAL_LINK_ENABLE + OPT_DEFS += $(SERIAL_DEFS) VAPTH += $(SERIAL_PATH) endif @@ -185,15 +179,14 @@ ifneq ($(SUBPROJECT),) VPATH += $(SUBPROJECT_PATH) endif VPATH += $(KEYBOARD_PATH) -VPATH += $(TOP_DIR) -VPATH += $(TMK_PATH) -VPATH += $(QUANTUM_PATH) -VPATH += $(QUANTUM_PATH)/keymap_extras -VPATH += $(QUANTUM_PATH)/audio -VPATH += $(QUANTUM_PATH)/process_keycode +VPATH += $(COMMON_VPATH) include $(TMK_PATH)/common.mk +SRC += $(TMK_COMMON_SRC) +OPT_DEFS += $(TMK_COMMON_DEFS) +EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS) + ifeq ($(PLATFORM),AVR) include $(TMK_PATH)/protocol/lufa.mk include $(TMK_PATH)/avr.mk @@ -205,17 +198,24 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes) include $(VISUALIZER_PATH)/visualizer.mk endif - OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) $(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYMAP=\"$(KEYMAP)\" -$(KEYMAP_OUTPUT)_INC := $(EXTRAINCDIRS) $(VPATH) +$(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) $(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) +# Default target. +all: build sizeafter + +# Change the build target to build a HEX file or a library. +build: elf hex +#build: elf hex eep lss sym +#build: lib + include $(TMK_PATH)/rules.mk diff --git a/build_test.mk b/build_test.mk new file mode 100644 index 0000000000..ee15a45726 --- /dev/null +++ b/build_test.mk @@ -0,0 +1,57 @@ +ifndef VERBOSE +.SILENT: +endif + +.DEFAULT_GOAL := all + +include common.mk + +TARGET=test/$(TEST) + +GTEST_OUTPUT = $(BUILD_DIR)/gtest + +TEST_OBJ = $(BUILD_DIR)/test_obj + +OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT) + +GTEST_INC := \ + $(LIB_PATH)/googletest/googletest/include\ + $(LIB_PATH)/googletest/googlemock/include\ + +GTEST_INTERNAL_INC :=\ + $(LIB_PATH)/googletest/googletest\ + $(LIB_PATH)/googletest/googlemock + +$(GTEST_OUTPUT)_SRC :=\ + googletest/src/gtest-all.cc\ + googletest/src/gtest_main.cc\ + googlemock/src/gmock-all.cc + +$(GTEST_OUTPUT)_DEFS := +$(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC) + +LDFLAGS += -lstdc++ -lpthread -shared-libgcc +CREATE_MAP := no + +VPATH +=\ + $(LIB_PATH)/googletest\ + $(LIB_PATH)/googlemock + +all: elf + +VPATH += $(COMMON_VPATH) + +include $(TMK_PATH)/common.mk +include $(QUANTUM_PATH)/serial_link/tests/rules.mk + +$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC) +$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC) +$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS) + +include $(TMK_PATH)/native.mk +include $(TMK_PATH)/rules.mk + + +$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null) +$(shell mkdir -p $(TEST_OBJ) 2>/dev/null) + diff --git a/common.mk b/common.mk new file mode 100644 index 0000000000..18751cd5ac --- /dev/null +++ b/common.mk @@ -0,0 +1,26 @@ +include message.mk + +# Directory common source files exist +TOP_DIR = . +TMK_DIR = tmk_core +TMK_PATH = $(TOP_DIR)/$(TMK_DIR) +LIB_PATH = $(TOP_DIR)/lib + +QUANTUM_DIR = quantum +QUANTUM_PATH = $(TOP_DIR)/$(QUANTUM_DIR) + +BUILD_DIR := $(TOP_DIR)/.build + +SERIAL_DIR := $(QUANTUM_DIR)/serial_link +SERIAL_PATH := $(QUANTUM_PATH)/serial_link +SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c) +SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c) +SERIAL_DEFS += -DSERIAL_LINK_ENABLE + +COMMON_VPATH := $(TOP_DIR) +COMMON_VPATH += $(TMK_PATH) +COMMON_VPATH += $(QUANTUM_PATH) +COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras +COMMON_VPATH += $(QUANTUM_PATH)/audio +COMMON_VPATH += $(QUANTUM_PATH)/process_keycode +COMMON_VPATH += $(SERIAL_PATH)
\ No newline at end of file diff --git a/keyboards/infinity_chibios/MEMO.txt b/keyboards/infinity60/MEMO.txt index e2886aa002..e2886aa002 100644 --- a/keyboards/infinity_chibios/MEMO.txt +++ b/keyboards/infinity60/MEMO.txt diff --git a/keyboards/infinity_chibios/Makefile b/keyboards/infinity60/Makefile index 4e2a6f00fd..4e2a6f00fd 100644 --- a/keyboards/infinity_chibios/Makefile +++ b/keyboards/infinity60/Makefile diff --git a/keyboards/infinity_chibios/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h index c67153be60..c67153be60 100644 --- a/keyboards/infinity_chibios/bootloader_defs.h +++ b/keyboards/infinity60/bootloader_defs.h diff --git a/keyboards/infinity_chibios/chconf.h b/keyboards/infinity60/chconf.h index 43c845739a..43c845739a 100644 --- a/keyboards/infinity_chibios/chconf.h +++ b/keyboards/infinity60/chconf.h diff --git a/keyboards/infinity_chibios/config.h b/keyboards/infinity60/config.h index 452cc2a9fb..f8346fe165 100644 --- a/keyboards/infinity_chibios/config.h +++ b/keyboards/infinity60/config.h @@ -26,11 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEVICE_VER 0x0001 /* in python2: list(u"whatever".encode('utf-16-le')) */ /* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER "TMK" -#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' -#define PRODUCT "Infinity keyboard/TMK" -#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'T', '\x00', 'M', '\x00', 'K', '\x00' - +#define MANUFACTURER "Input Club" +#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00' +#define PRODUCT "Infinity keyboard/QMK" +#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00' /* key matrix size */ #define MATRIX_ROWS 9 #define MATRIX_COLS 7 diff --git a/keyboards/infinity_chibios/halconf.h b/keyboards/infinity60/halconf.h index 46b37a4f46..46b37a4f46 100644 --- a/keyboards/infinity_chibios/halconf.h +++ b/keyboards/infinity60/halconf.h diff --git a/keyboards/infinity_chibios/infinity_chibios.c b/keyboards/infinity60/infinity60.c index 845eda01b0..e471250feb 100644 --- a/keyboards/infinity_chibios/infinity_chibios.c +++ b/keyboards/infinity60/infinity60.c @@ -14,4 +14,4 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "infinity_chibios.h" +#include "infinity60.h" diff --git a/keyboards/infinity_chibios/infinity_chibios.h b/keyboards/infinity60/infinity60.h index f1ba15e489..f1ba15e489 100644 --- a/keyboards/infinity_chibios/infinity_chibios.h +++ b/keyboards/infinity60/infinity60.h diff --git a/keyboards/infinity_chibios/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 5f3b46a367..4434128579 100644 --- a/keyboards/infinity_chibios/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "infinity_chibios.h" +#include "infinity60.h" const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer diff --git a/keyboards/infinity_chibios/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index e68891f79e..7412b9b9dd 100755 --- a/keyboards/infinity_chibios/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -1,4 +1,4 @@ -#include "infinity_chibios.h" +#include "infinity60.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer diff --git a/keyboards/infinity_chibios/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index a1954d2587..d3728869ab 100644 --- a/keyboards/infinity_chibios/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -1,4 +1,4 @@ -#include "infinity_chibios.h" +#include "infinity60.h" const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0: Default Layer diff --git a/keyboards/infinity_chibios/led.c b/keyboards/infinity60/led.c index aed66c7c03..aed66c7c03 100644 --- a/keyboards/infinity_chibios/led.c +++ b/keyboards/infinity60/led.c diff --git a/keyboards/infinity_chibios/matrix.c b/keyboards/infinity60/matrix.c index 62c165aa53..62c165aa53 100644 --- a/keyboards/infinity_chibios/matrix.c +++ b/keyboards/infinity60/matrix.c diff --git a/keyboards/infinity_chibios/mcuconf.h b/keyboards/infinity60/mcuconf.h index f453304b75..f453304b75 100644 --- a/keyboards/infinity_chibios/mcuconf.h +++ b/keyboards/infinity60/mcuconf.h diff --git a/keyboards/infinity60/readme.md b/keyboards/infinity60/readme.md new file mode 100644 index 0000000000..97457b4077 --- /dev/null +++ b/keyboards/infinity60/readme.md @@ -0,0 +1,29 @@ +Infinity 60% keyboard firmware +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme](/). + +## Keymaps + +Several versions of keymaps are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` + + +## Compiling + +Download or clone the whole firmware and navigate to the keyboards/infinity60 folder. Once your dev env is setup, you'll be able to use the `make` command to both compile your keymap and flash it to your keyboard. + +To just compile, which generates the output files in the `.build` folder at the root of the repository, run `make keymap`, where keymap is the name of the keymap that you want to compile. + +## Flashing + +To flash the firmware to the keyboard + +1. First press the flash button on the bottom of the keyboard. If you already have a flah button mapped in a keyboard layout running on the keyboard, you can also use that. +2. Then run `make keymap-dfu-util`, where keymap is the name of the keymap you want to flash. On Linux based operating systems you might need to run the comamnd as root, for example `sudo make keymap-dfu-util` on Ubuntu. + +**Tip** `make keymap-dfu-util` will also compile the keymap if needed, so you can skip the compilation step if you want to. + diff --git a/keyboards/infinity_chibios/rules.mk b/keyboards/infinity60/rules.mk index 56d6470b59..56d6470b59 100644 --- a/keyboards/infinity_chibios/rules.mk +++ b/keyboards/infinity60/rules.mk diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index 9786e37d8c..9e3b9bb656 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TABM, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_LCTL, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, KC_ENT, \ KC_LSFT, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, KC_DFQW), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, _______, KC_RALT, KC_RGUI, KC_RCTL, KC_DFQW), // QWERTY /* @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TABM, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, \ KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, KC_DOWN), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, _______, KC_RALT, KC_RGUI, KC_RCTL, KC_DFWM), // dead key layer /* @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_P |