summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rwxr-xr-xbin/qmk2
-rw-r--r--build_json.mk2
-rw-r--r--build_keyboard.mk9
-rw-r--r--common_features.mk26
-rw-r--r--docs/feature_rgb_matrix.md2
-rw-r--r--docs/keycodes.md3
-rw-r--r--docs/one_shot_keys.md3
-rw-r--r--docs/ws2812_driver.md3
-rw-r--r--drivers/chibios/ws2812_pwm.c11
-rw-r--r--drivers/oled/oled_driver.h4
-rw-r--r--keyboards/aeboards/ext65/rev2/config.h2
-rw-r--r--keyboards/aeboards/ext65/rev2/halconf.h2
-rw-r--r--keyboards/aeboards/ext65/rev2/mcuconf.h2
-rw-r--r--keyboards/cannonkeys/an_c/rules.mk2
-rw-r--r--keyboards/cannonkeys/chimera65/rules.mk2
-rw-r--r--keyboards/cannonkeys/instant60/rules.mk2
-rw-r--r--keyboards/cannonkeys/iron165/rules.mk2
-rw-r--r--keyboards/cannonkeys/satisfaction75/rules.mk2
-rw-r--r--keyboards/cannonkeys/savage65/rules.mk2
-rw-r--r--keyboards/cannonkeys/tmov2/rules.mk2
-rw-r--r--keyboards/cannonkeys/tsukuyomi/rules.mk2
-rw-r--r--keyboards/clueboard/66_hotswap/gen1/gen1.c2
-rw-r--r--keyboards/crkbd/rev1/common/config.h1
-rw-r--r--keyboards/crkbd/rev1/common/rules.mk1
-rw-r--r--keyboards/crkbd/rev1/rev1.c2
-rw-r--r--keyboards/daji/seis_cinco/rules.mk2
-rw-r--r--keyboards/handwired/ck4x4/rules.mk2
-rw-r--r--keyboards/handwired/onekey/rules.mk4
-rw-r--r--keyboards/projectkb/alice/config.h3
-rw-r--r--keyboards/projectkb/alice/halconf.h2
-rw-r--r--keyboards/projectkb/alice/mcuconf.h2
-rw-r--r--keyboards/projectkb/signature87/rules.mk2
-rw-r--r--keyboards/ramonimbao/wete/config.h2
-rw-r--r--keyboards/ramonimbao/wete/halconf.h2
-rw-r--r--keyboards/ramonimbao/wete/mcuconf.h2
-rw-r--r--keyboards/readme.md2
-rw-r--r--keyboards/terrazzo/terrazzo.c1
-rw-r--r--keyboards/westfoxtrot/prophet/config.h2
-rw-r--r--keyboards/westfoxtrot/prophet/halconf.h27
-rw-r--r--keyboards/westfoxtrot/prophet/mcuconf.h5
-rw-r--r--lib/python/qmk/commands.py1
-rw-r--r--lib/python/qmk/tests/test_cli_commands.py4
-rw-r--r--quantum/bootmagic/bootmagic.h24
-rw-r--r--quantum/bootmagic/bootmagic_full.c (renamed from tmk_core/common/bootmagic.c)112
-rw-r--r--quantum/bootmagic/bootmagic_full.h (renamed from tmk_core/common/bootmagic.h)21
-rw-r--r--quantum/bootmagic/bootmagic_lite.c (renamed from tmk_core/common/bootmagic_lite.c)17
-rw-r--r--quantum/bootmagic/bootmagic_lite.h25
-rw-r--r--quantum/bootmagic/magic.c54
-rw-r--r--quantum/bootmagic/magic.h18
-rw-r--r--quantum/keycode_config.h1
-rw-r--r--quantum/led_matrix.c11
-rw-r--r--quantum/led_matrix.h7
-rw-r--r--quantum/led_matrix_drivers.c7
-rw-r--r--quantum/process_keycode/process_backlight.c29
-rw-r--r--quantum/quantum.c28
-rw-r--r--quantum/quantum.h55
-rw-r--r--quantum/quantum_keycodes.h14
-rw-r--r--quantum/rgb_matrix.c34
-rw-r--r--quantum/rgb_matrix_types.h9
-rw-r--r--quantum/split_common/split_util.c70
-rw-r--r--quantum/split_common/transport.c45
-rw-r--r--readme.md6
-rw-r--r--tmk_core/common.mk23
-rw-r--r--tmk_core/common/action_util.c58
-rw-r--r--tmk_core/common/action_util.h5
-rw-r--r--tmk_core/common/arm_atsam/_wait.h22
-rw-r--r--tmk_core/common/avr/_wait.h29
-rw-r--r--tmk_core/common/avr/suspend.c4
-rw-r--r--tmk_core/common/chibios/_wait.h55
-rw-r--r--tmk_core/common/chibios/chibios_config.h3
-rw-r--r--tmk_core/common/chibios/sleep_led.c88
-rw-r--r--tmk_core/common/chibios/suspend.c8
-rw-r--r--tmk_core/common/chibios/wait.c89
-rw-r--r--tmk_core/common/eeconfig.c2
-rw-r--r--tmk_core/common/eeconfig.h14
-rw-r--r--tmk_core/common/keyboard.c10
-rw-r--r--tmk_core/common/magic.c39
-rw-r--r--tmk_core/common/magic.h3
-rw-r--r--tmk_core/common/test/_wait.h22
-rw-r--r--tmk_core/common/usb_util.c29
-rw-r--r--tmk_core/common/usb_util.h22
-rw-r--r--tmk_core/common/wait.h125
-rw-r--r--tmk_core/protocol.mk4
-rw-r--r--tmk_core/protocol/chibios.mk1
-rw-r--r--tmk_core/protocol/chibios/usb_util.c21
-rw-r--r--tmk_core/protocol/lufa.mk1
-rw-r--r--tmk_core/protocol/lufa/usb_util.c34
-rw-r--r--tmk_core/protocol/vusb.mk1
-rw-r--r--tmk_core/protocol/vusb/usb_util.c24
90 files changed, 991 insertions, 501 deletions
diff --git a/Makefile b/Makefile
index 91ab9e4e8e..de0a2d4153 100644
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,13 @@ $(info QMK Firmware $(QMK_VERSION))
endif
endif
+# Determine which qmk cli to use
+ifeq (, $(shell which qmk))
+ QMK_BIN = bin/qmk
+else
+ QMK_BIN = qmk
+endif
+
# avoid 'Entering|Leaving directory' messages
MAKEFLAGS += --no-print-directory
@@ -501,8 +508,8 @@ endef
%:
# Check if we have the CMP tool installed
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
- # Ensure that bin/qmk works.
- if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
+ # Ensure that $(QMK_BIN) works.
+ if ! $(QMK_BIN) hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; exit 1; fi
# Check if the submodules are dirty, and display a warning if they are
ifndef SKIP_GIT
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
diff --git a/bin/qmk b/bin/qmk
index a3c1be328a..28486026f9 100755
--- a/bin/qmk
+++ b/bin/qmk
@@ -75,6 +75,8 @@ def main():
os.environ['ORIG_CWD'] = os.getcwd()
os.chdir(qmk_dir)
+ print('Warning: The bin/qmk script is being deprecated. Please install the QMK CLI: python3 -m pip install qmk', file=sys.stderr)
+
# Import the subcommands
import qmk.cli # noqa
diff --git a/build_json.mk b/build_json.mk
index 6e2f9c4c8f..8822be6a12 100644
--- a/build_json.mk
+++ b/build_json.mk
@@ -28,4 +28,4 @@ endif
# Generate the keymap.c
$(KEYBOARD_OUTPUT)/src/keymap.c: $(KEYMAP_JSON)
- bin/qmk json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
+ $(QMK_BIN) json2c --quiet --output $(KEYMAP_C) $(KEYMAP_JSON)
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 366d1f5d2f..74046a0947 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -12,6 +12,9 @@ endif
include common.mk
+# Set the qmk cli to use
+QMK_BIN ?= qmk
+
# Set the filename for the final firmware binary
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
@@ -97,7 +100,7 @@ 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 bin/qmk 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/rules.mk)
include $(INFO_RULES_MK)
# Check for keymap.json first, so we can regenerate keymap.c
@@ -294,10 +297,10 @@ endif
CONFIG_H += $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
$(KEYBOARD_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
- bin/qmk generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
+ $(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/info_config.h
$(KEYBOARD_OUTPUT)/src/layouts.h: $(INFO_JSON_FILES)
- bin/qmk generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
+ $(QMK_BIN) generate-layouts --quiet --keyboard $(KEYBOARD) --output $(KEYBOARD_OUTPUT)/src/layouts.h
generated-files: $(KEYBOARD_OUTPUT)/src/info_config.h $(KEYBOARD_OUTPUT)/src/layouts.h
diff --git a/common_features.mk b/common_features.mk
index 8c9d0a90c7..fdc481fd2a 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -223,11 +223,10 @@ VALID_LED_MATRIX_TYPES := IS31FL3731 custom
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
- $(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
+ $(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
else
- BACKLIGHT_ENABLE = yes
- BACKLIGHT_DRIVER = custom
OPT_DEFS += -DLED_MATRIX_ENABLE
+ SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
SRC += $(QUANTUM_DIR)/led_matrix.c
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
endif
@@ -422,10 +421,6 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes)
OPT_DEFS += -DUSER_PRINT
endif
-ifeq ($(strip $(USB_HID_ENABLE)), yes)
- include $(TMK_DIR)/protocol/usb_hid.mk
-endif
-
ifeq ($(strip $(WPM_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/wpm.c
OPT_DEFS += -DWPM_ENABLE
@@ -459,6 +454,23 @@ ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/dip_switch.c
endif
+VALID_MAGIC_TYPES := yes full lite
+BOOTMAGIC_ENABLE ?= no
+ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
+ ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
+ $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
+ endif
+ ifeq ($(strip $(BOOTMAGIC_ENABLE)), lite)
+ OPT_DEFS += -DBOOTMAGIC_LITE
+ QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
+ else
+ OPT_DEFS += -DBOOTMAGIC_ENABLE
+ QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_full.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
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 6917de5ab4..a83e1d2a21 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -441,6 +441,8 @@ These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blo
#define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set
#define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set
#define RGB_MATRIX_DISABLE_KEYCODES // disables control of rgb matrix by keycodes (must use code functions to control the feature)
+#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
+ // If RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
```
## EEPROM storage :id=eeprom-storage
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 9acf8b6839..f3c519b130 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -516,6 +516,9 @@ See also: [One Shot Keys](one_shot_keys.md)
|------------|----------------------------------|
|`OSM(mod)` |Hold `mod` for one keypress |
|`OSL(layer)`|Switch to `layer` for one keypress|
+|`OS_ON` |Turns One Shot keys on |
+|`OS_OFF` |Turns One Shot keys off |
+|`OS_TOGG` |Toggles One Shot keys status |
## Space Cadet :id=space-cadet
diff --git a/docs/one_shot_keys.md b/docs/one_shot_keys.md
index 9a082d7d6d..9fc5486299 100644
--- a/docs/one_shot_keys.md
+++ b/docs/one_shot_keys.md
@@ -17,6 +17,9 @@ You can control the behavior of one shot keys by defining these in `config.h`:
* `OSM(mod)` - Momentarily hold down *mod*. You must use the `MOD_*` keycodes as shown in [Mod Tap](mod_tap.md), not the `KC_*` codes.
* `OSL(layer)` - momentary switch to *layer*.
+* `OS_ON` - Turns on One Shot keys.
+* `OS_OFF` - Turns off One Shot keys. OSM act as regular mod keys, OSL act like `MO`.
+* `ON_TOGG` - Toggles the one shot key status.
Sometimes, you want to activate a one-shot key as part of a macro or tap dance routine.
diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md
index cca6827ec8..fa14f02fdb 100644
--- a/docs/ws2812_driver.md
+++ b/docs/ws2812_driver.md
@@ -102,11 +102,14 @@ Configure the hardware via your config.h:
#define WS2812_PWM_DRIVER PWMD2 // default: PWMD2
#define WS2812_PWM_CHANNEL 2 // default: 2
#define WS2812_PWM_PAL_MODE 2 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2
+//#define WS2812_PWM_COMPLEMENTARY_OUTPUT // Define for a complementary timer output (TIMx_CHyN); omit for a normal timer output (TIMx_CHy).
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
#define WS2812_DMA_CHANNEL 2 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
#define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM2_UP // DMAMUX configuration for TIMx_UP -- only required if your MCU has a DMAMUX peripheral, see the respective reference manual for the appropriate values for your MCU.
```
+Note that using a complementary timer output (TIMx_CHyN) is possible only for advanced-control timers (TIM1, TIM8, TIM20 on STM32), and the `STM32_PWM_USE_ADVANCED` option in mcuconf.h must be set to `TRUE`. Complementary outputs of general-purpose timers are not supported due to ChibiOS limitations.
+
You must also turn on the PWM feature in your halconf.h and mcuconf.h
#### Testing Notes
diff --git a/drivers/chibios/ws2812_pwm.c b/drivers/chibios/ws2812_pwm.c
index 140120d488..e6af55b6b3 100644
--- a/drivers/chibios/ws2812_pwm.c
+++ b/drivers/chibios/ws2812_pwm.c
@@ -27,6 +27,15 @@
# error "please consult your MCU's datasheet and specify in your config.h: #define WS2812_DMAMUX_ID STM32_DMAMUX1_TIM?_UP"
#endif
+#ifndef WS2812_PWM_COMPLEMENTARY_OUTPUT
+# define WS2812_PWM_OUTPUT_MODE PWM_OUTPUT_ACTIVE_HIGH
+#else
+# if !STM32_PWM_USE_ADVANCED
+# error "WS2812_PWM_COMPLEMENTARY_OUTPUT requires STM32_PWM_USE_ADVANCED == TRUE"
+# endif
+# define WS2812_PWM_OUTPUT_MODE PWM_COMPLEMENTARY_OUTPUT_ACTIVE_HIGH
+#endif
+
// Push Pull or Open Drain Configuration
// Default Push Pull
#ifndef WS2812_EXTERNAL_PULLUP
@@ -247,7 +256,7 @@ void ws2812_init(void) {
.channels =
{
[0 ... 3] = {.mode = PWM_OUTPUT_DISABLED, .callback = NULL}, // Channels default to disabled
- [WS2812_PWM_CHANNEL - 1] = {.mode = PWM_OUTPUT_ACTIVE_HIGH, .callback = NULL}, // Turn on the channel we care about
+ [WS2812_PWM_CHANNEL - 1] = {.mode = WS2812_PWM_OUTPUT_MODE, .callback = NULL}, // Turn on the channel we care about
},
.cr2 = 0,
.dier = TIM_DIER_UDE, // DMA on update event for next period
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
index 72ab21247d..00896f01c2 100644
--- a/drivers/oled/oled_driver.h
+++ b/drivers/oled/oled_driver.h
@@ -158,6 +158,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# define OLED_I2C_TIMEOUT 100
#endif
+#if !defined(OLED_UPDATE_INTERVAL) && defined(SPLIT_KEYBOARD)
+# define OLED_UPDATE_INTERVAL 50
+#endif
+
typedef struct __attribute__((__packed__)) {
uint8_t *current_element;
uint16_t remaining_element_count;
diff --git a/keyboards/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h
index 541f07ee98..dc1bfb71c2 100644
--- a/keyboards/aeboards/ext65/rev2/config.h
+++ b/keyboards/aeboards/ext65/rev2/config.h
@@ -74,3 +74,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define BACKLIGHT_LEVELS 6
#define BACKLIGHT_BREATHING