Compare commits
101 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
23df3016e8 | ||
![]() |
9019d65b3c | ||
![]() |
2c171b3e5f | ||
![]() |
33a271b8e3 | ||
![]() |
e71b3c6572 | ||
![]() |
f169c715eb | ||
![]() |
2ffcf47793 | ||
![]() |
7ce056cad7 | ||
![]() |
3e7bb19612 | ||
![]() |
e951317acb | ||
![]() |
f71c990215 | ||
![]() |
1aa0be4cf1 | ||
![]() |
0f163c0028 | ||
![]() |
fb9b8dadb9 | ||
![]() |
43d8fa5bf1 | ||
![]() |
36f820be7e | ||
![]() |
e85b185796 | ||
![]() |
6a76192fa4 | ||
![]() |
bd1729d5be | ||
![]() |
fb95d86b39 | ||
![]() |
017458a07b | ||
![]() |
c38589d861 | ||
![]() |
3bb0586acc | ||
![]() |
617578399c | ||
![]() |
c588fca06c | ||
![]() |
a72e8f0865 | ||
![]() |
1c0fe956ac | ||
![]() |
d29906cb64 | ||
![]() |
f646f00b93 | ||
![]() |
83509adc3a | ||
![]() |
26eb97a4a8 | ||
![]() |
fdfd48e8c8 | ||
![]() |
efaf0e830b | ||
![]() |
585d646128 | ||
![]() |
8674f9c466 | ||
![]() |
7424261dae | ||
![]() |
30f22d450d | ||
![]() |
621ae42a6c | ||
![]() |
4217cb5bbc | ||
![]() |
517f75d893 | ||
![]() |
dd73e14c9b | ||
![]() |
66e2d6a063 | ||
![]() |
f2e1609801 | ||
![]() |
74d752b531 | ||
![]() |
3ab0f4d9e5 | ||
![]() |
1a8042ae91 | ||
![]() |
a284245f77 | ||
![]() |
85d688e92c | ||
![]() |
4c2f04986a | ||
![]() |
3007d01718 | ||
![]() |
3b9fabb9aa | ||
![]() |
a8992a2cfe | ||
![]() |
7837d96b6e | ||
![]() |
56026dd4df | ||
![]() |
1552fd6ae1 | ||
![]() |
133908da74 | ||
![]() |
3c2c489768 | ||
![]() |
b236e51b69 | ||
![]() |
17e81baab3 | ||
![]() |
f9eb11a674 | ||
![]() |
bb99d7117c | ||
![]() |
a5ba30338f | ||
![]() |
9af272e4bb | ||
![]() |
ac97870801 | ||
![]() |
083267680d | ||
![]() |
e6c9b07e1c | ||
![]() |
2dcd6c38fa | ||
![]() |
f54b4771eb | ||
![]() |
164a6c994b | ||
![]() |
a144968807 | ||
![]() |
16774333ad | ||
![]() |
5fc5661147 | ||
![]() |
d1ff2bb9db | ||
![]() |
821f72eae9 | ||
![]() |
b5675e2025 | ||
![]() |
967cf0f6d4 | ||
![]() |
5df74f3ba7 | ||
![]() |
f1d81d2cc6 | ||
![]() |
2c5b551970 | ||
![]() |
52f671c23e | ||
![]() |
b27fb216ef | ||
![]() |
ff6beeb7a3 | ||
![]() |
b3945c103c | ||
![]() |
046f1baf30 | ||
![]() |
c0ec1756af | ||
![]() |
ec1e936dfb | ||
![]() |
1b1adf35bb | ||
![]() |
15635817b5 | ||
![]() |
0881f2dbfa | ||
![]() |
d8e9c183be | ||
![]() |
dda858c437 | ||
![]() |
a2ac883779 | ||
![]() |
af13e9a12d | ||
![]() |
d89114400c | ||
![]() |
56be300757 | ||
![]() |
91f2e9fb5e | ||
![]() |
02ef122cbb | ||
![]() |
f66361d678 | ||
![]() |
da4c2d2e3e | ||
![]() |
b73c935d36 | ||
![]() |
dfb0a512a0 |
2
Makefile
2
Makefile
@@ -419,7 +419,7 @@ define BUILD_TEST
|
||||
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_VARS := TEST=$$(TEST_NAME) FULL_TESTS=$$(FULL_TESTS)
|
||||
MAKE_MSG := $$(MSG_MAKE_TEST)
|
||||
$$(eval $$(call BUILD))
|
||||
ifneq ($$(MAKE_TARGET),clean)
|
||||
|
30
build_full_test.mk
Normal file
30
build_full_test.mk
Normal file
@@ -0,0 +1,30 @@
|
||||
# Copyright 2017 Fred Sundvik
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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 $(TMK_PATH)/protocol.mk
|
||||
|
||||
TEST_PATH=tests/$(TEST)
|
||||
|
||||
$(TEST)_SRC= \
|
||||
$(TEST_PATH)/test.cpp \
|
||||
$(TMK_COMMON_SRC) \
|
||||
$(QUANTUM_SRC) \
|
||||
tests/test_common/matrix.c \
|
||||
tests/test_common/test_driver.cpp \
|
||||
tests/test_common/keyboard_report_util.cpp \
|
||||
tests/test_common/test_fixture.cpp
|
||||
$(TEST)_DEFS=$(TMK_COMMON_DEFS)
|
||||
$(TEST)_CONFIG=$(TEST_PATH)/config.h
|
||||
VPATH+=$(TOP_DIR)/tests/test_common
|
@@ -31,8 +31,6 @@ $(error MASTER does not have a valid value(left/right))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
|
||||
KEYBOARD_PATH := keyboards/$(KEYBOARD)
|
||||
KEYBOARD_C := $(KEYBOARD_PATH)/$(KEYBOARD).c
|
||||
|
||||
@@ -42,7 +40,6 @@ else
|
||||
$(error "$(KEYBOARD_C)" does not exist)
|
||||
endif
|
||||
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SUBPROJECT_PATH := keyboards/$(KEYBOARD)/$(SUBPROJECT)
|
||||
SUBPROJECT_C := $(SUBPROJECT_PATH)/$(SUBPROJECT).c
|
||||
@@ -118,141 +115,12 @@ endif
|
||||
# # project specific files
|
||||
SRC += $(KEYBOARD_C) \
|
||||
$(KEYMAP_C) \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
$(QUANTUM_SRC)
|
||||
|
||||
ifneq ($(SUBPROJECT),)
|
||||
SRC += $(SUBPROJECT_C)
|
||||
endif
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||
OPT_DEFS += -DAPI_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api.c
|
||||
MIDI_ENABLE=yes
|
||||
endif
|
||||
|
||||
MUSIC_ENABLE := 0
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||
endif
|
||||
|
||||
ifeq ($(MUSIC_ENABLE), 1)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||
OPT_DEFS += -DCOMBO_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODE_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||
OPT_DEFS += -DPRINTING_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
VAPTH += $(SERIAL_PATH)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(VARIABLE_TRACE)),)
|
||||
SRC += $(QUANTUM_DIR)/variable_trace.c
|
||||
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
|
||||
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
|
||||
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LCD_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
|
||||
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
# Optimize size but this may cause error "relocation truncated to fit"
|
||||
#EXTRALDFLAGS = -Wl,--relax
|
||||
|
||||
@@ -264,9 +132,10 @@ endif
|
||||
VPATH += $(KEYBOARD_PATH)
|
||||
VPATH += $(COMMON_VPATH)
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/protocol.mk
|
||||
|
||||
include $(TMK_PATH)/common.mk
|
||||
|
||||
SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
@@ -40,13 +40,23 @@ VPATH +=\
|
||||
all: elf
|
||||
|
||||
VPATH += $(COMMON_VPATH)
|
||||
PLATFORM:=TEST
|
||||
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include tests/$(TEST)/rules.mk
|
||||
endif
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include build_full_test.mk
|
||||
endif
|
||||
|
||||
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
||||
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
||||
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
||||
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
|
||||
|
||||
include $(TMK_PATH)/native.mk
|
||||
include $(TMK_PATH)/rules.mk
|
||||
|
@@ -11,17 +11,10 @@ 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 += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(SERIAL_PATH)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
153
common_features.mk
Normal file
153
common_features.mk
Normal file
@@ -0,0 +1,153 @@
|
||||
# Copyright 2017 Fred Sundvik
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# 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/>.
|
||||
|
||||
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 += $(SERIAL_PATH)
|
||||
|
||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api/api_sysex.c
|
||||
OPT_DEFS += -DAPI_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/api.c
|
||||
MIDI_ENABLE=yes
|
||||
endif
|
||||
|
||||
MUSIC_ENABLE := 0
|
||||
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
OPT_DEFS += -DAUDIO_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/audio.c
|
||||
SRC += $(QUANTUM_DIR)/audio/voices.c
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
MUSIC_ENABLE := 1
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||
endif
|
||||
|
||||
ifeq ($(MUSIC_ENABLE), 1)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(COMBO_ENABLE)), yes)
|
||||
OPT_DEFS += -DCOMBO_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FAUXCLICKY_ENABLE)), yes)
|
||||
OPT_DEFS += -DFAUXCLICKY_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/fauxclicky.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UCIS_ENABLE)), yes)
|
||||
OPT_DEFS += -DUCIS_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODEMAP_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_ENABLE)), yes)
|
||||
OPT_DEFS += -DUNICODE_ENABLE
|
||||
UNICODE_COMMON = yes
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/light_ws2812.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
||||
OPT_DEFS += -DTAP_DANCE_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PRINTING_ENABLE)), yes)
|
||||
OPT_DEFS += -DPRINTING_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
|
||||
SRC += $(TMK_DIR)/protocol/serial_uart.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
|
||||
SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
|
||||
OPT_DEFS += $(SERIAL_DEFS)
|
||||
VAPTH += $(SERIAL_PATH)
|
||||
endif
|
||||
|
||||
ifneq ($(strip $(VARIABLE_TRACE)),)
|
||||
SRC += $(QUANTUM_DIR)/variable_trace.c
|
||||
OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
|
||||
ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
|
||||
OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LCD_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
|
||||
CIE1931_CURVE = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_BREATHING_TABLE)), yes)
|
||||
OPT_DEFS += -DUSE_LED_BREATHING_TABLE
|
||||
LED_TABLES = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
|
||||
endif
|
@@ -35,8 +35,8 @@ void promicro_bootloader_jmp(bool program);
|
||||
{ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_NO, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b }, \
|
||||
{ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_NO, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b }, \
|
||||
{ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_NO, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b }, \
|
||||
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k46, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b }, \
|
||||
{ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c, KC_##k4d } \
|
||||
{ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k47, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b }, \
|
||||
{ KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b, KC_##k4c, KC_##k4d } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
4
keyboards/atreus62/keymaps/atreus52/Makefile
Normal file
4
keyboards/atreus62/keymaps/atreus52/Makefile
Normal file
@@ -0,0 +1,4 @@
|
||||
NKRO_ENABLE = true
|
||||
MOUSEKEY_ENABLE = no
|
||||
EXTRAKEY_ENABLE = yes
|
||||
CONSOLE_ENABLE = no
|
10
keyboards/atreus62/keymaps/atreus52/README.md
Normal file
10
keyboards/atreus62/keymaps/atreus52/README.md
Normal file
@@ -0,0 +1,10 @@
|
||||
<!-- -*- mode: markdown; fill-column: 8192 -*- -->
|
||||
|
||||
Atreus52 Modification
|
||||
=======================
|
||||
|
||||
Firmware for my custom keyboard based on the Atreus layout, but with 5 rows and only 5 columns per hand.
|
||||
More documentation coming soon.
|
||||
|
||||
# License
|
||||
GPL-3+
|
18
keyboards/atreus62/keymaps/atreus52/config.h
Normal file
18
keyboards/atreus62/keymaps/atreus52/config.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "../../config.h"
|
||||
|
||||
#undef MANUFACTURER
|
||||
#undef PRODUCT
|
||||
#undef DESCRIPTION
|
||||
#undef MATRIX_ROW_PINS
|
||||
#undef MATRIX_COL_PINS
|
||||
#undef DIODE_DIRECTION
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define MANUFACTURER Mesh Industries
|
||||
#define PRODUCT Atreus52 Treeboard
|
||||
#define DESCRIPTION q.m.k. keyboard firmware for Atreus52
|
||||
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { B2, B1, F7, F6, F5, F4, B6, D3, D2, D1, D0, D4, B3 }
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
99
keyboards/atreus62/keymaps/atreus52/keymap.c
Normal file
99
keyboards/atreus62/keymaps/atreus52/keymap.c
Normal file
@@ -0,0 +1,99 @@
|
||||
#include "atreus62.h"
|
||||
|
||||
// Layers
|
||||
#define DVORAK 0
|
||||
#define QWERTY 1
|
||||
#define RAISE 2
|
||||
#define LOWER 3
|
||||
#define BDO 4
|
||||
#define RESETL 5
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[DVORAK] = KC_KEYMAP(
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, QUOT, COMM, DOT, P, Y, F, G, C, R, L, NO, \
|
||||
NO, A, O, E, U, I, D, H, T, N, S, NO, \
|
||||
NO, SCLN, Q, J, K, X, B, M, W, V, Z, NO, \
|
||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||
|
||||
[QWERTY] = KC_KEYMAP(
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, Q, W, E, R, T, Y, U, I, O, P, NO, \
|
||||
NO, A, S, D, F, G, H, J, K, L, SCLN, NO, \
|
||||
NO, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, \
|
||||
NO, FN2, LALT, LCTL, FN1, LSFT, BSPC, ENT, SPC, FN0, LGUI, LEFT, RGHT, NO ),
|
||||
|
||||
[RAISE] = KC_KEYMAP(
|
||||
NO, MRWD, MPRV, MPLY, MNXT, MFFD, TRNS, MUTE, VOLD, VOLU, DEL, NO, \
|
||||
NO, TILD, GRV, LCBR, RCBR, DQUO, QUOT, EQL, PLUS, MINS, QUES, NO, \
|
||||
NO, ESC, TAB, LPRN, RPRN, BSLS, SLSH, LEFT, DOWN, UP, RGHT, NO, \
|
||||
NO, TRNS, TRNS, LBRC, RBRC, TRNS, INS, PIPE, UNDS, TRNS, TRNS, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN3, NO ),
|
||||
|
||||
[LOWER] = KC_KEYMAP(
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO, \
|
||||
NO, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, NO, \
|
||||
NO, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, DOT, TRNS, TRNS, TRNS, NO, \
|
||||
NO, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, NO ),
|
||||
|
||||
[BDO] = KC_KEYMAP(
|
||||
NO, ESC, 1, 2, 3, 4, 5, 0, SLSH, U, C, NO, \
|
||||
NO, TAB, Q, W, E, R, 6, Y, I, O, P, NO, \
|
||||
NO, LSFT, A, S, D, F, 7, G, H, J, K, NO, \
|
||||
NO, T, Z, X, C, V, 8, B, N, M, L, NO, \
|
||||
NO, LCTL, SPC, SPC, SPC, SPC, COMM, ENT, 9, NO, NO, NO, FN2, NO ),
|
||||
|
||||
[RESETL] = KEYMAP(
|
||||
KC_NO, RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_FN3,KC_NO )
|
||||
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
[0] = ACTION_LAYER_MOMENTARY(RAISE), // Raise layer
|
||||
[1] = ACTION_LAYER_MOMENTARY(LOWER), // Lower layer
|
||||
[2] = ACTION_LAYER_TOGGLE(BDO), // BDO layer
|
||||
[3] = ACTION_LAYER_TOGGLE(RESETL) // RESET layer
|
||||
};
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch (id) {
|
||||
case 0:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
}
|
||||
else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
static uint8_t qw_dv_swap_state = 0;
|
||||
|
||||
bool process_record_user (uint16_t keycode, keyrecord_t *record) {
|
||||
if (keycode == KC_LGUI) {
|
||||
if (record->event.pressed)
|
||||
qw_dv_swap_state |= 0b00000001;
|
||||
else
|
||||
qw_dv_swap_state &= ~(0b00000001);
|
||||
}
|
||||
if (keycode == KC_LCTL) {
|
||||
if (record->event.pressed)
|
||||
qw_dv_swap_state |= 0b00000010;
|
||||
else
|
||||
qw_dv_swap_state &= ~(0b00000010);
|
||||
}
|
||||
|
||||
if (qw_dv_swap_state == 0b00000011) {
|
||||
layer_invert(DVORAK);
|
||||
}
|
||||
return true;
|
||||
}
|
@@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//#define INFINITY_PROTOTYPE
|
||||
|
||||
/* Keymap for Infinity 1.1a (first revision with LED support) */
|
||||
//#define INFINITY_LED
|
||||
#define INFINITY_LED
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
|
@@ -76,7 +76,7 @@
|
||||
* @brief Enables the I2C subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_I2C FALSE
|
||||
#define HAL_USE_I2C TRUE
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -139,7 +139,7 @@
|
||||
* @brief Enables the SERIAL over USB subsystem.
|
||||
*/
|
||||
#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__)
|
||||
#define HAL_USE_SERIAL_USB TRUE
|
||||
#define HAL_USE_SERIAL_USB FALSE
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
4
keyboards/infinity60/keymaps/jpetermans/Makefile
Normal file
4
keyboards/infinity60/keymaps/jpetermans/Makefile
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
11
keyboards/infinity60/keymaps/jpetermans/config.h
Normal file
11
keyboards/infinity60/keymaps/jpetermans/config.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
//overrides
|
||||
#undef TAPPING_TOGGLE
|
||||
#define TAPPING_TOGGLE 2
|
||||
|
||||
#endif
|
304
keyboards/infinity60/keymaps/jpetermans/keymap.c
Normal file
304
keyboards/infinity60/keymaps/jpetermans/keymap.c
Normal file
File diff suppressed because it is too large
Load Diff
87
keyboards/infinity60/keymaps/jpetermans/readme.md
Normal file
87
keyboards/infinity60/keymaps/jpetermans/readme.md
Normal file
@@ -0,0 +1,87 @@
|
||||
Backlight for Infinity60
|
||||
========================
|
||||
|
||||
## Led Controller Specs
|
||||
|
||||
The Infinity60 (revision 1.1a) pcb uses the IS31FL3731C matrix LED driver from ISSI [(datasheet)](http://www.issi.com/WW/pdf/31FL3731C.pdf). The IS31 has the ability to control two led matrices (A & B), each matrix controlling 9 pins, each pin controlling 8 leds. The Infinity only utilizes matrix A.
|
||||
|
||||
Infinity60 LED Map:
|
||||
digits mean "row" and "col", i.e. 45 means pin 4, column 5 in the IS31 datasheet
|
||||
```c
|
||||
11 12 13 14 15 16 17 18 21 22 23 24 25 26 27*
|
||||
28 31 32 33 34 35 36 37 38 41 42 43 44 45
|
||||
46 47 48 51 52 53 54 55 56 57 58 61 62
|
||||
63 64 65 66 67 68 71 72 73 74 75 76 77*
|
||||
78 81 82 83 84 85 86 87
|
||||
```
|
||||
*Unused in Alphabet Layout
|
||||
|
||||
The IS31 includes 8 led pages (or frames) 0-7 than can be displayed, and each page consists of 144 bytes.
|
||||
- **bytes 0 - 17** - LED control (on/off).
|
||||
* 18 pins which alternate between A and B matrices (A1, B1, A2, B2, ..).
|
||||
* Each byte controls the 8 leds on that pin with bits (8 to 1).
|
||||
- **bytes 8 - 35** - Blink control.
|
||||
* Same as LED control above, but sets blink on/off.
|
||||
- **bytes 36 - 143** - PWM control.
|
||||
* One byte per LED, sets PWM from 0 to 255.
|
||||
* Same as above, the register alternates, every 8 *bytes* (not bits) between the A & B matrices.
|
||||
|
||||
## Led Controller Code
|
||||
In the Infinity60 project folder, led_controller.c sets up ability to write led layers at startup or control leds on demand as part of fn_actions. By default led_controller.c assumes page 0 will be used for full on/off. The remaining 7 pages (1-7) are free for preset led maps or single led actions at init or on demand. Communication with the IS31 is primarily done through the led_mailbox using chMBPost described further below under "Sending messages in Keymap.c". This code is based on work matt3o and flabbergast did for tmk firmware on the [whitefox](https://github.com/tmk/whitefox).
|
||||
|
||||
One function is available to directly set leds without the mailbox:
|
||||
```
|
||||
write_led_page(page#, array of leds by address, # of addresses in array)
|
||||
```
|
||||
This function saves a full page to the controller using a supplied array of led locations such as:
|
||||
```c
|
||||
uint8_t led_numpad[16] = {
|
||||
18,21,22,23,
|
||||
37,38,41,42,
|
||||
55,56,57,58,
|
||||
72,73,74,75
|
||||
}
|
||||
write_led_page(5, led_numpad, 16);
|
||||
```
|
||||
|
||||
Remaining led control is done through the led mailbox using these message types:
|
||||
- **SET_FULL_ROW** (3 bytes) - message type, 8-bit mask, and row#. Sets all leds on one pin per the bit mask.
|
||||
- **OFF_LED, ON_LED, TOGGLE_LED** (3 bytes) - message type, led address, and page#. Off/on/toggle specific led.
|
||||
- **BLINK_OFF_LED, BLINK_ON_LED, BLINK_OFF_LED** (3 bytes) - message type, led address, and page#. Set blink Off/on/toggle for specific led.
|
||||
- **TOGGLE_ALL** (1 byte) - Turn on/off full backlight.
|
||||
- **TOGGLE_BACKLIGHT** (2 bytes) - message type, on/off. Sets backlight completely off, no leds will display.
|
||||
- **DISPLAY_PAGE** (2 bytes) - message type, page to display. Switch to specific pre-set page.
|
||||
- **RESET_PAGE** (2 bytes) - message type, page to reset. Reset/erase specific page.
|
||||
- **TOGGLE_NUM_LOCK** (2 bytes) - message type, on/off (NUM_LOCK_LED_ADDRESS). Toggle numlock on/off. Usually run with the `set_leds` function to check state of numlock or capslock. If all leds are on (e.i. TOGGLE_ALL) then this sets numlock to blink instead (this is still a little buggy if toggling on/off quickly).
|
||||
- **TOGGLE_CAPS_LOCK** (2 bytes) - message type, on/off (CAPS_LOCK_LED_ADDRESS). Same as numlock.
|
||||
- **STEP_BRIGHTNESS** (2 bytes) - message type, and step up (1) or step down (0). Increase or decrease led brightness.
|
||||
|
||||
## Sending messages in Keymap.c
|
||||
Sending an action to the led mailbox is done using chMBPost:
|
||||
```
|
||||
chMBPost(&led_mailbox, message, timeout);
|
||||
```
|
||||
- &led_mailbox - pointer to led mailbox
|
||||
- message - up to 4 bytes but most messages use only 2. First byte (LSB) is the message type, the remaining three bytes are the message to process.
|
||||
- timeout is TIME_IMMEDIATE
|
||||
|
||||
An example:
|
||||
```c
|
||||
//set the message to be sent. First byte (LSB) is the led address, and second is the message type
|
||||
msg=(42 << 8) | ON_LED;
|
||||
|
||||
//send msg to the led mailbox
|
||||
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
|
||||
```
|
||||
|
||||
Another:
|
||||
```c
|
||||
msg=(46 << 8) | BLINK_TOGGLE_LED;
|
||||
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
|
||||
```
|
||||
|
||||
Finally, SET_FULL_ROW requires an extra byte with row information in the message so sending this message looks like:
|
||||
```c
|
||||
msg=(row<<16) | (led_pin_byte << 8) | SET_FULL_ROW;
|
||||
chMBPost(&led_mailbox, msg, TIME_IMMEDIATE);
|
||||
```
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user