diff --git a/.github/labeler.yml b/.github/labeler.yml index 53921f7f959..41b2475f678 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -22,7 +22,6 @@ keymap: via: - keyboards/**/keymaps/via/* cli: - - bin/qmk - requirements.txt - lib/python/**/* python: diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 7a8dc8540fa..2ea810958b4 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -4,11 +4,10 @@ on: push: branches: - master - - future + - develop pull_request: paths: - 'lib/python/**' - - 'bin/qmk' - 'requirements.txt' - '.github/workflows/cli.yml' diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml index 645e0ce106d..f1525526ce8 100644 --- a/.github/workflows/format.yaml +++ b/.github/workflows/format.yaml @@ -36,14 +36,16 @@ jobs: - name: Run qmk formatters shell: 'bash {0}' run: | - qmk format-c --core-only $(< ~/files.txt) - qmk format-python $(< ~/files.txt) - qmk format-text $(< ~/files.txt) - git diff + cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt + qmk format-c --core-only $(< ~/files_changed.txt) || true + qmk format-python $(< ~/files_changed.txt) || true + qmk format-text $(< ~/files_changed.txt) || true - name: Fail when formatting required run: | + git diff for file in $(git diff --name-only); do - echo "::error file=${file}::::File Requires Formatting" + echo "File '${file}' Requires Formatting" + echo "::error file=${file}::Requires Formatting" done test -z "$(git diff --name-only)" diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 00000000000..26bcb2f5110 --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,30 @@ +name: Unit Tests + +on: + push: + branches: + - master + - develop + pull_request: + paths: + - 'builddefs/**' + - 'quantum/**' + - 'platforms/**' + - 'tmk_core/**' + - 'tests/**' + - '*.mk' + - 'Makefile' + - '.github/workflows/unit_test.yml' + +jobs: + test: + runs-on: ubuntu-latest + + container: qmkfm/base_container + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - name: Run tests + run: make test:all diff --git a/.gitignore b/.gitignore index f3b76f7edf5..768f40b1918 100644 --- a/.gitignore +++ b/.gitignore @@ -86,3 +86,8 @@ __pycache__ # Allow to exist but don't include it in the repo user_song_list.h + +# clangd +compile_commands.json +.clangd/ +.cache/ diff --git a/.gitmodules b/.gitmodules index 324ef790d34..681693a5a46 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,10 +6,6 @@ path = lib/chibios-contrib url = https://github.com/qmk/ChibiOS-Contrib branch = master -[submodule "lib/ugfx"] - path = lib/ugfx - url = https://github.com/qmk/uGFX - branch = master [submodule "lib/googletest"] path = lib/googletest url = https://github.com/qmk/googletest diff --git a/Makefile b/Makefile index 5f25eef14b2..88f430619e3 100644 --- a/Makefile +++ b/Makefile @@ -30,11 +30,7 @@ endif endif # Determine which qmk cli to use -ifeq (,$(shell which qmk)) - QMK_BIN = bin/qmk -else - QMK_BIN = qmk -endif +QMK_BIN := qmk # avoid 'Entering|Leaving directory' messages MAKEFLAGS += --no-print-directory @@ -58,8 +54,6 @@ BUILD_DIR := $(ROOT_DIR)/.build TEST_DIR := $(BUILD_DIR)/test ERROR_FILE := $(BUILD_DIR)/error_occurred -MAKEFILE_INCLUDED=yes - # Helper function to process the newt element of a space separated path # It works a bit like the traditional functional head tail # so the CURRENT_PATH_ELEMENT will become the new head @@ -97,31 +91,8 @@ distclean: clean rm -f *.bin *.hex *.uf2 echo 'done.' -#Compatibility with the old make variables, anything you specify directly on the command line -# always overrides the detected folders -ifdef keyboard - KEYBOARD := $(keyboard) -endif -ifdef keymap - KEYMAP := $(keymap) -endif - -# Uncomment these for debugging -# $(info Keyboard: $(KEYBOARD)) -# $(info Keymap: $(KEYMAP)) - -# Set the default goal depending on where we are running make from -# this handles the case where you run make without any arguments .DEFAULT_GOAL := all:all -ifneq ($(KEYMAP),) - .DEFAULT_GOAL := $(KEYBOARD):$(KEYMAP) -else ifneq ($(KEYBOARD),) - # Inside a keyboard folder, build all keymaps for all subprojects - # Note that this is different from the old behaviour, which would - # build only the default keymap of the default keyboard - .DEFAULT_GOAL := $(KEYBOARD):all -endif # Compare the start of the RULE variable with the first argument($1) @@ -245,10 +216,6 @@ define PARSE_RULE else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true) KEYBOARD_RULE=$$(MATCHED_ITEM) $$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM))) - # Otherwise use the KEYBOARD variable, which is determined either by - # the current directory you run make from, or passed in as an argument - else ifneq ($$(KEYBOARD),) - $$(eval $$(call PARSE_KEYBOARD,$$(KEYBOARD))) else $$(info make: *** No rule to make target '$1'. Stop.) $$(info |) @@ -411,11 +378,12 @@ define PARSE_ALL_KEYMAPS endef define BUILD_TEST - TEST_NAME := $1 + TEST_PATH := $1 + TEST_NAME := $$(notdir $$(TEST_PATH)) MAKE_TARGET := $2 COMMAND := $1 MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_test.mk $$(MAKE_TARGET) - MAKE_VARS := TEST=$$(TEST_NAME) FULL_TESTS="$$(FULL_TESTS)" + MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)" MAKE_MSG := $$(MSG_MAKE_TEST) $$(eval $$(call BUILD)) ifneq ($$(MAKE_TARGET),clean) @@ -439,7 +407,7 @@ define PARSE_TEST ifeq ($$(TEST_NAME),all) MATCHED_TESTS := $$(TEST_LIST) else - MATCHED_TESTS := $$(foreach TEST,$$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME),$$(TEST)),$$(TEST),)) + MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring $$(TEST_NAME), $$(notdir $$(TEST))), $$(TEST),)) endif $$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET)))) endef @@ -458,7 +426,8 @@ define SET_SILENT_MODE endif endef -include $(ROOT_DIR)/message.mk +include paths.mk +include $(BUILDDEFS_PATH)/message.mk ifeq ($(strip $(BREAK_ON_ERRORS)), yes) HANDLE_ERROR = exit 1 @@ -494,7 +463,6 @@ endef ifndef SKIP_GIT if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi - if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi if [ ! -e lib/vusb ]; then git submodule sync lib/vusb && git submodule update --depth 50 --init lib/vusb; fi if [ ! -e lib/printf ]; then git submodule sync lib/printf && git submodule update --depth 50 --init lib/printf; fi diff --git a/bin/qmk b/bin/qmk deleted file mode 100755 index 617f9928264..00000000000 --- a/bin/qmk +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env python3 -"""CLI wrapper for running QMK commands. -""" -import os -import sys -from pathlib import Path - -# Add the QMK python libs to our path -script_dir = Path(os.path.realpath(__file__)).parent -qmk_dir = script_dir.parent -python_lib_dir = Path(qmk_dir / 'lib' / 'python').resolve() -sys.path.append(str(python_lib_dir)) - -# Setup the CLI -import milc # noqa - -milc.EMOJI_LOGLEVELS['INFO'] = '{fg_blue}Ψ{style_reset_all}' - - -@milc.cli.entrypoint('QMK Helper Script') -def qmk_main(cli): - """The function that gets run when no subcommand is provided. - """ - cli.print_help() - - -def main(): - """Setup our environment and then call the CLI entrypoint. - """ - # Change to the root of our checkout - os.environ['ORIG_CWD'] = os.getcwd() - os.environ['DEPRECATED_BIN_QMK'] = '1' - 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 milc.subcommand.config # noqa - import qmk.cli # noqa - - # Execute - return_code = milc.cli() - - if return_code is False: - exit(1) - - elif return_code is not True and isinstance(return_code, int): - if return_code < 0 or return_code > 255: - milc.cli.log.error('Invalid return_code: %d', return_code) - exit(255) - - exit(return_code) - - exit(0) - - -if __name__ == '__main__': - main() diff --git a/bootloader.mk b/bootloader.mk deleted file mode 100644 index 5ba118fb443..00000000000 --- a/bootloader.mk +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright 2017 Jack Humbert -# -# 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 . - -# If it's possible that multiple bootloaders can be used for one project, -# you can leave this unset, and the correct size will be selected -# automatically. -# -# Sets the bootloader defined in the keyboard's/keymap's rules.mk -# Current options: -# -# AVR: -# halfkay PJRC Teensy -# caterina Pro Micro (Sparkfun/generic) -# atmel-dfu Atmel factory DFU -# lufa-dfu LUFA DFU -# qmk-dfu QMK DFU (LUFA + blinkenlight) -# qmk-hid QMK HID (LUFA + blinkenlight) -# bootloadhid HIDBootFlash compatible (ATmega32A) -# usbasploader USBaspLoader (ATmega328P) -# ARM: -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) -# stm32duino STM32Duino (STM32F103x8) -# stm32-dfu STM32 USB DFU in ROM -# apm32-dfu APM32 USB DFU in ROM -# -# BOOTLOADER_SIZE can still be defined manually, but it's recommended -# you add any possible configuration to this list - -ifeq ($(strip $(BOOTLOADER)), atmel-dfu) - OPT_DEFS += -DBOOTLOADER_ATMEL_DFU - OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE = 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE = 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), lufa-dfu) - OPT_DEFS += -DBOOTLOADER_LUFA_DFU - OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE ?= 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE ?= 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), qmk-dfu) - OPT_DEFS += -DBOOTLOADER_QMK_DFU - OPT_DEFS += -DBOOTLOADER_DFU - ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) - BOOTLOADER_SIZE ?= 4096 - endif - ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) - BOOTLOADER_SIZE ?= 8192 - endif -endif -ifeq ($(strip $(BOOTLOADER)), qmk-hid) - OPT_DEFS += -DBOOTLOADER_QMK_HID - OPT_DEFS += -DBOOTLOADER_HID - BOOTLOADER_SIZE ?= 4096 -endif -ifeq ($(strip $(BOOTLOADER)), halfkay) - OPT_DEFS += -DBOOTLOADER_HALFKAY - ifeq ($(strip $(MCU)), atmega32u4) - BOOTLOADER_SIZE = 512 - endif - ifeq ($(strip $(MCU)), at90usb1286) - BOOTLOADER_SIZE = 1024 - endif -endif -ifeq ($(strip $(BOOTLOADER)), caterina) - OPT_DEFS += -DBOOTLOADER_CATERINA - BOOTLOADER_SIZE = 4096 -endif -ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID)) - OPT_DEFS += -DBOOTLOADER_BOOTLOADHID - BOOTLOADER_SIZE = 4096 -endif -ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp)) - OPT_DEFS += -DBOOTLOADER_USBASP - BOOTLOADER_SIZE = 4096 -endif -ifeq ($(strip $(BOOTLOADER)), lufa-ms) - OPT_DEFS += -DBOOTLOADER_MS - BOOTLOADER_SIZE ?= 8192 - FIRMWARE_FORMAT = bin -cpfirmware: lufa_warning -.INTERMEDIATE: lufa_warning -lufa_warning: $(FIRMWARE_FORMAT) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) - $(info LUFA MASS STORAGE Bootloader selected) - $(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!) - $(info It is extremely prone to bricking, and is only included to support existing boards.) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) -endif -ifdef BOOTLOADER_SIZE - OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) -endif - -ifeq ($(strip $(BOOTLOADER)), stm32-dfu) - OPT_DEFS += -DBOOTLOADER_STM32_DFU - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 -endif -ifeq ($(strip $(BOOTLOADER)), apm32-dfu) - OPT_DEFS += -DBOOTLOADER_APM32_DFU - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 314B -p 0106 -endif -ifeq ($(strip $(BOOTLOADER)), kiibohd) - OPT_DEFS += -DBOOTLOADER_KIIBOHD - ifeq ($(strip $(MCU_ORIG)), MK20DX128) - MCU_LDSCRIPT = MK20DX128BLDR4 - endif - ifeq ($(strip $(MCU_ORIG)), MK20DX256) - MCU_LDSCRIPT = MK20DX256BLDR8 - endif - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1C11:B007 - DFU_SUFFIX_ARGS = -v 1C11 -p B007 -endif -ifeq ($(strip $(BOOTLOADER)), stm32duino) - OPT_DEFS += -DBOOTLOADER_STM32DUINO - MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader - BOARD = STM32_F103_STM32DUINO - # STM32F103 does NOT have an USB bootloader in ROM (only serial), so setting anything here does not make much sense - STM32_BOOTLOADER_ADDRESS = 0x80000000 - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1EAF:0003 -a 2 -R - DFU_SUFFIX_ARGS = -v 1EAF -p 0003 -endif -ifeq ($(strip $(BOOTLOADER)), tinyuf2) - OPT_DEFS += -DBOOTLOADER_TINYUF2 -endif diff --git a/build_full_test.mk b/build_full_test.mk index f8030cb0600..4cd1ac61b53 100644 --- a/build_full_test.mk +++ b/build_full_test.mk @@ -13,21 +13,24 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -#include $(TMK_PATH)/protocol.mk +$(TEST)_INC := \ + tests\test_common\common_config.h -TEST_PATH=tests/$(TEST) - -$(TEST)_SRC= \ - $(TEST_PATH)/keymap.c \ +$(TEST)_SRC := \ $(TMK_COMMON_SRC) \ $(QUANTUM_SRC) \ $(SRC) \ + tests/test_common/keymap.c \ 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)_SRC += $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) + tests/test_common/test_fixture.cpp \ + tests/test_common/test_keymap_key.cpp \ + tests/test_common/test_logger.cpp \ + $(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp)) + +$(TEST)_DEFS := $(TMK_COMMON_DEFS) $(OPT_DEFS) + +$(TEST)_CONFIG := $(TEST_PATH)/config.h -$(TEST)_DEFS=$(TMK_COMMON_DEFS) $(OPT_DEFS) -$(TEST)_CONFIG=$(TEST_PATH)/config.h -VPATH+=$(TOP_DIR)/tests/test_common +VPATH += $(TOP_DIR)/tests/test_common \ No newline at end of file diff --git a/build_keyboard.mk b/build_keyboard.mk index 37fa6852f87..c12aa0fce00 100644 --- a/build_keyboard.mk +++ b/build_keyboard.mk @@ -10,7 +10,8 @@ endif .DEFAULT_GOAL := all -include common.mk +include paths.mk +include $(BUILDDEFS_PATH)/message.mk # Set the qmk cli to use QMK_BIN ?= qmk @@ -32,20 +33,6 @@ endif # 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 - 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 - ifdef SKIP_VERSION OPT_DEFS += -DSKIP_VERSION endif @@ -115,6 +102,7 @@ include $(INFO_RULES_MK) # Check for keymap.json first, so we can regenerate keymap.c include build_json.mk +# Pull in keymap level rules.mk ifeq ("$(wildcard $(KEYMAP_PATH))", "") # Look through the possible keymap folders until we find a matching keymap.c ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","") @@ -177,7 +165,7 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes) include platforms/chibios/boards/QMK_PROTON_C/convert_to_proton_c.mk endif -include quantum/mcu_selection.mk +include $(BUILDDEFS_PATH)/mcu_selection.mk # Find all the C source files to be compiled in subfolders. KEYBOARD_SRC := @@ -345,6 +333,7 @@ ifeq ("$(USER_NAME)","") endif USER_PATH := users/$(USER_NAME) +# Pull in user level rules.mk -include $(USER_PATH)/rules.mk ifneq ("$(wildcard $(USER_PATH)/config.h)","") CONFIG_H += $(USER_PATH)/config.h @@ -354,7 +343,24 @@ ifneq ("$(wildcard $(USER_PATH)/post_config.h)","") endif # Disable features that a keyboard doesn't support --include disable_features.mk +-include $(BUILDDEFS_PATH)/disable_features.mk + +# Pull in post_rules.mk files from all our subfolders +ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_rules.mk)","") + include $(KEYBOARD_PATH_1)/post_rules.mk +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_rules.mk)","") + include $(KEYBOARD_PATH_2)/post_rules.mk +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_rules.mk)","") + include $(KEYBOARD_PATH_3)/post_rules.mk +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_rules.mk)","") + include $(KEYBOARD_PATH_4)/post_rules.mk +endif +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_rules.mk)","") + include $(KEYBOARD_PATH_5)/post_rules.mk +endif ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","") CONFIG_H += $(KEYMAP_PATH)/config.h @@ -380,9 +386,10 @@ VPATH += $(KEYBOARD_PATHS) VPATH += $(COMMON_VPATH) include common_features.mk +include $(BUILDDEFS_PATH)/generic_features.mk include $(TMK_PATH)/protocol.mk -include $(TMK_PATH)/common.mk -include bootloader.mk +include $(PLATFORM_PATH)/common.mk +include $(BUILDDEFS_PATH)/bootloader.mk SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC)) @@ -397,39 +404,34 @@ ifneq ($(REQUIRE_PLATFORM_KEY),) endif endif -include $(TMK_PATH)/$(PLATFORM_KEY).mk +include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk +-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk + ifneq ($(strip $(PROTOCOL)),) include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk 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) PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS) PROJECT_CONFIG := $(CONFIG_H) -ifeq ($(strip $(VISUALIZER_ENABLE)), yes) - VISUALIZER_DIR = $(QUANTUM_DIR)/visualizer - VISUALIZER_PATH = $(QUANTUM_PATH)/visualizer - include $(VISUALIZER_PATH)/visualizer.mk -endif - CONFIG_H += $(POST_CONFIG_H) ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H) OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT) $(KEYMAP_OUTPUT)_SRC := $(SRC) -$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) $(GFXDEFS) \ +$(KEYMAP_OUTPUT)_DEFS := $(OPT_DEFS) \ -DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(QMK_KEYBOARD_H)\" \ -DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \ -DQMK_SUBPROJECT -DQMK_SUBPROJECT_H -DQMK_SUBPROJECT_CONFIG_H $(KEYMAP_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYMAP_OUTPUT)_CONFIG := $(CONFIG_H) -$(KEYBOARD_OUTPUT)_SRC := $(CHIBISRC) $(GFXSRC) -$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) $(GFXDEFS) -$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC) +$(KEYBOARD_OUTPUT)_SRC := $(PLATFORM_SRC) +$(KEYBOARD_OUTPUT)_DEFS := $(PROJECT_DEFS) +$(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG) # Default target. @@ -445,7 +447,7 @@ check-size: build check-md5: build objs-size: build -include show_options.mk +include $(BUILDDEFS_PATH)/show_options.mk include $(TMK_PATH)/rules.mk # Ensure we have generated files available for each of the objects diff --git a/build_test.mk b/build_test.mk index 037577bf904..136a0455f01 100644 --- a/build_test.mk +++ b/build_test.mk @@ -4,7 +4,8 @@ endif .DEFAULT_GOAL := all -include common.mk +include paths.mk +include $(BUILDDEFS_PATH)/message.mk TARGET=test/$(TEST) @@ -15,14 +16,14 @@ TEST_OBJ = $(BUILD_DIR)/test_obj OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT) GTEST_INC := \ - $(LIB_PATH)/googletest/googletest/include\ - $(LIB_PATH)/googletest/googlemock/include\ + $(LIB_PATH)/googletest/googletest/include \ + $(LIB_PATH)/googletest/googlemock/include -GTEST_INTERNAL_INC :=\ - $(LIB_PATH)/googletest/googletest\ +GTEST_INTERNAL_INC := \ + $(LIB_PATH)/googletest/googletest \ $(LIB_PATH)/googletest/googlemock -$(GTEST_OUTPUT)_SRC :=\ +$(GTEST_OUTPUT)_SRC := \ googletest/src/gtest-all.cc\ googlemock/src/gmock-all.cc @@ -32,9 +33,9 @@ $(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC) LDFLAGS += -lstdc++ -lpthread -shared-libgcc CREATE_MAP := no -VPATH +=\ - $(LIB_PATH)/googletest\ - $(LIB_PATH)/googlemock\ +VPATH += \ + $(LIB_PATH)/googletest \ + $(LIB_PATH)/googlemock \ $(LIB_PATH)/printf all: elf @@ -48,15 +49,18 @@ CONSOLE_ENABLE = yes endif ifneq ($(filter $(FULL_TESTS),$(TEST)),) -include tests/$(TEST)/rules.mk +include tests/test_common/build.mk +include $(TEST_PATH)/test.mk endif include common_features.mk -include $(TMK_PATH)/common.mk +include $(BUILDDEFS_PATH)/generic_features.mk +include $(PLATFORM_PATH)/common.mk +include $(TMK_PATH)/protocol.mk include $(QUANTUM_PATH)/debounce/tests/rules.mk +include $(QUANTUM_PATH)/encoder/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 +include $(PLATFORM_PATH)/test/rules.mk ifneq ($(filter $(FULL_TESTS),$(TEST)),) include build_full_test.mk endif @@ -71,7 +75,7 @@ $(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 $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk include $(TMK_PATH)/rules.mk diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk new file mode 100644 index 00000000000..ccb92392d90 --- /dev/null +++ b/builddefs/bootloader.mk @@ -0,0 +1,163 @@ +# Copyright 2017 Jack Humbert +# +# 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 . + +# If it's possible that multiple bootloaders can be used for one project, +# you can leave this unset, and the correct size will be selected +# automatically. +# +# Sets the bootloader defined in the keyboard's/keymap's rules.mk +# Current options: +# +# AVR: +# halfkay PJRC Teensy +# caterina Pro Micro (Sparkfun/generic) +# atmel-dfu Atmel factory DFU +# lufa-dfu LUFA DFU +# qmk-dfu QMK DFU (LUFA + blinkenlight) +# qmk-hid QMK HID (LUFA + blinkenlight) +# bootloadhid HIDBootFlash compatible (ATmega32A) +# usbasploader USBaspLoader (ATmega328P) +# ARM: +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) +# stm32duino STM32Duino (STM32F103x8) +# stm32-dfu STM32 USB DFU in ROM +# apm32-dfu APM32 USB DFU in ROM +# RISC-V: +# gd32v-dfu GD32V USB DFU in ROM +# +# BOOTLOADER_SIZE can still be defined manually, but it's recommended +# you add any possible configuration to this list + +ifeq ($(strip $(BOOTLOADER)), atmel-dfu) + OPT_DEFS += -DBOOTLOADER_ATMEL_DFU + OPT_DEFS += -DBOOTLOADER_DFU + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + BOOTLOADER_SIZE = 4096 + endif + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) + BOOTLOADER_SIZE = 8192 + endif +endif +ifeq ($(strip $(BOOTLOADER)), lufa-dfu) + OPT_DEFS += -DBOOTLOADER_LUFA_DFU + OPT_DEFS += -DBOOTLOADER_DFU + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + BOOTLOADER_SIZE ?= 4096 + endif + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) + BOOTLOADER_SIZE ?= 8192 + endif +endif +ifeq ($(strip $(BOOTLOADER)), qmk-dfu) + OPT_DEFS += -DBOOTLOADER_QMK_DFU + OPT_DEFS += -DBOOTLOADER_DFU + ifneq (,$(filter $(MCU), at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647)) + BOOTLOADER_SIZE ?= 4096 + endif + ifneq (,$(filter $(MCU), at90usb1286 at90usb1287)) + BOOTLOADER_SIZE ?= 8192 + endif +endif +ifeq ($(strip $(BOOTLOADER)), qmk-hid) + OPT_DEFS += -DBOOTLOADER_QMK_HID + OPT_DEFS += -DBOOTLOADER_HID + BOOTLOADER_SIZE ?= 4096 +endif +ifeq ($(strip $(BOOTLOADER)), halfkay) + OPT_DEFS += -DBOOTLOADER_HALFKAY + ifeq ($(strip $(MCU)), atmega32u4) + BOOTLOADER_SIZE = 512 + endif + ifeq ($(strip $(MCU)), at90usb1286) + BOOTLOADER_SIZE = 1024 + endif +endif +ifeq ($(strip $(BOOTLOADER)), caterina) + OPT_DEFS += -DBOOTLOADER_CATERINA + BOOTLOADER_SIZE = 4096 +endif +ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID)) + OPT_DEFS += -DBOOTLOADER_BOOTLOADHID + BOOTLOADER_SIZE = 4096 +endif +ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp)) + OPT_DEFS += -DBOOTLOADER_USBASP + BOOTLOADER_SIZE = 4096 +endif +ifeq ($(strip $(BOOTLOADER)), lufa-ms) + OPT_DEFS += -DBOOTLOADER_MS + BOOTLOADER_SIZE ?= 8192 + FIRMWARE_FORMAT = bin +cpfirmware: lufa_warning +.INTERMEDIATE: lufa_warning +lufa_warning: $(FIRMWARE_FORMAT) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) + $(info LUFA MASS STORAGE Bootloader selected) + $(info DO NOT USE THIS BOOTLOADER IN NEW PROJECTS!) + $(info It is extremely prone to bricking, and is only included to support existing boards.) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) +endif +ifdef BOOTLOADER_SIZE + OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) +endif + +ifeq ($(strip $(BOOTLOADER)), stm32-dfu) + OPT_DEFS += -DBOOTLOADER_STM32_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif +ifeq ($(strip $(BOOTLOADER)), apm32-dfu) + OPT_DEFS += -DBOOTLOADER_APM32_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 314B -p 0106 +endif +ifeq ($(strip $(BOOTLOADER)), gd32v-dfu) + OPT_DEFS += -DBOOTLOADER_GD32V_DFU + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189 +endif +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + ifeq ($(strip $(MCU_ORIG)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU_ORIG)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + # Options to pass to dfu-util when flashing + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif +ifeq ($(strip $(BOOTLOADER)), stm32duino) + OPT_DEFS += -DBOOTLOADER_STM32DUINO + MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader + BOARD = STM32_F103_STM32DUINO + # STM32F103 does NOT have an USB bootloader in ROM (only serial), so setting anything here does not make much sense + STM32_BOOTLOADER_ADDRESS = 0x80000000 + + # Options to pass to dfu-util when flashing + DFU_ARGS = -d 1EAF:0003 -a 2 -R + DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +endif +ifeq ($(strip $(BOOTLOADER)), tinyuf2) + OPT_DEFS += -DBOOTLOADER_TINYUF2 +endif diff --git a/builddefs/disable_features.mk b/builddefs/disable_features.mk new file mode 100644 index 00000000000..090a9b5a112 --- /dev/null +++ b/builddefs/disable_features.mk @@ -0,0 +1,28 @@ +# Unconditionally disable features that a keyboard advertises it doesn't support + +FEATURE_NAMES := +FEATURE_NAMES += AUDIO +FEATURE_NAMES += BACKLIGHT +FEATURE_NAMES += BLUETOOTH +FEATURE_NAMES += DIP_SWITCH +FEATURE_NAMES += DYNAMIC_KEYMAP +FEATURE_NAMES += ENCODER +FEATURE_NAMES += HAPTIC +FEATURE_NAMES += HD44780 +FEATURE_NAMES += IOS_DEVICE +FEATURE_NAMES += LCD_BACKLIGHT +FEATURE_NAMES += LCD +FEATURE_NAMES += OLED +FEATURE_NAMES += POINTING_DEVICE +FEATURE_NAMES += PRINTING +FEATURE_NAMES += PS2_MOUSE +FEATURE_NAMES += RGBLIGHT +FEATURE_NAMES += RGB_MATRIX +FEATURE_NAMES += SLEEP_LED +FEATURE_NAMES += STENO +FEATURE_NAMES += SWAP_HANDS +FEATURE_NAMES += WATCHDOG +FEATURE_NAMES += XT + +$(foreach AFEATURE,$(FEATURE_NAMES),\ + $(if $(filter $($(AFEATURE)_SUPPORTED),no),$(eval $(AFEATURE)_ENABLE=no))) diff --git a/builddefs/generic_features.mk b/builddefs/generic_features.mk new file mode 100644 index 00000000000..e4151eb2179 --- /dev/null +++ b/builddefs/generic_features.mk @@ -0,0 +1,52 @@ +# Copyright 2021 QMK +# +# 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 . + +SPACE_CADET_ENABLE ?= yes +GRAVE_ESC_ENABLE ?= yes + +GENERIC_FEATURES = \ + COMBO \ + COMMAND \ + DEFERRED_EXEC \ + DIGITIZER \ + DIP_SWITCH \ + DYNAMIC_KEYMAP \ + DYNAMIC_MACRO \ + ENCODER \ + GRAVE_ESC \ + HAPTIC \ + KEY_LOCK \ + KEY_OVERRIDE \ + LEADER \ + PROGRAMMABLE_BUTTON \ + SPACE_CADET \ + SWAP_HANDS \ + TAP_DANCE \ + VELOCIKEY \ + WPM \ + DYNAMIC_TAPPING_TERM \ + +define HANDLE_GENERIC_FEATURE + # $$(info "Processing: $1_ENABLE $2.c") + SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c) + SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c) + OPT_DEFS += -D$1_ENABLE +endef + +$(foreach F,$(GENERIC_FEATURES),\ + $(if $(filter yes, $(strip $($(F)_ENABLE))),\ + $(eval $(call HANDLE_GENERIC_FEATURE,$(F),$(shell echo $(F) | tr '[:upper:]' '[:lower:]'))) \ + ) \ +) diff --git a/builddefs/mcu_selection.mk b/builddefs/mcu_selection.mk new file mode 100644 index 00000000000..46d34aabe42 --- /dev/null +++ b/builddefs/mcu_selection.mk @@ -0,0 +1,697 @@ +MCU_ORIG := $(MCU) + +ifneq ($(findstring MKL26Z64, $(MCU)),) + # Cortex version + MCU = cortex-m0plus + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = KL2x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MKL26Z64 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= kl2x + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_LC +endif + +ifneq ($(findstring MK20DX128, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K20x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK20DX128 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k20x5 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3 +endif + +ifneq ($(findstring MK20DX256, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = K20x + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK20DX256 + + # Startup code to use + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= k20x7 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3_1 +endif + +ifneq ($(findstring MK66FX1M0, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = MK66F18 + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= MK66FX1M0 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= MK66F18 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= PJRC_TEENSY_3_6 +endif + +ifneq ($(findstring STM32F042, $(MCU)),) + # Cortex version + MCU = cortex-m0 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F0xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F042x6 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f0xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F042X6 + + USE_FPU ?= no + + # UF2 settings + UF2_FAMILY ?= STM32F0 + + # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced. + # This ensures that the EEPROM page buffer fits into RAM + USE_PROCESS_STACKSIZE = 0x600 + USE_EXCEPTIONS_STACKSIZE = 0x300 +endif + +ifneq ($(findstring STM32F072, $(MCU)),) + # Cortex version + MCU = cortex-m0 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F0xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F072xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f0xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F072XB + + USE_FPU ?= no + + # UF2 settings + UF2_FAMILY ?= STM32F0 +endif + +ifneq ($(findstring STM32F103, $(MCU)),) + # Cortex version + MCU = cortex-m3 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F1xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F103x8 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f1xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F103 + + USE_FPU ?= no + + # UF2 settings + UF2_FAMILY ?= STM32F1 +endif + +ifneq ($(findstring STM32F303, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F3xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F303xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f3xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F303XC + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32F3 +endif + +ifneq ($(findstring STM32F401, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + ifeq ($(strip $(BOOTLOADER)), tinyuf2) + MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 + FIRMWARE_FORMAT ?= uf2 + else + MCU_LDSCRIPT ?= STM32F401xC + endif + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F401 + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32F4 +endif + +ifneq ($(findstring STM32F405, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F405xG + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F405XG + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32F4 +endif + +ifneq ($(findstring STM32F407, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F407xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F407XE + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32F4 +endif + +ifneq ($(findstring STM32F411, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + ifeq ($(strip $(BOOTLOADER)), tinyuf2) + MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 + FIRMWARE_FORMAT ?= uf2 + else + MCU_LDSCRIPT ?= STM32F411xE + endif + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= BLACKPILL_STM32_F411 + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32F4 +endif + +ifneq ($(findstring STM32F446, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32F4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32F446xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32f4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_F446XE + + USE_FPU ?= yes +endif + +ifneq ($(findstring STM32G431, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32G4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32G431xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32g4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_G431XB + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32G4 +endif + +ifneq ($(findstring STM32G474, $(MCU)),) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32G4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32G474xE + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32g4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_G474XE + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32G4 +endif + +ifneq (,$(filter $(MCU),STM32L433 STM32L443)) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32L4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32L432xC + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32l4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_L433XC + + PLATFORM_NAME ?= platform_l432 + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32L4 +endif + +ifneq (,$(filter $(MCU),STM32L412 STM32L422)) + # Cortex version + MCU = cortex-m4 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = STM32 + MCU_SERIES = STM32L4xx + + # Linker script to use + # - it should exist either in /os/common/startup/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= STM32L412xB + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= stm32l4xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_STM32_L412XB + + PLATFORM_NAME ?= platform_l432 + + USE_FPU ?= yes + + # UF2 settings + UF2_FAMILY ?= STM32L4 +endif + +ifneq ($(findstring WB32F3G71, $(MCU)),) + # Cortex version + MCU = cortex-m3 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 7 + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = WB32 + MCU_SERIES = WB32F3G71xx + + # Linker script to use + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= WB32F3G71x9 + + # Startup code to use + # - it should exist in /os/common/startup/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP ?= wb32f3g71xx + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= GENERIC_WB32_F3G71XX + + USE_FPU ?= no +endif + +ifneq ($(findstring GD32VF103, $(MCU)),) + # RISC-V + MCU = risc-v + + # RISC-V extensions and abi configuration + MCU_ARCH = rv32imac + MCU_ABI = ilp32 + MCU_CMODEL = medlow + + ## chip/board settings + # - the next two should match the directories in + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = GD32V + MCU_SERIES = GD32VF103 + + # Linker script to use + # - it should exist either in /os/common/startup/RISCV-ECLIC/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT ?= GD32VF103xB + + # Startup code to use + # - it should exist in /os/common/startup/RISCV-ECLIC/compilers/GCC/mk/ + MCU_STARTUP ?= gd32vf103 + + # Board: it should exist either in /os/hal/boards/, + # /boards/, or drivers/boards/ + BOARD ?= SIPEED_LONGAN_NANO + + USE_FPU ?= no +endif + +ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) + PROTOCOL = LUFA + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + # + # This will be an integer division of F_USB below, as it is sourced by + # F_USB after it has run through any CPU prescalers. Note that this value + # does not *change* the processor frequency - it should merely be updated to + # reflect the processor speed set externally so that the code can use accurate + # software delays. + F_CPU ?= 16000000 + + # LUFA specific + # + # Target architecture (see library "Board Types" documentation). + ARCH = AVR8 + + # Input clock frequency. + # This will define a symbol, F_USB, in all source code files equal to the + # input clock frequency (before any prescaling is performed) in Hz. This value may + # differ from F_CPU if prescaling is used on the latter, and is required as the + # raw input clock is fed directly to the PLL sections of the AVR for high speed + # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' + # at the end, this will be done automatically to create a 32-bit value in your + # source code. + # + # If no clock division is performed on the input clock inside the AVR (via the + # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. + F_USB ?= $(F_CPU) + + # Interrupt driven control endpoint task + ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) + OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + endif + ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2)) + NO_I2C = yes + endif +endif + +ifneq (,$(filter $(MCU),atmega32a)) + # MCU name for avrdude + AVRDUDE_MCU = m32 + + PROTOCOL = VUSB + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + F_CPU ?= 12000000 +endif + +ifneq (,$(filter $(MCU),atmega328p)) + # MCU name for avrdude + AVRDUDE_MCU = m328p + + PROTOCOL = VUSB + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + F_CPU ?= 16000000 +endif + +ifneq (,$(filter $(MCU),atmega328)) + # MCU name for avrdude + AVRDUDE_MCU = m328 + + PROTOCOL = VUSB + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + F_CPU ?= 16000000 +endif + +ifneq (,$(filter $(MCU),attiny85)) + PROTOCOL = VUSB + + # Processor frequency. + # This will define a symbol, F_CPU, in all source code files equal to the + # processor frequency in Hz. You can then use this symbol in your source code to + # calculate timings. Do NOT tack on a 'UL' at the end, this will be done + # automatically to create a 32-bit value in your source code. + F_CPU ?= 16500000 +endif diff --git a/message.mk b/builddefs/message.mk similarity index 100% rename from message.mk rename to builddefs/message.mk diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk new file mode 100644 index 00000000000..2820332d56b --- /dev/null +++ b/builddefs/show_options.mk @@ -0,0 +1,148 @@ +BUILD_OPTION_NAMES = \ + BOOTMAGIC_ENABLE \ + MOUSEKEY_ENABLE \ + EXTRAKEY_ENABLE \ + CONSOLE_ENABLE \ + COMMAND_ENABLE \ + NKRO_ENABLE \ + TERMINAL_ENABLE \ + CUSTOM_MATRIX \ + DEBOUNCE_TYPE \ + SPLIT_KEYBOARD \ + DYNAMIC_KEYMAP_ENABLE \ + USB_HID_ENABLE \ + VIA_ENABLE + +HARDWARE_OPTION_NAMES = \ + SLEEP_LED_ENABLE \ + BACKLIGHT_ENABLE \ + BACKLIGHT_DRIVER \ + RGBLIGHT_ENABLE \ + RGBLIGHT_CUSTOM_DRIVER \ + RGB_MATRIX_ENABLE \ + RGB_MATRIX_DRIVER \ + CIE1931_CURVE \ + MIDI_ENABLE \ + BLUETOOTH_ENABLE \ + BLUETOOTH_DRIVER \ + AUDIO_ENABLE \ + HD44780_ENABLE \ + ENCODER_ENABLE \ + LED_TABLES \ + POINTING_DEVICE_ENABLE \ + DIP_SWITCH_ENABLE + +OTHER_OPTION_NAMES = \ + UNICODE_ENABLE \ + UCIS_ENABLE \ + UNICODEMAP_ENABLE \ + UNICODE_COMMON \ + AUTO_SHIFT_ENABLE \ + AUTO_SHIFT_MODIFIERS \ + DYNAMIC_TAPPING_TERM_ENABLE \ + COMBO_ENABLE \ + KEY_LOCK_ENABLE \ + KEY_OVERRIDE_ENABLE \ + LEADER_ENABLE \ + PRINTING_ENABLE \ + STENO_ENABLE \ + TAP_DANCE_ENABLE \ + VIRTSER_ENABLE \ + OLED_ENABLE \ + OLED_DRIVER \ + LED_BACK_ENABLE \ + LED_UNDERGLOW_ENABLE \ + LED_ANIMATIONS \ + IOS_DEVICE_ENABLE \ + HELIX ZINC \ + AUTOLOG_ENABLE \ + DEBUG_ENABLE \ + ENCODER_ENABLE_CUSTOM \ + GERMAN_ENABLE \ + HAPTIC_ENABLE \ + HHKB_RN42_ENABLE \ + ISSI_ENABLE \ + KEYLOGGER_ENABLE \ + LCD_BACKLIGHT_ENABLE \ + MACROS_ENABLED \ + PS2_MOUSE_ENABLE \ + RAW_ENABLE \ + SWAP_HANDS_ENABLE \ + RING_BUFFERED_6KRO_REPORT_ENABLE \ + WATCHDOG_ENABLE \ + ERGOINU \ + NO_USB_STARTUP_CHECK \ + DISABLE_PROMICRO_LEDs \ + MITOSIS_DATAGROK_BOTTOMSPACE \ + MITOSIS_DATAGROK_SLOWUART \ + RGB_MATRIX_KEYPRESSES \ + LED_MIRRORED \ + RGBLIGHT_FULL_POWER \ + LTO_ENABLE \ + PROGRAMMABLE_BUTTON_ENABLE + +define NAME_ECHO + @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" + +endef + +define YAML_NAME_ECHO + @echo ' $1 : "$(strip $($1))"' + +endef + +.PHONY: show_build_options0 show_build_options +show_build_options0: + @echo " KEYBOARD = $(KEYBOARD)" + @echo " KEYMAP = $(KEYMAP)" + @echo " MCU = $(MCU)" + @echo " MCU_SERIES = $(MCU_SERIES)" + @echo " PLATFORM = $(PLATFORM)" + @echo " BOOTLOADER = $(BOOTLOADER)" + @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" + @echo + @echo "Build Options:" + $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + +show_build_options: show_build_options0 + @echo + @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'" + @echo + +.PHONY: show_all_features +show_all_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) + +.PHONY: show_full_features +show_full_features: show_build_options0 + @echo + @echo "Hardware Options:" + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + @echo + @echo "Other Options:" + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(call NAME_ECHO,$(A_OPTION_NAME))) + +.PHONY: yaml_build_options +yaml_build_options: + @echo '- KEYBOARD : "$(KEYBOARD)"' + @echo ' KEYMAP : "$(KEYMAP)"' + @echo ' MCU : "$(MCU)"' + @echo ' MCU_SERIES : "$(MCU_SERIES)"' + @echo ' PLATFORM : "$(PLATFORM)"' + @echo ' FIRMWARE_FORMAT : "$(FIRMWARE_FORMAT)"' + $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ + $(call YAML_NAME_ECHO,$(A_OPTION_NAME))) + $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) + $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ + $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) diff --git a/common.mk b/common.mk deleted file mode 100644 index 8acea39376e..00000000000 --- a/common.mk +++ /dev/null @@ -1,28 +0,0 @@ -include message.mk - -# Directory common source files exist -TOP_DIR = . -TMK_DIR = tmk_core -TMK_PATH = $(TMK_DIR) -LIB_PATH = lib - -QUANTUM_DIR = quantum -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) -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 += $(QUANTUM_PATH)/sequencer -COMMON_VPATH += $(DRIVER_PATH) diff --git a/common_features.mk b/common_features.mk index f4f79000b39..8c593024f0d 100644 --- a/common_features.mk +++ b/common_features.mk @@ -13,8 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -SERIAL_PATH := $(QUANTUM_PATH)/serial_link - QUANTUM_SRC += \ $(QUANTUM_DIR)/quantum.c \ $(QUANTUM_DIR)/send_string.c \ @@ -29,13 +27,16 @@ QUANTUM_SRC += \ $(QUANTUM_DIR)/keyboard.c \ $(QUANTUM_DIR)/keymap_common.c \ $(QUANTUM_DIR)/keycode_config.c \ + $(QUANTUM_DIR)/sync_timer.c \ $(QUANTUM_DIR)/logging/debug.c \ $(QUANTUM_DIR)/logging/sendchar.c \ VPATH += $(QUANTUM_DIR)/logging # Fall back to lib/printf if there is no platform provided print -ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","") +ifeq ("$(wildcard $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk)","") include $(QUANTUM_PATH)/logging/print.mk +else + include $(PLATFORM_PATH)/$(PLATFORM_KEY)/printf.mk endif ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes) @@ -45,19 +46,6 @@ else ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), api) OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE endif -ifeq ($(strip $(API_SYSEX_ENABLE)), yes) - OPT_DEFS += -DAPI_SYSEX_ENABLE - OPT_DEFS += -DAPI_ENABLE - MIDI_ENABLE=yes - SRC += $(QUANTUM_DIR)/api/api_sysex.c - SRC += $(QUANTUM_DIR)/api.c -endif - -ifeq ($(strip $(COMMAND_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/command.c - OPT_DEFS += -DCOMMAND_ENABLE -endif - AUDIO_ENABLE ?= no ifeq ($(strip $(AUDIO_ENABLE)), yes) ifeq ($(PLATFORM),CHIBIOS) @@ -82,7 +70,7 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c SRC += $(QUANTUM_DIR)/audio/audio.c ## common audio code, hardware agnostic - SRC += $(QUANTUM_DIR)/audio/driver_$(PLATFORM_KEY)_$(strip $(AUDIO_DRIVER)).c + SRC += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/audio_$(strip $(AUDIO_DRIVER)).c SRC += $(QUANTUM_DIR)/audio/voices.c SRC += $(QUANTUM_DIR)/audio/luts.c endif @@ -121,10 +109,43 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes) SRC += $(QUANTUM_DIR)/mousekey.c endif +VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi pmw3360 pimoroni_trackball custom +POINTING_DEVICE_DRIVER ?= custom ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes) - OPT_DEFS += -DPOINTING_DEVICE_ENABLE - MOUSE_ENABLE := yes - SRC += $(QUANTUM_DIR)/pointing_device.c + ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),) + $(error POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type) + else + OPT_DEFS += -DPOINTING_DEVICE_ENABLE + MOUSE_ENABLE := yes + SRC += $(QUANTUM_DIR)/pointing_device.c + SRC += $(QUANTUM_DIR)/pointing_device_drivers.c + ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom) + SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c + OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]')) + endif + OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER)) + ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800) + OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + QUANTUM_LIB_SRC += spi_master.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick) + OPT_DEFS += -DSTM32_ADC -DHAL_USE_ADC=TRUE + LIB_SRC += analog.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c) + OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE + SRC += drivers/sensors/cirque_pinnacle.c + QUANTUM_LIB_SRC += i2c_master.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi) + OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + SRC += drivers/sensors/cirque_pinnacle.c + QUANTUM_LIB_SRC += spi_master.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball) + OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE + QUANTUM_LIB_SRC += i2c_master.c + else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pmw3360) + OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE + QUANTUM_LIB_SRC += spi_master.c + endif + endif endif VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi @@ -156,37 +177,18 @@ else ifeq ($(PLATFORM),AVR) # Automatically provided by avr-libc, nothing required else ifeq ($(PLATFORM),CHIBIOS) - ifeq ($(MCU_SERIES), STM32F3xx) - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - OPT_DEFS += -DEEPROM_EMU_STM32F303xC - OPT_DEFS += -DSTM32_EEPROM_ENABLE - else ifeq ($(MCU_SERIES), STM32F1xx) - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - OPT_DEFS += -DEEPROM_EMU_STM32F103xB - OPT_DEFS += -DSTM32_EEPROM_ENABLE - else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB) - SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c - SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - OPT_DEFS += -DEEPROM_EMU_STM32F072xB - OPT_DEFS += -DSTM32_EEPROM_ENABLE - else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6) - - # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced. - # This ensures that the EEPROM page buffer fits into RAM - USE_PROCESS_STACKSIZE = 0x600 - USE_EXCEPTIONS_STACKSIZE = 0x300 - + ifneq ($(filter STM32F3xx_% STM32F1xx_% %_STM32F401xC %_STM32F401xE %_STM32F405xG %_STM32F411xE %_STM32F072xB %_STM32F042x6 %_GD32VF103xB %_GD32VF103x8, $(MCU_SERIES)_$(MCU_LDSCRIPT)),) + OPT_DEFS += -DEEPROM_DRIVER + COMMON_VPATH += $(DRIVER_PATH)/eeprom + SRC += eeprom_driver.c SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c - OPT_DEFS += -DEEPROM_EMU_STM32F042x6 - OPT_DEFS += -DSTM32_EEPROM_ENABLE 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 + SRC += eeprom_driver.c + SRC += eeprom_stm32_L0_L1.c else # This will effectively work the same as "transient" if not supported by the chip SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c @@ -265,7 +267,7 @@ endif endif RGB_MATRIX_ENABLE ?= no -VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom +VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 CKLED2001 WS2812 custom ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes) ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),) @@ -321,6 +323,13 @@ endif QUANTUM_LIB_SRC += i2c_master.c endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), CKLED2001) + OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE + COMMON_VPATH += $(DRIVER_PATH)/led + SRC += ckled2001.c + QUANTUM_LIB_SRC += i2c_master.c + endif + ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812) OPT_DEFS += -DWS2812 WS2812_DRIVER_REQUIRED := yes @@ -350,17 +359,6 @@ ifeq ($(strip $(PRINTING_ENABLE)), yes) SRC += $(TMK_DIR)/protocol/serial_uart.c endif -ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes) - SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c) - SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c) - SERIAL_DEFS += -DSERIAL_LINK_ENABLE - COMMON_VPATH += $(SERIAL_PATH) - - SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC)) - OPT_DEFS += $(SERIAL_DEFS) - VAPTH += $(SERIAL_PATH) -endif - VARIABLE_TRACE ?= no ifneq ($(strip $(VARIABLE_TRACE)),no) SRC += $(QUANTUM_DIR)/variable_trace.c @@ -370,8 +368,11 @@ ifneq ($(strip $(VARIABLE_TRACE)),no) endif endif -ifeq ($(strip $(LCD_ENABLE)), yes) - CIE1931_CURVE := yes +ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) + SRC += $(PLATFORM_COMMON_DIR)/sleep_led.c + OPT_DEFS += -DSLEEP_LED_ENABLE + + NO_SUSPEND_POWER_DOWN := yes endif VALID_BACKLIGHT_TYPES := pwm timer software custom @@ -437,10 +438,6 @@ ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes) SRC += apa102.c endif -ifeq ($(strip $(VISUALIZER_ENABLE)), yes) - CIE1931_CURVE := yes -endif - ifeq ($(strip $(CIE1931_CURVE)), yes) OPT_DEFS += -DUSE_CIE1931_CURVE LED_TABLES := yes @@ -456,40 +453,15 @@ ifeq ($(strip $(TERMINAL_ENABLE)), yes) OPT_DEFS += -DUSER_PRINT endif -ifeq ($(strip $(WPM_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/wpm.c - OPT_DEFS += -DWPM_ENABLE -endif - -ifeq ($(strip $(ENCODER_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/encoder.c - OPT_DEFS += -DENCODER_ENABLE -endif - -ifeq ($(strip $(VELOCIKEY_ENABLE)), yes) - OPT_DEFS += -DVELOCIKEY_ENABLE - SRC += $(QUANTUM_DIR)/velocikey.c -endif - ifeq ($(strip $(VIA_ENABLE)), yes) DYNAMIC_KEYMAP_ENABLE := yes RAW_ENABLE := yes - BOOTMAGIC_ENABLE := lite + BOOTMAGIC_ENABLE := yes SRC += $(QUANTUM_DIR)/via.c OPT_DEFS += -DVIA_ENABLE endif -ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes) - OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE - SRC += $(QUANTUM_DIR)/dynamic_keymap.c -endif - -ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes) - OPT_DEFS += -DDIP_SWITCH_ENABLE - SRC += $(QUANTUM_DIR)/dip_switch.c -endif - -VALID_MAGIC_TYPES := yes lite +VALID_MAGIC_TYPES := yes BOOTMAGIC_ENABLE ?= no ifneq ($(strip $(BOOTMAGIC_ENABLE)), no) ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),) @@ -568,23 +540,19 @@ ifeq ($(strip $(CRC_ENABLE)), yes) SRC += crc.c endif -HAPTIC_ENABLE ?= no -ifneq ($(strip $(HAPTIC_ENABLE)),no) +ifeq ($(strip $(HAPTIC_ENABLE)),yes) COMMON_VPATH += $(DRIVER_PATH)/haptic - OPT_DEFS += -DHAPTIC_ENABLE - SRC += $(QUANTUM_DIR)/haptic.c - SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c -endif -ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), ) - SRC += DRV2605L.c - QUANTUM_LIB_SRC += i2c_master.c - OPT_DEFS += -DDRV2605L -endif + ifneq ($(filter DRV2605L, $(HAPTIC_DRIVER)), ) + SRC += DRV2605L.c + QUANTUM_LIB_SRC += i2c_master.c + OPT_DEFS += -DDRV2605L + endif -ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), ) - SRC += solenoid.c - OPT_DEFS += -DSOLENOID_ENABLE + ifneq ($(filter SOLENOID, $(HAPTIC_DRIVER)), ) + SRC += solenoid.c + OPT_DEFS += -DSOLENOID_ENABLE + endif endif ifeq ($(strip $(HD44780_ENABLE)), yes) @@ -617,8 +585,6 @@ ifeq ($(strip $(ST7565_ENABLE)), yes) SRC += st7565.c endif -include $(DRIVER_PATH)/qwiic/qwiic.mk - ifeq ($(strip $(UCIS_ENABLE)), yes) OPT_DEFS += -DUCIS_ENABLE UNICODE_COMMON := yes @@ -641,60 +607,52 @@ ifeq ($(strip $(UNICODE_COMMON)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c endif -SPACE_CADET_ENABLE ?= yes -ifeq ($(strip $(SPACE_CADET_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c - OPT_DEFS += -DSPACE_CADET_ENABLE -endif - MAGIC_ENABLE ?= yes ifeq ($(strip $(MAGIC_ENABLE)), yes) SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c OPT_DEFS += -DMAGIC_KEYCODE_ENABLE endif -GRAVE_ESC_ENABLE ?= yes -ifeq ($(strip $(GRAVE_ESC_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_grave_esc.c - OPT_DEFS += -DGRAVE_ESC_ENABLE -endif - -ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c - OPT_DEFS += -DDYNAMIC_MACRO_ENABLE -endif - -ifeq ($(strip $(COMBO_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c - OPT_DEFS += -DCOMBO_ENABLE +ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) + SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c + OPT_DEFS += -DAUTO_SHIFT_ENABLE + ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes) + OPT_DEFS += -DAUTO_SHIFT_MODIFIERS + endif endif -ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c - OPT_DEFS += -DKEY_OVERRIDE_ENABLE +ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) + PS2_ENABLE := yes + SRC += ps2_mouse.c + OPT_DEFS += -DPS2_MOUSE_ENABLE + OPT_DEFS += -DMOUSE_ENABLE endif -ifeq ($(strip $(TAP_DANCE_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c - OPT_DEFS += -DTAP_DANCE_ENABLE +ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) + PS2_ENABLE := yes + SRC += ps2_busywait.c + SRC += ps2_io_avr.c + OPT_DEFS += -DPS2_USE_BUSYWAIT endif -ifeq ($(strip $(KEY_LOCK_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c - OPT_DEFS += -DKEY_LOCK_ENABLE +ifeq ($(strip $(PS2_USE_INT)), yes) + PS2_ENABLE := yes + SRC += ps2_interrupt.c + SRC += ps2_io.c + OPT_DEFS += -DPS2_USE_INT endif -ifeq ($(strip $(LEADER_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c - OPT_DEFS += -DLEADER_ENABLE +ifeq ($(strip $(PS2_USE_USART)), yes) + PS2_ENABLE := yes + SRC += ps2_usart.c + SRC += ps2_io.c + OPT_DEFS += -DPS2_USE_USART endif -ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes) - SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c - OPT_DEFS += -DAUTO_SHIFT_ENABLE - ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes) - OPT_DEFS += -DAUTO_SHIFT_MODIFIERS - endif +ifeq ($(strip $(PS2_ENABLE)), yes) + COMMON_VPATH += $(DRIVER_PATH)/ps2 + COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2 + OPT_DEFS += -DPS2_ENABLE endif JOYSTICK_ENABLE ?= no @@ -717,11 +675,6 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes) endif 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 @@ -745,3 +698,27 @@ ifeq ($(strip $(USBPD_ENABLE)), yes) endif endif endif + +BLUETOOTH_ENABLE ?= no +VALID_BLUETOOTH_DRIVER_TYPES := AdafruitBLE RN42 custom +ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + ifeq ($(filter $(strip $(BLUETOOTH_DRIVER)),$(VALID_BLUETOOTH_DRIVER_TYPES)),) + $(error "$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type) + endif + OPT_DEFS += -DBLUETOOTH_ENABLE + NO_USB_STARTUP_CHECK := yes + COMMON_VPATH += $(DRIVER_PATH)/bluetooth + SRC += outputselect.c + + ifeq ($(strip $(BLUETOOTH_DRIVER)), AdafruitBLE) + OPT_DEFS += -DMODULE_ADAFRUIT_BLE + SRC += analog.c + SRC += $(DRIVER_PATH)/bluetooth/adafruit_ble.cpp + QUANTUM_LIB_SRC += spi_master.c + endif + + ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) + OPT_DEFS += -DMODULE_RN42 + SRC += $(TMK_DIR)/protocol/serial_uart.c + endif +endif diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json index 72bb0f4a1ce..3cb64dd3a2f 100644 --- a/data/mappings/info_config.json +++ b/data/mappings/info_config.json @@ -68,7 +68,7 @@ "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, - "PRODUCT": {"info_key": "keyboard_folder", "to_json": false}, + "PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false}, "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, @@ -76,6 +76,7 @@ "QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int"}, "QMK_LED": {"info_key": "qmk_lufa_bootloader.led"}, "QMK_SPEAKER": {"info_key": "qmk_lufa_bootloader.speaker"}, + "SENDSTRING_BELL": {"info_key": "audio.macro_beep", "value_type": "bool"}, "SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"}, "SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"}, "SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 15f407fce43..308f9b782be 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -13,12 +13,13 @@ }, "processor": { "type": "string", - "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66F18", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] + "enum": ["cortex-m0", "cortex-m0plus", "cortex-m3", "cortex-m4", "MKL26Z64", "MK20DX128", "MK20DX256", "MK66FX1M0", "STM32F042", "STM32F072", "STM32F103", "STM32F303", "STM32F401", "STM32F405", "STM32F407", "STM32F411", "STM32F446", "STM32G431", "STM32G474", "STM32L412", "STM32L422", "STM32L433", "STM32L443", "GD32VF103", "WB32F3G71", "atmega16u2", "atmega32u2", "atmega16u4", "atmega32u4", "at90usb162", "at90usb646", "at90usb647", "at90usb1286", "at90usb1287", "atmega32a", "atmega328p", "atmega328", "attiny85", "unknown"] }, "audio": { "type": "object", "additionalProperties": false, "properties": { + "macro_beep": {"type": "boolean"}, "pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}, "voices": {"type": "boolean"} } @@ -56,7 +57,7 @@ }, "bootloader": { "type": "string", - "enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "unknown", "usbasploader", "USBasp", "tinyuf2"], + "enum": ["atmel-dfu", "bootloadhid", "bootloadHID", "caterina", "halfkay", "kiibohd", "lufa-dfu", "lufa-ms", "micronucleus", "qmk-dfu", "qmk-hid", "stm32-dfu", "stm32duino", "gd32v-dfu", "wb32-dfu", "unknown", "usbasploader", "USBasp", "tinyuf2"], }, "bootloader_instructions": { "type": "string", diff --git a/data/schemas/keymap.jsonschema b/data/schemas/keymap.jsonschema index a4bdab966b6..faa250a9429 100644 --- a/data/schemas/keymap.jsonschema +++ b/data/schemas/keymap.jsonschema @@ -5,6 +5,7 @@ "type": "object", "properties": { "author": {"type": "string"}, + "host_language": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keyboard": {"$ref": "qmk.definitions.v1#/text_identifier"}, "keymap": {"$ref": "qmk.definitions.v1#/text_identifier"}, "layout": {"$ref": "qmk.definitions.v1#/layout_macro"}, @@ -15,10 +16,42 @@ "items": {"type": "string"} } }, + "macros": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "action": { + "type": "string", + "enum": ['beep', 'delay', 'down', 'tap', 'up'] + }, + "keycodes": { + "type": "array", + "items": { + "$ref": "qmk.definitions.v1#/text_identifier" + } + }, + "duration": { + "$ref": "qmk.definitions.v1#/unsigned_int" + } + } + } + ] + } + } + }, "config": {"$ref": "qmk.keyboard.v1"}, "notes": { "type": "string", "description": "asdf" } } -} \ No newline at end of file +} diff --git a/disable_features.mk b/disable_features.mk deleted file mode 100644 index 84d8316eac9..00000000000 --- a/disable_features.mk +++ /dev/null @@ -1,31 +0,0 @@ -# Unconditionally disable features that a keyboard advertises it doesn't support - -FEATURE_NAMES := -FEATURE_NAMES += ADAFRUIT_BLE -FEATURE_NAMES += AUDIO -FEATURE_NAMES += BACKLIGHT -FEATURE_NAMES += BLUETOOTH -FEATURE_NAMES += DIP_SWITCH -FEATURE_NAMES += DYNAMIC_KEYMAP -FEATURE_NAMES += ENCODER -FEATURE_NAMES += HAPTIC -FEATURE_NAMES += HD44780 -FEATURE_NAMES += IOS_DEVICE -FEATURE_NAMES += LCD_BACKLIGHT -FEATURE_NAMES += LCD -FEATURE_NAMES += OLED -FEATURE_NAMES += POINTING_DEVICE -FEATURE_NAMES += PRINTING -FEATURE_NAMES += PS2_MOUSE -FEATURE_NAMES += RGBLIGHT -FEATURE_NAMES += RGB_MATRIX -FEATURE_NAMES += SLEEP_LED -FEATURE_NAMES += SERIAL_LINK -FEATURE_NAMES += STENO -FEATURE_NAMES += SWAP_HANDS -FEATURE_NAMES += VISUALIZER -FEATURE_NAMES += WATCHDOG -FEATURE_NAMES += XT - -$(foreach AFEATURE,$(FEATURE_NAMES),\ - $(if $(filter $($(AFEATURE)_SUPPORTED),no),$(eval $(AFEATURE)_ENABLE=no))) diff --git a/docs/ChangeLog/20211127.md b/docs/ChangeLog/20211127.md new file mode 100644 index 00000000000..d954bb9f619 --- /dev/null +++ b/docs/ChangeLog/20211127.md @@ -0,0 +1,457 @@ +# QMK Breaking Changes - 2021 November 27 Changelog + +## 2000 keyboards! :id=qmk-2000th-keyboard + +QMK had it's 2000th keyboard submitted during this breaking changes cycle.... and it only _just_ made the cut-off! + +```shell +% qmk list-keyboards | wc -l +2003 +``` + +From the whole QMK team, a major thankyou to the community for embracing QMK as your preferred keyboard firmware! + +## Notable Features :id=notable-features + +### Expanded Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) :id=expanded-pointing-device + +Pointing device support has been reworked and reimplemented to allow for easier integration of new peripherals. + +Usages of `POINTING_DEVICE_ENABLE = yes` in `rules.mk` files now need to be accompanied by a corresponding `POINTING_DEVICE_DRIVER = ???` line, specifying which driver to use during the build. Existing keyboards have already been migrated across to the new usage pattern, so most likely no change is required by users. + +QMK now has core-supplied support for the following pointing device peripherals: + +| `rules.mk` line | Supported device | +|------------------------------------------------|-----------------------------------------| +| `POINTING_DEVICE_DRIVER = analog_joystick` | Analog joysticks, such as PSP joysticks | +| `POINTING_DEVICE_DRIVER = adns5050` | ADNS 5050 sensor | +| `POINTING_DEVICE_DRIVER = adns9800` | ADNS 9800 laser sensor | +| `POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c` | Cirque touchpad, I2C mode | +| `POINTING_DEVICE_DRIVER = cirque_pinnacle_spi` | Cirque Touchpad, SPI mode | +| `POINTING_DEVICE_DRIVER = pimoroni_trackball` | Pimoroni Trackball | +| `POINTING_DEVICE_DRIVER = pmw3360` | PMW 3360 | + +See the new documentation for the [Pointing Device](../feature_pointing_device.md) feature for more information on specific configuration for each driver. + +### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) :id=dynamic-tapping-term + +For people who are starting out with tapping keys, or for people who think tapping keys don't "feel right", it's sometimes quite difficult to determine what duration of tapping term to use to make things seem natural. + +If you're in this stage of discovery, you can now add `DYNAMIC_TAPPING_TERM_ENABLE = yes` to your `rules.mk`, which enables the use of the following keycodes in your keymap: + +| Key | Description | +|-----------|-------------------------------------------------------------------------------| +| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | +| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by 5ms | +| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by 5ms | + +Coupled with the use of `qmk console` or QMK Toolbox to show console output from your keyboard, you can tweak the tapping term dynamically in order to narrow down what "feels right" to you. Once you're happy, drop in the resulting number into your keymap's `config.h` and you're good to go! + +### Macros in JSON keymaps ([#14374](https://github.com/qmk/qmk_firmware/pull/14374)) :id=macros-in-keymap-json + +You can now define up to 32 macros in your `keymap.json` file, as used by [QMK Configurator](newbs_building_firmware_configurator.md), and `qmk compile`. You can define these macros in a list under the `macros` keyword, like this: + +```json +{ + "keyboard": "handwired/my_macropad", + "keymap": "my_keymap", + "macros": [ + [ // first listed is MACRO_0... + {"action":"down", "keycodes": ["LSFT"]}, + "hello world1", + {"action": "up","keycodes": ["LSFT"]} + ], + [ // ...then MACRO_1... + {"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]} + ], + [ // ...then MACRO_2... + "ding!", + {"action":"beep"} + ], + [ // ...and MACRO_3. + {"action":"tap", "keycodes": ["F1"]}, + {"action":"delay", "duration": "1000"}, + {"action":"tap", "keycodes": ["PGDN"]} + ] + ], + "layout": "LAYOUT_all", + "layers": [ + ["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"] + ] +} +``` + +In due course, [QMK Configurator](https://config.qmk.fm/) will pick up support for defining these in its UI, but for now the json is the only way to define macros. + +## Changes Requiring User Action :id=changes-requiring-user-action + +### Updated Keyboard Codebases :id=updated-keyboard-codebases + +The following keyboards have had their source moved within QMK: + +| Old Keyboard Name | New Keyboard Name | +|------------------------|---------------------------------| +| aozora/hotswap | aozora | +| gskt00 | kapcave/gskt00 | +| handwired/dtisaac01 | dtisaac/dtisaac01 | +| kprepublic/bm60poker | kprepublic/bm60hsrgb_poker/rev1 | +| kprepublic/bm60rgb | kprepublic/bm60hsrgb/rev1 | +| kprepublic/bm60rgb_iso | kprepublic/bm60hsrgb_iso/rev1 | +| kprepublic/bm65iso | kprepublic/bm65hsrgb_iso | +| kprepublic/bm68rgb | kprepublic/bm68hsrgb | +| paladin64 | kapcave/paladin64 | +| portal_66 | portal_66/soldered | +| signum/3_0/elitec | signum/3_0 | +| tgr/jane | tgr/jane/v2 | + +### Squeezing space out of AVR ([#15243](https://github.com/qmk/qmk_firmware/pull/15243)) :id=squeezing-space-from-avr + +The AVR platform has been problematic for some time, in the sense that it is severely resource-constrained -- this makes life difficult for anyone attempting to add new functionality such as display panels to their keymap code. The illustrious Drashna has contributed some newer documentation on how to attempt to free up some space on AVR-based keyboards that are in short supply. + +Of course, there are much fewer constraints with ARM chips... ;) + +### Require explicit enabling of RGB Matrix modes ([#15018](https://github.com/qmk/qmk_firmware/pull/15018)) :id=explicit-rgb-modes + +Related to the previous section -- RGB Matrix modes have now been made to be opt-in, rather than opt-out. As these animations are now opt-in, you may find that your keyboard no longer has all the RGB modes you're expecting -- you may need to configure and recompile your firmware and enable your animations of choice... with any luck they'll still fit in the space available. + +Most keyboards keep their original functionality, but over time the QMK maintainers have found that removal of animations ends up being the quickest way to free up space... and some keyboards have had animations such as reactive effects disabled by default in order to still fit within the flash space available. + +The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](feature_rgb_matrix.md#rgb-matrix-effects) page. + +### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) :id=oled-task-refactor + +OLED display code was traditionally difficult to override in keymaps as they did not follow the standard pattern of `bool *_kb()` deferring to `bool *_user()` functions, allowing signalling to the higher level that processing had already been done. + +This changes the standard OLED drawing function model to allow for a base implementation to be provided by a keyboard, but also still allow for keymap-level overrides without needing to modify the keyboard's code. + +The old keymap code went something like this: + +```c +void oled_task_user(void) { + // keymap drawing code +} +``` + +...but the new keymap code looks like this: +```c +bool oled_task_user(void) { + // keymap drawing code + return false; +} +``` + +Keyboard designers should now structure their keyboard-level drawing routines like the following, in order to allow for keymap overrides: + +```c +bool oled_task_kb(void) { + // Defer to the keymap if they want to override + if(!oled_task_user()) { return false; } + + // default keyboard drawing code + return false; +} +``` + +### Bootmagic Full Removal ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) :id=bootmagic-full-removal + +As noted during previous breaking changes cycles, QMK decided to deprecate the full Bootmagic feature and leave Bootmagic Lite as the only remaining option. + +This removal is now complete! + +This pull request changes the behavior of `BOOTMAGIC_ENABLE` such that specifying `lite` or `full` results in an error, allowing only `yes` or `no`, with `yes` mirroring historical `lite` functionality. + +All use of the `lite` keyword within the repository has been migrated to `yes` -- any new submissions using `lite` will now fail to build and should be updated accordingly. + +#### Bootmagic Full Deprecation Schedule: Complete! + +This is the historical timeline for the behavior of `BOOTMAGIC_ENABLE`: + +- (done) From 2021 May 29, setting `BOOTMAGIC_ENABLE = yes` will enable Bootmagic Lite instead of full Bootmagic. +- (done) From 2021 Aug 28, `BOOTMAGIC_ENABLE` must be either `yes`, `lite`, or `no` – setting `BOOTMAGIC_ENABLE = full` will cause compilation to fail. +- (now) From 2021 Nov 27, `BOOTMAGIC_ENABLE` must be either `yes` or `no` – setting `BOOTMAGIC_ENABLE = lite` will cause compilation to fail. + +### Remove QWIIC_DRIVERS ([#14174](https://github.com/qmk/qmk_firmware/pull/14174)) :id=remove-qwiic + +Due to minimal QWIIC adoption and other options for similar functionality, the QWIIC drivers were removed from QMK. Existing OLED usages have been migrated across to the normal QMK OLED driver instead. + +## Notable core changes :id=notable-core + +### New MCU Support :id=new-mcu-support + +QMK firmware picked up support for a handful of new MCU families, potentially making it a bit easier to source components. + +QMK firmware is now no longer limited to AVR and ARM - it also picked up support for our first RISC-V chip, the GD32VF103. + +* Add support for RISC-V builds and GD32VF103 MCU ([#12508](https://github.com/qmk/qmk_firmware/pull/12508)) +* Add HT32 support to core ([#14388](https://github.com/qmk/qmk_firmware/pull/14388)) +* Westberrytech pr ([#14422](https://github.com/qmk/qmk_firmware/pull/14422)) +* Initial pass of F405 support ([#14584](https://github.com/qmk/qmk_firmware/pull/14584)) + +### EEPROM Changes :id=eeprom-changes + +There were a few EEPROM-related changes that landed during this breaking changes cycle, most prominently the long-awaited ability for the Drop boards to gain persistent storage. Any users of the Drop CTRL or Drop ALT should update QMK Toolbox as well -- coupled with a QMK firmware update settings should now be saved. + +* massdrop alt/ctrl: support saving into nvm ([#6068](https://github.com/qmk/qmk_firmware/pull/6068)) +* Implement F4 eeprom ([#14195](https://github.com/qmk/qmk_firmware/pull/14195)) +* make the full 4096 bytes of EEPROM work on Teensy 3.6 ([#12947](https://github.com/qmk/qmk_firmware/pull/12947)) +* Further tidy up of STM32 eeprom emulation ([#14591](https://github.com/qmk/qmk_firmware/pull/14591)) +* Enable eeprom with F401xE ld ([#14752](https://github.com/qmk/qmk_firmware/pull/14752)) + +### Compilation Database :id=compile-commands + +A clang-compatible compilation database generator has been added as an option in order to help development environments such as Visual Studio Code. + +Running `qmk generate-compilation-database -kb -km ` from within the QMK firmware directory will generate a `compile_commands.json` file -- using a compatible IDE will likely see this and correctly start detecting the correct locations for source files as well as type and function information that are relevant to your build. + +Do note that switching keyboards will require re-generation of this file. + +* New CLI subcommand to create clang-compatible compilation database (`compile_commands.json`) ([#14370](https://github.com/qmk/qmk_firmware/pull/14370)) +* compiledb: query include paths from gcc directly. ([#14462](https://github.com/qmk/qmk_firmware/pull/14462)) + +### Codebase restructure and cleanup :id=codebase-restructure + +QMK continues on its restructuring journey, in order to make it easier to integrate newer features and add support for new hardware. This quarter's batch of changes include: + +* add 'include keyboard_features.mk' into build_keyboard.mk ([#8422](https://github.com/qmk/qmk_firmware/pull/8422)) +* Infer more when building features ([#13890](https://github.com/qmk/qmk_firmware/pull/13890)) +* Move `tmk_core/common/` ([#13918](https://github.com/qmk/qmk_firmware/pull/13918)) +* Move feature suspend logic out of platform specific code ([#14210](https://github.com/qmk/qmk_firmware/pull/14210)) +* Remove bin/qmk ([#14231](https://github.com/qmk/qmk_firmware/pull/14231)) +* Move Audio drivers from quantum to platform drivers folder ([#14308](https://github.com/qmk/qmk_firmware/pull/14308)) +* Remove Arduino-style `analogRead()` ([#14348](https://github.com/qmk/qmk_firmware/pull/14348)) +* Remove unreferenced IBM4704, Sony NEWS, NeXT keyboard code. ([#14380](https://github.com/qmk/qmk_firmware/pull/14380)) +* Move Bluetooth config to common_features.mk ([#14404](https://github.com/qmk/qmk_firmware/pull/14404)) +* Relocate Adafruit BLE code ([#14530](https://github.com/qmk/qmk_firmware/pull/14530)) +* Change `MK66F18` -> `MK66FX1M0` ([#14659](https://github.com/qmk/qmk_firmware/pull/14659)) +* Remove sysex API ([#14723](https://github.com/qmk/qmk_firmware/pull/14723)) +* Basic keycode overhaul ([#14726](https://github.com/qmk/qmk_firmware/pull/14726)) +* Remove SERIAL_LINK feature ([#14727](https://github.com/qmk/qmk_firmware/pull/14727)) +* Move converter specific tmk_core protocols ([#14743](https://github.com/qmk/qmk_firmware/pull/14743)) +* Align PS/2 GPIO defines ([#14745](https://github.com/qmk/qmk_firmware/pull/14745)) +* Clean up LED/RGB Matrix driver config ([#14760](https://github.com/qmk/qmk_firmware/pull/14760)) +* Update UART driver API ([#14839](https://github.com/qmk/qmk_firmware/pull/14839)) +* Tidy up LCD_ENABLE/visualizer references ([#14855](https://github.com/qmk/qmk_firmware/pull/14855)) +* Remove legacy Makefile functionality ([#14858](https://github.com/qmk/qmk_firmware/pull/14858)) +* Begin to carve out platform/protocol API - Migrate keyboard_* calls ([#14888](https://github.com/qmk/qmk_firmware/pull/14888)) +* Rename platform SRC variable ([#14894](https://github.com/qmk/qmk_firmware/pull/14894)) +* Relocate PS2 code ([#14895](https://github.com/qmk/qmk_firmware/pull/14895)) +* Move USE_CCACHE logic to common location ([#14899](https://github.com/qmk/qmk_firmware/pull/14899)) +* Migrate makefile utilities to sub-directory ([#14917](https://github.com/qmk/qmk_firmware/pull/14917)) +* Remove SERIAL_MOUSE ([#14969](https://github.com/qmk/qmk_firmware/pull/14969)) +* Relocate protocol files within tmk_core/common/ ([#14972](https://github.com/qmk/qmk_firmware/pull/14972)) +* More platform/protocol alignment ([#14976](https://github.com/qmk/qmk_firmware/pull/14976)) +* Fix uart function prototypes ([#15162](https://github.com/qmk/qmk_firmware/pull/15162)) +* Remove deprecated KEYMAP alias ([#15037](https://github.com/qmk/qmk_firmware/pull/15037)) +* Move non-assignment code to post_rules.mk ([#14207](https://github.com/qmk/qmk_firmware/pull/14207)) +* Helix use `post_rules.mk` ([#14216](https://github.com/qmk/qmk_firmware/pull/14216)) +* Make ChibiOS PAL interactions less STM32 specific - Round 2 ([#14456](https://github.com/qmk/qmk_firmware/pull/14456)) + +--- + +## Full changelist + +Core: +* massdrop alt/ctrl: support saving into nvm ([#6068](https://github.com/qmk/qmk_firmware/pull/6068)) +* Made AVR backlight pwm resolution configurable ([#7521](https://github.com/qmk/qmk_firmware/pull/7521)) +* add 'include keyboard_features.mk' into build_keyboard.mk ([#8422](https://github.com/qmk/qmk_firmware/pull/8422)) +* New feature: `DYNAMIC_TAPPING_TERM_ENABLE` ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) +* Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) and Custom Auto Shifts ([#11059](https://github.com/qmk/qmk_firmware/pull/11059)) +* Add support for RISC-V builds and GD32VF103 MCU ([#12508](https://github.com/qmk/qmk_firmware/pull/12508)) +* Add Fractal RGB matrix effects ([#12670](https://github.com/qmk/qmk_firmware/pull/12670)) +* Added power tracking api ([#12691](https://github.com/qmk/qmk_firmware/pull/12691)) +* haptic: Feature to disable it when usb port is not configured or suspended. ([#12692](https://github.com/qmk/qmk_firmware/pull/12692)) +* make the full 4096 bytes of EEPROM work on Teensy 3.6 ([#12947](https://github.com/qmk/qmk_firmware/pull/12947)) +* Add Support for USB programmable buttons ([#12950](https://github.com/qmk/qmk_firmware/pull/12950)) +* [Tests] Increase QMK test coverage ([#13789](https://github.com/qmk/qmk_firmware/pull/13789)) +* Add support for ISSI drivers on both sides of a split keyboard ([#13842](https://github.com/qmk/qmk_firmware/pull/13842)) +* Infer more when building features ([#13890](https://github.com/qmk/qmk_firmware/pull/13890)) +* Reimplements WPM feature to be smaller & precise ([#13902](https://github.com/qmk/qmk_firmware/pull/13902)) +* Move `tmk_core/common/` ([#13918](https://github.com/qmk/qmk_firmware/pull/13918)) +* Improvements to handling of disconnected split keyboards. ([#14033](https://github.com/qmk/qmk_firmware/pull/14033)) +* Add Pixel Rain RGB Matrix effect ([#14155](https://github.com/qmk/qmk_firmware/pull/14155)) +* Remove QWIIC_DRIVERS ([#14174](https://github.com/qmk/qmk_firmware/pull/14174)) +* Add LM() keys to the list of keys disabled by NO_HAPTIC_MOD ([#14181](https://github.com/qmk/qmk_firmware/pull/14181)) +* Implement F4 eeprom ([#14195](https://github.com/qmk/qmk_firmware/pull/14195)) +* define to AUTO_SHIFT_DISABLED_AT_STARTUP ([#14201](https://github.com/qmk/qmk_firmware/pull/14201)) +* Move feature suspend logic out of platform specific code ([#14210](https://github.com/qmk/qmk_firmware/pull/14210)) +* Remove bin/qmk ([#14231](https://github.com/qmk/qmk_firmware/pull/14231)) +* Change keyboard level include guards to `pragma once` ([#14248](https://github.com/qmk/qmk_firmware/pull/14248)) +* i2c_master: Add support for reading/writing to 16-bit registers ([#14289](https://github.com/qmk/qmk_firmware/pull/14289)) +* Move Audio drivers from quantum to platform drivers folder ([#14308](https://github.com/qmk/qmk_firmware/pull/14308)) +* Add RGBW support to PWM and SPI drivers for ChibiOS ([#14327](https://github.com/qmk/qmk_firmware/pull/14327)) +* Rework and expand Pointing Device support ([#14343](https://github.com/qmk/qmk_firmware/pull/14343)) +* Remove Arduino-style `analogRead()` ([#14348](https://github.com/qmk/qmk_firmware/pull/14348)) +* Macros in JSON keymaps ([#14374](https://github.com/qmk/qmk_firmware/pull/14374)) +* Remove unreferenced IBM4704, Sony NEWS, NeXT keyboard code. ([#14380](https://github.com/qmk/qmk_firmware/pull/14380)) +* Add HT32 support to core ([#14388](https://github.com/qmk/qmk_firmware/pull/14388)) +* Align ChibiOS I2C defs with other drivers ([#14399](https://github.com/qmk/qmk_firmware/pull/14399)) +* Move Bluetooth config to common_features.mk ([#14404](https://github.com/qmk/qmk_firmware/pull/14404)) +* Westberrytech pr ([#14422](https://github.com/qmk/qmk_firmware/pull/14422)) +* Refactor use of STM32_SYSCLK ([#14430](https://github.com/qmk/qmk_firmware/pull/14430)) +* Migrate STM32_EEPROM_ENABLE to use EEPROM_DRIVER ([#14433](https://github.com/qmk/qmk_firmware/pull/14433)) +* Refactor use of _STM32_ defines ([#14439](https://github.com/qmk/qmk_firmware/pull/14439)) +* Add i2c defaults for Convert to Proton C ([#14470](https://github.com/qmk/qmk_firmware/pull/14470)) +* Use opendrain pin with external pullup again ([#14474](https://github.com/qmk/qmk_firmware/pull/14474)) +* Add ability to use numpad digits for unicode mode UC_WIN ([#14496](https://github.com/qmk/qmk_firmware/pull/14496)) +* Enable de-ghosting for RGB/LED matrix on all ISSI LED drivers ([#14508](https://github.com/qmk/qmk_firmware/pull/14508)) +* Relocate Adafruit BLE code ([#14530](https://github.com/qmk/qmk_firmware/pull/14530)) +* Initial pass of F405 support ([#14584](https://github.com/qmk/qmk_firmware/pull/14584)) +* Further tidy up of STM32 eeprom emulation ([#14591](https://github.com/qmk/qmk_firmware/pull/14591)) +* Remove GCC version check from song list inclusion ([#14600](https://github.com/qmk/qmk_firmware/pull/14600)) +* Change `MK66F18` -> `MK66FX1M0` ([#14659](https://github.com/qmk/qmk_firmware/pull/14659)) +* Add ifndef to WS2812 timing constraints ([#14678](https://github.com/qmk/qmk_firmware/pull/14678)) +* Reuse of EEPROM debounce logic ([#14699](https://github.com/qmk/qmk_firmware/pull/14699)) +* Remove sysex API ([#14723](https://github.com/qmk/qmk_firmware/pull/14723)) +* Basic keycode overhaul ([#14726](https://github.com/qmk/qmk_firmware/pull/14726)) +* Remove SERIAL_LINK feature ([#14727](https://github.com/qmk/qmk_firmware/pull/14727)) +* Enable CLI flashing via mdloader ([#14729](https://github.com/qmk/qmk_firmware/pull/14729)) +* Correct the Turkish F '?' keycode (TR_QUES) ([#14740](https://github.com/qmk/qmk_firmware/pull/14740)) +* Move converter specific tmk_core protocols ([#14743](https://github.com/qmk/qmk_firmware/pull/14743)) +* Align PS/2 GPIO defines ([#14745](https://github.com/qmk/qmk_firmware/pull/14745)) +* Improve Adafruit BLE configuration defines ([#14749](https://github.com/qmk/qmk_firmware/pull/14749)) +* Enable eeprom with F401xE ld ([#14752](https://github.com/qmk/qmk_firmware/pull/14752)) +* Clean up LED/RGB Matrix driver config ([#14760](https://github.com/qmk/qmk_firmware/pull/14760)) +* Initial USB2422 driver ([#14835](https://github.com/qmk/qmk_firmware/pull/14835)) +* Update UART driver API ([#14839](https://github.com/qmk/qmk_firmware/pull/14839)) +* Split out arm_atsam shift register logic ([#14848](https://github.com/qmk/qmk_firmware/pull/14848)) +* Split out HAPTIC_ENABLE to have separate DRIVER option ([#14854](https://github.com/qmk/qmk_firmware/pull/14854)) +* Tidy up LCD_ENABLE/visualizer references ([#14855](https://github.com/qmk/qmk_firmware/pull/14855)) +* Remove legacy Makefile functionality ([#14858](https://github.com/qmk/qmk_firmware/pull/14858)) +* Add support for deferred executors. ([#14859](https://github.com/qmk/qmk_firmware/pull/14859)) +* Change OLED task function to be boolean ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) +* Add a new led driver for Keychron's keyboards. ([#14872](https://github.com/qmk/qmk_firmware/pull/14872)) +* Begin to carve out platform/protocol API - Migrate keyboard_* calls ([#14888](https://github.com/qmk/qmk_firmware/pull/14888)) +* Rename platform SRC variable ([#14894](https://github.com/qmk/qmk_firmware/pull/14894)) +* Relocate PS2 code ([#14895](https://github.com/qmk/qmk_firmware/pull/14895)) +* Move USE_CCACHE logic to common location ([#14899](https://github.com/qmk/qmk_firmware/pull/14899)) +* Migrate makefile utilities to sub-directory ([#14917](https://github.com/qmk/qmk_firmware/pull/14917)) +* Remove legacy handling for ErgoDox Infinity handedness ([#14919](https://github.com/qmk/qmk_firmware/pull/14919)) +* Align usbasp flashing behaviour ([#14928](https://github.com/qmk/qmk_firmware/pull/14928)) +* Optimize matrix scanning by removing variable shifts ([#14947](https://github.com/qmk/qmk_firmware/pull/14947)) +* Stop-gap forward-port Drop LED features for CTRL and ALT ([#14967](https://github.com/qmk/qmk_firmware/pull/14967)) +* Remove SERIAL_MOUSE ([#14969](https://github.com/qmk/qmk_firmware/pull/14969)) +* Relocate protocol files within tmk_core/common/ ([#14972](https://github.com/qmk/qmk_firmware/pull/14972)) +* Move LTO logic from common.mk ([#14973](https://github.com/qmk/qmk_firmware/pull/14973)) +* More platform/protocol alignment ([#14976](https://github.com/qmk/qmk_firmware/pull/14976)) +* Add support to persist MD LED framework settings ([#14980](https://github.com/qmk/qmk_firmware/pull/14980)) +* Enable configuration of PWM frequency for IS31FL3733B ([#14983](https://github.com/qmk/qmk_firmware/pull/14983)) +* Remove `BOOTMAGIC_ENABLE = lite` option ([#15002](https://github.com/qmk/qmk_firmware/pull/15002)) +* Manually format develop ([#15003](https://github.com/qmk/qmk_firmware/pull/15003)) +* Require explicit enabling of RGB Matrix modes ([#15018](https://github.com/qmk/qmk_firmware/pull/15018)) +* Remove deprecated KEYMAP alias ([#15037](https://github.com/qmk/qmk_firmware/pull/15037)) +* Fix uart function prototypes ([#15162](https://github.com/qmk/qmk_firmware/pull/15162)) +* Rename RGB fractal ([#15174](https://github.com/qmk/qmk_firmware/pull/15174)) +* Format code according to conventions ([#15195](https://github.com/qmk/qmk_firmware/pull/15195)) +* Format code according to conventions ([#15196](https://github.com/qmk/qmk_firmware/pull/15196)) +* Add uint to char functions ([#15244](https://github.com/qmk/qmk_firmware/pull/15244)) +* [Tests] Increase QMK test coverage take 2 ([#15269](https://github.com/qmk/qmk_firmware/pull/15269)) +* Tidy up adjustable ws2812 timing ([#15299](https://github.com/qmk/qmk_firmware/pull/15299)) +* Add script for performing compilation size regression investigations. ([#15303](https://github.com/qmk/qmk_firmware/pull/15303)) +* WB32F3G71 config migration with removal of unnecessary items. ([#15309](https://github.com/qmk/qmk_firmware/pull/15309)) +* Re-add encoder tests ([#15312](https://github.com/qmk/qmk_firmware/pull/15312)) + +CLI: +* Add check for non-assignment code in rules.mk ([#12108](https://github.com/qmk/qmk_firmware/pull/12108)) +* Export list of `develop` PRs to be merged into `master` ([#13944](https://github.com/qmk/qmk_firmware/pull/13944)) +* remove qmk console, which is now part of the global cli ([#14206](https://github.com/qmk/qmk_firmware/pull/14206)) +* New CLI subcommand to create clang-compatible compilation database (`compile_commands.json`) ([#14370](https://github.com/qmk/qmk_firmware/pull/14370)) +* compiledb: query include paths from gcc directly. ([#14462](https://github.com/qmk/qmk_firmware/pull/14462)) + +Submodule updates: +* Update to ChibiOS 20.3.4, support builds against trunk ([#14208](https://github.com/qmk/qmk_firmware/pull/14208)) +* Update ChibiOS-Contrib ([#14408](https://github.com/qmk/qmk_firmware/pull/14408)) +* Update ChibiOS-Contrib ([#14419](https://github.com/qmk/qmk_firmware/pull/14419)) +* Purge uGFX. ([#14720](https://github.com/qmk/qmk_firmware/pull/14720)) + +Keyboards: +* Add support for PaladinPad, Arya pcb and move keyboards by KapCave into their own directory ([#14194](https://github.com/qmk/qmk_firmware/pull/14194)) +* Move non-assignment code to post_rules.mk ([#14207](https://github.com/qmk/qmk_firmware/pull/14207)) +* Helix use `post_rules.mk` ([#14216](https://github.com/qmk/qmk_firmware/pull/14216)) +* handwired/symmetric70_proto use post_rules.mk ([#14235](https://github.com/qmk/qmk_firmware/pull/14235)) +* Add Adelais PCB. Adelais RGB rev.3, Adelais rev. 4 APM32F103, Adelais AVR rev. 1 ([#14252](https://github.com/qmk/qmk_firmware/pull/14252)) +* GMMK Pro keymap ([#14389](https://github.com/qmk/qmk_firmware/pull/14389)) +* Migrate boston_meetup/2019 away from QWIIC_DRIVERS ([#14413](https://github.com/qmk/qmk_firmware/pull/14413)) +* Migrate hadron away from QWIIC_DRIVERS ([#14415](https://github.com/qmk/qmk_firmware/pull/14415)) +* Enable Proton C defaults for SplitKB Kyria ([#14490](https://github.com/qmk/qmk_firmware/pull/14490)) +* Set USB max power consumption of kint* controllers to 100mA ([#14546](https://github.com/qmk/qmk_firmware/pull/14546)) +* Remove complex `fn_actions` macros ([#14662](https://github.com/qmk/qmk_firmware/pull/14662)) +* New Keyboard: TGR Jane CE ([#14713](https://github.com/qmk/qmk_firmware/pull/14713)) +* Migrate satisfaction75 away from QWIIC_DRIVERS ([#14747](https://github.com/qmk/qmk_firmware/pull/14747)) +* add Lefty keyboard ([#14898](https://github.com/qmk/qmk_firmware/pull/14898)) +* overnumpad controller: Add support for turning off solenoid enable in low power. ([#15021](https://github.com/qmk/qmk_firmware/pull/15021)) +* Reduce compile size for melgeek mach80 ([#15034](https://github.com/qmk/qmk_firmware/pull/15034)) +* Update updated KPrepublic boards to be prepared for the update ([#15040](https://github.com/qmk/qmk_firmware/pull/15040)) +* rename kprepublic bm keyboards to have a standardized naming format ([#15047](https://github.com/qmk/qmk_firmware/pull/15047)) +* matrix/abelx - Update ChibiOS conf files ([#15130](https://github.com/qmk/qmk_firmware/pull/15130)) +* Disable console on Keebio foldkb and iris rev3 ([#15260](https://github.com/qmk/qmk_firmware/pull/15260)) +* Disable console on Sofle default keymap ([#15261](https://github.com/qmk/qmk_firmware/pull/15261)) +* Disable features on SplitKB boards to fit under size ([#15262](https://github.com/qmk/qmk_firmware/pull/15262)) +* Enable LTO on viktus/sp_mini via keymap ([#15263](https://github.com/qmk/qmk_firmware/pull/15263)) + +Keyboard fixes: +* Fix number of elements in info.json does not match errors ([#14213](https://github.com/qmk/qmk_firmware/pull/14213)) +* Fix typos from 14248 ([#14261](https://github.com/qmk/qmk_firmware/pull/14261)) +* Stream cheap via fixes/updates ([#14325](https://github.com/qmk/qmk_firmware/pull/14325)) +* Map `PRODUCT` define to `keyboard_name` ([#14372](https://github.com/qmk/qmk_firmware/pull/14372)) +* Fix BT rules for dosa40rgb ([#14497](https://github.com/qmk/qmk_firmware/pull/14497)) +* Fix typo in mechloving adelais header files ([#14590](https://github.com/qmk/qmk_firmware/pull/14590)) +* Fix for mechlovin/adelais/standard_led/arm/rev4 ([#14639](https://github.com/qmk/qmk_firmware/pull/14639)) +* Fix OLED timeout on recent qwiic migrations ([#14775](https://github.com/qmk/qmk_firmware/pull/14775)) +* Fix OLED timeout on satisfaction75 after migration from QWIIC ([#14780](https://github.com/qmk/qmk_firmware/pull/14780)) +* Fix Compile issues for lefty ([#14982](https://github.com/qmk/qmk_firmware/pull/14982)) +* Fix missing return for oled task on Lefty ([#15010](https://github.com/qmk/qmk_firmware/pull/15010)) +* Fix missing return for oled task on Arabica37 ([#15011](https://github.com/qmk/qmk_firmware/pull/15011)) +* Fix missing return for oled task in drashna userspace ([#15012](https://github.com/qmk/qmk_firmware/pull/15012)) +* Fix size issues on pistachio pro via keymap ([#15017](https://github.com/qmk/qmk_firmware/pull/15017)) +* Fix keycode collision in craftwalk keymap ([#15055](https://github.com/qmk/qmk_firmware/pull/15055)) +* Fix compilation issues for yanghu Unicorne ([#15068](https://github.com/qmk/qmk_firmware/pull/15068)) +* Fixup broken build after #15040 ([#15073](https://github.com/qmk/qmk_firmware/pull/15073)) +* Fix compilation issues for Lime ([#15116](https://github.com/qmk/qmk_firmware/pull/15116)) +* Fix additional board sizes for RGB Matrix ([#15170](https://github.com/qmk/qmk_firmware/pull/15170)) +* Fix bandominedoni via keymap compilation ([#15171](https://github.com/qmk/qmk_firmware/pull/15171)) +* Fix handful of boards compiling too large due to RGB matrix changes ([#15184](https://github.com/qmk/qmk_firmware/pull/15184)) +* Fix oled_task_user for ffkeebs/puca ([#15185](https://github.com/qmk/qmk_firmware/pull/15185)) +* More headroom. ([#15301](https://github.com/qmk/qmk_firmware/pull/15301)) +* More headroom. ([#15302](https://github.com/qmk/qmk_firmware/pull/15302)) + +Others: +* Clean up some code block languages ([#14434](https://github.com/qmk/qmk_firmware/pull/14434)) +* Clarify "nested" and "rolling" key sequences ([#14655](https://github.com/qmk/qmk_firmware/pull/14655)) +* CI: Create GitHub Actions unit test workflow ([#15223](https://github.com/qmk/qmk_firmware/pull/15223)) +* Squeezing space out of AVR ([#15243](https://github.com/qmk/qmk_firmware/pull/15243)) + +Bugs: +* Fix parallel builds w/ LTO on systems where make is not GNU make. ([#13955](https://github.com/qmk/qmk_firmware/pull/13955)) +* fix automatic directory for qmk lint ([#14215](https://github.com/qmk/qmk_firmware/pull/14215)) +* RN42 Bluetooth typo fix ([#14421](https://github.com/qmk/qmk_firmware/pull/14421)) +* fix typo in backlight code from #14439 ([#14442](https://github.com/qmk/qmk_firmware/pull/14442)) +* fix compilation issues with USB programmable buttons ([#14454](https://github.com/qmk/qmk_firmware/pull/14454)) +* Fix descriptor for USB Programmable Buttons ([#14455](https://github.com/qmk/qmk_firmware/pull/14455)) +* Make ChibiOS PAL interactions less STM32 specific - Round 2 ([#14456](https://github.com/qmk/qmk_firmware/pull/14456)) +* fix logical minimum in Programmable Button rdesc ([#14464](https://github.com/qmk/qmk_firmware/pull/14464)) +* Fix i2c_readReg16 ([#14730](https://github.com/qmk/qmk_firmware/pull/14730)) +* Put back eeconfig_update_ functions ([#14751](https://github.com/qmk/qmk_firmware/pull/14751)) +* Fix misplaced endif in led_matrix_drivers.c ([#14785](https://github.com/qmk/qmk_firmware/pull/14785)) +* Fix builds for ChibiOS + Cortex-M0[+] ([#14879](https://github.com/qmk/qmk_firmware/pull/14879)) +* Fix ccache default ([#14906](https://github.com/qmk/qmk_firmware/pull/14906)) +* Fix issues with Oneshot disabling ([#14934](https://github.com/qmk/qmk_firmware/pull/14934)) +* Fix develop after recent changes ([#14975](https://github.com/qmk/qmk_firmware/pull/14975)) +* Fix up issues shown by clang-format of vusb ([#15004](https://github.com/qmk/qmk_firmware/pull/15004)) +* Fix unterminated ifdef in ISSI 3733 driver ([#15014](https://github.com/qmk/qmk_firmware/pull/15014)) +* Fix build failures caused by #12947. ([#15019](https://github.com/qmk/qmk_firmware/pull/15019)) +* Fixup LED matrix. ([#15020](https://github.com/qmk/qmk_firmware/pull/15020)) +* Revert to old init order for host driver ([#15029](https://github.com/qmk/qmk_firmware/pull/15029)) +* Fixup #15029 ([#15031](https://github.com/qmk/qmk_firmware/pull/15031)) +* RISC-V toolchain and picolibc fixes ([#15109](https://github.com/qmk/qmk_firmware/pull/15109)) +* gcc10 LTO - Only specify adhlns assembler options at link time ([#15115](https://github.com/qmk/qmk_firmware/pull/15115)) +* Add needed include to pointing_device.c ([#15167](https://github.com/qmk/qmk_firmware/pull/15167)) +* Fix missing variable for Backlight Breathing ([#15199](https://github.com/qmk/qmk_firmware/pull/15199)) +* Revert backlight pins on function call ([#15205](https://github.com/qmk/qmk_firmware/pull/15205)) +* Fix timer include in override_wiring.c ([#15221](https://github.com/qmk/qmk_firmware/pull/15221)) +* fix broken macro in transport.h ([#15239](https://github.com/qmk/qmk_firmware/pull/15239)) +* Short term bodge for PRODUCT warning ([#15240](https://github.com/qmk/qmk_firmware/pull/15240)) +* Remove use of __flash due to LTO issues ([#15268](https://github.com/qmk/qmk_firmware/pull/15268)) +* Documentation typo fix ([#15298](https://github.com/qmk/qmk_firmware/pull/15298)) +* [Core] Hotfix for HOLD_ON_OTHER_KEY_PRESS after #11059 ([#15307](https://github.com/qmk/qmk_firmware/pull/15307)) +* Fix call to pointing_device_handle_buttons ([#15313](https://github.com/qmk/qmk_firmware/pull/15313)) +* [Develop] Fix ploopy readme typos ([#15316](https://github.com/qmk/qmk_firmware/pull/15316)) diff --git a/docs/_summary.md b/docs/_summary.md index 2f6309e41d1..e26d9ae2106 100644 --- a/docs/_summary.md +++ b/docs/_summary.md @@ -13,6 +13,7 @@ * [Troubleshooting QMK](faq_misc.md) * [Debugging QMK](faq_debug.md) * [Keymap FAQ](faq_keymap.md) + * [Squeezing Space from AVR](squeezing_avr.md) * [Glossary](reference_glossary.md) * Configurator @@ -72,6 +73,7 @@ * [Mod-Tap](mod_tap.md) * [Macros](feature_macros.md) * [Mouse Keys](feature_mouse_keys.md) + * [Programmable Button](feature_programmable_button.md) * [Space Cadet Shift](feature_space_cadet.md) * [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) @@ -127,7 +129,7 @@ * Breaking Changes * [Overview](breaking_changes.md) * [My Pull Request Was Flagged](breaking_changes_instructions.md) - * [Most Recent ChangeLog](ChangeLog/20210529.md "QMK v0.13.0 - 2021 May 29") + * [Most Recent ChangeLog](ChangeLog/20211127.md "QMK v0.15.0 - 2021 Nov 27") * [Past Breaking Changes](breaking_changes_history.md) * C Development diff --git a/docs/audio_driver.md b/docs/audio_driver.md index 7cd5a98d9f4..81c33900740 100644 --- a/docs/audio_driver.md +++ b/docs/audio_driver.md @@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion; Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_DAC_USE_DAC1_CH1 @@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6: -``` c +```c //halconf.h: #define HAL_USE_DAC TRUE #define HAL_USE_GPT TRUE #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_DAC_USE_DAC1_CH1 @@ -153,7 +153,7 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. A configuration example for the STM32F103C8 would be: -``` c +```c //halconf.h: #define HAL_USE_PWM TRUE #define HAL_USE_PAL TRUE @@ -161,7 +161,7 @@ A configuration example for the STM32F103C8 would be: #include_next ``` -``` c +```c // mcuconf.h: #include_next #undef STM32_PWM_USE_TIM1 @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for - TIM1_CH4 = PA11 with all this information, the configuration would contain these lines: -``` c +```c //config.h: #define AUDIO_PIN A8 #define AUDIO_PWM_DRIVER PWMD1 diff --git a/docs/breaking_changes.md b/docs/breaking_changes.md index c5f4eec04d9..8bde6c88f77 100644 --- a/docs/breaking_changes.md +++ b/docs/breaking_changes.md @@ -2,10 +2,13 @@ This document describes QMK's Breaking Change process. A Breaking Change is any change which modifies how QMK behaves in a way that in incompatible or potentially dangerous. We limit these changes so that users can have confidence that updating their QMK tree will not break their keymaps. +This also includes any keyboard moves within the repository. + The breaking change period is when we will merge PR's that change QMK in dangerous or unexpected ways. There is a built-in period of testing so we are confident that any problems caused are rare or unable to be predicted. ## What has been included in past Breaking Changes? +* [2021 Nov 27](ChangeLog/20211127.md) * [2021 Aug 28](ChangeLog/20210828.md) * [2021 May 29](ChangeLog/20210529.md) * [2021 Feb 27](ChangeLog/20210227.md) @@ -17,16 +20,17 @@ The breaking change period is when we will merge PR's that change QMK in dangero ## When is the next Breaking Change? -The next Breaking Change is scheduled for August 28, 2021. +The next Breaking Change is scheduled for February 26, 2022. ### Important Dates -* [x] 2021 Aug 29 - `develop` is created. Each push to `master` is subsequently merged to `develop` -* [ ] 2021 Oct 31 - `develop` closed to new PR's. -* [ ] 2021 Oct 31 - Call for testers. -* [ ] 2021 Nov 26 - `master` is locked, no PR's merged. -* [ ] 2021 Nov 28 - Merge `develop` to `master`. -* [ ] 2021 Nov 28 - `master` is unlocked. PR's can be merged again. +* [x] 2021 Nov 27 - `develop` is tagged with a new release version. Each push to `master` is subsequently merged to `develop` by GitHub actions. +* [ ] 2022 Jan 31 - `develop` closed to new PR's. +* [ ] 2022 Jan 31 - Call for testers. +* [ ] 2022 Feb 12 - Last day for merges -- after this point `develop` is locked for testing and accepts only bugfixes +* [ ] 2022 Feb 24 - `master` is locked, no PR's merged. +* [ ] 2022 Feb 26 - Merge `develop` to `master`. +* [ ] 2022 Feb 26 - `master` is unlocked. PR's can be merged again. ## What changes will be included? @@ -36,8 +40,10 @@ If you want your breaking change to be included in this round you need to create Criteria for acceptance: -* PR is complete and ready to merge -* PR has a ChangeLog +* The PR is complete and ready to merge +* The PR has a ChangeLog file describing the changes under `/docs/Changelog/20220226`. + * This should be in Markdown format, with a name in the format `PR12345.md`, substituting the digits for your PR's ID. + * One strong recommendation that the ChangeLog document matches the PR description on GitHub, so as to ensure traceability. # Checklists @@ -68,6 +74,14 @@ This happens immediately after the previous `develop` branch is merged. * [ ] GitHub PR * [ ] https://reddit.com/r/olkb +## 2 Weeks Before Merge + +* `develop` is now closed to existing PR merges, only bugfixes for previous merges may be included +* Post call for testers + * [ ] Discord + * [ ] GitHub PR + * [ ] https://reddit.com/r/olkb + ## 1 Week Before Merge * Announce that master will be closed from <2 Days Before> to diff --git a/docs/breaking_changes_history.md b/docs/breaking_changes_history.md index f78e97f1c7b..6b1b71b1fdf 100644 --- a/docs/breaking_changes_history.md +++ b/docs/breaking_changes_history.md @@ -2,6 +2,7 @@ This page links to all previous changelogs from the QMK Breaking Changes process. +* [2021 Nov 27](ChangeLog/20211127.md) - version 0.15.0 * [2021 Aug 28](ChangeLog/20210828.md) - version 0.14.0 * [2021 May 29](ChangeLog/20210529.md) - version 0.13.0 * [2021 Feb 27](ChangeLog/20210227.md) - version 0.12.0 diff --git a/docs/chibios_upgrade_instructions.md b/docs/chibios_upgrade_instructions.md index 40c2faafcfe..b0a71142a39 100644 --- a/docs/chibios_upgrade_instructions.md +++ b/docs/chibios_upgrade_instructions.md @@ -14,10 +14,10 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra * First time around this will take several hours * Subsequent updates will be incremental only * Tagging example (work out which version first!): - * `git tag -a ver20.3.3 -m ver20.3.3 svn/tags/ver20.3.3` - * `git push qmk ver20.3.3` - * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN svn/tags/ver20.3.3` - * `git push qmk breaking_YYYY_qN` + * `git tag -a ver20.3.4 -m ver20.3.4 svn/tags/ver20.3.4` + * `git push qmk ver20.3.4` + * `git tag -a develop_YYYY_qN -m develop_YYYY_qN svn/tags/ver20.3.4` + * `git push qmk develop_YYYY_qN` ## Getting ChibiOS-Contrib @@ -30,8 +30,8 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra * `git checkout chibios-20.3.x` * `git pull --ff-only` * `git push origin chibios-20.3.x` - * `git tag -a breaking_YYYY_qN -m breaking_YYYY_qN chibios-20.3.x` - * `git push origin breaking_YYYY_qN` + * `git tag -a develop_YYYY_qN -m develop_YYYY_qN chibios-20.3.x` + * `git push origin develop_YYYY_qN` ## Updating submodules @@ -42,15 +42,18 @@ ChibiOS and ChibiOS-Contrib need to be updated in tandem -- the latter has a bra * `git checkout -b chibios-version-bump` * `cd lib/chibios` * `git fetch --all --tags --prune` - * `git checkout breaking_YYYY_qN` + * `git checkout develop_YYYY_qN` * `cd ../chibios-contrib` * `git fetch --all --tags --prune` - * `git checkout breaking_YYYY_qN` + * `git checkout develop_YYYY_qN` +* Update ChibiOS configs within QMK + * `cd $QMK_FIRMWARE` + * `./util/chibios_conf_updater.sh` * Build everything * `cd $QMK_FIRMWARE` * `qmk multibuild -j4` * Make sure there are no errors * Push to the repo - * `git commit -am 'Update ChibiOS to XXXXXXXXX'` + * `git commit -am 'Update ChibiOS to 99.9.9'` * `git push --set-upstream origin chibios-version-bump` -* Make a PR to qmk_firmware with the new branch \ No newline at end of file +* Make a PR to qmk_firmware with the new branch diff --git a/docs/cli_commands.md b/docs/cli_commands.md index 8f5117633f7..520da06c41b 100644 --- a/docs/cli_commands.md +++ b/docs/cli_commands.md @@ -382,6 +382,33 @@ qmk format-c qmk format-c -b branch_name ``` +## `qmk generate-compilation-database` + +**Usage**: + +``` +qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP] +``` + +Creates a `compile_commands.json` file. + +Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you. + +This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files. + +**Example:** + +``` +$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak +$ qmk generate-compilation-database +Ψ Making clean +Ψ Gathering build instructions from make -n gh60/satan:colemak +Ψ Found 50 compile commands +Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json +``` + +Now open your dev environment and live a squiggly-free life. + ## `qmk docs` This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936. diff --git a/docs/cli_development.md b/docs/cli_development.md index 0f4f401b33b..62be3b3d8c4 100644 --- a/docs/cli_development.md +++ b/docs/cli_development.md @@ -14,7 +14,7 @@ If you intend to maintain keyboards and/or contribute to QMK, you can enable the This will allow you to see all available subcommands. **Note:** You will have to install additional requirements: -```bash +``` python3 -m pip install -r requirements-dev.txt ``` diff --git a/docs/compatible_microcontrollers.md b/docs/compatible_microcontrollers.md index 2bf3b0ebb79..eb3e2c3e571 100644 --- a/docs/compatible_microcontrollers.md +++ b/docs/compatible_microcontrollers.md @@ -27,6 +27,7 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) + * [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) @@ -36,13 +37,24 @@ You can also use any ARM chip with USB that [ChibiOS](https://www.chibios.org) s * [STM32L422](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x2.html) * [STM32L433](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) * [STM32L443](https://www.st.com/en/microcontrollers-microprocessors/stm32l4x3.html) + + ### WestBerryTech (WB32) + + * [WB32F3G71xx](http://www.westberrytech.com) ### NXP (Kinetis) * [MKL26Z64](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/kl-series-cortex-m0-plus/kinetis-kl2x-72-96-mhz-usb-ultra-low-power-microcontrollers-mcus-based-on-arm-cortex-m0-plus-core:KL2x) * [MK20DX128](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-50-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-based-on-arm-cortex-m4-core:K20_50) * [MK20DX256](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72) + * [MK66FX1M0](https://www.nxp.com/products/processors-and-microcontrollers/arm-microcontrollers/general-purpose-mcus/k-series-cortex-m4/k6x-ethernet/kinetis-k66-180-mhz-dual-high-speed-full-speed-usbs-2mb-flash-microcontrollers-mcus-based-on-arm-cortex-m4-core:K66_180) ## Atmel ATSAM There is limited support for one of Atmel's ATSAM microcontrollers, that being the [ATSAMD51J18A](https://www.microchip.com/wwwproducts/en/ATSAMD51J18A) used by the [Massdrop keyboards](https://github.com/qmk/qmk_firmware/tree/master/keyboards/massdrop). + +## RISC-V + +### GigaDevice + +[ChibiOS-Contrib](https://github.com/ChibiOS/ChibiOS-Contrib) has support for the GigaDevice [GD32VF103 series](https://www.gigadevice.com/products/microcontrollers/gd32/risc-v/mainstream-line/gd32vf103-series/) microcontrollers and provides configurations for the [SiPeed Longan Nano](https://longan.sipeed.com/en/) development board that uses this microcontroller. It is largely pin and feature compatible with STM32F103 and STM32F303 microcontrollers. \ No newline at end of file diff --git a/docs/config_options.md b/docs/config_options.md index cfbe39f0d32..b661b55ee0d 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -206,7 +206,7 @@ If you define these options you will enable the associated feature, which may in * `#define TAP_CODE_DELAY 100` * Sets the delay between `register_code` and `unregister_code`, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. * `#define TAP_HOLD_CAPS_DELAY 80` - * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPSLOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. + * Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. * `#define KEY_OVERRIDE_REPEAT_DELAY 500` * Sets the key repeat interval for [key overrides](feature_key_overrides.md). @@ -407,7 +407,7 @@ Use these to enable or disable building certain features. The more you have enab * `MAGIC_ENABLE` * MAGIC actions (BOOTMAGIC without the boot) * `BOOTMAGIC_ENABLE` - * Virtual DIP switch configuration + * Enable Bootmagic Lite * `MOUSEKEY_ENABLE` * Mouse keys * `EXTRAKEY_ENABLE` @@ -446,6 +446,10 @@ Use these to enable or disable building certain features. The more you have enab * Forces the keyboard to wait for a USB connection to be established before it starts up * `NO_USB_STARTUP_CHECK` * Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master. +* `DEFERRED_EXEC_ENABLE` + * Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information. +* `DYNAMIC_TAPPING_TERM_ENABLE` + * Allows to configure the global tapping term on the fly. ## USB Endpoint Limitations diff --git a/docs/configurator_default_keymaps.md b/docs/configurator_default_keymaps.md index 30f9fa72f32..d2b14ec4110 100644 --- a/docs/configurator_default_keymaps.md +++ b/docs/configurator_default_keymaps.md @@ -20,7 +20,7 @@ Keymaps in this directory require four key-value pairs: Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards//keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to: -```shell +``` f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625) ``` @@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`: -```shell +``` user ~/qmk_firmware (master) $ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237) @@ -46,7 +46,7 @@ Now that we have the commit hash, we need the keymap (edited for readability): const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, 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_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, @@ -74,7 +74,7 @@ The default keymap uses the `LAYOUT_all` macro, so that will be the value of the "layout": "LAYOUT_all", "layers": [ [ - "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS", + "KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SCRL", "KC_PAUS", "KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP", "KC_TAB", "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_DEL", "KC_END", "KC_PGDN", "KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT", diff --git a/docs/contributing.md b/docs/contributing.md index 1d68d22d9f0..eb033d167fd 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -105,7 +105,7 @@ enum my_keycodes { Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder: - ./bin/qmk docs + qmk docs or if you only have Python 3 installed: diff --git a/docs/custom_matrix.md b/docs/custom_matrix.md index cfa900a33d3..8f6878f94a6 100644 --- a/docs/custom_matrix.md +++ b/docs/custom_matrix.md @@ -15,7 +15,7 @@ The reasons to use this feature include: Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`. Add a new file to your keyboard directory: -```text +``` keyboards//matrix.c ``` diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md index 463366ff763..dd1654bd298 100644 --- a/docs/custom_quantum_functions.md +++ b/docs/custom_quantum_functions.md @@ -149,7 +149,7 @@ This is useful for setting up stuff that you may need elsewhere, but isn't hardw * GPIO pin initialisation: `void matrix_init_pins(void)` * This needs to perform the low-level initialisation of all row and column pins. By default this will initialise the input/output state of each of the GPIO pins listed in `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no initialisation of pin state will occur within QMK itself, instead deferring to the keyboard's override. * `COL2ROW`-based row reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` -* `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)` +* `ROW2COL`-based column reads: `void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter)` * `DIRECT_PINS`-based reads: `void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row)` * These three functions need to perform the low-level retrieval of matrix state of relevant input pins, based on the matrix type. Only one of the functions should be implemented, if needed. By default this will iterate through `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`, configuring the inputs and outputs based on whether or not the keyboard is set up for `ROW2COL`, `COL2ROW`, or `DIRECT_PINS`. Should the keyboard designer override this function, no manipulation of matrix GPIO pin state will occur within QMK itself, instead deferring to the keyboard's override. @@ -405,3 +405,69 @@ And you're done. The RGB layer indication will only work if you want it to. And * Keymap: `void eeconfig_init_user(void)`, `uint32_t eeconfig_read_user(void)` and `void eeconfig_update_user(uint32_t val)` The `val` is the value of the data that you want to write to EEPROM. And the `eeconfig_read_*` function return a 32 bit (DWORD) value from the EEPROM. + +### Deferred Execution :id=deferred-execution + +QMK has the ability to execute a callback after a specified period of time, rather than having to manually manage timers. + +#### Deferred executor callbacks + +All _deferred executor callbacks_ have a common function signature and look like: + +```c +uint32_t my_callback(uint32_t trigger_time, void *cb_arg) { + /* do something */ + bool repeat = my_deferred_functionality(); + return repeat ? 500 : 0; +} +``` + +The first argument `trigger_time` is the intended time of execution. If other delays prevent executing at the exact trigger time, this allows for "catch-up" or even skipping intervals, depending on the required behaviour. + +The second argument `cb_arg` is the same argument passed into `defer_exec()` below, and can be used to access state information from the original call context. + +The return value is the number of milliseconds to use if the function should be repeated -- if the callback returns `0` then it's automatically unregistered. In the example above, a hypothetical `my_deferred_functionality()` is invoked to determine if the callback needs to be repeated -- if it does, it reschedules for a `500` millisecond delay, otherwise it informs the deferred execution background task that it's done, by returning `0`. + +?> Note that the returned delay will be applied to the intended trigger time, not the time of callback invocation. This allows for generally consistent timing even in the face of occasional late execution. + +#### Deferred executor registration + +Once a callback has been defined, it can be scheduled using the following API: + +```c +deferred_token my_token = defer_exec(1500, my_callback, NULL); +``` + +The first argument is the number of milliseconds to wait until executing `my_callback` -- in the case above, `1500` milliseconds, or 1.5 seconds. + +The third parameter is the `cb_arg` that gets passed to the callback at the point of execution. This value needs to be valid at the time the callback is invoked -- a local function value will be destroyed before the callback is executed and should not be used. If this is not required, `NULL` should be used. + +The return value is a `deferred_token` that can consequently be used to cancel the deferred executor callback before it's invoked. If a failure occurs, the returned value will be `INVALID_DEFERRED_TOKEN`. Usually this will be as a result of supplying `0` to the delay, or a `NULL` for the callback. The other failure case is if there are too many deferred executions "in flight" -- this can be increased by changing the limit, described below. + +#### Extending a deferred execution + +The `deferred_token` returned by `defer_exec()` can be used to extend a the duration a pending execution waits before it gets invoked: +```c +// This will re-delay my_token's future execution such that it is invoked 800ms after the current time +extend_deferred_exec(my_token, 800); +``` + +#### Cancelling a deferred execution + +The `deferred_token` returned by `defer_exec()` can be used to cancel a pending execution before it gets invoked: +```c +// This will cancel my_token's future execution +cancel_deferred_exec(my_token); +``` + +Once a token has been canceled, it should be considered invalid. Reusing the same token is not supported. + +#### Deferred callback limits + +There are a maximum number of deferred callbacks that can be scheduled, controlled by the value of the define `MAX_DEFERRED_EXECUTORS`. + +If registrations fail, then you can increase this value in your keyboard or keymap `config.h` file, for example to 16 instead of the default 8: + +```c +#define MAX_DEFERRED_EXECUTORS 16 +``` diff --git a/docs/de/cli.md b/docs/de/cli.md index 7dc02d505b6..259aeecf754 100644 --- a/docs/de/cli.md +++ b/docs/de/cli.md @@ -51,25 +51,6 @@ Wir suchen nach Freiwilligen, die ein `qmk`-Package für weitere Betriebssysteme * Installiere mit einem [virtualenv](https://virtualenv.pypa.io/en/latest/). * Weise den User an, die Umgebungs-Variable `QMK_HOME` zu setzen, um die Firmware-Quelle anders einzustellen als `~/qmk_firmware`. -# Lokale CLI - -Wenn Du die globale CLI nicht verwenden möchtest, beinhaltet `qmk_firmware` auch eine lokale CLI. Du kannst sie hier finden: `qmk_firmware/bin/qmk`. Du kannst den `qmk`-Befehl aus irgendeinem Datei-Verzeichnis ausführen und es wird immer auf dieser Kopie von `qmk_firmware` arbeiten. - -**Beispiel**: - -``` -$ ~/qmk_firmware/bin/qmk hello -Ψ Hello, World! -``` - -## Einschränkungen der lokalen CLI - -Hier ein Vergleich mit der globalen CLI: - -* Die lokale CLI unterstützt kein `qmk setup` oder `qmk clone`. -* Die lokale CLI arbeitet immer innerhalb der selben `qmk_firmware`-Verzeichnisstruktur, auch wenn Du mehrere Repositories geklont hast. -* Die lokale CLI läuft nicht in einer virtualenv. Daher ist es möglich, dass Abhängigkeiten (dependencies) miteinander in Konflikt kommen/stehen. - # CLI-Befehle ## `qmk compile` diff --git a/docs/driver_installation_zadig.md b/docs/driver_installation_zadig.md index 9155e56e374..003629ba9a0 100644 --- a/docs/driver_installation_zadig.md +++ b/docs/driver_installation_zadig.md @@ -93,6 +93,7 @@ The device name here is the name that appears in Zadig, and may not be what the |`usbasploader`|USBasp |`16C0:05DC` |libusbK| |`apm32-dfu` |APM32 DFU ISP Mode |`314B:0106` |WinUSB | |`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB | +|`gd32v-dfu` |GD32V BOOTLOADER |`28E9:0189` |WinUSB | |`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB | |`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB | |`qmk-hid` |(keyboard name) Bootloader |`03EB:2067` |HidUsb | diff --git a/docs/es/hardware_drivers.md b/docs/es/hardware_drivers.md index e0a9736068c..788de2c5efc 100644 --- a/docs/es/hardware_drivers.md +++ b/docs/es/hardware_drivers.md @@ -18,10 +18,6 @@ Soporte para direccionar pines en el ProMicro por su nombre Arduino en lugar de Soporte para pantallas OLED basadas en SSD1306. Para obtener más información consulta la página de [Característica de Controlador OLED](feature_oled_driver.md). -## uGFX - -Puedes hacer uso de uGFX dentro de QMK para manejar LCDs de caracteres y gráficos, matrices de LED, OLED, TFT, y otras tecnologías de visualización. Esto necesita ser mejor documentado. Si estás tratando de hacer esto y leer el código no ayuda por favor [abre una issue](https://github.com/qmk/qmk_firmware/issues/new) y podemos ayudarte por el proceso. - ## WS2812 (Solo AVR) Soporte para LEDs WS2811/WS2812{a,b,c}. Para obtener más información consulta la página de [Luz RGB](feature_rgblight.md). diff --git a/docs/es/hardware_keyboard_guidelines.md b/docs/es/hardware_keyboard_guidelines.md index a505cc5ce13..298a3b7ce76 100644 --- a/docs/es/hardware_keyboard_guidelines.md +++ b/docs/es/hardware_keyboard_guidelines.md @@ -142,8 +142,6 @@ El año debe ser el primer año en que se crea el archivo. Si el trabajo se hizo El núcleo de QMC está licenciado bajo la [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). Si estás enviando binarios para los procesadores AVR puedes elegir cualquiera [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) o [GPLv3](https://www.gnu.org/licenses/gpl.html). Si estás enviando binarios para ARM procesadores debes elegir [GPL Versión 3](https://www.gnu.org/licenses/gpl.html) para cumplir con los [ChibiOS](https://www.chibios.org) licencia GPLv3. -Si tu teclado hace uso de la [uGFX](https://gfx.io) características dentro de QMK debes cumplir con la [Licencia de uGFX](https://ugfx.io/license.html), que requiere una licencia comercial separada antes de vender un dispositivo que contiene uGFX. - ## Detalles técnicos Si estás buscando más información sobre cómo hacer que su teclado funcione con QMK, [echa un vistazo a la sección hardware](hardware.md)! diff --git a/docs/faq_debug.md b/docs/faq_debug.md index 1afa38a6243..28b8c817594 100644 --- a/docs/faq_debug.md +++ b/docs/faq_debug.md @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { ``` Example output -```text +``` Waiting for device:....... Listening: KL: kc: 169, col: 0, row: 0, pressed: 1 @@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which ``` Example output -```text +``` > matrix scan frequency: 315 > matrix scan frequency: 313 > matrix scan frequency: 316 diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md index dbeadba7100..01ded4f2319 100644 --- a/docs/faq_keymap.md +++ b/docs/faq_keymap.md @@ -19,7 +19,7 @@ There are 3 standard keyboard layouts in use around the world- ANSI, ISO, and JI Sometimes, for readability's sake, it's useful to define custom names for some keycodes. People often define custom names using `#define`. For example: ```c -#define FN_CAPS LT(_FL, KC_CAPSLOCK) +#define FN_CAPS LT(_FL, KC_CAPS) #define ALT_TAB LALT(KC_TAB) ``` @@ -38,8 +38,8 @@ As a quick fix try holding down `Space`+`Backspace` while you plug in your keybo The key found on most modern keyboards that is located between `KC_RGUI` and `KC_RCTL` is actually called `KC_APP`. This is because when that key was invented there was already a key named `MENU` in the relevant standards, so MS chose to call that the `APP` key. -## `KC_SYSREQ` Isn't Working -Use keycode for Print Screen(`KC_PSCREEN` or `KC_PSCR`) instead of `KC_SYSREQ`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. +## `KC_SYSTEM_REQUEST` Isn't Working +Use keycode for Print Screen (`KC_PRINT_SCREEN`/`KC_PSCR`) instead of `KC_SYSTEM_REQUEST`. Key combination of 'Alt + Print Screen' is recognized as 'System request'. See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and * https://en.wikipedia.org/wiki/Magic_SysRq_key @@ -47,7 +47,7 @@ See [issue #168](https://github.com/tmk/tmk_keyboard/issues/168) and ## Power Keys Aren't Working -Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page. +Somewhat confusingly, there are two "Power" keycodes in QMK: `KC_KB_POWER` in the Keyboard/Keypad HID usage page, and `KC_SYSTEM_POWER` (or `KC_PWR`) in the Consumer page. The former is only recognized on macOS, while the latter, `KC_SLEP` and `KC_WAKE` are supported by all three major operating systems, so it is recommended to use those instead. Under Windows, these keys take effect immediately, however on macOS they must be held down until a dialog appears. @@ -57,7 +57,7 @@ https://github.com/tmk/tmk_keyboard/issues/67 ## Modifier/Layer Stuck Modifier keys or layers can be stuck unless layer switching is configured properly. -For Modifier keys and layer actions you have to place `KC_TRANS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. +For Modifier keys and layer actions you have to place `KC_TRNS` on same position of destination layer to unregister the modifier key or return to previous layer on release event. * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching * https://geekhack.org/index.php?topic=57008.msg1492604#msg1492604 @@ -75,7 +75,7 @@ This feature is for *mechanical lock switch* like [this Alps one](https://deskth After enabling this feature use keycodes `KC_LCAP`, `KC_LNUM` and `KC_LSCR` in your keymap instead. -Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NLCK` and `KC_SLCK`.*** +Old vintage mechanical keyboards occasionally have lock switches but modern ones don't have. ***You don't need this feature in most case and just use keycodes `KC_CAPS`, `KC_NUM` and `KC_SCRL`.*** ## Input Special Characters Other Than ASCII like Cédille 'Ç' diff --git a/docs/faq_misc.md b/docs/faq_misc.md index 9ab2b69a809..9e34a048156 100644 --- a/docs/faq_misc.md +++ b/docs/faq_misc.md @@ -36,7 +36,7 @@ Size after: can retry, loading that one - Some of the options you might specify in your keyboard's Makefile consume extra memory; watch out for BOOTMAGIC_ENABLE, - MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE + MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE - DFU tools do /not/ allow you to write into the bootloader (unless you throw in an extra fruit salad of options), so there is little risk there. @@ -49,10 +49,6 @@ First you have to compile firmware with the build option `NKRO_ENABLE` in **Make Try `Magic` **N** command(`LShift+RShift+N` by default) when **NKRO** still doesn't work. You can use this command to toggle between **NKRO** and **6KRO** mode temporarily. In some situations **NKRO** doesn't work and you will need to switch to **6KRO** mode, in particular when you are in BIOS. -If your firmware was built with `BOOTMAGIC_ENABLE` you need to turn its switch on by `BootMagic` **N** command(`Space+N` by default). This setting is stored in EEPROM and kept over power cycles. - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - ## TrackPoint Needs Reset Circuit (PS/2 Mouse Support) Without reset circuit you will have inconsistent result due to improper initialization of the hardware. See circuit schematic of TPM754: diff --git a/docs/feature_auto_shift.md b/docs/feature_auto_shift.md index ec7eeaaa0ca..99b0ca3c8a3 100644 --- a/docs/feature_auto_shift.md +++ b/docs/feature_auto_shift.md @@ -26,20 +26,26 @@ down will repeat the shifted key, though this can be disabled with once then immediately (within `TAPPING_TERM`) hold it down again (this works with the shifted value as well if auto-repeat is disabled). +There are also the `get_auto_shift_repeat` and `get_auto_shift_no_auto_repeat` +functions for more granular control. Neither will have an effect unless +`AUTO_SHIFT_REPEAT_PER_KEY` or `AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY` respectively +are defined. + ## Are There Limitations to Auto Shift? Yes, unfortunately. -You will have characters that are shifted when you did not intend on shifting, and -other characters you wanted shifted, but were not. This simply comes down to -practice. As we get in a hurry, we think we have hit the key long enough for a -shifted version, but we did not. On the other hand, we may think we are tapping -the keys, but really we have held it for a little longer than anticipated. - -Additionally, with keyrepeat the desired shift state can get mixed up. It will -always 'belong' to the last key pressed. For example, keyrepeating a capital -and then tapping something lowercase (whether or not it's an Auto Shift key) -will result in the capital's *key* still being held, but shift not. +1. You will have characters that are shifted when you did not intend on shifting, and + other characters you wanted shifted, but were not. This simply comes down to + practice. As we get in a hurry, we think we have hit the key long enough for a + shifted version, but we did not. On the other hand, we may think we are tapping + the keys, but really we have held it for a little longer than anticipated. +2. Additionally, with keyrepeat the desired shift state can get mixed up. It will + always 'belong' to the last key pressed. For example, keyrepeating a capital + and then tapping something lowercase (whether or not it's an Auto Shift key) + will result in the capital's *key* still being held, but shift not. +3. Auto Shift does not apply to Tap Hold keys. For automatic shifting of Tap Hold + keys see [Retro Shift](#retro-shift). ## How Do I Enable Auto Shift? @@ -96,6 +102,34 @@ quicker than normal and you will be set. ?> Auto Shift has three special keys that can help you get this value right very quick. See "Auto Shift Setup" for more details! +For more granular control of this feature, you can add the following to your `config.h`: + +```c +#define AUTO_SHIFT_TIMEOUT_PER_KEY +``` + +You can then add the following function to your keymap: + +```c +uint16_t get_autoshift_timeout(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case AUTO_SHIFT_NUMERIC: + return 2 * get_generic_autoshift_timeout(); + case AUTO_SHIFT_SPECIAL: + return get_generic_autoshift_timeout() + 50; + case AUTO_SHIFT_ALPHA: + default: + return get_generic_autoshift_timeout(); + } +} +``` + +Note that you cannot override individual keys that are in one of those groups +if you are using them; trying to add a case for `KC_A` in the above example will +not compile as `AUTO_SHIFT_ALPHA` is there. A possible solution is a second switch +above to handle individual keys with no default case and only referencing the +groups in the below fallback switch. + ### NO_AUTO_SHIFT_SPECIAL (simple define) Do not Auto Shift special keys, which include -\_, =+, [{, ]}, ;:, '", ,<, .>, @@ -109,11 +143,24 @@ Do not Auto Shift numeric keys, zero through nine. Do not Auto Shift alpha characters, which include A through Z. -### Auto Shift Per Key +### Auto Shift Per Key -This is a function that allows you to determine which keys shold be autoshifted, much like the tap-hold keys. +There are functions that allows you to determine which keys shold be autoshifted, much like the tap-hold keys. -The default function looks like this: +The first of these, used to simply add a key to Auto Shift, is `get_custom_auto_shifted_key`: + +```c +bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_DOT: + return true; + default: + return false; + } +} +``` + +For more granular control, there is `get_auto_shifted_key`. The default function looks like this: ```c bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { @@ -127,13 +174,14 @@ bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { # ifndef NO_AUTO_SHIFT_SPECIAL case KC_TAB: case KC_MINUS ... KC_SLASH: - case KC_NONUS_BSLASH: + case KC_NONUS_BACKSLASH: # endif return true; } - return false; + return get_custom_auto_shifted_key(keycode, record); } ``` + This functionality is enabled by default, and does not need a define. ### AUTO_SHIFT_REPEAT (simple define) @@ -144,6 +192,106 @@ Enables keyrepeat. Disables automatically keyrepeating when `AUTO_SHIFT_TIMEOUT` is exceeded. +## Custom Shifted Values + +Especially on small keyboards, the default shifted value for many keys is not +optimal. To provide more customizability, there are two user-definable +functions, `autoshift_press/release_user`. These register or unregister the +correct value for the passed key. Below is an example adding period to Auto +Shift and making its shifted value exclamation point. Make sure to use weak +mods - setting real would make any keys following it use their shifted values +as if you were holding the key. Clearing of modifiers is handled by Auto Shift, +and the OS-sent shift value if keyrepeating multiple keys is always that of +the last key pressed (whether or not it's an Auto Shift key). + +You can also have non-shifted keys for the shifted values (or even no shifted +value), just don't set a shift modifier! + +```c +bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_DOT: + return true; + default: + return false; + } +} + +void autoshift_press_user(uint16_t keycode, bool shifted, keyrecord_t *record) { + switch(keycode) { + case KC_DOT: + register_code16((!shifted) ? KC_DOT : KC_EXLM); + break; + default: + if (shifted) { + add_weak_mods(MOD_BIT(KC_LSFT)); + } + // & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift + register_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode); + } +} + +void autoshift_release_user(uint16_t keycode, bool shifted, keyrecord_t *record) { + switch(keycode) { + case KC_DOT: + unregister_code16((!shifted) ? KC_DOT : KC_EXLM); + break; + default: + // & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift + // The IS_RETRO check isn't really necessary here, always using + // keycode & 0xFF would be fine. + unregister_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode); + } +} +``` + +## Retro Shift + +Holding and releasing a Tap Hold key without pressing another key will ordinarily +result in only the hold. With `retro shift` enabled this action will instead +produce a shifted version of the tap keycode on release. + +It does not require [Retro Tapping](tap_hold.md#retro-tapping) to be enabled, and +if both are enabled the state of `retro tapping` will only apply if the tap keycode +is not matched by Auto Shift. `RETRO_TAPPING_PER_KEY` and its corresponding +function, however, are checked before `retro shift` is applied. + +To enable `retro shift`, add the following to your `config.h`: + +```c +#define RETRO_SHIFT +``` + +If `RETRO_SHIFT` is defined to a value, hold times greater than that value will +not produce a tap on release for Mod Taps, and instead triggers the hold action. +This enables modifiers to be held for combining with mouse clicks without +generating taps on release. For example: + +```c +#define RETRO_SHIFT 500 +``` + +This value (if set) must be greater than one's `TAPPING_TERM`, as the key press +must be designated as a 'hold' by `process_tapping` before we send the modifier. +There is no such limitation in regards to `AUTO_SHIFT_TIMEOUT` for normal keys. + +### Retro Shift and Tap Hold Configurations + +Tap Hold Configurations work a little differently when using Retro Shift. +Referencing `TAPPING_TERM` makes little sense, as holding longer would result in +shifting one of the keys. + +`IGNORE_MOD_TAP_INTERRUPT` changes *only* rolling from a mod tap (releasing it +first), sending both keys instead of the modifier on the second. Its effects on +nested presses are ignored. + +As nested taps were changed to act as though `PERMISSIVE_HOLD` is set unless only +`IGNORE_MOD_TAP_INTERRUPT` is (outside of Retro Shift), and Retro Shift ignores +`IGNORE_MOD_TAP_INTERRUPT`, `PERMISSIVE_HOLD` has no effect on Mod Taps. + +Nested taps will *always* act as though the `TAPPING_TERM` was exceeded for both +Mod and Layer Tap keys. + ## Using Auto Shift Setup This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`. diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md index d47ecc68242..79782cf5649 100644 --- a/docs/feature_backlight.md +++ b/docs/feature_backlight.md @@ -8,7 +8,7 @@ The MCU can only supply so much current to its GPIO pins. Instead of powering th Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following: -```makefile +```make BACKLIGHT_ENABLE = yes ``` @@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also To select which driver to use, configure your `rules.mk` with the following: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation. While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be: -```makefile +```make BACKLIGHT_DRIVER = pwm ``` @@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`: -```makefile +```make BACKLIGHT_DRIVER = software ``` @@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`, If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`: -```makefile +```make BACKLIGHT_DRIVER = custom ``` diff --git a/docs/feature_bluetooth.md b/docs/feature_bluetooth.md index 08e5f24ac55..fdf19c10774 100644 --- a/docs/feature_bluetooth.md +++ b/docs/feature_bluetooth.md @@ -4,10 +4,10 @@ Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input. -|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip| -|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------| -|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 | -|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 | +|Board |Bluetooth Protocol |Connection Type|rules.mk |Bluetooth Chip| +|----------------------------------------------------------------|--------------------|---------------|--------------------------------|--------------| +|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic |UART |`BLUETOOTH_DRIVER = RN42` |RN-42 | +|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy|SPI |`BLUETOOTH_DRIVER = AdafruitBLE`|nRF51822 | Not Supported Yet but possible: * [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514) @@ -17,22 +17,23 @@ Not Supported Yet but possible: ### Adafruit BLE SPI Friend Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit SPI Friend. It's a Nordic nRF5182 based chip running Adafruit's custom firmware. Data is transmitted via Adafruit's SDEP over Hardware SPI. The [Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829) is supported as it's an AVR mcu connected via SPI to the Nordic BLE chip with Adafruit firmware. If Building a custom board with the SPI friend it would be easiest to just use the pin selection that the 32u4 feather uses but you can change the pins in the config.h options with the following defines: -* #define AdafruitBleResetPin D4 -* #define AdafruitBleCSPin B4 -* #define AdafruitBleIRQPin E6 +* `#define ADAFRUIT_BLE_RST_PIN D4` +* `#define ADAFRUIT_BLE_CS_PIN B4` +* `#define ADAFRUIT_BLE_IRQ_PIN E6` A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip. - ## Bluetooth Rules.mk Options The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`. -Use only one of these to enable Bluetooth: -* BLUETOOTH_ENABLE = yes (Legacy Option) -* BLUETOOTH = RN42 -* BLUETOOTH = AdafruitBLE +Add the following to your `rules.mk`: + +```make +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # or RN42 +``` ## Bluetooth Keycodes diff --git a/docs/feature_bootmagic.md b/docs/feature_bootmagic.md index 6c66b00679a..148ea92b9e2 100644 --- a/docs/feature_bootmagic.md +++ b/docs/feature_bootmagic.md @@ -8,8 +8,6 @@ On some keyboards Bootmagic Lite is disabled by default. If this is the case, it BOOTMAGIC_ENABLE = yes ``` -?> You may see `lite` being used in place of `yes`. - Additionally, you may want to specify which key to use. This is especially useful for keyboards that have unusual matrices. To do so, you need to specify the row and column of the key that you want to use. Add these entries to your `config.h` file: ```c diff --git a/docs/feature_combo.md b/docs/feature_combo.md index d98e6f2ac7d..0e7ebd6c3be 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -56,7 +56,7 @@ combo_t key_combos[COMBO_COUNT] = { [AB_ESC] = COMBO(ab_combo, KC_ESC), [JK_TAB] = COMBO(jk_combo, KC_TAB), [QW_SFT] = COMBO(qw_combo, KC_LSFT) - [SD_LAYER] = COMBO(layer_combo, MO(_LAYER)), + [SD_LAYER] = COMBO(sd_combo, MO(_LAYER)), }; ``` @@ -173,7 +173,7 @@ uint16_t get_combo_term(uint16_t index, combo_t *combo) { // i.e. the exact array of keys you defined for the combo. // This can be useful if your combos have a common key and you want to apply the // same combo term for all of them. - if (combo->keys[0] == KC_ENTER) { // if first key in the array is KC_ENTER + if (combo->keys[0] == KC_ENT) { // if first key in the array is Enter return 150; } diff --git a/docs/feature_digitizer.md b/docs/feature_digitizer.md index 9b6aeddbaa9..ac2d64f9777 100644 --- a/docs/feature_digitizer.md +++ b/docs/feature_digitizer.md @@ -4,7 +4,7 @@ The digitizer HID interface allows setting the mouse cursor position at absolute To enable the digitizer interface, add the following line to your rules.mk: -```makefile +```make DIGITIZER_ENABLE = yes ``` diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md index f57c6042ca5..f135b1dede5 100644 --- a/docs/feature_grave_esc.md +++ b/docs/feature_grave_esc.md @@ -4,7 +4,7 @@ If you're using a 60% keyboard, or any other layout with no F-row, you will have ## Usage -Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. +Replace the `KC_GRV` key in your keymap (usually to the left of the `1` key) with `KC_GESC`. Most of the time this key will output `KC_ESC` when pressed. However, when Shift or GUI are held down it will output `KC_GRV` instead. ## What Your OS Sees diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md index 1f36f5b054f..c8c74cb8f0e 100644 --- a/docs/feature_haptic_feedback.md +++ b/docs/feature_haptic_feedback.md @@ -4,9 +4,22 @@ The following options are currently available for haptic feedback in `rules.mk`: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes + +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` + +The following `config.h` settings are available for all types of haptic feedback: -`HAPTIC_ENABLE += SOLENOID` +| Settings | Default | Description | +|--------------------------------------|---------------|---------------------------------------------------------------------------------------------------------------| +|`HAPTIC_ENABLE_PIN` | *Not defined* |Configures a pin to enable a boost converter for some haptic solution, often used with solenoid drivers. | +|`HAPTIC_ENABLE_PIN_ACTIVE_LOW` | *Not defined* |If defined then the haptic enable pin is active-low. | +|`HAPTIC_ENABLE_STATUS_LED` | *Not defined* |Configures a pin to reflect the current enabled/disabled status of haptic feedback. | +|`HAPTIC_ENABLE_STATUS_LED_ACTIVE_LOW` | *Not defined* |If defined then the haptic status led will be active-low. | +|`HAPTIC_OFF_IN_LOW_POWER` | `0` |If set to `1`, haptic feedback is disabled before the device is configured, and while the device is suspended. | ## Known Supported Hardware @@ -45,6 +58,7 @@ First you will need a build a circuit to drive the solenoid through a mosfet as | Settings | Default | Description | |----------------------------|----------------------|-------------------------------------------------------| |`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. | +|`SOLENOID_PIN_ACTIVE_LOW` | *Not defined* |If defined then the solenoid trigger pin is active low.| |`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. | |`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. | |`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. | @@ -170,8 +184,9 @@ The Haptic Exclusion is implemented as `__attribute__((weak)) bool get_haptic_en ### NO_HAPTIC_MOD With the entry of `#define NO_HAPTIC_MOD` in config.h, the following keys will not trigger feedback: -* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTRL`) +* Usual modifier keys such as Control/Shift/Alt/Gui (For example `KC_LCTL`) * `MO()` momentary keys. See also [Layers](feature_layers.md). +* `LM()` momentary keys with mod active. * `LT()` layer tap keys, when held to activate a layer. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. * `TT()` layer tap toggle keys, when held to activate a layer. However when tapped `TAPPING_TOGGLE` times to permanently toggle the layer, on the last tap haptic feedback is still triggered. * `MT()` mod tap keys, when held to keep a usual modifier key pressed. However when tapped, and the key is quickly released, and sends a keycode, haptic feedback is still triggered. See also [Mod-Tap](mod_tap.md). diff --git a/docs/feature_joystick.md b/docs/feature_joystick.md index 95702d6a239..fe33517a161 100644 --- a/docs/feature_joystick.md +++ b/docs/feature_joystick.md @@ -15,7 +15,7 @@ or send gamepad reports based on values computed by the keyboard. To use analog input you must first enable it in `rules.mk`: -```makefile +```make JOYSTICK_ENABLE = yes JOYSTICK_DRIVER = analog # or 'digital' ``` diff --git a/docs/feature_key_overrides.md b/docs/feature_key_overrides.md index 98036241e33..2417fcf5942 100644 --- a/docs/feature_key_overrides.md +++ b/docs/feature_key_overrides.md @@ -39,7 +39,7 @@ For more customization possibilities, you may directly create a `key_override_t` This shows how the mentioned example of sending `delete` when `shift` + `backspace` are pressed is realized: ```c -const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPACE, KC_DELETE); +const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL); // This globally defines all key overrides to be used const key_override_t **key_overrides = (const key_override_t *[]){ @@ -107,10 +107,10 @@ The [Grave Escape feature](feature_grave_esc.md) is limited in its configurabili ```c // Shift + esc = ~ -const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRAVE)); +const key_override_t tilde_esc_override = ko_make_basic(MOD_MASK_SHIFT, KC_ESC, S(KC_GRV)); // GUI + esc = ` -const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRAVE); +const key_override_t grave_esc_override = ko_make_basic(MOD_MASK_GUI, KC_ESC, KC_GRV); const key_override_t **key_overrides = (const key_override_t *[]){ &tilde_esc_override, diff --git a/docs/feature_layers.md b/docs/feature_layers.md index 78d950dc496..e30c540a79e 100644 --- a/docs/feature_layers.md +++ b/docs/feature_layers.md @@ -45,7 +45,7 @@ Once you have a good feel for how layers work and what you can do, you can get m Layers stack on top of each other in numerical order. When determining what a keypress does, QMK scans the layers from the top down, stopping when it reaches the first active layer that is not set to `KC_TRNS`. As a result if you activate a layer that is numerically lower than your current layer, and your current layer (or another layer that is active and higher than your target layer) has something other than `KC_TRNS`, that is the key that will be sent, not the key on the layer you just activated. This is the cause of most people's "why doesn't my layer get switched" problem. -Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h). +Sometimes, you might want to switch between layers in a macro or as part of a tap dance routine. `layer_on` activates a layer, and `layer_off` deactivates it. More layer-related functions can be found in [action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h). ## Functions :id=functions diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md index b34fd442d5c..93d040b5542 100644 --- a/docs/feature_layouts.md +++ b/docs/feature_layouts.md @@ -25,7 +25,7 @@ The `layouts/default/` and `layouts/community/` are two examples of layout "repo Each layout folder is named (`[a-z0-9_]`) after the physical aspects of the layout, in the most generic way possible, and contains a `readme.md` with the layout to be defined by the keyboard: -```md +```markdown # 60_ansi LAYOUT_60_ansi diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md index ed92bffd996..dfd63503f2d 100644 --- a/docs/feature_led_matrix.md +++ b/docs/feature_led_matrix.md @@ -49,10 +49,12 @@ Here is an example using 2 drivers. !> Note the parentheses, this is so when `LED_DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL)` will give very different results than `rand() % LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL`. +For split keyboards using `LED_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. + Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | LED address @@ -164,26 +166,26 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con |Define |Description | |-------------------------------------------------------|-----------------------------------------------| -|`#define DISABLE_LED_MATRIX_ALPHAS_MODS` |Disables `LED_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_LED_MATRIX_BREATHING` |Disables `LED_MATRIX_BREATHING` | -|`#define DISABLE_LED_MATRIX_BAND` |Disables `LED_MATRIX_BAND` | -|`#define DISABLE_LED_MATRIX_BAND_PINWHEEL` |Disables `LED_MATRIX_BAND_PINWHEEL` | -|`#define DISABLE_LED_MATRIX_BAND_SPIRAL` |Disables `LED_MATRIX_BAND_SPIRAL` | -|`#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Disables `LED_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN` |Disables `LED_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_LED_MATRIX_CYCLE_OUT_IN` |Disables `LED_MATRIX_CYCLE_OUT_IN` | -|`#define DISABLE_LED_MATRIX_DUAL_BEACON` |Disables `LED_MATRIX_DUAL_BEACON` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_WIDE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_CROSS` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | -|`#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| -|`#define DISABLE_LED_MATRIX_SOLID_SPLASH` |Disables `LED_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH` |Disables `LED_MATRIX_SOLID_MULTISPLASH` | -|`#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Disables `LED_MATRIX_WAVE_LEFT_RIGHT` | -|`#define DISABLE_LED_MATRIX_WAVE_UP_DOWN` |Disables `LED_MATRIX_WAVE_UP_DOWN` | +|`#define ENABLE_LED_MATRIX_ALPHAS_MODS` |Enables `LED_MATRIX_ALPHAS_MODS` | +|`#define ENABLE_LED_MATRIX_BREATHING` |Enables `LED_MATRIX_BREATHING` | +|`#define ENABLE_LED_MATRIX_BAND` |Enables `LED_MATRIX_BAND` | +|`#define ENABLE_LED_MATRIX_BAND_PINWHEEL` |Enables `LED_MATRIX_BAND_PINWHEEL` | +|`#define ENABLE_LED_MATRIX_BAND_SPIRAL` |Enables `LED_MATRIX_BAND_SPIRAL` | +|`#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT` |Enables `LED_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN` |Enables `LED_MATRIX_CYCLE_UP_DOWN` | +|`#define ENABLE_LED_MATRIX_CYCLE_OUT_IN` |Enables `LED_MATRIX_CYCLE_OUT_IN` | +|`#define ENABLE_LED_MATRIX_DUAL_BEACON` |Enables `LED_MATRIX_DUAL_BEACON` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `LED_MATRIX_SOLID_REACTIVE_SIMPLE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_WIDE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTIWIDE` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_CROSS` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTICROSS`| +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_NEXUS` | +|`#define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `LED_MATRIX_SOLID_REACTIVE_MULTINEXUS`| +|`#define ENABLE_LED_MATRIX_SOLID_SPLASH` |Enables `LED_MATRIX_SOLID_SPLASH` | +|`#define ENABLE_LED_MATRIX_SOLID_MULTISPLASH` |Enables `LED_MATRIX_SOLID_MULTISPLASH` | +|`#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT` |Enables `LED_MATRIX_WAVE_LEFT_RIGHT` | +|`#define ENABLE_LED_MATRIX_WAVE_UP_DOWN` |Enables `LED_MATRIX_WAVE_UP_DOWN` | ## Custom LED Matrix Effects :id=custom-led-matrix-effects @@ -219,7 +221,7 @@ static bool my_cool_effect(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { led_matrix_set_value(i, 0xFF); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } // e.g: A more complex effect, relying on external methods and state, with @@ -233,8 +235,7 @@ static bool my_cool_effect2_complex_run(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { led_matrix_set_value(i, some_global_state++); } - - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } static bool my_cool_effect2(effect_params_t* params) { if (params->init) my_cool_effect2_complex_init(params); diff --git a/docs/feature_macros.md b/docs/feature_macros.md index 3660f377559..81ade585926 100644 --- a/docs/feature_macros.md +++ b/docs/feature_macros.md @@ -4,7 +4,107 @@ Macros allow you to send multiple keystrokes when pressing just one key. QMK has !> **Security Note**: While it is possible to use macros to send passwords, credit card numbers, and other sensitive information it is a supremely bad idea to do so. Anyone who gets a hold of your keyboard will be able to access that information by opening a text editor. -## `SEND_STRING()` & `process_record_user` +## Using Macros In JSON Keymaps + +You can define up to 32 macros in a `keymap.json` file, as used by [Configurator](newbs_building_firmware_configurator.md), and `qmk compile`. You can define these macros in a list under the `macros` keyword, like this: + +```json +{ + "keyboard": "handwired/my_macropad", + "keymap": "my_keymap", + "macros": [ + [ + {"action":"down", "keycodes": ["LSFT"]}, + "hello world1", + {"action": "up","keycodes": ["LSFT"]} + ], + [ + {"action":"tap", "keycodes": ["LCTL", "LALT", "DEL"]} + ], + [ + "ding!", + {"action":"beep"} + ], + [ + {"action":"tap", "keycodes": ["F1"]}, + {"action":"delay", "duration": "1000"}, + {"action":"tap", "keycodes": ["PGDN"]} + ] + ], + "layout": "LAYOUT_all", + "layers": [ + ["MACRO_0", "MACRO_1", "MACRO_2", "MACRO_3"] + ] +} +``` + +### Selecting Your Host Keyboard Layout + +If you type in a language other than English, or use a non-QWERTY layout like Colemak, Dvorak, or Workman, you may have set your computer's input language to match this layout. This presents a challenge when creating macros- you may need to type different keys to get the same letters! To address this you can add the `host_language` key to your keymap.json, like so: + +```json +{ + "keyboard": "handwired/my_macropad", + "keymap": "my_keymap", + "host_layout": "dvorak", + "macros": [ + ["Hello, World!"] + ], + "layout": "LAYOUT_all", + "layers": [ + ["MACRO_0"] + ] +} +``` + +The current list of available languages is: + +| belgian | bepo | br_abnt2 | canadian_multilingual | +|:-------:|:----:|:--------:|:---------------------:| +| **colemak** | **croatian** | **czech** | **danish** | +| **dvorak_fr** | **dvorak** | **dvp** | **estonian** | +| **finnish** | **fr_ch** | **french_afnor** | **french** | +| **french_osx** | **german_ch** | **german** | **german_osx** | +| **hungarian** | **icelandic** | **italian** | **italian_osx_ansi** | +| **italian_osx_iso** | **jis** | **latvian** | **lithuanian_azerty** | +| **lithuanian_qwerty** | **norman** | **norwegian** | **portuguese** | +| **portuguese_osx_iso** | **romanian** | **serbian_latin** | **slovak** | +| **slovenian** | **spanish_dvorak** | **spanish** | **swedish** | +| **turkish_f** | **turkish_q** | **uk** | **us_international** | +| **workman** | **workman_zxcvm** | + +### Macro Basics + +Each macro is an array consisting of strings and objects (dictionaries.) Strings are typed to your computer while objects allow you to control how your macro is typed out. + +#### Object Format + +All objects have one required key: `action`. This tells QMK what the object does. There are currently 5 actions: beep, delay, down, tap, up + +Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_` prefix when listing keycodes. + +* `beep` + * Play a bell if the keyboard has [audio enabled](feature_audio.md). + * Example: `{"action": "beep"}` +* `delay` + * Pause macro playback. Duration is specified in milliseconds (ms). + * Example: `{"action": "delay", "duration": 500}` +* `down` + * Send a key down event for one or more keycodes. + * Example, single key: `{"action":"down", "keycodes": ["LSFT"]}` + * Example, multiple keys: `{"action":"down", "keycodes": ["CTRL", "LSFT"]}` +* `tap` + * Type a chord, which sends a down event for each key followed by an up event for each key. + * Example, single key: `{"action":"tap", "keycodes": ["F13"]}` + * Example, multiple keys: `{"action":"tap", "keycodes": ["CTRL", "LALT", "DEL"]}` +* `up` + * Send a key up event for one or more keycodes. + * Example, single key: `{"action":"up", "keycodes": ["LSFT"]}` + * Example, multiple keys: `{"action":"up", "keycodes": ["CTRL", "LSFT"]}` + +## Using Macros in C Keymaps + +### `SEND_STRING()` & `process_record_user` Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`). @@ -91,7 +191,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; ``` -### Advanced Macros +#### Advanced Macros In addition to the `process_record_user()` function, is the `post_process_record_user()` function. This runs after `process_record` and can be used to do things after a keystroke has been sent. This is useful if you want to have a key pressed before and released after a normal key, for instance. @@ -118,7 +218,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { void post_process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case KC_A ... KC_F21: //notice how it skips over F22 - case KC_F23 ... KC_EXSEL: //exsel is the last one before the modifier keys + case KC_F23 ... KC_EXSL: //exsel is the last one before the modifier keys if (!record->event.pressed) { f22_tracker--; if (!f22_tracker) { @@ -131,7 +231,7 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) { ``` -### TAP, DOWN and UP +#### TAP, DOWN and UP You may want to use keys in your macros that you can't write down, such as `Ctrl` or `Home`. You can send arbitrary keycodes by wrapping them in: @@ -178,7 +278,7 @@ They can be used like this: Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes. -### Alternative Keymaps +#### Alternative Keymaps By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap: @@ -186,7 +286,7 @@ By default, it assumes a US keymap with a QWERTY layout; if you want to change t #include "sendstring_colemak.h" ``` -### Strings in Memory +#### Strings in Memory If for some reason you're manipulating strings and need to print out something you just generated (instead of being a literal, constant string), you can use `send_string()`, like this: @@ -205,13 +305,13 @@ SEND_STRING(".."SS_TAP(X_END)); ``` -## Advanced Macro Functions +### Advanced Macro Functions There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple. ?> You can also use the functions described in [Useful function](ref_functions.md) and [Checking modifier state](feature_advanced_keycodes#checking-modifier-state) for additional functionality. For example, `reset_keyboard()` allows you to reset the keyboard as part of a macro and `get_mods() & MOD_MASK_SHIFT` lets you check for the existence of active shift modifiers. -### `record->event.pressed` +#### `record->event.pressed` This is a boolean value that can be tested to see if the switch is being pressed or released. An example of this is @@ -223,15 +323,15 @@ This is a boolean value that can be tested to see if the switch is being pressed } ``` -### `register_code();` +#### `register_code();` This sends the `` keydown event to the computer. Some examples would be `KC_ESC`, `KC_C`, `KC_4`, and even modifiers such as `KC_LSFT` and `KC_LGUI`. -### `unregister_code();` +#### `unregister_code();` Parallel to `register_code` function, this sends the `` keyup event to the computer. If you don't use this, the key will be held down until it's sent. -### `tap_code();` +#### `tap_code();` Sends `register_code()` and then `unregister_code()`. This is useful if you want to send both the press and release events ("tap" the key, rather than hold it). @@ -239,31 +339,31 @@ If `TAP_CODE_DELAY` is defined (default 0), this function waits that many millis If the keycode is `KC_CAPS`, it waits `TAP_HOLD_CAPS_DELAY` milliseconds instead (default 80), as macOS prevents accidental Caps Lock activation by waiting for the key to be held for a certain amount of time. -### `tap_code_delay(, );` +#### `tap_code_delay(, );` Like `tap_code()`, but with a `delay` parameter for specifying arbitrary intervals before sending the unregister event. -### `register_code16();`, `unregister_code16();` and `tap_code16();` +#### `register_code16();`, `unregister_code16();` and `tap_code16();` These functions work similar to their regular counterparts, but allow you to use modded keycodes (with Shift, Alt, Control, and/or GUI applied to them). Eg, you could use `register_code16(S(KC_5));` instead of registering the mod, then registering the keycode. -### `clear_keyboard();` +#### `clear_keyboard();` This will clear all mods and keys currently pressed. -### `clear_mods();` +#### `clear_mods();` This will clear all mods currently pressed. -### `clear_keyboard_but_mods();` +#### `clear_keyboard_but_mods();` This will clear all keys besides the mods currently pressed. -## Advanced Example: +### Advanced Example: -### Super ALT↯TAB +#### Super ALT↯TAB This macro will register `KC_LALT` and tap `KC_TAB`, then wait for 1000ms. If the key is tapped again, it will send another `KC_TAB`; if there is no tap, `KC_LALT` will be unregistered, thus allowing you to cycle through windows. diff --git a/docs/feature_midi.md b/docs/feature_midi.md index ab29d89db6d..3da5c4940a3 100644 --- a/docs/feature_midi.md +++ b/docs/feature_midi.md @@ -4,7 +4,7 @@ First, enable MIDI by adding the following to your `rules.mk`: -```makefile +```make MIDI_ENABLE = yes ``` diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md index 6d82aa0f59a..0c926f67426 100644 --- a/docs/feature_oled_driver.md +++ b/docs/feature_oled_driver.md @@ -38,7 +38,7 @@ Then in your `keymap.c` file, implement the OLED task call. This example assumes ```c #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -62,6 +62,8 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif ``` @@ -133,13 +135,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); // Renders a static logo oled_scroll_left(); // Turns on scrolling } + return false; } #endif ``` @@ -242,6 +245,7 @@ bool oled_init(oled_rotation_t rotation); // Called at the start of oled_init, weak function overridable by the user // rotation - the value passed into oled_init // Return new oled_rotation_t if you want to override default rotation +oled_rotation_t oled_init_kb(oled_rotation_t rotation); oled_rotation_t oled_init_user(oled_rotation_t rotation); // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering @@ -333,7 +337,8 @@ uint8_t oled_get_brightness(void); void oled_task(void); // Called at the start of oled_task, weak function overridable by the user -void oled_task_user(void); +bool oled_task_kb(void); +bool oled_task_user(void); // Set the specific 8 lines rows of the screen to scroll. // 0 is the default for start, and 7 for end, which is the entire diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 905c2a8f95a..031ee52c1c9 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -1,19 +1,205 @@ # Pointing Device :id=pointing-device -Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and lightweight. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you. +Pointing Device is a generic name for a feature intended to be generic: moving the system pointer around. There are certainly other options for it - like mousekeys - but this aims to be easily modifiable and hardware driven. You can implement custom keys to control functionality, or you can gather information from other peripherals and insert it directly here - let QMK handle the processing for you. To enable Pointing Device, uncomment the following line in your rules.mk: -```makefile +```make POINTING_DEVICE_ENABLE = yes ``` -To manipulate the mouse report, you can use the following functions: +## Sensor Drivers -* `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer -* `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer +There are a number of sensors that are supported by default. Note that only one sensor can be enabled by `POINTING_DEVICE_DRIVER` at a time. If you need to enable more than one sensor, then you need to implement it manually. + +### ADNS 5050 Sensor + +To use the ADNS 5050 sensor, add this to your `rules.mk` + +```make +POINTING_DEVICE_DRIVER = adns5050 +``` + +The ADNS 5050 sensor uses a serial type protocol for communication, and requires an additional light source. + +| Setting | Description | +|--------------------|---------------------------------------------------------------------| +|`ADNS5050_SCLK_PIN` | (Required) The pin connected to the clock pin of the sensor. | +|`ADNS5050_SDIO_PIN` | (Required) The pin connected to the data pin of the sensor. | +|`ADNS5050_CS_PIN` | (Required) The pin connected to the cable select pin of the sensor. | + +The CPI range is 125-1375, in increments of 125. Defaults to 500 CPI. + +### ADSN 9800 Sensor + +To use the ADNS 9800 sensor, add this to your `rules.mk` + +```make +POINTING_DEVICE_DRIVER = adns9800 +``` + +The ADNS 9800 is an SPI driven optical sensor, that uses laser output for surface tracking. + +| Setting | Description | Default | +|------------------------|------------------------------------------------------------------------|---------------| +|`ADNS9800_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` | +|`ADNS9800_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | +|`ADNS9800_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` | +|`ADNS9800_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | +|`ADNS9800_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | + + +The CPI range is 800-8200, in increments of 200. Defaults to 1800 CPI. + +### Analog Joystick + +To use an analog joystick to control the pointer, add this to your `rules.mk` + +```make +POINTING_DEVICE_DRIVER = analog_joystick +``` + +The Analog Joystick is an analog (ADC) driven sensor. There are a variety of joysticks that you can use for this. + +| Setting | Description | Default | +|----------------------------------|----------------------------------------------------------------------------|---------------| +|`ANALOG_JOYSTICK_X_AXIS_PIN` | (Required) The pin used for the vertical/X axis. | _not defined_ | +|`ANALOG_JOYSTICK_Y_AXIS_PIN` | (Required) The pin used for the horizontal/Y axis. | _not defined_ | +|`ANALOG_JOYSTICK_AXIS_MIN` | (Optional) Sets the lower range to be considered movement. | `0` | +|`ANALOG_JOYSTICK_AXIS_MAX` | (Optional) Sets the upper range to be considered movement. | `1023` | +|`ANALOG_JOYSTICK_SPEED_REGULATOR` | (Optional) The divisor used to slow down movement. (lower makes it faster) | `20` | +|`ANALOG_JOYSTICK_READ_INTERVAL` | (Optional) The interval in milliseconds between reads. | `10` | +|`ANALOG_JOYSTICK_SPEED_MAX` | (Optional) The maxiumum value used for motion. | `2` | +|`ANALOG_JOYSTICK_CLICK_PIN` | (Optional) The pin wired up to the press switch of the analog stick. | _not defined_ | + + +### Cirque Trackpad + +To use the Cirque Trackpad sensor, add this to your `rules.mk`: + +```make +POINTING_DEVICE_DRIVER = cirque_pinnacle_i2c +``` + +or + +```make +POINTING_DEVICE_DRIVER = cirque_pinnacle_spi +``` + + +This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the TM040040, TM035035 and the TM023023 trackpads. These are I2C or SPI compatible, and both configurations are supported. + +| Setting | Description | Default | +|---------------------------------|---------------------------------------------------------------------------------|-----------------------| +|`CIRQUE_PINNACLE_X_LOWER` | (Optional) The minimum reachable X value on the sensor. | `127` | +|`CIRQUE_PINNACLE_X_UPPER` | (Optional) The maximum reachable X value on the sensor. | `1919` | +|`CIRQUE_PINNACLE_Y_LOWER` | (Optional) The minimum reachable Y value on the sensor. | `63` | +|`CIRQUE_PINNACLE_Y_UPPER` | (Optional) The maximum reachable Y value on the sensor. | `1471` | +|`CIRQUE_PINNACLE_TAPPING_TERM` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` | +|`CIRQUE_PINNACLE_TOUCH_DEBOUNCE` | (Optional) Length of time that a touch can be to be considered a tap. | `TAPPING_TERM`/`200` | -Keep in mind that a report_mouse_t (here "mouseReport") has the following properties: +| I2C Setting | Description | Default | +|--------------------------|---------------------------------------------------------------------------------|---------| +|`CIRQUE_PINNACLE_ADDR` | (Required) Sets the I2C Address for the Cirque Trackpad | `0x2A` | +|`CIRQUE_PINNACLE_TIMEOUT` | (Optional) The timeout for i2c communication with the trackpad in milliseconds. | `20` | + +| SPI Setting | Description | Default | +|-------------------------------|------------------------------------------------------------------------|---------------| +|`CIRQUE_PINNACLE_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `1000000` | +|`CIRQUE_PINNACLE_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | +|`CIRQUE_PINNACLE_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `1` | +|`CIRQUE_PINNACLE_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | +|`CIRQUE_PINNACLE_SPI_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | + +Default Scaling/CPI is 1024. + +### Pimoroni Trackball + +To use the Pimoroni Trackball module, add this to your `rules.mk`: + +```make +POINTING_DEVICE_DRIVER = pimoroni_trackball +``` + +The Pimoroni Trackball module is a I2C based breakout board with an RGB enable trackball. + +| Setting | Description | Default | +|-------------------------------------|------------------------------------------------------------------------------------|---------| +|`PIMORONI_TRACKBALL_ADDRESS` | (Required) Sets the I2C Address for the Pimoroni Trackball. | `0x0A` | +|`PIMORONI_TRACKBALL_TIMEOUT` | (Optional) The timeout for i2c communication with the trackpad in milliseconds. | `100` | +|`PIMORONI_TRACKBALL_INTERVAL_MS` | (Optional) The update/read interval for the sensor in milliseconds. | `8` | +|`PIMORONI_TRACKBALL_SCALE` | (Optional) The multiplier used to generate reports from the sensor. | `5` | +|`PIMORONI_TRACKBALL_DEBOUNCE_CYCLES` | (Optional) The number of scan cycles used for debouncing on the ball press. | `20` | +|`PIMORONI_TRACKBALL_ERROR_COUNT` | (Optional) Specifies the number of read/write errors until the sensor is disabled. | `10` | + +### PMW 3360 Sensor + +To use the PMW 3360 sensor, add this to your `rules.mk` + +```make +POINTING_DEVICE_DRIVER = pmw3360 +``` + +The PMW 3360 is an SPI driven optical sensor, that uses a built in IR LED for surface tracking. + +| Setting | Description | Default | +|-----------------------------|--------------------------------------------------------------------------------------------|---------------| +|`PMW3360_CS_PIN` | (Required) Sets the Cable Select pin connected to the sensor. | _not defined_ | +|`PMW3360_CLOCK_SPEED` | (Optional) Sets the clock speed that the sensor runs at. | `2000000` | +|`PMW3360_SPI_LSBFIRST` | (Optional) Sets the Least/Most Significant Byte First setting for SPI. | `false` | +|`PMW3360_SPI_MODE` | (Optional) Sets the SPI Mode for the sensor. | `3` | +|`PMW3360_SPI_DIVISOR` | (Optional) Sets the SPI Divisor used for SPI communication. | _varies_ | +|`ROTATIONAL_TRANSFORM_ANGLE` | (Optional) Allows for the sensor data to be rotated +/- 30 degrees directly in the sensor. | `0` | + +The CPI range is 100-12000, in increments of 100. Defaults to 1600 CPI. + + +### Custom Driver + +If you have a sensor type that isn't supported here, you can manually implement it, by adding these functions (with the correct implementation for your device): + +```c +void pointing_device_driver_init(void) {} +report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; } +uint16_t pointing_device_driver_get_cpi(void) { return 0; } +void pointing_device_driver_set_cpi(uint16_t cpi) {} +``` + +!> Ideally, new sensor hardware should be added to `drivers/sensors/` and `quantum/pointing_device_drivers.c`, but there may be cases where it's very specific to the hardware. So these functions are provided, just in case. + +## Common Configuration + +| Setting | Description | Default | +|-------------------------------|-----------------------------------------------------------------------|---------------| +|`POINTING_DEVICE_ROTATION_90` | (Optional) Rotates the X and Y data by 90 degrees. | _not defined_ | +|`POINTING_DEVICE_ROTATION_180` | (Optional) Rotates the X and Y data by 180 degrees. | _not defined_ | +|`POINTING_DEVICE_ROTATION_270` | (Optional) Rotates the X and Y data by 270 degrees. | _not defined_ | +|`POINTING_DEVICE_INVERT_X` | (Optional) Inverts the X axis report. | _not defined_ | +|`POINTING_DEVICE_INVERT_Y` | (Optional) Inverts the Y axis report. | _not defined_ | +|`POINTING_DEVICE_MOTION_PIN` | (Optional) If supported, will only read from sensor if pin is active. | _not defined_ | + + +## Callbacks and Functions + +| Function | Description | +|-----------------------------------|----------------------------------------------------------------------------------------------------------------------------------------| +| `pointing_device_init_kb(void)` | Callback to allow for keyboard level initialization. Useful for additional hardware sensors. | +| `pointing_device_init_user(void)` | Callback to allow for user level initialization. Useful for additional hardware sensors. | +| `pointing_device_task_kb(mouse_report)` | Callback that sends sensor data, so keyboard code can intercept and modify the data. Returns a mouse report. | +| `pointing_device_task_user(mouse_report)` | Callback that sends sensor data, so user coe can intercept and modify the data. Returns a mouse report. | +| `pointing_device_handle_buttons(buttons, pressed, button)` | Callback to handle hardware button presses. Returns a `uint8_t`. | +| `pointing_device_get_cpi(void)` | Gets the current CPI/DPI setting from the sensor, if supported. | +| `pointing_device_set_cpi(uint16_t)` | Sets the CPI/DPI, if supported. | +| `pointing_device_get_report(void)` | Returns the current mouse report (as a `mouse_report_t` data structure). | +| `pointing_device_set_report(mouse_report)` | Sets the mouse report to the assigned `mouse_report_t` data structured passed to the function. | +| `pointing_device_send(void)` | Sends the current mouse report to the host system. Function can be replaced. | +| `has_mouse_report_changed(old, new)` | Compares the old and new `mouse_report_t` data and returns true only if it has changed. | + + +# Manipulating Mouse Reports + +The report_mouse_t (here "mouseReport") has the following properties: * `mouseReport.x` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ to the right, - to the left) on the x axis. * `mouseReport.y` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing movement (+ upward, - downward) on the y axis. @@ -21,8 +207,10 @@ Keep in mind that a report_mouse_t (here "mouseReport") has the following proper * `mouseReport.h` - this is a signed int from -127 to 127 (not 128, this is defined in USB HID spec) representing horizontal scrolling (+ right, - left). * `mouseReport.buttons` - this is a uint8_t in which all 8 bits are used. These bits represent the mouse button state - bit 0 is mouse button 1, and bit 7 is mouse button 8. -Once you have made the necessary changes to the mouse report, you need to send it: +To manually manipulate the mouse reports outside of the `pointing_device_task_*` functions, you can use: +* `pointing_device_get_report()` - Returns the current report_mouse_t that represents the information sent to the host computer +* `pointing_device_set_report(report_mouse_t newMouseReport)` - Overrides and saves the report_mouse_t to be sent to the host computer * `pointing_device_send()` - Sends the mouse report to the host and zeroes out the report. When the mouse report is sent, the x, y, v, and h values are set to 0 (this is done in `pointing_device_send()`, which can be overridden to avoid this behavior). This way, button states persist, but movement will only occur once. For further customization, both `pointing_device_init` and `pointing_device_task` can be overridden. @@ -31,6 +219,8 @@ Additionally, by default, `pointing_device_send()` will only send a report when Also, you use the `has_mouse_report_changed(new, old)` function to check to see if the report has changed. +## Example + In the following example, a custom key is used to click the mouse and scroll 127 units vertically and horizontally, then undo all of that when released - because that's a totally useful function. Listen, this is an example: ```c diff --git a/docs/feature_programmable_button.md b/docs/feature_programmable_button.md new file mode 100644 index 00000000000..b1ef555d16a --- /dev/null +++ b/docs/feature_programmable_button.md @@ -0,0 +1,74 @@ +## Programmable Button + +Programmable button is a feature that can be used to send keys that have no +predefined meaning. +This means they can be processed on the host side by custom software without +colliding without the operating system trying to interpret these keys. + +The keycodes are emitted according to the HID usage +"Telephony Device Page" (0x0B), "Programmable button usage" (0x07). +On Linux (> 5.14) they are handled automatically and translated to `KEY_MACRO#` +keycodes. +(Up to `KEY_MACRO30`) + +### Enabling Programmable Button support + +To enable Programmable Button, add the following line to your keymap’s `rules.mk`: + +```c +PROGRAMMABLE_BUTTON_ENABLE = yes +``` + +### Mapping + +In your keymap you can use the following keycodes to map key presses to Programmable Buttons: + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + +### API + +You can also use a dedicated API defined in `programmable_button.h` to interact with this feature: + +``` +void programmable_button_clear(void); +void programmable_button_send(void); +void programmable_button_on(uint8_t code); +void programmable_button_off(uint8_t code); +bool programmable_button_is_on(uint8_t code); +uint32_t programmable_button_get_report(void); +void programmable_button_set_report(uint32_t report); +``` diff --git a/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index 776a33150ec..c980705ae7f 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -30,7 +30,7 @@ Note: This is not recommended, you may encounter jerky movement or unsent inputs In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_BUSYWAIT = yes ``` @@ -39,14 +39,8 @@ In your keyboard config.h: ```c #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -56,7 +50,7 @@ The following example uses D2 for clock and D5 for data. You can use any INT or In rules.mk: -```makefile +```make PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes ``` @@ -65,14 +59,8 @@ In your keyboard config.h: ```c #ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 +#define PS2_CLOCK_PIN D2 +#define PS2_DATA_PIN D5 #define PS2_INT_INIT() do { \ EICRA |= ((1<` de |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_3731_DEGHOST` | (Optional) Set this define to enable de-ghosting by halving Vcc during blanking time | | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | @@ -49,10 +50,12 @@ Here is an example using 2 drivers. !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. +For split keyboards using `RGB_MATRIX_SPLIT` with an LED driver, you can either have the same driver address or different driver addresses. If using different addresses, use `DRIVER_ADDR_1` for one and `DRIVER_ADDR_2` for the other one. Then, in `g_is31_leds`, fill out the correct driver index (0 or 1). If using one address, use `DRIVER_ADDR_1` for both, and use index 0 for `g_is31_leds`. + Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -71,7 +74,7 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet] There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3733 ``` @@ -82,6 +85,9 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_` de |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_PWM_FREQUENCY` | (Optional) PWM Frequency Setting - IS31FL3733B only | 0 | +| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | +| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | @@ -93,6 +99,18 @@ You can use between 1 and 4 IS31FL3733 IC's. Do not specify `DRIVER_ADDR_` de | `DRIVER_SYNC_3` | (Optional) Sync configuration for the third RGB driver | 0 | | `DRIVER_SYNC_4` | (Optional) Sync configuration for the fourth RGB driver | 0 | +The IS31FL3733 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows: + +| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | +|----------------------|-------------| +| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | +| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | +| `PUR_3KR` | The 3k Ohm resistor used at all times | +| `PUR_4KR` | The 4k Ohm resistor used at all times | +| `PUR_8KR` | The 8k Ohm resistor used at all times | +| `PUR_16KR` | The 16k Ohm resistor used at all times | +| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | + Here is an example using 2 drivers. ```c @@ -122,7 +140,7 @@ Currently only 4 drivers are supported, but it would be trivial to support all 8 Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -141,7 +159,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( There is basic support for addressable RGB matrix lighting with the I2C IS31FL3737 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = IS31FL3737 ``` @@ -153,11 +171,25 @@ Configure the hardware via your `config.h`: |----------|-------------|---------| | `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages, in milliseconds | 100 | | `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 | +| `ISSI_SWPULLUP` | (Optional) Set the value of the SWx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | +| `ISSI_CSPULLUP` | (Optional) Set the value of the CSx lines on-chip de-ghosting resistors | PUR_0R (Disabled) | | `DRIVER_COUNT` | (Required) How many RGB driver IC's are present | | | `DRIVER_LED_TOTAL` | (Required) How many RGB lights are present across all drivers | | | `DRIVER_ADDR_1` | (Required) Address for the first RGB driver | | | `DRIVER_ADDR_2` | (Optional) Address for the second RGB driver | | +The IS31FL3737 IC's have on-chip resistors that can be enabled to allow for de-ghosting of the RGB matrix. By default these resistors are not enabled (`ISSI_SWPULLUP`/`ISSI_CSPULLUP` are given the value of`PUR_0R`), the values that can be set to enable de-ghosting are as follows: + +| `ISSI_SWPULLUP/ISSI_CSPULLUP` | Description | +|----------------------|-------------| +| `PUR_0R` | (default) Do not use the on-chip resistors/enable de-ghosting | +| `PUR_05KR` | The 0.5k Ohm resistor used during blanking period (t_NOL) | +| `PUR_1KR` | The 1k Ohm resistor used during blanking period (t_NOL) | +| `PUR_2KR` | The 2k Ohm resistor used during blanking period (t_NOL) | +| `PUR_4KR` | The 4k Ohm resistor used during blanking period (t_NOL) | +| `PUR_8KR` | The 8k Ohm resistor during blanking period (t_NOL) | +| `PUR_16KR` | The 16k Ohm resistor during blanking period (t_NOL) | +| `PUR_32KR` | The 32k Ohm resistor used during blanking period (t_NOL) | Here is an example using 2 drivers. @@ -181,12 +213,12 @@ Here is an example using 2 drivers. ``` !> Note the parentheses, this is so when `DRIVER_LED_TOTAL` is used in code and expanded, the values are added together before any additional math is applied to them. As an example, `rand() % (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL)` will give very different results than `rand() % DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL`. -Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. +Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. Define these arrays listing all the LEDs in your `.c`: ```c -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -206,7 +238,7 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet]( There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 ``` @@ -226,7 +258,7 @@ Configure the hardware via your `config.h`: There is basic support for APA102 based addressable LED strands. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = APA102 ``` @@ -246,7 +278,7 @@ Configure the hardware via your `config.h`: ### AW20216 :id=aw20216 There is basic support for addressable RGB matrix lighting with the SPI AW20216 RGB controller. To enable it, add this to your `rules.mk`: -```makefile +```make RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = AW20216 ``` @@ -287,7 +319,7 @@ Here is an example using 2 drivers. Define these arrays listing all the LEDs in your `.c`: ```c -const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL] = { +const aw_led PROGMEM g_aw_leds[DRIVER_LED_TOTAL] = { /* Each AW20216 channel is controlled by a register at some offset between 0x00 * and 0xD7 inclusive. * See drivers/awinic/aw20216.h for the mapping between register offsets and @@ -340,7 +372,7 @@ x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION ``` -Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. +Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout. As mentioned earlier, the center of the keyboard by default is expected to be `{ 112, 32 }`, but this can be changed if you want to more accurately calculate the LED's physical `{ x, y }` positions. Keyboard designers can implement `#define RGB_MATRIX_CENTER { 112, 32 }` in their config.h file with the new center point of the keyboard, or where they want it to be allowing more possibilities for the `{ x, y }` values. Do note that the maximum value for x or y is 255, and the recommended maximum is 224 as this gives animations runoff room before they reset. @@ -383,7 +415,7 @@ All RGB keycodes are currently shared with the RGBLIGHT system: * `RGB_MODE_*` keycodes will generally work, but not all of the modes are currently mapped to the correct effects for the RGB Matrix system. -`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped. +`RGB_MODE_PLAIN`, `RGB_MODE_BREATHE`, `RGB_MODE_RAINBOW`, and `RGB_MATRIX_SWIRL` are the only ones that are mapped properly. The rest don't have a direct equivalent, and are not mapped. !> By default, if you have both the [RGB Light](feature_rgblight.md) and the RGB Matrix feature enabled, these keycodes will work for both features, at the same time. You can disable the keycode functionality by defining the `*_DISABLE_KEYCODES` option for the specific feature. @@ -420,7 +452,9 @@ enum rgb_matrix_effects { RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation RGB_MATRIX_HUE_BREATHING, // Hue shifts up a slight ammount at the same time, then shifts back RGB_MATRIX_HUE_PENDULUM, // Hue shifts up a slight ammount in a wave to the right, then back to the left - RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right + RGB_MATRIX_HUE_WAVE, // Hue shifts up a slight ammount and then back down in a wave to the right + RGB_MATRIX_PIXEL_FRACTAL, // Single hue fractal filled keys pulsing horizontally out to edges + RGB_MATRIX_PIXEL_RAIN, // Randomly light keys with random hues #if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS) RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM! RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation @@ -443,51 +477,66 @@ enum rgb_matrix_effects { }; ``` -You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`: - - -|Define |Description | -|-------------------------------------------------------|-----------------------------------------------| -|`#define DISABLE_RGB_MATRIX_ALPHAS_MODS` |Disables `RGB_MATRIX_ALPHAS_MODS` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Disables `MATRIX_GRADIENT_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_BREATHING` |Disables `RGB_MATRIX_BREATHING` | -|`#define DISABLE_RGB_MATRIX_BAND_SAT` |Disables `RGB_MATRIX_BAND_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_VAL` |Disables `RGB_MATRIX_BAND_VAL` | -|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Disables `RGB_MATRIX_BAND_PINWHEEL_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Disables `RGB_MATRIX_BAND_PINWHEEL_VAL` | -|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Disables `RGB_MATRIX_BAND_SPIRAL_SAT` | -|`#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Disables `RGB_MATRIX_BAND_SPIRAL_VAL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_ALL` |Disables `RGB_MATRIX_CYCLE_ALL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Disables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | -|`#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Disables `RGB_MATRIX_CYCLE_UP_DOWN` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | -|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN` |Disables `RGB_MATRIX_CYCLE_OUT_IN` | -|`#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Disables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Disables `RGB_MATRIX_CYCLE_PINWHEEL` | -|`#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL` |Disables `RGB_MATRIX_CYCLE_SPIRAL` | -|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` | -|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` | -|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | -|`#define DISABLE_RGB_MATRIX_HUE_BREATHING` |Disables `RGB_MATRIX_HUE_BREATHING` | -|`#define DISABLE_RGB_MATRIX_HUE_PENDULUM` |Disables `RGB_MATRIX_HUE_PENDULUM` | -|`#define DISABLE_RGB_MATRIX_HUE_WAVE ` |Disables `RGB_MATRIX_HUE_WAVE ` | -|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` | -|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | -|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Disables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| -|`#define DISABLE_RGB_MATRIX_SPLASH` |Disables `RGB_MATRIX_SPLASH` | -|`#define DISABLE_RGB_MATRIX_MULTISPLASH` |Disables `RGB_MATRIX_MULTISPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_SPLASH` |Disables `RGB_MATRIX_SOLID_SPLASH` | -|`#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Disables `RGB_MATRIX_SOLID_MULTISPLASH` | +You can enable a single effect by defining `ENABLE_[EFFECT_NAME]` in your `config.h`: + + +|Define |Description | +|------------------------------------------------------|----------------------------------------------| +|`#define ENABLE_RGB_MATRIX_ALPHAS_MODS` |Enables `RGB_MATRIX_ALPHAS_MODS` | +|`#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Enables `RGB_MATRIX_GRADIENT_UP_DOWN` | +|`#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT` |Enables `RGB_MATRIX_GRADIENT_LEFT_RIGHT` | +|`#define ENABLE_RGB_MATRIX_BREATHING` |Enables `RGB_MATRIX_BREATHING` | +|`#define ENABLE_RGB_MATRIX_BAND_SAT` |Enables `RGB_MATRIX_BAND_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_VAL` |Enables `RGB_MATRIX_BAND_VAL` | +|`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT` |Enables `RGB_MATRIX_BAND_PINWHEEL_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL` |Enables `RGB_MATRIX_BAND_PINWHEEL_VAL` | +|`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT` |Enables `RGB_MATRIX_BAND_SPIRAL_SAT` | +|`#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL` |Enables `RGB_MATRIX_BAND_SPIRAL_VAL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_ALL` |Enables `RGB_MATRIX_CYCLE_ALL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT` |Enables `RGB_MATRIX_CYCLE_LEFT_RIGHT` | +|`#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN` |Enables `RGB_MATRIX_CYCLE_UP_DOWN` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |Enables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` | +|`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN` |Enables `RGB_MATRIX_CYCLE_OUT_IN` | +|`#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL` |Enables `RGB_MATRIX_CYCLE_OUT_IN_DUAL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL` |Enables `RGB_MATRIX_CYCLE_PINWHEEL` | +|`#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL` |Enables `RGB_MATRIX_CYCLE_SPIRAL` | +|`#define ENABLE_RGB_MATRIX_DUAL_BEACON` |Enables `RGB_MATRIX_DUAL_BEACON` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_BEACON` |Enables `RGB_MATRIX_RAINBOW_BEACON` | +|`#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Enables `RGB_MATRIX_RAINBOW_PINWHEELS` | +|`#define ENABLE_RGB_MATRIX_RAINDROPS` |Enables `RGB_MATRIX_RAINDROPS` | +|`#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Enables `RGB_MATRIX_JELLYBEAN_RAINDROPS` | +|`#define ENABLE_RGB_MATRIX_HUE_BREATHING` |Enables `RGB_MATRIX_HUE_BREATHING` | +|`#define ENABLE_RGB_MATRIX_HUE_PENDULUM` |Enables `RGB_MATRIX_HUE_PENDULUM` | +|`#define ENABLE_RGB_MATRIX_HUE_WAVE` |Enables `RGB_MATRIX_HUE_WAVE ` | +|`#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL` |Enables `RGB_MATRIX_PIXEL_FRACTAL` | +|`#define ENABLE_RGB_MATRIX_PIXEL_RAIN` |Enables `RGB_MATRIX_PIXEL_RAIN` | + +?> These modes don't require any additional defines. + +|Framebuffer Defines |Description | +|------------------------------------------------------|----------------------------------------------| +|`#define ENABLE_RGB_MATRIX_TYPING_HEATMAP` |Enables `RGB_MATRIX_TYPING_HEATMAP` | +|`#define ENABLE_RGB_MATRIX_DIGITAL_RAIN` |Enables `RGB_MATRIX_DIGITAL_RAIN` | + +?> These modes also require the `RGB_MATRIX_FRAMEBUFFER_EFFECTS` define to be available. + +|Reactive Defines |Description | +|------------------------------------------------------|----------------------------------------------| +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Enables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE` |Enables `RGB_MATRIX_SOLID_REACTIVE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_WIDE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_CROSS` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTICROSS`| +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_NEXUS` | +|`#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS` |Enables `RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS`| +|`#define ENABLE_RGB_MATRIX_SPLASH` |Enables `RGB_MATRIX_SPLASH` | +|`#define ENABLE_RGB_MATRIX_MULTISPLASH` |Enables `RGB_MATRIX_MULTISPLASH` | +|`#define ENABLE_RGB_MATRIX_SOLID_SPLASH` |Enables `RGB_MATRIX_SOLID_SPLASH` | +|`#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH` |Enables `RGB_MATRIX_SOLID_MULTISPLASH` | + +?> These modes also require the `RGB_MATRIX_KEYPRESSES` or `RGB_MATRIX_KEYRELEASES` define to be available. + ### RGB Matrix Effect Typing Heatmap :id=rgb-matrix-effect-typing-heatmap @@ -537,7 +586,7 @@ static bool my_cool_effect(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { rgb_matrix_set_color(i, 0xff, 0xff, 0x00); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } // e.g: A more complex effect, relying on external methods and state, with @@ -551,8 +600,7 @@ static bool my_cool_effect2_complex_run(effect_params_t* params) { for (uint8_t i = led_min; i < led_max; i++) { rgb_matrix_set_color(i, 0xff, some_global_state++, 0xff); } - - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } static bool my_cool_effect2(effect_params_t* params) { if (params->init) my_cool_effect2_complex_init(params); @@ -694,7 +742,7 @@ Where `28` is an unused index from `eeconfig.h`. ### Indicators :id=indicators -If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: +If you want to set custom indicators, such as an LED for Caps Lock, or layer indication, you can use the `rgb_matrix_indicators_kb` or `rgb_matrix_indicators_user` function for that: ```c void rgb_matrix_indicators_kb(void) { rgb_matrix_set_color(index, red, green, blue); @@ -749,18 +797,18 @@ This example sets the modifiers to be a specific color based on the layer state. ```c void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { HSV hsv = {0, 255, 255}; - + if (layer_state_is(layer_state, 2)) { hsv = {130, 255, 255}; } else { hsv = {30, 255, 255}; } - + if (hsv.v > rgb_matrix_get_val()) { hsv.v = rgb_matrix_get_val(); } RGB rgb = hsv_to_rgb(hsv); - + for (uint8_t i = led_min; i <= led_max; i++) { if (HAS_FLAGS(g_led_config.flags[i], 0x01)) { // 0x01 == LED_FLAG_MODIFIER rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); @@ -769,7 +817,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } ``` -If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: +If you want to indicate a Host LED status (caps lock, num lock, etc), you can use something like this to light up the caps lock key: ```c void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { diff --git a/docs/feature_stenography.md b/docs/feature_stenography.md index d5445b7f8df..691d83f9706 100644 --- a/docs/feature_stenography.md +++ b/docs/feature_stenography.md @@ -32,7 +32,7 @@ GeminiPR encodes 42 keys into a 6-byte packet. While TX Bolt contains everything Firstly, enable steno in your keymap's Makefile. You may also need disable mousekeys, extra keys, or another USB endpoint to prevent conflicts. The builtin USB stack for some processors only supports a certain number of USB endpoints and the virtual serial port needed for steno fills 3 of them. -```makefile +```make STENO_ENABLE = yes MOUSEKEY_ENABLE = no ``` diff --git a/docs/feature_swap_hands.md b/docs/feature_swap_hands.md index cbc574b6b86..b0239bb802c 100644 --- a/docs/feature_swap_hands.md +++ b/docs/feature_swap_hands.md @@ -6,7 +6,7 @@ The swap-hands action allows support for one-handed typing without requiring a s The configuration table is a simple 2-dimensional array to map from column/row to new column/row. Example `hand_swap_config` for Planck: -```C +```c const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { {{11, 0}, {10, 0}, {9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, {{11, 1}, {10, 1}, {9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index d1988b9b7d3..40f9802db33 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -299,7 +299,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) { xtap_state.state = cur_dance(state); switch (xtap_state.state) { case TD_SINGLE_TAP: register_code(KC_X); break; - case TD_SINGLE_HOLD: register_code(KC_LCTRL); break; + case TD_SINGLE_HOLD: register_code(KC_LCTL); break; case TD_DOUBLE_TAP: register_code(KC_ESC); break; case TD_DOUBLE_HOLD: register_code(KC_LALT); break; // Last case is for fast typing. Assuming your key is `f`: @@ -312,7 +312,7 @@ void x_finished(qk_tap_dance_state_t *state, void *user_data) { void x_reset(qk_tap_dance_state_t *state, void *user_data) { switch (xtap_state.state) { case TD_SINGLE_TAP: unregister_code(KC_X); break; - case TD_SINGLE_HOLD: unregister_code(KC_LCTRL); break; + case TD_SINGLE_HOLD: unregister_code(KC_LCTL); break; case TD_DOUBLE_TAP: unregister_code(KC_ESC); break; case TD_DOUBLE_HOLD: unregister_code(KC_LALT); case TD_DOUBLE_SINGLE_TAP: unregister_code(KC_X); diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md index 8b001e3ce21..8c617fe33a0 100644 --- a/docs/feature_userspace.md +++ b/docs/feature_userspace.md @@ -240,7 +240,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { For boards that may not have a shift button (such as on a macro pad), we need a way to always include the bootloader option. To do that, add the following to the `rules.mk` in your userspace folder: -```make +```make ifeq ($(strip $(FLASH_BOOTLOADER)), yes) OPT_DEFS += -DFLASH_BOOTLOADER endif @@ -252,4 +252,4 @@ Also, holding Shift will add the flash target (`:flash`) to the command. Holdin And for the boards that lack a shift key, or that you want to always attempt the flashing part, you can add `FLASH_BOOTLOADER = yes` to the `rules.mk` of that keymap. -?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. And this doesn't support BootloadHID or mdloader. +?> This should flash the newly compiled firmware automatically, using the correct utility, based on the bootloader settings (or default to just generating the HEX file). However, it should be noted that this may not work on all systems. AVRDUDE doesn't work on WSL, namely. diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md index 93dd7de9406..14d4be314d0 100644 --- a/docs/feature_velocikey.md +++ b/docs/feature_velocikey.md @@ -6,7 +6,6 @@ Velocikey is a feature that lets you control the speed of lighting effects (like For Velocikey to take effect, there are two steps. First, when compiling your keyboard, you'll need to set `VELOCIKEY_ENABLE=yes` in `rules.mk`, e.g.: ``` -BOOTMAGIC_ENABLE = no MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/docs/feature_wpm.md b/docs/feature_wpm.md index e2fac1ecea0..87145c97e3d 100644 --- a/docs/feature_wpm.md +++ b/docs/feature_wpm.md @@ -10,11 +10,23 @@ For split keyboards using soft serial, the computed WPM score will be available ## Configuration -|Define |Default | Description | -|-----------------------------|--------------|------------------------------------------------------------------------------------------| -|`WPM_SMOOTHING` |`0.0487` | Sets the smoothing to about 40 keystrokes | -|`WPM_ESTIMATED_WORD_SIZE` |`5` | This is the value used when estimating average word size (for regression and normal use) | -|`WPM_ALLOW_COUNT_REGRESSOIN` |_Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace | +| Define | Default | Description | +|------------------------------|---------------|------------------------------------------------------------------------------------------| +| `WPM_ESTIMATED_WORD_SIZE` | `5` | This is the value used when estimating average word size (for regression and normal use) | +| `WPM_ALLOW_COUNT_REGRESSION` | _Not defined_ | If defined allows the WPM to be decreased when hitting Delete or Backspace | +| `WPM_UNFILTERED` | _Not defined_ | If undefined (the default), WPM values will be smoothed to avoid sudden changes in value | +| `WPM_SAMPLE_SECONDS` | `5` | This defines how many seconds of typing to average, when calculating WPM | +| `WPM_SAMPLE_PERIODS` | `50` | This defines how many sampling periods to use when calculating WPM | +| `WPM_LAUNCH_CONTROL` | _Not defined_ | If defined, WPM values will be calculated using partial buffers when typing begins | + +'WPM_UNFILTERED' is potentially useful if you're filtering data in some other way (and also because it reduces the code required for the WPM feature), or if reducing measurement latency to a minimum is important for you. + +Increasing 'WPM_SAMPLE_SECONDS' will give more smoothly changing WPM values at the expense of slightly more latency to the WPM calculation. + +Increasing 'WPM_SAMPLE_PERIODS' will improve the smoothness at which WPM decays once typing stops, at a cost of approximately this many bytes of firmware space. + +If 'WPM_LAUNCH_CONTROL' is defined, whenever WPM drops to zero, the next time typing begins WPM will be calculated based only on the time since that typing began, instead of the whole period of time specified by WPM_SAMPLE_SECONDS. This results in reaching an accurate WPM value much faster, even when filtering is enabled and a large WPM_SAMPLE_SECONDS value is specified. + ## Public Functions |Function |Description | @@ -35,7 +47,7 @@ bool wpm_keycode_user(uint16_t keycode) { } else if (keycode > 0xFF) { keycode = 0; } - if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLASH)) { + if ((keycode >= KC_A && keycode <= KC_0) || (keycode >= KC_TAB && keycode <= KC_SLSH)) { return true; } diff --git a/docs/flashing_bootloadhid.md b/docs/flashing_bootloadhid.md index 9879ec999ee..213c7c1321a 100644 --- a/docs/flashing_bootloadhid.md +++ b/docs/flashing_bootloadhid.md @@ -44,7 +44,7 @@ For native Windows flashing, the `bootloadHID.exe` can be used outside of the MS ### Linux Manual Installation 1. Install libusb development dependency: - ```bash + ``` # This depends on OS - for Debian the following works sudo apt-get install libusb-dev ``` diff --git a/docs/fr-fr/cli.md b/docs/fr-fr/cli.md index bfa060f2add..917a9315bc2 100644 --- a/docs/fr-fr/cli.md +++ b/docs/fr-fr/cli.md @@ -48,25 +48,6 @@ Nous recherchons des gens pour créer et maintenir un paquet `qmk` pour plus de * Installez en utilisant un virtualenv * Expliquez à l'utilisateur de définir la variable d'environnement `QMK_Home` pour "check out" les sources du firmware à un autre endroit que `~/qmk_firmware`. -# CLI locale - -Si vous ne voulez pas utiliser la CLI globale, il y a une CLI locale empaquetée avec `qmk_firmware`. Vous pouvez le trouver dans `qmk_firmware/bin/qmk`. Vous pouvez lancer la commande `qmk` depuis n'importe quel répertoire et elle fonctionnera toujours sur cette copie de `qmk_firmware`. - -**Exemple**: - -``` -$ ~/qmk_firmware/bin/qmk hello -Ψ Hello, World! -``` - -## Limitations de la CLI locale - -Il y a quelques limitations à la CLI locale comparé à la globale: - -* La CLI locale ne supporte pas `qmk setup` ou `qmk clone` -* La CLI locale n'opère pas sur le même arbre `qmk_firmware`, même si vous avez plusieurs dépôts clonés. -* La CLI locale ne s'exécute pas dans un virtualenv, donc il y a des risques que des dépendances seront en conflit - # Les commandes CLI ## `qmk compile` diff --git a/docs/fr-fr/faq_debug.md b/docs/fr-fr/faq_debug.md index 3b13b96b556..8868744f737 100644 --- a/docs/fr-fr/faq_debug.md +++ b/docs/fr-fr/faq_debug.md @@ -85,10 +85,6 @@ Premièrement, vous devez compiler le firmware avec l'option de compilation `NKR Essayez la commande `Magic` **N** (`LShift+RShift+N` par défaut) si **NKRO** ne fonctionne toujours pas. Vous pouvez utiliser cette commande pour basculer temporairement entre le mode **NKRO** et **6KRO**. Sous certaines conditions, **NKRO** ne fonctionnera pas et vous devrez basculer en **6KRO**, en particulier lorsque vous êtes dans le BIOS. -Si votre firmware est compilé avec `BOOTMAGIC_ENABLE` vous devrez l'activer avec la commande `BootMagic` **N** (`Espace+N` par défaut). Cette option est enregistrée dans l'EEPROM et sera gardé entre deux cycles de démarrage. - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - ## Le TrackPoint a besoin Circuit de réinitialisation (Support de souris PS/2) Sans circuit de réinitialisation vous allez avoir des résultats inconsistants à cause de la mauvaise initialisation du matériel. Regardez le schéma du circuit du TPM754. diff --git a/docs/fr-fr/faq_keymap.md b/docs/fr-fr/faq_keymap.md index 374a0052270..cc0700ab8e7 100644 --- a/docs/fr-fr/faq_keymap.md +++ b/docs/fr-fr/faq_keymap.md @@ -6,7 +6,7 @@ Cette page couvre les questions souvent posées à propos des keymaps. Si vous n Regardez [Keycodes](keycodes.md) pour une liste des keycodes disponibles. Certains keycodes spécifiques ont des documentations plus complètes de disponible. -Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +Les keycodes sont définies dans [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h). ## Quels sont les keycodes par défaut ? diff --git a/docs/fr-fr/getting_started_github.md b/docs/fr-fr/getting_started_github.md index 0f3982ea290..522b09a03e8 100644 --- a/docs/fr-fr/getting_started_github.md +++ b/docs/fr-fr/getting_started_github.md @@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` Vous avez maintenant votre fork QMK sur votre machine locale, vous pouvez ajouter votre keymap, la compiler et la flasher sur votre board. Une fois heureux avec vos changements, vous pouvez les ajouter, commit, et pousser vers votre fork comme suit: diff --git a/docs/getting_started_docker.md b/docs/getting_started_docker.md index f9c3b366a4f..c4da8af968d 100644 --- a/docs/getting_started_docker.md +++ b/docs/getting_started_docker.md @@ -12,13 +12,13 @@ The main prerequisite is a working `docker` or `podman` install. Acquire a local copy of the QMK's repository (including submodules): -```bash +``` git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git cd qmk_firmware ``` Run the following command to build a keymap: -```bash +``` util/docker_build.sh : # For example: util/docker_build.sh planck/rev6:default ``` @@ -27,14 +27,14 @@ This will compile the desired keyboard/keymap and leave the resulting `.hex` or There is also support for building _and_ flashing the keyboard straight from Docker by specifying the `target` as well: -```bash +``` util/docker_build.sh keyboard:keymap:target # For example: util/docker_build.sh planck/rev6:default:flash ``` You can also start the script without any parameters, in which case it will ask you to input the build parameters one by one, which you may find easier to use: -```bash +``` util/docker_build.sh # Reads parameters as input (leave blank for all keyboards/keymaps) ``` @@ -42,7 +42,7 @@ util/docker_build.sh You can manually set which container runtime you want to use by setting the `RUNTIME` environment variable to it's name or path. By default docker or podman are automatically detected and docker is preferred over podman. -```bash +``` RUNTIME="podman" util/docker_build.sh keyboard:keymap:target ``` diff --git a/docs/getting_started_github.md b/docs/getting_started_github.md index e3720b88696..9232bc62296 100644 --- a/docs/getting_started_github.md +++ b/docs/getting_started_github.md @@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` You now have your QMK fork on your local machine, and you can add your keymap, compile it and flash it to your board. Once you're happy with your changes, you can add, commit, and push them to your fork like this: diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md index 70390a51058..1a7e276098a 100644 --- a/docs/getting_started_make_guide.md +++ b/docs/getting_started_make_guide.md @@ -55,7 +55,7 @@ Set these variables to `no` to disable them, and `yes` to enable them. `BOOTMAGIC_ENABLE` -This allows you to hold a key and the salt key (space by default) and have access to a various EEPROM settings that persist over power loss. It's advised you keep this disabled, as the settings are often changed by accident, and produce confusing results that makes it difficult to debug. It's one of the more common problems encountered in help sessions. +This allows you to hold a key (usually Escape by default) to reset the EEPROM settings that persist over power loss and ready your keyboard to accept new firmware. `MOUSEKEY_ENABLE` @@ -125,10 +125,6 @@ This allows you output audio on the C6 pin (needs abstracting). See the [audio p Use this to debug changes to variable values, see the [tracing variables](unit_testing.md#tracing-variables) section of the Unit Testing page for more information. -`API_SYSEX_ENABLE` - -This enables using the Quantum SYSEX API to send strings (somewhere?) - `KEY_LOCK_ENABLE` This enables [key lock](feature_key_lock.md). @@ -149,6 +145,10 @@ Lets you replace the default matrix scanning routine with your own code. For fur Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation. +`DEFERRED_EXEC_ENABLE` + +Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information. + ## Customizing Makefile Options on a Per-Keymap Basis If your keymap directory has a file called `rules.mk` any options you set in that file will take precedence over other `rules.mk` options for your particular keyboard. diff --git a/docs/getting_started_vagrant.md b/docs/getting_started_vagrant.md index 114f8756714..b5b5ce1539d 100644 --- a/docs/getting_started_vagrant.md +++ b/docs/getting_started_vagrant.md @@ -31,26 +31,26 @@ The development environment is configured to run the QMK Docker image, `qmkfm/qm ### Why am I seeing issues under Virtualbox? Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12. **Alternately, you can try running the following command:** -```console +``` vagrant plugin install vagrant-vbguest ``` ### How do I remove an existing environment? Finished with your environment? From anywhere inside the folder where you checked out this project, Execute: -```console +``` vagrant destroy ``` ### What if I want to use Docker directly? Want to benefit from the Vagrant workflow without a virtual machine? The Vagrantfile is configured to bypass running a virtual machine, and run the container directly. Execute the following when bringing up the environment to force the use of Docker: -```console +``` vagrant up --provider=docker ``` ### How do I access the virtual machine instead of the Docker container? Execute the following to bypass the `vagrant` user booting directly to the official qmk builder image: -```console +``` vagrant ssh -c 'sudo -i' ``` diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md index 7e89c0d2b9a..a157501326d 100644 --- a/docs/hardware_drivers.md +++ b/docs/hardware_drivers.md @@ -18,10 +18,6 @@ Support for addressing pins on the ProMicro by their Arduino name rather than th Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page. -## uGFX - -You can make use of uGFX within QMK to drive character and graphic LCDs, LED arrays, OLED, TFT, and other display technologies. This needs to be better documented, if you are trying to do this and reading the code doesn't help please [open an issue](https://github.com/qmk/qmk_firmware/issues/new) and we can help you through the process. - ## WS2812 Support for WS2811/WS2812{a,b,c} LED's. For more information see the [RGB Light](feature_rgblight.md) page. diff --git a/docs/hardware_keyboard_guidelines.md b/docs/hardware_keyboard_guidelines.md index 7630b44e0c4..be55356b17f 100644 --- a/docs/hardware_keyboard_guidelines.md +++ b/docs/hardware_keyboard_guidelines.md @@ -144,10 +144,38 @@ The `rules.mk` file can also be placed in a sub-folder, and its reading order is * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/rules.mk` * `keyboards/top_folder/keymaps/a_keymap/rules.mk` * `users/a_user_folder/rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/sub_4/post_rules.mk` + * `keyboards/top_folder/sub_1/sub_2/sub_3/post_rules.mk` + * `keyboards/top_folder/sub_1/sub_2/post_rules.mk` + * `keyboards/top_folder/sub_1/post_rules.mk` +* `keyboards/top_folder/post_rules.mk` * `common_features.mk` Many of the settings written in the `rules.mk` file are interpreted by `common_features.mk`, which sets the necessary source files and compiler options. +The `post_rules.mk` file can interpret `features` of a keyboard-level before `common_features.mk`. For example, when your designed keyboard has the option to implement backlighting or underglow using rgblight.c, writing the following in the `post_rules.mk` makes it easier for the user to configure the `rules.mk`. + +* `keyboards/top_folder/keymaps/a_keymap/rules.mk` + ```make + # Please set the following according to the selection of the hardware implementation option. + RGBLED_OPTION_TYPE = backlight ## none, backlight or underglow + ``` +* `keyboards/top_folder/post_rules.mk` + ```make + ifeq ($(filter $(strip $(RGBLED_OPTION_TYPE))x, nonex backlightx underglowx x),) + $(error unknown RGBLED_OPTION_TYPE value "$(RGBLED_OPTION_TYPE)") + endif + + ifeq ($(strip $(RGBLED_OPTION_TYPE)),backlight) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_NUM=30 + endif + ifeq ($(strip $(RGBLED_OPTION_TYPE)),underglow) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_NUM=6 + endif + ``` + ?> See `build_keyboard.mk` and `common_features.mk` for more details. ### `` @@ -227,8 +255,6 @@ The year should be the first year the file is created. If work was done to that The core of QMK is licensed under the [GNU General Public License](https://www.gnu.org/licenses/licenses.en.html). If you are shipping binaries for AVR processors you may choose either [GPLv2](https://www.gnu.org/licenses/old-licenses/gpl-2.0.html) or [GPLv3](https://www.gnu.org/licenses/gpl.html). If you are shipping binaries for ARM processors you must choose [GPL Version 3](https://www.gnu.org/licenses/gpl.html) to comply with the [ChibiOS](https://www.chibios.org) GPLv3 license. -If your keyboard makes use of the [uGFX](https://ugfx.io) features within QMK you must comply with the [uGFX License](https://ugfx.io/license.html), which requires a separate commercial license before selling a device containing uGFX. - ## Technical Details If you're looking for more information on making your keyboard work with QMK, [check out the hardware section](hardware.md)! diff --git a/docs/he-il/getting_started_github.md b/docs/he-il/getting_started_github.md index 900852effd0..ca79e40f9a6 100644 --- a/docs/he-il/getting_started_github.md +++ b/docs/he-il/getting_started_github.md @@ -35,7 +35,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md index 3dcbc645222..36cbfb4d9a6 100644 --- a/docs/how_keyboards_work.md +++ b/docs/how_keyboards_work.md @@ -9,7 +9,7 @@ firmware directly. Whenever you type on 1 particular key, here is the chain of actions taking place: -``` text +``` +------+ +-----+ +----------+ +----------+ +----+ | User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS | +------+ +-----+ +----------+ +----------+ +----+ diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md index 3ec34a0f87f..95c588af441 100644 --- a/docs/i2c_driver.md +++ b/docs/i2c_driver.md @@ -62,16 +62,13 @@ Then, modify your board's `mcuconf.h` to enable the peripheral you've chosen, fo Configuration-wise, you'll need to set up the peripheral as per your MCU's datasheet -- the defaults match the pins for a Proton-C, i.e. STM32F303. -|`config.h` Overrride |Description |Default| -|------------------------|-------------------------------------------------------------------------------------------|-------| -|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| -|`I2C1_BANK` (deprecated)|The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`), superseded by `I2C1_SCL_BANK`/`I2C1_SDA_BANK`|`GPIOB`| -|`I2C1_SCL_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SCL |`GPIOB`| -|`I2C1_SCL` |The pin number for SCL (0-15) |`6` | -|`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | -|`I2C1_SDA_BANK` |The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) to use for SDA |`GPIOB`| -|`I2C1_SDA` |The pin number for SDA (0-15) |`7` | -|`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | +|`config.h` Overrride |Description |Default| +|------------------------|--------------------------------------------------------------|-------| +|`I2C_DRIVER` |I2C peripheral to use - I2C1 -> `I2CD1`, I2C2 -> `I2CD2` etc. |`I2CD1`| +|`I2C1_SCL_PIN` |The pin definition for SCL |`B6` | +|`I2C1_SCL_PAL_MODE` |The alternate function mode for SCL |`4` | +|`I2C1_SDA_PIN` |The pin definition for SDA |`B7` | +|`I2C1_SDA_PAL_MODE` |The alternate function mode for SDA |`4` | The following configuration values depend on the specific MCU in use. @@ -190,7 +187,7 @@ Receive multiple bytes from the selected SPI device. ### `i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` -Writes to a register on the I2C device. +Writes to a register with an 8-bit address on the I2C device. #### Arguments @@ -211,9 +208,32 @@ Writes to a register on the I2C device. --- +### `i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` + +Writes to a register with a 16-bit address (big endian) on the I2C device. + +#### Arguments + + - `uint8_t devaddr` + The 7-bit I2C address of the device. + - `uint16_t regaddr` + The register address to write to. + - `uint8_t *data` + A pointer to the data to transmit. + - `uint16_t length` + The number of bytes to write. Take care not to overrun the length of `data`. + - `uint16_t timeout` + The time in milliseconds to wait for a response from the target device. + +#### Return Value + +`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + +--- + ### `i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` -Reads from a register on the I2C device. +Reads from a register with an 8-bit address on the I2C device. #### Arguments @@ -232,6 +252,27 @@ Reads from a register on the I2C device. --- +### `i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout)` + +Reads from a register with a 16-bit address (big endian) on the I2C device. + +#### Arguments + + - `uint8_t devaddr` + The 7-bit I2C address of the device. + - `uint16_t regaddr` + The register address to read from. + - `uint16_t length` + The number of bytes to read. Take care not to overrun the length of `data`. + - `uint16_t timeout` + The time in milliseconds to wait for a response from the target device. + +#### Return Value + +`I2C_STATUS_TIMEOUT` if the timeout period elapses, `I2C_STATUS_ERROR` if some other error occurs, otherwise `I2C_STATUS_SUCCESS`. + +--- + ### `i2c_status_t i2c_stop(void)` Stop the current I2C transaction. diff --git a/docs/internals_gpio_control.md b/docs/internals_gpio_control.md index 21a3bd661e7..ccd3f8c74d9 100644 --- a/docs/internals_gpio_control.md +++ b/docs/internals_gpio_control.md @@ -4,7 +4,7 @@ QMK has a GPIO control abstraction layer which is microcontroller agnostic. This ## Functions :id=functions -The following functions provide basic control of GPIOs and are found in `tmk_core/common//gpio.h`. +The following functions provide basic control of GPIOs and are found in `platforms//gpio.h`. |Function |Description | Old AVR Examples | Old ChibiOS/ARM Examples | |------------------------|--------------------------------------------------|-------------------------------------------------|-------------------------------------------------| diff --git a/docs/ja/compatible_microcontrollers.md b/docs/ja/compatible_microcontrollers.md index 7a3484fa8c8..23f32bbb60e 100644 --- a/docs/ja/compatible_microcontrollers.md +++ b/docs/ja/compatible_microcontrollers.md @@ -32,6 +32,7 @@ QMK は十分な容量のフラッシュメモリを備えた USB 対応 AVR ま * [STM32F103](https://www.st.com/en/microcontrollers-microprocessors/stm32f103.html) * [STM32F303](https://www.st.com/en/microcontrollers-microprocessors/stm32f303.html) * [STM32F401](https://www.st.com/en/microcontrollers-microprocessors/stm32f401.html) +* [STM32F405](https://www.st.com/en/microcontrollers-microprocessors/stm32f405-415.html) * [STM32F407](https://www.st.com/en/microcontrollers-microprocessors/stm32f407-417.html) * [STM32F411](https://www.st.com/en/microcontrollers-microprocessors/stm32f411.html) * [STM32F446](https://www.st.com/en/microcontrollers-microprocessors/stm32f446.html) diff --git a/docs/ja/config_options.md b/docs/ja/config_options.md index 18fe9489b96..fb43d015f20 100644 --- a/docs/ja/config_options.md +++ b/docs/ja/config_options.md @@ -358,7 +358,7 @@ QMK での全ての利用可能な設定にはデフォルトがあります。 これらを使って特定の機能のビルドを有効または無効にします。有効にすればするほどファームウェアが大きくなり、MCU には大きすぎるファームウェアを構築するリスクがあります。 * `BOOTMAGIC_ENABLE` - * 仮想 DIP スイッチ設定 + * ブートマジックライトを有効にします * `MOUSEKEY_ENABLE` * マウスキー * `EXTRAKEY_ENABLE` diff --git a/docs/ja/faq_keymap.md b/docs/ja/faq_keymap.md index fb44e316b78..59c7d206a1c 100644 --- a/docs/ja/faq_keymap.md +++ b/docs/ja/faq_keymap.md @@ -10,7 +10,7 @@ ## どのキーコードを使えますか? あなたが利用可能なキーコードのインデックスについては、[キーコード](ja/keycodes.md)を見てください。より広範なドキュメントがある場合は、そこからリンクしてあります。 -キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h) で定義されています。 +キーコードは実際には [common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h) で定義されています。 ## デフォルトのキーコードとは何か? diff --git a/docs/ja/faq_misc.md b/docs/ja/faq_misc.md index e9a35ef329c..38917df2eec 100644 --- a/docs/ja/faq_misc.md +++ b/docs/ja/faq_misc.md @@ -39,10 +39,6 @@ Size after: **NKRO** がまだ動作しない場合は、`Magic` **N** コマンド(デフォルトでは `LShift+RShift+N`)を試してみてください。**NKRO** モードと **6KRO** モード間を一時的に切り替えるためにこのコマンドを使うことができます。**NKRO** が機能しない状況、特に BIOS の場合は **6KRO** モードに切り替える必要があります。 -ファームウェアを `BOOTMAGIC_ENABLE` でビルドした場合、`ブートマジック` **N** コマンドで切り替える必要があります(デフォルトでは `Space+N`)。この設定は EEPROM に格納され、電源を入れ直しても保持されます。 - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - ## トラックポイントははリセット回路が必要です (PS/2 マウスサポート) リセット回路が無いとハードウェアの不適切な初期化のために一貫性の無い結果になります。TPM754 の回路図を見てください: diff --git a/docs/ja/feature_haptic_feedback.md b/docs/ja/feature_haptic_feedback.md index 15807972532..687788014aa 100644 --- a/docs/ja/feature_haptic_feedback.md +++ b/docs/ja/feature_haptic_feedback.md @@ -9,9 +9,12 @@ 現在のところ、`rules.mk` で触覚フィードバック用に以下のオプションを利用可能です: -`HAPTIC_ENABLE += DRV2605L` +``` +HAPTIC_ENABLE = yes -`HAPTIC_ENABLE += SOLENOID` +HAPTIC_DRIVER += DRV2605L +HAPTIC_DRIVER += SOLENOID +``` ## サポートされる既知のハードウェア diff --git a/docs/ja/feature_layers.md b/docs/ja/feature_layers.md index 011f0e0ef19..ca3e0558357 100644 --- a/docs/ja/feature_layers.md +++ b/docs/ja/feature_layers.md @@ -50,7 +50,7 @@ QMK を使い始めたばかりの場合は、全てを単純にしたいでし レイヤーは番号順に上に積み重なっています。キーの押下の動作を決定する時に、QMK は上から順にレイヤーを走査し、`KC_TRNS` に設定されていない最初のアクティブなレイヤーに到達すると停止します。結果として、現在のレイヤーよりも数値的に低いレイヤーをアクティブにし、現在のレイヤー(あるいはアクティブでターゲットレイヤーよりも高い別のレイヤー)に `KC_TRNS` 以外のものがある場合、それが送信されるキーであり、アクティブ化したばかりのレイヤー上のキーではありません。これが、ほとんどの人の "なぜレイヤーが切り替わらないのか" 問題の原因です。 -場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_layer.h) で見つけることができます。 +場合によっては、マクロ内あるいはタップダンスルーチンの一部としてレイヤーを切り替えほうが良いかもしれません。`layer_on` はレイヤーをアクティブにし、`layer_off` はそれを非アクティブにします。もっと多くのレイヤーに関する関数は、[action_layer.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/action_layer.h) で見つけることができます。 ## 関数 :id=functions diff --git a/docs/ja/feature_led_matrix.md b/docs/ja/feature_led_matrix.md index 6511b282493..2b1979ec68b 100644 --- a/docs/ja/feature_led_matrix.md +++ b/docs/ja/feature_led_matrix.md @@ -52,7 +52,7 @@ I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED `.c` に全ての LED を列挙する配列を定義します: - const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* これらの位置については IS31 マニュアルを参照してください * driver * | LED address diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index 3d694113074..569934c1876 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md @@ -43,14 +43,8 @@ PS2_USE_BUSYWAIT = yes ```c #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 1 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D1 +# define PS2_DATA_PIN D2 #endif ``` @@ -69,14 +63,8 @@ PS2_USE_INT = yes ```c #ifdef PS2_USE_INT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 2 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 5 +#define PS2_CLOCK_PIN D2 +#define PS2_DATA_PIN D5 #define PS2_INT_INIT() do { \ EICRA |= ((1<` も消します) - - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) を参照してください + - `timer_read()` と `timer_read32()` など。 -- タイミング API は [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) を参照してください - 新しい抽象化が有用だと思う場合は、次のことをお勧めします: - 機能が完成するまで自分のキーボードでプロトタイプを作成する - Discord の QMK コラボレータと話し合う diff --git a/docs/ja/understanding_qmk.md b/docs/ja/understanding_qmk.md index 109876961b0..1654f8e0029 100644 --- a/docs/ja/understanding_qmk.md +++ b/docs/ja/understanding_qmk.md @@ -184,10 +184,6 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Visualizer - -FIXME: This needs to be written - #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written diff --git a/docs/keycodes.md b/docs/keycodes.md index 9f61447dc5e..ba06e1b8b68 100644 --- a/docs/keycodes.md +++ b/docs/keycodes.md @@ -8,205 +8,205 @@ This is a reference only. Each group of keys links to the page documenting their See also: [Basic Keycodes](keycodes_basic.md) -|Key |Aliases |Description |Windows |macOS |Linux1| -|-----------------------|------------------------------|-----------------------------------------------|-------------|-------------|-----------------| -|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | -|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key |*N/A* |*N/A* |*N/A* | -|`KC_A` | |`a` and `A` |✔ |✔ |✔ | -|`KC_B` | |`b` and `B` |✔ |✔ |✔ | -|`KC_C` | |`c` and `C` |✔ |✔ |✔ | -|`KC_D` | |`d` and `D` |✔ |✔ |✔ | -|`KC_E` | |`e` and `E` |✔ |✔ |✔ | -|`KC_F` | |`f` and `F` |✔ |✔ |✔ | -|`KC_G` | |`g` and `G` |✔ |✔ |✔ | -|`KC_H` | |`h` and `H` |✔ |✔ |✔ | -|`KC_I` | |`i` and `I` |✔ |✔ |✔ | -|`KC_J` | |`j` and `J` |✔ |✔ |✔ | -|`KC_K` | |`k` and `K` |✔ |✔ |✔ | -|`KC_L` | |`l` and `L` |✔ |✔ |✔ | -|`KC_M` | |`m` and `M` |✔ |✔ |✔ | -|`KC_N` | |`n` and `N` |✔ |✔ |✔ | -|`KC_O` | |`o` and `O` |✔ |✔ |✔ | -|`KC_P` | |`p` and `P` |✔ |✔ |✔ | -|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | -|`KC_R` | |`r` and `R` |✔ |✔ |✔ | -|`KC_S` | |`s` and `S` |✔ |✔ |✔ | -|`KC_T` | |`t` and `T` |✔ |✔ |✔ | -|`KC_U` | |`u` and `U` |✔ |✔ |✔ | -|`KC_V` | |`v` and `V` |✔ |✔ |✔ | -|`KC_W` | |`w` and `W` |✔ |✔ |✔ | -|`KC_X` | |`x` and `X` |✔ |✔ |✔ | -|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | -|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | -|`KC_1` | |`1` and `!` |✔ |✔ |✔ | -|`KC_2` | |`2` and `@` |✔ |✔ |✔ | -|`KC_3` | |`3` and `#` |✔ |✔ |✔ | -|`KC_4` | |`4` and `$` |✔ |✔ |✔ | -|`KC_5` | |`5` and `%` |✔ |✔ |✔ | -|`KC_6` | |`6` and `^` |✔ |✔ |✔ | -|`KC_7` | |`7` and `&` |✔ |✔ |✔ | -|`KC_8` | |`8` and `*` |✔ |✔ |✔ | -|`KC_9` | |`9` and `(` |✔ |✔ |✔ | -|`KC_0` | |`0` and `)` |✔ |✔ |✔ | -|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | -|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | -|`KC_TAB` | |Tab |✔ |✔ |✔ | -|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | -|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | -|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK` |` and `~`, JIS Zenkaku/Hankaku|✔ |✔ |✔ | -|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | -|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS` |Caps Lock |✔ |✔ |✔ | -|`KC_F1` | |F1 |✔ |✔ |✔ | -|`KC_F2` | |F2 |✔ |✔ |✔ | -|`KC_F3` | |F3 |✔ |✔ |✔ | -|`KC_F4` | |F4 |✔ |✔ |✔ | -|`KC_F5` | |F5 |✔ |✔ |✔ | -|`KC_F6` | |F6 |✔ |✔ |✔ | -|`KC_F7` | |F7 |✔ |✔ |✔ | -|`KC_F8` | |F8 |✔ |✔ |✔ | -|`KC_F9` | |F9 |✔ |✔ |✔ | -|`KC_F10` | |F10 |✔ |✔ |✔ | -|`KC_F11` | |F11 |✔ |✔ |✔ | -|`KC_F12` | |F12 |✔ |✔ |✔ | -|`KC_PSCREEN` |`KC_PSCR` |Print Screen |✔ |✔2|✔ | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔2|✔ | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |✔ |✔2|✔ | -|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | -|`KC_HOME` | |Home |✔ |✔ |✔ | -|`KC_PGUP` | |Page Up |✔ |✔ |✔ | -|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | -|`KC_END` | |End |✔ |✔ |✔ | -|`KC_PGDOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | -|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | -|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | -|`KC_UP` | |Up Arrow |✔ |✔ |✔ | -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear |✔ |✔ |✔ | -|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | -|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | -|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | -|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | -|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | -|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | -|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | -|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | -|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | -|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | -|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | -|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | -|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | -|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | -|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | -|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | -|`KC_NONUS_BSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | -|`KC_POWER` | |System Power | |✔3|✔ | -|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | -|`KC_F13` | |F13 |✔ |✔ |✔ | -|`KC_F14` | |F14 |✔ |✔ |✔ | -|`KC_F15` | |F15 |✔ |✔ |✔ | -|`KC_F16` | |F16 |✔ |✔ |✔ | -|`KC_F17` | |F17 |✔ |✔ |✔ | -|`KC_F18` | |F18 |✔ |✔ |✔ | -|`KC_F19` | |F19 |✔ |✔ |✔ | -|`KC_F20` | |F20 |✔ | |✔ | -|`KC_F21` | |F21 |✔ | |✔ | -|`KC_F22` | |F22 |✔ | |✔ | -|`KC_F23` | |F23 |✔ | |✔ | -|`KC_F24` | |F24 |✔ | |✔ | -|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | -|`KC_HELP` | |Help | | |✔ | -|`KC_MENU` | |Menu | | |✔ | -|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | -|`KC_STOP` | |Stop | | |✔ | -|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | -|`KC_UNDO` | |Undo | | |✔ | -|`KC_CUT` | |Cut | | |✔ | -|`KC_COPY` | |Copy | | |✔ | -|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | -|`KC_FIND` | |Find | | |✔ | -|`KC__MUTE` | |Mute | |✔ |✔ | -|`KC__VOLUP` | |Volume Up | |✔ |✔ | -|`KC__VOLDOWN` | |Volume Down | |✔ |✔ | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | -|`KC_LOCKING_SCROLL` |`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | -|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | -|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | -|`KC_INT1` |`KC_RO` |JIS `\` and `_` |✔ | |✔ | -|`KC_INT2` |`KC_KANA` |JIS Katakana/Hiragana |✔ | |✔ | -|`KC_INT3` |`KC_JYEN` |JIS `¥` and `\|` |✔ | |✔ | -|`KC_INT4` |`KC_HENK` |JIS Henkan |✔ | |✔ | -|`KC_INT5` |`KC_MHEN` |JIS Muhenkan |✔ | |✔ | -|`KC_INT6` | |JIS Numpad `,` | | |✔ | -|`KC_INT7` | |International 7 | | | | -|`KC_INT8` | |International 8 | | | | -|`KC_INT9` | |International 9 | | | | -|`KC_LANG1` |`KC_HAEN` |Hangul/English | | |✔ | -|`KC_LANG2` |`KC_HANJ` |Hanja | | |✔ | -|`KC_LANG3` | |JIS Katakana | | |✔ | -|`KC_LANG4` | |JIS Hiragana | | |✔ | -|`KC_LANG5` | |JIS Zenkaku/Hankaku | | |✔ | -|`KC_LANG6` | |Language 6 | | | | -|`KC_LANG7` | |Language 7 | | | | -|`KC_LANG8` | |Language 8 | | | | -|`KC_LANG9` | |Language 9 | | | | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | | | | -|`KC_SYSREQ` | |SysReq/Attention | | | | -|`KC_CANCEL` | |Cancel | | | | -|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | -|`KC_PRIOR` | |Prior | | | | -|`KC_RETURN` | |Return | | | | -|`KC_SEPARATOR` | |Separator | | | | -|`KC_OUT` | |Out | | | | -|`KC_OPER` | |Oper | | | | -|`KC_CLEAR_AGAIN` | |Clear/Again | | | | -|`KC_CRSEL` | |CrSel/Props | | | | -|`KC_EXSEL` | |ExSel | | | | -|`KC_LCTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | -|`KC_LSHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | -|`KC_LALT` |`KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN` |Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | -|`KC_RCTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | -|`KC_RSHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | -|`KC_RALT` |`KC_ROPT`, `KC_ALGR` |Right Alt (Option/AltGr) |✔ |✔ |✔ | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN` |Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | -|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔3|✔ | -|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔3|✔ | -|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔3|✔ | -|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | -|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔4|✔ | -|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔4|✔ | -|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔5|✔ | -|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔5|✔ | -|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | -|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | -|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | -|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | -|`KC_MAIL` | |Launch Mail |✔ | |✔ | -|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | -|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | -|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | -|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | -|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | -|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | -|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | -|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | -|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | -|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD` |Next Track |✔ |✔5|✔ | -|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔6|✔5|✔ | -|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | -|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | +|Key |Aliases |Description |Windows |macOS |Linux1| +|------------------------|-------------------------------|---------------------------------------|-------------|-------------|-----------------| +|`KC_NO` |`XXXXXXX` |Ignore this key (NOOP) |*N/A* |*N/A* |*N/A* | +|`KC_TRANSPARENT` |`KC_TRNS`, `_______` |Use the next lowest non-transparent key|*N/A* |*N/A* |*N/A* | +|`KC_A` | |`a` and `A` |✔ |✔ |✔ | +|`KC_B` | |`b` and `B` |✔ |✔ |✔ | +|`KC_C` | |`c` and `C` |✔ |✔ |✔ | +|`KC_D` | |`d` and `D` |✔ |✔ |✔ | +|`KC_E` | |`e` and `E` |✔ |✔ |✔ | +|`KC_F` | |`f` and `F` |✔ |✔ |✔ | +|`KC_G` | |`g` and `G` |✔ |✔ |✔ | +|`KC_H` | |`h` and `H` |✔ |✔ |✔ | +|`KC_I` | |`i` and `I` |✔ |✔ |✔ | +|`KC_J` | |`j` and `J` |✔ |✔ |✔ | +|`KC_K` | |`k` and `K` |✔ |✔ |✔ | +|`KC_L` | |`l` and `L` |✔ |✔ |✔ | +|`KC_M` | |`m` and `M` |✔ |✔ |✔ | +|`KC_N` | |`n` and `N` |✔ |✔ |✔ | +|`KC_O` | |`o` and `O` |✔ |✔ |✔ | +|`KC_P` | |`p` and `P` |✔ |✔ |✔ | +|`KC_Q` | |`q` and `Q` |✔ |✔ |✔ | +|`KC_R` | |`r` and `R` |✔ |✔ |✔ | +|`KC_S` | |`s` and `S` |✔ |✔ |✔ | +|`KC_T` | |`t` and `T` |✔ |✔ |✔ | +|`KC_U` | |`u` and `U` |✔ |✔ |✔ | +|`KC_V` | |`v` and `V` |✔ |✔ |✔ | +|`KC_W` | |`w` and `W` |✔ |✔ |✔ | +|`KC_X` | |`x` and `X` |✔ |✔ |✔ | +|`KC_Y` | |`y` and `Y` |✔ |✔ |✔ | +|`KC_Z` | |`z` and `Z` |✔ |✔ |✔ | +|`KC_1` | |`1` and `!` |✔ |✔ |✔ | +|`KC_2` | |`2` and `@` |✔ |✔ |✔ | +|`KC_3` | |`3` and `#` |✔ |✔ |✔ | +|`KC_4` | |`4` and `$` |✔ |✔ |✔ | +|`KC_5` | |`5` and `%` |✔ |✔ |✔ | +|`KC_6` | |`6` and `^` |✔ |✔ |✔ | +|`KC_7` | |`7` and `&` |✔ |✔ |✔ | +|`KC_8` | |`8` and `*` |✔ |✔ |✔ | +|`KC_9` | |`9` and `(` |✔ |✔ |✔ | +|`KC_0` | |`0` and `)` |✔ |✔ |✔ | +|`KC_ENTER` |`KC_ENT` |Return (Enter) |✔ |✔ |✔ | +|`KC_ESCAPE` |`KC_ESC` |Escape |✔ |✔ |✔ | +|`KC_BACKSPACE` |`KC_BSPC` |Delete (Backspace) |✔ |✔ |✔ | +|`KC_TAB` | |Tab |✔ |✔ |✔ | +|`KC_SPACE` |`KC_SPC` |Spacebar |✔ |✔ |✔ | +|`KC_MINUS` |`KC_MINS` |`-` and `_` |✔ |✔ |✔ | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` |✔ |✔ |✔ | +|`KC_LEFT_BRACKET` |`KC_LBRC` |`[` and `{` |✔ |✔ |✔ | +|`KC_RIGHT_BRACKET` |`KC_RBRC` |`]` and `}` |✔ |✔ |✔ | +|`KC_BACKSLASH` |`KC_BSLS` |`\` and `\|` |✔ |✔ |✔ | +|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` |✔ |✔ |✔ | +|`KC_SEMICOLON` |`KC_SCLN` |`;` and `:` |✔ |✔ |✔ | +|`KC_QUOTE` |`KC_QUOT` |`'` and `"` |✔ |✔ |✔ | +|`KC_GRAVE` |`KC_GRV` |` and `~` |✔ |✔ |✔ | +|`KC_COMMA` |`KC_COMM` |`,` and `<` |✔ |✔ |✔ | +|`KC_DOT` | |`.` and `>` |✔ |✔ |✔ | +|`KC_SLASH` |`KC_SLSH` |`/` and `?` |✔ |✔ |✔ | +|`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock |✔ |✔ |✔ | +|`KC_F1` | |F1 |✔ |✔ |✔ | +|`KC_F2` | |F2 |✔ |✔ |✔ | +|`KC_F3` | |F3 |✔ |✔ |✔ | +|`KC_F4` | |F4 |✔ |✔ |✔ | +|`KC_F5` | |F5 |✔ |✔ |✔ | +|`KC_F6` | |F6 |✔ |✔ |✔ | +|`KC_F7` | |F7 |✔ |✔ |✔ | +|`KC_F8` | |F8 |✔ |✔ |✔ | +|`KC_F9` | |F9 |✔ |✔ |✔ | +|`KC_F10` | |F10 |✔ |✔ |✔ | +|`KC_F11` | |F11 |✔ |✔ |✔ | +|`KC_F12` | |F12 |✔ |✔ |✔ | +|`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen |✔ |✔2|✔ | +|`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD` |Scroll Lock, Brightness Down (macOS) |✔ |✔2|✔ | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU` |Pause, Brightness Up (macOS) |✔ |✔2|✔ | +|`KC_INSERT` |`KC_INS` |Insert |✔ | |✔ | +|`KC_HOME` | |Home |✔ |✔ |✔ | +|`KC_PAGE_UP` |`KC_PGUP` |Page Up |✔ |✔ |✔ | +|`KC_DELETE` |`KC_DEL` |Forward Delete |✔ |✔ |✔ | +|`KC_END` | |End |✔ |✔ |✔ | +|`KC_PAGE_DOWN` |`KC_PGDN` |Page Down |✔ |✔ |✔ | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow |✔ |✔ |✔ | +|`KC_LEFT` | |Left Arrow |✔ |✔ |✔ | +|`KC_DOWN` | |Down Arrow |✔ |✔ |✔ | +|`KC_UP` | |Up Arrow |✔ |✔ |✔ | +|`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear |✔ |✔ |✔ | +|`KC_KP_SLASH` |`KC_PSLS` |Keypad `/` |✔ |✔ |✔ | +|`KC_KP_ASTERISK` |`KC_PAST` |Keypad `*` |✔ |✔ |✔ | +|`KC_KP_MINUS` |`KC_PMNS` |Keypad `-` |✔ |✔ |✔ | +|`KC_KP_PLUS` |`KC_PPLS` |Keypad `+` |✔ |✔ |✔ | +|`KC_KP_ENTER` |`KC_PENT` |Keypad Enter |✔ |✔ |✔ | +|`KC_KP_1` |`KC_P1` |Keypad `1` and End |✔ |✔ |✔ | +|`KC_KP_2` |`KC_P2` |Keypad `2` and Down Arrow |✔ |✔ |✔ | +|`KC_KP_3` |`KC_P3` |Keypad `3` and Page Down |✔ |✔ |✔ | +|`KC_KP_4` |`KC_P4` |Keypad `4` and Left Arrow |✔ |✔ |✔ | +|`KC_KP_5` |`KC_P5` |Keypad `5` |✔ |✔ |✔ | +|`KC_KP_6` |`KC_P6` |Keypad `6` and Right Arrow |✔ |✔ |✔ | +|`KC_KP_7` |`KC_P7` |Keypad `7` and Home |✔ |✔ |✔ | +|`KC_KP_8` |`KC_P8` |Keypad `8` and Up Arrow |✔ |✔ |✔ | +|`KC_KP_9` |`KC_P9` |Keypad `9` and Page Up |✔ |✔ |✔ | +|`KC_KP_0` |`KC_P0` |Keypad `0` and Insert |✔ |✔ |✔ | +|`KC_KP_DOT` |`KC_PDOT` |Keypad `.` and Delete |✔ |✔ |✔ | +|`KC_NONUS_BACKSLASH` |`KC_NUBS` |Non-US `\` and `\|` |✔ |✔ |✔ | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key) |✔ | |✔ | +|`KC_KB_POWER` | |System Power | |✔3|✔ | +|`KC_KP_EQUAL` |`KC_PEQL` |Keypad `=` |✔ |✔ |✔ | +|`KC_F13` | |F13 |✔ |✔ |✔ | +|`KC_F14` | |F14 |✔ |✔ |✔ | +|`KC_F15` | |F15 |✔ |✔ |✔ | +|`KC_F16` | |F16 |✔ |✔ |✔ | +|`KC_F17` | |F17 |✔ |✔ |✔ | +|`KC_F18` | |F18 |✔ |✔ |✔ | +|`KC_F19` | |F19 |✔ |✔ |✔ | +|`KC_F20` | |F20 |✔ | |✔ | +|`KC_F21` | |F21 |✔ | |✔ | +|`KC_F22` | |F22 |✔ | |✔ | +|`KC_F23` | |F23 |✔ | |✔ | +|`KC_F24` | |F24 |✔ | |✔ | +|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ | +|`KC_HELP` | |Help | | |✔ | +|`KC_MENU` | |Menu | | |✔ | +|`KC_SELECT` |`KC_SLCT` |Select | | |✔ | +|`KC_STOP` | |Stop | | |✔ | +|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ | +|`KC_UNDO` | |Undo | | |✔ | +|`KC_CUT` | |Cut | | |✔ | +|`KC_COPY` | |Copy | | |✔ | +|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ | +|`KC_FIND` | |Find | | |✔ | +|`KC_KB_MUTE` | |Mute | |✔ |✔ | +|`KC_KB_VOLUME_UP` | |Volume Up | |✔ |✔ | +|`KC_KB_VOLUME_DOWN` | |Volume Down | |✔ |✔ | +|`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock |✔ |✔ | | +|`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock |✔ |✔ | | +|`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock |✔ |✔ | | +|`KC_KP_COMMA` |`KC_PCMM` |Keypad `,` | | |✔ | +|`KC_KP_EQUAL_AS400` | |Keypad `=` on AS/400 keyboards | | | | +|`KC_INTERNATIONAL_1` |`KC_INT1` |International 1 |✔ | |✔ | +|`KC_INTERNATIONAL_2` |`KC_INT2` |International 2 |✔ | |✔ | +|`KC_INTERNATIONAL_3` |`KC_INT3` |International 3 |✔ | |✔ | +|`KC_INTERNATIONAL_4` |`KC_INT4` |International 4 |✔ | |✔ | +|`KC_INTERNATIONAL_5` |`KC_INT5` |International 5 |✔ | |✔ | +|`KC_INTERNATIONAL_6` |`KC_INT6` |International 6 | | |✔ | +|`KC_INTERNATIONAL_7` |`KC_INT7` |International 7 | | | | +|`KC_INTERNATIONAL_8` |`KC_INT8` |International 8 | | | | +|`KC_INTERNATIONAL_9` |`KC_INT9` |International 9 | | | | +|`KC_LANGUAGE_1` |`KC_LNG1` |Language 1 | | |✔ | +|`KC_LANGUAGE_2` |`KC_LNG2` |Language 2 | | |✔ | +|`KC_LANGUAGE_3` |`KC_LNG3` |Language 3 | | |✔ | +|`KC_LANGUAGE_4` |`KC_LNG4` |Language 4 | | |✔ | +|`KC_LANGUAGE_5` |`KC_LNG5` |Language 5 | | |✔ | +|`KC_LANGUAGE_6` |`KC_LNG6` |Language 6 | | | | +|`KC_LANGUAGE_7` |`KC_LNG7` |Language 7 | | | | +|`KC_LANGUAGE_8` |`KC_LNG8` |Language 8 | | | | +|`KC_LANGUAGE_9` |`KC_LNG9` |Language 9 | | | | +|`KC_ALTERNATE_ERASE` |`KC_ERAS` |Alternate Erase | | | | +|`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | | | | +|`KC_CANCEL` |`KC_CNCL` |Cancel | | | | +|`KC_CLEAR` |`KC_CLR` |Clear | | |✔ | +|`KC_PRIOR` |`KC_PRIR` |Prior | | | | +|`KC_RETURN` |`KC_RETN` |Return | | | | +|`KC_SEPARATOR` |`KC_SEPR` |Separator | | | | +|`KC_OUT` | |Out | | | | +|`KC_OPER` | |Oper | | | | +|`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | | | | +|`KC_CRSEL` |`KC_CRSL` |CrSel/Props | | | | +|`KC_EXSEL` |`KC_EXSL` |ExSel | | | | +|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control |✔ |✔ |✔ | +|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift |✔ |✔ |✔ | +|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) |✔ |✔ |✔ | +|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control |✔ |✔ |✔ | +|`KC_RIGHT_SHIFT` |`KC_RSFT` |Right Shift |✔ |✔ |✔ | +|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) |✔ |✔ |✔ | +|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key) |✔ |✔ |✔ | +|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |✔ |✔3|✔ | +|`KC_SYSTEM_SLEEP` |`KC_SLEP` |System Sleep |✔ |✔3|✔ | +|`KC_SYSTEM_WAKE` |`KC_WAKE` |System Wake | |✔3|✔ | +|`KC_AUDIO_MUTE` |`KC_MUTE` |Mute |✔ |✔ |✔ | +|`KC_AUDIO_VOL_UP` |`KC_VOLU` |Volume Up |✔ |✔4|✔ | +|`KC_AUDIO_VOL_DOWN` |`KC_VOLD` |Volume Down |✔ |✔4|✔ | +|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT` |Next Track |✔ |✔5|✔ | +|`KC_MEDIA_PREV_TRACK` |`KC_MPRV` |Previous Track |✔ |✔5|✔ | +|`KC_MEDIA_STOP` |`KC_MSTP` |Stop Track |✔ | |✔ | +|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY` |Play/Pause Track |✔ |✔ |✔ | +|`KC_MEDIA_SELECT` |`KC_MSEL` |Launch Media Player |✔ | |✔ | +|`KC_MEDIA_EJECT` |`KC_EJCT` |Eject | |✔ |✔ | +|`KC_MAIL` | |Launch Mail |✔ | |✔ | +|`KC_CALCULATOR` |`KC_CALC` |Launch Calculator |✔ | |✔ | +|`KC_MY_COMPUTER` |`KC_MYCM` |Launch My Computer |✔ | |✔ | +|`KC_WWW_SEARCH` |`KC_WSCH` |Browser Search |✔ | |✔ | +|`KC_WWW_HOME` |`KC_WHOM` |Browser Home |✔ | |✔ | +|`KC_WWW_BACK` |`KC_WBAK` |Browser Back |✔ | |✔ | +|`KC_WWW_FORWARD` |`KC_WFWD` |Browser Forward |✔ | |✔ | +|`KC_WWW_STOP` |`KC_WSTP` |Browser Stop |✔ | |✔ | +|`KC_WWW_REFRESH` |`KC_WREF` |Browser Refresh |✔ | |✔ | +|`KC_WWW_FAVORITES` |`KC_WFAV` |Browser Favorites |✔ | |✔ | +|`KC_MEDIA_FAST_FORWARD` |`KC_MFFD` |Next Track |✔ |✔5|✔ | +|`KC_MEDIA_REWIND` |`KC_MRWD` |Previous Track |✔6|✔5|✔ | +|`KC_BRIGHTNESS_UP` |`KC_BRIU` |Brightness Up |✔ |✔ |✔ | +|`KC_BRIGHTNESS_DOWN` |`KC_BRID` |Brightness Down |✔ |✔ |✔ | 1. The Linux kernel HID driver recognizes [nearly all keycodes](https://github.com/torvalds/linux/blob/master/drivers/hid/hid-input.c), but the default bindings depend on the DE/WM.
2. Treated as F13-F15.
@@ -586,6 +586,16 @@ See also: [Mod-Tap](mod_tap.md) |`MEH_T(kc)` | |Left Control, Shift and Alt when held, `kc` when tapped | |`HYPR_T(kc)` |`ALL_T(kc)` |Left Control, Shift, Alt and GUI when held, `kc` when tapped - more info [here](https://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/)| +## Tapping Term Keys :id=tapping-term-keys + +See also: [Dynamic Tapping Term](tap_hold#dynamic-tapping-term) + +| Key | Description | +|-------------|------------------------------------------------------------------------------------------------------------------------| +| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | +| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | +| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | + ## RGB Lighting :id=rgb-lighting See also: [RGB Lighting](feature_rgblight.md) @@ -678,6 +688,46 @@ See also: [One Shot Keys](one_shot_keys.md) |`OS_OFF` |Turns One Shot keys off | |`OS_TOGG` |Toggles One Shot keys status | +## Programmable Button Support :id=programmable-button + +See also: [Programmable Button](feature_programmable_button.md) + +|Key |Description | +|------------------------|----------------------| +|`PROGRAMMABLE_BUTTON_1` |Programmable button 1 | +|`PROGRAMMABLE_BUTTON_2` |Programmable button 2 | +|`PROGRAMMABLE_BUTTON_3` |Programmable button 3 | +|`PROGRAMMABLE_BUTTON_4` |Programmable button 4 | +|`PROGRAMMABLE_BUTTON_5` |Programmable button 5 | +|`PROGRAMMABLE_BUTTON_6` |Programmable button 6 | +|`PROGRAMMABLE_BUTTON_7` |Programmable button 7 | +|`PROGRAMMABLE_BUTTON_8` |Programmable button 8 | +|`PROGRAMMABLE_BUTTON_9` |Programmable button 9 | +|`PROGRAMMABLE_BUTTON_10`|Programmable button 10| +|`PROGRAMMABLE_BUTTON_11`|Programmable button 11| +|`PROGRAMMABLE_BUTTON_12`|Programmable button 12| +|`PROGRAMMABLE_BUTTON_13`|Programmable button 13| +|`PROGRAMMABLE_BUTTON_14`|Programmable button 14| +|`PROGRAMMABLE_BUTTON_15`|Programmable button 15| +|`PROGRAMMABLE_BUTTON_16`|Programmable button 16| +|`PROGRAMMABLE_BUTTON_17`|Programmable button 17| +|`PROGRAMMABLE_BUTTON_18`|Programmable button 18| +|`PROGRAMMABLE_BUTTON_19`|Programmable button 19| +|`PROGRAMMABLE_BUTTON_20`|Programmable button 20| +|`PROGRAMMABLE_BUTTON_21`|Programmable button 21| +|`PROGRAMMABLE_BUTTON_22`|Programmable button 22| +|`PROGRAMMABLE_BUTTON_23`|Programmable button 23| +|`PROGRAMMABLE_BUTTON_24`|Programmable button 24| +|`PROGRAMMABLE_BUTTON_25`|Programmable button 25| +|`PROGRAMMABLE_BUTTON_26`|Programmable button 26| +|`PROGRAMMABLE_BUTTON_27`|Programmable button 27| +|`PROGRAMMABLE_BUTTON_28`|Programmable button 28| +|`PROGRAMMABLE_BUTTON_29`|Programmable button 29| +|`PROGRAMMABLE_BUTTON_30`|Programmable button 30| +|`PROGRAMMABLE_BUTTON_31`|Programmable button 31| +|`PROGRAMMABLE_BUTTON_32`|Programmable button 32| +|`PB_1` to `PB_32` |Aliases for keymaps | + ## Space Cadet :id=space-cadet See also: [Space Cadet](feature_space_cadet.md) diff --git a/docs/keycodes_basic.md b/docs/keycodes_basic.md index 6a31204f334..6f6ef7a3fde 100644 --- a/docs/keycodes_basic.md +++ b/docs/keycodes_basic.md @@ -74,118 +74,118 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07 ## Punctuation -|Key |Aliases |Description | -|-----------------|-------------------|-----------------------------------------------| -|`KC_ENTER` |`KC_ENT` |Return (Enter) | -|`KC_ESCAPE` |`KC_ESC` |Escape | -|`KC_BSPACE` |`KC_BSPC` |Delete (Backspace) | -|`KC_TAB` | |Tab | -|`KC_SPACE` |`KC_SPC` |Spacebar | -|`KC_MINUS` |`KC_MINS` |`-` and `_` | -|`KC_EQUAL` |`KC_EQL` |`=` and `+` | -|`KC_LBRACKET` |`KC_LBRC` |`[` and `{` | -|`KC_RBRACKET` |`KC_RBRC` |`]` and `}` | -|`KC_BSLASH` |`KC_BSLS` |`\` and `\|` | -|`KC_NONUS_HASH` |`KC_NUHS` |Non-US `#` and `~` | -|`KC_SCOLON` |`KC_SCLN` |`;` and `:` | -|`KC_QUOTE` |`KC_QUOT` |`'` and `"` | -|`KC_GRAVE` |`KC_GRV`, `KC_ZKHK`|` and `~`, JIS Zenkaku/Hankaku| -|`KC_COMMA` |`KC_COMM` |`,` and `<` | -|`KC_DOT` | |`.` and `>` | -|`KC_SLASH` |`KC_SLSH` |`/` and `?` | -|`KC_NONUS_BSLASH`|`KC_NUBS` |Non-US `\` and `\|` | +|Key |Aliases |Description | +|--------------------|---------|--------------------------| +|`KC_ENTER` |`KC_ENT` |Return (Enter) | +|`KC_ESCAPE` |`KC_ESC` |Escape | +|`KC_BACKSPACE` |`KC_BSPC`|Delete (Backspace) | +|`KC_TAB` | |Tab | +|`KC_SPACE` |`KC_SPC` |Spacebar | +|`KC_MINUS` |`KC_MINS`|`-` and `_` | +|`KC_EQUAL` |`KC_EQL` |`=` and `+` | +|`KC_LEFT_BRACKET` |`KC_LBRC`|`[` and `{` | +|`KC_RIGHT_BRACKET` |`KC_RBRC`|`]` and `}` | +|`KC_BACKSLASH` |`KC_BSLS`|`\` and `\|` | +|`KC_NONUS_HASH` |`KC_NUHS`|Non-US `#` and `~` | +|`KC_SEMICOLON` |`KC_SCLN`|`;` and `:` | +|`KC_QUOTE` |`KC_QUOT`|`'` and `"` | +|`KC_GRAVE` |`KC_GRV` |` and `~`| +|`KC_COMMA` |`KC_COMM`|`,` and `<` | +|`KC_DOT` | |`.` and `>` | +|`KC_SLASH` |`KC_SLSH`|`/` and `?` | +|`KC_NONUS_BACKSLASH`|`KC_NUBS`|Non-US `\` and `\|` | ## Lock Keys -|Key |Aliases |Description | -|-------------------|--------------------|------------------------------------| -|`KC_CAPSLOCK` |`KC_CLCK`, `KC_CAPS`|Caps Lock | -|`KC_SCROLLLOCK` |`KC_SLCK`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| -|`KC_NUMLOCK` |`KC_NLCK` |Keypad Num Lock and Clear | -|`KC_LOCKING_CAPS` |`KC_LCAP` |Locking Caps Lock | -|`KC_LOCKING_NUM` |`KC_LNUM` |Locking Num Lock | -|`KC_LOCKING_SCROLL`|`KC_LSCR` |Locking Scroll Lock | +|Key |Aliases |Description | +|------------------------|--------------------|------------------------------------| +|`KC_CAPS_LOCK` |`KC_CAPS` |Caps Lock | +|`KC_SCROLL_LOCK` |`KC_SCRL`, `KC_BRMD`|Scroll Lock, Brightness Down (macOS)| +|`KC_NUM_LOCK` |`KC_NUM` |Keypad Num Lock and Clear | +|`KC_LOCKING_CAPS_LOCK` |`KC_LCAP` |Locking Caps Lock | +|`KC_LOCKING_NUM_LOCK` |`KC_LNUM` |Locking Num Lock | +|`KC_LOCKING_SCROLL_LOCK`|`KC_LSCR` |Locking Scroll Lock | ## Modifiers -|Key |Aliases |Description | -|-----------|--------------------|------------------------------------| -|`KC_LCTRL` |`KC_LCTL` |Left Control | -|`KC_LSHIFT`|`KC_LSFT` |Left Shift | -|`KC_LALT` |`KC_LOPT` |Left Alt (Option) | -|`KC_LGUI` |`KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | -|`KC_RCTRL` |`KC_RCTL` |Right Control | -|`KC_RSHIFT`|`KC_RSFT` |Right Shift | -|`KC_RALT` |`KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | -|`KC_RGUI` |`KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| +|Key |Aliases |Description | +|----------------|-------------------------------|------------------------------------| +|`KC_LEFT_CTRL` |`KC_LCTL` |Left Control | +|`KC_LEFT_SHIFT` |`KC_LSFT` |Left Shift | +|`KC_LEFT_ALT` |`KC_LALT`, `KC_LOPT` |Left Alt (Option) | +|`KC_LEFT_GUI` |`KC_LGUI`, `KC_LCMD`, `KC_LWIN`|Left GUI (Windows/Command/Meta key) | +|`KC_RIGHT_CTRL` |`KC_RCTL` |Right Control | +|`KC_RIGHT_SHIFT`|`KC_RSFT` |Right Shift | +|`KC_RIGHT_ALT` |`KC_RALT`, `KC_ROPT`, `KC_ALGR`|Right Alt (Option/AltGr) | +|`KC_RIGHT_GUI` |`KC_RGUI`, `KC_RCMD`, `KC_RWIN`|Right GUI (Windows/Command/Meta key)| ## International -|Key |Aliases |Description | -|----------|---------|---------------------| -|`KC_INT1` |`KC_RO` |JIS `\` and `_` | -|`KC_INT2` |`KC_KANA`|JIS Katakana/Hiragana| -|`KC_INT3` |`KC_JYEN`|JIS `¥` and `\|` | -|`KC_INT4` |`KC_HENK`|JIS Henkan | -|`KC_INT5` |`KC_MHEN`|JIS Muhenkan | -|`KC_INT6` | |JIS Numpad `,` | -|`KC_INT7` | |International 7 | -|`KC_INT8` | |International 8 | -|`KC_INT9` | |International 9 | -|`KC_LANG1`|`KC_HAEN`|Hangul/English | -|`KC_LANG2`|`KC_HANJ`|Hanja | -|`KC_LANG3`| |JIS Katakana | -|`KC_LANG4`| |JIS Hiragana | -|`KC_LANG5`| |JIS Zenkaku/Hankaku | -|`KC_LANG6`| |Language 6 | -|`KC_LANG7`| |Language 7 | -|`KC_LANG8`| |Language 8 | -|`KC_LANG9`| |Language 9 | +|Key |Aliases |Description | +|--------------------|---------|---------------------| +|`KC_INTERNATIONAL_1`|`KC_INT1`|JIS `\` and `_` | +|`KC_INTERNATIONAL_2`|`KC_INT2`|JIS Katakana/Hiragana| +|`KC_INTERNATIONAL_3`|`KC_INT3`|JIS `¥` and `\|` | +|`KC_INTERNATIONAL_4`|`KC_INT4`|JIS Henkan | +|`KC_INTERNATIONAL_5`|`KC_INT5`|JIS Muhenkan | +|`KC_INTERNATIONAL_6`|`KC_INT6`|JIS Numpad `,` | +|`KC_INTERNATIONAL_7`|`KC_INT7`|International 7 | +|`KC_INTERNATIONAL_8`|`KC_INT8`|International 8 | +|`KC_INTERNATIONAL_9`|`KC_INT9`|International 9 | +|`KC_LANGUAGE_1` |`KC_LNG1`|Hangul/English | +|`KC_LANGUAGE_2` |`KC_LNG2`|Hanja | +|`KC_LANGUAGE_3` |`KC_LNG3`|JIS Katakana | +|`KC_LANGUAGE_4` |`KC_LNG4`|JIS Hiragana | +|`KC_LANGUAGE_5` |`KC_LNG5`|JIS Zenkaku/Hankaku | +|`KC_LANGUAGE_6` |`KC_LNG6`|Language 6 | +|`KC_LANGUAGE_7` |`KC_LNG7`|Language 7 | +|`KC_LANGUAGE_8` |`KC_LNG8`|Language 8 | +|`KC_LANGUAGE_9` |`KC_LNG9`|Language 9 | ## Commands -|Key |Aliases |Description | -|------------------|------------------------------|--------------------------------------| -|`KC_PSCREEN` |`KC_PSCR` |Print Screen | -|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | -|`KC_INSERT` |`KC_INS` |Insert | -|`KC_HOME` | |Home | -|`KC_PGUP` | |Page Up | -|`KC_DELETE` |`KC_DEL` |Forward Delete | -|`KC_END` | |End | -|`KC_PGDOWN` |`KC_PGDN` |Page Down | -|`KC_RIGHT` |`KC_RGHT` |Right Arrow | -|`KC_LEFT` | |Left Arrow | -|`KC_DOWN` | |Down Arrow | -|`KC_UP` | |Up Arrow | -|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| -|`KC_POWER` | |System Power | -|`KC_EXECUTE` |`KC_EXEC` |Execute | -|`KC_HELP` | |Help | -|`KC_MENU` | |Menu | -|`KC_SELECT` |`KC_SLCT` |Select | -|`KC_STOP` | |Stop | -|`KC_AGAIN` |`KC_AGIN` |Again | -|`KC_UNDO` | |Undo | -|`KC_CUT` | |Cut | -|`KC_COPY` | |Copy | -|`KC_PASTE` |`KC_PSTE` |Paste | -|`KC_FIND` | |Find | -|`KC__MUTE` | |Mute | -|`KC__VOLUP` | |Volume Up | -|`KC__VOLDOWN` | |Volume Down | -|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase | -|`KC_SYSREQ` | |SysReq/Attention | -|`KC_CANCEL` | |Cancel | -|`KC_CLEAR` |`KC_CLR` |Clear | -|`KC_PRIOR` | |Prior | -|`KC_RETURN` | |Return | -|`KC_SEPARATOR` | |Separator | -|`KC_OUT` | |Out | -|`KC_OPER` | |Oper | -|`KC_CLEAR_AGAIN` | |Clear/Again | -|`KC_CRSEL` | |CrSel/Props | -|`KC_EXSEL` | |ExSel | +|Key |Aliases |Description | +|--------------------|------------------------------|--------------------------------------| +|`KC_PRINT_SCREEN` |`KC_PSCR` |Print Screen | +|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) | +|`KC_INSERT` |`KC_INS` |Insert | +|`KC_HOME` | |Home | +|`KC_PAGE_UP` |`KC_PGUP` |Page Up | +|`KC_DELETE` |`KC_DEL` |Forward Delete | +|`KC_END` | |End | +|`KC_PAGE_DOWN` |`KC_PGDN` |Page Down | +|`KC_RIGHT` |`KC_RGHT` |Right Arrow | +|`KC_LEFT` | |Left Arrow | +|`KC_DOWN` | |Down Arrow | +|`KC_UP` | |Up Arrow | +|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)| +|`KC_KB_POWER` | |System Power | +|`KC_EXECUTE` |`KC_EXEC` |Execute | +|`KC_HELP` | |Help | +|`KC_MENU` | |Menu | +|`KC_SELECT` |`KC_SLCT` |Select | +|`KC_STOP` | |Stop | +|`KC_AGAIN` |`KC_AGIN` |Again | +|`KC_UNDO` | |Undo | +|`KC_CUT` | |Cut | +|`KC_COPY` | |Copy | +|`KC_PASTE` |`KC_PSTE` |Paste | +|`KC_FIND` | |Find | +|`KC_KB_MUTE` | |Mute | +|`KC_KB_VOLUME_UP` | |Volume Up | +|`KC_KB_VOLUME_DOWN` | |Volume Down | +|`KC_ALTERNATE_ERASE`|`KC_ERAS` |Alternate Erase | +|`KC_SYSTEM_REQUEST` |`KC_SYRQ` |SysReq/Attention | +|`KC_CANCEL` |`KC_CNCL` |Cancel | +|`KC_CLEAR` |`KC_CLR` |Clear | +|`KC_PRIOR` |`KC_PRIR` |Prior | +|`KC_RETURN` |`KC_RETN` |Return | +|`KC_SEPARATOR` |`KC_SEPR` |Separator | +|`KC_OUT` | |Out | +|`KC_OPER` | |Oper | +|`KC_CLEAR_AGAIN` |`KC_CLAG` |Clear/Again | +|`KC_CRSEL` |`KC_CRSL` |CrSel/Props | +|`KC_EXSEL` |`KC_EXSL` |ExSel | ## Media Keys diff --git a/docs/keymap.md b/docs/keymap.md index ef476e87f5b..bec781e684e 100644 --- a/docs/keymap.md +++ b/docs/keymap.md @@ -105,7 +105,7 @@ At the top of the file you'll find this: #include QMK_KEYBOARD_H // Helpful defines - #define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) + #define GRAVE_MODS (MOD_BIT(KC_LSFT)|MOD_BIT(KC_RSFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * You can use _______ in place for KC_TRNS (transparent) * @@ -164,7 +164,7 @@ Our function layer is, from a code point of view, no different from the base lay [_FL] = LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, BL_STEP, \ - _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SCRL, KC_PAUS, _______, _______, _______, _______, \ _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ _______, _______, _______, _______, _______,_______, _______, _______, _______, MO(_FL), KC_HOME, KC_PGDN, KC_END), diff --git a/docs/newbs_git_resynchronize_a_branch.md b/docs/newbs_git_resynchronize_a_branch.md index 3e7acdba7ad..1d0e4dda163 100644 --- a/docs/newbs_git_resynchronize_a_branch.md +++ b/docs/newbs_git_resynchronize_a_branch.md @@ -8,7 +8,7 @@ Suppose you have committed to your `master` branch, and now need to update your No one wants to lose work if it can be helped. If you want to save the changes you've already made to your `master` branch, the simplest way to do so is to simply create a duplicate of your "dirty" `master` branch: -```sh +``` git branch old_master master ``` @@ -18,7 +18,7 @@ Now you have a branch named `old_master` that is a duplicate of your `master` br Now it's time to resynchronize your `master` branch. For this step, you'll want to have QMK's repository configured as a remote in Git. To check your configured remotes, run `git remote -v`, which should return something similar to: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com//qmk_firmware.git (fetch) @@ -29,7 +29,7 @@ upstream https://github.com/qmk/qmk_firmware.git (push) If you only see one fork referenced: -```sh +``` QMKuser ~/qmk_firmware (master) $ git remote -v origin https://github.com/qmk/qmk_firmware.git (fetch) @@ -38,31 +38,31 @@ origin https://github.com/qmk/qmk_firmware.git (push) add a new remote with: -```sh +``` git remote add upstream https://github.com/qmk/qmk_firmware.git ``` Then, redirect the `origin` remote to your own fork with: -```sh +``` git remote set-url origin https://github.com//qmk_firmware.git ``` Now that you have both remotes configured, you need to update the references for the upstream repository, which is QMK's, by running: -```sh +``` git fetch upstream ``` At this point, resynchronize your branch to QMK's by running: -```sh +``` git reset --hard upstream/master ``` These steps will update the repository on your computer, but your GitHub fork will still be out of sync. To resynchronize your fork on GitHub, you need to push to your fork, instructing Git to override any remote changes that are not reflected in your local repository. To do this, run: -```sh +``` git push --force-with-lease ``` diff --git a/docs/pr_checklist.md b/docs/pr_checklist.md index 94c62c65354..25f3d7662ed 100644 --- a/docs/pr_checklist.md +++ b/docs/pr_checklist.md @@ -24,7 +24,7 @@ If there are any inconsistencies with these recommendations, you're best off [cr - no "old-school" or other low-level GPIO/I2C/SPI functions may be used -- must use QMK abstractions unless justifiable (and laziness is not valid justification) - timing abstractions should be followed too: - `wait_ms()` instead of `_delay_ms()` (remove `#include ` too) - - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/timer.h) for the timing APIs + - `timer_read()` and `timer_read32()` etc. -- see [timer.h](https://github.com/qmk/qmk_firmware/blob/master/platforms/timer.h) for the timing APIs - if you think a new abstraction is useful, you're encouraged to: - prototype it in your own keyboard until it's feature-complete - discuss it with QMK Collaborators on Discord @@ -118,6 +118,10 @@ Also, specific to ChibiOS: ## Core PRs - must now target `develop` branch, which will subsequently be merged back to `master` on the breaking changes timeline +- any support for new hardware now requires a corresponding test board under `keyboards/handwired/onekey` + - for new MCUs, a new "child" keyboard should be added that targets your newly-added MCU, so that builds can be verified + - for new hardware support such as display panels, core-side matrix implementations, or other peripherals, an associated keymap should be provided + - if an existing keymap exists that can leverage this functionality this may not be required (e.g. a new RGB driver chip, supported by the `rgb` keymap) -- consult with the QMK Collaborators on Discord to determine if there is sufficient overlap already - other requirements are at the discretion of QMK collaborators - core is a lot more subjective given the breadth of posted changes diff --git a/docs/reference_configurator_support.md b/docs/reference_configurator_support.md index ba3d49e2b25..db6cd80a20a 100644 --- a/docs/reference_configurator_support.md +++ b/docs/reference_configurator_support.md @@ -168,7 +168,7 @@ k33 | {"label":"Enter", "x":3, "y":3, "h":2} k40 | {"label":"0", "x":0, "y":4, "w":2} k42 | {"label":".", "x":2, "y":4} -When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NLCK` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. +When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NUM` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. ## Issues and Hazards diff --git a/docs/ru-ru/getting_started_github.md b/docs/ru-ru/getting_started_github.md index 120f3c24ecd..7a70926f50d 100644 --- a/docs/ru-ru/getting_started_github.md +++ b/docs/ru-ru/getting_started_github.md @@ -31,7 +31,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` Теперь у вас есть форк QMK на вашем локальном компьютере, и вы можете добавить свою раскладку, скомпилировать ее и прошить ей свою клавиатуру. Как только вы будете довольны своими изменениями, есть возможность добавить, зафиксировать их и сделать коммит в свой форк следующим образом: diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md new file mode 100644 index 00000000000..f48643d1d9c --- /dev/null +++ b/docs/squeezing_avr.md @@ -0,0 +1,180 @@ +# Squeezing the most out of AVR + +AVR is severely resource-constrained, and as QMK continues to grow, it is approaching a point where support for AVR may need to be moved to legacy status as newer development is unable to fit into those constraints. + +However, if you need to reduce the compiled size of your firmware, there are a number of options to do so. + +## `rules.mk` Settings +First and foremost is enabling link time optimization. To do so, add this to your rules.mk: +```make +LTO_ENABLE = yes +``` +This will cause the final step to take longer, but should get you a smaller compiled size. This also disables Action Functions, and Action Macros, both of which are deprecated. +This will get you the most savings, in most situations. + +From there, disabling extraneous systems will help -- e.g.: +```make +CONSOLE_ENABLE = no +COMMAND_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = no +``` +This disables some of the functionality that you may not need. But note that extrakeys disables stuff like the media keys and system volume control. + +If that isn't enough to get your firmware down to size, then there are some additional features that you can disable: +```make +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +``` +These features are enabled by default, but may not be needed. Double check to make sure, though. +Largest in size is "magic" -- the QMK magic keycodes -- which control things like NKRO toggling, GUI and ALT/CTRL swapping, etc. Disabling it will disable those functions. + +## `config.h` Settings + +If you've done all of that, and you don't want to disable features like RGB, Audio, OLEDs, etc, there are some additional options that you can add to your config.h that can help. + +Starting with Lock Key support. If you have an Cherry MX Lock switch (lucky you!), you don't want to do this. But chances are, you don't. In that case, add this to your `config.h`: +```c +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE +``` +Oneshots. If you're not using these, you can disable the feature by adding this to your `config.h`: +```c +#define NO_ACTION_ONESHOT +``` +The same with tapping keys (mod tap, layer tap, etc) +```c +#define NO_ACTION_TAPPING +``` +## Audio Settings + +If you're using the Audio feature, by default that includes the music mode feature. This tranlates matrix positions into notes. It's neat for sure, but most likely, you're not using it. You can disable it by adding this to your `config.h`: +```c +#define NO_MUSIC_MODE +``` +And by adding this to your `rules.mk` +```make +MUSIC_ENABLE = no +``` + +## Layers + +There are also some options for layers, that can reduce the firmware size. All of these settngs are for your `config.h`. + +You can limit the number of layers that the firmware uses -- if you're using less than 8 layers in total: +```c +#define LAYER_STATE_8BIT +``` +or if you require up to 16 layers instead: +```c +#define LAYER_STATE_16BIT +``` +Or if you're not using layers at all, you can outright remove the functionality altogether: +```c +#define NO_ACTION_LAYER +``` + + +## OLED tweaks + +One place you can save a bunch of space here is by not using `sprintf` or `snprintf`. This function call takes up ~1.5kB of firmware space, and can be rewritten. For instance, WPM uses this a lot. + +You can convert this: +```c + // OLD CODE + char wpm_str[4] = {0}; + sprintf(wpm_str, "WPM: %03d", get_current_wpm()); + oled_write(wpm_str, ' '), false); +``` +into this: +```c + // NEW CODE + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), ' '), false); +``` +which outputs `WPM: 5`. Or this: +```c + // NEW CODE + oled_write_P(PSTR("WPM: "), false); + oled_write(get_u8_str(get_current_wpm(), '0'), false); +``` +which outputs `WPM: 005`. + +## RGB Settings + +If you're using RGB on your board, both RGB Light (Underglow) and RGB Matrix (per key RGB) now require defines to enable different animations -- some keyboards enable a lot of animations by default, so you can generally gain back some space by disabling specific animations if you don't use them.. For RGB Light you can disable these in your keymap's `config.h`: +```c +#undef RGBLIGHT_ANIMATIONS +#undef RGBLIGHT_EFFECT_BREATHING +#undef RGBLIGHT_EFFECT_RAINBOW_MOOD +#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL +#undef RGBLIGHT_EFFECT_SNAKE +#undef RGBLIGHT_EFFECT_KNIGHT +#undef RGBLIGHT_EFFECT_CHRISTMAS +#undef RGBLIGHT_EFFECT_STATIC_GRADIENT +#undef RGBLIGHT_EFFECT_RGB_TEST +#undef RGBLIGHT_EFFECT_ALTERNATING +#undef RGBLIGHT_EFFECT_TWINKLE +``` + +For RGB Matrix, these need to be explicitly enabled as well. To disable any that were enabled by the keyboard, add one or more of these to your keymap's `config.h`: +```c +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_HUE_BREATHING +#undef ENABLE_RGB_MATRIX_HUE_PENDULUM +#undef ENABLE_RGB_MATRIX_HUE_WAVE +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN + +#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +``` + +# Final Thoughts + +If you've done all of this, and your firmware is still too large, then it's time. It's time to consider making the switch to ARM. Unfortunately, right now is the worst possible time for that, due to the silicon shortage, and supply chain issues. Getting an ARM chip is difficult, at best, and significantly overpriced, at worst. + -- Drashna + +That said, there are a number of Pro Micro replacements with ARM controllers: +* [Proton C](https://qmk.fm/proton-c/) (out of stock) +* [Bonsai C](https://github.com/customMK/Bonsai-C) (Open Source, DIY/PCBA) +* [Raspberry Pi 2040](https://www.sparkfun.com/products/18288) (not currently supported, no ETA) + +There are other, non-Pro Micro compatible boards out there. The most popular being: +* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD) diff --git a/docs/syllabus.md b/docs/syllabus.md index ccb382c5d4a..f5cdea21820 100644 --- a/docs/syllabus.md +++ b/docs/syllabus.md @@ -31,6 +31,7 @@ These topics start to dig into some of the features that QMK supports. You don't * [RGB Lighting](feature_rgblight.md) * [RGB Matrix](feature_rgb_matrix.md) * [Tap-Hold Configuration](tap_hold.md) + * [Squeezing Space from AVR](squeezing_avr.md) * **Learn More About Keymaps** * [Keymaps](keymap.md) * [Custom Functions and Keycodes](custom_quantum_functions.md) diff --git a/docs/tap_hold.md b/docs/tap_hold.md index 71bff30baa5..d206c10cc58 100644 --- a/docs/tap_hold.md +++ b/docs/tap_hold.md @@ -6,7 +6,9 @@ These options let you modify the behavior of the Tap-Hold keys. ## Tapping Term -The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. And the exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. +The crux of all of the following features is the tapping term setting. This determines what is a tap and what is a hold. The exact timing for this to feel natural can vary from keyboard to keyboard, from switch to switch, and from key to key. + +?> `DYNAMIC_TAPPING_TERM_ENABLE` enables three special keys that can help you quickly find a comfortable tapping term for you. See "Dynamic Tapping Term" for more details. You can set the global time for this by adding the following setting to your `config.h`: @@ -36,6 +38,82 @@ uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { } ``` +### Dynamic Tapping Term :id=dynamic-tapping-term + +`DYNAMIC_TAPPING_TERM_ENABLE` is a feature you can enable in `rules.mk` that lets you use three special keys in your keymap to configure the tapping term on the fly. + +| Key | Description | +|-------------|------------------------------------------------------------------------------------------------------------------------| +| `DT_PRNT` | "Dynamic Tapping Term Print": Types the current tapping term, in milliseconds | +| `DT_UP` | "Dynamic Tapping Term Up": Increases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | +| `DT_DOWN` | "Dynamic Tapping Term Down": Decreases the current tapping term by `DYNAMIC_TAPPING_TERM_INCREMENT`ms (5ms by default) | + +Set the tapping term as usual with `#define TAPPING_TERM ` in `config.h` and add `DYNAMIC_TAPPING_TERM_ENABLE = yes` in `rules.mk`. Then, place the above three keys somewhere in your keymap and flash the new firmware onto your board. + +Now, you can try using your dual-role keys, such as layer-taps and mod-taps, and use `DT_DOWN` and `DT_UP` to adjust the tapping term immediately. If you find that you frequently trigger the modifier of your mod-tap(s) by accident for example, that's a sign that your tapping term may be too low so tap `DT_UP` a few times to increase the tapping term until that no longer happens. On the flip side, if you get superfluous characters when you actually intended to momentarily activate a layer, tap `DT_DOWN` to lower the tapping term. Do note that these keys affect the *global* tapping term, you cannot change the tapping term of a specific key on the fly. + +Once you're satisfied with the current tapping term value, open `config.h` and replace whatever value you first wrote for the tapping term by the output of the `DT_PRNT` key. + +It's important to update `TAPPING_TERM` with the new value because the adjustments made using `DT_UP` and `DT_DOWN` are not persistent. + +The value by which the tapping term increases or decreases when you tap `DT_UP` and `DT_DOWN` can be configured in `config.h` with `#define DYNAMIC_TAPPING_TERM_INCREMENT `. Note that the tapping term is *not* modified when holding down the tap term keys so if you need to, for example, decrease the current tapping term by 50ms, you cannot just press down and hold `DT_DOWN`; you will have to tap it 10 times in a row with the default increment of 5ms. + +If you need more flexibility, nothing prevents you from defining your own custom keys to dynamically change the tapping term. + +```c +enum custom_dynamic_tapping_term_keys = { + DT_UP_50 = SAFE_RANGE, + DT_DOWN_50, + DT_UP_X2, + DT_DOWN_X2, +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DT_UP_50: + if (record->event.pressed) { + g_tapping_term += 50; + } + break; + case DT_DOWN_50: + if (record->event.pressed) { + g_tapping_term -= 50; + } + break; + case DT_UP_X2: + if (record->event.pressed) { + g_tapping_term *= 2; + } + break; + case DT_DOWN_X2: + if (record->event.pressed) { + g_tapping_term /= 2; + } + break; + } + return true; +}; +``` + +In order for this feature to be effective if you use per-key tapping terms, you need to make a few changes to the syntax of the `get_tapping_term` function. All you need to do is replace every occurrence of `TAPPING_TERM` in the `get_tapping_term` function by lowercase `g_tapping_term`. If you don't do that, you will still see the value typed by `DT_PRNT` go up and down as you configure the tapping term on the fly but you won't feel those changes as they don't get applied. If you can go as low as 10ms and still easily trigger the tap function of a dual-role key, that's a sign that you forgot to make the necessary changes to your `get_tapping_term` function. + +For instance, here's how the example `get_tapping_term` shown earlier should look like after the transformation: + +```c +uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_T(KC_SPC): + return g_tapping_term + 1250; + case LT(1, KC_GRV): + return 130; + default: + return g_tapping_term; + } +} +``` + +The reason being that `TAPPING_TERM` is a macro that expands to a constant integer and thus cannot be changed at runtime whereas `g_tapping_term` is a variable whose value can be changed at runtime. If you want, you can temporarily enable `DYNAMIC_TAPPING_TERM_ENABLE` to find a suitable tapping term value and then disable that feature and revert back to using the classic syntax for per-key tapping term settings. + ## Tap-Or-Hold Decision Modes The code which decides between the tap and hold actions of dual-role keys supports three different modes, in increasing order of preference for the hold action: @@ -67,7 +145,7 @@ An example of a sequence which is affected by the “permissive hold” mode: - `KC_L` Up - `LT(2, KC_A)` Up -Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). +Normally, if you do all this within the `TAPPING_TERM` (default: 200ms), this will be registered as `al` by the firmware and host system. With the `PERMISSIVE_HOLD` option enabled, the Layer Tap key is considered as a layer switch if another key is tapped, and the above sequence would be registered as `KC_RGHT` (the mapping of `L` on layer 2). We could describe this sequence as a “nested press” (the modified key's key down and key up events are “nested” between the dual-role key's key down and key up events). However, this slightly different sequence will not be affected by the “permissive hold” mode: @@ -76,7 +154,7 @@ However, this slightly different sequence will not be affected by the “permiss - `LT(2, KC_A)` Up - `KC_L` Up -In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. +In the sequence above the dual-role key is released before the other key is released, and if that happens within the tapping term, the “permissive hold” mode will still choose the tap action for the dual-role key, and the sequence will be registered as `al` by the host. We could describe this as a “rolling press” (the two keys' key down and key up events behave as if you were rolling a ball across the two keys, first pressing each key down in sequence and then releasing them in the same order). ?> The `PERMISSIVE_HOLD` option also affects Mod Tap keys, but this may not be noticeable if you do not also enable the `IGNORE_MOD_TAP_INTERRUPT` option for those keys, because the default handler for Mod Tap keys also considers both the “nested press” and “rolling press” sequences like shown above as a modifier hold, not the tap action. If you do not enable `IGNORE_MOD_TAP_INTERRUPT`, the effect of `PERMISSIVE_HOLD` on Mod Tap keys would be limited to reducing the delay before the key events are made visible to the host. @@ -247,7 +325,7 @@ To enable `retro tapping`, add the following to your `config.h`: Holding and releasing a dual function key without pressing another key will result in nothing happening. With retro tapping enabled, releasing the key without pressing another will send the original keycode even if it is outside the tapping term. -For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead. +For instance, holding and releasing `LT(2, KC_SPC)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPC` instead. For more granular control of this feature, you can add the following to your `config.h`: @@ -260,7 +338,7 @@ You can then add the following function to your keymap: ```c bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case LT(2, KC_SPACE): + case LT(2, KC_SPC): return true; default: return false; @@ -268,6 +346,10 @@ bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { } ``` +### Retro Shift + +[Auto Shift,](feature_auto_shift.md) has its own version of `retro tapping` called `retro shift`. It is extremely similar to `retro tapping`, but holding the key past `AUTO_SHIFT_TIMEOUT` results in the value it sends being shifted. Other configurations also affect it differently; see [here](feature_auto_shift.md#retro-shift) for more information. + ## Why do we include the key record for the per key functions? One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that. diff --git a/docs/uart_driver.md b/docs/uart_driver.md index 4d1716975f5..340b6481892 100644 --- a/docs/uart_driver.md +++ b/docs/uart_driver.md @@ -60,30 +60,56 @@ Initialize the UART driver. This function must be called only once, before any o --- -### `void uart_putchar(uint8_t c)` +### `void uart_write(uint8_t data)` Transmit a single byte. #### Arguments - - `uint8_t c` - The byte (character) to send, from 0 to 255. + - `uint8_t data` + The byte to write. --- -### `uint8_t uart_getchar(void)` +### `uint8_t uart_read(void)` Receive a single byte. #### Return Value -The byte read from the receive buffer. +The byte read from the receive buffer. This function will block if the buffer is empty (ie. no data to read). + +--- + +### `void uart_transmit(const uint8_t *data, uint16_t length)` + +Transmit multiple bytes. + +#### Arguments + + - `const uint8_t *data` + A pointer to the data to write from. + - `uint16_t length` + The number of bytes to write. Take care not to overrun the length of `data`. + +--- + +### `void uart_receive(char *data, uint16_t length)` + +Receive multiple bytes. + +#### Arguments + + - `uint8_t *data` + A pointer to the buffer to read into. + - `uint16_t length` + The number of bytes to read. Take care not to overrun the length of `data`. --- ### `bool uart_available(void)` -Return whether the receive buffer contains data. Call this function to determine if `uart_getchar()` will return meaningful data. +Return whether the receive buffer contains data. Call this function to determine if `uart_read()` will return data immediately. #### Return Value diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md index da622044c3f..016e3d9fd2c 100644 --- a/docs/understanding_qmk.md +++ b/docs/understanding_qmk.md @@ -29,7 +29,6 @@ Within `keyboard_task()` you'll find code to handle: * [Matrix Scanning](#matrix-scanning) * Mouse Handling * Serial Link(s) -* Visualizer * Keyboard status LEDs (Caps Lock, Num Lock, Scroll Lock) #### Matrix Scanning @@ -67,10 +66,10 @@ At the keyboard level we define a C macro (typically named `LAYOUT()`) which map k30, k31, k32, k33, \ k40, k42 \ ) { \ - { k00, k01, k02, k03, }, \ - { k10, k11, k12, k13, }, \ - { k20, k21, k22, KC_NO, }, \ - { k30, k31, k32, k33, }, \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO }, \ + { k30, k31, k32, k33 }, \ { k40, KC_NO, k42, KC_NO } \ } ``` @@ -83,14 +82,15 @@ You can also use this macro to handle unusual matrix layouts, for example the [C At the keymap level we make use of our `LAYOUT()` macro above to map keycodes to physical locations to matrix locations. It looks like this: -``` +```c const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, KC_PDOT) + [0] = LAYOUT( + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, KC_PENT, + KC_P0, KC_PDOT + ) } ``` @@ -124,7 +124,7 @@ And when our current scan completes it will look like this: } ``` -Comparing against our keymap we can see that the pressed key is KC_NLCK. From here we dispatch to the `process_record` set of functions. +Comparing against our keymap we can see that the pressed key is `KC_NUM`. From here we dispatch to the `process_record` set of functions. @@ -157,6 +157,7 @@ The `process_record()` function itself is deceptively simple, but hidden within * [`bool process_combo(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_combo.c#L115) * [`bool process_printer(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_printer.c#L77) * [`bool process_auto_shift(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_auto_shift.c#L94) + * `bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record)` * [`bool process_terminal(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_terminal.c#L264) * [Identify and process Quantum-specific keycodes](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L291) @@ -180,10 +181,6 @@ FIXME: This needs to be written FIXME: This needs to be written -#### Visualizer - -FIXME: This needs to be written - #### Keyboard state LEDs (Caps Lock, Num Lock, Scroll Lock) FIXME: This needs to be written diff --git a/docs/unit_testing.md b/docs/unit_testing.md index a0eef51cb63..47a10557964 100644 --- a/docs/unit_testing.md +++ b/docs/unit_testing.md @@ -20,12 +20,12 @@ One thing to remember, is that you have to append `extern "C"` around all of you ## Adding Tests for New or Existing Features -If you want to unit test some feature, then take a look at the existing serial_link tests, in the `quantum/serial_link/tests folder`, and follow the steps below to create a similar structure. +If you want to unit test a feature, take a look at some of the existing tests, for example those in the `quantum/sequencer/tests` folder. Then follow the steps below to create a similar structure. 1. If it doesn't already exist, add a test subfolder to the folder containing the feature. 2. Create a `testlist.mk` and a `rules.mk` file in that folder. 3. Include those files from the root folder `testlist.mk`and `build_test.mk` respectively. -4. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the serial_link tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests. +4. Add a new name for your testgroup to the `testlist.mk` file. Each group defined there will be a separate executable. And that's how you can support mocking out different parts. Note that it's worth adding some common prefix, just like it's done for the existing tests. The reason for that is that the make command allows substring filtering, so this way you can easily run a subset of the tests. 5. Define the source files and required options in the `rules.mk` file. * `_SRC` for source files * `_DEFS` for additional defines @@ -44,7 +44,7 @@ If there are problems with the tests, you can find the executable in the `./buil To forward any [debug messages](unit_testing.md#debug-api) to `stderr`, the tests can run with `DEBUG=1`. For example -```console +``` make test:all DEBUG=1 ``` diff --git a/docs/ws2812_driver.md b/docs/ws2812_driver.md index 101798f2111..8acac0b3aa6 100644 --- a/docs/ws2812_driver.md +++ b/docs/ws2812_driver.md @@ -49,6 +49,19 @@ WS2812_DRIVER = bitbang !> This driver is not hardware accelerated and may not be performant on heavily loaded systems. +#### Adjusting bit timings + +The WS2812 LED communication topology depends on a serialized timed window. Different versions of the addressable LEDs have differing requirements for the timing parameters, for instance, of the SK6812. +You can tune these parameters through the definition of the following macros: + +| Macro |Default | AVR | ARM | +|---------------------|--------------------------------------------|--------------------|--------------------| +|`WS2812_TIMING` |`1250` | :heavy_check_mark: | :heavy_check_mark: | +|`WS2812_T0H` |`350` | :heavy_check_mark: | :heavy_check_mark: | +|`WS2812_T0L` |`WS2812_TIMING - WS2812_T0H` | | :heavy_check_mark: | +|`WS2812_T1H` |`900` | :heavy_check_mark: | :heavy_check_mark: | +|`WS2812_T1L` |`WS2812_TIMING - WS2812_T1H` | | :heavy_check_mark: | + ### I2C Targeting boards where WS2812 support is offloaded to a 2nd MCU. Currently the driver is limited to AVR given the known consumers are ps2avrGB/BMC. To configure it, add this to your rules.mk: diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md index 3b6a369003b..4dba44c275e 100644 --- a/docs/zh-cn/faq_debug.md +++ b/docs/zh-cn/faq_debug.md @@ -81,11 +81,6 @@ Size after: 全键无冲还不好用的话试着用`Magic` **N** 命令(默认是`LShift+RShift+N`)。这个命令会在**全键无冲**和**六键无冲**之间临时切换。有些情况**全键无冲**不好用你就需要使用**六键无冲**模式,尤其是在BIOS中。 -如果你的固件使用`BOOTMAGIC_ENABLE`编译的你要用`BootMagic` **N** 命令(默认`Space+N`)打开开关。这个设置保存在EEPROM中并保存在电源循环中。 - - -https://github.com/tmk/tmk_keyboard#boot-magic-configuration---virtual-dip-switch - ## 指点杆需要复位电路(PS/2 鼠标支持) 如果没有复位电路,由于硬件初始化不正确,您将得到不一致的结果。查看TPM754复位电路。 diff --git a/docs/zh-cn/faq_keymap.md b/docs/zh-cn/faq_keymap.md index fdfa25ad9ee..ff38f388947 100644 --- a/docs/zh-cn/faq_keymap.md +++ b/docs/zh-cn/faq_keymap.md @@ -5,7 +5,7 @@ ## 我能用什么键码? 看[键码](keycodes.md)你可以找到你能用的键码索引。可以的话这些链接可以连接到更广泛的文档。 -键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/keycode.h). +键码实际上定义在[common/keycode.h](https://github.com/qmk/qmk_firmware/blob/master/quantum/keycode.h). ## 默认的键码什么样? diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md index 65994754b96..b4e8e9fa5d0 100644 --- a/docs/zh-cn/getting_started_github.md +++ b/docs/zh-cn/getting_started_github.md @@ -32,7 +32,6 @@ Submodule path 'lib/chibios': checked out '587968d6cbc2b0e1c7147540872f2a67e59ca Submodule path 'lib/chibios-contrib': checked out 'ede48346eee4b8d6847c19bc01420bee76a5e486' Submodule path 'lib/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780' Submodule path 'lib/lufa': checked out 'ce10f7642b0459e409839b23cc91498945119b4d' -Submodule path 'lib/ugfx': checked out '3e97b74e03c93631cdd3ddb2ce43b963fdce19b2' ``` 现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样: diff --git a/doxygen-todo b/doxygen-todo index 643a0df1dab..4151627e4a8 100644 --- a/doxygen-todo +++ b/doxygen-todo @@ -6,22 +6,8 @@ tmk_core/protocol/midi/bytequeue tmk_core/protocol/midi/Config tmk_core/protocol/usb_hid tmk_core/protocol/vusb -tmk_core/tool -tmk_core/tool/chibios quantum -quantum/api quantum/audio quantum/keymap_extras quantum/process_keycode -quantum/serial_link -quantum/serial_link/protocol -quantum/serial_link/system -quantum/serial_link/tests -quantum/tools -quantum/visualizer -quantum/visualizer/resources drivers -drivers/ugfx -drivers/ugfx/gdisp -drivers/ugfx/gdisp/is31fl3731c -drivers/ugfx/gdisp/st7565 diff --git a/drivers/bluetooth/adafruit_ble.cpp b/drivers/bluetooth/adafruit_ble.cpp new file mode 100644 index 00000000000..34a780e9a5c --- /dev/null +++ b/drivers/bluetooth/adafruit_ble.cpp @@ -0,0 +1,699 @@ +#include "adafruit_ble.h" + +#include +#include +#include +#include "debug.h" +#include "timer.h" +#include "action_util.h" +#include "ringbuffer.hpp" +#include +#include "spi_master.h" +#include "wait.h" +#include "analog.h" +#include "progmem.h" + +// These are the pin assignments for the 32u4 boards. +// You may define them to something else in your config.h +// if yours is wired up differently. +#ifndef ADAFRUIT_BLE_RST_PIN +# define ADAFRUIT_BLE_RST_PIN D4 +#endif + +#ifndef ADAFRUIT_BLE_CS_PIN +# define ADAFRUIT_BLE_CS_PIN B4 +#endif + +#ifndef ADAFRUIT_BLE_IRQ_PIN +# define ADAFRUIT_BLE_IRQ_PIN E6 +#endif + +#ifndef ADAFRUIT_BLE_SCK_DIVISOR +# define ADAFRUIT_BLE_SCK_DIVISOR 2 // 4MHz SCK/8MHz CPU, calculated for Feather 32U4 BLE +#endif + +#define SAMPLE_BATTERY +#define ConnectionUpdateInterval 1000 /* milliseconds */ + +#ifndef BATTERY_LEVEL_PIN +# define BATTERY_LEVEL_PIN B5 +#endif + +static struct { + bool is_connected; + bool initialized; + bool configured; + +#define ProbedEvents 1 +#define UsingEvents 2 + bool event_flags; + +#ifdef SAMPLE_BATTERY + uint16_t last_battery_update; + uint32_t vbat; +#endif + uint16_t last_connection_update; +} state; + +// Commands are encoded using SDEP and sent via SPI +// https://github.com/adafruit/Adafruit_BluefruitLE_nRF51/blob/master/SDEP.md + +#define SdepMaxPayload 16 +struct sdep_msg { + uint8_t type; + uint8_t cmd_low; + uint8_t cmd_high; + struct __attribute__((packed)) { + uint8_t len : 7; + uint8_t more : 1; + }; + uint8_t payload[SdepMaxPayload]; +} __attribute__((packed)); + +// The recv latency is relatively high, so when we're hammering keys quickly, +// we want to avoid waiting for the responses in the matrix loop. We maintain +// a short queue for that. Since there is quite a lot of space overhead for +// the AT command representation wrapped up in SDEP, we queue the minimal +// information here. + +enum queue_type { + QTKeyReport, // 1-byte modifier + 6-byte key report + QTConsumer, // 16-bit key code +#ifdef MOUSE_ENABLE + QTMouseMove, // 4-byte mouse report +#endif +}; + +struct queue_item { + enum queue_type queue_type; + uint16_t added; + union __attribute__((packed)) { + struct __attribute__((packed)) { + uint8_t modifier; + uint8_t keys[6]; + } key; + + uint16_t consumer; + struct __attribute__((packed)) { + int8_t x, y, scroll, pan; + uint8_t buttons; + } mousemove; + }; +}; + +// Items that we wish to send +static RingBuffer send_buf; +// Pending response; while pending, we can't send any more requests. +// This records the time at which we sent the command for which we +// are expecting a response. +static RingBuffer resp_buf; + +static bool process_queue_item(struct queue_item *item, uint16_t timeout); + +enum sdep_type { + SdepCommand = 0x10, + SdepResponse = 0x20, + SdepAlert = 0x40, + SdepError = 0x80, + SdepSlaveNotReady = 0xFE, // Try again later + SdepSlaveOverflow = 0xFF, // You read more data than is available +}; + +enum ble_cmd { + BleInitialize = 0xBEEF, + BleAtWrapper = 0x0A00, + BleUartTx = 0x0A01, + BleUartRx = 0x0A02, +}; + +enum ble_system_event_bits { + BleSystemConnected = 0, + BleSystemDisconnected = 1, + BleSystemUartRx = 8, + BleSystemMidiRx = 10, +}; + +#define SdepTimeout 150 /* milliseconds */ +#define SdepShortTimeout 10 /* milliseconds */ +#define SdepBackOff 25 /* microseconds */ +#define BatteryUpdateInterval 10000 /* milliseconds */ + +static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout = SdepTimeout); +static bool at_command_P(const char *cmd, char *resp, uint16_t resplen, bool verbose = false); + +// Send a single SDEP packet +static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { + spi_start(ADAFRUIT_BLE_CS_PIN, false, 0, ADAFRUIT_BLE_SCK_DIVISOR); + uint16_t timerStart = timer_read(); + bool success = false; + bool ready = false; + + do { + ready = spi_write(msg->type) != SdepSlaveNotReady; + if (ready) { + break; + } + + // Release it and let it initialize + spi_stop(); + wait_us(SdepBackOff); + spi_start(ADAFRUIT_BLE_CS_PIN, false, 0, ADAFRUIT_BLE_SCK_DIVISOR); + } while (timer_elapsed(timerStart) < timeout); + + if (ready) { + // Slave is ready; send the rest of the packet + spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len); + success = true; + } + + spi_stop(); + + return success; +} + +static inline void sdep_build_pkt(struct sdep_msg *msg, uint16_t command, const uint8_t *payload, uint8_t len, bool moredata) { + msg->type = SdepCommand; + msg->cmd_low = command & 0xFF; + msg->cmd_high = command >> 8; + msg->len = len; + msg->more = (moredata && len == SdepMaxPayload) ? 1 : 0; + + static_assert(sizeof(*msg) == 20, "msg is correctly packed"); + + memcpy(msg->payload, payload, len); +} + +// Read a single SDEP packet +static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { + bool success = false; + uint16_t timerStart = timer_read(); + bool ready = false; + + do { + ready = readPin(ADAFRUIT_BLE_IRQ_PIN); + if (ready) { + break; + } + wait_us(1); + } while (timer_elapsed(timerStart) < timeout); + + if (ready) { + spi_start(ADAFRUIT_BLE_CS_PIN, false, 0, ADAFRUIT_BLE_SCK_DIVISOR); + + do { + // Read the command type, waiting for the data to be ready + msg->type = spi_read(); + if (msg->type == SdepSlaveNotReady || msg->type == SdepSlaveOverflow) { + // Release it and let it initialize + spi_stop(); + wait_us(SdepBackOff); + spi_start(ADAFRUIT_BLE_CS_PIN, false, 0, ADAFRUIT_BLE_SCK_DIVISOR); + continue; + } + + // Read the rest of the header + spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload))); + + // and get the payload if there is any + if (msg->len <= SdepMaxPayload) { + spi_receive(msg->payload, msg->len); + } + success = true; + break; + } while (timer_elapsed(timerStart) < timeout); + + spi_stop(); + } + return success; +} + +static void resp_buf_read_one(bool greedy) { + uint16_t last_send; + if (!resp_buf.peek(last_send)) { + return; + } + + if (readPin(ADAFRUIT_BLE_IRQ_PIN)) { + struct sdep_msg msg; + + again: + if (sdep_recv_pkt(&msg, SdepTimeout)) { + if (!msg.more) { + // We got it; consume this entry + resp_buf.get(last_send); + dprintf("recv latency %dms\n", TIMER_DIFF_16(timer_read(), last_send)); + } + + if (greedy && resp_buf.peek(last_send) && readPin(ADAFRUIT_BLE_IRQ_PIN)) { + goto again; + } + } + + } else if (timer_elapsed(last_send) > SdepTimeout * 2) { + dprintf("waiting_for_result: timeout, resp_buf size %d\n", (int)resp_buf.size()); + + // Timed out: consume this entry + resp_buf.get(last_send); + } +} + +static void send_buf_send_one(uint16_t timeout = SdepTimeout) { + struct queue_item item; + + // Don't send anything more until we get an ACK + if (!resp_buf.empty()) { + return; + } + + if (!send_buf.peek(item)) { + return; + } + if (process_queue_item(&item, timeout)) { + // commit that peek + send_buf.get(item); + dprintf("send_buf_send_one: have %d remaining\n", (int)send_buf.size()); + } else { + dprint("failed to send, will retry\n"); + wait_ms(SdepTimeout); + resp_buf_read_one(true); + } +} + +static void resp_buf_wait(const char *cmd) { + bool didPrint = false; + while (!resp_buf.empty()) { + if (!didPrint) { + dprintf("wait on buf for %s\n", cmd); + didPrint = true; + } + resp_buf_read_one(true); + } +} + +static bool ble_init(void) { + state.initialized = false; + state.configured = false; + state.is_connected = false; + + setPinInput(ADAFRUIT_BLE_IRQ_PIN); + + spi_init(); + + // Perform a hardware reset + setPinOutput(ADAFRUIT_BLE_RST_PIN); + writePinHigh(ADAFRUIT_BLE_RST_PIN); + writePinLow(ADAFRUIT_BLE_RST_PIN); + wait_ms(10); + writePinHigh(ADAFRUIT_BLE_RST_PIN); + + wait_ms(1000); // Give it a second to initialize + + state.initialized = true; + return state.initialized; +} + +static inline uint8_t min(uint8_t a, uint8_t b) { return a < b ? a : b; } + +static bool read_response(char *resp, uint16_t resplen, bool verbose) { + char *dest = resp; + char *end = dest + resplen; + + while (true) { + struct sdep_msg msg; + + if (!sdep_recv_pkt(&msg, 2 * SdepTimeout)) { + dprint("sdep_recv_pkt failed\n"); + return false; + } + + if (msg.type != SdepResponse) { + *resp = 0; + return false; + } + + uint8_t len = min(msg.len, end - dest); + if (len > 0) { + memcpy(dest, msg.payload, len); + dest += len; + } + + if (!msg.more) { + // No more data is expected! + break; + } + } + + // Ensure the response is NUL terminated + *dest = 0; + + // "Parse" the result text; we want to snip off the trailing OK or ERROR line + // Rewind past the possible trailing CRLF so that we can strip it + --dest; + while (dest > resp && (dest[0] == '\n' || dest[0] == '\r')) { + *dest = 0; + --dest; + } + + // Look back for start of preceeding line + char *last_line = strrchr(resp, '\n'); + if (last_line) { + ++last_line; + } else { + last_line = resp; + } + + bool success = false; + static const char kOK[] PROGMEM = "OK"; + + success = !strcmp_P(last_line, kOK); + + if (verbose || !success) { + dprintf("result: %s\n", resp); + } + return success; +} + +static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout) { + const char * end = cmd + strlen(cmd); + struct sdep_msg msg; + + if (verbose) { + dprintf("ble send: %s\n", cmd); + } + + if (resp) { + // They want to decode the response, so we need to flush and wait + // for all pending I/O to finish before we start this one, so + // that we don't confuse the results + resp_buf_wait(cmd); + *resp = 0; + } + + // Fragment the command into a series of SDEP packets + while (end - cmd > SdepMaxPayload) { + sdep_build_pkt(&msg, BleAtWrapper, (uint8_t *)cmd, SdepMaxPayload, true); + if (!sdep_send_pkt(&msg, timeout)) { + return false; + } + cmd += SdepMaxPayload; + } + + sdep_build_pkt(&msg, BleAtWrapper, (uint8_t *)cmd, end - cmd, false); + if (!sdep_send_pkt(&msg, timeout)) { + return false; + } + + if (resp == NULL) { + uint16_t now = timer_read(); + while (!resp_buf.enqueue(now)) { + resp_buf_read_one(false); + } + uint16_t later = timer_read(); + if (TIMER_DIFF_16(later, now) > 0) { + dprintf("waited %dms for resp_buf\n", TIMER_DIFF_16(later, now)); + } + return true; + } + + return read_response(resp, resplen, verbose); +} + +bool at_command_P(const char *cmd, char *resp, uint16_t resplen, bool verbose) { + char *cmdbuf = (char *)alloca(strlen_P(cmd) + 1); + strcpy_P(cmdbuf, cmd); + return at_command(cmdbuf, resp, resplen, verbose); +} + +bool adafruit_ble_is_connected(void) { return state.is_connected; } + +bool adafruit_ble_enable_keyboard(void) { + char resbuf[128]; + + if (!state.initialized && !ble_init()) { + return false; + } + + state.configured = false; + + // Disable command echo + static const char kEcho[] PROGMEM = "ATE=0"; + // Make the advertised name match the keyboard + static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT); + // Turn on keyboard support + static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1"; + + // Adjust intervals to improve latency. This causes the "central" + // system (computer/tablet) to poll us every 10-30 ms. We can't + // set a smaller value than 10ms, and 30ms seems to be the natural + // processing time on my macbook. Keeping it constrained to that + // feels reasonable to type to. + static const char kGapIntervals[] PROGMEM = "AT+GAPINTERVALS=10,30,,"; + + // Reset the device so that it picks up the above changes + static const char kATZ[] PROGMEM = "ATZ"; + + // Turn down the power level a bit + static const char kPower[] PROGMEM = "AT+BLEPOWERLEVEL=-12"; + static PGM_P const configure_commands[] PROGMEM = { + kEcho, kGapIntervals, kGapDevName, kHidEnOn, kPower, kATZ, + }; + + uint8_t i; + for (i = 0; i < sizeof(configure_commands) / sizeof(configure_commands[0]); ++i) { + PGM_P cmd; + memcpy_P(&cmd, configure_commands + i, sizeof(cmd)); + + if (!at_command_P(cmd, resbuf, sizeof(resbuf))) { + dprintf("failed BLE command: %S: %s\n", cmd, resbuf); + goto fail; + } + } + + state.configured = true; + + // Check connection status in a little while; allow the ATZ time + // to kick in. + state.last_connection_update = timer_read(); +fail: + return state.configured; +} + +static void set_connected(bool connected) { + if (connected != state.is_connected) { + if (connected) { + dprint("BLE connected\n"); + } else { + dprint("BLE disconnected\n"); + } + state.is_connected = connected; + + // TODO: if modifiers are down on the USB interface and + // we cut over to BLE or vice versa, they will remain stuck. + // This feels like a good point to do something like clearing + // the keyboard and/or generating a fake all keys up message. + // However, I've noticed that it takes a couple of seconds + // for macOS to to start recognizing key presses after BLE + // is in the connected state, so I worry that doing that + // here may not be good enough. + } +} + +void adafruit_ble_task(void) { + char resbuf[48]; + + if (!state.configured && !adafruit_ble_enable_keyboard()) { + return; + } + resp_buf_read_one(true); + send_buf_send_one(SdepShortTimeout); + + if (resp_buf.empty() && (state.event_flags & UsingEvents) && readPin(ADAFRUIT_BLE_IRQ_PIN)) { + // Must be an event update + if (at_command_P(PSTR("AT+EVENTSTATUS"), resbuf, sizeof(resbuf))) { + uint32_t mask = strtoul(resbuf, NULL, 16); + + if (mask & BleSystemConnected) { + set_connected(true); + } else if (mask & BleSystemDisconnected) { + set_connected(false); + } + } + } + + if (timer_elapsed(state.last_connection_update) > ConnectionUpdateInterval) { + bool shouldPoll = true; + if (!(state.event_flags & ProbedEvents)) { + // Request notifications about connection status changes. + // This only works in SPIFRIEND firmware > 0.6.7, which is why + // we check for this conditionally here. + // Note that at the time of writing, HID reports only work correctly + // with Apple products on firmware version 0.6.7! + // https://forums.adafruit.com/viewtopic.php?f=8&t=104052 + if (at_command_P(PSTR("AT+EVENTENABLE=0x1"), resbuf, sizeof(resbuf))) { + at_command_P(PSTR("AT+EVENTENABLE=0x2"), resbuf, sizeof(resbuf)); + state.event_flags |= UsingEvents; + } + state.event_flags |= ProbedEvents; + + // leave shouldPoll == true so that we check at least once + // before relying solely on events + } else { + shouldPoll = false; + } + + static const char kGetConn[] PROGMEM = "AT+GAPGETCONN"; + state.last_connection_update = timer_read(); + + if (at_command_P(kGetConn, resbuf, sizeof(resbuf))) { + set_connected(atoi(resbuf)); + } + } + +#ifdef SAMPLE_BATTERY + if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) { + state.last_battery_update = timer_read(); + + state.vbat = analogReadPin(BATTERY_LEVEL_PIN); + } +#endif +} + +static bool process_queue_item(struct queue_item *item, uint16_t timeout) { + char cmdbuf[48]; + char fmtbuf[64]; + + // Arrange to re-check connection after keys have settled + state.last_connection_update = timer_read(); + +#if 1 + if (TIMER_DIFF_16(state.last_connection_update, item->added) > 0) { + dprintf("send latency %dms\n", TIMER_DIFF_16(state.last_connection_update, item->added)); + } +#endif + + switch (item->queue_type) { + case QTKeyReport: + strcpy_P(fmtbuf, PSTR("AT+BLEKEYBOARDCODE=%02x-00-%02x-%02x-%02x-%02x-%02x-%02x")); + snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->key.modifier, item->key.keys[0], item->key.keys[1], item->key.keys[2], item->key.keys[3], item->key.keys[4], item->key.keys[5]); + return at_command(cmdbuf, NULL, 0, true, timeout); + + case QTConsumer: + strcpy_P(fmtbuf, PSTR("AT+BLEHIDCONTROLKEY=0x%04x")); + snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->consumer); + return at_command(cmdbuf, NULL, 0, true, timeout); + +#ifdef MOUSE_ENABLE + case QTMouseMove: + strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d")); + snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x, item->mousemove.y, item->mousemove.scroll, item->mousemove.pan); + if (!at_command(cmdbuf, NULL, 0, true, timeout)) { + return false; + } + strcpy_P(cmdbuf, PSTR("AT+BLEHIDMOUSEBUTTON=")); + if (item->mousemove.buttons & MOUSE_BTN1) { + strcat(cmdbuf, "L"); + } + if (item->mousemove.buttons & MOUSE_BTN2) { + strcat(cmdbuf, "R"); + } + if (item->mousemove.buttons & MOUSE_BTN3) { + strcat(cmdbuf, "M"); + } + if (item->mousemove.buttons == 0) { + strcat(cmdbuf, "0"); + } + return at_command(cmdbuf, NULL, 0, true, timeout); +#endif + default: + return true; + } +} + +void adafruit_ble_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uint8_t nkeys) { + struct queue_item item; + bool didWait = false; + + item.queue_type = QTKeyReport; + item.key.modifier = hid_modifier_mask; + item.added = timer_read(); + + while (nkeys >= 0) { + item.key.keys[0] = keys[0]; + item.key.keys[1] = nkeys >= 1 ? keys[1] : 0; + item.key.keys[2] = nkeys >= 2 ? keys[2] : 0; + item.key.keys[3] = nkeys >= 3 ? keys[3] : 0; + item.key.keys[4] = nkeys >= 4 ? keys[4] : 0; + item.key.keys[5] = nkeys >= 5 ? keys[5] : 0; + + if (!send_buf.enqueue(item)) { + if (!didWait) { + dprint("wait for buf space\n"); + didWait = true; + } + send_buf_send_one(); + continue; + } + + if (nkeys <= 6) { + return; + } + + nkeys -= 6; + keys += 6; + } +} + +void adafruit_ble_send_consumer_key(uint16_t usage) { + struct queue_item item; + + item.queue_type = QTConsumer; + item.consumer = usage; + + while (!send_buf.enqueue(item)) { + send_buf_send_one(); + } +} + +#ifdef MOUSE_ENABLE +void adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons) { + struct queue_item item; + + item.queue_type = QTMouseMove; + item.mousemove.x = x; + item.mousemove.y = y; + item.mousemove.scroll = scroll; + item.mousemove.pan = pan; + item.mousemove.buttons = buttons; + + while (!send_buf.enqueue(item)) { + send_buf_send_one(); + } +} +#endif + +uint32_t adafruit_ble_read_battery_voltage(void) { return state.vbat; } + +bool adafruit_ble_set_mode_leds(bool on) { + if (!state.configured) { + return false; + } + + // The "mode" led is the red blinky one + at_command_P(on ? PSTR("AT+HWMODELED=1") : PSTR("AT+HWMODELED=0"), NULL, 0); + + // Pin 19 is the blue "connected" LED; turn that off too. + // When turning LEDs back on, don't turn that LED on if we're + // not connected, as that would be confusing. + at_command_P(on && state.is_connected ? PSTR("AT+HWGPIO=19,1") : PSTR("AT+HWGPIO=19,0"), NULL, 0); + return true; +} + +// https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/ble-generic#at-plus-blepowerlevel +bool adafruit_ble_set_power_level(int8_t level) { + char cmd[46]; + if (!state.configured) { + return false; + } + snprintf(cmd, sizeof(cmd), "AT+BLEPOWERLEVEL=%d", level); + return at_command(cmd, NULL, 0, false); +} diff --git a/tmk_core/protocol/lufa/adafruit_ble.h b/drivers/bluetooth/adafruit_ble.h similarity index 100% rename from tmk_core/protocol/lufa/adafruit_ble.h rename to drivers/bluetooth/adafruit_ble.h diff --git a/tmk_core/protocol/lufa/outputselect.c b/drivers/bluetooth/outputselect.c similarity index 100% rename from tmk_core/protocol/lufa/outputselect.c rename to drivers/bluetooth/outputselect.c diff --git a/tmk_core/protocol/lufa/outputselect.h b/drivers/bluetooth/outputselect.h similarity index 100% rename from tmk_core/protocol/lufa/outputselect.h rename to drivers/bluetooth/outputselect.h diff --git a/tmk_core/protocol/lufa/ringbuffer.hpp b/drivers/bluetooth/ringbuffer.hpp similarity index 100% rename from tmk_core/protocol/lufa/ringbuffer.hpp rename to drivers/bluetooth/ringbuffer.hpp diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 25cf344655b..7a09940f78c 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -19,6 +19,7 @@ #include "solenoid.h" #include "haptic.h" #include "gpio.h" +#include "usb_device_state.h" bool solenoid_on = false; bool solenoid_buzzing = false; @@ -36,7 +37,7 @@ void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); } void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; } void solenoid_stop(void) { - writePinLow(SOLENOID_PIN); + SOLENOID_PIN_WRITE_INACTIVE(); solenoid_on = false; solenoid_buzzing = false; } @@ -48,7 +49,7 @@ void solenoid_fire(void) { solenoid_on = true; solenoid_buzzing = true; solenoid_start = timer_read(); - writePinHigh(SOLENOID_PIN); + SOLENOID_PIN_WRITE_ACTIVE(); } void solenoid_check(void) { @@ -69,20 +70,23 @@ void solenoid_check(void) { if ((elapsed % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) { if (!solenoid_buzzing) { solenoid_buzzing = true; - writePinHigh(SOLENOID_PIN); + SOLENOID_PIN_WRITE_ACTIVE(); } } else { if (solenoid_buzzing) { solenoid_buzzing = false; - writePinLow(SOLENOID_PIN); + SOLENOID_PIN_WRITE_INACTIVE(); } } } } void solenoid_setup(void) { + SOLENOID_PIN_WRITE_INACTIVE(); setPinOutput(SOLENOID_PIN); - solenoid_fire(); + if ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED)) { + solenoid_fire(); + } } -void solenoid_shutdown(void) { writePinLow(SOLENOID_PIN); } +void solenoid_shutdown(void) { SOLENOID_PIN_WRITE_INACTIVE(); } diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h index f2a3bc4c309..653148154f4 100644 --- a/drivers/haptic/solenoid.h +++ b/drivers/haptic/solenoid.h @@ -49,6 +49,14 @@ # error SOLENOID_PIN not defined #endif +#ifdef SOLENOID_PIN_ACTIVE_LOW +# define SOLENOID_PIN_WRITE_ACTIVE() writePinLow(SOLENOID_PIN) +# define SOLENOID_PIN_WRITE_INACTIVE() writePinHigh(SOLENOID_PIN) +#else +# define SOLENOID_PIN_WRITE_ACTIVE() writePinHigh(SOLENOID_PIN) +# define SOLENOID_PIN_WRITE_INACTIVE() writePinLow(SOLENOID_PIN) +#endif + void solenoid_buzz_on(void); void solenoid_buzz_off(void); void solenoid_set_buzz(int buzz); diff --git a/drivers/led/apa102.c b/drivers/led/apa102.c index 7396dc3c551..00e7eb45053 100644 --- a/drivers/led/apa102.c +++ b/drivers/led/apa102.c @@ -24,8 +24,8 @@ # elif defined(PROTOCOL_CHIBIOS) # include "hal.h" -# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) -# define APA102_NOPS (100 / (1000000000L / (STM32_SYSCLK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns +# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) +# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns # else # error("APA102_NOPS configuration required") # define APA102_NOPS 0 // this just pleases the compile so the above error is easier to spot diff --git a/drivers/led/aw20216.c b/drivers/led/aw20216.c index c608c0ab446..2c7ff8f0889 100644 --- a/drivers/led/aw20216.c +++ b/drivers/led/aw20216.c @@ -119,7 +119,8 @@ void AW20216_init(pin_t cs_pin, pin_t en_pin) { } void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { - aw_led led = g_aw_leds[index]; + aw_led led; + memcpy_P(&led, (&g_aw_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; diff --git a/drivers/led/aw20216.h b/drivers/led/aw20216.h index 97ac6dc5bf0..0a17050fed8 100644 --- a/drivers/led/aw20216.h +++ b/drivers/led/aw20216.h @@ -28,7 +28,7 @@ typedef struct aw_led { uint8_t b; } aw_led; -extern const aw_led __flash g_aw_leds[DRIVER_LED_TOTAL]; +extern const aw_led PROGMEM g_aw_leds[DRIVER_LED_TOTAL]; void AW20216_init(pin_t cs_pin, pin_t en_pin); void AW20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); diff --git a/drivers/led/ckled2001.c b/drivers/led/ckled2001.c new file mode 100644 index 00000000000..990e50cb606 --- /dev/null +++ b/drivers/led/ckled2001.c @@ -0,0 +1,228 @@ +/* Copyright 2021 @ Keychron (https://www.keychron.com) + * + * 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 . + */ + +#include "ckled2001.h" +#include "i2c_master.h" +#include "wait.h" + +#ifndef CKLED2001_TIMEOUT +# define CKLED2001_TIMEOUT 100 +#endif + +#ifndef CKLED2001_PERSISTENCE +# define CKLED2001_PERSISTENCE 0 +#endif + +#ifndef PHASE_CHANNEL +# define PHASE_CHANNEL MSKPHASE_12CHANNEL +#endif + +// Transfer buffer for TWITransmitData() +uint8_t g_twi_transfer_buffer[20]; + +// These buffers match the CKLED2001 PWM registers. +// The control buffers match the PG0 LED On/Off registers. +// Storing them like this is optimal for I2C transfers to the registers. +// We could optimize this and take out the unused registers from these +// buffers and the transfers in CKLED2001_write_pwm_buffer() but it's +// probably not worth the extra complexity. +uint8_t g_pwm_buffer[DRIVER_COUNT][192]; +bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false}; + +uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0}; +bool g_led_control_registers_update_required[DRIVER_COUNT] = {false}; + +bool CKLED2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) { + // If the transaction fails function returns false. + g_twi_transfer_buffer[0] = reg; + g_twi_transfer_buffer[1] = data; + +#if CKLED2001_PERSISTENCE > 0 + for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) { + return false; + } + } +#else + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) { + return false; + } +#endif + return true; +} + +bool CKLED2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) { + // Assumes PG1 is already selected. + // If any of the transactions fails function returns false. + // Transmit PWM registers in 12 transfers of 16 bytes. + // g_twi_transfer_buffer[] is 20 bytes + + // Iterate over the pwm_buffer contents at 16 byte intervals. + for (int i = 0; i < 192; i += 16) { + g_twi_transfer_buffer[0] = i; + // Copy the data from i to i+15. + // Device will auto-increment register for data after the first byte + // Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer. + for (int j = 0; j < 16; j++) { + g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j]; + } + +#if CKLED2001_PERSISTENCE > 0 + for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) { + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) { + return false; + } + } +#else + if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) { + return false; + } +#endif + } + return true; +} + +void CKLED2001_init(uint8_t addr) { + // Select to function page + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE); + // Setting LED driver to shutdown mode + CKLED2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE); + // Setting internal channel pulldown/pullup + CKLED2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL); + // Select number of scan phase + CKLED2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL); + // Setting PWM Delay Phase + CKLED2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE); + // Setting Driving/Sinking Channel Slew Rate + CKLED2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE); + // Setting Iref + CKLED2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE); + // Set LED CONTROL PAGE (Page 0) + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE); + for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) { + CKLED2001_write_register(addr, i, 0x00); + } + + // Set PWM PAGE (Page 1) + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE); + for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) { + CKLED2001_write_register(addr, i, 0x00); + } + + // Set CURRENT PAGE (Page 4) + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, CURRENT_TUNE_PAGE); + for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) { + CKLED2001_write_register(addr, i, 0xFF); + } + + // Enable LEDs ON/OFF + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE); + for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) { + CKLED2001_write_register(addr, i, 0xFF); + } + + // Select to function page + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE); + // Setting LED driver to normal mode + CKLED2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE); +} + +void CKLED2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + ckled2001_led led; + if (index >= 0 && index < DRIVER_LED_TOTAL) { + memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); + + g_pwm_buffer[led.driver][led.r] = red; + g_pwm_buffer[led.driver][led.g] = green; + g_pwm_buffer[led.driver][led.b] = blue; + g_pwm_buffer_update_required[led.driver] = true; + } +} + +void CKLED2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + CKLED2001_set_color(i, red, green, blue); + } +} + +void CKLED2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { + ckled2001_led led; + memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led)); + + uint8_t control_register_r = led.r / 8; + uint8_t control_register_g = led.g / 8; + uint8_t control_register_b = led.b / 8; + uint8_t bit_r = led.r % 8; + uint8_t bit_g = led.g % 8; + uint8_t bit_b = led.b % 8; + + if (red) { + g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); + } else { + g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); + } + if (green) { + g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); + } else { + g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); + } + if (blue) { + g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); + } else { + g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); + } + + g_led_control_registers_update_required[led.driver] = true; +} + +void CKLED2001_update_pwm_buffers(uint8_t addr, uint8_t index) { + if (g_pwm_buffer_update_required[index]) { + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE); + + // If any of the transactions fail we risk writing dirty PG0, + // refresh page 0 just in case. + if (!CKLED2001_write_pwm_buffer(addr, g_pwm_buffer[index])) { + g_led_control_registers_update_required[index] = true; + } + } + g_pwm_buffer_update_required[index] = false; +} + +void CKLED2001_update_led_control_registers(uint8_t addr, uint8_t index) { + if (g_led_control_registers_update_required[index]) { + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE); + for (int i = 0; i < 24; i++) { + CKLED2001_write_register(addr, i, g_led_control_registers[index][i]); + } + } + g_led_control_registers_update_required[index] = false; +} + +void CKLED2001_return_normal(uint8_t addr) { + // Select to function page + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE); + // Setting LED driver to normal mode + CKLED2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE); +} + +void CKLED2001_shutdown(uint8_t addr) { + // Select to function page + CKLED2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE); + // Setting LED driver to shutdown mode + CKLED2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE); + // Write SW Sleep Register + CKLED2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE); +} diff --git a/drivers/led/ckled2001.h b/drivers/led/ckled2001.h new file mode 100644 index 00000000000..1967961d205 --- /dev/null +++ b/drivers/led/ckled2001.h @@ -0,0 +1,339 @@ +/* Copyright 2021 @ Keychron (https://www.keychron.com) + * + * 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 . + */ + +#pragma once + +#include +#include +#include "progmem.h" + +typedef struct ckled2001_led { + uint8_t driver : 2; + uint8_t r; + uint8_t g; + uint8_t b; +} __attribute__((packed)) ckled2001_led; + +extern const ckled2001_led PROGMEM g_ckled2001_leds[DRIVER_LED_TOTAL]; + +void CKLED2001_init(uint8_t addr); +bool CKLED2001_write_register(uint8_t addr, uint8_t reg, uint8_t data); +bool CKLED2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer); + +void CKLED2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue); +void CKLED2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue); + +void CKLED2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue); + +// This should not be called from an interrupt +// (eg. from a timer interrupt). +// Call this while idle (in between matrix scans). +// If the buffer is dirty, it will update the driver with the buffer. +void CKLED2001_update_pwm_buffers(uint8_t addr, uint8_t index); +void CKLED2001_update_led_control_registers(uint8_t addr, uint8_t index); + +void CKLED2001_return_normal(uint8_t addr); +void CKLED2001_shutdown(uint8_t addr); + +// Registers Page Define +#define CONFIGURE_CMD_PAGE 0xFD +#define LED_CONTROL_PAGE 0x00 +#define LED_PWM_PAGE 0x01 +#define FUNCTION_PAGE 0x03 +#define CURRENT_TUNE_PAGE 0x04 + +// Function Register: address 0x00 +#define CONFIGURATION_REG 0x00 +#define MSKSW_SHUT_DOWN_MODE (0x0 << 0) +#define MSKSW_NORMAL_MODE (0x1 << 0) + +#define DRIVER_ID_REG 0x11 +#define CKLED2001_ID 0x8A + +#define PDU_REG 0x13 +#define MSKSET_CA_CB_CHANNEL 0xAA +#define MSKCLR_CA_CB_CHANNEL 0x00 + +#define SCAN_PHASE_REG 0x14 +#define MSKPHASE_12CHANNEL 0x00 +#define MSKPHASE_11CHANNEL 0x01 +#define MSKPHASE_10CHANNEL 0x02 +#define MSKPHASE_9CHANNEL 0x03 +#define MSKPHASE_8CHANNEL 0x04 +#define MSKPHASE_7CHANNEL 0x05 +#define MSKPHASE_6CHANNEL 0x06 +#define MSKPHASE_5CHANNEL 0x07 +#define MSKPHASE_4CHANNEL 0x08 +#define MSKPHASE_3CHANNEL 0x09 +#define MSKPHASE_2CHANNEL 0x0A +#define MSKPHASE_1CHANNEL 0x0B + +#define SLEW_RATE_CONTROL_MODE1_REG 0x15 +#define MSKPWM_DELAY_PHASE_ENABLE 0x04 +#define MSKPWM_DELAY_PHASE_DISABLE 0x00 + +#define SLEW_RATE_CONTROL_MODE2_REG 0x16 +#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE 0xC0 +#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_DISABLE 0x00 + +#define OPEN_SHORT_ENABLE_REG 0x17 +#define MSKOPEN_DETECTION_ENABLE (0x01 << 7) +#define MSKOPEN_DETECTION_DISABLE (0x00) + +#define MSKSHORT_DETECTION_ENABLE (0x01 << 6) +#define MSKSHORT_DETECTION_DISABLE (0x00) + +#define OPEN_SHORT_DUTY_REG 0x18 +#define OPEN_SHORT_FLAG_REG 0x19 + +#define MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7) +#define MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00) + +#define MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6) +#define MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00) + +#define SOFTWARE_SLEEP_REG 0x1A +#define MSKSLEEP_ENABLE 0x02 +#define MSKSLEEP_DISABLE 0x00 + +// LED Control Registers +#define LED_CONTROL_ON_OFF_FIRST_ADDR 0x0 +#define LED_CONTROL_ON_OFF_LAST_ADDR 0x17 +#define LED_CONTROL_ON_OFF_LENGTH ((LED_CONTROL_ON_OFF_LAST_ADDR - LED_CONTROL_ON_OFF_FIRST_ADDR) + 1) + +#define LED_CONTROL_OPEN_FIRST_ADDR 0x18 +#define LED_CONTROL_OPEN_LAST_ADDR 0x2F +#define LED_CONTROL_OPEN_LENGTH ((LED_CONTROL_OPEN_LAST_ADDR - LED_CONTROL_OPEN_FIRST_ADDR) + 1) + +#define LED_CONTROL_SHORT_FIRST_ADDR 0x30 +#define LED_CONTROL_SHORT_LAST_ADDR 0x47 +#define LED_CONTROL_SHORT_LENGTH ((LED_CONTROL_SHORT_LAST_ADDR - LED_CONTROL_SHORT_FIRST_ADDR) + 1) + +#define LED_CONTROL_PAGE_LENGTH 0x48 + +// LED Control Registers +#define LED_PWM_FIRST_ADDR 0x00 +#define LED_PWM_LAST_ADDR 0xBF +#define LED_PWM_LENGTH 0xC0 + +// Current Tune Registers +#define LED_CURRENT_TUNE_FIRST_ADDR 0x00 +#define LED_CURRENT_TUNE_LAST_ADDR 0x0B +#define LED_CURRENT_TUNE_LENGTH 0x0C + +#define A_1 0x00 +#define A_2 0x01 +#define A_3 0x02 +#define A_4 0x03 +#define A_5 0x04 +#define A_6 0x05 +#define A_7 0x06 +#define A_8 0x07 +#define A_9 0x08 +#define A_10 0x09 +#define A_11 0x0A +#define A_12 0x0B +#define A_13 0x0C +#define A_14 0x0D +#define A_15 0x0E +#define A_16 0x0F + +#define B_1 0x10 +#define B_2 0x11 +#define B_3 0x12 +#define B_4 0x13 +#define B_5 0x14 +#define B_6 0x15 +#define B_7 0x16 +#define B_8 0x17 +#define B_9 0x18 +#define B_10 0x19 +#define B_11 0x1A +#define B_12 0x1B +#define B_13 0x1C +#define B_14 0x1D +#define B_15 0x1E +#define B_16 0x1F + +#define C_1 0x20 +#define C_2 0x21 +#define C_3 0x22 +#define C_4 0x23 +#define C_5 0x24 +#define C_6 0x25 +#define C_7 0x26 +#define C_8 0x27 +#define C_9 0x28 +#define C_10 0x29 +#define C_11 0x2A +#define C_12 0x2B +#define C_13 0x2C +#define C_14 0x2D +#define C_15 0x2E +#define C_16 0x2F + +#define D_1 0x30 +#define D_2 0x31 +#define D_3 0x32 +#define D_4 0x33 +#define D_5 0x34 +#define D_6 0x35 +#define D_7 0x36 +#define D_8 0x37 +#define D_9 0x38 +#define D_10 0x39 +#define D_11 0x3A +#define D_12 0x3B +#define D_13 0x3C +#define D_14 0x3D +#define D_15 0x3E +#define D_16 0x3F + +#define E_1 0x40 +#define E_2 0x41 +#define E_3 0x42 +#define E_4 0x43 +#define E_5 0x44 +#define E_6 0x45 +#define E_7 0x46 +#define E_8 0x47 +#define E_9 0x48 +#define E_10 0x49 +#define E_11 0x4A +#define E_12 0x4B +#define E_13 0x4C +#define E_14 0x4D +#define E_15 0x4E +#define E_16 0x4F + +#define F_1 0x50 +#define F_2 0x51 +#define F_3 0x52 +#define F_4 0x53 +#define F_5 0x54 +#define F_6 0x55 +#define F_7 0x56 +#define F_8 0x57 +#define F_9 0x58 +#define F_10 0x59 +#define F_11 0x5A +#define F_12 0x5B +#define F_13 0x5C +#define F_14 0x5D +#define F_15 0x5E +#define F_16 0x5F + +#define G_1 0x60 +#define G_2 0x61 +#define G_3 0x62 +#define G_4 0x63 +#define G_5 0x64 +#define G_6 0x65 +#define G_7 0x66 +#define G_8 0x67 +#define G_9 0x68 +#define G_10 0x69 +#define G_11 0x6A +#define G_12 0x6B +#define G_13 0x6C +#define G_14 0x6D +#define G_15 0x6E +#define G_16 0x6F + +#define H_1 0x70 +#define H_2 0x71 +#define H_3 0x72 +#define H_4 0x73 +#define H_5 0x74 +#define H_6 0x75 +#define H_7 0x76 +#define H_8 0x77 +#define H_9 0x78 +#define H_10 0x79 +#define H_11 0x7A +#define H_12 0x7B +#define H_13 0x7C +#define H_14 0x7D +#define H_15 0x7E +#define H_16 0x7F + +#define I_1 0x80 +#define I_2 0x81 +#define I_3 0x82 +#define I_4 0x83 +#define I_5 0x84 +#define I_6 0x85 +#define I_7 0x86 +#define I_8 0x87 +#define I_9 0x88 +#define I_10 0x89 +#define I_11 0x8A +#define I_12 0x8B +#define I_13 0x8C +#define I_14 0x8D +#define I_15 0x8E +#define I_16 0x8F + +#define J_1 0x90 +#define J_2 0x91 +#define J_3 0x92 +#define J_4 0x93 +#define J_5 0x94 +#define J_6 0x95 +#define J_7 0x96 +#define J_8 0x97 +#define J_9 0x98 +#define J_10 0x99 +#define J_11 0x9A +#define J_12 0x9B +#define J_13 0x9C +#define J_14 0x9D +#define J_15 0x9E +#define J_16 0x9F + +#define K_1 0xA0 +#define K_2 0xA1 +#define K_3 0xA2 +#define K_4 0xA3 +#define K_5 0xA4 +#define K_6 0xA5 +#define K_7 0xA6 +#define K_8 0xA7 +#define K_9 0xA8 +#define K_10 0xA9 +#define K_11 0xAA +#define K_12 0xAB +#define K_13 0xAC +#define K_14 0xAD +#define K_15 0xAE +#define K_16 0xAF + +#define L_1 0xB0 +#define L_2 0xB1 +#define L_3 0xB2 +#define L_4 0xB3 +#define L_5 0xB4 +#define L_6 0xB5 +#define L_7 0xB6 +#define L_8 0xB7 +#define L_9 0xB8 +#define L_10 0xB9 +#define L_11 0xBA +#define L_12 0xBB +#define L_13 0xBC +#define L_14 0xBD +#define L_15 0xBE +#define L_16 0xBF \ No newline at end of file diff --git a/drivers/led/issi/is31fl3731-simple.c b/drivers/led/issi/is31fl3731-simple.c index d295772f5e9..f51e2e38aff 100644 --- a/drivers/led/issi/is31fl3731-simple.c +++ b/drivers/led/issi/is31fl3731-simple.c @@ -1,6 +1,7 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert * Copyright 2019 Clueboard + * Copyright 2021 Doni Crosby * * 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 @@ -40,6 +41,9 @@ #define ISSI_REG_PICTUREFRAME 0x01 +// Not defined in the datasheet -- See AN for IC +#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting + #define ISSI_REG_SHUTDOWN 0x0A #define ISSI_REG_AUDIOSYNC 0x06 @@ -144,6 +148,9 @@ void IS31FL3731_init(uint8_t addr) { // enable software shutdown IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); +#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array + IS31FL3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10); +#endif // this delay was copied from other drivers, might not be needed wait_ms(10); @@ -186,8 +193,9 @@ void IS31FL3731_init(uint8_t addr) { } void IS31FL3731_set_value(int index, uint8_t value) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); // Subtract 0x24 to get the second index of g_pwm_buffer g_pwm_buffer[led.driver][led.v - 0x24] = value; @@ -202,7 +210,8 @@ void IS31FL3731_set_value_all(uint8_t value) { } void IS31FL3731_set_led_control_register(uint8_t index, bool value) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); uint8_t control_register = (led.v - 0x24) / 8; uint8_t bit_value = (led.v - 0x24) % 8; diff --git a/drivers/led/issi/is31fl3731-simple.h b/drivers/led/issi/is31fl3731-simple.h index ecde31eed5e..ded94b0470d 100644 --- a/drivers/led/issi/is31fl3731-simple.h +++ b/drivers/led/issi/is31fl3731-simple.h @@ -27,7 +27,7 @@ typedef struct is31_led { uint8_t v; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3731_init(uint8_t addr); void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); diff --git a/drivers/led/issi/is31fl3731.c b/drivers/led/issi/is31fl3731.c index 110bdc1be4d..e6190a6b908 100644 --- a/drivers/led/issi/is31fl3731.c +++ b/drivers/led/issi/is31fl3731.c @@ -1,5 +1,6 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert + * Copyright 2021 Doni Crosby * * 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 @@ -39,6 +40,9 @@ #define ISSI_REG_PICTUREFRAME 0x01 +// Not defined in the datasheet -- See AN for IC +#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting + #define ISSI_REG_SHUTDOWN 0x0A #define ISSI_REG_AUDIOSYNC 0x06 @@ -132,6 +136,9 @@ void IS31FL3731_init(uint8_t addr) { // enable software shutdown IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00); +#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array + IS31FL3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10); +#endif // this delay was copied from other drivers, might not be needed wait_ms(10); @@ -174,8 +181,9 @@ void IS31FL3731_init(uint8_t addr) { } void IS31FL3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); // Subtract 0x24 to get the second index of g_pwm_buffer g_pwm_buffer[led.driver][led.r - 0x24] = red; @@ -192,7 +200,8 @@ void IS31FL3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); uint8_t control_register_r = (led.r - 0x24) / 8; uint8_t control_register_g = (led.g - 0x24) / 8; diff --git a/drivers/led/issi/is31fl3731.h b/drivers/led/issi/is31fl3731.h index 803ea3ea12f..6647119ebae 100644 --- a/drivers/led/issi/is31fl3731.h +++ b/drivers/led/issi/is31fl3731.h @@ -28,7 +28,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3731_init(uint8_t addr); void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data); diff --git a/drivers/led/issi/is31fl3733.c b/drivers/led/issi/is31fl3733.c index d99e5339c91..696491d0706 100644 --- a/drivers/led/issi/is31fl3733.c +++ b/drivers/led/issi/is31fl3733.c @@ -1,6 +1,7 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert * Copyright 2018 Yiancar + * Copyright 2021 Doni Crosby * * 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 @@ -56,6 +57,18 @@ # define ISSI_PERSISTENCE 0 #endif +#ifndef ISSI_PWM_FREQUENCY +# define ISSI_PWM_FREQUENCY 0b000 // PFS - IS31FL3733B only +#endif + +#ifndef ISSI_SWPULLUP +# define ISSI_SWPULLUP PUR_0R +#endif + +#ifndef ISSI_CSPULLUP +# define ISSI_CSPULLUP PUR_0R +#endif + // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20]; @@ -154,18 +167,23 @@ void IS31FL3733_init(uint8_t addr, uint8_t sync) { // Select PG3 IS31FL3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + // Set de-ghost pull-up resistors (SWx) + IS31FL3733_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP); + // Set de-ghost pull-down resistors (CSx) + IS31FL3733_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP); // Set global current to maximum. IS31FL3733_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. - IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01); + IS31FL3733_write_register(addr, ISSI_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((ISSI_PWM_FREQUENCY & 0b111) << 3) | 0x01); // Wait 10ms to ensure the device has woken up. wait_ms(10); } void IS31FL3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; @@ -181,7 +199,8 @@ void IS31FL3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); uint8_t control_register_r = led.r / 8; uint8_t control_register_g = led.g / 8; diff --git a/drivers/led/issi/is31fl3733.h b/drivers/led/issi/is31fl3733.h index 64fd38eb191..c5d62fed851 100644 --- a/drivers/led/issi/is31fl3733.h +++ b/drivers/led/issi/is31fl3733.h @@ -1,6 +1,7 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert * Copyright 2018 Yiancar + * Copyright 2021 Doni Crosby * * 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 @@ -29,7 +30,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3733_init(uint8_t addr, uint8_t sync); bool IS31FL3733_write_register(uint8_t addr, uint8_t reg, uint8_t data); @@ -47,6 +48,14 @@ void IS31FL3733_set_led_control_register(uint8_t index, bool red, bool green, bo void IS31FL3733_update_pwm_buffers(uint8_t addr, uint8_t index); void IS31FL3733_update_led_control_registers(uint8_t addr, uint8_t index); +#define PUR_0R 0x00 // No PUR resistor +#define PUR_05KR 0x02 // 0.5k Ohm resistor in t_NOL +#define PUR_3KR 0x03 // 3.0k Ohm resistor on all the time +#define PUR_4KR 0x04 // 4.0k Ohm resistor on all the time +#define PUR_8KR 0x05 // 8.0k Ohm resistor on all the time +#define PUR_16KR 0x06 // 16k Ohm resistor on all the time +#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL + #define A_1 0x00 #define A_2 0x01 #define A_3 0x02 diff --git a/drivers/led/issi/is31fl3736.c b/drivers/led/issi/is31fl3736.c index 7dece1b1eb5..c9a871118d2 100644 --- a/drivers/led/issi/is31fl3736.c +++ b/drivers/led/issi/is31fl3736.c @@ -1,4 +1,5 @@ /* Copyright 2018 Jason Williams (Wilba) + * Copyright 2021 Doni Crosby * * 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 @@ -54,6 +55,14 @@ # define ISSI_PERSISTENCE 0 #endif +#ifndef ISSI_SWPULLUP +# define ISSI_SWPULLUP PUR_0R +#endif + +#ifndef ISSI_CSPULLUP +# define ISSI_CSPULLUP PUR_0R +#endif + // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20]; @@ -140,6 +149,10 @@ void IS31FL3736_init(uint8_t addr) { // Select PG3 IS31FL3736_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + // Set de-ghost pull-up resistors (SWx) + IS31FL3736_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP); + // Set de-ghost pull-down resistors (CSx) + IS31FL3736_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP); // Set global current to maximum. IS31FL3736_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. @@ -150,8 +163,9 @@ void IS31FL3736_init(uint8_t addr) { } void IS31FL3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; @@ -167,7 +181,8 @@ void IS31FL3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); // IS31FL3733 // The PWM register for a matrix position (0x00 to 0xBF) can be diff --git a/drivers/led/issi/is31fl3736.h b/drivers/led/issi/is31fl3736.h index c956c87f7c1..9fbe1cc577c 100644 --- a/drivers/led/issi/is31fl3736.h +++ b/drivers/led/issi/is31fl3736.h @@ -1,4 +1,5 @@ /* Copyright 2018 Jason Williams (Wilba) + * Copyright 2021 Doni Crosby * * 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 @@ -38,7 +39,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3736_init(uint8_t addr); void IS31FL3736_write_register(uint8_t addr, uint8_t reg, uint8_t data); @@ -60,6 +61,15 @@ void IS31FL3736_mono_set_led_control_register(uint8_t index, bool enabled); void IS31FL3736_update_pwm_buffers(uint8_t addr1, uint8_t addr2); void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2); +#define PUR_0R 0x00 // No PUR resistor +#define PUR_05KR 0x01 // 0.5k Ohm resistor +#define PUR_1KR 0x02 // 1.0k Ohm resistor +#define PUR_2KR 0x03 // 2.0k Ohm resistor +#define PUR_4KR 0x04 // 4.0k Ohm resistor +#define PUR_8KR 0x05 // 8.0k Ohm resistor +#define PUR_16KR 0x06 // 16k Ohm resistor +#define PUR_32KR 0x07 // 32k Ohm resistor + #define A_1 0x00 #define A_2 0x02 #define A_3 0x04 diff --git a/drivers/led/issi/is31fl3737.c b/drivers/led/issi/is31fl3737.c index 0bb4ddd4252..0722e18869f 100644 --- a/drivers/led/issi/is31fl3737.c +++ b/drivers/led/issi/is31fl3737.c @@ -1,6 +1,7 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert * Copyright 2018 Yiancar + * Copyright 2021 Doni Crosby * * 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 @@ -56,6 +57,14 @@ # define ISSI_PERSISTENCE 0 #endif +#ifndef ISSI_SWPULLUP +# define ISSI_SWPULLUP PUR_0R +#endif + +#ifndef ISSI_CSPULLUP +# define ISSI_CSPULLUP PUR_0R +#endif + // Transfer buffer for TWITransmitData() uint8_t g_twi_transfer_buffer[20]; @@ -143,6 +152,10 @@ void IS31FL3737_init(uint8_t addr) { // Select PG3 IS31FL3737_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION); + // Set de-ghost pull-up resistors (SWx) + IS31FL3737_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP); + // Set de-ghost pull-down resistors (CSx) + IS31FL3737_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP); // Set global current to maximum. IS31FL3737_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Disable software shutdown. @@ -153,8 +166,9 @@ void IS31FL3737_init(uint8_t addr) { } void IS31FL3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; @@ -170,7 +184,8 @@ void IS31FL3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); uint8_t control_register_r = led.r / 8; uint8_t control_register_g = led.g / 8; diff --git a/drivers/led/issi/is31fl3737.h b/drivers/led/issi/is31fl3737.h index 06886e9c9b0..31b1a222677 100644 --- a/drivers/led/issi/is31fl3737.h +++ b/drivers/led/issi/is31fl3737.h @@ -1,6 +1,7 @@ /* Copyright 2017 Jason Williams * Copyright 2018 Jack Humbert * Copyright 2018 Yiancar + * Copyright 2021 Doni Crosby * * 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 @@ -29,7 +30,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3737_init(uint8_t addr); void IS31FL3737_write_register(uint8_t addr, uint8_t reg, uint8_t data); @@ -47,6 +48,15 @@ void IS31FL3737_set_led_control_register(uint8_t index, bool red, bool green, bo void IS31FL3737_update_pwm_buffers(uint8_t addr1, uint8_t addr2); void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2); +#define PUR_0R 0x00 // No PUR resistor +#define PUR_05KR 0x01 // 0.5k Ohm resistor in t_NOL +#define PUR_1KR 0x02 // 1.0k Ohm resistor in t_NOL +#define PUR_2KR 0x03 // 2.0k Ohm resistor in t_NOL +#define PUR_4KR 0x04 // 4.0k Ohm resistor in t_NOL +#define PUR_8KR 0x05 // 8.0k Ohm resistor in t_NOL +#define PUR_16KR 0x06 // 16k Ohm resistor in t_NOL +#define PUR_32KR 0x07 // 32k Ohm resistor in t_NOL + #define A_1 0x00 #define A_2 0x01 #define A_3 0x02 diff --git a/drivers/led/issi/is31fl3741.c b/drivers/led/issi/is31fl3741.c index 24a273514ed..8d347a5e607 100644 --- a/drivers/led/issi/is31fl3741.c +++ b/drivers/led/issi/is31fl3741.c @@ -61,6 +61,14 @@ # define ISSI_PERSISTENCE 0 #endif +#ifndef ISSI_SWPULLUP +# define ISSI_SWPULLUP PUR_32KR +#endif + +#ifndef ISSI_CSPULLUP +# define ISSI_CSPULLUP PUR_32KR +#endif + #define ISSI_MAX_LEDS 351 // Transfer buffer for TWITransmitData() @@ -157,7 +165,7 @@ void IS31FL3741_init(uint8_t addr) { // Set Golbal Current Control Register IS31FL3741_write_register(addr, ISSI_REG_GLOBALCURRENT, 0xFF); // Set Pull up & Down for SWx CSy - IS31FL3741_write_register(addr, ISSI_REG_PULLDOWNUP, 0x77); + IS31FL3741_write_register(addr, ISSI_REG_PULLDOWNUP, ((ISSI_CSPULLUP << 4) | ISSI_SWPULLUP)); // IS31FL3741_update_led_scaling_registers(addr, 0xFF, 0xFF, 0xFF); @@ -166,8 +174,9 @@ void IS31FL3741_init(uint8_t addr) { } void IS31FL3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { + is31_led led; if (index >= 0 && index < DRIVER_LED_TOTAL) { - is31_led led = g_is31_leds[index]; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); g_pwm_buffer[led.driver][led.r] = red; g_pwm_buffer[led.driver][led.g] = green; @@ -183,7 +192,8 @@ void IS31FL3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { } void IS31FL3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue) { - is31_led led = g_is31_leds[index]; + is31_led led; + memcpy_P(&led, (&g_is31_leds[index]), sizeof(led)); if (red) { g_scaling_registers[led.driver][led.r] = 0xFF; diff --git a/drivers/led/issi/is31fl3741.h b/drivers/led/issi/is31fl3741.h index 163a0352338..8154f8be702 100644 --- a/drivers/led/issi/is31fl3741.h +++ b/drivers/led/issi/is31fl3741.h @@ -30,7 +30,7 @@ typedef struct is31_led { uint32_t b : 10; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3741_init(uint8_t addr); void IS31FL3741_write_register(uint8_t addr, uint8_t reg, uint8_t data); @@ -51,6 +51,15 @@ void IS31FL3741_set_scaling_registers(const is31_led *pled, uint8_t red, uint8_t void IS31FL3741_set_pwm_buffer(const is31_led *pled, uint8_t red, uint8_t green, uint8_t blue); +#define PUR_0R 0x00 // No PUR resistor +#define PUR_05KR 0x01 // 0.5k Ohm resistor +#define PUR_1KR 0x02 // 1.0k Ohm resistor +#define PUR_2KR 0x03 // 2.0k Ohm resistor +#define PUR_4KR 0x04 // 4.0k Ohm resistor +#define PUR_8KR 0x05 // 8.0k Ohm resistor +#define PUR_16KR 0x06 // 16k Ohm resistor +#define PUR_32KR 0x07 // 32k Ohm resistor + #define CS1_SW1 0x00 #define CS2_SW1 0x01 #define CS3_SW1 0x02 diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h index 13b73ede9d0..3b56d370dc7 100644 --- a/drivers/oled/oled_driver.h +++ b/drivers/oled/oled_driver.h @@ -190,6 +190,7 @@ bool oled_init(oled_rotation_t rotation); // Called at the start of oled_init, weak function overridable by the user // rotation - the value passed into oled_init // Return new oled_rotation_t if you want to override default rotation +oled_rotation_t oled_init_kb(oled_rotation_t rotation); oled_rotation_t oled_init_user(oled_rotation_t rotation); // Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering @@ -285,7 +286,8 @@ uint8_t oled_get_brightness(void); void oled_task(void); // Called at the start of oled_task, weak function overridable by the user -void oled_task_user(void); +bool oled_task_kb(void); +bool oled_task_user(void); // Set the specific 8 lines rows of the screen to scroll. // 0 is the default for start, and 7 for end, which is the entire diff --git a/drivers/oled/ssd1306_sh1106.c b/drivers/oled/ssd1306_sh1106.c index e9049438f52..d9bd3c14bd7 100644 --- a/drivers/oled/ssd1306_sh1106.c +++ b/drivers/oled/ssd1306_sh1106.c @@ -167,7 +167,7 @@ bool oled_init(oled_rotation_t rotation) { } #endif - oled_rotation = oled_init_user(rotation); + oled_rotation = oled_init_user(oled_init_kb(rotation)); if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) { oled_rotation_width = OLED_DISPLAY_WIDTH; } else { @@ -232,6 +232,7 @@ bool oled_init(oled_rotation_t rotation) { return true; } +__attribute__((weak)) oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return rotation; } __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } void oled_clear(void) { @@ -741,11 +742,11 @@ void oled_task(void) { if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) { oled_update_timeout = timer_read(); oled_set_cursor(0, 0); - oled_task_user(); + oled_task_kb(); } #else oled_set_cursor(0, 0); - oled_task_user(); + oled_task_kb(); #endif #if OLED_SCROLL_TIMEOUT > 0 @@ -776,4 +777,5 @@ void oled_task(void) { #endif } -__attribute__((weak)) void oled_task_user(void) {} +__attribute__((weak)) bool oled_task_kb(void) { return oled_task_user(); } +__attribute__((weak)) bool oled_task_user(void) { return true; } diff --git a/tmk_core/protocol/ps2.h b/drivers/ps2/ps2.h similarity index 100% rename from tmk_core/protocol/ps2.h rename to drivers/ps2/ps2.h diff --git a/tmk_core/protocol/ps2_busywait.c b/drivers/ps2/ps2_busywait.c similarity index 100% rename from tmk_core/protocol/ps2_busywait.c rename to drivers/ps2/ps2_busywait.c diff --git a/drivers/ps2/ps2_interrupt.c b/drivers/ps2/ps2_interrupt.c new file mode 100644 index 00000000000..70debd02f7f --- /dev/null +++ b/drivers/ps2/ps2_interrupt.c @@ -0,0 +1,340 @@ +/* +Copyright 2010,2011,2012,2013 Jun WAKO + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * PS/2 protocol Pin interrupt version + */ + +#include + +#if defined(__AVR__) +# include +#elif defined(PROTOCOL_CHIBIOS) // TODO: or STM32 ? +// chibiOS headers +# include "ch.h" +# include "hal.h" +#endif + +#include "ps2.h" +#include "ps2_io.h" +#include "print.h" +#include "wait.h" + +#define WAIT(stat, us, err) \ + do { \ + if (!wait_##stat(us)) { \ + ps2_error = err; \ + goto ERROR; \ + } \ + } while (0) + +uint8_t ps2_error = PS2_ERR_NONE; + +static inline uint8_t pbuf_dequeue(void); +static inline void pbuf_enqueue(uint8_t data); +static inline bool pbuf_has_data(void); +static inline void pbuf_clear(void); + +#if defined(PROTOCOL_CHIBIOS) +void ps2_interrupt_service_routine(void); +void palCallback(void *arg) { ps2_interrupt_service_routine(); } + +# define PS2_INT_INIT() \ + { palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_INPUT); } \ + while (0) +# define PS2_INT_ON() \ + { \ + palEnableLineEvent(PS2_CLOCK_PIN, PAL_EVENT_MODE_FALLING_EDGE); \ + palSetLineCallback(PS2_CLOCK_PIN, palCallback, NULL); \ + } \ + while (0) +# define PS2_INT_OFF() \ + { palDisableLineEvent(PS2_CLOCK_PIN); } \ + while (0) +#endif // PROTOCOL_CHIBIOS + +void ps2_host_init(void) { + idle(); + PS2_INT_INIT(); + PS2_INT_ON(); + // POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20) + // wait_ms(2500); +} + +uint8_t ps2_host_send(uint8_t data) { + bool parity = true; + ps2_error = PS2_ERR_NONE; + + PS2_INT_OFF(); + + /* terminate a transmission if we have */ + inhibit(); + wait_us(100); // 100us [4]p.13, [5]p.50 + + /* 'Request to Send' and Start bit */ + data_lo(); + clock_hi(); + WAIT(clock_lo, 10000, 10); // 10ms [5]p.50 + + /* Data bit[2-9] */ + for (uint8_t i = 0; i < 8; i++) { + if (data & (1 << i)) { + parity = !parity; + data_hi(); + } else { + data_lo(); + } + WAIT(clock_hi, 50, 2); + WAIT(clock_lo, 50, 3); + } + + /* Parity bit */ + wait_us(15); + if (parity) { + data_hi(); + } else { + data_lo(); + } + WAIT(clock_hi, 50, 4); + WAIT(clock_lo, 50, 5); + + /* Stop bit */ + wait_us(15); + data_hi(); + + /* Ack */ + WAIT(data_lo, 50, 6); + WAIT(clock_lo, 50, 7); + + /* wait for idle state */ + WAIT(clock_hi, 50, 8); + WAIT(data_hi, 50, 9); + + idle(); + PS2_INT_ON(); + return ps2_host_recv_response(); +ERROR: + idle(); + PS2_INT_ON(); + return 0; +} + +uint8_t ps2_host_recv_response(void) { + // Command may take 25ms/20ms at most([5]p.46, [3]p.21) + uint8_t retry = 25; + while (retry-- && !pbuf_has_data()) { + wait_ms(1); + } + return pbuf_dequeue(); +} + +/* get data received by interrupt */ +uint8_t ps2_host_recv(void) { + if (pbuf_has_data()) { + ps2_error = PS2_ERR_NONE; + return pbuf_dequeue(); + } else { + ps2_error = PS2_ERR_NODATA; + return 0; + } +} + +void ps2_interrupt_service_routine(void) { + static enum { + INIT, + START, + BIT0, + BIT1, + BIT2, + BIT3, + BIT4, + BIT5, + BIT6, + BIT7, + PARITY, + STOP, + } state = INIT; + static uint8_t data = 0; + static uint8_t parity = 1; + + // TODO: abort if elapse 100us from previous interrupt + + // return unless falling edge + if (clock_in()) { + goto RETURN; + } + + state++; + switch (state) { + case START: + if (data_in()) goto ERROR; + break; + case BIT0: + case BIT1: + case BIT2: + case BIT3: + case BIT4: + case BIT5: + case BIT6: + case BIT7: + data >>= 1; + if (data_in()) { + data |= 0x80; + parity++; + } + break; + case PARITY: + if (data_in()) { + if (!(parity & 0x01)) goto ERROR; + } else { + if (parity & 0x01) goto ERROR; + } + break; + case STOP: + if (!data_in()) goto ERROR; + pbuf_enqueue(data); + goto DONE; + break; + default: + goto ERROR; + } + goto RETURN; +ERROR: + ps2_error = state; +DONE: + state = INIT; + data = 0; + parity = 1; +RETURN: + return; +} + +#if defined(__AVR__) +ISR(PS2_INT_VECT) { ps2_interrupt_service_routine(); } +#endif + +/* send LED state to keyboard */ +void ps2_host_set_led(uint8_t led) { + ps2_host_send(0xED); + ps2_host_send(led); +} + +/*-------------------------------------------------------------------- + * Ring buffer to store scan codes from keyboard + *------------------------------------------------------------------*/ +#define PBUF_SIZE 32 +static uint8_t pbuf[PBUF_SIZE]; +static uint8_t pbuf_head = 0; +static uint8_t pbuf_tail = 0; +static inline void pbuf_enqueue(uint8_t data) { +#if defined(__AVR__) + uint8_t sreg = SREG; + cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLockFromISR(); +#endif + + uint8_t next = (pbuf_head + 1) % PBUF_SIZE; + if (next != pbuf_tail) { + pbuf[pbuf_head] = data; + pbuf_head = next; + } else { + print("pbuf: full\n"); + } + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlockFromISR(); +#endif +} +static inline uint8_t pbuf_dequeue(void) { + uint8_t val = 0; + +#if defined(__AVR__) + uint8_t sreg = SREG; + cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + + if (pbuf_head != pbuf_tail) { + val = pbuf[pbuf_tail]; + pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; + } + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif + + return val; +} +static inline bool pbuf_has_data(void) { +#if defined(__AVR__) + uint8_t sreg = SREG; + cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + + bool has_data = (pbuf_head != pbuf_tail); + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif + return has_data; +} +static inline void pbuf_clear(void) { +#if defined(__AVR__) + uint8_t sreg = SREG; + cli(); +#elif defined(PROTOCOL_CHIBIOS) + chSysLock(); +#endif + + pbuf_head = pbuf_tail = 0; + +#if defined(__AVR__) + SREG = sreg; +#elif defined(PROTOCOL_CHIBIOS) + chSysUnlock(); +#endif +} diff --git a/tmk_core/protocol/ps2_io.h b/drivers/ps2/ps2_io.h similarity index 100% rename from tmk_core/protocol/ps2_io.h rename to drivers/ps2/ps2_io.h diff --git a/drivers/ps2/ps2_mouse.c b/drivers/ps2/ps2_mouse.c new file mode 100644 index 00000000000..8a6668b4106 --- /dev/null +++ b/drivers/ps2/ps2_mouse.c @@ -0,0 +1,270 @@ +/* +Copyright 2011,2013 Jun Wako + +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 . +*/ + +#include +#include "ps2_mouse.h" +#include "wait.h" +#include "gpio.h" +#include "host.h" +#include "timer.h" +#include "print.h" +#include "report.h" +#include "debug.h" +#include "ps2.h" + +/* ============================= MACROS ============================ */ + +static report_mouse_t mouse_report = {}; + +static inline void ps2_mouse_print_report(report_mouse_t *mouse_report); +static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report); +static inline void ps2_mouse_clear_report(report_mouse_t *mouse_report); +static inline void ps2_mouse_enable_scrolling(void); +static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report); + +/* ============================= IMPLEMENTATION ============================ */ + +/* supports only 3 button mouse at this time */ +void ps2_mouse_init(void) { + ps2_host_init(); + + wait_ms(PS2_MOUSE_INIT_DELAY); // wait for powering up + + PS2_MOUSE_SEND(PS2_MOUSE_RESET, "ps2_mouse_init: sending reset"); + + PS2_MOUSE_RECEIVE("ps2_mouse_init: read BAT"); + PS2_MOUSE_RECEIVE("ps2_mouse_init: read DevID"); + +#ifdef PS2_MOUSE_USE_REMOTE_MODE + ps2_mouse_set_remote_mode(); +#else + ps2_mouse_enable_data_reporting(); +#endif + +#ifdef PS2_MOUSE_ENABLE_SCROLLING + ps2_mouse_enable_scrolling(); +#endif + +#ifdef PS2_MOUSE_USE_2_1_SCALING + ps2_mouse_set_scaling_2_1(); +#endif + + ps2_mouse_init_user(); +} + +__attribute__((weak)) void ps2_mouse_init_user(void) {} + +__attribute__((weak)) void ps2_mouse_moved_user(report_mouse_t *mouse_report) {} + +void ps2_mouse_task(void) { + static uint8_t buttons_prev = 0; + extern int tp_buttons; + + /* receives packet from mouse */ + uint8_t rcv; + rcv = ps2_host_send(PS2_MOUSE_READ_DATA); + if (rcv == PS2_ACK) { + mouse_report.buttons = ps2_host_recv_response() | tp_buttons; + mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER; + mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER; +#ifdef PS2_MOUSE_ENABLE_SCROLLING + mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK) * PS2_MOUSE_V_MULTIPLIER; +#endif + } else { + if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n"); + return; + } + + /* if mouse moves or buttons state changes */ + if (mouse_report.x || mouse_report.y || mouse_report.v || ((mouse_report.buttons ^ buttons_prev) & PS2_MOUSE_BTN_MASK)) { +#ifdef PS2_MOUSE_DEBUG_RAW + // Used to debug raw ps2 bytes from mouse + ps2_mouse_print_report(&mouse_report); +#endif + buttons_prev = mouse_report.buttons; + ps2_mouse_convert_report_to_hid(&mouse_report); +#if PS2_MOUSE_SCROLL_BTN_MASK + ps2_mouse_scroll_button_task(&mouse_report); +#endif + if (mouse_report.x || mouse_report.y || mouse_report.v) { + ps2_mouse_moved_user(&mouse_report); + } +#ifdef PS2_MOUSE_DEBUG_HID + // Used to debug the bytes sent to the host + ps2_mouse_print_report(&mouse_report); +#endif + host_mouse_send(&mouse_report); + } + + ps2_mouse_clear_report(&mouse_report); +} + +void ps2_mouse_disable_data_reporting(void) { PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting"); } + +void ps2_mouse_enable_data_reporting(void) { PS2_MOUSE_SEND(PS2_MOUSE_ENABLE_DATA_REPORTING, "ps2 mouse enable data reporting"); } + +void ps2_mouse_set_remote_mode(void) { + PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode"); + ps2_mouse_mode = PS2_MOUSE_REMOTE_MODE; +} + +void ps2_mouse_set_stream_mode(void) { + PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode"); + ps2_mouse_mode = PS2_MOUSE_STREAM_MODE; +} + +void ps2_mouse_set_scaling_2_1(void) { PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1"); } + +void ps2_mouse_set_scaling_1_1(void) { PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1"); } + +void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution) { PS2_MOUSE_SET_SAFE(PS2_MOUSE_SET_RESOLUTION, resolution, "ps2 mouse set resolution"); } + +void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate) { PS2_MOUSE_SET_SAFE(PS2_MOUSE_SET_SAMPLE_RATE, sample_rate, "ps2 mouse set sample rate"); } + +/* ============================= HELPERS ============================ */ + +#define X_IS_NEG (mouse_report->buttons & (1 << PS2_MOUSE_X_SIGN)) +#define Y_IS_NEG (mouse_report->buttons & (1 << PS2_MOUSE_Y_SIGN)) +#define X_IS_OVF (mouse_report->buttons & (1 << PS2_MOUSE_X_OVFLW)) +#define Y_IS_OVF (mouse_report->buttons & (1 << PS2_MOUSE_Y_OVFLW)) +static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report) { + // PS/2 mouse data is '9-bit integer'(-256 to 255) which is comprised of sign-bit and 8-bit value. + // bit: 8 7 ... 0 + // sign \8-bit/ + // + // Meanwhile USB HID mouse indicates 8bit data(-127 to 127), note that -128 is not used. + // + // This converts PS/2 data into HID value. Use only -127-127 out of PS/2 9-bit. + mouse_report->x = X_IS_NEG ? ((!X_IS_OVF && -127 <= mouse_report->x && mouse_report->x <= -1) ? mouse_report->x : -127) : ((!X_IS_OVF && 0 <= mouse_report->x && mouse_report->x <= 127) ? mouse_report->x : 127); + mouse_report->y = Y_IS_NEG ? ((!Y_IS_OVF && -127 <= mouse_report->y && mouse_report->y <= -1) ? mouse_report->y : -127) : ((!Y_IS_OVF && 0 <= mouse_report->y && mouse_report->y <= 127) ? mouse_report->y : 127); + +#ifdef PS2_MOUSE_INVERT_BUTTONS + // swap left & right buttons + uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT; + uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT; + mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0); +#else + // remove sign and overflow flags + mouse_report->buttons &= PS2_MOUSE_BTN_MASK; +#endif + +#ifdef PS2_MOUSE_INVERT_X + mouse_report->x = -mouse_report->x; +#endif +#ifndef PS2_MOUSE_INVERT_Y // NOTE if not! + // invert coordinate of y to conform to USB HID mouse + mouse_report->y = -mouse_report->y; +#endif + +#ifdef PS2_MOUSE_ROTATE + int8_t x = mouse_report->x; + int8_t y = mouse_report->y; +# if PS2_MOUSE_ROTATE == 90 + mouse_report->x = y; + mouse_report->y = -x; +# elif PS2_MOUSE_ROTATE == 180 + mouse_report->x = -x; + mouse_report->y = -y; +# elif PS2_MOUSE_ROTATE == 270 + mouse_report->x = -y; + mouse_report->y = x; +# endif +#endif +} + +static inline void ps2_mouse_clear_report(report_mouse_t *mouse_report) { + mouse_report->x = 0; + mouse_report->y = 0; + mouse_report->v = 0; + mouse_report->h = 0; + mouse_report->buttons = 0; +} + +static inline void ps2_mouse_print_report(report_mouse_t *mouse_report) { + if (!debug_mouse) return; + print("ps2_mouse: ["); + print_hex8(mouse_report->buttons); + print("|"); + print_hex8((uint8_t)mouse_report->x); + print(" "); + print_hex8((uint8_t)mouse_report->y); + print(" "); + print_hex8((uint8_t)mouse_report->v); + print(" "); + print_hex8((uint8_t)mouse_report->h); + print("]\n"); +} + +static inline void ps2_mouse_enable_scrolling(void) { + PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Initiaing scroll wheel enable: Set sample rate"); + PS2_MOUSE_SEND(200, "200"); + PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Set sample rate"); + PS2_MOUSE_SEND(100, "100"); + PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Set sample rate"); + PS2_MOUSE_SEND(80, "80"); + PS2_MOUSE_SEND(PS2_MOUSE_GET_DEVICE_ID, "Finished enabling scroll wheel"); + wait_ms(20); +} + +#define PRESS_SCROLL_BUTTONS mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK) +#define RELEASE_SCROLL_BUTTONS mouse_report->buttons &= ~(PS2_MOUSE_SCROLL_BTN_MASK) +static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) { + static enum { + SCROLL_NONE, + SCROLL_BTN, + SCROLL_SENT, + } scroll_state = SCROLL_NONE; + static uint16_t scroll_button_time = 0; + + if (PS2_MOUSE_SCROLL_BTN_MASK == (mouse_report->buttons & (PS2_MOUSE_SCROLL_BTN_MASK))) { + // All scroll buttons are pressed + + if (scroll_state == SCROLL_NONE) { + scroll_button_time = timer_read(); + scroll_state = SCROLL_BTN; + } + + // If the mouse has moved, update the report to scroll instead of move the mouse + if (mouse_report->x || mouse_report->y) { + scroll_state = SCROLL_SENT; + mouse_report->v = -mouse_report->y / (PS2_MOUSE_SCROLL_DIVISOR_V); + mouse_report->h = mouse_report->x / (PS2_MOUSE_SCROLL_DIVISOR_H); + mouse_report->x = 0; + mouse_report->y = 0; +#ifdef PS2_MOUSE_INVERT_H + mouse_report->h = -mouse_report->h; +#endif +#ifdef PS2_MOUSE_INVERT_V + mouse_report->v = -mouse_report->v; +#endif + } + } else if (0 == (PS2_MOUSE_SCROLL_BTN_MASK & mouse_report->buttons)) { + // None of the scroll buttons are pressed + +#if PS2_MOUSE_SCROLL_BTN_SEND + if (scroll_state == SCROLL_BTN && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) { + PRESS_SCROLL_BUTTONS; + host_mouse_send(mouse_report); + wait_ms(100); + RELEASE_SCROLL_BUTTONS; + } +#endif + scroll_state = SCROLL_NONE; + } + + RELEASE_SCROLL_BUTTONS; +} diff --git a/tmk_core/protocol/ps2_mouse.h b/drivers/ps2/ps2_mouse.h similarity index 100% rename from tmk_core/protocol/ps2_mouse.h rename to drivers/ps2/ps2_mouse.h diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c deleted file mode 100644 index d011ad225cf..00000000000 --- a/drivers/qwiic/micro_oled.c +++ /dev/null @@ -1,482 +0,0 @@ -/* Jim Lindblom @ SparkFun Electronics - * October 26, 2014 - * https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED - * - * Modified by: - * Emil Varughese @ Edwin Robotics Pvt. Ltd. - * July 27, 2015 - * https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ - * - * This code was heavily based around the MicroView library, written by GeekAmmo - * (https://github.com/geekammo/MicroView-Arduino-Library). - * - * Adapted for QMK by: - * Jack Humbert - * October 11, 2018 - * - * 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 3 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 . - */ -#include "micro_oled.h" -#include "print.h" -#include -#include "util/font5x7.h" -#include "util/font8x16.h" -#include - -#define TOTALFONTS 2 -const unsigned char* fonts_pointer[] = {font5x7, font8x16}; - -uint8_t foreColor, drawMode, fontWidth, fontHeight, fontType, fontStartChar, fontTotalChar, cursorX, cursorY; -uint16_t fontMapWidth; - -#ifndef _BV -# define _BV(x) (1 << (x)) -#endif - -#define swap(a, b) \ - { \ - uint8_t t = a; \ - a = b; \ - b = t; \ - } - -uint8_t micro_oled_transfer_buffer[20]; -static uint8_t micro_oled_screen_current[LCDWIDTH * LCDHEIGHT / 8] = {0}; - -/* LCD Memory organised in 64 horizontal pixel and 6 rows of byte - B B .............B ----- - y y .............y \ - t t .............t \ - e e .............e \ - 0 1 .............63 \ - \ - D0 D0.............D0 \ - D1 D1.............D1 / ROW 0 - D2 D2.............D2 / - D3 D3.............D3 / - D4 D4.............D4 / - D5 D5.............D5 / - D6 D6.............D6 / - D7 D7.............D7 ---- - */ -#ifdef NO_LCD_SPLASH -// do not initialize with a splash screen -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0}; -#else -# if LCDWIDTH == 64 -# if LCDHEIGHT == 48 -static uint8_t micro_oled_screen_buffer[] = { - // QMK Logo - generated at http://www.majer.ch/lcd/adf_bitmap.php - // 64x48 image - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x60, 0x60, 0xF8, 0xFE, 0xFE, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x1F, 0xFF, 0xFF, 0xFF, 0xFE, 0xFE, 0xF8, 0x60, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, 0x8C, 0x8C, 0x8C, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x8C, 0x8C, 0x8C, 0x8C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x31, 0x31, 0x31, 0x31, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFC, 0xF8, 0xF1, 0xE3, 0xE7, 0xCF, 0xCF, 0xCF, 0xCF, 0x00, 0x00, 0xCF, 0xCF, 0xCF, 0xC7, 0xE7, 0xE3, 0xF1, 0xF8, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x31, 0x31, 0x31, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x06, 0x06, 0x1F, 0x7F, 0x7F, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF8, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x7F, 0x1F, 0x06, 0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -# endif -# elif LCDWIDTH == 128 -# if LCDHEIGHT == 32 -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = { - // 128x32 qmk image - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xC0, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xFC, 0xFC, 0xE0, 0xF0, 0xFC, 0xE0, 0xE0, 0xFC, 0xE0, 0xE0, 0xFC, 0xFC, 0xE0, 0xE0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0x10, 0x30, 0xE0, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x00, 0x00, 0x80, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0xB2, 0xB2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0x03, 0x01, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x03, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xB2, 0xB2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x02, 0x02, 0x03, 0x01, 0x00, 0x06, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x06, 0x00, 0x03, 0x1E, 0x18, 0x0F, 0x01, 0x0F, 0x18, 0x1E, 0x01, 0x00, 0x0F, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x0E, 0x1F, 0x12, 0x02, 0x12, 0x13, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x48, 0x4D, 0x4D, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF9, 0xF3, 0xF3, 0xC0, 0x80, 0xF3, 0xF3, 0xF3, 0xF9, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xED, 0x4D, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0xC0, 0x00, 0x70, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x0C, 0x04, 0x04, 0x04, 0x04, 0x1C, 0xF0, 0x00, 0x00, 0xFC, 0x0C, 0x38, 0xE0, 0x00, 0x00, 0xC0, 0x38, 0x0C, 0xFC, 0x00, 0x00, 0xFC, 0xFC, 0x60, 0x90, 0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x3F, 0x3F, 0x07, 0x0F, 0x3F, 0x07, 0x07, 0x3F, 0x07, 0x07, 0x3F, 0x3F, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x06, 0x04, 0x04, 0x07, 0x01, 0x00, 0x00, 0x13, 0x1E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x07, 0x0D, 0x08, 0x00, 0x07, 0x00, 0x00, 0x01, 0x07, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x07, 0x00, 0x01, 0x03, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -# elif LCDHEIGHT == 64 -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0xF8, 0xFC, 0xFC, 0xFE, 0xFE, 0xFF, 0x7F, 0x7E, 0xFE, 0xFF, 0xFF, 0xFE, 0xFE, 0x7F, 0x7F, 0xFE, 0xFE, 0xFF, 0xFF, 0xFE, 0x7E, 0x7F, 0xFF, 0xFE, 0xFE, 0xFC, 0xFC, 0xF8, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x88, 0x88, 0xDD, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xDD, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x99, 0x99, 0x99, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFE, 0xF8, 0xF0, 0xF3, 0xF3, 0xE7, 0xE7, 0x00, 0x00, 0xE7, 0xE7, 0xF3, 0xF3, 0xF0, 0xF8, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x99, 0x99, 0x99, 0x99, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x0F, 0x1F, 0x3F, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0xFF, 0xFF, 0x3F, 0x3F, 0x3F, 0x1F, 0x0F, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0x00, 0x00, 0x03, 0x01, 0x00, 0x80, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x00, 0x80, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x11, 0x11, 0x11, 0x0E, 0x00, 0x70, 0x88, 0x04, 0x04, 0x04, 0xF8, 0x00, 0x00, 0x3C, 0xE0, 0xC0, 0x38, 0x1C, 0xE0, 0x80, 0x70, 0x0C, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x3C, 0x30, 0x00, 0x00, 0xFC, 0x0C, 0x04, 0x00, 0xF8, 0xAC, 0x24, 0x24, 0x2C, 0x30, 0x00, 0x70, 0xDC, 0x04, 0x04, 0x88, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x8C, 0x04, 0x04, 0xF8, 0x00, 0x04, 0x3C, 0xE0, 0x80, 0xF0, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x83, 0x01, 0x01, 0x01, 0x81, 0xFE, 0x3C, 0x00, 0x00, 0xFF, 0x03, 0x0E, 0x70, 0xC0, 0xE0, 0x38, 0x06, 0x03, 0xFF, 0x00, 0x00, 0xFF, 0x18, 0x38, 0x66, 0xC3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; -// TODO: generate bitmap of QMK logo here -# endif -# else -// catchall for custom screen sizes -static uint8_t micro_oled_screen_buffer[LCDWIDTH * LCDHEIGHT / 8] = {0}; -# endif -#endif - -void micro_oled_init(void) { - i2c_init(); - -#ifdef __AVR__ - i2c_start(I2C_ADDRESS_SA0_1, 100); -#else - i2c_start(I2C_ADDRESS_SA0_1); -#endif - - // Display Init sequence for 64x48 OLED module - send_command(DISPLAYOFF); // 0xAE - - send_command(SETDISPLAYCLOCKDIV); // 0xD5 - send_command(0x80); // the suggested ratio 0x80 - - send_command(SETMULTIPLEX); // 0xA8 - send_command(LCDHEIGHT - 1); - - send_command(SETDISPLAYOFFSET); // 0xD3 - send_command(0x00); // no offset - - send_command(SETSTARTLINE | 0x00); // line #0 - - send_command(CHARGEPUMP); // enable charge pump - send_command(0x14); - - send_command(NORMALDISPLAY); // 0xA6 - send_command(DISPLAYALLONRESUME); // 0xA4 - - // display at regular orientation - send_command(SEGREMAP | 0x1); - send_command(COMSCANDEC); - -// rotate display 180 -#ifdef micro_oled_rotate_180 - send_command(SEGREMAP); - send_command(COMSCANINC); -#endif - - send_command(MEMORYMODE); - send_command(0x02); // 0x02 = 10b, Page addressing mode - - send_command(SETCOMPINS); // 0xDA - if (LCDHEIGHT > 32) { - send_command(0x12); - } else { - send_command(0x02); - } - send_command(SETCONTRAST); // 0x81 - send_command(0x8F); - - send_command(SETPRECHARGE); // 0xd9 - send_command(0xF1); - - send_command(SETVCOMDESELECT); // 0xDB - send_command(0x40); - - send_command(DISPLAYON); //--turn on oled panel - clear_screen(); // Erase hardware memory inside the OLED controller to avoid random data in memory. - send_buffer(); -} - -void send_command(uint8_t command) { - micro_oled_transfer_buffer[0] = I2C_COMMAND; - micro_oled_transfer_buffer[1] = command; - i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); -} - -void send_data(uint8_t data) { - micro_oled_transfer_buffer[0] = I2C_DATA; - micro_oled_transfer_buffer[1] = data; - i2c_transmit(I2C_ADDRESS_SA0_1 << 1, micro_oled_transfer_buffer, 2, 100); -} - -/** \brief Set SSD1306 page address. - Send page address command and address to the SSD1306 OLED controller. -*/ -void set_page_address(uint8_t address) { - address = (0xB0 | address); - send_command(address); -} - -/** \brief Set SSD1306 column address. - Send column address command and address to the SSD1306 OLED controller. -*/ -void set_column_address(uint8_t address) { - send_command((0x10 | (address >> 4)) + ((128 - LCDWIDTH) >> 8)); - send_command(0x0F & address); -} - -/** \brief Clear SSD1306's memory. - To clear GDRAM inside the LCD controller. -*/ -void clear_screen(void) { - for (int i = 0; i < 8; i++) { - set_page_address(i); - set_column_address(0); - for (int j = 0; j < 0x80; j++) { - send_data(0); - } - } - - memset(micro_oled_screen_current, 0, LCDWIDTH * LCDHEIGHT / 8); -} - -/** \brief Clear SSD1306's memory. - To clear GDRAM inside the LCD controller. -*/ -void clear_buffer(void) { - // 384 - memset(micro_oled_screen_buffer, 0, LCDWIDTH * LCDHEIGHT / 8); -} - -/** \brief Invert display. - The PIXEL_ON color of the display will turn to PIXEL_OFF and the PIXEL_OFF will turn to PIXEL_ON. -*/ -void invert_screen(bool invert) { - if (invert) { - send_command(INVERTDISPLAY); - } else { - send_command(NORMALDISPLAY); - } -} - -/** \brief Set contrast. - OLED contract value from 0 to 255. Note: Contrast level is not very obvious. -*/ -void set_contrast(uint8_t contrast) { - send_command(SETCONTRAST); // 0x81 - send_command(contrast); -} - -/** \brief Transfer display buffer. - Sends the updated buffer to the controller - the current status is checked before to save i2c exectution time -*/ -void send_buffer(void) { - uint8_t i, j; - - uint8_t page_addr = 0xFF; - for (i = 0; i < LCDHEIGHT / 8; i++) { - uint8_t col_addr = 0xFF; - for (j = 0; j < LCDWIDTH; j++) { - if (micro_oled_screen_buffer[i * LCDWIDTH + j] != micro_oled_screen_current[i * LCDWIDTH + j]) { - if (page_addr != i) { - set_page_address(i); - page_addr = i; - } - if (col_addr != j) { - set_column_address(j); - col_addr = j + 1; - } - send_data(micro_oled_screen_buffer[i * LCDWIDTH + j]); - micro_oled_screen_current[i * LCDWIDTH + j] = micro_oled_screen_buffer[i * LCDWIDTH + j]; - } - } - } -} - -/** \brief Draw pixel with color and mode. - Draw color pixel in the screen buffer's x,y position with NORM or XOR draw mode. -*/ -void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode) { - if ((x < 0) || (x >= LCDWIDTH) || (y < 0) || (y >= LCDHEIGHT)) return; - - if (mode == XOR) { - if (color == PIXEL_ON) micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] ^= _BV((y % 8)); - } else { - if (color == PIXEL_ON) - micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] |= _BV((y % 8)); - else - micro_oled_screen_buffer[x + (y / 8) * LCDWIDTH] &= ~_BV((y % 8)); - } -} - -/** \brief Draw line with color and mode. -Draw line using color and mode from x0,y0 to x1,y1 of the screen buffer. -*/ -void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode) { - uint8_t steep = abs(y1 - y0) > abs(x1 - x0); - if (steep) { - swap(x0, y0); - swap(x1, y1); - } - - if (x0 > x1) { - swap(x0, x1); - swap(y0, y1); - } - - uint8_t dx, dy; - dx = x1 - x0; - dy = abs(y1 - y0); - - int8_t err = dx / 2; - int8_t ystep; - - if (y0 < y1) { - ystep = 1; - } else { - ystep = -1; - } - - for (; x0 < x1; x0++) { - if (steep) { - draw_pixel(y0, x0, color, mode); - } else { - draw_pixel(x0, y0, color, mode); - } - err -= dy; - if (err < 0) { - y0 += ystep; - err += dx; - } - } -} - -/** \brief Draw horizontal line with color and mode. -Draw horizontal line using color and mode from x,y to x+width,y of the screen buffer. -*/ -void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode) { draw_line(x, y, x + width, y, color, mode); } - -/** \brief Draw vertical line. -Draw vertical line using current fore color and current draw mode from x,y to x,y+height of the screen buffer. -*/ -void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode) { draw_line(x, y, x, y + height, color, mode); } - -/** \brief Draw rectangle with color and mode. -Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. -*/ -void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - uint8_t tempHeight; - - draw_line_hori(x, y, width, color, mode); - draw_line_hori(x, y + height - 1, width, color, mode); - - tempHeight = height - 2; - - // skip drawing vertical lines to avoid overlapping of pixel that will - // affect XOR plot if no pixel in between horizontal lines - if (tempHeight < 1) return; - - draw_line_vert(x, y + 1, tempHeight, color, mode); - draw_line_vert(x + width - 1, y + 1, tempHeight, color, mode); -} - -/** \brief Draw rectangle with color and mode. -Draw rectangle using color and mode from x,y to x+width,y+height of the screen buffer. -*/ -void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - uint8_t tempHeight; - - draw_line_hori(x + 1, y, width - 2, color, mode); - draw_line_hori(x + 1, y + height - 1, width - 2, color, mode); - - tempHeight = height - 2; - - // skip drawing vertical lines to avoid overlapping of pixel that will - // affect XOR plot if no pixel in between horizontal lines - if (tempHeight < 1) return; - - draw_line_vert(x, y + 1, tempHeight, color, mode); - draw_line_vert(x + width - 1, y + 1, tempHeight, color, mode); -} - -/** \brief Draw filled rectangle with color and mode. -Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. -*/ -void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - // TODO - need to optimise the memory map draw so that this function will not call pixel one by one - for (int i = x; i < x + width; i++) { - draw_line_vert(i, y, height, color, mode); - } -} - -/** \brief Draw filled rectangle with color and mode. -Draw filled rectangle using color and mode from x,y to x+width,y+height of the screen buffer. -*/ -void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode) { - // TODO - need to optimise the memory map draw so that this function will not call pixel one by one - for (int i = x; i < x + width; i++) { - if (i == x || i == (x + width - 1)) - draw_line_vert(i, y + 1, height - 2, color, mode); - else - draw_line_vert(i, y, height, color, mode); - } -} - -/** \brief Draw character with color and mode. - Draw character c using color and draw mode at x,y. -*/ -void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font) { - // TODO - New routine to take font of any height, at the moment limited to font height in multiple of 8 pixels - - uint8_t rowsToDraw, row, tempC; - uint8_t i, j, temp; - uint16_t charPerBitmapRow, charColPositionOnBitmap, charRowPositionOnBitmap, charBitmapStartPosition; - - if ((font >= TOTALFONTS) || (font < 0)) return; - - uint8_t fontType = font; - uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0); - uint8_t fontHeight = pgm_read_byte(fonts_pointer[fontType] + 1); - uint8_t fontStartChar = pgm_read_byte(fonts_pointer[fontType] + 2); - uint8_t fontTotalChar = pgm_read_byte(fonts_pointer[fontType] + 3); - uint16_t fontMapWidth = (pgm_read_byte(fonts_pointer[fontType] + 4) * 100) + pgm_read_byte(fonts_pointer[fontType] + 5); // two bytes values into integer 16 - - if ((c < fontStartChar) || (c > (fontStartChar + fontTotalChar - 1))) // no bitmap for the required c - return; - - tempC = c - fontStartChar; - - // each row (in datasheet is call page) is 8 bits high, 16 bit high character will have 2 rows to be drawn - rowsToDraw = fontHeight / 8; // 8 is LCD's page size, see SSD1306 datasheet - if (rowsToDraw <= 1) rowsToDraw = 1; - - // the following draw function can draw anywhere on the screen, but SLOW pixel by pixel draw - if (rowsToDraw == 1) { - for (i = 0; i < fontWidth + 1; i++) { - if (i == fontWidth) // this is done in a weird way because for 5x7 font, there is no margin, this code add a margin after col 5 - temp = 0; - else - temp = pgm_read_byte(fonts_pointer[fontType] + FONTHEADERSIZE + (tempC * fontWidth) + i); - - for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation) - if (temp & 0x1) { - draw_pixel(x + i, y + j, color, mode); - } else { - draw_pixel(x + i, y + j, !color, mode); - } - - temp >>= 1; - } - } - return; - } - - // font height over 8 bit - // take character "0" ASCII 48 as example - charPerBitmapRow = fontMapWidth / fontWidth; // 256/8 =32 char per row - charColPositionOnBitmap = tempC % charPerBitmapRow; // =16 - charRowPositionOnBitmap = (int)(tempC / charPerBitmapRow); // =1 - charBitmapStartPosition = (charRowPositionOnBitmap * fontMapWidth * (fontHeight / 8)) + (charColPositionOnBitmap * fontWidth); - - // each row on LCD is 8 bit height (see datasheet for explanation) - for (row = 0; row < rowsToDraw; row++) { - for (i = 0; i < fontWidth; i++) { - temp = pgm_read_byte(fonts_pointer[fontType] + FONTHEADERSIZE + (charBitmapStartPosition + i + (row * fontMapWidth))); - for (j = 0; j < 8; j++) { // 8 is the LCD's page height (see datasheet for explanation) - if (temp & 0x1) { - draw_pixel(x + i, y + j + (row * 8), color, mode); - } else { - draw_pixel(x + i, y + j + (row * 8), !color, mode); - } - temp >>= 1; - } - } - } -} - -void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font) { - if ((font >= TOTALFONTS) || (font < 0)) return; - - uint8_t fontType = font; - uint8_t fontWidth = pgm_read_byte(fonts_pointer[fontType] + 0); - - uint8_t cur_x = x; - for (int i = 0; i < strlen(string); i++) { - draw_char(cur_x, y, string[i], color, mode, font); - cur_x += fontWidth + 1; - } -} diff --git a/drivers/qwiic/micro_oled.h b/drivers/qwiic/micro_oled.h deleted file mode 100644 index 6f9106f5819..00000000000 --- a/drivers/qwiic/micro_oled.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Jim Lindblom @ SparkFun Electronics - * October 26, 2014 - * https://github.com/sparkfun/Micro_OLED_Breakout/tree/master/Firmware/Arduino/libraries/SFE_MicroOLED - * - * Modified by: - * Emil Varughese @ Edwin Robotics Pvt. Ltd. - * July 27, 2015 - * https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ - * - * This code was heavily based around the MicroView library, written by GeekAmmo - * (https://github.com/geekammo/MicroView-Arduino-Library). - * - * Adapted for QMK by: - * Jack Humbert - * October 11, 2018 - * - * 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 3 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 . - */ -#pragma once - -#include "qwiic.h" - -void micro_oled_init(void); - -void send_command(uint8_t command); -void send_data(uint8_t data); -void set_page_address(uint8_t address); -void set_column_address(uint8_t address); -void clear_screen(void); -void clear_buffer(void); -void send_buffer(void); -void draw_pixel(uint8_t x, uint8_t y, uint8_t color, uint8_t mode); -void draw_line(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t color, uint8_t mode); -void draw_line_hori(uint8_t x, uint8_t y, uint8_t width, uint8_t color, uint8_t mode); -void draw_line_vert(uint8_t x, uint8_t y, uint8_t height, bool color, uint8_t mode); -void draw_rect(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); -void draw_rect_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); -void draw_rect_filled(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); -void draw_rect_filled_soft(uint8_t x, uint8_t y, uint8_t width, uint8_t height, uint8_t color, uint8_t mode); -void draw_char(uint8_t x, uint8_t y, uint8_t c, uint8_t color, uint8_t mode, uint8_t font); -void draw_string(uint8_t x, uint8_t y, char* string, uint8_t color, uint8_t mode, uint8_t font); - -#define I2C_ADDRESS_SA0_0 0b0111100 -#ifndef I2C_ADDRESS_SA0_1 -# define I2C_ADDRESS_SA0_1 0b0111101 -#endif -#define I2C_COMMAND 0x00 -#define I2C_DATA 0x40 -#define PIXEL_OFF 0 -#define PIXEL_ON 1 - -#ifndef LCDWIDTH -# define LCDWIDTH 64 -#endif -#ifndef LCDHEIGHT -# define LCDHEIGHT 48 -#endif -#define FONTHEADERSIZE 6 - -#define NORM 0 -#define XOR 1 - -#define PAGE 0 -#define ALL 1 - -#define WIDGETSTYLE0 0 -#define WIDGETSTYLE1 1 -#define WIDGETSTYLE2 2 - -#define SETCONTRAST 0x81 -#define DISPLAYALLONRESUME 0xA4 -#define DISPLAYALLON 0xA5 -#define NORMALDISPLAY 0xA6 -#define INVERTDISPLAY 0xA7 -#define DISPLAYOFF 0xAE -#define DISPLAYON 0xAF -#define SETDISPLAYOFFSET 0xD3 -#define SETCOMPINS 0xDA -#define SETVCOMDESELECT 0xDB -#define SETDISPLAYCLOCKDIV 0xD5 -#define SETPRECHARGE 0xD9 -#define SETMULTIPLEX 0xA8 -#define SETLOWCOLUMN 0x00 -#define SETHIGHCOLUMN 0x10 -#define SETSTARTLINE 0x40 -#define MEMORYMODE 0x20 -#define COMSCANINC 0xC0 -#define COMSCANDEC 0xC8 -#define SEGREMAP 0xA0 -#define CHARGEPUMP 0x8D -#define EXTERNALVCC 0x01 -#define SWITCHCAPVCC 0x02 - -// Scroll -#define ACTIVATESCROLL 0x2F -#define DEACTIVATESCROLL 0x2E -#define SETVERTICALSCROLLAREA 0xA3 -#define RIGHTHORIZONTALSCROLL 0x26 -#define LEFT_HORIZONTALSCROLL 0x27 -#define VERTICALRIGHTHORIZONTALSCROLL 0x29 -#define VERTICALLEFTHORIZONTALSCROLL 0x2A - -typedef enum CMD { - CMD_CLEAR, // 0 - CMD_INVERT, // 1 - CMD_CONTRAST, // 2 - CMD_DISPLAY, // 3 - CMD_SETCURSOR, // 4 - CMD_PIXEL, // 5 - CMD_LINE, // 6 - CMD_LINEH, // 7 - CMD_LINEV, // 8 - CMD_RECT, // 9 - CMD_RECTFILL, // 10 - CMD_CIRCLE, // 11 - CMD_CIRCLEFILL, // 12 - CMD_DRAWCHAR, // 13 - CMD_DRAWBITMAP, // 14 - CMD_GETLCDWIDTH, // 15 - CMD_GETLCDHEIGHT, // 16 - CMD_SETCOLOR, // 17 - CMD_SETDRAWMODE // 18 -} commCommand_t; diff --git a/drivers/qwiic/qwiic.c b/drivers/qwiic/qwiic.c deleted file mode 100644 index 316d6539cbe..00000000000 --- a/drivers/qwiic/qwiic.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ -#include "qwiic.h" - -void qwiic_init(void) { -#ifdef QWIIC_JOYSTIIC_ENABLE - joystiic_init(); -#endif -#ifdef QWIIC_MICRO_OLED_ENABLE - micro_oled_init(); -#endif -} - -void qwiic_task(void) { -#ifdef QWIIC_JOYSTIIC_ENABLE - joystiic_task(); -#endif -} diff --git a/drivers/qwiic/qwiic.h b/drivers/qwiic/qwiic.h deleted file mode 100644 index 8c3d1c8d632..00000000000 --- a/drivers/qwiic/qwiic.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright 2018 Jack Humbert - * - * 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 . - */ -#pragma once - -#include "i2c_master.h" - -#ifdef QWIIC_JOYSTIIC_ENABLE -# include "joystiic.h" -#endif -#ifdef QWIIC_MICRO_OLED_ENABLE -# include "micro_oled.h" -#endif - -void qwiic_init(void); -void qwiic_task(void); diff --git a/drivers/qwiic/qwiic.mk b/drivers/qwiic/qwiic.mk deleted file mode 100644 index 164bd721081..00000000000 --- a/drivers/qwiic/qwiic.mk +++ /dev/null @@ -1,17 +0,0 @@ -ifeq ($(strip $(QWIIC_ENABLE)),yes) - COMMON_VPATH += $(DRIVER_PATH)/qwiic - OPT_DEFS += -DQWIIC_ENABLE - SRC += qwiic.c - QUANTUM_LIB_SRC += i2c_master.c - -ifneq ($(filter JOYSTIIC, $(QWIIC_DRIVERS)),) - OPT_DEFS += -DQWIIC_JOYSTIIC_ENABLE - SRC += joystiic.c -endif - -ifneq ($(filter MICRO_OLED, $(QWIIC_DRIVERS)),) - OPT_DEFS += -DQWIIC_MICRO_OLED_ENABLE - SRC += micro_oled.c -endif - -endif diff --git a/drivers/qwiic/util/font5x7.h b/drivers/qwiic/util/font5x7.h deleted file mode 100644 index a641945aaed..00000000000 --- a/drivers/qwiic/util/font5x7.h +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** -font5x7.h -Definition for small font - -This file was imported from the MicroView library, written by GeekAmmo -(https://github.com/geekammo/MicroView-Arduino-Library), and released under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 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 . - -Modified by: -Emil Varughese @ Edwin Robotics Pvt. Ltd. -July 27, 2015 -https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ - -******************************************************************************/ -#pragma once - -#include "progmem.h" - -// Standard ASCII 5x7 font -static const unsigned char font5x7[] PROGMEM = { - // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) - 5, 8, 0, 255, 12, 75, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, 0x18, 0x3C, 0x18, 0x00, 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, 0x18, 0x24, 0x18, 0x00, 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x26, 0x29, 0x79, 0x29, 0x26, 0x40, 0x7F, 0x05, 0x05, 0x07, 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x14, 0x22, 0x7F, 0x22, 0x14, 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, 0x66, 0x89, 0x95, 0x6A, 0x60, 0x60, 0x60, 0x60, 0x60, 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x08, 0x04, 0x7E, 0x04, 0x08, 0x10, 0x20, 0x7E, 0x20, 0x10, 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x1E, 0x10, 0x10, 0x10, 0x10, 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x30, 0x38, 0x3E, 0x38, 0x30, - 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x23, 0x13, 0x08, 0x64, 0x62, 0x36, 0x49, 0x56, 0x20, 0x50, 0x00, 0x08, 0x07, 0x03, 0x00, 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, 0x41, 0x22, 0x1C, 0x00, 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, 0x80, 0x70, 0x30, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x60, 0x60, 0x00, 0x20, 0x10, 0x08, 0x04, 0x02, 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, 0x42, 0x7F, 0x40, 0x00, 0x72, 0x49, 0x49, 0x49, 0x46, 0x21, 0x41, 0x49, 0x4D, 0x33, 0x18, 0x14, 0x12, 0x7F, 0x10, 0x27, 0x45, 0x45, 0x45, 0x39, 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x41, 0x21, 0x11, 0x09, 0x07, 0x36, 0x49, 0x49, 0x49, 0x36, 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x40, 0x34, 0x00, 0x00, 0x00, 0x08, 0x14, 0x22, 0x41, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00, 0x41, 0x22, 0x14, 0x08, 0x02, - 0x01, 0x59, 0x09, 0x06, 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x7F, 0x49, 0x49, 0x49, 0x36, 0x3E, 0x41, 0x41, 0x41, 0x22, 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x49, 0x49, 0x49, 0x41, 0x7F, 0x09, 0x09, 0x09, 0x01, 0x3E, 0x41, 0x41, 0x51, 0x73, 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, 0x41, 0x7F, 0x41, 0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, 0x7F, 0x08, 0x14, 0x22, 0x41, 0x7F, 0x40, 0x40, 0x40, 0x40, 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x7F, 0x09, 0x09, 0x09, 0x06, 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x7F, 0x09, 0x19, 0x29, 0x46, 0x26, 0x49, 0x49, 0x49, 0x32, 0x03, 0x01, 0x7F, 0x01, 0x03, 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x63, 0x14, 0x08, 0x14, 0x63, 0x03, 0x04, 0x78, 0x04, 0x03, 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, 0x7F, 0x41, 0x41, 0x41, 0x02, 0x04, 0x08, 0x10, 0x20, 0x00, 0x41, 0x41, 0x41, 0x7F, 0x04, 0x02, 0x01, 0x02, 0x04, 0x40, 0x40, - 0x40, 0x40, 0x40, 0x00, 0x03, 0x07, 0x08, 0x00, 0x20, 0x54, 0x54, 0x78, 0x40, 0x7F, 0x28, 0x44, 0x44, 0x38, 0x38, 0x44, 0x44, 0x44, 0x28, 0x38, 0x44, 0x44, 0x28, 0x7F, 0x38, 0x54, 0x54, 0x54, 0x18, 0x00, 0x08, 0x7E, 0x09, 0x02, 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, 0x44, 0x7D, 0x40, 0x00, 0x20, 0x40, 0x40, 0x3D, 0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, 0x7C, 0x04, 0x78, 0x04, 0x78, 0x7C, 0x08, 0x04, 0x04, 0x78, 0x38, 0x44, 0x44, 0x44, 0x38, 0xFC, 0x18, 0x24, 0x24, 0x18, 0x18, 0x24, 0x24, 0x18, 0xFC, 0x7C, 0x08, 0x04, 0x04, 0x08, 0x48, 0x54, 0x54, 0x54, 0x24, 0x04, 0x04, 0x3F, 0x44, 0x24, 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x44, 0x28, 0x10, 0x28, 0x44, 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, 0x08, 0x36, 0x41, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x41, 0x36, 0x08, 0x00, 0x02, 0x01, 0x02, 0x04, 0x02, 0x3C, 0x26, 0x23, - 0x26, 0x3C, 0x1E, 0xA1, 0xA1, 0x61, 0x12, 0x3A, 0x40, 0x40, 0x20, 0x7A, 0x38, 0x54, 0x54, 0x55, 0x59, 0x21, 0x55, 0x55, 0x79, 0x41, 0x21, 0x54, 0x54, 0x78, 0x41, 0x21, 0x55, 0x54, 0x78, 0x40, 0x20, 0x54, 0x55, 0x79, 0x40, 0x0C, 0x1E, 0x52, 0x72, 0x12, 0x39, 0x55, 0x55, 0x55, 0x59, 0x39, 0x54, 0x54, 0x54, 0x59, 0x39, 0x55, 0x54, 0x54, 0x58, 0x00, 0x00, 0x45, 0x7C, 0x41, 0x00, 0x02, 0x45, 0x7D, 0x42, 0x00, 0x01, 0x45, 0x7C, 0x40, 0xF0, 0x29, 0x24, 0x29, 0xF0, 0xF0, 0x28, 0x25, 0x28, 0xF0, 0x7C, 0x54, 0x55, 0x45, 0x00, 0x20, 0x54, 0x54, 0x7C, 0x54, 0x7C, 0x0A, 0x09, 0x7F, 0x49, 0x32, 0x49, 0x49, 0x49, 0x32, 0x32, 0x48, 0x48, 0x48, 0x32, 0x32, 0x4A, 0x48, 0x48, 0x30, 0x3A, 0x41, 0x41, 0x21, 0x7A, 0x3A, 0x42, 0x40, 0x20, 0x78, 0x00, 0x9D, 0xA0, 0xA0, 0x7D, 0x39, 0x44, 0x44, 0x44, 0x39, 0x3D, 0x40, 0x40, 0x40, 0x3D, 0x3C, 0x24, 0xFF, 0x24, 0x24, 0x48, 0x7E, 0x49, 0x43, 0x66, 0x2B, 0x2F, 0xFC, 0x2F, 0x2B, 0xFF, 0x09, 0x29, 0xF6, 0x20, 0xC0, 0x88, 0x7E, 0x09, - 0x03, 0x20, 0x54, 0x54, 0x79, 0x41, 0x00, 0x00, 0x44, 0x7D, 0x41, 0x30, 0x48, 0x48, 0x4A, 0x32, 0x38, 0x40, 0x40, 0x22, 0x7A, 0x00, 0x7A, 0x0A, 0x0A, 0x72, 0x7D, 0x0D, 0x19, 0x31, 0x7D, 0x26, 0x29, 0x29, 0x2F, 0x28, 0x26, 0x29, 0x29, 0x29, 0x26, 0x30, 0x48, 0x4D, 0x40, 0x20, 0x38, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x38, 0x2F, 0x10, 0xC8, 0xAC, 0xBA, 0x2F, 0x10, 0x28, 0x34, 0xFA, 0x00, 0x00, 0x7B, 0x00, 0x00, 0x08, 0x14, 0x2A, 0x14, 0x22, 0x22, 0x14, 0x2A, 0x14, 0x08, 0xAA, 0x00, 0x55, 0x00, 0xAA, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x10, 0x10, 0x10, 0xFF, 0x00, 0x14, 0x14, 0x14, 0xFF, 0x00, 0x10, 0x10, 0xFF, 0x00, 0xFF, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x14, 0x14, 0x14, 0xFC, 0x00, 0x14, 0x14, 0xF7, 0x00, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x14, 0x14, 0xF4, 0x04, 0xFC, 0x14, 0x14, 0x17, 0x10, 0x1F, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0x1F, 0x00, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, - 0x10, 0x10, 0x10, 0x1F, 0x10, 0x10, 0x10, 0x10, 0xF0, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xFF, 0x14, 0x00, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x00, 0x1F, 0x10, 0x17, 0x00, 0x00, 0xFC, 0x04, 0xF4, 0x14, 0x14, 0x17, 0x10, 0x17, 0x14, 0x14, 0xF4, 0x04, 0xF4, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0xF7, 0x00, 0xF7, 0x14, 0x14, 0x14, 0x17, 0x14, 0x10, 0x10, 0x1F, 0x10, 0x1F, 0x14, 0x14, 0x14, 0xF4, 0x14, 0x10, 0x10, 0xF0, 0x10, 0xF0, 0x00, 0x00, 0x1F, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x1F, 0x14, 0x00, 0x00, 0x00, 0xFC, 0x14, 0x00, 0x00, 0xF0, 0x10, 0xF0, 0x10, 0x10, 0xFF, 0x10, 0xFF, 0x14, 0x14, 0x14, 0xFF, 0x14, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x38, 0x44, 0x44, 0x38, 0x44, 0x7C, - 0x2A, 0x2A, 0x3E, 0x14, 0x7E, 0x02, 0x02, 0x06, 0x06, 0x02, 0x7E, 0x02, 0x7E, 0x02, 0x63, 0x55, 0x49, 0x41, 0x63, 0x38, 0x44, 0x44, 0x3C, 0x04, 0x40, 0x7E, 0x20, 0x1E, 0x20, 0x06, 0x02, 0x7E, 0x02, 0x02, 0x99, 0xA5, 0xE7, 0xA5, 0x99, 0x1C, 0x2A, 0x49, 0x2A, 0x1C, 0x4C, 0x72, 0x01, 0x72, 0x4C, 0x30, 0x4A, 0x4D, 0x4D, 0x30, 0x30, 0x48, 0x78, 0x48, 0x30, 0xBC, 0x62, 0x5A, 0x46, 0x3D, 0x3E, 0x49, 0x49, 0x49, 0x00, 0x7E, 0x01, 0x01, 0x01, 0x7E, 0x2A, 0x2A, 0x2A, 0x2A, 0x2A, 0x44, 0x44, 0x5F, 0x44, 0x44, 0x40, 0x51, 0x4A, 0x44, 0x40, 0x40, 0x44, 0x4A, 0x51, 0x40, 0x00, 0x00, 0xFF, 0x01, 0x03, 0xE0, 0x80, 0xFF, 0x00, 0x00, 0x08, 0x08, 0x6B, 0x6B, 0x08, 0x36, 0x12, 0x36, 0x24, 0x36, 0x06, 0x0F, 0x09, 0x0F, 0x06, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x10, 0x10, 0x00, 0x30, 0x40, 0xFF, 0x01, 0x01, 0x00, 0x1F, 0x01, 0x01, 0x1E, 0x00, 0x19, 0x1D, 0x17, 0x12, 0x00, 0x3C, 0x3C, 0x3C, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/drivers/qwiic/util/font8x16.h b/drivers/qwiic/util/font8x16.h deleted file mode 100644 index 4d3c2378662..00000000000 --- a/drivers/qwiic/util/font8x16.h +++ /dev/null @@ -1,39 +0,0 @@ -/****************************************************************************** -font8x16.h -Definition for medium font - -This file was imported from the MicroView library, written by GeekAmmo -(https://github.com/geekammo/MicroView-Arduino-Library), and released under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 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 . - -Modified by: -Emil Varughese @ Edwin Robotics Pvt. Ltd. -July 27, 2015 -https://github.com/emil01/SparkFun_Micro_OLED_Arduino_Library/ -******************************************************************************/ -#pragma once - -#include "progmem.h" - -static const unsigned char font8x16[] PROGMEM = { - // first row defines - FONTWIDTH, FONTHEIGHT, ASCII START CHAR, TOTAL CHARACTERS, FONT MAP WIDTH HIGH, FONT MAP WIDTH LOW (2,56 meaning 256) - 8, 16, 32, 96, 2, 56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xBE, 0x90, 0xD0, 0xBE, 0x90, 0x00, 0x00, 0x1C, 0x62, 0xFF, 0xC2, 0x80, 0x00, 0x00, 0x0C, 0x12, 0x92, 0x4C, 0xB0, 0x88, 0x06, 0x00, 0x80, 0x7C, 0x62, 0xB2, 0x1C, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x18, 0x04, 0x02, 0x02, 0x00, 0x00, 0x00, 0x02, 0x02, 0x04, 0x18, 0xE0, 0x00, 0x00, 0x00, 0x24, 0x18, 0x7E, 0x18, 0x24, 0x00, 0x00, 0x80, 0x80, 0x80, 0xF0, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x18, 0x06, 0x00, 0x00, 0xF8, 0x04, 0xC2, 0x32, 0x0C, 0xF8, 0x00, 0x00, 0x00, 0x04, 0x04, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, - 0x1C, 0x00, 0x00, 0x00, 0x02, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xC0, 0xA0, 0x98, 0x84, 0xFE, 0x80, 0x80, 0x00, 0x00, 0x1E, 0x12, 0x12, 0x22, 0xC2, 0x00, 0x00, 0xF8, 0x44, 0x22, 0x22, 0x22, 0xC0, 0x00, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x8C, 0x52, 0x22, 0x52, 0x8C, 0x00, 0x00, 0x3C, 0x42, 0x42, 0x42, 0x26, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x00, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x00, 0x00, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x80, 0x00, 0x00, 0x02, 0x82, 0x42, 0x22, 0x1C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0F, 0x04, 0x03, 0x00, 0x00, 0x04, 0x02, 0x01, 0x03, 0x04, 0x04, 0x03, 0x00, - 0x03, 0x04, 0x04, 0x04, 0x05, 0x03, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x08, 0x10, 0x10, 0x00, 0x00, 0x00, 0x10, 0x10, 0x08, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, - 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x16, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x04, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x04, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x04, 0x72, 0x8A, 0xFA, 0x84, 0x78, 0x00, 0x00, 0xC0, 0x38, 0x06, 0x38, 0xC0, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0xDC, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0xFE, 0x22, 0x22, 0x22, 0x22, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x22, 0xE2, 0x00, 0x00, 0xFE, 0x20, 0x20, 0x20, 0x20, 0xFE, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0xFE, 0x40, 0xB0, 0x08, 0x04, 0x02, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0xFE, 0x0C, 0x70, 0x80, 0x70, 0x0C, 0xFE, 0x00, 0xFE, 0x0C, 0x30, 0xC0, 0x00, 0xFE, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0xFE, 0x42, 0x42, 0x42, 0x22, 0x1C, 0x00, 0x00, 0xF8, 0x04, 0x02, 0x02, 0x04, 0xF8, 0x00, 0x00, 0x00, 0xFE, 0x42, 0x42, 0xA2, 0x1C, 0x00, 0x00, 0x00, 0x1C, 0x22, 0x42, 0x42, 0x80, 0x00, 0x00, 0x02, 0x02, 0x02, 0xFE, 0x02, 0x02, 0x02, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x06, 0x38, 0xC0, 0x00, 0xC0, 0x38, 0x06, 0x00, 0x3E, 0xC0, 0xF0, 0x0E, 0xF0, 0xC0, 0x3E, 0x00, 0x00, 0x06, 0x98, 0x60, 0x98, 0x06, 0x00, 0x00, 0x00, 0x06, 0x18, 0xE0, 0x18, 0x06, 0x00, 0x00, 0x02, 0x02, 0xC2, 0x32, 0x0A, 0x06, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x06, 0x18, 0x60, 0x80, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x40, 0x30, 0x0C, 0x0C, 0x30, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, - 0x02, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x04, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x04, 0x04, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x07, 0x00, 0x00, 0x01, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0C, 0x12, 0x11, 0x10, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, - 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x01, 0x00, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x00, 0x10, 0x10, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xFE, 0x00, 0x00, 0x00, 0xE0, 0x90, 0x90, 0x90, 0xE0, 0x00, 0x00, 0x00, 0x20, 0xFC, 0x22, 0x22, 0x22, 0x02, - 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xFE, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0xF2, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x80, 0x40, 0x20, 0x10, 0x00, 0x00, 0x00, 0x02, 0x02, 0xFE, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0xF0, 0x20, 0x10, 0xF0, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0xE0, 0x00, 0x00, 0x00, 0xE0, 0x10, 0x10, 0x10, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x20, 0x10, 0x10, 0x70, 0x00, 0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x20, 0x00, 0x00, 0x00, 0x20, 0x20, 0xFC, 0x20, 0x20, 0x20, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x80, 0x70, 0x00, 0x00, 0xF0, 0x00, 0xC0, 0x30, 0xC0, 0x00, 0xF0, 0x00, 0x00, 0x30, 0xC0, 0xC0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0xC0, 0x00, 0x80, 0x70, 0x00, 0x00, 0x00, 0x10, - 0x10, 0x90, 0x50, 0x30, 0x00, 0x00, 0x00, 0x80, 0x80, 0x7E, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x7E, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x33, 0x24, 0x24, 0x22, 0x1F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x01, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x04, 0x00, 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, - 0x00, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x3F, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x3F, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x04, 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x04, 0x04, 0x00, 0x00, 0x03, 0x04, 0x04, 0x02, 0x07, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x06, 0x01, 0x00, 0x01, 0x06, 0x01, 0x00, 0x00, 0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x00, 0x20, 0x20, 0x31, 0x0E, 0x03, 0x00, 0x00, 0x00, 0x00, 0x06, 0x05, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x10, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; diff --git a/drivers/sensors/adns5050.c b/drivers/sensors/adns5050.c index 254ef2ee87e..c23d24d5af5 100644 --- a/drivers/sensors/adns5050.c +++ b/drivers/sensors/adns5050.c @@ -20,81 +20,95 @@ #include "adns5050.h" #include "wait.h" #include "debug.h" -#include "print.h" #include "gpio.h" -#ifndef OPTIC_ROTATED -# define OPTIC_ROTATED false -#endif - -// Definitions for the ADNS serial line. -#ifndef ADNS_SCLK_PIN -# define ADNS_SCLK_PIN B7 -#endif - -#ifndef ADNS_SDIO_PIN -# define ADNS_SDIO_PIN C6 -#endif - -#ifndef ADNS_CS_PIN -# define ADNS_CS_PIN B4 -#endif - -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } -#endif - -// Initialize the ADNS serial pins. -void adns_init(void) { - setPinOutput(ADNS_SCLK_PIN); - setPinOutput(ADNS_SDIO_PIN); - setPinOutput(ADNS_CS_PIN); +// Registers +// clang-format off +#define REG_PRODUCT_ID 0x00 +#define REG_REVISION_ID 0x01 +#define REG_MOTION 0x02 +#define REG_DELTA_X 0x03 +#define REG_DELTA_Y 0x04 +#define REG_SQUAL 0x05 +#define REG_SHUTTER_UPPER 0x06 +#define REG_SHUTTER_LOWER 0x07 +#define REG_MAXIMUM_PIXEL 0x08 +#define REG_PIXEL_SUM 0x09 +#define REG_MINIMUM_PIXEL 0x0a +#define REG_PIXEL_GRAB 0x0b +#define REG_MOUSE_CONTROL 0x0d +#define REG_MOUSE_CONTROL2 0x19 +#define REG_LED_DC_MODE 0x22 +#define REG_CHIP_RESET 0x3a +#define REG_PRODUCT_ID2 0x3e +#define REG_INV_REV_ID 0x3f +#define REG_MOTION_BURST 0x63 +// clang-format on + +void adns5050_init(void) { + // Initialize the ADNS serial pins. + setPinOutput(ADNS5050_SCLK_PIN); + setPinOutput(ADNS5050_SDIO_PIN); + setPinOutput(ADNS5050_CS_PIN); + + // reboot the adns. + // if the adns hasn't initialized yet, this is harmless. + adns5050_write_reg(REG_CHIP_RESET, 0x5a); + + // wait maximum time before adns is ready. + // this ensures that the adns is actuall ready after reset. + wait_ms(55); + + // read a burst from the adns and then discard it. + // gets the adns ready for write commands + // (for example, setting the dpi). + adns5050_read_burst(); } // Perform a synchronization with the ADNS. // Just as with the serial protocol, this is used by the slave to send a // synchronization signal to the master. -void adns_sync(void) { - writePinLow(ADNS_CS_PIN); +void adns5050_sync(void) { + writePinLow(ADNS5050_CS_PIN); wait_us(1); - writePinHigh(ADNS_CS_PIN); + writePinHigh(ADNS5050_CS_PIN); } -void adns_cs_select(void) { writePinLow(ADNS_CS_PIN); } +void adns5050_cs_select(void) { writePinLow(ADNS5050_CS_PIN); } -void adns_cs_deselect(void) { writePinHigh(ADNS_CS_PIN); } +void adns5050_cs_deselect(void) { writePinHigh(ADNS5050_CS_PIN); } -uint8_t adns_serial_read(void) { - setPinInput(ADNS_SDIO_PIN); +uint8_t adns5050_serial_read(void) { + setPinInput(ADNS5050_SDIO_PIN); uint8_t byte = 0; for (uint8_t i = 0; i < 8; ++i) { - writePinLow(ADNS_SCLK_PIN); + writePinLow(ADNS5050_SCLK_PIN); wait_us(1); - byte = (byte << 1) | readPin(ADNS_SDIO_PIN); + byte = (byte << 1) | readPin(ADNS5050_SDIO_PIN); - writePinHigh(ADNS_SCLK_PIN); + writePinHigh(ADNS5050_SCLK_PIN); wait_us(1); } return byte; } -void adns_serial_write(uint8_t data) { - setPinOutput(ADNS_SDIO_PIN); +void adns5050_serial_write(uint8_t data) { + setPinOutput(ADNS5050_SDIO_PIN); for (int8_t b = 7; b >= 0; b--) { - writePinLow(ADNS_SCLK_PIN); + writePinLow(ADNS5050_SCLK_PIN); if (data & (1 << b)) - writePinHigh(ADNS_SDIO_PIN); + writePinHigh(ADNS5050_SDIO_PIN); else - writePinLow(ADNS_SDIO_PIN); + writePinLow(ADNS5050_SDIO_PIN); wait_us(2); - writePinHigh(ADNS_SCLK_PIN); + writePinHigh(ADNS5050_SCLK_PIN); } // tSWR. See page 15 of the ADNS spec sheet. @@ -108,17 +122,17 @@ void adns_serial_write(uint8_t data) { // Read a byte of data from a register on the ADNS. // Don't forget to use the register map (as defined in the header file). -uint8_t adns_read_reg(uint8_t reg_addr) { - adns_cs_select(); +uint8_t adns5050_read_reg(uint8_t reg_addr) { + adns5050_cs_select(); - adns_serial_write(reg_addr); + adns5050_serial_write(reg_addr); // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. + // already included in adns5050_serial_write(), so we're good. // See page 10 and 15 of the ADNS spec sheet. // wait_us(4); - uint8_t byte = adns_serial_read(); + uint8_t byte = adns5050_serial_read(); // tSRW & tSRR. See page 15 of the ADNS spec sheet. // Technically, this is only necessary if the next operation is an SDIO @@ -126,38 +140,38 @@ uint8_t adns_read_reg(uint8_t reg_addr) { // Honestly, this wait could probably be removed. wait_us(1); - adns_cs_deselect(); + adns5050_cs_deselect(); return byte; } -void adns_write_reg(uint8_t reg_addr, uint8_t data) { - adns_cs_select(); - adns_serial_write(0b10000000 | reg_addr); - adns_serial_write(data); - adns_cs_deselect(); +void adns5050_write_reg(uint8_t reg_addr, uint8_t data) { + adns5050_cs_select(); + adns5050_serial_write(0b10000000 | reg_addr); + adns5050_serial_write(data); + adns5050_cs_deselect(); } -report_adns_t adns_read_burst(void) { - adns_cs_select(); +report_adns5050_t adns5050_read_burst(void) { + adns5050_cs_select(); - report_adns_t data; + report_adns5050_t data; data.dx = 0; data.dy = 0; - adns_serial_write(REG_MOTION_BURST); + adns5050_serial_write(REG_MOTION_BURST); // We don't need a minimum tSRAD here. That's because a 4ms wait time is - // already included in adns_serial_write(), so we're good. + // already included in adns5050_serial_write(), so we're good. // See page 10 and 15 of the ADNS spec sheet. // wait_us(4); - uint8_t x = adns_serial_read(); - uint8_t y = adns_serial_read(); + uint8_t x = adns5050_serial_read(); + uint8_t y = adns5050_serial_read(); // Burst mode returns a bunch of other shit that we don't really need. // Setting CS to high ends burst mode early. - adns_cs_deselect(); + adns5050_cs_deselect(); data.dx = convert_twoscomp(x); data.dy = convert_twoscomp(y); @@ -175,12 +189,21 @@ int8_t convert_twoscomp(uint8_t data) { } // Don't forget to use the definitions for CPI in the header file. -void adns_set_cpi(uint8_t cpi) { adns_write_reg(REG_MOUSE_CONTROL2, cpi); } +void adns5050_set_cpi(uint16_t cpi) { + uint8_t cpival = constrain((cpi / 125), 0x1, 0xD); // limits to 0--119 + + adns5050_write_reg(REG_MOUSE_CONTROL2, 0b10000 | cpival); +} + +uint16_t adns5050_get_cpi(void) { + uint8_t cpival = adns5050_read_reg(REG_MOUSE_CONTROL2); + return (uint16_t)((cpival & 0b10000) * 125); +} -bool adns_check_signature(void) { - uint8_t pid = adns_read_reg(REG_PRODUCT_ID); - uint8_t rid = adns_read_reg(REG_REVISION_ID); - uint8_t pid2 = adns_read_reg(REG_PRODUCT_ID2); +bool adns5050_check_signature(void) { + uint8_t pid = adns5050_read_reg(REG_PRODUCT_ID); + uint8_t rid = adns5050_read_reg(REG_REVISION_ID); + uint8_t pid2 = adns5050_read_reg(REG_PRODUCT_ID2); return (pid == 0x12 && rid == 0x01 && pid2 == 0x26); } diff --git a/drivers/sensors/adns5050.h b/drivers/sensors/adns5050.h index 5e9edc29624..e45a2501964 100644 --- a/drivers/sensors/adns5050.h +++ b/drivers/sensors/adns5050.h @@ -21,59 +21,52 @@ #include -// Registers -#define REG_PRODUCT_ID 0x00 -#define REG_REVISION_ID 0x01 -#define REG_MOTION 0x02 -#define REG_DELTA_X 0x03 -#define REG_DELTA_Y 0x04 -#define REG_SQUAL 0x05 -#define REG_SHUTTER_UPPER 0x06 -#define REG_SHUTTER_LOWER 0x07 -#define REG_MAXIMUM_PIXEL 0x08 -#define REG_PIXEL_SUM 0x09 -#define REG_MINIMUM_PIXEL 0x0a -#define REG_PIXEL_GRAB 0x0b -#define REG_MOUSE_CONTROL 0x0d -#define REG_MOUSE_CONTROL2 0x19 -#define REG_LED_DC_MODE 0x22 -#define REG_CHIP_RESET 0x3a -#define REG_PRODUCT_ID2 0x3e -#define REG_INV_REV_ID 0x3f -#define REG_MOTION_BURST 0x63 - // CPI values -#define CPI125 0x11 -#define CPI250 0x12 -#define CPI375 0x13 -#define CPI500 0x14 -#define CPI625 0x15 -#define CPI750 0x16 -#define CPI875 0x17 +// clang-format off +#define CPI125 0x11 +#define CPI250 0x12 +#define CPI375 0x13 +#define CPI500 0x14 +#define CPI625 0x15 +#define CPI750 0x16 +#define CPI875 0x17 #define CPI1000 0x18 #define CPI1125 0x19 #define CPI1250 0x1a #define CPI1375 0x1b +// clang-format on + +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) + +// Definitions for the ADNS serial line. +#ifndef ADNS5050_SCLK_PIN +# error "No clock pin defined -- missing ADNS5050_SCLK_PIN" +#endif + +#ifndef ADNS5050_SDIO_PIN +# error "No data pin defined -- missing ADNS5050_SDIO_PIN" +#endif -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte); +#ifndef ADNS5050_CS_PIN +# error "No chip select pin defined -- missing ADNS5050_CS_PIN" #endif typedef struct { int8_t dx; int8_t dy; -} report_adns_t; +} report_adns5050_t; // A bunch of functions to implement the ADNS5050-specific serial protocol. // Note that the "serial.h" driver is insufficient, because it does not // manually manipulate a serial clock signal. -void adns_init(void); -void adns_sync(void); -uint8_t adns_serial_read(void); -void adns_serial_write(uint8_t data); -uint8_t adns_read_reg(uint8_t reg_addr); -void adns_write_reg(uint8_t reg_addr, uint8_t data); -report_adns_t adns_read_burst(void); -int8_t convert_twoscomp(uint8_t data); -void adns_set_cpi(uint8_t cpi); -bool adns_check_signature(void); +void adns5050_init(void); +void adns5050_sync(void); +uint8_t adns5050_serial_read(void); +void adns5050_serial_write(uint8_t data); +uint8_t adns5050_read_reg(uint8_t reg_addr); +void adns5050_write_reg(uint8_t reg_addr, uint8_t data); +report_adns5050_t adns5050_read_burst(void); +void adns5050_set_cpi(uint16_t cpi); +uint16_t adns5050_get_cpi(void); +int8_t convert_twoscomp(uint8_t data); +bool adns5050_check_signature(void); diff --git a/drivers/sensors/adns9800.c b/drivers/sensors/adns9800.c index b4f683452cd..c52f9918045 100644 --- a/drivers/sensors/adns9800.c +++ b/drivers/sensors/adns9800.c @@ -15,83 +15,80 @@ */ #include "spi_master.h" -#include "quantum.h" #include "adns9800_srom_A6.h" #include "adns9800.h" +#include "wait.h" // registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Pixel_Sum 0x08 -#define REG_Maximum_Pixel 0x09 -#define REG_Minimum_Pixel 0x0a -#define REG_Shutter_Lower 0x0b -#define REG_Shutter_Upper 0x0c -#define REG_Frame_Period_Lower 0x0d -#define REG_Frame_Period_Upper 0x0e -#define REG_Configuration_I 0x0f -#define REG_Configuration_II 0x10 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate 0x15 -#define REG_Rest1_Downshift 0x16 -#define REG_Rest2_Rate 0x17 -#define REG_Rest2_Downshift 0x18 -#define REG_Rest3_Rate 0x19 +// clang-format off +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Pixel_Sum 0x08 +#define REG_Maximum_Pixel 0x09 +#define REG_Minimum_Pixel 0x0a +#define REG_Shutter_Lower 0x0b +#define REG_Shutter_Upper 0x0c +#define REG_Frame_Period_Lower 0x0d +#define REG_Frame_Period_Upper 0x0e +#define REG_Configuration_I 0x0f +#define REG_Configuration_II 0x10 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate 0x15 +#define REG_Rest1_Downshift 0x16 +#define REG_Rest2_Rate 0x17 +#define REG_Rest2_Downshift 0x18 +#define REG_Rest3_Rate 0x19 #define REG_Frame_Period_Max_Bound_Lower 0x1a #define REG_Frame_Period_Max_Bound_Upper 0x1b #define REG_Frame_Period_Min_Bound_Lower 0x1c #define REG_Frame_Period_Min_Bound_Upper 0x1d -#define REG_Shutter_Max_Bound_Lower 0x1e -#define REG_Shutter_Max_Bound_Upper 0x1f -#define REG_LASER_CTRL0 0x20 -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_SROM_ID 0x2a -#define REG_Lift_Detection_Thr 0x2e -#define REG_Configuration_V 0x2f -#define REG_Configuration_IV 0x39 -#define REG_Power_Up_Reset 0x3a -#define REG_Shutdown 0x3b -#define REG_Inverse_Product_ID 0x3f -#define REG_Motion_Burst 0x50 -#define REG_SROM_Load_Burst 0x62 -#define REG_Pixel_Burst 0x64 - -#define ADNS_CLOCK_SPEED 2000000 -#define MIN_CPI 200 -#define MAX_CPI 8200 -#define CPI_STEP 200 -#define CLAMP_CPI(value) value MAX_CPI ? MAX_CPI : value -#define SPI_MODE 3 -#define SPI_DIVISOR (F_CPU / ADNS_CLOCK_SPEED) +#define REG_Shutter_Max_Bound_Lower 0x1e +#define REG_Shutter_Max_Bound_Upper 0x1f +#define REG_LASER_CTRL0 0x20 +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_SROM_ID 0x2a +#define REG_Lift_Detection_Thr 0x2e +#define REG_Configuration_V 0x2f +#define REG_Configuration_IV 0x39 +#define REG_Power_Up_Reset 0x3a +#define REG_Shutdown 0x3b +#define REG_Inverse_Product_ID 0x3f +#define REG_Motion_Burst 0x50 +#define REG_SROM_Load_Burst 0x62 +#define REG_Pixel_Burst 0x64 + +#define MIN_CPI 200 +#define MAX_CPI 8200 +#define CPI_STEP 200 +#define CLAMP_CPI(value) value MAX_CPI ? MAX_CPI : value #define US_BETWEEN_WRITES 120 -#define US_BETWEEN_READS 20 -#define US_BEFORE_MOTION 100 -#define MSB1 0x80 +#define US_BETWEEN_READS 20 +#define US_BEFORE_MOTION 100 +#define MSB1 0x80 +// clang-format on -extern const uint8_t firmware_data[]; +void adns9800_spi_start(void) { spi_start(ADNS9800_CS_PIN, false, ADNS9800_SPI_MODE, ADNS9800_SPI_DIVISOR); } -void adns_spi_start(void) { spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR); } - -void adns_write(uint8_t reg_addr, uint8_t data) { - adns_spi_start(); +void adns9800_write(uint8_t reg_addr, uint8_t data) { + adns9800_spi_start(); spi_write(reg_addr | MSB1); spi_write(data); spi_stop(); wait_us(US_BETWEEN_WRITES); } -uint8_t adns_read(uint8_t reg_addr) { - adns_spi_start(); +uint8_t adns9800_read(uint8_t reg_addr) { + adns9800_spi_start(); spi_write(reg_addr & 0x7f); uint8_t data = spi_read(); spi_stop(); @@ -100,39 +97,39 @@ uint8_t adns_read(uint8_t reg_addr) { return data; } -void adns_init() { - setPinOutput(SPI_SS_PIN); +void adns9800_init() { + setPinOutput(ADNS9800_CS_PIN); spi_init(); // reboot - adns_write(REG_Power_Up_Reset, 0x5a); + adns9800_write(REG_Power_Up_Reset, 0x5a); wait_ms(50); // read registers and discard - adns_read(REG_Motion); - adns_read(REG_Delta_X_L); - adns_read(REG_Delta_X_H); - adns_read(REG_Delta_Y_L); - adns_read(REG_Delta_Y_H); + adns9800_read(REG_Motion); + adns9800_read(REG_Delta_X_L); + adns9800_read(REG_Delta_X_H); + adns9800_read(REG_Delta_Y_L); + adns9800_read(REG_Delta_Y_H); // upload firmware // 3k firmware mode - adns_write(REG_Configuration_IV, 0x02); + adns9800_write(REG_Configuration_IV, 0x02); // enable initialisation - adns_write(REG_SROM_Enable, 0x1d); + adns9800_write(REG_SROM_Enable, 0x1d); // wait a frame wait_ms(10); // start SROM download - adns_write(REG_SROM_Enable, 0x18); + adns9800_write(REG_SROM_Enable, 0x18); // write the SROM file - adns_spi_start(); + adns9800_spi_start(); spi_write(REG_SROM_Load_Burst | 0x80); wait_us(15); @@ -140,7 +137,7 @@ void adns_init() { // send all bytes of the firmware unsigned char c; for (int i = 0; i < FIRMWARE_LENGTH; i++) { - c = (unsigned char)pgm_read_byte(firmware_data + i); + c = (unsigned char)pgm_read_byte(adns9800_firmware_data + i); spi_write(c); wait_us(15); } @@ -150,18 +147,30 @@ void adns_init() { wait_ms(10); // enable laser - uint8_t laser_ctrl0 = adns_read(REG_LASER_CTRL0); - adns_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); + uint8_t laser_ctrl0 = adns9800_read(REG_LASER_CTRL0); + adns9800_write(REG_LASER_CTRL0, laser_ctrl0 & 0xf0); + + adns9800_set_cpi(ADNS9800_CPI); } -config_adns_t adns_get_config(void) { - uint8_t config_1 = adns_read(REG_Configuration_I); - return (config_adns_t){(config_1 & 0xFF) * CPI_STEP}; +config_adns9800_t adns9800_get_config(void) { + uint8_t config_1 = adns9800_read(REG_Configuration_I); + return (config_adns9800_t){(config_1 & 0xFF) * CPI_STEP}; } -void adns_set_config(config_adns_t config) { +void adns9800_set_config(config_adns9800_t config) { uint8_t config_1 = (CLAMP_CPI(config.cpi) / CPI_STEP) & 0xFF; - adns_write(REG_Configuration_I, config_1); + adns9800_write(REG_Configuration_I, config_1); +} + +uint16_t adns9800_get_cpi(void) { + uint8_t config_1 = adns9800_read(REG_Configuration_I); + return (uint16_t){(config_1 & 0xFF) * CPI_STEP}; +} + +void adns9800_set_cpi(uint16_t cpi) { + uint8_t config_1 = (CLAMP_CPI(cpi) / CPI_STEP) & 0xFF; + adns9800_write(REG_Configuration_I, config_1); } static int16_t convertDeltaToInt(uint8_t high, uint8_t low) { @@ -174,10 +183,10 @@ static int16_t convertDeltaToInt(uint8_t high, uint8_t low) { return twos_comp; } -report_adns_t adns_get_report(void) { - report_adns_t report = {0, 0}; +report_adns9800_t adns9800_get_report(void) { + report_adns9800_t report = {0, 0}; - adns_spi_start(); + adns9800_spi_start(); // start burst mode spi_write(REG_Motion_Burst & 0x7f); diff --git a/drivers/sensors/adns9800.h b/drivers/sensors/adns9800.h index d19ded4012f..e75a869c03d 100644 --- a/drivers/sensors/adns9800.h +++ b/drivers/sensors/adns9800.h @@ -18,18 +18,48 @@ #include +#ifndef ADNS9800_CPI +# define ADNS9800_CPI 1600 +#endif + +#ifndef ADNS9800_CLOCK_SPEED +# define ADNS9800_CLOCK_SPEED 2000000 +#endif + +#ifndef ADNS9800_SPI_LSBFIRST +# define ADNS9800_SPI_LSBFIRST false +#endif + +#ifndef ADNS9800_SPI_MODE +# define ADNS9800_SPI_MODE 3 +#endif + +#ifndef ADNS9800_SPI_DIVISOR +# ifdef __AVR__ +# define ADNS9800_SPI_DIVISOR (F_CPU / ADNS9800_CLOCK_SPEED) +# else +# define ADNS9800_SPI_DIVISOR 64 +# endif +#endif + +#ifndef ADNS9800_CS_PIN +# error "No chip select pin defined -- missing ADNS9800_CS_PIN" +#endif + typedef struct { /* 200 - 8200 CPI supported */ uint16_t cpi; -} config_adns_t; +} config_adns9800_t; typedef struct { int16_t x; int16_t y; -} report_adns_t; +} report_adns9800_t; -void adns_init(void); -config_adns_t adns_get_config(void); -void adns_set_config(config_adns_t); +void adns9800_init(void); +config_adns9800_t adns9800_get_config(void); +void adns9800_set_config(config_adns9800_t); +uint16_t adns9800_get_cpi(void); +void adns9800_set_cpi(uint16_t cpi); /* Reads and clears the current delta values on the ADNS sensor */ -report_adns_t adns_get_report(void); +report_adns9800_t adns9800_get_report(void); diff --git a/drivers/sensors/adns9800_srom_A6.h b/drivers/sensors/adns9800_srom_A6.h index e698a401b94..d86ecbbd9eb 100644 --- a/drivers/sensors/adns9800_srom_A6.h +++ b/drivers/sensors/adns9800_srom_A6.h @@ -6,7 +6,7 @@ // clang-format off -const uint8_t firmware_data[FIRMWARE_LENGTH] PROGMEM = { +const uint8_t adns9800_firmware_data[FIRMWARE_LENGTH] PROGMEM = { 0x03, 0xA6, 0x68, 0x1E, 0x7D, 0x10, 0x7E, 0x7E, 0x5F, 0x1C, 0xB8, 0xF2, 0x47, 0x0C, 0x7B, 0x74, 0x4B, 0x14, 0x8B, 0x75, 0x66, 0x51, 0x0B, 0x8C, 0x76, 0x74, 0x4B, 0x14, 0xAA, 0xD6, 0x0F, 0x9C, 0xBA, 0xF6, 0x6E, 0x3F, 0xDD, 0x38, 0xD5, 0x02, 0x80, 0x9B, 0x82, 0x6D, 0x58, 0x13, 0xA4, 0xAB, diff --git a/drivers/sensors/analog_joystick.c b/drivers/sensors/analog_joystick.c new file mode 100644 index 00000000000..0f4d1d7a4c2 --- /dev/null +++ b/drivers/sensors/analog_joystick.c @@ -0,0 +1,94 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + +#include "analog_joystick.h" +#include "analog.h" +#include "gpio.h" +#include "wait.h" + +// Set Parameters +uint16_t minAxisValue = ANALOG_JOYSTICK_AXIS_MIN; +uint16_t maxAxisValue = ANALOG_JOYSTICK_AXIS_MAX; + +uint8_t maxCursorSpeed = ANALOG_JOYSTICK_SPEED_MAX; +uint8_t speedRegulator = ANALOG_JOYSTICK_SPEED_REGULATOR; // Lower Values Create Faster Movement + +int16_t xOrigin, yOrigin; + +uint16_t lastCursor = 0; + +int16_t axisCoordinate(uint8_t pin, uint16_t origin) { + int8_t direction; + int16_t distanceFromOrigin; + int16_t range; + + int16_t position = analogReadPin(pin); + + if (origin == position) { + return 0; + } else if (origin > position) { + distanceFromOrigin = origin - position; + range = origin - minAxisValue; + direction = -1; + } else { + distanceFromOrigin = position - origin; + range = maxAxisValue - origin; + direction = 1; + } + + float percent = (float)distanceFromOrigin / range; + int16_t coordinate = (int16_t)(percent * 100); + if (coordinate < 0) { + return 0; + } else if (coordinate > 100) { + return 100 * direction; + } else { + return coordinate * direction; + } +} + +int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed) { + int16_t coordinate = axisCoordinate(pin, origin); + if (coordinate != 0) { + float percent = (float)coordinate / 100; + return percent * maxCursorSpeed * (abs(coordinate) / speedRegulator); + } else { + return 0; + } +} + +report_analog_joystick_t analog_joystick_read(void) { + report_analog_joystick_t report = {0}; + + if (timer_elapsed(lastCursor) > ANALOG_JOYSTICK_READ_INTERVAL) { + lastCursor = timer_read(); + report.x = axisToMouseComponent(ANALOG_JOYSTICK_X_AXIS_PIN, xOrigin, maxCursorSpeed); + report.y = axisToMouseComponent(ANALOG_JOYSTICK_Y_AXIS_PIN, yOrigin, maxCursorSpeed); + } +#ifdef ANALOG_JOYSTICK_CLICK_PIN + report.button = !readPin(ANALOG_JOYSTICK_CLICK_PIN); +#endif + return report; +} + +void analog_joystick_init(void) { +#ifdef ANALOG_JOYSTICK_CLICK_PIN + setPinInputHigh(ANALOG_JOYSTICK_CLICK_PIN); +#endif + // Account for drift + xOrigin = analogReadPin(ANALOG_JOYSTICK_X_AXIS_PIN); + yOrigin = analogReadPin(ANALOG_JOYSTICK_Y_AXIS_PIN); +} diff --git a/drivers/sensors/analog_joystick.h b/drivers/sensors/analog_joystick.h new file mode 100644 index 00000000000..6892a08817f --- /dev/null +++ b/drivers/sensors/analog_joystick.h @@ -0,0 +1,51 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + +#pragma once + +#include +#include + +#ifndef ANALOG_JOYSTICK_X_AXIS_PIN +# error No pin specified for X Axis +#endif +#ifndef ANALOG_JOYSTICK_Y_AXIS_PIN +# error No pin specified for Y Axis +#endif + +#ifndef ANALOG_JOYSTICK_AXIS_MIN +# define ANALOG_JOYSTICK_AXIS_MIN 0 +#endif +#ifndef ANALOG_JOYSTICK_AXIS_MAX +# define ANALOG_JOYSTICK_AXIS_MAX 1023 +#endif +#ifndef ANALOG_JOYSTICK_SPEED_REGULATOR +# define ANALOG_JOYSTICK_SPEED_REGULATOR 20 +#endif +#ifndef ANALOG_JOYSTICK_READ_INTERVAL +# define ANALOG_JOYSTICK_READ_INTERVAL 10 +#endif +#ifndef ANALOG_JOYSTICK_SPEED_MAX +# define ANALOG_JOYSTICK_SPEED_MAX 2 +#endif + +typedef struct { + int8_t x; + int8_t y; + bool button; +} report_analog_joystick_t; +report_analog_joystick_t analog_joystick_read(void); +void analog_joystick_init(void); diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c new file mode 100644 index 00000000000..b807c4f0766 --- /dev/null +++ b/drivers/sensors/cirque_pinnacle.c @@ -0,0 +1,232 @@ +// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license +#include "cirque_pinnacle.h" +#include "print.h" +#include "debug.h" +#include "wait.h" + +// Registers for RAP +// clang-format off +#define FIRMWARE_ID 0x00 +#define FIRMWARE_VERSION_C 0x01 +#define STATUS_1 0x02 +#define SYSCONFIG_1 0x03 +#define FEEDCONFIG_1 0x04 +#define FEEDCONFIG_2 0x05 +#define CALIBRATION_CONFIG_1 0x07 +#define PS2_AU_CONTROL 0x08 +#define SAMPLE_RATE 0x09 +#define Z_IDLE_COUNT 0x0A +#define Z_SCALER 0x0B +#define SLEEP_INTERVAL 0x0C +#define SLEEP_TIMER 0x0D +#define PACKET_BYTE_0 0x12 +#define PACKET_BYTE_1 0x13 +#define PACKET_BYTE_2 0x14 +#define PACKET_BYTE_3 0x15 +#define PACKET_BYTE_4 0x16 +#define PACKET_BYTE_5 0x17 + +#define ERA_VALUE 0x1B +#define ERA_HIGH_BYTE 0x1C +#define ERA_LOW_BYTE 0x1D +#define ERA_CONTROL 0x1E + +// ADC-attenuation settings (held in BIT_7 and BIT_6) +// 1X = most sensitive, 4X = least sensitive +#define ADC_ATTENUATE_1X 0x00 +#define ADC_ATTENUATE_2X 0x40 +#define ADC_ATTENUATE_3X 0x80 +#define ADC_ATTENUATE_4X 0xC0 + +// Register config values for this demo +#define SYSCONFIG_1_VALUE 0x00 +#define FEEDCONFIG_1_VALUE 0x03 // 0x03 for absolute mode 0x01 for relative mode +#define FEEDCONFIG_2_VALUE 0x1C // 0x1F for normal functionality 0x1E for intellimouse disabled +#define Z_IDLE_COUNT_VALUE 0x05 +// clang-format on + +bool touchpad_init; +uint16_t scale_data = 1024; + +void cirque_pinnacle_clear_flags(void); +void cirque_pinnacle_enable_feed(bool feedEnable); +void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count); +void RAP_Write(uint8_t address, uint8_t data); + +#ifdef CONSOLE_ENABLE +void print_byte(uint8_t byte) { xprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif + +/* Logical Scaling Functions */ +// Clips raw coordinates to "reachable" window of sensor +// NOTE: values outside this window can only appear as a result of noise +void ClipCoordinates(pinnacle_data_t* coordinates) { + if (coordinates->xValue < CIRQUE_PINNACLE_X_LOWER) { + coordinates->xValue = CIRQUE_PINNACLE_X_LOWER; + } else if (coordinates->xValue > CIRQUE_PINNACLE_X_UPPER) { + coordinates->xValue = CIRQUE_PINNACLE_X_UPPER; + } + if (coordinates->yValue < CIRQUE_PINNACLE_Y_LOWER) { + coordinates->yValue = CIRQUE_PINNACLE_Y_LOWER; + } else if (coordinates->yValue > CIRQUE_PINNACLE_Y_UPPER) { + coordinates->yValue = CIRQUE_PINNACLE_Y_UPPER; + } +} + +uint16_t cirque_pinnacle_get_scale(void) { return scale_data; } +void cirque_pinnacle_set_scale(uint16_t scale) { scale_data = scale; } + +// Scales data to desired X & Y resolution +void cirque_pinnacle_scale_data(pinnacle_data_t* coordinates, uint16_t xResolution, uint16_t yResolution) { + uint32_t xTemp = 0; + uint32_t yTemp = 0; + + ClipCoordinates(coordinates); + + xTemp = coordinates->xValue; + yTemp = coordinates->yValue; + + // translate coordinates to (0, 0) reference by subtracting edge-offset + xTemp -= CIRQUE_PINNACLE_X_LOWER; + yTemp -= CIRQUE_PINNACLE_Y_LOWER; + + // scale coordinates to (xResolution, yResolution) range + coordinates->xValue = (uint16_t)(xTemp * xResolution / CIRQUE_PINNACLE_X_RANGE); + coordinates->yValue = (uint16_t)(yTemp * yResolution / CIRQUE_PINNACLE_Y_RANGE); +} + +// Clears Status1 register flags (SW_CC and SW_DR) +void cirque_pinnacle_clear_flags() { + RAP_Write(STATUS_1, 0x00); + wait_us(50); +} + +// Enables/Disables the feed +void cirque_pinnacle_enable_feed(bool feedEnable) { + uint8_t temp; + + RAP_ReadBytes(FEEDCONFIG_1, &temp, 1); // Store contents of FeedConfig1 register + + if (feedEnable) { + temp |= 0x01; // Set Feed Enable bit + RAP_Write(0x04, temp); + } else { + temp &= ~0x01; // Clear Feed Enable bit + RAP_Write(0x04, temp); + } +} + +/* ERA (Extended Register Access) Functions */ +// Reads bytes from an extended register at
(16-bit address), +// stores values in <*data> +void ERA_ReadBytes(uint16_t address, uint8_t* data, uint16_t count) { + uint8_t ERAControlValue = 0xFF; + + cirque_pinnacle_enable_feed(false); // Disable feed + + RAP_Write(ERA_HIGH_BYTE, (uint8_t)(address >> 8)); // Send upper byte of ERA address + RAP_Write(ERA_LOW_BYTE, (uint8_t)(address & 0x00FF)); // Send lower byte of ERA address + + for (uint16_t i = 0; i < count; i++) { + RAP_Write(ERA_CONTROL, 0x05); // Signal ERA-read (auto-increment) to Pinnacle + + // Wait for status register 0x1E to clear + do { + RAP_ReadBytes(ERA_CONTROL, &ERAControlValue, 1); + } while (ERAControlValue != 0x00); + + RAP_ReadBytes(ERA_VALUE, data + i, 1); + + cirque_pinnacle_clear_flags(); + } +} + +// Writes a byte, , to an extended register at
(16-bit address) +void ERA_WriteByte(uint16_t address, uint8_t data) { + uint8_t ERAControlValue = 0xFF; + + cirque_pinnacle_enable_feed(false); // Disable feed + + RAP_Write(ERA_VALUE, data); // Send data byte to be written + + RAP_Write(ERA_HIGH_BYTE, (uint8_t)(address >> 8)); // Upper byte of ERA address + RAP_Write(ERA_LOW_BYTE, (uint8_t)(address & 0x00FF)); // Lower byte of ERA address + + RAP_Write(ERA_CONTROL, 0x02); // Signal an ERA-write to Pinnacle + + // Wait for status register 0x1E to clear + do { + RAP_ReadBytes(ERA_CONTROL, &ERAControlValue, 1); + } while (ERAControlValue != 0x00); + + cirque_pinnacle_clear_flags(); +} + +void cirque_pinnacle_set_adc_attenuation(uint8_t adcGain) { + uint8_t temp = 0x00; + + ERA_ReadBytes(0x0187, &temp, 1); + temp &= 0x3F; // clear top two bits + temp |= adcGain; + ERA_WriteByte(0x0187, temp); + ERA_ReadBytes(0x0187, &temp, 1); +} + +// Changes thresholds to improve detection of fingers +void cirque_pinnacle_tune_edge_sensitivity(void) { + uint8_t temp = 0x00; + + ERA_ReadBytes(0x0149, &temp, 1); + ERA_WriteByte(0x0149, 0x04); + ERA_ReadBytes(0x0149, &temp, 1); + + ERA_ReadBytes(0x0168, &temp, 1); + ERA_WriteByte(0x0168, 0x03); + ERA_ReadBytes(0x0168, &temp, 1); +} + +/* Pinnacle-based TM040040 Functions */ +void cirque_pinnacle_init(void) { +#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi) + spi_init(); +#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) + i2c_init(); +#endif + + touchpad_init = true; + // Host clears SW_CC flag + cirque_pinnacle_clear_flags(); + + // Host configures bits of registers 0x03 and 0x05 + RAP_Write(SYSCONFIG_1, SYSCONFIG_1_VALUE); + RAP_Write(FEEDCONFIG_2, FEEDCONFIG_2_VALUE); + + // Host enables preferred output mode (absolute) + RAP_Write(FEEDCONFIG_1, FEEDCONFIG_1_VALUE); + + // Host sets z-idle packet count to 5 (default is 30) + RAP_Write(Z_IDLE_COUNT, Z_IDLE_COUNT_VALUE); + + cirque_pinnacle_set_adc_attenuation(0xFF); + cirque_pinnacle_tune_edge_sensitivity(); + cirque_pinnacle_enable_feed(true); +} + +// Reads XYZ data from Pinnacle registers 0x14 through 0x17 +// Stores result in pinnacle_data_t struct with xValue, yValue, and zValue members +pinnacle_data_t cirque_pinnacle_read_data(void) { + uint8_t data[6] = {0}; + pinnacle_data_t result = {0}; + RAP_ReadBytes(PACKET_BYTE_0, data, 6); + + cirque_pinnacle_clear_flags(); + + result.buttonFlags = data[0] & 0x3F; + result.xValue = data[2] | ((data[4] & 0x0F) << 8); + result.yValue = data[3] | ((data[4] & 0xF0) << 4); + result.zValue = data[5] & 0x3F; + + result.touchDown = (result.xValue != 0 || result.yValue != 0); + + return result; +} diff --git a/drivers/sensors/cirque_pinnacle.h b/drivers/sensors/cirque_pinnacle.h new file mode 100644 index 00000000000..db891122a66 --- /dev/null +++ b/drivers/sensors/cirque_pinnacle.h @@ -0,0 +1,74 @@ +// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license + +#pragma once + +#include +#include + +// Convenient way to store and access measurements +typedef struct { + uint16_t xValue; + uint16_t yValue; + uint16_t zValue; + uint8_t buttonFlags; + bool touchDown; +} pinnacle_data_t; + +void cirque_pinnacle_init(void); +pinnacle_data_t cirque_pinnacle_read_data(void); +void cirque_pinnacle_scale_data(pinnacle_data_t* coordinates, uint16_t xResolution, uint16_t yResolution); +uint16_t cirque_pinnacle_get_scale(void); +void cirque_pinnacle_set_scale(uint16_t scale); + +#ifndef CIRQUE_PINNACLE_TIMEOUT +# define CIRQUE_PINNACLE_TIMEOUT 20 +#endif + +// Coordinate scaling values +#ifndef CIRQUE_PINNACLE_X_LOWER +# define CIRQUE_PINNACLE_X_LOWER 127 // min "reachable" X value +#endif +#ifndef CIRQUE_PINNACLE_X_UPPER +# define CIRQUE_PINNACLE_X_UPPER 1919 // max "reachable" X value +#endif +#ifndef CIRQUE_PINNACLE_Y_LOWER +# define CIRQUE_PINNACLE_Y_LOWER 63 // min "reachable" Y value +#endif +#ifndef CIRQUE_PINNACLE_Y_UPPER +# define CIRQUE_PINNACLE_Y_UPPER 1471 // max "reachable" Y value +#endif +#ifndef CIRQUE_PINNACLE_X_RANGE +# define CIRQUE_PINNACLE_X_RANGE (CIRQUE_PINNACLE_X_UPPER - CIRQUE_PINNACLE_X_LOWER) +#endif +#ifndef CIRQUE_PINNACLE_Y_RANGE +# define CIRQUE_PINNACLE_Y_RANGE (CIRQUE_PINNACLE_Y_UPPER - CIRQUE_PINNACLE_Y_LOWER) +#endif + +#if defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) +# include "i2c_master.h" +// Cirque's 7-bit I2C Slave Address +# ifndef CIRQUE_PINNACLE_ADDR +# define CIRQUE_PINNACLE_ADDR 0x2A +# endif +#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi) +# include "spi_master.h" +# ifndef CIRQUE_PINNACLE_CLOCK_SPEED +# define CIRQUE_PINNACLE_CLOCK_SPEED 10000000 +# endif +# ifndef CIRQUE_PINNACLE_SPI_LSBFIRST +# define CIRQUE_PINNACLE_SPI_LSBFIRST false +# endif +# ifndef CIRQUE_PINNACLE_SPI_MODE +# define CIRQUE_PINNACLE_SPI_MODE 1 +# endif +# ifndef CIRQUE_PINNACLE_SPI_DIVISOR +# ifdef __AVR__ +# define CIRQUE_PINNACLE_SPI_DIVISOR (F_CPU / CIRQUE_PINNACLE_CLOCK_SPEED) +# else +# define CIRQUE_PINNACLE_SPI_DIVISOR 64 +# endif +# ifndef CIRQUE_PINNACLE_SPI_CS_PIN +# error "No Chip Select pin has been defined -- missing CIRQUE_PINNACLE_SPI_CS_PIN define" +# endif +# endif +#endif diff --git a/drivers/sensors/cirque_pinnacle_i2c.c b/drivers/sensors/cirque_pinnacle_i2c.c new file mode 100644 index 00000000000..81dd982b0cc --- /dev/null +++ b/drivers/sensors/cirque_pinnacle_i2c.c @@ -0,0 +1,43 @@ +// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license +#include "cirque_pinnacle.h" +#include "i2c_master.h" +#include "print.h" +#include "debug.h" +#include "stdio.h" + +// Masks for Cirque Register Access Protocol (RAP) +#define WRITE_MASK 0x80 +#define READ_MASK 0xA0 + +extern bool touchpad_init; + +/* RAP Functions */ +// Reads Pinnacle registers starting at
+void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { + uint8_t cmdByte = READ_MASK | address; // Form the READ command byte + if (touchpad_init) { + i2c_writeReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, NULL, 0, CIRQUE_PINNACLE_TIMEOUT); + if (i2c_readReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, data, count, CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) { +#ifdef CONSOLE_ENABLE + dprintf("error right touchpad\n"); +#endif + touchpad_init = false; + } + i2c_stop(); + } +} + +// Writes single-byte to
+void RAP_Write(uint8_t address, uint8_t data) { + uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte + + if (touchpad_init) { + if (i2c_writeReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) { +#ifdef CONSOLE_ENABLE + dprintf("error right touchpad\n"); +#endif + touchpad_init = false; + } + i2c_stop(); + } +} diff --git a/drivers/sensors/cirque_pinnacle_spi.c b/drivers/sensors/cirque_pinnacle_spi.c new file mode 100644 index 00000000000..f3eee887584 --- /dev/null +++ b/drivers/sensors/cirque_pinnacle_spi.c @@ -0,0 +1,52 @@ +// Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license +#include "cirque_pinnacle.h" +#include "spi_master.h" +#include "print.h" +#include "debug.h" + +// Masks for Cirque Register Access Protocol (RAP) +#define WRITE_MASK 0x80 +#define READ_MASK 0xA0 + +extern bool touchpad_init; + +/* RAP Functions */ +// Reads Pinnacle registers starting at
+void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { + uint8_t cmdByte = READ_MASK | address; // Form the READ command byte + if (touchpad_init) { + if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { + spi_write(cmdByte); + spi_read(); // filler + spi_read(); // filler + for (uint8_t i = 0; i < count; i++) { + data[i] = spi_read(); // each sepsequent read gets another register's contents + } + } else { +#ifdef CONSOLE_ENABLE + dprintf("error right touchpad\n"); +#endif + touchpad_init = false; + j + } + spi_stop(); + } +} + +// Writes single-byte to
+void RAP_Write(uint8_t address, uint8_t data) { + uint8_t cmdByte = WRITE_MASK | address; // Form the WRITE command byte + + if (touchpad_init) { + if (spi_start(CIRQUE_PINNACLE_SPI_CS_PIN, CIRQUE_TRACKPAD_SPI_LSBFIRST, CIRQUE_PINNACLE_SPI_MODE, CIRQUE_PINNACLE_SPI_DIVISOR)) { + spi_write(cmdByte); + spi_write(data); + } else { +#ifdef CONSOLE_ENABLE + dprintf("error right touchpad\n"); +#endif + touchpad_init = false; + } + spi_stop(); + } +} diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c index 48098ff0cca..7d390056ead 100644 --- a/drivers/sensors/pimoroni_trackball.c +++ b/drivers/sensors/pimoroni_trackball.c @@ -17,73 +17,55 @@ #include "pimoroni_trackball.h" #include "i2c_master.h" #include "print.h" - -#ifndef PIMORONI_TRACKBALL_ADDRESS -# define PIMORONI_TRACKBALL_ADDRESS 0x0A -#endif -#ifndef PIMORONI_TRACKBALL_INTERVAL_MS -# define PIMORONI_TRACKBALL_INTERVAL_MS 8 -#endif -#ifndef PIMORONI_TRACKBALL_MOUSE_SCALE -# define PIMORONI_TRACKBALL_MOUSE_SCALE 5 -#endif -#ifndef PIMORONI_TRACKBALL_SCROLL_SCALE -# define PIMORONI_TRACKBALL_SCROLL_SCALE 1 -#endif -#ifndef PIMORONI_TRACKBALL_DEBOUNCE_CYCLES -# define PIMORONI_TRACKBALL_DEBOUNCE_CYCLES 20 -#endif -#ifndef PIMORONI_TRACKBALL_ERROR_COUNT -# define PIMORONI_TRACKBALL_ERROR_COUNT 10 -#endif - -#define TRACKBALL_TIMEOUT 100 -#define TRACKBALL_REG_LED_RED 0x00 -#define TRACKBALL_REG_LED_GRN 0x01 -#define TRACKBALL_REG_LED_BLU 0x02 -#define TRACKBALL_REG_LED_WHT 0x03 -#define TRACKBALL_REG_LEFT 0x04 -#define TRACKBALL_REG_RIGHT 0x05 -#define TRACKBALL_REG_UP 0x06 -#define TRACKBALL_REG_DOWN 0x07 - -static pimoroni_data current_pimoroni_data; -static report_mouse_t mouse_report; -static bool scrolling = false; -static int16_t x_offset = 0; -static int16_t y_offset = 0; -static int16_t h_offset = 0; -static int16_t v_offset = 0; -static uint16_t precision = 128; -static uint8_t error_count = 0; - -float trackball_get_precision(void) { return ((float)precision / 128); } -void trackball_set_precision(float floatprecision) { precision = (floatprecision * 128); } -bool trackball_is_scrolling(void) { return scrolling; } -void trackball_set_scrolling(bool scroll) { scrolling = scroll; } - -void trackball_set_rgbw(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { +#include "debug.h" +#include "timer.h" + +// clang-format off +#define PIMORONI_TRACKBALL_REG_LED_RED 0x00 +#define PIMORONI_TRACKBALL_REG_LED_GRN 0x01 +#define PIMORONI_TRACKBALL_REG_LED_BLU 0x02 +#define PIMORONI_TRACKBALL_REG_LED_WHT 0x03 +#define PIMORONI_TRACKBALL_REG_LEFT 0x04 +#define PIMORONI_TRACKBALL_REG_RIGHT 0x05 +#define PIMORONI_TRACKBALL_REG_UP 0x06 +#define PIMORONI_TRACKBALL_REG_DOWN 0x07 +// clang-format on + +static uint16_t precision = 128; + +float pimoroni_trackball_get_precision(void) { return ((float)precision / 128); } +void pimoroni_trackball_set_precision(float floatprecision) { precision = (floatprecision * 128); } + +void pimoroni_trackball_set_rgbw(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { uint8_t data[4] = {r, g, b, w}; - __attribute__((unused)) i2c_status_t status = i2c_writeReg(PIMORONI_TRACKBALL_ADDRESS << 1, TRACKBALL_REG_LED_RED, data, sizeof(data), TRACKBALL_TIMEOUT); -#ifdef TRACKBALL_DEBUG - dprintf("Trackball RGBW i2c_status_t: %d\n", status); + __attribute__((unused)) i2c_status_t status = i2c_writeReg(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LED_RED, data, sizeof(data), PIMORONI_TRACKBALL_TIMEOUT); + +#ifdef CONSOLE_ENABLE + if (debug_mouse) dprintf("Trackball RGBW i2c_status_t: %d\n", status); #endif } -i2c_status_t read_pimoroni_trackball(pimoroni_data* data) { - i2c_status_t status = i2c_readReg(PIMORONI_TRACKBALL_ADDRESS << 1, TRACKBALL_REG_LEFT, (uint8_t*)data, sizeof(*data), TRACKBALL_TIMEOUT); -#ifdef TRACKBALL_DEBUG - dprintf("Trackball READ i2c_status_t: %d\nLeft: %d\nRight: %d\nUp: %d\nDown: %d\nSwtich: %d\n", status, data->left, data->right, data->up, data->down, data->click); +i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data) { + i2c_status_t status = i2c_readReg(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LEFT, (uint8_t*)data, sizeof(*data), PIMORONI_TRACKBALL_TIMEOUT); +#ifdef CONSOLE_ENABLE + if (debug_mouse) { + static uint16_t d_timer; + if (timer_elapsed(d_timer) > PIMORONI_TRACKBALL_DEBUG_INTERVAL) { + dprintf("Trackball READ i2c_status_t: %d L: %d R: %d Up: %d D: %d SW: %d\n", status, data->left, data->right, data->up, data->down, data->click); + d_timer = timer_read(); + } + } #endif + return status; } -__attribute__((weak)) void pointing_device_init(void) { +__attribute__((weak)) void pimironi_trackball_device_init(void) { i2c_init(); - trackball_set_rgbw(0x00, 0x00, 0x00, 0x00); + pimoroni_trackball_set_rgbw(0x00, 0x00, 0x00, 0x00); } -int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale) { +int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale) { uint8_t offset = 0; bool isnegative = false; if (negative_dir > positive_dir) { @@ -96,7 +78,7 @@ int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_ return isnegative ? -(int16_t)(magnitude) : (int16_t)(magnitude); } -void trackball_adapt_values(int8_t* mouse, int16_t* offset) { +void pimoroni_trackball_adapt_values(int8_t* mouse, int16_t* offset) { if (*offset > 127) { *mouse = 127; *offset -= 127; @@ -108,94 +90,3 @@ void trackball_adapt_values(int8_t* mouse, int16_t* offset) { *offset = 0; } } - -__attribute__((weak)) void trackball_click(bool pressed, report_mouse_t* mouse) { -#ifdef PIMORONI_TRACKBALL_CLICK - if (pressed) { - mouse->buttons |= MOUSE_BTN1; - } else { - mouse->buttons &= ~MOUSE_BTN1; - } -#endif -} - -__attribute__((weak)) bool pointing_device_task_user(pimoroni_data* trackball_data) { return true; }; - -__attribute__((weak)) void pointing_device_task() { - static fast_timer_t throttle = 0; - static uint16_t debounce = 0; - - if (error_count < PIMORONI_TRACKBALL_ERROR_COUNT && timer_elapsed_fast(throttle) >= PIMORONI_TRACKBALL_INTERVAL_MS) { - i2c_status_t status = read_pimoroni_trackball(¤t_pimoroni_data); - - if (status == I2C_STATUS_SUCCESS) { - error_count = 0; - - if (pointing_device_task_user(¤t_pimoroni_data)) { - mouse_report = pointing_device_get_report(); - - if (!(current_pimoroni_data.click & 128)) { - trackball_click(false, &mouse_report); - if (!debounce) { - if (scrolling) { -#ifdef PIMORONI_TRACKBALL_INVERT_X - h_offset += trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_SCROLL_SCALE); -#else - h_offset -= trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_SCROLL_SCALE); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - v_offset += trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_SCROLL_SCALE); -#else - v_offset -= trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_SCROLL_SCALE); -#endif - } else { -#ifdef PIMORONI_TRACKBALL_INVERT_X - x_offset -= trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_MOUSE_SCALE); -#else - x_offset += trackball_get_offsets(current_pimoroni_data.right, current_pimoroni_data.left, PIMORONI_TRACKBALL_MOUSE_SCALE); -#endif -#ifdef PIMORONI_TRACKBALL_INVERT_Y - y_offset -= trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_MOUSE_SCALE); -#else - y_offset += trackball_get_offsets(current_pimoroni_data.down, current_pimoroni_data.up, PIMORONI_TRACKBALL_MOUSE_SCALE); -#endif - } - if (scrolling) { -#ifndef PIMORONI_TRACKBALL_ROTATE - trackball_adapt_values(&mouse_report.h, &h_offset); - trackball_adapt_values(&mouse_report.v, &v_offset); -#else - trackball_adapt_values(&mouse_report.h, &v_offset); - trackball_adapt_values(&mouse_report.v, &h_offset); -#endif - mouse_report.x = 0; - mouse_report.y = 0; - } else { -#ifndef PIMORONI_TRACKBALL_ROTATE - trackball_adapt_values(&mouse_report.x, &x_offset); - trackball_adapt_values(&mouse_report.y, &y_offset); -#else - trackball_adapt_values(&mouse_report.x, &y_offset); - trackball_adapt_values(&mouse_report.y, &x_offset); -#endif - mouse_report.h = 0; - mouse_report.v = 0; - } - } else { - debounce--; - } - } else { - trackball_click(true, &mouse_report); - debounce = PIMORONI_TRACKBALL_DEBOUNCE_CYCLES; - } - } - } else { - error_count++; - } - - pointing_device_set_report(mouse_report); - pointing_device_send(); - - throttle = timer_read_fast(); - } -} diff --git a/drivers/sensors/pimoroni_trackball.h b/drivers/sensors/pimoroni_trackball.h index 6b2a41425d4..59ee8724ba6 100644 --- a/drivers/sensors/pimoroni_trackball.h +++ b/drivers/sensors/pimoroni_trackball.h @@ -16,22 +16,46 @@ */ #pragma once -#include "quantum.h" -#include "pointing_device.h" +#include +#include "report.h" +#include "i2c_master.h" -typedef struct pimoroni_data { +#ifndef PIMORONI_TRACKBALL_ADDRESS +# define PIMORONI_TRACKBALL_ADDRESS 0x0A +#endif +#ifndef PIMORONI_TRACKBALL_INTERVAL_MS +# define PIMORONI_TRACKBALL_INTERVAL_MS 8 +#endif +#ifndef PIMORONI_TRACKBALL_SCALE +# define PIMORONI_TRACKBALL_SCALE 5 +#endif +#ifndef PIMORONI_TRACKBALL_DEBOUNCE_CYCLES +# define PIMORONI_TRACKBALL_DEBOUNCE_CYCLES 20 +#endif +#ifndef PIMORONI_TRACKBALL_ERROR_COUNT +# define PIMORONI_TRACKBALL_ERROR_COUNT 10 +#endif + +#ifndef PIMORONI_TRACKBALL_TIMEOUT +# define PIMORONI_TRACKBALL_TIMEOUT 100 +#endif + +#ifndef PIMORONI_TRACKBALL_DEBUG_INTERVAL +# define PIMORONI_TRACKBALL_DEBUG_INTERVAL 100 +#endif + +typedef struct { uint8_t left; uint8_t right; uint8_t up; uint8_t down; uint8_t click; -} pimoroni_data; +} pimoroni_data_t; -void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); -void trackball_click(bool pressed, report_mouse_t* mouse); -int16_t trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale); -void trackball_adapt_values(int8_t* mouse, int16_t* offset); -float trackball_get_precision(void); -void trackball_set_precision(float precision); -bool trackball_is_scrolling(void); -void trackball_set_scrolling(bool scroll); +void pimironi_trackball_device_init(void); +void pimoroni_trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); +int16_t pimoroni_trackball_get_offsets(uint8_t negative_dir, uint8_t positive_dir, uint8_t scale); +void pimoroni_trackball_adapt_values(int8_t* mouse, int16_t* offset); +float pimoroni_trackball_get_precision(void); +void pimoroni_trackball_set_precision(float precision); +i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data); diff --git a/drivers/sensors/pmw3360.c b/drivers/sensors/pmw3360.c index 79b653e452a..2b27dccbb64 100644 --- a/drivers/sensors/pmw3360.c +++ b/drivers/sensors/pmw3360.c @@ -20,62 +20,71 @@ #include "wait.h" #include "debug.h" #include "print.h" -#include "pmw3360_firmware.h" +#include PMW3360_FIRMWARE_H // Registers -#define REG_Product_ID 0x00 -#define REG_Revision_ID 0x01 -#define REG_Motion 0x02 -#define REG_Delta_X_L 0x03 -#define REG_Delta_X_H 0x04 -#define REG_Delta_Y_L 0x05 -#define REG_Delta_Y_H 0x06 -#define REG_SQUAL 0x07 -#define REG_Raw_Data_Sum 0x08 -#define REG_Maximum_Raw_data 0x09 -#define REG_Minimum_Raw_data 0x0A -#define REG_Shutter_Lower 0x0B -#define REG_Shutter_Upper 0x0C -#define REG_Control 0x0D -#define REG_Config1 0x0F -#define REG_Config2 0x10 -#define REG_Angle_Tune 0x11 -#define REG_Frame_Capture 0x12 -#define REG_SROM_Enable 0x13 -#define REG_Run_Downshift 0x14 -#define REG_Rest1_Rate_Lower 0x15 -#define REG_Rest1_Rate_Upper 0x16 -#define REG_Rest1_Downshift 0x17 -#define REG_Rest2_Rate_Lower 0x18 -#define REG_Rest2_Rate_Upper 0x19 -#define REG_Rest2_Downshift 0x1A -#define REG_Rest3_Rate_Lower 0x1B -#define REG_Rest3_Rate_Upper 0x1C -#define REG_Observation 0x24 -#define REG_Data_Out_Lower 0x25 -#define REG_Data_Out_Upper 0x26 -#define REG_Raw_Data_Dump 0x29 -#define REG_SROM_ID 0x2A -#define REG_Min_SQ_Run 0x2B -#define REG_Raw_Data_Threshold 0x2C -#define REG_Config5 0x2F -#define REG_Power_Up_Reset 0x3A -#define REG_Shutdown 0x3B -#define REG_Inverse_Product_ID 0x3F -#define REG_LiftCutoff_Tune3 0x41 -#define REG_Angle_Snap 0x42 -#define REG_LiftCutoff_Tune1 0x4A -#define REG_Motion_Burst 0x50 -#define REG_LiftCutoff_Tune_Timeout 0x58 +// clang-format off +#define REG_Product_ID 0x00 +#define REG_Revision_ID 0x01 +#define REG_Motion 0x02 +#define REG_Delta_X_L 0x03 +#define REG_Delta_X_H 0x04 +#define REG_Delta_Y_L 0x05 +#define REG_Delta_Y_H 0x06 +#define REG_SQUAL 0x07 +#define REG_Raw_Data_Sum 0x08 +#define REG_Maximum_Raw_data 0x09 +#define REG_Minimum_Raw_data 0x0A +#define REG_Shutter_Lower 0x0B +#define REG_Shutter_Upper 0x0C +#define REG_Control 0x0D +#define REG_Config1 0x0F +#define REG_Config2 0x10 +#define REG_Angle_Tune 0x11 +#define REG_Frame_Capture 0x12 +#define REG_SROM_Enable 0x13 +#define REG_Run_Downshift 0x14 +#define REG_Rest1_Rate_Lower 0x15 +#define REG_Rest1_Rate_Upper 0x16 +#define REG_Rest1_Downshift 0x17 +#define REG_Rest2_Rate_Lower 0x18 +#define REG_Rest2_Rate_Upper 0x19 +#define REG_Rest2_Downshift 0x1A +#define REG_Rest3_Rate_Lower 0x1B +#define REG_Rest3_Rate_Upper 0x1C +#define REG_Observation 0x24 +#define REG_Data_Out_Lower 0x25 +#define REG_Data_Out_Upper 0x26 +#define REG_Raw_Data_Dump 0x29 +#define REG_SROM_ID 0x2A +#define REG_Min_SQ_Run 0x2B +#define REG_Raw_Data_Threshold 0x2C +#define REG_Config5 0x2F +#define REG_Power_Up_Reset 0x3A +#define REG_Shutdown 0x3B +#define REG_Inverse_Product_ID 0x3F +#define REG_LiftCutoff_Tune3 0x41 +#define REG_Angle_Snap 0x42 +#define REG_LiftCutoff_Tune1 0x4A +#define REG_Motion_Burst 0x50 +#define REG_LiftCutoff_Tune_Timeout 0x58 #define REG_LiftCutoff_Tune_Min_Length 0x5A -#define REG_SROM_Load_Burst 0x62 -#define REG_Lift_Config 0x63 -#define REG_Raw_Data_Burst 0x64 -#define REG_LiftCutoff_Tune2 0x65 +#define REG_SROM_Load_Burst 0x62 +#define REG_Lift_Config 0x63 +#define REG_Raw_Data_Burst 0x64 +#define REG_LiftCutoff_Tune2 0x65 +// clang-format on + +#ifndef MAX_CPI +# define MAX_CPI 0x77 // limits to 0--119, should be max cpi/100 +#endif bool _inBurst = false; +#ifdef CONSOLE_ENABLE void print_byte(uint8_t byte) { dprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); } +#endif +#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) bool spi_start_adv(void) { bool status = spi_start(PMW3360_CS_PIN, PMW3360_SPI_LSBFIRST, PMW3360_SPI_MODE, PMW3360_SPI_DIVISOR); @@ -124,20 +133,20 @@ uint8_t spi_read_adv(uint8_t reg_addr) { return data; } -void pmw_set_cpi(uint16_t cpi) { - uint8_t cpival = constrain((cpi / 100) - 1, 0, 0x77); // limits to 0--119 +void pmw3360_set_cpi(uint16_t cpi) { + uint8_t cpival = constrain((cpi / 100) - 1, 0, MAX_CPI); spi_start_adv(); spi_write_adv(REG_Config1, cpival); spi_stop(); } -uint16_t pmw_get_cpi(void) { +uint16_t pmw3360_get_cpi(void) { uint8_t cpival = spi_read_adv(REG_Config1); return (uint16_t)(cpival & 0xFF) * 100; } -bool pmw_spi_init(void) { +bool pmw3360_init(void) { setPinOutput(PMW3360_CS_PIN); spi_init(); @@ -164,12 +173,12 @@ bool pmw_spi_init(void) { spi_read_adv(REG_Delta_Y_L); spi_read_adv(REG_Delta_Y_H); - pmw_upload_firmware(); + pmw3360_upload_firmware(); spi_stop_adv(); wait_ms(10); - pmw_set_cpi(PMW3360_CPI); + pmw3360_set_cpi(PMW3360_CPI); wait_ms(1); @@ -177,14 +186,14 @@ bool pmw_spi_init(void) { spi_write_adv(REG_Angle_Tune, constrain(ROTATIONAL_TRANSFORM_ANGLE, -30, 30)); - bool init_success = pmw_check_signature(); + bool init_success = pmw3360_check_signature(); writePinLow(PMW3360_CS_PIN); return init_success; } -void pmw_upload_firmware(void) { +void pmw3360_upload_firmware(void) { spi_write_adv(REG_SROM_Enable, 0x1d); wait_ms(10); @@ -211,16 +220,18 @@ void pmw_upload_firmware(void) { wait_ms(10); } -bool pmw_check_signature(void) { +bool pmw3360_check_signature(void) { uint8_t pid = spi_read_adv(REG_Product_ID); uint8_t iv_pid = spi_read_adv(REG_Inverse_Product_ID); uint8_t SROM_ver = spi_read_adv(REG_SROM_ID); - return (pid == 0x42 && iv_pid == 0xBD && SROM_ver == 0x04); // signature for SROM 0x04 + return (pid == firmware_signature[0] && iv_pid == firmware_signature[1] && SROM_ver == firmware_signature[2]); // signature for SROM 0x04 } -report_pmw_t pmw_read_burst(void) { +report_pmw3360_t pmw3360_read_burst(void) { if (!_inBurst) { +#ifdef CONSOLE_ENABLE dprintf("burst on"); +#endif spi_write_adv(REG_Motion_Burst, 0x00); _inBurst = true; } @@ -229,12 +240,7 @@ report_pmw_t pmw_read_burst(void) { spi_write(REG_Motion_Burst); wait_us(35); // waits for tSRAD - report_pmw_t data; - data.motion = 0; - data.dx = 0; - data.mdx = 0; - data.dy = 0; - data.mdx = 0; + report_pmw3360_t data = {0}; data.motion = spi_read(); spi_write(0x00); // skip Observation @@ -245,6 +251,7 @@ report_pmw_t pmw_read_burst(void) { spi_stop(); +#ifdef CONSOLE_ENABLE if (debug_mouse) { print_byte(data.motion); print_byte(data.dx); @@ -253,6 +260,7 @@ report_pmw_t pmw_read_burst(void) { print_byte(data.mdy); dprintf("\n"); } +#endif data.isMotion = (data.motion & 0x80) != 0; data.isOnSurface = (data.motion & 0x08) == 0; diff --git a/drivers/sensors/pmw3360.h b/drivers/sensors/pmw3360.h index 7429a6ba09e..7b2bef5b80b 100644 --- a/drivers/sensors/pmw3360.h +++ b/drivers/sensors/pmw3360.h @@ -18,6 +18,8 @@ #pragma once +#include +#include "report.h" #include "spi_master.h" #ifndef PMW3360_CPI @@ -25,7 +27,7 @@ #endif #ifndef PMW3360_CLOCK_SPEED -# define PMW3360_CLOCK_SPEED 70000000 +# define PMW3360_CLOCK_SPEED 2000000 #endif #ifndef PMW3360_SPI_LSBFIRST @@ -52,6 +54,17 @@ # error "No chip select pin defined -- missing PMW3360_CS_PIN" #endif +/* +The pmw33660 and pmw3389 use the same registers and timing and such. +The only differences between the two is the firmware used, and the +range for the DPI. So add a semi-secret hack to allow use of the +pmw3389's firmware blob. Also, can set the max cpi range too. +This should work for the 3390 and 3391 too, in theory. +*/ +#ifndef PMW3360_FIRMWARE_H +# define PMW3360_FIRMWARE_H "pmw3360_firmware.h" +#endif + #ifdef CONSOLE_ENABLE void print_byte(uint8_t byte); #endif @@ -64,19 +77,18 @@ typedef struct { int8_t mdx; int16_t dy; // displacement on y directions. int8_t mdy; -} report_pmw_t; +} report_pmw3360_t; -bool spi_start_adv(void); -void spi_stop_adv(void); -spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); -uint8_t spi_read_adv(uint8_t reg_addr); -bool pmw_spi_init(void); -void pmw_set_cpi(uint16_t cpi); -uint16_t pmw_get_cpi(void); -void pmw_upload_firmware(void); -bool pmw_check_signature(void); -report_pmw_t pmw_read_burst(void); +bool spi_start_adv(void); +void spi_stop_adv(void); +spi_status_t spi_write_adv(uint8_t reg_addr, uint8_t data); +uint8_t spi_read_adv(uint8_t reg_addr); +bool pmw3360_init(void); +void pmw3360_set_cpi(uint16_t cpi); +uint16_t pmw3360_get_cpi(void); +void pmw3360_upload_firmware(void); +bool pmw3360_check_signature(void); +report_pmw3360_t pmw3360_read_burst(void); #define degToRad(angleInDegrees) ((angleInDegrees)*M_PI / 180.0) #define radToDeg(angleInRadians) ((angleInRadians)*180.0 / M_PI) -#define constrain(amt, low, high) ((amt) < (low) ? (low) : ((amt) > (high) ? (high) : (amt))) diff --git a/drivers/sensors/pmw3360_firmware.h b/drivers/sensors/pmw3360_firmware.h index 4d5fe7a0b97..ed9fda5a751 100644 --- a/drivers/sensors/pmw3360_firmware.h +++ b/drivers/sensors/pmw3360_firmware.h @@ -20,8 +20,13 @@ #include "progmem.h" +// PID, Inverse PID, SROM version +const uint8_t firmware_signature[] PROGMEM = {0x42, 0xBD, 0x04}; + #define FIRMWARE_LENGTH 4094 +// Firmware Blob foor PMW3360 + // clang-format off const uint8_t firmware_data[FIRMWARE_LENGTH] PROGMEM = { 0x01, 0x04, 0x8E, 0x96, 0x6E, 0x77, 0x3E, 0xFE, 0x7E, 0x5F, 0x1D, 0xB8, 0xF2, 0x66, 0x4E, 0xFF, diff --git a/drivers/sensors/pmw3389_firmware.h b/drivers/sensors/pmw3389_firmware.h new file mode 100644 index 00000000000..0564dab73af --- /dev/null +++ b/drivers/sensors/pmw3389_firmware.h @@ -0,0 +1,303 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * Copyright 2019 Sunjun Kim + * Copyright 2020 Ploopy Corporation + * + * 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 . + */ + +#pragma once + +// PID, Inverse PID, SROM version +const uint8_t firmware_signature[] PROGMEM = {0x42, 0xBD, 0x04}; + +// clang-format off +// Firmware Blob foor PMW3389 +const uint16_t firmware_length = 4094; +// clang-format off +const uint8_t firmware_data[] PROGMEM = { // SROM 0x04 +0x01, 0xe8, 0xba, 0x26, 0x0b, 0xb2, 0xbe, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0xa8, 0xb3, +0xe4, 0x2b, 0xb5, 0xe8, 0x53, 0x07, 0x6d, 0x3b, 0xd1, 0x20, 0xc2, 0x06, 0x6f, 0x3d, 0xd9, +0x11, 0xa0, 0xc2, 0xe7, 0x2d, 0xb9, 0xd1, 0x20, 0xa3, 0xa5, 0xc8, 0xf3, 0x64, 0x4a, 0xf7, +0x4d, 0x18, 0x93, 0xa4, 0xca, 0xf7, 0x6c, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xfe, 0x7e, 0x7e, +0x5f, 0x1d, 0x99, 0xb0, 0xc3, 0xe5, 0x29, 0xd3, 0x03, 0x65, 0x48, 0x12, 0x87, 0x6d, 0x58, +0x32, 0xe6, 0x2f, 0xdc, 0x3a, 0xf2, 0x4f, 0xfd, 0x59, 0x11, 0x81, 0x61, 0x21, 0xc0, 0x02, +0x86, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x55, 0x28, 0xb3, 0xe4, 0x4a, 0x16, +0xab, 0xbf, 0xdd, 0x38, 0xf2, 0x66, 0x4e, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xc8, +0x12, 0xa6, 0xaf, 0xdc, 0x3a, 0xd1, 0x41, 0x60, 0x75, 0x58, 0x24, 0x92, 0xd4, 0x72, 0x6c, +0xe0, 0x2f, 0xfd, 0x23, 0x8d, 0x1c, 0x5b, 0xb2, 0x97, 0x36, 0x3d, 0x0b, 0xa2, 0x49, 0xb1, +0x58, 0xf2, 0x1f, 0xc0, 0xcb, 0xf8, 0x41, 0x4f, 0xcd, 0x1e, 0x6b, 0x39, 0xa7, 0x2b, 0xe9, +0x30, 0x16, 0x83, 0xd2, 0x0e, 0x47, 0x8f, 0xe3, 0xb1, 0xdf, 0xa2, 0x15, 0xdb, 0x5d, 0x30, +0xc5, 0x1a, 0xab, 0x31, 0x99, 0xf3, 0xfa, 0xb2, 0x86, 0x69, 0xad, 0x7a, 0xe8, 0xa7, 0x18, +0x6a, 0xcc, 0xc8, 0x65, 0x23, 0x87, 0xa8, 0x5f, 0xf5, 0x21, 0x59, 0x75, 0x09, 0x71, 0x45, +0x55, 0x25, 0x4b, 0xda, 0xa1, 0xc3, 0xf7, 0x41, 0xab, 0x59, 0xd9, 0x74, 0x12, 0x55, 0x5f, +0xbc, 0xaf, 0xd9, 0xfd, 0xb0, 0x1e, 0xa3, 0x0f, 0xff, 0xde, 0x11, 0x16, 0x6a, 0xae, 0x0e, +0xe1, 0x5d, 0x3c, 0x10, 0x43, 0x9a, 0xa1, 0x0b, 0x24, 0x8f, 0x0d, 0x7f, 0x0b, 0x5e, 0x4c, +0x42, 0xa4, 0x84, 0x2c, 0x40, 0xd0, 0x55, 0x39, 0xe6, 0x4b, 0xf8, 0x9b, 0x2f, 0xdc, 0x28, +0xff, 0xfa, 0xb5, 0x85, 0x19, 0xe5, 0x28, 0xa1, 0x77, 0xaa, 0x73, 0xf3, 0x03, 0xc7, 0x62, +0xa6, 0x91, 0x18, 0xc9, 0xb0, 0xcd, 0x05, 0xdc, 0xca, 0x81, 0x26, 0x1a, 0x47, 0x40, 0xda, +0x36, 0x7d, 0x6a, 0x53, 0xc8, 0x5a, 0x77, 0x5d, 0x19, 0xa4, 0x1b, 0x23, 0x83, 0xd0, 0xb2, +0xaa, 0x0e, 0xbf, 0x77, 0x4e, 0x3a, 0x3b, 0x59, 0x00, 0x31, 0x0d, 0x02, 0x1b, 0x88, 0x7a, +0xd4, 0xbd, 0x9d, 0xcc, 0x58, 0x04, 0x69, 0xf6, 0x3b, 0xca, 0x42, 0xe2, 0xfd, 0xc3, 0x3d, +0x39, 0xc5, 0xd0, 0x71, 0xe4, 0xc8, 0xb7, 0x3e, 0x3f, 0xc8, 0xe9, 0xca, 0xc9, 0x3f, 0x04, +0x4e, 0x1b, 0x79, 0xca, 0xa5, 0x61, 0xc2, 0xed, 0x1d, 0xa6, 0xda, 0x5a, 0xe9, 0x7f, 0x65, +0x8c, 0xbe, 0x12, 0x6e, 0xa4, 0x5b, 0x33, 0x2f, 0x84, 0x28, 0x9c, 0x1c, 0x88, 0x2d, 0xff, +0x07, 0xbf, 0xa6, 0xd7, 0x5a, 0x88, 0x86, 0xb0, 0x3f, 0xf6, 0x31, 0x5b, 0x11, 0x6d, 0xf5, +0x58, 0xeb, 0x58, 0x02, 0x9e, 0xb5, 0x9a, 0xb1, 0xff, 0x25, 0x9d, 0x8b, 0x4f, 0xb6, 0x0a, +0xf9, 0xea, 0x3e, 0x3f, 0x21, 0x09, 0x65, 0x21, 0x22, 0xfe, 0x3d, 0x4e, 0x11, 0x5b, 0x9e, +0x5a, 0x59, 0x8b, 0xdd, 0xd8, 0xce, 0xd6, 0xd9, 0x59, 0xd2, 0x1e, 0xfd, 0xef, 0x0d, 0x1b, +0xd9, 0x61, 0x7f, 0xd7, 0x2d, 0xad, 0x62, 0x09, 0xe5, 0x22, 0x63, 0xea, 0xc7, 0x31, 0xd9, +0xa1, 0x38, 0x80, 0x5c, 0xa7, 0x32, 0x82, 0xec, 0x1b, 0xa2, 0x49, 0x5a, 0x06, 0xd2, 0x7c, +0xc9, 0x96, 0x57, 0xbb, 0x17, 0x75, 0xfc, 0x7a, 0x8f, 0x0d, 0x77, 0xb5, 0x7a, 0x8e, 0x3e, +0xf4, 0xba, 0x2f, 0x69, 0x13, 0x26, 0xd6, 0xd9, 0x21, 0x60, 0x2f, 0x21, 0x3e, 0x87, 0xee, +0xfd, 0x87, 0x16, 0x0d, 0xc8, 0x08, 0x00, 0x25, 0x71, 0xac, 0x2c, 0x03, 0x2a, 0x37, 0x2d, +0xb3, 0x34, 0x09, 0x91, 0xe3, 0x06, 0x2c, 0x38, 0x37, 0x95, 0x3b, 0x17, 0x7a, 0xaf, 0xac, +0x99, 0x55, 0xab, 0x41, 0x39, 0x5f, 0x8e, 0xa6, 0x43, 0x80, 0x03, 0x88, 0x6f, 0x7d, 0xbd, +0x5a, 0xb4, 0x2b, 0x32, 0x23, 0x5a, 0xa9, 0x31, 0x32, 0x39, 0x4c, 0x5b, 0xf4, 0x6b, 0xaf, +0x66, 0x6f, 0x3c, 0x8e, 0x2d, 0x82, 0x97, 0x9f, 0x4a, 0x01, 0xdc, 0x99, 0x98, 0x00, 0xec, +0x38, 0x7a, 0x79, 0x70, 0xa6, 0x85, 0xd6, 0x21, 0x63, 0x0d, 0x45, 0x9a, 0x2e, 0x5e, 0xa7, +0xb1, 0xea, 0x66, 0x6a, 0xbc, 0x62, 0x2d, 0x7b, 0x7d, 0x85, 0xea, 0x95, 0x2f, 0xc0, 0xe8, +0x6f, 0x35, 0xa0, 0x3a, 0x02, 0x25, 0xbc, 0xb2, 0x5f, 0x5c, 0x43, 0x96, 0xcc, 0x26, 0xd2, +0x16, 0xb4, 0x96, 0x73, 0xd7, 0x13, 0xc7, 0xae, 0x53, 0x15, 0x31, 0x89, 0x68, 0x66, 0x6d, +0x2c, 0x92, 0x1f, 0xcc, 0x5b, 0xa7, 0x8f, 0x5d, 0xbb, 0xc9, 0xdb, 0xe8, 0x3b, 0x9d, 0x61, +0x74, 0x8b, 0x05, 0xa1, 0x58, 0x52, 0x68, 0xee, 0x3d, 0x39, 0x79, 0xa0, 0x9b, 0xdd, 0xe1, +0x55, 0xc9, 0x60, 0xeb, 0xad, 0xb8, 0x5b, 0xc2, 0x5a, 0xb5, 0x2c, 0x18, 0x55, 0xa9, 0x50, +0xc3, 0xf6, 0x72, 0x5f, 0xcc, 0xe2, 0xf4, 0x55, 0xb5, 0xd6, 0xb5, 0x4a, 0x99, 0xa5, 0x28, +0x74, 0x97, 0x18, 0xe8, 0xc0, 0x84, 0x89, 0x50, 0x03, 0x86, 0x4d, 0x1a, 0xb7, 0x09, 0x90, +0xa2, 0x01, 0x04, 0xbb, 0x73, 0x62, 0xcb, 0x97, 0x22, 0x70, 0x5d, 0x52, 0x41, 0x8e, 0xd9, +0x90, 0x15, 0xaa, 0xab, 0x0a, 0x31, 0x65, 0xb4, 0xda, 0xd0, 0xee, 0x24, 0xc9, 0x41, 0x91, +0x1e, 0xbc, 0x46, 0x70, 0x40, 0x9d, 0xda, 0x0e, 0x2a, 0xe4, 0xb2, 0x4c, 0x9f, 0xf2, 0xfc, +0xf3, 0x84, 0x17, 0x44, 0x1e, 0xd7, 0xca, 0x23, 0x1f, 0x3f, 0x5a, 0x22, 0x3d, 0xaf, 0x9b, +0x2d, 0xfc, 0x41, 0xad, 0x26, 0xb4, 0x45, 0x67, 0x0b, 0x80, 0x0e, 0xf9, 0x61, 0x37, 0xec, +0x3b, 0xf4, 0x4b, 0x14, 0xdf, 0x5a, 0x0c, 0x3a, 0x50, 0x0b, 0x14, 0x0c, 0x72, 0xae, 0xc6, +0xc5, 0xec, 0x35, 0x53, 0x2d, 0x59, 0xed, 0x91, 0x74, 0xe2, 0xc4, 0xc8, 0xf2, 0x25, 0x6b, +0x97, 0x6f, 0xc9, 0x76, 0xce, 0xa9, 0xb1, 0x99, 0x8f, 0x5a, 0x92, 0x3b, 0xc4, 0x8d, 0x54, +0x50, 0x40, 0x72, 0xd6, 0x90, 0x83, 0xfc, 0xe5, 0x49, 0x8b, 0x17, 0xf5, 0xfd, 0x6b, 0x8d, +0x32, 0x02, 0xe9, 0x0a, 0xfe, 0xbf, 0x00, 0x6b, 0xa3, 0xad, 0x5f, 0x09, 0x4b, 0x97, 0x2b, +0x00, 0x58, 0x65, 0x2e, 0x07, 0x49, 0x0a, 0x3b, 0x6b, 0x2e, 0x50, 0x6c, 0x1d, 0xac, 0xb7, +0x6a, 0x26, 0xd8, 0x13, 0xa4, 0xca, 0x16, 0xae, 0xab, 0x93, 0xb9, 0x1c, 0x1c, 0xb4, 0x47, +0x6a, 0x38, 0x36, 0x17, 0x27, 0xc9, 0x7f, 0xc7, 0x64, 0xcb, 0x89, 0x58, 0xc5, 0x61, 0xc2, +0xc6, 0xea, 0x15, 0x0b, 0x34, 0x0c, 0x5d, 0x61, 0x76, 0x6e, 0x2b, 0x62, 0x40, 0x92, 0xa3, +0x6c, 0xef, 0xf4, 0xe4, 0xc3, 0xa1, 0xa8, 0xf5, 0x94, 0x79, 0x0d, 0xd1, 0x3d, 0xcb, 0x3d, +0x40, 0xb6, 0xd0, 0xf0, 0x10, 0x54, 0xd8, 0x47, 0x25, 0x51, 0xc5, 0x41, 0x79, 0x00, 0xe5, +0xa0, 0x72, 0xde, 0xbb, 0x3b, 0x62, 0x17, 0xf6, 0xbc, 0x5d, 0x00, 0x76, 0x2e, 0xa7, 0x3b, +0xb6, 0xf1, 0x98, 0x72, 0x59, 0x2a, 0x73, 0xb0, 0x21, 0xd6, 0x49, 0xe0, 0xc0, 0xd5, 0xeb, +0x02, 0x7d, 0x4b, 0x41, 0x28, 0x70, 0x2d, 0xec, 0x2b, 0x71, 0x1f, 0x0b, 0xb9, 0x71, 0x63, +0x06, 0xe6, 0xbc, 0x60, 0xbb, 0xf4, 0x9a, 0x62, 0x43, 0x09, 0x18, 0x4e, 0x93, 0x06, 0x4d, +0x76, 0xfa, 0x7f, 0xbd, 0x02, 0xe4, 0x50, 0x91, 0x12, 0xe5, 0x86, 0xff, 0x64, 0x1e, 0xaf, +0x7e, 0xb3, 0xb2, 0xde, 0x89, 0xc1, 0xa2, 0x6f, 0x40, 0x7b, 0x41, 0x51, 0x63, 0xea, 0x25, +0xd1, 0x97, 0x57, 0x92, 0xa8, 0x45, 0xa1, 0xa5, 0x45, 0x21, 0x43, 0x7f, 0x83, 0x15, 0x29, +0xd0, 0x30, 0x53, 0x32, 0xb4, 0x5a, 0x17, 0x96, 0xbc, 0xc2, 0x68, 0xa9, 0xb7, 0xaf, 0xac, +0xdf, 0xf1, 0xe3, 0x89, 0xba, 0x24, 0x79, 0x54, 0xc6, 0x14, 0x07, 0x1c, 0x1e, 0x0d, 0x3a, +0x6b, 0xe5, 0x3d, 0x4e, 0x10, 0x60, 0x96, 0xec, 0x6c, 0xda, 0x47, 0xae, 0x03, 0x25, 0x39, +0x1d, 0x74, 0xc8, 0xac, 0x6a, 0xf2, 0x6b, 0x05, 0x2a, 0x9a, 0xe7, 0xe8, 0x92, 0xd6, 0xc2, +0x6d, 0xfa, 0xe8, 0xa7, 0x9d, 0x5f, 0x48, 0xc9, 0x75, 0xf1, 0x66, 0x6a, 0xdb, 0x5d, 0x9a, +0xcd, 0x27, 0xdd, 0xb9, 0x24, 0x04, 0x9c, 0x18, 0xc2, 0x6d, 0x0c, 0x91, 0x34, 0x48, 0x42, +0x6f, 0xe9, 0x59, 0x70, 0xc4, 0x7e, 0x81, 0x0e, 0x32, 0x0a, 0x93, 0x48, 0xb0, 0xc0, 0x15, +0x9e, 0x05, 0xac, 0x36, 0x16, 0xcb, 0x59, 0x65, 0xa0, 0x83, 0xdf, 0x3e, 0xda, 0xfb, 0x1d, +0x1a, 0xdb, 0x65, 0xec, 0x9a, 0xc6, 0xc3, 0x8e, 0x3c, 0x45, 0xfd, 0xc8, 0xf5, 0x1c, 0x6a, +0x67, 0x0d, 0x8f, 0x99, 0x7d, 0x30, 0x21, 0x8c, 0xea, 0x22, 0x87, 0x65, 0xc9, 0xb2, 0x4c, +0xe4, 0x1b, 0x46, 0xba, 0x54, 0xbd, 0x7c, 0xca, 0xd5, 0x8f, 0x5b, 0xa5, 0x01, 0x04, 0xd8, +0x0a, 0x16, 0xbf, 0xb9, 0x50, 0x2e, 0x37, 0x2f, 0x64, 0xf3, 0x70, 0x11, 0x02, 0x05, 0x31, +0x9b, 0xa0, 0xb2, 0x01, 0x5e, 0x4f, 0x19, 0xc9, 0xd4, 0xea, 0xa1, 0x79, 0x54, 0x53, 0xa7, +0xde, 0x2f, 0x49, 0xd3, 0xd1, 0x63, 0xb5, 0x03, 0x15, 0x4e, 0xbf, 0x04, 0xb3, 0x26, 0x8b, +0x20, 0xb2, 0x45, 0xcf, 0xcd, 0x5b, 0x82, 0x32, 0x88, 0x61, 0xa7, 0xa8, 0xb2, 0xa0, 0x72, +0x96, 0xc0, 0xdb, 0x2b, 0xe2, 0x5f, 0xba, 0xe3, 0xf5, 0x8a, 0xde, 0xf1, 0x18, 0x01, 0x16, +0x40, 0xd9, 0x86, 0x12, 0x09, 0x18, 0x1b, 0x05, 0x0c, 0xb1, 0xb5, 0x47, 0xe2, 0x43, 0xab, +0xfe, 0x92, 0x63, 0x7e, 0x95, 0x2b, 0xf0, 0xaf, 0xe1, 0xf1, 0xc3, 0x4a, 0xff, 0x2b, 0x09, +0xbb, 0x4a, 0x0e, 0x9a, 0xc4, 0xd8, 0x64, 0x7d, 0x83, 0xa0, 0x4f, 0x44, 0xdb, 0xc4, 0xa8, +0x58, 0xef, 0xfc, 0x9e, 0x77, 0xf9, 0xa6, 0x8f, 0x58, 0x8b, 0x12, 0xf4, 0xe9, 0x81, 0x12, +0x47, 0x51, 0x41, 0x83, 0xef, 0xf6, 0x73, 0xbc, 0x8e, 0x0f, 0x4c, 0x8f, 0x4e, 0x69, 0x90, +0x77, 0x29, 0x5d, 0x92, 0xb0, 0x6d, 0x06, 0x67, 0x29, 0x60, 0xbd, 0x4b, 0x17, 0xc8, 0x89, +0x69, 0x28, 0x29, 0xd6, 0x78, 0xcb, 0x11, 0x4c, 0xba, 0x8b, 0x68, 0xae, 0x7e, 0x9f, 0xef, +0x95, 0xda, 0xe2, 0x9e, 0x7f, 0xe9, 0x55, 0xe5, 0xe1, 0xe2, 0xb7, 0xe6, 0x5f, 0xbb, 0x2c, +0xa2, 0xe6, 0xee, 0xc7, 0x0a, 0x60, 0xa9, 0xd1, 0x80, 0xdf, 0x7f, 0xd6, 0x97, 0xab, 0x1d, +0x22, 0x25, 0xfc, 0x79, 0x23, 0xe0, 0xae, 0xc5, 0xef, 0x16, 0xa4, 0xa1, 0x0f, 0x92, 0xa9, +0xc7, 0xe3, 0x3a, 0x55, 0xdf, 0x62, 0x49, 0xd9, 0xf5, 0x84, 0x49, 0xc5, 0x90, 0x34, 0xd3, +0xe1, 0xac, 0x99, 0x21, 0xb1, 0x02, 0x76, 0x4a, 0xfa, 0xd4, 0xbb, 0xa4, 0x9c, 0xa2, 0xe2, +0xcb, 0x3d, 0x3b, 0x14, 0x75, 0x60, 0xd1, 0x02, 0xb4, 0xa3, 0xb4, 0x72, 0x06, 0xf9, 0x19, +0x9c, 0xe2, 0xe4, 0xa7, 0x0f, 0x25, 0x88, 0xc6, 0x86, 0xd6, 0x8c, 0x74, 0x4e, 0x6e, 0xfc, +0xa8, 0x48, 0x9e, 0xa7, 0x9d, 0x1a, 0x4b, 0x37, 0x09, 0xc8, 0xb0, 0x10, 0xbe, 0x6f, 0xfe, +0xa3, 0xc4, 0x7a, 0xb5, 0x3d, 0xe8, 0x30, 0xf1, 0x0d, 0xa0, 0xb2, 0x44, 0xfc, 0x9b, 0x8c, +0xf8, 0x61, 0xed, 0x81, 0xd1, 0x62, 0x11, 0xb4, 0xe1, 0xd5, 0x39, 0x52, 0x89, 0xd3, 0xa8, +0x49, 0x31, 0xdf, 0xb6, 0xf9, 0x91, 0xf4, 0x1c, 0x9d, 0x09, 0x95, 0x40, 0x56, 0xe7, 0xe3, +0xcd, 0x5c, 0x92, 0xc1, 0x1d, 0x6b, 0xe9, 0x78, 0x6f, 0x8e, 0x94, 0x42, 0x66, 0xa2, 0xaa, +0xd3, 0xc8, 0x2e, 0xe3, 0xf6, 0x07, 0x72, 0x0b, 0x6b, 0x1e, 0x7b, 0xb9, 0x7c, 0xe0, 0xa0, +0xbc, 0xd9, 0x25, 0xdf, 0x87, 0xa8, 0x5f, 0x9c, 0xcc, 0xf0, 0xdb, 0x42, 0x8e, 0x07, 0x31, +0x13, 0x01, 0x66, 0x32, 0xd1, 0xb8, 0xd6, 0xe3, 0x5e, 0x12, 0x76, 0x61, 0xd3, 0x38, 0x89, +0xe6, 0x17, 0x6f, 0xa5, 0xf2, 0x71, 0x0e, 0xa5, 0xe2, 0x88, 0x30, 0xbb, 0xbe, 0x8a, 0xea, +0xc7, 0x62, 0xc4, 0xcf, 0xb8, 0xcd, 0x33, 0x8d, 0x3d, 0x3e, 0xb5, 0x60, 0x3a, 0x03, 0x92, +0xe4, 0x6d, 0x1b, 0xe0, 0xb4, 0x84, 0x08, 0x55, 0x88, 0xa7, 0x3a, 0xb9, 0x3d, 0x43, 0xc3, +0xc0, 0xfa, 0x07, 0x6a, 0xca, 0x94, 0xad, 0x99, 0x55, 0xf1, 0xf1, 0xc0, 0x23, 0x87, 0x1d, +0x3d, 0x1c, 0xd1, 0x66, 0xa0, 0x57, 0x10, 0x52, 0xa2, 0x7f, 0xbe, 0xf9, 0x88, 0xb6, 0x02, +0xbf, 0x08, 0x23, 0xa9, 0x0c, 0x63, 0x17, 0x2a, 0xae, 0xf5, 0xf7, 0xb7, 0x21, 0x83, 0x92, +0x31, 0x23, 0x0d, 0x20, 0xc3, 0xc2, 0x05, 0x21, 0x62, 0x8e, 0x45, 0xe8, 0x14, 0xc1, 0xda, +0x75, 0xb8, 0xf8, 0x92, 0x01, 0xd0, 0x5d, 0x18, 0x9f, 0x99, 0x11, 0x19, 0xf5, 0x35, 0xe8, +0x7f, 0x20, 0x88, 0x8c, 0x05, 0x75, 0xf5, 0xd7, 0x40, 0x17, 0xbb, 0x1e, 0x36, 0x52, 0xd9, +0xa4, 0x9c, 0xc2, 0x9d, 0x42, 0x81, 0xd8, 0xc7, 0x8a, 0xe7, 0x4c, 0x81, 0xe0, 0xb7, 0x57, +0xed, 0x48, 0x8b, 0xf0, 0x97, 0x15, 0x61, 0xd9, 0x2c, 0x7c, 0x45, 0xaf, 0xc2, 0xcd, 0xfc, +0xaa, 0x13, 0xad, 0x59, 0xcc, 0xb2, 0xb2, 0x6e, 0xdd, 0x63, 0x9c, 0x32, 0x0f, 0xec, 0x83, +0xbe, 0x78, 0xac, 0x91, 0x44, 0x1a, 0x1f, 0xea, 0xfd, 0x5d, 0x8e, 0xb4, 0xc0, 0x84, 0xd4, +0xac, 0xb4, 0x87, 0x5f, 0xac, 0xef, 0xdf, 0xcd, 0x12, 0x56, 0xc8, 0xcd, 0xfe, 0xc5, 0xda, +0xd3, 0xc1, 0x69, 0xf3, 0x61, 0x05, 0xea, 0x25, 0xe2, 0x12, 0x05, 0x8f, 0x39, 0x08, 0x08, +0x7c, 0x37, 0xb6, 0x7e, 0x5b, 0xd8, 0xb1, 0x0e, 0xf2, 0xdb, 0x4b, 0xf1, 0xad, 0x90, 0x01, +0x57, 0xcd, 0xa0, 0xb4, 0x52, 0xe8, 0xf3, 0xd7, 0x8a, 0xbd, 0x4f, 0x9f, 0x21, 0x40, 0x72, +0xa4, 0xfc, 0x0b, 0x01, 0x2b, 0x2f, 0xb6, 0x4c, 0x95, 0x2d, 0x35, 0x33, 0x41, 0x6b, 0xa0, +0x93, 0xe7, 0x2c, 0xf2, 0xd3, 0x72, 0x8b, 0xf4, 0x4f, 0x15, 0x3c, 0xaf, 0xd6, 0x12, 0xde, +0x3f, 0x83, 0x3f, 0xff, 0xf8, 0x7f, 0xf6, 0xcc, 0xa6, 0x7f, 0xc9, 0x9a, 0x6e, 0x1f, 0xc1, +0x0c, 0xfb, 0xee, 0x9c, 0xe7, 0xaf, 0xc9, 0x26, 0x54, 0xef, 0xb0, 0x39, 0xef, 0xb2, 0xe9, +0x23, 0xc4, 0xef, 0xd1, 0xa1, 0xa4, 0x25, 0x24, 0x6f, 0x8d, 0x6a, 0xe5, 0x8a, 0x32, 0x3a, +0xaf, 0xfc, 0xda, 0xce, 0x18, 0x25, 0x42, 0x07, 0x4d, 0x45, 0x8b, 0xdf, 0x85, 0xcf, 0x55, +0xb2, 0x24, 0xfe, 0x9c, 0x69, 0x74, 0xa7, 0x6e, 0xa0, 0xce, 0xc0, 0x39, 0xf4, 0x86, 0xc6, +0x8d, 0xae, 0xb9, 0x48, 0x64, 0x13, 0x0b, 0x40, 0x81, 0xa2, 0xc9, 0xa8, 0x85, 0x51, 0xee, +0x9f, 0xcf, 0xa2, 0x8c, 0x19, 0x52, 0x48, 0xe2, 0xc1, 0xa8, 0x58, 0xb4, 0x10, 0x24, 0x06, +0x58, 0x51, 0xfc, 0xb9, 0x12, 0xec, 0xfd, 0x73, 0xb4, 0x6d, 0x84, 0xfa, 0x06, 0x8b, 0x05, +0x0b, 0x2d, 0xd6, 0xd6, 0x1f, 0x29, 0x82, 0x9f, 0x19, 0x12, 0x1e, 0xb2, 0x04, 0x8f, 0x7f, +0x4d, 0xbd, 0x30, 0x2e, 0xe3, 0xe0, 0x88, 0x29, 0xc5, 0x93, 0xd6, 0x6c, 0x1f, 0x29, 0x45, +0x91, 0xa7, 0x58, 0xcd, 0x05, 0x17, 0xd6, 0x6d, 0xb3, 0xca, 0x66, 0xcc, 0x3c, 0x4a, 0x74, +0xfd, 0x08, 0x10, 0xa6, 0x99, 0x92, 0x10, 0xd2, 0x85, 0xab, 0x6e, 0x1d, 0x0e, 0x8b, 0x26, +0x46, 0xd1, 0x6c, 0x84, 0xc0, 0x26, 0x43, 0x59, 0x68, 0xf0, 0x13, 0x1d, 0xfb, 0xe3, 0xd1, +0xd2, 0xb4, 0x71, 0x9e, 0xf2, 0x59, 0x6a, 0x33, 0x29, 0x79, 0xd2, 0xd7, 0x26, 0xf1, 0xae, +0x78, 0x9e, 0x1f, 0x0f, 0x3f, 0xe3, 0xe8, 0xd0, 0x27, 0x78, 0x77, 0xf6, 0xac, 0x9c, 0x56, +0x39, 0x73, 0x8a, 0x6b, 0x2f, 0x34, 0x78, 0xb1, 0x11, 0xdb, 0xa4, 0x5c, 0x80, 0x01, 0x71, +0x6a, 0xc2, 0xd1, 0x2e, 0x5e, 0x76, 0x28, 0x70, 0x93, 0xae, 0x3e, 0x78, 0xb0, 0x1f, 0x0f, +0xda, 0xbf, 0xfb, 0x8a, 0x67, 0x65, 0x4f, 0x91, 0xed, 0x49, 0x75, 0x78, 0x62, 0xa2, 0x93, +0xb5, 0x70, 0x7f, 0x4d, 0x08, 0x4e, 0x79, 0x61, 0xa8, 0x5f, 0x7f, 0xb4, 0x65, 0x9f, 0x91, +0x54, 0x3a, 0xe8, 0x50, 0x33, 0xd3, 0xd5, 0x8a, 0x7c, 0xf3, 0x9e, 0x8b, 0x77, 0x7b, 0xc6, +0xc6, 0x0c, 0x45, 0x95, 0x1f, 0xb0, 0xd0, 0x0b, 0x27, 0x4a, 0xfd, 0xc7, 0xf7, 0x0d, 0x5a, +0x43, 0xc9, 0x7d, 0x35, 0xb0, 0x7d, 0xc4, 0x9c, 0x57, 0x1e, 0x76, 0x0d, 0xf1, 0x95, 0x30, +0x71, 0xcc, 0xb3, 0x66, 0x3b, 0x63, 0xa8, 0x6c, 0xa3, 0x43, 0xa0, 0x24, 0xcc, 0xb7, 0x53, +0xfe, 0xfe, 0xbc, 0x6e, 0x60, 0x89, 0xaf, 0x16, 0x21, 0xc8, 0x91, 0x6a, 0x89, 0xce, 0x80, +0x2c, 0xf1, 0x59, 0xce, 0xc3, 0x60, 0x61, 0x3b, 0x0b, 0x19, 0xfe, 0x99, 0xac, 0x65, 0x90, +0x15, 0x12, 0x05, 0xac, 0x7e, 0xff, 0x98, 0x7b, 0x66, 0x64, 0x0e, 0x4b, 0x5b, 0xaa, 0x8d, +0x3b, 0xd2, 0x56, 0xcf, 0x99, 0x39, 0xee, 0x22, 0x81, 0xd0, 0x60, 0x06, 0x66, 0x20, 0x81, +0x48, 0x3c, 0x6f, 0x3a, 0x77, 0xba, 0xcb, 0x52, 0xac, 0x79, 0x56, 0xaf, 0xe9, 0x16, 0x17, +0x0a, 0xa3, 0x82, 0x08, 0xd5, 0x3c, 0x97, 0xcb, 0x09, 0xff, 0x7f, 0xf9, 0x4f, 0x60, 0x05, +0xb9, 0x53, 0x26, 0xaa, 0xb8, 0x50, 0xaa, 0x19, 0x25, 0xae, 0x5f, 0xea, 0x8a, 0xd0, 0x89, +0x12, 0x80, 0x43, 0x50, 0x24, 0x12, 0x21, 0x14, 0xcd, 0x77, 0xeb, 0x21, 0xcc, 0x5c, 0x09, +0x64, 0xf3, 0xc7, 0xcb, 0xc5, 0x4b, 0xc3, 0xe7, 0xed, 0xe7, 0x86, 0x2c, 0x1d, 0x8e, 0x19, +0x52, 0x9b, 0x2a, 0x0c, 0x18, 0x72, 0x0b, 0x1e, 0x1b, 0xb0, 0x0f, 0x42, 0x99, 0x04, 0xae, +0xd5, 0xb7, 0x89, 0x1a, 0xb9, 0x4f, 0xd6, 0xaf, 0xf3, 0xc9, 0x93, 0x6f, 0xb0, 0x60, 0x83, +0x6e, 0x6b, 0xd1, 0x5f, 0x3f, 0x1a, 0x83, 0x1e, 0x24, 0x00, 0x87, 0xb5, 0x3e, 0xdb, 0xf9, +0x4d, 0xa7, 0x16, 0x2e, 0x19, 0x5b, 0x8f, 0x1b, 0x0d, 0x47, 0x72, 0x42, 0xe9, 0x0a, 0x11, +0x08, 0x2d, 0x88, 0x1c, 0xbc, 0xc7, 0xb4, 0xbe, 0x29, 0x4d, 0x03, 0x5e, 0xec, 0xdf, 0xf3, +0x3d, 0x2f, 0xe8, 0x1d, 0x9a, 0xd2, 0xd1, 0xab, 0x41, 0x3d, 0x87, 0x11, 0x45, 0xb0, 0x0d, +0x46, 0xf5, 0xe8, 0x95, 0x62, 0x1c, 0x68, 0xf7, 0xa6, 0x5b, 0x39, 0x4e, 0xbf, 0x47, 0xba, +0x5d, 0x7f, 0xb7, 0x6a, 0xf4, 0xba, 0x1d, 0x69, 0xf6, 0xa4, 0xe7, 0xe4, 0x6b, 0x3b, 0x0d, +0x23, 0x16, 0x4a, 0xb2, 0x68, 0xf0, 0xb2, 0x0d, 0x09, 0x17, 0x6a, 0x63, 0x8c, 0x83, 0xd3, +0xbd, 0x05, 0xc9, 0xf6, 0xf0, 0xa1, 0x31, 0x0b, 0x2c, 0xac, 0x83, 0xac, 0x80, 0x34, 0x32, +0xb4, 0xec, 0xd0, 0xbc, 0x54, 0x82, 0x9a, 0xc8, 0xf6, 0xa0, 0x7d, 0xc6, 0x79, 0x73, 0xf4, +0x20, 0x99, 0xf3, 0xb4, 0x01, 0xde, 0x91, 0x27, 0xf2, 0xc0, 0xdc, 0x81, 0x00, 0x4e, 0x7e, +0x07, 0x99, 0xc8, 0x3a, 0x51, 0xbc, 0x38, 0xd6, 0x8a, 0xa2, 0xde, 0x3b, 0x6a, 0x8c, 0x1a, +0x7c, 0x81, 0x0f, 0x3a, 0x1f, 0xe4, 0x05, 0x7b, 0x20, 0x35, 0x6b, 0xa5, 0x6a, 0xa7, 0xe7, +0xbc, 0x9c, 0x20, 0xec, 0x00, 0x15, 0xe2, 0x51, 0xaf, 0x77, 0xeb, 0x29, 0x3c, 0x7d, 0x2e, +0x00, 0x5c, 0x81, 0x21, 0xfa, 0x35, 0x6f, 0x40, 0xef, 0xfb, 0xd1, 0x3f, 0xcc, 0x9d, 0x55, +0x53, 0xfb, 0x5a, 0xa5, 0x56, 0x89, 0x0b, 0x52, 0xeb, 0x57, 0x73, 0x4f, 0x1b, 0x67, 0x24, +0xcb, 0xb8, 0x6a, 0x10, 0x69, 0xd6, 0xfb, 0x52, 0x40, 0xff, 0x20, 0xa5, 0xf3, 0x72, 0xe1, +0x3d, 0xa4, 0x8c, 0x81, 0x66, 0x16, 0x0d, 0x5d, 0xad, 0xa8, 0x50, 0x25, 0x78, 0x31, 0x77, +0x0c, 0x57, 0xe4, 0xe9, 0x15, 0x2d, 0xdb, 0x07, 0x87, 0xc8, 0xb0, 0x43, 0xde, 0xfc, 0xfe, +0xa9, 0xeb, 0xf5, 0xb0, 0xd3, 0x7b, 0xe9, 0x1f, 0x6e, 0xca, 0xe4, 0x03, 0x95, 0xc5, 0xd1, +0x59, 0x72, 0x63, 0xf0, 0x86, 0x54, 0xe8, 0x16, 0x62, 0x0b, 0x35, 0x29, 0xc2, 0x68, 0xd0, +0xd6, 0x3e, 0x90, 0x60, 0x57, 0x1d, 0xc9, 0xed, 0x3f, 0xed, 0xb0, 0x2f, 0x7e, 0x97, 0x02, +0x51, 0xec, 0xee, 0x6f, 0x82, 0x74, 0x76, 0x7f, 0xfb, 0xd6, 0xc4, 0xc3, 0xdd, 0xe8, 0xb1, +0x60, 0xfc, 0xc6, 0xb9, 0x0d, 0x6a, 0x33, 0x78, 0xc6, 0xc1, 0xbf, 0x86, 0x2c, 0x50, 0xcc, +0x9a, 0x70, 0x8e, 0x7b, 0xec, 0xab, 0x95, 0xac, 0x53, 0xa0, 0x4b, 0x07, 0x88, 0xaf, 0x42, +0xed, 0x19, 0x8d, 0xf6, 0x32, 0x17, 0x48, 0x47, 0x1d, 0x41, 0x6f, 0xfe, 0x2e, 0xa7, 0x8f, +0x4b, 0xa0, 0x51, 0xf3, 0xbf, 0x02, 0x0a, 0x48, 0x58, 0xf7, 0xa1, 0x6d, 0xea, 0xa5, 0x13, +0x5a, 0x5b, 0xea, 0x0c, 0x9e, 0x52, 0x4f, 0x9e, 0xb9, 0x71, 0x7f, 0x23, 0x83, 0xda, 0x1b, +0x86, 0x9a, 0x41, 0x29, 0xda, 0x70, 0xe7, 0x64, 0xa1, 0x7b, 0xd5, 0x0a, 0x22, 0x0d, 0x5c, +0x40, 0xc4, 0x81, 0x07, 0x25, 0x35, 0x4a, 0x1c, 0x10, 0xdb, 0x45, 0x0a, 0xff, 0x36, 0xd4, +0xe0, 0xeb, 0x5f, 0x68, 0xd6, 0x67, 0xc6, 0xd0, 0x8b, 0x76, 0x1a, 0x7d, 0x59, 0x42, 0xa1, +0xcb, 0x96, 0x4d, 0x84, 0x09, 0x9a, 0x3d, 0xe0, 0x52, 0x85, 0x6e, 0x48, 0x90, 0x85, 0x2a, +0x63, 0xb2, 0x69, 0xd2, 0x00, 0x43, 0x31, 0x37, 0xb3, 0x52, 0xaf, 0x62, 0xfa, 0xc1, 0xe0, +0x03, 0xfb, 0x62, 0xaa, 0x88, 0xc9, 0xb2, 0x2c, 0xd5, 0xa8, 0xf5, 0xa5, 0x4c, 0x12, 0x59, +0x4e, 0x06, 0x5e, 0x9b, 0x15, 0x66, 0x11, 0xb2, 0x27, 0x92, 0xdc, 0x98, 0x59, 0xde, 0xdf, +0xfa, 0x9a, 0x32, 0x2e, 0xc0, 0x5d, 0x3c, 0x33, 0x41, 0x6d, 0xaf, 0xb2, 0x25, 0x23, 0x14, +0xa5, 0x7b, 0xc7, 0x9b, 0x68, 0xf3, 0xda, 0xeb, 0xe3, 0xa9, 0xe2, 0x6f, 0x0e, 0x1d, 0x1c, +0xba, 0x55, 0xb6, 0x34, 0x6a, 0x93, 0x1f, 0x1f, 0xb8, 0x34, 0xc8, 0x84, 0x08, 0xb1, 0x6b, +0x6a, 0x28, 0x74, 0x74, 0xe5, 0xeb, 0x75, 0xe9, 0x7c, 0xd8, 0xba, 0xd8, 0x42, 0xa5, 0xee, +0x1f, 0x80, 0xd9, 0x96, 0xb2, 0x2e, 0xe7, 0xbf, 0xba, 0xeb, 0xd1, 0x69, 0xbb, 0x8f, 0xfd, +0x5a, 0x63, 0x8f, 0x39, 0x7f, 0xdf, 0x1d, 0x37, 0xd2, 0x18, 0x35, 0x9d, 0xb6, 0xcc, 0xe4, +0x27, 0x81, 0x89, 0x38, 0x38, 0x68, 0x33, 0xe7, 0x78, 0xd8, 0x76, 0xf5, 0xee, 0xd0, 0x4a, +0x07, 0x69, 0x19, 0x7a, 0xad, 0x18, 0xb1, 0x94, 0x61, 0x45, 0x53, 0xa2, 0x48, 0xda, 0x96, +0x4a, 0xf9, 0xee, 0x94, 0x2a, 0x1f, 0x6e, 0x18, 0x3c, 0x92, 0x46, 0xd1, 0x1a, 0x28, 0x18, +0x32, 0x1f, 0x3a, 0x45, 0xbe, 0x04, 0x35, 0x92, 0xe5, 0xa3, 0xcb, 0xb5, 0x2e, 0x32, 0x43, +0xac, 0x65, 0x17, 0x89, 0x99, 0x15, 0x03, 0x9e, 0xb1, 0x23, 0x2f, 0xed, 0x76, 0x4d, 0xd8, +0xac, 0x21, 0x40, 0xc4, 0x99, 0x4e, 0x65, 0x71, 0x2c, 0xb3, 0x45, 0xab, 0xfb, 0xe7, 0x72, +0x39, 0x56, 0x30, 0x6d, 0xfb, 0x74, 0xeb, 0x99, 0xf3, 0xcd, 0x57, 0x5c, 0x78, 0x75, 0xe9, +0x8d, 0xc3, 0xa2, 0xfb, 0x5d, 0xe0, 0x90, 0xc5, 0x55, 0xad, 0x91, 0x53, 0x4e, 0x9e, 0xbd, +0x8c, 0x49, 0xa4, 0xa4, 0x69, 0x10, 0x0c, 0xc5, 0x76, 0xe9, 0x25, 0x86, 0x8d, 0x66, 0x23, +0xa8, 0xdb, 0x5c, 0xe8, 0xd9, 0x30, 0xe1, 0x15, 0x7b, 0xc0, 0x99, 0x0f, 0x03, 0xec, 0xaa, +0x12, 0xef, 0xce, 0xd4, 0xea, 0x55, 0x5c, 0x08, 0x86, 0xf4, 0xf4, 0xb0, 0x83, 0x42, 0x95, +0x37, 0xb6, 0x38, 0xe0, 0x2b, 0x54, 0x89, 0xbd, 0x4e, 0x20, 0x9d, 0x3f, 0xc3, 0x4b, 0xb7, +0xec, 0xfa, 0x5a, 0x14, 0x03, 0xcb, 0x64, 0xc8, 0x34, 0x4a, 0x4b, 0x6e, 0xf8, 0x6e, 0x56, +0xf6, 0xdd, 0x5f, 0xa1, 0x24, 0xe2, 0xd4, 0xd0, 0x82, 0x64, 0x1f, 0x8e, 0x9b, 0xfa, 0xb4, +0xcb, 0xdb, 0x0a, 0xe8, 0x15, 0xfc, 0x15, 0xab, 0x4b, 0x18, 0xbf, 0xd4, 0x42, 0x14, 0x48, +0x82, 0x85, 0xdd, 0xeb, 0x49, 0x1b, 0x0b, 0x0b, 0x05, 0xe9, 0xb4, 0xa1, 0x33, 0x0a, 0x5d, +0x0e, 0x6c, 0x4b, 0xc0, 0xd6, 0x6c, 0x7c, 0xfb, 0x69, 0x0b, 0x53, 0x19, 0xe4, 0xf3, 0x35, +0xfc, 0xbe, 0xa1, 0x34, 0x02, 0x09, 0x4f, 0x74, 0x86, 0x92, 0xcd, 0x5d, 0x1a, 0xc1, 0x27, +0x0c, 0xf2, 0xc5, 0xcf, 0xdd, 0x23, 0x93, 0x02, 0xbd, 0x41, 0x5e, 0x42, 0xf0, 0xa0, 0x9d, +0x0c, 0x72, 0xc8, 0xec, 0x32, 0x0a, 0x8a, 0xfd, 0x3d, 0x5a, 0x41, 0x27, 0x0c, 0x88, 0x59, +0xad, 0x94, 0x2e, 0xef, 0x5d, 0x8f, 0xc7, 0xdf, 0x66, 0xe4, 0xdd, 0x56, 0x6c, 0x7b, 0xca, +0x55, 0x81, 0xae, 0xae, 0x5c, 0x1b, 0x1a, 0xab, 0xae, 0x99, 0x8d, 0xcc, 0x42, 0x97, 0x59, +0xf4, 0x14, 0x3f, 0x75, 0xc6, 0xd1, 0x88, 0xba, 0xaa, 0x84, 0x4a, 0xd0, 0x34, 0x08, 0x3b, +0x7d, 0xdb, 0x15, 0x06, 0xb0, 0x5c, 0xbd, 0x40, 0xf5, 0xa8, 0xec, 0xae, 0x36, 0x40, 0xdd, +0x90, 0x1c, 0x3e, 0x0d, 0x7e, 0x73, 0xc7, 0xc2, 0xc5, 0x6a, 0xff, 0x52, 0x05, 0x7f, 0xbe, +0xd0, 0x92, 0xfd, 0xb3, 0x6f, 0xff, 0x5d, 0xb7, 0x97, 0x64, 0x73, 0x7b, 0xca, 0xd1, 0x98, +0x24, 0x6b, 0x0b, 0x01, 0x68, 0xdd, 0x27, 0x85, 0x85, 0xb5, 0x83, 0xc1, 0xe0, 0x50, 0x64, +0xc7, 0xaf, 0xf1, 0xc6, 0x4d, 0xb1, 0xef, 0xc9, 0xb4, 0x0a, 0x6d, 0x65, 0xf3, 0x47, 0xcc, +0xa3, 0x02, 0x21, 0x0c, 0xbe, 0x22, 0x29, 0x05, 0xcf, 0x5f, 0xe8, 0x94, 0x6c, 0xe5, 0xdc, +0xc4, 0xdf, 0xbe, 0x3e, 0xa8, 0xb4, 0x18, 0xb0, 0x99, 0xb8, 0x6f, 0xff, 0x5d, 0xb9, 0xfd, +0x3b, 0x5d, 0x16, 0xbf, 0x3e, 0xd8, 0xb3, 0xd8, 0x08, 0x34, 0xf6, 0x47, 0x35, 0x5b, 0x72, +0x1a, 0x33, 0xad, 0x52, 0x5d, 0xb8, 0xd0, 0x77, 0xc6, 0xab, 0xba, 0x55, 0x09, 0x5f, 0x02, +0xf8, 0xd4, 0x5f, 0x53, 0x06, 0x91, 0xcd, 0x74, 0x42, 0xae, 0x54, 0x91, 0x81, 0x62, 0x13, +0x6f, 0xd8, 0xa9, 0x77, 0xc3, 0x6c, 0xcb, 0xf1, 0x29, 0x5a, 0xcc, 0xda, 0x35, 0xbd, 0x52, +0x23, 0xbe, 0x59, 0xeb, 0x12, 0x6d, 0xb7, 0x53, 0xee, 0xfc, 0xb4, 0x1b, 0x13, 0x5e, 0xba, +0x16, 0x7c, 0xc5, 0xf3, 0xe3, 0x6d, 0x07, 0x78, 0xf5, 0x2b, 0x21, 0x05, 0x88, 0x4c, 0xc0, +0xa1, 0xe3, 0x36, 0x10, 0xf8, 0x1b, 0xd8, 0x17, 0xfb, 0x6a, 0x4e, 0xd8, 0xb3, 0x47, 0x2d, +0x99, 0xbd, 0xbb, 0x5d, 0x37, 0x7d, 0xba, 0xf1, 0xe1, 0x7c, 0xc0, 0xc5, 0x54, 0x62, 0x7f, +0xcf, 0x5a, 0x4a, 0x93, 0xcc, 0xf1, 0x1b, 0x34, 0xc8, 0xa6, 0x05, 0x4c, 0x55, 0x8b, 0x54, +0x84, 0xd5, 0x77, 0xeb, 0xc0, 0x6d, 0x3a, 0x29, 0xbd, 0x75, 0x61, 0x09, 0x9a, 0x2c, 0xbb, +0xf7, 0x18, 0x79, 0x34, 0x90, 0x24, 0xa5, 0x81, 0x70, 0x87, 0xc5, 0x02, 0x7c, 0xba, 0xd4, +0x5e, 0x14, 0x8e, 0xe4, 0xed, 0xa2, 0x61, 0x6a, 0xb9, 0x6e, 0xb5, 0x4a, 0xb9, 0x01, 0x46, +0xf4, 0xcf, 0xbc, 0x09, 0x2f, 0x27, 0x4b, 0xbd, 0x86, 0x7a, 0x10, 0xe1, 0xd4, 0xc8, 0xd9, +0x20, 0x8d, 0x8a, 0x63, 0x00, 0x63, 0x44, 0xeb, 0x54, 0x0b, 0x75, 0x49, 0x10, 0xa2, 0xa7, +0xad, 0xb9, 0xd1, 0x01, 0x80, 0x63, 0x25, 0xc8, 0x12, 0xa6, 0xce, 0x1e, 0xbe, 0xfe, 0x7e, +0x5f, 0x3c, 0xdb, 0x34, 0xea, 0x37, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x8c, 0x9a, 0xb6, +0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x1b, 0xb4, 0xea, 0x56, +0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xd6, 0x2e, 0xde, 0x1f, 0x9d, +0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x66, 0x4e, 0x1e, 0x9f, 0x9d, 0xb8, 0xf2, 0x47, +0x0c, 0x9a, 0xb6, 0xee, 0x3f, 0xfc, 0x7a, 0x57, 0x0d, 0x79, 0x70, 0x62, 0x27, 0xad, 0xb9, +0xd1, 0x01, 0x61, 0x40, 0x02, 0x67, 0x2d, 0xd8, 0x32, 0xe6, 0x2f, 0xdc, 0x3a, 0xd7, 0x2c, +0xbb, 0xf4, 0x4b, 0xf5, 0x49, 0xf1, 0x60, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x01, +0x80, 0x63, 0x25, 0xa9, 0xb1, 0xe0, 0x42, 0xe7, 0x4c, 0x1a, 0x97, 0xac, 0xbb, 0xf4, 0x6a, +0x37, 0xcd, 0x18, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0xa8, 0xd2, 0x07, 0x6d, 0x58, 0x32, +0xe6, 0x4e, 0x1e, 0x9f, 0xbc, 0xfa, 0x57, 0x0d, 0x79, 0x51, 0x20, 0xc2, 0x06, 0x6f, 0x5c, +0x1b, 0x95, 0xa8, 0xb3, 0xc5, 0xe9, 0x31, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, +0x85, 0x69, 0x31, 0xc1, 0xe1, 0x21, 0xc0, 0xe3, 0x44, 0x0a, 0x77, 0x6c, 0x5a, 0x17, 0x8d, +0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x17, 0xac, 0xbb, 0xf4, 0x4b, 0x14, +0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xb3, 0xc5, 0xe9, 0x31, 0xc1, 0x00, 0x82, 0x67, 0x4c, +0xfb, 0x55, 0x28, 0xd2, 0x26, 0xaf, 0xbd, 0xd9, 0x11, 0x81, 0x61, 0x21, 0xa1, 0xa1, 0xc0, +0x02, 0x86, 0x6f, 0x5c, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xdd, +0x19, 0xb0, 0xe2, 0x46, 0x0e, 0x7f, 0x7c, 0x5b, 0x15, 0x89, 0x90, 0x83, 0x84, 0x6b, 0x54, +0x0b, 0x75, 0x68, 0x52, 0x07, 0x6d, 0x58, 0x32, 0xc7, 0xed, 0x58, 0x32, 0xc7, 0xed, 0x58, +0x32, 0xe6, 0x4e, 0xff, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xdd, 0x38, 0xd3, 0x05, 0x88, 0x92, +0xa6, 0xaf, 0xdc, 0x1b, 0xb4, 0xcb, 0xf5, 0x68, 0x52, 0x07, 0x8c, 0x7b, 0x55, 0x09, 0x90, +0x83, 0x84, 0x6b, 0x54, 0x2a, 0xb7, 0xec, 0x3b, 0xd5, 0x09, 0x90, 0xa2, 0xc6, 0x0e, 0x7f, +0x7c, 0x7a, 0x57, 0x0d, 0x98, 0xb2, 0xc7, 0xed, 0x58, 0x32, 0xc7, 0x0c, 0x7b, 0x74, 0x4b, +0x14, 0x8b, 0x94, 0xaa, 0xb7, 0xcd, 0x18, 0x93, 0xa4, 0xca, 0x16, 0xae, 0xbf, 0xdd, 0x19, +0xb0, 0xe2, 0x46, 0x0e, 0x7f, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x63, 0x44, 0xeb, 0x35, 0xc9, +0x10, 0x83, 0x65, 0x48, 0x12, 0xa6, 0xce, 0x1e, 0x9f, 0xbc, 0xdb, 0x15, 0x89, 0x71, 0x60, +0x23, 0xc4, 0xeb, 0x54, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xcf, 0x81, 0x10, 0xac, 0x74 }; + +// clang-format off diff --git a/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h b/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h deleted file mode 100644 index 0755ddf6c4f..00000000000 --- a/drivers/ugfx/gdisp/is31fl3731c/board_is31fl3731c_template.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -Copyright 2016 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 . -*/ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -static const I2CConfig i2ccfg = { - 400000 // clock speed (Hz); 400kHz max for IS31 -}; - -static const uint8_t led_mask[] = { - 0xFF, 0x00, /* C1-1 -> C1-16 */ - 0xFF, 0x00, /* C2-1 -> C2-16 */ - 0xFF, 0x00, /* C3-1 -> C3-16 */ - 0xFF, 0x00, /* C4-1 -> C4-16 */ - 0x3F, 0x00, /* C5-1 -> C5-16 */ - 0x00, 0x00, /* C6-1 -> C6-16 */ - 0x00, 0x00, /* C7-1 -> C7-16 */ - 0x00, 0x00, /* C8-1 -> C8-16 */ - 0x00, 0x00, /* C9-1 -> C9-16 */ -}; - -// The address of the LED -#define LA(c, r) (c + r * 16) -// Need to be an address that is not mapped, but inside the range of the controller matrix -#define NA LA(8, 8) - -// The numbers in the comments are the led numbers DXX on the PCB -// The mapping is taken from the schematic of left hand side -static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = { - // 45 44 43 42 41 40 39 - {LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, - // 52 51 50 49 48 47 46 - {LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2)}, - // 58 57 56 55 54 53 N/A - {LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA}, - // 67 66 65 64 63 62 61 - {LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2)}, - // 76 75 74 73 72 60 59 - {LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0)}, - // N/A N/A N/A N/A N/A N/A 68 - {NA, NA, NA, NA, NA, NA, LA(5, 4)}, - // N/A N/A N/A N/A 71 70 69 - {NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0)}, -}; - -#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND -#define IS31_TIMEOUT 5000 - -static GFXINLINE void init_board(GDisplay* g) { - (void)g; - /* I2C pins */ - palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL - palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA - palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); - palClearPad(GPIOB, 16); - /* start I2C */ - i2cStart(&I2CD1, &i2ccfg); - // try high drive (from kiibohd) - I2CD1.i2c->C2 |= I2Cx_C2_HDRS; - // try glitch fixing (from kiibohd) - I2CD1.i2c->FLT = 4; -} - -static GFXINLINE void post_init_board(GDisplay* g) { (void)g; } - -static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) { - (void)g; - return led_mask; -} - -static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) { - (void)g; - return led_mapping[y][x]; -} - -static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { - (void)g; - if (!shutdown) { - palSetPad(GPIOB, 16); - } else { - palClearPad(GPIOB, 16); - } -} - -static GFXINLINE void write_data(GDisplay* g, uint8_t* data, uint16_t length) { - (void)g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, US2ST(IS31_TIMEOUT)); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/drivers/ugfx/gdisp/is31fl3731c/driver.mk b/drivers/ugfx/gdisp/is31fl3731c/driver.mk deleted file mode 100644 index a53131bf33b..00000000000 --- a/drivers/ugfx/gdisp/is31fl3731c/driver.mk +++ /dev/null @@ -1,3 +0,0 @@ -GFXINC += drivers/ugfx/gdisp/is31fl3731c -GFXSRC += drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c -GDISP_DRIVER_LIST += GDISPVMT_IS31FL3731C_QMK diff --git a/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c b/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c deleted file mode 100644 index 71882440222..00000000000 --- a/drivers/ugfx/gdisp/is31fl3731c/gdisp_is31fl3731c.c +++ /dev/null @@ -1,302 +0,0 @@ -/* -Copyright 2016 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 . -*/ - -#include "gfx.h" - -#if GFX_USE_GDISP - -# define GDISP_DRIVER_VMT GDISPVMT_IS31FL3731C_QMK -# define GDISP_SCREEN_HEIGHT LED_HEIGHT -# define GDISP_SCREEN_WIDTH LED_WIDTH - -# include "gdisp_lld_config.h" -# include "src/gdisp/gdisp_driver.h" - -# include "board_is31fl3731c.h" - -// Can't include led_tables from here -extern const uint8_t CIE1931_CURVE[]; - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -# ifndef GDISP_INITIAL_CONTRAST -# define GDISP_INITIAL_CONTRAST 0 -# endif -# ifndef GDISP_INITIAL_BACKLIGHT -# define GDISP_INITIAL_BACKLIGHT 0 -# endif - -# define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0) - -# define IS31_ADDR_DEFAULT 0x74 - -# define IS31_REG_CONFIG 0x00 -// bits in reg -# define IS31_REG_CONFIG_PICTUREMODE 0x00 -# define IS31_REG_CONFIG_AUTOPLAYMODE 0x08 -# define IS31_REG_CONFIG_AUDIOPLAYMODE 0x18 -// D2:D0 bits are starting frame for autoplay mode - -# define IS31_REG_PICTDISP 0x01 // D2:D0 frame select for picture mode - -# define IS31_REG_AUTOPLAYCTRL1 0x02 -// D6:D4 number of loops (000=infty) -// D2:D0 number of frames to be used - -# define IS31_REG_AUTOPLAYCTRL2 0x03 // D5:D0 delay time (*11ms) - -# define IS31_REG_DISPLAYOPT 0x05 -# define IS31_REG_DISPLAYOPT_INTENSITY_SAME 0x20 // same intensity for all frames -# define IS31_REG_DISPLAYOPT_BLINK_ENABLE 0x8 -// D2:D0 bits blink period time (*0.27s) - -# define IS31_REG_AUDIOSYNC 0x06 -# define IS31_REG_AUDIOSYNC_ENABLE 0x1 - -# define IS31_REG_FRAMESTATE 0x07 - -# define IS31_REG_BREATHCTRL1 0x08 -// D6:D4 fade out time (26ms*2^i) -// D2:D0 fade in time (26ms*2^i) - -# define IS31_REG_BREATHCTRL2 0x09 -# define IS31_REG_BREATHCTRL2_ENABLE 0x10 -// D2:D0 extinguish time (3.5ms*2^i) - -# define IS31_REG_SHUTDOWN 0x0A -# define IS31_REG_SHUTDOWN_OFF 0x0 -# define IS31_REG_SHUTDOWN_ON 0x1 - -# define IS31_REG_AGCCTRL 0x0B -# define IS31_REG_ADCRATE 0x0C - -# define IS31_COMMANDREGISTER 0xFD -# define IS31_FUNCTIONREG 0x0B // helpfully called 'page nine' -# define IS31_FUNCTIONREG_SIZE 0xD - -# define IS31_FRAME_SIZE 0xB4 - -# define IS31_PWM_REG 0x24 -# define IS31_PWM_SIZE 0x90 - -# define IS31_LED_MASK_SIZE 0x12 - -# define IS31 - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -typedef struct { - uint8_t write_buffer_offset; - uint8_t write_buffer[IS31_FRAME_SIZE]; - uint8_t frame_buffer[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH]; - uint8_t page; -} __attribute__((__packed__)) PrivData; - -// Some common routines and macros -# define PRIV(g) ((PrivData *)g->priv) - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -static GFXINLINE void write_page(GDisplay *g, uint8_t page) { - uint8_t tx[2] __attribute__((aligned(2))); - tx[0] = IS31_COMMANDREGISTER; - tx[1] = page; - write_data(g, tx, 2); -} - -static GFXINLINE void write_register(GDisplay *g, uint8_t page, uint8_t reg, uint8_t data) { - uint8_t tx[2] __attribute__((aligned(2))); - tx[0] = reg; - tx[1] = data; - write_page(g, page); - write_data(g, tx, 2); -} - -static GFXINLINE void write_ram(GDisplay *g, uint8_t page, uint16_t offset, uint16_t length) { - PRIV(g)->write_buffer_offset = offset; - write_page(g, page); - write_data(g, (uint8_t *)PRIV(g), length + 1); -} - -LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { - // The private area is the display surface. - g->priv = gfxAlloc(sizeof(PrivData)); - __builtin_memset(PRIV(g), 0, sizeof(PrivData)); - PRIV(g)->page = 0; - - // Initialise the board interface - init_board(g); - gfxSleepMilliseconds(10); - - // zero function page, all registers (assuming full_page is all zeroes) - write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); - set_hardware_shutdown(g, false); - gfxSleepMilliseconds(10); - // software shutdown - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - gfxSleepMilliseconds(10); - // zero function page, all registers - write_ram(g, IS31_FUNCTIONREG, 0, IS31_FUNCTIONREG_SIZE); - gfxSleepMilliseconds(10); - - // zero all LED registers on all 8 pages, and enable the mask - __builtin_memcpy(PRIV(g)->write_buffer, get_led_mask(g), IS31_LED_MASK_SIZE); - for (uint8_t i = 0; i < 8; i++) { - write_ram(g, i, 0, IS31_FRAME_SIZE); - gfxSleepMilliseconds(1); - } - - // software shutdown disable (i.e. turn stuff on) - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - gfxSleepMilliseconds(10); - - // Finish Init - post_init_board(g); - - /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; - return TRUE; -} - -# if GDISP_HARDWARE_FLUSH -LLDSPEC void gdisp_lld_flush(GDisplay *g) { - // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; - - PRIV(g)->page++; - PRIV(g)->page %= 2; - // TODO: some smarter algorithm for this - // We should run only one physical page at a time - // This way we don't need to send so much data, and - // we could use slightly less memory - uint8_t *src = PRIV(g)->frame_buffer; - for (int y = 0; y < GDISP_SCREEN_HEIGHT; y++) { - for (int x = 0; x < GDISP_SCREEN_WIDTH; x++) { - uint8_t val = (uint16_t)*src * g->g.Backlight / 100; - PRIV(g)->write_buffer[get_led_address(g, x, y)] = CIE1931_CURVE[val]; - ++src; - } - } - write_ram(g, PRIV(g)->page, IS31_PWM_REG, IS31_PWM_SIZE); - gfxSleepMilliseconds(1); - write_register(g, IS31_FUNCTIONREG, IS31_REG_PICTDISP, PRIV(g)->page); - - g->flags &= ~GDISP_FLG_NEEDFLUSH; -} -# endif - -# if GDISP_HARDWARE_DRAWPIXEL -LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; - - switch (g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH - 1 - g->p.x; - y = g->p.y; - break; - } - PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x] = gdispColor2Native(g->p.color); - g->flags |= GDISP_FLG_NEEDFLUSH; -} -# endif - -# if GDISP_HARDWARE_PIXELREAD -LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; - - switch (g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH - 1 - g->p.x; - y = g->p.y; - break; - } - return gdispNative2Color(PRIV(g)->frame_buffer[y * GDISP_SCREEN_WIDTH + x]); -} -# endif - -# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL -LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch (g->p.x) { - case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) return; - switch ((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_OFF); - break; - case powerOn: - write_register(g, IS31_FUNCTIONREG, IS31_REG_SHUTDOWN, IS31_REG_SHUTDOWN_ON); - break; - default: - return; - } - g->g.Powermode = (powermode_t)g->p.ptr; - return; - - case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) return; - switch ((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; - } - g->g.Orientation = (orientation_t)g->p.ptr; - return; - - case GDISP_CONTROL_BACKLIGHT: - if (g->g.Backlight == (unsigned)g->p.ptr) return; - unsigned val = (unsigned)g->p.ptr; - g->g.Backlight = val > 100 ? 100 : val; - g->flags |= GDISP_FLG_NEEDFLUSH; - return; - } -} -# endif // GDISP_NEED_CONTROL - -#endif // GFX_USE_GDISP diff --git a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h b/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h deleted file mode 100644 index 403c6b0409c..00000000000 --- a/drivers/ugfx/gdisp/is31fl3731c/gdisp_lld_config.h +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2016 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 . -*/ - -#ifndef _GDISP_LLD_CONFIG_H -#define _GDISP_LLD_CONFIG_H - -#if GFX_USE_GDISP - -/*===========================================================================*/ -/* Driver hardware support. */ -/*===========================================================================*/ - -# define GDISP_HARDWARE_FLUSH GFXON // This controller requires flushing -# define GDISP_HARDWARE_DRAWPIXEL GFXON -# define GDISP_HARDWARE_PIXELREAD GFXON -# define GDISP_HARDWARE_CONTROL GFXON - -# define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_GRAY256 - -#endif /* GFX_USE_GDISP */ - -#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/drivers/ugfx/gdisp/st7565/board_st7565_template.h b/drivers/ugfx/gdisp/st7565/board_st7565_template.h deleted file mode 100644 index 875ed9e65c6..00000000000 --- a/drivers/ugfx/gdisp/st7565/board_st7565_template.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -#include "quantum.h" - -#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 -#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC -#define ST7565_PAGE_ORDER 0, 1, 2, 3 -/* - * Custom page order for several LCD boards, e.g. HEM12864-99 - * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 - */ - -#define ST7565_A0_PIN C7 -#define ST7565_RST_PIN C8 -#define ST7565_MOSI_PIN C6 -#define ST7565_SCLK_PIN C5 -#define ST7565_SS_PIN C4 - -// DSPI Clock and Transfer Attributes -// Frame Size: 8 bits -// MSB First -// CLK Low by default -static const SPIConfig spi1config = { - // Operation complete callback or @p NULL. - .end_cb = NULL, - // The chip select line port - when not using pcs. - .ssport = PAL_PORT(ST7565_SS_PIN), - // brief The chip select line pad number - when not using pcs. - .sspad = PAL_PAD(ST7565_SS_PIN), - // SPI initialization data. - .tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes - | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns - | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns - | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns - | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 - | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns -}; - -static GFXINLINE void acquire_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to acquire - // spiAcquireBus(&SPID1); - spiSelect(&SPID1); -} - -static GFXINLINE void release_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to release - // spiReleaseBus(&SPID1); - spiUnselect(&SPID1); -} - -static GFXINLINE void init_board(GDisplay *g) { - (void)g; - setPinOutput(ST7565_A0_PIN); - writePinHigh(ST7565_A0_PIN); - setPinOutput(ST7565_RST_PIN); - writePinHigh(ST7565_RST_PIN); - setPinOutput(ST7565_SS_PIN); - - palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2); - palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2); - - spiInit(); - spiStart(&SPID1, &spi1config); - release_bus(g); -} - -static GFXINLINE void post_init_board(GDisplay *g) { (void)g; } - -static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { - (void)g; - writePin(ST7565_RST_PIN, !state); -} - -static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) { - (void)g; - writePinLow(ST7565_A0_PIN); - spiSend(&SPID1, 1, &cmd); -} - -static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) { - (void)g; - writePinHigh(ST7565_A0_PIN); - spiSend(&SPID1, length, data); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/drivers/ugfx/gdisp/st7565/driver.mk b/drivers/ugfx/gdisp/st7565/driver.mk deleted file mode 100644 index 799a986b0a8..00000000000 --- a/drivers/ugfx/gdisp/st7565/driver.mk +++ /dev/null @@ -1,3 +0,0 @@ -GFXINC += drivers/ugfx/gdisp/st7565 -GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c -GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK diff --git a/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c b/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c deleted file mode 100644 index f586f97e385..00000000000 --- a/drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c +++ /dev/null @@ -1,314 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#include "gfx.h" - -#if GFX_USE_GDISP - -# define GDISP_DRIVER_VMT GDISPVMT_ST7565_QMK -# include "gdisp_lld_config.h" -# include "src/gdisp/gdisp_driver.h" - -# include "board_st7565.h" - -/*===========================================================================*/ -/* Driver local definitions. */ -/*===========================================================================*/ - -# ifndef GDISP_SCREEN_HEIGHT -# define GDISP_SCREEN_HEIGHT LCD_HEIGHT -# endif -# ifndef GDISP_SCREEN_WIDTH -# define GDISP_SCREEN_WIDTH LCD_WIDTH -# endif -# ifndef GDISP_INITIAL_CONTRAST -# define GDISP_INITIAL_CONTRAST 35 -# endif -# ifndef GDISP_INITIAL_BACKLIGHT -# define GDISP_INITIAL_BACKLIGHT 100 -# endif - -# define GDISP_FLG_NEEDFLUSH (GDISP_FLG_DRIVER << 0) - -# include "st7565.h" - -/*===========================================================================*/ -/* Driver config defaults for backward compatibility. */ -/*===========================================================================*/ -# ifndef ST7565_LCD_BIAS -# define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 -# endif -# ifndef ST7565_ADC -# define ST7565_ADC ST7565_ADC_NORMAL -# endif -# ifndef ST7565_COM_SCAN -# define ST7565_COM_SCAN ST7565_COM_SCAN_INC -# endif -# ifndef ST7565_PAGE_ORDER -# define ST7565_PAGE_ORDER 0, 1, 2, 3, 4, 5, 6, 7 -# endif - -/*===========================================================================*/ -/* Driver local functions. */ -/*===========================================================================*/ - -// Some common routines and macros -# define RAM(g) ((gU8 *)g->priv) -# define write_cmd2(g, cmd1, cmd2) \ - { \ - write_cmd(g, cmd1); \ - write_cmd(g, cmd2); \ - } -# define write_cmd3(g, cmd1, cmd2, cmd3) \ - { \ - write_cmd(g, cmd1); \ - write_cmd(g, cmd2); \ - write_cmd(g, cmd3); \ - } - -// Some common routines and macros -# define delay(us) gfxSleepMicroseconds(us) -# define delay_ms(ms) gfxSleepMilliseconds(ms) - -# define xyaddr(x, y) ((x) + ((y) >> 3) * GDISP_SCREEN_WIDTH) -# define xybit(y) (1 << ((y)&7)) - -/*===========================================================================*/ -/* Driver exported functions. */ -/*===========================================================================*/ - -/* - * As this controller can't update on a pixel boundary we need to maintain the - * the entire display surface in memory so that we can do the necessary bit - * operations. Fortunately it is a small display in monochrome. - * 64 * 128 / 8 = 1024 bytes. - */ - -LLDSPEC bool_t gdisp_lld_init(GDisplay *g) { - // The private area is the display surface. - g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8); - if (!g->priv) { - return gFalse; - } - - // Initialise the board interface - init_board(g); - - // Hardware reset - setpin_reset(g, TRUE); - gfxSleepMilliseconds(20); - setpin_reset(g, FALSE); - gfxSleepMilliseconds(20); - acquire_bus(g); - - write_cmd(g, ST7565_LCD_BIAS); - write_cmd(g, ST7565_ADC); - write_cmd(g, ST7565_COM_SCAN); - - write_cmd(g, ST7565_START_LINE | 0); - - write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST * 64 / 101); - write_cmd(g, ST7565_RESISTOR_RATIO | 0x1); - - // turn on voltage converter (VC=1, VR=0, VF=0) - write_cmd(g, ST7565_POWER_CONTROL | 0x04); - delay_ms(50); - - // turn on voltage regulator (VC=1, VR=1, VF=0) - write_cmd(g, ST7565_POWER_CONTROL | 0x06); - delay_ms(50); - - // turn on voltage follower (VC=1, VR=1, VF=1) - write_cmd(g, ST7565_POWER_CONTROL | 0x07); - delay_ms(50); - - write_cmd(g, ST7565_DISPLAY_ON); - write_cmd(g, ST7565_ALLON_NORMAL); - write_cmd(g, ST7565_INVERT_DISPLAY); // Disable Inversion of display. - - write_cmd(g, ST7565_RMW); - - // Finish Init - post_init_board(g); - - // Release the bus - release_bus(g); - - /* Initialise the GDISP structure */ - g->g.Width = GDISP_SCREEN_WIDTH; - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Orientation = GDISP_ROTATE_0; - g->g.Powermode = powerOff; - g->g.Backlight = GDISP_INITIAL_BACKLIGHT; - g->g.Contrast = GDISP_INITIAL_CONTRAST; - return TRUE; -} - -# if GDISP_HARDWARE_FLUSH -LLDSPEC void gdisp_lld_flush(GDisplay *g) { - unsigned p; - - // Don't flush if we don't need it. - if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return; - - acquire_bus(g); - gU8 pagemap[] = {ST7565_PAGE_ORDER}; - for (p = 0; p < sizeof(pagemap); p++) { - write_cmd(g, ST7565_PAGE | pagemap[p]); - write_cmd(g, ST7565_COLUMN_MSB | 0); - write_cmd(g, ST7565_COLUMN_LSB | 0); - write_cmd(g, ST7565_RMW); - write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH); - } - release_bus(g); - - g->flags &= ~GDISP_FLG_NEEDFLUSH; -} -# endif - -# if GDISP_HARDWARE_DRAWPIXEL -LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) { - coord_t x, y; - - switch (g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_90: - x = g->p.y; - y = GDISP_SCREEN_HEIGHT - 1 - g->p.x; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH - 1 - g->p.x; - y = GDISP_SCREEN_HEIGHT - 1 - g->p.y; - break; - case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT - 1 - g->p.y; - y = g->p.x; - break; - } - if (gdispColor2Native(g->p.color) != Black) - RAM(g)[xyaddr(x, y)] |= xybit(y); - else - RAM(g)[xyaddr(x, y)] &= ~xybit(y); - g->flags |= GDISP_FLG_NEEDFLUSH; -} -# endif - -# if GDISP_HARDWARE_PIXELREAD -LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) { - coord_t x, y; - - switch (g->g.Orientation) { - default: - case GDISP_ROTATE_0: - x = g->p.x; - y = g->p.y; - break; - case GDISP_ROTATE_90: - x = g->p.y; - y = GDISP_SCREEN_HEIGHT - 1 - g->p.x; - break; - case GDISP_ROTATE_180: - x = GDISP_SCREEN_WIDTH - 1 - g->p.x; - y = GDISP_SCREEN_HEIGHT - 1 - g->p.y; - break; - case GDISP_ROTATE_270: - x = GDISP_SCREEN_HEIGHT - 1 - g->p.y; - y = g->p.x; - break; - } - return (RAM(g)[xyaddr(x, y)] & xybit(y)) ? White : Black; -} -# endif - -# if GDISP_HARDWARE_BITFILLS -LLDSPEC void gdisp_lld_blit_area(GDisplay *g) { - uint8_t *buffer = (uint8_t *)g->p.ptr; - int linelength = g->p.cx; - for (int i = 0; i < g->p.cy; i++) { - unsigned dstx = g->p.x; - unsigned dsty = g->p.y + i; - unsigned srcx = g->p.x1; - unsigned srcy = g->p.y1 + i; - unsigned srcbit = srcy * g->p.x2 + srcx; - for (int j = 0; j < linelength; j++) { - uint8_t src = buffer[srcbit / 8]; - uint8_t bit = 7 - (srcbit % 8); - uint8_t bitset = (src >> bit) & 1; - uint8_t *dst = &(RAM(g)[xyaddr(dstx, dsty)]); - if (bitset) { - *dst |= xybit(dsty); - } else { - *dst &= ~xybit(dsty); - } - dstx++; - srcbit++; - } - } - g->flags |= GDISP_FLG_NEEDFLUSH; -} -# endif - -# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL -LLDSPEC void gdisp_lld_control(GDisplay *g) { - switch (g->p.x) { - case GDISP_CONTROL_POWER: - if (g->g.Powermode == (powermode_t)g->p.ptr) return; - switch ((powermode_t)g->p.ptr) { - case powerOff: - case powerSleep: - case powerDeepSleep: - acquire_bus(g); - write_cmd(g, ST7565_DISPLAY_OFF); - release_bus(g); - break; - case powerOn: - acquire_bus(g); - write_cmd(g, ST7565_DISPLAY_ON); - release_bus(g); - break; - default: - return; - } - g->g.Powermode = (powermode_t)g->p.ptr; - return; - - case GDISP_CONTROL_ORIENTATION: - if (g->g.Orientation == (orientation_t)g->p.ptr) return; - switch ((orientation_t)g->p.ptr) { - /* Rotation is handled by the drawing routines */ - case GDISP_ROTATE_0: - case GDISP_ROTATE_180: - g->g.Height = GDISP_SCREEN_HEIGHT; - g->g.Width = GDISP_SCREEN_WIDTH; - break; - case GDISP_ROTATE_90: - case GDISP_ROTATE_270: - g->g.Height = GDISP_SCREEN_WIDTH; - g->g.Width = GDISP_SCREEN_HEIGHT; - break; - default: - return; - } - g->g.Orientation = (orientation_t)g->p.ptr; - return; - - case GDISP_CONTROL_CONTRAST: - if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100; - acquire_bus(g); - write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr) << 6) / 101) & 0x3F); - release_bus(g); - g->g.Contrast = (unsigned)g->p.ptr; - return; - } -} -# endif // GDISP_NEED_CONTROL - -#endif // GFX_USE_GDISP diff --git a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h b/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h deleted file mode 100644 index 6052058ec23..00000000000 --- a/drivers/ugfx/gdisp/st7565/gdisp_lld_config.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#ifndef _GDISP_LLD_CONFIG_H -#define _GDISP_LLD_CONFIG_H - -#if GFX_USE_GDISP - -/*===========================================================================*/ -/* Driver hardware support. */ -/*===========================================================================*/ - -# define GDISP_HARDWARE_FLUSH GFXON // This controller requires flushing -# define GDISP_HARDWARE_DRAWPIXEL GFXON -# define GDISP_HARDWARE_PIXELREAD GFXON -# define GDISP_HARDWARE_CONTROL GFXON -# define GDISP_HARDWARE_BITFILLS GFXON - -# define GDISP_LLD_PIXELFORMAT GDISP_PIXELFORMAT_MONO - -#endif /* GFX_USE_GDISP */ - -#endif /* _GDISP_LLD_CONFIG_H */ diff --git a/drivers/ugfx/gdisp/st7565/st7565.h b/drivers/ugfx/gdisp/st7565/st7565.h deleted file mode 100644 index 3c77a88569a..00000000000 --- a/drivers/ugfx/gdisp/st7565/st7565.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#ifndef _ST7565_H -#define _ST7565_H - -#define ST7565_CONTRAST 0x81 -#define ST7565_ALLON_NORMAL 0xA4 -#define ST7565_ALLON 0xA5 -#define ST7565_POSITIVE_DISPLAY 0xA6 -#define ST7565_INVERT_DISPLAY 0xA7 -#define ST7565_DISPLAY_OFF 0xAE -#define ST7565_DISPLAY_ON 0xAF - -#define ST7565_LCD_BIAS_7 0xA3 -#define ST7565_LCD_BIAS_9 0xA2 - -#define ST7565_ADC_NORMAL 0xA0 -#define ST7565_ADC_REVERSE 0xA1 - -#define ST7565_COM_SCAN_INC 0xC0 -#define ST7565_COM_SCAN_DEC 0xC8 - -#define ST7565_START_LINE 0x40 -#define ST7565_PAGE 0xB0 -#define ST7565_COLUMN_MSB 0x10 -#define ST7565_COLUMN_LSB 0x00 -#define ST7565_RMW 0xE0 - -#define ST7565_RESISTOR_RATIO 0x20 -#define ST7565_POWER_CONTROL 0x28 - -#define ST7565_RESET 0xE2 - -#endif /* _ST7565_H */ diff --git a/drivers/usb2422.c b/drivers/usb2422.c new file mode 100644 index 00000000000..62b919093b9 --- /dev/null +++ b/drivers/usb2422.c @@ -0,0 +1,402 @@ +/* Copyright 2021 QMK + * + * 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 3 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 . + */ +#include +#include "usb2422.h" +#include "i2c_master.h" +#include "wait.h" +#include "gpio.h" + +/* -------- USB2422_VID : (USB2422L Offset: 0x00) (R/W 16) Vendor ID -------- */ +typedef union { + struct { + uint16_t VID_LSB : 8; + uint16_t VID_MSB : 8; + } bit; /*!< Structure used for bit access */ + uint16_t reg; /*!< Type used for register access */ +} USB2422_VID_Type; + +/* -------- USB2422_PID : (USB2422L Offset: 0x02) (R/W 16) Product ID -------- */ +typedef union { + struct { + uint16_t PID_LSB : 8; + uint16_t PID_MSB : 8; + } bit; /*!< Structure used for bit access */ + uint16_t reg; /*!< Type used for register access */ +} USB2422_PID_Type; + +/* -------- USB2422_DID : (USB2422L Offset: 0x04) (R/W 16) Device ID -------- */ +typedef union { + struct { + uint16_t DID_LSB : 8; + uint16_t DID_MSB : 8; + } bit; /*!< Structure used for bit access */ + uint16_t reg; /*!< Type used for register access */ +} USB2422_DID_Type; + +/* -------- USB2422_CFG1 : (USB2422L Offset: 0x06) (R/W 8) Configuration Data Byte 1-------- */ +typedef union { + struct { + uint8_t PORT_PWR : 1; + uint8_t CURRENT_SNS : 2; + uint8_t EOP_DISABLE : 1; + uint8_t MTT_ENABLE : 1; + uint8_t HS_DISABLE : 1; + uint8_t : 1; + uint8_t SELF_BUS_PWR : 1; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_CFG1_Type; + +/* -------- USB2422_CFG2 : (USB2422L Offset: 0x07) (R/W 8) Configuration Data Byte 2-------- */ +typedef union { + struct { + uint8_t : 3; + uint8_t COMPOUND : 1; + uint8_t OC_TIMER : 2; + uint8_t : 1; + uint8_t DYNAMIC : 1; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_CFG2_Type; + +/* -------- USB2422_CFG3 : (USB2422L Offset: 0x08) (R/W 16) Configuration Data Byte 3-------- */ +typedef union { + struct { + uint8_t STRING_EN : 1; + uint8_t : 2; + uint8_t PRTMAP_EN : 1; + uint8_t : 4; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_CFG3_Type; + +/* -------- USB2422_NRD : (USB2422L Offset: 0x09) (R/W 8) Non Removable Device -------- */ +typedef union { + struct { + uint8_t : 5; + uint8_t PORT2_NR : 1; + uint8_t PORT1_NR : 1; + uint8_t : 1; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_NRD_Type; + +/* -------- USB2422_PDS : (USB2422L Offset: 0x0A) (R/W 8) Port Diable for Self-Powered Operation -------- */ +typedef union { + struct { + uint8_t : 1; + uint8_t PORT1_DIS : 1; + uint8_t PORT2_DIS : 1; + uint8_t : 5; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PDS_Type; + +/* -------- USB2422_PDB : (USB2422L Offset: 0x0B) (R/W 8) Port Diable for Bus-Powered Operation -------- */ + +typedef union { + struct { + uint8_t : 1; + uint8_t PORT1_DIS : 1; + uint8_t PORT2_DIS : 1; + uint8_t : 5; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PDB_Type; + +/* -------- USB2422_MAXPS : (USB2422L Offset: 0x0C) (R/W 8) Max Power for Self-Powered Operation -------- */ +typedef union { + struct { + uint8_t MAX_PWR_SP : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_MAXPS_Type; + +/* -------- USB2422_MAXPB : (USB2422L Offset: 0x0D) (R/W 8) Max Power for Bus-Powered Operation -------- */ +typedef union { + struct { + uint8_t MAX_PWR_BP : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_MAXPB_Type; + +/* -------- USB2422_HCMCS : (USB2422L Offset: 0x0E) (R/W 8) Hub Controller Max Current for Self-Powered Operation -------- */ +typedef union { + struct { + uint8_t HC_MAX_C_SP : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_HCMCS_Type; + +/* -------- USB2422_HCMCB : (USB2422L Offset: 0x0F) (R/W 8) Hub Controller Max Current for Bus-Powered Operation -------- */ +typedef union { + struct { + uint8_t HC_MAX_C_BP : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_HCMCB_Type; + +/* -------- USB2422_PWRT : (USB2422L Offset: 0x10) (R/W 8) Power On Time -------- */ +typedef union { + struct { + uint8_t POWER_ON_TIME : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PWRT_Type; + +/* -------- USB2422_LANGID LSB : (USB2422L Offset: 0x11) (R/W 16) Language ID -------- */ +typedef union { + struct { + uint8_t LANGID_LSB : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_LANGID_LSB_Type; + +/* -------- USB2422_LANGID MSB : (USB2422L Offset: 0x12) (R/W 16) Language ID -------- */ +typedef union { + struct { + uint8_t LANGID_MSB : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_LANGID_MSB_Type; + +/* -------- USB2422_MFRSL : (USB2422L Offset: 0x13) (R/W 8) Manufacturer String Length -------- */ +typedef union { + struct { + uint8_t MFR_STR_LEN : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_MFRSL_Type; + +/* -------- USB2422_PRDSL : (USB2422L Offset: 0x14) (R/W 8) Product String Length -------- */ +typedef union { + struct { + uint8_t PRD_STR_LEN : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PRDSL_Type; + +/* -------- USB2422_SERSL : (USB2422L Offset: 0x15) (R/W 8) Serial String Length -------- */ +typedef union { + struct { + uint8_t SER_STR_LEN : 8; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_SERSL_Type; + +/* -------- USB2422_MFRSTR : (USB2422L Offset: 0x16-53) (R/W 8) Maufacturer String -------- */ +typedef uint16_t USB2422_MFRSTR_Type; + +/* -------- USB2422_PRDSTR : (USB2422L Offset: 0x54-91) (R/W 8) Product String -------- */ +typedef uint16_t USB2422_PRDSTR_Type; + +/* -------- USB2422_SERSTR : (USB2422L Offset: 0x92-CF) (R/W 8) Serial String -------- */ +typedef uint16_t USB2422_SERSTR_Type; + +/* -------- USB2422_BCEN : (USB2422L Offset: 0xD0) (R/W 8) Battery Charging Enable -------- */ + +typedef union { + struct { + uint8_t : 1; + uint8_t PORT1_BCE : 1; + uint8_t PORT2_BCE : 1; + uint8_t : 5; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_BCEN_Type; + +/* -------- USB2422_BOOSTUP : (USB2422L Offset: 0xF6) (R/W 8) Boost Upstream -------- */ +typedef union { + struct { + uint8_t BOOST : 2; + uint8_t : 6; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_BOOSTUP_Type; + +/* -------- USB2422_BOOSTDOWN : (USB2422L Offset: 0xF8) (R/W 8) Boost Downstream -------- */ +typedef union { + struct { + uint8_t BOOST1 : 2; + uint8_t BOOST2 : 2; + uint8_t : 4; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_BOOSTDOWN_Type; + +/* -------- USB2422_PRTSP : (USB2422L Offset: 0xFA) (R/W 8) Port Swap -------- */ +typedef union { + struct { + uint8_t : 1; + uint8_t PORT1_SP : 1; + uint8_t PORT2_SP : 1; + uint8_t : 5; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PRTSP_Type; + +/* -------- USB2422_PRTR12 : (USB2422L Offset: 0xFB) (R/W 8) Port 1/2 Remap -------- */ +typedef union { + struct { + uint8_t PORT1_REMAP : 4; + uint8_t PORT2_REMAP : 4; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_PRTR12_Type; + +#define USB2422_PRTR12_DISABLE 0 +#define USB2422_PRT12_P2TOL1 1 +#define USB2422_PRT12_P2XTOL2 2 +#define USB2422_PRT12_P1TOL1 1 +#define USB2422_PRT12_P1XTOL2 2 + +/* -------- USB2422_STCD : (USB2422L Offset: 0xFF) (R/W 8) Status Command -------- */ +typedef union { + struct { + uint8_t USB_ATTACH : 1; + uint8_t RESET : 1; + uint8_t INTF_PWRDN : 1; + uint8_t : 5; + } bit; /*!< Structure used for bit access */ + uint8_t reg; /*!< Type used for register access */ +} USB2422_STCD_Type; + +/** \brief USB2422 device hardware registers */ +typedef struct { + USB2422_VID_Type VID; /**< \brief Offset: 0x00*/ + USB2422_PID_Type PID; /**< \brief Offset: 0x02*/ + USB2422_DID_Type DID; /**< \brief Offset: 0x04*/ + USB2422_CFG1_Type CFG1; /**< \brief Offset: 0x06*/ + USB2422_CFG2_Type CFG2; /**< \brief Offset: 0x07*/ + USB2422_CFG3_Type CFG3; /**< \brief Offset: 0x08*/ + USB2422_NRD_Type NRD; /**< \brief Offset: 0x09*/ + USB2422_PDS_Type PDS; /**< \brief Offset: 0x0A*/ + USB2422_PDB_Type PDB; /**< \brief Offset: 0x0B*/ + USB2422_MAXPS_Type MAXPS; /**< \brief Offset: 0x0C*/ + USB2422_MAXPB_Type MAXPB; /**< \brief Offset: 0x0D*/ + USB2422_HCMCS_Type HCMCS; /**< \brief Offset: 0x0E*/ + USB2422_HCMCB_Type HCMCB; /**< \brief Offset: 0x0F*/ + USB2422_PWRT_Type PWRT; /**< \brief Offset: 0x10*/ + USB2422_LANGID_LSB_Type LANGID_LSB; /**< \brief Offset: 0x11*/ + USB2422_LANGID_MSB_Type LANGID_MSB; /**< \brief Offset: 0x12*/ + USB2422_MFRSL_Type MFRSL; /**< \brief Offset: 0x13*/ + USB2422_PRDSL_Type PRDSL; /**< \brief Offset: 0x14*/ + USB2422_SERSL_Type SERSL; /**< \brief Offset: 0x15*/ + USB2422_MFRSTR_Type MFRSTR[31]; /**< \brief Offset: 0x16*/ + USB2422_PRDSTR_Type PRDSTR[31]; /**< \brief Offset: 0x54*/ + USB2422_SERSTR_Type SERSTR[31]; /**< \brief Offset: 0x92*/ + USB2422_BCEN_Type BCEN; /**< \brief Offset: 0xD0*/ + uint8_t Reserved1[0x25]; + USB2422_BOOSTUP_Type BOOSTUP; /**< \brief Offset: 0xF6*/ + uint8_t Reserved2[0x1]; + USB2422_BOOSTDOWN_Type BOOSTDOWN; /**< \brief Offset: 0xF8*/ + uint8_t Reserved3[0x1]; + USB2422_PRTSP_Type PRTSP; /**< \brief Offset: 0xFA*/ + USB2422_PRTR12_Type PRTR12; /**< \brief Offset: 0xFB*/ + uint8_t Reserved4[0x3]; + USB2422_STCD_Type STCD; /**< \brief Offset: 0xFF*/ +} Usb2422_t; + +// *************************************************************** + +static Usb2422_t config; + +// *************************************************************** + +/** \brief Handle the conversion to allow simple strings + */ +static void USB2422_strcpy(const char* str, USB2422_MFRSTR_Type* dest, uint8_t len) { + for (uint8_t i = 0; i < len; i++) { + dest[i] = str[i]; + } +} + +/** \brief Handle the conversion to allow simple strings + */ +static void USB2422_write_block(void) { + static unsigned char i2c0_buf[34]; + + unsigned char* dest = i2c0_buf; + unsigned char* src; + unsigned char* base = (unsigned char*)&config; + + for (src = base; src < base + 256; src += 32) { + dest[0] = src - base; + dest[1] = 32; + memcpy(&dest[2], src, 32); + i2c_transmit(USB2422_ADDRESS, dest, 34, 50000); + wait_us(100); + } +} + +// *************************************************************** + +void USB2422_init() { +#ifdef USB2422_RESET_PIN + setPinOutput(USB2422_RESET_PIN); +#endif +#ifdef USB2422_ACTIVE_PIN + setPinInput(USB2422_ACTIVE_PIN); +#endif + + i2c_init(); // IC2 clk must be high at USB2422 reset release time to signal SMB configuration +} + +void USB2422_configure() { + static const char SERNAME[] = "Unavailable"; + + memset(&config, 0, sizeof(Usb2422_t)); + + // configure Usb2422 registers + config.VID.reg = USB2422_VENDOR_ID; + config.PID.reg = USB2422_PRODUCT_ID; + config.DID.reg = USB2422_DEVICE_VER; // BCD format, eg 01.01 + config.CFG1.bit.SELF_BUS_PWR = 1; // self powered for now + config.CFG1.bit.HS_DISABLE = 1; // full or high speed + // config.CFG2.bit.COMPOUND = 0; // compound device + config.CFG3.bit.STRING_EN = 1; // strings enabled + // config.NRD.bit.PORT2_NR = 0; // MCU is non-removable + config.MAXPB.reg = 20; // 0mA + config.HCMCB.reg = 20; // 0mA + config.MFRSL.reg = sizeof(USB2422_MANUFACTURER); + config.PRDSL.reg = sizeof(USB2422_PRODUCT); + config.SERSL.reg = sizeof(SERNAME); + USB2422_strcpy(USB2422_MANUFACTURER, config.MFRSTR, sizeof(USB2422_MANUFACTURER)); + USB2422_strcpy(USB2422_PRODUCT, config.PRDSTR, sizeof(USB2422_PRODUCT)); + USB2422_strcpy(SERNAME, config.SERSTR, sizeof(SERNAME)); + // config.BOOSTUP.bit.BOOST=3; //upstream port + // config.BOOSTDOWN.bit.BOOST1=0; // extra port + // config.BOOSTDOWN.bit.BOOST2=2; //MCU is close + config.STCD.bit.USB_ATTACH = 1; + + USB2422_write_block(); +} + +void USB2422_reset() { +#ifdef USB2422_RESET_PIN + writePinLow(USB2422_RESET_PIN); + wait_us(2); + writePinHigh(USB2422_RESET_PIN); +#endif +} + +bool USB2422_active() { +#ifdef USB2422_ACTIVE_PIN + return readPin(USB2422_ACTIVE_PIN); +#else + return 1; +#endif +} diff --git a/drivers/usb2422.h b/drivers/usb2422.h new file mode 100644 index 00000000000..2e435b02bc9 --- /dev/null +++ b/drivers/usb2422.h @@ -0,0 +1,59 @@ +/* Copyright 2021 QMK + * + * 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 3 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 . + */ +#pragma once + +#include + +#ifndef USB2422_ADDRESS +# define USB2422_ADDRESS 0x58 +#endif + +#ifndef USB2422_VENDOR_ID +# define USB2422_VENDOR_ID 0xFEED +#endif +#ifndef USB2422_PRODUCT_ID +# define USB2422_PRODUCT_ID 0x0001 +#endif +#ifndef USB2422_DEVICE_VER +# define USB2422_DEVICE_VER 0x0001 +#endif + +#ifndef USB2422_MANUFACTURER +# define USB2422_MANUFACTURER "QMK" +#endif +#ifndef USB2422_PRODUCT +# define USB2422_PRODUCT "QMK Hub" +#endif + +/** \brief Initialises the dependent subsystems */ +void USB2422_init(void); + +/** \brief Push configuration to the USB2422 device */ +void USB2422_configure(void); + +/** \brief Reset the chip (RESET_N) + * + * NOTE: + * Depends on a valid USB2422_RESET_PIN configuration + */ +void USB2422_reset(void); + +/** \brief Indicates the USB state of the hub (SUSP_IND) + * + * NOTE: + * Depends on a valid USB2422_ACTIVE_PIN configuration + */ +bool USB2422_active(void); diff --git a/drivers/ws2812.h b/drivers/ws2812.h index f179fcb0ef5..945b3d07289 100644 --- a/drivers/ws2812.h +++ b/drivers/ws2812.h @@ -17,11 +17,41 @@ #include "quantum/color.h" +/* + * The WS2812 datasheets define T1H 900ns, T0H 350ns, T1L 350ns, T0L 900ns. Hence, by default, these + * are chosen to be conservative and avoid problems rather than for maximum throughput; in the code, + * this is done by default using a WS2812_TIMING parameter that accounts for the whole window (1250ns) + * and defining T1H and T0H; T1L and T0L are obtained by subtracting their low counterparts from the window. + * + * However, there are certain "WS2812"-like LEDs, like the SK6812s, which work in a similar + * communication topology but use different timings for the window and the T1L, T1H, T0L and T0H. + * This means that, albeit the same driver being applicable, the timings must be adapted. + */ + +#ifndef WS2812_TIMING +# define WS2812_TIMING 1250 +#endif + +#ifndef WS2812_T1H +# define WS2812_T1H 900 // Width of a 1 bit in ns +#endif + +#ifndef WS2812_T1L +# define WS2812_T1L (WS2812_TIMING - WS2812_T1H) // Width of a 1 bit in ns +#endif + +#ifndef WS2812_T0H +# define WS2812_T0H 350 // Width of a 0 bit in ns +#endif + +#ifndef WS2812_T0L +# define WS2812_T0L (WS2812_TIMING - WS2812_T0H) // Width of a 0 bit in ns +#endif + /* * Older WS2812s can handle a reset time (TRST) of 50us, but recent * component revisions require a minimum of 280us. */ - #if !defined(WS2812_TRST_US) # define WS2812_TRST_US 280 #endif diff --git a/keyboards/0xcb/1337/keymaps/conor/keymap.c b/keyboards/0xcb/1337/keymaps/conor/keymap.c index 63c3ea9f58f..615ca7baf8d 100644 --- a/keyboards/0xcb/1337/keymaps/conor/keymap.c +++ b/keyboards/0xcb/1337/keymaps/conor/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(bool) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(true); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/default/keymap.c b/keyboards/0xcb/1337/keymaps/default/keymap.c index b79ecb767e3..751af6f4f7d 100644 --- a/keyboards/0xcb/1337/keymaps/default/keymap.c +++ b/keyboards/0xcb/1337/keymaps/default/keymap.c @@ -159,7 +159,7 @@ static void render_rgbled_status(void) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -172,5 +172,6 @@ void oled_task_user(void) { render_rgbled_status(); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/jakob/keymap.c b/keyboards/0xcb/1337/keymaps/jakob/keymap.c index 190fee21c6d..f4a075844fc 100644 --- a/keyboards/0xcb/1337/keymaps/jakob/keymap.c +++ b/keyboards/0xcb/1337/keymaps/jakob/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(bool) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(true); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/keymaps/via/keymap.c b/keyboards/0xcb/1337/keymaps/via/keymap.c index eefa67ddb60..a85670e06e4 100644 --- a/keyboards/0xcb/1337/keymaps/via/keymap.c +++ b/keyboards/0xcb/1337/keymaps/via/keymap.c @@ -168,7 +168,7 @@ static void render_rgbled_status(void) { oled_write_ln_P(PSTR("\n"), false); } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -181,5 +181,6 @@ void oled_task_user(void) { render_rgbled_status(); render_logo_font(); } + return false; } #endif diff --git a/keyboards/0xcb/1337/rules.mk b/keyboards/0xcb/1337/rules.mk index ec5e339560c..76a0c6d5992 100644 --- a/keyboards/0xcb/1337/rules.mk +++ b/keyboards/0xcb/1337/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/0xcb/static/config.h b/keyboards/0xcb/static/config.h index 0d36b931eeb..c30450b460d 100644 --- a/keyboards/0xcb/static/config.h +++ b/keyboards/0xcb/static/config.h @@ -48,7 +48,6 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAP_CODE_DELAY 10 -#define ENCODER_DIRECTION_FLIP #define ENCODER_RESOLUTION 4 #define ENCODERS_PAD_A { D0 } #define ENCODERS_PAD_B { D1 } diff --git a/keyboards/0xcb/static/keymaps/bongocat/keymap.c b/keyboards/0xcb/static/keymaps/bongocat/keymap.c index d7f6db08cc9..12cc75217eb 100644 --- a/keyboards/0xcb/static/keymaps/bongocat/keymap.c +++ b/keyboards/0xcb/static/keymaps/bongocat/keymap.c @@ -107,7 +107,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif /* oled stuff :) */ -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE #define IDLE_FRAMES 5 #define IDLE_SPEED 20 // below this wpm value your animation will idle #define TAP_FRAMES 2 @@ -262,7 +262,7 @@ static void render_cat(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -286,6 +286,7 @@ void oled_task_user(void) { render_layer(); } } + return false; } #endif diff --git a/keyboards/0xcb/static/keymaps/default/keymap.c b/keyboards/0xcb/static/keymaps/default/keymap.c index 139c257e66f..4d0d14ff7ec 100644 --- a/keyboards/0xcb/static/keymaps/default/keymap.c +++ b/keyboards/0xcb/static/keymaps/default/keymap.c @@ -175,7 +175,7 @@ static void render_layer(void) { oled_write_P(logo[3][2], false); } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -186,5 +186,6 @@ void oled_task_user(void) { } render_layer(); } + return false; } #endif diff --git a/keyboards/0xcb/static/keymaps/via/keymap.c b/keyboards/0xcb/static/keymaps/via/keymap.c index 6bb24c1fad0..62fcca1f3c3 100644 --- a/keyboards/0xcb/static/keymaps/via/keymap.c +++ b/keyboards/0xcb/static/keymaps/via/keymap.c @@ -175,7 +175,7 @@ static void render_layer(void) { oled_write_P(logo[3][2], false); } -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 3000)) { render_logo(); @@ -186,6 +186,7 @@ void oled_task_user(void) { } render_layer(); } + return false; } #endif diff --git a/keyboards/0xcb/static/readme.md b/keyboards/0xcb/static/readme.md index 8403b4450ec..57e87b71a6d 100644 --- a/keyboards/0xcb/static/readme.md +++ b/keyboards/0xcb/static/readme.md @@ -4,7 +4,7 @@ Macro keypad * Keyboard Maintainer: [Conor Burns](https://github.com/conor-burns) * Hardware Supported: https://github.com/0xCB-dev/0xcb-static -* Hardware Availability: Soon on tindie or order your own parts - the hardware in the repo is Open Source :D +* Hardware Availability: On CandyKeys or order your own parts - the hardware in the repo is Open Source :D * PCB renders :) ![](https://github.com/0xCB-dev/0xcb-static/blob/main/PCB/rev1.0/top.png) diff --git a/keyboards/0xcb/static/rules.mk b/keyboards/0xcb/static/rules.mk index 3738d80295c..c32b3252c9c 100644 --- a/keyboards/0xcb/static/rules.mk +++ b/keyboards/0xcb/static/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/10bleoledhub/keymaps/default/keymap.c b/keyboards/10bleoledhub/keymaps/default/keymap.c index 84c1f106801..806d9131283 100644 --- a/keyboards/10bleoledhub/keymaps/default/keymap.c +++ b/keyboards/10bleoledhub/keymaps/default/keymap.c @@ -55,7 +55,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/10bleoledhub/keymaps/via/keymap.c b/keyboards/10bleoledhub/keymaps/via/keymap.c index df7130e80b9..316819acf57 100644 --- a/keyboards/10bleoledhub/keymaps/via/keymap.c +++ b/keyboards/10bleoledhub/keymaps/via/keymap.c @@ -55,7 +55,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/10bleoledhub/rules.mk b/keyboards/10bleoledhub/rules.mk index 1e036e660c8..5f2e79f5a39 100644 --- a/keyboards/10bleoledhub/rules.mk +++ b/keyboards/10bleoledhub/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,9 +21,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk index 259fea0256c..0f8c15bc026 100644 --- a/keyboards/1upkeyboards/1up60hse/rules.mk +++ b/keyboards/1upkeyboards/1up60hse/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk index 5c2a8b20c58..ccd93ce6d4f 100644 --- a/keyboards/1upkeyboards/1up60hte/rules.mk +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk index 7949142a1db..609f8ee162e 100644 --- a/keyboards/1upkeyboards/1up60rgb/rules.mk +++ b/keyboards/1upkeyboards/1up60rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h index 2e9312e6395..c0c0a7891b7 100644 --- a/keyboards/1upkeyboards/super16/config.h +++ b/keyboards/1upkeyboards/super16/config.h @@ -83,6 +83,54 @@ along with this program. If not, see . # elif defined RGB_MATRIX_ENABLE # define RGB_MATRIX_KEYPRESSES // reacts to keypresses # define RGB_MATRIX_FRAMEBUFFER_EFFECTS // reacts to keyreleases (instead of keypresses) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # endif #endif diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk index d19e1ac8f4f..f4614278426 100644 --- a/keyboards/1upkeyboards/super16/rules.mk +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/2key2crawl/rules.mk b/keyboards/2key2crawl/rules.mk index 19a463a5af9..fa92216a38f 100644 --- a/keyboards/2key2crawl/rules.mk +++ b/keyboards/2key2crawl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/3keyecosystem/2key2/config.h b/keyboards/3keyecosystem/2key2/config.h index 958a665edc7..16cbd00a429 100644 --- a/keyboards/3keyecosystem/2key2/config.h +++ b/keyboards/3keyecosystem/2key2/config.h @@ -49,7 +49,52 @@ along with this program. If not, see . #define RGB_MATRIX_STARTUP_SPD 20 #define RGB_MATRIX_STARTUP_VAL 128 #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_WHEN_USB_SUSPENDED true +#define RGB_DISABLE_WHEN_USB_SUSPENDED + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/3keyecosystem/2key2/rules.mk b/keyboards/3keyecosystem/2key2/rules.mk index 872ace3b35e..0b933eb262b 100644 --- a/keyboards/3keyecosystem/2key2/rules.mk +++ b/keyboards/3keyecosystem/2key2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/3w6/keymaps/helltm/keymap.c b/keyboards/3w6/keymaps/helltm/keymap.c new file mode 100644 index 00000000000..507085081fd --- /dev/null +++ b/keyboards/3w6/keymaps/helltm/keymap.c @@ -0,0 +1,160 @@ +/* Copyright 2021 HellSingCoder + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layers +{ + _ALPHA_QWERTY = 0, + _SYM, + _NAV, + _NUM, +}; + +enum custom_keycodes { + KC_THUMB_SWAP, +}; + +/* Space Enter swap */ +bool swap_space_enter = false; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + * QWERTY + * _____ _____ + * .-----| E |-----._____ _____.-----| I |-----. + * .-----| W |_____| R | T | | Y | U |_____| O |-----. + * | Q |-----| D |-----|_____| |_____|-----| K |-----| P | + * |-----| S |_____| F | G | | H | J |_____| L |-----| + * | A |-----| C |-----|_____| |_____|-----| , < |-----| ; : | + * |-----| X |_____| V | B | | N | M |_____| . > |-----| + * | Z |-----' '-----|_____| |_____|-----' '-----| / ? | + * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' + * SHIFT | WIN ||CTRL | / / \ \ | BSp || Del | SHIFT + * '-----':_____|/ ENT / \ SPC \|_____:'-----' + * NUM '--.._/ \_..--' NAV SYM + */ + [_ALPHA_QWERTY] = LAYOUT( + KC_Q, KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A, KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + LSFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , RSFT_T(KC_SLSH), + LT(_NUM, KC_LGUI), KC_LCTRL, KC_ENT, KC_SPC, LT(_NAV, KC_BSPC), LT(_SYM, KC_DEL) + ), + + /* + * Symbols + * _____ _____ + * .-----| # |-----._____ _____.-----| * |-----. + * .-----| @ |_____| $ | % | | ^ | & |_____| ( |-----. + * | ! |-----| |-----|_____| |_____|-----| [ { |-----| ) | + * |-----| |_____| | | | { | } |_____| ] } |-----| + * | ` ~ |-----| |-----|_____| |_____|-----| |-----| ' " | + * |-----| |_____| | | | - _ | = + |_____| | |-----| + * | ~ |-----' '-----|_____| |_____|-----' '-----| \ | | + * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' + * SHIFT | ||CTRL | / / \ \ | BSp || | SHIFT + * '-----':_____|/ ENT / \ SPC \|_____:'-----' + * '--.._/ \_..--' + */ + [_SYM] = LAYOUT( + KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN , + KC_GRV , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_QUOT , + LSFT_T(KC_TILD), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL , XXXXXXX, KC_PIPE, RSFT_T(KC_BSLS), + XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX + ), + + /* + * Navigation + * _____ _____ + * .-----|Mute |-----._____ _____.-----| Up |-----. + * .-----|VDown|_____| VUp | | | |PDown|_____| PUp |-----. + * | Esc |-----|Play |-----|_____| |_____|-----|Down |-----| BSp | + * |-----|Prev |_____|Next | | |Home |Left |_____|Right|-----| + * | Tab |-----|Stop |-----|_____| |_____|-----| |-----| ' " | + * |-----| |_____| |Swap | | | |_____| End |-----| + * | CPS |-----' '-----|_____| |_____|-----' '-----| Del | + * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' + * SHIFT | ||CTRL | / / \ \ | BSp || | SHIFT + * '-----':_____|/ ENT / \ SPC \|_____:'-----' + * '--.._/ \_..--' + */ + [_NAV] = LAYOUT( + KC_ESC , KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX , XXXXXXX, KC_PGDN, KC_UP , KC_PGUP, KC_BSPC, + KC_TAB , KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX , KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_QUOT, + LSFT_T(KC_CAPS), XXXXXXX, KC_MSTP, XXXXXXX, KC_THUMB_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, KC_END , RSFT_T(KC_DEL) , + XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX + ), + + /* + * Numbers + * _____ _____ + * .-----| 3 |-----._____ _____.-----| 8 |-----. + * .-----| 2 |_____| 4 | 5 | | 6 | 7 |_____| 9 |-----. + * | 1 |-----| F3 |-----|_____| |_____|-----| F8 |-----| 0 | + * |-----| F2 |_____| F4 | F5 | | F6 | F7 |_____| F9 |-----| + * | F1 |-----| Scr |-----|_____| |_____|-----| |-----| F10 | + * |-----| TMg |_____| | | | | |_____| F11 |-----| + * |Shift|-----' '-----|_____| |_____|-----' '-----| F12 | + * '-----' .-----. _____ .-.._ _..-. _____ .-----. '-----' + * | ||CTRL | / / \ \ | BSp || | SHIFT + * '-----':_____|/ ENT / \ SPC \|_____:'-----' + * '--.._/ \_..--' + */ + [_NUM] = LAYOUT( + KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , + KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , + KC_LSFT, LCA(KC_DEL), SWIN(KC_S), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_F11 , RSFT_T(KC_F12) , + XXXXXXX, _______, _______, _______, KC_BSPC, XXXXXXX + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + /* Space Enter swap */ + case KC_THUMB_SWAP: + if (record->event.pressed) { + unregister_code(KC_SPC); + unregister_code(KC_ENT); + swap_space_enter = !swap_space_enter; + } + return false; + break; + + case KC_ENT: + if (swap_space_enter) { + if (record->event.pressed) { + register_code(KC_SPC); + } else { + unregister_code(KC_SPC); + } + return false; + } + break; + case KC_SPC: + if (swap_space_enter) { + if (record->event.pressed) { + register_code(KC_ENT); + } else { + unregister_code(KC_ENT); + } + return false; + } + break; + } + return true; +} diff --git a/keyboards/3w6/rev1/rules.mk b/keyboards/3w6/rev1/rules.mk index 6cc80999c16..e44b34cb925 100644 --- a/keyboards/3w6/rev1/rules.mk +++ b/keyboards/3w6/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/3w6/rev2/rules.mk b/keyboards/3w6/rev2/rules.mk index 6cc80999c16..e44b34cb925 100644 --- a/keyboards/3w6/rev2/rules.mk +++ b/keyboards/3w6/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/25/rules.mk b/keyboards/40percentclub/25/rules.mk index ff835097a1e..48e3d766c42 100644 --- a/keyboards/40percentclub/25/rules.mk +++ b/keyboards/40percentclub/25/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/6lit/rules.mk b/keyboards/40percentclub/6lit/rules.mk index 95462905388..a15b02004fb 100644 --- a/keyboards/40percentclub/6lit/rules.mk +++ b/keyboards/40percentclub/6lit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/foobar/rules.mk b/keyboards/40percentclub/foobar/rules.mk index c21b5c0bbd1..2b23dc2ec3a 100644 --- a/keyboards/40percentclub/foobar/rules.mk +++ b/keyboards/40percentclub/foobar/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk index 3b0966b94a8..b693b8e3059 100644 --- a/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk +++ b/keyboards/40percentclub/gherkin/keymaps/stevexyz/rules.mk @@ -1,6 +1,6 @@ # Build Options (yes/no) # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/gherkin/rules.mk b/keyboards/40percentclub/gherkin/rules.mk index 5db3f2eedb4..cb5b8b96f9d 100644 --- a/keyboards/40percentclub/gherkin/rules.mk +++ b/keyboards/40percentclub/gherkin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/i75/rules.mk b/keyboards/40percentclub/i75/rules.mk index 719351cec63..1d0cfaf6df8 100644 --- a/keyboards/40percentclub/i75/rules.mk +++ b/keyboards/40percentclub/i75/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/40percentclub/luddite/rules.mk b/keyboards/40percentclub/luddite/rules.mk index e623904b20c..2ccac34f7a3 100644 --- a/keyboards/40percentclub/luddite/rules.mk +++ b/keyboards/40percentclub/luddite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk index 1a247b0543d..a124bde758d 100644 --- a/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/andyjack/rules.mk @@ -1,2 +1,2 @@ MOUSEKEY_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk index 2a4ff658cf2..160b3684b3c 100644 --- a/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk +++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk @@ -4,5 +4,6 @@ F_CPU = 8000000 # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE BACKLIGHT_ENABLE = no diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk index 5069e083b5a..31bab319873 100644 --- a/keyboards/40percentclub/mf68/rules.mk +++ b/keyboards/40percentclub/mf68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/nano/keymaps/drashna/config.h b/keyboards/40percentclub/nano/keymaps/drashna/config.h new file mode 100644 index 00000000000..411ee8a81bb --- /dev/null +++ b/keyboards/40percentclub/nano/keymaps/drashna/config.h @@ -0,0 +1,22 @@ +/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) + * + * 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 . + */ + +#pragma once + +#define ANALOG_JOYSTICK_X_AXIS_PIN B4 +#define ANALOG_JOYSTICK_Y_AXIS_PIN B5 + +#define ANALOG_JOYSTICK_CLICK_PIN E6 diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c index 13f89dd53d7..cc5991d7a26 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c +++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c @@ -29,98 +29,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // clang-format on - -// Joystick -// Set Pins -// uint8_t xPin = 8; // VRx / /B4 -// uint8_t yPin = 7; // VRy // B5 -uint8_t swPin = E6; // SW - -// Set Parameters -uint16_t minAxisValue = 0; -uint16_t maxAxisValue = 1023; - -uint8_t maxCursorSpeed = 2; -uint8_t precisionSpeed = 1; -uint8_t speedRegulator = 20; // Lower Values Create Faster Movement - -int8_t xPolarity = 1; -int8_t yPolarity = 1; - -uint8_t cursorTimeout = 10; - -int16_t xOrigin, yOrigin; - -uint16_t lastCursor = 0; - -int16_t axisCoordinate(uint8_t pin, uint16_t origin) { - int8_t direction; - int16_t distanceFromOrigin; - int16_t range; - - int16_t position = analogReadPin(pin); - - if (origin == position) { - return 0; - } else if (origin > position) { - distanceFromOrigin = origin - position; - range = origin - minAxisValue; - direction = -1; - } else { - distanceFromOrigin = position - origin; - range = maxAxisValue - origin; - direction = 1; - } - - float percent = (float)distanceFromOrigin / range; - int16_t coordinate = (int16_t)(percent * 100); - if (coordinate < 0) { - return 0; - } else if (coordinate > 100) { - return 100 * direction; - } else { - return coordinate * direction; - } -} - -int8_t axisToMouseComponent(uint8_t pin, int16_t origin, uint8_t maxSpeed, int8_t polarity) { - int coordinate = axisCoordinate(pin, origin); - if (coordinate != 0) { - float percent = (float)coordinate / 100; - if (get_mods() & MOD_BIT(KC_LSFT)) { - return percent * precisionSpeed * polarity * (abs(coordinate) / speedRegulator); - } else { - return percent * maxCursorSpeed * polarity * (abs(coordinate) / speedRegulator); - } - } else { - return 0; - } -} - -void pointing_device_task(void) { - report_mouse_t report = pointing_device_get_report(); - - // todo read as one vector - if (timer_elapsed(lastCursor) > cursorTimeout) { - lastCursor = timer_read(); - report.x = axisToMouseComponent(B4, xOrigin, maxCursorSpeed, xPolarity); - report.y = axisToMouseComponent(B5, yOrigin, maxCursorSpeed, yPolarity); - } - // - if (!readPin(E6)) { - report.buttons |= MOUSE_BTN1; - } else { - report.buttons &= ~MOUSE_BTN1; - } - - pointing_device_set_report(report); - pointing_device_send(); -} - -void matrix_init_keymap(void) { - // init pin? Is needed? - setPinInputHigh(E6); - // Account for drift - xOrigin = analogReadPin(B4); - yOrigin = analogReadPin(B5); -} diff --git a/keyboards/40percentclub/nano/keymaps/drashna/rules.mk b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk index 2b72a112b0d..aa7966a8b58 100644 --- a/keyboards/40percentclub/nano/keymaps/drashna/rules.mk +++ b/keyboards/40percentclub/nano/keymaps/drashna/rules.mk @@ -1,7 +1,6 @@ -POINTING_DEVICE_ENABLE = yes -RGBLIGHT_ENABLE = no -CONSOLE_ENABLE = no +POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = analog_joystick +RGBLIGHT_ENABLE = no +CONSOLE_ENABLE = no -BOOTLOADER = qmk-dfu - -SRC += analog.c +BOOTLOADER = qmk-dfu diff --git a/keyboards/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/40percentclub/nein/rules.mk +++ b/keyboards/40percentclub/nein/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/nori/rules.mk b/keyboards/40percentclub/nori/rules.mk index 181823d0a87..1e76a7eed3a 100644 --- a/keyboards/40percentclub/nori/rules.mk +++ b/keyboards/40percentclub/nori/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/polyandry/config.h b/keyboards/40percentclub/polyandry/config.h new file mode 100644 index 00000000000..4d64e2d209c --- /dev/null +++ b/keyboards/40percentclub/polyandry/config.h @@ -0,0 +1,90 @@ +/* Copyright 2021 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER di0ib +#define PRODUCT Polypad + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +//more detailed config options start below: + + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/polyandry/info.json b/keyboards/40percentclub/polyandry/info.json new file mode 100644 index 00000000000..d0d1a00f86c --- /dev/null +++ b/keyboards/40percentclub/polyandry/info.json @@ -0,0 +1,27 @@ +{ + "keyboard_name": "Polyandry", + "url": "", + "maintainer": "QMK", + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "k000", "x": 0, "y": 0}, + {"label": "k001", "x": 1, "y": 0}, + {"label": "k002", "x": 2, "y": 0}, + + {"label": "k003", "x": 0, "y": 1}, + {"label": "k004", "x": 1, "y": 1}, + {"label": "k005", "x": 2, "y": 1}, + + {"label": "k006", "x": 0, "y": 2}, + {"label": "k007", "x": 1, "y": 2}, + {"label": "k008", "x": 2, "y": 2}, + + {"label": "k009", "x": 0, "y": 3}, + {"label": "k010", "x": 1, "y": 3}, + {"label": "k011", "x": 2, "y": 3} + + ] + } + } +} diff --git a/keyboards/40percentclub/polyandry/keymaps/default/keymap.c b/keyboards/40percentclub/polyandry/keymaps/default/keymap.c new file mode 100644 index 00000000000..3e1f278b35e --- /dev/null +++ b/keyboards/40percentclub/polyandry/keymaps/default/keymap.c @@ -0,0 +1,30 @@ +/* Copyright 2021 + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6, + KC_7, KC_8, KC_9, + KC_0, KC_A, KC_B + ), + +}; + + + diff --git a/keyboards/40percentclub/polyandry/polyandry.c b/keyboards/40percentclub/polyandry/polyandry.c new file mode 100644 index 00000000000..2b4be589b8f --- /dev/null +++ b/keyboards/40percentclub/polyandry/polyandry.c @@ -0,0 +1,16 @@ +/* Copyright 2021 + * + * 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 . + */ +#include "polyandry.h" diff --git a/keyboards/40percentclub/polyandry/polyandry.h b/keyboards/40percentclub/polyandry/polyandry.h new file mode 100644 index 00000000000..5baf87ba623 --- /dev/null +++ b/keyboards/40percentclub/polyandry/polyandry.h @@ -0,0 +1,24 @@ +/* Copyright 2021 + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#ifdef KEYBOARD_40percentclub_polyandry_promicro + #include "promicro.h" +#elif KEYBOARD_40percentclub_polyandry_teensy2 + #include "teensy2.h" +#endif diff --git a/keyboards/40percentclub/polyandry/promicro/config.h b/keyboards/40percentclub/polyandry/promicro/config.h new file mode 100644 index 00000000000..e6f8643c441 --- /dev/null +++ b/keyboards/40percentclub/polyandry/promicro/config.h @@ -0,0 +1,34 @@ +/* Copyright 2021 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 12 + +/* key matrix pins + * Direct pins is not used because there is not a shared ground position + * between all compatible microcontrollers. +*/ +#define MATRIX_ROW_PINS { D7 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, E6, B4, F4, F5, F6, F7, B3, B2 } +#define UNUSED_PINS + +/* doesn't really matter lol */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/polyandry/promicro/promicro.c b/keyboards/40percentclub/polyandry/promicro/promicro.c new file mode 100644 index 00000000000..ea1dd517886 --- /dev/null +++ b/keyboards/40percentclub/polyandry/promicro/promicro.c @@ -0,0 +1,16 @@ +/* Copyright 2021 + * + * 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 . + */ +#include "promicro.h" diff --git a/keyboards/40percentclub/polyandry/promicro/promicro.h b/keyboards/40percentclub/polyandry/promicro/promicro.h new file mode 100644 index 00000000000..65e2b4b9c2a --- /dev/null +++ b/keyboards/40percentclub/polyandry/promicro/promicro.h @@ -0,0 +1,27 @@ +/* Copyright 2021 + * + * 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 . + */ +#pragma once + +#include "polyandry.h" + +#define LAYOUT( \ + K000, K001, K002, \ + K003, K004, K005, \ + K006, K007, K008, \ + K009, K010, K011 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 } \ +} diff --git a/keyboards/40percentclub/polyandry/promicro/rules.mk b/keyboards/40percentclub/polyandry/promicro/rules.mk new file mode 100644 index 00000000000..cf663a7ed6a --- /dev/null +++ b/keyboards/40percentclub/polyandry/promicro/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina diff --git a/keyboards/40percentclub/polyandry/readme.md b/keyboards/40percentclub/polyandry/readme.md new file mode 100644 index 00000000000..b6acf3cd7ff --- /dev/null +++ b/keyboards/40percentclub/polyandry/readme.md @@ -0,0 +1,53 @@ +# Polyandry/polypad + +![Polyandry](https://1.bp.blogspot.com/-97uoICZvZec/XSdpvCVFFlI/AAAAAAACVZY/BlCRjxjDqDAxOZa6C5ddQr0OsFQ9VZv5wCLcBGAs/s1600/d1.jpg) +=== + +3x4/4x3 grid layout, multiple controllers supported +- Pro Micro +- PJRC Teensy 2.0 + +(**The below are not currently ported:**) + +- PJRC Teensy LC/3.2 +- PJRC Teensy 3.5/3.6 +- Adafruit ItsyBitsy ATMega32u4 +- Adafruit ItsyBitsy M0 +- Adafruit ItsyBitsy M4 + +The matrix is electrically 1x12 with no diodes, with a thirteenth pin used for the column rather than a ground in order to be compatible with all the listed microcontrollers.. + +The default keymap is a testing keymap that is intended to make sure all of the keys on the matrix are working and properly assigned. + +[The original (minimal arduino sketch) firmware, with support for some unsupported controllers](https://git.40percent.club/di0ib/Misc/src/branch/master/polyandry) + +Keyboard Maintainer: QMK Community +Hardware Supported: Polyandry PCB +Hardware Availability: [Polyandry gerbers are on 40percent.club](https://www.40percent.club/2019/07/polyandry.html) + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/polyandry:default + or + qmk compile -kb 40percentclub/polyandry -km default + +Default firmware is for an Arduino Pro Micro knockoff. + +If you would like to specify a controller: + + make 40percentclub/polyandry/promicro:default + or + qmk compile -kb 40percentclub/polyandry/promicro -km default + make 40percentclub/polyandry/teensy2:default + or + qmk compile -kb 40percentclub/polyandry/teensy2 -km default + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top left key of the keyboard (top right or bottom left in horizontal configuration) +* **Physical reset**: Briefly press the button on the bottom of the microcontroller or, if not present short the pin marked RST to a GND. +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/40percentclub/polyandry/rules.mk b/keyboards/40percentclub/polyandry/rules.mk new file mode 100644 index 00000000000..4632df1dee6 --- /dev/null +++ b/keyboards/40percentclub/polyandry/rules.mk @@ -0,0 +1,17 @@ +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = 40percentclub/polyandry/promicro diff --git a/keyboards/40percentclub/polyandry/teensy2/config.h b/keyboards/40percentclub/polyandry/teensy2/config.h new file mode 100644 index 00000000000..d730ce6f940 --- /dev/null +++ b/keyboards/40percentclub/polyandry/teensy2/config.h @@ -0,0 +1,36 @@ +/* Copyright 2021 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 12 + +/* key matrix pins */ + +// Note from original contributor (ryjelsum): +// Untested - don't have teensy2. if some keys do not function or are in wrong place, +// please check the pin definitions. I may have screwed up. :) + +#define MATRIX_ROW_PINS { D3 } +#define MATRIX_COL_PINS { B7, D0, D1, D2, C6, C7, F6, F7, B6, B5, D7, D6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/40percentclub/polyandry/teensy2/rules.mk b/keyboards/40percentclub/polyandry/teensy2/rules.mk new file mode 100644 index 00000000000..320633f80f3 --- /dev/null +++ b/keyboards/40percentclub/polyandry/teensy2/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = halfkay diff --git a/keyboards/40percentclub/polyandry/teensy2/teensy2.c b/keyboards/40percentclub/polyandry/teensy2/teensy2.c new file mode 100644 index 00000000000..33cfb6e553c --- /dev/null +++ b/keyboards/40percentclub/polyandry/teensy2/teensy2.c @@ -0,0 +1,16 @@ +/* Copyright 2021 + * + * 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 . + */ +#include "teensy2.h" diff --git a/keyboards/40percentclub/polyandry/teensy2/teensy2.h b/keyboards/40percentclub/polyandry/teensy2/teensy2.h new file mode 100644 index 00000000000..118eb353a4f --- /dev/null +++ b/keyboards/40percentclub/polyandry/teensy2/teensy2.h @@ -0,0 +1,32 @@ +/* Copyright 2021 + * + * 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 . + */ +#pragma once + +//NOTE TO FUTURE FROM RYJELSUM (original contributor): +//This has been unchanged from the promicro.h file. +//I DO NOT HAVE A TEENSY 2.0 TO TEST WITH. +//I believe this should still work - but it's not a sure thing. + +#include "polyandry.h" + +#define LAYOUT( \ + K000, K001, K002, \ + K003, K004, K005, \ + K006, K007, K008, \ + K009, K010, K011 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 } \ +} diff --git a/keyboards/40percentclub/sixpack/rules.mk b/keyboards/40percentclub/sixpack/rules.mk index 16878cce869..b701535fa73 100644 --- a/keyboards/40percentclub/sixpack/rules.mk +++ b/keyboards/40percentclub/sixpack/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/tomato/rules.mk b/keyboards/40percentclub/tomato/rules.mk index 4cd1fd625bb..a8461a35f77 100644 --- a/keyboards/40percentclub/tomato/rules.mk +++ b/keyboards/40percentclub/tomato/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c index 77fa5b4017f..ae8ad3e378e 100644 --- a/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c +++ b/keyboards/40percentclub/ut47/keymaps/rgb/keymap.c @@ -43,8 +43,8 @@ LAYOUT( ), LAYOUT( - KC_FN6, KC_FN7, KC_FN8, KC_FN9, KC_FN10, KC_FN11, KC_FN12, KC_FN13, KC_FN14, KC_FN15, KC_FN16, KC_DELETE, - _______, _______, _______, _______, _______, _______, _______, KC_FN17, KC_FN18, KC_FN19, KC_FN20, KC_FN21, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DELETE, + _______, _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, _______, _______, _______, KC_CAPS, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), diff --git a/keyboards/40percentclub/ut47/post_rules.mk b/keyboards/40percentclub/ut47/post_rules.mk new file mode 100644 index 00000000000..7051ee413d7 --- /dev/null +++ b/keyboards/40percentclub/ut47/post_rules.mk @@ -0,0 +1,4 @@ +ifeq ($(strip $(LED_ENABLE)), yes) + OPT_DEFS += -DLED_ENABLE + SRC += led.c +endif diff --git a/keyboards/40percentclub/ut47/rules.mk b/keyboards/40percentclub/ut47/rules.mk index 5253dcbdbdb..dd4860b610b 100644 --- a/keyboards/40percentclub/ut47/rules.mk +++ b/keyboards/40percentclub/ut47/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,8 +22,3 @@ AUDIO_ENABLE = no # Audio output # custom matrix setup CUSTOM_MATRIX = yes SRC += matrix.c protocol/serial_uart.c - -ifeq ($(strip $(LED_ENABLE)), yes) - OPT_DEFS += -DLED_ENABLE - SRC += led.c -endif diff --git a/keyboards/45_ats/rules.mk b/keyboards/45_ats/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/45_ats/rules.mk +++ b/keyboards/45_ats/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/4pplet/aekiso60/rev_a/rules.mk b/keyboards/4pplet/aekiso60/rev_a/rules.mk index fadbd21ffcf..895a77853d7 100644 --- a/keyboards/4pplet/aekiso60/rev_a/rules.mk +++ b/keyboards/4pplet/aekiso60/rev_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/4pplet/bootleg/rev_a/rules.mk b/keyboards/4pplet/bootleg/rev_a/rules.mk index 4f707bd3655..f155258a95a 100644 --- a/keyboards/4pplet/bootleg/rev_a/rules.mk +++ b/keyboards/4pplet/bootleg/rev_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk b/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk index e80e0296a96..5c6e7c6131b 100644 --- a/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk +++ b/keyboards/4pplet/eagle_viper_rep/rev_a/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F072 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/4pplet/steezy60/rev_a/rules.mk b/keyboards/4pplet/steezy60/rev_a/rules.mk index fadbd21ffcf..895a77853d7 100644 --- a/keyboards/4pplet/steezy60/rev_a/rules.mk +++ b/keyboards/4pplet/steezy60/rev_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/4pplet/waffling60/rev_a/rules.mk b/keyboards/4pplet/waffling60/rev_a/rules.mk index fadbd21ffcf..895a77853d7 100644 --- a/keyboards/4pplet/waffling60/rev_a/rules.mk +++ b/keyboards/4pplet/waffling60/rev_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/4pplet/waffling60/rev_b/rules.mk b/keyboards/4pplet/waffling60/rev_b/rules.mk index 0017a978fe3..4fae5efa1e1 100644 --- a/keyboards/4pplet/waffling60/rev_b/rules.mk +++ b/keyboards/4pplet/waffling60/rev_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/6ball/6ball.h b/keyboards/6ball/6ball.h index 234235341dc..ef73a720531 100644 --- a/keyboards/6ball/6ball.h +++ b/keyboards/6ball/6ball.h @@ -1,14 +1,10 @@ -#ifndef SIXBALL_H -#define SIXBALL_H +#pragma once #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, \ - k04, k05, k06 \ -) \ -{ \ - { k02, k03, k06, k05, k04, k01 } \ -} - -#endif + k05, k00, k01, \ + k04, k03, k02 \ +) { \ + { k00, k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/6ball/config.h b/keyboards/6ball/config.h index c7d4d3354ac..cc496d675a8 100644 --- a/keyboards/6ball/config.h +++ b/keyboards/6ball/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/7splus/rules.mk b/keyboards/7splus/rules.mk index 8c14ac20b97..659bea9fdd4 100644 --- a/keyboards/7splus/rules.mk +++ b/keyboards/7splus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h index b60dc53c008..ad809da4b81 100644 --- a/keyboards/9key/9key.h +++ b/keyboards/9key/9key.h @@ -1,17 +1,13 @@ -#ifndef NINEKEY_H -#define NINEKEY_H +#pragma once #include "quantum.h" #define LAYOUT( \ - k00, k01, k02, \ - k10, k11, k12, \ - k20, k21, k22 \ -) \ -{ \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ { k00, k01, k02 }, \ { k10, k11, k12 }, \ { k20, k21, k22 } \ -} - -#endif +} diff --git a/keyboards/9key/config.h b/keyboards/9key/config.h index 3c7b4e0ad67..b0462eb50fe 100644 --- a/keyboards/9key/config.h +++ b/keyboards/9key/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/absinthe/rules.mk b/keyboards/absinthe/rules.mk index b94b6338f05..3b482f12abd 100644 --- a/keyboards/absinthe/rules.mk +++ b/keyboards/absinthe/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/acekeyboard/titan60/rules.mk b/keyboards/acekeyboard/titan60/rules.mk index 5bbc093a88e..4a6f5a95fc4 100644 --- a/keyboards/acekeyboard/titan60/rules.mk +++ b/keyboards/acekeyboard/titan60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/acheron/arctic/rules.mk b/keyboards/acheron/arctic/rules.mk index 17aa543022b..f68afca696c 100644 --- a/keyboards/acheron/arctic/rules.mk +++ b/keyboards/acheron/arctic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/austin/keymaps/via/rules.mk b/keyboards/acheron/austin/keymaps/via/rules.mk index 5abd4f5bdf9..666e72557b0 100644 --- a/keyboards/acheron/austin/keymaps/via/rules.mk +++ b/keyboards/acheron/austin/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/acheron/austin/rules.mk b/keyboards/acheron/austin/rules.mk index d89d8cae819..c0c730767bb 100644 --- a/keyboards/acheron/austin/rules.mk +++ b/keyboards/acheron/austin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/elongate/rules.mk b/keyboards/acheron/elongate/rules.mk index ca8c6525403..53961525692 100644 --- a/keyboards/acheron/elongate/rules.mk +++ b/keyboards/acheron/elongate/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/acheron/keebspcb/rules.mk b/keyboards/acheron/keebspcb/rules.mk index 562436e64a7..ae1f29e35ea 100644 --- a/keyboards/acheron/keebspcb/rules.mk +++ b/keyboards/acheron/keebspcb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/lasgweloth/rules.mk b/keyboards/acheron/lasgweloth/rules.mk index 1cc42c0ee3b..197c40da230 100644 --- a/keyboards/acheron/lasgweloth/rules.mk +++ b/keyboards/acheron/lasgweloth/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acheron/shark/keymaps/via/rules.mk b/keyboards/acheron/shark/keymaps/via/rules.mk index 5abd4f5bdf9..666e72557b0 100644 --- a/keyboards/acheron/shark/keymaps/via/rules.mk +++ b/keyboards/acheron/shark/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/acheron/shark/rules.mk b/keyboards/acheron/shark/rules.mk index 0ab8fd2a914..9e9f5397652 100644 --- a/keyboards/acheron/shark/rules.mk +++ b/keyboards/acheron/shark/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/acr60/rules.mk b/keyboards/acr60/rules.mk index 89557e4ea79..d45a04dedf5 100644 --- a/keyboards/acr60/rules.mk +++ b/keyboards/acr60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk index 0bedbef4539..2eb8c5dbde3 100644 --- a/keyboards/aeboards/aegis/rules.mk +++ b/keyboards/aeboards/aegis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aeboards/constellation/rev1/rules.mk b/keyboards/aeboards/constellation/rev1/rules.mk index 7e84b22ca4d..a4ff057a2eb 100755 --- a/keyboards/aeboards/constellation/rev1/rules.mk +++ b/keyboards/aeboards/constellation/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aeboards/constellation/rev2/config.h b/keyboards/aeboards/constellation/rev2/config.h index 0780c9bf934..de42885b470 100755 --- a/keyboards/aeboards/constellation/rev2/config.h +++ b/keyboards/aeboards/constellation/rev2/config.h @@ -47,8 +47,8 @@ #define LOCKING_RESYNC_ENABLE // I2C setup -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U diff --git a/keyboards/aeboards/constellation/rev2/rules.mk b/keyboards/aeboards/constellation/rev2/rules.mk index b0a36174137..5e3bd4ae491 100755 --- a/keyboards/aeboards/constellation/rev2/rules.mk +++ b/keyboards/aeboards/constellation/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aeboards/ext65/keymaps/default/keymap.c b/keyboards/aeboards/ext65/keymaps/default/keymap.c index 466b34539f9..1f933ca1cab 100644 --- a/keyboards/aeboards/ext65/keymaps/default/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/default/keymap.c @@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln(PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_layer_state(); render_keylock_status(host_keyboard_led_state()); render_mod_status(get_mods()|get_oneshot_mods()); + return false; } #endif diff --git a/keyboards/aeboards/ext65/keymaps/via/keymap.c b/keyboards/aeboards/ext65/keymaps/via/keymap.c index 466b34539f9..1f933ca1cab 100644 --- a/keyboards/aeboards/ext65/keymaps/via/keymap.c +++ b/keyboards/aeboards/ext65/keymaps/via/keymap.c @@ -89,10 +89,11 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln(PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_layer_state(); render_keylock_status(host_keyboard_led_state()); render_mod_status(get_mods()|get_oneshot_mods()); + return false; } #endif diff --git a/keyboards/aeboards/ext65/rev1/rules.mk b/keyboards/aeboards/ext65/rev1/rules.mk index 0bedbef4539..2eb8c5dbde3 100644 --- a/keyboards/aeboards/ext65/rev1/rules.mk +++ b/keyboards/aeboards/ext65/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aeboards/ext65/rev2/config.h b/keyboards/aeboards/ext65/rev2/config.h index 778fc3ea6ce..498e345ad74 100644 --- a/keyboards/aeboards/ext65/rev2/config.h +++ b/keyboards/aeboards/ext65/rev2/config.h @@ -56,8 +56,8 @@ along with this program. If not, see . #define WS2812_EXTERNAL_PULLUP // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/aeboards/ext65/rev2/rev2.c b/keyboards/aeboards/ext65/rev2/rev2.c index ce16eb4c488..f303a122e91 100644 --- a/keyboards/aeboards/ext65/rev2/rev2.c +++ b/keyboards/aeboards/ext65/rev2/rev2.c @@ -9,7 +9,7 @@ void board_init(void) { SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_90; // rotates the display 90 degrees } diff --git a/keyboards/aeboards/ext65/rev2/rules.mk b/keyboards/aeboards/ext65/rev2/rules.mk index 3cc7a65076c..2d3aaa1761d 100644 --- a/keyboards/aeboards/ext65/rev2/rules.mk +++ b/keyboards/aeboards/ext65/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/breeze/rev0/rules.mk b/keyboards/afternoonlabs/breeze/rev0/rules.mk index 20ddd6d07f4..d77fba8561e 100644 --- a/keyboards/afternoonlabs/breeze/rev0/rules.mk +++ b/keyboards/afternoonlabs/breeze/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/breeze/rev1/rules.mk b/keyboards/afternoonlabs/breeze/rev1/rules.mk index a5a950c648b..19e0f238cd1 100644 --- a/keyboards/afternoonlabs/breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/breeze/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # change yes to no to disable # SPLIT_KEYBOARD = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk b/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk index 687dde568cb..a66da7d65ec 100644 --- a/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/oceanbreeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk b/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk index 20ddd6d07f4..d77fba8561e 100644 --- a/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/southern_breeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk b/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk index 20ddd6d07f4..d77fba8561e 100644 --- a/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk +++ b/keyboards/afternoonlabs/summer_breeze/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/andromeda/rules.mk b/keyboards/ai03/andromeda/rules.mk index 17aa543022b..f68afca696c 100644 --- a/keyboards/ai03/andromeda/rules.mk +++ b/keyboards/ai03/andromeda/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/equinox/rev0/rules.mk b/keyboards/ai03/equinox/rev0/rules.mk index be4a048405d..7d36ae3c456 100644 --- a/keyboards/ai03/equinox/rev0/rules.mk +++ b/keyboards/ai03/equinox/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ai03/equinox/rev1/rules.mk b/keyboards/ai03/equinox/rev1/rules.mk index be4a048405d..7d36ae3c456 100644 --- a/keyboards/ai03/equinox/rev1/rules.mk +++ b/keyboards/ai03/equinox/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h index 2ada881f3fc..39f1ebb0e36 100644 --- a/keyboards/ai03/orbit/orbit.h +++ b/keyboards/ai03/orbit/orbit.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef ORBIT_H -#define ORBIT_H + +#pragma once #include "quantum.h" @@ -35,29 +35,27 @@ #endif #endif +#define XXX KC_NO #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45 \ -) \ -{ \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { KC_NO, L41, L42, L43, L44, L45, L46 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, KC_NO } \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { XXX, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, XXX } \ } extern void led_toggle(int id, bool on); void set_all_leds(bool leds[6]); extern void set_layer_indicators(uint8_t layer); - -#endif diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c index a83ff5bc67e..2352e5a1118 100644 --- a/keyboards/ai03/orbit/split_util.c +++ b/keyboards/ai03/orbit/split_util.c @@ -8,7 +8,7 @@ #include "quantum.h" #ifdef EE_HANDS -# include "tmk_core/common/eeprom.h" +# include "eeprom.h" # include "eeconfig.h" #endif diff --git a/keyboards/ai03/orbit_x/rules.mk b/keyboards/ai03/orbit_x/rules.mk index 9a9a9acf5a9..269b3cb4f48 100644 --- a/keyboards/ai03/orbit_x/rules.mk +++ b/keyboards/ai03/orbit_x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/polaris/rules.mk b/keyboards/ai03/polaris/rules.mk index 2824b33cc2e..4fe9f0b6e35 100644 --- a/keyboards/ai03/polaris/rules.mk +++ b/keyboards/ai03/polaris/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ai03/vega/rules.mk b/keyboards/ai03/vega/rules.mk index 17aa543022b..f68afca696c 100644 --- a/keyboards/ai03/vega/rules.mk +++ b/keyboards/ai03/vega/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ai03/voyager60_alps/rules.mk b/keyboards/ai03/voyager60_alps/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/ai03/voyager60_alps/rules.mk +++ b/keyboards/ai03/voyager60_alps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ajisai74/rules.mk b/keyboards/ajisai74/rules.mk index 4d39af4d29b..0ce4c12edd3 100644 --- a/keyboards/ajisai74/rules.mk +++ b/keyboards/ajisai74/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/akb/eb46/rules.mk b/keyboards/akb/eb46/rules.mk index df18dc487eb..5c194d1aeb6 100644 --- a/keyboards/akb/eb46/rules.mk +++ b/keyboards/akb/eb46/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/akb/raine/rules.mk b/keyboards/akb/raine/rules.mk index df18dc487eb..5c194d1aeb6 100644 --- a/keyboards/akb/raine/rules.mk +++ b/keyboards/akb/raine/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c index 84953ec582c..c6a81c67f9c 100644 --- a/keyboards/aleblazer/zodiark/keymaps/default/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/default/keymap.c @@ -135,12 +135,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c index 99c5c5e4ee5..ca8f91f1df3 100644 --- a/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c +++ b/keyboards/aleblazer/zodiark/keymaps/slimoled/keymap.c @@ -138,12 +138,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/aleblazer/zodiark/keymaps/via/oled.c b/keyboards/aleblazer/zodiark/keymaps/via/oled.c index 5e4959ab2ec..8642bacb054 100644 --- a/keyboards/aleblazer/zodiark/keymaps/via/oled.c +++ b/keyboards/aleblazer/zodiark/keymaps/via/oled.c @@ -67,12 +67,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/aleblazer/zodiark/rules.mk b/keyboards/aleblazer/zodiark/rules.mk index a332d6440b4..b91bc280ec7 100644 --- a/keyboards/aleblazer/zodiark/rules.mk +++ b/keyboards/aleblazer/zodiark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aleth42/rev1/rules.mk b/keyboards/aleth42/rev1/rules.mk index 134b0490c0e..423adb206a0 100644 --- a/keyboards/aleth42/rev1/rules.mk +++ b/keyboards/aleth42/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alf/dc60/dc60.h b/keyboards/alf/dc60/dc60.h index db5154a28cf..710ae703ed4 100644 --- a/keyboards/alf/dc60/dc60.h +++ b/keyboards/alf/dc60/dc60.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef DC60_H -#define DC60_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments representing the physical @@ -25,18 +27,15 @@ // The second converts the arguments into a two-dimensional array which // represents the switch matrix. #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K42, K43, K45, K47, K48, K4A, K4B, K4C, K4D, K4E \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KOD, KOE }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, K43, KC_NO, K45, KC_NO, K47, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k45, k47, k48, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, XXX, k42, k43, XXX, k45, XXX, k47, k48, XXX, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk index b4bdead9bfc..b38b4e961a6 100644 --- a/keyboards/alf/x11/rules.mk +++ b/keyboards/alf/x11/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index 2e545f1a5bb..a6f4958b054 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -19,31 +19,33 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ALF -#define PRODUCT X2 +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ALF +#define PRODUCT X2 /* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 /* key matrix pins */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } +#define MATRIX_ROW_PINS \ + { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS \ + { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION COL2ROW #define LED_CAPS_LOCK_PIN B2 -#define LED_PIN_ON_STATE 0 +#define LED_PIN_ON_STATE 0 /* number of backlight levels */ -#define BACKLIGHT_PIN B6 +#define BACKLIGHT_PIN B6 #ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 3 +# define BACKLIGHT_LEVELS 3 #endif /* Set 0 if debouncing isn't needed */ @@ -57,9 +59,9 @@ #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 4 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_ANIMATIONS +# define RGBLED_NUM 4 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 #endif diff --git a/keyboards/alf/x2/rules.mk b/keyboards/alf/x2/rules.mk index c5e4effbacb..5635a02825f 100644 --- a/keyboards/alf/x2/rules.mk +++ b/keyboards/alf/x2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alfredslab/swift65/solder/rules.mk b/keyboards/alfredslab/swift65/solder/rules.mk index 6edc1625819..776f7f0f2df 100644 --- a/keyboards/alfredslab/swift65/solder/rules.mk +++ b/keyboards/alfredslab/swift65/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/allison/rules.mk b/keyboards/allison/rules.mk index dc7d341bbb2..5f180ae00de 100644 --- a/keyboards/allison/rules.mk +++ b/keyboards/allison/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/allison_numpad/rules.mk b/keyboards/allison_numpad/rules.mk index a45d7a8419e..3e72995f712 100644 --- a/keyboards/allison_numpad/rules.mk +++ b/keyboards/allison_numpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alpha/alpha.h b/keyboards/alpha/alpha.h index 025a3ac5fbb..204e03822bb 100755 --- a/keyboards/alpha/alpha.h +++ b/keyboards/alpha/alpha.h @@ -1,16 +1,15 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \ - K200, K201, K202, K203, K205, K207, K208, K209 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k25, k27, k28, k29 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \ - { K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, XXX, k25, XXX, k27, k28, k29 } \ } - -#endif diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index 8c7edd57989..ae1c69656b5 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/alpha/rules.mk b/keyboards/alpha/rules.mk index 965667d9ad6..c6fa2140898 100755 --- a/keyboards/alpha/rules.mk +++ b/keyboards/alpha/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/alpine65/rules.mk b/keyboards/alpine65/rules.mk index f287f36642a..70187a24919 100644 --- a/keyboards/alpine65/rules.mk +++ b/keyboards/alpine65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 91eb9f2e117..4eee16c4085 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change to no to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/alu84/rules.mk b/keyboards/alu84/rules.mk index 6fb11c13bb5..90e8db917e6 100755 --- a/keyboards/alu84/rules.mk +++ b/keyboards/alu84/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amag23/rules.mk b/keyboards/amag23/rules.mk index 5fab15c3912..8f11a2b9f15 100644 --- a/keyboards/amag23/rules.mk +++ b/keyboards/amag23/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amj40/rules.mk b/keyboards/amj40/rules.mk index 81f481950a6..aeff331e7e1 100755 --- a/keyboards/amj40/rules.mk +++ b/keyboards/amj40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/amj96/amj96.h b/keyboards/amj96/amj96.h index 9fcd07d5dec..bd4e6883609 100644 --- a/keyboards/amj96/amj96.h +++ b/keyboards/amj96/amj96.h @@ -34,5 +34,5 @@ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, XXX, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \ + { K60, K61, K62, K63, K64, K65, K66, XXX, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \ } diff --git a/keyboards/amjkeyboard/amj66/rules.mk b/keyboards/amjkeyboard/amj66/rules.mk index 424b34fa2e5..550796f8618 100644 --- a/keyboards/amjkeyboard/amj66/rules.mk +++ b/keyboards/amjkeyboard/amj66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h index d9a05162156..976a7ab041a 100644 --- a/keyboards/amjpad/amjpad.h +++ b/keyboards/amjpad/amjpad.h @@ -1,5 +1,4 @@ -#ifndef AMJPAD_H -#define ADMJPAD_H +#pragma once #include "quantum.h" @@ -24,40 +23,36 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_numpad_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, k23, \ - k40, k41, k42, \ - k50, k52, k43 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, XXX}, \ - {k40, k41, k42, k43}, \ - {k50, XXX, k52, XXX} \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, XXX }, \ + { k40, k41, k42, k43 }, \ + { k50, XXX, k52, XXX } \ } #define LAYOUT_ortho_6x4( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53 \ -) \ -{ \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index 6bac897e73d..f1d57592b53 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/anavi/macropad8/keymaps/default/keymap.c b/keyboards/anavi/macropad8/keymaps/default/keymap.c index 5b69532e1b3..84be7f3c68e 100644 --- a/keyboards/anavi/macropad8/keymaps/default/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/default/keymap.c @@ -22,7 +22,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -57,5 +57,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/git/keymap.c b/keyboards/anavi/macropad8/keymaps/git/keymap.c index c1f1681ec09..9b7afb5d695 100644 --- a/keyboards/anavi/macropad8/keymaps/git/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/git/keymap.c @@ -105,7 +105,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -140,5 +140,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c index ba47550347c..e75d588478c 100644 --- a/keyboards/anavi/macropad8/keymaps/kicad/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kicad/keymap.c @@ -75,7 +75,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Layer: "), false); @@ -113,5 +113,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c index 61cedc81099..f99a22d7233 100644 --- a/keyboards/anavi/macropad8/keymaps/kodi/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/kodi/keymap.c @@ -41,7 +41,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -76,5 +76,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/obs/keymap.c b/keyboards/anavi/macropad8/keymaps/obs/keymap.c index e740482bbdb..1d9fd38eed1 100644 --- a/keyboards/anavi/macropad8/keymaps/obs/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/obs/keymap.c @@ -58,7 +58,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -93,5 +93,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c index ef47102fa56..965bbec4292 100644 --- a/keyboards/anavi/macropad8/keymaps/zoom/keymap.c +++ b/keyboards/anavi/macropad8/keymaps/zoom/keymap.c @@ -57,7 +57,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_ln_P(PSTR("ANAVI Macro Pad 8"), false); oled_write_P(PSTR("Active layer: "), false); @@ -92,5 +92,6 @@ void oled_task_user(void) { snprintf(rgbStatusLine2, sizeof(rgbStatusLine2), "h:%d s:%d v:%d", rgblight_get_hue(), rgblight_get_sat(), rgblight_get_val()); oled_write_ln(rgbStatusLine2, false); #endif + return false; } #endif diff --git a/keyboards/angel64/alpha/keymaps/default/keymap.c b/keyboards/angel64/alpha/keymaps/default/keymap.c index 802ff138bb3..0f2a8dada1a 100644 --- a/keyboards/angel64/alpha/keymaps/default/keymap.c +++ b/keyboards/angel64/alpha/keymaps/default/keymap.c @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -56,5 +56,6 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/angel64/rev1/keymaps/default/keymap.c b/keyboards/angel64/rev1/keymaps/default/keymap.c index ff06e418c16..7ad3964e24f 100644 --- a/keyboards/angel64/rev1/keymaps/default/keymap.c +++ b/keyboards/angel64/rev1/keymaps/default/keymap.c @@ -25,10 +25,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard LED Status oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c index 3780c5e745c..6c5184c1b3a 100644 --- a/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c +++ b/keyboards/angel64/rev1/keymaps/kakunpc/keymap.c @@ -173,7 +173,7 @@ void matrix_scan_user(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -191,5 +191,6 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/anomalykb/a65i/rules.mk b/keyboards/anomalykb/a65i/rules.mk index 22247fab3cc..22fb8d3fe78 100644 --- a/keyboards/anomalykb/a65i/rules.mk +++ b/keyboards/anomalykb/a65i/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/aos/tkl/rules.mk b/keyboards/aos/tkl/rules.mk index 0b052e33124..98872ee082e 100644 --- a/keyboards/aos/tkl/rules.mk +++ b/keyboards/aos/tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aozora/aozora.c b/keyboards/aozora/aozora.c new file mode 100644 index 00000000000..44668583489 --- /dev/null +++ b/keyboards/aozora/aozora.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#include "aozora.h" diff --git a/keyboards/aozora/aozora.h b/keyboards/aozora/aozora.h new file mode 100644 index 00000000000..30a4258ac8d --- /dev/null +++ b/keyboards/aozora/aozora.h @@ -0,0 +1,47 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, K3E, K3F, \ + K40, K41, K42, K44, K48, K49, K4A, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D, K3E, K3F }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, K48, K49, K4A, KC_NO, KC_NO, K4D, K4E, K4F }, \ +} + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0G, K0D, K0E, K0F, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K3G, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, K3F, \ + K40, K41, K42, K44, K48, K49, K4A, K4D, K4E, K4F \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, KC_NO, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E, K3F, K3G }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, K48, K49, K4A, KC_NO, KC_NO, K4D, K4E, K4F, KC_NO }, \ +} diff --git a/keyboards/aozora/config.h b/keyboards/aozora/config.h new file mode 100644 index 00000000000..67972a84b2b --- /dev/null +++ b/keyboards/aozora/config.h @@ -0,0 +1,48 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xE86A +#define DEVICE_VER 0x0001 +#define MANUFACTURER Salmon Cat Studio +#define PRODUCT Aozora + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D4, D6, D7, B4, B5, B6, C6, C7, F7, D2} + +#define DIODE_DIRECTION COL2ROW + +/* EEPROM for via */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/aozora/hotswap/config.h b/keyboards/aozora/hotswap/config.h deleted file mode 100644 index 60277f2635b..00000000000 --- a/keyboards/aozora/hotswap/config.h +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright 2021 Salmon Cat Studio - * - * 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 . - */ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xCA75 -#define PRODUCT_ID 0x4014 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Salmon Cat Studio -#define PRODUCT Aozora - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 16 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { F6, F5, F4, F1, F0 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D4, D6, D7, B4, B5, B6, C6, C7, F7 } - -#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/aozora/hotswap/hotswap.c b/keyboards/aozora/hotswap/hotswap.c deleted file mode 100644 index f8197c3c00e..00000000000 --- a/keyboards/aozora/hotswap/hotswap.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2021 Salmon Cat Studio - * - * 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 . - */ - -#include "hotswap.h" \ No newline at end of file diff --git a/keyboards/aozora/hotswap/hotswap.h b/keyboards/aozora/hotswap/hotswap.h deleted file mode 100644 index 5282aaf81cd..00000000000 --- a/keyboards/aozora/hotswap/hotswap.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 Salmon Cat Studio - * - * 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 . - */ - -#pragma once - -#include "quantum.h" - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, K3E, K3F, \ - K40, K41, K42, K44, K48, K49, K4A, K4D, K4E, K4F \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D, K3E, K3F }, \ - { K40, K41, K42, KC_NO, K44, KC_NO, KC_NO, KC_NO, K48, K49, K4A, KC_NO, KC_NO, K4D, K4E, K4F }, \ -} - diff --git a/keyboards/aozora/hotswap/info.json b/keyboards/aozora/hotswap/info.json deleted file mode 100644 index dbceb3b371f..00000000000 --- a/keyboards/aozora/hotswap/info.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "keyboard_name": "Aozora", - "url": "https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21", - "maintainer": "Phooood", - "layouts": { - "LAYOUT": { - "layout": [ - {"label":"K00 (F6,B0)", "x":0, "y":0}, - {"label":"K01 (F6,B1)", "x":1, "y":0}, - {"label":"K02 (F6,B2)", "x":2, "y":0}, - {"label":"K03 (F6,B3)", "x":3, "y":0}, - {"label":"K04 (F6,B7)", "x":4, "y":0}, - {"label":"K05 (F6,D0)", "x":5, "y":0}, - {"label":"K06 (F6,D1)", "x":6, "y":0}, - {"label":"K07 (F6,D4)", "x":7, "y":0}, - {"label":"K08 (F6,D6)", "x":8, "y":0}, - {"label":"K09 (F6,D7)", "x":9, "y":0}, - {"label":"K0A (F6,B4)", "x":10, "y":0}, - {"label":"K0B (F6,B5)", "x":11, "y":0}, - {"label":"K0C (F6,B6)", "x":12, "y":0}, - {"label":"K0D (F6,C6)", "x":13, "y":0, "w":2}, - {"label":"K0E (F6,C7)", "x":15.25, "y":0}, - {"label":"K0F (F6,F7)", "x":16.25, "y":0}, - {"label":"K10 (F5,B0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (F5,B1)", "x":1.5, "y":1}, - {"label":"K12 (F5,B2)", "x":2.5, "y":1}, - {"label":"K13 (F5,B3)", "x":3.5, "y":1}, - {"label":"K14 (F5,B7)", "x":4.5, "y":1}, - {"label":"K15 (F5,D0)", "x":5.5, "y":1}, - {"label":"K16 (F5,D1)", "x":6.5, "y":1}, - {"label":"K17 (F5,D4)", "x":7.5, "y":1}, - {"label":"K18 (F5,D6)", "x":8.5, "y":1}, - {"label":"K19 (F5,D7)", "x":9.5, "y":1}, - {"label":"K1A (F5,B4)", "x":10.5, "y":1}, - {"label":"K1B (F5,B5)", "x":11.5, "y":1}, - {"label":"K1C (F5,B6)", "x":12.5, "y":1}, - {"label":"K1D (F5,C6)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (F5,C7)", "x":15.25, "y":1}, - {"label":"K1F (F5,F7)", "x":16.25, "y":1}, - {"label":"K20 (F4,B0)", "x":0, "y":2, "w":1.75}, - {"label":"K21 (F4,B1)", "x":1.75, "y":2}, - {"label":"K22 (F4,B2)", "x":2.75, "y":2}, - {"label":"K23 (F4,B3)", "x":3.75, "y":2}, - {"label":"K24 (F4,B7)", "x":4.75, "y":2}, - {"label":"K25 (F4,D0)", "x":5.75, "y":2}, - {"label":"K26 (F4,D1)", "x":6.75, "y":2}, - {"label":"K27 (F4,D4)", "x":7.75, "y":2}, - {"label":"K28 (F4,D6)", "x":8.75, "y":2}, - {"label":"K29 (F4,D7)", "x":9.75, "y":2}, - {"label":"K2A (F4,B4)", "x":10.75, "y":2}, - {"label":"K2B (F4,B5)", "x":11.75, "y":2}, - {"label":"K2D (F4,C6)", "x":12.75, "y":2, "w":2.25}, - {"label":"K30 (F1,B0)", "x":0, "y":3, "w":2.25}, - {"label":"K31 (F1,B1)", "x":2.25, "y":3}, - {"label":"K32 (F1,B2)", "x":3.25, "y":3}, - {"label":"K33 (F1,B3)", "x":4.25, "y":3}, - {"label":"K34 (F1,B7)", "x":5.25, "y":3}, - {"label":"K35 (F1,D0)", "x":6.25, "y":3}, - {"label":"K36 (F1,D1)", "x":7.25, "y":3}, - {"label":"K37 (F1,D4)", "x":8.25, "y":3}, - {"label":"K38 (F1,D6)", "x":9.25, "y":3}, - {"label":"K39 (F1,D7)", "x":10.25, "y":3}, - {"label":"K3A (F1,B4)", "x":11.25, "y":3}, - {"label":"K3D (F1,C6)", "x":12.25, "y":3, "w":2.75}, - {"label":"K3E (F1,C7)", "x":15.25, "y":3}, - {"label":"K3F (F1,F7)", "x":16.25, "y":3}, - {"label":"K40 (F0,B0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (F0,B1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (F0,B2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K44 (F0,B7)", "x":3.75, "y":4, "w":6.25}, - {"label":"K48 (F0,D6)", "x":10, "y":4, "w":1.25}, - {"label":"K49 (F0,D7)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4A (F0,B4)", "x":12.5, "y":4, "w":1.25}, - {"label":"K4D (F0,C6)", "x":14.25, "y":4}, - {"label":"K4E (F0,C7)", "x":15.25, "y":4}, - {"label":"K4F (F0,F7)", "x":16.25, "y":4} - ] - } - } -} diff --git a/keyboards/aozora/hotswap/keymaps/default/keymap.c b/keyboards/aozora/hotswap/keymaps/default/keymap.c deleted file mode 100644 index f941f5dff6d..00000000000 --- a/keyboards/aozora/hotswap/keymaps/default/keymap.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2021 Salmon Cat Studio - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR, KC_PGUP, - KC_TAB, 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_DEL, KC_PGDN, - KC_CAPS, 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, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), - -}; diff --git a/keyboards/aozora/hotswap/readme.md b/keyboards/aozora/hotswap/readme.md deleted file mode 100644 index 157b58c0b82..00000000000 --- a/keyboards/aozora/hotswap/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# Aozora - -A 65%-style 69-key keyboard featuring a cloud-shaped badge. - -![SCS Aozora](https://i.imgur.com/dL5nonc.jpg) - -* Keyboard Maintainer: [Food](https://github.com/Phooood) -* Hardware Supported: [Aozora](https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21) -* Hardware Availability: [salmoncat.studio](https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21) | GB is over. - -Make example for this keyboard (after setting up your build environment): - - make aozora/hotswap:default - -To reset, press the button on the back of the PCB. - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/aozora/hotswap/rules.mk b/keyboards/aozora/hotswap/rules.mk deleted file mode 100644 index a913ba36ad0..00000000000 --- a/keyboards/aozora/hotswap/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output - diff --git a/keyboards/aozora/info.json b/keyboards/aozora/info.json new file mode 100644 index 00000000000..0f442cc12eb --- /dev/null +++ b/keyboards/aozora/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "Aozora", + "url": "https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21", + "maintainer": "Phooood", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"K00 (F6,B0)", "x":0, "y":0}, + {"label":"K01 (F6,B1)", "x":1, "y":0}, + {"label":"K02 (F6,B2)", "x":2, "y":0}, + {"label":"K03 (F6,B3)", "x":3, "y":0}, + {"label":"K04 (F6,B7)", "x":4, "y":0}, + {"label":"K05 (F6,D0)", "x":5, "y":0}, + {"label":"K06 (F6,D1)", "x":6, "y":0}, + {"label":"K07 (F6,D4)", "x":7, "y":0}, + {"label":"K08 (F6,D6)", "x":8, "y":0}, + {"label":"K09 (F6,D7)", "x":9, "y":0}, + {"label":"K0A (F6,B4)", "x":10, "y":0}, + {"label":"K0B (F6,B5)", "x":11, "y":0}, + {"label":"K0C (F6,B6)", "x":12, "y":0}, + {"label":"K0D (F6,C6)", "x":13, "y":0, "w":2}, + {"label":"K0E (F6,C7)", "x":15.25, "y":0}, + {"label":"K0F (F6,F7)", "x":16.25, "y":0}, + {"label":"K10 (F5,B0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (F5,B1)", "x":1.5, "y":1}, + {"label":"K12 (F5,B2)", "x":2.5, "y":1}, + {"label":"K13 (F5,B3)", "x":3.5, "y":1}, + {"label":"K14 (F5,B7)", "x":4.5, "y":1}, + {"label":"K15 (F5,D0)", "x":5.5, "y":1}, + {"label":"K16 (F5,D1)", "x":6.5, "y":1}, + {"label":"K17 (F5,D4)", "x":7.5, "y":1}, + {"label":"K18 (F5,D6)", "x":8.5, "y":1}, + {"label":"K19 (F5,D7)", "x":9.5, "y":1}, + {"label":"K1A (F5,B4)", "x":10.5, "y":1}, + {"label":"K1B (F5,B5)", "x":11.5, "y":1}, + {"label":"K1C (F5,B6)", "x":12.5, "y":1}, + {"label":"K1D (F5,C6)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (F5,C7)", "x":15.25, "y":1}, + {"label":"K1F (F5,F7)", "x":16.25, "y":1}, + {"label":"K20 (F4,B0)", "x":0, "y":2, "w":1.75}, + {"label":"K21 (F4,B1)", "x":1.75, "y":2}, + {"label":"K22 (F4,B2)", "x":2.75, "y":2}, + {"label":"K23 (F4,B3)", "x":3.75, "y":2}, + {"label":"K24 (F4,B7)", "x":4.75, "y":2}, + {"label":"K25 (F4,D0)", "x":5.75, "y":2}, + {"label":"K26 (F4,D1)", "x":6.75, "y":2}, + {"label":"K27 (F4,D4)", "x":7.75, "y":2}, + {"label":"K28 (F4,D6)", "x":8.75, "y":2}, + {"label":"K29 (F4,D7)", "x":9.75, "y":2}, + {"label":"K2A (F4,B4)", "x":10.75, "y":2}, + {"label":"K2B (F4,B5)", "x":11.75, "y":2}, + {"label":"K2D (F4,C6)", "x":12.75, "y":2, "w":2.25}, + {"label":"K30 (F1,B0)", "x":0, "y":3, "w":2.25}, + {"label":"K31 (F1,B1)", "x":2.25, "y":3}, + {"label":"K32 (F1,B2)", "x":3.25, "y":3}, + {"label":"K33 (F1,B3)", "x":4.25, "y":3}, + {"label":"K34 (F1,B7)", "x":5.25, "y":3}, + {"label":"K35 (F1,D0)", "x":6.25, "y":3}, + {"label":"K36 (F1,D1)", "x":7.25, "y":3}, + {"label":"K37 (F1,D4)", "x":8.25, "y":3}, + {"label":"K38 (F1,D6)", "x":9.25, "y":3}, + {"label":"K39 (F1,D7)", "x":10.25, "y":3}, + {"label":"K3A (F1,B4)", "x":11.25, "y":3}, + {"label":"K3D (F1,C6)", "x":12.25, "y":3, "w":2.75}, + {"label":"K3E (F1,C7)", "x":15.25, "y":3}, + {"label":"K3F (F1,F7)", "x":16.25, "y":3}, + {"label":"K40 (F0,B0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (F0,B1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (F0,B2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K44 (F0,B7)", "x":3.75, "y":4, "w":6.25}, + {"label":"K48 (F0,D6)", "x":10, "y":4, "w":1.25}, + {"label":"K49 (F0,D7)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4A (F0,B4)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4D (F0,C6)", "x":14.25, "y":4}, + {"label":"K4E (F0,C7)", "x":15.25, "y":4}, + {"label":"K4F (F0,F7)", "x":16.25, "y":4} + ] + }, + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"|", "x":13, "y":1.25}, {"label":"Backspace", "x":14, "y":1.25}, {"label":"Insert", "x":15.25, "y":1.25}, {"label":"Home", "x":16.25, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"Del", "x":15.25, "y":2.25}, {"label":"End", "x":16.25, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"~", "x":12.75, "y":3.25}, {"label":"Enter", "x":13.75, "y":3.25, "w":1.25}, {"label":"Shift", "x":0, "y":4.25, "w":1.25}, {"label":"|", "x":1.25, "y":4.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"\\", "x":12.25, "y":4.25}, {"label":"Shift", "x":13.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":15.25, "y":4.25}, {"label":"Fn", "x":16.25, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":5.25, "w":1.25}, {"label":"\u2190", "x":14.25, "y":5.25}, {"label":"\u2193", "x":15.25, "y":5.25}, {"label":"\u2192", "x":16.25, "y":5.25}] + } + } +} diff --git a/keyboards/aozora/keymaps/default/keymap.c b/keyboards/aozora/keymaps/default/keymap.c new file mode 100644 index 00000000000..8229aaa29a7 --- /dev/null +++ b/keyboards/aozora/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_PSCR, KC_PGUP, + KC_TAB, 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_DEL, KC_PGDN, + KC_CAPS, 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, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/aozora/keymaps/default_all/keymap.c b/keyboards/aozora/keymaps/default_all/keymap.c new file mode 100644 index 00000000000..3376f2e8cd3 --- /dev/null +++ b/keyboards/aozora/keymaps/default_all/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "sendstring_jis.h" // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_PSCR, KC_PGUP, + KC_TAB, 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_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_PIPE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/aozora/keymaps/via/keymap.c b/keyboards/aozora/keymaps/via/keymap.c new file mode 100644 index 00000000000..3376f2e8cd3 --- /dev/null +++ b/keyboards/aozora/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2021 Salmon Cat Studio + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "sendstring_jis.h" // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_INT3, KC_BSPC, KC_PSCR, KC_PGUP, + KC_TAB, 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_DEL, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_PIPE, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_RSFT, KC_UP, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/aozora/keymaps/via/rules.mk b/keyboards/aozora/keymaps/via/rules.mk new file mode 100644 index 00000000000..32f462d06ca --- /dev/null +++ b/keyboards/aozora/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no \ No newline at end of file diff --git a/keyboards/aozora/readme.md b/keyboards/aozora/readme.md new file mode 100644 index 00000000000..8d95940f874 --- /dev/null +++ b/keyboards/aozora/readme.md @@ -0,0 +1,17 @@ +# Aozora + +A 65%-style 69-key keyboard featuring a cloud-shaped badge. + +![SCS Aozora](https://i.imgur.com/dL5nonc.jpg) + +* Keyboard Maintainer: [Food](https://github.com/Phooood) +* Hardware Supported: [Aozora](https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21) +* Hardware Availability: [salmoncat.studio](https://salmoncat.studio/pages/aozora-%E9%9D%92%E7%A9%BA-6-9-21-7-10-21) | GB is over. + +Make example for this keyboard (after setting up your build environment): + + make aozora:default + +To reset, press the button on the back of the PCB. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/aozora/rules.mk b/keyboards/aozora/rules.mk new file mode 100644 index 00000000000..59dae222fbe --- /dev/null +++ b/keyboards/aozora/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + diff --git a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c index 5f3ec5b5ddb..9c8ac545b23 100644 --- a/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c +++ b/keyboards/aplyard/aplx6/rev2/keymaps/default/keymap.c @@ -113,8 +113,9 @@ static void render_logo(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } #endif diff --git a/keyboards/arabica37/keymaps/default/keymap.c b/keyboards/arabica37/keymaps/default/keymap.c index 5a363152d7d..5a7a3c27380 100644 --- a/keyboards/arabica37/keymaps/default/keymap.c +++ b/keyboards/arabica37/keymaps/default/keymap.c @@ -149,7 +149,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { void render_status(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -195,5 +195,6 @@ void oled_task_user(void) { } else { render_logo(); // Renders a static logo } + return false; } #endif diff --git a/keyboards/arch_36/keymaps/default/keymap.c b/keyboards/arch_36/keymaps/default/keymap.c index 5dff792067c..797ca8798fe 100644 --- a/keyboards/arch_36/keymaps/default/keymap.c +++ b/keyboards/arch_36/keymaps/default/keymap.c @@ -298,12 +298,13 @@ static void render_logo(void) { oled_write_raw_P(logo, 1024); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/arch_36/keymaps/obosob/keymap.c b/keyboards/arch_36/keymaps/obosob/keymap.c index 00e1a837baa..104ee378f51 100644 --- a/keyboards/arch_36/keymaps/obosob/keymap.c +++ b/keyboards/arch_36/keymaps/obosob/keymap.c @@ -807,12 +807,13 @@ static void render_logo(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/ares/rules.mk b/keyboards/ares/rules.mk index d726cc5ec04..bd8029ae8d7 100644 --- a/keyboards/ares/rules.mk +++ b/keyboards/ares/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/arisu/rules.mk b/keyboards/arisu/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/arisu/rules.mk +++ b/keyboards/arisu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/arrayperipherals/1x4p1/rules.mk b/keyboards/arrayperipherals/1x4p1/rules.mk index ddfb1280e27..2c15412036d 100644 --- a/keyboards/arrayperipherals/1x4p1/rules.mk +++ b/keyboards/arrayperipherals/1x4p1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ash1800/rules.mk b/keyboards/ash1800/rules.mk index 058392135a7..390fda9c3b5 100644 --- a/keyboards/ash1800/rules.mk +++ b/keyboards/ash1800/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ash_xiix/rules.mk b/keyboards/ash_xiix/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/ash_xiix/rules.mk +++ b/keyboards/ash_xiix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ashpil/modelm_usbc/rules.mk b/keyboards/ashpil/modelm_usbc/rules.mk index 8b717faa402..f731f5e3e32 100644 --- a/keyboards/ashpil/modelm_usbc/rules.mk +++ b/keyboards/ashpil/modelm_usbc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/at101_bh/rules.mk b/keyboards/at101_bh/rules.mk index 3d435af4530..5517774dcf6 100644 --- a/keyboards/at101_bh/rules.mk +++ b/keyboards/at101_bh/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/atreus/feather/rules.mk b/keyboards/atreus/feather/rules.mk index 35d74315394..ad0b4a5046b 100644 --- a/keyboards/atreus/feather/rules.mk +++ b/keyboards/atreus/feather/rules.mk @@ -10,5 +10,6 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE CONSOLE_ENABLE = no diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h index 2d4ab99c627..31baef145f0 100644 --- a/keyboards/atreus62/config.h +++ b/keyboards/atreus62/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -71,5 +70,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/atxkb/1894/rules.mk b/keyboards/atxkb/1894/rules.mk index ac64cc93f6b..7f128bc58e3 100644 --- a/keyboards/atxkb/1894/rules.mk +++ b/keyboards/atxkb/1894/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/aves65/rules.mk b/keyboards/aves65/rules.mk index 579f11a46d9..9bbae521a47 100644 --- a/keyboards/aves65/rules.mk +++ b/keyboards/aves65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/axolstudio/helpo/rules.mk b/keyboards/axolstudio/helpo/rules.mk index dffe35fa387..9354e10b87a 100644 --- a/keyboards/axolstudio/helpo/rules.mk +++ b/keyboards/axolstudio/helpo/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/axolstudio/yeti/rules.mk b/keyboards/axolstudio/yeti/rules.mk index 9374846d491..9182c69fdd8 100644 --- a/keyboards/axolstudio/yeti/rules.mk +++ b/keyboards/axolstudio/yeti/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/baguette/baguette.h b/keyboards/baguette/baguette.h index e3945bea7ee..70440f76272 100644 --- a/keyboards/baguette/baguette.h +++ b/keyboards/baguette/baguette.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef BAGUETTE_H -#define BAGUETTE_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -27,33 +29,29 @@ * represents the switch matrix. */ #define LAYOUT_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K42, K43, K47, K4B, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k42, k43, k47, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K42, K43, K47, K4B, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K1D, K2D, KC_NO, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k42, k43, k47, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/bakeneko60/rules.mk b/keyboards/bakeneko60/rules.mk index 1490d263c07..abec374090e 100644 --- a/keyboards/bakeneko60/rules.mk +++ b/keyboards/bakeneko60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bakeneko65/rev2/rules.mk b/keyboards/bakeneko65/rev2/rules.mk index a3cd44fa428..e881cb00119 100644 --- a/keyboards/bakeneko65/rev2/rules.mk +++ b/keyboards/bakeneko65/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bakeneko65/rev3/rules.mk b/keyboards/bakeneko65/rev3/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/bakeneko65/rev3/rules.mk +++ b/keyboards/bakeneko65/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bandominedoni/config.h b/keyboards/bandominedoni/config.h index ee0de340a48..629c6af884b 100644 --- a/keyboards/bandominedoni/config.h +++ b/keyboards/bandominedoni/config.h @@ -140,145 +140,113 @@ // # define REDUCE_RGB_MATRIX_EFFECTS_2 // # ifdef AUDIO_ENABLE -# ifdef CONSOLE_ENABLE -// # define DISABLE_RGB_MATRIX_SOLID_COLOR -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_HUE_BREATHING -# define DISABLE_RGB_MATRIX_HUE_PENDULUM -# define DISABLE_RGB_MATRIX_HUE_WAVE -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# else -# define DISABLE_RGB_MATRIX_SOLID_COLOR -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - -// RAINDROPS don't match well with layer LED indicator (oc) using rgb_matrix_set_color(). -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// Recommendend not to use then. - -# if defined(REDUCE_RGB_MATRIX_EFFECTS) || defined(VIA_ENABLE) +# ifdef CONSOLE_ENABLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# else +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_FRACTAL +# define ENABLE_RGB_MATRIX_PIXEL_RAIN + +# if !defined(REDUCE_RGB_MATRIX_EFFECTS) && !defined(VIA_ENABLE) // # ifdef REDUCE_RGB_MATRIX_EFFECTS -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# endif - -# define DISABLE_RGB_MATRIX_HUE_BREATHING -# define DISABLE_RGB_MATRIX_HUE_PENDULUM -# define DISABLE_RGB_MATRIX_HUE_WAVE -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - -# if defined(REDUCE_RGB_MATRIX_EFFECTS_2) || defined(VIA_ENABLE) +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# endif + +// #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_FRACTAL +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + +# if !defined(REDUCE_RGB_MATRIX_EFFECTS_2) && !defined(VIA_ENABLE) // # ifdef REDUCE_RGB_MATRIX_EFFECTS_2 -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# endif -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# endif // AUDIO_ENABLE - -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_BREATHING -// #define DISABLE_RGB_MATRIX_BAND_SAT // white background ver. of _BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// #define DISABLE_RGB_MATRIX_DUAL_BEACON -// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS //White ver of above. -// #define DISABLE_RGB_MATRIX_HUE_BREATHING -// #define DISABLE_RGB_MATRIX_HUE_PENDULUM -// #define DISABLE_RGB_MATRIX_HUE_WAVE -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# endif +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +# endif // AUDIO_ENABLE + +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define ENABLE_RGB_MATRIX_CYCLE_ALL +// #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #define ENABLE_RGB_MATRIX_DUAL_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_FRACTAL +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN + +// #define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif // RGB_MATRIX_ENABLE /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/bandominedoni/rgb_matrix_user.inc b/keyboards/bandominedoni/rgb_matrix_user.inc index 72f5b4f6648..77ad22c1ce7 100644 --- a/keyboards/bandominedoni/rgb_matrix_user.inc +++ b/keyboards/bandominedoni/rgb_matrix_user.inc @@ -9,8 +9,8 @@ bool my_party_rocks(effect_params_t* params) { RGB rgb = rgb_matrix_hsv_to_rgb(hsv); // rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); rgb_matrix_set_color_all(rgb.r, rgb.g, rgb.b); - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } -# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // RGB_MATRIX_KEYREACTIVE_ENABLED +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/keyboards/bantam44/bantam44.h b/keyboards/bantam44/bantam44.h index 38afbbdde70..f680f9eac26 100644 --- a/keyboards/bantam44/bantam44.h +++ b/keyboards/bantam44/bantam44.h @@ -1,23 +1,21 @@ -#ifndef BANTAM44_H -#define BANTAM44_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38 \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k36, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, k36, XXX, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index b468b28ccb6..6cff8b2899e 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk index e61b995e629..209890d9a2c 100644 --- a/keyboards/bantam44/rules.mk +++ b/keyboards/bantam44/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/barleycorn/rules.mk b/keyboards/barleycorn/rules.mk index 5d335fe9a38..3a6d577687d 100644 --- a/keyboards/barleycorn/rules.mk +++ b/keyboards/barleycorn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/barleycorn_smd/rules.mk b/keyboards/barleycorn_smd/rules.mk index 1c8ae60e8f9..1cb4022709e 100644 --- a/keyboards/barleycorn_smd/rules.mk +++ b/keyboards/barleycorn_smd/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/barracuda/rules.mk b/keyboards/barracuda/rules.mk index 74ae3960000..19b49ab12f1 100644 --- a/keyboards/barracuda/rules.mk +++ b/keyboards/barracuda/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/basekeys/slice/keymaps/default/keymap.c b/keyboards/basekeys/slice/keymaps/default/keymap.c index ad5e9d9ffe7..c7fc3fed510 100644 --- a/keyboards/basekeys/slice/keymaps/default/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default/keymap.c @@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -142,5 +142,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c index 54d41cc382f..203bd0804c8 100644 --- a/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c +++ b/keyboards/basekeys/slice/keymaps/default_split_left_space/keymap.c @@ -118,7 +118,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -142,5 +142,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c index 55d914cbc90..375daaca953 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/2moons_rgb/keymap.c @@ -202,7 +202,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -232,5 +232,6 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif diff --git a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c index d0893ae8622..fa5abd90a5d 100644 --- a/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c +++ b/keyboards/basekeys/slice/rev1_rgb/keymaps/via/keymap.c @@ -99,7 +99,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return isLeftHand ? OLED_ROTATION_180 : OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -123,5 +123,6 @@ void oled_task_user(void) { } else { render_qmk_logo(); } + return false; } #endif diff --git a/keyboards/basekeys/trifecta/config.h b/keyboards/basekeys/trifecta/config.h index 28c9c18fb27..ffdf6d2d281 100644 --- a/keyboards/basekeys/trifecta/config.h +++ b/keyboards/basekeys/trifecta/config.h @@ -92,32 +92,53 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif diff --git a/keyboards/basekeys/trifecta/rules.mk b/keyboards/basekeys/trifecta/rules.mk index df62bcfabde..6842277d2d6 100644 --- a/keyboards/basekeys/trifecta/rules.mk +++ b/keyboards/basekeys/trifecta/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/basketweave/rules.mk b/keyboards/basketweave/rules.mk index 37814622630..ce023436b4f 100644 --- a/keyboards/basketweave/rules.mk +++ b/keyboards/basketweave/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/scylla/config.h b/keyboards/bastardkb/scylla/config.h index d04dcb97fc2..d876b5d0186 100644 --- a/keyboards/bastardkb/scylla/config.h +++ b/keyboards/bastardkb/scylla/config.h @@ -54,4 +54,52 @@ # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/scylla/rules.mk b/keyboards/bastardkb/scylla/rules.mk index 014da5c3aa9..5d35ab22bae 100644 --- a/keyboards/bastardkb/scylla/rules.mk +++ b/keyboards/bastardkb/scylla/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/skeletyl/config.h b/keyboards/bastardkb/skeletyl/config.h index 33f3a501090..a7530a5e73e 100644 --- a/keyboards/bastardkb/skeletyl/config.h +++ b/keyboards/bastardkb/skeletyl/config.h @@ -52,4 +52,52 @@ # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/skeletyl/rules.mk b/keyboards/bastardkb/skeletyl/rules.mk index 31aec2232ef..f66d8f4494e 100644 --- a/keyboards/bastardkb/skeletyl/rules.mk +++ b/keyboards/bastardkb/skeletyl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/tbk/rules.mk b/keyboards/bastardkb/tbk/rules.mk index 4b9b97c3e38..aeb183666e4 100644 --- a/keyboards/bastardkb/tbk/rules.mk +++ b/keyboards/bastardkb/tbk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bastardkb/tbkmini/config.h b/keyboards/bastardkb/tbkmini/config.h index a09dafe4882..b2308bc8ed6 100644 --- a/keyboards/bastardkb/tbkmini/config.h +++ b/keyboards/bastardkb/tbkmini/config.h @@ -55,4 +55,52 @@ # define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_DISABLE_WHEN_USB_SUSPENDED # define RGB_MATRIX_KEYPRESSES +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/bastardkb/tbkmini/rules.mk b/keyboards/bastardkb/tbkmini/rules.mk index 009cb4bbc1c..5ea23a33a56 100644 --- a/keyboards/bastardkb/tbkmini/rules.mk +++ b/keyboards/bastardkb/tbkmini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/beatervan/rules.mk b/keyboards/beatervan/rules.mk index 5e0249f4d12..f835a7c2d04 100644 --- a/keyboards/beatervan/rules.mk +++ b/keyboards/beatervan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bemeier/bmek/rev1/rules.mk b/keyboards/bemeier/bmek/rev1/rules.mk index c2c08206c75..9e6bcd76539 100755 --- a/keyboards/bemeier/bmek/rev1/rules.mk +++ b/keyboards/bemeier/bmek/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bemeier/bmek/rev2/rules.mk b/keyboards/bemeier/bmek/rev2/rules.mk index c2c08206c75..9e6bcd76539 100755 --- a/keyboards/bemeier/bmek/rev2/rules.mk +++ b/keyboards/bemeier/bmek/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bemeier/bmek/rev3/rules.mk b/keyboards/bemeier/bmek/rev3/rules.mk index c2c08206c75..9e6bcd76539 100755 --- a/keyboards/bemeier/bmek/rev3/rules.mk +++ b/keyboards/bemeier/bmek/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bfake/bfake.h b/keyboards/bfake/bfake.h index 599ea0f870e..59a40de2f86 100644 --- a/keyboards/bfake/bfake.h +++ b/keyboards/bfake/bfake.h @@ -15,43 +15,42 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef BFAKE_H -#define BFAKE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K10, K60,\ - K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ - K19, K13, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, K50,\ - K09, K00, K39, K30, K59, K69, K57, K29\ -){ \ - { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ - { KC_NO, K11, K12, K13, K14, K15, K16, KC_NO, K18, K19, K10}, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, K50}, \ - { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ + k61, k71, k72, k73, k74, k64, k65, k75, k76, k77, k78, k68, k66, k1A, k6A,\ + k11, k01, k02, k03, k04, k14, k15, k05, k06, k07, k08, k18, k16, k2A, \ + k12, k21, k22, k23, k24, k34, k35, k25, k26, k27, k28, k38, k4A, \ + k19, k13, k41, k42, k43, k44, k54, k55, k45, k46, k47, k58, k49, k5A, \ + k09, k0A, k39, k3A, k59, k69, k57, k29 \ +) { \ + { XXX, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { XXX, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { XXX, XXX, XXX, XXX, k34, k35, XXX, XXX, k38, k39, k3A }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49, k4A }, \ + { XXX, XXX, XXX, XXX, k54, k55, XXX, k57, k58, k59, k5A }, \ + { XXX, k61, XXX, XXX, k64, k65, k66, XXX, k68, k69, k6A }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX } \ } #define LAYOUT_60_ansi( \ - K61, K71, K72, K73, K74, K64, K65, K75, K76, K77, K78, K68, K66, K60,\ - K11, K01, K02, K03, K04, K14, K15, K05, K06, K07, K08, K18, K16, K20, \ - K12, K21, K22, K23, K24, K34, K35, K25, K26, K27, K28, K38, K40, \ - K19, K41, K42, K43, K44, K54, K55, K45, K46, K47, K58, K49, \ - K09, K00, K39, K30, K59, K69, K57, K29\ -){ \ - { KC_NO, K01, K02, K03, K04, K05, K06, K07, K08, K09, K00}, \ - { KC_NO, K11, K12, KC_NO, K14, K15, K16, KC_NO, K18, K19, KC_NO}, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K20}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K34, K35, KC_NO, KC_NO, K38, K39, K30}, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, KC_NO, K49, K40}, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K54, K55, KC_NO, K57, K58, K59, KC_NO}, \ - { KC_NO, K61, KC_NO, KC_NO, K64, K65, K66, KC_NO, K68, K69, K60}, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77, K78, KC_NO, KC_NO}, \ + k61, k71, k72, k73, k74, k64, k65, k75, k76, k77, k78, k68, k66, k6A, \ + k11, k01, k02, k03, k04, k14, k15, k05, k06, k07, k08, k18, k16, k2A, \ + k12, k21, k22, k23, k24, k34, k35, k25, k26, k27, k28, k38, k4A, \ + k19, k41, k42, k43, k44, k54, k55, k45, k46, k47, k58, k49, \ + k09, k0A, k39, k3A, k59, k69, k57, k29 \ +) { \ + { XXX, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { XXX, k11, k12, XXX, k14, k15, k16, XXX, k18, k19, XXX }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { XXX, XXX, XXX, XXX, k34, k35, XXX, XXX, k38, k39, k3A }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, XXX, k49, k4A }, \ + { XXX, XXX, XXX, XXX, k54, k55, XXX, k57, k58, k59, XXX }, \ + { XXX, k61, XXX, XXX, k64, k65, k66, XXX, k68, k69, k6A }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX } \ } - -#endif diff --git a/keyboards/bfake/rules.mk b/keyboards/bfake/rules.mk index 6f95a118f7d..5b70617255f 100644 --- a/keyboards/bfake/rules.mk +++ b/keyboards/bfake/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/bigseries/1key/1key.h b/keyboards/bigseries/1key/1key.h index 34414077986..6e5ddcc7606 100755 --- a/keyboards/bigseries/1key/1key.h +++ b/keyboards/bigseries/1key/1key.h @@ -14,15 +14,13 @@ 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 . */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00 \ + k00 \ ) { \ - { K00 } \ + { k00 } \ } - -#endif diff --git a/keyboards/bigseries/1key/config.h b/keyboards/bigseries/1key/config.h index f26b242128f..f31a7fc0575 100755 --- a/keyboards/bigseries/1key/config.h +++ b/keyboards/bigseries/1key/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see . #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/2key/2key.h b/keyboards/bigseries/2key/2key.h index dcbf2f764c4..eff82fef936 100755 --- a/keyboards/bigseries/2key/2key.h +++ b/keyboards/bigseries/2key/2key.h @@ -14,15 +14,13 @@ 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 . */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01 \ + k00, k01 \ ) { \ - { K00, K01 } \ + { k00, k01 } \ } - -#endif diff --git a/keyboards/bigseries/2key/config.h b/keyboards/bigseries/2key/config.h index 4f75e28470f..53866a15d1c 100755 --- a/keyboards/bigseries/2key/config.h +++ b/keyboards/bigseries/2key/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see . #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/3key/3key.h b/keyboards/bigseries/3key/3key.h index 6aa843c263f..caee1e45519 100755 --- a/keyboards/bigseries/3key/3key.h +++ b/keyboards/bigseries/3key/3key.h @@ -14,15 +14,13 @@ 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 . */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02 \ + k00, k01, k02 \ ) { \ - { K00, K01, K02 } \ + { k00, k01, k02 } \ } - -#endif diff --git a/keyboards/bigseries/3key/config.h b/keyboards/bigseries/3key/config.h index a4a36945428..4a474cc3d14 100755 --- a/keyboards/bigseries/3key/config.h +++ b/keyboards/bigseries/3key/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see . #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/bigseries/4key/4key.h b/keyboards/bigseries/4key/4key.h index 21373fdeda4..7e9ff7a7935 100755 --- a/keyboards/bigseries/4key/4key.h +++ b/keyboards/bigseries/4key/4key.h @@ -14,17 +14,15 @@ 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 . */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, \ - K10, K11 \ + k00, k01, \ + k10, k11 \ ) { \ - { K00, K01 }, \ - { K10, K11 } \ + { k00, k01 }, \ + { k10, k11 } \ } - -#endif diff --git a/keyboards/bigseries/4key/config.h b/keyboards/bigseries/4key/config.h index 3e965357990..c1635022de2 100755 --- a/keyboards/bigseries/4key/config.h +++ b/keyboards/bigseries/4key/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -55,5 +55,3 @@ along with this program. If not, see . #endif #define RGBLIGHT_LIMIT_VAL 128 #endif - -#endif diff --git a/keyboards/binepad/bn003/rules.mk b/keyboards/binepad/bn003/rules.mk index 576d4ef5f27..10e9616d6fd 100644 --- a/keyboards/binepad/bn003/rules.mk +++ b/keyboards/binepad/bn003/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bioi/g60/rules.mk b/keyboards/bioi/g60/rules.mk index 5a524890ef0..43a65a3d368 100644 --- a/keyboards/bioi/g60/rules.mk +++ b/keyboards/bioi/g60/rules.mk @@ -18,7 +18,7 @@ OPT_DEFS += -DUSART1_ENABLED # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/g60ble/rules.mk b/keyboards/bioi/g60ble/rules.mk index 6b17e337a10..58cfbb46ada 100644 --- a/keyboards/bioi/g60ble/rules.mk +++ b/keyboards/bioi/g60ble/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/morgan65/rules.mk b/keyboards/bioi/morgan65/rules.mk index 5a524890ef0..43a65a3d368 100644 --- a/keyboards/bioi/morgan65/rules.mk +++ b/keyboards/bioi/morgan65/rules.mk @@ -18,7 +18,7 @@ OPT_DEFS += -DUSART1_ENABLED # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bioi/s65/rules.mk b/keyboards/bioi/s65/rules.mk index 0c4c1929fa6..9c35a83c205 100644 --- a/keyboards/bioi/s65/rules.mk +++ b/keyboards/bioi/s65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/blackplum/rules.mk b/keyboards/blackplum/rules.mk index b969665f4e8..49822a44ea1 100644 --- a/keyboards/blackplum/rules.mk +++ b/keyboards/blackplum/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/blockey/blockey.h b/keyboards/blockey/blockey.h index fa7624be76e..7b007a2e978 100644 --- a/keyboards/blockey/blockey.h +++ b/keyboards/blockey/blockey.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef BLOCKEY_H -#define BLOCKEY_H + +#pragma once #include "quantum.h" @@ -26,23 +26,20 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ - k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, \ - k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, \ - k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, k54, \ - k55, k56, k57, k58, k59, k60, k61, k62 \ -) \ -{ \ - { k01, k02, k03, k04, k05, k06, k07 }, \ - { k15, k16, k17, k18, k19, k20, k21 }, \ - { k29, k30, k31, k32, k33, k34, k35 }, \ - { k42, k43, k44, k45, k46, k47, k48 }, \ - { k55, k56, k57, k58, XXX, XXX, k59 }, \ - { k08, k09, k10, k11, k12, k13, k14 }, \ - { k22, k23, k24, k25, k26, k27, k28 }, \ - { k36, k37, k38, k39, k40, k41, XXX }, \ - { k49, k50, k51, k52, k53, k54, XXX }, \ - { XXX, XXX, XXX, k60, k61, k62, XXX }, \ + k00, k01, k02, k03, k04, k05, k06, k50, k51, k52, k53, k54, k55, k56, \ + k10, k11, k12, k13, k14, k15, k16, k60, k61, k62, k63, k64, k65, k66, \ + k20, k21, k22, k23, k24, k25, k26, k70, k71, k72, k73, k74, k75, \ + k30, k31, k32, k33, k34, k35, k36, k80, k81, k82, k83, k84, k85, \ + k40, k41, k42, k43, k46, k93, k94, k95 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06 }, \ + { k10, k11, k12, k13, k14, k15, k16 }, \ + { k20, k21, k22, k23, k24, k25, k26 }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, XXX, XXX, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, k74, k75, XXX }, \ + { k80, k81, k82, k83, k84, k85, XXX }, \ + { XXX, XXX, XXX, k93, k94, k95, XXX } \ } - -#endif diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 61a7b96c241..7ad3311c71f 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -113,5 +112,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/boardrun/bizarre/rules.mk b/keyboards/boardrun/bizarre/rules.mk index 8d08446ee2b..0acd19e6706 100644 --- a/keyboards/boardrun/bizarre/rules.mk +++ b/keyboards/boardrun/bizarre/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardrun/classic/rules.mk b/keyboards/boardrun/classic/rules.mk index a3b924ec2e5..a488e3dc0b0 100644 --- a/keyboards/boardrun/classic/rules.mk +++ b/keyboards/boardrun/classic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/3x4/rules.mk b/keyboards/boardsource/3x4/rules.mk index 85062d0b623..b4c8b293e00 100644 --- a/keyboards/boardsource/3x4/rules.mk +++ b/keyboards/boardsource/3x4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/boardsource/4x12/rules.mk b/keyboards/boardsource/4x12/rules.mk index b6805a6865c..d505368b0bb 100644 --- a/keyboards/boardsource/4x12/rules.mk +++ b/keyboards/boardsource/4x12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/boardsource/5x12/rules.mk b/keyboards/boardsource/5x12/rules.mk index 9e7ed55695f..ba1884fa8a4 100644 --- a/keyboards/boardsource/5x12/rules.mk +++ b/keyboards/boardsource/5x12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/boardsource/beiwagon/config.h b/keyboards/boardsource/beiwagon/config.h index 93856cbb87a..eb30e5535c6 100644 --- a/keyboards/boardsource/beiwagon/config.h +++ b/keyboards/boardsource/beiwagon/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4273 +#define VENDOR_ID 0x4273 #define PRODUCT_ID 0x0066 #define DEVICE_VER 0x0001 #define MANUFACTURER Boardsource @@ -53,6 +53,54 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN C6 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #ifdef RGBLIGHT_ENABLE #define RGBLED_NUM 6 // Number of LEDs #endif diff --git a/keyboards/boardsource/beiwagon/rules.mk b/keyboards/boardsource/beiwagon/rules.mk index 7c2e7fd5e1c..575227a36ea 100644 --- a/keyboards/boardsource/beiwagon/rules.mk +++ b/keyboards/boardsource/beiwagon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c index a9065fdfa2f..eb56d117355 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_mx/keymap.c @@ -71,8 +71,9 @@ static void render_RIP(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_RIP(); + return false; } #endif diff --git a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c index c50e0b4b3fe..f8cac508751 100644 --- a/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c +++ b/keyboards/boardsource/holiday/spooky/keymaps/rip_my_wallet/keymap.c @@ -71,8 +71,9 @@ static void render_RIP(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_RIP(); + return false; } #endif diff --git a/keyboards/boardsource/holiday/spooky/rules.mk b/keyboards/boardsource/holiday/spooky/rules.mk index f8504aca7dc..509ede75adb 100644 --- a/keyboards/boardsource/holiday/spooky/rules.mk +++ b/keyboards/boardsource/holiday/spooky/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c index 8ea96e8f917..8ff57074787 100644 --- a/keyboards/boardsource/microdox/keymaps/cole/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c @@ -104,13 +104,14 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c index 96e0a024f01..e02fb0b6eeb 100644 --- a/keyboards/boardsource/microdox/keymaps/via/keymap.c +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c @@ -92,13 +92,14 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/boardsource/technik_o/config.h b/keyboards/boardsource/technik_o/config.h index 0333ce1801b..3b9bf202178 100644 --- a/keyboards/boardsource/technik_o/config.h +++ b/keyboards/boardsource/technik_o/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4273 +#define VENDOR_ID 0x4273 #define PRODUCT_ID 0x0079 #define DEVICE_VER 0x0001 #define MANUFACTURER Boardsource @@ -53,8 +53,56 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN C6 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #ifdef RGBLIGHT_ENABLE -#define RGBLED_NUM 10 // Number of LEDs +# define RGBLED_NUM 10 // Number of LEDs #endif #define DRIVER_LED_TOTAL 58 diff --git a/keyboards/boardsource/technik_o/rules.mk b/keyboards/boardsource/technik_o/rules.mk index b94ba1785b7..ced26ad699e 100644 --- a/keyboards/boardsource/technik_o/rules.mk +++ b/keyboards/boardsource/technik_o/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/technik_s/config.h b/keyboards/boardsource/technik_s/config.h index 97dec63efb6..4f665330a3c 100644 --- a/keyboards/boardsource/technik_s/config.h +++ b/keyboards/boardsource/technik_s/config.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0x4273 +#define VENDOR_ID 0x4273 #define PRODUCT_ID 0x0083 #define DEVICE_VER 0x0001 #define MANUFACTURER Boardsource @@ -53,8 +53,56 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN C6 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #ifdef RGBLIGHT_ENABLE -#define RGBLED_NUM 10 // Number of LEDs +# define RGBLED_NUM 10 // Number of LEDs #endif #define DRIVER_LED_TOTAL 55 diff --git a/keyboards/boardsource/technik_s/rules.mk b/keyboards/boardsource/technik_s/rules.mk index 87612969d0a..efc63b4d56e 100644 --- a/keyboards/boardsource/technik_s/rules.mk +++ b/keyboards/boardsource/technik_s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardsource/the_mark/rules.mk b/keyboards/boardsource/the_mark/rules.mk index 85b0c328de4..e968cf4fa59 100644 --- a/keyboards/boardsource/the_mark/rules.mk +++ b/keyboards/boardsource/the_mark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boardwalk/keymaps/niclake/rules.mk b/keyboards/boardwalk/keymaps/niclake/rules.mk index 0b4dadb10ef..31d6053e03d 100644 --- a/keyboards/boardwalk/keymaps/niclake/rules.mk +++ b/keyboards/boardwalk/keymaps/niclake/rules.mk @@ -1,3 +1,3 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/bobpad/rules.mk b/keyboards/bobpad/rules.mk index 31a2d9df52b..d841c10cc1a 100644 --- a/keyboards/bobpad/rules.mk +++ b/keyboards/bobpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/bop/rules.mk b/keyboards/bop/rules.mk index c4e8c59e42f..d3ce654f129 100644 --- a/keyboards/bop/rules.mk +++ b/keyboards/bop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boston/rules.mk b/keyboards/boston/rules.mk index 8792a0276f3..4ad4ec58d03 100644 --- a/keyboards/boston/rules.mk +++ b/keyboards/boston/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c index fd283b087ab..e558048f6a5 100644 --- a/keyboards/boston_meetup/2019/2019.c +++ b/keyboards/boston_meetup/2019/2019.c @@ -14,9 +14,6 @@ * along with this program. If not, see . */ #include "2019.h" -#include "qwiic.h" -#include "action_layer.h" -#include "haptic.h" #ifdef RGB_MATRIX_ENABLE #include "rgb_matrix.h" @@ -33,184 +30,69 @@ led_config_t g_led_config = { { } }; #endif -uint8_t *o_fb; +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -uint16_t counterst = 0; - - - -#ifdef QWIIC_MICRO_OLED_ENABLE - -/* screen off after this many milliseconds */ -#include "timer.h" -#define ScreenOffInterval 60000 /* milliseconds */ -static uint16_t last_flush; - -volatile uint8_t led_numlock = false; -volatile uint8_t led_capslock = false; -volatile uint8_t led_scrolllock = false; - -static uint8_t layer; -static bool queue_for_send = false; -static uint8_t encoder_value = 32; - -__attribute__ ((weak)) -void draw_ui(void) { - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - -/* Boston MK title is 55 x 10 pixels */ -#define NAME_X 0 -#define NAME_Y 0 - - draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0); - -/* Layer indicator is 41 x 10 pixels */ -#define LAYER_INDICATOR_X 60 -#define LAYER_INDICATOR_Y 0 - - draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); - draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); - draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("BOSTON MK LAYER"), false); + oled_advance_char(); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("NUM"), led_state.num_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 2); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(10, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); /* Matrix display is 12 x 12 pixels */ #define MATRIX_DISPLAY_X 8 #define MATRIX_DISPLAY_Y 16 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); - draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM); - - } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM); -/* - draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM); - draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM); - -*/ - -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 60 -#define MOD_DISPLAY_Y 20 - - uint8_t mods = get_mods(); - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; -/* Lock display is 23 x 32 */ -#define LOCK_DISPLAY_X 104 -#define LOCK_DISPLAY_Y 0 + // force on for oled location + if((x == 0) && (y >= (MATRIX_COLS - 2))) on = 1; - if (led_numlock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0); - } else if (led_numlock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0); - } - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0); - } - send_buffer(); -} - -void led_set_user(uint8_t usb_led) { - if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) { - if (led_numlock == false){led_numlock = true;} - } else { - if (led_numlock == true){led_numlock = false;} + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 2, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 2, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 2, MATRIX_DISPLAY_Y + x + x + 3, on); + oled_write_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3, on); + } } - if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { - if (led_capslock == false){led_capslock = true;} - } else { - if (led_capslock == true){led_capslock = false;} + + // outline + for (uint8_t x = 0; x < 12; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 12, true); } - if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) { - if (led_scrolllock == false){led_scrolllock = true;} - } else { - if (led_scrolllock == true){led_scrolllock = false;} + for (uint8_t y = 0; y < 12; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 12, MATRIX_DISPLAY_Y+y, true); } -} - -uint32_t layer_state_set_kb(uint32_t state) { - state = layer_state_set_user(state); - layer = biton32(state); - queue_for_send = true; - return state; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; - return process_record_user(keycode, record); -} -bool encoder_update_kb(uint8_t index, bool clockwise) { - encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; - return true; -} - -#endif - -void matrix_init_kb(void) { - queue_for_send = true; - matrix_init_user(); + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(95, 0 + y, true); + } + return false; } - -void matrix_scan_kb(void) { -if (queue_for_send) { -#ifdef QWIIC_MICRO_OLED_ENABLE - draw_ui(); #endif - queue_for_send = false; - } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (timer_elapsed(last_flush) > ScreenOffInterval) { - send_command(DISPLAYOFF); /* 0xAE */ - } -#endif - if (counterst == 0) { - //testPatternFB(o_fb); - } - counterst = (counterst + 1) % 1024; - //rgblight_task(); - matrix_scan_user(); -} diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h index a1f4fc456d0..80896242e07 100644 --- a/keyboards/boston_meetup/2019/config.h +++ b/keyboards/boston_meetup/2019/config.h @@ -46,16 +46,9 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f #endif -//configure qwiic micro_oled driver for the 128x32 oled -#ifdef QWIIC_MICRO_OLED_ENABLE +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 -#define micro_oled_rotate_180 - -#endif /* * Keyboard Matrix Assignments * diff --git a/keyboards/boston_meetup/2019/keymaps/default/keymap.c b/keyboards/boston_meetup/2019/keymaps/default/keymap.c index 6375599455d..666624b18c3 100644 --- a/keyboards/boston_meetup/2019/keymaps/default/keymap.c +++ b/keyboards/boston_meetup/2019/keymaps/default/keymap.c @@ -13,10 +13,8 @@ enum custom_layers { }; enum custom_keycodes { - BASE = SAFE_RANGE, - LOWER, + LOWER = SAFE_RANGE, RAISE, - KC_DEMOMACRO }; // Custom macros @@ -27,7 +25,6 @@ enum custom_keycodes { // Requires KC_TRNS/_______ for the trigger key in the destination layer #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise -#define DEMOMACRO KC_DEMOMACRO // Sample for macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -115,14 +112,6 @@ layer_state_t layer_state_set_user(layer_state_t state) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case KC_DEMOMACRO: - if (record->event.pressed) { - // when keycode KC_DEMOMACRO is pressed - SEND_STRING("QMK is the best thing ever!"); - } else { - // when keycode KC_DEMOMACRO is released - } - break; case LOWER: if (record->event.pressed) { //not sure how to have keyboard check mode and set it to a variable, so my work around diff --git a/keyboards/boston_meetup/2019/keymaps/readme.md b/keyboards/boston_meetup/2019/keymaps/readme.md deleted file mode 100644 index c10a49f7d03..00000000000 --- a/keyboards/boston_meetup/2019/keymaps/readme.md +++ /dev/null @@ -1,22 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of 2019 keymaps - -* **default** default 2019 macropad layout \ No newline at end of file diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk index 236f28c4e51..6468f47b7d9 100644 --- a/keyboards/boston_meetup/2019/rules.mk +++ b/keyboards/boston_meetup/2019/rules.mk @@ -8,19 +8,21 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = no # Custom matrix file -AUDIO_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = yes # Audio output RGBLIGHT_ENABLE = no RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/botanicalkeyboards/fm2u/rules.mk b/keyboards/botanicalkeyboards/fm2u/rules.mk index 69ca4affef3..2f757667b0e 100644 --- a/keyboards/botanicalkeyboards/fm2u/rules.mk +++ b/keyboards/botanicalkeyboards/fm2u/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/box75/rules.mk b/keyboards/box75/rules.mk index 755125c797c..ee6c0dfca7d 100644 --- a/keyboards/box75/rules.mk +++ b/keyboards/box75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index bcd34b022c1..1a337b111f0 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -94,5 +93,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index 5aebe080eff..7dbf0276994 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/kitten_paw/kitten_paw.h b/keyboards/bpiphany/kitten_paw/kitten_paw.h index 38b2a943346..d4a9a166566 100644 --- a/keyboards/bpiphany/kitten_paw/kitten_paw.h +++ b/keyboards/bpiphany/kitten_paw/kitten_paw.h @@ -1,8 +1,9 @@ -#ifndef KITTEN_PAW_H -#define KITTEN_PAW_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array @@ -26,41 +27,37 @@ */ #define LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ - {KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \ - { KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \ - {KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \ - {KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \ - { KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \ - { KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \ - {KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \ - { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } #define LAYOUT_fullsize_ansi( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ - {KC_NO, KB0, KC0, KD0,KC_NO, KF0, KG0,KC_NO,KC_NO,KC_NO, KK0, KL0,KC_NO,KC_NO, KO0,KC_NO, KQ0, KR0}, \ - { KA1, KB1,KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1,KC_NO,KC_NO,KC_NO,KC_NO, KQ1,KC_NO}, \ - {KC_NO, KB2,KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2,KC_NO, KN2,KC_NO, KP2, KQ2, KR2}, \ - {KC_NO, KB3,KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3,KC_NO, KQ3, KR3}, \ - { KA4, KB4,KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4,KC_NO,KC_NO, KO4,KC_NO, KQ4, KR4}, \ - { KA5,KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5,KC_NO,KC_NO, KO5,KC_NO, KQ5, KR5}, \ - {KC_NO, KB6, KC6,KC_NO, KE6, KF6, KG6, KH6, KC_NO,KJ6, KK6, KL6,KC_NO,KC_NO, KO6,KC_NO, KQ6, KR6}, \ - { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7,KC_NO,KC_NO,KC_NO,KC_NO, KO7,KC_NO, KQ7, KR7} \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, XXX, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } - -#endif diff --git a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk index 9af05bb3d95..737451b39ad 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/blowrak/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk index fa42618f243..c1e6e9ed02f 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/default/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk b/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk index 250f7de7895..f23c2105a3b 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk +++ b/keyboards/bpiphany/pegasushoof/keymaps/default_jis/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/bpiphany/pegasushoof/rules.mk b/keyboards/bpiphany/pegasushoof/rules.mk index d4d5fcf460c..232de655c7a 100644 --- a/keyboards/bpiphany/pegasushoof/rules.mk +++ b/keyboards/bpiphany/pegasushoof/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h index e8fc68f5c90..33ac9335e61 100644 --- a/keyboards/bpiphany/sixshooter/sixshooter.h +++ b/keyboards/bpiphany/sixshooter/sixshooter.h @@ -1,15 +1,13 @@ -#ifndef SIXSHOOTER_H -#define SIXSHOOTER_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, \ - K03, K04, K05 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K03, K04, K05 } \ + k00, k01, k02, \ + k10, k11, k12 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 } \ } inline void sixshooter_led_0_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } @@ -42,5 +40,3 @@ inline void sixshooter_led_all_off(void) { sixshooter_led_4_off(); sixshooter_led_5_off(); } - -#endif diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index bedbd9ea742..54a1c2e7f4a 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -99,5 +98,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/tiger_lily/tiger_lily.h b/keyboards/bpiphany/tiger_lily/tiger_lily.h index 65e4d91564a..b1a872e2159 100644 --- a/keyboards/bpiphany/tiger_lily/tiger_lily.h +++ b/keyboards/bpiphany/tiger_lily/tiger_lily.h @@ -1,8 +1,9 @@ -#ifndef TIGER_LILY_H -#define TIGER_LILY_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguements @@ -27,45 +28,37 @@ `-------------------------------------------------------------------------' `--------------' `-------------------' */ #define LAYOUT( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \ -/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \ -/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \ -/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ -/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KI6, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } #define LAYOUT_fullsize_ansi( \ - KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ - KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ - KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ - KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ - KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ - KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KB0, KC0, KD0, KC_NO, KF0, KG0, KC_NO, KC_NO, KC_NO, KK0, KL0, KC_NO, KC_NO, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KA1, KB1, KC_NO, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, KC_NO, KC_NO, KC_NO, KC_NO, KQ1, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KC_NO, KN2, KC_NO, KP2, KQ2, KR2 }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KQ3, KR3 }, \ -/* 4 */ { KA4, KB4, KC_NO, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KC_NO, KC_NO, KO4, KC_NO, KQ4, KR4 }, \ -/* 5 */ { KA5, KC_NO, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KC_NO, KC_NO, KO5, KC_NO, KQ5, KR5 }, \ -/* 6 */ { KC_NO, KB6, KC6, KC_NO, KE6, KF6, KG6, KH6, KC_NO, KJ6, KK6, KL6, KC_NO, KC_NO, KO6, KC_NO, KQ6, KR6 }, \ -/* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, KK1, KL1, KQ1, KQ0, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, KK5, KL5, KQ5, KO5, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, KK2, KL2, KQ2, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, KK3, KL3, KQ3, KO3, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0, KL6, KQ6 \ +) { \ + { XXX, KB0, KC0, KD0, XXX, KF0, KG0, XXX, XXX, XXX, KK0, KL0, XXX, XXX, KO0, XXX, KQ0, KR0 }, \ + { KA1, KB1, XXX, KD1, KE1, KF1, KG1, KH1, KI1, KJ1, KK1, KL1, XXX, XXX, XXX, XXX, KQ1, XXX }, \ + { XXX, KB2, XXX, KD2, KE2, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, XXX, KN2, XXX, KP2, KQ2, KR2 }, \ + { XXX, KB3, XXX, KD3, KE3, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, KQ3, KR3 }, \ + { KA4, KB4, XXX, KD4, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, XXX, XXX, KO4, XXX, KQ4, KR4 }, \ + { KA5, XXX, KC5, KD5, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, XXX, XXX, KO5, XXX, KQ5, KR5 }, \ + { XXX, KB6, KC6, XXX, KE6, KF6, KG6, KH6, XXX, KJ6, KK6, KL6, XXX, XXX, KO6, XXX, KQ6, KR6 }, \ + { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, XXX, XXX, XXX, XXX, KO7, XXX, KQ7, KR7 } \ } - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/config.h b/keyboards/bpiphany/unloved_bastard/config.h index ab8f178a9d1..a6589be4a1d 100644 --- a/keyboards/bpiphany/unloved_bastard/config.h +++ b/keyboards/bpiphany/unloved_bastard/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -92,5 +91,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/bpiphany/unloved_bastard/rules.mk b/keyboards/bpiphany/unloved_bastard/rules.mk index 0661b2e92a4..01b4a4a29ef 100644 --- a/keyboards/bpiphany/unloved_bastard/rules.mk +++ b/keyboards/bpiphany/unloved_bastard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h index d444fd0d8af..26fce8749a1 100644 --- a/keyboards/bpiphany/unloved_bastard/unloved_bastard.h +++ b/keyboards/bpiphany/unloved_bastard/unloved_bastard.h @@ -13,74 +13,65 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef UNLOVED_BASTARD_H -#define UNLOVED_BASTARD_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ -/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ -/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ -/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT_tkl_ansi( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ - KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ -/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ -/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KC_NO, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ -/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, \ + KB2, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, XXX, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT_tkl_iso( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ - KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ -) \ -{ \ -/* Columns and rows need to be swapped in the below definition */ \ -/* A B C D E F G H I J K L M N O P Q R */ \ -/* 0 */ { KC_NO, KC_NO, KC0, KC_NO, KC_NO, KF0, KC_NO, KC_NO, KC_NO, KJ0, KK0, KC_NO, KM0, KN0, KO0, KC_NO, KQ0, KR0 }, \ -/* 1 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, KC_NO, KO1, KP1, KC_NO, KC_NO }, \ -/* 2 */ { KC_NO, KB2, KC_NO, KC_NO, KC_NO, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, KC_NO, KC_NO, KC_NO }, \ -/* 3 */ { KC_NO, KB3, KC_NO, KC_NO, KC_NO, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { KC_NO, KC_NO, KC4, KC_NO, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, KC_NO, KO4, KP4, KQ4, KR4 }, \ -/* 5 */ { KC_NO, KC_NO, KC5, KC_NO, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, KC_NO, KC_NO }, \ -/* 6 */ { KC_NO, KC_NO, KC6, KC_NO, KC_NO, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, KC_NO,KN6, KO6, KC_NO, KQ6, KC_NO }, \ -/* 7 */ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, KC_NO, KP7, KC_NO, KC_NO } \ + KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ + KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, \ + KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KQ4, KC5, KE5, \ + KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO3, KO1, \ + KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, \ + KP4, KN2, KN6, KQ6, KN0, KN3, KM0, KP1, KC0, KQ0, KR0 \ +) { \ + { XXX, XXX, KC0, XXX, XXX, KF0, XXX, XXX, XXX, KJ0, KK0, XXX, KM0, KN0, KO0, XXX, KQ0, KR0 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, KG1, KH1, KI1, KJ1, KK1, KL1, KM1, XXX, KO1, KP1, XXX, XXX }, \ + { XXX, KB2, XXX, XXX, XXX, KF2, KG2, KH2, KI2, KJ2, KK2, KL2, KM2, KN2, KO2, XXX, XXX, XXX }, \ + { XXX, KB3, XXX, XXX, XXX, KF3, KG3, KH3, KI3, KJ3, KK3, KL3, KM3, KN3, KO3, XXX, XXX, XXX }, \ + { XXX, XXX, KC4, XXX, KE4, KF4, KG4, KH4, KI4, KJ4, KK4, KL4, KM4, XXX, KO4, KP4, KQ4, KR4 }, \ + { XXX, XXX, KC5, XXX, KE5, KF5, KG5, KH5, KI5, KJ5, KK5, KL5, KM5, KN5, KO5, KP5, XXX, XXX }, \ + { XXX, XXX, KC6, XXX, XXX, KF6, KG6, KH6, KI6, KJ6, KK6, KL6, XXX, KN6, KO6, XXX, KQ6, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, KF7, KG7, KH7, KI7, KJ7, KK7, KL7, KM7, KN7, XXX, KP7, XXX, XXX } \ } #define LAYOUT LAYOUT_all - -#endif diff --git a/keyboards/bthlabs/geekpad/geekpad.h b/keyboards/bthlabs/geekpad/geekpad.h index c9f1ac9d4f6..4dc6800fe59 100644 --- a/keyboards/bthlabs/geekpad/geekpad.h +++ b/keyboards/bthlabs/geekpad/geekpad.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef GEEKPAD_H -#define GEEKPAD_H + +#pragma once #include "quantum.h" @@ -27,14 +27,11 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, \ - K10, K11, K12, \ - K20, K21, K22 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K10, K11, K12 }, \ - { K20, K21, K22 } \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ } - -#endif diff --git a/keyboards/buildakb/potato65/rules.mk b/keyboards/buildakb/potato65/rules.mk index 8e14e68d509..e026d1645f3 100644 --- a/keyboards/buildakb/potato65/rules.mk +++ b/keyboards/buildakb/potato65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/buildakb/potato65hs/rules.mk b/keyboards/buildakb/potato65hs/rules.mk index 5150f2f7184..7d7f1ff4240 100644 --- a/keyboards/buildakb/potato65hs/rules.mk +++ b/keyboards/buildakb/potato65hs/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/business_card/alpha/keymaps/default/keymap.c b/keyboards/business_card/alpha/keymaps/default/keymap.c index 6bf201655db..64070d23d28 100644 --- a/keyboards/business_card/alpha/keymaps/default/keymap.c +++ b/keyboards/business_card/alpha/keymaps/default/keymap.c @@ -39,5 +39,8 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif diff --git a/keyboards/business_card/beta/keymaps/default/keymap.c b/keyboards/business_card/beta/keymaps/default/keymap.c index beff48d9847..8d2413477eb 100644 --- a/keyboards/business_card/beta/keymaps/default/keymap.c +++ b/keyboards/business_card/beta/keymaps/default/keymap.c @@ -38,5 +38,8 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif diff --git a/keyboards/c39/keymaps/drashna/rules.mk b/keyboards/c39/keymaps/drashna/rules.mk index c05f6a4be4d..a6575bbd93b 100644 --- a/keyboards/c39/keymaps/drashna/rules.mk +++ b/keyboards/c39/keymaps/drashna/rules.mk @@ -5,7 +5,7 @@ BOARD = QMK_PROTON_C # Bootloader selection BOOTLOADER = stm32-dfu -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes @@ -13,6 +13,7 @@ COMMAND_ENABLE = yes NKRO_ENABLE = yes AUDIO_ENABLE = yes UNICODE_ENABLE = yes -HAPTIC_ENABLE = SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/keyboards/caffeinated/serpent65/rules.mk b/keyboards/caffeinated/serpent65/rules.mk index 1209331901e..22f971288e2 100644 --- a/keyboards/caffeinated/serpent65/rules.mk +++ b/keyboards/caffeinated/serpent65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/canary/canary60rgb/canary60rgb.c b/keyboards/canary/canary60rgb/canary60rgb.c index b01af5f294c..b37a88b32f0 100644 --- a/keyboards/canary/canary60rgb/canary60rgb.c +++ b/keyboards/canary/canary60rgb/canary60rgb.c @@ -16,7 +16,7 @@ #include "canary60rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, J_14, K_14, L_14 }, { 0, J_13, K_13, L_13 }, { 0, J_12, K_12, L_12 }, diff --git a/keyboards/cannonkeys/aella/rules.mk b/keyboards/cannonkeys/aella/rules.mk index e5bf1ef8812..e3c94c282c1 100644 --- a/keyboards/cannonkeys/aella/rules.mk +++ b/keyboards/cannonkeys/aella/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/an_c/rules.mk b/keyboards/cannonkeys/an_c/rules.mk index 66e6b65776c..1c8a0a4e142 100644 --- a/keyboards/cannonkeys/an_c/rules.mk +++ b/keyboards/cannonkeys/an_c/rules.mk @@ -12,7 +12,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/atlas/rules.mk b/keyboards/cannonkeys/atlas/rules.mk index ee32cf30bdd..a2519aa0356 100644 --- a/keyboards/cannonkeys/atlas/rules.mk +++ b/keyboards/cannonkeys/atlas/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/atlas_alps/rules.mk b/keyboards/cannonkeys/atlas_alps/rules.mk index 375db3aede0..f9a0f9be2f3 100644 --- a/keyboards/cannonkeys/atlas_alps/rules.mk +++ b/keyboards/cannonkeys/atlas_alps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cannonkeys/balance/rules.mk b/keyboards/cannonkeys/balance/rules.mk index 2cd1e23fa94..6f2ef2794ef 100644 --- a/keyboards/cannonkeys/balance/rules.mk +++ b/keyboards/cannonkeys/balance/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/chimera65/rules.mk b/keyboards/cannonkeys/chimera65/rules.mk index 9c680a29b02..a1d2c6675f9 100644 --- a/keyboards/cannonkeys/chimera65/rules.mk +++ b/keyboards/cannonkeys/chimera65/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/db60/rules.mk b/keyboards/cannonkeys/db60/rules.mk index be4c05831bd..43e9d6c9983 100644 --- a/keyboards/cannonkeys/db60/rules.mk +++ b/keyboards/cannonkeys/db60/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/devastatingtkl/rules.mk b/keyboards/cannonkeys/devastatingtkl/rules.mk index 1a11e0a892d..8c80d472c0b 100644 --- a/keyboards/cannonkeys/devastatingtkl/rules.mk +++ b/keyboards/cannonkeys/devastatingtkl/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk index e483bb0722d..8c2b499dfd8 100644 --- a/keyboards/cannonkeys/instant60/rules.mk +++ b/keyboards/cannonkeys/instant60/rules.mk @@ -11,7 +11,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/instant65/rules.mk b/keyboards/cannonkeys/instant65/rules.mk index aa0b3116a9f..1f61cca45f2 100644 --- a/keyboards/cannonkeys/instant65/rules.mk +++ b/keyboards/cannonkeys/instant65/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/iron165/rules.mk b/keyboards/cannonkeys/iron165/rules.mk index 641a6c14dae..e159c6ae822 100644 --- a/keyboards/cannonkeys/iron165/rules.mk +++ b/keyboards/cannonkeys/iron165/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/obliterated75/rules.mk b/keyboards/cannonkeys/obliterated75/rules.mk index 60b6bc58dee..0f8ad7cadc0 100644 --- a/keyboards/cannonkeys/obliterated75/rules.mk +++ b/keyboards/cannonkeys/obliterated75/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/onyx/rules.mk b/keyboards/cannonkeys/onyx/rules.mk index 26b4fab43ea..cfa8daced47 100644 --- a/keyboards/cannonkeys/onyx/rules.mk +++ b/keyboards/cannonkeys/onyx/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/rekt1800/rules.mk b/keyboards/cannonkeys/rekt1800/rules.mk index 962b9dcf404..928e8d51716 100644 --- a/keyboards/cannonkeys/rekt1800/rules.mk +++ b/keyboards/cannonkeys/rekt1800/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/sagittarius/rules.mk b/keyboards/cannonkeys/sagittarius/rules.mk index 4abdb98945d..2aed2c9a1ab 100644 --- a/keyboards/cannonkeys/sagittarius/rules.mk +++ b/keyboards/cannonkeys/sagittarius/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h index e100cc99b1e..53e4c18e5ec 100644 --- a/keyboards/cannonkeys/satisfaction75/config.h +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -53,9 +53,8 @@ along with this program. If not, see . // I2C config #define I2C_DRIVER I2CD1 -#define I2C1_SCL_BANK GPIOB -#define I2C1_SCL 6 -#define I2C1_SDA 7 +#define I2C1_SCL_PIN B6 +#define I2C1_SDA_PIN B7 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 #define I2C1_TIMINGR_PRESC 0x00U @@ -72,14 +71,14 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -#ifdef QWIIC_MICRO_OLED_ENABLE +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 66 // ~15fps -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 +// OLED_TIMEOUT is incompatible with the OLED_OFF mode +#define OLED_TIMEOUT 0 -#endif +// OLED timeout reimplemented in the keyboard-specific code +#define CUSTOM_OLED_TIMEOUT 60000 // Custom config starts after VIA's EEPROM usage, // dynamic keymaps start after this. diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk index 3f0f8cda7c9..b74a4b35cdf 100644 --- a/keyboards/cannonkeys/satisfaction75/rules.mk +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -16,17 +16,16 @@ SRC += led.c \ satisfaction_encoder.c \ satisfaction_oled.c -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover -CUSTOM_MATRIX = no # Custom matrix file ENCODER_ENABLE = yes -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 #BACKLIGHT_ENABLE = yes DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c index 682805f3217..bd7eaf18858 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -5,33 +5,27 @@ #include #include -#ifdef QWIIC_MICRO_OLED_ENABLE -#include "micro_oled.h" -#include "qwiic.h" -#endif - #include "timer.h" #include "raw_hid.h" #include "dynamic_keymap.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic /* Artificial delay added to get media keys to work in the encoder*/ #define MEDIA_KEY_DELAY 10 -uint16_t last_flush; - volatile uint8_t led_numlock = false; volatile uint8_t led_capslock = false; volatile uint8_t led_scrolllock = false; uint8_t layer; -bool queue_for_send = false; bool clock_set_mode = false; uint8_t oled_mode = OLED_DEFAULT; -bool oled_sleeping = false; +bool oled_repaint_requested = false; +bool oled_wakeup_requested = false; +uint32_t oled_sleep_timer; uint8_t encoder_value = 32; uint8_t encoder_mode = ENC_MODE_VOLUME; @@ -167,7 +161,7 @@ void raw_hid_receive_kb( uint8_t *data, uint8_t length ) case id_oled_mode: { oled_mode = command_data[1]; - draw_ui(); + oled_request_wakeup(); break; } case id_encoder_modes: @@ -247,18 +241,17 @@ void read_host_led_state(void) { layer_state_t layer_state_set_kb(layer_state_t state) { state = layer_state_set_user(state); layer = biton32(state); - queue_for_send = true; + oled_request_wakeup(); return state; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; + oled_request_wakeup(); switch (keycode) { case OLED_TOGG: if(!clock_set_mode){ if (record->event.pressed) { oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; - draw_ui(); } } return false; @@ -302,8 +295,8 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) return false; + oled_request_wakeup(); encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; if (index == 0) { if (layer == 0){ uint16_t mapped_code = 0; @@ -376,9 +369,9 @@ void matrix_init_kb(void) #endif // VIA_ENABLE rtcGetTime(&RTCD1, &last_timespec); - queue_for_send = true; backlight_init_ports(); matrix_init_user(); + oled_request_wakeup(); } @@ -388,22 +381,8 @@ void housekeeping_task_kb(void) { if (minutes_since_midnight != last_minute){ last_minute = minutes_since_midnight; - if(!oled_sleeping){ - queue_for_send = true; - } + oled_request_repaint(); } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (queue_for_send && oled_mode != OLED_OFF) { - oled_sleeping = false; - read_host_led_state(); - draw_ui(); - queue_for_send = false; - } - if (timer_elapsed(last_flush) > ScreenOffInterval && !oled_sleeping) { - send_command(DISPLAYOFF); /* 0xAE */ - oled_sleeping = true; - } -#endif } // diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h index 13aaf688826..c6dbc31f1bb 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -14,9 +14,6 @@ #define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) #define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3) -/* screen off after this many milliseconds */ -#define ScreenOffInterval 60000 /* milliseconds */ - typedef union { uint8_t raw; struct { @@ -74,10 +71,10 @@ extern volatile uint8_t led_scrolllock; extern uint8_t layer; // OLED Behavior -extern uint16_t last_flush; -extern bool queue_for_send; extern uint8_t oled_mode; -extern bool oled_sleeping; +extern bool oled_repaint_requested; +extern bool oled_wakeup_requested; +extern uint32_t oled_sleep_timer; // Encoder Behavior extern uint8_t encoder_value; @@ -113,10 +110,9 @@ void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t n void update_time_config(int8_t increment); -__attribute__ ((weak)) -void draw_ui(void); -void draw_default(void); -void draw_clock(void); +void oled_request_wakeup(void); +void oled_request_repaint(void); +bool oled_task_needs_to_repaint(void); void backlight_init_ports(void); void backlight_set(uint8_t level); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c index 8fcd720e2f9..0d2fdc359cf 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -1,5 +1,5 @@ #include "satisfaction75.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" void pre_encoder_mode_change(){ if(encoder_mode == ENC_MODE_CLOCK_SET){ @@ -125,7 +125,6 @@ uint16_t handle_encoder_clockwise(){ #endif case ENC_MODE_CLOCK_SET: update_time_config(1); - queue_for_send = true; break; } return mapped_code; @@ -171,7 +170,6 @@ uint16_t handle_encoder_ccw(){ case ENC_MODE_CLOCK_SET: update_time_config(-1); - queue_for_send = true; break; } return mapped_code; diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c index 6553bd13004..fff8b65bd70 100644 --- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -1,271 +1,267 @@ #include "satisfaction75.h" -#include "micro_oled.h" - -__attribute__ ((weak)) -void draw_ui() { -#ifdef QWIIC_MICRO_OLED_ENABLE - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - if(clock_set_mode){ - draw_clock(); - return; - } - switch (oled_mode){ - default: - case OLED_DEFAULT: - draw_default(); - break; - case OLED_TIME: - draw_clock(); - break; - case OLED_OFF: - send_command(DISPLAYOFF); - break; - } -#endif + +void draw_default(void); +void draw_clock(void); + +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_0; } + +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } + if (!oled_task_needs_to_repaint()) { + return false; + } + oled_clear(); + if (clock_set_mode) { + draw_clock(); + return false;; + } + switch (oled_mode) { + default: + case OLED_DEFAULT: + draw_default(); + break; + case OLED_TIME: + draw_clock(); + break; + } + return false; } -void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ - if(show_legend){ - draw_string(startX + 1, startY + 2, "ENC", PIXEL_ON, NORM, 0); - } else { - startX -= 22; - } - draw_rect_filled_soft(startX + 22, startY + 1, 3 + (3 * 6), 9, PIXEL_ON, NORM); - char* mode_string = ""; - switch(encoder_mode){ - default: - case ENC_MODE_VOLUME: - mode_string = "VOL"; - break; - case ENC_MODE_MEDIA: - mode_string = "MED"; - break; - case ENC_MODE_SCROLL: - mode_string = "SCR"; - break; - case ENC_MODE_BRIGHTNESS: - mode_string = "BRT"; - break; - case ENC_MODE_BACKLIGHT: - mode_string = "BKL"; - break; - case ENC_MODE_CLOCK_SET: - mode_string = "CLK"; - break; - case ENC_MODE_CUSTOM0: - mode_string = "CS0"; - break; - case ENC_MODE_CUSTOM1: - mode_string = "CS1"; - break; - case ENC_MODE_CUSTOM2: - mode_string = "CS2"; - break; - } - draw_string(startX + 24, startY + 2, mode_string, PIXEL_ON, XOR, 0); +// Request a repaint of the OLED image without resetting the OLED sleep timer. +// Used for things like clock updates that should not keep the OLED turned on +// if there is no other activity. +void oled_request_repaint(void) { + if (is_oled_on()) { + oled_repaint_requested = true; + } } -void draw_layer_section(int8_t startX, int8_t startY, bool show_legend){ - if(show_legend){ - draw_string(startX + 1, startY + 2, "LAYER", PIXEL_ON, NORM, 0); - } else { - startX -= 32; - } - draw_rect_filled_soft(startX + 32, startY + 1, 9, 9, PIXEL_ON, NORM); - draw_char(startX + 34, startY + 2, layer + 0x30, PIXEL_ON, XOR, 0); +// Request a repaint of the OLED image and reset the OLED sleep timer. +// Needs to be called after any activity that should keep the OLED turned on. +void oled_request_wakeup(void) { + oled_wakeup_requested = true; } -void draw_default(){ - uint8_t hour = last_minute / 60; - uint16_t minute = last_minute % 60; +// Check whether oled_task_user() needs to repaint the OLED image. This +// function should be called at the start of oled_task_user(); it also handles +// the OLED sleep timer and the OLED_OFF mode. +bool oled_task_needs_to_repaint(void) { + // In the OLED_OFF mode the OLED is kept turned off; any wakeup requests + // are ignored. + if ((oled_mode == OLED_OFF) && !clock_set_mode) { + oled_wakeup_requested = false; + oled_repaint_requested = false; + oled_off(); + return false; + } - if(encoder_mode == ENC_MODE_CLOCK_SET){ - hour = hour_config; - minute = minute_config; - } + // If OLED wakeup was requested, reset the sleep timer and do a repaint. + if (oled_wakeup_requested) { + oled_wakeup_requested = false; + oled_repaint_requested = false; + oled_sleep_timer = timer_read32() + CUSTOM_OLED_TIMEOUT; + oled_on(); + return true; + } - bool is_pm = (hour / 12) > 0; - hour = hour % 12; - if (hour == 0){ - hour = 12; - } - char hour_str[3] = ""; - char min_str[3] = ""; + // If OLED repaint was requested, just do a repaint without touching the + // sleep timer. + if (oled_repaint_requested) { + oled_repaint_requested = false; + return true; + } - sprintf(hour_str, "%02d", hour); - sprintf(min_str, "%02d", minute); + // If the OLED is currently off, skip the repaint (which would turn the + // OLED on if the image is changed in any way). + if (!is_oled_on()) { + return false; + } - uint8_t mods = get_mods(); + // If the sleep timer has expired while the OLED was on, turn the OLED off. + if (timer_expired32(timer_read32(), oled_sleep_timer)) { + oled_off(); + return false; + } -/* Layer indicator is 41 x 10 pixels */ - draw_layer_section(0,0,true); + // Always perform a repaint if the OLED is currently on. (This can + // potentially be optimized to avoid unneeded repaints if all possible + // state changes are covered by oled_request_repaint() or + // oled_request_wakeup(), but then any missed calls to these functions + // would result in displaying a stale image.) + return true; +} -#define ENCODER_INDICATOR_X 45 -#define ENCODER_INDICATOR_Y 0 - draw_encoder(ENCODER_INDICATOR_X, ENCODER_INDICATOR_Y, true); -/* Matrix display is 19 x 9 pixels */ -#define MATRIX_DISPLAY_X 0 -#define MATRIX_DISPLAY_Y 18 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); +static void draw_line_h(uint8_t x, uint8_t y, uint8_t len) { + for (uint8_t i = 0; i < len; i++) { + oled_write_pixel(i + x, y, true); } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); - -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 30 -#define MOD_DISPLAY_Y 18 - - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } - -/* Lock display is 23 x 21 */ -#define LOCK_DISPLAY_X 100 -#define LOCK_DISPLAY_Y 0 - - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_ON, NORM, 0); - } - -#define TIME_DISPLAY_X 82 -#define TIME_DISPLAY_Y 22 - draw_string(TIME_DISPLAY_X, TIME_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 0); - draw_string(TIME_DISPLAY_X + 11, TIME_DISPLAY_Y, ":", PIXEL_ON, NORM, 0); - draw_string(TIME_DISPLAY_X + 15, TIME_DISPLAY_Y, min_str, PIXEL_ON, NORM, 0); - if(is_pm){ - draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "pm", PIXEL_ON, NORM, 0); - } else{ - draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "am", PIXEL_ON, NORM, 0); - } - - send_buffer(); } -void draw_clock(){ - int8_t hour = last_minute / 60; - int16_t minute = last_minute % 60; - int16_t year = last_timespec.year + 1980; - int8_t month = last_timespec.month; - int8_t day = last_timespec.day; - - if(encoder_mode == ENC_MODE_CLOCK_SET){ - hour = hour_config; - minute = minute_config; - year = year_config + 1980; - month = month_config; - day = day_config; - } - - bool is_pm = (hour / 12) > 0; - hour = hour % 12; - if (hour == 0){ - hour = 12; - } - char hour_str[3] = ""; - char min_str[3] = ""; - char year_str[5] = ""; - char month_str[3] = ""; - char day_str[3] = ""; - - sprintf(hour_str, "%02d", hour); - sprintf(min_str, "%02d", minute); - sprintf(year_str, "%d", year); - sprintf(month_str, "%02d", month); - sprintf(day_str, "%02d", day); - - -#define DATE_DISPLAY_X 6 -#define DATE_DISPLAY_Y 0 - draw_string(DATE_DISPLAY_X, DATE_DISPLAY_Y, year_str, PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 25, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y, month_str, PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 44, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); - draw_string(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y, day_str, PIXEL_ON, NORM, 0); - -#define CLOCK_DISPLAY_X 6 -#define CLOCK_DISPLAY_Y 14 - draw_string(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 1); - draw_string(CLOCK_DISPLAY_X + 17, CLOCK_DISPLAY_Y, ":", PIXEL_ON, NORM, 1); - draw_string(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y, min_str, PIXEL_ON, NORM, 1); - if(is_pm){ - draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "pm", PIXEL_ON, NORM, 1); - } else{ - draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "am", PIXEL_ON, NORM, 1); - } - - if(clock_set_mode){ - switch(time_config_idx){ - case 0: // hour - default: - draw_line(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 16, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); - break; - case 1: // minute - draw_line(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); - break; - case 2: // year - draw_line(DATE_DISPLAY_X, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 23, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); - break; - case 3: // month - draw_line(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 43, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); - break; - case 4: //day - draw_line(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 61, DATE_DISPLAY_Y + 9,PIXEL_ON, NORM); - break; +static void draw_line_v(uint8_t x, uint8_t y, uint8_t len) { + for (uint8_t i = 0; i < len; i++) { + oled_write_pixel(x, i + y, true); } - } +} - draw_encoder(80, 0, true); - draw_layer_section(80, 11, true); +static char* get_enc_mode(void) { + switch (encoder_mode) { + default: + case ENC_MODE_VOLUME: + return "VOL"; + case ENC_MODE_MEDIA: + return "MED"; + case ENC_MODE_SCROLL: + return "SCR"; + case ENC_MODE_BRIGHTNESS: + return "BRT"; + case ENC_MODE_BACKLIGHT: + return "BKL"; + case ENC_MODE_CLOCK_SET: + return "CLK"; + case ENC_MODE_CUSTOM0: + return "CS0"; + case ENC_MODE_CUSTOM1: + return "CS1"; + case ENC_MODE_CUSTOM2: + return "CS2"; + } +} -#define CAPS_DISPLAY_X 86 -#define CAPS_DISPLAY_Y 22 +static char* get_time(void) { + uint8_t hour = last_minute / 60; + uint16_t minute = last_minute % 60; - if (led_capslock == true) { - draw_rect_filled_soft(CAPS_DISPLAY_X, CAPS_DISPLAY_Y, 5 + (4 * 6), 9, PIXEL_ON, NORM); - draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_ON, NORM, 0); - } + if (encoder_mode == ENC_MODE_CLOCK_SET) { + hour = hour_config; + minute = minute_config; + } + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0) { + hour = 12; + } - send_buffer(); + static char time_str[8] = ""; + sprintf(time_str, "%02d:%02d%s", hour, minute, is_pm ? "pm" : "am"); + return time_str; } + +static char* get_date(void) { + int16_t year = last_timespec.year + 1980; + int8_t month = last_timespec.month; + int8_t day = last_timespec.day; + + if (encoder_mode == ENC_MODE_CLOCK_SET) { + year = year_config + 1980; + month = month_config; + day = day_config; + } + + static char date_str[11] = ""; + sprintf(date_str, "%04d-%02d-%02d", year, month, day); + + return date_str; +} + +void draw_default() { + oled_write_P(PSTR("LAYER "), false); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + oled_write_P(PSTR(" ENC "), false); + oled_write(get_enc_mode(), true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(6, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); + + oled_write(get_time(), false); + +/* Matrix display is 12 x 12 pixels */ +#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_Y 18 + + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } + } + + // outline + draw_line_h(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19); + draw_line_h(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y + 9, 19); + draw_line_v(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 9); + draw_line_v(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y, 9); + + // oled location + draw_line_h(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3); + + // bodge extra lines for invert layer and enc mode + draw_line_v(35, 0, 8); + draw_line_v(71, 0, 8); +} + +void draw_clock() { + oled_set_cursor(0, 0); + oled_write(get_date(), false); + oled_set_cursor(0, 2); + oled_write(get_time(), false); + + oled_set_cursor(12, 0); + oled_write_P(PSTR(" ENC "), false); + oled_write(get_enc_mode(), true); + + oled_set_cursor(13, 1); + oled_write_P(PSTR("LAYER "), false); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(15, 3); + oled_write_P(PSTR("CAPS"), led_state.caps_lock); + + if (clock_set_mode) { + switch (time_config_idx) { + case 0: // hour + default: + draw_line_h(0, 25, 10); + break; + case 1: // minute + draw_line_h(18, 25, 10); + break; + case 2: // year + draw_line_h(0, 9, 24); + break; + case 3: // month + draw_line_h(30, 9, 10); + break; + case 4: // day + draw_line_h(48, 9, 10); + break; + } + } + + // bodge extra lines for invert layer and enc mode + draw_line_v(101, 0, 8); + draw_line_v(113, 8, 8); +} + +#endif diff --git a/keyboards/cannonkeys/savage65/rules.mk b/keyboards/cannonkeys/savage65/rules.mk index 92e945d8f59..d5f41eccd08 100644 --- a/keyboards/cannonkeys/savage65/rules.mk +++ b/keyboards/cannonkeys/savage65/rules.mk @@ -12,7 +12,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/tmov2/rules.mk b/keyboards/cannonkeys/tmov2/rules.mk index 7464df414b2..d068ea28a77 100644 --- a/keyboards/cannonkeys/tmov2/rules.mk +++ b/keyboards/cannonkeys/tmov2/rules.mk @@ -12,7 +12,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/tsukuyomi/rules.mk b/keyboards/cannonkeys/tsukuyomi/rules.mk index aa0b3116a9f..1f61cca45f2 100644 --- a/keyboards/cannonkeys/tsukuyomi/rules.mk +++ b/keyboards/cannonkeys/tsukuyomi/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cannonkeys/vicious40/rules.mk b/keyboards/cannonkeys/vicious40/rules.mk index 490af346fc0..0b98c9aad8d 100644 --- a/keyboards/cannonkeys/vicious40/rules.mk +++ b/keyboards/cannonkeys/vicious40/rules.mk @@ -10,7 +10,7 @@ DFU_SUFFIX_ARGS = -p FFFF -v FFFF # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/capsunlocked/cu65/rules.mk b/keyboards/capsunlocked/cu65/rules.mk index d282a8a11f6..7a5eae962de 100644 --- a/keyboards/capsunlocked/cu65/rules.mk +++ b/keyboards/capsunlocked/cu65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/capsunlocked/cu7/rules.mk b/keyboards/capsunlocked/cu7/rules.mk index 1bf9ed41879..599aa6616ee 100644 --- a/keyboards/capsunlocked/cu7/rules.mk +++ b/keyboards/capsunlocked/cu7/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/capsunlocked/cu80/v2_ansi/info.json b/keyboards/capsunlocked/cu80/v2_ansi/info.json index 4817f5d885e..f0317de36d5 100644 --- a/keyboards/capsunlocked/cu80/v2_ansi/info.json +++ b/keyboards/capsunlocked/cu80/v2_ansi/info.json @@ -9,7 +9,7 @@ "audio": false, "backlight": false, "bluetooth": false, - "bootmagic_lite": true, + "bootmagic": true, "command": false, "console": false, "extrakey": true, diff --git a/keyboards/capsunlocked/cu80/v2_ansi/rgb/config.h b/keyboards/capsunlocked/cu80/v2_ansi/rgb/config.h index 7e0f0bfccdf..00a05ad7da0 100644 --- a/keyboards/capsunlocked/cu80/v2_ansi/rgb/config.h +++ b/keyboards/capsunlocked/cu80/v2_ansi/rgb/config.h @@ -26,6 +26,54 @@ along with this program. If not, see . /* moved to RGB specific */ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* RGB firmware override */ #undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/capsunlocked/cu80/v2_iso/info.json b/keyboards/capsunlocked/cu80/v2_iso/info.json index b59f073f829..c3321560695 100644 --- a/keyboards/capsunlocked/cu80/v2_iso/info.json +++ b/keyboards/capsunlocked/cu80/v2_iso/info.json @@ -9,7 +9,7 @@ "audio": false, "backlight": false, "bluetooth": false, - "bootmagic_lite": true, + "bootmagic": true, "command": false, "console": false, "extrakey": true, diff --git a/keyboards/capsunlocked/cu80/v2_iso/rgb/config.h b/keyboards/capsunlocked/cu80/v2_iso/rgb/config.h index 3f784e2e063..dbe9143b8bc 100644 --- a/keyboards/capsunlocked/cu80/v2_iso/rgb/config.h +++ b/keyboards/capsunlocked/cu80/v2_iso/rgb/config.h @@ -25,6 +25,54 @@ along with this program. If not, see . /* moved to RGB specific */ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 50 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* RGB firmware override */ #undef RGBLIGHT_ANIMATIONS diff --git a/keyboards/carbo65/rules.mk b/keyboards/carbo65/rules.mk index 73ddf1a5959..8d14f05b82c 100644 --- a/keyboards/carbo65/rules.mk +++ b/keyboards/carbo65/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cassette42/keymaps/default/keymap.c b/keyboards/cassette42/keymaps/default/keymap.c index b678ccf9b59..4943be9c7b3 100644 --- a/keyboards/cassette42/keymaps/default/keymap.c +++ b/keyboards/cassette42/keymaps/default/keymap.c @@ -101,12 +101,13 @@ void render_status(void) { RENDER_LED_STATUS(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/cest73/tkm/rules.mk b/keyboards/cest73/tkm/rules.mk index ef217933230..b1a5ec8ed14 100644 --- a/keyboards/cest73/tkm/rules.mk +++ b/keyboards/cest73/tkm/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chalice/chalice.h b/keyboards/chalice/chalice.h index a0bc0026f62..c55cd4ba0b2 100644 --- a/keyboards/chalice/chalice.h +++ b/keyboards/chalice/chalice.h @@ -17,44 +17,44 @@ #pragma once -#define ____ KC_NO +#define ___ KC_NO #include "quantum.h" #define LAYOUT_default( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K214, \ - K401, K402, K404, K406, K408, K410, K411, K412, K413, K314 \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K46, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K56, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K66, K76, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K86, K96, \ + K80, K91, K82, K92, K83, K93, K84, K94, K85, K95 \ ) { \ - { K000, K002, K004, K006, K008, K010, K012 }, \ - { K001, K003, K005, K007, K009, K011, K013 }, \ - { K100, K102, K104, K106, K108, K110, K112 }, \ - { K101, K103, K105, K107, K109, K111, K113 }, \ - { K200, K202, K204, K206, K208, K210, K014 }, \ - { K201, K203, K205, K207, K209, K211, K114 }, \ - { K301, K303, K305, K307, K309, K311, K212 }, \ - { K302, K304, K306, K308, K310, K312, K213 }, \ - { K401, ____, K404, K408, K411, K413, K313 }, \ - { ____, K402, K406, K410, K412, K314, K214 } \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, ___, K82, K83, K84, K85, K86 }, \ + { ___, K91, K92, K93, K94, K95, K96 } \ } #define LAYOUT_split_bs( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K403, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K214, \ - K401, K402, K404, K406, K408, K410, K411, K412, K413, K314 \ + K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K46, K81, \ + K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K56, \ + K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K66, K76, \ + K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K75, K86, K96, \ + K80, K91, K82, K92, K83, K93, K84, K94, K85, K95 \ ) { \ - { K000, K002, K004, K006, K008, K010, K012 }, \ - { K001, K003, K005, K007, K009, K011, K013 }, \ - { K100, K102, K104, K106, K108, K110, K112 }, \ - { K101, K103, K105, K107, K109, K111, K113 }, \ - { K200, K202, K204, K206, K208, K210, K014 }, \ - { K201, K203, K205, K207, K209, K211, K114 }, \ - { K301, K303, K305, K307, K309, K311, K212 }, \ - { K302, K304, K306, K308, K310, K312, K213 }, \ - { K401, K403, K404, K408, K411, K413, K313 }, \ - { ____, K402, K406, K410, K412, K314, K214 } \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86 }, \ + { ___, K91, K92, K93, K94, K95, K96 } \ } diff --git a/keyboards/chalice/info.json b/keyboards/chalice/info.json index 68bd710a371..77a3f7bc128 100644 --- a/keyboards/chalice/info.json +++ b/keyboards/chalice/info.json @@ -1,25 +1,27 @@ { "keyboard_name": "Chalice", "url": "https://customkbd.com/products/chalice-pre-order", - "maintainer": "CustomKBD", + "maintainer": "joshajohnson, CustomKBD", "layouts": { "LAYOUT_default": { "layout": [ {"label":"Esc", "x":0, "y":0}, - {"label":"~", "x":1.5, "y":0}, - {"label":"!", "x":2.5, "y":0}, - {"label":"@", "x":3.5, "y":0}, - {"label":"#", "x":4.5, "y":0}, - {"label":"$", "x":5.5, "y":0}, - {"label":"%", "x":6.5, "y":0}, - {"label":"^", "x":7.5, "y":0}, - {"label":"&", "x":10.5, "y":0}, - {"label":"*", "x":11.5, "y":0}, - {"label":"(", "x":12.5, "y":0}, - {"label":")", "x":13.5, "y":0}, - {"label":"_", "x":14.5, "y":0}, - {"label":"+", "x":15.5, "y":0}, + {"label":"`~", "x":1.5, "y":0}, + {"label":"1!", "x":2.5, "y":0}, + {"label":"2@", "x":3.5, "y":0}, + {"label":"3#", "x":4.5, "y":0}, + {"label":"4$", "x":5.5, "y":0}, + {"label":"5%", "x":6.5, "y":0}, + {"label":"6^", "x":7.5, "y":0}, + {"label":"7&", "x":10.5, "y":0}, + {"label":"8*", "x":11.5, "y":0}, + {"label":"9(", "x":12.5, "y":0}, + {"label":"0)", "x":13.5, "y":0}, + {"label":"-_", "x":14.5, "y":0}, + {"label":"=+", "x":15.5, "y":0}, {"label":"Backspace", "x":16.5, "y":0, "w":2}, + + {"label":"Insert", "x":0, "y":1}, {"label":"Tab", "x":1.5, "y":1, "w":1.5}, {"label":"Q", "x":3, "y":1}, {"label":"W", "x":4, "y":1}, @@ -31,10 +33,10 @@ {"label":"I", "x":12, "y":1}, {"label":"O", "x":13, "y":1}, {"label":"P", "x":14, "y":1}, - {"label":"{", "x":15, "y":1}, - {"label":"}", "x":16, "y":1}, - {"label":"|", "x":17, "y":1, "w":1.5}, - {"label":"Mute", "x":19, "y":0.5}, + {"label":"[{", "x":15, "y":1}, + {"label":"]}", "x":16, "y":1}, + {"label":"\\|", "x":17, "y":1, "w":1.5}, + {"label":"Delete", "x":0, "y":2}, {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, {"label":"A", "x":3.25, "y":2}, @@ -46,9 +48,10 @@ {"label":"J", "x":11.25, "y":2}, {"label":"K", "x":12.25, "y":2}, {"label":"L", "x":13.25, "y":2}, - {"label":":", "x":14.25, "y":2}, - {"label":"\"", "x":15.25, "y":2}, + {"label":";:", "x":14.25, "y":2}, + {"label":"'\"", "x":15.25, "y":2}, {"label":"Enter", "x":16.25, "y":2, "w":2.25}, + {"label":"Shift", "x":1.5, "y":3, "w":2.25}, {"label":"Z", "x":3.75, "y":3}, {"label":"X", "x":4.75, "y":3}, @@ -58,21 +61,99 @@ {"label":"B", "x":9.75, "y":3}, {"label":"N", "x":10.75, "y":3}, {"label":"M", "x":11.75, "y":3}, - {"label":"<", "x":12.75, "y":3}, - {"label":">", "x":13.75, "y":3}, - {"label":"?", "x":14.75, "y":3}, + {"label":",<", "x":12.75, "y":3}, + {"label":".>", "x":13.75, "y":3}, + {"label":"/?", "x":14.75, "y":3}, {"label":"Shift", "x":15.75, "y":3, "w":1.75}, - {"label":"Up", "x":17.75, "y":3.25}, + {"label":"Up", "x":17.5, "y":3}, + {"label":"Ctrl", "x":1.5, "y":4, "w":1.5}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"label":"Space", "x":6, "y":4, "w":2}, - {"label":"Fn", "x":8, "y":4}, + {"label":"Space", "x":6, "y":4, "w":2.25}, + {"label":"Fn", "x":8.25, "y":4}, {"label":"Space", "x":9.75, "y":4, "w":2.75}, {"label":"Alt", "x":12.5, "y":4, "w":1.5}, {"label":"Ctrl", "x":15, "y":4, "w":1.5}, - {"label":"Left", "x":16.75, "y":4.25}, - {"label":"Down", "x":17.75, "y":4.25}, - {"label":"Right", "x":18.75, "y":4.25} + {"label":"Left", "x":16.5, "y":4}, + {"label":"Down", "x":17.5, "y":4}, + {"label":"Right", "x":18.5, "y":4} + ] + }, + "LAYOUT_split_bs": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"`~", "x":1.5, "y":0}, + {"label":"1!", "x":2.5, "y":0}, + {"label":"2@", "x":3.5, "y":0}, + {"label":"3#", "x":4.5, "y":0}, + {"label":"4$", "x":5.5, "y":0}, + {"label":"5%", "x":6.5, "y":0}, + {"label":"6^", "x":7.5, "y":0}, + {"label":"7&", "x":10.5, "y":0}, + {"label":"8*", "x":11.5, "y":0}, + {"label":"9(", "x":12.5, "y":0}, + {"label":"0)", "x":13.5, "y":0}, + {"label":"-_", "x":14.5, "y":0}, + {"label":"=+", "x":15.5, "y":0}, + {"label":"Backspace", "x":16.5, "y":0}, + {"label":"Backspace", "x":17.5, "y":0}, + + {"label":"Insert", "x":0, "y":1}, + {"label":"Tab", "x":1.5, "y":1, "w":1.5}, + {"label":"Q", "x":3, "y":1}, + {"label":"W", "x":4, "y":1}, + {"label":"E", "x":5, "y":1}, + {"label":"R", "x":6, "y":1}, + {"label":"T", "x":7, "y":1}, + {"label":"Y", "x":10, "y":1}, + {"label":"U", "x":11, "y":1}, + {"label":"I", "x":12, "y":1}, + {"label":"O", "x":13, "y":1}, + {"label":"P", "x":14, "y":1}, + {"label":"[{", "x":15, "y":1}, + {"label":"]}", "x":16, "y":1}, + {"label":"\\|", "x":17, "y":1, "w":1.5}, + + {"label":"Delete", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, + {"label":"A", "x":3.25, "y":2}, + {"label":"S", "x":4.25, "y":2}, + {"label":"D", "x":5.25, "y":2}, + {"label":"F", "x":6.25, "y":2}, + {"label":"G", "x":7.25, "y":2}, + {"label":"H", "x":10.25, "y":2}, + {"label":"J", "x":11.25, "y":2}, + {"label":"K", "x":12.25, "y":2}, + {"label":"L", "x":13.25, "y":2}, + {"label":";:", "x":14.25, "y":2}, + {"label":"'\"", "x":15.25, "y":2}, + {"label":"Enter", "x":16.25, "y":2, "w":2.25}, + + {"label":"Shift", "x":1.5, "y":3, "w":2.25}, + {"label":"Z", "x":3.75, "y":3}, + {"label":"X", "x":4.75, "y":3}, + {"label":"C", "x":5.75, "y":3}, + {"label":"V", "x":6.75, "y":3}, + {"label":"B", "x":7.75, "y":3}, + {"label":"B", "x":9.75, "y":3}, + {"label":"N", "x":10.75, "y":3}, + {"label":"M", "x":11.75, "y":3}, + {"label":",<", "x":12.75, "y":3}, + {"label":".>", "x":13.75, "y":3}, + {"label":"/?", "x":14.75, "y":3}, + {"label":"Shift", "x":15.75, "y":3, "w":1.75}, + {"label":"Up", "x":17.5, "y":3}, + + {"label":"Ctrl", "x":1.5, "y":4, "w":1.5}, + {"label":"Alt", "x":4.5, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":2.25}, + {"label":"Fn", "x":8.25, "y":4}, + {"label":"Space", "x":9.75, "y":4, "w":2.75}, + {"label":"Alt", "x":12.5, "y":4, "w":1.5}, + {"label":"Ctrl", "x":15, "y":4, "w":1.5}, + {"label":"Left", "x":16.5, "y":4}, + {"label":"Down", "x":17.5, "y":4}, + {"label":"Right", "x":18.5, "y":4} ] } } diff --git a/keyboards/charue/sunsetter/rules.mk b/keyboards/charue/sunsetter/rules.mk index 17aa543022b..f68afca696c 100644 --- a/keyboards/charue/sunsetter/rules.mk +++ b/keyboards/charue/sunsetter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/chavdai40/rev1/rules.mk b/keyboards/chavdai40/rev1/rules.mk index 3c8cf0b1ee4..8ac58cee446 100644 --- a/keyboards/chavdai40/rev1/rules.mk +++ b/keyboards/chavdai40/rev1/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chavdai40/rev2/rules.mk b/keyboards/chavdai40/rev2/rules.mk index 3c8cf0b1ee4..8ac58cee446 100644 --- a/keyboards/chavdai40/rev2/rules.mk +++ b/keyboards/chavdai40/rev2/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/axon40/rules.mk b/keyboards/checkerboards/axon40/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/checkerboards/axon40/rules.mk +++ b/keyboards/checkerboards/axon40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/candybar_ortho/rules.mk b/keyboards/checkerboards/candybar_ortho/rules.mk index c7325af4a4e..9c1d6cae25c 100644 --- a/keyboards/checkerboards/candybar_ortho/rules.mk +++ b/keyboards/checkerboards/candybar_ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/g_idb60/rules.mk b/keyboards/checkerboards/g_idb60/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/checkerboards/g_idb60/rules.mk +++ b/keyboards/checkerboards/g_idb60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/nop60/rules.mk b/keyboards/checkerboards/nop60/rules.mk index 032c08957e9..855a9a3cefa 100644 --- a/keyboards/checkerboards/nop60/rules.mk +++ b/keyboards/checkerboards/nop60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/quark_squared/rules.mk b/keyboards/checkerboards/quark_squared/rules.mk index c8a103221d1..5f39f8194b0 100644 --- a/keyboards/checkerboards/quark_squared/rules.mk +++ b/keyboards/checkerboards/quark_squared/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/checkerboards/ud40_ortho_alt/rules.mk b/keyboards/checkerboards/ud40_ortho_alt/rules.mk index 598ef9619fa..5d4aeea5d2b 100644 --- a/keyboards/checkerboards/ud40_ortho_alt/rules.mk +++ b/keyboards/checkerboards/ud40_ortho_alt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cherrybstudio/cb1800/rules.mk b/keyboards/cherrybstudio/cb1800/rules.mk index f3d44f97c85..57afa20fbf3 100644 --- a/keyboards/cherrybstudio/cb1800/rules.mk +++ b/keyboards/cherrybstudio/cb1800/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cherrybstudio/cb87/rules.mk b/keyboards/cherrybstudio/cb87/rules.mk index 895ff3d4dd9..95ce654774f 100644 --- a/keyboards/cherrybstudio/cb87/rules.mk +++ b/keyboards/cherrybstudio/cb87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cheshire/curiosity/rules.mk b/keyboards/cheshire/curiosity/rules.mk index 6de036f0d3a..21c57114824 100644 --- a/keyboards/cheshire/curiosity/rules.mk +++ b/keyboards/cheshire/curiosity/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chidori/keymaps/oled_sample/keymap.c b/keyboards/chidori/keymaps/oled_sample/keymap.c index a3bb7c28077..78107a18ec9 100644 --- a/keyboards/chidori/keymaps/oled_sample/keymap.c +++ b/keyboards/chidori/keymaps/oled_sample/keymap.c @@ -210,8 +210,9 @@ void oled_write_layer_state(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // If you want to change the display of OLED, you need to change here oled_write_layer_state(); + return false; } #endif diff --git a/keyboards/chili/rules.mk b/keyboards/chili/rules.mk index 336ba86fbb8..8d43b3c377c 100644 --- a/keyboards/chili/rules.mk +++ b/keyboards/chili/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/chimera_ergo/chimera_ergo.h b/keyboards/chimera_ergo/chimera_ergo.h index 32d02886c47..b8897ac14ed 100644 --- a/keyboards/chimera_ergo/chimera_ergo.h +++ b/keyboards/chimera_ergo/chimera_ergo.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_ERGO_H -#define CHIMERA_ERGO_H +#pragma once #include "quantum.h" @@ -43,22 +42,21 @@ #define set_led_white PORTF |= (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/chimera_ls/chimera_ls.h b/keyboards/chimera_ls/chimera_ls.h index 45c91acc3db..7d67d573db4 100644 --- a/keyboards/chimera_ls/chimera_ls.h +++ b/keyboards/chimera_ls/chimera_ls.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_LETS_SPLIT_H -#define CHIMERA_LETS_SPLIT_H +#pragma once #include "quantum.h" @@ -43,22 +42,21 @@ #define set_led_white PORTF |= (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/chimera_ortho/chimera_ortho.h b/keyboards/chimera_ortho/chimera_ortho.h index ec893990a3a..03384c9b285 100644 --- a/keyboards/chimera_ortho/chimera_ortho.h +++ b/keyboards/chimera_ortho/chimera_ortho.h @@ -1,5 +1,4 @@ -#ifndef CHIMERA_ORTHO_H -#define CHIMERA_ORTHO_H +#pragma once #include "quantum.h" @@ -43,21 +42,20 @@ #define set_led_white PORTF |= (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/chlx/merro60/rules.mk b/keyboards/chlx/merro60/rules.mk index bbf3580c013..511f2ca9de9 100644 --- a/keyboards/chlx/merro60/rules.mk +++ b/keyboards/chlx/merro60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/choc_taro/rules.mk b/keyboards/choc_taro/rules.mk index b00cd2f4702..3cd8a67a458 100644 --- a/keyboards/choc_taro/rules.mk +++ b/keyboards/choc_taro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/choco60/rev2/rules.mk b/keyboards/choco60/rev2/rules.mk index ee45ed03f7f..85680a44d1c 100644 --- a/keyboards/choco60/rev2/rules.mk +++ b/keyboards/choco60/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/christmas_tree/V2017/V2017.h b/keyboards/christmas_tree/V2017/V2017.h index a82a1e82f49..f779c0ed479 100644 --- a/keyboards/christmas_tree/V2017/V2017.h +++ b/keyboards/christmas_tree/V2017/V2017.h @@ -1,6 +1,3 @@ -#ifndef V2017_H -#define V2017_H +#pragma once #include "christmas_tree.h" - -#endif \ No newline at end of file diff --git a/keyboards/christmas_tree/V2017/config.h b/keyboards/christmas_tree/V2017/config.h index ebe3d3bf1e3..abc94749a85 100644 --- a/keyboards/christmas_tree/V2017/config.h +++ b/keyboards/christmas_tree/V2017/config.h @@ -1,8 +1,5 @@ -#ifndef V2017_CONFIG_H -#define V2017_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x2017 - -#endif \ No newline at end of file diff --git a/keyboards/christmas_tree/christmas_tree.h b/keyboards/christmas_tree/christmas_tree.h index 11063c9152f..68eefca6a86 100644 --- a/keyboards/christmas_tree/christmas_tree.h +++ b/keyboards/christmas_tree/christmas_tree.h @@ -1,20 +1,14 @@ -#ifndef CHRISTMAS_TREE_H -#define CHRISTMAS_TREE_H -#include "quantum.h" +#pragma once +#include "quantum.h" #define LAYOUT( \ - k00, k01, k02, k03, k04, k05 \ -) \ -{ \ - { k00 }, \ - { k01 }, \ - { k02 }, \ - { k03 }, \ - { k04 }, \ - { k05 } \ + k00, k10, k20, k30, k40, k50 \ +) { \ + { k00 }, \ + { k10 }, \ + { k20 }, \ + { k30 }, \ + { k40 }, \ + { k50 } \ } - - - -#endif diff --git a/keyboards/christmas_tree/config.h b/keyboards/christmas_tree/config.h index 05e5bdb2b49..531c5996d2f 100644 --- a/keyboards/christmas_tree/config.h +++ b/keyboards/christmas_tree/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -53,5 +52,3 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/ck60i/rules.mk b/keyboards/ck60i/rules.mk index 18b4e737ffc..baf54d1e2e5 100644 --- a/keyboards/ck60i/rules.mk +++ b/keyboards/ck60i/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index 728eb8f132a..26ba86e1467 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/ckeys/nakey/nakey.h b/keyboards/ckeys/nakey/nakey.h index bbf531fb680..bdb26afa26b 100644 --- a/keyboards/ckeys/nakey/nakey.h +++ b/keyboards/ckeys/nakey/nakey.h @@ -13,27 +13,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef NAKEY_H -#define NAKEY_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_numpad_5x4( \ k00, k01, k02, k03, \ - k10, k11, k12, \ + k10, k11, k12, \ k20, k21, k22, k13, \ - k30, k31, k32, \ - k40, k41, k33 \ + k30, k31, k32, \ + k40, k41, k33 \ ) { \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, KC_NO }, \ - { k30, k31, k32, k33 }, \ - { k40, KC_NO, k41, KC_NO }, \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, XXX }, \ + { k30, k31, k32, k33 }, \ + { k40, XXX, k41, XXX } \ } - -#endif diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index 45bbd27ecc3..00e224c206b 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -109,5 +108,3 @@ along with this program. If not, see . #define AUDIO_PIN C6 #define STARTUP_SONG SONG(STARTUP_SOUND) #endif - -#endif diff --git a/keyboards/ckeys/obelus/obelus.h b/keyboards/ckeys/obelus/obelus.h index 371b79df201..76ff4f1a9f5 100644 --- a/keyboards/ckeys/obelus/obelus.h +++ b/keyboards/ckeys/obelus/obelus.h @@ -1,5 +1,4 @@ -#ifndef OBELUS_H -#define OBELUS_H +#pragma once #include "quantum.h" @@ -12,12 +11,9 @@ k10, k11, k12, k13, \ k20, k21, k22, k23, \ k30, k31, k32, k33 \ -) \ -{ \ +) { \ { k00, k01, k02, k03 }, \ { k10, k11, k12, k13 }, \ { k20, k21, k22, k23 }, \ { k30, k31, k32, k33 } \ } - -#endif diff --git a/keyboards/ckeys/thedora/rules.mk b/keyboards/ckeys/thedora/rules.mk index 3aabafc953d..2b322b2ab15 100755 --- a/keyboards/ckeys/thedora/rules.mk +++ b/keyboards/ckeys/thedora/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ckeys/washington/keymaps/default/keymap.c b/keyboards/ckeys/washington/keymaps/default/keymap.c index a83a28e955f..771905814a1 100644 --- a/keyboards/ckeys/washington/keymaps/default/keymap.c +++ b/keyboards/ckeys/washington/keymaps/default/keymap.c @@ -59,7 +59,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { @@ -79,5 +79,6 @@ void oled_task_user(void) { oled_write_P(IS_LED_ON(usb_led, USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/claw44/keymaps/oled/keymap.c b/keyboards/claw44/keymaps/oled/keymap.c index 07cb581712c..1778ac61672 100644 --- a/keyboards/claw44/keymaps/oled/keymap.c +++ b/keyboards/claw44/keymaps/oled/keymap.c @@ -140,7 +140,7 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { const char *read_keylog(void) { return keylog_str; } const char *read_keylogs(void) { return keylogs_str; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_layer_state(); oled_write_ln(read_keylog(), false); @@ -148,6 +148,7 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/clawsome/bookerboard/rules.mk b/keyboards/clawsome/bookerboard/rules.mk index d67d33602d6..dbf09230701 100644 --- a/keyboards/clawsome/bookerboard/rules.mk +++ b/keyboards/clawsome/bookerboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/coupe/rules.mk b/keyboards/clawsome/coupe/rules.mk index 933784e9c02..13ab5087823 100644 --- a/keyboards/clawsome/coupe/rules.mk +++ b/keyboards/clawsome/coupe/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/doodle/rules.mk b/keyboards/clawsome/doodle/rules.mk index 2bab9161758..a7f737a0866 100644 --- a/keyboards/clawsome/doodle/rules.mk +++ b/keyboards/clawsome/doodle/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/fightpad/rules.mk b/keyboards/clawsome/fightpad/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/clawsome/fightpad/rules.mk +++ b/keyboards/clawsome/fightpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/clawsome/gamebuddy/v1_0/rules.mk b/keyboards/clawsome/gamebuddy/v1_0/rules.mk index 723de16c214..6b6d5488228 100644 --- a/keyboards/clawsome/gamebuddy/v1_0/rules.mk +++ b/keyboards/clawsome/gamebuddy/v1_0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/gamebuddy/v1_m/rules.mk b/keyboards/clawsome/gamebuddy/v1_m/rules.mk index 2bab9161758..a7f737a0866 100644 --- a/keyboards/clawsome/gamebuddy/v1_m/rules.mk +++ b/keyboards/clawsome/gamebuddy/v1_m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/hatchback/rules.mk b/keyboards/clawsome/hatchback/rules.mk index bd712c09820..74a7851e6c7 100644 --- a/keyboards/clawsome/hatchback/rules.mk +++ b/keyboards/clawsome/hatchback/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/luggage_rack/rules.mk b/keyboards/clawsome/luggage_rack/rules.mk index bd712c09820..74a7851e6c7 100644 --- a/keyboards/clawsome/luggage_rack/rules.mk +++ b/keyboards/clawsome/luggage_rack/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/numeros/rules.mk b/keyboards/clawsome/numeros/rules.mk index effbf1bbaa6..6550b56febd 100644 --- a/keyboards/clawsome/numeros/rules.mk +++ b/keyboards/clawsome/numeros/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/roadster/rules.mk b/keyboards/clawsome/roadster/rules.mk index bd712c09820..74a7851e6c7 100644 --- a/keyboards/clawsome/roadster/rules.mk +++ b/keyboards/clawsome/roadster/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/sedan/rules.mk b/keyboards/clawsome/sedan/rules.mk index 02b80f6fd21..732c4b6478d 100644 --- a/keyboards/clawsome/sedan/rules.mk +++ b/keyboards/clawsome/sedan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/sidekick/rules.mk b/keyboards/clawsome/sidekick/rules.mk index d67d33602d6..dbf09230701 100644 --- a/keyboards/clawsome/sidekick/rules.mk +++ b/keyboards/clawsome/sidekick/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clawsome/suv/rules.mk b/keyboards/clawsome/suv/rules.mk index 2bab9161758..a7f737a0866 100644 --- a/keyboards/clawsome/suv/rules.mk +++ b/keyboards/clawsome/suv/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/clueboard/17/17.h b/keyboards/clueboard/17/17.h index ebf2083862f..ef5b3f3e04d 100644 --- a/keyboards/clueboard/17/17.h +++ b/keyboards/clueboard/17/17.h @@ -1,6 +1,3 @@ -#ifndef CLUEPAD_H -#define CLUEPAD_H +#pragma once #include "quantum.h" - -#endif diff --git a/keyboards/clueboard/17/config.h b/keyboards/clueboard/17/config.h index 877f4786908..e2d0d1a23e4 100644 --- a/keyboards/clueboard/17/config.h +++ b/keyboards/clueboard/17/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* Number of backlighting levels */ #define BACKLIGHT_LEVELS 3 - -#endif diff --git a/keyboards/clueboard/17/info.json b/keyboards/clueboard/17/info.json index 8ef87244ee3..fb12f7dccea 100644 --- a/keyboards/clueboard/17/info.json +++ b/keyboards/clueboard/17/info.json @@ -37,7 +37,6 @@ "vid": "0xC1ED" }, "layout_aliases": { - "KEYMAP": "LAYOUT_numpad_5x4", "LAYOUT": "LAYOUT_numpad_5x4" }, "layouts": { diff --git a/keyboards/clueboard/2x1800/2018/2018.h b/keyboards/clueboard/2x1800/2018/2018.h index c6e152ad441..6e2d3b3831b 100644 --- a/keyboards/clueboard/2x1800/2018/2018.h +++ b/keyboards/clueboard/2x1800/2018/2018.h @@ -13,9 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef TWOX1800_H -#define TWOX1800_H -#include "quantum.h" +#pragma once -#endif +#include "quantum.h" diff --git a/keyboards/clueboard/2x1800/2018/info.json b/keyboards/clueboard/2x1800/2018/info.json index 3028fd4c204..38e7421a141 100644 --- a/keyboards/clueboard/2x1800/2018/info.json +++ b/keyboards/clueboard/2x1800/2018/info.json @@ -41,7 +41,6 @@ "pid": "0x23A0" }, "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/2x1800/2021/info.json b/keyboards/clueboard/2x1800/2021/info.json index 376b9151e54..088ce343db9 100644 --- a/keyboards/clueboard/2x1800/2021/info.json +++ b/keyboards/clueboard/2x1800/2021/info.json @@ -28,7 +28,6 @@ "pid": "0x23A0" }, "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/60/60.h b/keyboards/clueboard/60/60.h index 0345f419fa4..9a019ccf6db 100644 --- a/keyboards/clueboard/60/60.h +++ b/keyboards/clueboard/60/60.h @@ -13,9 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef CLUEBOARD60_H -#define CLUEBOARD60_H -#include "quantum.h" +#pragma once -#endif +#include "quantum.h" diff --git a/keyboards/clueboard/60/info.json b/keyboards/clueboard/60/info.json index 695194e8270..1698d221d37 100644 --- a/keyboards/clueboard/60/info.json +++ b/keyboards/clueboard/60/info.json @@ -30,7 +30,6 @@ }, "community_layouts": ["60_ansi", "60_ansi_split_bs_rshift", "60_iso"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/66/rev1/info.json b/keyboards/clueboard/66/rev1/info.json index c59cfa0b81e..6ff733b3dda 100644 --- a/keyboards/clueboard/66/rev1/info.json +++ b/keyboards/clueboard/66/rev1/info.json @@ -43,7 +43,6 @@ }, "community_layouts": ["66_ansi", "66_iso"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/66/rev2/info.json b/keyboards/clueboard/66/rev2/info.json index 5ef47cca98a..27d293552db 100644 --- a/keyboards/clueboard/66/rev2/info.json +++ b/keyboards/clueboard/66/rev2/info.json @@ -43,7 +43,6 @@ }, "community_layouts": ["66_ansi", "66_iso"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/66/rev3/info.json b/keyboards/clueboard/66/rev3/info.json index 1944331e2b9..0f2eada753e 100644 --- a/keyboards/clueboard/66/rev3/info.json +++ b/keyboards/clueboard/66/rev3/info.json @@ -43,7 +43,6 @@ }, "community_layouts": ["66_ansi", "66_iso"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/66/rev4/info.json b/keyboards/clueboard/66/rev4/info.json index 1a81b3d088d..f1f1ae4dec5 100644 --- a/keyboards/clueboard/66/rev4/info.json +++ b/keyboards/clueboard/66/rev4/info.json @@ -41,7 +41,6 @@ }, "community_layouts": ["66_ansi", "66_iso"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/clueboard/66_hotswap/gen1/config.h b/keyboards/clueboard/66_hotswap/gen1/config.h index 7e53e0a011e..1e124745bd9 100644 --- a/keyboards/clueboard/66_hotswap/gen1/config.h +++ b/keyboards/clueboard/66_hotswap/gen1/config.h @@ -77,12 +77,38 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define LED_DRIVER_ADDR_1 0b1110100 -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define LED_DRIVER_COUNT 1 #define DRIVER_LED_TOTAL 71 +// LED Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects +#define ENABLE_LED_MATRIX_ALPHAS_MODS +#define ENABLE_LED_MATRIX_BREATHING +#define ENABLE_LED_MATRIX_BAND +#define ENABLE_LED_MATRIX_BAND_PINWHEEL +#define ENABLE_LED_MATRIX_BAND_SPIRAL +#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN +#define ENABLE_LED_MATRIX_CYCLE_OUT_IN +#define ENABLE_LED_MATRIX_DUAL_BEACON +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_LED_MATRIX_SPLASH +# define ENABLE_LED_MATRIX_MULTISPLASH +#endif +#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_WAVE_UP_DOWN + #define AUDIO_PIN A5 #define AUDIO_PIN_ALT A4 #define AUDIO_PIN_ALT_AS_NEGATIVE diff --git a/keyboards/clueboard/66_hotswap/gen1/gen1.c b/keyboards/clueboard/66_hotswap/gen1/gen1.c index 8e3db70d071..66c40731ec8 100644 --- a/keyboards/clueboard/66_hotswap/gen1/gen1.c +++ b/keyboards/clueboard/66_hotswap/gen1/gen1.c @@ -16,7 +16,7 @@ #include "gen1.h" #ifdef LED_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | LED address diff --git a/keyboards/clueboard/66_hotswap/prototype/info.json b/keyboards/clueboard/66_hotswap/prototype/info.json index 8f313739862..d3f81851f4d 100644 --- a/keyboards/clueboard/66_hotswap/prototype/info.json +++ b/keyboards/clueboard/66_hotswap/prototype/info.json @@ -43,7 +43,6 @@ }, "community_layouts": ["66_ansi"], "layout_aliases": { - "KEYMAP": "LAYOUT_all", "LAYOUT": "LAYOUT_all" }, "layouts": { diff --git a/keyboards/cmm_studio/saka68/hotswap/rules.mk b/keyboards/cmm_studio/saka68/hotswap/rules.mk index f1b8f4cf8b1..c38b5f2d031 100644 --- a/keyboards/cmm_studio/saka68/hotswap/rules.mk +++ b/keyboards/cmm_studio/saka68/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/cmm_studio/saka68/solder/rules.mk b/keyboards/cmm_studio/saka68/solder/rules.mk index 077b060eea0..9310ae063da 100644 --- a/keyboards/cmm_studio/saka68/solder/rules.mk +++ b/keyboards/cmm_studio/saka68/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coarse/cordillera/rules.mk b/keyboards/coarse/cordillera/rules.mk index 57f80965eb0..d1c149794ea 100644 --- a/keyboards/coarse/cordillera/rules.mk +++ b/keyboards/coarse/cordillera/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/coarse/ixora/rules.mk b/keyboards/coarse/ixora/rules.mk index 339fdee920b..5026583b068 100644 --- a/keyboards/coarse/ixora/rules.mk +++ b/keyboards/coarse/ixora/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coarse/vinta/rules.mk b/keyboards/coarse/vinta/rules.mk index e887eb0981f..fd336cf0211 100644 --- a/keyboards/coarse/vinta/rules.mk +++ b/keyboards/coarse/vinta/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coarse/vinta/vinta.h b/keyboards/coarse/vinta/vinta.h index 03a815c0659..18f51cd434b 100644 --- a/keyboards/coarse/vinta/vinta.h +++ b/keyboards/coarse/vinta/vinta.h @@ -1,55 +1,49 @@ -#ifndef VINTA_H -#define VINTA_H - -#define XXX KC_NO +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_69_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, K4C, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, k4F } \ } #define LAYOUT_68_tada( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4C, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, XXX, k4D, k4E, k4F } \ } #define LAYOUT_65_ansi_blocker( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, K1F, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3E, K3F, \ - K40, K41, K42, K45, K49, K4A, K4D, K4E, K4F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, XXX, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, XXX, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, XXX, K3C, XXX, K3E, K3F }, \ - { K40, K41, K42, XXX, XXX, K45, XXX, XXX, XXX, K49, K4A, XXX, XXX, K4D, K4E, K4F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3E, k3F, \ + k40, k41, k42, k45, k49, k4A, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, XXX, XXX, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/comet46/comet46.h b/keyboards/comet46/comet46.h index c108d4193b3..094d960e200 100644 --- a/keyboards/comet46/comet46.h +++ b/keyboards/comet46/comet46.h @@ -1,22 +1,21 @@ -#ifndef COMET46_H -#define COMET46_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11,\ - k12, k13, k14, k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25,\ - k26, k27, k28, k29, k31, k32, k33, k34, k35, k36, k37, k38, k41, k42,\ - k43, k44, k45, k46, k47, k48 \ -) \ -{ \ - { k13, k01, k26, k12, k00, k11, k25, k42, k10, k24}, \ - { k03, k28, k14, k02, k27, k41, k09, k23, k38, k08}, \ - { k31, k16, k04, k29, k15, k22, k37, k07, k21, k36}, \ - { KC_NO, k32, k17, k05, k43, k48, k06, k20, k35, KC_NO }, \ - { KC_NO, k45, k33, k18, k44, k47, k19, k34, k46, KC_NO }, \ + k04, k01, k13, k10, k22, k33, k36, k27, k19, k16, k08, k05, \ + k03, k00, k12, k24, k21, k32, k43, k46, k37, k28, k25, k17, k09, k06, \ + k02, k14, k11, k23, k20, k31, k42, k47, k38, k29, k26, k18, k15, k07, \ + k34, k44, k41, k48, k45, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, XXX }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, XXX } \ } -#endif diff --git a/keyboards/comet46/config.h b/keyboards/comet46/config.h index 5ae026f9238..067dabb1036 100644 --- a/keyboards/comet46/config.h +++ b/keyboards/comet46/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/comet46/i2c.h b/keyboards/comet46/i2c.h index 47cf6bd1b2c..710662c7abd 100644 --- a/keyboards/comet46/i2c.h +++ b/keyboards/comet46/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/compound/rules.mk b/keyboards/compound/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/compound/rules.mk +++ b/keyboards/compound/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index 8dc565546be..499517f9848 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/contra/contra.h b/keyboards/contra/contra.h index 74aad77d0b0..27a8dd2956f 100755 --- a/keyboards/contra/contra.h +++ b/keyboards/contra/contra.h @@ -1,30 +1,27 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x12( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/contra/rules.mk b/keyboards/contra/rules.mk index 91d887f15b3..72b4d86e97c 100755 --- a/keyboards/contra/rules.mk +++ b/keyboards/contra/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/a1200/miss1200/rules.mk b/keyboards/converter/a1200/miss1200/rules.mk index cf8291d064d..4ccdf5bb3ef 100644 --- a/keyboards/converter/a1200/miss1200/rules.mk +++ b/keyboards/converter/a1200/miss1200/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/a1200/teensy2pp/rules.mk b/keyboards/converter/a1200/teensy2pp/rules.mk index 29624324e89..5f74692015f 100644 --- a/keyboards/converter/a1200/teensy2pp/rules.mk +++ b/keyboards/converter/a1200/teensy2pp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/adb_usb/adb.c b/keyboards/converter/adb_usb/adb.c new file mode 100644 index 00000000000..28f14c9fe89 --- /dev/null +++ b/keyboards/converter/adb_usb/adb.c @@ -0,0 +1,531 @@ +/* +Copyright 2011-19 Jun WAKO +Copyright 2013 Shay Green + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#include +#include +#include +#include +#include "adb.h" +#include "print.h" + +// GCC doesn't inline functions normally +#define data_lo() (ADB_DDR |= (1 << ADB_DATA_BIT)) +#define data_hi() (ADB_DDR &= ~(1 << ADB_DATA_BIT)) +#define data_in() (ADB_PIN & (1 << ADB_DATA_BIT)) + +#ifdef ADB_PSW_BIT +static inline void psw_lo(void); +static inline void psw_hi(void); +static inline bool psw_in(void); +#endif + +static inline void attention(void); +static inline void place_bit0(void); +static inline void place_bit1(void); +static inline void send_byte(uint8_t data); +static inline uint16_t wait_data_lo(uint16_t us); +static inline uint16_t wait_data_hi(uint16_t us); + +void adb_host_init(void) { + ADB_PORT &= ~(1 << ADB_DATA_BIT); + data_hi(); +#ifdef ADB_PSW_BIT + psw_hi(); +#endif +} + +#ifdef ADB_PSW_BIT +bool adb_host_psw(void) { return psw_in(); } +#endif + +/* + * Don't call this in a row without the delay, otherwise it makes some of poor controllers + * overloaded and misses strokes. Recommended interval is 12ms. + * + * Thanks a lot, blargg! + * + * + */ +uint16_t adb_host_kbd_recv(void) { return adb_host_talk(ADB_ADDR_KEYBOARD, ADB_REG_0); } + +#ifdef ADB_MOUSE_ENABLE +uint16_t adb_host_mouse_recv(void) { return adb_host_talk(ADB_ADDR_MOUSE, ADB_REG_0); } +#endif + +// This sends Talk command to read data from register and returns length of the data. +uint8_t adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { + for (int8_t i = 0; i < len; i++) buf[i] = 0; + + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_TALK | reg); + place_bit0(); // Stopbit(0) + // TODO: Service Request(Srq): + // Device holds low part of comannd stopbit for 140-260us + // + // Command: + // ......._ ______________________ ___ ............_ ------- + // | | | | | | | + // Command | | | | | Data bytes | | + // ........|___| | 140-260 |__| |_............|___| + // |stop0 | Tlt Stop-to-Start |start1| |stop0 | + // + // Command without data: + // ......._ __________________________ + // | | + // Command | | + // ........|___| | 140-260 | + // |stop0 | Tlt Stop-to-Start | + // + // Service Request: + // ......._ ______ ___ ............_ ------- + // | 140-260 | | | | | | + // Command | Service Request | | | | Data bytes | | + // ........|___________________| |__| |_............|___| + // |stop0 | |start1| |stop0 | + // ......._ __________ + // | 140-260 | + // Command | Service Request | + // ........|___________________| + // |stop0 | + // This can be happened? + // ......._ ______________________ ___ ............_ ----- + // | | | | | | 140-260 | + // Command | | | | | Data bytes | Service Request | + // ........|___| | 140-260 |__| |_............|_________________| + // |stop0 | Tlt Stop-to-Start |start1| |stop0 | + // + // "Service requests are issued by the devices during a very specific time at the + // end of the reception of the command packet. + // If a device in need of service issues a service request, it must do so within + // the 65 µs of the Stop Bit’s low time and maintain the line low for a total of 300 µs." + // + // "A device sends a Service Request signal by holding the bus low during the low + // portion of the stop bit of any command or data transaction. The device must lengthen + // the stop by a minimum of 140 J.lS beyond its normal duration, as shown in Figure 8-15." + // http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf + if (!wait_data_hi(500)) { // Service Request(310us Adjustable Keyboard): just ignored + xprintf("R"); + sei(); + return 0; + } + if (!wait_data_lo(500)) { // Tlt/Stop to Start(140-260us) + sei(); + return 0; // No data from device(not error); + } + + // start bit(1) + if (!wait_data_hi(40)) { + xprintf("S"); + sei(); + return 0; + } + if (!wait_data_lo(100)) { + xprintf("s"); + sei(); + return 0; + } + + uint8_t n = 0; // bit count + do { + // + // |<- bit_cell_max(130) ->| + // | |<- lo ->| + // | | |<-hi->| + // _______ + // | | | + // | 130-lo | lo-hi | + // |________| | + // + uint8_t lo = (uint8_t)wait_data_hi(130); + if (!lo) goto error; // no more bit or after stop bit + + uint8_t hi = (uint8_t)wait_data_lo(lo); + if (!hi) goto error; // stop bit extedned by Srq? + + if (n / 8 >= len) continue; // can't store in buf + + buf[n / 8] <<= 1; + if ((130 - lo) < (lo - hi)) { + buf[n / 8] |= 1; + } + } while (++n); + +error: + sei(); + return n / 8; +} + +uint16_t adb_host_talk(uint8_t addr, uint8_t reg) { + uint8_t len; + uint8_t buf[8]; + len = adb_host_talk_buf(addr, reg, buf, 8); + if (len != 2) return 0; + return (buf[0] << 8 | buf[1]); +} + +void adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_LISTEN | reg); + place_bit0(); // Stopbit(0) + // TODO: Service Request + _delay_us(200); // Tlt/Stop to Start + place_bit1(); // Startbit(1) + for (int8_t i = 0; i < len; i++) { + send_byte(buf[i]); + // xprintf("%02X ", buf[i]); + } + place_bit0(); // Stopbit(0); + sei(); +} + +void adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l) { + uint8_t buf[2] = {data_h, data_l}; + adb_host_listen_buf(addr, reg, buf, 2); +} + +void adb_host_flush(uint8_t addr) { + cli(); + attention(); + send_byte((addr << 4) | ADB_CMD_FLUSH); + place_bit0(); // Stopbit(0) + _delay_us(200); // Tlt/Stop to Start + sei(); +} + +// send state of LEDs +void adb_host_kbd_led(uint8_t led) { + // Listen Register2 + // upper byte: not used + // lower byte: bit2=ScrollLock, bit1=CapsLock, bit0=NumLock + adb_host_listen(ADB_ADDR_KEYBOARD, ADB_REG_2, 0, led & 0x07); +} + +#ifdef ADB_PSW_BIT +static inline void psw_lo() { + ADB_DDR |= (1 << ADB_PSW_BIT); + ADB_PORT &= ~(1 << ADB_PSW_BIT); +} +static inline void psw_hi() { + ADB_PORT |= (1 << ADB_PSW_BIT); + ADB_DDR &= ~(1 << ADB_PSW_BIT); +} +static inline bool psw_in() { + ADB_PORT |= (1 << ADB_PSW_BIT); + ADB_DDR &= ~(1 << ADB_PSW_BIT); + return ADB_PIN & (1 << ADB_PSW_BIT); +} +#endif + +static inline void attention(void) { + data_lo(); + _delay_us(800 - 35); // bit1 holds lo for 35 more + place_bit1(); +} + +static inline void place_bit0(void) { + data_lo(); + _delay_us(65); + data_hi(); + _delay_us(35); +} + +static inline void place_bit1(void) { + data_lo(); + _delay_us(35); + data_hi(); + _delay_us(65); +} + +static inline void send_byte(uint8_t data) { + for (int i = 0; i < 8; i++) { + if (data & (0x80 >> i)) + place_bit1(); + else + place_bit0(); + } +} + +// These are carefully coded to take 6 cycles of overhead. +// inline asm approach became too convoluted +static inline uint16_t wait_data_lo(uint16_t us) { + do { + if (!data_in()) break; + _delay_us(1 - (6 * 1000000.0 / F_CPU)); + } while (--us); + return us; +} + +static inline uint16_t wait_data_hi(uint16_t us) { + do { + if (data_in()) break; + _delay_us(1 - (6 * 1000000.0 / F_CPU)); + } while (--us); + return us; +} + +/* +ADB Protocol +============ + +Resources +--------- +ADB - The Untold Story: Space Aliens Ate My Mouse + http://developer.apple.com/legacy/mac/library/#technotes/hw/hw_01.html +ADB Manager + http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Devices/ADB_Manager.pdf + Service request(5-17) +Apple IIgs Hardware Reference Second Edition [Chapter6 p121] + ftp://ftp.apple.asimov.net/pub/apple_II/documentation/Apple%20IIgs%20Hardware%20Reference.pdf +ADB Keycode + http://72.0.193.250/Documentation/macppc/adbkeycodes/ + http://m0115.web.fc2.com/m0115.jpg + [Inside Macintosh volume V, pages 191-192] + http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-421.18.3/IOHIDFamily/Cosmo_USB2ADB.c +ADB Signaling + http://kbdbabel.sourceforge.net/doc/kbd_signaling_pcxt_ps2_adb.pdf +ADB Overview & History + http://en.wikipedia.org/wiki/Apple_Desktop_Bus +Microchip Application Note: ADB device(with code for PIC16C) + http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011062 +AVR ATtiny2131 ADB to PS/2 converter(Japanese) + http://hp.vector.co.jp/authors/VA000177/html/KeyBoardA5DEA5CBA5A2II.html + + +Pinouts +------- + ADB female socket from the front: + __________ + | | <--- top + | 4o o3 | + |2o o1| + | == | + |________| <--- bottom + | | <--- 4pins + + + ADB female socket from bottom: + + ========== <--- front + | | + | | + |2o o1| + |4o o3| + ---------- <--- back + + 1: Data + 2: Power SW(low when press Power key) + 3: Vcc(5V) + 4: GND + + +Commands +-------- + ADB command is 1byte and consists of 4bit-address, 2bit-command + type and 2bit-register. The commands are always sent by Host. + + Command format: + 7 6 5 4 3 2 1 0 + | | | |------------ address + | |-------- command type + | |---- register + + bits commands + ------------------------------------------------------ + - - - - 0 0 0 0 Send Reset(reset all devices) + A A A A 0 0 0 1 Flush(reset a device) + - - - - 0 0 1 0 Reserved + - - - - 0 0 1 1 Reserved + - - - - 0 1 - - Reserved + A A A A 1 0 R R Listen(write to a device) + A A A A 1 1 R R Talk(read from a device) + + The command to read keycodes from keyboard is 0x2C which + consist of keyboard address 2 and Talk against register 0. + + Address: + 2: keyboard + 3: mice + + Registers: + 0: application(keyboard uses this to store its data.) + 1: application + 2: application(keyboard uses this for LEDs and state of modifiers) + 3: status and command + + +Communication +------------- + This is a minimum information for keyboard communication. + See "Resources" for detail. + + Signaling: + + ~~~~____________~~||||||||||||__~~~~~_~~|||||||||||||||__~~~~ + + |800us | |7 Command 0| | | |15-64 Data 0|Stopbit(0) + +Attention | | | +Startbit(1) + +Startbit(1) | +Tlt(140-260us) + +stopbit(0) + + Bit cells: + + bit0: ______~~~ + 65 :35us + + bit1: ___~~~~~~ + 35 :65us + + bit0 low time: 60-70% of bit cell(42-91us) + bit1 low time: 30-40% of bit cell(21-52us) + bit cell time: 70-130us + [from Apple IIgs Hardware Reference Second Edition] + + Criterion for bit0/1: + After 55us if line is low/high then bit is 0/1. + + Attention & start bit: + Host asserts low in 560-1040us then places start bit(1). + + Tlt(Stop to Start): + Bus stays high in 140-260us then device places start bit(1). + + Global reset: + Host asserts low in 2.8-5.2ms. All devices are forced to reset. + + Service request from device(Srq): + Device can request to send at commad(Global only?) stop bit. + Requesting device keeps low for 140-260us at stop bit of command. + + +Keyboard Data(Register0) + This 16bit data can contains two keycodes and two released flags. + First keycode is palced in upper byte. When one keyocode is sent, + lower byte is 0xFF. + Release flag is 1 when key is released. + + 1514 . . . . . 8 7 6 . . . . . 0 + | | | | | | | | | +-+-+-+-+-+-+- Keycode2 + | | | | | | | | +--------------- Released2(1 when the key is released) + | +-+-+-+-+-+-+----------------- Keycode1 + +------------------------------- Released1(1 when the key is released) + + Keycodes: + Scancode consists of 7bit keycode and 1bit release flag. + Device can send two keycodes at once. If just one keycode is sent + keycode1 contains it and keyocode2 is 0xFF. + + Power switch: + You can read the state from PSW line(active low) however + the switch has a special scancode 0x7F7F, so you can + also read from Data line. It uses 0xFFFF for release scancode. + +Keyboard LEDs & state of keys(Register2) + This register hold current state of three LEDs and nine keys. + The state of LEDs can be changed by sending Listen command. + + 1514 . . . . . . 7 6 5 . 3 2 1 0 + | | | | | | | | | | | | | | | +- LED1(NumLock) + | | | | | | | | | | | | | | +--- LED2(CapsLock) + | | | | | | | | | | | | | +----- LED3(ScrollLock) + | | | | | | | | | | +-+-+------- Reserved + | | | | | | | | | +------------- ScrollLock + | | | | | | | | +--------------- NumLock + | | | | | | | +----------------- Apple/Command + | | | | | | +------------------- Option + | | | | | +--------------------- Shift + | | | | +----------------------- Control + | | | +------------------------- Reset/Power + | | +--------------------------- CapsLock + | +----------------------------- Delete + +------------------------------- Reserved + +Address, Handler ID and bits(Register3) + 1514131211 . . 8 7 . . . . . . 0 + | | | | | | | | | | | | | | | | + | | | | | | | | +-+-+-+-+-+-+-+- Handler ID + | | | | +-+-+-+----------------- Address + | | | +------------------------- 0 + | | +--------------------------- Service request enable(1 = enabled) + | +----------------------------- Exceptional event(alwyas 1 if not used) + +------------------------------- 0 + +ADB Bit Cells + bit cell time: 70-130us + low part of bit0: 60-70% of bit cell + low part of bit1: 30-40% of bit cell + + bit cell time 70us 130us + -------------------------------------------- + low part of bit0 42-49 78-91 + high part of bit0 21-28 39-52 + low part of bit1 21-28 39-52 + high part of bit1 42-49 78-91 + + + bit0: + 70us bit cell: + ____________~~~~~~ + 42-49 21-28 + + 130us bit cell: + ____________~~~~~~ + 78-91 39-52 + + bit1: + 70us bit cell: + ______~~~~~~~~~~~~ + 21-28 42-49 + + 130us bit cell: + ______~~~~~~~~~~~~ + 39-52 78-91 + + [from Apple IIgs Hardware Reference Second Edition] + +Keyboard Handle ID + Apple Standard Keyboard M0116: 0x01 + Apple Extended Keyboard M0115: 0x02 + Apple Extended Keyboard II M3501: 0x02 + Apple Adjustable Keybaord: 0x10 + + http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c?v=4.4#L802 + +END_OF_ADB +*/ diff --git a/tmk_core/protocol/adb.h b/keyboards/converter/adb_usb/adb.h similarity index 100% rename from tmk_core/protocol/adb.h rename to keyboards/converter/adb_usb/adb.h diff --git a/keyboards/converter/adb_usb/adb_usb.h b/keyboards/converter/adb_usb/adb_usb.h index 3db303b039f..ddbbd715649 100644 --- a/keyboards/converter/adb_usb/adb_usb.h +++ b/keyboards/converter/adb_usb/adb_usb.h @@ -17,11 +17,12 @@ along with this program. If not, see . Ported to QMK by Peter Roe */ -#ifndef ADB_USB_H -#define ADB_USB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* M0115/M3501 Apple Extended Keyboard ANSI * ,---. ,---------------. ,---------------. ,---------------. ,-----------. ,---. * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |Pwr| @@ -39,29 +40,29 @@ Ported to QMK by Peter Roe * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_ext_ansi( \ - K35, K7A,K78,K63,K76,K60,K61,K62,K64,K65,K6D,K67,K6F, K69,K6B,K71, K7F, \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74, K47,K51,K4B,K43, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K45, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K3E, K53,K54,K55, \ - K36,K3A,K37, K31, K7C,K7D, K3B,K3D,K3C, K52, K41,K4C \ + k35, k7A, k78, k63, k76, k60, k61, k62, k64, k65, k6D, k67, k6F, k69, k6B, k71, k7F, \ + k32, k12, k13, k14, k15, k17, k16, k1A, k1C, k19, k1D, k1B, k18, k33, k72, k73, k74, k47, k51, k4B, k43, \ + k30, k0C, k0D, k0E, k0F, k11, k10, k20, k22, k1F, k23, k21, k1E, k2A, k75, k77, k79, k59, k5B, k5C, k4E, \ + k39, k00, k01, k02, k03, k05, k04, k26, k28, k25, k29, k27, k24, k56, k57, k58, k45, \ + k38, k06, k07, k08, k09, k0B, k2D, k2E, k2B, k2F, k2C, k7B, k3E, k53, k54, k55,\ + k36, k3A, k37, k31, k7C, k7D, k3B, k3D, k3C, k52, k41, k4C \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO, }, \ - { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO, }, \ - { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO, }, \ - { K60, K61, K62, K63, K64, K65, KC_NO, K67 }, \ - { KC_NO, K69, KC_NO, K6B, KC_NO, K6D, KC_NO, K6F }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 }, \ - { K78, K79, K7A, K7B, K7C, K7D, KC_NO, K7F } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k08, k09, XXX, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, k41, XXX, k43, XXX, k45, XXX, k47 }, \ + { XXX, XXX, XXX, k4B, k4C, XXX, k4E, XXX }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, XXX, XXX, XXX }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { XXX, k69, XXX, k6B, XXX, k6D, XXX, k6F }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 }, \ + { k78, k79, k7A, k7B, k7C, k7D, XXX, k7F } \ } /* M0116 Apple Standard Keyboard ANSI @@ -81,29 +82,27 @@ Ported to QMK by Peter Roe * +---------------------------------------------------------+ +-------+---+---+ */ #define LAYOUT_m0116_ansi( \ - K7F, \ - K35,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K51,K4B,K43, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K45, \ - K36,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K4E, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K7B, K53,K54,K55, \ - K39,K3A,K37,K32, K31, K2A,K3B,K3C,K3D,K3E, K52, K41,K4C \ + k7F, \ + k35, k12, k13, k14, k15, k17, k16, k1A, k1C, k19, k1D, k1B, k18, k33, k47, k51, k4B, k43, \ + k30, k0C, k0D, k0E, k0F, k11, k10, k20, k22, k1F, k23, k21, k1E, k59, k5B, k5C, k45, \ + k36, k00, k01, k02, k03, k05, k04, k26, k28, k25, k29, k27, k24, k56, k57, k58, k4E, \ + k38, k06, k07, k08, k09, k0B, k2D, k2E, k2B, k2F, k2C, k7B, k53, k54, k55, \ + k39, k3A, k37, k32, k31, k2A, k3B, k3C, k3D, k3E, k52, k41, k4C \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, KC_NO, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, KC_NO }, \ - { KC_NO, K41, KC_NO, K43, KC_NO, K45, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, K4E, KC_NO }, \ - { KC_NO, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, 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, K7B, KC_NO, KC_NO, KC_NO, K7F } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k08, k09, XXX, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { XXX, k41, XXX, k43, XXX, k45, XXX, k47 }, \ + { XXX, XXX, XXX, k4B, k4C, XXX, k4E, XXX }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, k7B, XXX, XXX, XXX, k7F } \ } - -#endif diff --git a/keyboards/converter/adb_usb/matrix.c b/keyboards/converter/adb_usb/matrix.c index 9e5399de5d6..e6a4921960e 100644 --- a/keyboards/converter/adb_usb/matrix.c +++ b/keyboards/converter/adb_usb/matrix.c @@ -31,6 +31,10 @@ Ported to QMK by Peter Roe #include "led.h" #include "timer.h" +#ifndef ADB_MOUSE_MAXACC +# define ADB_MOUSE_MAXACC 8 +#endif + static bool is_iso_layout = false; // matrix state buffer(1:on, 0:off) @@ -84,6 +88,10 @@ void matrix_init(void) static report_mouse_t mouse_report = {}; +void housekeeping_task_kb(void) { + adb_mouse_task(); +} + void adb_mouse_task(void) { uint16_t codes; diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 56967770b3b..8f4649f5566 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -16,7 +16,9 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c adb.c led.c + +# ADB_MOUSE_ENABLE +# OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h index 5d8e5f8135b..2cd36c5fb0a 100644 --- a/keyboards/converter/ibm_terminal/config.h +++ b/keyboards/converter/ibm_terminal/config.h @@ -16,9 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H - +#pragma once #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6535 @@ -47,15 +45,8 @@ along with this program. If not, see . */ #ifdef PS2_USE_USART /* XCK for clock line */ -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -/* RXD for data line */ -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ @@ -95,15 +86,8 @@ along with this program. If not, see . */ #ifdef PS2_USE_INT /* uses INT1 for clock line(ATMega32U4) */ -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 1 - -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 0 +#define PS2_CLOCK_PIN D1 +#define PS2_DATA_PIN D0 #define PS2_INT_INIT() do { \ EICRA |= ((1<. * PS/2 Busywait configuration */ #ifdef PS2_USE_BUSYWAIT -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 1 - -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 0 -#endif - +#define PS2_CLOCK_PIN D1 +#define PS2_DATA_PIN D0 #endif diff --git a/keyboards/converter/ibm_terminal/ibm_terminal.h b/keyboards/converter/ibm_terminal/ibm_terminal.h index adf048206e9..ce50e5f437c 100644 --- a/keyboards/converter/ibm_terminal/ibm_terminal.h +++ b/keyboards/converter/ibm_terminal/ibm_terminal.h @@ -1,8 +1,9 @@ -#ifndef IBM_TERMINAL_H -#define IBM_TERMINAL_H +#pragma once #include "quantum.h" +#define XXX KC_NO + void matrix_init_user(void); /* @@ -20,63 +21,61 @@ void matrix_init_user(void); * +---------+ */ #define LAYOUT( \ - K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \ - K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \ - \ - K05,K06, K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ - K04,K0C, K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, K5C, K64,K65,K6D, K6C,K75,K7D,K7C, \ - K03,K0B, K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K53,K5A, K63, K6B,K73,K74,K7B, \ - K83,K0A, K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K51,K59, K61,K62,K6A, K69,K72,K7A,K79, \ - K01,K09, K11, K19, K29, K39, K58, K60, K68,K70,K71,K78 \ + k08, k10, k18, k20, k28, k30, k38, k40, k48, k50, k57, k5F, \ + k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, \ +\ + k05, k06, k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k5D, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ + k04, k0C, k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, k7C, \ + k03, k0B, k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k53, k5A, k63, k6B, k73, k74, k7B, \ + k83, k0A, k12, k13, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k51, k59, k61, k62, k6A, k69, k72, k7A, k79, \ + k01, k09, k11, k19, k29, k39, k58, k60, k68, k70, k71, k78 \ ) { \ - { KC_NO, K01, KC_NO, K03, K04, K05, K06, K07 }, \ - { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO } \ + { XXX, k01, XXX, k03, k04, k05, k06, k07 }, \ + { k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k78, k79, k7A, k7B, k7C, k7D, k7E, XXX }, \ + { XXX, XXX, XXX, k83, k84, XXX, XXX, XXX } \ } /* * IBM Terminal keyboard 1399625, 101-key */ #define LAYOUT_101( \ - K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \ - \ - K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ - K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C, K64,K65,K6D, K6C,K75,K7D, \ - K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K7C, \ - K12, K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, K63, K69,K72,K7A, \ - K11, K19, K29, K39, K58, K61,K60,K6A, K70, K71,K79 \ + k08, k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, k57, k5F, k62, \ +\ + k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ + k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, \ + k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k5A, k6B, k73, k74, k7C, \ + k12, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k59, k63, k69, k72, k7A, \ + k11, k19, k29, k39, k58, k61, k60, k6A, k70, k71, k79 \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K07 }, \ - { K08, KC_NO, KC_NO, KC_NO, KC_NO, K0D, K0E, K0F }, \ - { KC_NO, K11, K12, KC_NO, K14, K15, K16, K17 }, \ - { KC_NO, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { KC_NO, K21, K22, K23, K24, K25, K26, K27 }, \ - { KC_NO, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37 }, \ - { KC_NO, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47 }, \ - { KC_NO, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ - { KC_NO, KC_NO, K52, KC_NO, K54, K55, K56, K57 }, \ - { K58, K59, K5A, K5B, K5C, KC_NO, K5E, K5F }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 }, \ - { KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO } \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, k07 }, \ + { k08, XXX, XXX, XXX, XXX, k0D, k0E, k0F }, \ + { XXX, k11, k12, XXX, k14, k15, k16, k17 }, \ + { XXX, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { XXX, k21, k22, k23, k24, k25, k26, k27 }, \ + { XXX, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37 }, \ + { XXX, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47 }, \ + { XXX, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { XXX, XXX, k52, XXX, k54, k55, k56, k57 }, \ + { k58, k59, k5A, k5B, k5C, XXX, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { XXX, k79, k7A, XXX, k7C, k7D, k7E, XXX }, \ + { XXX, XXX, XXX, XXX, k84, XXX, XXX, XXX } \ } - -#endif diff --git a/tmk_core/protocol/m0110.c b/keyboards/converter/m0110_usb/m0110.c similarity index 100% rename from tmk_core/protocol/m0110.c rename to keyboards/converter/m0110_usb/m0110.c diff --git a/tmk_core/protocol/m0110.h b/keyboards/converter/m0110_usb/m0110.h similarity index 100% rename from tmk_core/protocol/m0110.h rename to keyboards/converter/m0110_usb/m0110.h diff --git a/keyboards/converter/m0110_usb/m0110_usb.h b/keyboards/converter/m0110_usb/m0110_usb.h index 88e74024fc8..944296afdc7 100644 --- a/keyboards/converter/m0110_usb/m0110_usb.h +++ b/keyboards/converter/m0110_usb/m0110_usb.h @@ -16,12 +16,12 @@ along with this program. If not, see . Ported to QMK by Techsock */ -#ifndef M0110_USB_H -#define M0110_USB_H -#endif +#pragma once #include "quantum.h" +#define XXX KC_NO + /* Common layout for M0110 and M0110A * This keymap works with both keyboards. As you can see, the M0110A is * a superset of M0110 keyboard, only one exception is 'Enter'(34) of M0110 @@ -67,26 +67,26 @@ Ported to QMK by Techsock * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. */ #define LAYOUT_ansi( \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K66, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K4D, K53,K54,K55,K4C, \ - K3A,K37, K31, K34,K2A,K46,K42,K48, K52, K41 \ + K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ + K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K59, K5B, K5C, K4E, \ + K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ + K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K4D, K53, K54, K55, K4C, \ + K3A, K37, K31, K34, K2A, K46, K42, K48, K52, K41 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, KC_NO, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37 }, \ - { K38, K39, K3A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, K47 }, \ - { K48, KC_NO, KC_NO, KC_NO, K4C, K4D, K4E, KC_NO }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, K66, KC_NO }, \ - { K68, KC_NO, KC_NO, KC_NO, KC_NO, K6D, KC_NO, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, XXX, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ + { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, K41, K42, XXX, XXX, XXX, K46, K47 }, \ + { K48, XXX, XXX, XXX, K4C, K4D, K4E, XXX }, \ + { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ + { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ + { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ } /* International keyboard layout for M0110 + M0120 @@ -108,24 +108,24 @@ Ported to QMK by Techsock * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two. */ #define LAYOUT_iso( \ - K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \ - K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K59,K5B,K5C,K4E, \ - K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,K24, K56,K57,K58,K66, \ - K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,K0A, K53,K54,K55,K4C, \ - K3A,K37, K34, K31, K52, K41 \ + K32, K12, K13, K14, K15, K17, K16, K1A, K1C, K19, K1D, K1B, K18, K33, K47, K68, K6D, K62, \ + K30, K0C, K0D, K0E, K0F, K11, K10, K20, K22, K1F, K23, K21, K1E, K2A, K59, K5B, K5C, K4E, \ + K39, K00, K01, K02, K03, K05, K04, K26, K28, K25, K29, K27, K24, K56, K57, K58, K66, \ + K38, K06, K07, K08, K09, K0B, K2D, K2E, K2B, K2F, K2C, K0A, K53, K54, K55, K4C, \ + K3A, K37, K34, K31, K52, K41 \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, K31, K32, K33, K34, KC_NO, KC_NO, K37 }, \ - { K38, K39, K3A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, K41, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K47 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, K4C, KC_NO, K4E, KC_NO }, \ - { KC_NO, KC_NO, K52, K53, K54, K55, K56, K57 }, \ - { K58, K59, KC_NO, K5B, K5C, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, K62, KC_NO, KC_NO, KC_NO, K66, KC_NO }, \ - { K68, KC_NO, KC_NO, KC_NO, KC_NO, K6D, KC_NO, KC_NO }, \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, XXX, XXX, K37 }, \ + { K38, K39, K3A, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, K41, XXX, XXX, XXX, XXX, XXX, K47 }, \ + { XXX, XXX, XXX, XXX, K4C, XXX, K4E, XXX }, \ + { XXX, XXX, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, XXX, K5B, K5C, XXX, XXX, XXX }, \ + { XXX, XXX, K62, XXX, XXX, XXX, K66, XXX }, \ + { K68, XXX, XXX, XXX, XXX, K6D, XXX, XXX } \ } diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index f59530ce461..288b1729f03 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -19,7 +19,6 @@ NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA EXTRAKEY_ENABLE = yes USB_HID_ENABLE = yes BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line CUSTOM_MATRIX = yes SRC = matrix.c m0110.c diff --git a/keyboards/converter/modelm_ssk/rules.mk b/keyboards/converter/modelm_ssk/rules.mk index 4b05b0ae0c3..eab17f7d953 100644 --- a/keyboards/converter/modelm_ssk/rules.mk +++ b/keyboards/converter/modelm_ssk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/converter/palm_usb/post_rules.mk b/keyboards/converter/palm_usb/post_rules.mk new file mode 100644 index 00000000000..9c110767015 --- /dev/null +++ b/keyboards/converter/palm_usb/post_rules.mk @@ -0,0 +1,7 @@ +ifdef HARDWARE_SERIAL + # Untested with palm_usb + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index e7bedd4addf..f83a18afd66 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -23,12 +23,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c -ifdef HARDWARE_SERIAL - # Untested with palm_usb - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/palm_usb/stowaway diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h index f073e61e440..c67ae5ebae8 100644 --- a/keyboards/converter/sun_usb/config.h +++ b/keyboards/converter/sun_usb/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3333 @@ -81,5 +80,3 @@ along with this program. If not, see . /* idle */ \ SERIAL_SOFT_TXD_ON(); \ } while (0) - -#endif diff --git a/keyboards/converter/sun_usb/post_rules.mk b/keyboards/converter/sun_usb/post_rules.mk new file mode 100644 index 00000000000..2ea1f0a5bf3 --- /dev/null +++ b/keyboards/converter/sun_usb/post_rules.mk @@ -0,0 +1,6 @@ +ifdef HARDWARE_SERIAL + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL +else + SRC += protocol/serial_soft.c +endif diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 1decefe519f..0f53fde80e7 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -23,11 +23,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes SRC += matrix.c led.c -ifdef HARDWARE_SERIAL - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL -else - SRC += protocol/serial_soft.c -endif DEFAULT_FOLDER = converter/sun_usb/type5 diff --git a/keyboards/converter/sun_usb/type3/type3.h b/keyboards/converter/sun_usb/type3/type3.h index f6f14f4effd..b84a703d6b8 100644 --- a/keyboards/converter/sun_usb/type3/type3.h +++ b/keyboards/converter/sun_usb/type3/type3.h @@ -15,11 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef TYPE3_H -#define TYPE3_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* Sun type 3 keyboard ,-------. ,-----------------------------------------------------------. ,-----------. | 01| 03| | 05| 06| 08| 0A| 0C| 0E| 10| 11| 12| 2B| | 15| 16| 17| @@ -35,32 +36,28 @@ along with this program. If not, see . | 77 | 78 | 79 | 7A | 13 | `-----------------------------------------------------------' */ - - -#define LAYOUT( \ - K01,K03, K05,K06, K08, K0A, K0C, K0E, K10,K11,K12,K2B, K15,K16,K17, \ - K19,K1A, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2D,K2E,K2F, \ - K31,K33, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K42, K44,K45,K46, \ - K48,K49, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K5F,K61, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E,K6F, K70,K71,K72, \ - K77,K78, K79, K7A,K13 \ +#define LAYOUT( \ + k01, k03, k05, k06, k08, k0A, k0C, k0E, k10, k11, k12, k2B, k15, k16, k17, \ + k19, k1A, k1D, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k58, k2A, k2D, k2E, k2F, \ + k31, k33, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k44, k45, k46, \ + k48, k49, k4C, k4D, k4E, k4F, k50, k51, k52, k53, k54, k55, k56, k57, k59, k5B, k5C, k5D, \ + k5F, k61, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k70, k71, k72, \ + k77, k78, k79, k7A, k13 \ ) { \ - { KC_NO, K01 , KC_NO, K03 , KC_NO, K05 , K06 , KC_NO }, \ - { K08 , KC_NO, K0A , KC_NO, K0C , KC_NO, K0E , KC_NO }, \ - { K10 , K11 , K12 , K13 , KC_NO, K15 , K16 , K17 }, \ - { KC_NO, K19 , K1A , KC_NO, KC_NO, K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , KC_NO, K2D , K2E , K2F }, \ - { KC_NO, K31 , KC_NO, K33 , KC_NO, K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , KC_NO, K44 , K45 , K46 , KC_NO }, \ - { K48 , K49 , KC_NO, KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , KC_NO, K5B , K5C , K5D , KC_NO, K5F }, \ - { KC_NO, K61 , KC_NO, K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , K6F }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, KC_NO, K77 }, \ - { K78 , K79 , K7A , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { XXX, k01, XXX, k03, XXX, k05, k06, XXX }, \ + { k08, XXX, k0A, XXX, k0C, XXX, k0E, XXX }, \ + { k10, k11, k12, k13, XXX, k15, k16, k17 }, \ + { XXX, k19, k1A, XXX, XXX, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k28, k29, k2A, k2B, XXX, k2D, k2E, k2F }, \ + { XXX, k31, XXX, k33, XXX, k35, k36, k37 }, \ + { k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, XXX, k44, k45, k46, XXX }, \ + { k48, k49, XXX, XXX, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k58, k59, XXX, k5B, k5C, k5D, XXX, k5F }, \ + { XXX, k61, XXX, k63, k64, k65, k66, k67 }, \ + { k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, XXX, XXX, XXX, XXX, k77 }, \ + { k78, k79, k7A, XXX, XXX, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/converter/sun_usb/type5/type5.h b/keyboards/converter/sun_usb/type5/type5.h index da66d80abc8..d4c9cc267c9 100644 --- a/keyboards/converter/sun_usb/type5/type5.h +++ b/keyboards/converter/sun_usb/type5/type5.h @@ -15,11 +15,12 @@ along with this program. If not, see . */ -#ifndef TYPE5_H -#define TYPE5_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* sun type 5 keyboard, JP Unix-style ,-------. ,---, ,---------------. ,---------------. ,---------------. ,-----------. ,---------------. | 76 | | 0F| | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B| | 16| 17| 15| | 2D| 02| 04| 30| @@ -36,30 +37,30 @@ | 5F| 61| | 77 | 13| 78 |*73 | 79 |*74 |*75| 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_jp_unix( \ - K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K77,K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_jp_unix( \ + K76, K0F, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K1D, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K58, K2A, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K2B, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K4C, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K77, K13, K78, K73, K79, K74, K75, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } /* Sun type 5 keyboard, US Unix-style @@ -78,30 +79,30 @@ | 5F| 61| | 77 | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_us_unix( \ - K76, K0F, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K2B, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K4C, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K77,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_us_unix( \ + K76, K0F, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K1D, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K58, K2A, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K2B, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K4C, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K77, K13, K78, K79, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , K0F ,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, XXX, XXX, XXX, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } /* Sun type 5 keyboard, US ANSI-style @@ -120,29 +121,28 @@ | 5F| 61| | 4C | 13| 78 | 79 | 7A | 43| 0D| | 18| 1B| 1C| | 5E | 32| | `-------' `-----------------------------------------------------------' `-----------' `---------------' */ -#define LAYOUT_ansi( \ - K76, K1D, K05,K06,K08,K0A, K0C,K0E,K10,K11, K12,K07,K09,K0B, K16,K17,K15, K2D,K02,K04,K30, \ - K01,K03, K2A,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29, K2B, K2C,K34,K60, K62,K2E,K2F,K47, \ - K19,K1A, K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41, K58, K42,K4A,K7B, K44,K45,K46,K7D, \ - K31,K33, K77, K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57, K59, K5B,K5C,K5D, \ - K48,K49, K63, K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K6E, K14, K70,K71,K72,K5A, \ - K5F,K61, K4C,K13, K78, K79, K7A, K43, K0D, K18,K1B,K1C, K5E, K32 \ +#define LAYOUT_ansi( \ + K76, K1D, K05, K06, K08, K0A, K0C, K0E, K10, K11, K12, K07, K09, K0B, K16, K17, K15, K2D, K02, K04, K30, \ + K01, K03, K2A, K1E, K1F, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2B, K2C, K34, K60, K62, K2E, K2F, K47, \ + K19, K1A, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K40, K41, K58, K42, K4A, K7B, K44, K45, K46, K7D, \ + K31, K33, K77, K4D, K4E, K4F, K50, K51, K52, K53, K54, K55, K56, K57, K59, K5B, K5C, K5D, \ + K48, K49, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E, K14, K70, K71, K72, K5A, \ + K5F, K61, K4C, K13, K78, K79, K7A, K43, K0D, K18, K1B, K1C, K5E, K32 \ ) { \ - { KC_NO, K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ - { K08 , K09 , K0A , K0B , K0C , K0D , K0E , KC_NO,}, \ - { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ - { K18 , K19 , K1A , K1B , K1C , K1D , K1E , K1F }, \ - { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ - { K28 , K29 , K2A , K2B , K2C , K2D , K2E , K2F }, \ - { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ - { K38 , K39 , K3A , K3B , K3C , K3D , K3E , K3F }, \ - { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ - { K48 , K49 , K4A , KC_NO, K4C , K4D , K4E , K4F }, \ - { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ - { K58 , K59 , K5A , K5B , K5C , K5D , K5E , K5F }, \ - { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ - { K68 , K69 , K6A , K6B , K6C , K6D , K6E , KC_NO }, \ - { K70 , K71 , K72 , KC_NO, KC_NO, KC_NO, K76 , K77 }, \ - { K78 , K79 , K7A , K7B , KC_NO, K7D , KC_NO, KC_NO } \ + { XXX, K01, K02, K03, K04, K05, K06, K07 }, \ + { K08, K09, K0A, K0B, K0C, K0D, K0E, XXX }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K48, K49, K4A, XXX, K4C, K4D, K4E, K4F }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K68, K69, K6A, K6B, K6C, K6D, K6E, XXX }, \ + { K70, K71, K72, XXX, XXX, XXX, K76, K77 }, \ + { K78, K79, K7A, K7B, XXX, K7D, XXX, XXX } \ } -#endif diff --git a/keyboards/converter/usb_usb/ble/ble.h b/keyboards/converter/usb_usb/ble/ble.h index d28629643a9..3dccc23a413 100644 --- a/keyboards/converter/usb_usb/ble/ble.h +++ b/keyboards/converter/usb_usb/ble/ble.h @@ -1,6 +1,3 @@ -#ifndef BLE_H -#define BLE_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/ble/rules.mk b/keyboards/converter/usb_usb/ble/rules.mk index 438dec834a1..ad4d206a511 100644 --- a/keyboards/converter/usb_usb/ble/rules.mk +++ b/keyboards/converter/usb_usb/ble/rules.mk @@ -12,9 +12,9 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE -ADAFRUIT_BLE_ENABLE = yes + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE EXTRAFLAGS += -flto diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index 7ff8ceeebd7..d2488336a5c 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -46,5 +45,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/converter/usb_usb/hasu/hasu.h b/keyboards/converter/usb_usb/hasu/hasu.h index d5e78558608..3dccc23a413 100644 --- a/keyboards/converter/usb_usb/hasu/hasu.h +++ b/keyboards/converter/usb_usb/hasu/hasu.h @@ -1,6 +1,3 @@ -#ifndef HASU_H -#define HASU_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/pro_micro/pro_micro.h b/keyboards/converter/usb_usb/pro_micro/pro_micro.h index 566df9f20fd..3dccc23a413 100644 --- a/keyboards/converter/usb_usb/pro_micro/pro_micro.h +++ b/keyboards/converter/usb_usb/pro_micro/pro_micro.h @@ -1,6 +1,3 @@ -#ifndef PRO_MICRO_H -#define PRO_MICRO_H +#pragma once #include QMK_KEYBOARD_H - -#endif diff --git a/keyboards/converter/usb_usb/usb_usb.h b/keyboards/converter/usb_usb/usb_usb.h index 1d1b6770d12..3acd67634a5 100644 --- a/keyboards/converter/usb_usb/usb_usb.h +++ b/keyboards/converter/usb_usb/usb_usb.h @@ -15,11 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef USB_USB_H -#define USB_USB_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define ______ KC_TRNS /* ,---------------. ,---------------. ,---------------. @@ -63,46 +64,31 @@ along with this program. If not, see . * TODO: use same keycode to pass through instead of KC_NO? */ #define LAYOUT_all( \ - K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ - K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ - KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ - KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ + k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k70, k71, k72, k73, \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, k81, k80, k7F, k66, k75, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k89, k2A, k49, k4A, k4B, k53, k54, k55, k56, k78, k79, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k31, k4C, k4D, k4E, k5F, k60, k61, k57, k76, k7A, \ + k39, k04, k16, k07, k09, k0A, k0B, k0D, k0E, k0F, k33, k34, k32, k28, k5C, k5D, k5E, k85, k77, k7C, \ + kE1, k64, k1D, k1B, k06, k19, k05, k11, k10, k36, k37, k38, k87, kE5, k52, k59, k5A, k5B, k67, k74, k7D, \ + kE0, kE3, kE2, k8B, k91, k2C, k90, k8A, k88, kE6, kE7, k65, kE4, k50, k51, k4F, k62, k63, k58, k7E, k7B \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ - K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ - { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ - K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ - { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ - K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ - { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ - K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ - { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ - K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ - { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ - K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ - { K60, K61, K62, K63, K64, K65, K66, K67, /* 60-67 */ \ - K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ - { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ - K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ - { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ - K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ - { K90, K91, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ - { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F }, \ + { k80, k81, XXX, XXX, XXX, k85, XXX, k87, k88, k89, k8A, k8B, XXX, XXX, XXX, XXX }, \ + { k90, k91, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -121,45 +107,30 @@ along with this program. If not, see . * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_ansi( \ - K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E, K5F,K60,K61, \ - K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K28, K5C,K5D,K5E,K57, \ - KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B, \ - KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k31, k4C, k4D, k4E, k5F, k60, k61, \ + k39, k04, k16, k07, k09, k0A, k0B, k0D, k0E, k0F, k33, k34, k28, k5C, k5D, k5E, k57, \ + kE1, k1D, k1B, k06, k19, k05, k11, k10, k36, k37, k38, kE5, k52, k59, k5A, k5B, \ + kE0, kE3, kE2, k2C, kE6, kE7, k65, kE4, k50, k51, k4F, k62, k63, k58 \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ - K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ - { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ - K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ - { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ - K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ - { K30, K31, KC_NO, K33, K34, K35, K36, K37, /* 30-37 */ \ - K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ - { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ - K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ - { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ - K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ - { K60, K61, K62, K63, KC_NO, K65, KC_NO, KC_NO, /* 60-67 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ - { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, XXX, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -178,45 +149,30 @@ along with this program. If not, see . * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_iso( \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ - K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ - KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, KE5, K52, K59,K5A,K5B,K58, \ - KE0,KE3,KE2, K2C, KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k28, k4C, k4D, k4E, k5F, k60, k61, k57, \ + k39, k04, k16, k07, k09, k0A, k0B, k0D, k0E, k0F, k33, k34, k32, k5C, k5D, k5E, \ + kE1, k64, k1D, k1B, k06, k19, k05, k11, k10, k36, k37, k38, kE5, k52, k59, k5A, k5B, k58, \ + kE0, kE3, kE2, k2C, kE6, kE7, k65, kE4, k50, k51, k4F, k62, k63 \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ - K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ - { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ - K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ - { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ - K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ - { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ - K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ - { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ - K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ - { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ - K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ - { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 80-87 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ - { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } /* ,---. ,---------------. ,---------------. ,---------------. ,-----------. @@ -235,44 +191,28 @@ along with this program. If not, see . * `-----------------------------------------------------------' `-----------' `---------------' */ #define LAYOUT_jis( \ - K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, \ - K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, \ - K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K28, K4C,K4D,K4E, K5F,K60,K61,K57, \ - K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,K32, K5C,K5D,K5E, \ - KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K58, \ - KE0,KE3,KE2,K8B, K2C, K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63 \ + k29, k3A, k3B, k3C, k3D, k3E, k3F, k40, k41, k42, k43, k44, k45, k46, k47, k48, \ +\ + k35, k1E, k1F, k20, k21, k22, k23, k24, k25, k26, k27, k2D, k2E, k89, k2A, k49, k4A, k4B, k53, k54, k55, k56, \ + k2B, k14, k1A, k08, k15, k17, k1C, k18, k0C, k12, k13, k2F, k30, k28, k4C, k4D, k4E, k5F, k60, k61, k57, \ + k39, k04, k16, k07, k09, k0A, k0B, k0D, k0E, k0F, k33, k34, k32, k5C, k5D, k5E, \ + kE1, k1D, k1B, k06, k19, k05, k11, k10, k36, k37, k38, k87, kE5, k52, k59, k5A, k5B, k58, \ + kE0, kE3, kE2, k8B, k2C, k8A, k88, kE6, kE7, k65, kE4, k50, k51, k4F, k62, k63 \ ) { \ - { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ - K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ - { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ - K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ - { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ - K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ - { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ - K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ - { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ - K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ - { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ - K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ - { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, /* 60-67 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 68-6F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 70-77 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, }, /* 78-7F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K87, /* 80-87 */ \ - K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ - { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ + { XXX, XXX, XXX, XXX, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, k64, k65, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX,}, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, k87, k88, k89, k8A, k8B, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, kE6, kE7, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } -#endif diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 519d76f4d4f..80336144472 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -19,7 +19,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -XT_ENABLE = yes CUSTOM_MATRIX = yes -SRC += matrix.c +SRC += matrix.c xt_interrupt.c diff --git a/tmk_core/protocol/xt.h b/keyboards/converter/xt_usb/xt.h similarity index 100% rename from tmk_core/protocol/xt.h rename to keyboards/converter/xt_usb/xt.h diff --git a/tmk_core/protocol/xt_interrupt.c b/keyboards/converter/xt_usb/xt_interrupt.c similarity index 100% rename from tmk_core/protocol/xt_interrupt.c rename to keyboards/converter/xt_usb/xt_interrupt.c diff --git a/keyboards/cool836a/rules.mk b/keyboards/cool836a/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/cool836a/rules.mk +++ b/keyboards/cool836a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coseyfannitutti/discipad/rules.mk b/keyboards/coseyfannitutti/discipad/rules.mk index fadfff9d88f..e2da88fcad7 100644 --- a/keyboards/coseyfannitutti/discipad/rules.mk +++ b/keyboards/coseyfannitutti/discipad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coseyfannitutti/discipline/rules.mk b/keyboards/coseyfannitutti/discipline/rules.mk index 9099b68d083..50a627d3d82 100644 --- a/keyboards/coseyfannitutti/discipline/rules.mk +++ b/keyboards/coseyfannitutti/discipline/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coseyfannitutti/mullet/rules.mk b/keyboards/coseyfannitutti/mullet/rules.mk index 299768093d0..e5c4883fa50 100644 --- a/keyboards/coseyfannitutti/mullet/rules.mk +++ b/keyboards/coseyfannitutti/mullet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/coseyfannitutti/mysterium/rules.mk b/keyboards/coseyfannitutti/mysterium/rules.mk index 7e3df06807c..8bc4495ced6 100644 --- a/keyboards/coseyfannitutti/mysterium/rules.mk +++ b/keyboards/coseyfannitutti/mysterium/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/coseyfannitutti/romeo/rules.mk b/keyboards/coseyfannitutti/romeo/rules.mk index 7a50fbb7785..2057d9c9399 100644 --- a/keyboards/coseyfannitutti/romeo/rules.mk +++ b/keyboards/coseyfannitutti/romeo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cozykeys/bloomer/v2/rules.mk b/keyboards/cozykeys/bloomer/v2/rules.mk index ba2ecf38c30..6a63c958d34 100644 --- a/keyboards/cozykeys/bloomer/v2/rules.mk +++ b/keyboards/cozykeys/bloomer/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/craftwalk/keymaps/default/keymap.c b/keyboards/craftwalk/keymaps/default/keymap.c index 40c95144756..f02f9c975f2 100644 --- a/keyboards/craftwalk/keymaps/default/keymap.c +++ b/keyboards/craftwalk/keymaps/default/keymap.c @@ -22,15 +22,15 @@ enum layer_names { _ADJUST }; -#define KC_NUM MO(_NUM) -#define KC_ADJ MO(_ADJUST) +#define MO_NUM MO(_NUM) +#define MO_ADJ MO(_ADJUST) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_BASE] = LAYOUT( KC_Q, KC_W, KC_E, KC_LCTL, KC_A, KC_S, KC_D, - KC_LSFT, KC_ADJ, KC_WH_U, KC_WH_D, KC_F, KC_NUM, KC_SPC + KC_LSFT, MO_ADJ, KC_WH_U, KC_WH_D, KC_F, MO_NUM, KC_SPC ), /* Number */ [_NUM] = LAYOUT( diff --git a/keyboards/crazy_keyboard_68/rules.mk b/keyboards/crazy_keyboard_68/rules.mk index 0c7306bd7ce..0f103359075 100644 --- a/keyboards/crazy_keyboard_68/rules.mk +++ b/keyboards/crazy_keyboard_68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/crbn/rules.mk b/keyboards/crbn/rules.mk index 90a7d4fe028..adaf11fd8ae 100644 --- a/keyboards/crbn/rules.mk +++ b/keyboards/crbn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/crin/rules.mk b/keyboards/crin/rules.mk index f37a75f06ff..1710f6236b0 100644 --- a/keyboards/crin/rules.mk +++ b/keyboards/crin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c index a37862fad38..3caee1c827f 100644 --- a/keyboards/crkbd/keymaps/armand1m/keymap.c +++ b/keyboards/crkbd/keymaps/armand1m/keymap.c @@ -130,7 +130,8 @@ void oled_render_amsterdam_flag(void) { oled_write_raw_P(amsterdam_flag, sizeof(amsterdam_flag)); } -void oled_task_user(void) { +bool oled_task_user(void) { oled_render_amsterdam_flag(); + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/blipson/keymap.c b/keyboards/crkbd/keymaps/blipson/keymap.c index 23491e11a6b..ad7664c2959 100644 --- a/keyboards/crkbd/keymaps/blipson/keymap.c +++ b/keyboards/crkbd/keymaps/blipson/keymap.c @@ -128,12 +128,13 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); } else { oled_render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/davidrambo/config.h b/keyboards/crkbd/keymaps/davidrambo/config.h index 82057151d3c..bf96f265f44 100644 --- a/keyboards/crkbd/keymaps/davidrambo/config.h +++ b/keyboards/crkbd/keymaps/davidrambo/config.h @@ -51,34 +51,52 @@ along with this program. If not, see . #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 10 - /* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - #define DISABLE_RGB_MATRIX_ALPHAS_MODS - #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP - #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// # define ENABLE_RGB_MATRIX_CYCLE_ALL +// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// # define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c index 88d40ee4073..e06cfa34655 100644 --- a/keyboards/crkbd/keymaps/default/keymap.c +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -157,13 +157,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/devdev/config.h b/keyboards/crkbd/keymaps/devdev/config.h index c858f8f2d09..4848af2245f 100644 --- a/keyboards/crkbd/keymaps/devdev/config.h +++ b/keyboards/crkbd/keymaps/devdev/config.h @@ -84,34 +84,52 @@ along with this program. If not, see . # define RGB_MATRIX_VAL_STEP 8 # define RGB_MATRIX_SPD_STEP 10 -/* Disable the animations you don't want/need. You will need to disable a good number of these * - * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/devdev/keymap.c b/keyboards/crkbd/keymaps/devdev/keymap.c index aa4d39a2538..a5062957497 100644 --- a/keyboards/crkbd/keymaps/devdev/keymap.c +++ b/keyboards/crkbd/keymaps/devdev/keymap.c @@ -392,13 +392,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index f10c474057c..bece69ba67a 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -33,38 +33,51 @@ along with this program. If not, see . #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_GRADIENT_LEFT_RIGHT -//disable effects -#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue speed is hue for secondary hue -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Static gradient left to right speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_EFFECT_MAX +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #define ENABLE_RGB_MATRIX_DUAL_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// // #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_PIXEL_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c index 11690b0294a..6ef428a11fc 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/keymap.c +++ b/keyboards/crkbd/keymaps/dsanchezseco/keymap.c @@ -83,7 +83,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { } const char *read_logo(void); -void oled_task_user(void){ +bool oled_task_user(void){ switch (biton32(layer_state)){ case _DVORAK: oled_write_ln_P(PSTR("DVRK"), false); @@ -102,5 +102,6 @@ void oled_task_user(void){ } //now print logo oled_write(read_logo(), false); + return false; } #endif diff --git a/keyboards/crkbd/keymaps/edvorakjp/oled.c b/keyboards/crkbd/keymaps/edvorakjp/oled.c index 3a3748c691b..e5ff0295655 100644 --- a/keyboards/crkbd/keymaps/edvorakjp/oled.c +++ b/keyboards/crkbd/keymaps/edvorakjp/oled.c @@ -43,7 +43,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_mode_icon(!get_enable_kc_lang()); render_layer_state(); @@ -51,5 +51,6 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index 05b04e0aa33..1ff008b2ded 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -49,40 +49,40 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c index 4d2c10b60aa..baacc86b183 100644 --- a/keyboards/crkbd/keymaps/gotham/oled.c +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -246,7 +246,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed(oled_timer) > 10000) { oled_off(); return; @@ -262,4 +262,5 @@ void oled_task_user(void) { } else { render_status_secondary(); } + return false; } diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index 752ea862e01..e44ae520f4c 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -68,48 +68,48 @@ along with this program. If not, see . /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ - #define DISABLE_RGB_MATRIX_ALPHAS_MODS - #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL - #define DISABLE_RGB_MATRIX_BAND_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - #define DISABLE_RGB_MATRIX_BAND_VAL - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH #endif // Custom Font path #define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c index 7cb08f40d52..219db224333 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/keymap.c +++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c @@ -172,7 +172,7 @@ void render_slave_oled(void) { } // {OLED Task} -----------------------------------------------// -void oled_task_user(void) { +bool oled_task_user(void) { // First time out switches to logo as first indication of iddle. if (timer_elapsed32(oled_timer) > 100000 && timer_elapsed32(oled_timer) < 479999) { // Render logo on both halves before full timeout @@ -209,5 +209,6 @@ void oled_task_user(void) { } } } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/mcrown/config.h b/keyboards/crkbd/keymaps/mcrown/config.h index e40bd639f38..15a1f20954d 100644 --- a/keyboards/crkbd/keymaps/mcrown/config.h +++ b/keyboards/crkbd/keymaps/mcrown/config.h @@ -36,50 +36,50 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS /* BEGIN: Disable RGB Effects */ -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -// #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +// #undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - /* BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - /* END: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ +/* BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +/* END: RGB_MATRIX_FRAMEBUFFER_EFFECTS */ - /* BEGIN: RGB_MATRIX_KEYPRESSES */ -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - /* END: RGB_MATRIX_KEYPRESSES */ - /* END: Disable RGB Effects */ +/* BEGIN: RGB_MATRIX_KEYPRESSES */ +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +/* END: RGB_MATRIX_KEYPRESSES */ +/* END: Disable RGB Effects */ #endif /* To tell the compiler to use custom font */ diff --git a/keyboards/crkbd/keymaps/mcrown/oled.c b/keyboards/crkbd/keymaps/mcrown/oled.c index b728a5806e0..9623b921a7e 100644 --- a/keyboards/crkbd/keymaps/mcrown/oled.c +++ b/keyboards/crkbd/keymaps/mcrown/oled.c @@ -308,7 +308,7 @@ static void render_logo(void){ * @param void. * @return void. */ -void oled_task_user(void){ +bool oled_task_user(void){ if (timer_elapsed32(standby_oled_timer) > 15000){ oled_off(); }else{ @@ -321,6 +321,7 @@ void oled_task_user(void){ oled_scroll_left(); } } + return false; } /** @brief process the current key and add it to the keylog string. diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index d5b9a86985b..0c0819130f7 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -37,51 +37,51 @@ along with this program. If not, see . // #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS - // BEGIN: Disable RGB Effects - //#define DISABLE_RGB_MATRIX_SOLID_COLOR - //#define DISABLE_RGB_MATRIX_ALPHAS_MODS - //#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_BAND_SAT - #define DISABLE_RGB_MATRIX_BAND_VAL - // #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - #define DISABLE_RGB_MATRIX_CYCLE_ALL - #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// BEGIN: Disable RGB Effects +//#undef ENABLE_RGB_MATRIX_SOLID_COLOR +//#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +//#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - // BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS - #define DISABLE_RGB_MATRIX_TYPING_HEATMAP - // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - // END: RGB_MATRIX_FRAMEBUFFER_EFFECTS +// BEGIN: RGB_MATRIX_FRAMEBUFFER_EFFECTS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// END: RGB_MATRIX_FRAMEBUFFER_EFFECTS - // BEGIN: RGB_MATRIX_KEYPRESSES - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - // END: RGB_MATRIX_KEYPRESSES - // END: Disable RGB Effects +// BEGIN: RGB_MATRIX_KEYPRESSES +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +// END: RGB_MATRIX_KEYPRESSES +// END: Disable RGB Effects #endif #define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/keymaps/oled_sample/keymap.c b/keyboards/crkbd/keymaps/oled_sample/keymap.c index 14b45358557..9daae9607d4 100644 --- a/keyboards/crkbd/keymaps/oled_sample/keymap.c +++ b/keyboards/crkbd/keymaps/oled_sample/keymap.c @@ -190,13 +190,14 @@ void render_status_main(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_crkbd_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/oo/keymap.c b/keyboards/crkbd/keymaps/oo/keymap.c index c0416d9726f..bcc296c8b60 100644 --- a/keyboards/crkbd/keymaps/oo/keymap.c +++ b/keyboards/crkbd/keymaps/oo/keymap.c @@ -148,13 +148,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rarick/keymap.c b/keyboards/crkbd/keymaps/rarick/keymap.c index b11bac1e727..adf95554217 100644 --- a/keyboards/crkbd/keymaps/rarick/keymap.c +++ b/keyboards/crkbd/keymaps/rarick/keymap.c @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c index 7ca234a0eee..a753b2b8722 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/keymap.c +++ b/keyboards/crkbd/keymaps/rjhilgefort/keymap.c @@ -204,13 +204,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 3c5222eda85..3300684d635 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -50,50 +50,50 @@ along with this program. If not, see . # define RGB_MATRIX_VAL_STEP 10 # define RGB_MATRIX_SPD_STEP 10 -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL - -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN # define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_ANIMATION_SPEED_DEFAULT UINT8_MAX / 2 # define RGB_MATRIX_ANIMATION_SPEED_SLOW RGB_MATRIX_ANIMATION_SPEED_DEFAULT / 4 diff --git a/keyboards/crkbd/keymaps/rpbaptist/keymap.c b/keyboards/crkbd/keymaps/rpbaptist/keymap.c index d632e255d5d..a098c73d2c2 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/keymap.c +++ b/keyboards/crkbd/keymaps/rpbaptist/keymap.c @@ -290,7 +290,7 @@ void render_status(void) { # endif } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > OLED_TIMEOUT) { oled_off(); return; @@ -310,6 +310,7 @@ void oled_task_user(void) { } #endif } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/rpbaptist/readme.md b/keyboards/crkbd/keymaps/rpbaptist/readme.md index b9e749b5c67..9525cf7cfe3 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/readme.md +++ b/keyboards/crkbd/keymaps/rpbaptist/readme.md @@ -51,7 +51,7 @@ This is the gaming extended layer where movement keys remain the same. This mean I took a big inspiration from Drashna's RGB configuration and tweaked it. - `RGB_UND`: Toggles underglow indicators on and off. Each layer has its own color. -- `RGB_IDL`: This will enable/disable idle mode. By default, when typing, the `DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` will be used. When the idle timeout has exceeded the secondary animation will be activated, which is `RGB_MATRIX_CYCLE_ALL` by default. When switching to `GAMING` layer the timeout will be reduced and the idle animation changed to `RGB_MATRIX_RAINBOW_PINWHEELS`. +- `RGB_IDL`: This will enable/disable idle mode. By default, when typing, the `ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS` will be used. When the idle timeout has exceeded the secondary animation will be activated, which is `RGB_MATRIX_CYCLE_ALL` by default. When switching to `GAMING` layer the timeout will be reduced and the idle animation changed to `RGB_MATRIX_RAINBOW_PINWHEELS`. When idle mode is enabled, `RGB_MATRIX_TYPING_HEATMAP` and `RGB_MATRIX_MULTISPLASH` will be used for active animation. All others for idle animation. When disabling idle mode, the current idle animation will be activated. Additionally, on idling, the underglow layer indication will be deactivated. - There are no RGB mode cycle keys, but instead several keys to use a specific RGB directly. Each has their own default speed, although this can be changed. diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 8235b486977..0687f9c5c8c 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -71,40 +71,40 @@ along with this program. If not, see . /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// # undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +// # undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +// # undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/crkbd/keymaps/soundmonster/keymap.c b/keyboards/crkbd/keymaps/soundmonster/keymap.c index 67cfa78f928..98afe3685f2 100644 --- a/keyboards/crkbd/keymaps/soundmonster/keymap.c +++ b/keyboards/crkbd/keymaps/soundmonster/keymap.c @@ -300,7 +300,7 @@ void suspend_power_down_user() { oled_off(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > 30000) { oled_off(); return; @@ -314,6 +314,7 @@ void oled_task_user(void) { } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/crkbd/keymaps/sulrich/keymap.c b/keyboards/crkbd/keymaps/sulrich/keymap.c index f1cd60c526d..84668b53c85 100644 --- a/keyboards/crkbd/keymaps/sulrich/keymap.c +++ b/keyboards/crkbd/keymaps/sulrich/keymap.c @@ -137,13 +137,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -153,4 +154,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } #endif // OLED_ENABLE - diff --git a/keyboards/crkbd/keymaps/vayashiko/keymap.c b/keyboards/crkbd/keymaps/vayashiko/keymap.c index a1a8f7e9f5b..ecb629f30d9 100644 --- a/keyboards/crkbd/keymaps/vayashiko/keymap.c +++ b/keyboards/crkbd/keymaps/vayashiko/keymap.c @@ -164,13 +164,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/vayashiko/rules.mk b/keyboards/crkbd/keymaps/vayashiko/rules.mk index 16deaf45d1d..b8ba8384223 100644 --- a/keyboards/crkbd/keymaps/vayashiko/rules.mk +++ b/keyboards/crkbd/keymaps/vayashiko/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/crkbd/keymaps/via/keymap.c b/keyboards/crkbd/keymaps/via/keymap.c index cbaeb93f6d8..12c86f6bbce 100644 --- a/keyboards/crkbd/keymaps/via/keymap.c +++ b/keyboards/crkbd/keymaps/via/keymap.c @@ -158,13 +158,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/keymaps/xyverz/keymap.c b/keyboards/crkbd/keymaps/xyverz/keymap.c index d99d9d6baf0..0b7fc0a0ac7 100644 --- a/keyboards/crkbd/keymaps/xyverz/keymap.c +++ b/keyboards/crkbd/keymaps/xyverz/keymap.c @@ -187,13 +187,14 @@ void oled_render_logo(void) { oled_write_P(crkbd_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { oled_render_layer_state(); oled_render_keylog(); } else { oled_render_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md index f3bf152d20e..64b51f54f05 100644 --- a/keyboards/crkbd/readme.md +++ b/keyboards/crkbd/readme.md @@ -56,34 +56,54 @@ And in your `config.h` file, add the following: /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif ``` diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk index 75a54ada0d0..8169e78ae8c 100644 --- a/keyboards/crkbd/rules.mk +++ b/keyboards/crkbd/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index 78dcabb0c85..a2a4e727ff6 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -111,5 +110,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/cu24/cu24.h b/keyboards/cu24/cu24.h index d329182d238..8e3daa4758a 100644 --- a/keyboards/cu24/cu24.h +++ b/keyboards/cu24/cu24.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef CU24_H -#define CU24_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments @@ -28,34 +30,28 @@ k20, k21, k22, k23, \ k30, k31, k32, k33, \ k40, k41, k42, k43, \ - k50, k51, k52, k53 \ -) \ -{ \ + k50, k51, k52, k53 \ +) { \ { k00, k01, k02, k03 }, \ { k10, k11, k12, k13 }, \ { k20, k21, k22, k23 }, \ { k30, k31, k32, k33 }, \ { k40, k41, k42, k43 }, \ - { k50, k51, k52, k53 } \ + { k50, k51, k52, k53 } \ } #define LAYOUT_numpad( \ k00, k01, k02, k03, \ k10, k11, k12, k13, \ k20, k21, k22, k23, \ - k30, k31, k32, \ + k30, k31, k32, \ k40, k41, k42, k43, \ - k51, k52 \ -) \ -{ \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, k23 }, \ - { k30, k31, k32, KC_NO }, \ - { k40, k41, k42, k43 }, \ - { KC_NO, k51, k52, KC_NO } \ + k51, k52 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, XXX }, \ + { k40, k41, k42, k43 }, \ + { XXX, k51, k52, XXX } \ } - - - -#endif diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h index a45cc654f61..cfcb08cce1b 100644 --- a/keyboards/cu75/config.h +++ b/keyboards/cu75/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -93,5 +92,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/cu75/cu75.h b/keyboards/cu75/cu75.h index 7774187b4f0..444c8daaec9 100644 --- a/keyboards/cu75/cu75.h +++ b/keyboards/cu75/cu75.h @@ -1,5 +1,4 @@ -#ifndef CU75_H -#define CU75_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -40,71 +39,71 @@ enum action_functions { void reset_keyboard_kb(void); void click(uint16_t freq, uint16_t duration); +#define XXX KC_NO + /* Vanilla Keymap */ // This a shortcut to help you visually see your layout. /* * ,-------------------------------------------------------------------------------. -* | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | 0G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | +* | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2E | 2F | +* | 20 | 21 |22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2E | * |-------------------------------------------------------------------------------| -* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3D | 3F | +* | 30 | 31 |32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | * |-------------------------------------------------------------------------------| -* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4E | 4F | +* | 40 | 42 |43 | 44 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4E | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 54 | 57 | 59 | 5A | 5B | 5C | 5D | 5E | 5F | +* | 50 | 51 | 52 | 53 | 56 | 58 | 59 | 5A | 5B | 5C | 5D | 5E | * `-------------------------------------------------------------------------------' */ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ - k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \ - {k41, KC_NO, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } #define LAYOUT_all( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, KC_NO}, \ - {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } #define LAYOUT_iso( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, \ + k50, k51, k52, k53, k56, k58, k59, k5A, k5B, k5C, k5D, k5E \ ) { \ - {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ - {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \ - {k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \ - {k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \ - {k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \ - {k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, XXX }, \ + { k50, k51, k52, k53, XXX, XXX, k56, XXX, k58, k59, k5A, k5B, k5C, k5D, k5E, XXX } \ } - -#endif //CU75_H diff --git a/keyboards/cu80/rules.mk b/keyboards/cu80/rules.mk index 9b5768ea52c..10102e2abfc 100644 --- a/keyboards/cu80/rules.mk +++ b/keyboards/cu80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/custommk/genesis/rev2/rules.mk b/keyboards/custommk/genesis/rev2/rules.mk index eb66cf5f241..a22df8f75ff 100644 --- a/keyboards/custommk/genesis/rev2/rules.mk +++ b/keyboards/custommk/genesis/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/custommk/genesis/rules.mk b/keyboards/custommk/genesis/rules.mk index e417e223b30..ed95e6fd073 100644 --- a/keyboards/custommk/genesis/rules.mk +++ b/keyboards/custommk/genesis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/borsdorf/rules.mk b/keyboards/cutie_club/borsdorf/rules.mk index 3b7c0cacf3f..e2d46fe667c 100644 --- a/keyboards/cutie_club/borsdorf/rules.mk +++ b/keyboards/cutie_club/borsdorf/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/giant_macro_pad/rules.mk b/keyboards/cutie_club/giant_macro_pad/rules.mk index 3b7c0cacf3f..e2d46fe667c 100755 --- a/keyboards/cutie_club/giant_macro_pad/rules.mk +++ b/keyboards/cutie_club/giant_macro_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cutie_club/keebcats/denis/config.h b/keyboards/cutie_club/keebcats/denis/config.h new file mode 100644 index 00000000000..473b6906346 --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/config.h @@ -0,0 +1,50 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFB9C +#define PRODUCT_ID 0xB260 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Cutie Club +#define PRODUCT Keebcats Denis 60% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { B2, D0, F5, F4, F1 } +#define MATRIX_COL_PINS { E6, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1 } +#define UNUSED_PINS { B0, B1, B7 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define LED_CAPS_LOCK_PIN F0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/cutie_club/keebcats/denis/denis.c b/keyboards/cutie_club/keebcats/denis/denis.c new file mode 100644 index 00000000000..c661e8cbb53 --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/denis.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include "denis.h" diff --git a/keyboards/cutie_club/keebcats/denis/denis.h b/keyboards/cutie_club/keebcats/denis/denis.h new file mode 100644 index 00000000000..7ba152b8eaf --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/denis.h @@ -0,0 +1,155 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, \ + k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, \ + k04_00, k04_01, k04_02, k04_04, k04_06, k04_08, k04_10, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, KC_NO }, \ + { k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, k04_04, KC_NO, k04_06, KC_NO, k04_08, KC_NO, k04_10, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_ansi( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_13, \ + k03_00, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, \ + k04_00, k04_01, k04_02, k04_06, k04_10, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, KC_NO, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, KC_NO, k02_13, KC_NO }, \ + { k03_00, KC_NO, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, KC_NO, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, k04_10, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_ansi_split_bs_rshift( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_13, \ + k03_00, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, \ + k04_00, k04_01, k04_02, k04_06, k04_10, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, KC_NO, k02_13, KC_NO }, \ + { k03_00, KC_NO, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, k04_10, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_13, \ + k03_00, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, \ + k04_00, k04_01, k04_02, k04_06, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, KC_NO, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, KC_NO, k02_13, KC_NO }, \ + { k03_00, KC_NO, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, KC_NO, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, KC_NO, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_hhkb( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_13, \ + k03_00, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, \ + k04_01, k04_02, k04_06, k04_11, k04_12 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, KC_NO, k02_13, KC_NO }, \ + { k03_00, KC_NO, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO }, \ + { KC_NO, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, KC_NO, k04_11, k04_12, KC_NO, KC_NO } \ +} + +#define LAYOUT_60_tsangan_hhkb( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_13, \ + k03_00, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, \ + k04_00, k04_01, k04_02, k04_06, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, KC_NO, k02_13, KC_NO }, \ + { k03_00, KC_NO, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, KC_NO, k04_11, k04_12, k04_13, KC_NO } \ +} + + +#define LAYOUT_60_iso( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, \ + k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, \ + k04_00, k04_01, k04_02, k04_06, k04_10, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, KC_NO, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, KC_NO, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, KC_NO }, \ + { k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, KC_NO, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, k04_10, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_iso_split_bs_rshift( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, \ + k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, \ + k04_00, k04_01, k04_02, k04_06, k04_10, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, KC_NO, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, KC_NO }, \ + { k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, k04_10, k04_11, k04_12, k04_13, KC_NO } \ +} + +#define LAYOUT_60_iso_tsangan( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_14, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, \ + k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, \ + k04_00, k04_01, k04_02, k04_06, k04_11, k04_12, k04_13 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, KC_NO, k00_14 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, KC_NO, KC_NO }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, KC_NO }, \ + { k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, KC_NO, KC_NO }, \ + { k04_00, k04_01, k04_02, KC_NO, KC_NO, KC_NO, k04_06, KC_NO, KC_NO, KC_NO, KC_NO, k04_11, k04_12, k04_13, KC_NO } \ +} diff --git a/keyboards/cutie_club/keebcats/denis/info.json b/keyboards/cutie_club/keebcats/denis/info.json new file mode 100644 index 00000000000..a19a16a15ce --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/info.json @@ -0,0 +1,209 @@ +{ + "keyboard_name": "Keebcats Denis", + "url": "", + "maintainer": "Cutie Club", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 12, "y": 0 }, + { "x": 13, "y": 0 }, + { "x": 14, "y": 0 }, + { "x": 0, "y": 1, "w": 1.5 }, + { "x": 1.5, "y": 1 }, + { "x": 2.5, "y": 1 }, + { "x": 3.5, "y": 1 }, + { "x": 4.5, "y": 1 }, + { "x": 5.5, "y": 1 }, + { "x": 6.5, "y": 1 }, + { "x": 7.5, "y": 1 }, + { "x": 8.5, "y": 1 }, + { "x": 9.5, "y": 1 }, + { "x": 10.5, "y": 1 }, + { "x": 11.5, "y": 1 }, + { "x": 12.5, "y": 1 }, + { "x": 13.5, "y": 1, "w": 1.5 }, + { "x": 0, "y": 2, "w": 1.75 }, + { "x": 1.75, "y": 2 }, + { "x": 2.75, "y": 2 }, + { "x": 3.75, "y": 2 }, + { "x": 4.75, "y": 2 }, + { "x": 5.75, "y": 2 }, + { "x": 6.75, "y": 2 }, + { "x": 7.75, "y": 2 }, + { "x": 8.75, "y": 2 }, + { "x": 9.75, "y": 2 }, + { "x": 10.75, "y": 2 }, + { "x": 11.75, "y": 2 }, + { "x": 12.75, "y": 2 }, + { "x": 14, "y": 2 }, + { "x": 0, "y": 3, "w": 1.25 }, + { "x": 1.25, "y": 3 }, + { "x": 2.25, "y": 3 }, + { "x": 3.25, "y": 3 }, + { "x": 4.25, "y": 3 }, + { "x": 5.25, "y": 3 }, + { "x": 6.25, "y": 3 }, + { "x": 7.25, "y": 3 }, + { "x": 8.25, "y": 3 }, + { "x": 9.25, "y": 3 }, + { "x": 10.25, "y": 3 }, + { "x": 11.25, "y": 3 }, + { "x": 12.25, "y": 3, "w": 1.75 }, + { "x": 14, "y": 3 }, + { "x": 0, "y": 4, "w": 1.25 }, + { "x": 1.25, "y": 4, "w": 1.25 }, + { "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 2.25 }, + { "x": 6, "y": 4, "w": 1.25 }, + { "x": 7.25, "y": 4, "w": 2.75 }, + { "x": 10, "y": 4, "w": 1.25 }, + { "x": 11.25, "y": 4, "w": 1.25 }, + { "x": 12.5, "y": 4, "w": 1.25 }, + { "x": 13.75, "y": 4, "w": 1.25 } + ] + }, + "LAYOUT_60_iso": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 12, "y": 0 }, + { "x": 13, "y": 0, "w": 2 }, + { "x": 0, "y": 1, "w": 1.5 }, + { "x": 1.5, "y": 1 }, + { "x": 2.5, "y": 1 }, + { "x": 3.5, "y": 1 }, + { "x": 4.5, "y": 1 }, + { "x": 5.5, "y": 1 }, + { "x": 6.5, "y": 1 }, + { "x": 7.5, "y": 1 }, + { "x": 8.5, "y": 1 }, + { "x": 9.5, "y": 1 }, + { "x": 10.5, "y": 1 }, + { "x": 11.5, "y": 1 }, + { "x": 12.5, "y": 1 }, + { "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, + { "x": 0, "y": 2, "w": 1.75 }, + { "x": 1.75, "y": 2 }, + { "x": 2.75, "y": 2 }, + { "x": 3.75, "y": 2 }, + { "x": 4.75, "y": 2 }, + { "x": 5.75, "y": 2 }, + { "x": 6.75, "y": 2 }, + { "x": 7.75, "y": 2 }, + { "x": 8.75, "y": 2 }, + { "x": 9.75, "y": 2 }, + { "x": 10.75, "y": 2 }, + { "x": 11.75, "y": 2 }, + { "x": 12.75, "y": 2 }, + { "x": 0, "y": 3, "w": 1.25 }, + { "x": 1.25, "y": 3 }, + { "x": 2.25, "y": 3 }, + { "x": 3.25, "y": 3 }, + { "x": 4.25, "y": 3 }, + { "x": 5.25, "y": 3 }, + { "x": 6.25, "y": 3 }, + { "x": 7.25, "y": 3 }, + { "x": 8.25, "y": 3 }, + { "x": 9.25, "y": 3 }, + { "x": 10.25, "y": 3 }, + { "x": 11.25, "y": 3 }, + { "x": 12.25, "y": 3, "w": 2.75 }, + { "x": 0, "y": 4, "w": 1.25 }, + { "x": 1.25, "y": 4, "w": 1.25 }, + { "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "x": 10, "y": 4, "w": 1.25 }, + { "x": 11.25, "y": 4, "w": 1.25 }, + { "x": 12.5, "y": 4, "w": 1.25 }, + { "x": 13.75, "y": 4, "w": 1.25 } + ] + }, + "LAYOUT_60_ansi": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 12, "y": 0 }, + { "x": 13, "y": 0, "w": 2 }, + { "x": 0, "y": 1, "w": 1.5 }, + { "x": 1.5, "y": 1 }, + { "x": 2.5, "y": 1 }, + { "x": 3.5, "y": 1 }, + { "x": 4.5, "y": 1 }, + { "x": 5.5, "y": 1 }, + { "x": 6.5, "y": 1 }, + { "x": 7.5, "y": 1 }, + { "x": 8.5, "y": 1 }, + { "x": 9.5, "y": 1 }, + { "x": 10.5, "y": 1 }, + { "x": 11.5, "y": 1 }, + { "x": 12.5, "y": 1 }, + { "x": 13.75, "y": 1, "w": 1.25 }, + { "x": 0, "y": 2, "w": 1.75 }, + { "x": 1.75, "y": 2 }, + { "x": 2.75, "y": 2 }, + { "x": 3.75, "y": 2 }, + { "x": 4.75, "y": 2 }, + { "x": 5.75, "y": 2 }, + { "x": 6.75, "y": 2 }, + { "x": 7.75, "y": 2 }, + { "x": 8.75, "y": 2 }, + { "x": 9.75, "y": 2 }, + { "x": 10.75, "y": 2 }, + { "x": 11.75, "y": 2 }, + { "x": 12.75, "y": 2, "w": 2.25 }, + { "x": 0, "y": 3, "w": 2.25 }, + { "x": 2.25, "y": 3 }, + { "x": 3.25, "y": 3 }, + { "x": 4.25, "y": 3 }, + { "x": 5.25, "y": 3 }, + { "x": 6.25, "y": 3 }, + { "x": 7.25, "y": 3 }, + { "x": 8.25, "y": 3 }, + { "x": 9.25, "y": 3 }, + { "x": 10.25, "y": 3 }, + { "x": 11.25, "y": 3 }, + { "x": 12.25, "y": 3, "w": 2.75 }, + { "x": 0, "y": 4, "w": 1.25 }, + { "x": 1.25, "y": 4, "w": 1.25 }, + { "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 6.25 }, + { "x": 10, "y": 4, "w": 1.25 }, + { "x": 11.25, "y": 4, "w": 1.25 }, + { "x": 12.5, "y": 4, "w": 1.25 }, + { "x": 13.75, "y": 4, "w": 1.25 } + ] + } + } +} diff --git a/keyboards/cutie_club/keebcats/denis/keymaps/default/keymap.c b/keyboards/cutie_club/keebcats/denis/keymaps/default/keymap.c new file mode 100644 index 00000000000..3dbf5dc5b53 --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL + ) +}; diff --git a/keyboards/cutie_club/keebcats/denis/keymaps/via/keymap.c b/keyboards/cutie_club/keebcats/denis/keymaps/via/keymap.c new file mode 100644 index 00000000000..b7fa4f154fd --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL + ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kprepublic/bm68rgb/keymaps/via/rules.mk b/keyboards/cutie_club/keebcats/denis/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/via/rules.mk rename to keyboards/cutie_club/keebcats/denis/keymaps/via/rules.mk diff --git a/keyboards/cutie_club/keebcats/denis/readme.md b/keyboards/cutie_club/keebcats/denis/readme.md new file mode 100644 index 00000000000..5f734e7e935 --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/readme.md @@ -0,0 +1,18 @@ +# Denis + +* Keyboard Maintainer: [Cutie Club](https://github.com/cutie-club/) +* Hardware Supported: Atmega32u4 based 60% PCB, with wide compatibility +* Hardware Availability: [Keebcats](https://keebcats.co.uk) + +## Bootloader + +Enter the bootloader in 2 ways with the default configuration: + +* **Bootmagic reset**: Hold down the key at top left key (matrix position 0,0) and plug the device in +* **Physical reset button**: Press the button marked reset on the back of the PCB + +Make example for this keyboard (after setting up your build environment): + + make cutie_club/keebcats/denis:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cutie_club/keebcats/denis/rules.mk b/keyboards/cutie_club/keebcats/denis/rules.mk new file mode 100644 index 00000000000..07f5fabc065 --- /dev/null +++ b/keyboards/cutie_club/keebcats/denis/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable bootmagic +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_iso_tsangan 60_iso_split_bs_rshift 60_iso 60_tsangan_hhkb 60_hhkb 60_ansi_tsangan 60_ansi_split_bs_rshift 60_ansi diff --git a/keyboards/cutie_club/keebcats/dougal/config.h b/keyboards/cutie_club/keebcats/dougal/config.h new file mode 100644 index 00000000000..05160322c4b --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/config.h @@ -0,0 +1,50 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFB9C +#define PRODUCT_ID 0xB265 +#define DEVICE_VER 0x0000 +#define MANUFACTURER Cutie Club +#define PRODUCT Keebcats Dougal 65% + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + */ +#define MATRIX_ROW_PINS { B2, D0, F5, F4, F1 } +#define MATRIX_COL_PINS { E6, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, B7 } +#define UNUSED_PINS { B0, B1, B3 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +#define LED_CAPS_LOCK_PIN F0 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/cutie_club/keebcats/dougal/dougal.c b/keyboards/cutie_club/keebcats/dougal/dougal.c new file mode 100644 index 00000000000..8f247bd2879 --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/dougal.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include "dougal.h" diff --git a/keyboards/cutie_club/keebcats/dougal/dougal.h b/keyboards/cutie_club/keebcats/dougal/dougal.h new file mode 100644 index 00000000000..cd0fa1d2cd9 --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/dougal.h @@ -0,0 +1,34 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, k00_15, \ + k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, k01_15, \ + k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, k02_15, \ + k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, k03_15, \ + k04_00, k04_01, k04_02, k04_04, k04_06, k04_08, k04_09, k04_10, k04_11, k04_12, k04_13, k04_15 \ +) \ +{ \ + { k00_00, k00_01, k00_02, k00_03, k00_04, k00_05, k00_06, k00_07, k00_08, k00_09, k00_10, k00_11, k00_12, k00_13, k00_14, k00_15 }, \ + { k01_00, k01_01, k01_02, k01_03, k01_04, k01_05, k01_06, k01_07, k01_08, k01_09, k01_10, k01_11, k01_12, k01_13, KC_NO, k01_15 }, \ + { k02_00, k02_01, k02_02, k02_03, k02_04, k02_05, k02_06, k02_07, k02_08, k02_09, k02_10, k02_11, k02_12, k02_13, KC_NO, k02_15 }, \ + { k03_00, k03_01, k03_02, k03_03, k03_04, k03_05, k03_06, k03_07, k03_08, k03_09, k03_10, k03_11, k03_12, k03_13, KC_NO, k03_15 }, \ + { k04_00, k04_01, k04_02, KC_NO, k04_04, KC_NO, k04_06, KC_NO, k04_08, k04_09, k04_10, k04_11, k04_12, k04_13, KC_NO, k04_15 } \ +} diff --git a/keyboards/cutie_club/keebcats/dougal/info.json b/keyboards/cutie_club/keebcats/dougal/info.json new file mode 100644 index 00000000000..70c804e20d6 --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/info.json @@ -0,0 +1,84 @@ +{ + "keyboard_name": "Keebcats Dougal", + "url": "", + "maintainer": "Cutie Club", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "x": 0, "y": 0 }, + { "x": 1, "y": 0 }, + { "x": 2, "y": 0 }, + { "x": 3, "y": 0 }, + { "x": 4, "y": 0 }, + { "x": 5, "y": 0 }, + { "x": 6, "y": 0 }, + { "x": 7, "y": 0 }, + { "x": 8, "y": 0 }, + { "x": 9, "y": 0 }, + { "x": 10, "y": 0 }, + { "x": 11, "y": 0 }, + { "x": 12, "y": 0 }, + { "x": 13, "y": 0 }, + { "x": 14, "y": 0 }, + { "x": 15, "y": 0 }, + { "x": 0, "y": 1, "w": 1.5 }, + { "x": 1.5, "y": 1 }, + { "x": 2.5, "y": 1 }, + { "x": 3.5, "y": 1 }, + { "x": 4.5, "y": 1 }, + { "x": 5.5, "y": 1 }, + { "x": 6.5, "y": 1 }, + { "x": 7.5, "y": 1 }, + { "x": 8.5, "y": 1 }, + { "x": 9.5, "y": 1 }, + { "x": 10.5, "y": 1 }, + { "x": 11.5, "y": 1 }, + { "x": 12.5, "y": 1 }, + { "x": 13.5, "y": 1, "w": 1.5 }, + { "x": 15, "y": 1 }, + { "x": 0, "y": 2, "w": 1.75 }, + { "x": 1.75, "y": 2 }, + { "x": 2.75, "y": 2 }, + { "x": 3.75, "y": 2 }, + { "x": 4.75, "y": 2 }, + { "x": 5.75, "y": 2 }, + { "x": 6.75, "y": 2 }, + { "x": 7.75, "y": 2 }, + { "x": 8.75, "y": 2 }, + { "x": 9.75, "y": 2 }, + { "x": 10.75, "y": 2 }, + { "x": 11.75, "y": 2 }, + { "x": 12.75, "y": 2 }, + { "x": 14, "y": 2 }, + { "x": 15, "y": 2 }, + { "x": 0, "y": 3, "w": 1.25 }, + { "x": 1.25, "y": 3 }, + { "x": 2.25, "y": 3 }, + { "x": 3.25, "y": 3 }, + { "x": 4.25, "y": 3 }, + { "x": 5.25, "y": 3 }, + { "x": 6.25, "y": 3 }, + { "x": 7.25, "y": 3 }, + { "x": 8.25, "y": 3 }, + { "x": 9.25, "y": 3 }, + { "x": 10.25, "y": 3 }, + { "x": 11.25, "y": 3 }, + { "x": 12.25, "y": 3, "w": 1.75 }, + { "x": 14, "y": 3 }, + { "x": 15, "y": 3 }, + { "x": 0, "y": 4, "w": 1.25 }, + { "x": 1.25, "y": 4, "w": 1.25 }, + { "x": 2.5, "y": 4, "w": 1.25 }, + { "x": 3.75, "y": 4, "w": 2.25 }, + { "x": 6, "y": 4, "w": 1.25 }, + { "x": 7.25, "y": 4, "w": 2.75 }, + { "x": 10, "y": 4 }, + { "x": 11, "y": 4 }, + { "x": 12, "y": 4 }, + { "x": 13, "y": 4 }, + { "x": 14, "y": 4 }, + { "x": 15, "y": 4 } + ] + } + } +} diff --git a/keyboards/cutie_club/keebcats/dougal/keymaps/default/keymap.c b/keyboards/cutie_club/keebcats/dougal/keymaps/default/keymap.c new file mode 100644 index 00000000000..ec3e1c21f7a --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, + KC_TAB, 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_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT + ) +}; diff --git a/keyboards/cutie_club/keebcats/dougal/keymaps/via/keymap.c b/keyboards/cutie_club/keebcats/dougal/keymaps/via/keymap.c new file mode 100644 index 00000000000..58d184a064b --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* Copyright 2021 Cutie Club + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_DEL, + KC_TAB, 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_HOME, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kprepublic/bm80/keymaps/via/rules.mk b/keyboards/cutie_club/keebcats/dougal/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/via/rules.mk rename to keyboards/cutie_club/keebcats/dougal/keymaps/via/rules.mk diff --git a/keyboards/cutie_club/keebcats/dougal/readme.md b/keyboards/cutie_club/keebcats/dougal/readme.md new file mode 100644 index 00000000000..3c0dd932aa4 --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/readme.md @@ -0,0 +1,18 @@ +# Dougal + +* Keyboard Maintainer: [Cutie Club](https://github.com/cutie-club/) +* Hardware Supported: Atmega32u4 based 65% PCB, with wide compatibility +* Hardware Availability: [Keebcats](https://keebcats.co.uk) + +## Bootloader + +Enter the bootloader in 2 ways with the default configuration: + +* **Bootmagic reset**: Hold down the key at top left key (matrix position 0,0) and plug the device in +* **Physical reset button**: Press the button marked reset on the back of the PCB + +Make example for this keyboard (after setting up your build environment): + + make cutie_club/keebcats/dougal:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cutie_club/keebcats/dougal/rules.mk b/keyboards/cutie_club/keebcats/dougal/rules.mk new file mode 100644 index 00000000000..05c513615e0 --- /dev/null +++ b/keyboards/cutie_club/keebcats/dougal/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/cutie_club/wraith/rules.mk b/keyboards/cutie_club/wraith/rules.mk index 575ba17005f..60c0e1b1938 100644 --- a/keyboards/cutie_club/wraith/rules.mk +++ b/keyboards/cutie_club/wraith/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cx60/rules.mk b/keyboards/cx60/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/cx60/rules.mk +++ b/keyboards/cx60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/cybergear/macro25/rules.mk b/keyboards/cybergear/macro25/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/cybergear/macro25/rules.mk +++ b/keyboards/cybergear/macro25/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/daji/seis_cinco/rules.mk b/keyboards/daji/seis_cinco/rules.mk index 45d9347631a..d9bb3e13aa9 100644 --- a/keyboards/daji/seis_cinco/rules.mk +++ b/keyboards/daji/seis_cinco/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dc01/arrow/rules.mk b/keyboards/dc01/arrow/rules.mk index d5b3fc07223..6a5dc9af064 100644 --- a/keyboards/dc01/arrow/rules.mk +++ b/keyboards/dc01/arrow/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dc01/left/i2c.h b/keyboards/dc01/left/i2c.h index 25e876658bb..0d93e4ecaa4 100644 --- a/keyboards/dc01/left/i2c.h +++ b/keyboards/dc01/left/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -27,5 +26,3 @@ uint8_t i2c_master_write(uint8_t data); uint8_t i2c_master_read(int); void i2c_reset_state(void); void i2c_slave_init(uint8_t address); - -#endif diff --git a/keyboards/dc01/left/rules.mk b/keyboards/dc01/left/rules.mk index 7dbd6bcc03e..c39b1507ecf 100644 --- a/keyboards/dc01/left/rules.mk +++ b/keyboards/dc01/left/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dc01/numpad/rules.mk b/keyboards/dc01/numpad/rules.mk index a0c9849a472..16653ef8a04 100644 --- a/keyboards/dc01/numpad/rules.mk +++ b/keyboards/dc01/numpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dc01/right/rules.mk b/keyboards/dc01/right/rules.mk index d5b3fc07223..6a5dc9af064 100644 --- a/keyboards/dc01/right/rules.mk +++ b/keyboards/dc01/right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dekunukem/duckypad/config.h b/keyboards/dekunukem/duckypad/config.h index 2f1b2ef32ca..06f2ae807d4 100644 --- a/keyboards/dekunukem/duckypad/config.h +++ b/keyboards/dekunukem/duckypad/config.h @@ -42,12 +42,59 @@ along with this program. If not, see . #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define RGB_MATRIX_STARTUP_HUE 221 - +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/dekunukem/duckypad/keymaps/default/keymap.c b/keyboards/dekunukem/duckypad/keymaps/default/keymap.c index a87caa2cdd4..3b74640fe6d 100644 --- a/keyboards/dekunukem/duckypad/keymaps/default/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/default/keymap.c @@ -125,7 +125,7 @@ char* make_rgb_text(void){ return s; }; -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); oled_set_cursor(0,3); if (rgbToggled) { @@ -137,6 +137,7 @@ void oled_task_user(void) { oled_write_ln_P(s, false); free(s); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c b/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c index 80b188a480a..cd8a3147390 100644 --- a/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/m4cs/keymap.c @@ -203,7 +203,7 @@ char* make_sys_info_text(void) { }; -void oled_task_user(void) { +bool oled_task_user(void) { if (!sysToggled) { render_logo(); oled_set_cursor(0,3); @@ -221,6 +221,7 @@ void oled_task_user(void) { free(s); } } + return false; }; int concat(int a, int b) { diff --git a/keyboards/dekunukem/duckypad/keymaps/via/keymap.c b/keyboards/dekunukem/duckypad/keymaps/via/keymap.c index 5d11b6d6c87..01baaeb5937 100644 --- a/keyboards/dekunukem/duckypad/keymaps/via/keymap.c +++ b/keyboards/dekunukem/duckypad/keymaps/via/keymap.c @@ -67,7 +67,7 @@ static void render_logo(void) { oled_write_raw_P(ducky_logo, LOGO_SIZE); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } - diff --git a/keyboards/delikeeb/flatbread60/rules.mk b/keyboards/delikeeb/flatbread60/rules.mk index 1c21efcda41..5aa5e7a9058 100644 --- a/keyboards/delikeeb/flatbread60/rules.mk +++ b/keyboards/delikeeb/flatbread60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaguettelite/rules.mk b/keyboards/delikeeb/vaguettelite/rules.mk index 1bf9ed41879..599aa6616ee 100644 --- a/keyboards/delikeeb/vaguettelite/rules.mk +++ b/keyboards/delikeeb/vaguettelite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vanana/rules.mk b/keyboards/delikeeb/vanana/rules.mk index bd9127b4708..ee2cd517cf6 100644 --- a/keyboards/delikeeb/vanana/rules.mk +++ b/keyboards/delikeeb/vanana/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaneela/rules.mk b/keyboards/delikeeb/vaneela/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/delikeeb/vaneela/rules.mk +++ b/keyboards/delikeeb/vaneela/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/vaneelaex/rules.mk b/keyboards/delikeeb/vaneelaex/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/delikeeb/vaneelaex/rules.mk +++ b/keyboards/delikeeb/vaneelaex/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delikeeb/waaffle/rev3/rules.mk b/keyboards/delikeeb/waaffle/rev3/rules.mk index a4b9ea39339..130155735db 100644 --- a/keyboards/delikeeb/waaffle/rev3/rules.mk +++ b/keyboards/delikeeb/waaffle/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/delilah/rules.mk b/keyboards/delilah/rules.mk index 59c60ebbecf..438c9fdf739 100644 --- a/keyboards/delilah/rules.mk +++ b/keyboards/delilah/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dichotomy/config.h b/keyboards/dichotomy/config.h index 0cdaf776b46..03e19b13883 100644 --- a/keyboards/dichotomy/config.h +++ b/keyboards/dichotomy/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/dichotomy/dichotomy.h b/keyboards/dichotomy/dichotomy.h index 2023259b111..37372d6496f 100755 --- a/keyboards/dichotomy/dichotomy.h +++ b/keyboards/dichotomy/dichotomy.h @@ -1,5 +1,4 @@ -#ifndef DICHOTOMY_H -#define DICHOTOMY_H +#pragma once #include "report.h" #include "pointing_device.h" @@ -25,22 +24,21 @@ #define set_led_cyan() red_led_off(); grn_led_on(); blu_led_on() #define set_led_white() red_led_on(); grn_led_on(); blu_led_on() +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ - k33, k34, k35, k36, k37, k38, \ - k42, k43, k44, k45, k46, k47, k48, k49 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ - { KC_NO, KC_NO, KC_NO, k33, k34, k35, k36, k37, k38, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, KC_NO, KC_NO } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k33, k34, k35, k36, k37, k38, \ + k42, k43, k44, k45, k46, k47, k48, k49 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { XXX, XXX, XXX, k33, k34, k35, k36, k37, k38, XXX, XXX, XXX }, \ + { XXX, XXX, k42, k43, k44, k45, k46, k47, k48, k49, XXX, XXX } \ } - -#endif diff --git a/keyboards/diverge3/diverge3.h b/keyboards/diverge3/diverge3.h index 53364213f6e..c668bb29efa 100644 --- a/keyboards/diverge3/diverge3.h +++ b/keyboards/diverge3/diverge3.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef DIVERGE3_H -#define DIVERGE3_H + +#pragma once #include "quantum.h" @@ -26,24 +26,25 @@ #endif #endif +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ ) { \ - { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ - { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ - { L20, L21, L22, L23, L24, L25, L26, KC_NO }, \ - { L30, L31, L32, L33, L34, L35, L36, KC_NO }, \ - { L40, L41, L42, L43, L44, LT0, LT1, LT2 }, \ - { R06, R05, R04, R03, R02, R01, R00, KC_NO }, \ - { R16, R15, R14, R13, R12, R11, R10, KC_NO }, \ - { R26, R25, R24, R23, R22, R21, R20, KC_NO }, \ - { R36, R35, R34, R33, R32, R31, R30, KC_NO }, \ - { R44, R43, R42, R41, R40, RT0, RT1, RT2 } \ + { L00, L01, L02, L03, L04, L05, L06, XXX }, \ + { L10, L11, L12, L13, L14, L15, L16, XXX }, \ + { L20, L21, L22, L23, L24, L25, L26, XXX }, \ + { L30, L31, L32, L33, L34, L35, L36, XXX }, \ + { L40, L41, L42, L43, L44, LT0, LT1, LT2 }, \ + { R06, R05, R04, R03, R02, R01, R00, XXX }, \ + { R16, R15, R14, R13, R12, R11, R10, XXX }, \ + { R26, R25, R24, R23, R22, R21, R20, XXX }, \ + { R36, R35, R34, R33, R32, R31, R30, XXX }, \ + { R44, R43, R42, R41, R40, RT0, RT1, RT2 } \ } -#endif diff --git a/keyboards/dk60/rules.mk b/keyboards/dk60/rules.mk index c3c93b823cd..d23cfda0e4a 100644 --- a/keyboards/dk60/rules.mk +++ b/keyboards/dk60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dm9records/ergoinu/post_rules.mk b/keyboards/dm9records/ergoinu/post_rules.mk new file mode 100644 index 00000000000..02aa48104c1 --- /dev/null +++ b/keyboards/dm9records/ergoinu/post_rules.mk @@ -0,0 +1,9 @@ +ifneq ($(strip $(ERGOINU)),) + ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) + DISABLE_PROMICRO_LEDs = no + endif +endif + +ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) + OPT_DEFS += -DDISABLE_PROMICRO_LEDs +endif diff --git a/keyboards/dm9records/ergoinu/rules.mk b/keyboards/dm9records/ergoinu/rules.mk index 04884050dca..895ce253d7d 100644 --- a/keyboards/dm9records/ergoinu/rules.mk +++ b/keyboards/dm9records/ergoinu/rules.mk @@ -27,13 +27,3 @@ SRC += matrix.c serial.c split_util.c # ergoinu configs DISABLE_PROMICRO_LEDs = yes - -ifneq ($(strip $(ERGOINU)),) - ifeq ($(findstring promicroled, $(ERGOINU)), promicroled) - DISABLE_PROMICRO_LEDs = no - endif -endif - -ifeq ($(strip $(DISABLE_PROMICRO_LEDs)), yes) - OPT_DEFS += -DDISABLE_PROMICRO_LEDs -endif diff --git a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c index 181de5621c4..b41359c5b60 100644 --- a/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/gorbachev/keymap.c @@ -220,7 +220,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -244,5 +244,6 @@ void oled_task_user(void) { oled_write_P(PSTR("Mode: "), false); oled_write_ln(rgb_mode_name, false); + return false; } #endif diff --git a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk index 00b815f56d6..7fe1f992aa0 100644 --- a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk +++ b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/rules.mk @@ -1,6 +1,6 @@ MOUSEKEY_ENABLE = no MIDI_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite LTO_ENABLE = yes CONSOLE_ENABLE = yes # Console for debug GRAVE_ESC_ENABLE = no diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index f3ee1ed0455..8a0f324aa29 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -75,5 +74,3 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/do60/rules.mk b/keyboards/do60/rules.mk index ca6e2146c15..418217e096e 100644 --- a/keyboards/do60/rules.mk +++ b/keyboards/do60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/donutcables/scrabblepad/rules.mk b/keyboards/donutcables/scrabblepad/rules.mk index 78fbb71b4eb..b2c3b22c2a7 100644 --- a/keyboards/donutcables/scrabblepad/rules.mk +++ b/keyboards/donutcables/scrabblepad/rules.mk @@ -5,7 +5,7 @@ MCU = at90usb1286 BOOTLOADER = halfkay # Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/doodboard/duckboard/keymaps/default/keymap.c b/keyboards/doodboard/duckboard/keymaps/default/keymap.c index e25280ff6a8..b4e6207aea4 100644 --- a/keyboards/doodboard/duckboard/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard/keymaps/default/keymap.c @@ -89,7 +89,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -109,6 +109,7 @@ void oled_task_user(void) { oled_write_P(PSTR("RGB\n"), false); break; } + return false; } #endif diff --git a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c index ea603cdb223..af6e469ab2a 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/default/keymap.c @@ -89,7 +89,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -109,6 +109,7 @@ void oled_task_user(void) { oled_write_P(PSTR("RGB\n"), false); break; } + return false; } #endif diff --git a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c index 9afc1218591..7911d9e3cc9 100644 --- a/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c +++ b/keyboards/doodboard/duckboard_r2/keymaps/via/keymap.c @@ -96,7 +96,7 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,6); oled_write_P(PSTR("DUCK\nBOARD\n"), false); @@ -119,6 +119,7 @@ void oled_task_user(void) { oled_write_P(PSTR("FN2\n"), false); break; } + return false; } #endif diff --git a/keyboards/doppelganger/rules.mk b/keyboards/doppelganger/rules.mk index 161d6da26bc..cc5477a3bdd 100644 --- a/keyboards/doppelganger/rules.mk +++ b/keyboards/doppelganger/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/doro67/multi/keymaps/konstantin/rules.mk b/keyboards/doro67/multi/keymaps/konstantin/rules.mk index 10ff0bc915c..7bab7513ed3 100644 --- a/keyboards/doro67/multi/keymaps/konstantin/rules.mk +++ b/keyboards/doro67/multi/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/doro67/multi/rules.mk b/keyboards/doro67/multi/rules.mk index 1318a76a252..9a09abb565b 100644 --- a/keyboards/doro67/multi/rules.mk +++ b/keyboards/doro67/multi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk index 77d1bbc28a6..df57d4837e0 100644 --- a/keyboards/doro67/regular/rules.mk +++ b/keyboards/doro67/regular/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/doro67/rgb/config.h b/keyboards/doro67/rgb/config.h index 709d3cdd3b5..b2d26b29aeb 100644 --- a/keyboards/doro67/rgb/config.h +++ b/keyboards/doro67/rgb/config.h @@ -56,6 +56,54 @@ along with this program. If not, see . #define DRIVER_LED_TOTAL 67 #define RGB_MATRIX_KEYPRESSES +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. diff --git a/keyboards/doro67/rgb/rules.mk b/keyboards/doro67/rgb/rules.mk index 2a575b3e97c..bc9b2d2c2ce 100644 --- a/keyboards/doro67/rgb/rules.mk +++ b/keyboards/doro67/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dp60/config.h b/keyboards/dp60/config.h index 2593b7ff71a..f4a44206f43 100644 --- a/keyboards/dp60/config.h +++ b/keyboards/dp60/config.h @@ -59,3 +59,51 @@ #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/dp60/dp60.c b/keyboards/dp60/dp60.c index 87543b2a1c4..16aac75fa5e 100644 --- a/keyboards/dp60/dp60.c +++ b/keyboards/dp60/dp60.c @@ -17,7 +17,7 @@ #include "dp60.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/dp60/rules.mk b/keyboards/dp60/rules.mk index be421280a7e..059e29016eb 100644 --- a/keyboards/dp60/rules.mk +++ b/keyboards/dp60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/draculad/keymaps/default/keymap.c b/keyboards/draculad/keymaps/default/keymap.c index 657ef2048db..a352359d132 100644 --- a/keyboards/draculad/keymaps/default/keymap.c +++ b/keyboards/draculad/keymaps/default/keymap.c @@ -186,12 +186,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c index c7b6cd35d59..b70184dbc81 100644 --- a/keyboards/draculad/keymaps/pimoroni/keymap.c +++ b/keyboards/draculad/keymaps/pimoroni/keymap.c @@ -200,12 +200,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/draytronics/daisy/rules.mk b/keyboards/draytronics/daisy/rules.mk index cc1a640c3cb..d46afbf9d2e 100644 --- a/keyboards/draytronics/daisy/rules.mk +++ b/keyboards/draytronics/daisy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/draytronics/elise/rules.mk b/keyboards/draytronics/elise/rules.mk index ef4e43a086b..6bbe5afe838 100644 --- a/keyboards/draytronics/elise/rules.mk +++ b/keyboards/draytronics/elise/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/draytronics/scarlet/rules.mk b/keyboards/draytronics/scarlet/rules.mk index 26008e03f41..6d6679ef3d2 100644 --- a/keyboards/draytronics/scarlet/rules.mk +++ b/keyboards/draytronics/scarlet/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dtisaac/dosa40rgb/config.h b/keyboards/dtisaac/dosa40rgb/config.h index c2d4a170565..c2c0ebd6d44 100644 --- a/keyboards/dtisaac/dosa40rgb/config.h +++ b/keyboards/dtisaac/dosa40rgb/config.h @@ -30,11 +30,6 @@ along with this program. If not, see . #define MATRIX_ROWS 4 #define MATRIX_COLS 11 -/* AdafruitBle Pin */ -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 - /* * Keyboard Matrix Assignments * @@ -63,6 +58,51 @@ along with this program. If not, see . #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ @@ -70,4 +110,4 @@ along with this program. If not, see . /* disable these deprecated features by default */ #define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION \ No newline at end of file +#define NO_ACTION_FUNCTION diff --git a/keyboards/dtisaac/dosa40rgb/rules.mk b/keyboards/dtisaac/dosa40rgb/rules.mk index bf7cde9a555..a76047eb266 100644 --- a/keyboards/dtisaac/dosa40rgb/rules.mk +++ b/keyboards/dtisaac/dosa40rgb/rules.mk @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE # Enable Bluetooth +BLUETOOTH_ENABLE = yes # Enable Bluetooth +BLUETOOTH_DRIVER = AdafruitBLE RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/dtisaac/dtisaac01/rules.mk b/keyboards/dtisaac/dtisaac01/rules.mk index dc64cef3234..5d08412d65e 100644 --- a/keyboards/dtisaac/dtisaac01/rules.mk +++ b/keyboards/dtisaac/dtisaac01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/eagle_viper/v2/rules.mk b/keyboards/duck/eagle_viper/v2/rules.mk index 7da0ea7f4c0..ecc221f9496 100644 --- a/keyboards/duck/eagle_viper/v2/rules.mk +++ b/keyboards/duck/eagle_viper/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/jetfire/rules.mk b/keyboards/duck/jetfire/rules.mk index 9ec067e0c01..f8e4e1052e4 100644 --- a/keyboards/duck/jetfire/rules.mk +++ b/keyboards/duck/jetfire/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/duck/octagon/v1/rules.mk b/keyboards/duck/octagon/v1/rules.mk index 216a5b14cd0..aceb2aa2f3d 100644 --- a/keyboards/duck/octagon/v1/rules.mk +++ b/keyboards/duck/octagon/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/octagon/v2/rules.mk b/keyboards/duck/octagon/v2/rules.mk index 455abba8ad6..aa11021233f 100644 --- a/keyboards/duck/octagon/v2/rules.mk +++ b/keyboards/duck/octagon/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/orion/v3/rules.mk b/keyboards/duck/orion/v3/rules.mk index 5206228b3e9..c582f6981c5 100644 --- a/keyboards/duck/orion/v3/rules.mk +++ b/keyboards/duck/orion/v3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/duck/tcv3/rules.mk b/keyboards/duck/tcv3/rules.mk index ecc9f56585a..fa0be90927d 100644 --- a/keyboards/duck/tcv3/rules.mk +++ b/keyboards/duck/tcv3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ducky/one2mini/1861st/rules.mk b/keyboards/ducky/one2mini/1861st/rules.mk index 0b2fedd8d82..65d4a1b3a84 100644 --- a/keyboards/ducky/one2mini/1861st/rules.mk +++ b/keyboards/ducky/one2mini/1861st/rules.mk @@ -16,7 +16,7 @@ ARMV = 6 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c index f3ee8952103..7fc3ffc2c44 100644 --- a/keyboards/dumbo/keymaps/default/keymap.c +++ b/keyboards/dumbo/keymaps/default/keymap.c @@ -179,12 +179,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c index fc1092ca6d8..73042f5f5ee 100644 --- a/keyboards/dumbo/keymaps/trip-trap/keymap.c +++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c @@ -375,7 +375,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); sprintf(wpm_str, "%03d", get_current_wpm()); @@ -383,6 +383,7 @@ void oled_task_user(void) { } else { render_anim(); } + return false; } #endif diff --git a/keyboards/dumbpad/v0x/rules.mk b/keyboards/dumbpad/v0x/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v0x/rules.mk +++ b/keyboards/dumbpad/v0x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v0x_dualencoder/rules.mk b/keyboards/dumbpad/v0x_dualencoder/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v0x_dualencoder/rules.mk +++ b/keyboards/dumbpad/v0x_dualencoder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v0x_right/rules.mk b/keyboards/dumbpad/v0x_right/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v0x_right/rules.mk +++ b/keyboards/dumbpad/v0x_right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x/rules.mk b/keyboards/dumbpad/v1x/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v1x/rules.mk +++ b/keyboards/dumbpad/v1x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x_dualencoder/rules.mk b/keyboards/dumbpad/v1x_dualencoder/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v1x_dualencoder/rules.mk +++ b/keyboards/dumbpad/v1x_dualencoder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/dumbpad/v1x_right/rules.mk b/keyboards/dumbpad/v1x_right/rules.mk index f5252179f6e..6302e98d3e7 100644 --- a/keyboards/dumbpad/v1x_right/rules.mk +++ b/keyboards/dumbpad/v1x_right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/durgod/dgk6x/config.h b/keyboards/durgod/dgk6x/config.h index 53f824b98eb..92673e5c24a 100644 --- a/keyboards/durgod/dgk6x/config.h +++ b/keyboards/durgod/dgk6x/config.h @@ -83,9 +83,54 @@ # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define DISABLE_RGB_MATRIX_HUE_BREATHING -# define DISABLE_RGB_MATRIX_HUE_PENDULUM -# define DISABLE_RGB_MATRIX_HUE_WAVE +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // This allows VIA to control RGB Matrix settings in the 'Lighting' section. #define VIA_QMK_RGBLIGHT_ENABLE diff --git a/keyboards/durgod/dgk6x/galaxy/galaxy.c b/keyboards/durgod/dgk6x/galaxy/galaxy.c index 5f793ed85bf..86aef1bced9 100644 --- a/keyboards/durgod/dgk6x/galaxy/galaxy.c +++ b/keyboards/durgod/dgk6x/galaxy/galaxy.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/dgk6x/hades/hades.c b/keyboards/durgod/dgk6x/hades/hades.c index 3e235683f1c..2f2f9e650f5 100644 --- a/keyboards/durgod/dgk6x/hades/hades.c +++ b/keyboards/durgod/dgk6x/hades/hades.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/dgk6x/rules.mk b/keyboards/durgod/dgk6x/rules.mk index 56097ed6602..e6129f57165 100644 --- a/keyboards/durgod/dgk6x/rules.mk +++ b/keyboards/durgod/dgk6x/rules.mk @@ -10,7 +10,7 @@ NO_SUSPEND_POWER_DOWN = yes # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/durgod/dgk6x/venus/venus.c b/keyboards/durgod/dgk6x/venus/venus.c index 3398acb19df..0b7fbd12f3d 100644 --- a/keyboards/durgod/dgk6x/venus/venus.c +++ b/keyboards/durgod/dgk6x/venus/venus.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/durgod/k3x0/rules.mk b/keyboards/durgod/k3x0/rules.mk index 827f223653b..327c1723b7a 100644 --- a/keyboards/durgod/k3x0/rules.mk +++ b/keyboards/durgod/k3x0/rules.mk @@ -12,7 +12,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dyz/dyz60/rules.mk b/keyboards/dyz/dyz60/rules.mk index 02bed4240e7..209bdae2ee6 100644 --- a/keyboards/dyz/dyz60/rules.mk +++ b/keyboards/dyz/dyz60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dz60/keymaps/LEdiodes/rules.mk b/keyboards/dz60/keymaps/LEdiodes/rules.mk index 2dbd6bd5d46..2f6622e587e 100644 --- a/keyboards/dz60/keymaps/LEdiodes/rules.mk +++ b/keyboards/dz60/keymaps/LEdiodes/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/konstantin_b/rules.mk b/keyboards/dz60/keymaps/konstantin_b/rules.mk index c1eb43da2cd..18ea01311fc 100644 --- a/keyboards/dz60/keymaps/konstantin_b/rules.mk +++ b/keyboards/dz60/keymaps/konstantin_b/rules.mk @@ -1,7 +1,7 @@ USER_NAME := konstantin # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/dz60/keymaps/krusli/rules.mk b/keyboards/dz60/keymaps/krusli/rules.mk index c6a19afa4d2..3207000a16b 100644 --- a/keyboards/dz60/keymaps/krusli/rules.mk +++ b/keyboards/dz60/keymaps/krusli/rules.mk @@ -1,7 +1,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/marianas/rules.mk b/keyboards/dz60/keymaps/marianas/rules.mk index d647c9de858..11eb15fe15f 100644 --- a/keyboards/dz60/keymaps/marianas/rules.mk +++ b/keyboards/dz60/keymaps/marianas/rules.mk @@ -3,7 +3,7 @@ # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/dz60/keymaps/mechmerlin/readme.md b/keyboards/dz60/keymaps/mechmerlin/readme.md index 76ff54de548..9c53288feac 100644 --- a/keyboards/dz60/keymaps/mechmerlin/readme.md +++ b/keyboards/dz60/keymaps/mechmerlin/readme.md @@ -45,7 +45,7 @@ This is the control layer also known as layer 2. It utilizes the following: --- ### RESET -As long `BOOTMAGIC_ENABLE` is set to `yes` in `rules.mk`, the DZ60 can be put into bootloader mode by holding the `space` key and the `b` key while plugging in. However sometmes this doesn't work or is troublesome to do, might as well use the `RESET` keycode to accomplish this. +As long `BOOTMAGIC_ENABLE` is set to `yes` in `rules.mk`, the DZ60 can be put into bootloader mode by holding the `Escape` key while plugging in. However sometmes this doesn't work or is troublesome to do, might as well use the `RESET` keycode to accomplish this. ### RSFT_T(KC_SLSH) diff --git a/keyboards/dz60/keymaps/niclake/rules.mk b/keyboards/dz60/keymaps/niclake/rules.mk index 0b4dadb10ef..31d6053e03d 100644 --- a/keyboards/dz60/keymaps/niclake/rules.mk +++ b/keyboards/dz60/keymaps/niclake/rules.mk @@ -1,3 +1,3 @@ COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/dz60/keymaps/pinpox/rules.mk b/keyboards/dz60/keymaps/pinpox/rules.mk index 855a1e5e6ec..7e4fd5d3491 100644 --- a/keyboards/dz60/keymaps/pinpox/rules.mk +++ b/keyboards/dz60/keymaps/pinpox/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/dz60/rules.mk b/keyboards/dz60/rules.mk index 59be7b0751d..9d8586ede3f 100644 --- a/keyboards/dz60/rules.mk +++ b/keyboards/dz60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/bocc/rules.mk b/keyboards/dztech/bocc/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/dztech/bocc/rules.mk +++ b/keyboards/dztech/bocc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c index a7fc3dbc5ce..81f4846c2c8 100644 --- a/keyboards/dztech/dz60rgb/dz60rgb.c +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -1,7 +1,7 @@ #include "dz60rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, diff --git a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h index 3c887217774..fc836b5ebb3 100644 --- a/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/kgreulich/config.h @@ -31,40 +31,40 @@ #undef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH #undef RGB_MATRIX_STARTUP_MODE #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_SOLID_COLOR -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_COLOR +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h index 1002f010e1f..c2b14f52845 100644 --- a/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/matthewrobo/config.h @@ -13,43 +13,43 @@ #undef RGB_MATRIX_STARTUP_MODE #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/dztech/dz60rgb/keymaps/piv3rt/config.h b/keyboards/dztech/dz60rgb/keymaps/piv3rt/config.h index a2b29c03be5..bdc2a1a057a 100644 --- a/keyboards/dztech/dz60rgb/keymaps/piv3rt/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/piv3rt/config.h @@ -18,39 +18,39 @@ along with this program. If not, see . #define FORCE_NKRO #define TAPPING_TERM 100 -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +//#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/dztech/dz60rgb/keymaps/via/config.h b/keyboards/dztech/dz60rgb/keymaps/via/config.h index 1beb7130f75..8ef0df8ee87 100644 --- a/keyboards/dztech/dz60rgb/keymaps/via/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/via/config.h @@ -16,6 +16,6 @@ #pragma once -#define DISABLE_RGB_MATRIX_PIXEL_FLOW -#define DISABLE_RGB_MATRIX_PIXEL_FRACTAL -#define DISABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN diff --git a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h index 60220cbbf74..cfeba003bd4 100644 --- a/keyboards/dztech/dz60rgb/keymaps/xunz/config.h +++ b/keyboards/dztech/dz60rgb/keymaps/xunz/config.h @@ -8,43 +8,43 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -// #define DISABLE_RGB_MATRIX_DUAL_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +// #undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #undef ENABLE_RGB_MATRIX_RAINDROPS +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define QMK_KEYS_PER_SCAN 4 @@ -53,4 +53,3 @@ #define NO_ACTION_ONESHOT #define TAPPING_FORCE_HOLD #define IGNORE_MOD_TAP_INTERRUPT - diff --git a/keyboards/dztech/dz60rgb/v1/config.h b/keyboards/dztech/dz60rgb/v1/config.h index f6ee7c4e2ff..0d464b5d6b7 100644 --- a/keyboards/dztech/dz60rgb/v1/config.h +++ b/keyboards/dztech/dz60rgb/v1/config.h @@ -41,13 +41,57 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb/v1/rules.mk b/keyboards/dztech/dz60rgb/v1/rules.mk index 8b6dda84db4..e055ded9226 100644 --- a/keyboards/dztech/dz60rgb/v1/rules.mk +++ b/keyboards/dztech/dz60rgb/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb/v2/config.h b/keyboards/dztech/dz60rgb/v2/config.h index 6108e990343..3db8ea40f51 100644 --- a/keyboards/dztech/dz60rgb/v2/config.h +++ b/keyboards/dztech/dz60rgb/v2/config.h @@ -40,24 +40,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb/v2/rules.mk b/keyboards/dztech/dz60rgb/v2/rules.mk index c4d5352324e..41fdb211ed4 100644 --- a/keyboards/dztech/dz60rgb/v2/rules.mk +++ b/keyboards/dztech/dz60rgb/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb/v2_1/config.h b/keyboards/dztech/dz60rgb/v2_1/config.h index 06d504e3933..d785d1e539a 100644 --- a/keyboards/dztech/dz60rgb/v2_1/config.h +++ b/keyboards/dztech/dz60rgb/v2_1/config.h @@ -56,24 +56,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 63 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 63 #endif diff --git a/keyboards/dztech/dz60rgb/v2_1/rules.mk b/keyboards/dztech/dz60rgb/v2_1/rules.mk index 2e0e6f0bcb3..831b1b94f82 100644 --- a/keyboards/dztech/dz60rgb/v2_1/rules.mk +++ b/keyboards/dztech/dz60rgb/v2_1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c index ab244109128..0929ddbf477 100644 --- a/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c +++ b/keyboards/dztech/dz60rgb_ansi/dz60rgb_ansi.c @@ -1,7 +1,7 @@ #include "dz60rgb_ansi.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, diff --git a/keyboards/dztech/dz60rgb_ansi/v1/config.h b/keyboards/dztech/dz60rgb_ansi/v1/config.h index dc2a6f4bc0f..176bb03a136 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v1/config.h @@ -41,13 +41,57 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 61 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 61 #endif diff --git a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk index 8b6dda84db4..e055ded9226 100644 --- a/keyboards/dztech/dz60rgb_ansi/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb_ansi/v2/config.h b/keyboards/dztech/dz60rgb_ansi/v2/config.h index 6c1e0068217..5ff2cd6a8c4 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2/config.h @@ -40,24 +40,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 61 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 61 #endif diff --git a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk index c4d5352324e..83184688800 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,3 +22,5 @@ AUDIO_ENABLE = no # Audio output RGB_MATRIX_ENABLE = yes # Use RGB matrix RGB_MATRIX_DRIVER = IS31FL3733 NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in + +LTO_ENABLE = yes diff --git a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h index ad310664a85..84aa7802c3e 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_ansi/v2_1/config.h @@ -54,23 +54,57 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# define RGB_MATRIX_KEYPRESSES +// # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 # define DRIVER_COUNT 1 # define DRIVER_LED_TOTAL 61 diff --git a/keyboards/dztech/dz60rgb_ansi/v2_1/rules.mk b/keyboards/dztech/dz60rgb_ansi/v2_1/rules.mk index aa2092d4df8..c52676f87f1 100644 --- a/keyboards/dztech/dz60rgb_ansi/v2_1/rules.mk +++ b/keyboards/dztech/dz60rgb_ansi/v2_1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c index 455624471df..83feb584562 100644 --- a/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c +++ b/keyboards/dztech/dz60rgb_wkl/dz60rgb_wkl.c @@ -1,7 +1,7 @@ #include "dz60rgb_wkl.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, H_15, G_15, I_15 }, { 0, K_14, J_14, L_14 }, { 0, K_13, J_13, L_13 }, diff --git a/keyboards/dztech/dz60rgb_wkl/v1/config.h b/keyboards/dztech/dz60rgb_wkl/v1/config.h index 12317c2d359..b8c70ff4fb4 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v1/config.h @@ -41,13 +41,57 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk index 772964b55a0..d5f879081a7 100644 --- a/keyboards/dztech/dz60rgb_wkl/v1/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb_wkl/v2/config.h b/keyboards/dztech/dz60rgb_wkl/v2/config.h index 945b591ce6b..5985fccea71 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2/config.h @@ -40,24 +40,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk index ac27bbf1404..89aea76078d 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h index 76b0b6ea529..bfa9d8d9555 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2_1/config.h +++ b/keyboards/dztech/dz60rgb_wkl/v2_1/config.h @@ -56,24 +56,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/dztech/dz60rgb_wkl/v2_1/rules.mk b/keyboards/dztech/dz60rgb_wkl/v2_1/rules.mk index 90fb2d5f414..1f81ab573ac 100644 --- a/keyboards/dztech/dz60rgb_wkl/v2_1/rules.mk +++ b/keyboards/dztech/dz60rgb_wkl/v2_1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz65rgb/keymaps/drootz/config.h b/keyboards/dztech/dz65rgb/keymaps/drootz/config.h index 5810507975a..109aa3d07ef 100644 --- a/keyboards/dztech/dz65rgb/keymaps/drootz/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/drootz/config.h @@ -6,13 +6,13 @@ #ifdef RGB_MATRIX_ENABLE /* Reset default from dz65rgb/v2 config.h */ -# undef DISABLE_RGB_MATRIX_SPLASH -# undef DISABLE_RGB_MATRIX_SOLID_SPLASH +# undef DISABLE_RGB_MATRIX_SPLASH +# undef DISABLE_RGB_MATRIX_SOLID_SPLASH # undef RGB_MATRIX_LED_FLUSH_LIMIT # undef RGB_MATRIX_STARTUP_MODE # undef RGB_MATRIX_MAXIMUM_BRIGHTNESS # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 -# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // default: 26 +# define RGB_MATRIX_LED_FLUSH_LIMIT 16 // default: 26 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_MATRIX_STARTUP_HUE 10 @@ -20,33 +20,33 @@ # define RGB_MATRIX_STARTUP_VAL 200 # define RGB_MATRIX_STARTUP_SPD 75 /* Active RBG Modes */ -/* # define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! */ -/* # define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out */ -/* # define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out */ +/* # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! */ +/* # undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out */ +/* # undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out */ /* Disabling to optimize firmware size */ -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -# define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue #endif /* RBG MATRIX */ /* Firmware size Optimizations */ #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION -#define NO_ACTION_ONESHOT +#define NO_ACTION_ONESHOT diff --git a/keyboards/dztech/dz65rgb/keymaps/jumper149/config.h b/keyboards/dztech/dz65rgb/keymaps/jumper149/config.h index d9d295dfa88..504fc7f4f30 100644 --- a/keyboards/dztech/dz65rgb/keymaps/jumper149/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/jumper149/config.h @@ -19,42 +19,42 @@ #ifdef RGB_MATRIX_ENABLE -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Fix RGB_MATRIX_STARTUP, because RGB_MATRIX_CYCLE_ALL is disabled. // The actual handling of RGB_EFFECTs is done in keymap.c diff --git a/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md b/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md index d872587317d..9de86be2d12 100644 --- a/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md +++ b/keyboards/dztech/dz65rgb/keymaps/jumper149/readme.md @@ -3,13 +3,13 @@ Run commands in the root directory of this repository. ``` -./bin/qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset +qmk compile && sudo dfu-programmer atmega32u4 erase && sudo dfu-programmer atmega32u4 flash ./dztech_dz65rgb_v2_jumper149.hex && sudo dfu-programmer atmega32u4 reset ``` ## build ``` -./bin/qmk compile +qmk compile ``` ## flash diff --git a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h index a56af01656c..586e5765aa7 100644 --- a/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/matthewrobo/config.h @@ -9,43 +9,43 @@ #undef RGB_MATRIX_STARTUP_MODE #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_SOLID_COLOR -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define QMK_KEYS_PER_SCAN 4 diff --git a/keyboards/dztech/dz65rgb/keymaps/via/config.h b/keyboards/dztech/dz65rgb/keymaps/via/config.h index 1beb7130f75..8ef0df8ee87 100644 --- a/keyboards/dztech/dz65rgb/keymaps/via/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/via/config.h @@ -16,6 +16,6 @@ #pragma once -#define DISABLE_RGB_MATRIX_PIXEL_FLOW -#define DISABLE_RGB_MATRIX_PIXEL_FRACTAL -#define DISABLE_RGB_MATRIX_PIXEL_RAIN +#undef ENABLE_RGB_MATRIX_PIXEL_FLOW +#undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +#undef ENABLE_RGB_MATRIX_PIXEL_RAIN diff --git a/keyboards/dztech/dz65rgb/v1/config.h b/keyboards/dztech/dz65rgb/v1/config.h index 1ecd9002cba..5fe0ba3eba4 100644 --- a/keyboards/dztech/dz65rgb/v1/config.h +++ b/keyboards/dztech/dz65rgb/v1/config.h @@ -53,22 +53,54 @@ # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/dztech/dz65rgb/v1/rules.mk b/keyboards/dztech/dz65rgb/v1/rules.mk index 9f2c7b41cb9..32233c3e943 100644 --- a/keyboards/dztech/dz65rgb/v1/rules.mk +++ b/keyboards/dztech/dz65rgb/v1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz65rgb/v1/v1.c b/keyboards/dztech/dz65rgb/v1/v1.c index aabe41c3132..8caced800b4 100644 --- a/keyboards/dztech/dz65rgb/v1/v1.c +++ b/keyboards/dztech/dz65rgb/v1/v1.c @@ -16,7 +16,7 @@ #include "v1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C8_8, C7_8, C6_8 }, { 0, C9_8, C7_7, C6_7 }, { 0, C9_7, C8_7, C6_6 }, diff --git a/keyboards/dztech/dz65rgb/v2/config.h b/keyboards/dztech/dz65rgb/v2/config.h index 1e1e21f5e98..b8677e44364 100644 --- a/keyboards/dztech/dz65rgb/v2/config.h +++ b/keyboards/dztech/dz65rgb/v2/config.h @@ -53,22 +53,54 @@ # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/dztech/dz65rgb/v2/rules.mk b/keyboards/dztech/dz65rgb/v2/rules.mk index c8c752f5b2b..5b7a9ae3a24 100644 --- a/keyboards/dztech/dz65rgb/v2/rules.mk +++ b/keyboards/dztech/dz65rgb/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz65rgb/v2/v2.c b/keyboards/dztech/dz65rgb/v2/v2.c index dce167c73f5..db8e968cc4d 100644 --- a/keyboards/dztech/dz65rgb/v2/v2.c +++ b/keyboards/dztech/dz65rgb/v2/v2.c @@ -16,7 +16,7 @@ #include "v2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C8_8, C7_8, C6_8 }, { 0, C9_8, C7_7, C6_7 }, { 0, C9_7, C8_7, C6_6 }, diff --git a/keyboards/dztech/dz65rgb/v3/config.h b/keyboards/dztech/dz65rgb/v3/config.h index dbf2f5b3ce8..ba7863f42a8 100755 --- a/keyboards/dztech/dz65rgb/v3/config.h +++ b/keyboards/dztech/dz65rgb/v3/config.h @@ -47,11 +47,58 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_LED_PROCESS_LIMIT 4 # define RGB_MATRIX_LED_FLUSH_LIMIT 26 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 68 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_LED_TOTAL 68 # define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/dztech/dz65rgb/v3/rules.mk b/keyboards/dztech/dz65rgb/v3/rules.mk index 4a5a4f32dc6..5623823ae41 100755 --- a/keyboards/dztech/dz65rgb/v3/rules.mk +++ b/keyboards/dztech/dz65rgb/v3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/dztech/dz65rgb/v3/v3.c b/keyboards/dztech/dz65rgb/v3/v3.c index c3719bfa518..18f87dc00b6 100755 --- a/keyboards/dztech/dz65rgb/v3/v3.c +++ b/keyboards/dztech/dz65rgb/v3/v3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, {0, CS21_SW3, CS20_SW3, CS19_SW3}, diff --git a/keyboards/dztech/dz96/rules.mk b/keyboards/dztech/dz96/rules.mk index 0641b5d22e4..4f1faaec800 100644 --- a/keyboards/dztech/dz96/rules.mk +++ b/keyboards/dztech/dz96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/e88/rules.mk b/keyboards/e88/rules.mk index c0d8b52500c..2c660c9867c 100644 --- a/keyboards/e88/rules.mk +++ b/keyboards/e88/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/earth_rover/rules.mk b/keyboards/earth_rover/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/earth_rover/rules.mk +++ b/keyboards/earth_rover/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ebastler/isometria_75/rev1/rules.mk b/keyboards/ebastler/isometria_75/rev1/rules.mk index 4a3ba03d98b..85d85a70abc 100644 --- a/keyboards/ebastler/isometria_75/rev1/rules.mk +++ b/keyboards/ebastler/isometria_75/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index db1c61ab4f9..e5258e3a0bb 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -68,5 +67,3 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev2 #include "rev2/config.h" #endif - -#endif diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 211e41fe8ff..885bf982d7f 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h @@ -1,13 +1,9 @@ -#ifndef ECO_H -#define ECO_H +#pragma once -#ifdef KEYBOARD_eco_rev1 - #include "rev1.h" -#endif -#ifdef KEYBOARD_eco_rev2 - #include "rev2.h" +#if defined(KEYBOARD_eco_rev1) +# include "rev1.h" +#elif defined(KEYBOARD_eco_rev2) +# include "rev2.h" #endif #include "quantum.h" - -#endif diff --git a/keyboards/eco/rev1/config.h b/keyboards/eco/rev1/config.h index 1e97a703d16..65cb050d6ca 100644 --- a/keyboards/eco/rev1/config.h +++ b/keyboards/eco/rev1/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "../config.h" @@ -26,5 +25,3 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { B1, B6, B2, B3 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 } #define UNUSED_PINS - -#endif diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h index 132760fbe85..a6ceafb815f 100644 --- a/keyboards/eco/rev1/rev1.h +++ b/keyboards/eco/rev1/rev1.h @@ -1,21 +1,17 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "../eco.h" #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } - -#endif + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D } \ +} diff --git a/keyboards/eco/rev2/config.h b/keyboards/eco/rev2/config.h index 83f2defc9e4..bbc0492e065 100644 --- a/keyboards/eco/rev2/config.h +++ b/keyboards/eco/rev2/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once #include "../config.h" @@ -26,5 +25,3 @@ along with this program. If not, see . #define MATRIX_ROW_PINS { D7, B5, B4, E6 } #define MATRIX_COL_PINS { D1, D0, D4, C6, B6, B2, B3, B1, F7, F6, F5, F4, D2, D3 } #define UNUSED_PINS - -#endif diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h index 881bcc77b90..a6ceafb815f 100644 --- a/keyboards/eco/rev2/rev2.h +++ b/keyboards/eco/rev2/rev2.h @@ -1,21 +1,17 @@ -#ifndef REV2_H -#define REV2_H +#pragma once #include "../eco.h" #include "quantum.h" #define LAYOUT( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } - -#endif + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D } \ +} diff --git a/keyboards/edc40/rules.mk b/keyboards/edc40/rules.mk index 5968ac7e0ac..4bda63662a2 100644 --- a/keyboards/edc40/rules.mk +++ b/keyboards/edc40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/edda/rules.mk b/keyboards/edda/rules.mk index 647687f0d3a..d5cb34b852b 100644 --- a/keyboards/edda/rules.mk +++ b/keyboards/edda/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/edi/hardlight/mk1/rules.mk b/keyboards/edi/hardlight/mk1/rules.mk index 42dc95e6d01..c3af341ad92 100644 --- a/keyboards/edi/hardlight/mk1/rules.mk +++ b/keyboards/edi/hardlight/mk1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/eek/rules.mk b/keyboards/eek/rules.mk index f1bac8abeb1..c2b406abebf 100644 --- a/keyboards/eek/rules.mk +++ b/keyboards/eek/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/efreet/rules.mk b/keyboards/efreet/rules.mk index 8cd5547bc97..cf6c4856612 100644 --- a/keyboards/efreet/rules.mk +++ b/keyboards/efreet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eggman/rules.mk b/keyboards/eggman/rules.mk index c781d058e71..b309c4db777 100644 --- a/keyboards/eggman/rules.mk +++ b/keyboards/eggman/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ein_60/ein_60.c b/keyboards/ein_60/ein_60.c index e9431edefb7..d15ad0cd526 100644 --- a/keyboards/ein_60/ein_60.c +++ b/keyboards/ein_60/ein_60.c @@ -56,7 +56,8 @@ const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT( #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { @@ -95,7 +96,9 @@ __attribute__((weak)) void oled_task_user(void) { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 4,253,197,197,197,197,197,197,197,197,197,197,199,192,192, 0,255,255, 0,255, 0,255,255, 0,254, 13, 27, 55,111,222,188,120,255, 0,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,255,255, 0,255,197,197,197,197,197,197,197,197,197,197,253,253,255,131,254, 0, 0,255,255, 0,255,184,220,238,247,219,205,198,195,193,192,255,255,255,128,255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 3, 3, 2, 3, 0, 3, 3, 2, 3, 0, 0, 0, 0, 0, 1, 3, 2, 2, 3, 0, 8, 28, 20, 20, 20, 20, 20, 28, 8, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 1, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; + oled_write_raw_P(ein60_logo, sizeof(ein60_logo)); + return false; } #endif diff --git a/keyboards/ein_60/keymaps/default/keymap.c b/keyboards/ein_60/keymaps/default/keymap.c index 3984dabcbf4..24a705106c2 100644 --- a/keyboards/ein_60/keymaps/default/keymap.c +++ b/keyboards/ein_60/keymaps/default/keymap.c @@ -167,11 +167,12 @@ static void render_status(void) { oled_set_cursor(1,2); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + return false; } #endif diff --git a/keyboards/ein_60/keymaps/klackygears/keymap.c b/keyboards/ein_60/keymaps/klackygears/keymap.c index ea1d77dea73..be3c30b97d7 100644 --- a/keyboards/ein_60/keymaps/klackygears/keymap.c +++ b/keyboards/ein_60/keymaps/klackygears/keymap.c @@ -104,7 +104,7 @@ static void render_ein60_logo(void) { static void render_status(void) { -//void oled_task_user(void) { +//bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -145,12 +145,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + return false; } #endif @@ -172,5 +173,3 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } return true; } - - diff --git a/keyboards/ein_60/keymaps/ledtest/keymap.c b/keyboards/ein_60/keymaps/ledtest/keymap.c index 6f903124afd..5fb5217c98b 100644 --- a/keyboards/ein_60/keymaps/ledtest/keymap.c +++ b/keyboards/ein_60/keymaps/ledtest/keymap.c @@ -166,11 +166,13 @@ static void render_status(void) { oled_set_cursor(1,2); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); oled_write_ln_P(PSTR(""), false); render_ein60_logo(); + + return false; } #endif diff --git a/keyboards/emajesty/eiri/rules.mk b/keyboards/emajesty/eiri/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/emajesty/eiri/rules.mk +++ b/keyboards/emajesty/eiri/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/emi20/rules.mk b/keyboards/emi20/rules.mk index 6a471b03e28..2eb93696592 100644 --- a/keyboards/emi20/rules.mk +++ b/keyboards/emi20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eniigmakeyboards/ek60/rules.mk b/keyboards/eniigmakeyboards/ek60/rules.mk index ada495bf9d7..c14a1c5088b 100644 --- a/keyboards/eniigmakeyboards/ek60/rules.mk +++ b/keyboards/eniigmakeyboards/ek60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eniigmakeyboards/ek65/rules.mk b/keyboards/eniigmakeyboards/ek65/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/eniigmakeyboards/ek65/rules.mk +++ b/keyboards/eniigmakeyboards/ek65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/eniigmakeyboards/ek87/rules.mk b/keyboards/eniigmakeyboards/ek87/rules.mk index d2df5bff40d..ab4a4e3e615 100644 --- a/keyboards/eniigmakeyboards/ek87/rules.mk +++ b/keyboards/eniigmakeyboards/ek87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ep/40/40.h b/keyboards/ep/40/40.h index 30f3d15b4fb..1ac39a278d7 100644 --- a/keyboards/ep/40/40.h +++ b/keyboards/ep/40/40.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef EP40_H -#define EP40_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,19 +28,14 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define xxx KC_NO - -#define LAYOUT(\ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b,\ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b,\ - k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,\ - k30, k31, k32, k34, k36, k38, k39, k3a, k3b \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b},\ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, xxx, k1b},\ - {k20, xxx, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b},\ - {k30, k31, k32, xxx, k34, xxx, k36, xxx, k38, k39, k3a, k3b} \ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k36, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, k36, XXX, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/ep/96/96.h b/keyboards/ep/96/96.h index 1887eb472c0..1117256cdc2 100644 --- a/keyboards/ep/96/96.h +++ b/keyboards/ep/96/96.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef EP96_H -#define EP96_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,22 +28,19 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define xxxx KC_NO #define LAYOUT( \ - K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018, \ - K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k114, k115, k116, k117, k118, \ - K200, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k215, k216, k217, \ - K300, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318, \ - K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, k413, k414, k415, k416, k417, \ - K500, K501, K502, k506, k511, k512, k513, k514, k515, k516, k517, k518) \ -{ \ - {K000, K001, K002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, k016, k017, k018}, \ - {K100, K101, K102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, xxxx, k114, k115, k116, k117, k118}, \ - {K200, xxxx, K202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, xxxx, k215, k216, k217, xxxx}, \ - {K300, xxxx, K302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k314, k315, k316, k317, k318}, \ - {K400, K401, K402, k403, k404, k405, k406, k407, k408, k409, k410, k411, xxxx, k413, k414, k415, k416, k417, xxxx}, \ - {K500, K501, K502, xxxx, xxxx, xxxx, k506, xxxx, xxxx, xxxx, xxxx, k511, k512, k513, k514, k515, k516, k517, k518} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, k2H, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, k4G, k4H, \ + k50, k51, k52, k56, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F, k1G, k1H, k1I }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F, k2G, k2H, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F, k4G, k4H, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, k56, XXX, XXX, XXX, XXX, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I } \ } - -#endif diff --git a/keyboards/ep/comsn/hs68/rules.mk b/keyboards/ep/comsn/hs68/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/ep/comsn/hs68/rules.mk +++ b/keyboards/ep/comsn/hs68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ep/comsn/mollydooker/rules.mk b/keyboards/ep/comsn/mollydooker/rules.mk index 58a1405de2e..c9228dd8dfa 100644 --- a/keyboards/ep/comsn/mollydooker/rules.mk +++ b/keyboards/ep/comsn/mollydooker/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ep/comsn/tf_longeboye/rules.mk b/keyboards/ep/comsn/tf_longeboye/rules.mk index df18dc487eb..5c194d1aeb6 100644 --- a/keyboards/ep/comsn/tf_longeboye/rules.mk +++ b/keyboards/ep/comsn/tf_longeboye/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/epoch80/rules.mk b/keyboards/epoch80/rules.mk index f985f2cb0ef..94c5d640aea 100644 --- a/keyboards/epoch80/rules.mk +++ b/keyboards/epoch80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ergoarrows/rules.mk b/keyboards/ergoarrows/rules.mk index b32cbc2f64c..9bdc73b7615 100644 --- a/keyboards/ergoarrows/rules.mk +++ b/keyboards/ergoarrows/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ergodash/config.h b/keyboards/ergodash/config.h index c910d8f24f0..cfb6bf4ffcc 100644 --- a/keyboards/ergodash/config.h +++ b/keyboards/ergodash/config.h @@ -16,9 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif diff --git a/keyboards/ergodash/mini/keymaps/yoshimaru46/config.h b/keyboards/ergodash/mini/keymaps/yoshimaru46/config.h new file mode 100644 index 00000000000..df04873a97e --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/yoshimaru46/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/ergodash/mini/keymaps/yoshimaru46/keymap.c b/keyboards/ergodash/mini/keymaps/yoshimaru46/keymap.c new file mode 100644 index 00000000000..98c56c8d16b --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/yoshimaru46/keymap.c @@ -0,0 +1,111 @@ +/* Copyright 2021 Yoshihiro Saito + * + * 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 + */ + +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Shift + ( = < +const key_override_t left_paren_angle_bracket_override = ko_make_basic(MOD_MASK_SHIFT, KC_LEFT_PAREN, KC_LEFT_ANGLE_BRACKET); + +// Shift + ) = > +const key_override_t right_paren_angle_bracket_override = ko_make_basic(MOD_MASK_SHIFT, KC_RIGHT_PAREN, KC_RIGHT_ANGLE_BRACKET); + +const key_override_t **key_overrides = (const key_override_t *[]){ + &left_paren_angle_bracket_override, + &right_paren_angle_bracket_override, + NULL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty */ + [_QWERTY] = LAYOUT( + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_DEL, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, LOWER, CTL_T(KC_SPC), KC_SFTENT, RAISE, KC_RGUI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Lower */ + [_LOWER] = LAYOUT( + XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F11, KC_GRV, KC_CIRC, KC_AMPR, KC_ASTR, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F12, KC_TILD, KC_BSLS, KC_MINS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Raise */ + [_RAISE] = LAYOUT( + XXXXXXX, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, XXXXXXX, XXXXXXX, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), + + /* Adjust */ + [_ADJUST] = LAYOUT( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ ,_______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/ergodash/mini/keymaps/yoshimaru46/readme.md b/keyboards/ergodash/mini/keymaps/yoshimaru46/readme.md new file mode 100644 index 00000000000..67a6ed9b90f --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/yoshimaru46/readme.md @@ -0,0 +1,4 @@ +# yoshimaru46's keymap for Ergodash mini + +This is the yoshimaru46's keymap configuration for Ergodash mini. +There are three layers, QWERTY(default), LOWER, and RAISE. diff --git a/keyboards/ergodash/mini/keymaps/yoshimaru46/rules.mk b/keyboards/ergodash/mini/keymaps/yoshimaru46/rules.mk new file mode 100644 index 00000000000..f85c6a4151a --- /dev/null +++ b/keyboards/ergodash/mini/keymaps/yoshimaru46/rules.mk @@ -0,0 +1,4 @@ +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +AUDIO_ENABLE = no +KEY_OVERRIDE_ENABLE = yes diff --git a/keyboards/ergodash/mini/mini.h b/keyboards/ergodash/mini/mini.h index d565c6168ff..4aca15775b0 100644 --- a/keyboards/ergodash/mini/mini.h +++ b/keyboards/ergodash/mini/mini.h @@ -1,5 +1,4 @@ -#ifndef MINI_H -#define MINI_H +#pragma once #include "ergodash.h" @@ -16,41 +15,37 @@ #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - } +# define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 } \ +} #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ - L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ - L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - } -#endif - +# define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 } \ +} #endif diff --git a/keyboards/ergodash/rev1/rev1.h b/keyboards/ergodash/rev1/rev1.h index eaabf7cc5f8..7f094534cc3 100644 --- a/keyboards/ergodash/rev1/rev1.h +++ b/keyboards/ergodash/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "ergodash.h" @@ -13,135 +12,128 @@ #endif #endif +#define XXX KC_NO + #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define LAYOUT_4key( \ +# define LAYOUT_4key( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ +} // Just defined for configurator support, the matrix is identical to LAYOUT_4key -#define LAYOUT_4key_2u_inner( \ +# define LAYOUT_4key_2u_inner( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ +} -#define LAYOUT_3key_2us( \ +# define LAYOUT_3key_2us( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, KC_NO }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, KC_NO }, \ - { R46, R45, R44, R43, R42, R41, R40 } \ - } - + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, XXX }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, XXX }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ +} -#define LAYOUT_3key_1us( \ +# define LAYOUT_3key_1us( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, KC_NO }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, R30 }, \ - { R46, R45, R44, R43, R42, R41, KC_NO } \ - } + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, XXX }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, XXX } \ +} -#define LAYOUT_2key( \ +# define LAYOUT_2key( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, KC_NO }, \ - { L40, L41, L42, L43, L44, L45, KC_NO }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R36, R35, R34, R33, R32, R31, KC_NO }, \ - { R46, R45, R44, R43, R42, R41, KC_NO } \ - } + L40, L41, L42, L43, L44, L45, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, XXX }, \ + { L40, L41, L42, L43, L44, L45, XXX }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, XXX }, \ + { R46, R45, R44, R43, R42, R41, XXX } \ +} #define LAYOUT LAYOUT_4key #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) -#define LAYOUT( \ +# define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ - L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, L36 }, \ - { L40, L41, L42, L43, L44, L45, L46 }, \ - { R00, R01, R02, R03, R04, R05, R06 }, \ - { R10, R11, R12, R13, R14, R15, R16 }, \ - { R20, R21, R22, R23, R24, R25, R26 }, \ - { R30, R31, R32, R33, R34, R35, R36 }, \ - { R40, R41, R42, R43, R44, R45, R46 } \ - } -#endif - + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { R40, R41, R42, R43, R44, R45, R46 } \ +} #endif diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index 9dcfc341e1d..c3b794f1087 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -130,6 +130,54 @@ along with this program. If not, see . #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // #define RGBLIGHT_COLOR_LAYER_0 0x00, 0x00, 0xFF /* #define RGBLIGHT_COLOR_LAYER_1 0x00, 0x00, 0xFF */ diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 7af76cb6244..49f690fa70a 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -243,7 +243,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGB_MATRIX_ENABLE // clang-format off -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* driver * | R location * | | G location diff --git a/keyboards/ergodox_infinity/board_is31fl3731c.h b/keyboards/ergodox_infinity/board_is31fl3731c.h deleted file mode 100644 index b2ed2b00310..00000000000 --- a/keyboards/ergodox_infinity/board_is31fl3731c.h +++ /dev/null @@ -1,110 +0,0 @@ -/* -Copyright 2016 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 . -*/ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -static const I2CConfig i2ccfg = { - 400000 // clock speed (Hz); 400kHz max for IS31 -}; - -static const uint8_t led_mask[] = { - 0xFF, 0x00, /* C1-1 -> C1-16 */ - 0xFF, 0x00, /* C2-1 -> C2-16 */ - 0xFF, 0x00, /* C3-1 -> C3-16 */ - 0xFF, 0x00, /* C4-1 -> C4-16 */ - 0x3F, 0x00, /* C5-1 -> C5-16 */ - 0x00, 0x00, /* C6-1 -> C6-16 */ - 0x00, 0x00, /* C7-1 -> C7-16 */ - 0x00, 0x00, /* C8-1 -> C8-16 */ - 0x00, 0x00, /* C9-1 -> C9-16 */ -}; - -// The address of the LED -#define LA(c, r) (c + r * 16 ) -// Need to be an address that is not mapped, but inside the range of the controller matrix -#define NA LA(8, 8) - -// The numbers in the comments are the led numbers DXX on the PCB -// The mapping is taken from the schematic of left hand side -static const uint8_t led_mapping[GDISP_SCREEN_HEIGHT][GDISP_SCREEN_WIDTH] = { -// 45 44 43 42 41 40 39 - { LA(1, 1), LA(1, 0), LA(0, 4), LA(0, 3), LA(0, 2), LA(0, 1), LA(0, 0)}, -// 52 51 50 49 48 47 46 - { LA(2, 3), LA(2, 2), LA(2, 1), LA(2, 0), LA(1, 4), LA(1, 3), LA(1, 2) }, -// 58 57 56 55 54 53 N/A - { LA(3, 4), LA(3, 3), LA(3, 2), LA(3, 1), LA(3, 0), LA(2, 4), NA }, -// 67 66 65 64 63 62 61 - { LA(5, 3), LA(5, 2), LA(5, 1), LA(5, 0), LA(4, 4), LA(4, 3), LA(4, 2) }, -// 76 75 74 73 72 60 59 - { LA(7, 3), LA(7, 2), LA(7, 1), LA(7, 0), LA(6, 3), LA(4, 1), LA(4, 0) }, -// N/A N/A N/A N/A N/A N/A 68 - { NA, NA, NA, NA, NA, NA, LA(5, 4) }, -// N/A N/A N/A N/A 71 70 69 - { NA, NA, NA, NA, LA(6, 2), LA(6, 1), LA(6, 0) }, -}; - - -#define IS31_ADDR_DEFAULT 0x74 // AD connected to GND -#define IS31_TIMEOUT 5000 - -static GFXINLINE void init_board(GDisplay *g) { - (void) g; - /* I2C pins */ - palSetPadMode(GPIOB, 0, PAL_MODE_ALTERNATIVE_2); // PTB0/I2C0/SCL - palSetPadMode(GPIOB, 1, PAL_MODE_ALTERNATIVE_2); // PTB1/I2C0/SDA - palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); - palClearPad(GPIOB, 16); - /* start I2C */ - i2cStart(&I2CD1, &i2ccfg); - // try high drive (from kiibohd) - I2CD1.i2c->C2 |= I2Cx_C2_HDRS; - // try glitch fixing (from kiibohd) - I2CD1.i2c->FLT = 4; -} - -static GFXINLINE void post_init_board(GDisplay *g) { - (void) g; -} - -static GFXINLINE const uint8_t* get_led_mask(GDisplay* g) { - (void) g; - return led_mask; -} - -static GFXINLINE uint8_t get_led_address(GDisplay* g, uint16_t x, uint16_t y) -{ - (void) g; - return led_mapping[y][x]; -} - -static GFXINLINE void set_hardware_shutdown(GDisplay* g, bool shutdown) { - (void) g; - if(!shutdown) { - palSetPad(GPIOB, 16); - } - else { - palClearPad(GPIOB, 16); - } -} - -static GFXINLINE void write_data(GDisplay *g, uint8_t* data, uint16_t length) { - (void) g; - i2cMasterTransmitTimeout(&I2CD1, IS31_ADDR_DEFAULT, data, length, 0, 0, TIME_US2I(IS31_TIMEOUT)); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox_infinity/board_st7565.h b/keyboards/ergodox_infinity/board_st7565.h deleted file mode 100644 index 875ed9e65c6..00000000000 --- a/keyboards/ergodox_infinity/board_st7565.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This file is subject to the terms of the GFX License. If a copy of - * the license was not distributed with this file, you can obtain one at: - * - * http://ugfx.org/license.html - */ - -#ifndef _GDISP_LLD_BOARD_H -#define _GDISP_LLD_BOARD_H - -#include "quantum.h" - -#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7 -#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC -#define ST7565_PAGE_ORDER 0, 1, 2, 3 -/* - * Custom page order for several LCD boards, e.g. HEM12864-99 - * #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3 - */ - -#define ST7565_A0_PIN C7 -#define ST7565_RST_PIN C8 -#define ST7565_MOSI_PIN C6 -#define ST7565_SCLK_PIN C5 -#define ST7565_SS_PIN C4 - -// DSPI Clock and Transfer Attributes -// Frame Size: 8 bits -// MSB First -// CLK Low by default -static const SPIConfig spi1config = { - // Operation complete callback or @p NULL. - .end_cb = NULL, - // The chip select line port - when not using pcs. - .ssport = PAL_PORT(ST7565_SS_PIN), - // brief The chip select line pad number - when not using pcs. - .sspad = PAL_PAD(ST7565_SS_PIN), - // SPI initialization data. - .tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes - | SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns - | SPIx_CTARn_DT(0) // Delay After Transfer Scaler (no minimum)= 27.78ns - | SPIx_CTARn_CSSCK(0) // PCS to SCK Delay Scaler (min 20 ns) = 27.78ns - | SPIx_CTARn_PBR(0) // Baud Rate Prescaler = 2 - | SPIx_CTARn_BR(0) // Baud rate (min 50ns) = 55.56ns -}; - -static GFXINLINE void acquire_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to acquire - // spiAcquireBus(&SPID1); - spiSelect(&SPID1); -} - -static GFXINLINE void release_bus(GDisplay *g) { - (void)g; - // Only the LCD is using the SPI bus, so no need to release - // spiReleaseBus(&SPID1); - spiUnselect(&SPID1); -} - -static GFXINLINE void init_board(GDisplay *g) { - (void)g; - setPinOutput(ST7565_A0_PIN); - writePinHigh(ST7565_A0_PIN); - setPinOutput(ST7565_RST_PIN); - writePinHigh(ST7565_RST_PIN); - setPinOutput(ST7565_SS_PIN); - - palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2); - palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2); - - spiInit(); - spiStart(&SPID1, &spi1config); - release_bus(g); -} - -static GFXINLINE void post_init_board(GDisplay *g) { (void)g; } - -static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) { - (void)g; - writePin(ST7565_RST_PIN, !state); -} - -static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) { - (void)g; - writePinLow(ST7565_A0_PIN); - spiSend(&SPID1, 1, &cmd); -} - -static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) { - (void)g; - writePinHigh(ST7565_A0_PIN); - spiSend(&SPID1, length, data); -} - -#endif /* _GDISP_LLD_BOARD_H */ diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index 4bee8c3d931..e6f1b81f547 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -15,9 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef INFINITY_ERGODOX_CONFIG_H -#define INFINITY_ERGODOX_CONFIG_H - +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0x1c11 @@ -81,13 +79,38 @@ along with this program. If not, see . #define LED_MATRIX_SPLIT { 38, 38 } #define LED_DISABLE_WHEN_USB_SUSPENDED +// LED Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects +#define ENABLE_LED_MATRIX_ALPHAS_MODS +#define ENABLE_LED_MATRIX_BREATHING +#define ENABLE_LED_MATRIX_BAND +#define ENABLE_LED_MATRIX_BAND_PINWHEEL +#define ENABLE_LED_MATRIX_BAND_SPIRAL +#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN +#define ENABLE_LED_MATRIX_CYCLE_OUT_IN +#define ENABLE_LED_MATRIX_DUAL_BEACON +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_LED_MATRIX_SPLASH +# define ENABLE_LED_MATRIX_MULTISPLASH +#endif +#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_WAVE_UP_DOWN + /* i2c (for LED matrix) */ #define I2C1_CLOCK_SPEED 400000 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 -#define I2C1_BANK GPIOB -#define I2C1_SCL 0 -#define I2C1_SDA 1 +#define I2C1_SCL_PIN B0 +#define I2C1_SDA_PIN B1 #ifdef ST7565_ENABLE /* LCD driver */ @@ -115,8 +138,6 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 -#define VISUALIZER_USER_DATA_SIZE 16 - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -134,5 +155,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/ergodox_infinity/ergodox_infinity.c b/keyboards/ergodox_infinity/ergodox_infinity.c index 8f5b068a72a..e6ac2c4559c 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.c +++ b/keyboards/ergodox_infinity/ergodox_infinity.c @@ -3,10 +3,6 @@ #include #include #include "eeconfig.h" -#include "serial_link/system/serial_link.h" -#ifdef VISUALIZER_ENABLE -# include "lcd_backlight.h" -#endif #define RED_PIN 1 #define GREEN_PIN 2 @@ -87,11 +83,7 @@ static uint16_t cie_lightness(uint16_t v) { return y * 65535.0f; } -#ifdef VISUALIZER_ENABLE -void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) { -#else void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { -#endif CHANNEL_RED.CnV = cie_lightness(r); CHANNEL_GREEN.CnV = cie_lightness(g); CHANNEL_BLUE.CnV = cie_lightness(b); @@ -108,12 +100,10 @@ void keyboard_pre_init_kb() { setPinOutput(B16); writePinHigh(B16); #endif -#ifndef VISUALIZER_ENABLE // The backlight always has to be initialized, otherwise it will stay lit lcd_backlight_hal_init(); -# ifdef ST7565_ENABLE +#ifdef ST7565_ENABLE ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); -# endif #endif keyboard_pre_init_user(); } @@ -184,7 +174,7 @@ const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { #endif #ifdef LED_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { // The numbers in the comments are the led numbers DXX on the PCB /* Refer to IS31 manual for these locations * driver diff --git a/keyboards/ergodox_infinity/ergodox_infinity.h b/keyboards/ergodox_infinity/ergodox_infinity.h index 81ac1f338ab..b9636b69be3 100644 --- a/keyboards/ergodox_infinity/ergodox_infinity.h +++ b/keyboards/ergodox_infinity/ergodox_infinity.h @@ -1,5 +1,4 @@ -#ifndef KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ -#define KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ +#pragma once #include "quantum.h" @@ -80,85 +79,75 @@ inline void ergodox_led_all_set(uint8_t n) { ergodox_right_led_3_set(n); } -#ifndef VISUALIZER_ENABLE void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b); -#endif -/* - * LEFT HAND: LINES 88-95 - * RIGHT HAND: LINES 97-104 - */ +#define XXX KC_NO + #define LAYOUT_ergodox( \ - A80, A70, A60, A50, A40, A30, A20, \ - A81, A71, A61, A51, A41, A31, A21, \ - A82, A72, A62, A52, A42, A32, \ - A83, A73, A63, A53, A43, A33, A23, \ - A84, A74, A64, A54, A44, \ + A80, A70, A60, A50, A40, A30, A20, \ + A81, A71, A61, A51, A41, A31, A21, \ + A82, A72, A62, A52, A42, A32, \ + A83, A73, A63, A53, A43, A33, A23, \ + A84, A74, A64, A54, A44, \ A13, A03, \ A04, \ A34, A24, A14, \ - \ +\ B20, B30, B40, B50, B60, B70, B80, \ B21, B31, B41, B51, B61, B71, B81, \ B32, B42, B52, B62, B72, B82, \ B23, B33, B43, B53, B63, B73, B83, \ B44, B54, B64, B74, B84, \ - B03, B13, \ - B04, \ + B03, B13, \ + B04, \ B14, B24, B34 \ ) { \ - { KC_NO, KC_NO, KC_NO, A03, A04 }, \ - { KC_NO, KC_NO, KC_NO, A13, A14 }, \ - { A20, A21, KC_NO, A23, A24 }, \ - { A30, A31, A32, A33, A34 }, \ - { A40, A41, A42, A43, A44 }, \ - { A50, A51, A52, A53, A54 }, \ - { A60, A61, A62, A63, A64 }, \ - { A70, A71, A72, A73, A74 }, \ - { A80, A81, A82, A83, A84 }, \ - { KC_NO, KC_NO, KC_NO, B03, B04 }, \ - { KC_NO, KC_NO, KC_NO, B13, B14 }, \ - { B20, B21, KC_NO, B23, B24 }, \ - { B30, B31, B32, B33, B34 }, \ - { B40, B41, B42, B43, B44 }, \ - { B50, B51, B52, B53, B54 }, \ - { B60, B61, B62, B63, B64 }, \ - { B70, B71, B72, B73, B74 }, \ - { B80, B81, B82, B83, B84 } \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ } -/* -------------- LEFT HAND -------------- -------------- RIGHT HAND -------------- */ -#define LAYOUT_ergodox_pretty( \ - \ - A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ - A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ - A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ - A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ - A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ - A13, A03, B03, B13, \ - A04, B04, \ - A34, A24, A14, B14, B24, B34 ) \ - \ - /* matrix positions */ \ - { \ - { KC_NO, KC_NO, KC_NO, A03, A04 }, \ - { KC_NO, KC_NO, KC_NO, A13, A14 }, \ - { A20, A21, KC_NO, A23, A24 }, \ - { A30, A31, A32, A33, A34 }, \ - { A40, A41, A42, A43, A44 }, \ - { A50, A51, A52, A53, A54 }, \ - { A60, A61, A62, A63, A64 }, \ - { A70, A71, A72, A73, A74 }, \ - { A80, A81, A82, A83, A84 }, \ - { KC_NO, KC_NO, KC_NO, B03, B04 }, \ - { KC_NO, KC_NO, KC_NO, B13, B14 }, \ - { B20, B21, KC_NO, B23, B24 }, \ - { B30, B31, B32, B33, B34 }, \ - { B40, B41, B42, B43, B44 }, \ - { B50, B51, B52, B53, B54 }, \ - { B60, B61, B62, B63, B64 }, \ - { B70, B71, B72, B73, B74 }, \ - { B80, B81, B82, B83, B84 } \ +#define LAYOUT_ergodox_pretty( \ + A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ + A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ + A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ + A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ + A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ + A13, A03, B03, B13, \ + A04, B04, \ + A34, A24, A14, B14, B24, B34 \ +) { \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ } - -#endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */ diff --git a/keyboards/ergodox_infinity/gfxconf.h b/keyboards/ergodox_infinity/gfxconf.h deleted file mode 100644 index ca338399d31..00000000000 --- a/keyboards/ergodox_infinity/gfxconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file has a different license to the rest of the uGFX system. - * You can copy, modify and distribute this file as you see fit. - * You do not need to publish your source modifications to this file. - * The only thing you are not permitted to do is to relicense it - * under a different license. - */ - -/** - * Copy this file into your project directory and rename it as gfxconf.h - * Edit your copy to turn on the uGFX features you want to use. - * The values below are the defaults. - * - * Only remove the comments from lines where you want to change the - * default value. This allows definitions to be included from - * driver makefiles when required and provides the best future - * compatibility for your project. - * - * Please use spaces instead of tabs in this file. - */ - -#ifndef _GFXCONF_H -#define _GFXCONF_H - -#include "common_gfxconf.h" - -#endif /* _GFXCONF_H */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h index 161958233e2..9dcf8a7f43e 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/config.h @@ -6,6 +6,4 @@ #include "../../config.h" #include "dudeofawesome.h" -#include "./visualizer.h" - #endif diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c index c3ea48654da..675b56edec7 100644 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -471,8 +471,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_user() { - backlight_enable(); - backlight_level(BACKLIGHT_LEVELS); + led_matrix_enable_noeeprom(); + led_matrix_set_val_noeeprom(UINT8_MAX); } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h deleted file mode 100644 index 9213e99f428..00000000000 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/simple_visualizer.h +++ /dev/null @@ -1,123 +0,0 @@ -/* 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 . - */ - -#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ -#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(1), gfxMillisecondsToTicks(5)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c deleted file mode 100644 index 54fc2363c76..00000000000 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.c +++ /dev/null @@ -1,79 +0,0 @@ -/* -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 . -*/ - -#include "./simple_visualizer.h" -#include "util.h" -#include "layers.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - switch(biton32(default_layer_state)) { - case _QWERTY: - state->layer_text = "QWERTY"; - state->target_lcd_color = LCD_COLOR(0, 255, 128); - break; - case _WORKMAN: - state->layer_text = "Workman"; - state->target_lcd_color = LCD_COLOR(80, 255, 128); - break; - case _DVORAK: - state->layer_text = "Dvorak"; - state->target_lcd_color = LCD_COLOR(194, 255, 128); - break; - case _COLEMAK: - state->layer_text = "Colemak"; - state->target_lcd_color = LCD_COLOR(18, 255, 128); - break; - } - - switch(biton32(state->status.layer)) { - case _LOWER: - state->layer_text = "Lower"; - state->target_lcd_color = LCD_COLOR(141, 255, 255); - break; - case _RAISE: - state->layer_text = "Raise"; - state->target_lcd_color = LCD_COLOR(18, 255, 255); - break; - case _ADJUST: - state->layer_text = "Adjust"; - state->target_lcd_color = LCD_COLOR(194, 255, 255); - break; - case _NUM: - state->layer_text = "Numpad"; - state->target_lcd_color = LCD_COLOR(80, 255, 255); - break; - case _MOUSE: - state->layer_text = "Mouse"; - state->target_lcd_color = LCD_COLOR(300, 255, 255); - break; - case _GAME: - state->layer_text = "Game"; - state->target_lcd_color = LCD_COLOR(300, 255, 255); - break; - case _QWERTY: case _WORKMAN: case _DVORAK: case _COLEMAK: - break; - default: - state->layer_text = "NONE"; - state->target_lcd_color = LCD_COLOR(0, 255, 255); - break; - } -} diff --git a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h b/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h deleted file mode 100644 index 740a951ec88..00000000000 --- a/keyboards/ergodox_infinity/keymaps/dudeofawesome/visualizer.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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 . - */ - -#ifndef VISUALIZER_H_ -#define VISUALIZER_H_ - -#include "visualizer.h" -#include "led.h" - -void ergodox_led_lower_on (void); -void ergodox_led_raise_on (void); -void ergodox_led_adjust_on (void); - -void ergodox_led_lower_off (void); -void ergodox_led_raise_off (void); -void ergodox_led_adjust_off (void); - -void ergodox_led_lower_set (uint8_t n); -void ergodox_led_raise_set (uint8_t n); -void ergodox_led_adjust_set (uint8_t n); - -#endif /* VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c deleted file mode 100644 index 61a724c63f5..00000000000 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c +++ /dev/null @@ -1,384 +0,0 @@ -/* -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 . -*/ - -#include "visualizer.h" -#include "gfx.h" -#include "math.h" -#include "default_animations.h" -#include "led_backlight_keyframes.h" - -#define NUM_ROWS LED_HEIGHT -#define NUM_COLS LED_WIDTH - -#define ONESIDESCAN 10 -#define BOTHSIDESCAN 20 -#define FULL_ON LUMA2COLOR(255) -#define THREE_QUARTER LUMA2COLOR(200) -#define HALF_ON LUMA2COLOR(150) -#define ONE_QUARTER LUMA2COLOR(50) - -#define CROSSFADE_TIME 500 -#define GRADIENT_TIME 3000 -bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state); -keyframe_animation_t Fade_in_all_leds = { - .num_frames = 1, - .loop = false, - .frame_lengths = { - CROSSFADE_TIME, - }, - .frame_functions = { - led_backlight_keyframe_fade_in_all, - }, -}; -keyframe_animation_t decreasing_gradient = { - .num_frames = 8, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - - }, -}; - - - -static uint8_t off_on_off_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - if((1*M_PI) < x && x < (3*M_PI)) - { - float v = 0.5 * (cosf(x) + 1.0f); - return (uint8_t)(255.0f * v); - } - else - { - return 0; - } -} -static uint8_t off_on_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - float v; - if((1*M_PI) < x && x < (2*M_PI)) - { - v = 0.5 * (cosf(x) + 1.0f); - } - else if(x >= (2*M_PI)) - { - v = 1; - } - else - { - v = 0; - } - return (uint8_t)(255.0f * v); -} -static uint8_t on_off_gradient(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index-M_PI; - float v; - if((2*M_PI) < x && x < (3*M_PI)) - { - v = 0.5 * (cosf(x) + 1.0f); - - } - else if(x >= (3*M_PI)) - { - v = 0; - } - else - { - v = 1; - } - return (uint8_t)(255.0f * v); -} - -bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = off_on_off_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} - -bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = off_on_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} -bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i=0; i< NUM_COLS; i++) { - uint8_t color = on_off_gradient(t*2, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} - - -/* - +---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | phase | -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | -| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | -| 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | -| 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | -| 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | -| 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | -| 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | -| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | -| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | -| 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 9 | -| 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 10 | -| 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 11 | -| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 12 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 13 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 14 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 15 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 16 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 17 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 18 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 19 | -| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | -+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ -*/ - -#ifdef MASTER_IS_ON_RIGHT /*right side*/ -keyframe_animation_t sweep_on_sweep_off_left_and_right = { - .num_frames = 12, - .loop = true, - .frame_lengths = { - 0, - 1, - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_mirror_orientation, - led_backlight_keyframe_fade_out_all, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - led_backlight_keyframe_normal_orientation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - keyframe_no_operation, - led_backlight_keyframe_mirror_orientation, - - }, -}; -keyframe_animation_t both_sides_fade_across = { - .num_frames = 10, - .loop = true, - .frame_lengths = { - 0, - 1, - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_mirror_orientation, - led_backlight_keyframe_fade_out_all, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - }, -}; - -#else /*left side*/ -keyframe_animation_t sweep_on_sweep_off_left_and_right = { - .num_frames = 10, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // right on - gfxMillisecondsToTicks(GRADIENT_TIME), // left on - gfxMillisecondsToTicks(GRADIENT_TIME), // right off - gfxMillisecondsToTicks(GRADIENT_TIME), // left off - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - keyframe_no_operation, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_on, - keyframe_no_operation, - led_backlight_keyframe_half_period_sweep_to_off, - led_backlight_keyframe_normal_orientation, - - }, -}; -keyframe_animation_t both_sides_fade_across = { - .num_frames = 8, - .loop = true, - .frame_lengths = { - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - 0, // mirror leds - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - 0, // normal leds - }, - .frame_functions = { - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_mirror_orientation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - keyframe_no_operation, - led_backlight_keyframe_one_period_sweep, - led_backlight_keyframe_normal_orientation, - - }, -}; - - -#endif - -#define RED 0 -#define ORANGE 21 -#define YELLOW 42 -#define SPRING_GREEN 64 -#define GREEN 85 -#define TURQUOISE 107 -#define CYAN 127 -#define OCEAN 149 -#define BLUE 170 -#define VIOLET 192 -#define MAGENTA 212 -#define RASPBERRY 234 - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - uint8_t saturation = 255; - /* if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - saturation = 255; - } */ - - if (state->status.layer & 0x400) { - state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF); - state->layer_text = "STENOGRAPHY"; - } - else if (state->status.layer & 0x200) { - state->target_lcd_color = LCD_COLOR(GREEN, saturation, 0xFF); - state->layer_text = "FUNCTION"; - } - else if (state->status.layer & 0x100) { - state->target_lcd_color = LCD_COLOR(MAGENTA, saturation, 0xFF); - state->layer_text = "Shortcuts Layer"; - stop_keyframe_animation(&sweep_on_sweep_off_left_and_right); - start_keyframe_animation(&led_test_animation); - } - else if (state->status.layer & 0x80) { - state->target_lcd_color = LCD_COLOR(VIOLET, saturation, 0xFF); - state->layer_text = "Plover"; - } - else if (state->status.layer & 0x40) { - state->target_lcd_color = LCD_COLOR(RASPBERRY, saturation, 0xFF); - state->layer_text = "Mirrored Symbols"; - } - else if (state->status.layer & 0x20) { - state->target_lcd_color = LCD_COLOR(RED, saturation, 0xFF); - state->layer_text = "Symbols"; - } - else if (state->status.layer & 0x8) { - state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF); - state->layer_text = "Mirrored Dvorak"; - } - else if (state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(BLUE, saturation, 0xFF); - state->layer_text = "Dvorak"; - stop_keyframe_animation(&led_test_animation); - start_keyframe_animation(&sweep_on_sweep_off_left_and_right); - } - else if (state->status.layer & 0x2) { - state->target_lcd_color = LCD_COLOR(ORANGE, saturation, 0xFF); - state->layer_text = "Mirrored Qwerty"; - } - else { - state->target_lcd_color = LCD_COLOR(YELLOW, saturation, 0xFF); - state->layer_text = "Qwerty"; - stop_keyframe_animation(&led_test_animation); - start_keyframe_animation(&Fade_in_all_leds); - } -} diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h deleted file mode 100644 index c97a7a22a58..00000000000 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.h +++ /dev/null @@ -1,125 +0,0 @@ -/* 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 . - */ - -#ifndef VISUALIZER_H_ -#define VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed -extern keyframe_animation_t KITT_Scanner_animation; - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. - -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/readme.md b/keyboards/ergodox_infinity/readme.md index 73ee3bc1df1..c51bdd7c82d 100644 --- a/keyboards/ergodox_infinity/readme.md +++ b/keyboards/ergodox_infinity/readme.md @@ -13,18 +13,16 @@ for the left and right halves seperately. To flash them: - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util` - - Build right hand firmware with `make ergodox_infinity:keymapname MASTER=right` - - Plug in the right hand keyboard only. - Press the program button (back of keyboard, above thumb pad). - - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util MASTER=right` + - Install the firmware with `sudo make ergodox_infinity:keymapname:dfu-util` More information on the Infinity firmware is available in the [TMK/chibios for Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) -## Infinity Master/Two Halves +## Infinity Two Halves The Infinity is two completely independent keyboards, that can connect together. You have a few options in how you flash the firmware: @@ -32,21 +30,10 @@ You have a few options in how you flash the firmware: - Add `#define EE_HANDS` to your config.h, initialize the EEPROM values (see below), and then flash the same firmware to both halves. -- Flash the left half, rebuild the firmware with "MASTER=right" and then flash - the right half. This allows you to plug in either half directly to the - computer and is what the above instructions do. - -- Flash the left half, then flash the same firmware on the right. This only - works when the left half is plugged directly to the computer and the keymap - is mirrored. It saves the small extra step of rebuilding with - "MASTER=right". - -- The same as the previous one but with "MASTER=right" when you build the - firmware, then flash the same firmware to both halves. You just have to - directly connect the right half to the computer. +- Flash with the instructions above, which assume the left hand is connected to USB. - For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half, + any part of the firmware code itself, you can program only the half connected to USB, but it is safest to program both halves. ### EE_HANDS initialization @@ -74,7 +61,6 @@ They only need to be done once, unless you reset the EEPROM later. - Add `#define EE_HANDS` to the config.h file of your keymap, and build your firmware using `make ergodox_infinity:keymapname`. - - After this, you can flash both halves with the same firmware, _without_ having to rebuild with - "MASTER=right" or risking a mirrored keyboard when connected the wrong way. + - After this, you can flash both halves with the same firmware, _without_ risking a mirrored keyboard when connected the wrong way. If you reset your EEPROM later, you'll have to follow these steps again, though. diff --git a/keyboards/ergodox_infinity/rules.mk b/keyboards/ergodox_infinity/rules.mk index 06b62f547da..b6922e1ee69 100644 --- a/keyboards/ergodox_infinity/rules.mk +++ b/keyboards/ergodox_infinity/rules.mk @@ -34,11 +34,4 @@ ST7565_ENABLE = yes LED_MATRIX_ENABLE = yes LED_MATRIX_DRIVER = IS31FL3731 -# Config for Visualizer (set VISUALIZER_ENABLE = yes and ST7565_ENABLE = no to use) -LCD_ENABLE = yes -LCD_BACKLIGHT_ENABLE = yes -LCD_DRIVER = st7565 -LCD_WIDTH = 128 -LCD_HEIGHT = 32 - LAYOUTS = ergodox diff --git a/keyboards/ergodox_infinity/simple_visualizer.h b/keyboards/ergodox_infinity/simple_visualizer.h deleted file mode 100644 index 73d0e088700..00000000000 --- a/keyboards/ergodox_infinity/simple_visualizer.h +++ /dev/null @@ -1,123 +0,0 @@ -/* 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 . - */ - -#ifndef KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ -#define KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "system/serial_link.h" -#include "led.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -static keyframe_animation_t lcd_layer_display = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_and_led_states} -}; - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t color_animation = { - .num_frames = 2, - .loop = false, - // Note that there's a 200 ms no-operation frame, - // this prevents the color from changing when activating the layer - // momentarily - .frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)}, - .frame_functions = {keyframe_no_operation, lcd_backlight_keyframe_animate_color}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state); - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - uint32_t prev_color = state->target_lcd_color; - const char* prev_layer_text = state->layer_text; - - get_visualizer_layer_and_color(state); - - if (initial_update || prev_color != state->target_lcd_color) { - start_keyframe_animation(&color_animation); - } - - if (initial_update || prev_layer_text != state->layer_text) { - start_keyframe_animation(&lcd_layer_display); - } - // You can also stop existing animations, and start your custom ones here - // remember that you should normally have only one animation for the LCD - // and one for the background. But you can also combine them if you want. -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -#endif /* KEYBOARDS_ERGODOX_INFINITY_SIMPLE_VISUALIZER_H_ */ diff --git a/keyboards/ergodox_infinity/visualizer.c b/keyboards/ergodox_infinity/visualizer.c deleted file mode 100644 index 1ea891e8303..00000000000 --- a/keyboards/ergodox_infinity/visualizer.c +++ /dev/null @@ -1,328 +0,0 @@ -/* -Copyright 2016 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 . -*/ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "lcd_keyframes.h" -#include "lcd_backlight_keyframes.h" -#include "default_animations.h" - -static const uint32_t logo_background_color = LCD_COLOR(0x00, 0x00, 0xFF); -static const uint32_t initial_color = LCD_COLOR(0, 0, 0); - -static const uint32_t led_emulation_colors[4] = { - LCD_COLOR(0, 0, 0), - LCD_COLOR(255, 255, 255), - LCD_COLOR(84, 255, 255), - LCD_COLOR(168, 255, 255), -}; - -static uint32_t next_led_target_color = 0; - -typedef enum { - LCD_STATE_INITIAL, - LCD_STATE_LAYER_BITMAP, - LCD_STATE_BITMAP_AND_LEDS, -} lcd_state_t; - -static lcd_state_t lcd_state = LCD_STATE_INITIAL; - -typedef struct { - uint8_t led_on; - uint8_t led1; - uint8_t led2; - uint8_t led3; -} visualizer_user_data_t; - -// Don't access from visualization function, use the visualizer state instead -static visualizer_user_data_t user_data_keyboard = { - .led_on = 0, - .led1 = LED_BRIGHTNESS_HI, - .led2 = LED_BRIGHTNESS_HI, - .led3 = LED_BRIGHTNESS_HI, -}; - -_Static_assert(sizeof(visualizer_user_data_t) <= VISUALIZER_USER_DATA_SIZE, - "Please increase the VISUALIZER_USER_DATA_SIZE"); - -// Feel free to modify the animations below, or even add new ones if needed - - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t one_led_color = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color}, -}; - -bool swap_led_target_color(keyframe_animation_t* animation, visualizer_state_t* state) { - uint32_t temp = next_led_target_color; - next_led_target_color = state->target_lcd_color; - state->target_lcd_color = temp; - return false; -} - -// The color animation animates the LCD color when you change layers -static keyframe_animation_t two_led_colors = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_backlight_keyframe_set_color, swap_led_target_color}, -}; - -// The LCD animation alternates between the layer name display and a -// bitmap that displays all active layers -static keyframe_animation_t lcd_bitmap_animation = { - .num_frames = 1, - .loop = false, - .frame_lengths = {gfxMillisecondsToTicks(0)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap}, -}; - -static keyframe_animation_t lcd_bitmap_leds_animation = { - .num_frames = 2, - .loop = true, - .frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)}, - .frame_functions = {lcd_keyframe_display_layer_bitmap, lcd_keyframe_display_led_states}, -}; - -void initialize_user_visualizer(visualizer_state_t* state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - lcd_backlight_brightness(130); - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -static inline bool is_led_on(visualizer_user_data_t* user_data, uint8_t num) { - return user_data->led_on & (1u << num); -} - -static uint8_t get_led_index_master(visualizer_user_data_t* user_data) { - for (int i=0; i < 3; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - return 0; -} - -static uint8_t get_led_index_slave(visualizer_user_data_t* user_data) { - uint8_t master_index = get_led_index_master(user_data); - if (master_index!=0) { - for (int i=master_index; i < 3; i++) { - if (is_led_on(user_data, i)) { - return i + 1; - } - } - } - - return 0; -} - -static uint8_t get_secondary_led_index(visualizer_user_data_t* user_data) { - if (is_led_on(user_data, 0) && - is_led_on(user_data, 1) && - is_led_on(user_data, 2)) { - return 3; - } - return 0; -} - -static uint8_t get_brightness(visualizer_user_data_t* user_data, uint8_t index) { - switch (index) { - case 1: - return user_data->led1; - case 2: - return user_data->led2; - case 3: - return user_data->led3; - } - return 0; -} - -static void update_emulated_leds(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - visualizer_user_data_t* user_data_new = (visualizer_user_data_t*)state->status.user_data; - visualizer_user_data_t* user_data_old = (visualizer_user_data_t*)prev_status->user_data; - - uint8_t new_index; - uint8_t old_index; - - if (is_keyboard_master()) { - new_index = get_led_index_master(user_data_new); - old_index = get_led_index_master(user_data_old); - } - else { - new_index = get_led_index_slave(user_data_new); - old_index = get_led_index_slave(user_data_old); - } - uint8_t new_secondary_index = get_secondary_led_index(user_data_new); - uint8_t old_secondary_index = get_secondary_led_index(user_data_old); - - uint8_t old_brightness = get_brightness(user_data_old, old_index); - uint8_t new_brightness = get_brightness(user_data_new, new_index); - - uint8_t old_secondary_brightness = get_brightness(user_data_old, old_secondary_index); - uint8_t new_secondary_brightness = get_brightness(user_data_new, new_secondary_index); - - if (lcd_state == LCD_STATE_INITIAL || - new_index != old_index || - new_secondary_index != old_secondary_index || - new_brightness != old_brightness || - new_secondary_brightness != old_secondary_brightness) { - - if (new_secondary_index != 0) { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - next_led_target_color = change_lcd_color_intensity( - led_emulation_colors[new_secondary_index], new_secondary_brightness); - - stop_keyframe_animation(&one_led_color); - start_keyframe_animation(&two_led_colors); - } else { - state->target_lcd_color = change_lcd_color_intensity( - led_emulation_colors[new_index], new_brightness); - stop_keyframe_animation(&two_led_colors); - start_keyframe_animation(&one_led_color); - } - } -} - -static void update_lcd_text(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - if (state->status.leds) { - if (lcd_state != LCD_STATE_BITMAP_AND_LEDS || - state->status.leds != prev_status->leds || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer) { - - // NOTE: that it doesn't matter if the animation isn't playing, stop will do nothing in that case - stop_keyframe_animation(&lcd_bitmap_animation); - - lcd_state = LCD_STATE_BITMAP_AND_LEDS; - // For information: - // The logic in this function makes sure that this doesn't happen, but if you call start on an - // animation that is already playing it will be restarted. - start_keyframe_animation(&lcd_bitmap_leds_animation); - } - } else { - if (lcd_state != LCD_STATE_LAYER_BITMAP || - state->status.layer != prev_status->layer || - state->status.default_layer != prev_status->default_layer) { - - stop_keyframe_animation(&lcd_bitmap_leds_animation); - - lcd_state = LCD_STATE_LAYER_BITMAP; - start_keyframe_animation(&lcd_bitmap_animation); - } - } -} - -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status) { - // Check the status here to start and stop animations - // You might have to save some state, like the current animation here so that you can start the right - // This function is called every time the status changes - - // NOTE that this is called from the visualizer thread, so don't access anything else outside the status - // This is also important because the slave won't have access to the active layer for example outside the - // status. - - update_emulated_leds(state, prev_status); - update_lcd_text(state, prev_status); - -} - -void user_visualizer_suspend(visualizer_state_t* state) { - state->layer_text = "Suspending..."; - uint8_t hue = LCD_HUE(state->current_lcd_color); - uint8_t sat = LCD_SAT(state->current_lcd_color); - state->target_lcd_color = LCD_COLOR(hue, sat, 0); - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t* state) { - state->current_lcd_color = initial_color; - state->target_lcd_color = logo_background_color; - lcd_state = LCD_STATE_INITIAL; - start_keyframe_animation(&default_startup_animation); -} - -void ergodox_board_led_on(void){ - // No board led support -} - -void ergodox_right_led_1_on(void){ - user_data_keyboard.led_on |= (1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_on(void){ - user_data_keyboard.led_on |= (1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_on(void){ - user_data_keyboard.led_on |= (1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_board_led_off(void){ - // No board led support -} - -void ergodox_right_led_1_off(void){ - user_data_keyboard.led_on &= ~(1u << 0); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_off(void){ - user_data_keyboard.led_on &= ~(1u << 1); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_off(void){ - user_data_keyboard.led_on &= ~(1u << 2); - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_1_set(uint8_t n) { - user_data_keyboard.led1 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_2_set(uint8_t n) { - user_data_keyboard.led2 = n; - visualizer_set_user_data(&user_data_keyboard); -} - -void ergodox_right_led_3_set(uint8_t n) { - user_data_keyboard.led3 = n; - visualizer_set_user_data(&user_data_keyboard); -} diff --git a/keyboards/ergosaurus/rules.mk b/keyboards/ergosaurus/rules.mk index 93b442460f1..07a7efce74b 100644 --- a/keyboards/ergosaurus/rules.mk +++ b/keyboards/ergosaurus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ergotaco/post_rules.mk b/keyboards/ergotaco/post_rules.mk new file mode 100644 index 00000000000..0db3171b33d --- /dev/null +++ b/keyboards/ergotaco/post_rules.mk @@ -0,0 +1,8 @@ + +# A bunch of stuff that you shouldn't touch unless you +# know what you're doing. +# +# No touchy, capiche? +ifeq ($(strip $(DEBUG_MATRIX)), yes) + OPT_DEFS += -DDEBUG_MATRIX +endif diff --git a/keyboards/ergotaco/rules.mk b/keyboards/ergotaco/rules.mk index 9fe0992ffd5..db236477b0f 100644 --- a/keyboards/ergotaco/rules.mk +++ b/keyboards/ergotaco/rules.mk @@ -14,6 +14,3 @@ COMMAND_ENABLE = yes # # No touchy, capiche? SRC += matrix.c i2c_master.c -ifeq ($(strip $(DEBUG_MATRIX)), yes) - OPT_DEFS += -DDEBUG_MATRIX -endif diff --git a/keyboards/ergotravel/keymaps/yanfali/rules.mk b/keyboards/ergotravel/keymaps/yanfali/rules.mk index 16409396a13..ab3621cd7ed 100644 --- a/keyboards/ergotravel/keymaps/yanfali/rules.mk +++ b/keyboards/ergotravel/keymaps/yanfali/rules.mk @@ -1,6 +1,6 @@ BOOTLOADER = qmk-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. diff --git a/keyboards/ergotravel/rev1/rev1.h b/keyboards/ergotravel/rev1/rev1.h index 5907617ef32..2973f4d9f3b 100644 --- a/keyboards/ergotravel/rev1/rev1.h +++ b/keyboards/ergotravel/rev1/rev1.h @@ -1,5 +1,4 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "ergotravel.h" @@ -13,21 +12,20 @@ #endif #endif +#define XXX KC_NO + #define LAYOUT( \ L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ - L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05, L06 }, \ - { L10, L11, L12, L13, L14, L15, L16 }, \ - { L20, L21, L22, L23, L24, L25, L26 }, \ - { L30, L31, L32, L33, L34, L35, KC_NO }, \ - { R06, R05, R04, R03, R02, R01, R00 }, \ - { R16, R15, R14, R13, R12, R11, R10 }, \ - { R26, R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30, KC_NO } \ - } - -#endif + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, XXX }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30, XXX } \ +} diff --git a/keyboards/ericrlau/numdiscipline/rev1/rules.mk b/keyboards/ericrlau/numdiscipline/rev1/rules.mk index 49a15005c4a..c1b6074978e 100644 --- a/keyboards/ericrlau/numdiscipline/rev1/rules.mk +++ b/keyboards/ericrlau/numdiscipline/rev1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/esca/getawayvan/rules.mk b/keyboards/esca/getawayvan/rules.mk index 2544bca287b..a7596be365a 100644 --- a/keyboards/esca/getawayvan/rules.mk +++ b/keyboards/esca/getawayvan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/espectro/rules.mk b/keyboards/espectro/rules.mk index b1ba21f36ee..42b4288ff10 100755 --- a/keyboards/espectro/rules.mk +++ b/keyboards/espectro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evil80/evil80.h b/keyboards/evil80/evil80.h index a880de98f5f..90d4f6564b8 100644 --- a/keyboards/evil80/evil80.h +++ b/keyboards/evil80/evil80.h @@ -1,23 +1,21 @@ -#ifndef EVIL80_H -#define EVIL80_H +#pragma once #include "quantum.h" -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K500, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K501, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ - K502, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ - K503, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K414, \ - K504, K505, K506, K507, K509, K510, K511, K512, K513, K514, K515 \ -) \ -{ \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, KC_NO }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, KC_NO }, \ - { K500, K501, K502, K503, K504, K505, K506, K507, KC_NO, K509, K510, K511, K512, K513, K514, K515 } \ -} +#define XXX KC_NO -#endif +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k50, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k51, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k52, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k53, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4E, \ + k54, k55, k56, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, XXX, k59, k5A, k5B, k5C, k5D, k5E, k5F } \ +} diff --git a/keyboards/evolv/rules.mk b/keyboards/evolv/rules.mk index b0f7124c08e..35f3cc75ee8 100644 --- a/keyboards/evolv/rules.mk +++ b/keyboards/evolv/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/atom47/rev3/info.json b/keyboards/evyd13/atom47/rev3/info.json index 0deaa7103c4..fc602f699b6 100644 --- a/keyboards/evyd13/atom47/rev3/info.json +++ b/keyboards/evyd13/atom47/rev3/info.json @@ -99,10 +99,11 @@ {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, - {"x":0, "y":3, "w":1.25}, - {"x":1.25, "y":3, "w":1.25}, - {"x":2.5, "y":3, "w":1.25}, - {"x":3.75, "y":3, "w":6.25}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "w":6}, + {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3} diff --git a/keyboards/evyd13/atom47/rev4/info.json b/keyboards/evyd13/atom47/rev4/info.json index a48b413588f..d0fbf98742e 100644 --- a/keyboards/evyd13/atom47/rev4/info.json +++ b/keyboards/evyd13/atom47/rev4/info.json @@ -99,10 +99,11 @@ {"x":10.75, "y":2, "w":1.25}, {"x":12, "y":2}, - {"x":0, "y":3, "w":1.25}, - {"x":1.25, "y":3, "w":1.25}, - {"x":2.5, "y":3, "w":1.25}, - {"x":3.75, "y":3, "w":6.25}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3, "w":6}, + {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}, {"x":12, "y":3} diff --git a/keyboards/evyd13/atom47/rev5/config.h b/keyboards/evyd13/atom47/rev5/config.h index f1f8eacfa47..383aa23789f 100644 --- a/keyboards/evyd13/atom47/rev5/config.h +++ b/keyboards/evyd13/atom47/rev5/config.h @@ -157,8 +157,54 @@ along with this program. If not, see . // ADDR2 represents A3:A2 of the 7-bit address. // The result is: 0b101(ADDR2)(ADDR1) #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. - -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL \ No newline at end of file +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 64 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/evyd13/atom47/rev5/rev5.c b/keyboards/evyd13/atom47/rev5/rev5.c index ea0208706a3..f972b78867c 100644 --- a/keyboards/evyd13/atom47/rev5/rev5.c +++ b/keyboards/evyd13/atom47/rev5/rev5.c @@ -17,7 +17,7 @@ along with this program. If not, see . #include "rev5.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/evyd13/atom47/rules.mk b/keyboards/evyd13/atom47/rules.mk index b966d1829f4..2ed1993fbcc 100644 --- a/keyboards/evyd13/atom47/rules.mk +++ b/keyboards/evyd13/atom47/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/eon40/rules.mk b/keyboards/evyd13/eon40/rules.mk index c2981962d1a..fc923217023 100644 --- a/keyboards/evyd13/eon40/rules.mk +++ b/keyboards/evyd13/eon40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/eon65/rules.mk b/keyboards/evyd13/eon65/rules.mk index 15164058d77..9cf47b43a7c 100644 --- a/keyboards/evyd13/eon65/rules.mk +++ b/keyboards/evyd13/eon65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/eon75/rules.mk b/keyboards/evyd13/eon75/rules.mk index 7a72e82b354..6d598770a31 100644 --- a/keyboards/evyd13/eon75/rules.mk +++ b/keyboards/evyd13/eon75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/eon87/rules.mk b/keyboards/evyd13/eon87/rules.mk index 2f8686632b6..6ead804b7ba 100644 --- a/keyboards/evyd13/eon87/rules.mk +++ b/keyboards/evyd13/eon87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/eon95/rules.mk b/keyboards/evyd13/eon95/rules.mk index 7a72e82b354..6d598770a31 100644 --- a/keyboards/evyd13/eon95/rules.mk +++ b/keyboards/evyd13/eon95/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/gh80_1800/rules.mk b/keyboards/evyd13/gh80_1800/rules.mk index a67e252c7a1..d9f2b4f15b9 100644 --- a/keyboards/evyd13/gh80_1800/rules.mk +++ b/keyboards/evyd13/gh80_1800/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h index 44ac7dcd034..b77ac95d7d4 100644 --- a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h +++ b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h @@ -17,14 +17,8 @@ #pragma once #ifdef PS2_USE_USART -#define PS2_CLOCK_PORT PORTD -#define PS2_CLOCK_PIN PIND -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/evyd13/gh80_3700/rules.mk b/keyboards/evyd13/gh80_3700/rules.mk index 3affc70d0cf..fdf9908627c 100644 --- a/keyboards/evyd13/gh80_3700/rules.mk +++ b/keyboards/evyd13/gh80_3700/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/gud70/rules.mk b/keyboards/evyd13/gud70/rules.mk index 7237e7dc1d3..2ff67b27216 100644 --- a/keyboards/evyd13/gud70/rules.mk +++ b/keyboards/evyd13/gud70/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/nt660/rules.mk b/keyboards/evyd13/nt660/rules.mk index 93860bde0d7..2b211132c28 100644 --- a/keyboards/evyd13/nt660/rules.mk +++ b/keyboards/evyd13/nt660/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/nt750/rules.mk b/keyboards/evyd13/nt750/rules.mk index e690f191b68..d0729e22b11 100644 --- a/keyboards/evyd13/nt750/rules.mk +++ b/keyboards/evyd13/nt750/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/nt980/rules.mk b/keyboards/evyd13/nt980/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/evyd13/nt980/rules.mk +++ b/keyboards/evyd13/nt980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/omrontkl/rules.mk b/keyboards/evyd13/omrontkl/rules.mk index 37ab0dee279..dcb857f2c6d 100644 --- a/keyboards/evyd13/omrontkl/rules.mk +++ b/keyboards/evyd13/omrontkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk b/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk index 0b304aae350..62eb851505f 100644 --- a/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk +++ b/keyboards/evyd13/plain60/keymaps/kwerdenker/rules.mk @@ -16,7 +16,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) diff --git a/keyboards/evyd13/plain60/rules.mk b/keyboards/evyd13/plain60/rules.mk index d6237b3262f..b7f94e84e6c 100644 --- a/keyboards/evyd13/plain60/rules.mk +++ b/keyboards/evyd13/plain60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/pockettype/rules.mk b/keyboards/evyd13/pockettype/rules.mk index fc85b1aab0e..df0efd3c43d 100644 --- a/keyboards/evyd13/pockettype/rules.mk +++ b/keyboards/evyd13/pockettype/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/quackfire/rules.mk b/keyboards/evyd13/quackfire/rules.mk index 13de0f45de8..7593cc0a3b9 100644 --- a/keyboards/evyd13/quackfire/rules.mk +++ b/keyboards/evyd13/quackfire/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/solheim68/rules.mk b/keyboards/evyd13/solheim68/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/evyd13/solheim68/rules.mk +++ b/keyboards/evyd13/solheim68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/ta65/rules.mk b/keyboards/evyd13/ta65/rules.mk index a8c0ec30f59..bf3ad7e1324 100644 --- a/keyboards/evyd13/ta65/rules.mk +++ b/keyboards/evyd13/ta65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk b/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk index f73ad286a1f..e5fc55e912a 100644 --- a/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk +++ b/keyboards/evyd13/wasdat/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/evyd13/wasdat/rules.mk b/keyboards/evyd13/wasdat/rules.mk index 897c216a203..dfd38a5122d 100644 --- a/keyboards/evyd13/wasdat/rules.mk +++ b/keyboards/evyd13/wasdat/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/wasdat_code/rules.mk b/keyboards/evyd13/wasdat_code/rules.mk index 636e48b5ffa..5c989a49398 100644 --- a/keyboards/evyd13/wasdat_code/rules.mk +++ b/keyboards/evyd13/wasdat_code/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/evyd13/wonderland/rules.mk b/keyboards/evyd13/wonderland/rules.mk index a8f3fcc106b..efea8c1740f 100644 --- a/keyboards/evyd13/wonderland/rules.mk +++ b/keyboards/evyd13/wonderland/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/exclusive/e65/rules.mk b/keyboards/exclusive/e65/rules.mk index a69fbc29724..aaa3b1129b5 100644 --- a/keyboards/exclusive/e65/rules.mk +++ b/keyboards/exclusive/e65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h index b1b8b1bed71..fd221f1765d 100644 --- a/keyboards/exclusive/e6_rgb/config.h +++ b/keyboards/exclusive/e6_rgb/config.h @@ -31,8 +31,6 @@ #define RGBLIGHT_VAL_STEP 8 #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 63 diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c index e0d313f835c..11d313e9a3b 100644 --- a/keyboards/exclusive/e6_rgb/e6_rgb.c +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -11,7 +11,7 @@ void matrix_init_kb(void) { matrix_init_user(); } -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk index e895602722f..46f86ec2fed 100644 --- a/keyboards/exclusive/e6_rgb/rules.mk +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index 8fc91e504cb..f9295145ec9 100644 --- a/keyboards/exclusive/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -57,5 +56,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/exclusive/e6v2/le/le.h b/keyboards/exclusive/e6v2/le/le.h index d52560dfbe8..41992a185e8 100644 --- a/keyboards/exclusive/e6v2/le/le.h +++ b/keyboards/exclusive/e6v2/le/le.h @@ -1,36 +1,35 @@ -#ifndef LE_H -#define LE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K42, K43, K44, K47, K49, K4A, K4B, K4C, K4D, K4E \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k42, k43, k44, k47, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, XXX, k42, k43, k44, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, k4E } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K47, K4A, K4B, K4D, K4E \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO }, \ - { K40, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, K4A, K4B, KC_NO, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k47, k4A, k4B, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, k4A, k4B, XXX, k4D, k4E } \ } /* LAYOUT_60_hhkb @@ -47,18 +46,15 @@ * └─────┴───┴─────┴───────────────────────────┴─────┴───┴─────┘ */ #define LAYOUT_60_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, K0D, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, \ - K42, K43, K47, K4B, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ - { KC_NO, KC_NO, K42, K43, KC_NO, KC_NO, KC_NO, K47, KC_NO, KC_NO, KC_NO, K4B, KC_NO, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0D, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, \ + k42, k43, k47, k4B, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E }, \ + { XXX, XXX, k42, k43, XXX, XXX, XXX, k47, XXX, XXX, XXX, k4B, XXX, k4D, XXX } \ } - -#endif diff --git a/keyboards/exclusive/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h index 13be6ccad62..d9362cfc030 100644 --- a/keyboards/exclusive/e6v2/oe/config.h +++ b/keyboards/exclusive/e6v2/oe/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -54,5 +53,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/exclusive/e6v2/oe/oe.h b/keyboards/exclusive/e6v2/oe/oe.h index 0746039fe72..21daaa2aa9b 100644 --- a/keyboards/exclusive/e6v2/oe/oe.h +++ b/keyboards/exclusive/e6v2/oe/oe.h @@ -1,66 +1,61 @@ -#ifndef OE_H -#define OE_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_hhkb( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K46, K4B, K4C \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k41, k42, k46, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } #define LAYOUT_hhkb_splits( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,\ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K41, K42, K46, K4B, K4C \ -)\ -{\ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ - { KC_NO, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, KC_NO, K4B, K4C, KC_NO, KC_NO }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k41, k42, k46, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } - -#endif diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk index de98c362417..aea6e25e215 100644 --- a/keyboards/exclusive/e7v1/rules.mk +++ b/keyboards/exclusive/e7v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e7v1se/rules.mk b/keyboards/exclusive/e7v1se/rules.mk index dff8d21f97b..c8629bd704b 100644 --- a/keyboards/exclusive/e7v1se/rules.mk +++ b/keyboards/exclusive/e7v1se/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/exclusive/e85/rules.mk b/keyboards/exclusive/e85/rules.mk index 6b890e9dd93..f3856b93f0b 100644 --- a/keyboards/exclusive/e85/rules.mk +++ b/keyboards/exclusive/e85/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/eyeohdesigns/sprh/info.json b/keyboards/eyeohdesigns/sprh/info.json index ed055586142..7c99615965f 100644 --- a/keyboards/eyeohdesigns/sprh/info.json +++ b/keyboards/eyeohdesigns/sprh/info.json @@ -1,13 +1,148 @@ { - "keyboard_name": "sprh", - "url": "", - "maintainer": "eye oh designs", + "keyboard_name": "sprh", + "maintainer": "eye oh designs", + "url": "", "layouts": { - "LAYOUT_default": { - "layout": [{"label":"Encd", "x":0.5, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"1", "x":2.5, "y":0}, {"label":"2", "x":3.5, "y":0}, {"label":"3", "x":4.5, "y":0}, {"label":"4", "x":5.5, "y":0}, {"label":"5", "x":6.5, "y":0}, {"label":"6", "x":7.5, "y":0}, {"label":"7", "x":8.5, "y":0}, {"label":"8", "x":9.5, "y":0}, {"label":"9", "x":10.5, "y":0}, {"label":"0", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"Backspace", "x":14.5, "y":0, "w":2}, {"label":"Tab", "x":1, "y":1, "w":1.5}, {"label":"Q", "x":2.5, "y":1}, {"label":"W", "x":3.5, "y":1}, {"label":"E", "x":4.5, "y":1}, {"label":"R", "x":5.5, "y":1}, {"label":"T", "x":6.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"[", "x":12.5, "y":1}, {"label":"]", "x":13.5, "y":1}, {"label":"\\", "x":14.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"H", "x":7.5, "y":2}, {"label":"J", "x":8.5, "y":2}, {"label":"K", "x":9.5, "y":2}, {"label":"L", "x":10.5, "y":2}, {"label":";", "x":11.5, "y":2}, {"label":"'", "x":12.5, "y":2}, {"label":"Enter", "x":13.5, "y":2, "w":2.25}, {"label":"Shift", "x":0.25, "y":3, "w":2.25}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":",", "x":9.5, "y":3}, {"label":".", "x":10.5, "y":3}, {"label":"/", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.75}, {"label":"\u2191", "x":15.25, "y":3}, {"label":"Super", "x":0, "y":4, "w":1.25}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.37, "y":4, "w":1.25}, {"x":4.62, "y":4, "w":6.25}, {"label":"Alt", "x":10.87, "y":4, "w":1.25}, {"label":"Function", "x":12.12, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4}, {"label":"\u2193", "x":15.25, "y":4}, {"label":"\u2192", "x":16.25, "y":4}] + "LAYOUT_default": { + "layout": [ + { "label": "Encd", "x": 0.5, "y": 0 }, + { "label": "Esc", "x": 1.5, "y": 0 }, + { "label": "1", "x": 2.5, "y": 0 }, + { "label": "2", "x": 3.5, "y": 0 }, + { "label": "3", "x": 4.5, "y": 0 }, + { "label": "4", "x": 5.5, "y": 0 }, + { "label": "5", "x": 6.5, "y": 0 }, + { "label": "6", "x": 7.5, "y": 0 }, + { "label": "7", "x": 8.5, "y": 0 }, + { "label": "8", "x": 9.5, "y": 0 }, + { "label": "9", "x": 10.5, "y": 0 }, + { "label": "0", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "Backspace", "w": 2, "x": 14.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 1, "y": 1 }, + { "label": "Q", "x": 2.5, "y": 1 }, + { "label": "W", "x": 3.5, "y": 1 }, + { "label": "E", "x": 4.5, "y": 1 }, + { "label": "R", "x": 5.5, "y": 1 }, + { "label": "T", "x": 6.5, "y": 1 }, + { "label": "Y", "x": 7.5, "y": 1 }, + { "label": "U", "x": 8.5, "y": 1 }, + { "label": "I", "x": 9.5, "y": 1 }, + { "label": "O", "x": 10.5, "y": 1 }, + { "label": "P", "x": 11.5, "y": 1 }, + { "label": "[", "x": 12.5, "y": 1 }, + { "label": "]", "x": 13.5, "y": 1 }, + { "label": "\\", "w": 1.5, "x": 14.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.75, "y": 2 }, + { "label": "A", "x": 2.5, "y": 2 }, + { "label": "S", "x": 3.5, "y": 2 }, + { "label": "D", "x": 4.5, "y": 2 }, + { "label": "F", "x": 5.5, "y": 2 }, + { "label": "G", "x": 6.5, "y": 2 }, + { "label": "H", "x": 7.5, "y": 2 }, + { "label": "J", "x": 8.5, "y": 2 }, + { "label": "K", "x": 9.5, "y": 2 }, + { "label": "L", "x": 10.5, "y": 2 }, + { "label": ";", "x": 11.5, "y": 2 }, + { "label": "'", "x": 12.5, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 13.5, "y": 2 }, + { "label": "Shift", "w": 2.25, "x": 0.25, "y": 3 }, + { "label": "Z", "x": 2.5, "y": 3 }, + { "label": "X", "x": 3.5, "y": 3 }, + { "label": "C", "x": 4.5, "y": 3 }, + { "label": "V", "x": 5.5, "y": 3 }, + { "label": "B", "x": 6.5, "y": 3 }, + { "label": "N", "x": 7.5, "y": 3 }, + { "label": "M", "x": 8.5, "y": 3 }, + { "label": ",", "x": 9.5, "y": 3 }, + { "label": ".", "x": 10.5, "y": 3 }, + { "label": "/", "x": 11.5, "y": 3 }, + { "label": "Shift", "w": 2.75, "x": 12.5, "y": 3 }, + { "label": "\u2191", "x": 15.25, "y": 3 }, + { "label": "Super", "w": 1.25, "x": 0, "y": 4 }, + { "label": "Ctrl", "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 3.37, "y": 4 }, + { "w": 6.25, "x": 4.62, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 10.87, "y": 4 }, + { "label": "Function", "w": 1.25, "x": 12.12, "y": 4 }, + { "label": "\u2190", "x": 14.25, "y": 4 }, + { "label": "\u2193", "x": 15.25, "y": 4 }, + { "label": "\u2192", "x": 16.25, "y": 4 } + ] }, - "LAYOUT_split": { - "layout": [{"label":"Encd", "x":0.5, "y":0}, {"label":"Esc", "x":1.5, "y":0}, {"label":"1", "x":2.5, "y":0}, {"label":"2", "x":3.5, "y":0}, {"label":"3", "x":4.5, "y":0}, {"label":"4", "x":5.5, "y":0}, {"label":"5", "x":6.5, "y":0}, {"label":"6", "x":7.5, "y":0}, {"label":"7", "x":8.5, "y":0}, {"label":"8", "x":9.5, "y":0}, {"label":"9", "x":10.5, "y":0}, {"label":"0", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"\u2190", "x":14.5, "y":0}, {"label":"Del", "x":15.5, "y":0}, {"label":"Tab", "x":1, "y":1, "w":1.5}, {"label":"Q", "x":2.5, "y":1}, {"label":"W", "x":3.5, "y":1}, {"label":"E", "x":4.5, "y":1}, {"label":"R", "x":5.5, "y":1}, {"label":"T", "x":6.5, "y":1}, {"label":"Y", "x":7.5, "y":1}, {"label":"U", "x":8.5, "y":1}, {"label":"I", "x":9.5, "y":1}, {"label":"O", "x":10.5, "y":1}, {"label":"P", "x":11.5, "y":1}, {"label":"[", "x":12.5, "y":1}, {"label":"]", "x":13.5, "y":1}, {"label":"\\", "x":14.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0.75, "y":2, "w":1.75}, {"label":"A", "x":2.5, "y":2}, {"label":"S", "x":3.5, "y":2}, {"label":"D", "x":4.5, "y":2}, {"label":"F", "x":5.5, "y":2}, {"label":"G", "x":6.5, "y":2}, {"label":"H", "x":7.5, "y":2}, {"label":"J", "x":8.5, "y":2}, {"label":"K", "x":9.5, "y":2}, {"label":"L", "x":10.5, "y":2}, {"label":";", "x":11.5, "y":2}, {"label":"'", "x":12.5, "y":2}, {"label":"Enter", "x":13.5, "y":2, "w":2.25}, {"label":"Shift", "x":0.25, "y":3, "w":2.25}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":",", "x":9.5, "y":3}, {"label":".", "x":10.5, "y":3}, {"label":"/", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":1.75}, {"label":"Fn", "x":14.25, "y":3}, {"label":"\u2191", "x":15.25, "y":3}, {"label":"Super", "x":0, "y":4, "w":1.25}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":3.37, "y":4, "w":1.25}, {"x":4.62, "y":4, "w":2.75}, {"x":7.37, "y":4, "w":2.25}, {"x":9.62, "y":4, "w":1.25}, {"label":"Alt", "x":10.87, "y":4, "w":1.25}, {"label":"Function", "x":12.12, "y":4, "w":1.25}, {"label":"\u2190", "x":14.25, "y":4}, {"label":"\u2193", "x":15.25, "y":4}, {"label":"\u2192", "x":16.25, "y":4}] + "LAYOUT_split": { + "layout": [ + { "label": "Encd", "x": 0.5, "y": 0 }, + { "label": "Esc", "x": 1.5, "y": 0 }, + { "label": "1", "x": 2.5, "y": 0 }, + { "label": "2", "x": 3.5, "y": 0 }, + { "label": "3", "x": 4.5, "y": 0 }, + { "label": "4", "x": 5.5, "y": 0 }, + { "label": "5", "x": 6.5, "y": 0 }, + { "label": "6", "x": 7.5, "y": 0 }, + { "label": "7", "x": 8.5, "y": 0 }, + { "label": "8", "x": 9.5, "y": 0 }, + { "label": "9", "x": 10.5, "y": 0 }, + { "label": "0", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "\u2190", "x": 14.5, "y": 0 }, + { "label": "Del", "x": 15.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 1, "y": 1 }, + { "label": "Q", "x": 2.5, "y": 1 }, + { "label": "W", "x": 3.5, "y": 1 }, + { "label": "E", "x": 4.5, "y": 1 }, + { "label": "R", "x": 5.5, "y": 1 }, + { "label": "T", "x": 6.5, "y": 1 }, + { "label": "Y", "x": 7.5, "y": 1 }, + { "label": "U", "x": 8.5, "y": 1 }, + { "label": "I", "x": 9.5, "y": 1 }, + { "label": "O", "x": 10.5, "y": 1 }, + { "label": "P", "x": 11.5, "y": 1 }, + { "label": "[", "x": 12.5, "y": 1 }, + { "label": "]", "x": 13.5, "y": 1 }, + { "label": "\\", "w": 1.5, "x": 14.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.75, "y": 2 }, + { "label": "A", "x": 2.5, "y": 2 }, + { "label": "S", "x": 3.5, "y": 2 }, + { "label": "D", "x": 4.5, "y": 2 }, + { "label": "F", "x": 5.5, "y": 2 }, + { "label": "G", "x": 6.5, "y": 2 }, + { "label": "H", "x": 7.5, "y": 2 }, + { "label": "J", "x": 8.5, "y": 2 }, + { "label": "K", "x": 9.5, "y": 2 }, + { "label": "L", "x": 10.5, "y": 2 }, + { "label": ";", "x": 11.5, "y": 2 }, + { "label": "'", "x": 12.5, "y": 2 }, + { "label": "Enter", "w": 2.25, "x": 13.5, "y": 2 }, + { "label": "CapsLock", "x": 0.25, "y": 3 }, + { "label": "Shift", "w": 1.25, "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.5, "y": 3 }, + { "label": "X", "x": 3.5, "y": 3 }, + { "label": "C", "x": 4.5, "y": 3 }, + { "label": "V", "x": 5.5, "y": 3 }, + { "label": "B", "x": 6.5, "y": 3 }, + { "label": "N", "x": 7.5, "y": 3 }, + { "label": "M", "x": 8.5, "y": 3 }, + { "label": ",", "x": 9.5, "y": 3 }, + { "label": ".", "x": 10.5, "y": 3 }, + { "label": "/", "x": 11.5, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 12.5, "y": 3 }, + { "label": "Fn", "x": 14.25, "y": 3 }, + { "label": "\u2191", "x": 15.25, "y": 3 }, + { "label": "Super", "w": 1.25, "x": 0, "y": 4 }, + { "label": "Ctrl", "w": 1.25, "x": 1.25, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 3.37, "y": 4 }, + { "w": 2.75, "x": 4.62, "y": 4 }, + { "w": 2.25, "x": 7.37, "y": 4 }, + { "w": 1.25, "x": 9.62, "y": 4 }, + { "label": "Alt", "w": 1.25, "x": 10.87, "y": 4 }, + { "label": "Function", "w": 1.25, "x": 12.12, "y": 4 }, + { "label": "\u2190", "x": 14.25, "y": 4 }, + { "label": "\u2193", "x": 15.25, "y": 4 }, + { "label": "\u2192", "x": 16.25, "y": 4 } + ] } } } diff --git a/keyboards/ez_maker/directpins/promicro/info.json b/keyboards/ez_maker/directpins/promicro/info.json index ad91afeb9a6..419450385ce 100644 --- a/keyboards/ez_maker/directpins/promicro/info.json +++ b/keyboards/ez_maker/directpins/promicro/info.json @@ -6,7 +6,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/ez_maker/directpins/proton_c/info.json b/keyboards/ez_maker/directpins/proton_c/info.json index 4b72f46105c..a284e5c41f6 100644 --- a/keyboards/ez_maker/directpins/proton_c/info.json +++ b/keyboards/ez_maker/directpins/proton_c/info.json @@ -6,7 +6,7 @@ "processor": "STM32F303", "board": "QMK_PROTON_C", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/ez_maker/directpins/teensy_2/info.json b/keyboards/ez_maker/directpins/teensy_2/info.json index cc2e6feec76..0c8fa672a9f 100644 --- a/keyboards/ez_maker/directpins/teensy_2/info.json +++ b/keyboards/ez_maker/directpins/teensy_2/info.json @@ -7,7 +7,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/ez_maker/directpins/teensy_2pp/info.json b/keyboards/ez_maker/directpins/teensy_2pp/info.json index 1e2e69d90e7..e12544a5ef9 100644 --- a/keyboards/ez_maker/directpins/teensy_2pp/info.json +++ b/keyboards/ez_maker/directpins/teensy_2pp/info.json @@ -7,7 +7,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/ez_maker/directpins/teensy_32/config.h b/keyboards/ez_maker/directpins/teensy_32/config.h index 861ae70e41c..c487a84ab16 100644 --- a/keyboards/ez_maker/directpins/teensy_32/config.h +++ b/keyboards/ez_maker/directpins/teensy_32/config.h @@ -17,7 +17,7 @@ #pragma once // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/ez_maker/directpins/teensy_32/info.json b/keyboards/ez_maker/directpins/teensy_32/info.json index 5de8d90a5c7..e0c024ec942 100644 --- a/keyboards/ez_maker/directpins/teensy_32/info.json +++ b/keyboards/ez_maker/directpins/teensy_32/info.json @@ -5,7 +5,7 @@ "debounce": 5, "processor": "MK20DX256", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/ez_maker/directpins/teensy_lc/config.h b/keyboards/ez_maker/directpins/teensy_lc/config.h index 861ae70e41c..c487a84ab16 100644 --- a/keyboards/ez_maker/directpins/teensy_lc/config.h +++ b/keyboards/ez_maker/directpins/teensy_lc/config.h @@ -17,7 +17,7 @@ #pragma once // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/ez_maker/directpins/teensy_lc/info.json b/keyboards/ez_maker/directpins/teensy_lc/info.json index 882fa9ad958..bf93c41fab6 100644 --- a/keyboards/ez_maker/directpins/teensy_lc/info.json +++ b/keyboards/ez_maker/directpins/teensy_lc/info.json @@ -5,7 +5,7 @@ "debounce": 5, "processor": "MKL26Z64", "features": { - "bootmagic_lite": true, + "bootmagic": true, "extrakey": true, "mousekey": true }, diff --git a/keyboards/fallacy/indicators.c b/keyboards/fallacy/indicators.c index dcf1b4de070..c577bc9a8a5 100755 --- a/keyboards/fallacy/indicators.c +++ b/keyboards/fallacy/indicators.c @@ -54,7 +54,7 @@ void set_fallacy_led(int index, bool state) { /* define LED matrix */ -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_1}, {0, C2_1}, {0, C3_1}, diff --git a/keyboards/fallacy/rules.mk b/keyboards/fallacy/rules.mk index 6032696f887..78ee2f1f69e 100755 --- a/keyboards/fallacy/rules.mk +++ b/keyboards/fallacy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fc660c/actuation_point.h b/keyboards/fc660c/actuation_point.h index f7066d92c1f..e02832186c0 100644 --- a/keyboards/fc660c/actuation_point.h +++ b/keyboards/fc660c/actuation_point.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef ACTUATION_POINT_H -#define ACTUATION_POINT_H +#pragma once #include @@ -28,5 +27,3 @@ void actuation_point_down(void); // be careful with this. void adjust_actuation_point(int offset); - -#endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index e979daf331f..460881cb174 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -80,5 +79,3 @@ along with this program. If not, see . // test all keys before further adjustment. // this should probably stay in the range +/-5. // #define ACTUATION_DEPTH_ADJUSTMENT 0 - -#endif diff --git a/keyboards/fc660c/fc660c.h b/keyboards/fc660c/fc660c.h index e3621570dd1..fca02dc0e98 100644 --- a/keyboards/fc660c/fc660c.h +++ b/keyboards/fc660c/fc660c.h @@ -14,38 +14,23 @@ 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 . */ -#ifndef FC660C_H -#define FC660C_H + +#pragma once #include "quantum.h" +#define XXX KC_NO #define LAYOUT( \ - K13, K10, K11, K12, K14, K16, K17, K15, K1B, K18, K19, K1A, K1C, K1E, K1F, \ - K03, K00, K01, K02, K04, K06, K07, K05, K0B, K08, K09, K0A, K0C, K0E, K0F, \ - K43, K40, K41, K42, K44, K46, K47, K45, K4B, K48, K49, K4A, K4E, \ - K33, K31, K32, K34, K36, K37, K35, K3B, K38, K39, K3A, K3C, K3D, \ - K23, K21, K22, K27, K28, K2A, K2C, K2E, K2D, K2F \ + k13, k10, k11, k12, k14, k16, k17, k15, k1B, k18, k19, k1A, k1C, k1E, k1F, \ + k03, k00, k01, k02, k04, k06, k07, k05, k0B, k08, k09, k0A, k0C, k0E, k0F, \ + k43, k40, k41, k42, k44, k46, k47, k45, k4B, k48, k49, k4A, k4E, \ + k33, k31, k32, k34, k36, k37, k35, k3B, k38, k39, k3A, k3C, k3D, \ + k23, k21, k22, k27, k28, k2A, k2C, k2E, k2D, k2F \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, \ - K08, K09, K0A, K0B, K0C, KC_NO, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, \ - K18, K19, K1A, K1B, K1C, KC_NO, K1E, K1F }, \ - { KC_NO, K21, K22, K23, KC_NO, KC_NO, KC_NO, K27, \ - K28, KC_NO, K2A, KC_NO, K2C, K2D, K2E, K2F }, \ - { KC_NO, K31, K32, K33, K34, K35, K36, K37, \ - K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K4A, K4B, KC_NO, KC_NO, K4E, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { XXX, k21, k22, k23, XXX, XXX, XXX, k27, k28, XXX, k2A, XXX, k2C, k2D, k2E, k2F }, \ + { XXX, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, XXX, k4E, XXX } \ } -/* -KEYMAP( - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, - _______,_______,_______, _______, _______,_______,_______, _______,_______,_______ - ) -*/ - -#endif diff --git a/keyboards/fc660c/i2c.h b/keyboards/fc660c/i2c.h index c15b6bc5065..8910e70f10a 100644 --- a/keyboards/fc660c/i2c.h +++ b/keyboards/fc660c/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/fc980c/actuation_point.h b/keyboards/fc980c/actuation_point.h index f7066d92c1f..e02832186c0 100644 --- a/keyboards/fc980c/actuation_point.h +++ b/keyboards/fc980c/actuation_point.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef ACTUATION_POINT_H -#define ACTUATION_POINT_H +#pragma once #include @@ -28,5 +27,3 @@ void actuation_point_down(void); // be careful with this. void adjust_actuation_point(int offset); - -#endif diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index b74ca64a5c3..b0bffef7607 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see . // test all keys before further adjustment. // this should probably stay in the range +/-5. // #define ACTUATION_DEPTH_ADJUSTMENT 0 - -#endif diff --git a/keyboards/fc980c/i2c.h b/keyboards/fc980c/i2c.h index c15b6bc5065..8910e70f10a 100644 --- a/keyboards/fc980c/i2c.h +++ b/keyboards/fc980c/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/feels/feels65/rules.mk b/keyboards/feels/feels65/rules.mk index 471f877db8e..c28943230af 100644 --- a/keyboards/feels/feels65/rules.mk +++ b/keyboards/feels/feels65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index 23052482e8c..3efb7c99a61 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ferris/0_2/bling/config.h b/keyboards/ferris/0_2/bling/config.h index bed489ca08f..4b2efd378d7 100644 --- a/keyboards/ferris/0_2/bling/config.h +++ b/keyboards/ferris/0_2/bling/config.h @@ -32,3 +32,51 @@ along with this program. If not, see . #define DRIVER_2_LED_TOTAL 7 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/ferris/0_2/config.h b/keyboards/ferris/0_2/config.h index 89eac7ed166..f51e5dd8f15 100644 --- a/keyboards/ferris/0_2/config.h +++ b/keyboards/ferris/0_2/config.h @@ -67,10 +67,8 @@ along with this program. If not, see . /* i2c settings */ #define I2C_DRIVER I2CD2 -#define I2C1_SCL_BANK GPIOB -#define I2C1_SCL 10 -#define I2C1_SDA_BANK GPIOB -#define I2C1_SDA 11 +#define I2C1_SCL_PIN B10 +#define I2C1_SDA_PIN B11 #define I2C1_TIMINGR_PRESC 2U #define I2C1_TIMINGR_SCLDEL 1U #define I2C1_TIMINGR_SDADEL 0U diff --git a/keyboards/ferris/0_2/matrix.c b/keyboards/ferris/0_2/matrix.c index afa8a344cd2..ff0e66d65cd 100644 --- a/keyboards/ferris/0_2/matrix.c +++ b/keyboards/ferris/0_2/matrix.c @@ -59,11 +59,6 @@ extern i2c_status_t mcp23017_status; bool i2c_initialized = 0; i2c_status_t mcp23017_status = I2C_ADDR; -#define I2C2_SCL_BANK GPIOB -#define I2C2_SCL 10 -#define I2C2_SDA_BANK GPIOB -#define I2C2_SDA 11 - uint8_t init_mcp23017(void) { print("init mcp23017\n"); mcp23017_status = I2C_ADDR; diff --git a/keyboards/ferris/0_2/rules.mk b/keyboards/ferris/0_2/rules.mk index b1b9d42fbd0..75ec20b4db3 100644 --- a/keyboards/ferris/0_2/rules.mk +++ b/keyboards/ferris/0_2/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = stm32-dfu # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ferris/keymaps/madhatter/rules.mk b/keyboards/ferris/keymaps/madhatter/rules.mk index 76c1045744d..25e61e4d5bb 100644 --- a/keyboards/ferris/keymaps/madhatter/rules.mk +++ b/keyboards/ferris/keymaps/madhatter/rules.mk @@ -1,2 +1,2 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite TAP_DANCE_ENABLE = yes \ No newline at end of file diff --git a/keyboards/ffkeebs/puca/info.json b/keyboards/ffkeebs/puca/info.json index 0b5b957e632..204f0ca497c 100644 --- a/keyboards/ffkeebs/puca/info.json +++ b/keyboards/ffkeebs/puca/info.json @@ -2,35 +2,105 @@ "keyboard_name": "Puca", "url": "https://ffkeebs.com/collections/puca/", "maintainer": "Sleepdealr", + "layout_aliases": { + "LAYOUT": "LAYOUT_all" + }, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [ { "label": "Rotary", "x": 0.5, "y": 0 }, { "label": "Pg Up", "x": 2, "y": 0 }, { "label": "Pg Dn", "x": 3, "y": 0 }, + { "label": "Layer Toggle", "x": 0, "y": 1.25 }, { "label": "/", "x": 1, "y": 1.25 }, { "label": "*", "x": 2, "y": 1.25 }, { "label": "-", "x": 3, "y": 1.25 }, + { "label": "7", "x": 0, "y": 2.25 }, { "label": "8", "x": 1, "y": 2.25 }, { "label": "9", "x": 2, "y": 2.25 }, - { "label": "+", "x": 3, "y": 2.25, "h": 2 }, - { "label": "+", "x": 4, "y": 2.25 }, + { "label": "+", "x": 3, "y": 2.25 }, + { "label": "+", "x": 4, "y": 2.25, "h": 2 }, + + { "label": "4", "x": 0, "y": 3.25 }, + { "label": "5", "x": 1, "y": 3.25 }, + { "label": "6", "x": 2, "y": 3.25 }, + { "label": "|", "x": 3, "y": 3.25 }, + + { "label": "1", "x": 0, "y": 4.25 }, + { "label": "2", "x": 1, "y": 4.25 }, + { "label": "3", "x": 2, "y": 4.25 }, + { "label": "Enter", "x": 3, "y": 4.25 }, + { "label": "Enter", "x": 4, "y": 4.25, "h": 2 }, + + { "label": "0", "x": 0, "y": 5.25 }, + { "label": "00", "x": 1, "y": 5.25 }, + { "label": ".", "x": 2, "y": 5.25 }, + { "label": ".", "x": 3, "y": 5.25 }, + + { "label": "0", "x": 0, "y": 6.25, "w": 2 } + ] + }, + "LAYOUT_numpad": { + "layout": [ + { "label": "Rotary", "x": 0.5, "y": 0 }, + { "label": "Pg Up", "x": 2, "y": 0 }, + { "label": "Pg Dn", "x": 3, "y": 0 }, + + { "label": "Layer Toggle", "x": 0, "y": 1.25 }, + { "label": "/", "x": 1, "y": 1.25 }, + { "label": "*", "x": 2, "y": 1.25 }, + { "label": "-", "x": 3, "y": 1.25 }, + + { "label": "7", "x": 0, "y": 2.25 }, + { "label": "8", "x": 1, "y": 2.25 }, + { "label": "9", "x": 2, "y": 2.25 }, + { "label": "4", "x": 0, "y": 3.25 }, { "label": "5", "x": 1, "y": 3.25 }, { "label": "6", "x": 2, "y": 3.25 }, - { "label": "|", "x": 4, "y": 3.25 }, + { "label": "+", "x": 3, "y": 2.25, "h": 2 }, + { "label": "1", "x": 0, "y": 4.25 }, { "label": "2", "x": 1, "y": 4.25 }, { "label": "3", "x": 2, "y": 4.25 }, - { "label": "Enter", "x": 3, "y": 4.25, "h": 2 }, - { "label": "Enter", "x": 4, "y": 4.25 }, + { "label": "0", "x": 0, "y": 5.25, "w": 2 }, { "label": ".", "x": 2, "y": 5.25 }, - { "label": ".", "x": 4, "y": 5.25 }, - { "label": "0", "x": 0, "y": 6.25 }, - { "label": "00", "x": 1, "y": 6.25 } + { "label": "Enter", "x": 3, "y": 4.25, "h": 2 } + ] + }, + "LAYOUT_ortho": { + "layout": [ + { "label": "Rotary", "x": 0.5, "y": 0 }, + { "label": "Pg Up", "x": 2, "y": 0 }, + { "label": "Pg Dn", "x": 3, "y": 0 }, + + { "label": "Layer Toggle", "x": 0, "y": 1.25 }, + { "label": "/", "x": 1, "y": 1.25 }, + { "label": "*", "x": 2, "y": 1.25 }, + { "label": "-", "x": 3, "y": 1.25 }, + + { "label": "7", "x": 0, "y": 2.25 }, + { "label": "8", "x": 1, "y": 2.25 }, + { "label": "9", "x": 2, "y": 2.25 }, + { "label": "+", "x": 3, "y": 2.25 }, + + { "label": "4", "x": 0, "y": 3.25 }, + { "label": "5", "x": 1, "y": 3.25 }, + { "label": "6", "x": 2, "y": 3.25 }, + { "label": "|", "x": 3, "y": 3.25 }, + + { "label": "1", "x": 0, "y": 4.25 }, + { "label": "2", "x": 1, "y": 4.25 }, + { "label": "3", "x": 2, "y": 4.25 }, + { "label": "Enter", "x": 3, "y": 4.25 }, + + { "label": "0", "x": 0, "y": 5.25 }, + { "label": "00", "x": 1, "y": 5.25 }, + { "label": ".", "x": 2, "y": 5.25 }, + { "label": "Enter", "x": 3, "y": 5.25 } ] } } diff --git a/keyboards/ffkeebs/puca/keymaps/default/keymap.c b/keyboards/ffkeebs/puca/keymaps/default/keymap.c index fb8a6bc7c12..12c20c0149e 100644 --- a/keyboards/ffkeebs/puca/keymaps/default/keymap.c +++ b/keyboards/ffkeebs/puca/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -/* Copyright 2021 Sleepdealer +/* Copyright 2021 Sleepdealer, James Young for QMK (@noroadsleft) * * 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 @@ -15,38 +15,26 @@ */ #include QMK_KEYBOARD_H -// 00 Functionality -enum custom_keycodes { - MC_00 = SAFE_RANGE, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case MC_00: - if (record->event.pressed) { - SEND_STRING("00"); - } - break; - } - return true; -}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_MUTE, KC_PGUP, KC_PGDN, + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PIPE, + KC_P1, KC_P2, KC_P3, KC_ENTER, KC_ENTER, + KC_P0, MC_00, KC_PDOT, KC_PDOT, + KC_P0 + ), -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - LAYOUT( - KC_MUTE, KC_PGUP, KC_PGDN, - TG(1), KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_PIPE, - KC_P1, KC_P2, KC_P3, KC_ENTER, KC_ENTER, - KC_P0, MC_00, KC_PDOT, KC_PDOT, - KC_P0), - LAYOUT( + [1] = LAYOUT_all( KC_TRNS, RGB_HUI, RGB_VAI, - TG(1), RGB_TOG, RGB_HUD, RGB_VAD, - KC_PGUP, KC_UP, KC_PGDN, RGB_MOD, RGB_MOD, - KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, - KC_INS, KC_HOME, KC_END, RGB_RMOD, RGB_RMOD, - KC_ESC, KC_TRNS, KC_DEL, KC_TRNS, - KC_ESC) + TG(1), RGB_TOG, RGB_HUD, RGB_VAD, + KC_PGUP, KC_UP, KC_PGDN, RGB_MOD, RGB_MOD, + KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_INS, KC_HOME, KC_END, RGB_RMOD, RGB_RMOD, + KC_ESC, KC_TRNS, KC_DEL, KC_TRNS, + KC_ESC + ), + }; diff --git a/keyboards/ffkeebs/puca/keymaps/default_numpad/keymap.c b/keyboards/ffkeebs/puca/keymaps/default_numpad/keymap.c new file mode 100644 index 00000000000..fe676786120 --- /dev/null +++ b/keyboards/ffkeebs/puca/keymaps/default_numpad/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2021 Sleepdealer, James Young for QMK (@noroadsleft) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_numpad( + KC_MUTE, KC_PGUP, KC_PGDN, + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_ENTER + ), + + [1] = LAYOUT_numpad( + _______, RGB_HUI, RGB_VAI, + TG(1), RGB_TOG, RGB_HUD, RGB_VAD, + KC_PGUP, KC_UP, KC_PGDN, + KC_LEFT, KC_DOWN, KC_RGHT, RGB_MOD, + KC_INS, KC_HOME, KC_END, + KC_ESC, KC_DEL, RGB_RMOD + ), + +}; diff --git a/keyboards/ffkeebs/puca/keymaps/default_ortho/keymap.c b/keyboards/ffkeebs/puca/keymaps/default_ortho/keymap.c new file mode 100644 index 00000000000..e734e69745c --- /dev/null +++ b/keyboards/ffkeebs/puca/keymaps/default_ortho/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2021 Sleepdealer, James Young for QMK (@noroadsleft) + * + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_ortho( + KC_MUTE, KC_PGUP, KC_PGDN, + TG(1), KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_PIPE, + KC_P1, KC_P2, KC_P3, KC_ENTER, + KC_P0, MC_00, KC_PDOT, KC_ENTER + ), + + [1] = LAYOUT_ortho( + _______, RGB_HUI, RGB_VAI, + TG(1), RGB_TOG, RGB_HUD, RGB_VAD, + KC_PGUP, KC_UP, KC_PGDN, RGB_MOD, + KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, + KC_INS, KC_HOME, KC_END, RGB_RMOD, + KC_ESC, XXXXXXX, KC_DEL, XXXXXXX + ) + +}; diff --git a/keyboards/ffkeebs/puca/puca.c b/keyboards/ffkeebs/puca/puca.c index e08ac0cb3b3..21944a9e5d5 100644 --- a/keyboards/ffkeebs/puca/puca.c +++ b/keyboards/ffkeebs/puca/puca.c @@ -15,6 +15,20 @@ */ #include "puca.h" +bool process_record_kb(uint16_t keycode, keyrecord_t* record) { + if (!process_record_user(keycode, record)) { + return false; + } + switch (keycode) { + case MC_00: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +} + bool encoder_update_kb(uint8_t index, bool clockwise) { if (!encoder_update_user(index, clockwise)) { return false; } if (clockwise) { @@ -29,7 +43,8 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { // OLED #ifdef OLED_ENABLE __attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } // WPM-responsive animation stuff here # define IDLE_FRAMES 2 # define ANIM_FRAME_DURATION 400 // how long each frame lasts in ms @@ -105,7 +120,7 @@ __attribute__((weak)) void oled_task_user(void) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }}; - + void animation_phase(void) { current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; oled_write_raw_P(idle[abs((IDLE_FRAMES - 1) - current_idle_frame)], ANIM_SIZE); @@ -114,7 +129,7 @@ __attribute__((weak)) void oled_task_user(void) { anim_timer = timer_read32(); animation_phase(); } - + oled_set_cursor(0, 6); oled_write_P(PSTR("PUCA\nPAD\n"), false); oled_write_P(PSTR("-----\n"), false); @@ -129,5 +144,6 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(PSTR("FUNC\n"), false); break; } + return true; } -#endif \ No newline at end of file +#endif diff --git a/keyboards/ffkeebs/puca/puca.h b/keyboards/ffkeebs/puca/puca.h index bc17c9f36f4..ab4dc379169 100644 --- a/keyboards/ffkeebs/puca/puca.h +++ b/keyboards/ffkeebs/puca/puca.h @@ -16,26 +16,86 @@ #pragma once -// K24 is 2U Plus -// K44 is 2u Enter -// K54 is 2u 0 +#include "quantum.h" + +/* Keycodes defined here can be used by any keymap. If you wish to + * define additional keycodes for your personal keymap only, assign + * your first custom keycode to `= NEW_SAFE_RANGE`. + * + * See `process_record_kb()` in `puca.c`. + */ +enum keyboard_keycodes { + MC_00 = SAFE_RANGE, + NEW_SAFE_RANGE, +}; +#define XXX KC_NO -#include "quantum.h" +/* + * ┌───┐ ┌───┬───┐ + * │00 │ │02 │03 │ + * └───┘ └───┴───┘ + * ┌───┬───┬───┬───┐ + * │10 │11 │12 │13 │ + * ├───┼───┼───┼───┤ ┌───┐ + * │20 │21 │22 │23 │ │ │ + * ├───┼───┼───┼───┤ │24 │ 2u Plus + * │30 │31 │32 │33 │ │ │ + * ├───┼───┼───┼───┤ ├───┤ + * │40 │41 │42 │43 │ │ │ + * ├───┼───┼───┼───┤ │44 │ 2u Enter + * │50 │51 │52 │53 │ │ │ + * └───┴───┴───┴───┘ └───┘ + * ┌───────┐ + * │54 │ 2u 0 + * └───────┘ + */ + +#define LAYOUT_all( \ + K00, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, K24,\ + K30, K31, K32, K33, \ + K40, K41, K42, K43, K44,\ + K50, K51, K52, K53, \ + K54 \ +) { \ + { K00, XXX, K02, K03, XXX }, \ + { K10, K11, K12, K13, XXX }, \ + { K20, K21, K22, K23, K24 }, \ + { K30, K31, K32, K33, XXX }, \ + { K40, K41, K42, K43, K44 }, \ + { K50, K51, K52, K53, K54 }, \ +} + +#define LAYOUT_numpad( \ + K00, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, \ + K30, K31, K32, K24, \ + K40, K41, K42, \ + K54, K52, K44 \ +) { \ + { K00, XXX, K02, K03, XXX }, \ + { K10, K11, K12, K13, XXX }, \ + { K20, K21, K22, XXX, K24 }, \ + { K30, K31, K32, XXX, XXX }, \ + { K40, K41, K42, XXX, K44 }, \ + { XXX, XXX, K52, XXX, K54 }, \ +} -#define LAYOUT( \ - K00, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, K24,\ - K30, K31, K32, K33, \ - K40, K41, K42, K43, K44,\ - K50, K51, K52, K53, \ - K54 \ +#define LAYOUT_ortho( \ + K00, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43, \ + K50, K51, K52, K53 \ ) { \ - { K00, KC_NO, K02, K03, KC_NO }, \ - { K10, K11, K12, K13, KC_NO }, \ - { K20, K21, K22, K23, K24 }, \ - { K30, K31, K32, K33, KC_NO }, \ - { K40, K41, K42, K43, K44 }, \ - { K50, K51, K52, K53, K54 }, \ + { K00, XXX, K02, K03, XXX }, \ + { K10, K11, K12, K13, XXX }, \ + { K20, K21, K22, K23, XXX }, \ + { K30, K31, K32, K33, XXX }, \ + { K40, K41, K42, K43, XXX }, \ + { K50, K51, K52, K53, XXX }, \ } diff --git a/keyboards/ffkeebs/puca/readme.md b/keyboards/ffkeebs/puca/readme.md index ff0b2c49ae5..ca4e0f93f93 100644 --- a/keyboards/ffkeebs/puca/readme.md +++ b/keyboards/ffkeebs/puca/readme.md @@ -2,7 +2,7 @@ * Keyboard Maintainer: [Sleepdealer](https://github.com/Sleepdealr) * Hardware Supported: Puca Pad -* Hardware Availability: Puca GB +* Hardware Availability: [Puca GB](https://ffkeebs.com/collections/puca) ## Bootloader diff --git a/keyboards/ffkeebs/puca/rules.mk b/keyboards/ffkeebs/puca/rules.mk index b27ecc458ba..ede448ac230 100644 --- a/keyboards/ffkeebs/puca/rules.mk +++ b/keyboards/ffkeebs/puca/rules.mk @@ -19,7 +19,7 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -ENCODER_ENABLE = yes #Rotary encoder +ENCODER_ENABLE = yes # Enable rotary encoder support +OLED_ENABLE = yes # Enable OLED support -OLED_ENABLE = yes #OLED -LTO_ENABLE = yes # Enable Link Time Optimization to reduce firmware size +LTO_ENABLE = yes # Enable Link Time Optimization to reduce firmware size diff --git a/keyboards/ffkeebs/siris/rules.mk b/keyboards/ffkeebs/siris/rules.mk index 71c43814dc2..812a7965e45 100644 --- a/keyboards/ffkeebs/siris/rules.mk +++ b/keyboards/ffkeebs/siris/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bks65/rules.mk b/keyboards/fjlabs/bks65/rules.mk index 3dc41b847c8..64214ee66aa 100644 --- a/keyboards/fjlabs/bks65/rules.mk +++ b/keyboards/fjlabs/bks65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bks65solder/rules.mk b/keyboards/fjlabs/bks65solder/rules.mk index 3dc41b847c8..64214ee66aa 100644 --- a/keyboards/fjlabs/bks65solder/rules.mk +++ b/keyboards/fjlabs/bks65solder/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/bolsa65/rules.mk b/keyboards/fjlabs/bolsa65/rules.mk index cc8bfbe2104..a49a628735b 100644 --- a/keyboards/fjlabs/bolsa65/rules.mk +++ b/keyboards/fjlabs/bolsa65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/kf87/rules.mk b/keyboards/fjlabs/kf87/rules.mk index ed2c3a4fb5d..509c10d0fdd 100644 --- a/keyboards/fjlabs/kf87/rules.mk +++ b/keyboards/fjlabs/kf87/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/ldk65/rules.mk b/keyboards/fjlabs/ldk65/rules.mk index dbfecbc773e..c6a391a1d5a 100644 --- a/keyboards/fjlabs/ldk65/rules.mk +++ b/keyboards/fjlabs/ldk65/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/midway60/rules.mk b/keyboards/fjlabs/midway60/rules.mk index 57c789f909d..4f873907590 100644 --- a/keyboards/fjlabs/midway60/rules.mk +++ b/keyboards/fjlabs/midway60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/polaris/rules.mk b/keyboards/fjlabs/polaris/rules.mk index 57c789f909d..4f873907590 100644 --- a/keyboards/fjlabs/polaris/rules.mk +++ b/keyboards/fjlabs/polaris/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fjlabs/ready100/rules.mk b/keyboards/fjlabs/ready100/rules.mk index 029a96b33dc..1c5940f4f70 100644 --- a/keyboards/fjlabs/ready100/rules.mk +++ b/keyboards/fjlabs/ready100/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flehrad/bigswitch/bigswitch.h b/keyboards/flehrad/bigswitch/bigswitch.h index ea3d51a1f3b..c6c2f026d5c 100644 --- a/keyboards/flehrad/bigswitch/bigswitch.h +++ b/keyboards/flehrad/bigswitch/bigswitch.h @@ -14,15 +14,13 @@ 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 . */ -#ifndef BIGSWITCH_H -#define BIGSWITCH_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00 \ + k00 \ ) { \ - { K00 } \ + { k00 } \ } - -#endif diff --git a/keyboards/flehrad/bigswitch/config.h b/keyboards/flehrad/bigswitch/config.h index b6fb15d3b71..c0f73366a74 100644 --- a/keyboards/flehrad/bigswitch/config.h +++ b/keyboards/flehrad/bigswitch/config.h @@ -14,8 +14,8 @@ 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 . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -52,5 +52,3 @@ along with this program. If not, see . #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 8 #endif - -#endif diff --git a/keyboards/flehrad/numbrero/rules.mk b/keyboards/flehrad/numbrero/rules.mk index 06898ee79f8..50f5eaf1cd5 100644 --- a/keyboards/flehrad/numbrero/rules.mk +++ b/keyboards/flehrad/numbrero/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flehrad/snagpad/rules.mk b/keyboards/flehrad/snagpad/rules.mk index 56e951edac7..a64baaeb551 100644 --- a/keyboards/flehrad/snagpad/rules.mk +++ b/keyboards/flehrad/snagpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flehrad/tradestation/rules.mk b/keyboards/flehrad/tradestation/rules.mk index 0b8cc74bf24..c129afe553f 100644 --- a/keyboards/flehrad/tradestation/rules.mk +++ b/keyboards/flehrad/tradestation/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index 21500d0e9e3..fae7d941aea 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -112,5 +111,3 @@ along with this program. If not, see . #define RGB_DI_PIN E6 // The pin the LED strip is connected to #define RGBLED_NUM 18 // Number of LEDs in your strip #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/fleuron/fleuron.h b/keyboards/fleuron/fleuron.h index abdccf2371a..38f6bb38bfd 100644 --- a/keyboards/fleuron/fleuron.h +++ b/keyboards/fleuron/fleuron.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef FLEURON_H -#define FLEURON_H + +#pragma once #include "quantum.h" @@ -23,22 +23,19 @@ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_6x16( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, \ - k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f, \ - k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, k4f }, \ - { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5e, k5f } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F } \ } #define LAYOUT_fleuron_grid LAYOUT_ortho_6x16 - -#endif diff --git a/keyboards/flx/lodestone/rules.mk b/keyboards/flx/lodestone/rules.mk index 3a92f5019ec..2542e5d6dc8 100644 --- a/keyboards/flx/lodestone/rules.mk +++ b/keyboards/flx/lodestone/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flx/virgo/rules.mk b/keyboards/flx/virgo/rules.mk index e81dca4b859..16501de0ae8 100644 --- a/keyboards/flx/virgo/rules.mk +++ b/keyboards/flx/virgo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/flygone60/rev3/rules.mk b/keyboards/flygone60/rev3/rules.mk index fdebc503e9f..f1448c6b26e 100644 --- a/keyboards/flygone60/rev3/rules.mk +++ b/keyboards/flygone60/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foostan/cornelius/rules.mk b/keyboards/foostan/cornelius/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/foostan/cornelius/rules.mk +++ b/keyboards/foostan/cornelius/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/for_science/rules.mk b/keyboards/for_science/rules.mk index 82c09f75204..608ac37502e 100644 --- a/keyboards/for_science/rules.mk +++ b/keyboards/for_science/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/forever65/info.json b/keyboards/forever65/info.json index bf879d92d39..6cb2442a08b 100644 --- a/keyboards/forever65/info.json +++ b/keyboards/forever65/info.json @@ -14,7 +14,7 @@ "device_ver": "0x0001" }, "features": { - "bootmagic_lite": true, + "bootmagic": true, "command": false, "console": false, "extrakey": true, diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h index 30e2bd21ac8..7ad7a5c3695 100644 --- a/keyboards/four_banger/config.h +++ b/keyboards/four_banger/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/four_banger/four_banger.h b/keyboards/four_banger/four_banger.h index a6da8dd0b7f..1d735a1f0f7 100644 --- a/keyboards/four_banger/four_banger.h +++ b/keyboards/four_banger/four_banger.h @@ -1,14 +1,11 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_2x2( \ - K00, K01, \ - K10, K11 \ + k00, k01, \ + k10, k11 \ ) { \ - { K00, K01 }, \ - { K10, K11 } \ + { k00, k01 }, \ + { k10, k11 } \ } - -#endif diff --git a/keyboards/four_banger/rules.mk b/keyboards/four_banger/rules.mk index cd13b1bc52b..855e36c3dd2 100644 --- a/keyboards/four_banger/rules.mk +++ b/keyboards/four_banger/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/key65/hotswap/rules.mk b/keyboards/foxlab/key65/hotswap/rules.mk index ab6f3e18391..1074896ac5a 100644 --- a/keyboards/foxlab/key65/hotswap/rules.mk +++ b/keyboards/foxlab/key65/hotswap/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/key65/universal/rules.mk b/keyboards/foxlab/key65/universal/rules.mk index 129979e0631..60e7e46595d 100644 --- a/keyboards/foxlab/key65/universal/rules.mk +++ b/keyboards/foxlab/key65/universal/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/leaf60/hotswap/rules.mk b/keyboards/foxlab/leaf60/hotswap/rules.mk index fb97faa5f0a..0d9012c70b9 100644 --- a/keyboards/foxlab/leaf60/hotswap/rules.mk +++ b/keyboards/foxlab/leaf60/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/leaf60/universal/rules.mk b/keyboards/foxlab/leaf60/universal/rules.mk index c4bc3f9da9c..4fa1fd5e1f3 100644 --- a/keyboards/foxlab/leaf60/universal/rules.mk +++ b/keyboards/foxlab/leaf60/universal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/time80/rules.mk b/keyboards/foxlab/time80/rules.mk index f0fbba59f46..b374eca3368 100644 --- a/keyboards/foxlab/time80/rules.mk +++ b/keyboards/foxlab/time80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/time_re/hotswap/rules.mk b/keyboards/foxlab/time_re/hotswap/rules.mk index 06dd8dc4cbf..4023d7d3f4a 100644 --- a/keyboards/foxlab/time_re/hotswap/rules.mk +++ b/keyboards/foxlab/time_re/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/foxlab/time_re/universal/rules.mk b/keyboards/foxlab/time_re/universal/rules.mk index 8a6e35664be..20ed7beacd6 100644 --- a/keyboards/foxlab/time_re/universal/rules.mk +++ b/keyboards/foxlab/time_re/universal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fr4/southpaw75/rules.mk b/keyboards/fr4/southpaw75/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/fr4/southpaw75/rules.mk +++ b/keyboards/fr4/southpaw75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fr4/unix60/rules.mk b/keyboards/fr4/unix60/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/fr4/unix60/rules.mk +++ b/keyboards/fr4/unix60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index 5d4e0d49e3f..b9aeac38557 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/fractal/rules.mk b/keyboards/fractal/rules.mk index e559bef6459..914a692f9c6 100755 --- a/keyboards/fractal/rules.mk +++ b/keyboards/fractal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/freyr/rules.mk b/keyboards/freyr/rules.mk index ef898806f21..f20cfda3fa5 100644 --- a/keyboards/freyr/rules.mk +++ b/keyboards/freyr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/friedrich/rules.mk b/keyboards/friedrich/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/friedrich/rules.mk +++ b/keyboards/friedrich/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/frooastboard/rules.mk b/keyboards/frooastboard/rules.mk index a3db8550f28..dde9957c715 100644 --- a/keyboards/frooastboard/rules.mk +++ b/keyboards/frooastboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/function96/v1/rules.mk b/keyboards/function96/v1/rules.mk index 8fac9d23a55..99d54b5c275 100644 --- a/keyboards/function96/v1/rules.mk +++ b/keyboards/function96/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/function96/v2/rules.mk b/keyboards/function96/v2/rules.mk index 8fac9d23a55..99d54b5c275 100644 --- a/keyboards/function96/v2/rules.mk +++ b/keyboards/function96/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/funky40/rules.mk b/keyboards/funky40/rules.mk index 962a601b164..9b70c8d5b78 100644 --- a/keyboards/funky40/rules.mk +++ b/keyboards/funky40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gboards/gergoplex/rules.mk b/keyboards/gboards/gergoplex/rules.mk index 1d0ba8cae2b..422c8411461 100644 --- a/keyboards/gboards/gergoplex/rules.mk +++ b/keyboards/gboards/gergoplex/rules.mk @@ -9,7 +9,7 @@ EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work COMMAND_ENABLE = yes -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite LAYOUTS = split_3x5_3 diff --git a/keyboards/geekboards/macropad_v2/config.h b/keyboards/geekboards/macropad_v2/config.h index 4b0949ff954..cdb3a7dbe82 100644 --- a/keyboards/geekboards/macropad_v2/config.h +++ b/keyboards/geekboards/macropad_v2/config.h @@ -43,28 +43,59 @@ #ifdef RGB_MATRIX_ENABLE #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_UP_DOWN -#define RGB_MATRIX_STARTUP_SAT 255 -#define RGB_MATRIX_STARTUP_VAL 192 -#define RGB_MATRIX_STARTUP_SPD 30 +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_UP_DOWN +# define RGB_MATRIX_STARTUP_SAT 255 +# define RGB_MATRIX_STARTUP_VAL 192 +# define RGB_MATRIX_STARTUP_SPD 30 #endif //RGB_MATRIX_ENABLE #define RGB_DISABLE_WHEN_USB_SUSPENDED diff --git a/keyboards/geekboards/macropad_v2/rules.mk b/keyboards/geekboards/macropad_v2/rules.mk index 3b3c2bb53c6..2462b08410f 100644 --- a/keyboards/geekboards/macropad_v2/rules.mk +++ b/keyboards/geekboards/macropad_v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/geekboards/tester/config.h b/keyboards/geekboards/tester/config.h index 3e3daccd577..ac3b95c7e76 100644 --- a/keyboards/geekboards/tester/config.h +++ b/keyboards/geekboards/tester/config.h @@ -26,14 +26,59 @@ #define RGB_DISABLE_AFTER_TIMEOUT 0 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110101 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 8 -#define DRIVER_2_LED_TOTAL 0 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110101 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 8 +# define DRIVER_2_LED_TOTAL 0 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif diff --git a/keyboards/geekboards/tester/rules.mk b/keyboards/geekboards/tester/rules.mk index 63c594db45e..1783008e01a 100644 --- a/keyboards/geekboards/tester/rules.mk +++ b/keyboards/geekboards/tester/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/geekboards/tester/tester.c b/keyboards/geekboards/tester/tester.c index 532df7a5310..70865c461f4 100644 --- a/keyboards/geekboards/tester/tester.c +++ b/keyboards/geekboards/tester/tester.c @@ -1,5 +1,5 @@ #include "tester.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/geminate60/rules.mk b/keyboards/geminate60/rules.mk index d4807fc2736..722be24d1b1 100644 --- a/keyboards/geminate60/rules.mk +++ b/keyboards/geminate60/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/generic_panda/panda65_01/rules.mk b/keyboards/generic_panda/panda65_01/rules.mk index a095bbb9e74..c2aea0d505f 100644 --- a/keyboards/generic_panda/panda65_01/rules.mk +++ b/keyboards/generic_panda/panda65_01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/genone/eclipse_65/rules.mk b/keyboards/genone/eclipse_65/rules.mk index 51ae8658e1c..9d2145ff0a0 100644 --- a/keyboards/genone/eclipse_65/rules.mk +++ b/keyboards/genone/eclipse_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/genone/g1_65/rules.mk b/keyboards/genone/g1_65/rules.mk index 51ae8658e1c..9d2145ff0a0 100644 --- a/keyboards/genone/g1_65/rules.mk +++ b/keyboards/genone/g1_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gergo/keymaps/oled/keymap.c b/keyboards/gergo/keymaps/oled/keymap.c index 7e19a799ee4..ab374b93322 100644 --- a/keyboards/gergo/keymaps/oled/keymap.c +++ b/keyboards/gergo/keymaps/oled/keymap.c @@ -130,13 +130,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { static const char PROGMEM font_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0}; oled_write_P(font_logo, false); + return false; } //for (int i = 0; i < fontLen; i++) { //oled_write_char(pgm_read_byte(lain+i), false); diff --git a/keyboards/gergo/rules.mk b/keyboards/gergo/rules.mk index eee431f40aa..b5752ad934d 100644 --- a/keyboards/gergo/rules.mk +++ b/keyboards/gergo/rules.mk @@ -8,7 +8,7 @@ CUSTOM_MATRIX = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = yes COMMAND_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite DEBOUNCE_TYPE = sym_eager_pr SRC += matrix.c diff --git a/keyboards/getta25/keymaps/oled/keymap.c b/keyboards/getta25/keymaps/oled/keymap.c index 4fbaf3ec283..7d8151b86d3 100644 --- a/keyboards/getta25/keymaps/oled/keymap.c +++ b/keyboards/getta25/keymaps/oled/keymap.c @@ -182,7 +182,7 @@ void render_status(void) { render_keylock_status(host_keyboard_led_state()); } -void oled_task_user(void) { +bool oled_task_user(void) { static const char PROGMEM font_logo[] = { 0x80,0x81,0x82,0x83,0x84, 0xa0,0xa1,0xa2,0xa3,0xa4, @@ -199,6 +199,7 @@ void oled_task_user(void) { oled_write_P(font_logo, false); render_status(); // Renders the current keyboard state (layer, lock) + return false; } #endif diff --git a/keyboards/ggkeyboards/genesis/hotswap/rules.mk b/keyboards/ggkeyboards/genesis/hotswap/rules.mk index c5db939979c..26dae43913d 100644 --- a/keyboards/ggkeyboards/genesis/hotswap/rules.mk +++ b/keyboards/ggkeyboards/genesis/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ggkeyboards/genesis/solder/rules.mk b/keyboards/ggkeyboards/genesis/solder/rules.mk index c5db939979c..26dae43913d 100644 --- a/keyboards/ggkeyboards/genesis/solder/rules.mk +++ b/keyboards/ggkeyboards/genesis/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/revc/rules.mk b/keyboards/gh60/revc/rules.mk index da3aaf32378..395f5dc83ad 100644 --- a/keyboards/gh60/revc/rules.mk +++ b/keyboards/gh60/revc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/satan/keymaps/denolfe/rules.mk b/keyboards/gh60/satan/keymaps/denolfe/rules.mk index e10bd7a09e4..07feaa8a407 100644 --- a/keyboards/gh60/satan/keymaps/denolfe/rules.mk +++ b/keyboards/gh60/satan/keymaps/denolfe/rules.mk @@ -2,7 +2,7 @@ # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk index f945cdf6e34..bb2d79b90b3 100644 --- a/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk +++ b/keyboards/gh60/satan/keymaps/iso_split_rshift/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk b/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk index b380a2710e1..7041837aabb 100644 --- a/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk +++ b/keyboards/gh60/satan/keymaps/olligranlund_iso/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/gh60/satan/rules.mk b/keyboards/gh60/satan/rules.mk index 98178e17d5e..11fca23b724 100644 --- a/keyboards/gh60/satan/rules.mk +++ b/keyboards/gh60/satan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gh60/v1p3/rules.mk b/keyboards/gh60/v1p3/rules.mk index d5d984b208c..855a9c1e3fb 100644 --- a/keyboards/gh60/v1p3/rules.mk +++ b/keyboards/gh60/v1p3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h index 68a405c8d98..71adb3e2499 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/gh80_3000/gh80_3000.h b/keyboards/gh80_3000/gh80_3000.h index 803d30ece51..9c58d6fe585 100644 --- a/keyboards/gh80_3000/gh80_3000.h +++ b/keyboards/gh80_3000/gh80_3000.h @@ -1,138 +1,143 @@ -#ifndef GH80_3000 -#define GH80_3000 +#pragma once #include "quantum.h" +#define XXX KC_NO + // default keymap: all 117 keys with ANSI Enter #define LAYOUT( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, K007, K008, K009, K010, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K210, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, K810, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K710, K906, K907, K908, K909, K910, \ - KA00, KA01, KA02, KA03, K804, K805, K806, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA08, KA09, KA10 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, k07, k08, k09, k0A, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k2A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, k8A, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k7A, k96, k97, k98, k99, k9A, \ + kA0, kA1, kA2, kA3, k84, k85, k86, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA8, kA9, kAA \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, K710 }, \ - { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, K910 }, \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, k7A }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA } \ } // default ISO keymap: all 117 keys with ISO Enter #define LAYOUT_iso( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, K007, K008, K009, K010, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K210, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, K810, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K710, K906, K907, K908, K909, K910, \ - KA00, KA01, KA02, KA03, K804, K805, K806, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA08, KA09, KA10 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, k07, k08, k09, k0A, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k2A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, k8A, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k7A, k96, k97, k98, k99, k9A, \ + kA0, kA1, kA2, kA3, k84, k85, k86, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA8, kA9, kAA \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210 }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, K710 }, \ - { K800, K801, K802, K803, K804, K805, K806, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, K910 }, \ - { KA00, KA01, KA02, KA03, KA04, KA05, KA06, KA07, KA08, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, k7A }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, k9A }, \ + { kA0, kA1, kA2, kA3, kA4, kA5, kA6, kA7, kA8, kA9, kAA } \ } // Standard ANSI Keyboard #define LAYOUT_fullsize_ansi( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, \ - K900, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA01, KA02, K805, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, \ + k90, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA1, kA2, k85, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, KC_NO, K902, K903, K904, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KA01, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, XXX, k92, k93, k94, k95, k96, k97, k98, k99, XXX }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Standard ISO Keyboard #define LAYOUT_fullsize_iso( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA01, KA02, K805, K604, K605, K904, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA1, kA2, k85, k64, k65, k94, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, K604, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, K904, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KA01, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, k94, k95, k96, k97, k98, k99, XXX }, \ + { kA0, kA1, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Winkeyless ANSI Keyboard #define LAYOUT_fullsize_ansi_wkl( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K510, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K610, K807, K808, K809, \ - K900, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA02, K805, K605, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k5A, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k6A, k87, k88, k89, \ + k90, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA2, k85, k65, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, KC_NO, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, KC_NO, K902, K903, KC_NO, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KC_NO, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, XXX, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, XXX, k92, k93, XXX, k95, k96, k97, k98, k99, XXX }, \ + { kA0, XXX, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } // Winkeyless ISO Keyboard #define LAYOUT_fullsize_iso_wkl( \ - K000, K001, K002, K003, K300, K301, K302, K303, K306, K307, K308, K309, K310, K004, K005, K006, \ - K100, K101, K102, K103, K400, K401, K402, K403, K404, K405, K406, K407, K408, K410, K104, K105, K106, K107, K108, K109, K110, \ - K200, K201, K202, K203, K500, K501, K502, K503, K505, K506, K507, K508, K509, K204, K205, K206, K207, K208, K209, K810, \ - K800, K801, K802, K803, K600, K601, K602, K603, K606, K607, K608, K609, K510, K610, K807, K808, K809, \ - K900, K901, K902, K903, K700, K701, K702, K703, K705, K706, K707, K708, K709, K906, K907, K908, K909, KA10, \ - KA00, KA02, K805, K605, K905, KA04, KA05, KA06, KA07, KA09 \ + k00, k01, k02, k03, k30, k31, k32, k33, k36, k37, k38, k39, k3A, k04, k05, k06, \ +\ + k10, k11, k12, k13, k40, k41, k42, k43, k44, k45, k46, k47, k48, k4A, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k50, k51, k52, k53, k55, k56, k57, k58, k59, k24, k25, k26, k27, k28, k29, k8A, \ + k80, k81, k82, k83, k60, k61, k62, k63, k66, k67, k68, k69, k5A, k6A, k87, k88, k89, \ + k90, k91, k92, k93, k70, k71, k72, k73, k75, k76, k77, k78, k79, k96, k97, k98, k99, kAA, \ + kA0, kA2, k85, k65, k95, kA4, kA5, kA6, kA7, kA9 \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, KC_NO }, \ - { K300, K301, K302, K303, KC_NO, KC_NO, K306, K307, K308, K309, K310 }, \ - { K400, K401, K402, K403, K404, K405, K406, K407, K408, KC_NO, K410 }, \ - { K500, K501, K502, K503, KC_NO, K505, K506, K507, K508, K509, K510 }, \ - { K600, K601, K602, K603, KC_NO, K605, K606, K607, K608, K609, K610 }, \ - { K700, K701, K702, K703, KC_NO, K705, K706, K707, K708, K709, KC_NO }, \ - { K800, K801, K802, K803, KC_NO, K805, KC_NO, K807, K808, K809, K810 }, \ - { K900, K901, K902, K903, KC_NO, K905, K906, K907, K908, K909, KC_NO }, \ - { KA00, KC_NO, KA02, KC_NO, KA04, KA05, KA06, KA07, KC_NO, KA09, KA10 } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, k36, k37, k38, k39, k3A }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, XXX, k4A }, \ + { k50, k51, k52, k53, XXX, k55, k56, k57, k58, k59, k5A }, \ + { k60, k61, k62, k63, XXX, k65, k66, k67, k68, k69, k6A }, \ + { k70, k71, k72, k73, XXX, k75, k76, k77, k78, k79, XXX }, \ + { k80, k81, k82, k83, XXX, k85, XXX, k87, k88, k89, k8A }, \ + { k90, k91, k92, k93, XXX, k95, k96, k97, k98, k99, XXX }, \ + { kA0, XXX, kA2, XXX, kA4, kA5, kA6, kA7, XXX, kA9, kAA } \ } - -#endif diff --git a/keyboards/gingham/rules.mk b/keyboards/gingham/rules.mk index 63bf46ff8f8..9f2fc0ee5c4 100644 --- a/keyboards/gingham/rules.mk +++ b/keyboards/gingham/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gkeyboard/gkb_m16/rules.mk b/keyboards/gkeyboard/gkb_m16/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/gkeyboard/gkb_m16/rules.mk +++ b/keyboards/gkeyboard/gkb_m16/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c b/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c index 834727827c0..5f3e3f5fd8f 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c +++ b/keyboards/gmmk/pro/ansi/keymaps/benschaeff/keymap.c @@ -20,7 +20,7 @@ enum userspace_layers { }; //custom keycodes -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use +#define MODS_ALT_MASK (MOD_BIT(KC_LALT)) // Make ALT layer for encoder use #define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)) // Make CTRL layer for encoder use #define SWAP_L SGUI(KC_LEFT) // Swap application to left display #define SWAP_R SGUI(KC_RGHT) // Swap application to right display diff --git a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk index 90ea42dee51..1ffc2058a26 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/jonavin/rules.mk @@ -1,7 +1,7 @@ VIA_ENABLE = yes MOUSEKEY_ENABLE = no TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite TD_LSFT_CAPSLOCK_ENABLE = yes IDLE_TIMEOUT_ENABLE = yes diff --git a/keyboards/gmmk/pro/ansi/keymaps/mattgauf/ansi.c b/keyboards/gmmk/pro/ansi/keymaps/mattgauf/ansi.c index b09af297b86..52c9dfdf991 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/mattgauf/ansi.c +++ b/keyboards/gmmk/pro/ansi/keymaps/mattgauf/ansi.c @@ -18,7 +18,7 @@ #include "ansi.h" #ifdef RGB_MATRIX_ENABLE -led_config_t __flash g_led_config = {{ +led_config_t PROGMEM g_led_config = {{ { 4, NO_LED, NO_LED, 95, 65, 79, 5, 28 }, { 8, 2, 9, 0, 10, 75, 1, 7 }, { 14, 3, 15, NO_LED, 16, 86, 6, 13 }, diff --git a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk index 925d8a5a550..a3f5bfd35c0 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk +++ b/keyboards/gmmk/pro/ansi/keymaps/paddlegame/rules.mk @@ -1,4 +1,4 @@ MOUSEKEY_ENABLE = no -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite RGB_MATRIX_ENABLE = yes ENCODER_ENABLE = yes diff --git a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h index 2566fc6f9cb..78ff96f8b70 100644 --- a/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h +++ b/keyboards/gmmk/pro/ansi/keymaps/stickandgum/config.h @@ -31,45 +31,45 @@ #define RGB_MATRIX_KEYPRESSES // REACTIVE, SPLASH modes // Soon we need to ENABLE modes by DEFAULT soon as per: https://github.com/qmk/qmk_firmware/pull/13758 Thanks @noroadsleft - // #define DISABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color. - // #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard. - // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow! - #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho). - // #define DISABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!) - // #define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white) - // #define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black) - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL) - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above - // #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black) - #define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow - // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right - #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center. - #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points. - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right - // #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes. - #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard - #define DISABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above. - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-) - #define DISABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better. - // #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above. - #define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back - #define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left - #define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right - // #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys! - // #define DISABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix! - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise) - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo. - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade. - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys) - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades - #define DISABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black. - #define DISABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black. - #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead). - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead). +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // BUILT IN (MAPPED!) Static single color. +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Accenting various keys on the keyboard. +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Top down rainbow! +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Left Right Rainbow (the top-down is better imho). + // #undef ENABLE_RGB_MATRIX_BREATHING // Built in (MAPPED!) + // #undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right (with white) + // #undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right (with black) +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades sat (RGB_MATRIX_CYCLE_PINWHEEL) +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // See above +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // See above + // #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness (with black) +# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard cycling through rainbow + // #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // BUILT IN (MAPPED!) Full Rainbow Left to Right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Rainbow circles coming to center. +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Two Rainbow circles coming to 1/3 and 2/3 points. +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right + // #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // BUILT IN (MAPPED!) - Consider disabling this - my poor eyes. +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Two rainbows spinning around keyboards +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Similar to above. +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Enough of the spinning rainbows - we get it! :-) +# undef ENABLE_RGB_MATRIX_RAINDROPS // Jellybeans are better. + // #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation - better than above. +# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right + // #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // Hot keys! + // #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // The Matrix! +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Key hits shown in current hue - all other keys black: wide slightly better imo +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Key hits shown in current hue - all other keys shifted hue + // #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse around a single key hit then fades value out (black otherwise) +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // same as above but a bit too intense imo. +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Column and Row single color fade. +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Column and Row single color fade. (Multi-keys) +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of key hit then fades +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multi-key hit then fades +# undef ENABLE_RGB_MATRIX_SPLASH // Full rainbow pulses from key hit. All else black. +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full rainbow pulses from multi-keys. All else black. +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Single color pulses from key hit. All else black. (Using solid_reactive_wide instead). +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Single color pulses from muli-keys. All else black. (Using solid_reactive_wide instead). #endif diff --git a/keyboards/gmmk/pro/ansi/rules.mk b/keyboards/gmmk/pro/ansi/rules.mk index ee84c487238..a10fe8e5ca9 100644 --- a/keyboards/gmmk/pro/ansi/rules.mk +++ b/keyboards/gmmk/pro/ansi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gmmk/pro/config.h b/keyboards/gmmk/pro/config.h index 693b86539be..bb2cca19216 100644 --- a/keyboards/gmmk/pro/config.h +++ b/keyboards/gmmk/pro/config.h @@ -65,6 +65,55 @@ #define DRIVER_COUNT 2 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* 1000Hz USB polling - it's the default on stock firmware */ #define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/gmmk/pro/iso/rules.mk b/keyboards/gmmk/pro/iso/rules.mk index ee84c487238..a10fe8e5ca9 100644 --- a/keyboards/gmmk/pro/iso/rules.mk +++ b/keyboards/gmmk/pro/iso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gorthage_truck/rules.mk b/keyboards/gorthage_truck/rules.mk index a48c2c8768b..21c0c67b117 100644 --- a/keyboards/gorthage_truck/rules.mk +++ b/keyboards/gorthage_truck/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gray_studio/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h index ed4a7299718..85ebbab61bc 100644 --- a/keyboards/gray_studio/cod67/cod67.h +++ b/keyboards/gray_studio/cod67/cod67.h @@ -13,24 +13,21 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef COD67_H -#define COD67_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K48, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K0D, K49, K4A, K4B, K4C, K4D \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k48, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k0D, k49, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk index 085a80ab92c..7e7e2133aa4 100644 --- a/keyboards/gray_studio/space65/rules.mk +++ b/keyboards/gray_studio/space65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gray_studio/think65/hotswap/rules.mk b/keyboards/gray_studio/think65/hotswap/rules.mk index b2fb6341b76..cc1e1b509ca 100644 --- a/keyboards/gray_studio/think65/hotswap/rules.mk +++ b/keyboards/gray_studio/think65/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gray_studio/think65/solder/rules.mk b/keyboards/gray_studio/think65/solder/rules.mk index b2fb6341b76..cc1e1b509ca 100644 --- a/keyboards/gray_studio/think65/solder/rules.mk +++ b/keyboards/gray_studio/think65/solder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/grid600/press/rules.mk b/keyboards/grid600/press/rules.mk index 65cc989ca1c..1efd48fa9de 100644 --- a/keyboards/grid600/press/rules.mk +++ b/keyboards/grid600/press/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/gskt00/config.h b/keyboards/gskt00/config.h deleted file mode 100755 index 8ab0583cc8e..00000000000 --- a/keyboards/gskt00/config.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6061 -#define DEVICE_VER 0x0001 -#define MANUFACTURER inachie -#define PRODUCT GSKT00 - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { F1, D1, D2, D4, D6, F7, B0, F4 } -#define MATRIX_COL_PINS { F6, D7, F5, C7, B4, C6, B6, B5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/gskt00/gskt00.c b/keyboards/gskt00/gskt00.c deleted file mode 100755 index 89a0040ff37..00000000000 --- a/keyboards/gskt00/gskt00.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "gskt00.h" - diff --git a/keyboards/gskt00/gskt00.h b/keyboards/gskt00/gskt00.h deleted file mode 100755 index 90e9a1ad5ac..00000000000 --- a/keyboards/gskt00/gskt00.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef GSKT00_H -#define GSKT00_H - -#include "quantum.h" - -#define LAYOUT_all( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_iso_tsangan( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K24, K23, /* enter */ \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_ansi_tsangan( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { KC_NO, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#endif diff --git a/keyboards/gskt00/info.json b/keyboards/gskt00/info.json deleted file mode 100644 index 0b81c585143..00000000000 --- a/keyboards/gskt00/info.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "keyboard_name": "gskt00", - "url": "", - "maintainer": "nachie", - "layouts": { - "LAYOUT_60_ansi_tsangan": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] - }, - - "LAYOUT_60_iso_tsangan": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] - }, - - "LAYOUT_all": { - "layout": [ - {"label":"Esc", "x":0, "y":0}, - {"label":"1", "x":1, "y":0}, - {"label":"2", "x":2, "y":0}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0}, - {"label":"5", "x":5, "y":0}, - {"label":"6", "x":6, "y":0}, - {"label":"7", "x":7, "y":0}, - {"label":"8", "x":8, "y":0}, - {"label":"9", "x":9, "y":0}, - {"label":"0", "x":10, "y":0}, - {"label":"-", "x":11, "y":0}, - {"label":"=", "x":12, "y":0}, - {"label":"\\", "x":13, "y":0}, - {"label":"`", "x":14, "y":0}, - {"label":"Tab", "x":0, "y":1, "w":1.5}, - {"label":"Q", "x":1.5, "y":1}, - {"label":"W", "x":2.5, "y":1}, - {"label":"E", "x":3.5, "y":1}, - {"label":"R", "x":4.5, "y":1}, - {"label":"T", "x":5.5, "y":1}, - {"label":"Y", "x":6.5, "y":1}, - {"label":"U", "x":7.5, "y":1}, - {"label":"I", "x":8.5, "y":1}, - {"label":"O", "x":9.5, "y":1}, - {"label":"P", "x":10.5, "y":1}, - {"label":"[", "x":11.5, "y":1}, - {"label":"]", "x":12.5, "y":1}, - {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, - {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, - {"label":"A", "x":1.75, "y":2}, - {"label":"S", "x":2.75, "y":2}, - {"label":"D", "x":3.75, "y":2}, - {"label":"F", "x":4.75, "y":2}, - {"label":"G", "x":5.75, "y":2}, - {"label":"H", "x":6.75, "y":2}, - {"label":"J", "x":7.75, "y":2}, - {"label":"K", "x":8.75, "y":2}, - {"label":"L", "x":9.75, "y":2}, - {"label":";", "x":10.75, "y":2}, - {"label":"'", "x":11.75, "y":2}, - {"label":"Enter", "x":12.75, "y":2, "w":2.25}, - {"label":"Shift", "x":0, "y":3, "w":1.25}, - {"label":"ISO \\", "x":1.25, "y":3}, - {"label":"Z", "x":2.25, "y":3}, - {"label":"X", "x":3.25, "y":3}, - {"label":"C", "x":4.25, "y":3}, - {"label":"V", "x":5.25, "y":3}, - {"label":"B", "x":6.25, "y":3}, - {"label":"N", "x":7.25, "y":3}, - {"label":"M", "x":8.25, "y":3}, - {"label":",", "x":9.25, "y":3}, - {"label":".", "x":10.25, "y":3}, - {"label":"/", "x":11.25, "y":3}, - {"label":"Shift", "x":12.25, "y":3, "w":1.75}, - {"label":"Fn", "x":14, "y":3}, - {"label":"Ctrl", "x":0, "y":4, "w":1.5}, - {"label":"GUI", "x":1.5, "y":4}, - {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space", "x":4, "y":4, "w":7}, - {"label":"Alt", "x":11, "y":4, "w":1.5}, - {"label":"GUI", "x":12.5, "y":4}, - {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} - ] - } - } -} diff --git a/keyboards/gskt00/keymaps/default/keymap.c b/keyboards/gskt00/keymaps/default/keymap.c deleted file mode 100755 index 225d0224ea3..00000000000 --- a/keyboards/gskt00/keymaps/default/keymap.c +++ /dev/null @@ -1,37 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* QWERTY */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, - KC_TAB, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), - KC_LGUI, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(3)), - - /* DVORAK */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, - MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), - - /* COLEMAK */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), - - /* FUNCTION */ - LAYOUT_all( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_PAUS, KC_DEL, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG) - -}; diff --git a/keyboards/gskt00/readme.md b/keyboards/gskt00/readme.md deleted file mode 100644 index ad03ac819f2..00000000000 --- a/keyboards/gskt00/readme.md +++ /dev/null @@ -1,17 +0,0 @@ -# GSKT-00 PCB - -Firmware for the GSKT-00 PCB - -Keyboard Maintainer: [/u/iNachie](https://github.com/nachie) -Hardware Supported: GSKT-00 PCB -Hardware Availability: [/u/iNachie](https://www.reddit.com/user/inachie/) - -Make example for this keyboard (after setting up your build environment): - - make gskt00:default - -Or to make and flash: - - make gskt00:default:dfu - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gskt00/rules.mk b/keyboards/gskt00/rules.mk deleted file mode 100755 index 4e262e042fa..00000000000 --- a/keyboards/gskt00/rules.mk +++ /dev/null @@ -1,21 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = no - -LAYOUTS = 60_ansi_tsangan 60_iso_tsangan diff --git a/keyboards/gvalchca/ga150/rules.mk b/keyboards/gvalchca/ga150/rules.mk index 0e838d5c5b2..9ae669ce03f 100644 --- a/keyboards/gvalchca/ga150/rules.mk +++ b/keyboards/gvalchca/ga150/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/gvalchca/spaccboard/rules.mk b/keyboards/gvalchca/spaccboard/rules.mk index 08d857b5eb7..8d02eb74906 100644 --- a/keyboards/gvalchca/spaccboard/rules.mk +++ b/keyboards/gvalchca/spaccboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/h0oni/hotduck/rules.mk b/keyboards/h0oni/hotduck/rules.mk index 421c12247b0..5315f0856de 100644 --- a/keyboards/h0oni/hotduck/rules.mk +++ b/keyboards/h0oni/hotduck/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hadron/hadron.h b/keyboards/hadron/hadron.h index c11774729f1..349311270ee 100644 --- a/keyboards/hadron/hadron.h +++ b/keyboards/hadron/hadron.h @@ -1,33 +1,27 @@ -#ifndef HADRON_H -#define HADRON_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_hadron_ver0 - #include "ver0.h" -#endif -#ifdef KEYBOARD_hadron_ver2 - #include "ver2.h" -#endif -#ifdef KEYBOARD_hadron_ver3 - #include "ver3.h" +#if defined(KEYBOARD_hadron_ver0) +# include "ver0.h" +#elif defined(KEYBOARD_hadron_ver2) +# include "ver2.h" +#elif defined(KEYBOARD_hadron_ver3) +# include "ver3.h" #endif +#define XXX KC_NO #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ - ) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, KC_NO, KC_NO, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - - -#endif diff --git a/keyboards/hadron/i2c.c b/keyboards/hadron/i2c.c deleted file mode 100644 index cd2b835d501..00000000000 --- a/keyboards/hadron/i2c.c +++ /dev/null @@ -1,166 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include "i2c.h" - -#ifdef USE_I2C - -// Limits the amount of we wait for any one i2c transaction. -// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is -// 9 bits, a single transaction will take around 90μs to complete. -// -// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit -// poll loop takes at least 8 clock cycles to execute -#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 - -#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) - -volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -static volatile uint8_t slave_buffer_pos; -static volatile bool slave_has_register_set = false; - -// Wait for an i2c operation to finish -inline static -void i2c_delay(void) { - uint16_t lim = 0; - while(!(TWCR & (1<10. - // Check datasheets for more info. - TWBR = ((F_CPU/SCL_CLOCK)-16)/2; -} - -// Start a transaction with the given i2c slave address. The direction of the -// transfer is set with I2C_READ and I2C_WRITE. -// returns: 0 => success -// 1 => error -uint8_t i2c_master_start(uint8_t address) { - TWCR = (1< slave ACK -// 1 => slave NACK -uint8_t i2c_master_write(uint8_t data) { - TWDR = data; - TWCR = (1<= SLAVE_BUFFER_SIZE ) { - ack = 0; - slave_buffer_pos = 0; - } - slave_has_register_set = true; - } else { - i2c_slave_buffer[slave_buffer_pos] = TWDR; - BUFFER_POS_INC(); - } - break; - - case TW_ST_SLA_ACK: - case TW_ST_DATA_ACK: - // master has addressed this device as a slave transmitter and is - // requesting data. - TWDR = i2c_slave_buffer[slave_buffer_pos]; - BUFFER_POS_INC(); - break; - - case TW_BUS_ERROR: // something went wrong, reset twi state - TWCR = 0; - default: - break; - } - // Reset everything, so we are ready for the next TWI interrupt - TWCR |= (1< - -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -#define I2C_READ 1 -#define I2C_WRITE 0 - -#define I2C_ACK 1 -#define I2C_NACK 0 - -#define SLAVE_BUFFER_SIZE 0x10 - -// i2c SCL clock frequency -#define SCL_CLOCK 800000L - -extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; - -void i2c_master_init(void); -uint8_t i2c_master_start(uint8_t address); -void i2c_master_stop(void); -uint8_t i2c_master_write(uint8_t data); -uint8_t i2c_master_read(int); -void i2c_reset_state(void); -void i2c_slave_init(uint8_t address); - - -static inline unsigned char i2c_start_read(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_READ); -} - -static inline unsigned char i2c_start_write(unsigned char addr) { - return i2c_master_start((addr << 1) | I2C_WRITE); -} - -// from SSD1306 scrips -extern unsigned char i2c_rep_start(unsigned char addr); -extern void i2c_start_wait(unsigned char addr); -extern unsigned char i2c_readAck(void); -extern unsigned char i2c_readNak(void); -extern unsigned char i2c_read(unsigned char ack); - -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/hadron/ver2/config.h b/keyboards/hadron/ver2/config.h index e051db209cb..c992f7fe339 100644 --- a/keyboards/hadron/ver2/config.h +++ b/keyboards/hadron/ver2/config.h @@ -28,10 +28,8 @@ along with this program. If not, see . #define MATRIX_COL_PINS { F6, F7, D6, C7, F5, F4, F1, F0, D2, D3, D5, B3, B2, B1, B0 } #define UNUSED_PINS - -#define USE_I2C -#define SSD1306OLED -#define OLED_ROTATE180 +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps /* ws2812 RGB LED*/ #define RGB_DI_PIN D4 diff --git a/keyboards/hadron/ver2/keymaps/default/keymap.c b/keyboards/hadron/ver2/keymaps/default/keymap.c index 8e3d50d3d7d..f24239aa22a 100644 --- a/keyboards/hadron/ver2/keymaps/default/keymap.c +++ b/keyboards/hadron/ver2/keymaps/default/keymap.c @@ -1,10 +1,4 @@ #include QMK_KEYBOARD_H -#ifdef USE_I2C -#include "i2c.h" -#endif -#ifdef SSD1306OLED -#include "ssd1306.h" -#endif //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -18,8 +12,8 @@ extern rgblight_config_t rgblight_config; #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, @@ -307,115 +301,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -//Functions for ver2 -#ifdef KEYBOARD_hadron_ver2 -#include void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } +#ifdef AUDIO_ENABLE + startup_user(); #endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1<sort lines), and use this format: - - * **folder_name** description - -# List of Planck keymaps - -* **default** default Planck layout diff --git a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c index c63ae938559..74f95b4b75a 100644 --- a/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c +++ b/keyboards/hadron/ver2/keymaps/side_numpad/keymap.c @@ -1,15 +1,4 @@ #include QMK_KEYBOARD_H -#include -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#ifdef USE_I2C -#include "i2c.h" -#endif -#ifdef SSD1306OLED -#include "ssd1306.h" -#endif -extern keymap_config_t keymap_config; //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; @@ -19,12 +8,12 @@ extern rgblight_config_t rgblight_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. #define _QWERTY 0 -#define _LOWER 3 -#define _RAISE 4 -#define _FNLAYER 6 -#define _NUMLAY 7 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _LOWER 1 +#define _RAISE 2 +#define _FNLAYER 3 +#define _NUMLAY 4 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, @@ -41,10 +30,7 @@ enum preonic_keycodes { RGBLED_DECREASE_SAT, RGBLED_INCREASE_VAL, RGBLED_DECREASE_VAL, -}; - -enum macro_keycodes { - KC_DEMOMACRO, + DEMOMACRO, }; // Custom macros @@ -57,7 +43,6 @@ enum macro_keycodes { #define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor #define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise #define TG_NUMLAY TG(_NUMLAY) //Toggle for layer _NUMLAY -#define DEMOMACRO M(KC_DEMOMACRO) // My login macros const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -322,29 +307,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DEMOMACRO: + if (record->event.pressed) { + SEND_STRING("hello world"); + } + return false; + break; } return true; } void matrix_init_user(void) { - #ifdef USE_I2C - i2c_master_init(); - #ifdef SSD1306OLED - // calls code for the SSD1306 OLED - _delay_ms(400); - TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); - iota_gfx_init(); // turns on the display - #endif - #endif - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -void matrix_scan_user(void) { - #ifdef SSD1306OLED - iota_gfx_task(); // this is what updates the display continuously - #endif +#ifdef AUDIO_ENABLE + startup_user(); +#endif } #ifdef AUDIO_ENABLE @@ -373,109 +349,3 @@ void music_scale_user(void) } #endif - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (!eeconfig_is_enabled()) { - eeconfig_init(); - } - - switch (id) { - case KC_DEMOMACRO: - if (record->event.pressed){ - return MACRO (I(1), T(H),T(E),T(L), T(L), T(O), T(SPACE), T(W), T(O), T(R), T(L), T(D), END); - } - } - - return MACRO_NONE; -} - -void matrix_update(struct CharacterMatrix *dest, - const struct CharacterMatrix *source) { - if (memcmp(dest->display, source->display, sizeof(dest->display))) { - memcpy(dest->display, source->display, sizeof(dest->display)); - dest->dirty = true; - } -} - -//assign the right code to your layers for OLED display -#define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65560 - -void iota_gfx_task_user(void) { -#if DEBUG_TO_SCREEN - if (debug_enable) { - return; - } -#endif - - struct CharacterMatrix matrix; - - matrix_clear(&matrix); - matrix_write_P(&matrix, PSTR("USB: ")); -#ifdef PROTOCOL_LUFA - switch (USB_DeviceState) { - case DEVICE_STATE_Unattached: - matrix_write_P(&matrix, PSTR("Unattached")); - break; - case DEVICE_STATE_Suspended: - matrix_write_P(&matrix, PSTR("Suspended")); - break; - case DEVICE_STATE_Configured: - matrix_write_P(&matrix, PSTR("Connected")); - break; - case DEVICE_STATE_Powered: - matrix_write_P(&matrix, PSTR("Powered")); - break; - case DEVICE_STATE_Default: - matrix_write_P(&matrix, PSTR("Default")); - break; - case DEVICE_STATE_Addressed: - matrix_write_P(&matrix, PSTR("Addressed")); - break; - default: - matrix_write_P(&matrix, PSTR("Invalid")); - } -#endif - -// Define layers here, Have not worked out how to have text displayed for each layer. Copy down the number you see and add a case for it below - - char buf[40]; - snprintf(buf,sizeof(buf), "Undef-%ld", layer_state); - matrix_write_P(&matrix, PSTR("\n\nLayer: ")); - switch (layer_state) { - case L_BASE: - matrix_write_P(&matrix, PSTR("Default")); - break; - case L_RAISE: - matrix_write_P(&matrix, PSTR("Raise")); - break; - case L_LOWER: - matrix_write_P(&matrix, PSTR("Lower")); - break; - case L_ADJUST: - matrix_write_P(&matrix, PSTR("ADJUST")); - break; - default: - matrix_write(&matrix, buf); - } - - // Host Keyboard LED Status - char led[40]; - snprintf(led, sizeof(led), "\n%s %s %s", - (host_keyboard_leds() & (1< 0; + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } + } + + // outline + for (uint8_t x = 0; x < 19; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 9, true); + } + for (uint8_t y = 0; y < 9; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true); + } + + // oled location + for (uint8_t x = 0; x < 3; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + 14 + x, MATRIX_DISPLAY_Y + 2, true); + } + + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(35, 0 + y, true); + } + return false; +} +#endif diff --git a/keyboards/hadron/ver2/ver2.h b/keyboards/hadron/ver2/ver2.h index 54e141ffacb..8127b497f7c 100644 --- a/keyboards/hadron/ver2/ver2.h +++ b/keyboards/hadron/ver2/ver2.h @@ -1,6 +1,3 @@ -#ifndef VER2_H -#define VER2_H +#pragma once -#include "../hadron.h" - -#endif \ No newline at end of file +#include "hadron.h" diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 574dc6b0165..54fab6662d5 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0003 @@ -70,16 +69,8 @@ #define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f #endif -//configure qwiic micro_oled driver for the 128x32 oled -#ifdef QWIIC_MICRO_OLED_ENABLE - -#undef I2C_ADDRESS_SA0_1 -#define I2C_ADDRESS_SA0_1 0b0111100 -#define LCDWIDTH 128 -#define LCDHEIGHT 32 -#define micro_oled_rotate_180 - -#endif +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ // #define DEBOUNCE 6 @@ -186,5 +177,3 @@ // #define RGB_MATRIX_KEYPRESSES #define SOLENOID_PIN A14 - -#endif diff --git a/keyboards/hadron/ver3/keymaps/default/config.h b/keyboards/hadron/ver3/keymaps/default/config.h deleted file mode 100644 index 6f70f09beec..00000000000 --- a/keyboards/hadron/ver3/keymaps/default/config.h +++ /dev/null @@ -1 +0,0 @@ -#pragma once diff --git a/keyboards/hadron/ver3/keymaps/default/keymap.c b/keyboards/hadron/ver3/keymaps/default/keymap.c index cec43e95d48..b897ffcab1b 100644 --- a/keyboards/hadron/ver3/keymaps/default/keymap.c +++ b/keyboards/hadron/ver3/keymaps/default/keymap.c @@ -9,8 +9,8 @@ #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _MOUSECURSOR 8 -#define _ADJUST 16 +#define _MOUSECURSOR 5 +#define _ADJUST 6 enum preonic_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/hadron/ver3/keymaps/readme.md b/keyboards/hadron/ver3/keymaps/readme.md deleted file mode 100644 index 66bf06b7111..00000000000 --- a/keyboards/hadron/ver3/keymaps/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# How to add your own keymap - -Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: - - _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] - -\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements - -and contain the following files: - -* `keymap.c` -* `readme.md` *recommended* -* `config.h` *optional*, found automatically when compiling -* `Makefile` *optional*, found automatically when compling - -When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: - - * **folder_name** description - -# List of Hadron keymaps - -* **default** default Hadron layout -* **ishtob** ishtob's Hadron layout -* **sebaslayout** sebaslayout's Hadron layout \ No newline at end of file diff --git a/keyboards/hadron/ver3/rules.mk b/keyboards/hadron/ver3/rules.mk index f3cc14b17d2..44c34d2ad03 100644 --- a/keyboards/hadron/ver3/rules.mk +++ b/keyboards/hadron/ver3/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,7 +21,8 @@ AUDIO_ENABLE = yes RGBLIGHT_ENABLE = yes RGB_MATRIX_ENABLE = no # once arm_rgb is implemented RGB_MATRIX_DRIVER = WS2812 -HAPTIC_ENABLE += DRV2605L -QWIIC_ENABLE = yes -QWIIC_DRIVERS += MICRO_OLED +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = DRV2605L +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 ENCODER_ENABLER = yes diff --git a/keyboards/hadron/ver3/ver3.c b/keyboards/hadron/ver3/ver3.c index 0664bf4b0ec..4c5a2e0c9ab 100644 --- a/keyboards/hadron/ver3/ver3.c +++ b/keyboards/hadron/ver3/ver3.c @@ -14,9 +14,6 @@ * along with this program. If not, see . */ #include "ver3.h" -#include "qwiic.h" -#include "action_layer.h" -#include "haptic.h" #ifdef RGB_MATRIX_ENABLE @@ -36,185 +33,66 @@ led_config_t g_led_config = { { #endif -uint8_t *o_fb; +#ifdef OLED_ENABLE +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -uint16_t counterst = 0; - - - -#ifdef QWIIC_MICRO_OLED_ENABLE - -/* screen off after this many milliseconds */ -#include "timer.h" -#define ScreenOffInterval 60000 /* milliseconds */ -static uint16_t last_flush; - -volatile uint8_t led_numlock = false; -volatile uint8_t led_capslock = false; -volatile uint8_t led_scrolllock = false; - -static uint8_t layer; -static bool queue_for_send = false; -static uint8_t encoder_value = 32; - -__attribute__ ((weak)) -void draw_ui(void) { - clear_buffer(); - last_flush = timer_read(); - send_command(DISPLAYON); - -/* Layer indicator is 41 x 10 pixels */ -#define LAYER_INDICATOR_X 5 -#define LAYER_INDICATOR_Y 0 - - draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0); - draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM); - draw_char(LAYER_INDICATOR_X + 34, LAYER_INDICATOR_Y + 2, layer + 0x30, PIXEL_ON, XOR, 0); - -/* Matrix display is 19 x 9 pixels */ +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + oled_write_P(PSTR("LAYER"), false); + oled_advance_char(); + oled_write_char(get_highest_layer(layer_state) + 0x30, true); + + led_t led_state = host_keyboard_led_state(); + oled_set_cursor(18, 0); + oled_write_P(PSTR("NUM"), led_state.num_lock); + oled_set_cursor(18, 1); + oled_write_P(PSTR("CAP"), led_state.caps_lock); + oled_set_cursor(18, 2); + oled_write_P(PSTR("SCR"), led_state.scroll_lock); + + uint8_t mod_state = get_mods(); + oled_set_cursor(10, 3); + oled_write_P(PSTR("S"), mod_state & MOD_MASK_SHIFT); + oled_advance_char(); + oled_write_P(PSTR("C"), mod_state & MOD_MASK_CTRL); + oled_advance_char(); + oled_write_P(PSTR("A"), mod_state & MOD_MASK_ALT); + oled_advance_char(); + oled_write_P(PSTR("G"), mod_state & MOD_MASK_GUI); + oled_advance_char(); + +/* Matrix display is 12 x 12 pixels */ #define MATRIX_DISPLAY_X 5 #define MATRIX_DISPLAY_Y 18 - for (uint8_t x = 0; x < MATRIX_ROWS; x++) { - for (uint8_t y = 0; y < MATRIX_COLS; y++) { - draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); - } - } - draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); - /* hadron oled location on thumbnail */ - draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); -/* - draw_rect_soft(0, 13, 64, 6, PIXEL_ON, NORM); - draw_line_vert(encoder_value, 13, 6, PIXEL_ON, NORM); - -*/ + // matrix + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + bool on = (matrix_get_row(x) & (1 << y)) > 0; -/* Mod display is 41 x 16 pixels */ -#define MOD_DISPLAY_X 30 -#define MOD_DISPLAY_Y 18 + // force on for oled location + if((x == 0) && (y >= (MATRIX_COLS - 3))) on = 1; - uint8_t mods = get_mods(); - if (mods & MOD_LSFT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LCTL) { - draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LALT) { - draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); - } - if (mods & MOD_LGUI) { - draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); - } else { - draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); - } - -/* Lock display is 23 x 32 */ -#define LOCK_DISPLAY_X 100 -#define LOCK_DISPLAY_Y 0 - - if (led_numlock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_OFF, NORM, 0); - } else if (led_numlock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 1, "NUM", PIXEL_ON, NORM, 0); - } - if (led_capslock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_OFF, NORM, 0); - } else if (led_capslock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "CAP", PIXEL_ON, NORM, 0); - } - - if (led_scrolllock == true) { - draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 22, 5 + (3 * 6), 9, PIXEL_ON, NORM); - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_OFF, NORM, 0); - } else if (led_scrolllock == false) { - draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 22 +1, "SCR", PIXEL_ON, NORM, 0); - } - send_buffer(); -} - -void read_host_led_state(void) { - uint8_t leds = host_keyboard_leds(); - if (leds & (1 << USB_LED_NUM_LOCK)) { - if (led_numlock == false){ - led_numlock = true;} - } else { - if (led_numlock == true){ - led_numlock = false;} + oled_write_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2, on); + } } - if (leds & (1 << USB_LED_CAPS_LOCK)) { - if (led_capslock == false){ - led_capslock = true;} - } else { - if (led_capslock == true){ - led_capslock = false;} + + // outline + for (uint8_t x = 0; x < 19; x++) { + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y, true); + oled_write_pixel(MATRIX_DISPLAY_X + x, MATRIX_DISPLAY_Y + 9, true); } - if (leds & (1 << USB_LED_SCROLL_LOCK)) { - if (led_scrolllock == false){ - led_scrolllock = true;} - } else { - if (led_scrolllock == true){ - led_scrolllock = false;} + for (uint8_t y = 0; y < 9; y++) { + oled_write_pixel(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y+y, true); + oled_write_pixel(MATRIX_DISPLAY_X + 19, MATRIX_DISPLAY_Y+y, true); } -} - -uint32_t layer_state_set_kb(uint32_t state) { - state = layer_state_set_user(state); - layer = biton32(state); - queue_for_send = true; - return state; -} - -bool process_record_kb(uint16_t keycode, keyrecord_t *record) { - queue_for_send = true; - return process_record_user(keycode, record); -} - -bool encoder_update_user(uint8_t index, bool clockwise); -bool encoder_update_kb(uint8_t index, bool clockwise) { - if (!encoder_update_user(index, clockwise)) return false; - encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; - queue_for_send = true; - return true; -} - -#endif - -void matrix_init_kb(void) { - queue_for_send = true; - matrix_init_user(); + // bodge for layer number left hand side + for (uint8_t y = 0; y < 8; y++) { + oled_write_pixel(35, 0 + y, true); + } + return false; } - -void matrix_scan_kb(void) { -if (queue_for_send) { -#ifdef QWIIC_MICRO_OLED_ENABLE - read_host_led_state(); - draw_ui(); #endif - queue_for_send = false; - } -#ifdef QWIIC_MICRO_OLED_ENABLE - if (timer_elapsed(last_flush) > ScreenOffInterval) { - send_command(DISPLAYOFF); /* 0xAE */ - } -#endif - if (counterst == 0) { - //testPatternFB(o_fb); - } - counterst = (counterst + 1) % 1024; - //rgblight_task(); - matrix_scan_user(); -} diff --git a/keyboards/halberd/rules.mk b/keyboards/halberd/rules.mk index 1ecd6129a57..0fd01295539 100644 --- a/keyboards/halberd/rules.mk +++ b/keyboards/halberd/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/halfcliff/halfcliff.c b/keyboards/halfcliff/halfcliff.c index 4e2910b8467..9e3f64d284b 100644 --- a/keyboards/halfcliff/halfcliff.c +++ b/keyboards/halfcliff/halfcliff.c @@ -27,14 +27,18 @@ enum layer_names { /* _FN */ }; -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (!is_keyboard_master()) { return OLED_ROTATION_180; // flips the display 180 degrees if offhand } return rotation; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (!is_keyboard_master()) { static const char PROGMEM qmk_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, @@ -68,6 +72,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK\n") : PSTR(" \n"), false); } + return false; } #endif diff --git a/keyboards/hand88/rules.mk b/keyboards/hand88/rules.mk index ba3a8abd331..3070ff0e97d 100755 --- a/keyboards/hand88/rules.mk +++ b/keyboards/hand88/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index b1ac790d763..b5bf98271af 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -12,14 +12,8 @@ #define MATRIX_COLS 23 #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/2x5keypad/rules.mk b/keyboards/handwired/2x5keypad/rules.mk index 6d0028f5f6d..f24ea2d0968 100644 --- a/keyboards/handwired/2x5keypad/rules.mk +++ b/keyboards/handwired/2x5keypad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina AUDIO_ENABLE = no BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE= no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/handwired/3dp660/rules.mk b/keyboards/handwired/3dp660/rules.mk index 01f24d91f03..0866edd4140 100644 --- a/keyboards/handwired/3dp660/rules.mk +++ b/keyboards/handwired/3dp660/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/412_64/412_64.h b/keyboards/handwired/412_64/412_64.h index 27a32f15aaa..9601f1257cf 100644 --- a/keyboards/handwired/412_64/412_64.h +++ b/keyboards/handwired/412_64/412_64.h @@ -1,29 +1,23 @@ - -#ifndef FOURx16_H -#define FOURx16_H +#pragma once #include "quantum.h" -#define ___ KC_NO // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_4x16( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ - K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ -) \ -{ \ - { K00, K02, K04, K06, K08, K10, K12, K14 }, \ - { K01, K03, K05, K07, K09, K11, K13, K15 }, \ - { K16, K18, K20, K22, K24, K26, K28, K30 }, \ - { K17, K19, K21, K23, K25, K27, K29, K31 }, \ - { K32, K34, K36, K38, K40, K42, K44, K46 }, \ - { K33, K35, K37, K39, K41, K43, K45, K47 }, \ - { K48, K50, K52, K54, K56, K58, K60, K62 }, \ - { K49, K51, K53, K55, K57, K59, K61, K63 } \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/handwired/412_64/rules.mk b/keyboards/handwired/412_64/rules.mk index f328e4f5570..0b0fa6f8f38 100644 --- a/keyboards/handwired/412_64/rules.mk +++ b/keyboards/handwired/412_64/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/42/rules.mk b/keyboards/handwired/42/rules.mk index 3a6f75b2e3a..72d7ebf9155 100644 --- a/keyboards/handwired/42/rules.mk +++ b/keyboards/handwired/42/rules.mk @@ -23,4 +23,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/aek64/rules.mk b/keyboards/handwired/aek64/rules.mk index 960a0eb07ae..78665308ac3 100644 --- a/keyboards/handwired/aek64/rules.mk +++ b/keyboards/handwired/aek64/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change to no to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/aim65/rules.mk b/keyboards/handwired/aim65/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/handwired/aim65/rules.mk +++ b/keyboards/handwired/aim65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/amigopunk/keymaps/default/keymap.c b/keyboards/handwired/amigopunk/keymaps/default/keymap.c index b7df62979a4..3a64958fad8 100644 --- a/keyboards/handwired/amigopunk/keymaps/default/keymap.c +++ b/keyboards/handwired/amigopunk/keymaps/default/keymap.c @@ -85,8 +85,9 @@ static void render_amigopunk_logo(void) { }; oled_write_raw_P(amigopunk_logo, sizeof(amigopunk_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_amigopunk_logo(); /* oled_write_P(PSTR("Amigo Punk\n"), false); */ + return false; } #endif diff --git a/keyboards/handwired/amigopunk/rules.mk b/keyboards/handwired/amigopunk/rules.mk index 50e3e344c1d..04e5a24644f 100644 --- a/keyboards/handwired/amigopunk/rules.mk +++ b/keyboards/handwired/amigopunk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/angel/rules.mk b/keyboards/handwired/angel/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/handwired/angel/rules.mk +++ b/keyboards/handwired/angel/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/arrow_pad/arrow_pad.h b/keyboards/handwired/arrow_pad/arrow_pad.h index b93fd113f27..2d677beb5cd 100644 --- a/keyboards/handwired/arrow_pad/arrow_pad.h +++ b/keyboards/handwired/arrow_pad/arrow_pad.h @@ -1,5 +1,4 @@ -#ifndef ARROW_PAD_H -#define ARROW_PAD_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -10,34 +9,34 @@ #include #include +#define XXX KC_NO + // This is the 21-key keypad to 4x6 element matrix mapping #define LAYOUT( \ - KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ - KM_NUM, KM_FSL, KM_AST, KM_MIN, \ - KM___7, KM___8, KM___9, KM_EQU, \ - KM___4, KM___5, KM___6, KM_PLS, \ - KM___1, KM___2, KM___3, ___ENT, \ - KM___0, _____0, KM_DOT, KM_ENT \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) { \ - { KM_ESC, KM_TAB, KM_BSL, KM_ARR }, \ - { KM_NUM, KM_FSL, KM_AST, KM_MIN }, \ - { KM___7, KM___8, KM___9, KM_EQU }, \ - { KM___4, KM___5, KM___6, KM_PLS }, \ - { KM___1, KM___2, KM___3, KC_NO }, \ - { KM___0, KC_NO, KM_DOT, KM_ENT } \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 }, \ + { k50, k51, k52, k53 } \ } // This is the 21-key keypad to 2x11 element matrix mapping #define LAYOUT_pad21( \ - KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ - KM_NUM, KM_FSL, KM_AST, KM_MIN, \ - KM___7, KM___8, KM___9, \ - KM___4, KM___5, KM___6, KM_PLS, \ - KM___1, KM___2, KM___3, \ - KM___0, KM_DOT, KM_ENT \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k04, k05, k06, \ + k14, k15, k16, k07, \ + k08, k09, k0A, \ + k19, k1A, k17 \ ) { \ - { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \ - { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, XXX, k19, k1A } \ } - -#endif diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index b23c5db8f0d..dcbdef2fcc9 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -102,5 +101,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk index 0f1a6c15b51..8cc765c7a57 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk index 8863d737fa3..c849339dee3 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/handwired/arrow_pad/rules.mk b/keyboards/handwired/arrow_pad/rules.mk index d6180989bf8..09b448f2714 100644 --- a/keyboards/handwired/arrow_pad/rules.mk +++ b/keyboards/handwired/arrow_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/atreus50/atreus50.h b/keyboards/handwired/atreus50/atreus50.h index a53c267424e..710292a1872 100644 --- a/keyboards/handwired/atreus50/atreus50.h +++ b/keyboards/handwired/atreus50/atreus50.h @@ -1,23 +1,21 @@ -#ifndef ATREUS50_H -#define ATREUS50_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, km0, km1, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, KC_NO, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, KC_NO, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, km0, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, km1, k36, k37, k38, k39, k3a, k3b } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, kM0, kM1, k36, k37, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, XXX, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, kM0, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, kM1, k36, k37, k38, k39, k3A, k3B } \ } #define KC_ KC_TRNS - -#endif diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index 062892347c7..4a385c35cf7 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -102,5 +101,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/axon/rules.mk b/keyboards/handwired/axon/rules.mk index 7a50fbb7785..2057d9c9399 100644 --- a/keyboards/handwired/axon/rules.mk +++ b/keyboards/handwired/axon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/battleship_gamepad/rules.mk b/keyboards/handwired/battleship_gamepad/rules.mk index b7a26d8fc5c..df6e244b7d2 100644 --- a/keyboards/handwired/battleship_gamepad/rules.mk +++ b/keyboards/handwired/battleship_gamepad/rules.mk @@ -9,7 +9,7 @@ SRC += analog.c # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/bdn9_ble/rules.mk b/keyboards/handwired/bdn9_ble/rules.mk index c73855bdee4..79dba772f36 100644 --- a/keyboards/handwired/bdn9_ble/rules.mk +++ b/keyboards/handwired/bdn9_ble/rules.mk @@ -21,6 +21,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH = AdafruitBLE # Enable Bluetooth AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = no +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/bigmac/rules.mk b/keyboards/handwired/bigmac/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/handwired/bigmac/rules.mk +++ b/keyboards/handwired/bigmac/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/bolek/rules.mk b/keyboards/handwired/bolek/rules.mk index 1f14fe51968..c1149216c28 100644 --- a/keyboards/handwired/bolek/rules.mk +++ b/keyboards/handwired/bolek/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/boss566y/redragon_vara/rules.mk b/keyboards/handwired/boss566y/redragon_vara/rules.mk index 9aee16add83..9f4b29f22e0 100644 --- a/keyboards/handwired/boss566y/redragon_vara/rules.mk +++ b/keyboards/handwired/boss566y/redragon_vara/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/brain/rules.mk b/keyboards/handwired/brain/rules.mk index ee73d1507e8..a24edf27f8f 100644 --- a/keyboards/handwired/brain/rules.mk +++ b/keyboards/handwired/brain/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/cans12er/rules.mk b/keyboards/handwired/cans12er/rules.mk index d32194b97f0..32a2c4e5df7 100644 --- a/keyboards/handwired/cans12er/rules.mk +++ b/keyboards/handwired/cans12er/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/cmd60/cmd60.h b/keyboards/handwired/cmd60/cmd60.h index 2e0baa9997b..5c196e899f1 100644 --- a/keyboards/handwired/cmd60/cmd60.h +++ b/keyboards/handwired/cmd60/cmd60.h @@ -1,20 +1,19 @@ -#ifndef CMD60_H -#define CMD60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, KC_NO, K3D }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3D, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4D \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index 80f37055f28..ba54cab2476 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/co60/rev1/rules.mk b/keyboards/handwired/co60/rev1/rules.mk index 8301ebd7c1a..ab65c6873c2 100644 --- a/keyboards/handwired/co60/rev1/rules.mk +++ b/keyboards/handwired/co60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/colorlice/config.h b/keyboards/handwired/colorlice/config.h index 0148817f3fa..6fdd87ccf5a 100644 --- a/keyboards/handwired/colorlice/config.h +++ b/keyboards/handwired/colorlice/config.h @@ -55,3 +55,52 @@ along with this program. If not, see . #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DRIVER_LED_TOTAL 70 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/handwired/colorlice/rules.mk b/keyboards/handwired/colorlice/rules.mk index d7f2f5c48a2..3dfdacb8a87 100644 --- a/keyboards/handwired/colorlice/rules.mk +++ b/keyboards/handwired/colorlice/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/concertina/64key/rules.mk b/keyboards/handwired/concertina/64key/rules.mk index 4dde08b00bb..b5a104abfb8 100644 --- a/keyboards/handwired/concertina/64key/rules.mk +++ b/keyboards/handwired/concertina/64key/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/18key/rules.mk b/keyboards/handwired/consolekeyboard/18key/rules.mk index c9542aa6af4..448051e2afa 100644 --- a/keyboards/handwired/consolekeyboard/18key/rules.mk +++ b/keyboards/handwired/consolekeyboard/18key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/20key/rules.mk b/keyboards/handwired/consolekeyboard/20key/rules.mk index c9542aa6af4..448051e2afa 100644 --- a/keyboards/handwired/consolekeyboard/20key/rules.mk +++ b/keyboards/handwired/consolekeyboard/20key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/27key/rules.mk b/keyboards/handwired/consolekeyboard/27key/rules.mk index c9542aa6af4..448051e2afa 100644 --- a/keyboards/handwired/consolekeyboard/27key/rules.mk +++ b/keyboards/handwired/consolekeyboard/27key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/consolekeyboard/30key/rules.mk b/keyboards/handwired/consolekeyboard/30key/rules.mk index c9542aa6af4..448051e2afa 100644 --- a/keyboards/handwired/consolekeyboard/30key/rules.mk +++ b/keyboards/handwired/consolekeyboard/30key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/curiosity/rules.mk b/keyboards/handwired/curiosity/rules.mk index e9094c06f94..ede78737229 100644 --- a/keyboards/handwired/curiosity/rules.mk +++ b/keyboards/handwired/curiosity/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/d48/keymaps/anderson/keymap.c b/keyboards/handwired/d48/keymaps/anderson/keymap.c index 06997807181..11bc62e5376 100644 --- a/keyboards/handwired/d48/keymaps/anderson/keymap.c +++ b/keyboards/handwired/d48/keymaps/anderson/keymap.c @@ -251,7 +251,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { /* Host Keyboard Layer Status */ uint8_t current_layer = get_highest_layer(layer_state); @@ -337,5 +337,6 @@ void oled_task_user(void) { } } + return false; } #endif diff --git a/keyboards/handwired/d48/keymaps/default/keymap.c b/keyboards/handwired/d48/keymaps/default/keymap.c index 66b8dd714fc..4c3925c7ed5 100644 --- a/keyboards/handwired/d48/keymaps/default/keymap.c +++ b/keyboards/handwired/d48/keymaps/default/keymap.c @@ -196,7 +196,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_0; } -void oled_task_user(void) { +bool oled_task_user(void) { /* Host Keyboard Layer Status */ uint8_t current_layer = get_highest_layer(layer_state); @@ -282,5 +282,6 @@ void oled_task_user(void) { } } + return false; } #endif diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 10c43d13071..29a008f0c6a 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef DACTYL_CONFIG_H -#define DACTYL_CONFIG_H +#pragma once #include "config_common.h" @@ -64,5 +63,3 @@ along with this program. If not, see . #define DEBOUNCE 15 #define USB_MAX_POWER_CONSUMPTION 500 - -#endif diff --git a/keyboards/handwired/dactyl/dactyl.h b/keyboards/handwired/dactyl/dactyl.h index a6a043496cb..b901b67673e 100644 --- a/keyboards/handwired/dactyl/dactyl.h +++ b/keyboards/handwired/dactyl/dactyl.h @@ -1,5 +1,4 @@ -#ifndef DACTYL_H -#define DACTYL_H +#pragma once #include "quantum.h" #include @@ -25,39 +24,31 @@ extern bool i2c_initialized; void init_dactyl(void); void init_expander(void); -/* - * LEFT HAND: LINES 38-45 - * RIGHT HAND: LINES 47-54 - */ -#define LAYOUT_dactyl( \ - \ - k00,k01,k02,k03,k04,k05, \ - k10,k11,k12,k13,k14,k15, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35, \ - k40,k41,k42,k43,k44, \ - k55,k50, \ - k54, \ - k53,k52,k51, \ - \ - k06,k07,k08,k09,k0A,k0B, \ - k16,k17,k18,k19,k1A,k1B, \ - k26,k27,k28,k29,k2A,k2B, \ - k36,k37,k38,k39,k3A,k3B, \ - k47,k48,k49,k4A,k4B, \ - k5B,k56, \ - k57, \ - k5A,k59,k58 ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \ - { k40, k41, k42, k43, k44, KC_NO, KC_NO, k47, k48, k49, k4A, k4B }, \ - { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B }, \ - } +#define XXX KC_NO - -#endif +#define LAYOUT_dactyl( \ + k00, k01, k02, k03, k04, k05, \ + k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, \ + k55, k50, \ + k54, \ + k53, k52, k51, \ +\ + k06, k07, k08, k09, k0A, k0B, \ + k16, k17, k18, k19, k1A, k1B, \ + k26, k27, k28, k29, k2A, k2B, \ + k36, k37, k38, k39, k3A, k3B, \ + k47, k48, k49, k4A, k4B, \ + k5B, k56, \ + k57, \ + k5A, k59, k58 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B }, \ + { k40, k41, k42, k43, k44, XXX, XXX, k47, k48, k49, k4A, k4B }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B } \ +} diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h index 79ea625d9ec..cb147654ba0 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/config.h @@ -34,9 +34,6 @@ along with this program. If not, see . // // right half adafruit feather // #define MATRIX_COL_PINS { F1, F0, B1, B2, B3, D2 } // #define MATRIX_ROW_PINS { D6, B7, B6, B5, D7, C6 } -// #define AdafruitBleResetPin D4 -// #define AdafruitBleCSPin B4 -// #define AdafruitBleIRQPin E6 #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk index 8bdf1dc61ba..3262f7fad23 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c index fd8c16420e8..1e164081f26 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/keymap.c @@ -115,7 +115,7 @@ void write_quote(const char* data, const uint8_t num_lines) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_logo(); oled_advance_page(/* clearPageRemainder */ true); @@ -559,6 +559,7 @@ void oled_task_user(void) { break; } } + return false; } bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk index d720c0c2db8..0b999814100 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes COMMAND_ENABLE = yes MOUSEKEY_ENABLE = no diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk index 9bde63fcc22..a4ef754fcbc 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/5x6_5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/ddg_56/rules.mk b/keyboards/handwired/ddg_56/rules.mk index 7524b23a987..ac0b9118260 100644 --- a/keyboards/handwired/ddg_56/rules.mk +++ b/keyboards/handwired/ddg_56/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/eagleii/rules.mk b/keyboards/handwired/eagleii/rules.mk index 4b542ab88bc..6b7ab7ed77a 100644 --- a/keyboards/handwired/eagleii/rules.mk +++ b/keyboards/handwired/eagleii/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/handwired/elrgo_s/rules.mk b/keyboards/handwired/elrgo_s/rules.mk index 2a86c6eb70b..3262f7fad23 100644 --- a/keyboards/handwired/elrgo_s/rules.mk +++ b/keyboards/handwired/elrgo_s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/ergocheap/rules.mk b/keyboards/handwired/ergocheap/rules.mk index 64c1510c3d0..f57b313defa 100644 --- a/keyboards/handwired/ergocheap/rules.mk +++ b/keyboards/handwired/ergocheap/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/fc200rt_qmk/rules.mk b/keyboards/handwired/fc200rt_qmk/rules.mk index 8f50a8b6235..c7a6e6d6a8f 100644 --- a/keyboards/handwired/fc200rt_qmk/rules.mk +++ b/keyboards/handwired/fc200rt_qmk/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index fc7c3a7e7a1..45b459a0ad4 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/fivethirteen/fivethirteen.h b/keyboards/handwired/fivethirteen/fivethirteen.h index 6d14b7f1c03..ffa0bd59d5a 100644 --- a/keyboards/handwired/fivethirteen/fivethirteen.h +++ b/keyboards/handwired/fivethirteen/fivethirteen.h @@ -1,21 +1,19 @@ -#ifndef FIVETHIRTEEN_H -#define FIVETHIRTEEN_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, \ - k40, k41, k42, k43, k44, k46, k47, k48, k49, k410, k411, k412 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012 }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112 }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212 }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312 }, \ - { k40, k41, k42, k43, k44, KC_NO, k46, k47, k48, k49, k410, k411, k412 } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k41, k42, k43, k44, k46, k47, k48, k49, k4A, k4B, k4C \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C }, \ + { k40, k41, k42, k43, k44, XXX, k46, k47, k48, k49, k4A, k4B, k4C } \ } - -#endif diff --git a/keyboards/handwired/frankie_macropad/rules.mk b/keyboards/handwired/frankie_macropad/rules.mk index 5f1537097e5..41c6491fb86 100644 --- a/keyboards/handwired/frankie_macropad/rules.mk +++ b/keyboards/handwired/frankie_macropad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/fruity60/rules.mk b/keyboards/handwired/fruity60/rules.mk index a5ab76a314b..19da0629e5a 100644 --- a/keyboards/handwired/fruity60/rules.mk +++ b/keyboards/handwired/fruity60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,8 +21,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = 60_tsangan_hhkb diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 13a14c7cf8c..1be44a11561 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h index 3a1429ff8cb..48883b11852 100644 --- a/keyboards/handwired/gamenum/gamenum.h +++ b/keyboards/handwired/gamenum/gamenum.h @@ -1,21 +1,19 @@ -#ifndef GAMENUM_H -#define GAMENUM_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, \ - k30, k31, k32, \ - k41, k42, k43 \ -) \ -{ \ - { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ - { k20, k21, k22, KC_NO }, \ - { k30, k31, k32, KC_NO }, \ - { KC_NO, k41, k42, k43 } \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, XXX }, \ + { k30, k31, k32, XXX }, \ + { XXX, k41, k42, k43 } \ } - -#endif diff --git a/keyboards/handwired/hacked_motospeed/rules.mk b/keyboards/handwired/hacked_motospeed/rules.mk index 79bfe8a86a1..6a8ad8fe82b 100644 --- a/keyboards/handwired/hacked_motospeed/rules.mk +++ b/keyboards/handwired/hacked_motospeed/rules.mk @@ -18,7 +18,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output NO_USB_STARTUP_CHECK = yes # Disable initialization only when usb is plugged in -BLUETOOTH = RN42 +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = RN42 diff --git a/keyboards/handwired/hexon38/rules.mk b/keyboards/handwired/hexon38/rules.mk index 774005f600f..3a565a97746 100644 --- a/keyboards/handwired/hexon38/rules.mk +++ b/keyboards/handwired/hexon38/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = halfkay # Enabled build options: -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/hnah108/config.h b/keyboards/handwired/hnah108/config.h index b21ba109348..b08f24ed868 100644 --- a/keyboards/handwired/hnah108/config.h +++ b/keyboards/handwired/hnah108/config.h @@ -56,6 +56,54 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #define DRIVER_LED_TOTAL 31 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/hnah108/rules.mk b/keyboards/handwired/hnah108/rules.mk index 38710c12748..a89ccfc24b2 100644 --- a/keyboards/handwired/hnah108/rules.mk +++ b/keyboards/handwired/hnah108/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/hnah40rgb/config.h b/keyboards/handwired/hnah40rgb/config.h index 3d558f97fca..8204550d000 100644 --- a/keyboards/handwired/hnah40rgb/config.h +++ b/keyboards/handwired/hnah40rgb/config.h @@ -64,4 +64,52 @@ along with this program. If not, see . #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/handwired/hnah40rgb/rules.mk b/keyboards/handwired/hnah40rgb/rules.mk index ebe3bc3a632..f909608db9d 100644 --- a/keyboards/handwired/hnah40rgb/rules.mk +++ b/keyboards/handwired/hnah40rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/ibm_wheelwriter/rules.mk b/keyboards/handwired/ibm_wheelwriter/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/handwired/ibm_wheelwriter/rules.mk +++ b/keyboards/handwired/ibm_wheelwriter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/jn68m/jn68m.h b/keyboards/handwired/jn68m/jn68m.h index d47f9f6c9c5..a5500824bb1 100644 --- a/keyboards/handwired/jn68m/jn68m.h +++ b/keyboards/handwired/jn68m/jn68m.h @@ -13,37 +13,37 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef JN68M_H -#define JN68M_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68,\ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K63, K64, K65, K66 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3B, k3C, k3E, \ + k40, k41, k42, k45, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68 }, \ - { K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42,KC_NO,KC_NO,KC_NO}, \ - { K43, K44, K45, K46, K47, K48, K49, K50, K51, K52,KC_NO,K53, K54,KC_NO,K55,KC_NO}, \ - { K56, K57, K58,KC_NO,KC_NO,K59,KC_NO,KC_NO,KC_NO,K60,KC_NO,K61, K63, K64, K65, K66} \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, XXX, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_splitbs( \ - K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K15, K67, K68,\ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70,\ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K63, K64, K65, K66 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k2D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3B, k3C, k3E, \ + k40, k41, k42, k45, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K1 , K2 , K3 , K4 , K5 , K6 , K7 , K8 , K9 , K10, K11, K12, K13, K14, K67, K68 }, \ - { K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K69, K70 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K15,KC_NO,KC_NO}, \ - { K43, K44, K45, K46, K47, K48, K49, K50, K51, K52,KC_NO,K53, K54,KC_NO,K55,KC_NO}, \ - { K56, K57, K58,KC_NO,KC_NO,K59,KC_NO,KC_NO,KC_NO,K60,KC_NO,K61, K63, K64, K65, K66} \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, XXX, k3B, k3C, XXX, k3E, XXX }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, XXX, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/handwired/juliet/rules.mk b/keyboards/handwired/juliet/rules.mk index 480218cffe3..1ab42df8281 100644 --- a/keyboards/handwired/juliet/rules.mk +++ b/keyboards/handwired/juliet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/k_numpad17/rules.mk b/keyboards/handwired/k_numpad17/rules.mk index dfce990dc8a..90645230e07 100644 --- a/keyboards/handwired/k_numpad17/rules.mk +++ b/keyboards/handwired/k_numpad17/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/kbod/kbod.h b/keyboards/handwired/kbod/kbod.h index 5d9dbd05b32..86ff0e8eadb 100644 --- a/keyboards/handwired/kbod/kbod.h +++ b/keyboards/handwired/kbod/kbod.h @@ -1,21 +1,22 @@ -#ifndef KBOD_H -#define KBOD_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ - k40, k41, k42, k43, k44, k45, k46, k47 \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07 }, { k08, k09, k0A, k0B, k0C, k0D, KC_NO, KC_NO }, \ - { k10, k11, k12, k13, k14, k15, k16, k17 }, { k18, k19, k1A, k1B, k1C, k1D, KC_NO, k3B }, \ - { k20, k21, k22, k23, k24, k25, k26, k27 }, { k28, k29, k2A, k2B, k2C, k38, k39, k3A }, \ - { k30, k31, k32, k33, k34, k35, k36, k37 }, \ - { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k10, k11, k12, k13, k14, k15, \ + k20, k21, k22, k23, k24, k25, k26, k27, k30, k31, k32, k33, k34, k35, \ + k40, k41, k42, k43, k44, k45, k46, k47, k50, k51, k52, k53, k54, \ + k60, k61, k62, k63, k64, k65, k66, k67, k55, k56, k57, k37, \ + k70, k71, k72, k73, k74, k75, k76, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/handwired/leftynumpad/rules.mk b/keyboards/handwired/leftynumpad/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/handwired/leftynumpad/rules.mk +++ b/keyboards/handwired/leftynumpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 9df39f44060..8ad3269d569 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/magicforce68/magicforce68.h b/keyboards/handwired/magicforce68/magicforce68.h index 949507fef79..829e5932b58 100644 --- a/keyboards/handwired/magicforce68/magicforce68.h +++ b/keyboards/handwired/magicforce68/magicforce68.h @@ -1,20 +1,19 @@ -#ifndef MAGICFORCE68_H -#define MAGICFORCE68_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K2E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K3E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, \ - K40, K41, K42, K45, K49, K4A, K4B, K4C, K4D, K4E \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D, K4E } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k3E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3C, k3D, \ + k40, k41, k42, k45, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, XXX, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/handwired/marauder/keymaps/orvia/keymap.c b/keyboards/handwired/marauder/keymaps/orvia/keymap.c index 87a0a93cc74..987e7481283 100644 --- a/keyboards/handwired/marauder/keymaps/orvia/keymap.c +++ b/keyboards/handwired/marauder/keymaps/orvia/keymap.c @@ -156,7 +156,7 @@ static void render_anim(void) { } // Used to draw on to the oled screen -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); // renders pixelart oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (4 rows, 21 full columns on a 128x32 screen, anything more will overflow back to the top) @@ -194,5 +194,6 @@ void oled_task_user(void) { } oled_set_cursor(17, 3); oled_write_P(PSTR("NKRO"), keymap_config.nkro); + return false; } #endif diff --git a/keyboards/handwired/marauder/rules.mk b/keyboards/handwired/marauder/rules.mk index 8ddccad3be1..517abca1d48 100644 --- a/keyboards/handwired/marauder/rules.mk +++ b/keyboards/handwired/marauder/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk index 2a28f5acab9..10f2309f014 100644 --- a/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk +++ b/keyboards/handwired/minorca/keymaps/ridingqwerty/rules.mk @@ -2,5 +2,5 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite UNICODEMAP_ENABLE = yes # Unicode Map diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk index f4cff6059d7..d1fe5d8a284 100644 --- a/keyboards/handwired/minorca/rules.mk +++ b/keyboards/handwired/minorca/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h index 1b61d8712a9..c3c2a0962ea 100644 --- a/keyboards/handwired/ms_sculpt_mobile/config.h +++ b/keyboards/handwired/ms_sculpt_mobile/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -85,5 +84,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h b/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h index cfa07c92efa..64d4f7bbc4f 100644 --- a/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h +++ b/keyboards/handwired/ms_sculpt_mobile/ms_sculpt_mobile.h @@ -1,48 +1,43 @@ -#ifndef MICROSOFT_SCULPT_MOBILE_H -#define MICROSOFT_SCULPT_MOBILE_H +#pragma once #include "quantum.h" +#define XXX KC_NO #define LAYOUT( \ - k7Q, k6O, k6P, k6Q, k5O, k5P, k5Q, k7A, k7B, k7C, k7D, k7E, k7F, k1O, k1K, k1L, \ - k5A, k5K, k5L, k5M, k5N, k5H, k5I, k2A, k2B, k2C, k2D, k5B, k5C, k5J, k2E, \ - k6R, k6D, k6E, k6F, k7I, k7J, k4A, k4B, k4C, k4D, k3A, k3B, k3C, k3D, \ - k0J, k6A, k6B, k6C, k7H, k1A, k1B, k5D, k5E, k5F, k5G, k1C, k7P, k2G, \ - k2P, k7K, k7L, k7M, k7O, k0A, k0B, k0C, k0D, k0E, k0F, k2L, k6G, k1P,\ - k1Q, k4N, k3O,k6N, k3K, k0R, k1M, k6H, k6I, k6J \ -) \ -{ \ - {k0A, k0B, k0C, k0D, k0E, k0F, KC_NO, KC_NO, KC_NO, k0J, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, k0R},\ - {k1A, k1B, k1C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k1K, k1L, k1M, KC_NO, k1O, k1P, k1Q, KC_NO},\ - {k2A, k2B, k2C, k2D, k2E, KC_NO, k2G, KC_NO, KC_NO, KC_NO, KC_NO, k2L, KC_NO, KC_NO, KC_NO, k2P, KC_NO, KC_NO},\ - {k3A, k3B, k3C, k3D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k3K, KC_NO, KC_NO, KC_NO, k3O, KC_NO, KC_NO, KC_NO},\ - {k4A, k4B, k4C, k4D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k4N, KC_NO,KC_NO, KC_NO, KC_NO},\ - {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q, KC_NO },\ - {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6J, KC_NO, KC_NO, KC_NO, k6N, k6O, k6P, k6Q, k6R},\ - {k7A, k7B, k7C, k7D, k7E, k7F, KC_NO, k7H, k7I, k7J, k7K, k7L, k7M, KC_NO, k7O, k7P, k7Q, KC_NO},\ + k7G, k6E, k6F, k6G, k5E, k5F, k5G, k70, k71, k72, k73, k74, k75, k1E, k1A, k1B, \ + k50, k5A, k5B, k5C, k5D, k57, k58, k20, k21, k22, k23, k51, k52, k59, k24, \ + k6H, k63, k64, k65, k78, k79, k40, k41, k42, k43, k30, k31, k32, k33, \ + k09, k60, k61, k62, k77, k10, k11, k53, k54, k55, k56, k12, k7F, k26, \ + k2F, k7A, k7B, k7C, k7E, k00, k01, k02, k03, k04, k05, k2B, k66, k1F, \ + k1G, k4D, k3E, k6D, k3A, k0H, k1C, k67, k68, k69 \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, XXX, XXX, k09, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k0H }, \ + { k10, k11, k12, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k1A, k1B, k1C, XXX, k1E, k1F, k1G, XXX }, \ + { k20, k21, k22, k23, k24, XXX, k26, XXX, XXX, XXX, XXX, k2B, XXX, XXX, XXX, k2F, XXX, XXX }, \ + { k30, k31, k32, k33, XXX, XXX, XXX, XXX, XXX, XXX, k3A, XXX, XXX, XXX, k3E, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4D, XXX, XXX, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, XXX }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, XXX, XXX, k6D, k6E, k6F, k6G, k6H }, \ + { k70, k71, k72, k73, k74, k75, XXX, k77, k78, k79, k7A, k7B, k7C, XXX, k7E, k7F, k7G, XXX } \ } - #define MATRIX_TESTING_LAYOUT( \ - k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q,\ - k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q,\ - k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q,\ - k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q,\ - k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q,\ - k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q,\ - k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q,\ - k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q\ -) \ -{ \ - {k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, k0, k0J, k0K, k0L, k0M, k0N, k0O, k0P, k0Q},\ - {k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I, k1, k1J, k1K, k1L, k1M, k1N, k1O, k1P, k1Q},\ - {k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, k2I, k2, k2J, k2K, k2L, k2M, k2N, k2O, k2P, k2Q},\ - {k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, k3, k3J, k3K, k3L, k3M, k3N, k3O, k3P, k3Q},\ - {k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I, k4, k4J, k4K, k4L, k4M, k4N, k4O, k4P, k4Q},\ - {k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, k5I, k5, k5J, k5K, k5L, k5M, k5N, k5O, k5P, k5Q},\ - {k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, k6I, k6, k6J, k6K, k6L, k6M, k6N, k6O, k6P, k6Q},\ - {k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H, k7I, k7, k7J, k7K, k7L, k7M, k7N, k7O, k7P, k7Q},\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, \ + k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H, \ + k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H, \ + k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, k2H }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k5F, k5G, k5H }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E, k6F, k6G, k6H }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78, k79, k7A, k7B, k7C, k7D, k7E, k7F, k7G, k7H } \ } - -#endif diff --git a/keyboards/handwired/myskeeb/oled.c b/keyboards/handwired/myskeeb/oled.c index ee6aa865562..081ca8395a2 100644 --- a/keyboards/handwired/myskeeb/oled.c +++ b/keyboards/handwired/myskeeb/oled.c @@ -1,108 +1,108 @@ // [OLED Configuration] ---------------------------------------------// // Draw - static const char PROGMEM skeeb_logo[] = { + static const char PROGMEM skeeb_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, 0x95,0x96,0x97,0x98,0x99,0x9a,0x9b,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xd5,0xd6,0xd7,0xd8,0xd9,0xda,0xdb,0}; - static const char PROGMEM oled_header[] = { + static const char PROGMEM oled_header[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, 0xc0,0}; - - static const char PROGMEM oled_layer_keylog_separator[] = { + + static const char PROGMEM oled_layer_keylog_separator[] = { 0xc8,0xff,0}; - - static const char PROGMEM oled_layer_line_end[] = { + + static const char PROGMEM oled_layer_line_end[] = { 0xd4,0}; - - static const char PROGMEM oled_layer_keylog_bottom[] = { + + static const char PROGMEM oled_layer_keylog_bottom[] = { 0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc3,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0}; - - static const char PROGMEM oled_line_start[] = { + + static const char PROGMEM oled_line_start[] = { 0xc0,0}; - - static const char PROGMEM oled_mods_bottom[] = { + + static const char PROGMEM oled_mods_bottom[] = { 0xc1,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc7,0xc2,0}; - - static const char PROGMEM oled_footer[] = { + + static const char PROGMEM oled_footer[] = { 0xc4,0xc5,0xc5,0xc9,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xca,0xcb,0xc5,0xc5,0xc6,0}; void render_skeeb_logo(void) { static const char PROGMEM skeeb_logo[] = { -0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, -0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff, 0x01, -0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, -0x99, 0x99, 0x99, 0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x7f, 0x7f, 0xff, 0xff, 0x7f, 0x7f, 0x81, -0x81, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0xff, -0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, -0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f, 0x08, -0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x09, 0x09, 0x0e, 0x0e, 0x0f, -0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x0f, -0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, -0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, -0x00, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0xf8, -0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xff, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xff, 0x01, 0x01, 0xf1, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x3f, -0x00, 0x00, 0x1f, 0x10, 0x10, 0xf3, 0x02, 0x02, 0xf2, 0x12, 0x12, 0x1e, 0x00, 0x00, 0xff, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x0f, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, -0x00, 0x00, 0x0f, 0x01, 0x01, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0f, 0x00, 0x00, 0x0f, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, -0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, -0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, -0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, +0x00, 0xc0, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, +0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0x81, 0x81, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x19, 0x19, 0xff, 0xff, 0x01, +0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x19, 0x19, 0x99, 0x99, 0x99, +0x99, 0x99, 0x99, 0x01, 0x01, 0xff, 0xff, 0x81, 0x81, 0x7f, 0x7f, 0xff, 0xff, 0x7f, 0x7f, 0x81, +0x81, 0xff, 0xff, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0x99, 0xf9, 0xf9, 0xff, 0xff, 0xff, +0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, +0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0xc0, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x0f, 0x0f, 0x08, +0x08, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x08, 0x08, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x09, 0x09, 0x0e, 0x0e, 0x0f, +0x0f, 0x0f, 0x0f, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, 0x0f, 0x0f, +0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x07, 0x03, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x20, 0x20, 0x10, 0x10, 0x10, +0x10, 0x10, 0x20, 0x20, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x01, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x00, 0x00, +0x00, 0x00, 0xe0, 0x20, 0x20, 0xe0, 0x00, 0x01, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3f, 0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0xf8, +0x00, 0x00, 0xf9, 0x01, 0x01, 0xf9, 0x00, 0x00, 0x3f, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xff, 0x00, 0x00, 0xfc, 0x00, 0x00, 0xff, 0x01, 0x01, 0xf1, 0x10, 0x10, 0x1f, 0x00, 0x00, 0x3f, +0x00, 0x00, 0x1f, 0x10, 0x10, 0xf3, 0x02, 0x02, 0xf2, 0x12, 0x12, 0x1e, 0x00, 0x00, 0xff, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0f, 0x00, 0x00, 0x0f, 0x08, 0x08, 0x0f, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09, 0x09, 0x09, 0x0f, +0x00, 0x00, 0x0f, 0x01, 0x01, 0x09, 0x08, 0x08, 0x09, 0x09, 0x09, 0x0f, 0x00, 0x00, 0x0f, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, +0x00, 0x03, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, +0xf0, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, +0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x03, 0x00,0 }; oled_write_raw_P(skeeb_logo, sizeof(skeeb_logo)); } - + // Mods Status void render_mod_status(uint8_t modifiers) { - oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); oled_write_P(PSTR("-"), false); oled_write_P(PSTR("SHF"), (modifiers & MOD_MASK_SHIFT)); oled_write_P(PSTR("-"), false); @@ -112,7 +112,7 @@ void render_mod_status(uint8_t modifiers) { oled_write_P(PSTR("-"), false); oled_write_P(PSTR("ALT"), (modifiers & MOD_MASK_ALT)); oled_write_P(PSTR("-"), false); - oled_write_P(PSTR(" "), false); + oled_write_P(PSTR(" "), false); } // Layer State @@ -122,19 +122,19 @@ void render_layer_state(void){ case 1: oled_write_P(PSTR(" MEDIA "), false); break; case 2: oled_write_P(PSTR(" MOBA "), false); break; case 3: oled_write_P(PSTR(" FPS "), false); break; - default: oled_write_P(PSTR("Undefined"), false); + default: oled_write_P(PSTR("Undefined"), false); } } -// Keylock State +// Keylock State void render_keylock_status(uint8_t led_usb_state) { oled_write_P(PSTR(" "), false); oled_write_P(led_usb_state & (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/nicekey/nicekey.h b/keyboards/handwired/nicekey/nicekey.h index ee5bcfd6be6..f008be168e5 100644 --- a/keyboards/handwired/nicekey/nicekey.h +++ b/keyboards/handwired/nicekey/nicekey.h @@ -1,12 +1,9 @@ -#ifndef NICEKEY_H -#define NICEKEY_H +#pragma once #include "quantum.h" #define LAYOUT( \ k00 \ - ) { \ - { k00 } \ +) { \ + { k00 } \ } - -#endif diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index 9d2174b532c..de9286eda54 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/not_so_minidox/i2c.h b/keyboards/handwired/not_so_minidox/i2c.h index c15b6bc5065..8910e70f10a 100644 --- a/keyboards/handwired/not_so_minidox/i2c.h +++ b/keyboards/handwired/not_so_minidox/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/handwired/not_so_minidox/not_so_minidox.h b/keyboards/handwired/not_so_minidox/not_so_minidox.h index c24a515e43e..7c80dc9b3b2 100644 --- a/keyboards/handwired/not_so_minidox/not_so_minidox.h +++ b/keyboards/handwired/not_so_minidox/not_so_minidox.h @@ -1,24 +1,21 @@ -#ifndef NOSOTMINIDOX_H -#define NOSOTMINIDOX_H - +#pragma once #include "quantum.h" -#define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ - LT1, LT2, LT3, RT3, RT2, RT1 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { KC_NO, KC_NO, KC_NO, LT1, LT2, LT3 }, \ - { R00, R01, R02, R03, R04, R05 }, \ - { R10, R11, R12, R13, R14, R15 }, \ - { R20, R21, R22, R23, R24, R25 }, \ - { KC_NO, KC_NO, KC_NO, RT1, RT2, RT3 }, \ - } +#define XXX KC_NO -#endif +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ +) { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { XXX, XXX, XXX, LT1, LT2, LT3 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { XXX, XXX, XXX, RT1, RT2, RT3 } \ +} diff --git a/keyboards/handwired/not_so_minidox/serial.h b/keyboards/handwired/not_so_minidox/serial.h index 15fe4db7b4c..28fcc56ce75 100644 --- a/keyboards/handwired/not_so_minidox/serial.h +++ b/keyboards/handwired/not_so_minidox/serial.h @@ -1,5 +1,4 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H +#pragma once #include "config.h" #include @@ -22,5 +21,3 @@ void serial_master_init(void); void serial_slave_init(void); int serial_update_buffers(void); bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/handwired/not_so_minidox/split_util.h b/keyboards/handwired/not_so_minidox/split_util.h index 595a0659e1d..807412cd38a 100644 --- a/keyboards/handwired/not_so_minidox/split_util.h +++ b/keyboards/handwired/not_so_minidox/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" @@ -16,5 +15,3 @@ bool has_usb(void); void keyboard_slave_loop(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/handwired/nozbe_macro/config.h b/keyboards/handwired/nozbe_macro/config.h new file mode 100644 index 00000000000..996ed08ab6e --- /dev/null +++ b/keyboards/handwired/nozbe_macro/config.h @@ -0,0 +1,57 @@ +/* Copyright 2021 Marcin Leon Omelan (@rozPierog) + * + * 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 . + */ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Leon Omelan +#define PRODUCT Nozbe Reunion Pad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* key matrix pins */ +#define MATRIX_ROW_PINS \ + { B0 } +#define MATRIX_COL_PINS \ + { D1, D0, D4, C6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B5 +#ifdef BACKLIGHT_PIN +# define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + diff --git a/keyboards/handwired/nozbe_macro/info.json b/keyboards/handwired/nozbe_macro/info.json new file mode 100644 index 00000000000..056ccf9fc1d --- /dev/null +++ b/keyboards/handwired/nozbe_macro/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "nozbe_macro", + "url": "", + "maintainer": "Leon Omelan", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0} + ] + } + } +} diff --git a/keyboards/handwired/nozbe_macro/keymaps/default/keymap.c b/keyboards/handwired/nozbe_macro/keymaps/default/keymap.c new file mode 100644 index 00000000000..7012e50d405 --- /dev/null +++ b/keyboards/handwired/nozbe_macro/keymaps/default/keymap.c @@ -0,0 +1,31 @@ +/* Copyright 2021 Marcin Leon Omelan (@rozPierog) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, + _FN, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + LT(_FN, KC_N), LALT(KC_UP), LALT(KC_DOWN), LALT(KC_D) + ), + [_FN] = LAYOUT( + KC_TRNS, KC_1, KC_2, BL_STEP + ), +}; diff --git a/keyboards/handwired/nozbe_macro/keymaps/default/readme.md b/keyboards/handwired/nozbe_macro/keymaps/default/readme.md new file mode 100644 index 00000000000..99051c3a254 --- /dev/null +++ b/keyboards/handwired/nozbe_macro/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for nozbe_macro diff --git a/keyboards/handwired/nozbe_macro/nozbe_macro.c b/keyboards/handwired/nozbe_macro/nozbe_macro.c new file mode 100644 index 00000000000..b6d38fec832 --- /dev/null +++ b/keyboards/handwired/nozbe_macro/nozbe_macro.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Marcin Leon Omelan (@rozPierog) + * + * 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 . + */ + +#include "nozbe_macro.h" diff --git a/keyboards/handwired/nozbe_macro/nozbe_macro.h b/keyboards/handwired/nozbe_macro/nozbe_macro.h new file mode 100644 index 00000000000..2c2c95091bb --- /dev/null +++ b/keyboards/handwired/nozbe_macro/nozbe_macro.h @@ -0,0 +1,25 @@ +/* Copyright 2021 Marcin Leon Omelan (@rozPierog) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03 \ +) { \ + { k00, k01, k02, k03 } \ +} diff --git a/keyboards/handwired/nozbe_macro/readme.md b/keyboards/handwired/nozbe_macro/readme.md new file mode 100644 index 00000000000..1e51dabff37 --- /dev/null +++ b/keyboards/handwired/nozbe_macro/readme.md @@ -0,0 +1,26 @@ +# Nozbe Macropad handwired + +![Nozbe Macropad](https://i.imgur.com/fUMtWmah.png) + +4 key macropad with optional rotary encoder. + +* Keyboard Maintainer: [rozPierog](https://github.com/rozPierog) +* Hardware Supported: Custom handwired 4 key (or 3 key + rotary encoder) pad +* Hardware Availability: *n/a* +* Github Repository: [NozbePad](https://github.com/rozPierog/NozbePad) + +Make example for this keyboard (after setting up your build environment): + + make handwired/nozbe_macro:default + +Flashing example for this keyboard: + + make handwired/nozbe_macro:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 1 way: + +* **Short pins**: short RST and GND pins at the back diff --git a/keyboards/handwired/nozbe_macro/rules.mk b/keyboards/handwired/nozbe_macro/rules.mk new file mode 100644 index 00000000000..5f180ae00de --- /dev/null +++ b/keyboards/handwired/nozbe_macro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index d94e23b21d0..dba74f43bd8 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/numpad20/numpad20.h b/keyboards/handwired/numpad20/numpad20.h index c15aa9ac700..03fdd6d923c 100644 --- a/keyboards/handwired/numpad20/numpad20.h +++ b/keyboards/handwired/numpad20/numpad20.h @@ -1,20 +1,17 @@ -#ifndef NUMPAD20_H -#define NUMPAD20_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33, \ - K40, K41, K42, K43 \ - ) { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 }, \ - { K40, K41, K42, K43 } \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ + { k40, k41, k42, k43 } \ } - -#endif diff --git a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c index 482287740f5..c87852da53e 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c +++ b/keyboards/handwired/obuwunkunubi/spaget/keymaps/default/keymap.c @@ -342,7 +342,7 @@ void matrix_init_user(void) { set_unicode_input_mode(UC_WINC); }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR(" spaget v1\n\n"), false); // Host Keyboard Layer Status @@ -368,6 +368,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCROLL ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/handwired/obuwunkunubi/spaget/rules.mk b/keyboards/handwired/obuwunkunubi/spaget/rules.mk index ce2063a46d8..372c6c7ea68 100644 --- a/keyboards/handwired/obuwunkunubi/spaget/rules.mk +++ b/keyboards/handwired/obuwunkunubi/spaget/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/oem_ansi_fullsize/rules.mk b/keyboards/handwired/oem_ansi_fullsize/rules.mk index 21e5264dadd..98abc35b8db 100644 --- a/keyboards/handwired/oem_ansi_fullsize/rules.mk +++ b/keyboards/handwired/oem_ansi_fullsize/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/oem_iso_fullsize/rules.mk b/keyboards/handwired/oem_iso_fullsize/rules.mk index 09cade29c53..31a09392796 100644 --- a/keyboards/handwired/oem_iso_fullsize/rules.mk +++ b/keyboards/handwired/oem_iso_fullsize/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c index 956932329c3..1287614a8b9 100644 --- a/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c +++ b/keyboards/handwired/onekey/blackpill_f401/blackpill_f401.c @@ -17,7 +17,7 @@ #include QMK_KEYBOARD_H void board_init(void) { - // B9 is configured as I2C1_SDA in the board file; that function must be + // B9 is configured as I2C1_SDA_PIN in the board file; that function must be // disabled before using B7 as I2C1_SDA. setPinInputHigh(B9); } diff --git a/keyboards/handwired/onekey/keymaps/oled/keymap.c b/keyboards/handwired/onekey/keymaps/oled/keymap.c index c19b6918c0b..e020d5e4b62 100644 --- a/keyboards/handwired/onekey/keymaps/oled/keymap.c +++ b/keyboards/handwired/onekey/keymaps/oled/keymap.c @@ -361,7 +361,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (update_speed_test) { // Speed test mode - wait for screen update completion. if (!oled_dirty) { @@ -450,6 +450,7 @@ void oled_task_user(void) { oled_write_P(PSTR("Draw Once"), false); break; } + return false; } void keyboard_post_init_user(void) { diff --git a/keyboards/handwired/onekey/keymaps/quine/rules.mk b/keyboards/handwired/onekey/keymaps/quine/rules.mk deleted file mode 100644 index 4c2b0289a2d..00000000000 --- a/keyboards/handwired/onekey/keymaps/quine/rules.mk +++ /dev/null @@ -1 +0,0 @@ -BOOTLOADER = atmel-dfu diff --git a/keyboards/handwired/onekey/readme.md b/keyboards/handwired/onekey/readme.md index b630b11748c..2973b7d873a 100644 --- a/keyboards/handwired/onekey/readme.md +++ b/keyboards/handwired/onekey/readme.md @@ -3,7 +3,7 @@ Custom handwired one key keyboard. **See each individual board for pin information.** * Keyboard Maintainer: QMK Community -* Hardware Supported: bluepill, Elite-C, Pro Micro, Proton C, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 +* Hardware Supported: Blackpill F401/F411, Bluepill, Elite-C, Pro Micro, Proton C, Sipeed Longan Nano, STM32F0 Disco, Teensy 2.0, Teensy++ 2.0, Teensy LC, Teensy 3.2 * Hardware Availability: *n/a* Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h new file mode 100644 index 00000000000..b1eb18de781 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/chconf.h @@ -0,0 +1,23 @@ +/* Copyright 2021 QMK + * + * 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 . + */ + +#pragma once + +#define CH_CFG_ST_RESOLUTION 16 + +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/config.h b/keyboards/handwired/onekey/sipeed_longan_nano/config.h new file mode 100644 index 00000000000..1825b936d8e --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/config.h @@ -0,0 +1,37 @@ +/* Copyright 2021 QMK + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define MATRIX_COL_PINS \ + { B0 } +#define MATRIX_ROW_PINS \ + { A7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN A1 /* Green LED. */ +#define BACKLIGHT_PWM_DRIVER PWMD5 /* GD32 numbering scheme starts from 0, TIMER4 on GD32 boards is TIMER5 on STM32 boards. */ +#define BACKLIGHT_PWM_CHANNEL 2 /* GD32 numbering scheme starts from 0, Channel 1 on GD32 boards is Channel 2 on STM32 boards. */ + +#define RGB_DI_PIN A2 +#define RGB_CI_PIN B13 + +#define ADC_PIN A0 + +#define I2C1_CLOCK_SPEED 1000000 /* GD32VF103 supports fast mode plus. */ +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h new file mode 100644 index 00000000000..2579c58747b --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/halconf.h @@ -0,0 +1,23 @@ +/* Copyright 2021 QMK + * + * 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 . + */ + +#pragma once + +#define HAL_USE_PWM TRUE +#define HAL_USE_ADC TRUE +#define HAL_USE_I2C TRUE + +#include_next diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h new file mode 100644 index 00000000000..eba0dd9eebf --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/mcuconf.h @@ -0,0 +1,29 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2021 Stefan Kerkmann + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include_next + +#undef GD32_ADC_USE_ADC0 +#define GD32_ADC_USE_ADC0 TRUE + +#undef GD32_I2C_USE_I2C0 +#define GD32_I2C_USE_I2C0 TRUE + +#undef GD32_PWM_USE_TIM4 +#define GD32_PWM_USE_TIM4 TRUE diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/readme.md b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md new file mode 100644 index 00000000000..0a3a2915760 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/readme.md @@ -0,0 +1,5 @@ +# Sipeed Longan Nano onekey + +Supported Hardware: *GD32VF103CB Sipeed Longan Nano*. + +To trigger keypress, short together pins *B0* and *A7*. \ No newline at end of file diff --git a/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk new file mode 100644 index 00000000000..aef4fee6b22 --- /dev/null +++ b/keyboards/handwired/onekey/sipeed_longan_nano/rules.mk @@ -0,0 +1,11 @@ +# MCU name +MCU = GD32VF103 +BOARD = SIPEED_LONGAN_NANO + +# Bootloader selection +BOOTLOADER = gd32v-dfu + +# Build Options +# change yes to no to disable +# +KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/onekey/stm32f405_feather/config.h b/keyboards/handwired/onekey/stm32f405_feather/config.h new file mode 100644 index 00000000000..32d78079759 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/config.h @@ -0,0 +1,25 @@ +/* Copyright 2019 + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define PRODUCT Onekey Adafruit Feather STM32F405 + +#define MATRIX_COL_PINS { C2 } +#define MATRIX_ROW_PINS { C3 } +#define UNUSED_PINS diff --git a/keyboards/handwired/onekey/stm32f405_feather/readme.md b/keyboards/handwired/onekey/stm32f405_feather/readme.md new file mode 100644 index 00000000000..49a05725d52 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/readme.md @@ -0,0 +1,7 @@ +# Adafruit Feather STM32F405 Express onekey + +* Supported Hardware: [Adafruit Feather STM32F405 Express](https://www.adafruit.com/product/4382) + +To trigger keypress, short together pins *GPIO 12 / PC2* and *GPIO 11 / PC3*. + +https://learn.adafruit.com/adafruit-stm32f405-feather-express/dfu-bootloader-details#enabling-dfu-bootloader-mode-3045622-2 \ No newline at end of file diff --git a/keyboards/handwired/onekey/stm32f405_feather/rules.mk b/keyboards/handwired/onekey/stm32f405_feather/rules.mk new file mode 100644 index 00000000000..bff7a7e2973 --- /dev/null +++ b/keyboards/handwired/onekey/stm32f405_feather/rules.mk @@ -0,0 +1,8 @@ +# MCU name +MCU = STM32F405 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_32/config.h b/keyboards/handwired/onekey/teensy_32/config.h index 180f324875d..e388b01af8f 100644 --- a/keyboards/handwired/onekey/teensy_32/config.h +++ b/keyboards/handwired/onekey/teensy_32/config.h @@ -26,7 +26,7 @@ #define UNUSED_PINS // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/onekey/teensy_lc/config.h b/keyboards/handwired/onekey/teensy_lc/config.h index ad30f969f5b..4e594e7d7ea 100644 --- a/keyboards/handwired/onekey/teensy_lc/config.h +++ b/keyboards/handwired/onekey/teensy_lc/config.h @@ -26,7 +26,7 @@ #define UNUSED_PINS // i2c_master defines -#define I2C1_SCL 0 // A2 on pinout = B0 -#define I2C1_SDA 1 // A3 on pinout = B1 +#define I2C1_SCL_PIN B0 // A2 on pinout = B0 +#define I2C1_SDA_PIN B1 // A3 on pinout = B1 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index bab42593d0e..d831940b8d4 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c index 27a54d80f54..8636ac7536a 100644 --- a/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c +++ b/keyboards/handwired/owlet60/keymaps/oled_testing/keymap.c @@ -66,7 +66,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { //return OLED_ROTATION_180; return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status /*oled_write_P(PSTR("Lyr: "), false); switch (get_highest_layer(layer_state)) { @@ -92,5 +92,6 @@ void oled_task_user(void) { }; oled_write_P(qmk_logo, false); + return false; } #endif diff --git a/keyboards/handwired/p65rgb/config.h b/keyboards/handwired/p65rgb/config.h index 142d3c03ea3..2ff3da81190 100644 --- a/keyboards/handwired/p65rgb/config.h +++ b/keyboards/handwired/p65rgb/config.h @@ -47,6 +47,54 @@ along with this program. If not, see . #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DRIVER_LED_TOTAL 83 #define RGBLIGHT_LIMIT_VAL 180 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/p65rgb/rules.mk b/keyboards/handwired/p65rgb/rules.mk index 7531a0b83d3..1249610b16e 100644 --- a/keyboards/handwired/p65rgb/rules.mk +++ b/keyboards/handwired/p65rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index 735a52f61b8..15f487082bc 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/pilcrow/pilcrow.h b/keyboards/handwired/pilcrow/pilcrow.h index 37d2914f24f..30576e85c03 100644 --- a/keyboards/handwired/pilcrow/pilcrow.h +++ b/keyboards/handwired/pilcrow/pilcrow.h @@ -1,5 +1,4 @@ -#ifndef PILCROW_H -#define PILCROW_H +#pragma once #include "quantum.h" @@ -12,12 +11,9 @@ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ -) \ -{ \ +) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \ } - -#endif diff --git a/keyboards/handwired/pill60/keymaps/default/keymap.c b/keyboards/handwired/pill60/keymaps/default/keymap.c index 00f506bb438..38c5556fe20 100644 --- a/keyboards/handwired/pill60/keymaps/default/keymap.c +++ b/keyboards/handwired/pill60/keymaps/default/keymap.c @@ -66,8 +66,9 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { render_oled(); + return false; } #endif diff --git a/keyboards/handwired/postageboard/mini/rules.mk b/keyboards/handwired/postageboard/mini/rules.mk index fcd3ad04ced..af32703eb22 100644 --- a/keyboards/handwired/postageboard/mini/rules.mk +++ b/keyboards/handwired/postageboard/mini/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/postageboard/r1/rules.mk b/keyboards/handwired/postageboard/r1/rules.mk index fcd3ad04ced..af32703eb22 100644 --- a/keyboards/handwired/postageboard/r1/rules.mk +++ b/keyboards/handwired/postageboard/r1/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/prime_exl/prime_exl.h b/keyboards/handwired/prime_exl/prime_exl.h index 03524da3c2a..1c9a8060fc6 100644 --- a/keyboards/handwired/prime_exl/prime_exl.h +++ b/keyboards/handwired/prime_exl/prime_exl.h @@ -13,28 +13,28 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -//#ifndef PRIME_EXL_H -//#define PRIME_EXL_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K040, K050, K041, K051, K042, K052, K043, K053, K044, K054, K045, K055, K046, K056, K047, K057, K048, K058, \ - K030, K060, K031, K061, K032, K062, K033, K063, K034, K064, K035, K065, K036, K066, K037, K067, K038, K068, \ - K020, K070, K021, K071, K022, K072, K023, K073, K024, K074, K025, K075, K085, K026, K076, K027, K077, K028, K078, \ - K010, K080, K011, K081, K012, K082, K013, K083, K014, K084, K015, K016, K086, K017, K087, K018, \ - K000, K090, K001, K091, K002, K092 \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, k48, k58, \ + k30, k60, k31, k61, k32, k62, k33, k63, k34, k64, k35, k65, k36, k66, k37, k67, k38, k68, \ + k20, k70, k21, k71, k22, k72, k23, k73, k24, k74, k25, k75, k85, k26, k76, k27, k77, k28, k78, \ + k10, k80, k11, k81, k12, k82, k13, k83, k14, k84, k15, k16, k86, k17, k87, k18, \ + k00, k90, k01, k91, k02, k92 \ ) { \ - { K000, K001, K002, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ - { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ - { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ - { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ - { K060, K061, K062, K063, K064, K065, K066, K067, K068 }, \ - { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ - { K080, K081, K082, K083, K084, K085, K086, K087, KC_NO }, \ - { K090, K091, K092, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + { k00, k01, k02, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57, k58 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77, k78 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87, XXX }, \ + { k90, k91, k92, XXX, XXX, XXX, XXX, XXX, XXX } \ } - -//#endif \ No newline at end of file diff --git a/keyboards/handwired/prkl30/feather/config.h b/keyboards/handwired/prkl30/feather/config.h index 6a9bce38cd0..875b3d74011 100644 --- a/keyboards/handwired/prkl30/feather/config.h +++ b/keyboards/handwired/prkl30/feather/config.h @@ -35,9 +35,6 @@ #define ENCODERS_PAD_A { F7 } #define ENCODERS_PAD_B { F6 } #define ENCODER_RESOLUTION 4 -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 #define UNUSED_PINS /* RGB Light Configuration */ diff --git a/keyboards/handwired/prkl30/feather/rules.mk b/keyboards/handwired/prkl30/feather/rules.mk index 6357015126a..e99f16c2795 100644 --- a/keyboards/handwired/prkl30/feather/rules.mk +++ b/keyboards/handwired/prkl30/feather/rules.mk @@ -10,8 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite ENCODER_ENABLE = yes MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control @@ -22,3 +21,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here BACKLIGHT_ENABLE = no AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. + +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index b146767d65d..612675c63a0 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -224,27 +224,15 @@ enum led_sequence { /* PS/2 mouse */ #ifdef PS2_USE_BUSYWAIT -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 3 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D3 +# define PS2_DATA_PIN D2 #endif /* PS/2 mouse interrupt version */ #ifdef PS2_USE_INT /* uses INT1 for clock line(ATMega32U4) */ -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 3 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +# define PS2_CLOCK_PIN D3 +# define PS2_DATA_PIN D2 # define PS2_INT_INIT() \ do { \ @@ -264,14 +252,8 @@ enum led_sequence { /* PS/2 mouse USART version */ #ifdef PS2_USE_USART /* XCK for clock line and RXD for data line */ -# define PS2_CLOCK_PORT PORTD -# define PS2_CLOCK_PIN PIND -# define PS2_CLOCK_DDR DDRD -# define PS2_CLOCK_BIT 5 -# define PS2_DATA_PORT PORTD -# define PS2_DATA_PIN PIND -# define PS2_DATA_DDR DDRD -# define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/promethium/keymaps/default/rules.mk b/keyboards/handwired/promethium/keymaps/default/rules.mk index 4fd8baae272..45b33324565 100644 --- a/keyboards/handwired/promethium/keymaps/default/rules.mk +++ b/keyboards/handwired/promethium/keymaps/default/rules.mk @@ -13,11 +13,9 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output UNICODEMAP_ENABLE = yes -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes -BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk index 4fd9b656b67..96db4fcbbcb 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk +++ b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk @@ -15,11 +15,9 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes -BLUETOOTH = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index f35e5429bd0..c4c90176b53 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -1,5 +1,4 @@ -#ifndef PROMETHIUM_H -#define PROMETHIUM_H +#pragma once #include @@ -7,23 +6,22 @@ void battery_poll(uint8_t level); void led_set_kb(uint8_t usb_led); void led_set_user(uint8_t usb_led); +#define XXX KC_NO + #define LAYOUT( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75, \ tp1, tp2, tp3 \ -) \ -{ \ - {k11, k12, k13, k14, k15, k16}, \ - {k21, k22, k23, k24, k25, k26}, \ - {k31, k32, k33, k34, k35, k36}, \ - {k41, k42, k43, k44, k45, k46}, \ - {k17, k18, k19, k1a, k1b, k1c}, \ - {k27, k28, k29, k2a, k2b, k2c}, \ - {k37, k38, k39, k3a, k3b, k3c}, \ - {k47, k48, k49, k4a, k4b, k4c}, \ - {tp1, tp2, tp3, KC_NO, KC_NO, KC_NO} \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { tp1, tp2, tp3, XXX, XXX, XXX } \ } - -#endif diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index bd3b04a2d7f..106f30759a7 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -19,12 +19,12 @@ COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes PS2_USE_INT = yes CUSTOM_MATRIX = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/pterodactyl/config.h b/keyboards/handwired/pterodactyl/config.h index 9f5f1412b8c..044fa12f780 100644 --- a/keyboards/handwired/pterodactyl/config.h +++ b/keyboards/handwired/pterodactyl/config.h @@ -60,7 +60,3 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 0 - -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 diff --git a/keyboards/handwired/pterodactyl/rules.mk b/keyboards/handwired/pterodactyl/rules.mk index 56f83265d9d..7c8e3c33866 100644 --- a/keyboards/handwired/pterodactyl/rules.mk +++ b/keyboards/handwired/pterodactyl/rules.mk @@ -21,11 +21,11 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE UNICODE_ENABLE = yes CUSTOM_MATRIX = yes +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c QUANTUM_LIB_SRC += i2c_master.c diff --git a/keyboards/handwired/pytest/basic/info.json b/keyboards/handwired/pytest/basic/info.json index ed052a14a3e..af57447d30d 100644 --- a/keyboards/handwired/pytest/basic/info.json +++ b/keyboards/handwired/pytest/basic/info.json @@ -1,10 +1,9 @@ { - "maintainer": "qmk", - "layouts": { - "LAYOUT_custom": { - "layout": [ - { "label": "KC_Q", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 } - ] + "layouts": { + "LAYOUT_custom": { + "layout": [ + { "label": "KC_Q", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 } + ] + } } - } } diff --git a/keyboards/handwired/pytest/config.h b/keyboards/handwired/pytest/config.h index 64cf3531264..f03597a7d4e 100644 --- a/keyboards/handwired/pytest/config.h +++ b/keyboards/handwired/pytest/config.h @@ -2,13 +2,6 @@ #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6465 -#define DEVICE_VER 0x0001 -#define MANUFACTURER none -#define PRODUCT pytest - /* key matrix size */ #define MATRIX_ROWS 1 #define MATRIX_COLS 1 diff --git a/keyboards/handwired/pytest/info.json b/keyboards/handwired/pytest/info.json new file mode 100644 index 00000000000..5c941af9bf5 --- /dev/null +++ b/keyboards/handwired/pytest/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "pytest", + "manufacturer": "none", + "maintainer": "qmk", + "usb": { + "vid": "0xFEED", + "pid": "0x6465", + "device_ver": "0x0001" + } +} diff --git a/keyboards/mechlovin/adelais/standard_led/.noci b/keyboards/handwired/pytest/macro/.noci similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/.noci rename to keyboards/handwired/pytest/macro/.noci diff --git a/keyboards/handwired/pytest/macro/info.json b/keyboards/handwired/pytest/macro/info.json new file mode 100644 index 00000000000..ed052a14a3e --- /dev/null +++ b/keyboards/handwired/pytest/macro/info.json @@ -0,0 +1,10 @@ +{ + "maintainer": "qmk", + "layouts": { + "LAYOUT_custom": { + "layout": [ + { "label": "KC_Q", "matrix": [0, 0], "w": 1, "x": 0, "y": 0 } + ] + } + } +} diff --git a/keyboards/handwired/pytest/macro/keymaps/default/keymap.json b/keyboards/handwired/pytest/macro/keymaps/default/keymap.json new file mode 100644 index 00000000000..f319d862d83 --- /dev/null +++ b/keyboards/handwired/pytest/macro/keymaps/default/keymap.json @@ -0,0 +1,15 @@ +{ + "keyboard": "handwired/pytest/basic", + "keymap": "default_json", + "layout": "LAYOUT_ortho_1x1", + "layers": [["MACRO_0"]], + "macros": [ + [ + "Hello, World!", + {"action":"tap", "keycodes":["ENTER"]} + ] + ], + "author": "qmk", + "notes": "This file is a keymap.json file for handwired/pytest/basic", + "version": 1 +} diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/.noci b/keyboards/handwired/pytest/macro/readme.md similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev2/.noci rename to keyboards/handwired/pytest/macro/readme.md diff --git a/keyboards/handwired/pytest/macro/rules.mk b/keyboards/handwired/pytest/macro/rules.mk new file mode 100644 index 00000000000..6b42774dbff --- /dev/null +++ b/keyboards/handwired/pytest/macro/rules.mk @@ -0,0 +1 @@ +MCU = atmega32u4 diff --git a/keyboards/handwired/qc60/qc60.h b/keyboards/handwired/qc60/qc60.h index 944ec10f5e1..e26811ae728 100644 --- a/keyboards/handwired/qc60/qc60.h +++ b/keyboards/handwired/qc60/qc60.h @@ -1,10 +1,7 @@ -#ifndef QC60_H -#define QC60_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_handwired_qc60_proto - #include "proto.h" -#endif - +#if defined(KEYBOARD_handwired_qc60_proto) +# include "proto.h" #endif diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h index 95dcde32612..196f08f6f5f 100755 --- a/keyboards/handwired/reddot/config.h +++ b/keyboards/handwired/reddot/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -101,5 +100,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index 089e56bb01b..74cebfb8257 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -88,5 +87,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/retro_refit/rules.mk b/keyboards/handwired/retro_refit/rules.mk index d06879ab138..06be0c52efb 100644 --- a/keyboards/handwired/retro_refit/rules.mk +++ b/keyboards/handwired/retro_refit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/riblee_f401/rules.mk b/keyboards/handwired/riblee_f401/rules.mk index 60dc969717c..4ba8fd3888d 100644 --- a/keyboards/handwired/riblee_f401/rules.mk +++ b/keyboards/handwired/riblee_f401/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/riblee_f411/rules.mk b/keyboards/handwired/riblee_f411/rules.mk index 15fcab73226..02c668388d7 100644 --- a/keyboards/handwired/riblee_f411/rules.mk +++ b/keyboards/handwired/riblee_f411/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control KEYBOARD_SHARED_EP = yes diff --git a/keyboards/handwired/selene/rules.mk b/keyboards/handwired/selene/rules.mk index d95ac7686e1..1c3d3986813 100644 --- a/keyboards/handwired/selene/rules.mk +++ b/keyboards/handwired/selene/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/sick_pad/rules.mk b/keyboards/handwired/sick_pad/rules.mk index 6dc3b099d3c..68cbe90aee4 100644 --- a/keyboards/handwired/sick_pad/rules.mk +++ b/keyboards/handwired/sick_pad/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/slash/rules.mk b/keyboards/handwired/slash/rules.mk index 82ebd5c1030..8688504f63e 100644 --- a/keyboards/handwired/slash/rules.mk +++ b/keyboards/handwired/slash/rules.mk @@ -21,5 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH = AdafruitBLE AUDIO_ENABLE = no # Audio output +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/handwired/sono1/rules.mk b/keyboards/handwired/sono1/rules.mk index 6b0b75461c0..5a0df501586 100644 --- a/keyboards/handwired/sono1/rules.mk +++ b/keyboards/handwired/sono1/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 1edf4bf18d6..5af57fec5cd 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/split65/info.json b/keyboards/handwired/split65/info.json index 543fc9c394c..34d9a212051 100644 --- a/keyboards/handwired/split65/info.json +++ b/keyboards/handwired/split65/info.json @@ -5,89 +5,81 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"\u00ac", "x":0, "y":0}, - {"label":"!", "x":1, "y":0}, - {"label":"\"", "x":2, "y":0}, - {"label":"\u00a3", "x":3, "y":0}, - {"label":"$", "x":4, "y":0}, - - {"label":"%", "x":5, "y":0}, - {"label":"^", "x":6, "y":0}, - {"label":"&", "x":7, "y":0}, - {"label":"*", "x":8, "y":0}, - {"label":"(", "x":9, "y":0}, - - {"label":")", "x":10, "y":0}, - {"label":"_", "x":11, "y":0}, - {"label":"+", "x":12, "y":0}, - {"label":"Backspace", "x":13, "y":0, "w":2}, - {"x":15, "y":0}, + {"label":"`\u00ac", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":8, "y":0}, + {"label":"8*", "x":9, "y":0}, + {"label":"9(", "x":10, "y":0}, + {"label":"0)", "x":11, "y":0}, + {"label":"-_", "x":12, "y":0}, + {"label":"=+", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0, "w":2}, + {"label":"Insert", "x":16, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, - {"label":"T", "x":5.5, "y":1}, - {"label":"Y", "x":6.5, "y":1}, - {"label":"U", "x":7.5, "y":1}, - {"label":"I", "x":8.5, "y":1}, - {"label":"O", "x":9.5, "y":1}, - - {"label":"P", "x":10.5, "y":1}, - {"label":"{", "x":11.5, "y":1}, - {"label":"}", "x":12.5, "y":1}, - {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, - {"x":15, "y":1}, + {"label":"Y", "x":7.5, "y":1}, + {"label":"U", "x":8.5, "y":1}, + {"label":"I", "x":9.5, "y":1}, + {"label":"O", "x":10.5, "y":1}, + {"label":"P", "x":11.5, "y":1}, + {"label":"[{", "x":12.5, "y":1}, + {"label":"]}", "x":13.5, "y":1}, + {"label":"Delete", "x":16, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, - {"label":"G", "x":5.75, "y":2}, - {"label":"H", "x":6.75, "y":2}, - {"label":"J", "x":7.75, "y":2}, - {"label":"K", "x":8.75, "y":2}, - {"label":"L", "x":9.75, "y":2}, + {"label":"H", "x":7.75, "y":2}, + {"label":"J", "x":8.75, "y":2}, + {"label":"K", "x":9.75, "y":2}, + {"label":"L", "x":10.75, "y":2}, + {"label":";:", "x":11.75, "y":2}, + {"label":"'@", "x":12.75, "y":2}, + {"label":"#~", "x":13.75, "y":2}, + {"label":"Enter", "x":14.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Up", "x":16, "y":2}, - {"label":":", "x":10.75, "y":2}, - {"label":"@", "x":11.75, "y":2}, - {"label":"~", "x":12.75, "y":2}, - {"x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, - - {"label":"|", "x":1.25, "y":3}, + {"label":"\\|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, - {"label":"B", "x":6.25, "y":3}, - {"label":"N", "x":7.25, "y":3}, - {"label":"M", "x":8.25, "y":3}, - {"label":"<", "x":9.25, "y":3}, - {"label":">", "x":10.25, "y":3}, - - {"label":"?", "x":11.25, "y":3}, - {"label":"Shift", "x":12.25, "y":3, "w":1.75}, - {"label":"UP", "x":14, "y":3}, - {"x":15, "y":3}, - {"label":"Ctrl", "x":0, "y":4, "w":1.25}, - - {"label":"Win", "x":1.25, "y":4, "w":1.25}, - {"label":"Alt", "x":2.5, "y":4, "w":1.25}, - {"x":3.75, "y":4, "w":3}, - {"x":6.75, "y":4, "w":3.25}, - {"label":"AltGr", "x":10, "y":4}, + {"label":"N", "x":8.25, "y":3}, + {"label":"M", "x":9.25, "y":3}, + {"label":",<", "x":10.25, "y":3}, + {"label":".>", "x":11.25, "y":3}, + {"label":"/?", "x":12.25, "y":3}, + {"label":"Shift", "x":13.25, "y":3, "w":1.75}, + {"label":"Up", "x":15, "y":3}, + {"label":"Page Down", "x":16, "y":3}, - {"label":"Win", "x":11, "y":4}, - {"label":"Menu", "x":12, "y":4}, - {"label":"LEFT", "x":13, "y":4}, - {"label":"DOWN", "x":14, "y":4}, - {"label":"RIGHT", "x":15, "y":4}] + {"label":"Ctrl", "x":0.25, "y":4, "w":1.25}, + {"label":"Win", "x":1.5, "y":4, "w":1.25}, + {"label":"Alt", "x":2.75, "y":4, "w":1.25}, + {"label":"Space", "x":4, "y":4, "w":2.75}, + {"label":"Enter", "x":8, "y":4, "w":2.25}, + {"label":"AltGr", "x":10.25, "y":4}, + {"label":"Lower", "x":11.25, "y":4}, + {"label":"Raise", "x":12.25, "y":4}, + {"label":"Left", "x":14, "y":4}, + {"label":"Down", "x":15, "y":4}, + {"label":"Right", "x":16, "y":4} + ] } } } diff --git a/keyboards/handwired/split65/split65.c b/keyboards/handwired/split65/split65.c index 3b1dcaddaed..9d0831c0259 100644 --- a/keyboards/handwired/split65/split65.c +++ b/keyboards/handwired/split65/split65.c @@ -18,11 +18,14 @@ // OLED Code inspired by https://github.com/qmk/qmk_firmware/blob/master/keyboards/splitkb/kyria/rev1/rev1.c #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_180; +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { static const char PROGMEM qmk_logo[] = { 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, @@ -126,5 +129,6 @@ __attribute__((weak)) void oled_task_user(void) { }; oled_write_raw_P(split65_logo, sizeof(split65_logo)); } + return false; } #endif diff --git a/keyboards/handwired/split89/rules.mk b/keyboards/handwired/split89/rules.mk index 4d39af4d29b..0ce4c12edd3 100644 --- a/keyboards/handwired/split89/rules.mk +++ b/keyboards/handwired/split89/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/stream_cheap/2x3/config.h b/keyboards/handwired/stream_cheap/2x3/config.h index a142ec4a4e1..5e571e356ae 100644 --- a/keyboards/handwired/stream_cheap/2x3/config.h +++ b/keyboards/handwired/stream_cheap/2x3/config.h @@ -3,11 +3,11 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1213 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Kyle Hart -#define PRODUCT Stream Cheap 2x3 +#define VENDOR_ID 0x7363 // Stream Cheap +#define PRODUCT_ID 0x1213 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Stream Cheap +#define PRODUCT 2x3 /* key matrix size */ #define MATRIX_ROWS 2 diff --git a/keyboards/handwired/stream_cheap/2x3/rules.mk b/keyboards/handwired/stream_cheap/2x3/rules.mk index 6e891c6b80b..5d1187508fb 100644 --- a/keyboards/handwired/stream_cheap/2x3/rules.mk +++ b/keyboards/handwired/stream_cheap/2x3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c b/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c index 8824e214580..4d392ae982f 100644 --- a/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c +++ b/keyboards/handwired/stream_cheap/2x4/keymaps/via/keymap.c @@ -18,4 +18,21 @@ enum layers { NORMAL_LAYER, SECOND_LAYER, THIRD_LAYER, FOURTH_LAYER }; -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {[NORMAL_LAYER] = LAYOUT_ortho_2x4(KC_A, KC_A, KC_A, TO(3), KC_A, KC_A, KC_A, TO(1)), [SECOND_LAYER] = LAYOUT_ortho_2x4(KC_B, KC_B, KC_B, TO(0), KC_B, KC_B, KC_B, TO(2)), [THIRD_LAYER] = LAYOUT_ortho_2x4(KC_C, KC_C, KC_C, TO(1), KC_C, KC_C, KC_C, TO(3)), [FOURTH_LAYER] = LAYOUT_ortho_2x4(KC_D, KC_D, KC_D, TO(2), KC_D, KC_D, KC_D, TO(0))}; +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [NORMAL_LAYER] = LAYOUT_ortho_2x4( + KC_F13, KC_F14, KC_F15, KC_F16, + KC_F17, KC_F18, KC_F19, KC_F20 + ), + [SECOND_LAYER] = LAYOUT_ortho_2x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [THIRD_LAYER] = LAYOUT_ortho_2x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [FOURTH_LAYER] = LAYOUT_ortho_2x4( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/handwired/stream_cheap/2x4/rules.mk b/keyboards/handwired/stream_cheap/2x4/rules.mk index ce670b942b4..08aa4ed7b0f 100644 --- a/keyboards/handwired/stream_cheap/2x4/rules.mk +++ b/keyboards/handwired/stream_cheap/2x4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/stream_cheap/2x5/config.h b/keyboards/handwired/stream_cheap/2x5/config.h index cd69c632f1f..e7a73107b97 100644 --- a/keyboards/handwired/stream_cheap/2x5/config.h +++ b/keyboards/handwired/stream_cheap/2x5/config.h @@ -3,11 +3,11 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1215 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Kyle Hart -#define PRODUCT Stream Cheap 2x5 +#define VENDOR_ID 0x7363 // Stream Cheap +#define PRODUCT_ID 0x1215 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Stream Cheap +#define PRODUCT 2x5 /* key matrix size */ #define MATRIX_ROWS 2 @@ -15,7 +15,7 @@ /* define direct pins used */ #define DIRECT_PINS { { D1,C6,B4,B5,B2}, { D0,D4,D7,E6,B6} } -//#define DIRECT_PINS { { D1, C6, B4, B6, D0}, { D7, D4, B2, B5, E6} } + /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 5 diff --git a/keyboards/handwired/stream_cheap/2x5/rules.mk b/keyboards/handwired/stream_cheap/2x5/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/handwired/stream_cheap/2x5/rules.mk +++ b/keyboards/handwired/stream_cheap/2x5/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/astro65/rules.mk b/keyboards/handwired/swiftrax/astro65/rules.mk index a94b8477136..9158203a316 100644 --- a/keyboards/handwired/swiftrax/astro65/rules.mk +++ b/keyboards/handwired/swiftrax/astro65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/bebol/rules.mk b/keyboards/handwired/swiftrax/bebol/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/handwired/swiftrax/bebol/rules.mk +++ b/keyboards/handwired/swiftrax/bebol/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/beegboy/rules.mk b/keyboards/handwired/swiftrax/beegboy/rules.mk index 2fce58dcb15..6b2dc178e87 100644 --- a/keyboards/handwired/swiftrax/beegboy/rules.mk +++ b/keyboards/handwired/swiftrax/beegboy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/cowfish/rules.mk b/keyboards/handwired/swiftrax/cowfish/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/handwired/swiftrax/cowfish/rules.mk +++ b/keyboards/handwired/swiftrax/cowfish/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/equator/rules.mk b/keyboards/handwired/swiftrax/equator/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/handwired/swiftrax/equator/rules.mk +++ b/keyboards/handwired/swiftrax/equator/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/joypad/rules.mk b/keyboards/handwired/swiftrax/joypad/rules.mk index f8b44804b42..6b3745a8b71 100644 --- a/keyboards/handwired/swiftrax/joypad/rules.mk +++ b/keyboards/handwired/swiftrax/joypad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c index e702c189968..c4ac4c47be9 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/default/keymap.c @@ -119,7 +119,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c index 973b36bffc6..b9ce8a8b413 100644 --- a/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/koalafications/keymaps/via/keymap.c @@ -119,7 +119,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/koalafications/rules.mk b/keyboards/handwired/swiftrax/koalafications/rules.mk index e5ec31773b0..a1f5aee4836 100644 --- a/keyboards/handwired/swiftrax/koalafications/rules.mk +++ b/keyboards/handwired/swiftrax/koalafications/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/nodu/rules.mk b/keyboards/handwired/swiftrax/nodu/rules.mk index 6f6414868c5..df27d80139a 100644 --- a/keyboards/handwired/swiftrax/nodu/rules.mk +++ b/keyboards/handwired/swiftrax/nodu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/pandamic/rules.mk b/keyboards/handwired/swiftrax/pandamic/rules.mk index fb6776b9553..4c48ed51f49 100644 --- a/keyboards/handwired/swiftrax/pandamic/rules.mk +++ b/keyboards/handwired/swiftrax/pandamic/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c index efa8c27036b..46bd189da15 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/default/keymap.c @@ -99,7 +99,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c index efa8c27036b..46bd189da15 100644 --- a/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c +++ b/keyboards/handwired/swiftrax/the_galleon/keymaps/via/keymap.c @@ -99,7 +99,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/handwired/swiftrax/the_galleon/rules.mk b/keyboards/handwired/swiftrax/the_galleon/rules.mk index 5de32a57414..378c644afc5 100644 --- a/keyboards/handwired/swiftrax/the_galleon/rules.mk +++ b/keyboards/handwired/swiftrax/the_galleon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/unsplit/rules.mk b/keyboards/handwired/swiftrax/unsplit/rules.mk index 14a25c7b034..7ea82008aa3 100644 --- a/keyboards/handwired/swiftrax/unsplit/rules.mk +++ b/keyboards/handwired/swiftrax/unsplit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/swiftrax/walter/rules.mk b/keyboards/handwired/swiftrax/walter/rules.mk index 6bce0a2f7fa..34d93c52cb3 100644 --- a/keyboards/handwired/swiftrax/walter/rules.mk +++ b/keyboards/handwired/swiftrax/walter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetric70_proto/post_rules.mk b/keyboards/handwired/symmetric70_proto/post_rules.mk new file mode 100644 index 00000000000..e2d35d60abc --- /dev/null +++ b/keyboards/handwired/symmetric70_proto/post_rules.mk @@ -0,0 +1,2 @@ +KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk +include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk index de489fcabda..fbc1c3bb388 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk index 0b2b707ef82..73192f4ff76 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/promicro/rules.mk b/keyboards/handwired/symmetric70_proto/promicro/rules.mk index 5760d293d7d..22b7376b941 100644 --- a/keyboards/handwired/symmetric70_proto/promicro/rules.mk +++ b/keyboards/handwired/symmetric70_proto/promicro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk index de489fcabda..fbc1c3bb388 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/fast/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_fast/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk index 0b2b707ef82..73192f4ff76 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/normal/rules.mk @@ -1,6 +1,3 @@ CUSTOM_MATRIX = yes SRC += matrix_common.c SRC += matrix_debug/matrix.c - -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))../../local_features.mk -include $(KEYBOARD_LOCAL_FEATURES_MK) diff --git a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk index f1cda00f20b..8b19f79b3b1 100644 --- a/keyboards/handwired/symmetric70_proto/proton_c/rules.mk +++ b/keyboards/handwired/symmetric70_proto/proton_c/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/symmetry60/rules.mk b/keyboards/handwired/symmetry60/rules.mk index adfa79ad37b..8304e18ae7d 100644 --- a/keyboards/handwired/symmetry60/rules.mk +++ b/keyboards/handwired/symmetry60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/t111/rules.mk b/keyboards/handwired/t111/rules.mk index 6b0b75461c0..5a0df501586 100644 --- a/keyboards/handwired/t111/rules.mk +++ b/keyboards/handwired/t111/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/tennie/rules.mk b/keyboards/handwired/tennie/rules.mk index 97c3db2a41a..254ec54a323 100644 --- a/keyboards/handwired/tennie/rules.mk +++ b/keyboards/handwired/tennie/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index e3b0c419995..e1d77d55e24 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -109,5 +108,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/terminus_mini/terminus_mini.h b/keyboards/handwired/terminus_mini/terminus_mini.h index 27fb4509815..f498313cbbe 100644 --- a/keyboards/handwired/terminus_mini/terminus_mini.h +++ b/keyboards/handwired/terminus_mini/terminus_mini.h @@ -13,28 +13,27 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef TERMINUS_MINI_H -#define TERMINUS_MINI_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Terminus Mini layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, KC_NO, k35, KC_NO, k37, k38, k39, k3a, k3b } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k35, k37, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, XXX, k35, XXX, k37, k38, k39, k3A, k3B } \ } #define KC_ KC_TRNS - -#endif \ No newline at end of file diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 1429136f403..cf8b5605f43 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -12,14 +12,8 @@ #define MATRIX_COLS 3 #ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ /* set DDR of CLOCK as input to be slave */ diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk index 6eb48c34607..c80cf8929df 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk +++ b/keyboards/handwired/tractyl_manuform/4x6_right/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/config.h index ce35197f71c..6f702bd59e6 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/config.h +++ b/keyboards/handwired/tractyl_manuform/5x6_right/config.h @@ -31,6 +31,7 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define ROTATIONAL_TRANSFORM_ANGLE -25 +#define POINTING_DEVICE_INVERT_X /* Bootmagic Lite key configuration */ #define BOOTMAGIC_LITE_ROW 0 diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c index a52a2a3dc6f..3de8bcf1087 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c +++ b/keyboards/handwired/tractyl_manuform/5x6_right/keymaps/drashna/keymap.c @@ -184,7 +184,11 @@ bool tap_toggling = false; # define TAP_CHECK TAPPING_TERM # endif -void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { + int8_t x = mouse_report.x, y = mouse_report.y; + mouse_report.x = 0; + mouse_report.y = 0; + if (x != 0 && y != 0) { mouse_timer = timer_read(); # ifdef OLED_ENABLE @@ -195,13 +199,14 @@ void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { x = (x > 0 ? x * x / 16 + x : -x * x / 16 + x); y = (y > 0 ? y * y / 16 + y : -y * y / 16 + y); } - mouse_report->x = x; - mouse_report->y = y; + mouse_report.x = x; + mouse_report.y = y; if (!layer_state_is(_MOUSE)) { layer_on(_MOUSE); } } } + return mouse_report; } void matrix_scan_keymap(void) { diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk index 4109a3b82ca..699e826485c 100644 --- a/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk +++ b/keyboards/handwired/tractyl_manuform/5x6_right/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -16,11 +16,11 @@ AUDIO_ENABLE = no # Audio output SWAP_HANDS_ENABLE = yes POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pmw3360 MOUSE_SHARED_EP = no SPLIT_KEYBOARD = yes -SRC += drivers/sensors/pmw3360.c -QUANTUM_LIB_SRC += spi_master.c tm_sync.c +QUANTUM_LIB_SRC += tm_sync.c DEFAULT_FOLDER = handwired/tractyl_manuform/5x6_right/teensy2pp diff --git a/keyboards/handwired/tractyl_manuform/tm_sync.c b/keyboards/handwired/tractyl_manuform/tm_sync.c index 1cb3549469c..4739af1e76f 100644 --- a/keyboards/handwired/tractyl_manuform/tm_sync.c +++ b/keyboards/handwired/tractyl_manuform/tm_sync.c @@ -17,7 +17,6 @@ #include "tractyl_manuform.h" #include "transactions.h" #include -#include "drivers/sensors/pmw3360.h" kb_config_data_t kb_config; kb_mouse_report_t sync_mouse_report; @@ -82,6 +81,6 @@ void housekeeping_task_sync(void) { void trackball_set_cpi(uint16_t cpi) { kb_config.device_cpi = cpi; if (!is_keyboard_left()) { - pmw_set_cpi(cpi); + pointing_device_set_cpi(cpi); } } diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c index d851528ffb6..5f476fcc98b 100644 --- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c +++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c @@ -34,55 +34,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = TRACKBALL_DPI_OPTIONS; #define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) -bool BurstState = false; // init burst state for Trackball module -uint16_t MotionStart = 0; // Timer for accel, 0 is resting state -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { - mouse_report->x = x; - mouse_report->y = y; -} - -__attribute__((weak)) void process_mouse(void) { - report_pmw_t data = pmw_read_burst(); - // Reset timer if stopped moving - if (!data.isMotion) { - if (MotionStart != 0) MotionStart = 0; - return; - } - - if (data.isOnSurface) { - // Set timer if new motion - if (MotionStart == 0) { - if (debug_mouse) dprintf("Starting motion.\n"); - MotionStart = timer_read(); - } - - if (debug_mouse) { - dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); - } - if (debug_mouse) { - dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); - } -#if defined(PROFILE_LINEAR) - float scale = float(timer_elaspsed(MotionStart)) / 1000.0; - data.dx *= scale; - data.dy *= scale; -#elif defined(PROFILE_INVERSE) - // TODO -#else - // no post processing -#endif - - // Wrap to HID size - data.dx = constrain(data.dx, -127, 127); - data.dy = constrain(data.dy, -127, 127); - if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); - // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - - sync_mouse_report.x = -data.dx; - sync_mouse_report.y = data.dy; - } -} bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (!process_record_user(keycode, record)) { @@ -109,11 +61,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifndef MOUSEKEY_ENABLE if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } + currentReport.buttons = pointing_device_handle_buttons(currentReport.buttons, record->event.pressed, keycode - KC_MS_BTN1); pointing_device_set_report(currentReport); pointing_device_send(); } @@ -145,33 +93,28 @@ void keyboard_post_init_kb(void) { } #ifdef POINTING_DEVICE_ENABLE -void pointing_device_init(void) { - if (!is_keyboard_left()) { - // initialize ball sensor - pmw_spi_init(); - } +void pointing_device_init_kb(void) { trackball_set_cpi(dpi_array[keyboard_config.dpi_config]); + pointing_device_init_user(); } -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { if (is_keyboard_left()) { if (is_keyboard_master()) { transaction_rpc_recv(RPC_ID_POINTER_STATE_SYNC, sizeof(sync_mouse_report), &sync_mouse_report); - process_mouse_user(&mouse_report, sync_mouse_report.x, sync_mouse_report.y); + mouse_report.x = sync_mouse_report.x; + mouse_report.y = sync_mouse_report.y; + pointing_device_task_user(mouse_report); } } else { - process_mouse(); if (is_keyboard_master()) { - process_mouse_user(&mouse_report, sync_mouse_report.x, sync_mouse_report.y); - sync_mouse_report.x = 0; - sync_mouse_report.y = 0; + pointing_device_task_user(mouse_report); + } else { + sync_mouse_report.x = mouse_report.x; + sync_mouse_report.y = mouse_report.y; } } - - pointing_device_set_report(mouse_report); - pointing_device_send(); + return mouse_report; } #endif diff --git a/keyboards/handwired/tritium_numpad/rules.mk b/keyboards/handwired/tritium_numpad/rules.mk index 82dcfd94c00..51d9e849de0 100644 --- a/keyboards/handwired/tritium_numpad/rules.mk +++ b/keyboards/handwired/tritium_numpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/unicomp_mini_m/info.json b/keyboards/handwired/unicomp_mini_m/info.json index e2438eaeebe..d1a0558aa2f 100644 --- a/keyboards/handwired/unicomp_mini_m/info.json +++ b/keyboards/handwired/unicomp_mini_m/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "Unicomp Mini M", - "url": "", "maintainer": "stevendlander", + "url": "", "layouts": { "LAYOUT": { "layout": [ diff --git a/keyboards/handwired/videowriter/rules.mk b/keyboards/handwired/videowriter/rules.mk index 3e8ae9050cd..f4059cc842e 100644 --- a/keyboards/handwired/videowriter/rules.mk +++ b/keyboards/handwired/videowriter/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/wabi/rules.mk b/keyboards/handwired/wabi/rules.mk index b2a59cad161..6c849c7d1ed 100644 --- a/keyboards/handwired/wabi/rules.mk +++ b/keyboards/handwired/wabi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/wulkan/rules.mk b/keyboards/handwired/wulkan/rules.mk index 85ad2b12d74..8aa1554fd4c 100644 --- a/keyboards/handwired/wulkan/rules.mk +++ b/keyboards/handwired/wulkan/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index 946b0cb489a..8bd5b464a4f 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" @@ -81,4 +80,3 @@ along with this program. If not, see . #define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION #define IGNORE_MOD_TAP_INTERRUPT -#endif diff --git a/keyboards/handwired/xealous/rev1/rev1.h b/keyboards/handwired/xealous/rev1/rev1.h index 0d8913b2ead..88e5ef376ee 100644 --- a/keyboards/handwired/xealous/rev1/rev1.h +++ b/keyboards/handwired/xealous/rev1/rev1.h @@ -1,30 +1,26 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "quantum.h" #define XXX KC_NO #define LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ - L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ - L20, L21, L22, L23, L24, L25, R26, R25, R24, R23, R22, R21, R20, \ - L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ - L40, L41, L42, L43, L44, R44, R43, R42, R41, R40 \ - ) \ - { \ - { XXX, L06, L05, L04, L03, L02, L01, L00 }, \ - { XXX, XXX, L15, L14, L13, L12, L11, L10 }, \ - { XXX, XXX, L25, L24, L23, L22, L21, L20 }, \ - { XXX, XXX, L35, L34, L33, L32, L31, L30 }, \ - { XXX, XXX, XXX, L44, L43, L42, L41, L40 }, \ - { R00, R01, R02, R03, R04, R05, R06, XXX }, \ - { R10, R11, R12, R13, R14, R15, R16, R17 }, \ - { R20, R21, R22, R23, R24, R25, R26, XXX }, \ - { R30, R31, R32, R33, R34, R35, XXX, XXX }, \ - { R40, R41, R42, R43, R44, XXX, XXX, XXX } \ - } + L00, L01, L02, L03, L04, L05, L06, R06, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R17, R16, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R26, R25, R24, R23, R22, R21, R20, \ + L30, L31, L32, L33, L34, L35, R35, R34, R33, R32, R31, R30, \ + L40, L41, L42, L43, L44, R44, R43, R42, R41, R40 \ +) { \ + { XXX, L06, L05, L04, L03, L02, L01, L00 }, \ + { XXX, XXX, L15, L14, L13, L12, L11, L10 }, \ + { XXX, XXX, L25, L24, L23, L22, L21, L20 }, \ + { XXX, XXX, L35, L34, L33, L32, L31, L30 }, \ + { XXX, XXX, XXX, L44, L43, L42, L41, L40 }, \ + { R00, R01, R02, R03, R04, R05, R06, XXX }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, XXX }, \ + { R30, R31, R32, R33, R34, R35, XXX, XXX }, \ + { R40, R41, R42, R43, R44, XXX, XXX, XXX } \ +} #define LAYOUT_split60 LAYOUT - -#endif diff --git a/keyboards/handwired/xealousbrown/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index f8c404f049b..67b91e61938 100644 --- a/keyboards/handwired/xealousbrown/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/handwired/z150/rules.mk b/keyboards/handwired/z150/rules.mk index 345dc6ffbcd..f071a8be8c4 100644 --- a/keyboards/handwired/z150/rules.mk +++ b/keyboards/handwired/z150/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/handwired/zergo/rules.mk b/keyboards/handwired/zergo/rules.mk index 9ce0f1a3df4..85646a5e486 100644 --- a/keyboards/handwired/zergo/rules.mk +++ b/keyboards/handwired/zergo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hardlineworks/otd_plus/rules.mk b/keyboards/hardlineworks/otd_plus/rules.mk index bba6cf37cda..988e01862ad 100644 --- a/keyboards/hardlineworks/otd_plus/rules.mk +++ b/keyboards/hardlineworks/otd_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hecomi/rules.mk b/keyboards/hecomi/rules.mk index 331aaf21a21..7ceb58dcd4f 100644 --- a/keyboards/hecomi/rules.mk +++ b/keyboards/hecomi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/helix/local_drivers/i2c.h b/keyboards/helix/local_drivers/i2c.h index 47cf6bd1b2c..710662c7abd 100644 --- a/keyboards/helix/local_drivers/i2c.h +++ b/keyboards/helix/local_drivers/i2c.h @@ -1,5 +1,4 @@ -#ifndef I2C_H -#define I2C_H +#pragma once #include @@ -45,5 +44,3 @@ extern unsigned char i2c_readNak(void); extern unsigned char i2c_read(unsigned char ack); #define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - -#endif diff --git a/keyboards/helix/local_drivers/serial.h b/keyboards/helix/local_drivers/serial.h index 2e53928df2d..b4dcdafe57f 100644 --- a/keyboards/helix/local_drivers/serial.h +++ b/keyboards/helix/local_drivers/serial.h @@ -1,5 +1,4 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H +#pragma once #include @@ -85,5 +84,3 @@ int soft_serial_transaction(int sstd_index); #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/helix/local_drivers/ssd1306.h b/keyboards/helix/local_drivers/ssd1306.h index bcb30f88595..a7527f4ebc6 100644 --- a/keyboards/helix/local_drivers/ssd1306.h +++ b/keyboards/helix/local_drivers/ssd1306.h @@ -1,5 +1,4 @@ -#ifndef SSD1306_H -#define SSD1306_H +#pragma once #include #include @@ -88,5 +87,3 @@ void matrix_write_P(struct CharacterMatrix *matrix, const char *data); void matrix_render(struct CharacterMatrix *matrix); bool process_record_gfx(uint16_t keycode, keyrecord_t *record); - -#endif diff --git a/keyboards/helix/pico/keymaps/biacco/rules.mk b/keyboards/helix/pico/keymaps/biacco/rules.mk index 37e49977c50..993ade26739 100644 --- a/keyboards/helix/pico/keymaps/biacco/rules.mk +++ b/keyboards/helix/pico/keymaps/biacco/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = no # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/default/rules.mk b/keyboards/helix/pico/keymaps/default/rules.mk index fcf92e67177..8a4a0df28e4 100644 --- a/keyboards/helix/pico/keymaps/default/rules.mk +++ b/keyboards/helix/pico/keymaps/default/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/keymaps/mtei/rules.mk b/keyboards/helix/pico/keymaps/mtei/rules.mk index 165233f5fef..05a60f67d5e 100644 --- a/keyboards/helix/pico/keymaps/mtei/rules.mk +++ b/keyboards/helix/pico/keymaps/mtei/rules.mk @@ -18,7 +18,3 @@ LTO_ENABLE = no # if firmware size over limit, try this option # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/pico/local_features.mk b/keyboards/helix/pico/local_features.mk deleted file mode 100644 index be5c739f976..00000000000 --- a/keyboards/helix/pico/local_features.mk +++ /dev/null @@ -1,149 +0,0 @@ -# -# local_features.mk contains post-processing rules for the Helix keyboard. -# -# Post-processing rules convert keyboard-specific shortcuts (that represent -# combinations of standard options) into QMK standard options. -# - -KEYBOARD_LOCAL_FEATURES_MK := - -define HELIX_CUSTOMISE_MSG - $(info Helix Spacific Build Options) - $(info - OLED_ENABLE = $(OLED_ENABLE)) - $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) - $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) - $(info - LED_ANIMATIONS = $(LED_ANIMATIONS)) - $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) - $(info ) -endef - -define HELIX_HELP_MSG - $(info Helix keyboard convenient command line option) - $(info - make HELIX= helix/pico:) - $(info - option= oled | back | under | na | no-ani) - $(info - ios | sc | split-common | scan | verbose) - $(info - ex.) - $(info - make HELIX=oled helix/pico:) - $(info - make HELIX=back helix/pico:) - $(info - make HELIX=under helix/pico:) - $(info - make HELIX=back,na helix/pico:) - $(info - make HELIX=back,ios helix/pico:) - $(info ) -endef - - ifneq ($(strip $(HELIX)),) - COMMA=, - helix_option := $(subst $(COMMA), , $(HELIX)) - ifneq ($(filter help,$(helix_option)),) - $(eval $(call HELIX_HELP_MSG)) - $(error ) - endif - ifneq ($(filter oled,$(helix_option)),) - OLED_ENABLE = yes - endif - ifneq ($(filter back,$(helix_option)),) - LED_BACK_ENABLE = yes - else ifneq ($(filter under,$(helix_option)),) - LED_UNDERGLOW_ENABLE = yes - endif - ifneq ($(filter na,$(helix_option)),) - LED_ANIMATIONS = no - endif - ifneq ($(filter no_ani,$(helix_option)),) - LED_ANIMATIONS = no - endif - ifneq ($(filter no-ani,$(helix_option)),) - LED_ANIMATIONS = no - endif - ifneq ($(filter ios,$(helix_option)),) - IOS_DEVICE_ENABLE = yes - endif - ifneq ($(filter sc,$(helix_option)),) - SPLIT_KEYBOARD = yes - endif - ifneq ($(filter split-common,$(helix_option)),) - SPLIT_KEYBOARD = yes - endif - ifneq ($(filter scan,$(helix_option)),) - # use DEBUG_MATRIX_SCAN_RATE - # see docs/newbs_testing_debugging.md - OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE - CONSOLE_ENABLE = yes - SHOW_VERBOSE_INFO = yes - endif - ifneq ($(filter verbose,$(helix_option)),) - SHOW_VERBOSE_INFO = yes - endif - SHOW_HELIX_OPTIONS = yes - endif - -ifneq ($(strip $(SPLIT_KEYBOARD)), yes) - SRC += local_drivers/serial.c - KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers - - # A workaround until #7089 is merged. - # serial.c must not be compiled with the -lto option. - # The current LIB_SRC has a side effect with the -fno-lto option, so use it. - LIB_SRC += local_drivers/serial.c - - CUSTOM_MATRIX = yes - - SRC += pico/matrix.c - SRC += pico/split_util.c -endif - -######## -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. - -ifeq ($(strip $(LED_BACK_ENABLE)), yes) - RGBLIGHT_ENABLE = yes - OPT_DEFS += -DRGBLED_BACK - ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - $(eval $(call HELIX_CUSTOMISE_MSG)) - $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') - endif -else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) - RGBLIGHT_ENABLE = yes -endif - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif - -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - -ifeq ($(strip $(OLED_ENABLE)), yes) - SRC += local_drivers/i2c.c - SRC += local_drivers/ssd1306.c - KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers - OPT_DEFS += -DOLED_ENABLE - ifeq ($(strip $(LOCAL_GLCDFONT)), yes) - OPT_DEFS += -DLOCAL_GLCDFONT - endif -endif - -ifeq ($(strip $(AUDIO_ENABLE)),yes) - ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) - LTO_ENABLE = yes - endif - ifeq ($(strip $(OLED_ENABLE)),yes) - LTO_ENABLE = yes - endif -endif - -ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) - $(eval $(call HELIX_CUSTOMISE_MSG)) - ifneq ($(strip $(SHOW_VERBOSE_INFO)),) - $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) - $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) - $(info -- OPT_DEFS = $(OPT_DEFS)) - $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD)) - $(info -- LTO_ENABLE = $(LTO_ENABLE)) - $(info ) - endif -endif - -OLED_ENABLE = no # disable OLED in TOP/common_features.mk diff --git a/keyboards/helix/pico/post_rules.mk b/keyboards/helix/pico/post_rules.mk new file mode 100644 index 00000000000..38573d75a52 --- /dev/null +++ b/keyboards/helix/pico/post_rules.mk @@ -0,0 +1,147 @@ +# +# post_rules.mk contains post-processing rules for the Helix keyboard. +# +# Post-processing rules convert keyboard-specific shortcuts (that represent +# combinations of standard options) into QMK standard options. +# + +define HELIX_CUSTOMISE_MSG + $(info Helix Spacific Build Options) + $(info - OLED_ENABLE = $(OLED_ENABLE)) + $(info - LED_BACK_ENABLE = $(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE = $(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATIONS = $(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE = $(IOS_DEVICE_ENABLE)) + $(info ) +endef + +define HELIX_HELP_MSG + $(info Helix keyboard convenient command line option) + $(info - make HELIX= helix/pico:) + $(info - option= oled | back | under | na | no-ani) + $(info - ios | sc | split-common | scan | verbose) + $(info - ex.) + $(info - make HELIX=oled helix/pico:) + $(info - make HELIX=back helix/pico:) + $(info - make HELIX=under helix/pico:) + $(info - make HELIX=back,na helix/pico:) + $(info - make HELIX=back,ios helix/pico:) + $(info ) +endef + + ifneq ($(strip $(HELIX)),) + COMMA=, + helix_option := $(subst $(COMMA), , $(HELIX)) + ifneq ($(filter help,$(helix_option)),) + $(eval $(call HELIX_HELP_MSG)) + $(error ) + endif + ifneq ($(filter oled,$(helix_option)),) + OLED_ENABLE = yes + endif + ifneq ($(filter back,$(helix_option)),) + LED_BACK_ENABLE = yes + else ifneq ($(filter under,$(helix_option)),) + LED_UNDERGLOW_ENABLE = yes + endif + ifneq ($(filter na,$(helix_option)),) + LED_ANIMATIONS = no + endif + ifneq ($(filter no_ani,$(helix_option)),) + LED_ANIMATIONS = no + endif + ifneq ($(filter no-ani,$(helix_option)),) + LED_ANIMATIONS = no + endif + ifneq ($(filter ios,$(helix_option)),) + IOS_DEVICE_ENABLE = yes + endif + ifneq ($(filter sc,$(helix_option)),) + SPLIT_KEYBOARD = yes + endif + ifneq ($(filter split-common,$(helix_option)),) + SPLIT_KEYBOARD = yes + endif + ifneq ($(filter scan,$(helix_option)),) + # use DEBUG_MATRIX_SCAN_RATE + # see docs/newbs_testing_debugging.md + OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE + CONSOLE_ENABLE = yes + SHOW_VERBOSE_INFO = yes + endif + ifneq ($(filter verbose,$(helix_option)),) + SHOW_VERBOSE_INFO = yes + endif + SHOW_HELIX_OPTIONS = yes + endif + +ifneq ($(strip $(SPLIT_KEYBOARD)), yes) + SRC += local_drivers/serial.c + KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + + # A workaround until #7089 is merged. + # serial.c must not be compiled with the -lto option. + # The current LIB_SRC has a side effect with the -fno-lto option, so use it. + LIB_SRC += local_drivers/serial.c + + CUSTOM_MATRIX = yes + + SRC += pico/matrix.c + SRC += pico/split_util.c +endif + +######## +# convert Helix-specific options (that represent combinations of standard options) +# into QMK standard options. + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + SRC += local_drivers/i2c.c + SRC += local_drivers/ssd1306.c + KEYBOARD_PATHS += $(HELIX_TOP_DIR)/local_drivers + OPT_DEFS += -DOLED_ENABLE + ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT + endif +endif + +ifeq ($(strip $(AUDIO_ENABLE)),yes) + ifeq ($(strip $(RGBLIGHT_ENABLE)),yes) + LTO_ENABLE = yes + endif + ifeq ($(strip $(OLED_ENABLE)),yes) + LTO_ENABLE = yes + endif +endif + +ifneq ($(strip $(SHOW_HELIX_OPTIONS)),) + $(eval $(call HELIX_CUSTOMISE_MSG)) + ifneq ($(strip $(SHOW_VERBOSE_INFO)),) + $(info -- RGBLIGHT_ENABLE = $(RGBLIGHT_ENABLE)) + $(info -- CONSOLE_ENABLE = $(CONSOLE_ENABLE)) + $(info -- OPT_DEFS = $(OPT_DEFS)) + $(info -- SPLIT_KEYBOARD = $(SPLIT_KEYBOARD)) + $(info -- LTO_ENABLE = $(LTO_ENABLE)) + $(info ) + endif +endif + +OLED_ENABLE = no # disable OLED in TOP/common_features.mk diff --git a/keyboards/helix/pico/rules.mk b/keyboards/helix/pico/rules.mk index cb9a70e00e3..12caec37ef5 100644 --- a/keyboards/helix/pico/rules.mk +++ b/keyboards/helix/pico/rules.mk @@ -1,5 +1,3 @@ -KEYBOARD_LOCAL_FEATURES_MK := $(dir $(lastword $(MAKEFILE_LIST)))local_features.mk - # Helix Spacific Build Options default values OLED_ENABLE = no # OLED_ENABLE LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" diff --git a/keyboards/helix/pico/split_util.h b/keyboards/helix/pico/split_util.h index c0ecdb09741..b839ce6e3ee 100644 --- a/keyboards/helix/pico/split_util.h +++ b/keyboards/helix/pico/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool is_helix_master(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev1/split_util.h b/keyboards/helix/rev1/split_util.h index 595a0659e1d..807412cd38a 100644 --- a/keyboards/helix/rev1/split_util.h +++ b/keyboards/helix/rev1/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" @@ -16,5 +15,3 @@ bool has_usb(void); void keyboard_slave_loop(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev2/keymaps/default/oled_display.c b/keyboards/helix/rev2/keymaps/default/oled_display.c index 36a7cf0b10b..4ee3f002d60 100644 --- a/keyboards/helix/rev2/keymaps/default/oled_display.c +++ b/keyboards/helix/rev2/keymaps/default/oled_display.c @@ -208,7 +208,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -223,6 +223,7 @@ void oled_task_user(void) { render_rgbled_status(false); render_layer_status(); } + return false; } # endif #endif diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index c16f3e2b87f..58b43a6bdac 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -29,7 +29,3 @@ OLED_SELECT = core ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_display.c endif - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c index 500a7bbf1a7..207aebc4233 100644 --- a/keyboards/helix/rev2/keymaps/edvorakjp/oled.c +++ b/keyboards/helix/rev2/keymaps/edvorakjp/oled.c @@ -56,7 +56,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return is_keyboard_left() ? rotation : rotation ^ OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_mode_icon(!get_enable_kc_lang()); render_layer_state(); @@ -64,5 +64,6 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c index fcbd81c9b6e..dc6de02b176 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev2/keymaps/five_rows/oled_display.c @@ -259,7 +259,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -272,6 +272,7 @@ void oled_task_user(void) { }else{ render_logo(); } + return false; } # endif diff --git a/keyboards/helix/rev2/keymaps/five_rows/rules.mk b/keyboards/helix/rev2/keymaps/five_rows/rules.mk index 0012f657abc..8a091605ac1 100644 --- a/keyboards/helix/rev2/keymaps/five_rows/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows/rules.mk @@ -106,7 +106,3 @@ endif ifeq ($(strip $(CUSTOM_DELAY)),yes) SRC += matrix_output_unselect_delay.c endif - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk index d44382f86ad..7c4a7b6045f 100644 --- a/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk +++ b/keyboards/helix/rev2/keymaps/five_rows_jis/rules.mk @@ -17,7 +17,3 @@ HELIX_ROWS = 5 # Helix Rows is 4 or 5 # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) # LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk b/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk index 462a83f6e7c..98585b0d60a 100644 --- a/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk +++ b/keyboards/helix/rev2/keymaps/fraanrosi/rules.mk @@ -22,7 +22,3 @@ LED_ANIMATIONS = yes # LED animations LED_BACK_ENABLE = no LED_UNDERGLOW_ENABLE = yes - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk index 5a0fd9a2b18..2d01c43fe7d 100644 --- a/keyboards/helix/rev2/keymaps/froggy/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -17,7 +17,3 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk index 5a0fd9a2b18..2d01c43fe7d 100644 --- a/keyboards/helix/rev2/keymaps/froggy_106/rules.mk +++ b/keyboards/helix/rev2/keymaps/froggy_106/rules.mk @@ -17,7 +17,3 @@ LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/led_test/rules.mk b/keyboards/helix/rev2/keymaps/led_test/rules.mk index 8b590eee864..3ab27acfc2c 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rules.mk +++ b/keyboards/helix/rev2/keymaps/led_test/rules.mk @@ -23,7 +23,3 @@ ifeq ($(strip $(OLED_ENABLE)), yes) SRC += oled_display.c endif SRC += led_test_init.c - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk index 83dcc9b3b83..cd436cd9a34 100644 --- a/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk +++ b/keyboards/helix/rev2/keymaps/yshrsmz/rules.mk @@ -17,7 +17,3 @@ OLED_ENABLE = yes # OLED_ENABLE # LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = no # LED animations # IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) - -# convert Helix-specific options (that represent combinations of standard options) -# into QMK standard options. -include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) diff --git a/keyboards/helix/rev2/post_rules.mk b/keyboards/helix/rev2/post_rules.mk new file mode 100644 index 00000000000..4c671d4515b --- /dev/null +++ b/keyboards/helix/rev2/post_rules.mk @@ -0,0 +1,3 @@ +ifneq ($(strip $(KEYBOARD_LOCAL_FEATURES_MK)),) + include $(strip $(KEYBOARD_LOCAL_FEATURES_MK)) +endif diff --git a/keyboards/helix/rev2/serial_config_simpleapi.h b/keyboards/helix/rev2/serial_config_simpleapi.h index e2d22a41e7b..0e1dd9e4acb 100644 --- a/keyboards/helix/rev2/serial_config_simpleapi.h +++ b/keyboards/helix/rev2/serial_config_simpleapi.h @@ -1,8 +1,5 @@ -#ifndef SERIAL_CONFIG_SIMPLEAPI_H -#define SERIAL_CONFIG_SIMPLEAPI_H +#pragma once #undef SERIAL_USE_MULTI_TRANSACTION #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 - -#endif // SERIAL_CONFIG_SIMPLEAPI_H diff --git a/keyboards/helix/rev2/split_scomm.h b/keyboards/helix/rev2/split_scomm.h index 873d8939d81..16887eb74f7 100644 --- a/keyboards/helix/rev2/split_scomm.h +++ b/keyboards/helix/rev2/split_scomm.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H +#pragma once #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ @@ -20,5 +19,3 @@ void serial_slave_init(void); int serial_update_buffers(int master_changed); #endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/helix/rev2/split_util.h b/keyboards/helix/rev2/split_util.h index c0ecdb09741..b839ce6e3ee 100644 --- a/keyboards/helix/rev2/split_util.h +++ b/keyboards/helix/rev2/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool is_helix_master(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c b/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c index fb1a6f9f874..e951f627c83 100644 --- a/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c +++ b/keyboards/helix/rev3_4rows/keymaps/default/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c b/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c index fb1a6f9f874..e951f627c83 100644 --- a/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c +++ b/keyboards/helix/rev3_4rows/keymaps/via/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_4rows/rev3_4rows.c b/keyboards/helix/rev3_4rows/rev3_4rows.c index 963cc744e77..704f9155109 100644 --- a/keyboards/helix/rev3_4rows/rev3_4rows.c +++ b/keyboards/helix/rev3_4rows/rev3_4rows.c @@ -83,8 +83,8 @@ char *sprint2d(char *buf, char *leadstr, int data) { return sprint_decimal(buf, data); } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } static const char PROGMEM helix_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, @@ -109,5 +109,6 @@ void oled_task_user(void) { } else { oled_write_P(helix_logo, false); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c index fb1a6f9f874..e951f627c83 100644 --- a/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/default/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c index e8ba0d720fd..cee415ad30b 100644 --- a/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/five_rows/oled_display.c @@ -214,7 +214,7 @@ void iota_gfx_task_user(void) { matrix_update(&display, &matrix); } # else -void oled_task_user(void) { +bool oled_task_user(void) { # if DEBUG_TO_SCREEN if (debug_enable) { @@ -227,6 +227,7 @@ void oled_task_user(void) { }else{ render_logo(); } + return false; } # endif diff --git a/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c b/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c index fb1a6f9f874..e951f627c83 100644 --- a/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c +++ b/keyboards/helix/rev3_5rows/keymaps/via/oled_display.c @@ -101,12 +101,13 @@ static void render_rgbled_status(bool full) { #endif } -void oled_task_user(void) { +bool oled_task_user(void) { if(is_keyboard_master()){ render_status(); }else{ render_logo(); render_rgbled_status(true); } + return false; } #endif diff --git a/keyboards/helix/rev3_5rows/rev3_5rows.c b/keyboards/helix/rev3_5rows/rev3_5rows.c index 963cc744e77..704f9155109 100644 --- a/keyboards/helix/rev3_5rows/rev3_5rows.c +++ b/keyboards/helix/rev3_5rows/rev3_5rows.c @@ -83,8 +83,8 @@ char *sprint2d(char *buf, char *leadstr, int data) { return sprint_decimal(buf, data); } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } static const char PROGMEM helix_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, @@ -109,5 +109,6 @@ void oled_task_user(void) { } else { oled_write_P(helix_logo, false); } + return false; } #endif diff --git a/keyboards/hhkb/ansi/post_rules.mk b/keyboards/hhkb/ansi/post_rules.mk new file mode 100644 index 00000000000..bc6ad5cd4cb --- /dev/null +++ b/keyboards/hhkb/ansi/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/ansi/rules.mk b/keyboards/hhkb/ansi/rules.mk index 6e2e81b0cfa..d9a69a5e387 100644 --- a/keyboards/hhkb/ansi/rules.mk +++ b/keyboards/hhkb/ansi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -30,26 +30,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/jp/post_rules.mk b/keyboards/hhkb/jp/post_rules.mk new file mode 100644 index 00000000000..bc6ad5cd4cb --- /dev/null +++ b/keyboards/hhkb/jp/post_rules.mk @@ -0,0 +1,18 @@ +ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) + +OPT_DEFS += -DHHKB_RN42_ENABLE + +# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT +# HHKB Alt controller. +RN42_DIR = ../rn42 + +SRC += serial_uart.c \ + ../rn42/suart.S \ + ../rn42/rn42.c \ + ../rn42/rn42_task.c \ + ../rn42/battery.c \ + ../rn42/main.c + +VPATH += $(RN42_DIR) + +endif diff --git a/keyboards/hhkb/jp/rules.mk b/keyboards/hhkb/jp/rules.mk index 56187bb331a..f197cd9eefb 100644 --- a/keyboards/hhkb/jp/rules.mk +++ b/keyboards/hhkb/jp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -30,26 +30,6 @@ CUSTOM_MATRIX = yes # Custom matrix file for the HHKB # project specific files SRC = matrix.c -ifeq ($(strip $(HHKB_RN42_ENABLE)), yes) - -OPT_DEFS += -DHHKB_RN42_ENABLE - -# Support for the RN42 Bluetooth module. This is the BT module in Hasu's BT -# HHKB Alt controller. -RN42_DIR = ../rn42 - -SRC += serial_uart.c \ - ../rn42/suart.S \ - ../rn42/rn42.c \ - ../rn42/rn42_task.c \ - ../rn42/battery.c \ - ../rn42/main.c - -VPATH += $(RN42_DIR) - -endif - - # debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION # debug-on: all diff --git a/keyboards/hhkb/rn42/battery.h b/keyboards/hhkb/rn42/battery.h index 180d4dcfaaa..c7f96d09a3f 100644 --- a/keyboards/hhkb/rn42/battery.h +++ b/keyboards/hhkb/rn42/battery.h @@ -1,5 +1,4 @@ -#ifndef POWER_H -#define POWER_H +#pragma once #include #include @@ -31,5 +30,3 @@ battery_status_t battery_status(void); // ADC offset:16, resolution:5mV #define BATTERY_ADC_OFFSET 16 #define BATTERY_ADC_RESOLUTION 5 - -#endif diff --git a/keyboards/hhkb/rn42/rn42.h b/keyboards/hhkb/rn42/rn42.h index dee214cc842..76bcef99bb3 100644 --- a/keyboards/hhkb/rn42/rn42.h +++ b/keyboards/hhkb/rn42/rn42.h @@ -1,5 +1,4 @@ -#ifndef RN42_H -#define RN42_H +#pragma once #include #include "host_driver.h" @@ -26,5 +25,3 @@ void rn42_send_str(const char *str); void rn42_print_response(void); #define SEND_STR(str) rn42_send_str(PSTR(str)) #define SEND_COMMAND(cmd) rn42_send_command(PSTR(cmd)) - -#endif diff --git a/keyboards/hhkb/rn42/rn42_task.h b/keyboards/hhkb/rn42/rn42_task.h index ee00669ee59..05e80e9be2b 100644 --- a/keyboards/hhkb/rn42/rn42_task.h +++ b/keyboards/hhkb/rn42/rn42_task.h @@ -1,5 +1,4 @@ -#ifndef RN42_TASK_H -#define RN42_TASK_H +#pragma once #include #include "rn42.h" @@ -10,5 +9,3 @@ bool rn42_nkro_last; void rn42_task_init(void); void rn42_task(void); - -#endif diff --git a/keyboards/hhkb_lite_2/rules.mk b/keyboards/hhkb_lite_2/rules.mk index ce37a63a785..951db8a1e90 100644 --- a/keyboards/hhkb_lite_2/rules.mk +++ b/keyboards/hhkb_lite_2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 1e263649e58..1664b9e3146 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -91,5 +90,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/hid_liber/keymaps/bakageta/rules.mk b/keyboards/hid_liber/keymaps/bakageta/rules.mk index 8cb28dd5dff..b1530f614f1 100755 --- a/keyboards/hid_liber/keymaps/bakageta/rules.mk +++ b/keyboards/hid_liber/keymaps/bakageta/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk index 4e43eccc608..ecd04298c92 100755 --- a/keyboards/hid_liber/rules.mk +++ b/keyboards/hid_liber/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/hidtech/bastyl/rules.mk b/keyboards/hidtech/bastyl/rules.mk index 4b9b97c3e38..aeb183666e4 100644 --- a/keyboards/hidtech/bastyl/rules.mk +++ b/keyboards/hidtech/bastyl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/h10/rules.mk b/keyboards/hineybush/h10/rules.mk index 9917fd89cc0..d46c6dcc6db 100644 --- a/keyboards/hineybush/h10/rules.mk +++ b/keyboards/hineybush/h10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/hineybush/h60/rules.mk b/keyboards/hineybush/h60/rules.mk index f7deac469ac..f2513c97524 100644 --- a/keyboards/hineybush/h60/rules.mk +++ b/keyboards/hineybush/h60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/hineybush/h660s/rules.mk b/keyboards/hineybush/h660s/rules.mk index f9f5ed55048..1d0782a2ee7 100644 --- a/keyboards/hineybush/h660s/rules.mk +++ b/keyboards/hineybush/h660s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/h75_singa/rules.mk b/keyboards/hineybush/h75_singa/rules.mk index cc13d0c39b8..76590c14a5f 100644 --- a/keyboards/hineybush/h75_singa/rules.mk +++ b/keyboards/hineybush/h75_singa/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/h87a/rules.mk b/keyboards/hineybush/h87a/rules.mk index 7bdbf25ef88..75a13122736 100644 --- a/keyboards/hineybush/h87a/rules.mk +++ b/keyboards/hineybush/h87a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/h88/rules.mk b/keyboards/hineybush/h88/rules.mk index f540927f103..d3ee3fd1c60 100644 --- a/keyboards/hineybush/h88/rules.mk +++ b/keyboards/hineybush/h88/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/hbcp/rules.mk b/keyboards/hineybush/hbcp/rules.mk index 0ff3c76a5bb..af9655c57af 100644 --- a/keyboards/hineybush/hbcp/rules.mk +++ b/keyboards/hineybush/hbcp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/hineybush/physix/rules.mk b/keyboards/hineybush/physix/rules.mk index fb97faa5f0a..0d9012c70b9 100644 --- a/keyboards/hineybush/physix/rules.mk +++ b/keyboards/hineybush/physix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hineybush/sm68/rules.mk b/keyboards/hineybush/sm68/rules.mk index 1417fbe14a4..1ef41c30ce6 100644 --- a/keyboards/hineybush/sm68/rules.mk +++ b/keyboards/hineybush/sm68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/holyswitch/southpaw75/rules.mk b/keyboards/holyswitch/southpaw75/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/holyswitch/southpaw75/rules.mk +++ b/keyboards/holyswitch/southpaw75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hotdox/keymaps/default/keymap.c b/keyboards/hotdox/keymaps/default/keymap.c index 3d6f040f34d..fe07e6f91d0 100644 --- a/keyboards/hotdox/keymaps/default/keymap.c +++ b/keyboards/hotdox/keymaps/default/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_NO, KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB,KC_ENT diff --git a/keyboards/hotdox/keymaps/via/keymap.c b/keyboards/hotdox/keymaps/via/keymap.c index 5cfad55ddd2..df951542a6b 100644 --- a/keyboards/hotdox/keymaps/via/keymap.c +++ b/keyboards/hotdox/keymaps/via/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_NO, KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB,KC_ENT diff --git a/keyboards/hotdox/rules.mk b/keyboards/hotdox/rules.mk index 6caa17fab63..dbfc855ccb8 100644 --- a/keyboards/hotdox/rules.mk +++ b/keyboards/hotdox/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = atmel-dfu # CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDone UNICODE_ENABLE = yes # Unicode -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/hp69/rules.mk b/keyboards/hp69/rules.mk index 4206aaf8820..f66979ae5f4 100644 --- a/keyboards/hp69/rules.mk +++ b/keyboards/hp69/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index 41246b6ee8d..b3444db38de 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -134,3 +134,52 @@ along with this program. If not, see . #endif #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/hs60/v1/v1.c b/keyboards/hs60/v1/v1.c index d2bb8011f18..f96eb7c320e 100644 --- a/keyboards/hs60/v1/v1.c +++ b/keyboards/hs60/v1/v1.c @@ -91,7 +91,7 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) #ifdef HS60_ANSI -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -199,7 +199,7 @@ led_config_t g_led_config = { { #else -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/hs60/v1/v1.h b/keyboards/hs60/v1/v1.h index 4de781e5fae..4c81e906120 100644 --- a/keyboards/hs60/v1/v1.h +++ b/keyboards/hs60/v1/v1.h @@ -13,40 +13,39 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef HS60_H -#define HS60_H -#define XXX KC_NO +#pragma once #include "quantum.h" +#define XXX KC_NO + // This a shortcut to help you visually see your layout. #define LAYOUT_60_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ - { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } -#endif \ No newline at end of file diff --git a/keyboards/hs60/v2/ansi/rules.mk b/keyboards/hs60/v2/ansi/rules.mk index d0b7d2df4c3..5aef811dc01 100644 --- a/keyboards/hs60/v2/ansi/rules.mk +++ b/keyboards/hs60/v2/ansi/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hs60/v2/hhkb/rules.mk b/keyboards/hs60/v2/hhkb/rules.mk index ea83aa454e3..60d8385f42e 100644 --- a/keyboards/hs60/v2/hhkb/rules.mk +++ b/keyboards/hs60/v2/hhkb/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hs60/v2/iso/rules.mk b/keyboards/hs60/v2/iso/rules.mk index a25ff59a8b2..6cfe2dacec8 100644 --- a/keyboards/hs60/v2/iso/rules.mk +++ b/keyboards/hs60/v2/iso/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hub16/keymaps/peepeetee/rules.mk b/keyboards/hub16/keymaps/peepeetee/rules.mk index 976443cf483..f6737b8e4ab 100644 --- a/keyboards/hub16/keymaps/peepeetee/rules.mk +++ b/keyboards/hub16/keymaps/peepeetee/rules.mk @@ -1 +1 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite \ No newline at end of file +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite \ No newline at end of file diff --git a/keyboards/hub16/rules.mk b/keyboards/hub16/rules.mk index cc5e00b9df0..e3b8c7cb690 100755 --- a/keyboards/hub16/rules.mk +++ b/keyboards/hub16/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = caterina # Build Options CUSTOM_MATRIX = lite # Custom scanning of matrix -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/hub20/config.h b/keyboards/hub20/config.h index f8e5d6be8d1..de2526522c1 100644 --- a/keyboards/hub20/config.h +++ b/keyboards/hub20/config.h @@ -1,5 +1,5 @@ /* -Copyright 2020 joshajohnson +Copyright 2020 joshajohnson Copyright 2021 peepeetee This program is free software: you can redistribute it and/or modify @@ -51,47 +51,54 @@ along with this program. If not, see . #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES -// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -#define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -//#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -//#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient top to bottom, speed controls how much gradient changes -//#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -//#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -//#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -//#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -//#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #define ENABLE_RGB_MATRIX_DUAL_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -108,7 +115,5 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* disable these deprecated features by default */ -#ifndef LINK_TIME_OPTIMIZATION_ENABLE - #define NO_ACTION_MACRO - #define NO_ACTION_FUNCTION -#endif +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/hub20/rules.mk b/keyboards/hub20/rules.mk index 297ac0a4e4e..853f006e0c2 100644 --- a/keyboards/hub20/rules.mk +++ b/keyboards/hub20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ianklug/grooveboard/rules.mk b/keyboards/ianklug/grooveboard/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/ianklug/grooveboard/rules.mk +++ b/keyboards/ianklug/grooveboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h index 0dca4f6bc66..df30e84aca0 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/config.h @@ -64,8 +64,10 @@ #define STM32_HSECLK 16000000 #define SOLENOID_PIN B5 +#define HAPTIC_ENABLE_PIN C13 #define SOLENOID_DEFAULT_DWELL 4 #define SOLENOID_MIN_DWELL 4 +#define HAPTIC_OFF_IN_LOW_POWER 1 #define NO_HAPTIC_MOD #define LED_NUM_LOCK_PIN C12 diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/overnumpad_1xb.c b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/overnumpad_1xb.c index c4229ef9973..cb5ec3dc124 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/overnumpad_1xb.c @@ -18,10 +18,6 @@ void keyboard_post_init_kb(void) { - // Solenoid enable: - setPinOutput(C13); - writePin(C13, 1); - //debug_enable=true; //debug_matrix=true; } diff --git a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk index 507f4fcd377..323a834c533 100644 --- a/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk +++ b/keyboards/ibm/model_m_4th_gen/overnumpad_1xb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key. +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/id67/rules.mk b/keyboards/id67/rules.mk index d58ff8f0637..bf105353e17 100644 --- a/keyboards/id67/rules.mk +++ b/keyboards/id67/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/id80/rules.mk b/keyboards/id80/rules.mk index 3d810fbd989..7ff53f51f1e 100644 --- a/keyboards/id80/rules.mk +++ b/keyboards/id80/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/id87/rules.mk b/keyboards/id87/rules.mk index 6cccaf75a16..21c6980ad42 100644 --- a/keyboards/id87/rules.mk +++ b/keyboards/id87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/idb/idb_60/rules.mk b/keyboards/idb/idb_60/rules.mk index a2363cbb5ea..47102bc8e19 100644 --- a/keyboards/idb/idb_60/rules.mk +++ b/keyboards/idb/idb_60/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options # Comment out to disable the options. -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/idobo/idobo.h b/keyboards/idobo/idobo.h index 386fcee1a94..9643a1efd34 100644 --- a/keyboards/idobo/idobo.h +++ b/keyboards/idobo/idobo.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef IDOBO_H -#define IDOBO_H + +#pragma once #include "quantum.h" @@ -27,18 +27,15 @@ * represents the switch matrix. */ #define LAYOUT_ortho_5x15( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/illuminati/is0/rules.mk b/keyboards/illuminati/is0/rules.mk index be4a048405d..7d36ae3c456 100644 --- a/keyboards/illuminati/is0/rules.mk +++ b/keyboards/illuminati/is0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/illusion/rosa/rules.mk b/keyboards/illusion/rosa/rules.mk index 8f499c08b1d..95a41885b10 100644 --- a/keyboards/illusion/rosa/rules.mk +++ b/keyboards/illusion/rosa/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ilumkb/primus75/rules.mk b/keyboards/ilumkb/primus75/rules.mk index dc7d341bbb2..5f180ae00de 100644 --- a/keyboards/ilumkb/primus75/rules.mk +++ b/keyboards/ilumkb/primus75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ilumkb/volcano660/rules.mk b/keyboards/ilumkb/volcano660/rules.mk index 208933ce9e6..5f180ae00de 100644 --- a/keyboards/ilumkb/volcano660/rules.mk +++ b/keyboards/ilumkb/volcano660/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/inett_studio/sqx/hotswap/config.h b/keyboards/inett_studio/sqx/hotswap/config.h index 174b948c1da..f516473cfac 100644 --- a/keyboards/inett_studio/sqx/hotswap/config.h +++ b/keyboards/inett_studio/sqx/hotswap/config.h @@ -72,6 +72,51 @@ #endif #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/inett_studio/sqx/hotswap/hotswap.c b/keyboards/inett_studio/sqx/hotswap/hotswap.c index 5b3c8df8225..c8e7d87846e 100644 --- a/keyboards/inett_studio/sqx/hotswap/hotswap.c +++ b/keyboards/inett_studio/sqx/hotswap/hotswap.c @@ -20,7 +20,7 @@ #include "hotswap.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/inett_studio/sqx/hotswap/rules.mk b/keyboards/inett_studio/sqx/hotswap/rules.mk index 84de4cda9b3..6f3514ea126 100644 --- a/keyboards/inett_studio/sqx/hotswap/rules.mk +++ b/keyboards/inett_studio/sqx/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/inett_studio/sqx/universal/config.h b/keyboards/inett_studio/sqx/universal/config.h index 7fa41fae24a..d1fbf8f7a19 100644 --- a/keyboards/inett_studio/sqx/universal/config.h +++ b/keyboards/inett_studio/sqx/universal/config.h @@ -72,6 +72,51 @@ #endif #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 170 -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/inett_studio/sqx/universal/rules.mk b/keyboards/inett_studio/sqx/universal/rules.mk index e2065f6c70d..ee6d6367f05 100644 --- a/keyboards/inett_studio/sqx/universal/rules.mk +++ b/keyboards/inett_studio/sqx/universal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/inett_studio/sqx/universal/universal.c b/keyboards/inett_studio/sqx/universal/universal.c index dd431a7f45f..06cfbd36542 100644 --- a/keyboards/inett_studio/sqx/universal/universal.c +++ b/keyboards/inett_studio/sqx/universal/universal.c @@ -20,7 +20,7 @@ #include "universal.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/irene/rules.mk b/keyboards/irene/rules.mk index 8780333d2fe..33e17633756 100644 --- a/keyboards/irene/rules.mk +++ b/keyboards/irene/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/iriskeyboards/rules.mk b/keyboards/iriskeyboards/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/iriskeyboards/rules.mk +++ b/keyboards/iriskeyboards/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/iron180/rules.mk b/keyboards/iron180/rules.mk index 755125c797c..ee6c0dfca7d 100644 --- a/keyboards/iron180/rules.mk +++ b/keyboards/iron180/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/j80/rules.mk b/keyboards/j80/rules.mk index 75443bf0948..370a9913df8 100644 --- a/keyboards/j80/rules.mk +++ b/keyboards/j80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jacky_studio/bear_65/rules.mk b/keyboards/jacky_studio/bear_65/rules.mk index 9473c17bbe2..aebfff7a01a 100644 --- a/keyboards/jacky_studio/bear_65/rules.mk +++ b/keyboards/jacky_studio/bear_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jacky_studio/s7_elephant/rev2/rules.mk b/keyboards/jacky_studio/s7_elephant/rev2/rules.mk index e81dca4b859..16501de0ae8 100644 --- a/keyboards/jacky_studio/s7_elephant/rev2/rules.mk +++ b/keyboards/jacky_studio/s7_elephant/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jae/j01/rules.mk b/keyboards/jae/j01/rules.mk index 6785f2fb501..0b23d7cb966 100644 --- a/keyboards/jae/j01/rules.mk +++ b/keyboards/jae/j01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/jagdpietr/drakon/drakon.c b/keyboards/jagdpietr/drakon/drakon.c index 2aec1f4b50c..65d95030552 100644 --- a/keyboards/jagdpietr/drakon/drakon.c +++ b/keyboards/jagdpietr/drakon/drakon.c @@ -37,10 +37,8 @@ _FN, _Lyr2 }; -__attribute__((weak)) -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_90; // flips the display 90 degrees if offhand - +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; } static void render_status(void) { @@ -210,8 +208,11 @@ static void render_anim(void) { } } } -__attribute__((weak)) -void oled_task_user(void) { + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } render_anim(); oled_set_cursor(0,6); @@ -221,6 +222,7 @@ void oled_task_user(void) { render_status(); + return false; } #endif diff --git a/keyboards/jagdpietr/drakon/rules.mk b/keyboards/jagdpietr/drakon/rules.mk index d7e63ebf2d9..85a762c68bc 100644 --- a/keyboards/jagdpietr/drakon/rules.mk +++ b/keyboards/jagdpietr/drakon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/jc65/v32a/rules.mk b/keyboards/jc65/v32a/rules.mk index af36151cccd..694ad609a25 100644 --- a/keyboards/jc65/v32a/rules.mk +++ b/keyboards/jc65/v32a/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/jc65/v32a/v32a.h b/keyboards/jc65/v32a/v32a.h index 4e24420913a..91e6164ae2d 100644 --- a/keyboards/jc65/v32a/v32a.h +++ b/keyboards/jc65/v32a/v32a.h @@ -15,25 +15,24 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef V32A_H -#define V32A_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K04,K14,K24,K34,K44,K54,K16,KB6,KB7,K17,KA4,KB4,KC4,KD4,KE4,KD0, \ - K03,K13,K23,K33,K43,K53,K26,KC6,KC7,K27,KA3,KB3,KC3, KD3,K67, \ - K02,K12,K22,K32,K42,K52,K36,KD6,KD7,K37,KA2,KB2,KC2, KD2,K87, \ - K01,K30,K11,K21,K31,K41,K51,K46,KE6,KE7,K47,KA1, KB1,K86,K77, \ - K00,K10,K20, K40,K56,K50, K57,KB0,KC0,K96,K76,K66 \ -){ \ - { K00, K10, K20, K30, K40, K50,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KB0, KC0, KD0,KC_NO }, \ - { K01, K11, K21, K31, K41, K51,KC_NO,KC_NO,KC_NO,KC_NO, KA1, KB1,KC_NO,KC_NO,KC_NO }, \ - { K02, K12, K22, K32, K42, K52,KC_NO,KC_NO,KC_NO,KC_NO, KA2, KB2, KC2, KD2,KC_NO }, \ - { K03, K13, K23, K33, K43, K53,KC_NO,KC_NO,KC_NO,KC_NO, KA3, KB3, KC3, KD3,KC_NO }, \ - { K04, K14, K24, K34, K44, K54,KC_NO,KC_NO,KC_NO,KC_NO, KA4, KB4, KC4, KD4, KE4 }, \ - { KC_NO, K16, K26, K36, K46, K56, K66, K76, K86, K96,KC_NO, KB6, KC6, KD6, KE6 }, \ - { KC_NO, K17, K27, K37, K47, K57, K67, K77, K87,KC_NO,KC_NO, KB7, KC7, KD7, KE7 } \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4D, k4E, k0D, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k76, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2C, k2D, k78, \ + k10, k03, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k77, \ + k00, k01, k02, k04, k65, k05, k75, k0B, k0C, k69, k67, k66 \ +) { \ + { k00, k01, k02, k03, k04, k05, XXX, XXX, XXX, XXX, XXX, k0B, k0C, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX, XXX, XXX, k1A, k1B, XXX, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, XXX, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, XXX, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D, k4E }, \ + { XXX, k61, k62, k63, k64, k65, k66, k67, k68, k69, XXX, k6B, k6C, k6D, k6E }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77, k78, XXX, XXX, k7B, k7C, k7D, k7E } \ } - -#endif diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 314bfbf259a..108e4126be3 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -55,5 +54,3 @@ along with this program. If not, see . #define DIODE_DIRECTION COL2ROW #define DEBOUNCE 5 - -#endif diff --git a/keyboards/jc65/v32u4/v32u4.h b/keyboards/jc65/v32u4/v32u4.h index 866e6cc6894..8bab085b115 100644 --- a/keyboards/jc65/v32u4/v32u4.h +++ b/keyboards/jc65/v32u4/v32u4.h @@ -1,21 +1,19 @@ -#ifndef V32U4_H -#define V32U4_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, K3F, \ - K40, K41, K43, K44, K46, K48, K4A, K4B, K4C, K4D, K4E, K4F \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ - {K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F}, \ - {K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E, K3F}, \ - {K40, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E, K4F}, \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, k3F, \ + k40, k41, k43, k44, k46, k48, k4A, k4B, k4C, k4D, k4E, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E, k3F }, \ + { k40, k41, XXX, k43, k44, XXX, k46, XXX, k48, XXX, k4A, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 027aacfd58c..dd6984f1088 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -68,5 +67,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h index 4426fd76291..41ec860e8f2 100644 --- a/keyboards/jd40/jd40.h +++ b/keyboards/jd40/jd40.h @@ -1,43 +1,18 @@ -#ifndef JD40_H -#define JD40_H +#pragma once #include "quantum.h" #include "led.h" -/* GH60 LEDs - * GPIO pads - * 0 F7 WASD LEDs - * 1 F6 ESC LED - * 2 F5 FN LED - * 3 F4 POKER Arrow LEDs - * B2 Capslock LED - * B0 not connected - */ - - /* -inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } -inline void gh60_fn_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } -inline void gh60_esc_led_on(void) { DDRF |= (1<<6); PORTF &= ~(1<<6); } -inline void gh60_wasd_leds_on(void) { DDRF |= (1<<7); PORTF &= ~(1<<7); } - -inline void gh60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } -inline void gh60_poker_leds_off(void) { DDRF &= ~(1<<4); PORTF &= ~(1<<4); } -inline void gh60_fn_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } -inline void gh60_esc_led_off(void) { DDRF &= ~(1<<6); PORTF &= ~(1<<6); } -inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } -*/ +#define XXX KC_NO #define LAYOUT( \ - K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ - K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, \ - K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, \ - K35, K36, K37, K38, K39, K40, K41, K42, K43, K44 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, \ + k30, k31, k32, k33, k34, k36, k37, k38, k39, k3A \ ) { \ - { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ - { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, KC_NO }, \ - { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, KC_NO }, \ - { K35, K36, K37, K38, K39, KC_NO, K40, K41, K42, K43, K44, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, XXX }, \ + { k30, k31, k32, k33, k34, XXX, k36, k37, k38, k39, k3A, XXX } \ } - -#endif diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk index f344e4fc77d..10cefa36c5c 100644 --- a/keyboards/jd40/rules.mk +++ b/keyboards/jd40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index 4cc46c646cd..be2f0963ace 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/jd45/jd45.h b/keyboards/jd45/jd45.h index a0603d4e434..ab560e742c4 100644 --- a/keyboards/jd45/jd45.h +++ b/keyboards/jd45/jd45.h @@ -1,20 +1,19 @@ -#ifndef JD45_H -#define JD45_H +#pragma once #include "quantum.h" +#define XXX KC_NO + /* JD45 keymap definition macro */ #define LAYOUT( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3b \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k36, k38, k39, k3A, k3B \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, KC_NO }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, KC_NO }, \ - { k30, k31, k32, k33, k34, KC_NO, k36, KC_NO, k38, k39, k3a, k3b, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX }, \ + { k30, k31, k32, k33, k34, XXX, k36, XXX, k38, k39, k3A, k3B, XXX } \ } - -#endif diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk index 3947008ca42..4e856aa50f0 100644 --- a/keyboards/jd45/rules.mk +++ b/keyboards/jd45/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/jels/jels88/config.h b/keyboards/jels/jels88/config.h new file mode 100644 index 00000000000..3018e15c866 --- /dev/null +++ b/keyboards/jels/jels88/config.h @@ -0,0 +1,70 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor paramater */ +#define VENDOR_ID 0x006a // Jels (J) +#define PRODUCT_ID 0x0088 // Jels 88 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Jels +#define PRODUCT Jels88 + +/* Define Matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/*Define Matrix Pins */ +#define MATRIX_ROW_PINS \ + { B3, B2, D1, D0, E6, B0, F0, F1, B5, B4, D7, D6 } +#define MATRIX_COL_PINS \ + { C7, C6, F7, F6, F5, F4, B1, D2, D3 } + +/* ws2812b RGB LEDs */ +#define RGB_DI_PIN B6 + +#ifdef RGBLIGHT_ENABLE +#define RGBLED_NUM 20 // Number of LEDs +#define RGBLIGHT_SLEEP +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_DEFAULT_VAL 0 // start off +#define RGBLIGHT_LIMIT_VAL 225 // keep PCB under 500mA +#endif + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define BOOTMAGIC_LITE_ROW 1 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/jels/jels88/info.json b/keyboards/jels/jels88/info.json new file mode 100644 index 00000000000..96a740a9fdc --- /dev/null +++ b/keyboards/jels/jels88/info.json @@ -0,0 +1,102 @@ +{ + "keyboard_name": "Jels88", + "url": "", + "maintainer": "Jels", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 1.25, "y": 0 }, + { "label": "F2", "x": 2.25, "y": 0 }, + { "label": "F3", "x": 3.25, "y": 0 }, + { "label": "F4", "x": 4.25, "y": 0 }, + { "label": "F5", "x": 5.5, "y": 0 }, + { "label": "F6", "x": 6.5, "y": 0 }, + { "label": "F7", "x": 7.5, "y": 0 }, + { "label": "F8", "x": 8.5, "y": 0 }, + { "label": "F9", "x": 9.75, "y": 0 }, + { "label": "F10", "x": 10.75, "y": 0 }, + { "label": "F11", "x": 11.75, "y": 0 }, + { "label": "F12", "x": 12.75, "y": 0 }, + { "label": "F13", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.25 }, + { "label": "!", "x": 1, "y": 1.25 }, + { "label": "@", "x": 2, "y": 1.25 }, + { "label": "#", "x": 3, "y": 1.25 }, + { "label": "$", "x": 4, "y": 1.25 }, + { "label": "%", "x": 5, "y": 1.25 }, + { "label": "^", "x": 6, "y": 1.25 }, + { "label": "&", "x": 7, "y": 1.25 }, + { "label": "*", "x": 8, "y": 1.25 }, + { "label": "(", "x": 9, "y": 1.25 }, + { "label": ")", "x": 10, "y": 1.25 }, + { "label": "_", "x": 11, "y": 1.25 }, + { "label": "+", "x": 12, "y": 1.25 }, + { "label": "Bksp", "x": 13, "y": 1.25 }, + { "label": "~", "x": 14, "y": 1.25 }, + { "label": "Insert", "x": 15.25, "y": 1.25 }, + { "label": "Home", "x": 16.25, "y": 1.25 }, + { "label": "PgUp", "x": 17.25, "y": 1.25 }, + { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.25 }, + { "label": "W", "x": 2.5, "y": 2.25 }, + { "label": "E", "x": 3.5, "y": 2.25 }, + { "label": "R", "x": 4.5, "y": 2.25 }, + { "label": "T", "x": 5.5, "y": 2.25 }, + { "label": "Y", "x": 6.5, "y": 2.25 }, + { "label": "U", "x": 7.5, "y": 2.25 }, + { "label": "I", "x": 8.5, "y": 2.25 }, + { "label": "O", "x": 9.5, "y": 2.25 }, + { "label": "P", "x": 10.5, "y": 2.25 }, + { "label": "{", "x": 11.5, "y": 2.25 }, + { "label": "}", "x": 12.5, "y": 2.25 }, + { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.25 }, + { "label": "End", "x": 16.25, "y": 2.25 }, + { "label": "PgDn", "x": 17.25, "y": 2.25 }, + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.25 }, + { "label": "S", "x": 2.75, "y": 3.25 }, + { "label": "D", "x": 3.75, "y": 3.25 }, + { "label": "F", "x": 4.75, "y": 3.25 }, + { "label": "G", "x": 5.75, "y": 3.25 }, + { "label": "H", "x": 6.75, "y": 3.25 }, + { "label": "J", "x": 7.75, "y": 3.25 }, + { "label": "K", "x": 8.75, "y": 3.25 }, + { "label": "L", "x": 9.75, "y": 3.25 }, + { "label": ":", "x": 10.75, "y": 3.25 }, + { "label": "\"", "x": 11.75, "y": 3.25 }, + { "label": "Enter", "x": 12.75, "y": 3.25, "w": 2.25 }, + { "label": "Shift", "x": 0, "y": 4.25, "w": 1.25 }, + { "label": "|", "x": 1.25, "y": 4.25 }, + { "label": "Z", "x": 2.25, "y": 4.25 }, + { "label": "X", "x": 3.25, "y": 4.25 }, + { "label": "C", "x": 4.25, "y": 4.25 }, + { "label": "V", "x": 5.25, "y": 4.25 }, + { "label": "B", "x": 6.25, "y": 4.25 }, + { "label": "N", "x": 7.25, "y": 4.25 }, + { "label": "M", "x": 8.25, "y": 4.25 }, + { "label": "<", "x": 9.25, "y": 4.25 }, + { "label": ">", "x": 10.25, "y": 4.25 }, + { "label": "?", "x": 11.25, "y": 4.25 }, + { "label": "Shift", "x": 12.25, "y": 4.25, "w": 1.75 }, + { "x": 14, "y": 4.25 }, + { "label": "\u2191", "x": 16.25, "y": 4.25 }, + { "label": "Ctrl", "x": 0, "y": 5.25, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.25, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.25, "w": 1.25 }, + { "x": 3.75, "y": 5.25, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.25, "w": 1.25 }, + { "label": "Win", "x": 11.25, "y": 5.25, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.25, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.25, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.25 }, + { "label": "\u2193", "x": 16.25, "y": 5.25 }, + { "label": "\u2192", "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/jels/jels88/jels88.c b/keyboards/jels/jels88/jels88.c new file mode 100644 index 00000000000..bd8e30e4ee6 --- /dev/null +++ b/keyboards/jels/jels88/jels88.c @@ -0,0 +1,38 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +// not much here ... just indicator LEDs + +#include "jels88.h" + +// LED indicator pins +#define CAPS_LED D5 +#define SCROLL_LED D4 + +void keyboard_pre_init_kb() { + setPinOutput(CAPS_LED); + setPinOutput(SCROLL_LED); + keyboard_pre_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (res) { + writePin(CAPS_LED, led_state.caps_lock); + writePin(SCROLL_LED, led_state.scroll_lock); + } + return res; +} diff --git a/keyboards/jels/jels88/jels88.h b/keyboards/jels/jels88/jels88.h new file mode 100644 index 00000000000..8314d0d2e06 --- /dev/null +++ b/keyboards/jels/jels88/jels88.h @@ -0,0 +1,89 @@ +/* copyright 2021 Joah Nelson (Jels) +* +* 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 +* MERAHANTABILITY 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 . +*/ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + + +#define LAYOUT_all( \ + K0B0, K0B1, K0A1, K0A2, K0B2, K0B3, K0A3, K0A4, K0B4, K0B5, K0A5, K0A6, K0B6, K0B7, K0A7, K0A8, K0B8, \ + K1A0, K1A1, K1B1, K1B2, K1A2, K1A3, K1B3, K1B4, K1A4, K1A5, K1B5, K1B6, K1A6, K1A7, K2B7, K2A7, K2A8, K1A8, \ + K2B0, K2B1, K2A1, K2A2, K2B2, K2B3, K2A3, K2A4, K2B4, K2B5, K2A5, K2A6, K2B6, K3A7, K1B7, K1B8, K2B8, \ + K3A0, K3A1, K3B1, K3B2, K3A2, K3A3, K3B3, K3B4, K3A4, K3A5, K3B5, K3B6, K3A6, \ + K4B0, K4B1, K4A1, K4A2, K4B2, K4B3, K4A3, K4A4, K4B4, K4B5, K4A5, K4A6, K4B6, K4B7, K4A7, \ + K5A0, K5A1, K5B1, K5B3, K5A5, K5A6, K5B6, K5B7, K5A7, K5A8, K4A8 \ +){ \ + {____, K0A1, K0A2, K0A3, K0A4, K0A5, K0A6, K0A7, K0A8}, \ + {K0B0, K0B1, K0B2, K0B3, K0B4, K0B5, K0B6, K0B7, K0B8}, \ + {K1A0, K1A1, K1A2, K1A3, K1A4, K1A5, K1A6, K1A7, K1A8}, \ + {____, K1B1, K1B2, K1B3, K1B4, K1B5, K1B6, K1B7, K1B8}, \ + {____, K2A1, K2A2, K2A3, K2A4, K2A5, K2A6, K2A7, K2A8}, \ + {K2B0, K2B1, K2B2, K2B3, K2B4, K2B5, K2B6, K2B7, K2B8}, \ + {K3A0, K3A1, K3A2, K3A3, K3A4, K3A5, K3A6, K3A7, ____}, \ + {____, K3B1, K3B2, K3B3, K3B4, K3B5, K3B6, ____, ____}, \ + {____, K4A1, K4A2, K4A3, K4A4, K4A5, K4A6, K4A7, K4A8}, \ + {K4B0, K4B1, K4B2, K4B3, K4B4, K4B5, K4B6, K4B7, ____}, \ + {K5A0, K5A1, ____, ____, ____, K5A5, K5A6, K5A7, K5A8}, \ + {____, K5B1, ____, K5B3, ____, ____, K5B6, K5B7, ____} \ +} + +#define LAYOUT_ansi( \ + K0B0, K0B1, K0A1, K0A2, K0B2, K0B3, K0A3, K0A4, K0B4, K0B5, K0A5, K0A6, K0B6, K0B7, K0A7, K0A8, K0B8, \ + K1A0, K1A1, K1B1, K1B2, K1A2, K1A3, K1B3, K1B4, K1A4, K1A5, K1B5, K1B6, K1A6, K1A7, K2B7, K2A7, K2A8, K1A8, \ + K2B0, K2B1, K2A1, K2A2, K2B2, K2B3, K2A3, K2A4, K2B4, K2B5, K2A5, K2A6, K2B6, K3A7, K1B7, K1B8, K2B8, \ + K3A0, K3A1, K3B1, K3B2, K3A2, K3A3, K3B3, K3B4, K3A4, K3A5, K3B5, K3B6, K3A6, \ + K4B0, K4A1, K4A2, K4B2, K4B3, K4A3, K4A4, K4B4, K4B5, K4A5, K4A6, K4B6, K4B7, K4A7, \ + K5A0, K5A1, K5B1, K5B3, K5A5, K5A6, K5B6, K5B7, K5A7, K5A8, K4A8 \ +){ \ + {____, K0A1, K0A2, K0A3, K0A4, K0A5, K0A6, K0A7, K0A8}, \ + {K0B0, K0B1, K0B2, K0B3, K0B4, K0B5, K0B6, K0B7, K0B8}, \ + {K1A0, K1A1, K1A2, K1A3, K1A4, K1A5, K1A6, K1A7, K1A8}, \ + {____, K1B1, K1B2, K1B3, K1B4, K1B5, K1B6, K1B7, K1B8}, \ + {____, K2A1, K2A2, K2A3, K2A4, K2A5, K2A6, K2A7, K2A8}, \ + {K2B0, K2B1, K2B2, K2B3, K2B4, K2B5, K2B6, K2B7, K2B8}, \ + {K3A0, K3A1, K3A2, K3A3, K3A4, K3A5, K3A6, K3A7, ____}, \ + {____, K3B1, K3B2, K3B3, K3B4, K3B5, K3B6, ____, ____}, \ + {____, K4A1, K4A2, K4A3, K4A4, K4A5, K4A6, K4A7, K4A8}, \ + {K4B0, K4B1, K4B2, K4B3, K4B4, K4B5, K4B6, K4B7, ____}, \ + {K5A0, K5A1, ____, ____, ____, K5A5, K5A6, K5A7, K5A8}, \ + {____, K5B1, ____, K5B3, ____, ____, K5B6, K5B7, ____} \ +} + + +#define LAYOUT_iso( \ + K0B0, K0B1, K0A1, K0A2, K0B2, K0B3, K0A3, K0A4, K0B4, K0B5, K0A5, K0A6, K0B6, K0B7, K0A7, K0A8, K0B8, \ + K1A0, K1A1, K1B1, K1B2, K1A2, K1A3, K1B3, K1B4, K1A4, K1A5, K1B5, K1B6, K1A6, K1A7, K3A7, K2A7, K2A8, K1A8, \ + K2B0, K2B1, K2A1, K2A2, K2B2, K2B3, K2A3, K2A4, K2B4, K2B5, K2A5, K2A6, K2B6, K2B7, K1B7, K1B8, K2B8, \ + K3A0, K3A1, K3B1, K3B2, K3A2, K3A3, K3B3, K3B4, K3A4, K3A5, K3B5, K3B6, K3A6, \ + K4B0, K4A1, K4A2, K4B2, K4B3, K4A3, K4A4, K4B4, K4B5, K4A5, K4A6, K4B6, K4B7, K4A7, \ + K5A0, K5A1, K5B1, K5B3, K5A5, K5A6, K5B6, K5B7, K5A7, K5A8, K4A8 \ +){ \ + {____, K0A1, K0A2, K0A3, K0A4, K0A5, K0A6, K0A7, K0A8}, \ + {K0B0, K0B1, K0B2, K0B3, K0B4, K0B5, K0B6, K0B7, K0B8}, \ + {K1A0, K1A1, K1A2, K1A3, K1A4, K1A5, K1A6, K1A7, K1A8}, \ + {____, K1B1, K1B2, K1B3, K1B4, K1B5, K1B6, K1B7, K1B8}, \ + {____, K2A1, K2A2, K2A3, K2A4, K2A5, K2A6, K2A7, K2A8}, \ + {K2B0, K2B1, K2B2, K2B3, K2B4, K2B5, K2B6, K2B7, K2B8}, \ + {K3A0, K3A1, K3A2, K3A3, K3A4, K3A5, K3A6, K3A7, ____}, \ + {____, K3B1, K3B2, K3B3, K3B4, K3B5, K3B6, ____, ____}, \ + {____, K4A1, K4A2, K4A3, K4A4, K4A5, K4A6, K4A7, K4A8}, \ + {K4B0, ____, K4B2, K4B3, K4B4, K4B5, K4B6, K4B7, ____}, \ + {K5A0, K5A1, ____, ____, ____, K5A5, K5A6, K5A7, K5A8}, \ + {____, K5B1, ____, K5B3, ____, ____, K5B6, K5B7, ____} \ +} diff --git a/keyboards/jels/jels88/keymaps/default/keymap.c b/keyboards/jels/jels88/keymaps/default/keymap.c new file mode 100644 index 00000000000..f8ee7175376 --- /dev/null +++ b/keyboards/jels/jels88/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +//base layer +[0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/jels/jels88/keymaps/via/keymap.c b/keyboards/jels/jels88/keymaps/via/keymap.c new file mode 100644 index 00000000000..f8ee7175376 --- /dev/null +++ b/keyboards/jels/jels88/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +//base layer +[0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, 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_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/jels/jels88/keymaps/via/rules.mk b/keyboards/jels/jels88/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/jels/jels88/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/jels/jels88/readme.md b/keyboards/jels/jels88/readme.md new file mode 100644 index 00000000000..0ea1f4c64cd --- /dev/null +++ b/keyboards/jels/jels88/readme.md @@ -0,0 +1,25 @@ +# jels88 + +![jels88](https://i.imgur.com/7kuYR4G.png) + +* Keyboard Maintainer: [jels](https://github.com/Jels-kb) +* Hardware Supported: jels88b/jels88c PCB +* Hardware Availabililty: Group buys, Various dates. + +Make example for this keyboard (after setting up your build environment): + + make jels/jels88:default + +Flashing example for this keyboard: + + make jels/jels88:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the top right key (ESC) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB +* **Keycode in layout**: Press the key mapped to `RESET` if it is available diff --git a/keyboards/jels/jels88/rules.mk b/keyboards/jels/jels88/rules.mk new file mode 100644 index 00000000000..5c97c17ce9f --- /dev/null +++ b/keyboards/jels/jels88/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + diff --git a/keyboards/jisplit89/rules.mk b/keyboards/jisplit89/rules.mk index db807b5b436..3f78c5cce55 100644 --- a/keyboards/jisplit89/rules.mk +++ b/keyboards/jisplit89/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jkdlab/binary_monkey/rules.mk b/keyboards/jkdlab/binary_monkey/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/jkdlab/binary_monkey/rules.mk +++ b/keyboards/jkdlab/binary_monkey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/jm60/rules.mk b/keyboards/jm60/rules.mk index 761e04c55db..d2684a21d71 100644 --- a/keyboards/jm60/rules.mk +++ b/keyboards/jm60/rules.mk @@ -7,7 +7,7 @@ BOARD = ST_NUCLEO64_F103RB # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/just60/rules.mk b/keyboards/just60/rules.mk index 8b3d7180891..a2d0c06a5d5 100644 --- a/keyboards/just60/rules.mk +++ b/keyboards/just60/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = lufa-ms # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/k_type/is31fl3733-dual.h b/keyboards/k_type/is31fl3733-dual.h index aab170a3fdd..ea45a708675 100644 --- a/keyboards/k_type/is31fl3733-dual.h +++ b/keyboards/k_type/is31fl3733-dual.h @@ -28,7 +28,7 @@ typedef struct is31_led { uint8_t b; } __attribute__((packed)) is31_led; -extern const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL]; +extern const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL]; void IS31FL3733_init(uint8_t bus, uint8_t addr, uint8_t sync); bool IS31FL3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t data); diff --git a/keyboards/k_type/k_type.c b/keyboards/k_type/k_type.c index 924862277f0..29e7fa57b21 100644 --- a/keyboards/k_type/k_type.c +++ b/keyboards/k_type/k_type.c @@ -23,7 +23,7 @@ along with this program. If not, see . #include "is31fl3733-dual.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, B_1, A_1, C_1 }, { 0, B_2, A_2, C_2 }, { 0, B_3, A_3, C_3 }, diff --git a/keyboards/kabedon/kabedon78s/rules.mk b/keyboards/kabedon/kabedon78s/rules.mk index 25f6224242b..a580bc20775 100644 --- a/keyboards/kabedon/kabedon78s/rules.mk +++ b/keyboards/kabedon/kabedon78s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kabedon/kabedon980/rules.mk b/keyboards/kabedon/kabedon980/rules.mk index 25f6224242b..a580bc20775 100644 --- a/keyboards/kabedon/kabedon980/rules.mk +++ b/keyboards/kabedon/kabedon980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kabedon/kabedon98e/rules.mk b/keyboards/kabedon/kabedon98e/rules.mk index f9259d1470a..e93f7b4b923 100644 --- a/keyboards/kabedon/kabedon98e/rules.mk +++ b/keyboards/kabedon/kabedon98e/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kapcave/arya/arya.c b/keyboards/kapcave/arya/arya.c new file mode 100644 index 00000000000..af5d19be4ff --- /dev/null +++ b/keyboards/kapcave/arya/arya.c @@ -0,0 +1,27 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include "arya.h" + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { return false; } + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + return true; +} diff --git a/keyboards/kapcave/arya/arya.h b/keyboards/kapcave/arya/arya.h new file mode 100644 index 00000000000..ea1d1916c34 --- /dev/null +++ b/keyboards/kapcave/arya/arya.h @@ -0,0 +1,43 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K81, K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ + K80, K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ + K82, K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ + K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ + K30, K40, K50, K60, K00, K10, K20 \ +) \ +{ \ + { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 }, \ + { K10 , K11 , K12 , K13 , K14 , K15 , K16 , K17 }, \ + { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 }, \ + { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 }, \ + { K40 , K41 , K42 , K43 , K44 , K45 , K46 , K47 }, \ + { K50 , K51 , K52 , K53 , K54 , K55 , K56 , K57 }, \ + { K60 , K61 , K62 , K63 , K64 , K65 , K66 , K67 }, \ + { KC_NO , K71 , K72 , K73 , K74 , K75 , K76 , K77 }, \ + { K80 , K81 , K82 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \ +} + + + + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/kapcave/arya/chconf.h b/keyboards/kapcave/arya/chconf.h new file mode 100644 index 00000000000..d5c78af075e --- /dev/null +++ b/keyboards/kapcave/arya/chconf.h @@ -0,0 +1,25 @@ +/* +Copyright 2021 KapCave + +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 . +*/ + +#pragma once + +#define CH_CFG_ST_RESOLUTION 16 + +#define CH_CFG_INTERVALS_SIZE 16 + +#include_next + diff --git a/keyboards/kapcave/arya/config.h b/keyboards/kapcave/arya/config.h new file mode 100644 index 00000000000..62df795ff5a --- /dev/null +++ b/keyboards/kapcave/arya/config.h @@ -0,0 +1,68 @@ +/* +Copyright 2021 KapCave + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x4152 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KapCave +#define PRODUCT Arya + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +#define MATRIX_COL_PINS { B0, B5, B4, B2, C13, F1, F0, A14} +#define MATRIX_ROW_PINS { B8, A13, B1, A15, B9, B10, B11, A0, A8 } +#define DIODE_DIRECTION COL2ROW + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +#define ENCODERS_PAD_A { B12, B14, C15 } +#define ENCODERS_PAD_B { B13, B15, C14 } + +#define ENCODER_RESOLUTION 2 +#define TAP_CODE_DELAY 25 + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/kapcave/arya/halconf.h b/keyboards/kapcave/arya/halconf.h new file mode 100644 index 00000000000..dffa322d192 --- /dev/null +++ b/keyboards/kapcave/arya/halconf.h @@ -0,0 +1,23 @@ +/* +Copyright 2021 KapCave + +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 . +*/ + +#pragma once + +#define HAL_USE_PWM TRUE + +#include_next + diff --git a/keyboards/kapcave/arya/info.json b/keyboards/kapcave/arya/info.json new file mode 100644 index 00000000000..fb220aa0709 --- /dev/null +++ b/keyboards/kapcave/arya/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "Arya", + "url": "https://kapcave.com/products/arya", + "maintainer": "nachie", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":2.75, "y":5.9}, + {"label":"\u00ac", "x":4, "y":6.0}, + {"label":"!", "x":5, "y":6.0}, + {"label":"\"", "x":6, "y":6.0}, + {"label":"_", "x":15.25, "y":6.0}, + {"label":"+", "x":16.25, "y":6.0}, + {"label":"", "x":17.25, "y":6.0}, + {"label":"", "x":18.25, "y":6.0}, + {"label":"Pg Up", "x":2.5, "y":6.9}, + {"label":"Tab", "x":3.75, "y":7.0, "w":1.5}, + {"label":"Q", "x":5.25, "y":7.0}, + {"label":"P", "x":15, "y":7.0}, + {"label":"{", "x":16, "y":7.0}, + {"label":"}", "x":17, "y":7.0}, + {"label":"|", "x":18, "y":7.0, "w":1.5}, + {"label":"Pg Dn", "x":2.25, "y":7.9}, + {"label":"Caps Lock", "x":3.5, "y":8.0, "w":1.75}, + {"label":"A", "x":5.25, "y":8.0}, + {"label":":", "x":15.5, "y":8.0}, + {"label":"\"", "x":16.5, "y":8.0}, + {"label":"Enter", "x":17.5, "y":8.0, "w":2.25}, + {"label":"Shift", "x":3.25, "y":9.0, "w":2.25}, + {"label":"Z", "x":5.5, "y":9.0}, + {"label":">", "x":15.25, "y":9.0}, + {"label":"?", "x":16.25, "y":9.0}, + {"label":"Shift", "x":17.25, "y":9.0, "w":1.75}, + {"label":"Fn", "x":19, "y":9.0}, + {"label":"Ctrl", "x":3.25, "y":10.0, "w":1.5}, + {"label":"Ctrl", "x":18.25, "y":10.0, "w":1.5}, + {"label":"\u00a3", "x":8.25, "y":4.5}, + {"label":"$", "x":9.25, "y":4.5}, + {"label":"%", "x":10.25, "y":4.5}, + {"label":"^", "x":11.25, "y":4.5}, + {"label":"W", "x":7.75, "y":5.5}, + {"label":"E", "x":8.75, "y":5.5}, + {"label":"R", "x":9.75, "y":5.5}, + {"label":"T", "x":10.75, "y":5.5}, + {"label":"S", "x":8, "y":6.5}, + {"label":"D", "x":9, "y":6.5}, + {"label":"F", "x":10, "y":6.5}, + {"label":"G", "x":11, "y":6.5}, + {"label":"X", "x":8.5, "y":7.5}, + {"label":"C", "x":9.5, "y":7.5}, + {"label":"V", "x":10.5, "y":7.5}, + {"label":"B", "x":11.5, "y":7.5}, + {"label":"Alt", "x":8.25, "y":8.5, "w":1.5}, + {"label":"", "x":9.75, "y":8.5, "w":2}, + {"label":"Fn", "x":11.75, "y":8.5, "w":1.25}, + {"label":"&", "x":9.5, "y":9.0}, + {"label":"*", "x":10.5, "y":9.0}, + {"label":"(", "x":11.5, "y":9.0}, + {"label":")", "x":12.5, "y":9.0}, + {"label":"Y", "x":9, "y":10.0}, + {"label":"U", "x":10, "y":10.0}, + {"label":"I", "x":11, "y":10.0}, + {"label":"O", "x":12, "y":10.0}, + {"label":"H", "x":9.25, "y":11.0}, + {"label":"J", "x":10.25, "y":11.0}, + {"label":"K", "x":11.25, "y":11.0}, + {"label":"L", "x":12.25, "y":11.0}, + {"label":"Fn", "x":8.75, "y":12.0}, + {"label":"N", "x":9.75, "y":12.0}, + {"label":"M", "x":10.75, "y":12.0}, + {"label":"<", "x":11.75, "y":12.0}, + {"label":"Shift", "x":8.75, "y":13.0, "w":2.75}, + {"label":"Alt", "x":11.5, "y":13.0, "w":1.5} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/default/keymap.c b/keyboards/kapcave/arya/keymaps/default/keymap.c new file mode 100644 index 00000000000..b8300b1f4a1 --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_alice_split_bs( + KC_ESC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_PGUP, KC_TAB, 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_BSPC, + KC_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), +}; \ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/default/readme.md b/keyboards/kapcave/arya/keymaps/default/readme.md new file mode 100644 index 00000000000..9d9894862a0 --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/default/readme.md @@ -0,0 +1 @@ +The default layout for the KapCave Arya \ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/via/keymap.c b/keyboards/kapcave/arya/keymaps/via/keymap.c new file mode 100644 index 00000000000..4b98707da7d --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/keymap.c @@ -0,0 +1,56 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_alice_split_bs( + KC_ESC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_PGUP, KC_TAB, 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_BSPC, + KC_PGDN, 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_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL + ), + + /* FUNCTION */ + [_FN] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + [_FN2] = LAYOUT_alice_split_bs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______ + ), + + +}; + diff --git a/keyboards/kapcave/arya/keymaps/via/readme.md b/keyboards/kapcave/arya/keymaps/via/readme.md new file mode 100644 index 00000000000..dcf12fbffde --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/readme.md @@ -0,0 +1 @@ +The VIA Keymap for the KapCave Arya \ No newline at end of file diff --git a/keyboards/kapcave/arya/keymaps/via/rules.mk b/keyboards/kapcave/arya/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/kapcave/arya/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kapcave/arya/mcuconf.h b/keyboards/kapcave/arya/mcuconf.h new file mode 100644 index 00000000000..5c161dbe3c2 --- /dev/null +++ b/keyboards/kapcave/arya/mcuconf.h @@ -0,0 +1,33 @@ +/* +Copyright 2021 KapCave + +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 . +*/ + +#pragma once +#include_next + +/* enable TIM1, used for backlight PWM */ +#undef STM32_PWM_USE_TIM1 +#define STM32_PWM_USE_TIM1 TRUE + +/* enable TIM2, used for underglow PWM driver */ +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE + +/* move system from TIM2 (default) to TIM3 (since TIM2 is needed for underglow) */ +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 3 diff --git a/keyboards/kapcave/arya/readme.md b/keyboards/kapcave/arya/readme.md new file mode 100644 index 00000000000..12fe9684a52 --- /dev/null +++ b/keyboards/kapcave/arya/readme.md @@ -0,0 +1,23 @@ +# KapCave Arya + +Firmware for the KapCave Arya Keyboard + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: Arya PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/arya-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/arya:default + +Or to make and flash: + + make kapcave/arya:default:flash + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +* **Bootmagic reset**: Hold down Right Space key and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/arya/rules.mk b/keyboards/kapcave/arya/rules.mk new file mode 100644 index 00000000000..4732327713a --- /dev/null +++ b/keyboards/kapcave/arya/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = STM32F072 + +# Bootloader selection +BOOTLOADER = stm32-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/kapcave/gskt00/config.h b/keyboards/kapcave/gskt00/config.h new file mode 100755 index 00000000000..91c34182e78 --- /dev/null +++ b/keyboards/kapcave/gskt00/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x6061 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KapCave +#define PRODUCT GSKT00 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, D1, D2, D4, D6, F7, B0, F4 } +#define MATRIX_COL_PINS { F6, D7, F5, C7, B4, C6, B6, B5 } +#define UNUSED_PINS + +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + diff --git a/keyboards/kapcave/gskt00/gskt00.c b/keyboards/kapcave/gskt00/gskt00.c new file mode 100755 index 00000000000..c2c2d823f90 --- /dev/null +++ b/keyboards/kapcave/gskt00/gskt00.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include "gskt00.h" + diff --git a/keyboards/kapcave/gskt00/gskt00.h b/keyboards/kapcave/gskt00/gskt00.h new file mode 100755 index 00000000000..d0ac51acd74 --- /dev/null +++ b/keyboards/kapcave/gskt00/gskt00.h @@ -0,0 +1,73 @@ +/* +Copyright 2021 KapCave + +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 . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_all( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_iso_tsangan( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k24, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_ansi_tsangan( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { XXX, k71, k72, k73, k74, k75, k76, k77 } \ +} diff --git a/keyboards/kapcave/gskt00/info.json b/keyboards/kapcave/gskt00/info.json new file mode 100644 index 00000000000..ba1455fae9c --- /dev/null +++ b/keyboards/kapcave/gskt00/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "GSKT-00", + "url": "https://kapcave.com/products/gskt-00-pcb-usb-c", + "maintainer": "nachie", + "layouts": { + "LAYOUT_60_ansi_tsangan": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_60_iso_tsangan": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"\\", "x":13, "y":0}, + {"label":"`", "x":14, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"ISO \\", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"Fn", "x":14, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"GUI", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"Alt", "x":11, "y":4, "w":1.5}, + {"label":"GUI", "x":12.5, "y":4}, + {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} + ] + } + } +} diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/config.h b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h new file mode 100644 index 00000000000..2db5749cb56 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#define ENCODERS_PAD_A { D5 } +#define ENCODERS_PAD_B { D3 } + +#define RGB_DI_PIN D0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif + diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c b/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c new file mode 100755 index 00000000000..8c7e9720db9 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/keymap.c @@ -0,0 +1,70 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, 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_BSPC, + MO(3), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LCTL), + + /* DVORAK */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + /* COLEMAK */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), + + /* FUNCTION */ + LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG) + +}; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_UP); + } else { + tap_code(KC_DOWN); + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md b/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md new file mode 100644 index 00000000000..1f6d7bcd382 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/readme.md @@ -0,0 +1 @@ +There was a private run of Polycarbonate cases. This keymap supports the underglow PCBs that shipped out with those, in addition to future underglow pcbs. These PCBs also had encoder support which is reflected in the keymap. \ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk b/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk new file mode 100644 index 00000000000..53c9db2bd2c --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default-poly/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kapcave/gskt00/keymaps/default/keymap.c b/keyboards/kapcave/gskt00/keymaps/default/keymap.c new file mode 100755 index 00000000000..0d8d6dad6b2 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, + KC_TAB, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LGUI, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(3)), + + /* FUNCTION */ + LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_PAUS, KC_DEL, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG) + +}; + diff --git a/keyboards/kapcave/gskt00/keymaps/default/readme.md b/keyboards/kapcave/gskt00/keymaps/default/readme.md new file mode 100644 index 00000000000..042b07d1489 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for the GSKT-00 PCB. \ No newline at end of file diff --git a/keyboards/gskt00/keymaps/nachie/keymap.c b/keyboards/kapcave/gskt00/keymaps/nachie/keymap.c similarity index 100% rename from keyboards/gskt00/keymaps/nachie/keymap.c rename to keyboards/kapcave/gskt00/keymaps/nachie/keymap.c diff --git a/keyboards/kapcave/gskt00/keymaps/via/keymap.c b/keyboards/kapcave/gskt00/keymaps/via/keymap.c new file mode 100755 index 00000000000..95bc1314226 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/via/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, + KC_TAB, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LGUI, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(3)), + + /* FUNCTION */ + [_FN] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_PAUS, KC_DEL, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [_FN2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______) +}; diff --git a/keyboards/kapcave/gskt00/keymaps/via/readme.md b/keyboards/kapcave/gskt00/keymaps/via/readme.md new file mode 100644 index 00000000000..c5c3db7e3b0 --- /dev/null +++ b/keyboards/kapcave/gskt00/keymaps/via/readme.md @@ -0,0 +1 @@ +The via keymap for the GSKT-00 PCB. \ No newline at end of file diff --git a/keyboards/kprepublic/bm60rgb/keymaps/via/rules.mk b/keyboards/kapcave/gskt00/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/via/rules.mk rename to keyboards/kapcave/gskt00/keymaps/via/rules.mk diff --git a/keyboards/kapcave/gskt00/readme.md b/keyboards/kapcave/gskt00/readme.md new file mode 100644 index 00000000000..d1a90ca5834 --- /dev/null +++ b/keyboards/kapcave/gskt00/readme.md @@ -0,0 +1,23 @@ +# GSKT-00 PCB + +Firmware for the GSKT-00 PCB + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: GSKT-00 PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/gskt-00-pcb-usb-c) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/gskt00:default + +Or to make and flash: + + make kapcave/gskt00:default:flash + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +* **Bootmagic reset**: Hold down ESC key (top left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/gskt00/rules.mk b/keyboards/kapcave/gskt00/rules.mk new file mode 100755 index 00000000000..4766062779a --- /dev/null +++ b/keyboards/kapcave/gskt00/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no + +LAYOUTS = 60_ansi_tsangan 60_iso_tsangan diff --git a/keyboards/kapcave/paladin64/config.h b/keyboards/kapcave/paladin64/config.h new file mode 100755 index 00000000000..7c3d1a0fa11 --- /dev/null +++ b/keyboards/kapcave/paladin64/config.h @@ -0,0 +1,121 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x5036 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KapCave +#define PRODUCT paladin64 + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 8 + +#define BOOTMAGIC_LITE_ROW 3 +#define BOOTMAGIC_LITE_COLUMN 6 + +/* Only required if you add in a trackpoint hardware to the pcb */ +#ifdef PS2_USE_USART +#define PS2_CLOCK_PIN D5 +#define PS2_DATA_PIN D2 + + /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling + * edge */ + /* set DDR of CLOCK as input to be slave */ + #define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1<", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_60_ansi": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + + "LAYOUT_infinity": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_aek_103": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + + "LAYOUT_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + } + } + } diff --git a/keyboards/kapcave/paladin64/keymaps/default/keymap.c b/keyboards/kapcave/paladin64/keymaps/default/keymap.c new file mode 100755 index 00000000000..ed906909fe7 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, 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_BSPC, + MO(3), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), + + /* DVORAK */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, + MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), + + /* COLEMAK */ + LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, + MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), + + /* FUNCTION */ + LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), + + /* AutoMouse */ + LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; diff --git a/keyboards/kapcave/paladin64/keymaps/default/readme.md b/keyboards/kapcave/paladin64/keymaps/default/readme.md new file mode 100644 index 00000000000..11248150d90 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for Paladin64 \ No newline at end of file diff --git a/keyboards/kapcave/paladin64/keymaps/via/keymap.c b/keyboards/kapcave/paladin64/keymaps/via/keymap.c new file mode 100644 index 00000000000..7ce94a5ef4f --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* QWERTY */ + [_BASE] = LAYOUT_all( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, + KC_TAB, 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_BSPC, + MO(3), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), + + /* FUNCTION */ + [_FN] = LAYOUT_all( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), + + [_FN2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______), + + [_FN3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______) + +}; + diff --git a/keyboards/kapcave/paladin64/keymaps/via/readme.md b/keyboards/kapcave/paladin64/keymaps/via/readme.md new file mode 100644 index 00000000000..2cf66cd4cb0 --- /dev/null +++ b/keyboards/kapcave/paladin64/keymaps/via/readme.md @@ -0,0 +1 @@ +Via layout for the paladin64 pcb \ No newline at end of file diff --git a/keyboards/kprepublic/bm65iso/keymaps/via/rules.mk b/keyboards/kapcave/paladin64/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/via/rules.mk rename to keyboards/kapcave/paladin64/keymaps/via/rules.mk diff --git a/keyboards/kapcave/paladin64/paladin64.c b/keyboards/kapcave/paladin64/paladin64.c new file mode 100755 index 00000000000..88dd1fdff24 --- /dev/null +++ b/keyboards/kapcave/paladin64/paladin64.c @@ -0,0 +1,18 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include "paladin64.h" + diff --git a/keyboards/kapcave/paladin64/paladin64.h b/keyboards/kapcave/paladin64/paladin64.h new file mode 100755 index 00000000000..b578c185409 --- /dev/null +++ b/keyboards/kapcave/paladin64/paladin64.h @@ -0,0 +1,106 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +#define LAYOUT_all( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_iso( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k41, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_60_ansi( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_infinity( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k26, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, k22, \ + k30, k40, k50, k60, k70, k00, k10, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} + +#define LAYOUT_aek_103( \ + k36, k37, k46, k47, k56, k57, k66, k67, k76, k77, k06, k07, k17, k27, \ + k34, k35, k44, k45, k54, k55, k64, k65, k75, k05, k15, k16, k25, k24, \ + k32, k33, k43, k52, k53, k63, k73, k74, k03, k04, k13, k14, k23, \ + k31, k42, k51, k61, k62, k71, k72, k01, k02, k11, k12, k21, \ + k30, k40, k50, k60, k70, k00, k20 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { XXX, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, XXX, k23, k24, k25, XXX, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ +} diff --git a/keyboards/kapcave/paladin64/readme.md b/keyboards/kapcave/paladin64/readme.md new file mode 100644 index 00000000000..cc4a9b67e3d --- /dev/null +++ b/keyboards/kapcave/paladin64/readme.md @@ -0,0 +1,24 @@ +# Paladin64 ALPS PCB + +Firmware for the Paladin64 ALPS64 PCB, with underglow and an optional +trackpoint module. + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: Paladin64 ALPS PCB +* Hardware Availability: [KapCave](https://kapcave.com/products/paladin64-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/paladin64:default + +Or to make and flash: + + make kapcave/paladin64:default:flash + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +* **Bootmagic reset**: Hold down ESC key (top left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/paladin64/rules.mk b/keyboards/kapcave/paladin64/rules.mk new file mode 100755 index 00000000000..f526755d4b5 --- /dev/null +++ b/keyboards/kapcave/paladin64/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +LAYOUTS = 60_ansi diff --git a/keyboards/kapcave/paladinpad/config.h b/keyboards/kapcave/paladinpad/config.h new file mode 100644 index 00000000000..9b3c9a4ca0a --- /dev/null +++ b/keyboards/kapcave/paladinpad/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B43 +#define PRODUCT_ID 0x5050 +#define MANUFACTURER KapCave +#define PRODUCT paladinpad + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + + diff --git a/keyboards/kapcave/paladinpad/info.json b/keyboards/kapcave/paladinpad/info.json new file mode 100644 index 00000000000..7d1afccf602 --- /dev/null +++ b/keyboards/kapcave/paladinpad/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "PaladinPad", + "url": "https://kapcave.com/products/paladinpad-pcb", + "maintainer": "nachie", + "layouts": { + "LAYOUT_ortho_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3}, + {"x":0, "y":4}, + {"x":1, "y":4}, + {"x":2, "y":4}, + {"x":3, "y":4} + ] + }, + "LAYOUT_numpad_aek": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + }, + "LAYOUT_numpad_5x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":1, "h":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + + {"x":0, "y":4, "w":2}, + {"x":2, "y":4}, + {"x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c b/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c new file mode 100644 index 00000000000..79c3baae444 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/aek/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + LAYOUT_numpad_aek( + MO(1), KC_PEQL, KC_PSLS, KC_PAST, + KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_numpad_aek( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RESET, KC_NLCK) +}; + diff --git a/keyboards/kapcave/paladinpad/keymaps/aek/readme.md b/keyboards/kapcave/paladinpad/keymaps/aek/readme.md new file mode 100644 index 00000000000..44b106fa6bc --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/aek/readme.md @@ -0,0 +1 @@ +The keymap for PaladinPad which resembles the AEK Numpad \ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/default/keymap.c b/keyboards/kapcave/paladinpad/keymaps/default/keymap.c new file mode 100644 index 00000000000..30dd1b9c00f --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + LAYOUT_numpad_5x4( + MO(1), KC_PAST, KC_PSLS, KC_PMNS, + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, + KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_numpad_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RESET, KC_NLCK) +}; + diff --git a/keyboards/kapcave/paladinpad/keymaps/default/readme.md b/keyboards/kapcave/paladinpad/keymaps/default/readme.md new file mode 100644 index 00000000000..2ade4edf388 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/default/readme.md @@ -0,0 +1 @@ +The default keymap for PaladinPad which resembles the AEK Numpad \ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c b/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c new file mode 100644 index 00000000000..a65b53b3418 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/ortho/keymap.c @@ -0,0 +1,53 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + DBLZERO = SAFE_RANGE +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + LAYOUT_ortho_5x4( + MO(1), KC_PSLS, KC_PAST, KC_BSPC, + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_EQL, + DBLZERO, KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + LAYOUT_ortho_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_NLCK) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DBLZERO: + if (record->event.pressed) { + SEND_STRING("00"); + } + break; + } + return true; +} + + diff --git a/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md b/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md new file mode 100644 index 00000000000..4dc98d30f49 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/ortho/readme.md @@ -0,0 +1 @@ +The ortho keymap for PaladinPad which makes it a 5x4 ortho pad \ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/keymaps/via/keymap.c b/keyboards/kapcave/paladinpad/keymaps/via/keymap.c new file mode 100644 index 00000000000..2315da4ace7 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/via/keymap.c @@ -0,0 +1,59 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include QMK_KEYBOARD_H + +enum layer_names { + _BASE, // Default Layer + _FN, // Fn Layer 1 + _FN2, // Fn Layer 2 + _FN3 // Fn Layer 3 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* DEFAULT */ + [_BASE] = LAYOUT_ortho_5x4( + MO(1), KC_PSLS, KC_PAST, KC_BSPC, + KC_P7, KC_P8, KC_P9, KC_MINS, + KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_P1, KC_P2, KC_P3, KC_EQL, + KC_P0, KC_P0, KC_PDOT, KC_PENT), + + /* FUNCTION */ + [_FN] = LAYOUT_ortho_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, KC_TRNS, + RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, + RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, RESET, KC_NLCK), + + /* FUNCTION */ + [_FN2] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______), + + /* FUNCTION */ + [_FN3] = LAYOUT_ortho_5x4( + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______) +}; diff --git a/keyboards/kapcave/paladinpad/keymaps/via/rules.mk b/keyboards/kapcave/paladinpad/keymaps/via/rules.mk new file mode 100644 index 00000000000..600f7d16a71 --- /dev/null +++ b/keyboards/kapcave/paladinpad/keymaps/via/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes +# Not enough space on ATMega32u4 for RGB + Audio + Via +AUDIO_ENABLE = no \ No newline at end of file diff --git a/keyboards/kapcave/paladinpad/paladinpad.c b/keyboards/kapcave/paladinpad/paladinpad.c new file mode 100644 index 00000000000..063e49c872a --- /dev/null +++ b/keyboards/kapcave/paladinpad/paladinpad.c @@ -0,0 +1,17 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#include "paladinpad.h" diff --git a/keyboards/kapcave/paladinpad/paladinpad.h b/keyboards/kapcave/paladinpad/paladinpad.h new file mode 100644 index 00000000000..54b320c4246 --- /dev/null +++ b/keyboards/kapcave/paladinpad/paladinpad.h @@ -0,0 +1,103 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "quantum.h" + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │ Eq │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │ │ + * ├─────┼─────┼─────┤Plus │ + * │ 4 │ 5 │ 6 │ │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ │ + * ├─────┴─────┼─────┤ Ent │ + * │ 0 │ . │ │ + * └───────────┴─────┴─────┘ + */ + +#define LAYOUT_numpad_5x4( \ + K_NUM1, K_SLSH, K_STAR, K_MINUS, \ + K_7, K_8, K_9, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, \ + K_0, K_DOT, K_ENT \ +) { \ + { K_NUM1, K_SLSH, K_STAR, K_MINUS }, \ + { K_7, K_8, K_9, KC_NO }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT, KC_NO, KC_NO } \ +} + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │Eql │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │Minus│ + * ├─────┼─────┼─────┼─────┤ + * │ 4 │ 5 │ 6 │Plus │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ │ + * ├─────┼─────┼─────┤ Ent │ + * │ 0 │ 10 │ . │ │ + * └─────┴─────┴─────┴─────┘ + */ + +#define LAYOUT_numpad_aek( \ + K_NUM1, K_EQ1, K_SLSH1, K_STAR1, \ + K_7, K_8, K_9, K_MINUS1, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, \ + K_0, K_DOT1, K_ENT \ +) { \ + { K_NUM1, K_EQ1, K_SLSH1, K_STAR1 }, \ + { K_7, K_8, K_9, K_MINUS1 }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT1, KC_NO, KC_NO } \ +} + +/* + * ┌─────┬─────┬─────┬─────┐ + * │Num1 │ Eq │Slsh │Star │ + * ├─────┼─────┼─────┼─────┤ + * │ 7 │ 8 │ 9 │Minus│ + * ├─────┼─────┼─────┼─────┤ + * │ 4 │ 5 │ 6 │Plus │ + * ├─────┼─────┼─────┼─────┤ + * │ 1 │ 2 │ 3 │ 11 │ + * ├─────┼─────┼─────┼─────┤ + * │ 0 │ 10 │ . │ Ent │ + * └─────┴─────┴─────┴─────┘ + */ + +#define LAYOUT_ortho_5x4( \ + K_NUM1, K_EQ1, K_SLSH1, K_STAR1, \ + K_7, K_8, K_9, K_MINUS1, \ + K_4, K_5, K_6, K_PLUS, \ + K_1, K_2, K_3, K_11, \ + K_0, K_10, K_DOT1, K_ENT \ +) { \ + { K_NUM1, K_EQ1, K_SLSH1, K_STAR1 }, \ + { K_7, K_8, K_9, K_MINUS1 }, \ + { K_4, K_5, K_6, K_PLUS }, \ + { K_1, K_2, K_3, K_ENT }, \ + { K_0, K_DOT1, K_10, K_11 } \ +} diff --git a/keyboards/kapcave/paladinpad/readme.md b/keyboards/kapcave/paladinpad/readme.md new file mode 100644 index 00000000000..f21c43d783d --- /dev/null +++ b/keyboards/kapcave/paladinpad/readme.md @@ -0,0 +1,23 @@ +# PaladinPad PCB + +Firmware for the PaladinPad, with underglow. + +* Keyboard Maintainer: [KapCave](https://github.com/nachie) +* Hardware Supported: PaladinPad +* Hardware Availability: [KapCave](https://kapcave.com/products/paladinpad-pcb) + +Make example for this keyboard (after setting up your build environment): + + make kapcave/paladinpad:default + +Or to make and flash: + + make kapcave/paladinpad:default:flash + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +* **Bootmagic reset**: Hold down NumLock (Top Left) and plug in the keyboard +* **Physical reset button**: Briefly press the button labeled "SW_RST1" on the back of the PCB diff --git a/keyboards/kapcave/paladinpad/rev1/config.h b/keyboards/kapcave/paladinpad/rev1/config.h new file mode 100644 index 00000000000..84af56ec25b --- /dev/null +++ b/keyboards/kapcave/paladinpad/rev1/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0001 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { C7, B6, B4, D7, D6 } +#define MATRIX_COL_PINS { D4, D5, D3, B7 } + +#define RGB_DI_PIN D0 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 8 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/rules.mk b/keyboards/kapcave/paladinpad/rev1/rules.mk similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev2/rules.mk rename to keyboards/kapcave/paladinpad/rev1/rules.mk diff --git a/keyboards/kapcave/paladinpad/rev2/config.h b/keyboards/kapcave/paladinpad/rev2/config.h new file mode 100644 index 00000000000..a27ac03ab15 --- /dev/null +++ b/keyboards/kapcave/paladinpad/rev2/config.h @@ -0,0 +1,47 @@ +/* +Copyright 2021 KapCave + +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 . +*/ +#pragma once + +#include "config_common.h" + +#define DEVICE_VER 0x0002 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F4, F6, D7, B4, D6 } +#define MATRIX_COL_PINS { F7, F5, D3, B7 } + +#define AUDIO_PIN C6 + +#define RGB_DI_PIN D0 + +#ifdef RGB_DI_PIN +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLED_NUM 7 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 12 +#endif + diff --git a/keyboards/kapcave/paladinpad/rev2/rules.mk b/keyboards/kapcave/paladinpad/rev2/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/kapcave/paladinpad/rules.mk b/keyboards/kapcave/paladinpad/rules.mk new file mode 100644 index 00000000000..bb918b188de --- /dev/null +++ b/keyboards/kapcave/paladinpad/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +DEFAULT_FOLDER = kapcave/paladinpad/rev2 +LAYOUTS = numpad_5x4 ortho_5x4 diff --git a/keyboards/kb_elmo/67mk_e/rules.mk b/keyboards/kb_elmo/67mk_e/rules.mk index 51f9c5d76aa..68c8a17ca89 100644 --- a/keyboards/kb_elmo/67mk_e/rules.mk +++ b/keyboards/kb_elmo/67mk_e/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/aek2_usb/rules.mk b/keyboards/kb_elmo/aek2_usb/rules.mk index c052c9c1805..c11958500e2 100644 --- a/keyboards/kb_elmo/aek2_usb/rules.mk +++ b/keyboards/kb_elmo/aek2_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/elmopad/rules.mk b/keyboards/kb_elmo/elmopad/rules.mk index 8ab5bdb7221..3f57446238b 100644 --- a/keyboards/kb_elmo/elmopad/rules.mk +++ b/keyboards/kb_elmo/elmopad/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/m0110a_usb/rules.mk b/keyboards/kb_elmo/m0110a_usb/rules.mk index c052c9c1805..c11958500e2 100644 --- a/keyboards/kb_elmo/m0110a_usb/rules.mk +++ b/keyboards/kb_elmo/m0110a_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/m0116_usb/rules.mk b/keyboards/kb_elmo/m0116_usb/rules.mk index c052c9c1805..c11958500e2 100644 --- a/keyboards/kb_elmo/m0116_usb/rules.mk +++ b/keyboards/kb_elmo/m0116_usb/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/noah_avr/rules.mk b/keyboards/kb_elmo/noah_avr/rules.mk index e1891634853..9610473b494 100644 --- a/keyboards/kb_elmo/noah_avr/rules.mk +++ b/keyboards/kb_elmo/noah_avr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/qez/rules.mk b/keyboards/kb_elmo/qez/rules.mk index 4ed330a33ec..895a77853d7 100644 --- a/keyboards/kb_elmo/qez/rules.mk +++ b/keyboards/kb_elmo/qez/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/sesame/rules.mk b/keyboards/kb_elmo/sesame/rules.mk index 6d46a1592eb..83a923c8e3c 100644 --- a/keyboards/kb_elmo/sesame/rules.mk +++ b/keyboards/kb_elmo/sesame/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kb_elmo/twelvekey/rules.mk b/keyboards/kb_elmo/twelvekey/rules.mk index 432119a0d25..07857f30fe2 100644 --- a/keyboards/kb_elmo/twelvekey/rules.mk +++ b/keyboards/kb_elmo/twelvekey/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/bella/rgb/config.h b/keyboards/kbdfans/bella/rgb/config.h index 07594a34abc..c4124111335 100644 --- a/keyboards/kbdfans/bella/rgb/config.h +++ b/keyboards/kbdfans/bella/rgb/config.h @@ -42,16 +42,59 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 108 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 108 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif #define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kbdfans/bella/rgb/rgb.c b/keyboards/kbdfans/bella/rgb/rgb.c index 17cf992146f..4353cae1bed 100644 --- a/keyboards/kbdfans/bella/rgb/rgb.c +++ b/keyboards/kbdfans/bella/rgb/rgb.c @@ -15,7 +15,7 @@ */ #include "rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */ {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */ {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */ diff --git a/keyboards/kbdfans/bella/rgb/rules.mk b/keyboards/kbdfans/bella/rgb/rules.mk index c1772267383..c75e7259b6e 100644 --- a/keyboards/kbdfans/bella/rgb/rules.mk +++ b/keyboards/kbdfans/bella/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/bella/rgb_iso/config.h b/keyboards/kbdfans/bella/rgb_iso/config.h index 4fda9986779..ca43d80708b 100644 --- a/keyboards/kbdfans/bella/rgb_iso/config.h +++ b/keyboards/kbdfans/bella/rgb_iso/config.h @@ -42,16 +42,59 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 109 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 109 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif #define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c index 0c431b15434..072501045ac 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c +++ b/keyboards/kbdfans/bella/rgb_iso/rgb_iso.c @@ -15,7 +15,7 @@ */ #include "rgb_iso.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* RGB6 */ {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* RGB32 */ {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* RGB45 */ diff --git a/keyboards/kbdfans/bella/rgb_iso/rules.mk b/keyboards/kbdfans/bella/rgb_iso/rules.mk index c1772267383..c75e7259b6e 100644 --- a/keyboards/kbdfans/bella/rgb_iso/rules.mk +++ b/keyboards/kbdfans/bella/rgb_iso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/bella/soldered/rules.mk b/keyboards/kbdfans/bella/soldered/rules.mk index dc7d341bbb2..5f180ae00de 100755 --- a/keyboards/kbdfans/bella/soldered/rules.mk +++ b/keyboards/kbdfans/bella/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/boop65/rgb/config.h b/keyboards/kbdfans/boop65/rgb/config.h index 71db0f8b57d..0d67db21101 100644 --- a/keyboards/kbdfans/boop65/rgb/config.h +++ b/keyboards/kbdfans/boop65/rgb/config.h @@ -54,9 +54,52 @@ # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL # define DRIVER_ADDR_1 0b0110000 # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 83 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_LED_TOTAL 83 # define DRIVER_INDICATOR_LED_TOTAL 0 +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif -#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 \ No newline at end of file +#define VIA_EEPROM_LAYOUT_OPTIONS_SIZE 2 diff --git a/keyboards/kbdfans/boop65/rgb/rgb.c b/keyboards/kbdfans/boop65/rgb/rgb.c index 5682ee28949..3e9c66f4572 100644 --- a/keyboards/kbdfans/boop65/rgb/rgb.c +++ b/keyboards/kbdfans/boop65/rgb/rgb.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, {0, CS21_SW3, CS20_SW3, CS19_SW3}, diff --git a/keyboards/kbdfans/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index fcc43a2f73a..1709fdacac4 100644 --- a/keyboards/kbdfans/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 2042fdeeb11..39d6609b69e 100644 --- a/keyboards/kbdfans/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk index 4fac790d669..f18d097b0de 100644 --- a/keyboards/kbdfans/kbd66/rules.mk +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk index 98bf07960ee..673e15f81fa 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/brandonschlack/rules.mk @@ -1,2 +1,2 @@ # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/kbdfans/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index f8c1fa3bfde..0120a454bec 100644 --- a/keyboards/kbdfans/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk index daaaa8a531a..704af71c728 100644 --- a/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk +++ b/keyboards/kbdfans/kbd67/mkii_soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h index b0b7e1dad25..d88d384f988 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/config.h @@ -18,22 +18,55 @@ #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1110100 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk index e7c5b378003..85c3db9e291 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/rules.mk @@ -6,7 +6,7 @@ BOARD = QMK_PROTON_C BOOTLOADER = stm32-dfu BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c index 53b57dc73d2..f0036738711 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v1/v1.c @@ -16,7 +16,7 @@ #include "v1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C8_8, C7_8, C6_8}, // LA17 {0, C9_8, C7_7, C6_7}, // LA16 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h index 51e732f1013..ffdace7a5ff 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/config.h @@ -19,29 +19,59 @@ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110111 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 35 -#define DRIVER_2_LED_TOTAL 32 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110111 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 35 +# define DRIVER_2_LED_TOTAL 32 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk index ff4aa2ceec6..f3862be3391 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c index 562b9c4543e..37972c2500b 100644 --- a/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v2/v2.c @@ -16,7 +16,7 @@ #include "v2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C8_8, C7_8, C6_8}, // LA17 {0, C9_8, C7_7, C6_7}, // LA16 diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h index 1ee83cdc942..5b50c415aed 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/config.h @@ -45,31 +45,60 @@ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define USB_SUSPEND_WAKEUP_DELAY 5000 #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 67 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 67 #define DRIVER_INDICATOR_LED_TOTAL 0 #endif diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/rules.mk b/keyboards/kbdfans/kbd67/mkiirgb/v3/rules.mk index 374757ff63b..ad6af52f43b 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/rules.mk +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER_SIZE = 6144 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c index 6e368a5c775..85806aff51a 100755 --- a/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c +++ b/keyboards/kbdfans/kbd67/mkiirgb/v3/v3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS21_SW1, CS20_SW1, CS19_SW1}, {0, CS21_SW2, CS20_SW2, CS19_SW2}, {0, CS21_SW3, CS20_SW3, CS19_SW3}, diff --git a/keyboards/kbdfans/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index e2fc5657eba..610532fe9f5 100644 --- a/keyboards/kbdfans/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk index 3031077b991..3635874b4ec 100644 --- a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd67/rev2/rules.mk b/keyboards/kbdfans/kbd67/rev2/rules.mk index 0d6de1dd934..332aa9e9efb 100644 --- a/keyboards/kbdfans/kbd67/rev2/rules.mk +++ b/keyboards/kbdfans/kbd67/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index cff02d7c5b4..9ce299ed686 100644 --- a/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/kbdfans/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index d2afc9fd2b1..14adc28f7ed 100644 --- a/keyboards/kbdfans/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk index 77bc0e2b0c2..71b25fcb121 100644 --- a/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kbdfans/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index a1ef4dbd85a..24f717ea977 100644 --- a/keyboards/kbdfans/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index a1ef4dbd85a..24f717ea977 100644 --- a/keyboards/kbdfans/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbd8x_mk2/rules.mk b/keyboards/kbdfans/kbd8x_mk2/rules.mk index da5b3c646e6..9a9eaad6461 100644 --- a/keyboards/kbdfans/kbd8x_mk2/rules.mk +++ b/keyboards/kbdfans/kbd8x_mk2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbdmini/config.h b/keyboards/kbdfans/kbdmini/config.h index fc65f43411e..f2137fcd1f6 100644 --- a/keyboards/kbdfans/kbdmini/config.h +++ b/keyboards/kbdfans/kbdmini/config.h @@ -38,26 +38,58 @@ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 52 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 52 #endif /* disable these deprecated features by default */ diff --git a/keyboards/kbdfans/kbdmini/kbdmini.c b/keyboards/kbdfans/kbdmini/kbdmini.c index 799803c6faa..03c0096c708 100644 --- a/keyboards/kbdfans/kbdmini/kbdmini.c +++ b/keyboards/kbdfans/kbdmini/kbdmini.c @@ -1,6 +1,6 @@ #include "kbdmini.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, B_9, A_9, C_9 }, //LA33 { 0, B_10, A_10, C_10 }, //LA37 { 0, B_11, A_11, C_11 }, //LA41 diff --git a/keyboards/kbdfans/kbdmini/rules.mk b/keyboards/kbdfans/kbdmini/rules.mk index 2d151d22145..0bcd9e7267c 100644 --- a/keyboards/kbdfans/kbdmini/rules.mk +++ b/keyboards/kbdfans/kbdmini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/kbdpad_mk2/rules.mk b/keyboards/kbdfans/kbdpad_mk2/rules.mk index 374998b0ef3..1b5b44b80d8 100644 --- a/keyboards/kbdfans/kbdpad_mk2/rules.mk +++ b/keyboards/kbdfans/kbdpad_mk2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/maja/config.h b/keyboards/kbdfans/maja/config.h index 3722c8381d8..19a5e1dfa4a 100755 --- a/keyboards/kbdfans/maja/config.h +++ b/keyboards/kbdfans/maja/config.h @@ -20,22 +20,55 @@ #define RGB_DISABLE_AFTER_TIMEOUT 0 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b1110100 #define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/kbdfans/maja/maja.c b/keyboards/kbdfans/maja/maja.c index 9619a84b489..d257212750b 100755 --- a/keyboards/kbdfans/maja/maja.c +++ b/keyboards/kbdfans/maja/maja.c @@ -1,6 +1,6 @@ #include "maja.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C2_1, C3_1, C4_1}, // LA0 {0, C1_1, C3_2, C4_2}, // LA1 {0, C1_2, C2_2, C4_3}, // LA2 diff --git a/keyboards/kbdfans/maja/rules.mk b/keyboards/kbdfans/maja/rules.mk index 6060aebcd5f..2279a82333c 100755 --- a/keyboards/kbdfans/maja/rules.mk +++ b/keyboards/kbdfans/maja/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kbdfans/maja_soldered/rules.mk b/keyboards/kbdfans/maja_soldered/rules.mk index dda55e389ca..59fdeaebf45 100755 --- a/keyboards/kbdfans/maja_soldered/rules.mk +++ b/keyboards/kbdfans/maja_soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kc60/keymaps/stanleylai/rules.mk b/keyboards/kc60/keymaps/stanleylai/rules.mk index 3951663c7cc..9816b082fd5 100644 --- a/keyboards/kc60/keymaps/stanleylai/rules.mk +++ b/keyboards/kc60/keymaps/stanleylai/rules.mk @@ -3,7 +3,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kc60/keymaps/wigguno/rules.mk b/keyboards/kc60/keymaps/wigguno/rules.mk index 97ab9617396..f9b4b86766b 100644 --- a/keyboards/kc60/keymaps/wigguno/rules.mk +++ b/keyboards/kc60/keymaps/wigguno/rules.mk @@ -3,7 +3,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index a00cd5e8087..89823d4349e 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kc60se/readme.md b/keyboards/kc60se/readme.md index 55583d81db8..ba2cab1c769 100644 --- a/keyboards/kc60se/readme.md +++ b/keyboards/kc60se/readme.md @@ -10,13 +10,13 @@ ### Enter the Bootloader - * As delivered, BOOTMAGIC_ENABLE = yes: + * New firmware, with Bootmagic Lite: + * holding down Esc while plugging in USB. + * As delivered, with Full Bootmagic (deprecated): * unplug keyboard; * while holding down 'Space' 'B', plug in USB cable and continue to hold for 8 seconds; * 'lsusb' should report 'Atmel Corp. atmega32u4 DFU bootloader' instead of 'feed 6060'; * in bootloader LEDs are off & keyboard does not work. - * New firmware, BOOTMAGIC_ENABLE = lite: - * holding down esc while pluging in usb. * Hardware way: * momentary jump pads 5 & 6 to enter bootloader; diff --git a/keyboards/kc60se/rules.mk b/keyboards/kc60se/rules.mk index e31f3c994b9..9f684993941 100644 --- a/keyboards/kc60se/rules.mk +++ b/keyboards/kc60se/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # default keymap does not map mouse EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/bdn9/rev2/config.h b/keyboards/keebio/bdn9/rev2/config.h index d4a252a3016..f9eb3babca7 100644 --- a/keyboards/keebio/bdn9/rev2/config.h +++ b/keyboards/keebio/bdn9/rev2/config.h @@ -55,6 +55,54 @@ along with this program. If not, see . // RGB Matrix # ifdef RGB_MATRIX_ENABLE # define DRIVER_LED_TOTAL RGBLED_NUM +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # endif #endif diff --git a/keyboards/keebio/bdn9/rev2/rules.mk b/keyboards/keebio/bdn9/rev2/rules.mk index f743e71be5d..fd3968a4eca 100644 --- a/keyboards/keebio/bdn9/rev2/rules.mk +++ b/keyboards/keebio/bdn9/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keebio/choconum/rules.mk b/keyboards/keebio/choconum/rules.mk index bedc5632929..087f572ba82 100644 --- a/keyboards/keebio/choconum/rules.mk +++ b/keyboards/keebio/choconum/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keebio/chocopad/config.h b/keyboards/keebio/chocopad/config.h index 08e62f034fd..e07bd5da5b0 100644 --- a/keyboards/keebio/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -42,5 +41,3 @@ #endif #define RGB_DI_PIN D3 #define RGBLED_NUM 4 - -#endif diff --git a/keyboards/keebio/dilly/config.h b/keyboards/keebio/dilly/config.h index 835498f25e6..9d7b08509de 100644 --- a/keyboards/keebio/dilly/config.h +++ b/keyboards/keebio/dilly/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGB_DI_PIN D3 #define RGBLED_NUM 10 - -#endif diff --git a/keyboards/keebio/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h index 229c6cd9547..e0f13bae5e5 100644 --- a/keyboards/keebio/dilly/dilly.h +++ b/keyboards/keebio/dilly/dilly.h @@ -1,19 +1,16 @@ -#ifndef DILLY_H -#define DILLY_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_3x10( \ - A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, \ - B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, \ - C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 \ + k00, k01, k02, k03, k04, k34, k33, k32, k31, k30, \ + k10, k11, k12, k13, k14, k44, k43, k42, k41, k40, \ + k20, k21, k22, k23, k24, k54, k53, k52, k51, k50 \ ) { \ - { A1, A2, A3, A4, A5 }, \ - { B1, B2, B3, B4, B5 }, \ - { C1, C2, C3, C4, C5 }, \ - { A10, A9, A8, A7, A6 }, \ - { B10, B9, B8, B7, B6 }, \ - { C10, C9, C8, C7, C6 } \ + { k00, k01, k02, k03, k04 }, \ + { k10, k11, k12, k13, k14 }, \ + { k20, k21, k22, k23, k24 }, \ + { k30, k31, k32, k33, k34 }, \ + { k40, k41, k42, k43, k44 }, \ + { k50, k51, k52, k53, k54 } \ } - -#endif diff --git a/keyboards/keebio/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index cc778b33271..09a1a9f711c 100644 --- a/keyboards/keebio/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/dsp40/rev1/rules.mk b/keyboards/keebio/dsp40/rev1/rules.mk index 5117be620ed..6208e6b3863 100644 --- a/keyboards/keebio/dsp40/rev1/rules.mk +++ b/keyboards/keebio/dsp40/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keebio/foldkb/keymaps/via/rules.mk b/keyboards/keebio/foldkb/keymaps/via/rules.mk index 4b1bcabda81..eec3596d0d3 100644 --- a/keyboards/keebio/foldkb/keymaps/via/rules.mk +++ b/keyboards/keebio/foldkb/keymaps/via/rules.mk @@ -1,3 +1,3 @@ VIA_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no LTO_ENABLE = yes diff --git a/keyboards/keebio/foldkb/rules.mk b/keyboards/keebio/foldkb/rules.mk index 77f209de956..7fedb2e0524 100644 --- a/keyboards/keebio/foldkb/rules.mk +++ b/keyboards/keebio/foldkb/rules.mk @@ -7,10 +7,10 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/keebio/iris/config.h b/keyboards/keebio/iris/config.h index 863722d7d04..6868dc13541 100644 --- a/keyboards/keebio/iris/config.h +++ b/keyboards/keebio/iris/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/keebio/iris/keymaps/ddone/rules.mk b/keyboards/keebio/iris/keymaps/ddone/rules.mk index f652b45c965..41c4983e490 100644 --- a/keyboards/keebio/iris/keymaps/ddone/rules.mk +++ b/keyboards/keebio/iris/keymaps/ddone/rules.mk @@ -1,4 +1,4 @@ LTO_ENABLE = yes COMMAND_ENABLE = no MOUSEKEY_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/keebio/iris/keymaps/vyolle/rules.mk b/keyboards/keebio/iris/keymaps/vyolle/rules.mk index 56073e8b931..3b342b4cef8 100644 --- a/keyboards/keebio/iris/keymaps/vyolle/rules.mk +++ b/keyboards/keebio/iris/keymaps/vyolle/rules.mk @@ -4,4 +4,4 @@ STENO_ENABLE = no # Additional protocols for Stenography(+1700), require AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/keebio/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index c5cae9bdb7c..72b2e8c3bcd 100644 --- a/keyboards/keebio/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk @@ -12,7 +12,7 @@ BOOTLOADER = qmk-dfu BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug +CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality @@ -23,4 +23,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes ENCODER_ENABLE = yes -LTO_ENABLE = yes \ No newline at end of file +LTO_ENABLE = yes diff --git a/keyboards/keebio/kbo5000/rules.mk b/keyboards/keebio/kbo5000/rules.mk index 94f92befe05..1a1c97376ba 100644 --- a/keyboards/keebio/kbo5000/rules.mk +++ b/keyboards/keebio/kbo5000/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/levinson/config.h b/keyboards/keebio/levinson/config.h index ca0c79e554c..4a3def7cc85 100644 --- a/keyboards/keebio/levinson/config.h +++ b/keyboards/keebio/levinson/config.h @@ -17,9 +17,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif diff --git a/keyboards/keebio/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk index 18da5e15b45..18c51540bf5 100644 --- a/keyboards/keebio/levinson/keymaps/steno/rules.mk +++ b/keyboards/keebio/levinson/keymaps/steno/rules.mk @@ -4,4 +4,4 @@ STENO_ENABLE = yes # Additional protocols for Stenography, requires VIR AUDIO_ENABLE = no # Audio output on port C6 MIDI_ENABLE = no # MIDI controls NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk index f8da5a5f5f0..ef7ab042050 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk index ca8d5989ff5..63121acd6b6 100644 --- a/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk @@ -4,7 +4,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/keebio/sinc/rules.mk b/keyboards/keebio/sinc/rules.mk index 7b9f99e1d95..f72b3e9c9e8 100644 --- a/keyboards/keebio/sinc/rules.mk +++ b/keyboards/keebio/sinc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/stick/config.h b/keyboards/keebio/stick/config.h index 0a43bb86114..cd641ea28bd 100644 --- a/keyboards/keebio/stick/config.h +++ b/keyboards/keebio/stick/config.h @@ -52,6 +52,54 @@ along with this program. If not, see . // RGB Matrix # ifdef RGB_MATRIX_ENABLE # define DRIVER_LED_TOTAL RGBLED_NUM +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # endif #endif diff --git a/keyboards/keebio/stick/rules.mk b/keyboards/keebio/stick/rules.mk index 2d6dc74b589..ba077c5fc7b 100644 --- a/keyboards/keebio/stick/rules.mk +++ b/keyboards/keebio/stick/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebio/wtf60/rules.mk b/keyboards/keebio/wtf60/rules.mk index 90542c4d263..f92841df1c6 100644 --- a/keyboards/keebio/wtf60/rules.mk +++ b/keyboards/keebio/wtf60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebsforall/freebird60/rules.mk b/keyboards/keebsforall/freebird60/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/keebsforall/freebird60/rules.mk +++ b/keyboards/keebsforall/freebird60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebwerk/mega/ansi/rules.mk b/keyboards/keebwerk/mega/ansi/rules.mk index 048142703a6..c45a6bec119 100755 --- a/keyboards/keebwerk/mega/ansi/rules.mk +++ b/keyboards/keebwerk/mega/ansi/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebwerk/nano_slider/rules.mk b/keyboards/keebwerk/nano_slider/rules.mk index 8b44675a5ab..0f31b1cc6f5 100644 --- a/keyboards/keebwerk/nano_slider/rules.mk +++ b/keyboards/keebwerk/nano_slider/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebzdotnet/fme/rules.mk b/keyboards/keebzdotnet/fme/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/keebzdotnet/fme/rules.mk +++ b/keyboards/keebzdotnet/fme/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keebzdotnet/wazowski/rules.mk b/keyboards/keebzdotnet/wazowski/rules.mk index 9ef38eab94d..9ef8d0c0c26 100644 --- a/keyboards/keebzdotnet/wazowski/rules.mk +++ b/keyboards/keebzdotnet/wazowski/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kelowna/rgb64/rules.mk b/keyboards/kelowna/rgb64/rules.mk index 38a5f91ebe7..0741eb95c16 100644 --- a/keyboards/kelowna/rgb64/rules.mk +++ b/keyboards/kelowna/rgb64/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keybage/radpad/keymaps/default/keymap.c b/keyboards/keybage/radpad/keymaps/default/keymap.c index 190400f7fa2..f2d712bd6f5 100644 --- a/keyboards/keybage/radpad/keymaps/default/keymap.c +++ b/keyboards/keybage/radpad/keymaps/default/keymap.c @@ -126,7 +126,7 @@ static void render_logo(void) { oled_write_raw_P(radpad_logo, sizeof(radpad_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { if (oled_logo_cleared) { render_status(); } else { @@ -138,5 +138,6 @@ void oled_task_user(void) { render_logo(); } } + return false; } #endif diff --git a/keyboards/keybage/radpad/rules.mk b/keyboards/keybage/radpad/rules.mk index adfdaf40e1e..05b2184ac18 100644 --- a/keyboards/keybage/radpad/rules.mk +++ b/keyboards/keybage/radpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keybee/keybee65/rules.mk b/keyboards/keybee/keybee65/rules.mk index fb898d093f0..7953580c3e6 100644 --- a/keyboards/keybee/keybee65/rules.mk +++ b/keyboards/keybee/keybee65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keyboardio/atreus/rules.mk b/keyboards/keyboardio/atreus/rules.mk index 8b0f5754128..669da566b72 100644 --- a/keyboards/keyboardio/atreus/rules.mk +++ b/keyboards/keyboardio/atreus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keyboardio/model01/config.h b/keyboards/keyboardio/model01/config.h index a08b989467b..30538c56f17 100644 --- a/keyboards/keyboardio/model01/config.h +++ b/keyboards/keyboardio/model01/config.h @@ -35,3 +35,52 @@ along with this program. If not, see . /* RGB matrix constants */ #define DRIVER_LED_TOTAL 64 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c index 17bc1c7b376..5a33d527c80 100644 --- a/keyboards/keycapsss/kimiko/keymaps/default/keymap.c +++ b/keyboards/keycapsss/kimiko/keymaps/default/keymap.c @@ -321,12 +321,13 @@ void render_status_secondary(void) { render_space(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c index 714a5c80f4c..23821853629 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/default/keymap.c @@ -35,8 +35,9 @@ void keyboard_post_init_user(void) { // Rev3 and above only #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c index 0141676013f..540a735fc55 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/oled/keymap.c @@ -117,9 +117,10 @@ void oled_render_layer_state(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); oled_render_layer_state(); + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c index 673ea1c204c..7d48591cd2f 100644 --- a/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c +++ b/keyboards/keycapsss/plaid_pad/keymaps/via/keymap.c @@ -62,8 +62,9 @@ void keyboard_post_init_user(void) { // Rev3 and above only #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR("Plaid-Pad ///////////"), false); + return false; } #endif diff --git a/keyboards/keycapsss/plaid_pad/rules.mk b/keyboards/keycapsss/plaid_pad/rules.mk index cbbf17166ed..69b66129f3e 100644 --- a/keyboards/keycapsss/plaid_pad/rules.mk +++ b/keyboards/keycapsss/plaid_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keychron/q1/config.h b/keyboards/keychron/q1/config.h index 2a8665c1b45..149280161f2 100644 --- a/keyboards/keychron/q1/config.h +++ b/keyboards/keychron/q1/config.h @@ -46,18 +46,51 @@ /* NKRO */ #define FORCE_NKRO -/* Disable a single effect */ -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_HUE_BREATHING -#define DISABLE_RGB_MATRIX_HUE_PENDULUM -#define DISABLE_RGB_MATRIX_HUE_WAVE \ No newline at end of file +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// #define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +// #define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// #define ENABLE_RGB_MATRIX_HUE_BREATHING +// #define ENABLE_RGB_MATRIX_HUE_PENDULUM +// #define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_PIXEL_RAIN +// #define ENABLE_RGB_MATRIX_PIXEL_FLOW +// #define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/keychron/q1/rev_0100/rev_0100.c b/keyboards/keychron/q1/rev_0100/rev_0100.c index abc4f2716c9..f4246695279 100644 --- a/keyboards/keychron/q1/rev_0100/rev_0100.c +++ b/keyboards/keychron/q1/rev_0100/rev_0100.c @@ -17,7 +17,7 @@ #include "quantum.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q1/rev_0102/rev_0102.c b/keyboards/keychron/q1/rev_0102/rev_0102.c index 722284aaaf5..e8a2c85ae36 100644 --- a/keyboards/keychron/q1/rev_0102/rev_0102.c +++ b/keyboards/keychron/q1/rev_0102/rev_0102.c @@ -17,7 +17,7 @@ #include "quantum.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/keychron/q1/rev_0102/rules.mk b/keyboards/keychron/q1/rev_0102/rules.mk index 6b50d689d3b..978cae719e3 100644 --- a/keyboards/keychron/q1/rev_0102/rules.mk +++ b/keyboards/keychron/q1/rev_0102/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keyhive/maypad/rules.mk b/keyboards/keyhive/maypad/rules.mk index c683a6ed520..d3f521e4d9b 100644 --- a/keyboards/keyhive/maypad/rules.mk +++ b/keyboards/keyhive/maypad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/keyprez/bison/rules.mk b/keyboards/keyprez/bison/rules.mk index d212bb66010..6c618dc256f 100644 --- a/keyboards/keyprez/bison/rules.mk +++ b/keyboards/keyprez/bison/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keyprez/corgi/rules.mk b/keyboards/keyprez/corgi/rules.mk index d747921e916..baba7d9d862 100644 --- a/keyboards/keyprez/corgi/rules.mk +++ b/keyboards/keyprez/corgi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keyprez/rhino/rules.mk b/keyboards/keyprez/rhino/rules.mk index c1ccb1f755f..bd2c664b524 100644 --- a/keyboards/keyprez/rhino/rules.mk +++ b/keyboards/keyprez/rhino/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/keysofkings/twokey/rules.mk b/keyboards/keysofkings/twokey/rules.mk index a3df98d1176..349d9cda2d2 100755 --- a/keyboards/keysofkings/twokey/rules.mk +++ b/keyboards/keysofkings/twokey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kikoslab/kl90/keymaps/default/keymap.c b/keyboards/kikoslab/kl90/keymaps/default/keymap.c index 94ebe2633e4..4dbffe8f772 100644 --- a/keyboards/kikoslab/kl90/keymaps/default/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/default/keymap.c @@ -140,7 +140,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/kikoslab/kl90/keymaps/via/keymap.c b/keyboards/kikoslab/kl90/keymaps/via/keymap.c index 94ebe2633e4..4dbffe8f772 100644 --- a/keyboards/kikoslab/kl90/keymaps/via/keymap.c +++ b/keyboards/kikoslab/kl90/keymaps/via/keymap.c @@ -140,7 +140,8 @@ static void render_anim(void){ } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); + return false; } #endif diff --git a/keyboards/kikoslab/kl90/rules.mk b/keyboards/kikoslab/kl90/rules.mk index bffe97bc783..b28e4ce97ce 100644 --- a/keyboards/kikoslab/kl90/rules.mk +++ b/keyboards/kikoslab/kl90/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kindakeyboards/conone65/rules.mk b/keyboards/kindakeyboards/conone65/rules.mk index 771d29d0124..2cbe7eb385f 100644 --- a/keyboards/kindakeyboards/conone65/rules.mk +++ b/keyboards/kindakeyboards/conone65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/alvicstep/alvicstep.h b/keyboards/kinesis/alvicstep/alvicstep.h index 169012faf5c..053698770ab 100644 --- a/keyboards/kinesis/alvicstep/alvicstep.h +++ b/keyboards/kinesis/alvicstep/alvicstep.h @@ -1,80 +1,77 @@ -#ifndef KINESIS_ALVICSTEP_H -#define KINESIS_ALVICSTEP_H +#pragma once #include "../kinesis.h" #define ___ KC_NO -#define LAYOUT( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, \ - k80, k70, k60, k50, k40, k30, \ - k81, k71, k61, k51, k41, k31, \ - k82, k72, k62, k52, k42, k32, \ - k83, k73, k63, k53, k43, k33, \ - k74, k64, k54, k34, \ - k36, k35, \ - k55, \ - k56, k46, k75, \ - \ - k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k94, kA4, kB4, kD4, kE4, kF4, \ - k95, kA5, kB5, kD5, kE5, kF5, \ - k96, kA6, kB6, kD6, kE6, kF6, \ - k97, kA7, kB7, kD7, kE7, kF7, \ - k93, kB3, kD3, kE3, \ - k47, k66, \ - k67, \ - k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, \ + k80, k70, k60, k50, k40, k30, \ + k81, k71, k61, k51, k41, k31, \ + k82, k72, k62, k52, k42, k32, \ + k83, k73, k63, k53, k43, k33, \ + k74, k64, k54, k34, \ + k36, k35, \ + k55, \ + k56, k46, k75, \ +\ + k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k94, kA4, kB4, kD4, kE4, kF4, \ + k95, kA5, kB5, kD5, kE5, kF5, \ + k96, kA6, kB6, kD6, kE6, kF6, \ + k97, kA7, kB7, kD7, kE7, kF7, \ + k93, kB3, kD3, kE3, \ + k47, k66, \ + k67, \ + k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } -/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ -#define LAYOUT_pretty( \ - k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ - k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ - k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ - k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ - k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ - k74, k64, k54, k34, k93, kB3, kD3, kE3, \ - k36, k35, k47, k66, \ - k55, k67, \ - k56, k46, k75, k87, k76, k86 \ -) { \ - { k00, k01, k02, k03, k04, k05, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___, ___ }, \ - { k20, k21, k22, k23, k24, ___, ___, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36, ___ }, \ - { k40, k41, k42, k43, ___, ___, k46, k47 }, \ - { k50, k51, k52, k53, k54, k55, k56, ___ }, \ - { k60, k61, k62, k63, k64, ___, k66, k67 }, \ - { k70, k71, k72, k73, k74, k75, k76, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86, k87 }, \ - { ___, ___, ___, k93, k94, k95, k96, k97 }, \ - { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ - { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ - { ___, ___, ___, ___, ___, ___, ___, ___ }, \ - { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ - { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ - { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ +#define LAYOUT_pretty( \ + k02, k22, k12, k01, k21, k11, k00, k20, k10, k03, k23, k13, k04, k24, k14, k05, k85, k84, \ + k80, k70, k60, k50, k40, k30, k94, kA4, kB4, kD4, kE4, kF4, \ + k81, k71, k61, k51, k41, k31, k95, kA5, kB5, kD5, kE5, kF5, \ + k82, k72, k62, k52, k42, k32, k96, kA6, kB6, kD6, kE6, kF6, \ + k83, k73, k63, k53, k43, k33, k97, kA7, kB7, kD7, kE7, kF7, \ + k74, k64, k54, k34, k93, kB3, kD3, kE3, \ + k36, k35, k47, k66, \ + k55, k67, \ + k56, k46, k75, k87, k76, k86 \ +) { \ + { k00, k01, k02, k03, k04, k05, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___, ___ }, \ + { k20, k21, k22, k23, k24, ___, ___, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, ___ }, \ + { k40, k41, k42, k43, ___, ___, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, ___ }, \ + { k60, k61, k62, k63, k64, ___, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { ___, ___, ___, k93, k94, k95, k96, k97 }, \ + { ___, ___, ___, ___, kA4, kA5, kA6, kA7 }, \ + { ___, ___, ___, kB3, kB4, kB5, kB6, kB7 }, \ + { ___, ___, ___, ___, ___, ___, ___, ___ }, \ + { ___, ___, ___, kD3, kD4, kD5, kD6, kD7 }, \ + { ___, ___, ___, kE3, kE4, kE5, kE6, kE7 }, \ + { ___, ___, ___, ___, kF4, kF5, kF6, kF7 } \ } - /* Row pin configuration @@ -97,5 +94,3 @@ PB6 col6 | | | | LCtrl | Delete | Bksp | RCtrl | Enter | Space | H | J | K | | L | ;: | '" PB7 col7 | | | | | RGUI | | PageUp | | PageDn | N | M | ,< | | .> | /? | RShift */ - -#endif diff --git a/keyboards/kinesis/alvicstep/config.h b/keyboards/kinesis/alvicstep/config.h index 02c7725cecc..8a656264eef 100644 --- a/keyboards/kinesis/alvicstep/config.h +++ b/keyboards/kinesis/alvicstep/config.h @@ -1,5 +1,4 @@ -#ifndef ALVICSTEP_CONFIG_H -#define ALVICSTEP_CONFIG_H +#pragma once #include "../config.h" #include "config_common.h" @@ -31,6 +30,3 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - - -#endif diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index ecedf9bbffa..b04d325903b 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED @@ -78,5 +77,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kinesis/keymaps/default/keymap.c b/keyboards/kinesis/keymaps/default/keymap.c index 2d43aad077a..d46a07cacf9 100644 --- a/keyboards/kinesis/keymaps/default/keymap.c +++ b/keyboards/kinesis/keymaps/default/keymap.c @@ -40,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT, KC_HOME, KC_BSPC,KC_DEL ,KC_END , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, diff --git a/keyboards/kinesis/keymaps/default_pretty/keymap.c b/keyboards/kinesis/keymaps/default_pretty/keymap.c index 9c01b222a7e..94102a80676 100644 --- a/keyboards/kinesis/keymaps/default_pretty/keymap.c +++ b/keyboards/kinesis/keymaps/default_pretty/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [QWERTY] = LAYOUT_pretty( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, RESET, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, RESET, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, diff --git a/keyboards/kinesis/keymaps/dvorak/keymap.c b/keyboards/kinesis/keymaps/dvorak/keymap.c index 3c532628ef1..6f4d63a7d4f 100644 --- a/keyboards/kinesis/keymaps/dvorak/keymap.c +++ b/keyboards/kinesis/keymaps/dvorak/keymap.c @@ -17,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_FN0, RESET, + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, RESET, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_BSLS, diff --git a/keyboards/kinesis/keymaps/stapelberg/keymap.c b/keyboards/kinesis/keymaps/stapelberg/keymap.c index c62ffbbccf2..d7a0a5e5c23 100644 --- a/keyboards/kinesis/keymaps/stapelberg/keymap.c +++ b/keyboards/kinesis/keymaps/stapelberg/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL,KC_LALT, KC_LGUI, KC_BSPC,KC_ESC ,KC_END , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_FN0, RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR ,KC_SLCK ,KC_PAUS, KC_NO, RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_MINS, KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_BSLS, KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN,KC_QUOT, diff --git a/keyboards/kinesis/keymaps/tw1t611/keymap.c b/keyboards/kinesis/keymaps/tw1t611/keymap.c index c94f06bbb96..e7a6ffd6e90 100644 --- a/keyboards/kinesis/keymaps/tw1t611/keymap.c +++ b/keyboards/kinesis/keymaps/tw1t611/keymap.c @@ -15,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RCTL,KC_LALT, KC_HOME, KC_SPC ,KC_LSFT,KC_BSPC , - KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_FN0 ,RESET, + KC_F9 ,KC_F10 ,KC_F11 ,KC_F12 ,KC_PSCR,KC_SLCK,KC_PAUS,KC_NO ,RESET, KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,DE_SS , KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,DE_ADIA, KC_H ,KC_J ,KC_K ,KC_L ,DE_SLSH,DE_ODIA, diff --git a/keyboards/kinesis/kinesis.h b/keyboards/kinesis/kinesis.h index 1635c344369..54cf6b81a7f 100644 --- a/keyboards/kinesis/kinesis.h +++ b/keyboards/kinesis/kinesis.h @@ -1,35 +1,24 @@ -#ifndef KINESIS_H -#define KINESIS_H +#pragma once -#ifdef KEYBOARD_kinesis_alvicstep - #include "alvicstep.h" -#endif -#ifdef KEYBOARD_kinesis_stapelberg - #include "stapelberg.h" -#endif -#ifdef KEYBOARD_kinesis_kint2pp - #include "kint2pp.h" -#endif -#ifdef KEYBOARD_kinesis_nguyenvietyen - #include "nguyenvietyen.h" -#endif -#ifdef KEYBOARD_kinesis_kint36 - #include "kint36.h" -#endif -#ifdef KEYBOARD_kinesis_kint41 - #include "kint41.h" +#if defined(KEYBOARD_kinesis_alvicstep) +# include "alvicstep.h" +#elif defined(KEYBOARD_kinesis_stapelberg) +# include "stapelberg.h" +#elif defined(KEYBOARD_kinesis_kint2pp) +# include "kint2pp.h" +#elif defined(KEYBOARD_kinesis_nguyenvietyen) +# include "nguyenvietyen.h" +#elif defined(KEYBOARD_kinesis_kint36) +# include "kint36.h" +#elif defined(KEYBOARD_kinesis_kint41) +# include "kint41.h" #endif #include "quantum.h" - void all_led_off(void); void all_led_on(void); void num_lock_led_on(void); void caps_lock_led_on(void); void scroll_lock_led_on(void); void keypad_led_on(void); - - - -#endif diff --git a/keyboards/kinesis/kint2pp/config.h b/keyboards/kinesis/kint2pp/config.h index a5530bc2f74..4191446e685 100644 --- a/keyboards/kinesis/kint2pp/config.h +++ b/keyboards/kinesis/kint2pp/config.h @@ -44,3 +44,7 @@ // Reduce input latency by lowering the USB polling interval // from its 10ms default to the 1ms minimum that USB 1.x (Full Speed) allows: #define USB_POLLING_INTERVAL_MS 1 + +// The Teensy 2++ consumes about 60 mA of current at its full speed of 16 MHz as +// per https://www.pjrc.com/teensy/low_power.html +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/kinesis/kint36/config.h b/keyboards/kinesis/kint36/config.h index ab34daa7b80..3738629ea7e 100644 --- a/keyboards/kinesis/kint36/config.h +++ b/keyboards/kinesis/kint36/config.h @@ -63,6 +63,10 @@ // from its 10ms default to the 1ms minimum that USB 1.x (Full Speed) allows: #define USB_POLLING_INTERVAL_MS 1 +// The Teensy 3.6 consumes about 80 mA of current at its full speed of 180 MHz: +// https://forum.pjrc.com/threads/47256-What-is-the-power-consumption-of-the-Teensy-3-6 +#define USB_MAX_POWER_CONSUMPTION 100 + #define LED_PIN_ON_STATE 0 #define LED_NUM_LOCK_PIN A14 #define LED_CAPS_LOCK_PIN C7 diff --git a/keyboards/kinesis/kint36/rules.mk b/keyboards/kinesis/kint36/rules.mk index 4f33583124d..c50225ad8a0 100644 --- a/keyboards/kinesis/kint36/rules.mk +++ b/keyboards/kinesis/kint36/rules.mk @@ -1,5 +1,5 @@ -BOARD = PJRC_TEENSY_3_6 -MCU = MK66F18 +# MCU name +MCU = MK66FX1M0 # Debounce eagerly (report change immediately), keep per-key timers. We can use # this because the kinT does not have to deal with noise. diff --git a/keyboards/kinesis/kint41/config.h b/keyboards/kinesis/kint41/config.h index 349d3ee3641..7d87b8dd765 100644 --- a/keyboards/kinesis/kint41/config.h +++ b/keyboards/kinesis/kint41/config.h @@ -90,6 +90,10 @@ // from its 10ms default to the 125μs minimum that USB 2.x (High Speed) allows: #define USB_POLLING_INTERVAL_MS 1 +// The Teensy 4.1 consumes about 100 mA of current at its full speed of 600 MHz +// as per https://www.pjrc.com/store/teensy41.html +#define USB_MAX_POWER_CONSUMPTION 100 + /* We use the i.MX RT1060 high-speed GPIOs (GPIO6-9) which are connected to the * AHB bus (AHB_CLK_ROOT), which runs at the same speed as the ARM Core Clock, * i.e. 600 MHz. See MIMXRT1062, page 949, 12.1 Chip-specific GPIO information. diff --git a/keyboards/kinesis/nguyenvietyen/rules.mk b/keyboards/kinesis/nguyenvietyen/rules.mk index 8ed5c746f27..855c7072a50 100644 --- a/keyboards/kinesis/nguyenvietyen/rules.mk +++ b/keyboards/kinesis/nguyenvietyen/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes COMMAND_ENABLE = yes diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk index 9722f130469..4bfe9bc0fdd 100644 --- a/keyboards/kinesis/rules.mk +++ b/keyboards/kinesis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 8f920c19c1b..fe44131adbf 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -1,5 +1,4 @@ -#ifndef STAPELBERG_CONFIG_H -#define STAPELBERG_CONFIG_H +#pragma once #include "../config.h" #include "config_common.h" @@ -46,5 +45,3 @@ */ #define IGNORE_MOD_TAP_INTERRUPT - -#endif diff --git a/keyboards/kinesis/stapelberg/stapelberg.h b/keyboards/kinesis/stapelberg/stapelberg.h index e35e2f5db80..f478c493fde 100644 --- a/keyboards/kinesis/stapelberg/stapelberg.h +++ b/keyboards/kinesis/stapelberg/stapelberg.h @@ -1,5 +1,4 @@ -#ifndef KINESIS_STAPELBERG_H -#define KINESIS_STAPELBERG_H +#pragma once #include "quantum.h" @@ -9,71 +8,70 @@ // The first section contains all of the arguments as on the physical keyboard // The second converts the arguments into the 2-D scanned array -#define LAYOUT( \ - kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ - k00, k10, k20, k30, k40, k50, \ - k01, k11, k21, k31, k41, k51, \ - k02, k12, k22, k32, k42, k52, \ - k03, k13, k23, k33, k43, k53, \ - k14, k24, k34, k54, \ - k56, k55, \ - k35, \ - k36, k46, k25, \ - \ - kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ - k60, k70, k80, k90, kA0, kB0, \ - k61, k71, k81, k91, kA1, kB1, \ - k62, k72, k82, k92, kA2, kB2, \ - k63, k73, k83, k93, kA3, kB3, \ - k64, k84, k94, kA4, \ - k96, k85, \ - k86, \ - k66, k75, k65 \ -) { \ - { k00, k01, k02, k03, ___, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___ }, \ - { k20, k21, k22, k23, k24, k25, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36 }, \ - { k40, k41, k42, k43, ___, ___, k46 }, \ - { k50, k51, k52, k53, k54, k55, k56 }, \ - { k60, k61, k62, k63, k64, k65, k66 }, \ - { k70, k71, k72, k73, ___, k75, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86 }, \ - { k90, k91, k92, k93, k94, ___, k96 }, \ - { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ - { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ - { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ - { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ - { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +#define LAYOUT( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, \ + k00, k10, k20, k30, k40, k50, \ + k01, k11, k21, k31, k41, k51, \ + k02, k12, k22, k32, k42, k52, \ + k03, k13, k23, k33, k43, k53, \ + k14, k24, k34, k54, \ + k56, k55, \ + k35, \ + k36, k46, k25, \ +\ + kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k60, k70, k80, k90, kA0, kB0, \ + k61, k71, k81, k91, kA1, kB1, \ + k62, k72, k82, k92, kA2, kB2, \ + k63, k73, k83, k93, kA3, kB3, \ + k64, k84, k94, kA4, \ + k96, k85, \ + k86, \ + k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ } -/* ---------------- LEFT HAND ----------------- ---------------- RIGHT HAND ---------------- */ -#define LAYOUT_pretty( \ - kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ - k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ - k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ - k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ - k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ - k14, k24, k34, k54, k64, k84, k94, kA4, \ - k56, k55, k96, k85, \ - k35, k86, \ - k36, k46, k25, k66, k75, k65 \ -) { \ - { k00, k01, k02, k03, ___, ___, ___ }, \ - { k10, k11, k12, k13, k14, ___, ___ }, \ - { k20, k21, k22, k23, k24, k25, ___ }, \ - { k30, k31, k32, k33, k34, k35, k36 }, \ - { k40, k41, k42, k43, ___, ___, k46 }, \ - { k50, k51, k52, k53, k54, k55, k56 }, \ - { k60, k61, k62, k63, k64, k65, k66 }, \ - { k70, k71, k72, k73, ___, k75, ___ }, \ - { k80, k81, k82, k83, k84, k85, k86 }, \ - { k90, k91, k92, k93, k94, ___, k96 }, \ - { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ - { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ - { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ - { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ - { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ +#define LAYOUT_pretty( \ + kC0, kD0, kE0, kC1, kD1, kE1, kC2, kD2, kE2, kC3, kD3, kE3, kC4, kD4, kE4, kC5, kE5, kD5, \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, kA0, kB0, \ + k01, k11, k21, k31, k41, k51, k61, k71, k81, k91, kA1, kB1, \ + k02, k12, k22, k32, k42, k52, k62, k72, k82, k92, kA2, kB2, \ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, kA3, kB3, \ + k14, k24, k34, k54, k64, k84, k94, kA4, \ + k56, k55, k96, k85, \ + k35, k86, \ + k36, k46, k25, k66, k75, k65 \ +) { \ + { k00, k01, k02, k03, ___, ___, ___ }, \ + { k10, k11, k12, k13, k14, ___, ___ }, \ + { k20, k21, k22, k23, k24, k25, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36 }, \ + { k40, k41, k42, k43, ___, ___, k46 }, \ + { k50, k51, k52, k53, k54, k55, k56 }, \ + { k60, k61, k62, k63, k64, k65, k66 }, \ + { k70, k71, k72, k73, ___, k75, ___ }, \ + { k80, k81, k82, k83, k84, k85, k86 }, \ + { k90, k91, k92, k93, k94, ___, k96 }, \ + { kA0, kA1, kA2, kA3, kA4, ___, ___ }, \ + { kB0, kB1, kB2, kB3, ___, ___, ___ }, \ + { kC0, kC1, kC2, kC3, kC4, kC5, ___ }, \ + { kD0, kD1, kD2, kD3, kD4, kD5, ___ }, \ + { kE0, kE1, kE2, kE3, kE4, kE5, ___ } \ } /* @@ -98,7 +96,3 @@ PC4 kCx Row: ESC F3 F6 F9 F12 PAU -- PC5 kDx Row: F1 F4 F7 F10 PRT PRG -- PC6 kEx Row: F2 F5 F8 F11 SLK KEY -- */ - - - -#endif diff --git a/keyboards/kineticlabs/emu/hotswap/rules.mk b/keyboards/kineticlabs/emu/hotswap/rules.mk index 3a82957bc5f..fdb80970238 100644 --- a/keyboards/kineticlabs/emu/hotswap/rules.mk +++ b/keyboards/kineticlabs/emu/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kineticlabs/emu/soldered/rules.mk b/keyboards/kineticlabs/emu/soldered/rules.mk index 3a82957bc5f..fdb80970238 100644 --- a/keyboards/kineticlabs/emu/soldered/rules.mk +++ b/keyboards/kineticlabs/emu/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/ave/ortho/rules.mk b/keyboards/kingly_keys/ave/ortho/rules.mk index 20f10e5c10a..c28edc9134e 100644 --- a/keyboards/kingly_keys/ave/ortho/rules.mk +++ b/keyboards/kingly_keys/ave/ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/ave/staggered/rules.mk b/keyboards/kingly_keys/ave/staggered/rules.mk index 20f10e5c10a..c28edc9134e 100644 --- a/keyboards/kingly_keys/ave/staggered/rules.mk +++ b/keyboards/kingly_keys/ave/staggered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/little_foot/rules.mk b/keyboards/kingly_keys/little_foot/rules.mk index d87f7b62c30..cec5dfeebd6 100644 --- a/keyboards/kingly_keys/little_foot/rules.mk +++ b/keyboards/kingly_keys/little_foot/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c index 45e83f76117..6acb55dd53c 100755 --- a/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c +++ b/keyboards/kingly_keys/romac/keymaps/boss566y/keymap.c @@ -76,7 +76,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status sprintf(oled_layer,"Layer\nL: %d\n",get_highest_layer(layer_state)); oled_write(oled_layer,false); @@ -86,5 +86,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCRLK") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/kingly_keys/romac/rules.mk b/keyboards/kingly_keys/romac/rules.mk index 434a6774294..35998c3695f 100644 --- a/keyboards/kingly_keys/romac/rules.mk +++ b/keyboards/kingly_keys/romac/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c index 29262b8c38b..62c2349150a 100644 --- a/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c +++ b/keyboards/kingly_keys/romac_plus/keymaps/default/keymap.c @@ -41,7 +41,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Let's\nbuild\nsome-\nthing\nto-\nget-\nher!"), false); switch (get_highest_layer(layer_state)) { @@ -61,5 +61,7 @@ void oled_task_user(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_NUM_LOCK) ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(IS_LED_ON(led_usb_state, USB_LED_CAPS_LOCK) ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLK") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/kingly_keys/romac_plus/rules.mk b/keyboards/kingly_keys/romac_plus/rules.mk index a50b64bc444..a51db094131 100644 --- a/keyboards/kingly_keys/romac_plus/rules.mk +++ b/keyboards/kingly_keys/romac_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/kingly_keys/ropro/rules.mk b/keyboards/kingly_keys/ropro/rules.mk index dec33ae42e5..5392807b8c6 100644 --- a/keyboards/kingly_keys/ropro/rules.mk +++ b/keyboards/kingly_keys/ropro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kingly_keys/soap/rules.mk b/keyboards/kingly_keys/soap/rules.mk index 71a2905f09d..da53cdc791f 100644 --- a/keyboards/kingly_keys/soap/rules.mk +++ b/keyboards/kingly_keys/soap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index db42c36cc32..373c3e4f0b1 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -115,5 +114,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kira75/kira75.h b/keyboards/kira75/kira75.h index 8c564f20826..27fdab02db6 100644 --- a/keyboards/kira75/kira75.h +++ b/keyboards/kira75/kira75.h @@ -13,11 +13,10 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KIRA75_H -#define KIRA75_H -#include "quantum.h" +#pragma once +#include "quantum.h" // Functions for setting LEDs on toggle keys inline void caps_led_on(void) { DDRD |= (1<<7); PORTD &= ~(1<<7); } @@ -26,25 +25,24 @@ inline void caps_led_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); } inline void num_led_on(void) { DDRD |= (1<<6); PORTD &= ~(1<<6); } inline void num_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +#define XXX KC_NO + // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ - K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \ - K50, K51, K53, K56, K5A, K5B, K5D, K5E, K5F \ -) \ -{ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ - { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ - { K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, KC_NO, K5D, K5E, K5F } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4D, k4E, k4F, \ + k50, k51, k53, k56, k5A, k5B, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { XXX, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, k4E, k4F }, \ + { k50, k51, XXX, k53, XXX, XXX, k56, XXX, XXX, XXX, k5A, k5B, XXX, k5D, k5E, k5F } \ } - -#endif diff --git a/keyboards/kiwikeebs/macro/rules.mk b/keyboards/kiwikeebs/macro/rules.mk index 6afb83d80ad..563e7df2f85 100644 --- a/keyboards/kiwikeebs/macro/rules.mk +++ b/keyboards/kiwikeebs/macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikeebs/macro_v2/rules.mk b/keyboards/kiwikeebs/macro_v2/rules.mk index 41aae09aab9..d0f092d210c 100644 --- a/keyboards/kiwikeebs/macro_v2/rules.mk +++ b/keyboards/kiwikeebs/macro_v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikey/kawii9/rules.mk b/keyboards/kiwikey/kawii9/rules.mk index 04023c3f9e8..299206df1e5 100644 --- a/keyboards/kiwikey/kawii9/rules.mk +++ b/keyboards/kiwikey/kawii9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c index de683e641b2..c535306afc9 100644 --- a/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c +++ b/keyboards/kiwikey/wanderland/keymaps/stanrc85/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { static const char PROGMEM qmk_logo[] = { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, @@ -81,5 +81,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/kiwikey/wanderland/rules.mk b/keyboards/kiwikey/wanderland/rules.mk index dbdd2741233..1a2408fb701 100644 --- a/keyboards/kiwikey/wanderland/rules.mk +++ b/keyboards/kiwikey/wanderland/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kmac/rules.mk b/keyboards/kmac/rules.mk index 517218cde52..6a980556b92 100644 --- a/keyboards/kmac/rules.mk +++ b/keyboards/kmac/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kmac_pad/rules.mk b/keyboards/kmac_pad/rules.mk index 3761da69e62..90547999b3c 100644 --- a/keyboards/kmac_pad/rules.mk +++ b/keyboards/kmac_pad/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index a0592b4ecfa..c242aff0d05 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H + +#pragma once #include "config_common.h" @@ -48,5 +48,3 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 - -#endif diff --git a/keyboards/kmini/kmini.h b/keyboards/kmini/kmini.h index 3d54c39d1f8..e32ad5a0f9f 100755 --- a/keyboards/kmini/kmini.h +++ b/keyboards/kmini/kmini.h @@ -13,24 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KMINI_H -#define KMINI_H -#define ___ KC_NO + +#pragma once #include "quantum.h" +#define ___ KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, \ - K40, K41, K42, K43, K44, K47, K4C, K4E, K4F, K4G \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, \ + k40, k41, k42, k43, k44, k47, k4C, k4E, k4F, k4G \ ) { \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G}, \ - {K40, K41, K42, K43, K44, ___, ___, K47, ___, ___, ___, ___, K4C, ___, K4E, K4F, K4G}, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ + { k40, k41, k42, k43, k44, ___, ___, k47, ___, ___, ___, ___, k4C, ___, k4E, k4F, k4G } \ } - -#endif diff --git a/keyboards/kmini/rules.mk b/keyboards/kmini/rules.mk index 1b67bd5ddef..4680be20bdb 100755 --- a/keyboards/kmini/rules.mk +++ b/keyboards/kmini/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/knobgoblin/keymaps/moults31/keymap.c b/keyboards/knobgoblin/keymaps/moults31/keymap.c index 16830bc98da..20dda4ccd07 100644 --- a/keyboards/knobgoblin/keymaps/moults31/keymap.c +++ b/keyboards/knobgoblin/keymaps/moults31/keymap.c @@ -141,7 +141,7 @@ static void render_goblin_logo(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_goblin_logo(); @@ -167,4 +167,5 @@ void oled_task_user(void) { oled_write_P(PSTR(" NONE\n"), false); break; } + return false; } diff --git a/keyboards/knobgoblin/knobgoblin.c b/keyboards/knobgoblin/knobgoblin.c index 7349a319957..fcf86a3a409 100644 --- a/keyboards/knobgoblin/knobgoblin.c +++ b/keyboards/knobgoblin/knobgoblin.c @@ -40,7 +40,9 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #ifdef OLED_ENABLE /* rotate screen for proper orentation*/ -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; +} /* byte map for the goblin logo, knob goblin text, and level text */ static void render_goblin_logo(void) { @@ -72,7 +74,10 @@ static void render_goblin_logo(void) { } /* text display for layer indication */ -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } render_goblin_logo(); @@ -99,5 +104,6 @@ __attribute__((weak)) void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/knobgoblin/rules.mk b/keyboards/knobgoblin/rules.mk index be3660b23d0..823324e78c3 100644 --- a/keyboards/knobgoblin/rules.mk +++ b/keyboards/knobgoblin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 28db6ae8d96..eca8b8b4a89 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -106,5 +105,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/knops/mini/mini.h b/keyboards/knops/mini/mini.h index e2d6c546b07..e028dea6d7a 100644 --- a/keyboards/knops/mini/mini.h +++ b/keyboards/knops/mini/mini.h @@ -13,18 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + #include "quantum.h" -#ifndef KNOPS_MINI_H -#define KNOPS_MINI_H +#pragma once // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT( \ - K00, K01, K02, K03, K04, K05 \ + k00, k01, k02, k03, k04, k05 \ ) { \ - { K00, K01, K02, K03, K04, K05 }, \ + { k00, k01, k02, k03, k04, k05 } \ } -#endif \ No newline at end of file diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index 1a99fa12655..c6dc3a03181 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -105,5 +104,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/ansi/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_split/rules.mk b/keyboards/kona_classic/keymaps/ansi_split/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/default/rules.mk b/keyboards/kona_classic/keymaps/default/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/default/rules.mk +++ b/keyboards/kona_classic/keymaps/default/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso/rules.mk b/keyboards/kona_classic/keymaps/iso/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/iso/rules.mk +++ b/keyboards/kona_classic/keymaps/iso/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_split/rules.mk b/keyboards/kona_classic/keymaps/iso_split/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/iso_split/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk index 621b6749cdc..27cf4affcdc 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kona_classic/kona_classic.h b/keyboards/kona_classic/kona_classic.h index 98eed3b3c2a..66757fc9c41 100644 --- a/keyboards/kona_classic/kona_classic.h +++ b/keyboards/kona_classic/kona_classic.h @@ -13,139 +13,136 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KONACLASSIC_H -#define KONACLASSIC_H + +#pragma once #include "quantum.h" // readability #define ___ KC_NO - #define LAYOUT_all( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_ansi( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_ansi_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_ansi_split( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_ansi_split_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, ___, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_iso_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k48, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, ___, ___, k48, ___, ___, k4B, k4C, k4D, k4E, k4F } \ } #define LAYOUT_iso_split( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___ }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, ___, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, ___, k4E, k4F } \ } #define LAYOUT_iso_split_arrows( \ - KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ - KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - KA8, KA9, K40, K41, K42, K44, K46, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k41, k42, k43, k44, k46, k48, k49, k4B, k4C, k4D, k4E, k4F \ ) { \ - { KA0, KA1, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { KA2, KA3, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { KA4, KA5, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, ___ }, \ - { KA6, KA7, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { KA8, KA9, K40, K41, K42, ___, K44, ___, K46, K47, ___, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, ___, k4B, k4C, k4D, k4E, k4F } \ } - -#endif diff --git a/keyboards/kopibeng/xt65/rules.mk b/keyboards/kopibeng/xt65/rules.mk index ade3865832e..d6b0bdad95f 100644 --- a/keyboards/kopibeng/xt65/rules.mk +++ b/keyboards/kopibeng/xt65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kprepublic/bm16a/rules.mk b/keyboards/kprepublic/bm16a/rules.mk index e84abc2a428..603dcc54f38 100644 --- a/keyboards/kprepublic/bm16a/rules.mk +++ b/keyboards/kprepublic/bm16a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kprepublic/bm16s/rules.mk b/keyboards/kprepublic/bm16s/rules.mk index 0ed51b71aff..f1be2bad13c 100755 --- a/keyboards/kprepublic/bm16s/rules.mk +++ b/keyboards/kprepublic/bm16s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kprepublic/bm40hsrgb/config.h b/keyboards/kprepublic/bm40hsrgb/config.h index 554927a4965..8790de8a7b6 100755 --- a/keyboards/kprepublic/bm40hsrgb/config.h +++ b/keyboards/kprepublic/bm40hsrgb/config.h @@ -54,4 +54,52 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h index 9047c260d15..b38e4b8fc67 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/config.h @@ -1,18 +1,18 @@ #pragma once /* Copyright 2021 Gabriel Bustamante Toledo - * - * 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 . + * + * 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 . */ // default but used in macros @@ -66,26 +66,26 @@ #ifdef RGB_MATRIX_ENABLE -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#undef RGB_MATRIX_STARTUP_MODE +# undef RGB_MATRIX_STARTUP_MODE -#define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_HUE_STEP 20 -#endif \ No newline at end of file +#endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md index 40ad85b700d..7540bc56bf9 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/readme.md @@ -4,13 +4,13 @@ - Compile: - `qmk compile -kb bm40hsrgb -km gabustoledo` + `qmk compile -kb kprepublic/bm40hsrgb -km gabustoledo` ### Flash - Flash: - `qmk flash -kb bm40hsrgb -km gabustoledo` + `qmk flash -kb kprepublic/bm40hsrgb -km gabustoledo` # Layout diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk index f9a7c779012..6e27e2f5237 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/gabustoledo/rules.mk @@ -2,4 +2,4 @@ MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control AUTO_SHIFT_ENABLE = yes # Auto Shift TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = yes \ No newline at end of file +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite \ No newline at end of file diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h index 9fcddca2cb9..2b0d0961c42 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/config.h @@ -36,45 +36,45 @@ //-------------------------------------------------------------------------------------------------------- //disable broken animations -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -//#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -//#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -//#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -//#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -//#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE -//#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -//#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -//#define DISABLE_RGB_MATRIX_SPLASH -//#define DISABLE_RGB_MATRIX_MULTISPLASH -//#define DISABLE_RGB_MATRIX_SOLID_SPLASH -//#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +//#undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +//#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +//#undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE +//#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +//#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +//#undef ENABLE_RGB_MATRIX_SPLASH +//#undef ENABLE_RGB_MATRIX_MULTISPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#undef RGB_MATRIX_STARTUP_MODE +# undef RGB_MATRIX_STARTUP_MODE -#define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_HUE_STEP 20 #endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md index 938803c2682..97c09be2552 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/readme.md @@ -30,11 +30,11 @@ Sigma Squared modifies on **Miryoku** in the following ways: - to directly flash to board: - `qmk flash -kb bm40hsrgb -km signynt` + `qmk flash -kb kprepublic/bm40hsrgb -km signynt` - to only compile: - `qmk compile -kb bm40hsrgb -km signynt` + `qmk compile -kb kprepublic/bm40hsrgb -km signynt` diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk index 73ac4823d4d..754f3f1f708 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt/rules.mk @@ -1,7 +1,7 @@ #rules MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control TAP_DANCE_ENABLE = yes #RGB_MATRIX_ENABLE = no diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h index 7cfbf0fde48..d39f6b95c80 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/config.h @@ -36,45 +36,45 @@ //-------------------------------------------------------------------------------------------------------- //disable broken animations -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -//#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -//#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -//#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -//#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -//#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE -//#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -//#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -//#define DISABLE_RGB_MATRIX_SPLASH -//#define DISABLE_RGB_MATRIX_MULTISPLASH -//#define DISABLE_RGB_MATRIX_SOLID_SPLASH -//#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +//#undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +//#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +//#undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE +//#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +//#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +//#undef ENABLE_RGB_MATRIX_SPLASH +//#undef ENABLE_RGB_MATRIX_MULTISPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#undef RGB_MATRIX_STARTUP_MODE +# undef RGB_MATRIX_STARTUP_MODE -#define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_HUE_STEP 20 #endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md index 938803c2682..97c09be2552 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/readme.md @@ -30,11 +30,11 @@ Sigma Squared modifies on **Miryoku** in the following ways: - to directly flash to board: - `qmk flash -kb bm40hsrgb -km signynt` + `qmk flash -kb kprepublic/bm40hsrgb -km signynt` - to only compile: - `qmk compile -kb bm40hsrgb -km signynt` + `qmk compile -kb kprepublic/bm40hsrgb -km signynt` diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk index 73ac4823d4d..754f3f1f708 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_loud/rules.mk @@ -1,7 +1,7 @@ #rules MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control TAP_DANCE_ENABLE = yes #RGB_MATRIX_ENABLE = no diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h index 4dd37189a92..a4634c581ee 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/config.h @@ -36,45 +36,45 @@ //-------------------------------------------------------------------------------------------------------- //disable broken animations -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -//#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -//#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -//#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -//#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -//#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE -//#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -//#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -//#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -//#define DISABLE_RGB_MATRIX_SPLASH -//#define DISABLE_RGB_MATRIX_MULTISPLASH -//#define DISABLE_RGB_MATRIX_SOLID_SPLASH -//#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +//#undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +//#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +//#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +//#undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // DO NOT ENABLE +//#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +//#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +//#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +//#undef ENABLE_RGB_MATRIX_SPLASH +//#undef ENABLE_RGB_MATRIX_MULTISPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +//#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#undef RGB_MATRIX_STARTUP_MODE +# undef RGB_MATRIX_STARTUP_MODE -#define RGBLIGHT_HUE_STEP 20 +# define RGBLIGHT_HUE_STEP 20 #endif diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md index 938803c2682..97c09be2552 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/readme.md @@ -30,11 +30,11 @@ Sigma Squared modifies on **Miryoku** in the following ways: - to directly flash to board: - `qmk flash -kb bm40hsrgb -km signynt` + `qmk flash -kb kprepublic/bm40hsrgb -km signynt` - to only compile: - `qmk compile -kb bm40hsrgb -km signynt` + `qmk compile -kb kprepublic/bm40hsrgb -km signynt` diff --git a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk index 73ac4823d4d..754f3f1f708 100644 --- a/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/keymaps/signynt_2_quiet/rules.mk @@ -1,7 +1,7 @@ #rules MOUSEKEY_ENABLE = yes # Mouse keys -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control TAP_DANCE_ENABLE = yes #RGB_MATRIX_ENABLE = no diff --git a/keyboards/kprepublic/bm40hsrgb/rules.mk b/keyboards/kprepublic/bm40hsrgb/rules.mk index ced30614baf..8f49a45d236 100755 --- a/keyboards/kprepublic/bm40hsrgb/rules.mk +++ b/keyboards/kprepublic/bm40hsrgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md b/keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md index 56d0823d19b..1cb87d6ec25 100644 --- a/keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md +++ b/keyboards/kprepublic/bm43a/keymaps/stevexyz/readme.md @@ -19,7 +19,7 @@ And a view on the actual build: ![layout](https://raw.githubusercontent.com/stevexyz/qmk_firmware/master/keyboards/bm43a/keymaps/stevexyz/actualbuild.jpeg) -In order to compile the module from qmk root directory use the command 'make bm43a:stevexyz' +In order to compile the module from qmk root directory use the command 'make kprepublic/bm43a:stevexyz' -And in order to upload the new firmware use the command: 'qmk flash -kb bm43a -km stevexyz' (you can initiate programming with keyboard RESET key, that in this keymap has been moved on the backspace button in the "lights" layer) +And in order to upload the new firmware use the command: 'qmk flash -kb kprepublic/bm43a -km stevexyz' (you can initiate programming with keyboard RESET key, that in this keymap has been moved on the backspace button in the "lights" layer) diff --git a/keyboards/kprepublic/bm43a/rules.mk b/keyboards/kprepublic/bm43a/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/kprepublic/bm43a/rules.mk +++ b/keyboards/kprepublic/bm43a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kprepublic/bm60rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60hsrgb/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm60rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm60hsrgb/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm60hsrgb/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/keymap.c b/keyboards/kprepublic/bm60hsrgb/keymaps/jbradforddillon/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/keymap.c rename to keyboards/kprepublic/bm60hsrgb/keymaps/jbradforddillon/keymap.c diff --git a/keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/readme.md b/keyboards/kprepublic/bm60hsrgb/keymaps/jbradforddillon/readme.md similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/jbradforddillon/readme.md rename to keyboards/kprepublic/bm60hsrgb/keymaps/jbradforddillon/readme.md diff --git a/keyboards/kprepublic/bm60rgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm60hsrgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm60hsrgb/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm60rgb/keymaps/via/readme.md b/keyboards/kprepublic/bm60hsrgb/keymaps/via/readme.md similarity index 100% rename from keyboards/kprepublic/bm60rgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm60hsrgb/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm60hsrgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm60hsrgb/keymaps/via/rules.mk new file mode 100644 index 00000000000..036bd6d1c3e --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kprepublic/bm60hsrgb/readme.md b/keyboards/kprepublic/bm60hsrgb/readme.md new file mode 100644 index 00000000000..bbb6ba45a17 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/readme.md @@ -0,0 +1,13 @@ +# BM60HSRGB + +A 60% hotswap inswitch RGB keyboard from KP Republic. + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: BM60HSRGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60hsrgb/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/config.h b/keyboards/kprepublic/bm60hsrgb/rev1/config.h new file mode 100644 index 00000000000..b8f002dca60 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/rev1/config.h @@ -0,0 +1,107 @@ +/* +Copyright 2020 MechMerlin + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8C +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60HSRGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 69 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 69 +# define RGB_MATRIX_KEYPRESSES +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/info.json b/keyboards/kprepublic/bm60hsrgb/rev1/info.json new file mode 100644 index 00000000000..a5fb20a0088 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/rev1/info.json @@ -0,0 +1,77 @@ +{ + "keyboard_name": "BM60HSRGB", + "url": "", + "maintainer": "qmk", + "layout_aliases": { + "LAYOUT": "LAYOUT_60_ansi_arrow" + }, + "layouts": { + "LAYOUT_60_ansi_arrow": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, + {"label":"K3C (B3,C7)", "x":13, "y":3}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4B (E6,C6)", "x":12, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c new file mode 100644 index 00000000000..352118c1b1e --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/rev1/rev1.c @@ -0,0 +1,50 @@ +/* Copyright 2020 MechMerlin + * + * 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 . + */ +#include "rev1.h" + +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, + { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; diff --git a/keyboards/kprepublic/bm60rgb/bm60rgb.h b/keyboards/kprepublic/bm60hsrgb/rev1/rev1.h similarity index 100% rename from keyboards/kprepublic/bm60rgb/bm60rgb.h rename to keyboards/kprepublic/bm60hsrgb/rev1/rev1.h diff --git a/keyboards/kprepublic/bm60hsrgb/rev1/rules.mk b/keyboards/kprepublic/bm60hsrgb/rev1/rules.mk new file mode 100644 index 00000000000..7202056f31f --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb/rev1/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 60_ansi_arrow diff --git a/keyboards/kprepublic/bm60rgb_iso/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60hsrgb_iso/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm60rgb_iso/keymaps/default/readme.md b/keyboards/kprepublic/bm60hsrgb_iso/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/keymaps/default/readme.md rename to keyboards/kprepublic/bm60hsrgb_iso/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h b/keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/config.h similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/config.h rename to keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/config.h diff --git a/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c b/keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/keymap.c rename to keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/keymap.c diff --git a/keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md b/keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/readme.md similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/keymaps/iso_nordic_sleepmode/readme.md rename to keyboards/kprepublic/bm60hsrgb_iso/keymaps/iso_nordic_sleepmode/readme.md diff --git a/keyboards/kprepublic/bm60hsrgb_iso/readme.md b/keyboards/kprepublic/bm60hsrgb_iso/readme.md new file mode 100644 index 00000000000..5cef32cbeb1 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/readme.md @@ -0,0 +1,19 @@ +# BM60HSRGB_ISO + +![BM60HSRGB_ISO](https://i.imgur.com/i3gk2vql.jpg) + +A 60% ISO hotswap inswitch RGB keyboard. + +* Keyboard Maintainer: [markva](https://github.com/markva) +* Hardware Supported: BM60 RGB ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-iso-uk-eu-rgb-60-hot-swappable-pcb-qmk-firmware-rgb-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60hsrgb_iso/rev1:default + +Flashing example for this keyboard: + + make kprepublic/bm60hsrgb_iso:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h new file mode 100644 index 00000000000..42b9d2afb11 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/config.h @@ -0,0 +1,123 @@ +/* +Copyright 2020 markva + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8C +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM60HSRGB_ISO + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ + +// 0 1 2 3 4 5 6 7 8 9 A B C D +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 70 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 70 +# define RGB_MATRIX_KEYPRESSES + // #define RGBLIGHT_HUE_STEP 8 + // #define RGBLIGHT_SAT_STEP 8 + // #define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value + // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + // #define RGBLIGHT_ANIMATIONS + // /*== or choose animations ==*/ + // #define RGBLIGHT_EFFECT_BREATHING + // #define RGBLIGHT_EFFECT_RAINBOW_MOOD + // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + // #define RGBLIGHT_EFFECT_SNAKE + // #define RGBLIGHT_EFFECT_KNIGHT + // #define RGBLIGHT_EFFECT_CHRISTMAS + // #define RGBLIGHT_EFFECT_STATIC_GRADIENT + // #define RGBLIGHT_EFFECT_RGB_TEST + // #define RGBLIGHT_EFFECT_ALTERNATING +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json new file mode 100644 index 00000000000..b53600e44d5 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "BM60HSRGB_ISO", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_60_iso_arrow": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2}, + {"label":"K1D (B1,F7)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K30 (B3,D0)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,D1)", "x":1.25, "y":3}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, + {"label":"K3C (B3,C7)", "x":13, "y":3}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4B (E6,C6)", "x":12, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c new file mode 100644 index 00000000000..f708e74c27c --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.c @@ -0,0 +1,52 @@ +/* Copyright 2020 markva + * + * 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 . + */ +#include "rev1.h" + +#if defined(RGB_MATRIX_ENABLE) +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, + { 55, 56, 57, NO_LED, NO_LED, NO_LED, 58, NO_LED, NO_LED, 59, 60, 61, 62, 63} +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.h b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.h similarity index 100% rename from keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.h rename to keyboards/kprepublic/bm60hsrgb_iso/rev1/rev1.h diff --git a/keyboards/kprepublic/bm60hsrgb_iso/rev1/rules.mk b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rules.mk new file mode 100644 index 00000000000..bf88ac85a6f --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_iso/rev1/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm60poker/keymaps/david/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/david/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/david/keymap.c rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/david/keymap.c diff --git a/keyboards/kprepublic/bm60poker/keymaps/default/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/default/keymap.c rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm60poker/keymaps/ipetepete/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/ipetepete/keymap.c rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/keymap.c diff --git a/keyboards/kprepublic/bm60poker/keymaps/ipetepete/readme.md b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/readme.md similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/ipetepete/readme.md rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/readme.md diff --git a/keyboards/kprepublic/bm60poker/keymaps/ipetepete/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/rules.mk similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/ipetepete/rules.mk rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/ipetepete/rules.mk diff --git a/keyboards/kprepublic/bm60poker/keymaps/via/keymap.c b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/via/keymap.c rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm60poker/keymaps/via/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/keymaps/via/rules.mk similarity index 100% rename from keyboards/kprepublic/bm60poker/keymaps/via/rules.mk rename to keyboards/kprepublic/bm60hsrgb_poker/keymaps/via/rules.mk diff --git a/keyboards/kprepublic/bm60hsrgb_poker/readme.md b/keyboards/kprepublic/bm60hsrgb_poker/readme.md new file mode 100644 index 00000000000..ef29166df8e --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/readme.md @@ -0,0 +1,13 @@ +# BM60HSRGB_Poker 60% Mechanical Keyboard RGB PCB + +A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. + +* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) +* Hardware Supported: BM60HSRGB_Poker +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm60hsrgb_poker/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h new file mode 100644 index 00000000000..a3aab0e65e0 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/config.h @@ -0,0 +1,121 @@ +/* +Copyright 2020 ipetepete + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0xEF8D +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM60HSRGB_POKER + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 67 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 67 + #define RGB_MATRIX_KEYPRESSES + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json b/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json new file mode 100644 index 00000000000..09abf6e353c --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/info.json @@ -0,0 +1,72 @@ +{ + "keyboard_name": "BM60HSRGB_POKER", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_60_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25}, + {"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c b/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c new file mode 100644 index 00000000000..4029a5466c1 --- /dev/null +++ b/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.c @@ -0,0 +1,52 @@ +/* Copyright 2020 ipetepete + * + * 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 . + */ +#include "rev1.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, + { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, + { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, + { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, + { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; +#endif diff --git a/keyboards/kprepublic/bm60poker/bm60poker.h b/keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.h similarity index 100% rename from keyboards/kprepublic/bm60poker/bm60poker.h rename to keyboards/kprepublic/bm60hsrgb_poker/rev1/rev1.h diff --git a/keyboards/kprepublic/bm60poker/rules.mk b/keyboards/kprepublic/bm60hsrgb_poker/rev1/rules.mk similarity index 100% rename from keyboards/kprepublic/bm60poker/rules.mk rename to keyboards/kprepublic/bm60hsrgb_poker/rev1/rules.mk diff --git a/keyboards/kprepublic/bm60poker/bm60poker.c b/keyboards/kprepublic/bm60poker/bm60poker.c deleted file mode 100644 index a7a33520975..00000000000 --- a/keyboards/kprepublic/bm60poker/bm60poker.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2020 ipetepete - * - * 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 . - */ -#include "bm60poker.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, NO_LED, 52 }, - { 53, 54, 55, NO_LED, NO_LED, NO_LED, 56, NO_LED, NO_LED, 57, 58, NO_LED, 59, 60 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/kprepublic/bm60poker/config.h b/keyboards/kprepublic/bm60poker/config.h deleted file mode 100644 index 831a1a1b8c6..00000000000 --- a/keyboards/kprepublic/bm60poker/config.h +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2020 ipetepete - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8D -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM60 RGB POKER - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } - -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN E2 -#define DRIVER_LED_TOTAL 67 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 67 - #define RGB_MATRIX_KEYPRESSES - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ - #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -#endif diff --git a/keyboards/kprepublic/bm60poker/info.json b/keyboards/kprepublic/bm60poker/info.json deleted file mode 100644 index fa461ab83f1..00000000000 --- a/keyboards/kprepublic/bm60poker/info.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "keyboard_name": "BM60 POKER RGB", - "url": "", - "maintainer": "qmk", - "layouts": { - "LAYOUT_60_ansi": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3D (B3,F7)", "x":12.25, "y":3, "w":2.75}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, - {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4C (E6,C7)", "x":12.5, "y":4, "w":1.25}, - {"label":"K4D (E6,F7)", "x":13.75, "y":4, "w":1.25} - ] - } - } -} diff --git a/keyboards/kprepublic/bm60poker/readme.md b/keyboards/kprepublic/bm60poker/readme.md deleted file mode 100644 index b276a15555e..00000000000 --- a/keyboards/kprepublic/bm60poker/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# BM60 Poker 60% Mechanical Keyboard RGB PCB - -A 60% hotswap inswitch RGB (north facing) keyboard from KP Republic. - -* Keyboard Maintainer: [ipetepete](https://github.com/ipetepete) -* Hardware Supported: BM60 POKER RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-poker-60-gh60-hot-swap-custom-mechanical-keyboard-pcb-program-qmk-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm60poker:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60rgb/bm60rgb.c b/keyboards/kprepublic/bm60rgb/bm60rgb.c deleted file mode 100644 index 1b4840934fb..00000000000 --- a/keyboards/kprepublic/bm60rgb/bm60rgb.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Copyright 2020 MechMerlin - * - * 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 . - */ -#include "bm60rgb.h" - -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { NO_LED, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53 }, - { 54, 55, 56, NO_LED, NO_LED, NO_LED, 57, NO_LED, NO_LED, 58, 59, 60, 61, 62 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; diff --git a/keyboards/kprepublic/bm60rgb/config.h b/keyboards/kprepublic/bm60rgb/config.h deleted file mode 100644 index e445efd00ca..00000000000 --- a/keyboards/kprepublic/bm60rgb/config.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright 2020 MechMerlin - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8C -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM60 RGB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ - -// 0 1 2 3 4 5 6 7 8 9 A B C D -#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } - -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN E2 -#define DRIVER_LED_TOTAL 69 -#ifdef RGB_DI_PIN -# define RGBLED_NUM 69 -# define RGB_MATRIX_KEYPRESSES -# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -#endif diff --git a/keyboards/kprepublic/bm60rgb/info.json b/keyboards/kprepublic/bm60rgb/info.json deleted file mode 100644 index 264286334aa..00000000000 --- a/keyboards/kprepublic/bm60rgb/info.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "keyboard_name": "BM60 RGB", - "url": "", - "maintainer": "qmk", - "layout_aliases": { - "LAYOUT": "LAYOUT_60_ansi_arrow" - }, - "layouts": { - "LAYOUT_60_ansi_arrow": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, - {"label":"K3C (B3,C7)", "x":13, "y":3}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4B (E6,C6)", "x":12, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4} - ] - } - } -} diff --git a/keyboards/kprepublic/bm60rgb/readme.md b/keyboards/kprepublic/bm60rgb/readme.md deleted file mode 100644 index d0d5ff1a41f..00000000000 --- a/keyboards/kprepublic/bm60rgb/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -# BM60 RGB - -A 60% hotswap inswitch RGB keyboard from KP Republic. - -* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -* Hardware Supported: BM60 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-60-gh60-hot-swappable-pcb-programmed-qmk-firmware-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm60rgb:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60rgb/rules.mk b/keyboards/kprepublic/bm60rgb/rules.mk deleted file mode 100644 index 674bbe69b9c..00000000000 --- a/keyboards/kprepublic/bm60rgb/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 60_ansi_arrow diff --git a/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.c b/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.c deleted file mode 100644 index 4e292bc5496..00000000000 --- a/keyboards/kprepublic/bm60rgb_iso/bm60rgb_iso.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2020 markva - * - * 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 . - */ -#include "bm60rgb_iso.h" - -#if defined(RGB_MATRIX_ENABLE) -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 }, - { 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27 }, - { 28, NO_LED, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40 }, - { 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54 }, - { 55, 56, 57, NO_LED, NO_LED, NO_LED, 58, NO_LED, NO_LED, 59, 60, 61, 62, 63} -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, - // LShift, <, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 3, 48 }, { 22, 48 }, { 33, 48 }, { 48, 48 }, { 63, 48 }, { 78, 48 }, { 93, 48 }, { 108, 48 }, { 123, 48 }, { 138, 48 }, { 153, 48 }, { 168, 48 }, { 194, 48 }, { 213, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift,<, Z, X, C, V, B, N, M, ,, ., Shift, Up, / - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; -#endif diff --git a/keyboards/kprepublic/bm60rgb_iso/config.h b/keyboards/kprepublic/bm60rgb_iso/config.h deleted file mode 100644 index 17cf1436d48..00000000000 --- a/keyboards/kprepublic/bm60rgb_iso/config.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright 2020 markva - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0xEF8C -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT bm60hsrgb-iso - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ - -// 0 1 2 3 4 5 6 7 8 9 A B C D -#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7 } - -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN E2 -#define DRIVER_LED_TOTAL 70 -#ifdef RGB_DI_PIN -# define RGBLED_NUM 70 -# define RGB_MATRIX_KEYPRESSES - // #define RGBLIGHT_HUE_STEP 8 - // #define RGBLIGHT_SAT_STEP 8 - // #define RGBLIGHT_VAL_STEP 8 -# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value - // #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ - /*== all animations enable ==*/ - // #define RGBLIGHT_ANIMATIONS - // /*== or choose animations ==*/ - // #define RGBLIGHT_EFFECT_BREATHING - // #define RGBLIGHT_EFFECT_RAINBOW_MOOD - // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL - // #define RGBLIGHT_EFFECT_SNAKE - // #define RGBLIGHT_EFFECT_KNIGHT - // #define RGBLIGHT_EFFECT_CHRISTMAS - // #define RGBLIGHT_EFFECT_STATIC_GRADIENT - // #define RGBLIGHT_EFFECT_RGB_TEST - // #define RGBLIGHT_EFFECT_ALTERNATING -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -#endif diff --git a/keyboards/kprepublic/bm60rgb_iso/info.json b/keyboards/kprepublic/bm60rgb_iso/info.json deleted file mode 100644 index 39da4b54600..00000000000 --- a/keyboards/kprepublic/bm60rgb_iso/info.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "keyboard_name": "BM60 RGB ISO", - "url": "", - "maintainer": "qmk", - "layouts": { - "LAYOUT_60_iso_arrow": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2}, - {"label":"K1D (B1,F7)", "x":13.75, "y":1, "w":1.25, "h":2}, - {"label":"K30 (B3,D0)", "x":0, "y":3, "w":1.25}, - {"label":"K31 (B3,D1)", "x":1.25, "y":3}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3, "w":1.75}, - {"label":"K3C (B3,C7)", "x":13, "y":3}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4B (E6,C6)", "x":12, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4} - ] - } - } -} diff --git a/keyboards/kprepublic/bm60rgb_iso/readme.md b/keyboards/kprepublic/bm60rgb_iso/readme.md deleted file mode 100644 index fec112650ef..00000000000 --- a/keyboards/kprepublic/bm60rgb_iso/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# BM60 RGB ISO - -![BM60 RGB ISO](https://i.imgur.com/i3gk2vql.jpg) - -A 60% ISO hotswap inswitch RGB keyboard. - -* Keyboard Maintainer: [markva](https://github.com/markva) -* Hardware Supported: BM60 RGB ISO -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm60-rgb-iso-uk-eu-rgb-60-hot-swappable-pcb-qmk-firmware-rgb-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm60rgb_iso:default - -Flashing example for this keyboard: - - make kprepublic/bm60rgb_iso:default:flash - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm60rgb_iso/rules.mk b/keyboards/kprepublic/bm60rgb_iso/rules.mk deleted file mode 100644 index 59bc30a27da..00000000000 --- a/keyboards/kprepublic/bm60rgb_iso/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes diff --git a/keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm65rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm65hsrgb/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm65rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm65hsrgb/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm65rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm65hsrgb/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm65hsrgb/readme.md b/keyboards/kprepublic/bm65hsrgb/readme.md new file mode 100644 index 00000000000..d660861296a --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/readme.md @@ -0,0 +1,24 @@ +# BM65HSRGB + +![BM65HSRGB](https://i.imgur.com/DskSCve.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) +* Hardware Supported: BM65HSRGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm65hsrgb/rev1:default + +Flashing example for this keyboard: + + make kprepublic/bm65hsrgb/rev1:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/config.h b/keyboards/kprepublic/bm65hsrgb/rev1/config.h new file mode 100644 index 00000000000..1fbfab93683 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/rev1/config.h @@ -0,0 +1,122 @@ +/* +Copyright 2021 bytesapart + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 //KP +#define PRODUCT_ID 0xEF6E +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM65HSRGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, \ + B1, \ + B2, \ + B3, \ + E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 73 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 73 + #define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65hsrgb/rev1/info.json b/keyboards/kprepublic/bm65hsrgb/rev1/info.json new file mode 100644 index 00000000000..788f8be23e2 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb/rev1/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "BM65HSRGB", + "url": "", + "maintainer": "bytesapart", + "layouts": { + "LAYOUT_65_ansi_blocker": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm65rgb/rev1/readme.md b/keyboards/kprepublic/bm65hsrgb/rev1/readme.md similarity index 100% rename from keyboards/kprepublic/bm65rgb/rev1/readme.md rename to keyboards/kprepublic/bm65hsrgb/rev1/readme.md diff --git a/keyboards/kprepublic/bm65rgb/rev1/rev1.c b/keyboards/kprepublic/bm65hsrgb/rev1/rev1.c similarity index 100% rename from keyboards/kprepublic/bm65rgb/rev1/rev1.c rename to keyboards/kprepublic/bm65hsrgb/rev1/rev1.c diff --git a/keyboards/kprepublic/bm65rgb/rev1/rev1.h b/keyboards/kprepublic/bm65hsrgb/rev1/rev1.h similarity index 100% rename from keyboards/kprepublic/bm65rgb/rev1/rev1.h rename to keyboards/kprepublic/bm65hsrgb/rev1/rev1.h diff --git a/keyboards/kprepublic/bm65rgb/rev1/rules.mk b/keyboards/kprepublic/bm65hsrgb/rev1/rules.mk similarity index 100% rename from keyboards/kprepublic/bm65rgb/rev1/rules.mk rename to keyboards/kprepublic/bm65hsrgb/rev1/rules.mk diff --git a/keyboards/kprepublic/bm65hsrgb_iso/bm65hsrgb_iso.c b/keyboards/kprepublic/bm65hsrgb_iso/bm65hsrgb_iso.c new file mode 100644 index 00000000000..134c2718240 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/bm65hsrgb_iso.c @@ -0,0 +1,59 @@ +/* Copyright 2020 ipetepete, 2021 deadolus + * + * 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 . + */ +#include "bm65hsrgb_iso.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 , 14}, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, + { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43}, + { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, + { 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66, 67} +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 },{ 224, 0 }, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 },{ 224, 16}, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 224, 32 }, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 195, 48 }, { 209, 48 }, { 224, 48 }, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 194, 64 }, { 209, 64 },{ 224, 64 }, + // UNDERGLOW + { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } +}, { + // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right + 1, 1, 1, 4, 1, 1, 1, 1, 1, + // UNDERGLOW + 2, 2, 2, 2, 2, 2 +} }; + +__attribute__ ((weak)) +void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); + } +} +#endif diff --git a/keyboards/kprepublic/bm65iso/bm65iso.h b/keyboards/kprepublic/bm65hsrgb_iso/bm65hsrgb_iso.h similarity index 100% rename from keyboards/kprepublic/bm65iso/bm65iso.h rename to keyboards/kprepublic/bm65hsrgb_iso/bm65hsrgb_iso.h diff --git a/keyboards/kprepublic/bm65hsrgb_iso/config.h b/keyboards/kprepublic/bm65hsrgb_iso/config.h new file mode 100644 index 00000000000..30b27dc26e8 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/config.h @@ -0,0 +1,119 @@ +/* +Copyright 2020 ipetepete, 2021 deadolus + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 // "KP" +#define PRODUCT_ID 0x0653 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KP Republic +#define PRODUCT BM65HSRGB_ISO + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 +#define FORCE_NKRO + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } + +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN E2 +#define DRIVER_LED_TOTAL 74 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 74 + #define RGB_MATRIX_KEYPRESSES + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 140 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_BAND_SAT +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +#endif diff --git a/keyboards/kprepublic/bm65hsrgb_iso/info.json b/keyboards/kprepublic/bm65hsrgb_iso/info.json new file mode 100644 index 00000000000..9212c43339f --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/info.json @@ -0,0 +1,83 @@ +{ + "keyboard_name": "BM65HSRGB_ISO", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_65_iso_blocker": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2}, + {"label":"K1D (B1,F7)", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + + {"label":"K30 (B3,D0)", "x":0, "y":3, "w":1.25}, + {"label":"K31 (B3,D1)", "x":1.25, "y":3}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, + {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm65iso/keymaps/deadolus/config.h b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/config.h similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/deadolus/config.h rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/config.h diff --git a/keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/keymap.c similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.c rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/keymap.c diff --git a/keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.h b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/keymap.h similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/deadolus/keymap.h rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/keymap.h diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/readme.md b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/readme.md new file mode 100644 index 00000000000..095550b01a8 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/readme.md @@ -0,0 +1,20 @@ +# Deadolus' keymap for the bm65iso + +* Six layers (even though three are mostly empty) +* Different color for each layer (r,g,b,c,m,y) +* **Keys with something else defined than KC_TRNS are lit up in the layer color, so you easily can see which keys have some function defined** +* Caps-Lock lights up when active and on layer 0 +* Some leader shortcuts defined - nothing useful yet +* Some space cadet keys defined for easier insertion of () and {} +* Bootmagic lite enabled via default settings so you can plug in the keyboard while holding esc to land in bootloader mode +* Manages all this and still fits in to the program memory + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm65hsrgb_iso:deadolus + +Flashing example for this keyboard: + + make kprepublic/bm65hsrgb_iso:deadolus:flash + +Keyboard Maintainer: **[deadolus](https://github.com/deadolus)** diff --git a/keyboards/kprepublic/bm65iso/keymaps/deadolus/rules.mk b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/rules.mk similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/deadolus/rules.mk rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/deadolus/rules.mk diff --git a/keyboards/kprepublic/bm65iso/keymaps/default/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/default/keymap.c rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm65iso/keymaps/via/keymap.c b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/via/keymap.c rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm65iso/keymaps/via/readme.md b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/readme.md similarity index 100% rename from keyboards/kprepublic/bm65iso/keymaps/via/readme.md rename to keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/rules.mk b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/rules.mk new file mode 100644 index 00000000000..036bd6d1c3e --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/kprepublic/bm65hsrgb_iso/readme.md b/keyboards/kprepublic/bm65hsrgb_iso/readme.md new file mode 100644 index 00000000000..752362e29a9 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/readme.md @@ -0,0 +1,24 @@ +# BM65HSRGB_ISO + +![BM65HSRGB_ISO](https://ae01.alicdn.com/kf/He2fd118856c7490292bc3c299049fdbcp.jpg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [deadolus](https://github.com/deadolus) +* Hardware Supported: BM65HSRGB_ISO +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-iso-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-rgb-switch-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm65hsrgb_iso:default + +Flashing example for this keyboard: + + make kprepublic/bm65hsrgb_iso:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm65hsrgb_iso/rules.mk b/keyboards/kprepublic/bm65hsrgb_iso/rules.mk new file mode 100644 index 00000000000..929b2f939f6 --- /dev/null +++ b/keyboards/kprepublic/bm65hsrgb_iso/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_iso_blocker diff --git a/keyboards/kprepublic/bm65iso/bm65iso.c b/keyboards/kprepublic/bm65iso/bm65iso.c deleted file mode 100644 index de2aba21c33..00000000000 --- a/keyboards/kprepublic/bm65iso/bm65iso.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Copyright 2020 ipetepete, 2021 deadolus - * - * 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 . - */ -#include "bm65iso.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 , 14}, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29}, - { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43}, - { 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, - { 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66, 67} -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - { 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 },{ 224, 0 }, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - { 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 },{ 224, 16}, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - { 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 224, 32 }, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - { 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 195, 48 }, { 209, 48 }, { 224, 48 }, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - { 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 194, 64 }, { 209, 64 },{ 224, 64 }, - // UNDERGLOW - { 216, 32 }, { 180, 32 }, { 144, 32 }, { 108, 32 }, { 72, 32 }, { 36, 32 } -}, { - // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - // Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right - 1, 1, 1, 4, 1, 1, 1, 1, 1, - // UNDERGLOW - 2, 2, 2, 2, 2, 2 -} }; - -__attribute__ ((weak)) -void rgb_matrix_indicators_user(void) { - if (host_keyboard_led_state().caps_lock) { - rgb_matrix_set_color(30, 0xFF, 0xFF, 0xFF); - } -} -#endif diff --git a/keyboards/kprepublic/bm65iso/config.h b/keyboards/kprepublic/bm65iso/config.h deleted file mode 100644 index 2bec40f1498..00000000000 --- a/keyboards/kprepublic/bm65iso/config.h +++ /dev/null @@ -1,72 +0,0 @@ -/* -Copyright 2020 ipetepete, 2021 deadolus - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 // "KP" -#define PRODUCT_ID 0x0653 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KP Republic -#define PRODUCT BM65ISO - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 -#define FORCE_NKRO - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } - -#define DIODE_DIRECTION COL2ROW - -#define RGB_DI_PIN E2 -#define DRIVER_LED_TOTAL 74 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 74 - #define RGB_MATRIX_KEYPRESSES - #define RGBLIGHT_HUE_STEP 8 - #define RGBLIGHT_SAT_STEP 8 - #define RGBLIGHT_VAL_STEP 8 - #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 140 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_BAND_SAT - #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ - #define RGBLIGHT_ANIMATIONS -// /*== or choose animations ==*/ -// #define RGBLIGHT_EFFECT_BREATHING -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL -// #define RGBLIGHT_EFFECT_SNAKE -// #define RGBLIGHT_EFFECT_KNIGHT -// #define RGBLIGHT_EFFECT_CHRISTMAS -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT -// #define RGBLIGHT_EFFECT_RGB_TEST -// #define RGBLIGHT_EFFECT_ALTERNATING -#endif diff --git a/keyboards/kprepublic/bm65iso/info.json b/keyboards/kprepublic/bm65iso/info.json deleted file mode 100644 index c987415fb48..00000000000 --- a/keyboards/kprepublic/bm65iso/info.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "keyboard_name": "bm65iso", - "url": "", - "maintainer": "qmk", - "layouts": { - "LAYOUT_65_iso_blocker": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,F6)", "x":15, "y":0}, - - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1E (B1,F6)", "x":15, "y":1}, - - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2}, - {"label":"K1D (B1,F7)", "x":13.75, "y":1, "w":1.25, "h":2}, - {"label":"K2E (B2,F6)", "x":15, "y":2}, - - {"label":"K30 (B3,D0)", "x":0, "y":3, "w":1.25}, - {"label":"K31 (B3,D1)", "x":1.25, "y":3}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K3E (B3,F6)", "x":15, "y":3}, - - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, - {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, - {"label":"K4E (E6,F6)", "x":15, "y":4} - ] - } - } -} diff --git a/keyboards/kprepublic/bm65iso/keymaps/deadolus/readme.md b/keyboards/kprepublic/bm65iso/keymaps/deadolus/readme.md deleted file mode 100644 index 6080e5b9ab3..00000000000 --- a/keyboards/kprepublic/bm65iso/keymaps/deadolus/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -# Deadolus' keymap for the bm65iso - -* Six layers (even though three are mostly empty) -* Different color for each layer (r,g,b,c,m,y) -* **Keys with something else defined than KC_TRNS are lit up in the layer color, so you easily can see which keys have some function defined** -* Caps-Lock lights up when active and on layer 0 -* Some leader shortcuts defined - nothing useful yet -* Some space cadet keys defined for easier insertion of () and {} -* Bootmagic lite enabled via default settings so you can plug in the keyboard while holding esc to land in bootloader mode -* Manages all this and still fits in to the program memory - -Make example for this keyboard (after setting up your build environment): - - make bm65iso:deadolus - -Flashing example for this keyboard: - - make bm65iso:deadolus:flash - -Keyboard Maintainer: **[deadolus](https://github.com/deadolus)** diff --git a/keyboards/kprepublic/bm65iso/readme.md b/keyboards/kprepublic/bm65iso/readme.md deleted file mode 100644 index 466a0341a28..00000000000 --- a/keyboards/kprepublic/bm65iso/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm65iso - -![bm65iso](https://ae01.alicdn.com/kf/He2fd118856c7490292bc3c299049fdbcp.jpg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [deadolus](https://github.com/deadolus) -* Hardware Supported: BM65 ISO -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-iso-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-rgb-switch-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm65iso:default - -Flashing example for this keyboard: - - make kprepublic/bm65iso:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm65iso/rules.mk b/keyboards/kprepublic/bm65iso/rules.mk deleted file mode 100644 index 8e589b49c1a..00000000000 --- a/keyboards/kprepublic/bm65iso/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_iso_blocker diff --git a/keyboards/kprepublic/bm65rgb/readme.md b/keyboards/kprepublic/bm65rgb/readme.md deleted file mode 100644 index 3a87afabf14..00000000000 --- a/keyboards/kprepublic/bm65rgb/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm65rgb - -![bm65rgb](https://i.imgur.com/DskSCve.jpeg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [bytesapart](https://github.com/bytesapart) -* Hardware Supported: BM65 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm65rgb-bm65-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c?_pos=1&_sid=5b9a6a5d0&_ss=r) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm65rgb:default - -Flashing example for this keyboard: - - make kprepublic/bm65rgb:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm65rgb/rev1/config.h b/keyboards/kprepublic/bm65rgb/rev1/config.h deleted file mode 100644 index 21624b9f166..00000000000 --- a/keyboards/kprepublic/bm65rgb/rev1/config.h +++ /dev/null @@ -1,122 +0,0 @@ -/* -Copyright 2021 bytesapart - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF6E -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM65 RGB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, \ - B1, \ - B2, \ - B3, \ - E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// The pin connected to the data pin of the LEDs -#define RGB_DI_PIN E2 -// The number of LEDs connected -#define DRIVER_LED_TOTAL 73 -#ifdef RGB_DI_PIN - #define RGBLED_NUM 73 - #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm65rgb/rev1/info.json b/keyboards/kprepublic/bm65rgb/rev1/info.json deleted file mode 100644 index d69fb8e5cf8..00000000000 --- a/keyboards/kprepublic/bm65rgb/rev1/info.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "keyboard_name": "bm65rgb", - "url": "", - "maintainer": "bytesapart", - "layouts": { - "LAYOUT_65_ansi_blocker": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,F6)", "x":15, "y":0}, - - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (B1,F6)", "x":15, "y":1}, - - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K2E (B2,F6)", "x":15, "y":2}, - - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K3E (B3,F6)", "x":15, "y":3}, - - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4, "w":1.25}, - {"label":"K4A (E6,B6)", "x":11.25, "y":4, "w":1.25}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, - {"label":"K4E (E6,F6)", "x":15, "y":4} - ] - } - } -} diff --git a/keyboards/kprepublic/bm68hsrgb/bm68hsrgb.c b/keyboards/kprepublic/bm68hsrgb/bm68hsrgb.c new file mode 100644 index 00000000000..b405a9f204b --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/bm68hsrgb.c @@ -0,0 +1,44 @@ +/* Copyright 2021 peepeetee + * + * 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 . + */ + +#include "bm68hsrgb.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, + { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, + { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 }, + { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, + { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } +}, { + // LED Index to Physical Position + { 0, 0}, { 15, 0}, { 30, 0}, { 45, 0}, { 60, 0}, { 75, 0}, { 90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {225, 0}, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete + { 4, 16}, { 22, 16}, { 37, 16}, { 52, 16}, { 67, 16}, { 82, 16}, { 97, 16}, {112, 16}, {127, 16}, {142, 16}, {157, 16}, {172, 16}, {187, 16}, {206, 16}, {225, 16}, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home + { 6, 32}, { 26, 32}, { 41, 32}, { 56, 32}, { 71, 32}, { 86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {225, 32}, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up + { 9, 48}, { 34, 48}, { 49, 48}, { 64, 48}, { 79, 48}, { 94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {208, 48}, {225, 48}, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down + { 2, 64}, { 21, 64}, { 39, 64}, { 94, 64}, {148, 64}, {163, 64}, {178, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right + {185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right + 2, 2, 2, 2, 2, 2 // UNDERGLOW +} }; +#endif diff --git a/keyboards/kprepublic/bm68rgb/bm68rgb.h b/keyboards/kprepublic/bm68hsrgb/bm68hsrgb.h similarity index 100% rename from keyboards/kprepublic/bm68rgb/bm68rgb.h rename to keyboards/kprepublic/bm68hsrgb/bm68hsrgb.h diff --git a/keyboards/kprepublic/bm68hsrgb/config.h b/keyboards/kprepublic/bm68hsrgb/config.h new file mode 100644 index 00000000000..a779c97b7b5 --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/config.h @@ -0,0 +1,174 @@ +/* +Copyright 2021 peepeetee + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 //KP +#define PRODUCT_ID 0xEF6F +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM68HSRGB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, \ + B1, \ + B2, \ + B3, \ + E6 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// The pin connected to the data pin of the LEDs +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 74 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 74 +# define RGB_MATRIX_KEYPRESSES // reacts to keypresses +# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value +#endif +#ifdef RGB_MATRIX_ENABLE +# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm68hsrgb/info.json b/keyboards/kprepublic/bm68hsrgb/info.json new file mode 100644 index 00000000000..0a72da6e984 --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/info.json @@ -0,0 +1,79 @@ +{ + "keyboard_name": "BM68HSRGB", + "url": "", + "maintainer": "peepeetee", + "layouts": { + "LAYOUT_65_ansi": { + "layout": [ + {"label":"K00 (B0,D0)", "x":0, "y":0}, + {"label":"K01 (B0,D1)", "x":1, "y":0}, + {"label":"K02 (B0,D2)", "x":2, "y":0}, + {"label":"K03 (B0,D3)", "x":3, "y":0}, + {"label":"K04 (B0,D5)", "x":4, "y":0}, + {"label":"K05 (B0,D4)", "x":5, "y":0}, + {"label":"K06 (B0,D6)", "x":6, "y":0}, + {"label":"K07 (B0,D7)", "x":7, "y":0}, + {"label":"K08 (B0,B4)", "x":8, "y":0}, + {"label":"K09 (B0,B5)", "x":9, "y":0}, + {"label":"K0A (B0,B6)", "x":10, "y":0}, + {"label":"K0B (B0,C6)", "x":11, "y":0}, + {"label":"K0C (B0,C7)", "x":12, "y":0}, + {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, + {"label":"K0E (B0,F6)", "x":15, "y":0}, + {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, + {"label":"K11 (B1,D1)", "x":1.5, "y":1}, + {"label":"K12 (B1,D2)", "x":2.5, "y":1}, + {"label":"K13 (B1,D3)", "x":3.5, "y":1}, + {"label":"K14 (B1,D5)", "x":4.5, "y":1}, + {"label":"K15 (B1,D4)", "x":5.5, "y":1}, + {"label":"K16 (B1,D6)", "x":6.5, "y":1}, + {"label":"K17 (B1,D7)", "x":7.5, "y":1}, + {"label":"K18 (B1,B4)", "x":8.5, "y":1}, + {"label":"K19 (B1,B5)", "x":9.5, "y":1}, + {"label":"K1A (B1,B6)", "x":10.5, "y":1}, + {"label":"K1B (B1,C6)", "x":11.5, "y":1}, + {"label":"K1C (B1,C7)", "x":12.5, "y":1}, + {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E (B1,F6)", "x":15, "y":1}, + {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, + {"label":"K22 (B2,D2)", "x":1.75, "y":2}, + {"label":"K23 (B2,D3)", "x":2.75, "y":2}, + {"label":"K24 (B2,D5)", "x":3.75, "y":2}, + {"label":"K25 (B2,D4)", "x":4.75, "y":2}, + {"label":"K26 (B2,D6)", "x":5.75, "y":2}, + {"label":"K27 (B2,D7)", "x":6.75, "y":2}, + {"label":"K28 (B2,B4)", "x":7.75, "y":2}, + {"label":"K29 (B2,B5)", "x":8.75, "y":2}, + {"label":"K2A (B2,B6)", "x":9.75, "y":2}, + {"label":"K2B (B2,C6)", "x":10.75, "y":2}, + {"label":"K2C (B2,C7)", "x":11.75, "y":2}, + {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E (B2,F6)", "x":15, "y":2}, + {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, + {"label":"K32 (B3,D2)", "x":2.25, "y":3}, + {"label":"K33 (B3,D3)", "x":3.25, "y":3}, + {"label":"K34 (B3,D5)", "x":4.25, "y":3}, + {"label":"K35 (B3,D4)", "x":5.25, "y":3}, + {"label":"K36 (B3,D6)", "x":6.25, "y":3}, + {"label":"K37 (B3,D7)", "x":7.25, "y":3}, + {"label":"K38 (B3,B4)", "x":8.25, "y":3}, + {"label":"K39 (B3,B5)", "x":9.25, "y":3}, + {"label":"K3A (B3,B6)", "x":10.25, "y":3}, + {"label":"K3B (B3,C6)", "x":11.25, "y":3}, + {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D (B3,F7)", "x":14, "y":3}, + {"label":"K3E (B3,F6)", "x":15, "y":3}, + {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, + {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, + {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, + {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, + {"label":"K49 (E6,B5)", "x":10, "y":4}, + {"label":"K4A (E6,B6)", "x":11, "y":4}, + {"label":"K4B (E6,C6)", "x":12, "y":4}, + {"label":"K4C (E6,C7)", "x":13, "y":4}, + {"label":"K4D (E6,F7)", "x":14, "y":4}, + {"label":"K4E (E6,F6)", "x":15, "y":4} + ] + } + } +} diff --git a/keyboards/kprepublic/bm68rgb/keymaps/default/keymap.c b/keyboards/kprepublic/bm68hsrgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/default/keymap.c rename to keyboards/kprepublic/bm68hsrgb/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm68rgb/keymaps/default/readme.md b/keyboards/kprepublic/bm68hsrgb/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/default/readme.md rename to keyboards/kprepublic/bm68hsrgb/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/config.h new file mode 100644 index 00000000000..0748f83cdcb --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/config.h @@ -0,0 +1,132 @@ +/* Copyright 2021 peepeetee + * + * 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 . + */ +#pragma once + + +// #define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) +// #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) +// #define MODS_ALT (get_mods() & MOD_MASK_ALT) + +// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) + +// #define NO_DEBUG // Disable debugging +// #define NO_PRINT // Disable printing/debugging using hid_listen +// #define NO_ACTION_LAYER // Disable layers +// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features +// #define NO_ACTION_ONESHOT // Disable one-shot modifiers +// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro +// #define TERMINAL_HELP +// #define MOUSEKEY_INTERVAL 20 +// #define MOUSEKEY_DELAY 0 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_WHEEL_DELAY 0 +#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. +// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. +// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) +// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap +// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state + #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too +// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings +// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release +// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle +// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details +// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details +// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) +// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. +// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall +// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. +// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out +// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered +// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. +// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. +// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. +// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. + +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set +// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue +// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation +// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) +// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// #define RGBLIGHT_ANIMATIONS // Run RGB animations +// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. +// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. +// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. +// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. +// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. +// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. +// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. + +// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 +// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds +// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation +// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel +// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation +// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by +// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls +// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation + +// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation + // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/keymap.c similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.c rename to keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/keymap.c diff --git a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.h b/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/keymap.h similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/peepeetee/keymap.h rename to keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/keymap.h diff --git a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/readme.md b/keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/readme.md similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/peepeetee/readme.md rename to keyboards/kprepublic/bm68hsrgb/keymaps/peepeetee/readme.md diff --git a/keyboards/kprepublic/bm68rgb/keymaps/via/keymap.c b/keyboards/kprepublic/bm68hsrgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/via/keymap.c rename to keyboards/kprepublic/bm68hsrgb/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm68rgb/keymaps/via/readme.md b/keyboards/kprepublic/bm68hsrgb/keymaps/via/readme.md similarity index 100% rename from keyboards/kprepublic/bm68rgb/keymaps/via/readme.md rename to keyboards/kprepublic/bm68hsrgb/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm68hsrgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm68hsrgb/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kprepublic/bm68hsrgb/readme.md b/keyboards/kprepublic/bm68hsrgb/readme.md new file mode 100644 index 00000000000..54d71cab2c6 --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/readme.md @@ -0,0 +1,24 @@ +# BM68HSRGB + +![BM68HSRGB](https://i.imgur.com/uuYP8OIl.jpeg) + +A 65% hotswap in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) +* Hardware Supported: BM68HSRGB +* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm68rgb-bm68-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm68hsrgb:default + +Flashing example for this keyboard: + + make kprepublic/bm68hsrgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm68hsrgb/rules.mk b/keyboards/kprepublic/bm68hsrgb/rules.mk new file mode 100644 index 00000000000..910923efd1d --- /dev/null +++ b/keyboards/kprepublic/bm68hsrgb/rules.mk @@ -0,0 +1,26 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes + +LAYOUTS = 65_ansi diff --git a/keyboards/kprepublic/bm68rgb/bm68rgb.c b/keyboards/kprepublic/bm68rgb/bm68rgb.c deleted file mode 100644 index f3d2cc7b4fd..00000000000 --- a/keyboards/kprepublic/bm68rgb/bm68rgb.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2021 peepeetee - * - * 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 . - */ - -#include "bm68rgb.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 }, - { 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 }, - { 30, NO_LED, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43 }, - { NO_LED, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 }, - { 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, 62, 63, 64, 65, 66, 67 } -}, { - // LED Index to Physical Position - { 0, 0}, { 15, 0}, { 30, 0}, { 45, 0}, { 60, 0}, { 75, 0}, { 90, 0}, {105, 0}, {120, 0}, {135, 0}, {150, 0}, {165, 0}, {180, 0}, {202, 0}, {225, 0}, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete - { 4, 16}, { 22, 16}, { 37, 16}, { 52, 16}, { 67, 16}, { 82, 16}, { 97, 16}, {112, 16}, {127, 16}, {142, 16}, {157, 16}, {172, 16}, {187, 16}, {206, 16}, {225, 16}, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home - { 6, 32}, { 26, 32}, { 41, 32}, { 56, 32}, { 71, 32}, { 86, 32}, {101, 32}, {116, 32}, {131, 32}, {146, 32}, {161, 32}, {176, 32}, {201, 32}, {225, 32}, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up - { 9, 48}, { 34, 48}, { 49, 48}, { 64, 48}, { 79, 48}, { 94, 48}, {109, 48}, {124, 48}, {139, 48}, {154, 48}, {169, 48}, {189, 48}, {208, 48}, {225, 48}, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down - { 2, 64}, { 21, 64}, { 39, 64}, { 94, 64}, {148, 64}, {163, 64}, {178, 64}, {193, 64}, {208, 64}, {225, 64}, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right - {185, 45}, {160, 45}, {125, 45}, { 95, 45}, { 60, 45}, { 25, 45} // UNDERGLOW -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Delete - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, // Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], backslash , Home - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, // Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Page up - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, // LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Page Down - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, // Ctrl, GUI, Alt, Space, RAlt, FN, Ctrl, Left, Down, Right - 2, 2, 2, 2, 2, 2 // UNDERGLOW -} }; -#endif diff --git a/keyboards/kprepublic/bm68rgb/config.h b/keyboards/kprepublic/bm68rgb/config.h deleted file mode 100644 index 48844c295f4..00000000000 --- a/keyboards/kprepublic/bm68rgb/config.h +++ /dev/null @@ -1,126 +0,0 @@ -/* -Copyright 2021 peepeetee - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF6F -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM68 RGB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B0, \ - B1, \ - B2, \ - B3, \ - E6 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -// The pin connected to the data pin of the LEDs -#define RGB_DI_PIN E2 -// The number of LEDs connected -#define DRIVER_LED_TOTAL 74 -#ifdef RGB_DI_PIN -# define RGBLED_NUM 74 -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses -# define RGBLIGHT_LIMIT_VAL 180 // Limit to vendor-recommended value -#endif -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 180 // Limit to vendor-recommended value -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. - * This is useful for the Windows task manager shortcut (ctrl+shift+esc). - */ -//#define GRAVE_ESC_CTRL_OVERRIDE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -/* Bootmagic Lite key configuration */ -//#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/kprepublic/bm68rgb/info.json b/keyboards/kprepublic/bm68rgb/info.json deleted file mode 100644 index aa71c895ecd..00000000000 --- a/keyboards/kprepublic/bm68rgb/info.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "keyboard_name": "bm68rgb", - "url": "", - "maintainer": "peepeetee", - "layouts": { - "LAYOUT_65_ansi": { - "layout": [ - {"label":"K00 (B0,D0)", "x":0, "y":0}, - {"label":"K01 (B0,D1)", "x":1, "y":0}, - {"label":"K02 (B0,D2)", "x":2, "y":0}, - {"label":"K03 (B0,D3)", "x":3, "y":0}, - {"label":"K04 (B0,D5)", "x":4, "y":0}, - {"label":"K05 (B0,D4)", "x":5, "y":0}, - {"label":"K06 (B0,D6)", "x":6, "y":0}, - {"label":"K07 (B0,D7)", "x":7, "y":0}, - {"label":"K08 (B0,B4)", "x":8, "y":0}, - {"label":"K09 (B0,B5)", "x":9, "y":0}, - {"label":"K0A (B0,B6)", "x":10, "y":0}, - {"label":"K0B (B0,C6)", "x":11, "y":0}, - {"label":"K0C (B0,C7)", "x":12, "y":0}, - {"label":"K0D (B0,F7)", "x":13, "y":0, "w":2}, - {"label":"K0E (B0,F6)", "x":15, "y":0}, - {"label":"K10 (B1,D0)", "x":0, "y":1, "w":1.5}, - {"label":"K11 (B1,D1)", "x":1.5, "y":1}, - {"label":"K12 (B1,D2)", "x":2.5, "y":1}, - {"label":"K13 (B1,D3)", "x":3.5, "y":1}, - {"label":"K14 (B1,D5)", "x":4.5, "y":1}, - {"label":"K15 (B1,D4)", "x":5.5, "y":1}, - {"label":"K16 (B1,D6)", "x":6.5, "y":1}, - {"label":"K17 (B1,D7)", "x":7.5, "y":1}, - {"label":"K18 (B1,B4)", "x":8.5, "y":1}, - {"label":"K19 (B1,B5)", "x":9.5, "y":1}, - {"label":"K1A (B1,B6)", "x":10.5, "y":1}, - {"label":"K1B (B1,C6)", "x":11.5, "y":1}, - {"label":"K1C (B1,C7)", "x":12.5, "y":1}, - {"label":"K1D (B1,F7)", "x":13.5, "y":1, "w":1.5}, - {"label":"K1E (B1,F6)", "x":15, "y":1}, - {"label":"K20 (B2,D0)", "x":0, "y":2, "w":1.75}, - {"label":"K22 (B2,D2)", "x":1.75, "y":2}, - {"label":"K23 (B2,D3)", "x":2.75, "y":2}, - {"label":"K24 (B2,D5)", "x":3.75, "y":2}, - {"label":"K25 (B2,D4)", "x":4.75, "y":2}, - {"label":"K26 (B2,D6)", "x":5.75, "y":2}, - {"label":"K27 (B2,D7)", "x":6.75, "y":2}, - {"label":"K28 (B2,B4)", "x":7.75, "y":2}, - {"label":"K29 (B2,B5)", "x":8.75, "y":2}, - {"label":"K2A (B2,B6)", "x":9.75, "y":2}, - {"label":"K2B (B2,C6)", "x":10.75, "y":2}, - {"label":"K2C (B2,C7)", "x":11.75, "y":2}, - {"label":"K2D (B2,F7)", "x":12.75, "y":2, "w":2.25}, - {"label":"K2E (B2,F6)", "x":15, "y":2}, - {"label":"K31 (B3,D1)", "x":0, "y":3, "w":2.25}, - {"label":"K32 (B3,D2)", "x":2.25, "y":3}, - {"label":"K33 (B3,D3)", "x":3.25, "y":3}, - {"label":"K34 (B3,D5)", "x":4.25, "y":3}, - {"label":"K35 (B3,D4)", "x":5.25, "y":3}, - {"label":"K36 (B3,D6)", "x":6.25, "y":3}, - {"label":"K37 (B3,D7)", "x":7.25, "y":3}, - {"label":"K38 (B3,B4)", "x":8.25, "y":3}, - {"label":"K39 (B3,B5)", "x":9.25, "y":3}, - {"label":"K3A (B3,B6)", "x":10.25, "y":3}, - {"label":"K3B (B3,C6)", "x":11.25, "y":3}, - {"label":"K3C (B3,C7)", "x":12.25, "y":3, "w":1.75}, - {"label":"K3D (B3,F7)", "x":14, "y":3}, - {"label":"K3E (B3,F6)", "x":15, "y":3}, - {"label":"K40 (E6,D0)", "x":0, "y":4, "w":1.25}, - {"label":"K41 (E6,D1)", "x":1.25, "y":4, "w":1.25}, - {"label":"K42 (E6,D2)", "x":2.5, "y":4, "w":1.25}, - {"label":"K46 (E6,D6)", "x":3.75, "y":4, "w":6.25}, - {"label":"K49 (E6,B5)", "x":10, "y":4}, - {"label":"K4A (E6,B6)", "x":11, "y":4}, - {"label":"K4B (E6,C6)", "x":12, "y":4}, - {"label":"K4C (E6,C7)", "x":13, "y":4}, - {"label":"K4D (E6,F7)", "x":14, "y":4}, - {"label":"K4E (E6,F6)", "x":15, "y":4} - ] - } - } -} diff --git a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h deleted file mode 100644 index aada255cd71..00000000000 --- a/keyboards/kprepublic/bm68rgb/keymaps/peepeetee/config.h +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright 2021 peepeetee - * - * 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 . - */ -#pragma once - - -// #define MODS_SHIFT (get_mods() & MOD_MASK_SHIFT) -// #define MODS_CTRL (get_mods() & MOD_MASK_CTRL) -// #define MODS_ALT (get_mods() & MOD_MASK_ALT) - -// #define IS_COMMAND() (get_mods() == MOD_MASK_SHIFT) // Key combination that allows the use of magic commands (useful for debugging) - -// #define NO_DEBUG // Disable debugging -// #define NO_PRINT // Disable printing/debugging using hid_listen -// #define NO_ACTION_LAYER // Disable layers -// #define NO_ACTION_TAPPING // Disable tap dance and other tapping features -// #define NO_ACTION_ONESHOT // Disable one-shot modifiers -// #define NO_ACTION_MACRO // Disable old style macro handling: MACRO() & action_get_macro -// #define TERMINAL_HELP -// #define MOUSEKEY_INTERVAL 20 -// #define MOUSEKEY_DELAY 0 -// #define MOUSEKEY_TIME_TO_MAX 60 -// #define MOUSEKEY_MAX_SPEED 10 -// #define MOUSEKEY_WHEEL_DELAY 0 -#define FORCE_NKRO // NKRO by default requires to be turned on, this forces it on during keyboard startup regardless of EEPROM setting. NKRO can still be turned off but will be turned on again if the keyboard reboots. -// #define QMK_KEYS_PER_SCAN 4 // Allows sending more than one key per scan. By default, only one key event gets sent via process_record() per scan. This has little impact on most typing, but if you're doing a lot of chords, or your scan rate is slow to begin with, you can have some delay in processing key events. Each press and release is a separate event. For a keyboard with 1ms or so scan times, even a very fast typist isn't going to produce the 500 keystrokes a second needed to actually get more than a few ms of delay from this. But if you're doing chording on something with 3-4ms scan times? You probably want this. -// #define STRICT_LAYER_RELEASE // Force a key release to be evaluated using the current layer stack instead of remembering which layer it came from (used for advanced cases) -// #define LOCKING_SUPPORT_ENABLE // Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap -// #define LOCKING_RESYNC_ENABLE // Tries to keep switch state consistent with keyboard LED state - #define TAPPING_TERM 200 // How long before a tap becomes a hold, if set above 500, a key tapped during the tapping term will turn it into a hold too -// #define TAPPING_TERM_PER_KEY // Enables handling for per key TAPPING_TERM settings -// #define RETRO_TAPPING // Tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release -// #define TAPPING_TOGGLE 2 // How many taps before triggering the toggle -// #define PERMISSIVE_HOLD // Makes tap and hold keys trigger the hold if another key is pressed before releasing, even if it hasn't hit the TAPPING_TERM. See Permissive Hold for details -// #define IGNORE_MOD_TAP_INTERRUPT // Makes it possible to do rolling combos (zx) with keys that convert to other keys on hold, by enforcing the TAPPING_TERM for both keys. See Mod tap interrupt for details -// #define TAPPING_FORCE_HOLD // Makes it possible to use a dual role key as modifier shortly after having been tapped. See Hold after tap. Breaks any Tap Toggle functionality (TT or the One Shot Tap Toggle) -// #define LEADER_TIMEOUT 300 // How long before the leader key times out. If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the LEADER_PER_KEY_TIMING option, which resets the timeout after each key is tapped. -// #define LEADER_PER_KEY_TIMING // Sets the timer for leader key chords to run on each key press rather than overall -// #define LEADER_KEY_STRICT_KEY_PROCESSING // Disables keycode filtering for Mod-Tap and Layer-Tap keycodes. Eg, if you enable this, you would need to specify MT(MOD_CTL, KC_A) if you want to use KC_A. -// #define ONESHOT_TIMEOUT 300 // How long before oneshot times out -// #define ONESHOT_TAP_TOGGLE 2 // How many taps before oneshot toggle is triggered -// #define COMBO_COUNT 2 // Set this to the number of combos that you're using in the Combo feature. -// #define COMBO_TERM 200 // How long for the Combo keys to be detected. Defaults to TAPPING_TERM if not defined. -// #define TAP_CODE_DELAY 100 // Sets the delay between register_code and unregister_code, if you're having issues with it registering properly (common on VUSB boards). The value is in milliseconds. -// #define TAP_HOLD_CAPS_DELAY 80 // Sets the delay for Tap Hold keys (LT, MT) when using KC_CAPSLOCK keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher. - -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_ALPHAS_MODS // Sets the default mode, if none has been set -// #define RGBLIGHT_HUE_STEP 12 // Units to step when in/decreasing hue -// #define RGBLIGHT_SAT_STEP 25 // Units to step when in/decreasing saturation -// #define RGBLIGHT_VAL_STEP 12 // Units to step when in/decreasing value (brightness) -// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -// #define RGBLIGHT_ANIMATIONS // Run RGB animations -// #define RGBLIGHT_ANIMATIONS // Enable all additional animation modes. -// #define RGBLIGHT_EFFECT_ALTERNATING // Enable alternating animation mode. -// #define RGBLIGHT_EFFECT_BREATHING // Enable breathing animation mode. -// #define RGBLIGHT_EFFECT_CHRISTMAS // Enable christmas animation mode. -// #define RGBLIGHT_EFFECT_KNIGHT // Enable knight animation mode. -// #define RGBLIGHT_EFFECT_RAINBOW_MOOD // Enable rainbow mood animation mode. -// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL // Enable rainbow swirl animation mode. -// #define RGBLIGHT_EFFECT_RGB_TEST // Enable RGB test animation mode. -// #define RGBLIGHT_EFFECT_SNAKE // Enable snake animation mode. -// #define RGBLIGHT_EFFECT_STATIC_GRADIENT // Enable static gradient mode. - -// #define RGBLIGHT_EFFECT_BREATHE_CENTER // If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 -// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // The maximum brightness for the breathing mode. Valid values are 1 to 255 -// #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 1000 // How long to wait between light changes for the "Christmas" animation, in milliseconds -// #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 2 // The number of LEDs to group the red/green colors by for the "Christmas" animation -// #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM // The number of LEDs to have the "Knight" animation travel -// #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3 // The number of LEDs to light up for the "Knight" animation -// #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 0 // The number of LEDs to start the "Knight" animation from the start of the strip by -// #define RGBLIGHT_RAINBOW_SWIRL_RANGE 255 // Range adjustment for the rainbow swirl effect to get different swirls -// #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation - -// This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard - #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -// =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -// =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/kprepublic/bm68rgb/readme.md b/keyboards/kprepublic/bm68rgb/readme.md deleted file mode 100644 index f09efb1ab63..00000000000 --- a/keyboards/kprepublic/bm68rgb/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# bm68rgb - -![bm68rgb](https://i.imgur.com/uuYP8OIl.jpeg) - -A 65% hotswap in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) -* Hardware Supported: BM68 RGB -* Hardware Availability: [KP Republic](https://kprepublic.com/products/bm68rgb-bm68-rgb-65-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm68rgb:default - -Flashing example for this keyboard: - - make kprepublic/bm68rgb:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint to the left of the spacebar switch while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kprepublic/bm68rgb/rules.mk b/keyboards/kprepublic/bm68rgb/rules.mk deleted file mode 100644 index 96fc8f0b83f..00000000000 --- a/keyboards/kprepublic/bm68rgb/rules.mk +++ /dev/null @@ -1,26 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -AUDIO_ENABLE = no # Audio output -RGB_MATRIX_ENABLE = yes -RGB_MATRIX_DRIVER = WS2812 -LTO_ENABLE = yes - -LAYOUTS = 65_ansi diff --git a/keyboards/kprepublic/bm80/bm80.c b/keyboards/kprepublic/bm80/bm80.c deleted file mode 100644 index 8a0d26e87d9..00000000000 --- a/keyboards/kprepublic/bm80/bm80.c +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright 2021 peepeetee - * - * 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 . - */ - -#include "bm80.h" - -#ifdef RGB_MATRIX_ENABLE -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 0, NO_LED, 1, 2, 3, 4, NO_LED, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 }, - { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }, - { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 }, - { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 11, 62, NO_LED, NO_LED, NO_LED }, - /* ^ this one is f11*/ - { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED, 74, NO_LED, NO_LED, 75, NO_LED }, - { 76, 77, 78, NO_LED, NO_LED, 79, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, NO_LED, 85, 86 } - -// K0_0, K0_2, K0_3, K0_4, K0_5, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K3_C, K0_D, K0_E, K0_F, K0_10, -// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10, -// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10, -// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_D, -// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, K4_C, K4_F, -// K5_0, K5_1, K5_2, K5_5, K5_9, K5_A, K5_B, K5_C, K5_D, K5_F, K5_10 - - -// K0_0, KC_NO, K0_2, K0_3, K0_4, K0_5, KC_NO, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K0_D, K0_E, K0_F, K0_10 -// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10 -// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10 -// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_C, K3_D, KC_NO, KC_NO, KC_NO -// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, KC_NO, K4_C, KC_NO, KC_NO, K4_F, KC_NO -// K5_0, K5_1, K5_2, KC_NO, KC_NO, K5_5, KC_NO, KC_NO, KC_NO, K5_9, K5_A, K5_B, K5_C, K5_D, KC_NO, K5_F, K5_10 - - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ - * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ - * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ - * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ - * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ - -}, { - // LED Index to Physical Position - { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - */ - { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, - /* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ - * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ - */ - { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ - * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ - * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ - */ - { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, - /* - * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ - * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ - * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ - */ - { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, - /* - * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ - * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ - * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ - */ - { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } - /* - * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ - * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ -}, { - // LED Index to Flag - 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 9/*scroll lock*/, 1, - /* - * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ - * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ - * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ - */ - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, - /* - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ - * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ - * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, - /* - * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ - * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ - * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, - //caps lock is 1 instead of 1+8, this board has a dedicated led - /* - * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ - * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ - * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ - */ - 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, - /* - * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ - * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ - * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ - */ - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 - /* - * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ - * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ - * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ - */ -} }; - - -#endif diff --git a/keyboards/kprepublic/bm80/config.h b/keyboards/kprepublic/bm80/config.h deleted file mode 100644 index 584fdec9896..00000000000 --- a/keyboards/kprepublic/bm80/config.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -Copyright 2021 peepeetee - -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 . -*/ - -#pragma once - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0x4B50 //KP -#define PRODUCT_ID 0xEF83 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KPRepublic -#define PRODUCT BM80HSRGB - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * - */ -#define MATRIX_ROW_PINS { B3, B2, B1, B0, C6, C7 } -#define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4, D5, D3, D2, F5, F6, F7, D1, D0, B4, B5, B6 } -#define UNUSED_PINS - -/* COL2ROW, ROW2COL */ -#define DIODE_DIRECTION COL2ROW - - - - -#define LED_CAPS_LOCK_PIN E6 -#define LED_PIN_ON_STATE 0 - - -#define RGB_DI_PIN E2 -// The number of LEDs connected -#define DRIVER_LED_TOTAL 87 - -#ifdef RGB_DI_PIN -#define RGBLED_NUM 87 -#define RGB_MATRIX_KEYPRESSES // reacts to keypresses -//#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) -#define RGB_MATRIX_FRAMEBUFFER_EFFECTS -#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off -//#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) -#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) -// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 -#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set -#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set -#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_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -// does not work for some reason, might revisit - - - -#endif - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION diff --git a/keyboards/kprepublic/bm80/info.json b/keyboards/kprepublic/bm80/info.json deleted file mode 100644 index 8c7a0056b3d..00000000000 --- a/keyboards/kprepublic/bm80/info.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "keyboard_name": "bm80", - "url": "", - "maintainer": "peepeetee", - "layouts": { - "LAYOUT_tkl_ansi": { - "layout": [ - {"label":"K0_0 (B3,F0)", "x":0, "y":0}, - {"label":"K0_2 (B3,F4)", "x":2, "y":0}, - {"label":"K0_3 (B3,D7)", "x":3, "y":0}, - {"label":"K0_4 (B3,D6)", "x":4, "y":0}, - {"label":"K0_5 (B3,D4)", "x":5, "y":0}, - {"label":"K0_7 (B3,D3)", "x":6.5, "y":0}, - {"label":"K0_8 (B3,D2)", "x":7.5, "y":0}, - {"label":"K0_9 (B3,F5)", "x":8.5, "y":0}, - {"label":"K0_A (B3,F6)", "x":9.5, "y":0}, - {"label":"K0_B (B3,F7)", "x":11, "y":0}, - {"label":"K0_C (B3,D1)", "x":12, "y":0}, - {"label":"K3_C (B0,D1)", "x":13, "y":0}, - {"label":"K0_D (B3,D0)", "x":14, "y":0}, - {"label":"K0_E (B3,B4)", "x":15.25, "y":0}, - {"label":"K0_F (B3,B5)", "x":16.25, "y":0}, - {"label":"K0_10 (B3,B6)", "x":17.25, "y":0}, - {"label":"K1_0 (B2,F0)", "x":0, "y":1.5}, - {"label":"K1_1 (B2,F1)", "x":1, "y":1.5}, - {"label":"K1_2 (B2,F4)", "x":2, "y":1.5}, - {"label":"K1_3 (B2,D7)", "x":3, "y":1.5}, - {"label":"K1_4 (B2,D6)", "x":4, "y":1.5}, - {"label":"K1_5 (B2,D4)", "x":5, "y":1.5}, - {"label":"K1_6 (B2,D5)", "x":6, "y":1.5}, - {"label":"K1_7 (B2,D3)", "x":7, "y":1.5}, - {"label":"K1_8 (B2,D2)", "x":8, "y":1.5}, - {"label":"K1_9 (B2,F5)", "x":9, "y":1.5}, - {"label":"K1_A (B2,F6)", "x":10, "y":1.5}, - {"label":"K1_B (B2,F7)", "x":11, "y":1.5}, - {"label":"K1_C (B2,D1)", "x":12, "y":1.5}, - {"label":"K1_D (B2,D0)", "x":13, "y":1.5, "w":2}, - {"label":"K1_E (B2,B4)", "x":15.25, "y":1.5}, - {"label":"K1_F (B2,B5)", "x":16.25, "y":1.5}, - {"label":"K1_10 (B2,B6)", "x":17.25, "y":1.5}, - {"label":"K2_0 (B1,F0)", "x":0, "y":2.5, "w":1.5}, - {"label":"K2_1 (B1,F1)", "x":1.5, "y":2.5}, - {"label":"K2_2 (B1,F4)", "x":2.5, "y":2.5}, - {"label":"K2_3 (B1,D7)", "x":3.5, "y":2.5}, - {"label":"K2_4 (B1,D6)", "x":4.5, "y":2.5}, - {"label":"K2_5 (B1,D4)", "x":5.5, "y":2.5}, - {"label":"K2_6 (B1,D5)", "x":6.5, "y":2.5}, - {"label":"K2_7 (B1,D3)", "x":7.5, "y":2.5}, - {"label":"K2_8 (B1,D2)", "x":8.5, "y":2.5}, - {"label":"K2_9 (B1,F5)", "x":9.5, "y":2.5}, - {"label":"K2_A (B1,F6)", "x":10.5, "y":2.5}, - {"label":"K2_B (B1,F7)", "x":11.5, "y":2.5}, - {"label":"K2_C (B1,D1)", "x":12.5, "y":2.5}, - {"label":"K2_D (B1,D0)", "x":13.5, "y":2.5, "w":1.5}, - {"label":"K2_E (B1,B4)", "x":15.25, "y":2.5}, - {"label":"K2_F (B1,B5)", "x":16.25, "y":2.5}, - {"label":"K2_10 (B1,B6)", "x":17.25, "y":2.5}, - {"label":"K3_0 (B0,F0)", "x":0, "y":3.5, "w":1.75}, - {"label":"K3_1 (B0,F1)", "x":1.75, "y":3.5}, - {"label":"K3_2 (B0,F4)", "x":2.75, "y":3.5}, - {"label":"K3_3 (B0,D7)", "x":3.75, "y":3.5}, - {"label":"K3_4 (B0,D6)", "x":4.75, "y":3.5}, - {"label":"K3_5 (B0,D4)", "x":5.75, "y":3.5}, - {"label":"K3_6 (B0,D5)", "x":6.75, "y":3.5}, - {"label":"K3_7 (B0,D3)", "x":7.75, "y":3.5}, - {"label":"K3_8 (B0,D2)", "x":8.75, "y":3.5}, - {"label":"K3_9 (B0,F5)", "x":9.75, "y":3.5}, - {"label":"K3_A (B0,F6)", "x":10.75, "y":3.5}, - {"label":"K3_B (B0,F7)", "x":11.75, "y":3.5}, - {"label":"K3_D (B0,D0)", "x":12.75, "y":3.5, "w":2.25}, - {"label":"K4_0 (C6,F0)", "x":0, "y":4.5, "w":2.25}, - {"label":"K4_1 (C6,F1)", "x":2.25, "y":4.5}, - {"label":"K4_2 (C6,F4)", "x":3.25, "y":4.5}, - {"label":"K4_3 (C6,D7)", "x":4.25, "y":4.5}, - {"label":"K4_4 (C6,D6)", "x":5.25, "y":4.5}, - {"label":"K4_5 (C6,D4)", "x":6.25, "y":4.5}, - {"label":"K4_6 (C6,D5)", "x":7.25, "y":4.5}, - {"label":"K4_7 (C6,D3)", "x":8.25, "y":4.5}, - {"label":"K4_8 (C6,D2)", "x":9.25, "y":4.5}, - {"label":"K4_9 (C6,F5)", "x":10.25, "y":4.5}, - {"label":"K4_A (C6,F6)", "x":11.25, "y":4.5}, - {"label":"K4_C (C6,D1)", "x":12.25, "y":4.5, "w":2.75}, - {"label":"K4_F (C6,B5)", "x":16.25, "y":4.5}, - {"label":"K5_0 (C7,F0)", "x":0, "y":5.5, "w":1.25}, - {"label":"K5_1 (C7,F1)", "x":1.25, "y":5.5, "w":1.25}, - {"label":"K5_2 (C7,F4)", "x":2.5, "y":5.5, "w":1.25}, - {"label":"K5_5 (C7,D4)", "x":3.75, "y":5.5, "w":6.25}, - {"label":"K5_9 (C7,F5)", "x":10, "y":5.5, "w":1.25}, - {"label":"K5_A (C7,F6)", "x":11.25, "y":5.5, "w":1.25}, - {"label":"K5_B (C7,F7)", "x":12.5, "y":5.5, "w":1.25}, - {"label":"K5_C (C7,D1)", "x":13.75, "y":5.5, "w":1.25}, - {"label":"K5_D (C7,D0)", "x":15.25, "y":5.5}, - {"label":"K5_F (C7,B5)", "x":16.25, "y":5.5}, - {"label":"K5_10 (C7,B6)", "x":17.25, "y":5.5} - ] - } - } -} \ No newline at end of file diff --git a/keyboards/kprepublic/bm80/readme.md b/keyboards/kprepublic/bm80/readme.md deleted file mode 100644 index a0d8e8cf9a4..00000000000 --- a/keyboards/kprepublic/bm80/readme.md +++ /dev/null @@ -1,30 +0,0 @@ -# bm80 - -![bm80](https://i.imgur.com/AqjEjOi.jpeg) - -A tkl, hotswap, in switch RGB keyboard from KPRepublic. - -* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) -* Hardware Supported: BM80 -* Hardware Availability: [KP Republic](https://kprepublic.com/collections/new-arrival/products/bm80rgb-bm80-rgb-80-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) - -Make example for this keyboard (after setting up your build environment): - - make kprepublic/bm80:default - -Flashing example for this keyboard: - - make kprepublic/bm80:default:flash - -To reset the board into bootloader mode, do one of the following: - -* Short the two-pad footprint between the "delete" key and the "end" key while the board is plugged in -* Press the switch labled RST on the back of the PCB, near the MCU, while the board is plugged in -* Hold the Esc key while connecting the USB cable (also erases persistent settings) - -All of the RGB matrix effects are enabled by default. To disable specific ones, see [this section](https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects) for more information. - - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). - - diff --git a/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c b/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c new file mode 100644 index 00000000000..3455efd84c5 --- /dev/null +++ b/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.c @@ -0,0 +1,142 @@ +/* Copyright 2021 peepeetee + * + * 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 . + */ + +#include "bm80hsrgb.h" + +#ifdef RGB_MATRIX_ENABLE +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 0, NO_LED, 1, 2, 3, 4, NO_LED, 5, 6, 7, 8, 9, 10, 12, 13, 14, 15 }, + { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32 }, + { 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49 }, + { 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 11, 62, NO_LED, NO_LED, NO_LED }, + /* ^ this one is f11*/ + { 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, NO_LED, 74, NO_LED, NO_LED, 75, NO_LED }, + { 76, 77, 78, NO_LED, NO_LED, 79, NO_LED, NO_LED, NO_LED, 80, 81, 82, 83, 84, NO_LED, 85, 86 } + +// K0_0, K0_2, K0_3, K0_4, K0_5, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K3_C, K0_D, K0_E, K0_F, K0_10, +// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10, +// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10, +// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_D, +// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, K4_C, K4_F, +// K5_0, K5_1, K5_2, K5_5, K5_9, K5_A, K5_B, K5_C, K5_D, K5_F, K5_10 + + +// K0_0, KC_NO, K0_2, K0_3, K0_4, K0_5, KC_NO, K0_7, K0_8, K0_9, K0_A, K0_B, K0_C, K0_D, K0_E, K0_F, K0_10 +// K1_0, K1_1, K1_2, K1_3, K1_4, K1_5, K1_6, K1_7, K1_8, K1_9, K1_A, K1_B, K1_C, K1_D, K1_E, K1_F, K1_10 +// K2_0, K2_1, K2_2, K2_3, K2_4, K2_5, K2_6, K2_7, K2_8, K2_9, K2_A, K2_B, K2_C, K2_D, K2_E, K2_F, K2_10 +// K3_0, K3_1, K3_2, K3_3, K3_4, K3_5, K3_6, K3_7, K3_8, K3_9, K3_A, K3_B, K3_C, K3_D, KC_NO, KC_NO, KC_NO +// K4_0, K4_1, K4_2, K4_3, K4_4, K4_5, K4_6, K4_7, K4_8, K4_9, K4_A, KC_NO, K4_C, KC_NO, KC_NO, K4_F, KC_NO +// K5_0, K5_1, K5_2, KC_NO, KC_NO, K5_5, KC_NO, KC_NO, KC_NO, K5_9, K5_A, K5_B, K5_C, K5_D, KC_NO, K5_F, K5_10 + + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ + * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ └───┴───┴───┘ + * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤     ┌───┐ + * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ + * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ + +}, { + // LED Index to Physical Position + { 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 }, { 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 }, + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + */ + { 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 }, { 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 }, { 217, 20 }, + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ + */ + { 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 }, { 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 }, { 217, 30 }, + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ + * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ + * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ + */ + { 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 }, { 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 }, + /* + * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ + * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ + * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ + */ + { 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 }, { 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 }, + /* + * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ + * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ + * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ + */ + { 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 }, { 193, 59 }, { 205, 59 }, { 217, 59 } + /* + * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ + * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ +}, { + // LED Index to Flag + 1, 4, 4, 4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 1, 9/*scroll lock*/, 1, + /* + * ┌───┐   ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐ + * │ 0 │   │ 1 │ 2 │ 3 │ 4 │ │ 5 │ 6 │ 7 │ 8 │ │ 9 │ 10│ 11│ 12│ │ 13│ 14│ 15│ + * └───┘   └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘ + */ + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, + /* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ + * │ 16│ 17│ 18│ 19│ 20│ 21│ 22│ 23│ 24│ 25│ 26│ 27│ 28│  29 │ │ 30│ 31│ 32│ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───────┘ └───┴───┴───┘ + */ + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, + /* + * ┌─────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐ ┌───┬───┬───┐ + * │  33 │ 34│ 35│ 36│ 37│ 38│ 39│ 40│ 41│ 42│ 43│ 44│ 45│  46 │ │ 47│ 48│ 49│ + * └─────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴─────┘ └───┴───┴───┘ + */ + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, + //caps lock is 1 instead of 1+8, this board has a dedicated led + /* + * ┌──────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬────────┐ + * │ 50  │ 51│ 52│ 53│ 54│ 55│ 56│ 57│ 58│ 59│ 60│ 61│   62  │ + * └──────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴────────┘ + */ + 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, + /* + * ┌────────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬──────────┐     ┌───┐ + * │ 63   │ 64│ 65│ 66│ 67│ 68│ 69│ 70│ 71│ 72│ 73│    74  │     │ 75│ + * └────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴──────────┘  └───┘ + */ + 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1 + /* + * ┌────┬────┬────┬────────────────────────┬────┬────┬────┬────┐ ┌───┬───┬───┐ + * │ 76 │ 77 │ 78 │           79           │ 80 │ 81 │ 82 │ 83 │ │ 84│ 85│ 86│ + * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ + */ +} }; + + +#endif diff --git a/keyboards/kprepublic/bm80/bm80.h b/keyboards/kprepublic/bm80hsrgb/bm80hsrgb.h similarity index 100% rename from keyboards/kprepublic/bm80/bm80.h rename to keyboards/kprepublic/bm80hsrgb/bm80hsrgb.h diff --git a/keyboards/kprepublic/bm80hsrgb/config.h b/keyboards/kprepublic/bm80hsrgb/config.h new file mode 100644 index 00000000000..b1a2ad23a1d --- /dev/null +++ b/keyboards/kprepublic/bm80hsrgb/config.h @@ -0,0 +1,142 @@ +/* +Copyright 2021 peepeetee + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B50 //KP +#define PRODUCT_ID 0xEF83 +#define DEVICE_VER 0x0001 +#define MANUFACTURER KPRepublic +#define PRODUCT BM80HSRGB + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B3, B2, B1, B0, C6, C7 } +#define MATRIX_COL_PINS { F0, F1, F4, D7, D6, D4, D5, D3, D2, F5, F6, F7, D1, D0, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + + + + +#define LED_CAPS_LOCK_PIN E6 +#define LED_PIN_ON_STATE 0 + + +#define RGB_DI_PIN E2 +// The number of LEDs connected +#define DRIVER_LED_TOTAL 87 + +#ifdef RGB_DI_PIN +#define RGBLED_NUM 87 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +//#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_TIMEOUT 0 // number of milliseconds to wait until rgb automatically turns off +//#define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set +#define RGB_MATRIX_STARTUP_HUE 0 // Sets the default hue value, if none has been set +#define RGB_MATRIX_STARTUP_SAT 255 // Sets the default saturation value, if none has been set +#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 ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +// # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +// does not work for some reason, might revisit + + + +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION diff --git a/keyboards/kprepublic/bm80hsrgb/info.json b/keyboards/kprepublic/bm80hsrgb/info.json new file mode 100644 index 00000000000..f46024a93fc --- /dev/null +++ b/keyboards/kprepublic/bm80hsrgb/info.json @@ -0,0 +1,98 @@ +{ + "keyboard_name": "BM80HSRGB", + "url": "", + "maintainer": "peepeetee", + "layouts": { + "LAYOUT_tkl_ansi": { + "layout": [ + {"label":"K0_0 (B3,F0)", "x":0, "y":0}, + {"label":"K0_2 (B3,F4)", "x":2, "y":0}, + {"label":"K0_3 (B3,D7)", "x":3, "y":0}, + {"label":"K0_4 (B3,D6)", "x":4, "y":0}, + {"label":"K0_5 (B3,D4)", "x":5, "y":0}, + {"label":"K0_7 (B3,D3)", "x":6.5, "y":0}, + {"label":"K0_8 (B3,D2)", "x":7.5, "y":0}, + {"label":"K0_9 (B3,F5)", "x":8.5, "y":0}, + {"label":"K0_A (B3,F6)", "x":9.5, "y":0}, + {"label":"K0_B (B3,F7)", "x":11, "y":0}, + {"label":"K0_C (B3,D1)", "x":12, "y":0}, + {"label":"K3_C (B0,D1)", "x":13, "y":0}, + {"label":"K0_D (B3,D0)", "x":14, "y":0}, + {"label":"K0_E (B3,B4)", "x":15.25, "y":0}, + {"label":"K0_F (B3,B5)", "x":16.25, "y":0}, + {"label":"K0_10 (B3,B6)", "x":17.25, "y":0}, + {"label":"K1_0 (B2,F0)", "x":0, "y":1.5}, + {"label":"K1_1 (B2,F1)", "x":1, "y":1.5}, + {"label":"K1_2 (B2,F4)", "x":2, "y":1.5}, + {"label":"K1_3 (B2,D7)", "x":3, "y":1.5}, + {"label":"K1_4 (B2,D6)", "x":4, "y":1.5}, + {"label":"K1_5 (B2,D4)", "x":5, "y":1.5}, + {"label":"K1_6 (B2,D5)", "x":6, "y":1.5}, + {"label":"K1_7 (B2,D3)", "x":7, "y":1.5}, + {"label":"K1_8 (B2,D2)", "x":8, "y":1.5}, + {"label":"K1_9 (B2,F5)", "x":9, "y":1.5}, + {"label":"K1_A (B2,F6)", "x":10, "y":1.5}, + {"label":"K1_B (B2,F7)", "x":11, "y":1.5}, + {"label":"K1_C (B2,D1)", "x":12, "y":1.5}, + {"label":"K1_D (B2,D0)", "x":13, "y":1.5, "w":2}, + {"label":"K1_E (B2,B4)", "x":15.25, "y":1.5}, + {"label":"K1_F (B2,B5)", "x":16.25, "y":1.5}, + {"label":"K1_10 (B2,B6)", "x":17.25, "y":1.5}, + {"label":"K2_0 (B1,F0)", "x":0, "y":2.5, "w":1.5}, + {"label":"K2_1 (B1,F1)", "x":1.5, "y":2.5}, + {"label":"K2_2 (B1,F4)", "x":2.5, "y":2.5}, + {"label":"K2_3 (B1,D7)", "x":3.5, "y":2.5}, + {"label":"K2_4 (B1,D6)", "x":4.5, "y":2.5}, + {"label":"K2_5 (B1,D4)", "x":5.5, "y":2.5}, + {"label":"K2_6 (B1,D5)", "x":6.5, "y":2.5}, + {"label":"K2_7 (B1,D3)", "x":7.5, "y":2.5}, + {"label":"K2_8 (B1,D2)", "x":8.5, "y":2.5}, + {"label":"K2_9 (B1,F5)", "x":9.5, "y":2.5}, + {"label":"K2_A (B1,F6)", "x":10.5, "y":2.5}, + {"label":"K2_B (B1,F7)", "x":11.5, "y":2.5}, + {"label":"K2_C (B1,D1)", "x":12.5, "y":2.5}, + {"label":"K2_D (B1,D0)", "x":13.5, "y":2.5, "w":1.5}, + {"label":"K2_E (B1,B4)", "x":15.25, "y":2.5}, + {"label":"K2_F (B1,B5)", "x":16.25, "y":2.5}, + {"label":"K2_10 (B1,B6)", "x":17.25, "y":2.5}, + {"label":"K3_0 (B0,F0)", "x":0, "y":3.5, "w":1.75}, + {"label":"K3_1 (B0,F1)", "x":1.75, "y":3.5}, + {"label":"K3_2 (B0,F4)", "x":2.75, "y":3.5}, + {"label":"K3_3 (B0,D7)", "x":3.75, "y":3.5}, + {"label":"K3_4 (B0,D6)", "x":4.75, "y":3.5}, + {"label":"K3_5 (B0,D4)", "x":5.75, "y":3.5}, + {"label":"K3_6 (B0,D5)", "x":6.75, "y":3.5}, + {"label":"K3_7 (B0,D3)", "x":7.75, "y":3.5}, + {"label":"K3_8 (B0,D2)", "x":8.75, "y":3.5}, + {"label":"K3_9 (B0,F5)", "x":9.75, "y":3.5}, + {"label":"K3_A (B0,F6)", "x":10.75, "y":3.5}, + {"label":"K3_B (B0,F7)", "x":11.75, "y":3.5}, + {"label":"K3_D (B0,D0)", "x":12.75, "y":3.5, "w":2.25}, + {"label":"K4_0 (C6,F0)", "x":0, "y":4.5, "w":2.25}, + {"label":"K4_1 (C6,F1)", "x":2.25, "y":4.5}, + {"label":"K4_2 (C6,F4)", "x":3.25, "y":4.5}, + {"label":"K4_3 (C6,D7)", "x":4.25, "y":4.5}, + {"label":"K4_4 (C6,D6)", "x":5.25, "y":4.5}, + {"label":"K4_5 (C6,D4)", "x":6.25, "y":4.5}, + {"label":"K4_6 (C6,D5)", "x":7.25, "y":4.5}, + {"label":"K4_7 (C6,D3)", "x":8.25, "y":4.5}, + {"label":"K4_8 (C6,D2)", "x":9.25, "y":4.5}, + {"label":"K4_9 (C6,F5)", "x":10.25, "y":4.5}, + {"label":"K4_A (C6,F6)", "x":11.25, "y":4.5}, + {"label":"K4_C (C6,D1)", "x":12.25, "y":4.5, "w":2.75}, + {"label":"K4_F (C6,B5)", "x":16.25, "y":4.5}, + {"label":"K5_0 (C7,F0)", "x":0, "y":5.5, "w":1.25}, + {"label":"K5_1 (C7,F1)", "x":1.25, "y":5.5, "w":1.25}, + {"label":"K5_2 (C7,F4)", "x":2.5, "y":5.5, "w":1.25}, + {"label":"K5_5 (C7,D4)", "x":3.75, "y":5.5, "w":6.25}, + {"label":"K5_9 (C7,F5)", "x":10, "y":5.5, "w":1.25}, + {"label":"K5_A (C7,F6)", "x":11.25, "y":5.5, "w":1.25}, + {"label":"K5_B (C7,F7)", "x":12.5, "y":5.5, "w":1.25}, + {"label":"K5_C (C7,D1)", "x":13.75, "y":5.5, "w":1.25}, + {"label":"K5_D (C7,D0)", "x":15.25, "y":5.5}, + {"label":"K5_F (C7,B5)", "x":16.25, "y":5.5}, + {"label":"K5_10 (C7,B6)", "x":17.25, "y":5.5} + ] + } + } +} diff --git a/keyboards/kprepublic/bm80/keymaps/default/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/default/keymap.c rename to keyboards/kprepublic/bm80hsrgb/keymaps/default/keymap.c diff --git a/keyboards/kprepublic/bm80/keymaps/default/readme.md b/keyboards/kprepublic/bm80hsrgb/keymaps/default/readme.md similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/default/readme.md rename to keyboards/kprepublic/bm80hsrgb/keymaps/default/readme.md diff --git a/keyboards/kprepublic/bm80/keymaps/peepeetee/config.h b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/peepeetee/config.h rename to keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/config.h diff --git a/keyboards/kprepublic/bm80/keymaps/peepeetee/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/peepeetee/keymap.c rename to keyboards/kprepublic/bm80hsrgb/keymaps/peepeetee/keymap.c diff --git a/keyboards/kprepublic/bm80/keymaps/via/keymap.c b/keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/via/keymap.c rename to keyboards/kprepublic/bm80hsrgb/keymaps/via/keymap.c diff --git a/keyboards/kprepublic/bm80/keymaps/via/readme.md b/keyboards/kprepublic/bm80hsrgb/keymaps/via/readme.md similarity index 100% rename from keyboards/kprepublic/bm80/keymaps/via/readme.md rename to keyboards/kprepublic/bm80hsrgb/keymaps/via/readme.md diff --git a/keyboards/kprepublic/bm80hsrgb/keymaps/via/rules.mk b/keyboards/kprepublic/bm80hsrgb/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/kprepublic/bm80hsrgb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kprepublic/bm80hsrgb/readme.md b/keyboards/kprepublic/bm80hsrgb/readme.md new file mode 100644 index 00000000000..f48af7390c6 --- /dev/null +++ b/keyboards/kprepublic/bm80hsrgb/readme.md @@ -0,0 +1,30 @@ +# BM80HSRGB + +![BM80HSRGB](https://i.imgur.com/AqjEjOi.jpeg) + +A tkl, hotswap, in switch RGB keyboard from KPRepublic. + +* Keyboard Maintainer: [peepeetee](https://github.com/peepeetee) +* Hardware Supported: BM80HSRGB +* Hardware Availability: [KP Republic](https://kprepublic.com/collections/new-arrival/products/bm80rgb-bm80-rgb-80-hot-swappable-custom-mechanical-keyboard-pcb-programmed-qmk-via-firmware-full-rgb-switch-underglow-type-c) + +Make example for this keyboard (after setting up your build environment): + + make kprepublic/bm80hsrgb:default + +Flashing example for this keyboard: + + make kprepublic/bm80hsrgb:default:flash + +To reset the board into bootloader mode, do one of the following: + +* Short the two-pad footprint between the "delete" key and the "end" key while the board is plugged in +* Press the switch labled RST on the back of the PCB, near the MCU, while the board is plugged in +* Hold the Esc key while connecting the USB cable (also erases persistent settings) + +All of the RGB matrix effects are enabled by default. To disable specific ones, see [this section](https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects) for more information. + + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + + diff --git a/keyboards/kprepublic/bm80/rules.mk b/keyboards/kprepublic/bm80hsrgb/rules.mk similarity index 100% rename from keyboards/kprepublic/bm80/rules.mk rename to keyboards/kprepublic/bm80hsrgb/rules.mk diff --git a/keyboards/kprepublic/cospad/rules.mk b/keyboards/kprepublic/cospad/rules.mk index 211374d914d..d967da6c057 100644 --- a/keyboards/kprepublic/cospad/rules.mk +++ b/keyboards/kprepublic/cospad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kprepublic/jj40/keymaps/cockpit/readme.md b/keyboards/kprepublic/jj40/keymaps/cockpit/readme.md index 766a3c93b24..340c6924ee1 100644 --- a/keyboards/kprepublic/jj40/keymaps/cockpit/readme.md +++ b/keyboards/kprepublic/jj40/keymaps/cockpit/readme.md @@ -48,8 +48,8 @@ ```bash cd qmk_firmware -make jj40:cockpit -bootloadHID .build/jj40_cockpit.hex +make kprepublic/jj40:cockpit +bootloadHID .build/kprepublic_jj40_cockpit.hex ``` _if you're getting permission errors use sudo_ diff --git a/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk b/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk index 187b59675e9..cc9508d7d6f 100644 --- a/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk +++ b/keyboards/kprepublic/jj40/keymaps/fun40/rules.mk @@ -1,6 +1,6 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/kprepublic/jj40/keymaps/waples/readme.md b/keyboards/kprepublic/jj40/keymaps/waples/readme.md index 91b1094e573..e9382d89f82 100644 --- a/keyboards/kprepublic/jj40/keymaps/waples/readme.md +++ b/keyboards/kprepublic/jj40/keymaps/waples/readme.md @@ -11,7 +11,7 @@ I currently have the following layers in my keymap: * Dual (adjust) ### Note to self: -YOU NEED TO USE [bootloadHID -r jj40_waples.hex](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jj40) +YOU NEED TO USE [bootloadHID -r kprepublic_jj40_waples.hex](https://github.com/qmk/qmk_firmware/tree/master/keyboards/jj40) ## the stuff below is out of date and I think about removing them from this readme diff --git a/keyboards/kprepublic/jj40/keymaps/waples/rules.mk b/keyboards/kprepublic/jj40/keymaps/waples/rules.mk index e75ff3b8b5b..b9b67d1c739 100644 --- a/keyboards/kprepublic/jj40/keymaps/waples/rules.mk +++ b/keyboards/kprepublic/jj40/keymaps/waples/rules.mk @@ -1,5 +1,5 @@ # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/kprepublic/jj50/rules.mk b/keyboards/kprepublic/jj50/rules.mk index 69dcae078ca..7e1bf6c45ee 100644 --- a/keyboards/kprepublic/jj50/rules.mk +++ b/keyboards/kprepublic/jj50/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ktec/daisy/rules.mk b/keyboards/ktec/daisy/rules.mk index f4596264227..3fe754c12a7 100644 --- a/keyboards/ktec/daisy/rules.mk +++ b/keyboards/ktec/daisy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ktec/ergodone/config.h b/keyboards/ktec/ergodone/config.h index 39e0ae8c756..db626ab8083 100644 --- a/keyboards/ktec/ergodone/config.h +++ b/keyboards/ktec/ergodone/config.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_ERGODONE_CONFIG_H -#define ERGODOX_ERGODONE_CONFIG_H +#pragma once #include "config_common.h" @@ -77,5 +76,3 @@ //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION //#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ktec/ergodone/ergodone.h b/keyboards/ktec/ergodone/ergodone.h index 89edb8a0b55..77e49685436 100644 --- a/keyboards/ktec/ergodone/ergodone.h +++ b/keyboards/ktec/ergodone/ergodone.h @@ -1,5 +1,4 @@ -#ifndef ERGODOX_ERGODONE_H -#define ERGODOX_ERGODONE_H +#pragma once #include "quantum.h" #include @@ -64,116 +63,94 @@ inline void ergodox_right_led_3_set(uint8_t n) {} inline void ergodox_right_led_set(uint8_t l, uint8_t n) {} inline void ergodox_led_all_set(uint8_t n) {} -/* - * LEFT HAND: LINES 76-83 - * RIGHT HAND: LINES 85-92 - */ -#define LAYOUT_ergodox( \ - \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k54, \ - k53,k52,k51, \ - \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ - { k40, k41, k42, k43, k44, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4A, k4B, k4C, k4D }, \ - { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ - } +#define XXX KC_NO -/* - * LEFT HAND: LINES 110-117 - * RIGHT HAND: LINES 119-126 - */ -#define LAYOUT_ergodox_80( \ - \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k45,k46,k54, \ - k53,k52,k51, \ - \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59,k47,k48, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ - { k20, k21, k22, k23, k24, k25, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ - { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ - { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ - } +#define LAYOUT_ergodox( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k42, k43, k44, \ + k55, k56, \ + k54, \ + k53, k52, k51, \ +\ + k07, k08, k09, k0A, k0B, k0C, k0D, \ + k17, k18, k19, k1A, k1B, k1C, k1D, \ + k28, k29, k2A, k2B, k2C, k2D, \ + k37, k38, k39, k3A, k3B, k3C, k3D, \ + k49, k4A, k4B, k4C, k4D, \ + k57, k58, \ + k59, \ + k5C, k5B, k5A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, XXX, XXX, XXX, XXX, k49, k4A, k4B, k4C, k4D }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \ +} -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodox_pretty( \ - \ - L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ - L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ - L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ - L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ - L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ - L55,L56, R50,R51, \ - L54, R52, \ - L53,L52,L51, R55,R54,R53 ) \ - \ - /* matrix positions */ \ - { \ - { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \ - { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \ - { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \ - { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \ - { L40,L41,L42,L43,L44,KC_NO,KC_NO, KC_NO,KC_NO,R42,R43,R44,R45,R46 }, \ - { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ +#define LAYOUT_ergodox_80( \ + k00, k01, k02, k03, k04, k05, k06, \ + k10, k11, k12, k13, k14, k15, k16, \ + k20, k21, k22, k23, k24, k25, \ + k30, k31, k32, k33, k34, k35, k36, \ + k40, k41, k42, k43, k44, \ + k55, k56, \ + k45, k46, k54, \ + k53, k52, k51, \ +\ + k07, k08, k09, k0A, k0B, k0C, k0D, \ + k17, k18, k19, k1A, k1B, k1C, k1D, \ + k28, k29, k2A, k2B, k2C, k2D, \ + k37, k38, k39, k3A, k3B, k3C, k3D, \ + k49, k4A, k4B, k4C, k4D, \ + k57, k58, \ + k59, k47, k48, \ + k5C, k5B, k5A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { XXX, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, XXX } \ } -/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */ -#define LAYOUT_ergodox_pretty_80( \ - \ - L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ - L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \ - L20,L21,L22,L23,L24,L25, R21,R22,R23,R24,R25,R26, \ - L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36, \ - L40,L41,L42,L43,L44, R42,R43,R44,R45,R46, \ - L55,L56, R50,R51, \ - L45,L46,L54, R52,R40,R41, \ - L53,L52,L51, R55,R54,R53 ) \ - \ - /* matrix positions */ \ - { \ - { L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06 }, \ - { L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16 }, \ - { L20,L21,L22,L23,L24,L25,KC_NO, KC_NO,R21,R22,R23,R24,R25,R26 }, \ - { L30,L31,L32,L33,L34,L35,L36, R30,R31,R32,R33,R34,R35,R36 }, \ - { L40,L41,L42,L43,L44,L45,L46, R40,R41,R42,R43,R44,R45,R46 }, \ - { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ - } +#define LAYOUT_ergodox_pretty( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, R42, R43, R44, R45, R46, \ + L55, L56, R50, R51, \ + L54, R52, \ + L53, L52, L51, R55, R54, R53 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06 }, \ + { L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16 }, \ + { L20, L21, L22, L23, L24, L25, XXX, XXX, R21, R22, R23, R24, R25, R26 }, \ + { L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 }, \ + { L40, L41, L42, L43, L44, XXX, XXX, XXX, XXX, R42, R43, R44, R45, R46 }, \ + { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \ +} -#endif +#define LAYOUT_ergodox_pretty_80( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, R42, R43, R44, R45, R46, \ + L55, L56, R50, R51, \ + L45, L46, L54, R52, R40, R41, \ + L53, L52, L51, R55, R54, R53 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06 }, \ + { L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16 }, \ + { L20, L21, L22, L23, L24, L25, XXX, XXX, R21, R22, R23, R24, R25, R26 }, \ + { L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36 }, \ + { L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 }, \ + { XXX, L51, L52, L53, L54, L55, L56, R50, R51, R52, R53, R54, R55, XXX } \ +} diff --git a/keyboards/ktec/ergodone/expander.h b/keyboards/ktec/ergodone/expander.h index 8676fed6931..071570c4084 100644 --- a/keyboards/ktec/ergodone/expander.h +++ b/keyboards/ktec/ergodone/expander.h @@ -1,5 +1,4 @@ -#ifndef EXPANDER_H -#define EXPANDER_H +#pragma once #include #include "matrix.h" @@ -44,5 +43,3 @@ uint8_t expander_get_col(uint8_t col); matrix_row_t expander_read_row(void); void expander_unselect_rows(void); void expander_select_row(uint8_t row); - -#endif diff --git a/keyboards/ktec/ergodone/readme.md b/keyboards/ktec/ergodone/readme.md index 7998a274f03..c06222b2863 100644 --- a/keyboards/ktec/ergodone/readme.md +++ b/keyboards/ktec/ergodone/readme.md @@ -25,4 +25,4 @@ The ErgoDone uses a customized HID bootloader rather than the Teensy one. It doe ![Ergodone Flash Mode](https://i.imgur.com/sNivAnr.jpg) 2. To flash the .hex file, use the `hid_bootloader_cli` utlity from the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) (as of 2017-10-03, only [this old version](https://github.com/kairyu/tkg-toolkit/blob/b14c67ca8bc84c07e5fc6b2e01ae4002b808243a/windows/bin/hid_bootloader_cli.exe) works under Windows): - hid_bootloader_cli -mmcu=atmega32u4 ergodone_default.hex + hid_bootloader_cli -mmcu=atmega32u4 ktec_ergodone_default.hex diff --git a/keyboards/ktec/staryu/rules.mk b/keyboards/ktec/staryu/rules.mk index 3ae6f05072c..b61eb43c32e 100755 --- a/keyboards/ktec/staryu/rules.mk +++ b/keyboards/ktec/staryu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/kv/revt/rules.mk b/keyboards/kv/revt/rules.mk index 3412337f509..abb8d96be0a 100644 --- a/keyboards/kv/revt/rules.mk +++ b/keyboards/kv/revt/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/kwub/bloop/rules.mk b/keyboards/kwub/bloop/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/kwub/bloop/rules.mk +++ b/keyboards/kwub/bloop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/labyrinth75/rules.mk b/keyboards/labyrinth75/rules.mk index aad29c7f95e..dd9202fdc70 100644 --- a/keyboards/labyrinth75/rules.mk +++ b/keyboards/labyrinth75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/laptreus/laptreus.h b/keyboards/laptreus/laptreus.h index f367c13dc37..2e7932e4944 100644 --- a/keyboards/laptreus/laptreus.h +++ b/keyboards/laptreus/laptreus.h @@ -1,26 +1,19 @@ -#ifndef LAPTREUS_H -#define LAPTREUS_H +#pragma once #include "quantum.h" #include "outputselect.h" -/* -// This a shortcut to help you visually see your layout. -// The first section contains all of the arguments -// The second converts the arguments into a two-dimensional array -*/ +#define XXX KC_NO + #define LAYOUT( \ - A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ - B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ - C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ - D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ -) \ -{ \ - {A2, A3, A4, A5, A6, A7, A8, A9, A10, A11}, \ - {B2, B3, B4, B5, B6, B7, B8, B9, B10, B11}, \ - {C2, C3, C4, C5, C6, C7, C8, C9, C10, C11}, \ - {D2, D3, D4, D5, D6, D7, D8, D9, D10, D11}, \ - {A1, B1, C1, D1, KC_NO, KC_NO, D12, C12, B12, A12} \ + k40, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k49, \ + k41, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k48, \ + k42, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k47, \ + k43, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k46 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 }, \ + { k40, k41, k42, k43, XXX, XXX, k46, k47, k48, k49 } \ } - -#endif diff --git a/keyboards/laptreus/rules.mk b/keyboards/laptreus/rules.mk index 5fb166761fb..b48040df350 100644 --- a/keyboards/laptreus/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -23,5 +23,5 @@ KEY_LOCK_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -BLUETOOTH_ENABLE = no # Legacy bluetooth support -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latin17rgb/config.h b/keyboards/latin17rgb/config.h index 6a7ea8e781b..6b929f249da 100644 --- a/keyboards/latin17rgb/config.h +++ b/keyboards/latin17rgb/config.h @@ -49,46 +49,77 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -// This is a 7-bit address, that gets left-shifted and bit 0 -// set to 0 for write, 1 for read (as per I2C protocol) -// The address will vary depending on your wiring: -// 0b1110100 AD <-> GND -// 0b1110111 AD <-> VCC -// 0b1110101 AD <-> SCL -// 0b1110110 AD <-> SDA -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110110 + // This is a 7-bit address, that gets left-shifted and bit 0 + // set to 0 for write, 1 for read (as per I2C protocol) + // The address will vary depending on your wiring: + // 0b1110100 AD <-> GND + // 0b1110111 AD <-> VCC + // 0b1110101 AD <-> SCL + // 0b1110110 AD <-> SDA +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 25 -#define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 25 +# define DRIVER_2_LED_TOTAL 24 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif #define RGB_DI_PIN B7 diff --git a/keyboards/latin17rgb/latin17rgb.c b/keyboards/latin17rgb/latin17rgb.c index f7bbe125c25..d4ab3ea6752 100644 --- a/keyboards/latin17rgb/latin17rgb.c +++ b/keyboards/latin17rgb/latin17rgb.c @@ -17,7 +17,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/latin17rgb/rules.mk b/keyboards/latin17rgb/rules.mk index 1366546e755..072503806a9 100644 --- a/keyboards/latin17rgb/rules.mk +++ b/keyboards/latin17rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin47ble/rules.mk b/keyboards/latin47ble/rules.mk index 5a3f1069a35..b51e91329e7 100644 --- a/keyboards/latin47ble/rules.mk +++ b/keyboards/latin47ble/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,8 +21,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = planck_mit diff --git a/keyboards/latin60rgb/config.h b/keyboards/latin60rgb/config.h index 97b4812910e..cc7b83b9b88 100644 --- a/keyboards/latin60rgb/config.h +++ b/keyboards/latin60rgb/config.h @@ -56,24 +56,55 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 60 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 60 #endif diff --git a/keyboards/latin60rgb/latin60rgb.c b/keyboards/latin60rgb/latin60rgb.c index fe5d2eea8f0..b849f7ef9da 100644 --- a/keyboards/latin60rgb/latin60rgb.c +++ b/keyboards/latin60rgb/latin60rgb.c @@ -16,7 +16,7 @@ #include "latin60rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_13, J_13, L_13 }, { 0, K_12, J_12, L_12 }, { 0, K_11, J_11, L_11 }, diff --git a/keyboards/latin60rgb/rules.mk b/keyboards/latin60rgb/rules.mk index f116ef4e34d..bd5ed434b8c 100644 --- a/keyboards/latin60rgb/rules.mk +++ b/keyboards/latin60rgb/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latin64ble/rules.mk b/keyboards/latin64ble/rules.mk index b4d726a60d1..ba3f750117c 100644 --- a/keyboards/latin64ble/rules.mk +++ b/keyboards/latin64ble/rules.mk @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/latin6rgb/config.h b/keyboards/latin6rgb/config.h index 174c23c30c2..718d8aa26f6 100644 --- a/keyboards/latin6rgb/config.h +++ b/keyboards/latin6rgb/config.h @@ -50,31 +50,62 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -84,14 +115,9 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -//#define DRIVER_ADDR_2 0b1110110 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 6 -//#define DRIVER_1_LED_TOTAL 25 -//#define DRIVER_2_LED_TOTAL 24 -//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 6 #endif //#define RGB_DI_PIN B7 //#ifdef RGB_DI_PIN diff --git a/keyboards/latin6rgb/latin6rgb.c b/keyboards/latin6rgb/latin6rgb.c index 9ea4721ecb2..ddab9a15191 100644 --- a/keyboards/latin6rgb/latin6rgb.c +++ b/keyboards/latin6rgb/latin6rgb.c @@ -17,7 +17,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/latin6rgb/rules.mk b/keyboards/latin6rgb/rules.mk index e22ac6c14b6..6a328bae877 100644 --- a/keyboards/latin6rgb/rules.mk +++ b/keyboards/latin6rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latinpad/config.h b/keyboards/latinpad/config.h index 6c887ab07c4..5cff076d9d3 100644 --- a/keyboards/latinpad/config.h +++ b/keyboards/latinpad/config.h @@ -37,6 +37,54 @@ along with this program. If not, see .*/ #define RGBLED_NUM 18 #define DRIVER_LED_TOTAL RGBLED_NUM +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/latinpad/keymaps/default/keymap.c b/keyboards/latinpad/keymaps/default/keymap.c index eebbd626558..b6606e6be70 100644 --- a/keyboards/latinpad/keymaps/default/keymap.c +++ b/keyboards/latinpad/keymaps/default/keymap.c @@ -49,7 +49,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpad/keymaps/via/keymap.c b/keyboards/latinpad/keymaps/via/keymap.c index 04d9ad905ff..12d7e910e6a 100644 --- a/keyboards/latinpad/keymaps/via/keymap.c +++ b/keyboards/latinpad/keymaps/via/keymap.c @@ -47,7 +47,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpad/rules.mk b/keyboards/latinpad/rules.mk index 1a8d7f0a498..730bd9cd373 100644 --- a/keyboards/latinpad/rules.mk +++ b/keyboards/latinpad/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/latinpadble/config.h b/keyboards/latinpadble/config.h index 5381bf91cce..da89046176d 100644 --- a/keyboards/latinpadble/config.h +++ b/keyboards/latinpadble/config.h @@ -54,44 +54,42 @@ along with this program. If not, see .*/ #define RGBLIGHT_LIMIT_VAL 255 #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20 //#define RGBLIGHT_ANIMATIONS // Run RGB animations -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - - +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define OLED_FONT_H "./lib/glcdfont.c" diff --git a/keyboards/latinpadble/keymaps/default/keymap.c b/keyboards/latinpadble/keymaps/default/keymap.c index ad6f7f31d42..3fed6c0cb48 100644 --- a/keyboards/latinpadble/keymaps/default/keymap.c +++ b/keyboards/latinpadble/keymaps/default/keymap.c @@ -35,7 +35,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpadble/keymaps/via/keymap.c b/keyboards/latinpadble/keymaps/via/keymap.c index cfcea7388b8..2c4cc5f4097 100644 --- a/keyboards/latinpadble/keymaps/via/keymap.c +++ b/keyboards/latinpadble/keymaps/via/keymap.c @@ -64,7 +64,10 @@ static void render_logo(void) { } #ifdef OLED_ENABLE -void oled_task_user(void) { render_logo(); } +bool oled_task_user(void) { + render_logo(); + return false; +} #endif bool encoder_update_user(uint8_t index, bool clockwise) { diff --git a/keyboards/latinpadble/rules.mk b/keyboards/latinpadble/rules.mk index b36d9a88cbd..eca33fc0a01 100644 --- a/keyboards/latinpadble/rules.mk +++ b/keyboards/latinpadble/rules.mk @@ -21,10 +21,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes diff --git a/keyboards/launchpad/config.h b/keyboards/launchpad/config.h index e9a13a3bdff..327d67016bf 100644 --- a/keyboards/launchpad/config.h +++ b/keyboards/launchpad/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see . #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif - -#endif diff --git a/keyboards/launchpad/keymaps/brandonschlack/rules.mk b/keyboards/launchpad/keymaps/brandonschlack/rules.mk index f7d08e3ccbe..31c8f7b39d3 100644 --- a/keyboards/launchpad/keymaps/brandonschlack/rules.mk +++ b/keyboards/launchpad/keymaps/brandonschlack/rules.mk @@ -5,7 +5,7 @@ IS_MACROPAD = yes BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. CONSOLE_ENABLE = yes # Console for debug(+400) MOUSEKEY_ENABLE = yes # Use mouse keys for scrolling. diff --git a/keyboards/launchpad/keymaps/drashna/rules.mk b/keyboards/launchpad/keymaps/drashna/rules.mk index ffda1911315..c3b1e0a8b97 100644 --- a/keyboards/launchpad/keymaps/drashna/rules.mk +++ b/keyboards/launchpad/keymaps/drashna/rules.mk @@ -2,6 +2,6 @@ BOOTLOADER = atmel-dfu RGBLIGHT_ENABLE = no AUDIO_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 diff --git a/keyboards/launchpad/launchpad.h b/keyboards/launchpad/launchpad.h index 85432de0ad2..59cf64afecc 100644 --- a/keyboards/launchpad/launchpad.h +++ b/keyboards/launchpad/launchpad.h @@ -1,11 +1,7 @@ -#ifndef LAUNCHPAD_H -#define LAUNCHPAD_H +#pragma once -#ifdef KEYBOARD_launchpad_rev1 - #include "rev1.h" +#if defined(KEYBOARD_launchpad_rev1) +# include "rev1.h" #endif #include "quantum.h" - - -#endif diff --git a/keyboards/launchpad/rev1/rev1.h b/keyboards/launchpad/rev1/rev1.h index 6644db83006..2ea6e7e7755 100644 --- a/keyboards/launchpad/rev1/rev1.h +++ b/keyboards/launchpad/rev1/rev1.h @@ -1,21 +1,17 @@ -#ifndef REV1_H -#define REV1_H +#pragma once #include "../launchpad.h" #include "quantum.h" #define LAYOUT( \ - K00, K01, \ - K10, K11, \ - K20, K21, \ - K30, K31 \ - ) \ - { \ - { K00, K01 }, \ - { K10, K11 }, \ - { K20, K21 }, \ - { K30, K31 } \ - } - -#endif + k00, k01, \ + k10, k11, \ + k20, k21, \ + k30, k31 \ +) { \ + { k00, k01 }, \ + { k10, k11 }, \ + { k20, k21 }, \ + { k30, k31 } \ +} diff --git a/keyboards/lazydesigners/bolt/rules.mk b/keyboards/lazydesigners/bolt/rules.mk index d533bc65e5e..02ae236709e 100644 --- a/keyboards/lazydesigners/bolt/rules.mk +++ b/keyboards/lazydesigners/bolt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/cassette8/rules.mk b/keyboards/lazydesigners/cassette8/rules.mk index a87017097e2..8d06f62d826 100755 --- a/keyboards/lazydesigners/cassette8/rules.mk +++ b/keyboards/lazydesigners/cassette8/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/dimple/rules.mk b/keyboards/lazydesigners/dimple/rules.mk index 1913836fb19..6ac20a59a53 100644 --- a/keyboards/lazydesigners/dimple/rules.mk +++ b/keyboards/lazydesigners/dimple/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control NKRO_ENABLE = yes # USB Nkey Rollover diff --git a/keyboards/lazydesigners/dimpleplus/rules.mk b/keyboards/lazydesigners/dimpleplus/rules.mk index 5d1353e3644..699b9124dd6 100644 --- a/keyboards/lazydesigners/dimpleplus/rules.mk +++ b/keyboards/lazydesigners/dimpleplus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the30/rules.mk b/keyboards/lazydesigners/the30/rules.mk index e62dfdcc514..8e36891e9ff 100644 --- a/keyboards/lazydesigners/the30/rules.mk +++ b/keyboards/lazydesigners/the30/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the40/rules.mk b/keyboards/lazydesigners/the40/rules.mk index e61219d5d0b..c34f7d1205f 100644 --- a/keyboards/lazydesigners/the40/rules.mk +++ b/keyboards/lazydesigners/the40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the60/rev1/rules.mk b/keyboards/lazydesigners/the60/rev1/rules.mk index e737dd8c064..ee92af3fd69 100755 --- a/keyboards/lazydesigners/the60/rev1/rules.mk +++ b/keyboards/lazydesigners/the60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lazydesigners/the60/rev2/info.json b/keyboards/lazydesigners/the60/rev2/info.json index bba03844bc0..05540cd308e 100755 --- a/keyboards/lazydesigners/the60/rev2/info.json +++ b/keyboards/lazydesigners/the60/rev2/info.json @@ -261,7 +261,10 @@ {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space","x":4, "y":4, "w":7}, + {"label":"Space","x":4, "y":4, "w":2}, + {"label":"Space","x":6, "y":4, "w":1.5}, + {"label":"Space","x":7.5, "y":4, "w":1.5}, + {"label":"Space","x":9, "y":4, "w":2}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5} ] @@ -326,7 +329,10 @@ {"label":"Shift", "x":13.25, "y":3, "w":1.75}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, - {"label":"Space","x":4, "y":4, "w":7}, + {"label":"Space","x":4, "y":4, "w":2}, + {"label":"Space","x":6, "y":4, "w":1.5}, + {"label":"Space","x":7.5, "y":4, "w":1.5}, + {"label":"Space","x":9, "y":4, "w":2}, {"label":"Win", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4} ] diff --git a/keyboards/lazydesigners/the60/rev2/rules.mk b/keyboards/lazydesigners/the60/rev2/rules.mk index b7d001d6394..431acd9df5c 100755 --- a/keyboards/lazydesigners/the60/rev2/rules.mk +++ b/keyboards/lazydesigners/the60/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lck75/lck75.c b/keyboards/lck75/lck75.c index 52ccdcfd067..55650681ac7 100644 --- a/keyboards/lck75/lck75.c +++ b/keyboards/lck75/lck75.c @@ -33,11 +33,14 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #define ANIM_FRAME_DURATION 200 #define ANIM_SIZE 512 #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static uint32_t anim_timer = 0; static uint32_t anim_sleep = 0; static uint8_t current_idle_frame = 0; @@ -140,6 +143,6 @@ static uint8_t current_tap_frame = 0; } } } - + return false; } #endif diff --git a/keyboards/lck75/rules.mk b/keyboards/lck75/rules.mk index 6e8d31ce3c1..665f65307a3 100644 --- a/keyboards/lck75/rules.mk +++ b/keyboards/lck75/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/le_chiffre/config.h b/keyboards/le_chiffre/config.h index af4d1e49cfd..b2e4c673a4a 100644 --- a/keyboards/le_chiffre/config.h +++ b/keyboards/le_chiffre/config.h @@ -76,4 +76,53 @@ #define RGB_MATRIX_SAT_STEP 8 #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 10 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/le_chiffre/keymaps/default/keymap.c b/keyboards/le_chiffre/keymaps/default/keymap.c index 3de991b558d..45fee56a95c 100644 --- a/keyboards/le_chiffre/keymaps/default/keymap.c +++ b/keyboards/le_chiffre/keymaps/default/keymap.c @@ -185,13 +185,15 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_lechiffre_logo(); oled_set_cursor(0,3); render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_mod_status(get_mods()|get_oneshot_mods()); render_keylock_status(host_keyboard_led_state()); render_keylogger_status(); + + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/le_chiffre/keymaps/via/keymap.c b/keyboards/le_chiffre/keymaps/via/keymap.c index 59cf17009e4..10a2fb0d4ab 100644 --- a/keyboards/le_chiffre/keymaps/via/keymap.c +++ b/keyboards/le_chiffre/keymaps/via/keymap.c @@ -144,13 +144,14 @@ void render_mod_status(uint8_t modifiers) { oled_write_ln_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_lechiffre_logo(); oled_set_cursor(0,3); // render_layer_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) render_mod_status(get_mods()|get_oneshot_mods()); render_keylock_status(host_keyboard_led_state()); render_keylogger_status(); + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/le_chiffre/rules.mk b/keyboards/le_chiffre/rules.mk index 6a3b3895fa7..25712583ab1 100644 --- a/keyboards/le_chiffre/rules.mk +++ b/keyboards/le_chiffre/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/leafcutterlabs/bigknob/rules.mk b/keyboards/leafcutterlabs/bigknob/rules.mk index c8e0a3e33d8..26c69330086 100644 --- a/keyboards/leafcutterlabs/bigknob/rules.mk +++ b/keyboards/leafcutterlabs/bigknob/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/leeku/finger65/rules.mk b/keyboards/leeku/finger65/rules.mk index 42c1fb52f7a..0669ee29cc6 100644 --- a/keyboards/leeku/finger65/rules.mk +++ b/keyboards/leeku/finger65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lefty/config.h b/keyboards/lefty/config.h new file mode 100644 index 00000000000..85620ca15bf --- /dev/null +++ b/keyboards/lefty/config.h @@ -0,0 +1,44 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5363 // Sc for Smollchungus +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER SmollChungus +#define PRODUCT Lefty + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 8 + +/* key matrix pins are in subfolders v1/v2 */ + +/* Diode direction */ +#define DIODE_DIRECTION COL2ROW + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/lefty/info.json b/keyboards/lefty/info.json new file mode 100644 index 00000000000..bd5d2f7c4e4 --- /dev/null +++ b/keyboards/lefty/info.json @@ -0,0 +1,43 @@ +{ + "keyboard_name": "lefty", + "url": "https://github.com/smollchungus", + "maintainer": "smollchungus", + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"F1", "x":0.5, "y":0}, + {"label":"Escape", "x":2, "y":0}, + {"label":"1", "x":3, "y":0}, + {"label":"2", "x":4, "y":0}, + {"label":"3", "x":5, "y":0}, + {"label":"4", "x":6, "y":0}, + {"label":"5", "x":7, "y":0}, + {"label":"6", "x":8, "y":0}, + {"label":"F2", "x":0.25, "y":1}, + {"label":"Tab", "x":1.75, "y":1, "w":1.5}, + {"label":"Q", "x":3.25, "y":1}, + {"label":"W", "x":4.25, "y":1}, + {"label":"E", "x":5.25, "y":1}, + {"label":"R", "x":6.25, "y":1}, + {"label":"T", "x":7.25, "y":1}, + {"label":"F3", "x":0, "y":2}, + {"label":"Caps Lock", "x":1.5, "y":2, "w":1.75}, + {"label":"A", "x":3.25, "y":2}, + {"label":"S", "x":4.25, "y":2}, + {"label":"D", "x":5.25, "y":2}, + {"label":"F", "x":6.25, "y":2}, + {"label":"G", "x":7.25, "y":2}, + {"label":"Shift", "x":1.25, "y":3, "w":2.25}, + {"label":"Z", "x":3.5, "y":3}, + {"label":"X", "x":4.5, "y":3}, + {"label":"C", "x":5.5, "y":3}, + {"label":"V", "x":6.5, "y":3}, + {"label":"B", "x":7.5, "y":3}, + {"label":"Control", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":4.5, "y":4, "w":1.25}, + {"label":"Layer2", "x":5.75, "y":4, "w":2}, + {"label":"Layer3", "x":7.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/lefty/keymaps/default/keymap.c b/keyboards/lefty/keymaps/default/keymap.c new file mode 100644 index 00000000000..ecedbac3905 --- /dev/null +++ b/keyboards/lefty/keymaps/default/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _SPECIAL, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPECIAL MO(_SPECIAL) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_all( + KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, RAISE, SPECIAL +), + +[_LOWER] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_SPECIAL] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +) +}; diff --git a/keyboards/lefty/keymaps/via/keymap.c b/keyboards/lefty/keymaps/via/keymap.c new file mode 100644 index 00000000000..5acf16c0446 --- /dev/null +++ b/keyboards/lefty/keymaps/via/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#include QMK_KEYBOARD_H + + +enum layers { + _QWERTY, + _LOWER, + _RAISE, + _SPECIAL, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define SPECIAL MO(_SPECIAL) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = LAYOUT_all( + KC_UP, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_DOWN, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_RGHT, LOWER, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_LCTL, KC_LALT, RAISE, SPECIAL +), + +[_LOWER] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_RAISE] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +), + +[_SPECIAL] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______ +) +}; diff --git a/keyboards/lefty/keymaps/via/rules.mk b/keyboards/lefty/keymaps/via/rules.mk new file mode 100644 index 00000000000..1e5b99807cb --- /dev/null +++ b/keyboards/lefty/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/lefty/lefty.c b/keyboards/lefty/lefty.c new file mode 100644 index 00000000000..a3e5301ea1f --- /dev/null +++ b/keyboards/lefty/lefty.c @@ -0,0 +1,47 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#include "lefty.h" + +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } + // Host Keyboard Layer Status + oled_write_P(PSTR("Layer: "), false); + + switch (get_highest_layer(layer_state)) { + case 0: + oled_write_P(PSTR("Default\n"), false); + break; + case 1: + oled_write_P(PSTR("LOWER\n"), false); + break; + case 2: + oled_write_P(PSTR("RAISE\n"), false); + break; + case 3: + oled_write_P(PSTR("SPECIAL\n"), false); + break; + default: + // Or use the write_ln shortcut over adding '\n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + return true; +} +#endif diff --git a/keyboards/lefty/lefty.h b/keyboards/lefty/lefty.h new file mode 100644 index 00000000000..2466552353f --- /dev/null +++ b/keyboards/lefty/lefty.h @@ -0,0 +1,37 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#pragma once + +#include "quantum.h" + +// keymap +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, \ + K10, K11, K12, K13, K14, K15, K16, \ + K20, K21, K22, K23, K24, K25, K26, \ + K31, K32, K33, K34, K35, K36, \ + K41, K43, K44, K46 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, KC_NO }, \ + { KC_NO, K31, K32, K33, K34, K35, K36, KC_NO }, \ + { KC_NO, K41, KC_NO, K43, K44, KC_NO, K46, KC_NO } \ +} + +#define LAYOUT LAYOUT diff --git a/keyboards/lefty/readme.md b/keyboards/lefty/readme.md new file mode 100644 index 00000000000..f8cc2ec2037 --- /dev/null +++ b/keyboards/lefty/readme.md @@ -0,0 +1,27 @@ +# lefty + +![lefty](https://i.imgur.com/nMmJCJMh.jpeg) + +Half an alice used as a macropad. + +* Keyboard Maintainer: [SmollChungus](https://github.com/smollchungus/) + +* Hardware Supported: Lefty PCB rev1 and rev2 + +Make example for this keyboard (after setting up your build environment): + + make lefty:default + +Flashing example for this keyboard: + + make lefty:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +# Bootloader +Enter the bootloader in 3 ways: + +Bootmagic reset: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +Physical reset button: Briefly press the button on the back of the PCB - some may have pads you must short instead +Keycode in layout: Press the key mapped to RESET if it is available diff --git a/keyboards/lefty/rev1/config.h b/keyboards/lefty/rev1/config.h new file mode 100644 index 00000000000..fa70eeb3595 --- /dev/null +++ b/keyboards/lefty/rev1/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#pragma once + +/* key matrix pins */ + +#define MATRIX_ROW_PINS { F0, F1, C7, D5, B7 } +#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 } diff --git a/keyboards/lefty/rev1/rev1.c b/keyboards/lefty/rev1/rev1.c new file mode 100644 index 00000000000..81734fd7fc3 --- /dev/null +++ b/keyboards/lefty/rev1/rev1.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#include "lefty.h" diff --git a/keyboards/lefty/rev1/rules.mk b/keyboards/lefty/rev1/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/lefty/rev2/config.h b/keyboards/lefty/rev2/config.h new file mode 100644 index 00000000000..82894187287 --- /dev/null +++ b/keyboards/lefty/rev2/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#pragma once + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B2, B6, D7, E6, B4 } +#define MATRIX_COL_PINS { D4, B5, F5, F6, F7, B1, B3, F4 } diff --git a/keyboards/lefty/rev2/rev2.c b/keyboards/lefty/rev2/rev2.c new file mode 100644 index 00000000000..81734fd7fc3 --- /dev/null +++ b/keyboards/lefty/rev2/rev2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Smoll Chungus (@smollchungus) +* +* 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 . +*/ + +#include "lefty.h" diff --git a/keyboards/lefty/rev2/rules.mk b/keyboards/lefty/rev2/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/lefty/rules.mk b/keyboards/lefty/rules.mk new file mode 100644 index 00000000000..119ec3128a4 --- /dev/null +++ b/keyboards/lefty/rules.mk @@ -0,0 +1,27 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes + +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 + +DEFAULT_FOLDER = lefty/rev2 diff --git a/keyboards/lets_split/keymaps/pyrol/rules.mk b/keyboards/lets_split/keymaps/pyrol/rules.mk index 05bab7d5bf4..d4c4ffab6a2 100644 --- a/keyboards/lets_split/keymaps/pyrol/rules.mk +++ b/keyboards/lets_split/keymaps/pyrol/rules.mk @@ -1 +1 @@ - BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite + BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/lfkeyboards/issi.h b/keyboards/lfkeyboards/issi.h index 51777f6ee38..74379ddbc8f 100644 --- a/keyboards/lfkeyboards/issi.h +++ b/keyboards/lfkeyboards/issi.h @@ -1,6 +1,6 @@ +#pragma once + #ifdef ISSI_ENABLE -#ifndef ISSI_H -#define ISSI_H typedef struct ISSIDeviceStruct{ uint8_t fn_dirty; // function registers need to be resent @@ -37,4 +37,3 @@ void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm); void update_issi(uint8_t device_addr, uint8_t blocking); #endif -#endif \ No newline at end of file diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index adedaa3427c..0adc0b3f560 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -83,5 +82,3 @@ //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h index 32564516587..6ba3a63e883 100644 --- a/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h +++ b/keyboards/lfkeyboards/lfk65_hs/lfk65_hs.h @@ -1,5 +1,4 @@ -#ifndef LFK65_HS_H -#define LFK65_HS_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -13,58 +12,56 @@ void reset_keyboard_kb(void); /* All Keymap - contains every possible switch * ,-------------------------------------------------------------------------------. -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1F | 1G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | +* | 10 | 11 |12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1E | 1F | * |-------------------------------------------------------------------------------| -* | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | +* | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2E | 2F | * |-------------------------------------------------------------------------------| -* | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | +* | 30 |31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | 3F | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | +* | 40 | 41 | 42 | 46 | 4A | 4B | 4C | 4D | 2D | 3D | * `-------------------------------------------------------------------------------' */ // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array #define LAYOUT_all( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, k3G, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k2D, k3D \ ) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, ___, ___ } \ } /* ANSI Keymap * ,-------------------------------------------------------------------------------. -* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G | +* | 00 | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0E | 0F | * |-------------------------------------------------------------------------------| -* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2F | 2G | +* | 10 | 11 |12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1E | 1F | * |-------------------------------------------------------------------------------| -* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3F | 3G | +* | 20 | 21 |22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2E | 2F | * |-------------------------------------------------------------------------------| -* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4F | 4G | +* | 30 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3E | 3F | * |-------------------------------------------------------------------------------| -* | 51 | 52 | 53 | 57 | 5A | 5B | 5C | 5D | 5E | 3E | 4E | +* | 40 | 41 | 42 | 46 | 4A | 4B | 4C | 4D | 2D | 3D | * `-------------------------------------------------------------------------------' */ #define LAYOUT_ansi( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, k2G, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3F, k3G, \ - k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4F, k4G, \ - k51, k52, k53, k57, k5B, k5C, k5D, k5E, k3E, k4E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k2D, k3D \ ) { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, ___, k1F, k1G }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, ___, k2F, k2G }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G }, \ - { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ - { k51, k52, k53, ___, ___, ___, k57, ___, ___, ___, k5B, k5C, k5D, k5E, ___, ___ } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, ___, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, k2E, k2F }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, ___, ___ } \ } - -#endif //LFK65_HS_H diff --git a/keyboards/lfkeyboards/lfk78/post_rules.mk b/keyboards/lfkeyboards/lfk78/post_rules.mk new file mode 100644 index 00000000000..03f975b9df2 --- /dev/null +++ b/keyboards/lfkeyboards/lfk78/post_rules.mk @@ -0,0 +1,14 @@ +# Extra source files for IS3731 lighting +SRC += TWIlib.c issi.c lighting.c + +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif + +ifeq ($(strip $(CAPSLOCK_LED)), yes) + TMK_COMMON_DEFS += -DCAPSLOCK_LED +endif diff --git a/keyboards/lfkeyboards/lfk78/rules.mk b/keyboards/lfkeyboards/lfk78/rules.mk index 7919543734f..9422978d11d 100644 --- a/keyboards/lfkeyboards/lfk78/rules.mk +++ b/keyboards/lfkeyboards/lfk78/rules.mk @@ -21,19 +21,4 @@ ISSI_ENABLE = yes # If the I2C pullup resistors aren't install thi WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms CAPSLOCK_LED = no # Toggle back light LED of Caps Lock -# Extra source files for IS3731 lighting -SRC = TWIlib.c issi.c lighting.c - -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - -ifeq ($(strip $(CAPSLOCK_LED)), yes) - TMK_COMMON_DEFS += -DCAPSLOCK_LED -endif - DEFAULT_FOLDER = lfkeyboards/lfk78/revj diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index d5b17005e5b..387c58851c5 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -114,5 +113,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/lfk87/lfk87.h b/keyboards/lfkeyboards/lfk87/lfk87.h index 5c1fba6bab3..1b1368659ba 100644 --- a/keyboards/lfkeyboards/lfk87/lfk87.h +++ b/keyboards/lfkeyboards/lfk87/lfk87.h @@ -1,5 +1,4 @@ -#ifndef LFK87_H -#define LFK87_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -44,85 +43,75 @@ void click(uint16_t freq, uint16_t duration); #define ___ KC_NO #ifdef LFK_TKL_REV_A - #ifndef LAYOUT_tkl_ansi - #define LAYOUT_tkl_ansi( \ - k11, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, \ - k51, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5g, \ - k61, k62, k63, k67, k6b, k6c, k6d, k6e, k6f, k6g, k6h \ - ) \ - { \ - { k11, ___, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, ___, ___, ___ }, \ - { k51, ___, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, ___, ___, k5g, ___ }, \ - { k61, k62, k63, ___, ___, ___, k67, ___, ___, ___, k6b, k6c, k6d, k6e, k6f, k6g, k6h }, \ - } - +# ifndef LAYOUT_tkl_ansi +# define LAYOUT_tkl_ansi( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k56, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, ___, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, ___, ___, ___ }, \ + { k40, ___, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ___, ___, k4F, ___ }, \ + { k50, k51, k52, ___, ___, ___, k56, ___, ___, ___, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} #endif // !LAYOUT_tkl_ansi - #ifndef LAYOUT_tkl_iso - #define LAYOUT_tkl_iso( \ - k11, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3f, k3g, k3h, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k3e, \ - k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, k5g, \ - k61, k62, k63, k67, k6b, k6c, k6d, k6e, k6f, k6g, k6h \ - ) \ - { \ - { k11, ___, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, k3h }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, ___, ___, ___ }, \ - { k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5d, ___, ___, k5g, ___ }, \ - { k61, k62, k63, ___, ___, ___, k67, ___, ___, ___, k6b, k6c, k6d, k6e, k6f, k6g, k6h }, \ - } - - #endif // !LAYOUT_tkl_iso +# ifndef LAYOUT_tkl_iso +# define LAYOUT_tkl_iso( \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k56, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ +) { \ + { k00, ___, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, ___, ___, k4F, ___ }, \ + { k50, k51, k52, ___, ___, ___, k56, ___, ___, ___, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ +} +# endif // !LAYOUT_tkl_iso #else // RevC+ keymaps - #ifndef LAYOUT_tkl_ansi - #define LAYOUT_tkl_ansi( \ - k71, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, \ - k72, k73, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \ - k74, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g, \ - k61, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, \ - k62, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5f, \ - k63, k64, k65, k67, k6a, k6b, k6c, k6d, k6e, k6f, k6g \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, k1f, k1g }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, ___, k2e, k2f, k2g }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, ___, ___ }, \ - { ___, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, ___, ___, k5f, ___ }, \ - { k61, k62, k63, k64, k65, ___, k67, ___, ___, k6a, k6b, k6c, k6d, k6e, k6f, k6g }, \ - { k71, k72, k73, k74, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - } - - #endif // !LAYOUT_tkl_ansi - #ifndef LAYOUT_tkl_iso - #define LAYOUT_tkl_iso( \ - k71, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, k1f, k1g, \ - k72, k73, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \ - k74, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \ - k61, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k3d, \ - k62, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, k5f, \ - k63, k64, k65, k67, k6a, k6b, k6c, k6d, k6e, k6f, k6g \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, ___, k1e, k1f, k1g }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, ___, k2e, k2f, k2g }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, k3f, k3g }, \ - { k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, ___, ___ }, \ - { k51, k52, k53, k54, k55, k56, k57, k58, k59, k5a, k5b, k5c, ___, ___, k5f, ___ }, \ - { k61, k62, k63, k64, k65, ___, k67, ___, ___, k6a, k6b, k6c, k6d, k6e, k6f, k6g }, \ - { k71, k72, k73, k74, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \ - } - - #endif // !LAYOUT_tkl_iso +# ifndef LAYOUT_tkl_ansi +# define LAYOUT_tkl_ansi( \ + k60, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0D, k0E, k0F, \ + k61, k62, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, \ + k63, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k50, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, \ + k51, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, \ + k52, k53, k54, k56, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, ___, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, ___, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, ___, ___, ___, ___ }, \ + { ___, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, ___, ___, k4E, ___ }, \ + { k50, k51, k52, k53, k54, ___, k56, ___, ___, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} +# endif // !LAYOUT_tkl_ansi +# ifndef LAYOUT_tkl_iso +# define LAYOUT_tkl_iso( \ + k60, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0D, k0E, k0F, \ + k61, k62, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D, k1E, k1F, \ + k63, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, k2F, \ + k50, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k2C, \ + k51, k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4E, \ + k52, k53, k54, k56, k59, k5A, k5B, k5C, k5D, k5E, k5F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, ___, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, ___, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, ___, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, ___, ___, k4E, ___ }, \ + { k50, k51, k52, k53, k54, ___, k56, ___, ___, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ + { k60, k61, k62, k63, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ } \ +} +# endif // !LAYOUT_tkl_iso #endif //Rev - -#endif //LFK87_H diff --git a/keyboards/lfkeyboards/lfk87/post_rules.mk b/keyboards/lfkeyboards/lfk87/post_rules.mk new file mode 100644 index 00000000000..563462dd995 --- /dev/null +++ b/keyboards/lfkeyboards/lfk87/post_rules.mk @@ -0,0 +1,13 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + OPT_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + OPT_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfk87/rules.mk b/keyboards/lfkeyboards/lfk87/rules.mk index afe1aef59de..1289cf133d2 100644 --- a/keyboards/lfkeyboards/lfk87/rules.mk +++ b/keyboards/lfkeyboards/lfk87/rules.mk @@ -6,11 +6,6 @@ # LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) @@ -39,13 +34,3 @@ SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms - - - -ifeq ($(strip $(ISSI_ENABLE)), yes) - OPT_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - OPT_DEFS += -DWATCHDOG_ENABLE -endif diff --git a/keyboards/lfkeyboards/lfkpad/post_rules.mk b/keyboards/lfkeyboards/lfkpad/post_rules.mk new file mode 100644 index 00000000000..ad997587b2d --- /dev/null +++ b/keyboards/lfkeyboards/lfkpad/post_rules.mk @@ -0,0 +1,7 @@ +ifeq ($(strip $(ISSI_ENABLE)), yes) + TMK_COMMON_DEFS += -DISSI_ENABLE +endif + +ifeq ($(strip $(WATCHDOG_ENABLE)), yes) + TMK_COMMON_DEFS += -DWATCHDOG_ENABLE +endif diff --git a/keyboards/lfkeyboards/lfkpad/rules.mk b/keyboards/lfkeyboards/lfkpad/rules.mk index 3499ebb519a..18cea63e32e 100644 --- a/keyboards/lfkeyboards/lfkpad/rules.mk +++ b/keyboards/lfkeyboards/lfkpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -26,12 +26,4 @@ WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan() isn't run every SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - TMK_COMMON_DEFS += -DISSI_ENABLE -endif - -ifeq ($(strip $(WATCHDOG_ENABLE)), yes) - TMK_COMMON_DEFS += -DWATCHDOG_ENABLE -endif - LAYOUTS = numpad_6x4 diff --git a/keyboards/lfkeyboards/lighting.h b/keyboards/lfkeyboards/lighting.h index 69e63268ddf..cb07755c53b 100644 --- a/keyboards/lfkeyboards/lighting.h +++ b/keyboards/lfkeyboards/lighting.h @@ -1,6 +1,4 @@ -#ifndef LIGHTING_H -#define LIGHTING_H - +#pragma once // rgb_sequence[RGBLED_NUM] // @@ -49,5 +47,3 @@ void set_backlight(uint8_t level); void set_underglow(uint8_t red, uint8_t green, uint8_t blue); void set_rgb(uint8_t rgb_led, uint8_t red, uint8_t green, uint8_t blue); void set_backlight_by_keymap(uint8_t col, uint8_t row); - -#endif \ No newline at end of file diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index 598f08a6f10..1504a95cb41 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -101,5 +100,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/lfkeyboards/mini1800/mini1800.h b/keyboards/lfkeyboards/mini1800/mini1800.h index c007d7f76ad..3e460c8a11d 100644 --- a/keyboards/lfkeyboards/mini1800/mini1800.h +++ b/keyboards/lfkeyboards/mini1800/mini1800.h @@ -1,5 +1,4 @@ -#ifndef LFK87_H -#define LFK87_H +#pragma once #include "quantum.h" #include "matrix.h" @@ -43,33 +42,18 @@ void click(uint16_t freq, uint16_t duration); #define ___ KC_NO - // a = 10 - // b = 11 - // c = 12 - // d = 13 - // e = 14 - // f = 15 - // g = 16 - // h = 17 - // i = 18 - // j = 19 - #ifndef LAYOUT - #define LAYOUT( \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, k1i, k1j,\ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2g, k2h, k2i, k2j,\ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k2f, k3g, k3h, k3i, k3j,\ - k41, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4f, k4g, k4h, k4i, k4j,\ - k51, k52, k53, k56, k5b, k5c, k5d, k5f, k5g, k5h, k5i, k5j \ - ) \ - { \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, ___, k1f, k1g, k1h, k1i, k1j }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, k2h, k2i, k2j }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, ___, ___, ___, k3g, k3h, k3i, k3j }, \ - { k41, ___, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, k4f, k4g, k4h, k4i, k4j }, \ - { k51, k52, k53, ___, ___, k56, ___, ___, ___, ___, k5b, k5c, k5d, ___, k5f, k5g, k5h, k5i, k5j }, \ - } - +# define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1E, k2F, k2G, k2H, k2I, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4E, k4F, k4G, k4H, k4I \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, ___, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, ___, ___, k2F, k2G, k2H, k2I }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, k45, ___, ___, ___, ___, k4A, k4B, k4C, ___, k4E, k4F, k4G, k4H, k4I } \ +} #endif // !LAYOUT #endif - -#endif //LFK87_H diff --git a/keyboards/lfkeyboards/mini1800/post_rules.mk b/keyboards/lfkeyboards/mini1800/post_rules.mk new file mode 100644 index 00000000000..f04e10e4a3b --- /dev/null +++ b/keyboards/lfkeyboards/mini1800/post_rules.mk @@ -0,0 +1,9 @@ +ifeq ($(LFK_REV), A) + MCU = at90usb1286 +else + MCU = at90usb646 +endif + +ifeq ($(strip $(ISSI_ENABLE)), yes) + # TMK_COMMON_DEFS += -DISSI_ENABLE +endif diff --git a/keyboards/lfkeyboards/mini1800/rules.mk b/keyboards/lfkeyboards/mini1800/rules.mk index a9c29c4b91e..c9a9b010543 100644 --- a/keyboards/lfkeyboards/mini1800/rules.mk +++ b/keyboards/lfkeyboards/mini1800/rules.mk @@ -7,21 +7,12 @@ # Set to A or C LFK_REV = C -ifeq ($(LFK_REV), A) - MCU = at90usb1286 -else - MCU = at90usb646 -endif BOOTLOADER = atmel-dfu OPT_DEFS += -DLFK_TKL_REV_$(LFK_REV) # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c -ifeq ($(strip $(ISSI_ENABLE)), yes) - # TMK_COMMON_DEFS += -DISSI_ENABLE -endif - # Build Options # change yes to no to disable # diff --git a/keyboards/lfkeyboards/smk65/rules.mk b/keyboards/lfkeyboards/smk65/rules.mk index a7dadd28218..28efec35b3d 100644 --- a/keyboards/lfkeyboards/smk65/rules.mk +++ b/keyboards/lfkeyboards/smk65/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/lily58/keymaps/barabas/keymap.c b/keyboards/lily58/keymaps/barabas/keymap.c index 00d6045d49e..64ef3cfffc4 100644 --- a/keyboards/lily58/keymaps/barabas/keymap.c +++ b/keyboards/lily58/keymaps/barabas/keymap.c @@ -171,7 +171,7 @@ void write_layer_state(void) { oled_advance_page(true); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { write_layer_state(); oled_write_ln(read_keylog(), false); @@ -179,6 +179,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/chuan/keymap.c b/keyboards/lily58/keymaps/chuan/keymap.c index 29e5aae19f8..1e0923a3c52 100644 --- a/keyboards/lily58/keymaps/chuan/keymap.c +++ b/keyboards/lily58/keymaps/chuan/keymap.c @@ -152,7 +152,7 @@ const char *read_timelog(void); char encoder_debug[24]; -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status snprintf(encoder_debug, sizeof(encoder_debug), "%i %i", counter, lastIndex ); if (is_keyboard_master()) { @@ -168,6 +168,7 @@ void oled_task_user(void) { oled_write(read_logo(), false); // oled_write_ln(encoder_debug, false); } + return false; } #endif //OLED_ENABLE diff --git a/keyboards/lily58/keymaps/cykedev/keymap.c b/keyboards/lily58/keymaps/cykedev/keymap.c index 460afb22973..75cdc04febb 100644 --- a/keyboards/lily58/keymaps/cykedev/keymap.c +++ b/keyboards/lily58/keymaps/cykedev/keymap.c @@ -114,8 +114,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { const char *read_logo(void); -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln(read_logo(), false); + return false; } #endif // OLED_ENABLE - diff --git a/keyboards/lily58/keymaps/datadavd/keymap.c b/keyboards/lily58/keymaps/datadavd/keymap.c index 15bcce10b83..0485cd19ad1 100644 --- a/keyboards/lily58/keymaps/datadavd/keymap.c +++ b/keyboards/lily58/keymaps/datadavd/keymap.c @@ -219,12 +219,13 @@ static void render_lfc_logo(void) { oled_write_raw_P(my_lfc_logo, sizeof(my_lfc_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_logo(); } else { render_lfc_logo(); } + return false; } #endif // OLED_ENABLE @@ -263,4 +264,3 @@ const char *read_layer_state(void) { return layer_state_str; } - diff --git a/keyboards/lily58/keymaps/default/keymap.c b/keyboards/lily58/keymaps/default/keymap.c index 1b5b7c862e9..5010c669782 100644 --- a/keyboards/lily58/keymaps/default/keymap.c +++ b/keyboards/lily58/keymaps/default/keymap.c @@ -122,7 +122,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -134,6 +134,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/domnantas/keymap.c b/keyboards/lily58/keymaps/domnantas/keymap.c index f1b2b2dcda1..ef2a89c470b 100644 --- a/keyboards/lily58/keymaps/domnantas/keymap.c +++ b/keyboards/lily58/keymaps/domnantas/keymap.c @@ -1,18 +1,18 @@ /* Copyright 2020 Domantas Petrauskas - * - * 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 . - */ + * + * 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 . + */ #include QMK_KEYBOARD_H #include @@ -275,10 +275,11 @@ static void render_status(void) { oled_write_ln_P(PSTR("caps"), led_state.caps_lock); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_status(); } else { render_bongo_cat(); } + return false; } diff --git a/keyboards/lily58/keymaps/drasbeck/keymap.c b/keyboards/lily58/keymaps/drasbeck/keymap.c index 6e22f043133..56bed4d7abe 100644 --- a/keyboards/lily58/keymaps/drasbeck/keymap.c +++ b/keyboards/lily58/keymaps/drasbeck/keymap.c @@ -92,7 +92,7 @@ void set_keylog(uint16_t keycode, keyrecord_t *record); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -104,6 +104,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/gaston/keymap.c b/keyboards/lily58/keymaps/gaston/keymap.c index 234b283a911..321b225c029 100644 --- a/keyboards/lily58/keymaps/gaston/keymap.c +++ b/keyboards/lily58/keymaps/gaston/keymap.c @@ -41,10 +41,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - XXXXXXX, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_F12, - XXXXXXX, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX + KC_TRNS, XXXXXXX, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_F12, + KC_TRNS, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, + KC_TRNS, XXXXXXX, XXXXXXX, KC_BRID, KC_BRIU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_DEL, XXXXXXX, XXXXXXX, XXXXXXX, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX ), [_MOUSE] = LAYOUT( diff --git a/keyboards/lily58/keymaps/gaston/readme.md b/keyboards/lily58/keymaps/gaston/readme.md index 2d28be00afa..8edd92cc3ff 100644 --- a/keyboards/lily58/keymaps/gaston/readme.md +++ b/keyboards/lily58/keymaps/gaston/readme.md @@ -38,13 +38,13 @@ The main characteristics of this keymap are: ,-----------------------------------------. ,-----------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | |------+------+------+------+------+------| |------+------+------+------+------+------| -| | | MUTE | VOLD | VOLU | | | HOME | PGDN | PGUP | END | | F12 | +| TRNS | | MUTE | VOLD | VOLU | | | HOME | PGDN | PGUP | END | | F12 | |------+------+------+------+------+------| |------+------+------+------+------+------| -| | | MPRV | MPLY | MNXT | |-------. ,-------| LEFT | DOWN | UP | RGHT | | | +| TRNS | | MPRV | MPLY | MNXT | |-------. ,-------| LEFT | DOWN | UP | RGHT | | | |------+------+------+------+------+------| | | |------+------+------+------+------+------| -| | | | BRID | BRIU | |-------| |-------| | INS | DEL | | | | +| TRNS | | | BRID | BRIU | |-------| |-------| | INS | DEL | | | | `-----------------------------------------/ / \ \----------------------------------------' - | | | | / TRNS / \ TRNS \ | | | | + | TRNS | TRNS | TRNS | / TRNS / \ TRNS \ | | | | | | | |/ / \ \ | | | | `----------------------------' '-----------------------------' ``` diff --git a/keyboards/lily58/keymaps/lily58l/keymap.c b/keyboards/lily58/keymaps/lily58l/keymap.c index 3db5f4ac648..10794b86957 100644 --- a/keyboards/lily58/keymaps/lily58l/keymap.c +++ b/keyboards/lily58/keymaps/lily58l/keymap.c @@ -271,13 +271,14 @@ void render_status_main(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_lily58_logo(); } + return false; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/lily58/keymaps/mikefightsbears/keymap.c b/keyboards/lily58/keymaps/mikefightsbears/keymap.c index 303e7b7d5b3..2b9855f190b 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/keymap.c +++ b/keyboards/lily58/keymaps/mikefightsbears/keymap.c @@ -156,7 +156,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -168,6 +168,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE @@ -211,4 +212,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/lily58/keymaps/muuko/keymap.c b/keyboards/lily58/keymaps/muuko/keymap.c index 7ec273743c5..c984202b9e2 100644 --- a/keyboards/lily58/keymaps/muuko/keymap.c +++ b/keyboards/lily58/keymaps/muuko/keymap.c @@ -174,11 +174,12 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_anim(); } + return false; } #endif diff --git a/keyboards/lily58/keymaps/narze/keymap.c b/keyboards/lily58/keymaps/narze/keymap.c index dfb51ae5098..7438e72751b 100644 --- a/keyboards/lily58/keymaps/narze/keymap.c +++ b/keyboards/lily58/keymaps/narze/keymap.c @@ -299,7 +299,7 @@ const char *read_timelog(void); char encoder_debug[24]; -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here @@ -313,6 +313,7 @@ void oled_task_user(void) { oled_write(read_logo(), false); // oled_write_ln(encoder_debug, false); } + return false; } #endif //OLED_ENABLE diff --git a/keyboards/lily58/keymaps/via/keymap.c b/keyboards/lily58/keymaps/via/keymap.c index 5cc5dc1e5af..4cae267338f 100644 --- a/keyboards/lily58/keymaps/via/keymap.c +++ b/keyboards/lily58/keymaps/via/keymap.c @@ -186,7 +186,7 @@ const char *read_keylogs(void) { } //new -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -214,6 +214,7 @@ void oled_task_user(void) { } else { render_logo(); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/yshrsmz/keymap.c b/keyboards/lily58/keymaps/yshrsmz/keymap.c index da840e58545..6b31663239e 100644 --- a/keyboards/lily58/keymaps/yshrsmz/keymap.c +++ b/keyboards/lily58/keymaps/yshrsmz/keymap.c @@ -158,7 +158,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -170,6 +170,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lily58/keymaps/yuchi/keymap.c b/keyboards/lily58/keymaps/yuchi/keymap.c index 02279bb8a0f..2cab439c3b3 100644 --- a/keyboards/lily58/keymaps/yuchi/keymap.c +++ b/keyboards/lily58/keymaps/yuchi/keymap.c @@ -140,7 +140,7 @@ const char *read_keylogs(void); // void set_timelog(void); // const char *read_timelog(void); -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -152,6 +152,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/lime/keymaps/default/keymap.c b/keyboards/lime/keymaps/default/keymap.c index f6c711597d2..2d904d36db5 100644 --- a/keyboards/lime/keymaps/default/keymap.c +++ b/keyboards/lime/keymaps/default/keymap.c @@ -463,7 +463,7 @@ bool showedJump = true; return OLED_ROTATION_270; } - void oled_task_user(void) { + bool oled_task_user(void) { /* Keyboard Pet Variables */ current_wpm = get_current_wpm(); @@ -474,6 +474,7 @@ bool showedJump = true; } else { print_logo_narrow(); } + return false; } #endif diff --git a/keyboards/lime/keymaps/default/rules.mk b/keyboards/lime/keymaps/default/rules.mk index cc5b7ac9aa3..b4572ce79a4 100644 --- a/keyboards/lime/keymaps/default/rules.mk +++ b/keyboards/lime/keymaps/default/rules.mk @@ -4,4 +4,6 @@ JOYSTICK_ENABLE = yes JOYSTICK_DRIVER = analog EXTRAKEY_ENABLE = yes WPM_ENABLE = yes +LTO_ENABLE = yes + SRC += analog.c diff --git a/keyboards/lime/rev1/info.json b/keyboards/lime/rev1/info.json index 14aafb32359..0dcadc78232 100644 --- a/keyboards/lime/rev1/info.json +++ b/keyboards/lime/rev1/info.json @@ -5,21 +5,73 @@ "layouts": { "LAYOUT": { "layout": [ - {"label":"#", "x":3, "y":0}, {"label":"*", "x":11.5, "y":0}, {"label":"@", "x":2, "y":0.13}, {"label":"$", "x":4, "y":0.13}, {"label":"&", "x":10.5, "y":0.13}, - {"label":"(", "x":12.5, "y":0.13}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":9.5, "y":0.25}, {"label":"!", "x":1, "y":0.38}, {"label":")", "x":13.5, "y":0.38}, - {"label":"Esc", "x":0, "y":0.5}, {"label":"", "x":14.5, "y":0.5}, {"label":"E", "x":3, "y":1}, {"label":"I", "x":11.5, "y":1}, - {"label":"W", "x":2, "y":1.13}, {"label":"R", "x":4, "y":1.13}, {"label":"U", "x":10.5, "y":1.13}, {"label":"O", "x":12.5, "y":1.13}, {"label":"T", "x":5, "y":1.25}, - {"label":"Y", "x":9.5, "y":1.25}, {"label":"Q", "x":1, "y":1.38}, {"label":"P", "x":13.5, "y":1.38}, {"label":"", "x":0, "y":1.5}, - {"label":"~", "x":14.5, "y":1.5}, {"label":"D", "x":3, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"S", "x":2, "y":2.13}, {"label":"F", "x":4, "y":2.13}, - {"label":"J", "x":10.5, "y":2.13}, {"label":"L", "x":12.5, "y":2.13}, {"label":"G", "x":5, "y":2.25}, {"label":"H", "x":9.5, "y":2.25}, {"label":"A", "x":1, "y":2.38}, - {"label":":", "x":13.5, "y":2.38}, {"label":"", "x":0, "y":2.5}, {"label":"\"", "x":14.5, "y":2.5}, {"label":"C", "x":3, "y":3}, - {"label":"<", "x":11.5, "y":3}, {"label":"X", "x":2, "y":3.13}, {"label":"V", "x":4, "y":3.13}, {"label":"M", "x":10.5, "y":3.13}, {"label":">", "x":12.5, "y":3.13}, - {"label":"B", "x":5, "y":3.25}, {"label":"Joystick", "x":6, "y":3.25}, {"label":"Encoder", "x":8.5, "y":3.25}, {"label":"N", "x":9.5, "y":3.25}, - {"label":"Z", "x":1, "y":3.38}, {"label":"?", "x":13.5, "y":3.38}, {"label":"", "x":0, "y":3.5}, {"label":"|", "x":14.5, "y":3.5}, - {"label":"Alt", "x":2.35, "y":4.13}, {"label":"Del", "x":3.35, "y":4.13}, {"label":"{", "x":11.15, "y":4.13}, {"label":"}", "x":12.15, "y":4.13}, - {"label":"OS", "x":1.35, "y":4.35}, {"label":"_", "x":13.15, "y":4.38}, {"label":"Lower", "x":0.35, "y":4.5}, {"label":"+", "x":14.15, "y":4.5}, - {"label":"Ctrl", "x":5.55, "y":2.85}, {"label":"Enter", "x":-0.4, "y":4.1, "h":1.25}, {"label":"Space", "x":-4.1, "y":3.35, "h":1.25}, {"label":"Raise", "x":8.4, "y":11.2} - ] - } + {"label":"Esc", "x":0, "y":0.5}, + {"label":"1!", "x":1, "y":0.38}, + {"label":"2@", "x":2, "y":0.13}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0.13}, + {"label":"5%", "x":5, "y":0.25}, + {"label":"6^", "x":9, "y":0.25}, + {"label":"7&", "x":10, "y":0.13}, + {"label":"8*", "x":11, "y":0}, + {"label":"9(", "x":12, "y":0.13}, + {"label":"0)", "x":13, "y":0.38}, + {"label":"Backspace", "x":14, "y":0.5}, + + {"label":"Tab", "x":0, "y":1.5}, + {"label":"Q", "x":1, "y":1.38}, + {"label":"W", "x":2, "y":1.13}, + {"label":"E", "x":3, "y":1}, + {"label":"R", "x":4, "y":1.13}, + {"label":"T", "x":5, "y":1.25}, + {"label":"Y", "x":9, "y":1.25}, + {"label":"U", "x":10, "y":1.13}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1.13}, + {"label":"P", "x":13, "y":1.38}, + {"label":"`~", "x":14, "y":1.5}, + + {"label":"Caps Lock", "x":0, "y":2.5}, + {"label":"A", "x":1, "y":2.38}, + {"label":"S", "x":2, "y":2.13}, + {"label":"D", "x":3, "y":2}, + {"label":"F", "x":4, "y":2.13}, + {"label":"G", "x":5, "y":2.25}, + {"label":"H", "x":9, "y":2.25}, + {"label":"J", "x":10, "y":2.13}, + {"label":"K", "x":11, "y":2}, + {"label":"L", "x":12, "y":2.13}, + {"label":";:", "x":13, "y":2.38}, + {"label":"'\"", "x":14, "y":2.5}, + + {"label":"Shift", "x":0, "y":3.5}, + {"label":"Z", "x":1, "y":3.38}, + {"label":"X", "x":2, "y":3.13}, + {"label":"C", "x":3, "y":3}, + {"label":"V", "x":4, "y":3.13}, + {"label":"B", "x":5, "y":3.25}, + {"label":"Joystick", "x":6, "y":3.25}, + {"label":"Encoder", "x":8, "y":3.25}, + {"label":"N", "x":9, "y":3.25}, + {"label":"M", "x":10, "y":3.13}, + {"label":",<", "x":11, "y":3}, + {"label":".>", "x":12, "y":3.13}, + {"label":"/?", "x":13, "y":3.38}, + {"label":"\\|", "x":14, "y":3.5}, + + {"label":"Lower", "x":0.35, "y":4.5}, + {"label":"OS", "x":1.35, "y":4.38}, + {"label":"Alt", "x":2.35, "y":4.13}, + {"label":"Del", "x":3.35, "y":4.13}, + {"label":"Ctrl", "x":4.55, "y":4.5}, + {"label":"Enter", "x":5.75, "y":4.25, "h":1.25}, + {"label":"Space", "x":8.25, "y":4.25, "h":1.25}, + {"label":"Raise", "x":9.45, "y":4.5}, + {"label":"[{", "x":10.65, "y":4.13}, + {"label":"]}", "x":11.65, "y":4.13}, + {"label":"-_", "x":12.65, "y":4.38}, + {"label":"=+", "x":13.65, "y":4.5} + ] } + } } diff --git a/keyboards/linworks/fave87/rules.mk b/keyboards/linworks/fave87/rules.mk index b2c48df882d..e63f2359c82 100644 --- a/keyboards/linworks/fave87/rules.mk +++ b/keyboards/linworks/fave87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/linworks/whale75/rules.mk b/keyboards/linworks/whale75/rules.mk index 2323ca37194..1d72891376b 100644 --- a/keyboards/linworks/whale75/rules.mk +++ b/keyboards/linworks/whale75/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lizard_trick/tenkey_plusplus/rules.mk b/keyboards/lizard_trick/tenkey_plusplus/rules.mk index d747921e916..baba7d9d862 100644 --- a/keyboards/lizard_trick/tenkey_plusplus/rules.mk +++ b/keyboards/lizard_trick/tenkey_plusplus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lm_keyboard/lm60n/rules.mk b/keyboards/lm_keyboard/lm60n/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/lm_keyboard/lm60n/rules.mk +++ b/keyboards/lm_keyboard/lm60n/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/longnald/corin/rules.mk b/keyboards/longnald/corin/rules.mk index a3b924ec2e5..a488e3dc0b0 100644 --- a/keyboards/longnald/corin/rules.mk +++ b/keyboards/longnald/corin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ls_60/rules.mk b/keyboards/ls_60/rules.mk index 945a795d044..8ac8fcb8be9 100644 --- a/keyboards/ls_60/rules.mk +++ b/keyboards/ls_60/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/lyra/lyra.c b/keyboards/lyra/lyra.c index 19f6e446426..6b9c47c4a04 100644 --- a/keyboards/lyra/lyra.c +++ b/keyboards/lyra/lyra.c @@ -1,31 +1,34 @@ /* Copyright 2021 Domanic Calleja - * - * 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 . - */ + * + * 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 . + */ #include "lyra.h" -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE // 'lyralogooled', 32x128px -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { if (is_keyboard_master()) { return OLED_ROTATION_270; } return rotation; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { oled_write_P(PSTR(" "), false); # ifdef WPM_ENABLE @@ -50,40 +53,41 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(PSTR("Dom C"), false); } else { static const char PROGMEM QMK_logo[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x18, 0x0c, 0x04, 0x06, 0x02, - 0x02, 0x82, 0xc0, 0xf0, 0x38, 0x8c, 0xf2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x18, 0x30, 0x20, 0xa0, 0xe0, 0xf8, - 0x3e, 0x1f, 0x13, 0x0c, 0x06, 0xc3, 0xf0, 0x60, 0x00, 0x80, 0xf0, 0xe0, 0x00, 0x38, 0xfe, 0x67, - 0x7b, 0xa5, 0xf3, 0xf0, 0x70, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x30, 0x20, 0x00, 0x00, - 0x00, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0x3e, 0x61, 0xdf, - 0xde, 0xde, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x80, 0x80, 0xff, 0xc0, 0xdf, 0xdf, 0xdf, 0xe0, 0xff, - 0x7f, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0xfe, 0xc1, 0xfd, 0x7d, 0xc3, 0xfd, 0x7d, - 0xc3, 0xfe, 0xfc, 0x30, 0xea, 0xd5, 0xd5, 0xd5, 0xc3, 0xff, 0xfe, 0x7e, 0xc1, 0xfd, 0x7d, 0x7d, - 0xc3, 0xfe, 0xfc, 0x3f, 0xe1, 0xff, 0xff, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xf7, 0xe6, 0x00, 0x00, - 0x00, 0x78, 0xc4, 0xc2, 0x82, 0x82, 0x82, 0x82, 0xc2, 0xe4, 0x74, 0x7c, 0x3f, 0x1f, 0x31, 0x60, - 0xe0, 0xc0, 0x80, 0x9c, 0xbf, 0xe7, 0xf1, 0x78, 0x3e, 0x1f, 0x0b, 0x04, 0x02, 0x01, 0x00, 0x1c, - 0x3e, 0x2f, 0x13, 0x10, 0x0c, 0x1e, 0x3f, 0x2f, 0x13, 0x09, 0x1c, 0x3e, 0x2f, 0x10, 0x08, 0x06, - 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, - 0x06, 0x06, 0x07, 0x03, 0x7f, 0xc1, 0xbe, 0xbe, 0xbe, 0xa6, 0xe7, 0xc7, 0x60, 0xd4, 0xaa, 0xaa, - 0xaa, 0x86, 0xfe, 0xfc, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xc4, 0xaa, 0xaa, 0xaa, - 0xa6, 0xfc, 0xf8, 0xff, 0x02, 0xff, 0xff, 0x60, 0xd4, 0xaa, 0xaa, 0xaa, 0x86, 0xfe, 0xfc, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x24, - 0x32, 0x1b, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x78, 0x70, 0x70, 0x70, 0x30, 0x38, - 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, - 0x01, 0x01, 0x07, 0x0d, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x18, 0x0c, 0x04, 0x06, 0x02, + 0x02, 0x82, 0xc0, 0xf0, 0x38, 0x8c, 0xf2, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0xc0, 0x80, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x80, 0x40, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x1f, 0x18, 0x30, 0x20, 0xa0, 0xe0, 0xf8, + 0x3e, 0x1f, 0x13, 0x0c, 0x06, 0xc3, 0xf0, 0x60, 0x00, 0x80, 0xf0, 0xe0, 0x00, 0x38, 0xfe, 0x67, + 0x7b, 0xa5, 0xf3, 0xf0, 0x70, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xe0, 0x70, 0x30, 0x20, 0x00, 0x00, + 0x00, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xc0, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0x3e, 0x61, 0xdf, + 0xde, 0xde, 0x01, 0xff, 0xfe, 0x00, 0x80, 0x80, 0x80, 0xff, 0xc0, 0xdf, 0xdf, 0xdf, 0xe0, 0xff, + 0x7f, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xe3, 0x7e, 0x3c, 0xfe, 0xc1, 0xfd, 0x7d, 0xc3, 0xfd, 0x7d, + 0xc3, 0xfe, 0xfc, 0x30, 0xea, 0xd5, 0xd5, 0xd5, 0xc3, 0xff, 0xfe, 0x7e, 0xc1, 0xfd, 0x7d, 0x7d, + 0xc3, 0xfe, 0xfc, 0x3f, 0xe1, 0xff, 0xff, 0x3c, 0x62, 0xdd, 0xdd, 0xdd, 0xf7, 0xe6, 0x00, 0x00, + 0x00, 0x78, 0xc4, 0xc2, 0x82, 0x82, 0x82, 0x82, 0xc2, 0xe4, 0x74, 0x7c, 0x3f, 0x1f, 0x31, 0x60, + 0xe0, 0xc0, 0x80, 0x9c, 0xbf, 0xe7, 0xf1, 0x78, 0x3e, 0x1f, 0x0b, 0x04, 0x02, 0x01, 0x00, 0x1c, + 0x3e, 0x2f, 0x13, 0x10, 0x0c, 0x1e, 0x3f, 0x2f, 0x13, 0x09, 0x1c, 0x3e, 0x2f, 0x10, 0x08, 0x06, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, + 0x06, 0x06, 0x07, 0x03, 0x7f, 0xc1, 0xbe, 0xbe, 0xbe, 0xa6, 0xe7, 0xc7, 0x60, 0xd4, 0xaa, 0xaa, + 0xaa, 0x86, 0xfe, 0xfc, 0x7f, 0xc0, 0xff, 0xff, 0x7f, 0xc0, 0xff, 0xff, 0xc4, 0xaa, 0xaa, 0xaa, + 0xa6, 0xfc, 0xf8, 0xff, 0x02, 0xff, 0xff, 0x60, 0xd4, 0xaa, 0xaa, 0xaa, 0x86, 0xfe, 0xfc, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x28, 0x24, + 0x32, 0x1b, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x3c, 0x38, 0x38, 0x78, 0x70, 0x70, 0x70, 0x30, 0x38, + 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, + 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, + 0x01, 0x01, 0x07, 0x0d, 0x0e, 0x07, 0x03, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; oled_write_raw_P(QMK_logo, sizeof(QMK_logo)); } + return false; } -#endif +#endif diff --git a/keyboards/m3n3van/rules.mk b/keyboards/m3n3van/rules.mk index fdbad5fc48a..698cce9fb10 100644 --- a/keyboards/m3n3van/rules.mk +++ b/keyboards/m3n3van/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/m65/rev1/rules.mk b/keyboards/m65/rev1/rules.mk index 8551c9161ad..c4a82598075 100644 --- a/keyboards/m65/rev1/rules.mk +++ b/keyboards/m65/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/makrosu/rules.mk b/keyboards/makrosu/rules.mk index 244d66951d0..ae3cb78f313 100644 --- a/keyboards/makrosu/rules.mk +++ b/keyboards/makrosu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/manta60/post_rules.mk b/keyboards/manta60/post_rules.mk new file mode 100644 index 00000000000..e26b52df30f --- /dev/null +++ b/keyboards/manta60/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/manta60/rules.mk b/keyboards/manta60/rules.mk index 1b715cd40fb..876ab730127 100644 --- a/keyboards/manta60/rules.mk +++ b/keyboards/manta60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,7 +22,3 @@ AUDIO_ENABLE = no # Audio output SPLIT_KEYBOARD = yes IOS_DEVICE_ENABLE = no # connect to IOS device (iPad, iPhone) - -ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE -endif diff --git a/keyboards/manyboard/macro/rules.mk b/keyboards/manyboard/macro/rules.mk index 8d87581026a..34d79efae17 100644 --- a/keyboards/manyboard/macro/rules.mk +++ b/keyboards/manyboard/macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/marksard/rhymestone/keymaps/default/keymap.c b/keyboards/marksard/rhymestone/keymaps/default/keymap.c index f25955c9173..0bc98197731 100644 --- a/keyboards/marksard/rhymestone/keymaps/default/keymap.c +++ b/keyboards/marksard/rhymestone/keymaps/default/keymap.c @@ -158,13 +158,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/marksard/rhymestone/rev1/config.h b/keyboards/marksard/rhymestone/rev1/config.h index 9833925110b..4448e512683 100644 --- a/keyboards/marksard/rhymestone/rev1/config.h +++ b/keyboards/marksard/rhymestone/rev1/config.h @@ -102,50 +102,50 @@ along with this program. If not, see . #define RGB_MATRIX_VAL_STEP 8 #define RGB_MATRIX_SPD_STEP 10 -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -// #define DISABLE_RGB_MATRIX_CYCLE_ALL -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -// #define DISABLE_RGB_MATRIX_DUAL_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// #define DISABLE_RGB_MATRIX_RAINDROPS -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - - #define RGB_MATRIX_FRAMEBUFFER_EFFECTS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +// #undef ENABLE_RGB_MATRIX_BAND_SAT +// #undef ENABLE_RGB_MATRIX_BAND_VAL +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #undef ENABLE_RGB_MATRIX_RAINDROPS +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // #define RGB_MATRIX_KEYPRESSES // reacts to keypresses -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - -// #define DISABLE_RGB_MATRIX_SPLASH -// #define DISABLE_RGB_MATRIX_MULTISPLASH -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH - - #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + +// #undef ENABLE_RGB_MATRIX_SPLASH +// #undef ENABLE_RGB_MATRIX_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/massdrop/alt/alt.h b/keyboards/massdrop/alt/alt.h index 03960954506..c3761bee8ba 100644 --- a/keyboards/massdrop/alt/alt.h +++ b/keyboards/massdrop/alt/alt.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT_65_ansi_blocker( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index d28094c4923..df3cd891b64 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -43,6 +43,9 @@ along with this program. If not, see . /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -50,22 +53,18 @@ along with this program. If not, see . /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -94,6 +93,15 @@ along with this program. If not, see . #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -126,5 +134,53 @@ along with this program. If not, see . #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #include "config_led.h" diff --git a/keyboards/massdrop/alt/config_led.h b/keyboards/massdrop/alt/config_led.h index 82117b33279..b600dd23b98 100644 --- a/keyboards/massdrop/alt/config_led.h +++ b/keyboards/massdrop/alt/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see . //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -129,46 +129,45 @@ along with this program. If not, see . { .id = 66, .x = 10.5, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 8, .swg = 7, .swb = 9 }, .scan = 73 }, \ { .id = 67, .x = 11.25, .y = -3, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 74 }, \ { .id = 68, .x = -0.338, .y = -3.338, .adr = { .drv = 2, .cs = 11, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 69, .x = 0.39, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 70, .x = 1.263, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 71, .x = 2.135, .y = -3.443, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 72, .x = 3.008, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 73, .x = 3.88, .y = -3.443, .adr = { .drv = 2, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 74, .x = 4.753, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 75, .x = 5.625, .y = -3.443, .adr = { .drv = 2, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 76, .x = 6.497, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 77, .x = 7.37, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 78, .x = 8.242, .y = -3.443, .adr = { .drv = 1, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 79, .x = 9.115, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 80, .x = 9.987, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 81, .x = 10.86, .y = -3.443, .adr = { .drv = 1, .cs = 13, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 82, .x = 11.588, .y = -3.338, .adr = { .drv = 1, .cs = 13, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 83, .x = 11.693, .y = -2.623, .adr = { .drv = 1, .cs = 12, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 84, .x = 11.693, .y = -1.873, .adr = { .drv = 1, .cs = 8, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ { .id = 85, .x = 11.693, .y = -1.123, .adr = { .drv = 1, .cs = 8, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ - { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 86, .x = 11.693, .y = -0.373, .adr = { .drv = 1, .cs = 8, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 87, .x = 11.588, .y = 0.338, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 88, .x = 9.908, .y = 0.443, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 9.288, .y = 0.443, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 8.625, .y = 0.443, .adr = { .drv = 1, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 7.875, .y = 0.443, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 7.125, .y = 0.443, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 6.375, .y = 0.443, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 5.625, .y = 0.443, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 4.875, .y = 0.443, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.125, .y = 0.443, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.375, .y = 0.443, .adr = { .drv = 2, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 2.625, .y = 0.443, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 1.875, .y = 0.443, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = 1.125, .y = 0.443, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ { .id = 101, .x = -0.338, .y = 0.338, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 102, .x = -0.443, .y = -0.373, .adr = { .drv = 2, .cs = 1, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ { .id = 103, .x = -0.443, .y = -1.123, .adr = { .drv = 2, .cs = 1, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ { .id = 104, .x = -0.443, .y = -1.873, .adr = { .drv = 2, .cs = 1, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 105, .x = -0.443, .y = -2.623, .adr = { .drv = 2, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ }; - #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality #ifdef USB_LED_INDICATOR_ENABLE //Scan codes refer to actual key matrix codes, not KC_* (255 to disable) #define USB_LED_NUM_LOCK_SCANCODE 255 diff --git a/keyboards/massdrop/alt/keymaps/default_md/keymap.c b/keyboards/massdrop/alt/keymaps/default_md/keymap.c index 810585a3df4..fa8b294cd11 100644 --- a/keyboards/massdrop/alt/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -69,6 +84,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +175,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +209,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c index b3626c1b611..bfcadf89002 100644 --- a/keyboards/massdrop/alt/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum alt_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum alt_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -31,10 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ - _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, KC_PGUP, KC_VOLD, \ + _______, _______, _______, DBG_FAC, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), /* [X] = LAYOUT( @@ -53,6 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -69,6 +76,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -128,7 +167,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -136,6 +201,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/alt/keymaps/pregame/config.h b/keyboards/massdrop/alt/keymaps/pregame/config.h index 32dee56d302..19fc4fed34d 100644 --- a/keyboards/massdrop/alt/keymaps/pregame/config.h +++ b/keyboards/massdrop/alt/keymaps/pregame/config.h @@ -115,42 +115,42 @@ // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -// #define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -// #define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -// #define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -// #define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -// #define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +// #undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +// #undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +// #undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +// #undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +// #undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +// #undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +// #undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +// #undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +// #undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +// #undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 3dbd9b88770..6c0678c5ed8 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -42,6 +42,9 @@ along with this program. If not, see . /* Temporary solution for matrix delay */ #define IGNORE_ATOMIC_BLOCK +/* Avoid out-of-bounds errors when SmartEEPROM is not enabled */ +#define EEPROM_SIZE 1024 + /* MCU Port name definitions */ #define PA 0 #define PB 1 @@ -49,22 +52,18 @@ along with this program. If not, see . /* This Shift Register expands available hardware output lines to control additional peripherals */ /* It uses four lines from the MCU to provide 16 output lines */ /* Shift Register Clock configuration (MCU to ShiftRegister.RCLK) */ -#define SR_EXP_RCLK_PORT PB -#define SR_EXP_RCLK_PIN 14 +#define SR_EXP_RCLK_PIN B14 /* Shift Register Output Enable configuration (MCU to ShiftRegister.OE_N) */ -#define SR_EXP_OE_N_PORT PB -#define SR_EXP_OE_N_PIN 15 +#define SR_EXP_OE_PIN B15 /* SERCOM port to use for Shift Register SPI */ /* DATAOUT and SCLK must be configured to use hardware pins of this port */ -#define SR_EXP_SERCOM SERCOM2 +#define SPI_SERCOM SERCOM2 /* Shift Register SPI Data Out configuration (MCU.SERCOMx.PAD[0] to ShiftRegister.SER) */ -#define SR_EXP_DATAOUT_PORT PA -#define SR_EXP_DATAOUT_PIN 12 -#define SR_EXP_DATAOUT_MUX 2 +#define SPI_DATAOUT_PIN A12 +#define SPI_DATAOUT_MUX 2 /* Shift Register SPI Serial Clock configuration (MCU.SERCOMx.PAD[1] to ShiftRegister.SRCLK) */ -#define SR_EXP_SCLK_PORT PA -#define SR_EXP_SCLK_PIN 13 -#define SR_EXP_SCLK_MUX 2 +#define SPI_SCLK_PIN A13 +#define SPI_SCLK_MUX 2 /* Debug LED (Small LED Located near MCU) */ #define DEBUG_LED_ENABLE 1 @@ -93,6 +92,15 @@ along with this program. If not, see . #define DEBUG_BOOT_TRACING_PORT PB #define DEBUG_BOOT_TRACING_PIN 23 +/* USB2422 config */ +#define USB2422_ADDRESS 0x58 +#define USB2422_VENDOR_ID 0x04D8 +#define USB2422_PRODUCT_ID 0xEEC5 +#define USB2422_DEVICE_VER 0x0101 +#define USB2422_MANUFACTURER "Massdrop Inc." +#define USB2422_PRODUCT "Massdrop Hub" +#define USB2422_ACTIVE_PIN A18 + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 @@ -125,5 +133,53 @@ along with this program. If not, see . #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 15 #define RGB_MATRIX_LED_FLUSH_LIMIT 10 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #include "config_led.h" diff --git a/keyboards/massdrop/ctrl/config_led.h b/keyboards/massdrop/ctrl/config_led.h index 0c91a0c80ba..de897ce1bd9 100644 --- a/keyboards/massdrop/ctrl/config_led.h +++ b/keyboards/massdrop/ctrl/config_led.h @@ -58,7 +58,7 @@ along with this program. If not, see . //swr: Matrix wiring SW Red row (1-12) //swg: Matrix wiring SW Green row (1-12) //swb: Matrix wiring SW Blue row (1-12) -//scan: Associated key scancode if any +//scan: Associated key matrix scancode (set 255 if none or 254 for LED to turn off in alternating mode) //Note: Origin 0,0 may be located anywhere as the software will do the final layout #define ISSI3733_LED_MAP { \ { .id = 1, .x = 0, .y = 0, .adr = { .drv = 2, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 0 }, \ @@ -149,37 +149,37 @@ along with this program. If not, see . { .id = 86, .x = 12.375, .y = -4.125, .adr = { .drv = 1, .cs = 12, .swr = 5, .swg = 4, .swb = 6 }, .scan = 85 }, \ { .id = 87, .x = 13.125, .y = -4.125, .adr = { .drv = 1, .cs = 11, .swr = 5, .swg = 4, .swb = 6 }, .scan = 86 }, \ { .id = 88, .x = 13.433, .y = -4.43, .adr = { .drv = 1, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 89, .x = 12.285, .y = -4.535, .adr = { .drv = 1, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 90, .x = 11.14, .y = -4.535, .adr = { .drv = 1, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 91, .x = 9.995, .y = -4.535, .adr = { .drv = 1, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 92, .x = 8.85, .y = -4.535, .adr = { .drv = 1, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 93, .x = 7.705, .y = -4.535, .adr = { .drv = 1, .cs = 16, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 94, .x = 6.56, .y = -4.535, .adr = { .drv = 2, .cs = 9, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 95, .x = 5.415, .y = -4.535, .adr = { .drv = 2, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 96, .x = 4.27, .y = -4.535, .adr = { .drv = 2, .cs = 11, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 97, .x = 3.125, .y = -4.535, .adr = { .drv = 2, .cs = 12, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 98, .x = 1.98, .y = -4.535, .adr = { .drv = 2, .cs = 13, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 99, .x = 0.835, .y = -4.535, .adr = { .drv = 2, .cs = 14, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 100, .x = -0.307, .y = -4.43, .adr = { .drv = 2, .cs = 15, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ + { .id = 101, .x = -0.41, .y = -3.245, .adr = { .drv = 2, .cs = 15, .swr = 11, .swg = 10, .swb = 12 }, .scan = 254 }, \ { .id = 102, .x = -0.41, .y = -2.06, .adr = { .drv = 2, .cs = 15, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ - { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 103, .x = -0.41, .y = -0.875, .adr = { .drv = 2, .cs = 15, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 104, .x = -0.308, .y = 0.31, .adr = { .drv = 2, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 105, .x = 0.835, .y = 0.415, .adr = { .drv = 2, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 106, .x = 1.98, .y = 0.415, .adr = { .drv = 2, .cs = 4, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 107, .x = 3.125, .y = 0.415, .adr = { .drv = 2, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 108, .x = 4.27, .y = 0.415, .adr = { .drv = 2, .cs = 7, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 109, .x = 5.415, .y = 0.415, .adr = { .drv = 2, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 110, .x = 6.56, .y = 0.415, .adr = { .drv = 1, .cs = 1, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 111, .x = 7.705, .y = 0.415, .adr = { .drv = 1, .cs = 2, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 112, .x = 8.85, .y = 0.415, .adr = { .drv = 1, .cs = 3, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 113, .x = 9.995, .y = 0.415, .adr = { .drv = 1, .cs = 5, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 114, .x = 11.14, .y = 0.415, .adr = { .drv = 1, .cs = 6, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ + { .id = 115, .x = 12.285, .y = 0.415, .adr = { .drv = 1, .cs = 8, .swr = 2, .swg = 1, .swb = 3 }, .scan = 254 }, \ { .id = 116, .x = 13.432, .y = 0.31, .adr = { .drv = 1, .cs = 10, .swr = 2, .swg = 1, .swb = 3 }, .scan = 255 }, \ - { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 255 }, \ + { .id = 117, .x = 13.535, .y = -0.875, .adr = { .drv = 1, .cs = 10, .swr = 8, .swg = 7, .swb = 9 }, .scan = 254 }, \ { .id = 118, .x = 13.535, .y = -2.06, .adr = { .drv = 1, .cs = 10, .swr = 11, .swg = 10, .swb = 12 }, .scan = 255 }, \ - { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 255 }, \ + { .id = 119, .x = 13.535, .y = -3.245, .adr = { .drv = 1, .cs = 10, .swr = 5, .swg = 4, .swb = 6 }, .scan = 254 }, \ }; #define USB_LED_INDICATOR_ENABLE //Comment out to disable indicator functionality diff --git a/keyboards/massdrop/ctrl/ctrl.h b/keyboards/massdrop/ctrl/ctrl.h index 1650beb9a44..a3d66ba7755 100644 --- a/keyboards/massdrop/ctrl/ctrl.h +++ b/keyboards/massdrop/ctrl/ctrl.h @@ -7,7 +7,7 @@ #include "i2c_master.h" #include "md_rgb_matrix.h" //For led keycodes #include "usb/udi_cdc.h" -#include "usb/usb2422.h" +#include "usb/usb_hub.h" #define LAYOUT( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ diff --git a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c index 1083571ef94..db36131fca0 100644 --- a/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -56,6 +62,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; + + switch (keycode) { + case L_BRI ... U_T_AGCR: + if (record->event.pressed) { + md_led_changed(); + } + break; + } switch (keycode) { case L_BRI: @@ -72,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -131,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -139,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); @@ -179,7 +264,7 @@ led_instruction_t led_instructions[] = { //Flags can be found in tmk_core/protocol/arm_atsam/md_rgb_matrix.h (prefixed with LED_FLAG_) //LED IDs can be found in config_led.h in the keyboard's directory //Examples are below - + //All LEDs use the user's selected pattern (this is the factory default) { .flags = LED_FLAG_USE_ROTATE_PATTERN }, @@ -188,7 +273,7 @@ led_instruction_t led_instructions[] = { //Specific LEDs use specified RGB values while all others are off // { .flags = LED_FLAG_MATCH_ID | LED_FLAG_USE_RGB, .id0 = 0xFF, .id1 = 0x00FF, .id2 = 0x0000FF00, .id3 = 0xFF000000, .r = 75, .g = 150, .b = 225 }, - + //All LEDs use the user's selected pattern //On layer 1, all key LEDs (except the top row which keeps active pattern) are red while all edge LEDs are green //When layer 1 is active, key LEDs use red (id0 32 - 17: 1111 1111 1111 1111 0000 0000 0000 0000 = 0xFFFF0000) (except top row 16 - 1) diff --git a/keyboards/massdrop/ctrl/keymaps/endgame/config.h b/keyboards/massdrop/ctrl/keymaps/endgame/config.h index ad738347abd..4850d7eed2f 100644 --- a/keyboards/massdrop/ctrl/keymaps/endgame/config.h +++ b/keyboards/massdrop/ctrl/keymaps/endgame/config.h @@ -75,42 +75,42 @@ // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -// #define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +// #undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +// #undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c index ba02d5e506a..4a85b375b39 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac_md/keymap.c @@ -3,10 +3,15 @@ enum ctrl_keycodes { L_BRI = SAFE_RANGE, //LED Brightness Increase //Working L_BRD, //LED Brightness Decrease //Working + L_EDG_I, //LED Edge Brightness Increase + L_EDG_D, //LED Edge Brightness Decrease + L_EDG_M, //LED Edge lighting mode L_PTN, //LED Pattern Select Next //Working L_PTP, //LED Pattern Select Previous //Working L_PSI, //LED Pattern Speed Increase //Working L_PSD, //LED Pattern Speed Decrease //Working + L_RATIOD, + L_RATIOI, L_T_MD, //LED Toggle Mode //Working L_T_ONF, //LED Toggle On / Off //Broken L_ON, //LED On //Broken @@ -18,6 +23,7 @@ enum ctrl_keycodes { DBG_MTRX, //DEBUG Toggle Matrix Prints // DBG_KBD, //DEBUG Toggle Keyboard Prints // DBG_MOU, //DEBUG Toggle Mouse Prints // + DBG_FAC, //DEBUG Factory light testing (All on white) MD_BOOT //Restart into bootloader after hold timeout //Working }; @@ -33,10 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ - L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ - L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + L_T_BR, L_PSD, L_BRI, L_PSI, L_EDG_I, _______, _______, _______, U_T_AGCR,_______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ + L_T_PTD, L_PTP, L_BRD, L_PTN, L_EDG_D, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, L_T_MD, L_T_ONF, _______, L_EDG_M, MD_BOOT, NK_TOGG, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, DBG_FAC, _______, _______, _______, _______, _______, _______, _______ \ ), /* [X] = LAYOUT( @@ -64,6 +70,7 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; + static uint8_t scroll_effect = 0; switch (keycode) { case L_BRI: @@ -80,6 +87,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (led_animation_breathing) gcr_breathe = gcr_desired; } return false; + case L_EDG_M: + if (record->event.pressed) { + led_edge_mode++; + if (led_edge_mode > LED_EDGE_MODE_MAX) { + led_edge_mode = LED_EDGE_MODE_ALL; + } + } + return false; + case L_EDG_I: + if (record->event.pressed) { + led_edge_brightness += 0.1; + if (led_edge_brightness > 1) { led_edge_brightness = 1; } + } + return false; + case L_EDG_D: + if (record->event.pressed) { + led_edge_brightness -= 0.1; + if (led_edge_brightness < 0) { led_edge_brightness = 0; } + } + return false; + case L_RATIOI: + if (record->event.pressed) { + led_ratio_brightness += 0.2; + if (led_ratio_brightness > 2.0) { led_ratio_brightness = 2.0; } + } + return false; + case L_RATIOD: + if (record->event.pressed) { + led_ratio_brightness -= 0.2; + if (led_ratio_brightness < 0.0) { led_ratio_brightness = 0.0; } + } + return false; case L_PTN: if (record->event.pressed) { if (led_animation_id == led_setups_count - 1) led_animation_id = 0; @@ -139,7 +178,33 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; case L_T_PTD: if (record->event.pressed) { - led_animation_direction = !led_animation_direction; + scroll_effect++; + if (scroll_effect == 1) { //Patterns with scroll move horizontal (Right to left) + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 0; + } else if (scroll_effect == 2) { //Patterns with scroll move vertical (Top to bottom) + led_animation_direction = 1; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 3) { //Patterns with scroll move vertical (Bottom to top) + led_animation_direction = 0; + led_animation_orientation = 1; + led_animation_circular = 0; + } else if (scroll_effect == 4) { //Patterns with scroll explode from center + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 1; + } else if (scroll_effect == 5) { //Patterns with scroll implode on center + led_animation_direction = 1; + led_animation_orientation = 0; + led_animation_circular = 1; + } else { //Patterns with scroll move horizontal (Left to right) + scroll_effect = 0; + led_animation_direction = 0; + led_animation_orientation = 0; + led_animation_circular = 0; + } } return false; case U_T_AGCR: @@ -147,6 +212,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode"); } return false; + case DBG_FAC: + if (record->event.pressed && MODS_SHIFT && MODS_CTRL) { + led_lighting_mode = LED_MODE_NORMAL; + led_edge_brightness = 1; + led_edge_mode = LED_EDGE_MODE_ALL; + led_animation_breathing = 0; + led_animation_id = 7; //led_programs.c led_setups leds_white index + gcr_desired = LED_GCR_MAX; + led_enabled = 1; + I2C3733_Control_Set(led_enabled); + } + return false; case DBG_TOG: if (record->event.pressed) { TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode"); diff --git a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h index 89c129c58e9..81e7764a9ee 100644 --- a/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h +++ b/keyboards/massdrop/ctrl/keymaps/matthewrobo/config.h @@ -93,42 +93,42 @@ along with this program. If not, see . // #define RGBLIGHT_EFFECT_SNAKE_LENGTH 4 // The number of LEDs to light up for the "Snake" animation // This list in in the correct mode order. Next mode is the following line, previous mode is previous line. Loops around. -// #define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -// #define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -#define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -#define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -#define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -#define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -#define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +// #undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +#undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +#undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +#undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +// #undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +#undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +#undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation // =================================================== Requires RGB_MATRIX_FRAMEBUFFER_EFFECTS ============================================================= -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +// #undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation // =================================================== RGB_MATRIX_KEYPRESSES OR RGB_MATRIX_KEYRELEASES ===================================================== -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// #undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out diff --git a/keyboards/masterworks/classy_tkl/rev_a/rules.mk b/keyboards/masterworks/classy_tkl/rev_a/rules.mk index 336e630699f..24ca03b845f 100644 --- a/keyboards/masterworks/classy_tkl/rev_a/rules.mk +++ b/keyboards/masterworks/classy_tkl/rev_a/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/matchstickworks/southpad/rules.mk b/keyboards/matchstickworks/southpad/rules.mk index 53e91d6074d..abb5f150552 100644 --- a/keyboards/matchstickworks/southpad/rules.mk +++ b/keyboards/matchstickworks/southpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/abelx/chconf.h b/keyboards/matrix/abelx/chconf.h index 2a2c8c2a92f..0d6c21a9648 100644 --- a/keyboards/matrix/abelx/chconf.h +++ b/keyboards/matrix/abelx/chconf.h @@ -1,756 +1,27 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file rt/templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ -#define _CHIBIOS_RT_CONF_VER_6_1_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#if !defined(CH_CFG_ST_RESOLUTION) -#define CH_CFG_ST_RESOLUTION 32 -#endif - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#if !defined(CH_CFG_ST_FREQUENCY) -#define CH_CFG_ST_FREQUENCY 10000 -#endif - -/** - * @brief Time intervals data size. - * @note Allowed values are 16, 32 or 64 bits. - */ -#if !defined(CH_CFG_INTERVALS_SIZE) -#define CH_CFG_INTERVALS_SIZE 32 -#endif - -/** - * @brief Time types data size. - * @note Allowed values are 16 or 32 bits. - */ -#if !defined(CH_CFG_TIME_TYPES_SIZE) -#define CH_CFG_TIME_TYPES_SIZE 32 -#endif - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#if !defined(CH_CFG_ST_TIMEDELTA) -#define CH_CFG_ST_TIMEDELTA 2 -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#if !defined(CH_CFG_TIME_QUANTUM) -#define CH_CFG_TIME_QUANTUM 0 -#endif - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#if !defined(CH_CFG_NO_IDLE_THREAD) -#define CH_CFG_NO_IDLE_THREAD FALSE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_OPTIMIZE_SPEED) -#define CH_CFG_OPTIMIZE_SPEED TRUE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_TM) -#define CH_CFG_USE_TM TRUE -#endif - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_REGISTRY) -#define CH_CFG_USE_REGISTRY TRUE -#endif - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_WAITEXIT) -#define CH_CFG_USE_WAITEXIT TRUE -#endif - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_SEMAPHORES) -#define CH_CFG_USE_SEMAPHORES TRUE -#endif - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE -#endif - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_MUTEXES) -#define CH_CFG_USE_MUTEXES TRUE -#endif - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE) -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE -#endif - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#if !defined(CH_CFG_USE_CONDVARS) -#define CH_CFG_USE_CONDVARS TRUE -#endif - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE -#endif - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_EVENTS) -#define CH_CFG_USE_EVENTS TRUE -#endif - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE -#endif - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_MESSAGES) -#define CH_CFG_USE_MESSAGES TRUE -#endif - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE -#endif - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#if !defined(CH_CFG_USE_DYNAMIC) -#define CH_CFG_USE_DYNAMIC FALSE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name OSLIB options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#if !defined(CH_CFG_USE_MAILBOXES) -#define CH_CFG_USE_MAILBOXES TRUE -#endif - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_MEMCORE) -#define CH_CFG_USE_MEMCORE TRUE -#endif - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#if !defined(CH_CFG_MEMCORE_SIZE) -#define CH_CFG_MEMCORE_SIZE 0 -#endif - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#if !defined(CH_CFG_USE_HEAP) -#define CH_CFG_USE_HEAP TRUE -#endif - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_MEMPOOLS) -#define CH_CFG_USE_MEMPOOLS TRUE -#endif - -/** - * @brief Objects FIFOs APIs. - * @details If enabled then the objects FIFOs APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_OBJ_FIFOS) -#define CH_CFG_USE_OBJ_FIFOS TRUE -#endif - -/** - * @brief Pipes APIs. - * @details If enabled then the pipes APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_PIPES) -#define CH_CFG_USE_PIPES TRUE -#endif - -/** - * @brief Objects Caches APIs. - * @details If enabled then the objects caches APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_OBJ_CACHES) -#define CH_CFG_USE_OBJ_CACHES FALSE -#endif - -/** - * @brief Delegate threads APIs. - * @details If enabled then the delegate threads APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_DELEGATES) -#define CH_CFG_USE_DELEGATES FALSE -#endif - -/** - * @brief Jobs Queues APIs. - * @details If enabled then the jobs queues APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#if !defined(CH_CFG_USE_JOBS) -#define CH_CFG_USE_JOBS FALSE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Objects factory options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Objects Factory APIs. - * @details If enabled then the objects factory APIs are included in the - * kernel. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_CFG_USE_FACTORY) -#define CH_CFG_USE_FACTORY TRUE -#endif - -/** - * @brief Maximum length for object names. - * @details If the specified length is zero then the name is stored by - * pointer but this could have unintended side effects. - */ -#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH) -#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 -#endif - -/** - * @brief Enables the registry of generic objects. - */ -#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY) -#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE -#endif - -/** - * @brief Enables factory for generic buffers. - */ -#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS) -#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE -#endif - -/** - * @brief Enables factory for semaphores. - */ -#if !defined(CH_CFG_FACTORY_SEMAPHORES) -#define CH_CFG_FACTORY_SEMAPHORES TRUE -#endif - -/** - * @brief Enables factory for mailboxes. - */ -#if !defined(CH_CFG_FACTORY_MAILBOXES) -#define CH_CFG_FACTORY_MAILBOXES TRUE -#endif - -/** - * @brief Enables factory for objects FIFOs. - */ -#if !defined(CH_CFG_FACTORY_OBJ_FIFOS) -#define CH_CFG_FACTORY_OBJ_FIFOS TRUE -#endif - -/** - * @brief Enables factory for Pipes. - */ -#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__) -#define CH_CFG_FACTORY_PIPES TRUE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_DBG_STATISTICS) -#define CH_DBG_STATISTICS FALSE -#endif - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_DBG_SYSTEM_STATE_CHECK) -#define CH_DBG_SYSTEM_STATE_CHECK FALSE -#endif - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_DBG_ENABLE_CHECKS) -#define CH_DBG_ENABLE_CHECKS FALSE -#endif - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#if !defined(CH_DBG_ENABLE_ASSERTS) -#define CH_DBG_ENABLE_ASSERTS FALSE -#endif - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#if !defined(CH_DBG_TRACE_MASK) -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED -#endif - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#if !defined(CH_DBG_TRACE_BUFFER_SIZE) -#define CH_DBG_TRACE_BUFFER_SIZE 128 -#endif - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. +/* Copyright 2021 QMK * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#if !defined(CH_DBG_ENABLE_STACK_CHECK) -#define CH_DBG_ENABLE_STACK_CHECK FALSE -#endif - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. + * 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. * - * @note The default is @p FALSE. - */ -#if !defined(CH_DBG_FILL_THREADS) -#define CH_DBG_FILL_THREADS FALSE -#endif - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. + * 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. * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#if !defined(CH_DBG_THREADS_PROFILING) -#define CH_DBG_THREADS_PROFILING FALSE -#endif - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System structure extension. - * @details User fields added to the end of the @p ch_system_t structure. + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ -#define CH_CFG_SYSTEM_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ -/** - * @brief System initialization hook. - * @details User initialization code added to the @p chSysInit() function - * just before interrupts are enabled globally. - */ -#define CH_CFG_SYSTEM_INIT_HOOK() { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p _thread_init() function. - * - * @note It is invoked from within @p _thread_init() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/matrix/abelx/chconf.h -r platforms/chibios/boards/common/configs/chconf.h` */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} -/** @} */ +#pragma once -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ +#define CH_CFG_ST_FREQUENCY 10000 -#endif /* CHCONF_H */ +#include_next -/** @} */ diff --git a/keyboards/matrix/abelx/halconf.h b/keyboards/matrix/abelx/halconf.h index e68682e7077..6fcfd84f3a1 100644 --- a/keyboards/matrix/abelx/halconf.h +++ b/keyboards/matrix/abelx/halconf.h @@ -1,531 +1,31 @@ -/* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. +/* Copyright 2020 QMK * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef HALCONF_H -#define HALCONF_H - -#define _CHIBIOS_HAL_CONF_ -#define _CHIBIOS_HAL_CONF_VER_7_1_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the cryptographic subsystem. - */ -#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__) -#define HAL_USE_CRY FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EFlash subsystem. - */ -#if !defined(HAL_USE_EFL) || defined(__DOXYGEN__) -#define HAL_USE_EFL FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C TRUE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC TRUE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SIO subsystem. - */ -#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__) -#define HAL_USE_SIO FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the TRNG subsystem. - */ -#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__) -#define HAL_USE_TRNG FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART TRUE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/** - * @brief Enables the WSPI subsystem. - */ -#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__) -#define HAL_USE_WSPI FALSE -#endif - -/*===========================================================================*/ -/* PAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__) -#define PAL_USE_CALLBACKS FALSE -#endif - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__) -#define PAL_USE_WAIT FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/** - * @brief Enforces the driver to use direct callbacks rather than OSAL events. - */ -#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__) -#define CAN_ENFORCE_USE_CALLBACKS FALSE -#endif - -/*===========================================================================*/ -/* CRY driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the SW fall-back of the cryptographic driver. - * @details When enabled, this option, activates a fall-back software - * implementation for algorithms not supported by the underlying - * hardware. - * @note Fall-back implementations may not be present for all algorithms. - */ -#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_USE_FALLBACK FALSE -#endif - -/** - * @brief Makes the driver forcibly use the fall-back implementations. - */ -#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__) -#define HAL_CRY_ENFORCE_FALLBACK FALSE -#endif - -/*===========================================================================*/ -/* DAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__) -#define DAC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define DAC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the zero-copy API. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/** - * @brief OCR initialization constant for V20 cards. - */ -#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__) -#define SDC_INIT_OCR_V20 0x50FF8000U -#endif - -/** - * @brief OCR initialization constant for non-V20 cards. - */ -#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__) -#define SDC_INIT_OCR 0x80100000U -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 16 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 128 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 256 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/** - * @brief Serial over USB number of buffers. - * @note The default is 2 buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_NUMBER 2 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables circular transfers APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__) -#define SPI_USE_CIRCULAR FALSE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/** - * @brief Handling method for SPI CS line. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__) -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD -#endif - -/*===========================================================================*/ -/* UART driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. + * 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 . */ -#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__) -#define UART_USE_WAIT FALSE -#endif -/** - * @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs. - * @note Disabling this option saves both code and data space. +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/matrix/abelx/halconf.h -r platforms/chibios/boards/common/configs/halconf.h` */ -#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define UART_USE_MUTUAL_EXCLUSION FALSE -#endif -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ +#pragma once -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -/*===========================================================================*/ -/* WSPI driver related settings. */ -/*===========================================================================*/ +#define HAL_USE_I2C TRUE -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__) -#define WSPI_USE_WAIT TRUE -#endif +#define HAL_USE_RTC TRUE -/** - * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define WSPI_USE_MUTUAL_EXCLUSION TRUE -#endif +#define SERIAL_USB_BUFFERS_SIZE 256 -#endif /* HALCONF_H */ +#include_next -/** @} */ diff --git a/keyboards/matrix/abelx/mcuconf.h b/keyboards/matrix/abelx/mcuconf.h index e26b2823f92..a22ce51c4c2 100644 --- a/keyboards/matrix/abelx/mcuconf.h +++ b/keyboards/matrix/abelx/mcuconf.h @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F411_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED TRUE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -60,9 +64,6 @@ #define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -82,6 +83,19 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 + /* * ADC driver system settings. */ @@ -101,14 +115,8 @@ #define STM32_GPT_USE_TIM4 TRUE #define STM32_GPT_USE_TIM5 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -155,12 +163,8 @@ #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE /* * PWM driver system settings. @@ -172,12 +176,16 @@ #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 /* * SERIAL driver system settings. @@ -185,9 +193,6 @@ #define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. @@ -218,7 +223,7 @@ /* * UART driver system settings. */ -#define STM32_UART_USE_USART1 TRUE +#define STM32_UART_USE_USART1 FALSE #define STM32_UART_USE_USART2 FALSE #define STM32_UART_USE_USART6 FALSE #define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) @@ -227,9 +232,6 @@ #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0 @@ -241,9 +243,7 @@ #define STM32_USB_USE_OTG1 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO LOWPRIO -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/keyboards/matrix/cain_re/rules.mk b/keyboards/matrix/cain_re/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/matrix/cain_re/rules.mk +++ b/keyboards/matrix/cain_re/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/falcon/rules.mk b/keyboards/matrix/falcon/rules.mk index f924c30ed7d..ad5ddd92461 100644 --- a/keyboards/matrix/falcon/rules.mk +++ b/keyboards/matrix/falcon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/m12og/rev2/rules.mk b/keyboards/matrix/m12og/rev2/rules.mk index edf4fa4b4fc..7588e8671d9 100644 --- a/keyboards/matrix/m12og/rev2/rules.mk +++ b/keyboards/matrix/m12og/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/m20add/config.h b/keyboards/matrix/m20add/config.h index 3df5d78d555..5d615dbad66 100644 --- a/keyboards/matrix/m20add/config.h +++ b/keyboards/matrix/m20add/config.h @@ -82,8 +82,8 @@ #define DEBOUNCE 5 // i2c setting -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 diff --git a/keyboards/matrix/m20add/m20add.c b/keyboards/matrix/m20add/m20add.c index b38dad27cdf..21f4f9b1ba8 100644 --- a/keyboards/matrix/m20add/m20add.c +++ b/keyboards/matrix/m20add/m20add.c @@ -64,12 +64,12 @@ void i2c_init(void) } // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT); chThdSleepMilliseconds(10); - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); } #define REBOOT_MAGIC 0x41544B42 diff --git a/keyboards/matrix/m20add/mcuconf.h b/keyboards/matrix/m20add/mcuconf.h index 54a1f266132..00216f6908f 100644 --- a/keyboards/matrix/m20add/mcuconf.h +++ b/keyboards/matrix/m20add/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F411_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED TRUE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -60,9 +64,6 @@ #define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -82,6 +83,19 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 + /* * ADC driver system settings. */ @@ -101,14 +115,8 @@ #define STM32_GPT_USE_TIM4 TRUE #define STM32_GPT_USE_TIM5 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -155,29 +163,28 @@ #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 /* * SERIAL driver system settings. @@ -185,9 +192,6 @@ #define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. @@ -227,9 +231,6 @@ #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0 @@ -241,9 +242,7 @@ #define STM32_USB_USE_OTG1 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO LOWPRIO -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/keyboards/matrix/m20add/rgb_ring.c b/keyboards/matrix/m20add/rgb_ring.c index e759ee4e4f0..7535cb5bd43 100644 --- a/keyboards/matrix/m20add/rgb_ring.c +++ b/keyboards/matrix/m20add/rgb_ring.c @@ -30,7 +30,7 @@ #endif // rgb ring leds setting -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/matrix/m20add/rules.mk b/keyboards/matrix/m20add/rules.mk index 2f4e457607f..e5b9093e375 100644 --- a/keyboards/matrix/m20add/rules.mk +++ b/keyboards/matrix/m20add/rules.mk @@ -13,7 +13,7 @@ BOARD = ST_NUCLEO64_F411RE # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/matrix/noah/config.h b/keyboards/matrix/noah/config.h index f41cad94cea..84877f6a5c4 100644 --- a/keyboards/matrix/noah/config.h +++ b/keyboards/matrix/noah/config.h @@ -26,8 +26,8 @@ #define DEBOUNCE 5 // i2c setting -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 #define PAL_MODE_STM32_ALTERNATE_OPENDRAIN (PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN) @@ -39,6 +39,54 @@ #define DRIVER_1_LED_TOTAL 36 #define DRIVER_2_LED_TOTAL 36 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH /* indicator rgb */ #define RGBLED_NUM 7 diff --git a/keyboards/matrix/noah/mcuconf.h b/keyboards/matrix/noah/mcuconf.h index 54a1f266132..00216f6908f 100644 --- a/keyboards/matrix/noah/mcuconf.h +++ b/keyboards/matrix/noah/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F411_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED TRUE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -60,9 +64,6 @@ #define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -82,6 +83,19 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 + /* * ADC driver system settings. */ @@ -101,14 +115,8 @@ #define STM32_GPT_USE_TIM4 TRUE #define STM32_GPT_USE_TIM5 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -155,29 +163,28 @@ #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 /* * SERIAL driver system settings. @@ -185,9 +192,6 @@ #define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. @@ -227,9 +231,6 @@ #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0 @@ -241,9 +242,7 @@ #define STM32_USB_USE_OTG1 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO LOWPRIO -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/keyboards/matrix/noah/noah.c b/keyboards/matrix/noah/noah.c index 20d68f34e9c..2143dee3be0 100644 --- a/keyboards/matrix/noah/noah.c +++ b/keyboards/matrix/noah/noah.c @@ -58,7 +58,7 @@ void matrix_scan_kb(void) { } #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/matrix/noah/rules.mk b/keyboards/matrix/noah/rules.mk index 33f31b99691..83b33df48c7 100644 --- a/keyboards/matrix/noah/rules.mk +++ b/keyboards/matrix/noah/rules.mk @@ -13,7 +13,7 @@ BOARD = ST_NUCLEO64_F411RE # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/maxipad/rules.mk b/keyboards/maxipad/rules.mk index 7e7c086c45d..35b135deedf 100644 --- a/keyboards/maxipad/rules.mk +++ b/keyboards/maxipad/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/maxr1998/pulse4k/rules.mk b/keyboards/maxr1998/pulse4k/rules.mk index af6a9458be0..b977e5db226 100644 --- a/keyboards/maxr1998/pulse4k/rules.mk +++ b/keyboards/maxr1998/pulse4k/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys ENCODER_ENABLE = yes # Rotary encoders EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/mb44/rules.mk b/keyboards/mb44/rules.mk index 4ca833c7c81..a0de6aceffd 100644 --- a/keyboards/mb44/rules.mk +++ b/keyboards/mb44/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mc_76k/rules.mk b/keyboards/mc_76k/rules.mk index f2e5379ac15..3105d59b775 100644 --- a/keyboards/mc_76k/rules.mk +++ b/keyboards/mc_76k/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechanickeys/miniashen40/config.h b/keyboards/mechanickeys/miniashen40/config.h new file mode 100644 index 00000000000..bf2ea6e00f9 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/config.h @@ -0,0 +1,53 @@ +/* Copyright 2021 jfescobar18 + * + * 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4D4B // MechanicKeys +#define PRODUCT_ID 0x6D6E +#define DEVICE_VER 0x0001 +#define MANUFACTURER MechanicKeys +#define PRODUCT MINI ASHEN 40 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B1, B2, B3, B4 } +#define MATRIX_COL_PINS { C5, C4, C3, D0, C2, D1, C1, C0, D4, B0, D7, D6, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST \ No newline at end of file diff --git a/keyboards/mechanickeys/miniashen40/info.json b/keyboards/mechanickeys/miniashen40/info.json new file mode 100644 index 00000000000..6a6b1e951a4 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "Mini Ashen 40", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT": { + "layout": [ + {"label": "Tab", "x": 0, "y": 0}, {"label": "Q", "x": 1, "y": 0}, {"label": "W", "x": 2, "y": 0}, {"label": "E", "x": 3, "y": 0}, {"label": "R", "x": 4, "y": 0}, {"label": "T", "x": 5, "y": 0}, {"label": "Y", "x": 6, "y": 0}, {"label": "U", "x": 7, "y": 0}, {"label": "I", "x": 8, "y": 0}, {"label": "O", "x": 9, "y": 0}, {"label": "P", "x": 10, "y": 0}, {"label": "Del", "x": 11, "y": 0}, {"label": "M1", "x": 12.25, "y": 0}, {"label": "M2", "x": 13.25, "y": 0}, + {"label": "Ctrl", "x": 0, "y": 1, "w":1.25}, {"label": "A", "x": 1.25, "y": 1}, {"label": "S", "x": 2.25, "y": 1}, {"label": "D", "x": 3.25, "y": 1}, {"label": "F", "x": 4.25, "y": 1}, {"label": "G", "x": 5.25, "y": 1}, {"label": "H", "x": 6.25, "y": 1}, {"label": "J", "x": 7.25, "y": 1}, {"label": "K", "x": 8.25, "y": 1}, {"label": "L", "x": 9.25, "y": 1}, {"label": "Enter", "x": 10.25, "y": 1, "w":1.75}, {"label": "M3", "x": 12.25, "y": 1}, {"label": "M4", "x": 13.25, "y": 1}, + {"label": "Shift", "x": 0, "y": 2, "w":1.75}, {"label": "Z", "x": 1.75, "y": 2}, {"label": "X", "x": 2.75, "y": 2}, {"label": "C", "x": 3.75, "y": 2}, {"label": "V", "x": 4.75, "y": 2}, {"label": "B", "x": 5.75, "y": 2}, {"label": "N", "x": 6.75, "y": 2}, {"label": "M", "x": 7.75, "y": 2}, {"label": ",", "x": 8.75, "y": 2}, {"label": ".", "x": 9.75, "y": 2}, {"label": "Fn", "x": 10.75, "y": 2, "w":1.25}, {"label": "Up", "x": 12.25, "y": 2.25}, + {"label": "Alt", "x": 1, "y": 3}, {"label": "OS", "x": 2, "y": 3, "w": 1.5}, {"label": "", "x": 3.5, "y": 3, "w": 2.75}, {"label": "", "x": 6.25, "y": 3, "w": 2.25}, {"label": "Os", "x": 8.5, "y": 3, "w": 1.5}, {"label": "Alt", "x": 10, "y": 3}, {"label": "Left", "x": 11.25, "y": 3.25}, {"label": "Down", "x": 12.25, "y": 3.25}, {"label": "Right", "x": 13.25, "y": 3.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/mechanickeys/miniashen40/keymaps/default/keymap.c b/keyboards/mechanickeys/miniashen40/keymaps/default/keymap.c new file mode 100644 index 00000000000..b49b5882fad --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/keymaps/default/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2021 jfescobar18 + * + * 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* 0: qwerty */ + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MPRV, KC_MNXT, + CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_MUTE, KC_MPLY, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP, KC_BSPC, + KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( /* 1: Symbols */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS, KC_TRNS, + MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, KC_EQL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( /* 2: Fn */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( /*3: Empty */ + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/mechanickeys/miniashen40/keymaps/via/keymap.c b/keyboards/mechanickeys/miniashen40/keymaps/via/keymap.c new file mode 100644 index 00000000000..0aa9476b4ed --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/keymaps/via/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2021 Francisco Escobar + * + * 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 . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* 0: qwerty */ + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MPRV, KC_MNXT, + CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_MUTE, KC_MPLY, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(1), KC_UP, KC_BSPC, + KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( /* 1: Symbols */ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_TRNS, KC_TRNS, + MO(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, KC_EQL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT( /* 2: Fn */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F12, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT( /*3: Empty */ + RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/tgr/jane/keymaps/via/rules.mk b/keyboards/mechanickeys/miniashen40/keymaps/via/rules.mk similarity index 100% rename from keyboards/tgr/jane/keymaps/via/rules.mk rename to keyboards/mechanickeys/miniashen40/keymaps/via/rules.mk diff --git a/keyboards/mechanickeys/miniashen40/miniashen40.c b/keyboards/mechanickeys/miniashen40/miniashen40.c new file mode 100644 index 00000000000..9c740e117e9 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/miniashen40.c @@ -0,0 +1,17 @@ +/* Copyright 2021 jfescobar18 + * + * 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 . +*/ + +#include "miniashen40.h" diff --git a/keyboards/mechanickeys/miniashen40/miniashen40.h b/keyboards/mechanickeys/miniashen40/miniashen40.h new file mode 100644 index 00000000000..4430396b411 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/miniashen40.h @@ -0,0 +1,42 @@ +/* Copyright 2021 jfescobar18 + * + * 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 . +*/ + +#pragma once + +#include "quantum.h" + +#define XXX KC_NO + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K33, K36, K38, K39, K3A, K3B, K3C \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, XXX, K33, XXX, XXX, K36, XXX, K38, K39, K3A, K3B, K3C } \ +} diff --git a/keyboards/mechanickeys/miniashen40/readme.md b/keyboards/mechanickeys/miniashen40/readme.md new file mode 100644 index 00000000000..29f7b68fd10 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/readme.md @@ -0,0 +1,40 @@ +# Mini Ashen 40 + +![Mini Ashen 40](https://i.imgur.com/0k3gFZCh.jpeg) + +![Mini Ashen 40](https://i.imgur.com/B1w8qwPh.jpeg) + +![Mini Ashen 40](https://i.imgur.com/LqxXW0Rh.jpeg) + +A 40% keyboard with some extras + - Arrows + - Mini macro cluster + - Full assembly with only through hole components + +* Keyboard Maintainer: [jfescobar18](https://github.com/jfescobar18) +* Hardware Supported: Mini Ashen 40 PCB and Case +* Hardware Availability: [MechanicKeys](https://www.facebook.com/MechanicKeys-104963764775280) + +Make example for this keyboard (after setting up your build environment): + + make mechanickeys/miniashen40:default + +Flashing example for this keyboard: + + make mechanickeys/miniashen40:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +* **Physical**: + 1. Press and hold `BOOT` switch + 2. Tap `RESET` switch + 3. Release `BOOT` switch +* **Keycode in layout**: Press the key mapped to `RESET` if it is available + +## Flash bootloader +* [Follow this instructions](https://github.com/jfescobar18/USBaspLoader) diff --git a/keyboards/mechanickeys/miniashen40/rules.mk b/keyboards/mechanickeys/miniashen40/rules.mk new file mode 100644 index 00000000000..2057d9c9399 --- /dev/null +++ b/keyboards/mechanickeys/miniashen40/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega328p + +# Bootloader selection +BOOTLOADER = usbasploader + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mechanickeys/undead60m/info.json b/keyboards/mechanickeys/undead60m/info.json index e1fd210aab7..5032974857a 100644 --- a/keyboards/mechanickeys/undead60m/info.json +++ b/keyboards/mechanickeys/undead60m/info.json @@ -1,16 +1,86 @@ { - "keyboard_name": "Undead-60M", - "url": "", - "maintainer": "qmk", - "layouts": { - "LAYOUT": { - "layout": [ - {"label": "F1", "x": 0, "y": 0}, {"label": "F2", "x": 1, "y": 0}, {"label": "Esc", "x": 2.5, "y": 0}, {"label": "1", "x": 3.5, "y": 0}, {"label": "2", "x": 4.5, "y": 0}, {"label": "3", "x": 5.5, "y": 0}, {"label": "4", "x": 6.5, "y": 0}, {"label": "5", "x": 7.5, "y": 0}, {"label": "6", "x": 8.5, "y": 0}, {"label": "7", "x": 9.5, "y": 0}, {"label": "8", "x": 10.5, "y": 0}, {"label": "9", "x": 11.5, "y": 0}, {"label": "0", "x": 12.5, "y": 0}, {"label": "-", "x": 13.5, "y": 0}, {"label": "=", "x": 14.5, "y": 0}, {"label": "Backspace", "x": 15.5, "y": 0, "w": 2}, - {"label": "F2", "x": 0, "y": 1}, {"label": "F3", "x": 1, "y": 1}, {"label": "Tab", "x": 2.5, "y": 1, "w": 1.5} , {"label": "Q", "x": 4, "y": 1}, {"label": "W", "x": 5, "y": 1}, {"label": "E", "x": 6, "y": 1}, {"label": "R", "x": 7, "y": 1}, {"label": "T", "x": 8, "y": 1}, {"label": "Y", "x": 9, "y": 1}, {"label": "U", "x": 10, "y": 1}, {"label": "I", "x": 11, "y": 1}, {"label": "O", "x": 12, "y": 1}, {"label": "P", "x": 13, "y": 1}, {"label": "[", "x": 14, "y": 1}, {"label": "]", "x": 15, "y": 1}, {"label": "|", "x": 16, "y": 1, "w": 1.5}, - {"label": "F4", "x": 0, "y": 2}, {"label": "F5", "x": 1, "y": 2}, {"label": "Caps", "x": 2.5, "y": 2, "w": 1.75}, {"label": "A", "x": 4.25, "y": 2}, {"label": "S", "x": 5.25, "y": 2}, {"label": "D", "x": 6.25, "y": 2}, {"label": "F", "x": 7.25, "y": 2}, {"label": "G", "x": 8.25, "y": 2}, {"label": "H", "x": 9.25, "y": 2}, {"label": "J", "x": 10.25, "y": 2}, {"label": "K", "x": 11.25, "y": 2}, {"label": "L", "x": 12.25, "y": 2}, {"label": ";", "x": 13.25, "y": 2}, {"label": "'", "x": 14.25, "y": 2}, {"label": "Enter", "x": 15.25, "y": 2, "w": 2.25}, - {"label": "F6", "x": 0, "y": 3}, {"label": "F7", "x": 1, "y": 3}, {"label": "Shift", "x": 2.5, "y": 3, "w": 2.25}, {"label": "Z", "x": 4.5, "y": 3}, {"label": "X", "x": 5.5, "y": 3}, {"label": "C", "x": 6.5, "y": 3}, {"label": "V", "x": 7.5, "y": 3}, {"label": "B", "x": 8.5, "y": 3}, {"label": "N", "x": 9.5, "y": 3}, {"label": "M", "x": 10.5, "y": 3}, {"label": ",", "x": 11.5, "y": 3}, {"label": ".", "x": 12.5, "y": 3}, {"label": "/", "x": 13.5, "y": 3}, {"label": "Shift", "x": 14.5, "y": 3, "w": 2.75}, - {"label": "F1", "x": 0, "y": 4}, {"label": "F2", "x": 1, "y": 4}, {"label": "Ctrl", "x": 2.5, "y": 4, "w": 1.25}, {"label": "OS", "x": 3.75, "y": 4, "w": 1.25}, {"label": "Alt", "x": 5, "y": 4, "w": 1.25}, {"label": "Space", "x": 6.25, "y": 4}, {"label": "Alt", "x": 12.5, "y": 4, "w": 1.25}, {"label": "OS", "x": 13.75, "y": 4, "w": 1.25}, {"label": "Ctrl", "x": 15, "y": 4, "w": 1.25}, {"label": "Fn", "x": 16.25, "y": 4, "w": 1.25} - ] + "keyboard_name": "Undead-60M", + "url": "", + "maintainer": "jfescobar18", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"F1", "x":0, "y":0}, + {"label":"F2", "x":1, "y":0}, + {"label":"Esc", "x":2.5, "y":0}, + {"label":"1!", "x":3.5, "y":0}, + {"label":"2@", "x":4.5, "y":0}, + {"label":"3#", "x":5.5, "y":0}, + {"label":"4$", "x":6.5, "y":0}, + {"label":"5%", "x":7.5, "y":0}, + {"label":"6^", "x":8.5, "y":0}, + {"label":"7&", "x":9.5, "y":0}, + {"label":"8*", "x":10.5, "y":0}, + {"label":"9(", "x":11.5, "y":0}, + {"label":"0)", "x":12.5, "y":0}, + {"label":"-_", "x":13.5, "y":0}, + {"label":"=+", "x":14.5, "y":0}, + {"label":"Backspace", "x":15.5, "y":0, "w":2}, + + {"label":"F2", "x":0, "y":1}, + {"label":"F3", "x":1, "y":1}, + {"label":"Tab", "x":2.5, "y":1, "w":1.5}, + {"label":"Q", "x":4, "y":1}, + {"label":"W", "x":5, "y":1}, + {"label":"E", "x":6, "y":1}, + {"label":"R", "x":7, "y":1}, + {"label":"T", "x":8, "y":1}, + {"label":"Y", "x":9, "y":1}, + {"label":"U", "x":10, "y":1}, + {"label":"I", "x":11, "y":1}, + {"label":"O", "x":12, "y":1}, + {"label":"P", "x":13, "y":1}, + {"label":"[{", "x":14, "y":1}, + {"label":"]}", "x":15, "y":1}, + {"label":"\\|", "x":16, "y":1, "w":1.5}, + + {"label":"F4", "x":0, "y":2}, + {"label":"F5", "x":1, "y":2}, + {"label":"Caps", "x":2.5, "y":2, "w":1.75}, + {"label":"A", "x":4.25, "y":2}, + {"label":"S", "x":5.25, "y":2}, + {"label":"D", "x":6.25, "y":2}, + {"label":"F", "x":7.25, "y":2}, + {"label":"G", "x":8.25, "y":2}, + {"label":"H", "x":9.25, "y":2}, + {"label":"J", "x":10.25, "y":2}, + {"label":"K", "x":11.25, "y":2}, + {"label":"L", "x":12.25, "y":2}, + {"label":";:", "x":13.25, "y":2}, + {"label":"'\"", "x":14.25, "y":2}, + {"label":"Enter", "x":15.25, "y":2, "w":2.25}, + + {"label":"F6", "x":0, "y":3}, + {"label":"F7", "x":1, "y":3}, + {"label":"Shift", "x":2.5, "y":3, "w":2.25}, + {"label":"Z", "x":4.75, "y":3}, + {"label":"X", "x":5.75, "y":3}, + {"label":"C", "x":6.75, "y":3}, + {"label":"V", "x":7.75, "y":3}, + {"label":"B", "x":8.75, "y":3}, + {"label":"N", "x":9.75, "y":3}, + {"label":"M", "x":10.75, "y":3}, + {"label":",<", "x":11.75, "y":3}, + {"label":".>", "x":12.75, "y":3}, + {"label":"/?", "x":13.75, "y":3}, + {"label":"Shift", "x":14.75, "y":3, "w":2.75}, + + {"label":"F1", "x":0, "y":4}, + {"label":"F2", "x":1, "y":4}, + {"label":"Ctrl", "x":2.5, "y":4, "w":1.25}, + {"label":"OS", "x":3.75, "y":4, "w":1.25}, + {"label":"Alt", "x":5, "y":4, "w":1.25}, + {"label":"Space", "x":6.25, "y":4, "w":6.25}, + {"label":"Alt", "x":12.5, "y":4, "w":1.25}, + {"label":"OS", "x":13.75, "y":4, "w":1.25}, + {"label":"Ctrl", "x":15, "y":4, "w":1.25}, + {"label":"Fn", "x":16.25, "y":4, "w":1.25} + ] + } } - } } diff --git a/keyboards/mechanickeys/undead60m/readme.md b/keyboards/mechanickeys/undead60m/readme.md index 6f62d303337..77deb26a997 100644 --- a/keyboards/mechanickeys/undead60m/readme.md +++ b/keyboards/mechanickeys/undead60m/readme.md @@ -18,10 +18,10 @@ A 60% PCB with some add-ons Make example for this keyboard (after setting up your build environment): - make undead60m/:default + make mechanickeys/undead60m:default Flashing example for this keyboard: - make undead60m:default:flash + make mechanickeys/undead60m:default:flash See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechanickeys/undead60m/rules.mk b/keyboards/mechanickeys/undead60m/rules.mk index 1bc6b6534e8..eb0e0270de9 100644 --- a/keyboards/mechanickeys/undead60m/rules.mk +++ b/keyboards/mechanickeys/undead60m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechkeys/mk60/rules.mk b/keyboards/mechkeys/mk60/rules.mk index fb97faa5f0a..0d9012c70b9 100644 --- a/keyboards/mechkeys/mk60/rules.mk +++ b/keyboards/mechkeys/mk60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechllama/g35/keymaps/default/keymap.c b/keyboards/mechllama/g35/keymaps/default/keymap.c index 814f6fdcdf0..f02cba0b5ab 100644 --- a/keyboards/mechllama/g35/keymaps/default/keymap.c +++ b/keyboards/mechllama/g35/keymaps/default/keymap.c @@ -66,7 +66,8 @@ const char* get_layer_name(uint8_t layer) { } } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(get_layer_name(biton32(layer_state)), false); + return false; } #endif diff --git a/keyboards/mechlovin/adelais/adelais.h b/keyboards/mechlovin/adelais/adelais.h index a6bd2477a3e..6c3980a0904 100644 --- a/keyboards/mechlovin/adelais/adelais.h +++ b/keyboards/mechlovin/adelais/adelais.h @@ -18,58 +18,18 @@ #include "quantum.h" -#define LAYOUT_alice_split_bs( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ -} - -#define LAYOUT_alice( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ -} - -#define LAYOUT_alice_split_bs_full_rshift( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, \ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ -} - -#define LAYOUT_alice_full_rshift( \ - K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ - K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ - K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ - K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, \ - K40, K42, K44, K46, K48, K4A, K4E \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ -} +#ifdef KEYBOARD_mechlovin_adelais_rgb_led_rev1 + #include "rev1.h" +#elif KEYBOARD_mechlovin_adelais_rgb_led_rev2 + #include "rev2.h" +#elif KEYBOARD_mechlovin_adelais_rgb_led_rev3 + #include "rev3.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev2 + #include "rev2.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev3 + #include "rev3.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_arm_rev4 + #include "rev4.h" +#elif KEYBOARD_mechlovin_adelais_standard_led_avr_rev1 + #include "rev1.h" +#endif diff --git a/keyboards/mechlovin/adelais/config.h b/keyboards/mechlovin/adelais/config.h index 3ec5c491327..035ffa80322 100644 --- a/keyboards/mechlovin/adelais/config.h +++ b/keyboards/mechlovin/adelais/config.h @@ -26,11 +26,4 @@ along with this program. If not, see . /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* COL2ROW, ROW2COL*/ -#define DIODE_DIRECTION COL2ROW - -#define LED_NUM_LOCK_PIN C15 -#define LED_CAPS_LOCK_PIN B2 -#define LED_SCROLL_LOCK_PIN B9 +#define MATRIX_COLS 15 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/config.h b/keyboards/mechlovin/adelais/rgb_led/config.h new file mode 100644 index 00000000000..2ec0afd47ba --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/config.h @@ -0,0 +1,21 @@ +/* +Copyright 2020 Team Mechlovin' + +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 . +*/ + +#pragma once + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/mechlovin/adelais/rgb_led/readme.md b/keyboards/mechlovin/adelais/rgb_led/readme.md deleted file mode 100644 index f58ca7aa29e..00000000000 --- a/keyboards/mechlovin/adelais/rgb_led/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Adelais En Ciel - -![adelais](https://i.imgur.com/6U1IfZe.png) - -Compatible with TGR Alice and all clone variants. -`rgb_led` (Adelais En Ciel) comes with per-key RGB LEDs pre-soldered, rev.2 and rev.3 support a rotary encoder. - -* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) -* Hardware Supported: Adelais En Ciel -* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-en-ciel-alice-compatible-rgb-pcb?variant=33937050828939) - -Make example for this keyboard (after setting up your build environment): - - make mechlovin/adelais/rgb_led:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h index d75cbd3f2ac..c0cae1600bc 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/config.h @@ -13,7 +13,60 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h index 16cdf9ed856..45d48fac460 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev1/rev1.h @@ -17,3 +17,61 @@ #pragma once #include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h index c830edce26b..cd290cdcd10 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/config.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/config.h @@ -31,10 +31,58 @@ #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects -// #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define RGB_MATRIX_DISABLE_KEYCODES @@ -43,3 +91,8 @@ #define ENCODER_RESOLUTION 4 #define TAP_CODE_DELAY 10 + + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c index fe946169a77..dda36f37106 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.c @@ -17,7 +17,7 @@ #include "adelais.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C2_1, C3_1, C4_1}, //D102-A0-0 {0, C5_1, C6_1, C7_1}, //D108-A1-1 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h index 16cdf9ed856..45d48fac460 100644 --- a/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h +++ b/keyboards/mechlovin/adelais/rgb_led/rev2/rev2.h @@ -17,3 +17,61 @@ #pragma once #include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/config.h b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h new file mode 100644 index 00000000000..b0f082cc886 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/config.h @@ -0,0 +1,120 @@ +/* +Copyright 2021 Mechlovin' Studio + +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 . +*/ + +#pragma once + +#define PRODUCT_ID 0xAEC3 +#define PRODUCT Adelais En Ciel Rev3 + +#define MATRIX_ROW_PINS { A4, A3, C13, A1, A2} +#define MATRIX_COL_PINS { B10, B11, B2, B1, B0, A6, A5, A14, A13, A15, B3, B4, B5, B8, B9 } + +#define RGB_DI_PIN A7 +#define WS2812_SPI SPID1 // default: SPID1 +#define WS2812_SPI_MOSI_PAL_MODE 5 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 5 +#define RGBLED_NUM 23 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +//rgb matrix setting +// This is a 7-bit address, that gets left-shifted and bit 0 +// set to 0 for write, 1 for read (as per I2C protocol) +// The address will vary depending on your wiring: +// 0b1110100 AD <-> GND +// 0b1110111 AD <-> VCC +// 0b1110101 AD <-> SCL +// 0b1110110 AD <-> SDA +#define DRIVER_ADDR_1 0b0110010 +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 66 +#define RGB_MATRIX_KEYPRESSES // reacts to keypresses +#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) +#define RGB_MATRIX_FRAMEBUFFER_EFFECTS +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended +#define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) +#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 +#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +#define RGB_MATRIX_DISABLE_KEYCODES + +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 + + +#define LED_NUM_LOCK_PIN A0 +#define LED_CAPS_LOCK_PIN C14 +#define LED_SCROLL_LOCK_PIN C15 diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h new file mode 100644 index 00000000000..d001829d034 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/halconf.h @@ -0,0 +1,26 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#define PAL_USE_CALLBACKS FALSE + +#define PAL_USE_WAIT FALSE + +#include_next + diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h new file mode 100644 index 00000000000..20d2a82c273 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/mcuconf.h @@ -0,0 +1,35 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#include_next + +#undef STM32_GPT_USE_TIM15 +#define STM32_GPT_USE_TIM15 FALSE + +#undef STM32_I2C_USE_I2C1 +#define STM32_I2C_USE_I2C1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_SPI_USE_SPI2 +#define STM32_SPI_USE_SPI2 FALSE + diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c new file mode 100644 index 00000000000..b20f897720b --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.c @@ -0,0 +1,166 @@ +/* Copyright 2021 Team Mechlovin + * + * 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 . + */ + +#include "rev3.h" + +#ifdef RGB_MATRIX_ENABLE +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { + {0, CS3_SW5, CS2_SW5, CS1_SW5}, /* D9-K31-00 */ + {0, CS6_SW5, CS5_SW5, CS4_SW5}, /* D46-K00-01 */ + {0, CS6_SW9, CS5_SW9, CS4_SW9}, /* D59-K01-02 */ + {0, CS9_SW5, CS8_SW5, CS7_SW5}, /* D73-K02-03 */ + {0, CS9_SW9, CS8_SW9, CS7_SW9}, /* D75-K03-04 */ + {0, CS12_SW5, CS11_SW5, CS10_SW5}, /* D77-K04-05 */ + {0, CS12_SW9, CS11_SW9, CS10_SW9}, /* D79-K05-06 */ + {0, CS15_SW5, CS14_SW5, CS13_SW5}, /* D81-K06-07 */ + {0, CS15_SW9, CS14_SW9, CS13_SW9}, /* D83-K07-08 */ + {0, CS18_SW5, CS17_SW5, CS16_SW5}, /* D85-K08-09 */ + {0, CS18_SW9, CS17_SW9, CS16_SW9}, /* D87-K09-10 */ + {0, CS21_SW5, CS20_SW5, CS19_SW5}, /* D90-K0A-11 */ + {0, CS21_SW9, CS20_SW9, CS19_SW9}, /* D93-K0B-12 */ + {0, CS24_SW5, CS23_SW5, CS22_SW5}, /* D95-K0C-13 */ + {0, CS24_SW9, CS23_SW9, CS22_SW9}, /* D98-K0D-14 */ + {0, CS24_SW3, CS23_SW3, CS22_SW3}, /* D100-K0E-15 */ + {0, CS3_SW4, CS2_SW4, CS1_SW4}, /* D94-K41-16 */ + {0, CS6_SW4, CS5_SW4, CS4_SW4}, /* D92-K10-17 */ + {0, CS6_SW6, CS5_SW6, CS4_SW6}, /* D89-K11-18 */ + {0, CS9_SW4, CS8_SW4, CS7_SW4}, /* D86-K12-19 */ + {0, CS9_SW6, CS8_SW6, CS7_SW6}, /* D84-K13-20 */ + {0, CS12_SW4, CS11_SW4, CS10_SW4}, /* D82-K14-21 */ + {0, CS12_SW6, CS11_SW6, CS10_SW6}, /* D80-K15-22 */ + {0, CS15_SW4, CS14_SW4, CS13_SW4}, /* D78-K16-23 */ + {0, CS15_SW6, CS14_SW6, CS13_SW6}, /* D76-K17-24 */ + {0, CS18_SW4, CS17_SW4, CS16_SW4}, /* D74-K18-25 */ + {0, CS18_SW6, CS17_SW6, CS16_SW6}, /* D72-K19-26 */ + {0, CS21_SW4, CS20_SW4, CS19_SW4}, /* D51-K1A-27 */ + {0, CS21_SW6, CS20_SW6, CS19_SW6}, /* D10-K1B-28 */ + {0, CS24_SW4, CS23_SW4, CS22_SW4}, /* D101-K1C-29 */ + {0, CS24_SW6, CS23_SW6, CS22_SW6}, /* D104-K1D-30 */ + {0, CS3_SW3, CS2_SW3, CS1_SW3}, /* D108-K43-31 */ + {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* D111-K20-32 */ + {0, CS6_SW7, CS5_SW7, CS4_SW7}, /* D114-K21-33 */ + {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* D117-K22-34 */ + {0, CS9_SW7, CS8_SW7, CS7_SW7}, /* D120-K23-35 */ + {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* D123-K24-36 */ + {0, CS12_SW7, CS11_SW7, CS10_SW7}, /* D126-K25-37 */ + {0, CS15_SW3, CS14_SW3, CS13_SW3}, /* D129-K26-38 */ + {0, CS15_SW7, CS14_SW7, CS13_SW7}, /* D133-K27-39 */ + {0, CS18_SW3, CS17_SW3, CS16_SW3}, /* D142-K28-40 */ + {0, CS18_SW7, CS17_SW7, CS16_SW7}, /* D146-K29-41 */ + {0, CS21_SW3, CS20_SW3, CS19_SW3}, /* D160-K2A-42 */ + {0, CS21_SW7, CS20_SW7, CS19_SW7}, /* D167-K2B-43 */ + {0, CS24_SW7, CS23_SW7, CS22_SW7}, /* D168-K2D-44 */ + + {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* D163-K30-45 */ + {0, CS6_SW8, CS5_SW8, CS4_SW8}, /* D147-K31-46 */ + {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* D144-K32-47 */ + {0, CS9_SW8, CS8_SW8, CS7_SW8}, /* D137-K33-48 */ + {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* D130-K34-49 */ + {0, CS12_SW8, CS11_SW8, CS10_SW8}, /* D127-K35-50 */ + {0, CS15_SW2, CS14_SW2, CS13_SW2}, /* D124-K36-51 */ + {0, CS15_SW8, CS14_SW8, CS13_SW8}, /* D121-K37-52 */ + {0, CS18_SW2, CS17_SW2, CS16_SW2}, /* D118-K38-53 */ + {0, CS18_SW8, CS17_SW8, CS16_SW8}, /* D115-K39-54 */ + {0, CS21_SW2, CS20_SW2, CS19_SW2}, /* D112-K3A-55 */ + {0, CS21_SW8, CS20_SW8, CS19_SW8}, /* D109-K3B-56 */ + {0, CS24_SW2, CS23_SW2, CS22_SW2}, /* D105-K3D-57 */ + {0, CS24_SW8, CS23_SW8, CS22_SW8}, /* D103-K3E-58 */ + + {0, CS3_SW1, CS2_SW1, CS1_SW1}, /* D163-K40-59 */ + {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* D147-K42-60 */ + {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* D137-K44-61 */ + {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* D127-K46-62 */ + {0, CS15_SW1, CS14_SW1, CS13_SW1}, /* D121-K48-63 */ + {0, CS18_SW1, CS17_SW1, CS16_SW1}, /* D115-K4A-64 */ + {0, CS24_SW1, CS23_SW1, CS22_SW1}, /* D103-K4E-65 */ +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}, + {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, NO_LED}, + {32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, NO_LED, 44, NO_LED}, + {45, NO_LED, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}, + {59, NO_LED, 60, NO_LED, 61, NO_LED, 62, NO_LED, 63, NO_LED, 64, NO_LED, NO_LED, NO_LED, 65}, + }, { + //LED Index to Physical Positon + {0,0}, { 17, 0}, { 34, 0 }, { 51, 0 }, { 69, 0}, { 86, 0}, {100, 0}, {103, 0}, { 120, 0}, { 138, 0}, { 155, 0}, { 172, 0}, { 189, 0}, {207, 0}, {215, 0}, {224, 0}, + {0,16}, { 17, 16}, { 34,16 }, { 51,16 }, { 69,16}, { 86,16}, {103,16}, { 120,16}, { 138,16}, { 155,16}, { 172,16}, { 189,16}, {207, 16}, {215, 16}, {224,16}, + {0,32}, { 17, 32}, { 34,32 }, { 51,32 }, { 69,32}, { 86,32}, {103,32}, { 120,32}, { 138,32}, { 155,32}, { 172,32}, { 189,32}, {207, 32}, {224,32}, + { 17, 48}, { 34,48 }, { 51,48 }, { 69,48}, { 86,48}, {103,48}, { 120,48}, { 138,48}, { 155,48}, { 172,48}, { 189,48}, {207, 48}, {215, 48}, {224,48}, + { 17, 64}, { 51,64 }, { 86,64}, { 103,64}, { 138,64}, { 172,64}, {224, 64}, + }, { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, + } +}; + +__attribute__((weak)) void rgb_matrix_indicators_user(void) { + if (host_keyboard_led_state().caps_lock) { + rgb_matrix_set_color(32, 255, 255, 255); + } +} + + +#endif + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + #ifdef RGBLIGHT_ENABLE + #ifdef RGB_MATRIX_ENABLE + case KC_F13: // toggle rgb matrix + rgb_matrix_toggle(); + return false; + case KC_F14: + rgb_matrix_step(); + return false; + case KC_F15: + rgb_matrix_increase_speed(); + return false; + case KC_F16: + rgb_matrix_decrease_speed(); + return false; + case KC_F17: + rgb_matrix_increase_hue(); + return false; + case KC_F18: + rgb_matrix_decrease_hue(); + return false; + case KC_F19: + rgb_matrix_increase_sat(); + return false; + case KC_F20: + rgb_matrix_decrease_sat(); + return false; + case KC_F21: + rgb_matrix_increase_val(); + return false; + case KC_F22: + rgb_matrix_decrease_val(); + return false; + #endif + #endif + default: + break; + } + } + return true; +} \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h new file mode 100644 index 00000000000..28c373ad850 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rev3.h @@ -0,0 +1,78 @@ +/* Copyright 2021 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K41, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K43, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D,\ + K41, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K43, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3C, K3D, K3E,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K41, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K43, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K31, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K41, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K43, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO }, \ + { K40, K41, K42, K43, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs + diff --git a/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk new file mode 100644 index 00000000000..904d20877b9 --- /dev/null +++ b/keyboards/mechlovin/adelais/rgb_led/rev3/rules.mk @@ -0,0 +1,5 @@ +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3741 +RGBLIGHT_ENABLE = yes +ENCODER_ENABLE = yes +WS2812_DRIVER = spi diff --git a/keyboards/mechlovin/adelais/rules.mk b/keyboards/mechlovin/adelais/rules.mk index a3531ff0913..8b6c9a433e4 100644 --- a/keyboards/mechlovin/adelais/rules.mk +++ b/keyboards/mechlovin/adelais/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,4 +21,4 @@ AUDIO_ENABLE = no # Audio output LAYOUTS = alice alice_split_bs -DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/.noci b/keyboards/mechlovin/adelais/standard_led/arm/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/mechlovin/adelais/standard_led/arm/chconf.h b/keyboards/mechlovin/adelais/standard_led/arm/chconf.h new file mode 100644 index 00000000000..fe716d6552b --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/chconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE + +#include_next + diff --git a/keyboards/mechlovin/adelais/standard_led/arm/config.h b/keyboards/mechlovin/adelais/standard_led/arm/config.h new file mode 100644 index 00000000000..4377405fc63 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2020 Team Mechlovin' + +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 . +*/ + +#pragma once + +#define PRODUCT Adelais + +#define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} +#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B0 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_PWM_DRIVER PWMD3 +#define BACKLIGHT_PWM_CHANNEL 3 + +#define RGB_DI_PIN A7 +#define RGBLED_NUM 23 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_ANIMATIONS + + +#define LED_NUM_LOCK_PIN C15 +#define LED_CAPS_LOCK_PIN B2 +#define LED_SCROLL_LOCK_PIN B9 diff --git a/keyboards/mechlovin/adelais/standard_led/arm/halconf.h b/keyboards/mechlovin/adelais/standard_led/arm/halconf.h new file mode 100644 index 00000000000..aca546705d6 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/halconf.h @@ -0,0 +1,24 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#define HAL_USE_PWM TRUE + +#define HAL_USE_SPI TRUE + +#include_next + diff --git a/keyboards/mechlovin/adelais/standard_led/arm/mcuconf.h b/keyboards/mechlovin/adelais/standard_led/arm/mcuconf.h new file mode 100644 index 00000000000..ac5a23c70e0 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/mcuconf.h @@ -0,0 +1,29 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + + +#pragma once + +#include_next + +#undef STM32_SPI_USE_SPI1 +#define STM32_SPI_USE_SPI1 TRUE + +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 TRUE + + + diff --git a/keyboards/mechlovin/adelais/standard_led/arm/readme.md b/keyboards/mechlovin/adelais/standard_led/arm/readme.md new file mode 100644 index 00000000000..9011ff3a88f --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/readme.md @@ -0,0 +1,16 @@ +# Adelais + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 & rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/arm:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev2/.noci b/keyboards/mechlovin/adelais/standard_led/arm/rev2/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/mechlovin/adelais/standard_led/rev2/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev2/config.h similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev2/config.h rename to keyboards/mechlovin/adelais/standard_led/arm/rev2/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h new file mode 100644 index 00000000000..45d48fac460 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rev2.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev2/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev2/rules.mk new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev3/config.h rename to keyboards/mechlovin/adelais/standard_led/arm/rev3/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h new file mode 100644 index 00000000000..45d48fac460 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rev3.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/rev3/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev3/rules.mk similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev3/rules.mk rename to keyboards/mechlovin/adelais/standard_led/arm/rev3/rules.mk diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk new file mode 100644 index 00000000000..34cbe434957 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/apm32f103/rules.mk @@ -0,0 +1,5 @@ +# MCU name +MCU = STM32F103 + +# Bootloader selection +BOOTLOADER = stm32duino diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/config.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev4/config.h rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/config.h diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md b/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md new file mode 100644 index 00000000000..8035195b0fc --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/readme.md @@ -0,0 +1,16 @@ +# Adelais rev.4 + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://mechlovin.studio) +* Hardware Supported: Adelais rev. 4 +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/rev4:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/rev4.h b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rev4.h new file mode 100644 index 00000000000..45d48fac460 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rev4.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K3D, K3C, K4D,\ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, K4D, K4E }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K42, K44, K46, K48, K4A, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, KC_NO, KC_NO, K4E }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk similarity index 100% rename from keyboards/mechlovin/adelais/standard_led/rev4/rules.mk rename to keyboards/mechlovin/adelais/standard_led/arm/rev4/rules.mk diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk new file mode 100644 index 00000000000..7a846816d1b --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rev4/stm32f303/rules.mk @@ -0,0 +1,6 @@ +# MCU name +MCU = STM32F303 +BOARD = QMK_PROTON_C + +# Bootloader selection +BOOTLOADER = stm32-dfu diff --git a/keyboards/mechlovin/adelais/standard_led/arm/rules.mk b/keyboards/mechlovin/adelais/standard_led/arm/rules.mk new file mode 100644 index 00000000000..2a0951eabd3 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/arm/rules.mk @@ -0,0 +1,2 @@ +WS2812_DRIVER = spi +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/avr/.noci b/keyboards/mechlovin/adelais/standard_led/avr/.noci new file mode 100644 index 00000000000..e69de29bb2d diff --git a/keyboards/mechlovin/adelais/standard_led/avr/readme.md b/keyboards/mechlovin/adelais/standard_led/avr/readme.md new file mode 100644 index 00000000000..aaae225efbd --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/readme.md @@ -0,0 +1,16 @@ +# Adelais AVR + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. + +* Keyboard Maintainer: [Team Mechlovin'](https://mechlovin.studio) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/avr:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h new file mode 100644 index 00000000000..9093d262e4d --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/config.h @@ -0,0 +1,67 @@ +/* +Copyright 2021 Mechlovin' Studio + +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 . +*/ +#pragma once + +#define PRODUCT_ID 0xAD04 +#define PRODUCT Adelais AVR +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +#define LED_NUM_LOCK_PIN D7 +#define LED_CAPS_LOCK_PIN E6 +#define LED_SCROLL_LOCK_PIN F7 +#define LED_PIN_ON_STATE 1 + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN E2 +#define RGBLED_NUM 23 +#define RGBLIGHT_LIMIT_VAL 255 +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + +#define ENCODERS_PAD_A { D3, D5, C7 } +#define ENCODERS_PAD_B { D2, B6, C6 } +#define ENCODER_RESOLUTION 4 + +#define TAP_CODE_DELAY 10 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c new file mode 100644 index 00000000000..37046790feb --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/matrix.c @@ -0,0 +1,363 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar +Copyright 2019 Evy Dekkers + +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 . +*/ + +#include +#include +#include "wait.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#ifdef DIRECT_PINS +static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS; +#elif (DIODE_DIRECTION == ROW2COL) || (DIODE_DIRECTION == COL2ROW) +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +//static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; +#endif + +// matrix code + +#ifdef DIRECT_PINS + +static void init_pins(void) { + for (int row = 0; row < MATRIX_ROWS; row++) { + for (int col = 0; col < MATRIX_COLS; col++) { + pin_t pin = direct_pins[row][col]; + if (pin != NO_PIN) { + setPinInputHigh(pin); + } + } + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + matrix_row_t last_row_value = current_matrix[current_row]; + current_matrix[current_row] = 0; + + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + pin_t pin = direct_pins[current_row][col_index]; + if (pin != NO_PIN) { + current_matrix[current_row] |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + } + } + + return (last_row_value != current_matrix[current_row]); +} + +#elif (DIODE_DIRECTION == ROW2COL) + +/* Cols 0 - 14 + * These columns use two 74HC138 3 to 8 bit demultiplexer. B0, F1 is the enable pin, must be set high (1) to use it. + * + * col / pin: PF4 PF1 PF0 PF5 PF6 + * 0: 0 ── 0 ── 1 1 ── 0 + * ───────────────────────────────────── + * 1: 0 ── 1 ── 0 1 ── 0 + * ───────────────────────────────────── + * 2: 0 ── 1 ── 1 1 ── 0 + * ───────────────────────────────────── + * 3: 1 ── 0 ── 0 1 ── 0 + * ───────────────────────────────────── + * 4: 1 ── 0 ── 1 1 ── 0 + * ───────────────────────────────────── + * 5: 1 ── 1 ── 1 1 ── 0 + * ───────────────────────────────────── + * 6: 1 ── 1 ── 1 0 ── 1 + * ───────────────────────────────────── + * 7: 0 ── 0 ── 0 0 ── 1 + * ───────────────────────────────────── + * 8: 0 ── 0 ── 1 0 ── 1 + * ───────────────────────────────────── + * 9: 0 ── 1 ── 0 0 ── 1 + * ───────────────────────────────────── + *10: 0 ── 1 ── 1 0 ── 1 + * ───────────────────────────────────── + *11: 1 ── 0 ── 0 0 ── 1 + * ───────────────────────────────────── + *12: 1 ── 0 ── 1 0 ── 1 + * ───────────────────────────────────── + *13: 1 ── 1 ── 0 0 ── 1 + * ───────────────────────────────────── + *14: 0 ── 0 ── 0 1 ── 0 + * + */ +static void select_col(uint8_t col) { + switch (col) { + case 0: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 1: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F5); + break; + case 2: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 3: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F5); + break; + case 4: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 5: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F5); + break; + case 6: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 7: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 8: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 9: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 10: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 11: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 12: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinHigh(F6); + break; + case 13: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinHigh(F6); + break; + case 14: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinHigh(F5); + break; + } +} + +static void unselect_col(uint8_t col) { + switch (col) { + case 0: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 1: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F5); + break; + case 2: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 3: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F5); + break; + case 4: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 5: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F5); + break; + case 6: + writePinLow(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 7: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 8: + writePinHigh(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 9: + writePinHigh(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 10: + writePinHigh(F4); + writePinLow(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 11: + writePinLow(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 12: + writePinLow(F4); + writePinHigh(F1); + writePinLow(F0); + writePinLow(F6); + break; + case 13: + writePinLow(F4); + writePinLow(F1); + writePinHigh(F0); + writePinLow(F6); + break; + case 14: + writePinHigh(F4); + writePinHigh(F1); + writePinHigh(F0); + writePinLow(F5); + break; + } +} + +static void unselect_cols(void) { + + //Demultiplexer + writePinHigh(F0); + writePinHigh(F1); + writePinHigh(F4); + writePinLow(F5); + writePinLow(F6); +} + +static void init_pins(void) { + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } + setPinOutput(F0); + setPinOutput(F1); + setPinOutput(F4); + setPinOutput(F5); + setPinOutput(F6); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for (uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[row_index]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +#endif + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + +#if defined(DIRECT_PINS) || (DIODE_DIRECTION == ROW2COL) + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } +#endif + + return changed; +} diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md b/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md new file mode 100644 index 00000000000..9d7d7dbf20b --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/readme.md @@ -0,0 +1,16 @@ +# Adelais AVR rev. 1 + +![adelais](https://i.imgur.com/6U1IfZe.png) + +Compatible with TGR Alice and all clone variants. +`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.5 support 3 rotary encoder, USB TypeC both side and reset button. + +* Keyboard Maintainer: [Team Mechlovin'](mechlovin.studio) +* Hardware Supported: Adelais +* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) + +Make example for this keyboard (after setting up your build environment): + + make mechlovin/adelais/standard_led/avr/rev1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/rev1.h b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rev1.h new file mode 100644 index 00000000000..7cc7add2c68 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rev1.h @@ -0,0 +1,77 @@ +/* Copyright 2020 Team Mechlovin + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_alice_split_bs( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D, K0E,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4C, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07,K08,K09, K0A, K0B, K0C, K0D,\ + K2E, K10, K11, K12, K13, K14, K15, K16,K17,K18, K19, K1A, K1B, K1C, K1D,\ + K3E, K20, K21, K22, K23, K24, K25, K26,K27,K28, K29, K2A, K2B, K2D,\ + K30, K32, K33, K34, K35, K36, K37,K38,K39, K3A, K3B, K4C, K3C, K3D,\ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice_split_bs_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4C, K3C, \ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_alice_full_rshift( \ + K1E, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K2E, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K3E, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K4C, K3C, K3D, \ + K40, K42, K44, K46, K48, K4A, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KC_NO }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO, K3E }, \ + { K40, KC_NO, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, KC_NO, K4C, K4D, KC_NO }, \ +} + +#define LAYOUT_all LAYOUT_alice_split_bs diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk new file mode 100644 index 00000000000..0bba0b6eaf1 --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rev1/rules.mk @@ -0,0 +1,13 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +CUSTOM_MATRIX = lite + +SRC += matrix.c diff --git a/keyboards/mechlovin/adelais/standard_led/avr/rules.mk b/keyboards/mechlovin/adelais/standard_led/avr/rules.mk new file mode 100644 index 00000000000..f33198890dd --- /dev/null +++ b/keyboards/mechlovin/adelais/standard_led/avr/rules.mk @@ -0,0 +1,2 @@ + +DEFAULT_FOLDER = mechlovin/adelais/standard_led/avr/rev1 \ No newline at end of file diff --git a/keyboards/mechlovin/adelais/standard_led/config.h b/keyboards/mechlovin/adelais/standard_led/config.h deleted file mode 100644 index 4580e56d5a2..00000000000 --- a/keyboards/mechlovin/adelais/standard_led/config.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2020 Team Mechlovin' - -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 . -*/ - -#pragma once - -#define PRODUCT Adelais - -#define MATRIX_ROW_PINS { B1, A0, C13, A1, A2} -#define MATRIX_COL_PINS { A10, A9, A8, B15, B14, B13, B12, B11, B10, B8, B4, B5, B3, C14, A15 } -#define UNUSED_PINS - -#define BACKLIGHT_PIN B0 -#define BACKLIGHT_BREATHING -#define BACKLIGHT_PWM_DRIVER PWMD3 -#define BACKLIGHT_PWM_CHANNEL 3 - -#define RGB_DI_PIN A7 -#define RGBLED_NUM 23 -#define RGBLIGHT_LIMIT_VAL 255 -#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mechlovin/adelais/standard_led/halconf.h b/keyboards/mechlovin/adelais/standard_led/halconf.h deleted file mode 100644 index 01d02f71c3c..00000000000 --- a/keyboards/mechlovin/adelais/standard_led/halconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - - -#pragma once - -#define HAL_USE_I2C TRUE - -#define PAL_USE_CALLBACKS FALSE - -#define PAL_USE_WAIT FALSE - -#include_next - diff --git a/keyboards/mechlovin/adelais/standard_led/mcuconf.h b/keyboards/mechlovin/adelais/standard_led/mcuconf.h deleted file mode 100644 index b7ecee02048..00000000000 --- a/keyboards/mechlovin/adelais/standard_led/mcuconf.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright 2020 QMK - * - * 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 . - */ - - -#pragma once - -#include_next - -#undef STM32_GPT_USE_TIM15 -#define STM32_GPT_USE_TIM15 FALSE - -#undef STM32_I2C_USE_I2C1 -#define STM32_I2C_USE_I2C1 TRUE - -#undef STM32_PWM_USE_TIM3 -#define STM32_PWM_USE_TIM3 FALSE - -#undef STM32_SPI_USE_SPI1 -#define STM32_SPI_USE_SPI1 TRUE - -#undef STM32_SPI_USE_SPI2 -#define STM32_SPI_USE_SPI2 FALSE - diff --git a/keyboards/mechlovin/adelais/standard_led/readme.md b/keyboards/mechlovin/adelais/standard_led/readme.md deleted file mode 100644 index a7c76beb496..00000000000 --- a/keyboards/mechlovin/adelais/standard_led/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Adelais - -![adelais](https://i.imgur.com/6U1IfZe.png) - -Compatible with TGR Alice and all clone variants. -`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.3 & rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. - -* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) -* Hardware Supported: Adelais -* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) - -Make example for this keyboard (after setting up your build environment): - - make mechlovin/adelais/standard_led:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/rev4/readme.md b/keyboards/mechlovin/adelais/standard_led/rev4/readme.md deleted file mode 100644 index 333efbacdb4..00000000000 --- a/keyboards/mechlovin/adelais/standard_led/rev4/readme.md +++ /dev/null @@ -1,16 +0,0 @@ -# Adelais rev.4 - -![adelais](https://i.imgur.com/6U1IfZe.png) - -Compatible with TGR Alice and all clone variants. -`standard_led` (Adelais) comes with backlight and RGB underglow LEDs pre-soldered. Adelais rev.4 support 3 rotary encoder, USB TypeC both side and reset footprint. - -* Keyboard Maintainer: [Team Mechlovin'](https://github.com/mechlovin) -* Hardware Supported: Adelais -* Hardware Availability: [Mechlovin.studio](https://mechlovin.studio/collections/pcb/products/adelais-tgr-alice-clones-compatible-pcb?variant=34140335472779) - -Make example for this keyboard (after setting up your build environment): - - make mechlovin/adelais/standard_led:default - -See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mechlovin/adelais/standard_led/rules.mk b/keyboards/mechlovin/adelais/standard_led/rules.mk index b4523dbf37e..b3c522ca067 100644 --- a/keyboards/mechlovin/adelais/standard_led/rules.mk +++ b/keyboards/mechlovin/adelais/standard_led/rules.mk @@ -1,3 +1,5 @@ -RGBLIGHT_ENABLE = yes -WS2812_DRIVER = spi -DEFAULT_FOLDER = mechlovin/adelais/standard_led/rev2 \ No newline at end of file + +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +DEFAULT_FOLDER = mechlovin/adelais/standard_led/arm/rev2 diff --git a/keyboards/mechlovin/delphine/rgb_led/config.h b/keyboards/mechlovin/delphine/rgb_led/config.h index 9a653d75954..0ed8721d23e 100644 --- a/keyboards/mechlovin/delphine/rgb_led/config.h +++ b/keyboards/mechlovin/delphine/rgb_led/config.h @@ -33,10 +33,7 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110110 -#define DRIVER_ADDR_2 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 25 -#define DRIVER_2_LED_TOTAL 0 #define DRIVER_LED_TOTAL 25 #define RGB_MATRIX_KEYPRESSES // reacts to keypresses #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) @@ -45,3 +42,51 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c index 29b6d1f783c..413a9a06ea6 100644 --- a/keyboards/mechlovin/delphine/rgb_led/rgb_led.c +++ b/keyboards/mechlovin/delphine/rgb_led/rgb_led.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { // left CA {0, C5_2, C6_2, C7_2}, //D2-0 {0, C1_1, C3_2, C4_2}, //D20-1 diff --git a/keyboards/mechlovin/delphine/rules.mk b/keyboards/mechlovin/delphine/rules.mk index be3533e85bc..c95ae3887bb 100644 --- a/keyboards/mechlovin/delphine/rules.mk +++ b/keyboards/mechlovin/delphine/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hannah60rgb/rev1/config.h b/keyboards/mechlovin/hannah60rgb/rev1/config.h index fd45ecca6c2..0f0c923fd09 100644 --- a/keyboards/mechlovin/hannah60rgb/rev1/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev1/config.h @@ -15,4 +15,52 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/mechlovin/hannah60rgb/rev2/config.h b/keyboards/mechlovin/hannah60rgb/rev2/config.h index 5e57f985d33..e96ca0002a1 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/config.h +++ b/keyboards/mechlovin/hannah60rgb/rev2/config.h @@ -34,6 +34,54 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // Sets the default mode, if none has been set +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) # define RGB_MATRIX_DISABLE_KEYCODES diff --git a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c index 8b30538cc21..ac371e4185f 100644 --- a/keyboards/mechlovin/hannah60rgb/rev2/rev2.c +++ b/keyboards/mechlovin/hannah60rgb/rev2/rev2.c @@ -17,7 +17,7 @@ #include "rev2.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mechlovin/hannah60rgb/rules.mk b/keyboards/mechlovin/hannah60rgb/rules.mk index b11ad1d3575..ef38f055fc2 100644 --- a/keyboards/mechlovin/hannah60rgb/rules.mk +++ b/keyboards/mechlovin/hannah60rgb/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/hannah65/rules.mk b/keyboards/mechlovin/hannah65/rules.mk index 96c126bd7b1..6323e8584f7 100644 --- a/keyboards/mechlovin/hannah65/rules.mk +++ b/keyboards/mechlovin/hannah65/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/hannah910/rev1/rules.mk b/keyboards/mechlovin/hannah910/rev1/rules.mk index f4596264227..3fe754c12a7 100644 --- a/keyboards/mechlovin/hannah910/rev1/rules.mk +++ b/keyboards/mechlovin/hannah910/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hannah910/rev2/rules.mk b/keyboards/mechlovin/hannah910/rev2/rules.mk index f092492125a..6afb684cc8f 100644 --- a/keyboards/mechlovin/hannah910/rev2/rules.mk +++ b/keyboards/mechlovin/hannah910/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hannah910/rev3/rules.mk b/keyboards/mechlovin/hannah910/rev3/rules.mk index a75a0f0b307..a87762efe8a 100644 --- a/keyboards/mechlovin/hannah910/rev3/rules.mk +++ b/keyboards/mechlovin/hannah910/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hex4b/rules.mk b/keyboards/mechlovin/hex4b/rules.mk index 4260226ad6d..0d1cf307e1c 100644 --- a/keyboards/mechlovin/hex4b/rules.mk +++ b/keyboards/mechlovin/hex4b/rules.mk @@ -10,7 +10,7 @@ F_CPU = 16000000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/hex6c/rules.mk b/keyboards/mechlovin/hex6c/rules.mk index 716b2d57e7c..0853ef8e7b2 100644 --- a/keyboards/mechlovin/hex6c/rules.mk +++ b/keyboards/mechlovin/hex6c/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/config.h b/keyboards/mechlovin/infinity87/rgb_rev1/config.h index 76c6e0db731..5b1a68308ba 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/config.h +++ b/keyboards/mechlovin/infinity87/rgb_rev1/config.h @@ -37,15 +37,61 @@ #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110010 -#define DRIVER_ADDR_2 0b0110010 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 91 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 91 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c index bd1fd8abf7c..0ad5d414305 100644 --- a/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c +++ b/keyboards/mechlovin/infinity87/rgb_rev1/rgb_rev1.c @@ -17,7 +17,7 @@ #include "rgb_rev1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS34_SW1, CS35_SW1, CS36_SW1}, //D92-K00-0 {0, CS37_SW1, CS38_SW1, CS39_SW1}, //D94-K01-1 {0, CS31_SW1, CS32_SW1, CS33_SW1}, //D96-K02-2 diff --git a/keyboards/mechlovin/infinity87/rules.mk b/keyboards/mechlovin/infinity87/rules.mk index 1c3e8afe232..400c42eb21f 100644 --- a/keyboards/mechlovin/infinity87/rules.mk +++ b/keyboards/mechlovin/infinity87/rules.mk @@ -2,7 +2,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinity88/rules.mk b/keyboards/mechlovin/infinity88/rules.mk index 7cc6adb50fe..1e8563c962a 100644 --- a/keyboards/mechlovin/infinity88/rules.mk +++ b/keyboards/mechlovin/infinity88/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechlovin/infinityce/rules.mk b/keyboards/mechlovin/infinityce/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/mechlovin/infinityce/rules.mk +++ b/keyboards/mechlovin/infinityce/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/kanu/rules.mk b/keyboards/mechlovin/kanu/rules.mk index 1a80a2d889b..066a67501a4 100644 --- a/keyboards/mechlovin/kanu/rules.mk +++ b/keyboards/mechlovin/kanu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/mechlovin9/rules.mk b/keyboards/mechlovin/mechlovin9/rules.mk index 3e91fe980ec..98282f2125f 100644 --- a/keyboards/mechlovin/mechlovin9/rules.mk +++ b/keyboards/mechlovin/mechlovin9/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/olly/jf/rules.mk b/keyboards/mechlovin/olly/jf/rules.mk index 3233ab1cbc3..be95cebe840 100644 --- a/keyboards/mechlovin/olly/jf/rules.mk +++ b/keyboards/mechlovin/olly/jf/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = USBasp # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/serratus/rules.mk b/keyboards/mechlovin/serratus/rules.mk index 00deb387098..2288d50d8cd 100644 --- a/keyboards/mechlovin/serratus/rules.mk +++ b/keyboards/mechlovin/serratus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/th1800/rules.mk b/keyboards/mechlovin/th1800/rules.mk index dffe35fa387..9354e10b87a 100644 --- a/keyboards/mechlovin/th1800/rules.mk +++ b/keyboards/mechlovin/th1800/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechlovin/tmkl/rules.mk b/keyboards/mechlovin/tmkl/rules.mk index 65048eb7eca..5fb72c7f3cc 100644 --- a/keyboards/mechlovin/tmkl/rules.mk +++ b/keyboards/mechlovin/tmkl/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mechmini/mechmini.h b/keyboards/mechmini/mechmini.h index 637021cd200..cbd405285f3 100644 --- a/keyboards/mechmini/mechmini.h +++ b/keyboards/mechmini/mechmini.h @@ -14,17 +14,12 @@ * along with this program. If not, see . */ -#ifndef MECHMINI_H -#define MECHMINI_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_mechmini_v1 - #include "v1.h" -#endif - -#ifdef KEYBOARD_mechmini_v2 - #include "v2.h" -#endif - +#if defined(KEYBOARD_mechmini_v1) +# include "v1.h" +#elif defined(KEYBOARD_mechmini_v2) +# include "v2.h" #endif diff --git a/keyboards/mechmini/v1/rules.mk b/keyboards/mechmini/v1/rules.mk index 8560b6a2980..d77ba039938 100644 --- a/keyboards/mechmini/v1/rules.mk +++ b/keyboards/mechmini/v1/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = atmel-dfu # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index c19e030bf46..7936caef007 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -12,8 +12,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef V2_CONFIG_H -#define V2_CONFIG_H + +#pragma once #include "config_common.h" @@ -62,5 +62,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/mechmini/v2/keymaps/arkag/rules.mk b/keyboards/mechmini/v2/keymaps/arkag/rules.mk index cbc8b06e832..735d573d73c 100644 --- a/keyboards/mechmini/v2/keymaps/arkag/rules.mk +++ b/keyboards/mechmini/v2/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk b/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk index 9f13f14c2a4..cf808a2b414 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk +++ b/keyboards/mechmini/v2/keymaps/lbibass_625_space/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk b/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk index b07c796fffc..7d50540f149 100755 --- a/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk +++ b/keyboards/mechmini/v2/keymaps/lbibass_split_space/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk index 49b4a2ab555..c429a6486ff 100755 --- a/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk +++ b/keyboards/mechmini/v2/keymaps/wsturgiss/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend diff --git a/keyboards/mechmini/v2/rules.mk b/keyboards/mechmini/v2/rules.mk index ea32c0ce704..c4071d79b3d 100755 --- a/keyboards/mechmini/v2/rules.mk +++ b/keyboards/mechmini/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechmini/v2/v2.h b/keyboards/mechmini/v2/v2.h index 67a13abbb5d..a0a620675e3 100755 --- a/keyboards/mechmini/v2/v2.h +++ b/keyboards/mechmini/v2/v2.h @@ -13,57 +13,56 @@ * along with this program. If not, see . */ -#ifndef V2_H -#define V2_H +#pragma once #include "../mechmini.h" +#define XXX KC_NO + #define LAYOUT_ortho( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_625_space( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K306, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k36, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, KC_NO, KC_NO, KC_NO, K306, KC_NO, KC_NO, KC_NO, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, XXX, XXX, k36, XXX, XXX, XXX, k3A, k3B } \ } #define LAYOUT_split_space( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K111, \ - K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K304, K307, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1B, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k34, k37, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, KC_NO, K111 }, \ - { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, KC_NO, K304, KC_NO, KC_NO, K307, KC_NO, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, XXX, k1B }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, XXX, k34, XXX, XXX, k37, XXX, k39, k3A, k3B } \ } #define LAYOUT_2u_space_ortho( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3A, k3B } \ } - -#endif diff --git a/keyboards/mechstudio/dawn/rules.mk b/keyboards/mechstudio/dawn/rules.mk index b2b263491ff..ed324bb64d4 100644 --- a/keyboards/mechstudio/dawn/rules.mk +++ b/keyboards/mechstudio/dawn/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c b/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c index c61bec5a053..affc42c7bb3 100644 --- a/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c +++ b/keyboards/mechstudio/ud_40_ortho/keymaps/via/keymap.c @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - _______, KC_LCTRL, KC_LALT, KC_LGUI, KC_FN13, KC_SPC, KC_SPC, KC_FN23, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + _______, KC_LCTRL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), [1] = LAYOUT_ortho_4x12( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, diff --git a/keyboards/mechstudio/ud_40_ortho/rules.mk b/keyboards/mechstudio/ud_40_ortho/rules.mk index 71459b5e70d..bb380e5b580 100644 --- a/keyboards/mechstudio/ud_40_ortho/rules.mk +++ b/keyboards/mechstudio/ud_40_ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/bde/lefty/rules.mk b/keyboards/mechwild/bde/lefty/rules.mk index 6377d7b3f05..6ba908ad55c 100644 --- a/keyboards/mechwild/bde/lefty/rules.mk +++ b/keyboards/mechwild/bde/lefty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/bde/righty/rules.mk b/keyboards/mechwild/bde/righty/rules.mk index 6377d7b3f05..6ba908ad55c 100644 --- a/keyboards/mechwild/bde/righty/rules.mk +++ b/keyboards/mechwild/bde/righty/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c index b0948987689..6062b8c73d4 100644 --- a/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/bongocat/keymap.c @@ -187,12 +187,13 @@ static void render_anim(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); oled_set_cursor(0,4); sprintf(wpm_str, "WPM: %03d", get_current_wpm()); oled_write(wpm_str, false); + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/default/keymap.c b/keyboards/mechwild/mercutio/keymaps/default/keymap.c index a08150505fc..8f433292b5b 100644 --- a/keyboards/mechwild/mercutio/keymaps/default/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/default/keymap.c @@ -76,7 +76,8 @@ static void render_name(void) { oled_write_P(mercutio_name, false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_name(); + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c index cb0a6173f3b..96457be6d22 100755 --- a/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/fancy/keymap.c @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && selected_layer == 0 && get_highest_layer(layer_state) == 0 ) { render_name(); @@ -164,5 +164,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { oled_write_P(led_state.num_lock ? PSTR("NLCK ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); } + return false; } #endif diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c index 22d26db3c2e..869a9f73ab3 100755 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c @@ -188,7 +188,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { if ( IS_HOST_LED_OFF(USB_LED_NUM_LOCK) && IS_HOST_LED_OFF(USB_LED_CAPS_LOCK) && get_selected_layer() == 0 && get_highest_layer(layer_state) == 0 ) { render_name(); @@ -263,6 +263,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } + return false; } void suspend_power_down_user(void) { // shutdown oled when powered down to prevent OLED from showing Mercutio all the time diff --git a/keyboards/mechwild/mercutio/keymaps/via/keymap.c b/keyboards/mechwild/mercutio/keymaps/via/keymap.c index a08150505fc..8f433292b5b 100755 --- a/keyboards/mechwild/mercutio/keymaps/via/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/via/keymap.c @@ -76,7 +76,8 @@ static void render_name(void) { oled_write_P(mercutio_name, false); } -void oled_task_user(void) { +bool oled_task_user(void) { render_name(); + return false; } #endif diff --git a/keyboards/mechwild/mercutio/rules.mk b/keyboards/mechwild/mercutio/rules.mk index 4b866c5db13..66bdc206b24 100644 --- a/keyboards/mechwild/mercutio/rules.mk +++ b/keyboards/mechwild/mercutio/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/murphpad/keymaps/default/keymap.c b/keyboards/mechwild/murphpad/keymaps/default/keymap.c index a30bf6bfa1e..fe46e8ce5ec 100644 --- a/keyboards/mechwild/murphpad/keymaps/default/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/default/keymap.c @@ -115,7 +115,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,6); @@ -143,5 +143,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c index dc03e334bf6..043eeb992bd 100644 --- a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c @@ -296,7 +296,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { } #ifdef LANDSCAPE_MODE - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(8,2); @@ -359,6 +359,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAPS ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR") : PSTR(" "), false); + return false; } #endif // LANDSCAPE_MODE @@ -368,7 +369,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return OLED_ROTATION_270; // flips the display 270 degrees } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,5); @@ -408,6 +409,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { oled_write_ln_P(led_state.num_lock ? PSTR(" NUM") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR(" CAP") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR(" SCR") : PSTR(" "), false); + return false; } #endif // !LANDSCAPE_MODE diff --git a/keyboards/mechwild/murphpad/keymaps/via/keymap.c b/keyboards/mechwild/murphpad/keymaps/via/keymap.c index 17e4699a981..4f4f6d571af 100644 --- a/keyboards/mechwild/murphpad/keymaps/via/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/via/keymap.c @@ -113,7 +113,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_P(logo_4, false); } - void oled_task_user(void) { + bool oled_task_user(void) { render_logo(); oled_set_cursor(0,6); @@ -141,5 +141,6 @@ bool encoder_update_user(uint8_t index, bool clockwise) { oled_write_ln_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_ln_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_ln_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/mechwild/murphpad/rules.mk b/keyboards/mechwild/murphpad/rules.mk index 1f72c9ccd34..cac073573b1 100644 --- a/keyboards/mechwild/murphpad/rules.mk +++ b/keyboards/mechwild/murphpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mechwild/obe/rules.mk b/keyboards/mechwild/obe/rules.mk index fb66887e62a..0b3a24b7fd1 100644 --- a/keyboards/mechwild/obe/rules.mk +++ b/keyboards/mechwild/obe/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mehkee96/mehkee96.h b/keyboards/mehkee96/mehkee96.h index 1e1eb44a642..a92e7ffe0f8 100644 --- a/keyboards/mehkee96/mehkee96.h +++ b/keyboards/mehkee96/mehkee96.h @@ -1,24 +1,23 @@ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE2, KD0, K67, K87, K97, \ - K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, K64, K74, K84, K94, \ - K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K63, K73, K83, K93, \ - K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, K62, K72, K82, K92, \ - K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K61, K71, K81, K91, \ - K00, K10, K20, K56, K57, KA0, KB0, K66, K76, K96, K60, K80, K90 \ + k50, k52, k53, k54, k55, k60, k6A, k7A, k70, k5B, k5C, k5D, k5E, k1D, k2E, k0D, k76, k78, k79, \ + k40, k41, k42, k43, k44, k45, k61, k6B, k7B, k71, k4A, k4B, k4C, k4E, k46, k47, k48, k49, \ + k30, k31, k32, k33, k34, k35, k62, k6C, k7C, k72, k3A, k3B, k3C, k3D, k36, k37, k38, k39, \ + k20, k21, k22, k23, k24, k25, k63, k6D, k7D, k73, k2A, k2B, k2D, k26, k27, k28, k29, \ + k10, k11, k12, k13, k14, k15, k64, k6E, k7E, k74, k1A, k1B, k68, k16, k17, k18, k19, \ + k00, k01, k02, k65, k75, k0A, k0B, k66, k67, k69, k06, k08, k09 \ ) { \ - { K00, K10, K20, KC_NO, KC_NO, KC_NO, K60, KC_NO, K80, K90, KA0, KB0, KC_NO, KD0, KC_NO }, \ - { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC_NO, KD1, KC_NO }, \ - { K02, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC_NO, KD2, KE2 }, \ - { K03, K13, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KC_NO }, \ - { K04, K14, K24, K34, K44, K54, K64, K74, K84, K94, KA4, KB4, KC4, KC_NO, KE4 }, \ - { K05, KC_NO, K25, K35, K45, K55, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO, KB5, KC5, KD5, KE5 }, \ - { K06, K16, K26, K36, K46, K56, K66, K76, K86, K96, KA6, KB6, KC6, KD6, KE6 }, \ - { K07, K17, K27, K37, K47, K57, K67, KC_NO,K87, K97, KA7, KB7, KC7, KD7, KE7 } \ + { k00, k01, k02, XXX, XXX, XXX, k06, XXX, k08, k09, k0A, k0B, XXX, k0D, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, k4E }, \ + { k50, XXX, k52, k53, k54, k55, XXX, XXX, XXX, XXX, XXX, k5B, k5C, k5D, k5E }, \ + { k60, k61, k62, k63, k64, k65, k66, k67, k68, k69, k6A, k6B, k6C, k6D, k6E }, \ + { k70, k71, k72, k73, k74, k75, k76, XXX, k78, k79, k7A, k7B, k7C, k7D, k7E } \ } - -#endif diff --git a/keyboards/mehkee96/rules.mk b/keyboards/mehkee96/rules.mk index 00ae8043edc..171f3a5734d 100644 --- a/keyboards/mehkee96/rules.mk +++ b/keyboards/mehkee96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meira/config.h b/keyboards/meira/config.h index 4d864a8a768..999ab1bf8a3 100644 --- a/keyboards/meira/config.h +++ b/keyboards/meira/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ along with this program. If not, see . #define RGBLED_NUM 15 // Number of LEDs #endif - -#endif diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index 61f90d46a0a..94bef3b3305 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef FEATHERBLECONFIG_H -#define FEATHERBLECONFIG_H +#pragma once #include "config_common.h" @@ -96,5 +95,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/meira/featherble/rules.mk b/keyboards/meira/featherble/rules.mk index b0295ced777..d3e985e8c23 100644 --- a/keyboards/meira/featherble/rules.mk +++ b/keyboards/meira/featherble/rules.mk @@ -2,4 +2,4 @@ F_CPU = 8000000 BLUETOOTH_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/meira/info.json b/keyboards/meira/info.json index 0e2f12a96a6..de9ce42f8e3 100644 --- a/keyboards/meira/info.json +++ b/keyboards/meira/info.json @@ -3,7 +3,6 @@ "url": "", "maintainer": "colemarkham", "layout_aliases": { - "KEYMAP": "LAYOUT_ortho_4x12", "LAYOUT": "LAYOUT_ortho_4x12" }, "layouts": { diff --git a/keyboards/meira/issi.h b/keyboards/meira/issi.h index 51777f6ee38..74379ddbc8f 100755 --- a/keyboards/meira/issi.h +++ b/keyboards/meira/issi.h @@ -1,6 +1,6 @@ +#pragma once + #ifdef ISSI_ENABLE -#ifndef ISSI_H -#define ISSI_H typedef struct ISSIDeviceStruct{ uint8_t fn_dirty; // function registers need to be resent @@ -37,4 +37,3 @@ void activateLED(uint8_t matrix, uint8_t cx, uint8_t cy, uint8_t pwm); void update_issi(uint8_t device_addr, uint8_t blocking); #endif -#endif \ No newline at end of file diff --git a/keyboards/meira/keymaps/cole/keymap.c b/keyboards/meira/keymaps/cole/keymap.c index 14581aa5729..94806c5da2b 100644 --- a/keyboards/meira/keymaps/cole/keymap.c +++ b/keyboards/meira/keymaps/cole/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Ctrl | Alt |Lower | Cmd |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ @@ -74,7 +74,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, KC_QUOT, \ @@ -92,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home | PgUp | PgDn | End | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ RESET, _______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_PSCR, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \ BL_STEP, RGB_MOD, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, _______, _______, \ BL_TOGG, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/meira/keymaps/grahampheath/keymap.c b/keyboards/meira/keymaps/grahampheath/keymap.c index ca47b891367..35fa31b8b8f 100644 --- a/keyboards/meira/keymaps/grahampheath/keymap.c +++ b/keyboards/meira/keymaps/grahampheath/keymap.c @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Emoji | Ctrl | Alt |Lower | Cmd |Space+|Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_X0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_X1, \ @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_COLEMAK] = KEYMAP( \ + [_COLEMAK] = LAYOUT( \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -121,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_DVORAK] = KEYMAP( \ + [_DVORAK] = LAYOUT( \ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ @@ -140,7 +140,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * │ │ │ │ │Brig-│ Sleep │Brig+│ 👈 │ 👎 | 👍 │ 👉 │ * └─────┴─────┴─────┴─────┴─────┴───────────┴─────┴─────┴─────┴─────┴─────┘ */ - [_EMOJI] = KEYMAP ( \ + [_EMOJI] = LAYOUT ( \ HYPR_0, _______, WINK, _______, _______, TOUNGE, _______, _______, CRY, FLIP, _______, _______, \ HYPR_1, ABOVE, SHRUG, _______, FROWN, _______, HEART, JOY, _______, LLAP, _______, _______, \ HYPR_2, _______, _______, _______, CONFUSED, _______, _______, GRIN, SHIT, _______, _______, _______, \ @@ -160,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Tab- | | | Tab+ | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -178,7 +178,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Home | PgUp | PgDn | End | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, KC_X2, \ @@ -196,7 +196,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/meira/keymaps/takmiya/keymap.c b/keyboards/meira/keymaps/takmiya/keymap.c index 171b4f43ae1..25f50abc49c 100644 --- a/keyboards/meira/keymaps/takmiya/keymap.c +++ b/keyboards/meira/keymaps/takmiya/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | GUI | Alt | GUI |Lower |Space |Enter |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, GUI_T(KC_SLSH), KC_ENT, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home | PgUp | PgDn | End | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), _______, _______, _______, \ @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | Home | PgUp | PgDn | End | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ @@ -104,7 +104,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ BL_TOGG, RESET, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_PSCR, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_DEL, \ BL_STEP, RGB_MOD, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/meira/lighting.c b/keyboards/meira/lighting.c index a02487f69b4..1a3c954bcff 100755 --- a/keyboards/meira/lighting.c +++ b/keyboards/meira/lighting.c @@ -23,7 +23,7 @@ const uint8_t backlight_pwm_map[BACKLIGHT_LEVELS] = BACKLIGHT_PWM_MAP; // / | // Device // const uint8_t switch_leds[MATRIX_ROWS][MATRIX_COLS] = -// KEYMAP( +// LAYOUT( // 0x29, 0x28, 0x27, 0x26, 0x25, 0x24, 0x23, 0x22, 0x21, 0xA9, 0xA8, 0xA7, 0xA6, 0xA5, // 0x39, 0x38, 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0xB9, 0xB8, 0xB7, 0xB6, 0xB5, // 0x49, 0x48, 0x47, 0x45, 0x44, 0x43, 0x42, 0x41, 0xC9, 0xC8, 0xC7, 0xC6, diff --git a/keyboards/meira/lighting.h b/keyboards/meira/lighting.h index dc55b70ef90..42fee8ac925 100755 --- a/keyboards/meira/lighting.h +++ b/keyboards/meira/lighting.h @@ -1,9 +1,6 @@ -#ifndef LIGHTING_H -#define LIGHTING_H +#pragma once void led_test(void); void force_issi_refresh(void); void set_backlight(uint8_t level); void set_backlight_by_keymap(uint8_t col, uint8_t row); - -#endif diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 4682a4104c7..bbdaa9dbd8b 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef PROMICROCONFIG_H -#define PROMICROCONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/meletrix/zoom65/info.json b/keyboards/meletrix/zoom65/info.json index 49535c106e9..8cc7dce8c35 100644 --- a/keyboards/meletrix/zoom65/info.json +++ b/keyboards/meletrix/zoom65/info.json @@ -1,466 +1,622 @@ { "keyboard_name": "zoom65", "url": "https://zoom65.com/", - "maintainer": "qmk", + "maintainer": "spbgzh", "layouts": { "LAYOUT_all": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0 }, - { "label": "EncoderRotateL", "x": 15, "y": 0, "w": 0.5 }, - { "label": "EncoderClick", "x": 15.5, "y": 0 }, - { "label": "EncoderRotateR", "x": 16.5, "y": 0, "w": 0.5 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "\\", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "Backspace", "x": 14, "y": 0 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift1", "x": 0, "y": 3, "w": 1.25 }, - { "label": "Shift2", "x": 1.25, "y": 3 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 2.25 }, - { "x": 6, "y": 4, "w": 1.25 }, - { "x": 7.25, "y": 4, "w": 2.75 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"EncoderRotateL", "x":15, "y":0, "w":0.5}, + {"label":"EncoderClick", "x":15.5, "y":0}, + {"label":"EncoderRotateR", "x":16.5, "y":0, "w":0.5}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift1", "x":0, "y":3, "w":1.25}, + {"label":"Shift2", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space1", "x":3.75, "y":4, "w":2.25}, + {"label":"Space2", "x":6, "y":4, "w":1.25}, + {"label":"Space3", "x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, "LAYOUT_65_ansi_blocker": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, - { "label": "Encode", "x": 15, "y": 0 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "\\", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, "LAYOUT_65_iso_blocker": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, - { "label": "Encode", "x": 15, "y": 0 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "ISO", "x": 13.75, "y": 1, "w": 1.25, "h": 2 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "\\", "x": 12.75, "y": 2 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] + }, + "LAYOUT_65_ansi_blocker_split_bs": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_65_ansi_split_bs": { + "LAYOUT_65_ansi_blocker_split_lshift": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0 }, - { "label": "Encode", "x": 15, "y": 0 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "\\", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "Backspace", "x": 14, "y": 0 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift1", "x":0, "y":3, "w":1.25}, + {"label":"Shift2", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_65_ansi_split_lshift": { + "LAYOUT_65_ansi_blocker_split_space": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, - { "label": "Encode", "x": 15, "y": 0 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "\\", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift1", "x": 0, "y": 3, "w": 1.25 }, - { "label": "Shift2", "x": 1.25, "y": 3 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 6.25 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space1", "x":3.75, "y":4, "w":2.25}, + {"label":"Space2", "x":6, "y":4, "w":1.25}, + {"label":"Space3", "x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_65_split_space": { + "LAYOUT_65_iso_blocker_split_space": { "layout": [ - { "label": "Esc", "x": 0, "y": 0 }, - { "label": "1", "x": 1, "y": 0 }, - { "label": "2", "x": 2, "y": 0 }, - { "label": "3", "x": 3, "y": 0 }, - { "label": "4", "x": 4, "y": 0 }, - { "label": "5", "x": 5, "y": 0 }, - { "label": "6", "x": 6, "y": 0 }, - { "label": "7", "x": 7, "y": 0 }, - { "label": "8", "x": 8, "y": 0 }, - { "label": "9", "x": 9, "y": 0 }, - { "label": "0", "x": 10, "y": 0 }, - { "label": "-", "x": 11, "y": 0 }, - { "label": "=", "x": 12, "y": 0 }, - { "label": "Backspace", "x": 13, "y": 0, "w": 2 }, - { "label": "Encode", "x": 15, "y": 0 }, - - { "label": "Tab", "x": 0, "y": 1, "w": 1.5 }, - { "label": "Q", "x": 1.5, "y": 1 }, - { "label": "W", "x": 2.5, "y": 1 }, - { "label": "E", "x": 3.5, "y": 1 }, - { "label": "R", "x": 4.5, "y": 1 }, - { "label": "T", "x": 5.5, "y": 1 }, - { "label": "Y", "x": 6.5, "y": 1 }, - { "label": "U", "x": 7.5, "y": 1 }, - { "label": "I", "x": 8.5, "y": 1 }, - { "label": "O", "x": 9.5, "y": 1 }, - { "label": "P", "x": 10.5, "y": 1 }, - { "label": "[", "x": 11.5, "y": 1 }, - { "label": "]", "x": 12.5, "y": 1 }, - { "label": "\\", "x": 13.5, "y": 1, "w": 1.5 }, - { "label": "Delete", "x": 15, "y": 1 }, - - { "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 }, - { "label": "A", "x": 1.75, "y": 2 }, - { "label": "S", "x": 2.75, "y": 2 }, - { "label": "D", "x": 3.75, "y": 2 }, - { "label": "F", "x": 4.75, "y": 2 }, - { "label": "G", "x": 5.75, "y": 2 }, - { "label": "H", "x": 6.75, "y": 2 }, - { "label": "J", "x": 7.75, "y": 2 }, - { "label": "K", "x": 8.75, "y": 2 }, - { "label": "L", "x": 9.75, "y": 2 }, - { "label": ";", "x": 10.75, "y": 2 }, - { "label": "'", "x": 11.75, "y": 2 }, - { "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 }, - { "label": "PageUp", "x": 15, "y": 2 }, - - { "label": "Shift", "x": 0, "y": 3, "w": 2.25 }, - { "label": "Z", "x": 2.25, "y": 3 }, - { "label": "X", "x": 3.25, "y": 3 }, - { "label": "C", "x": 4.25, "y": 3 }, - { "label": "V", "x": 5.25, "y": 3 }, - { "label": "B", "x": 6.25, "y": 3 }, - { "label": "N", "x": 7.25, "y": 3 }, - { "label": "M", "x": 8.25, "y": 3 }, - { "label": ",", "x": 9.25, "y": 3 }, - { "label": ".", "x": 10.25, "y": 3 }, - { "label": "/", "x": 11.25, "y": 3 }, - { "label": "Shift", "x": 12.25, "y": 3, "w": 1.75 }, - { "label": "\u2191", "x": 14, "y": 3 }, - { "label": "End", "x": 15, "y": 3 }, - - { "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 1.25, "y": 4, "w": 1.25 }, - { "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 }, - { "x": 3.75, "y": 4, "w": 2.25 }, - { "x": 6, "y": 4, "w": 1.25 }, - { "x": 7.25, "y": 4, "w": 2.75 }, - { "label": "Alt", "x": 10, "y": 4, "w": 1.25 }, - { "label": "Fn", "x": 11.25, "y": 4, "w": 1.25 }, - { "label": "\u2190", "x": 13, "y": 4 }, - { "label": "\u2193", "x": 14, "y": 4 }, - { "label": "\u2192", "x": 15, "y": 4 } + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Encode", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"PageUp", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"End", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space1", "x":3.75, "y":4, "w":2.25}, + {"label":"Space2", "x":6, "y":4, "w":1.25}, + {"label":"Space3", "x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] } } diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker/keymap.c similarity index 100% rename from keyboards/meletrix/zoom65/keymaps/65_ansi/keymap.c rename to keyboards/meletrix/zoom65/keymaps/65_ansi_blocker/keymap.c diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi/readme.md b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker/readme.md similarity index 100% rename from keyboards/meletrix/zoom65/keymaps/65_ansi/readme.md rename to keyboards/meletrix/zoom65/keymaps/65_ansi_blocker/readme.md diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/keymap.c new file mode 100644 index 00000000000..7580e22f956 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker_split_bs( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/readme.md b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/readme.md new file mode 100644 index 00000000000..768bda7b6d9 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_bs/readme.md @@ -0,0 +1 @@ +# The 65_ansi_blocker_split_bs keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/keymap.c new file mode 100644 index 00000000000..29bf8fb5435 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker_split_lshift( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, 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_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker_split_lshift( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/readme.md b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/readme.md new file mode 100644 index 00000000000..5d3bfbcd171 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_lshift/readme.md @@ -0,0 +1 @@ +# The 65_ansi_blocker_split_lshift keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/keymap.c new file mode 100644 index 00000000000..9ab31d62f74 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_ansi_blocker_split_space( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_ansi_blocker_split_space( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/readme.md b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/readme.md new file mode 100644 index 00000000000..85d4e776cf6 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_ansi_blocker_split_space/readme.md @@ -0,0 +1 @@ +# The 65_ansi_blocker_split_space keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_iso/keymap.c deleted file mode 100644 index ccdfb6fc2ff..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_iso/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 meletrix - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_65_iso_blocker( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, - KC_TAB, 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_ENT, KC_DEL, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_65_iso_blocker( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso/readme.md b/keyboards/meletrix/zoom65/keymaps/65_iso/readme.md deleted file mode 100644 index fd70c950505..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_iso/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The 65_iso_blocker for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/keymap.c new file mode 100644 index 00000000000..cc7967446d7 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/readme.md b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/readme.md new file mode 100644 index 00000000000..46af22fcd94 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker/readme.md @@ -0,0 +1 @@ +# The 65_iso_blocker keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/keymap.c new file mode 100644 index 00000000000..af549a744b3 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix, James Young for QMK (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker_split_bs( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker_split_bs( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/readme.md b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/readme.md new file mode 100644 index 00000000000..873c51652a3 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_bs/readme.md @@ -0,0 +1 @@ +# The 65_iso_blocker_split_bs keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/keymap.c new file mode 100644 index 00000000000..7ab65bbf2d6 --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/keymap.c @@ -0,0 +1,34 @@ +/* Copyright 2021 meletrix, James Young for QMK (@noroadsleft) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_65_iso_blocker_split_space( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, + KC_TAB, 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_DEL, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_PGUP, + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_65_iso_blocker_split_space( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/readme.md b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/readme.md new file mode 100644 index 00000000000..a9c715e796f --- /dev/null +++ b/keyboards/meletrix/zoom65/keymaps/65_iso_blocker_split_space/readme.md @@ -0,0 +1 @@ +# The 65_iso_blocker_split_space keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_bs/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_split_bs/keymap.c deleted file mode 100644 index a930987720c..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_bs/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 meletrix - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_65_ansi_split_bs( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, - KC_TAB, 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_DEL, - KC_CAPS, 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_BSPC, KC_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_65_ansi_split_bs( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_bs/readme.md b/keyboards/meletrix/zoom65/keymaps/65_split_bs/readme.md deleted file mode 100644 index 34c59ba014c..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_bs/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The 65_split_bs keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_lshift/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_split_lshift/keymap.c deleted file mode 100644 index 91c91795168..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_lshift/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 meletrix - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_65_ansi_split_lshift( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, - KC_TAB, 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_DEL, - KC_CAPS, 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_PGUP, - KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_65_ansi_split_lshift( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_lshift/readme.md b/keyboards/meletrix/zoom65/keymaps/65_split_lshift/readme.md deleted file mode 100644 index e56989b24a6..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_lshift/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The 65_split_lshift keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_space/keymap.c b/keyboards/meletrix/zoom65/keymaps/65_split_space/keymap.c deleted file mode 100644 index b63aff9a9e5..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_space/keymap.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright 2021 meletrix - * - * 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 . - */ - -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_65_split_space( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_MUTE, - KC_TAB, 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_DEL, - KC_CAPS, 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_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_65_split_space( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPLY, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ), -}; diff --git a/keyboards/meletrix/zoom65/keymaps/65_split_space/readme.md b/keyboards/meletrix/zoom65/keymaps/65_split_space/readme.md deleted file mode 100644 index 4bd0ee67dbc..00000000000 --- a/keyboards/meletrix/zoom65/keymaps/65_split_space/readme.md +++ /dev/null @@ -1 +0,0 @@ -# The 65_split_space keymap for zoom65 diff --git a/keyboards/meletrix/zoom65/keymaps/default/keymap.c b/keyboards/meletrix/zoom65/keymaps/default/keymap.c index a0a62d29675..dfcad3107ef 100644 --- a/keyboards/meletrix/zoom65/keymaps/default/keymap.c +++ b/keyboards/meletrix/zoom65/keymaps/default/keymap.c @@ -18,17 +18,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, KC_TAB, 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_DEL, - KC_CAPS, 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_BSPC, KC_PGUP, + KC_CAPS, 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_PGUP, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV, KC_MPLY, KC_MNXT, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/meletrix/zoom65/keymaps/via/keymap.c b/keyboards/meletrix/zoom65/keymaps/via/keymap.c index f7038229066..0bd3004a121 100644 --- a/keyboards/meletrix/zoom65/keymaps/via/keymap.c +++ b/keyboards/meletrix/zoom65/keymaps/via/keymap.c @@ -18,31 +18,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_VOLD, KC_MUTE, KC_VOLU, KC_TAB, 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_DEL, - KC_CAPS, 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_BSPC, KC_PGUP, + KC_CAPS, 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_PGUP, KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT_all( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MPRV, KC_MPLY, KC_MNXT, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [2] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT_all( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/meletrix/zoom65/readme.md b/keyboards/meletrix/zoom65/readme.md index dc56f699498..5d9ba306984 100644 --- a/keyboards/meletrix/zoom65/readme.md +++ b/keyboards/meletrix/zoom65/readme.md @@ -1,14 +1,14 @@ # zoom65 -![zoom65](https://i.imgur.com/NIbreqdh.jpeg) +![zoom65](https://i.imgur.com/NIbreqdh.jpeg) -Meletrix's first mass-produced mechanical keyboard. +Meletrix's first mass-produced mechanical keyboard. More Info at [zoom](https://zoom65.com/). -​ + * Keyboard Maintainer: [spbgzh](https://github.com/spbgzh) * Hardware Supported: zoom65 Standard -* Hardware Availability: [zoom](https://zoom65.com/) -​ +* Hardware Availability: [zoom](https://zoom65.com/) + Make example for this keyboard (after setting up your build environment): make meletrix/zoom65:default diff --git a/keyboards/meletrix/zoom65/rules.mk b/keyboards/meletrix/zoom65/rules.mk index b481714b723..4ae48737a4f 100644 --- a/keyboards/meletrix/zoom65/rules.mk +++ b/keyboards/meletrix/zoom65/rules.mk @@ -21,4 +21,4 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output ENCODER_ENABLE = yes # Enable Encoder -LAYOUT = 65_ansi_blocker 65_iso_blocker +LAYOUTS = 65_ansi_blocker 65_iso_blocker 65_ansi_blocker_split_bs 65_iso_blocker_split_bs diff --git a/keyboards/meletrix/zoom65/zoom65.h b/keyboards/meletrix/zoom65/zoom65.h index 400fdcbf3b0..81948ba1da4 100644 --- a/keyboards/meletrix/zoom65/zoom65.h +++ b/keyboards/meletrix/zoom65/zoom65.h @@ -33,11 +33,11 @@ * └────┴────┴────┴────────┴────┴──────────┴────┴────┘ └───┴───┴───┘ */ #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K43, K0E, K45, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4E \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K43, K0E, K45, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ @@ -82,28 +82,28 @@ * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │2e │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ - * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │3e │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │40 │41 │42 │46 │4a │4b │ │4c │4d │4e │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ #define LAYOUT_65_iso_blocker( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ } -/* LAYOUT_65_ansi_split_bs +/* LAYOUT_65_ansi_blocker_split_bs * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │2d │ ◯ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┐ @@ -116,12 +116,12 @@ * │40 │41 │42 │46 │4a │4b │ │4c │4d │4e │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ -#define LAYOUT_65_ansi_split_bs( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +#define LAYOUT_65_ansi_blocker_split_bs( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ @@ -131,7 +131,35 @@ } -/* LAYOUT_65_ansi_split_lshift +/* LAYOUT_65_iso_blocker_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │2d │ ◯ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┐ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │2e │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │46 │4a │4b │ │4c │4d │4e │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ +#define LAYOUT_65_iso_blocker_split_bs( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K2D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K1D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} + + +/* LAYOUT_65_ansi_blocker_split_lshift * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ ◯ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┐ @@ -144,12 +172,12 @@ * │40 │41 │42 │46 │4a │4b │ │4c │4d │4e │ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ -#define LAYOUT_65_ansi_split_lshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ +#define LAYOUT_65_ansi_blocker_split_lshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ @@ -159,7 +187,7 @@ } -/* LAYOUT_65_split_space +/* LAYOUT_65_ansi_blocker_split_space * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ ◯ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┐ @@ -172,12 +200,12 @@ * │40 │41 │42 │44 │46 │48 │4a │4b │ │4c │4d │4e │ * └────┴────┴────┴────────┴────┴──────────┴────┴────┘ └───┴───┴───┘ */ -#define LAYOUT_65_split_space( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4E \ +#define LAYOUT_65_ansi_blocker_split_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4E \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ @@ -185,3 +213,31 @@ { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ } + + +/* LAYOUT_65_iso_blocker_split_space + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │0d │ ◯ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┐ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ │2e │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │3d │3e │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │44 │46 │48 │4a │4b │ │4c │4d │4e │ + * └────┴────┴────┴────────┴────┴──────────┴────┴────┘ └───┴───┴───┘ + */ +#define LAYOUT_65_iso_blocker_split_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K44, K46, K48, K4A, K4B, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, KC_NO, K44, KC_NO, K46, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ +} diff --git a/keyboards/melgeek/mach80/config.h b/keyboards/melgeek/mach80/config.h index 99fced67584..f5987514184 100755 --- a/keyboards/melgeek/mach80/config.h +++ b/keyboards/melgeek/mach80/config.h @@ -49,3 +49,47 @@ #define DRIVER_ADDR_1 0b0110000 #define DRIVER_COUNT 1 +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/melgeek/mach80/keymaps/via/rules.mk b/keyboards/melgeek/mach80/keymaps/via/rules.mk index 36b7ba9cbc9..1e5b99807cb 100755 --- a/keyboards/melgeek/mach80/keymaps/via/rules.mk +++ b/keyboards/melgeek/mach80/keymaps/via/rules.mk @@ -1,2 +1 @@ VIA_ENABLE = yes -LTO_ENABLE = yes diff --git a/keyboards/melgeek/mach80/rev1/config.h b/keyboards/melgeek/mach80/rev1/config.h index e3ae4de76d4..868832d8086 100755 --- a/keyboards/melgeek/mach80/rev1/config.h +++ b/keyboards/melgeek/mach80/rev1/config.h @@ -34,8 +34,7 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION ROW2COL -#define DRIVER_1_LED_TOTAL 97 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 97 #define DRIVER_INDICATOR_LED_TOTAL 3 diff --git a/keyboards/melgeek/mach80/rev1/rev1.c b/keyboards/melgeek/mach80/rev1/rev1.c index 5a79708570c..4d11d3f7118 100755 --- a/keyboards/melgeek/mach80/rev1/rev1.c +++ b/keyboards/melgeek/mach80/rev1/rev1.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mach80/rev1/rules.mk b/keyboards/melgeek/mach80/rev1/rules.mk index a4d72064932..73d5710eb84 100755 --- a/keyboards/melgeek/mach80/rev1/rules.mk +++ b/keyboards/melgeek/mach80/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,4 +21,6 @@ RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow RGB_MATRIX_ENABLE = yes # Use RGB matrix RGB_MATRIX_DRIVER = IS31FL3741 +LTO_ENABLE = yes + LAYOUTS = tkl_ansi diff --git a/keyboards/melgeek/mj61/config.h b/keyboards/melgeek/mj61/config.h index 6ba19dd7573..e3097b9cf7f 100644 --- a/keyboards/melgeek/mj61/config.h +++ b/keyboards/melgeek/mj61/config.h @@ -41,11 +41,55 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj61/rev1/config.h b/keyboards/melgeek/mj61/rev1/config.h index 9586a6930d8..9d73a4fe96a 100644 --- a/keyboards/melgeek/mj61/rev1/config.h +++ b/keyboards/melgeek/mj61/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 63 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 63 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj61/rev1/rev1.c b/keyboards/melgeek/mj61/rev1/rev1.c index e51c57548f7..9d8de36d883 100644 --- a/keyboards/melgeek/mj61/rev1/rev1.c +++ b/keyboards/melgeek/mj61/rev1/rev1.c @@ -17,7 +17,7 @@ #include "mj61.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS12_SW1, CS11_SW1, CS10_SW1}, /* RGB1 */ {0, CS12_SW2, CS11_SW2, CS10_SW2}, /* RGB2 */ {0, CS12_SW3, CS11_SW3, CS10_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj61/rev1/rules.mk b/keyboards/melgeek/mj61/rev1/rules.mk index 00ab8d1110b..ea75197f8ff 100644 --- a/keyboards/melgeek/mj61/rev1/rules.mk +++ b/keyboards/melgeek/mj61/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj61/rev2/config.h b/keyboards/melgeek/mj61/rev2/config.h index e6c6e9610e4..616426df655 100644 --- a/keyboards/melgeek/mj61/rev2/config.h +++ b/keyboards/melgeek/mj61/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 71 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 71 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj61/rev2/rev2.c b/keyboards/melgeek/mj61/rev2/rev2.c index 3f6b1bff77e..b46cf08c4e1 100644 --- a/keyboards/melgeek/mj61/rev2/rev2.c +++ b/keyboards/melgeek/mj61/rev2/rev2.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj61/rev2/rules.mk b/keyboards/melgeek/mj61/rev2/rules.mk index 00ab8d1110b..ea75197f8ff 100644 --- a/keyboards/melgeek/mj61/rev2/rules.mk +++ b/keyboards/melgeek/mj61/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj63/config.h b/keyboards/melgeek/mj63/config.h index 46d3b0fb7b9..db80371a2b2 100644 --- a/keyboards/melgeek/mj63/config.h +++ b/keyboards/melgeek/mj63/config.h @@ -41,11 +41,55 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj63/rev1/config.h b/keyboards/melgeek/mj63/rev1/config.h index 1f6914f6610..75f7da43a6b 100644 --- a/keyboards/melgeek/mj63/rev1/config.h +++ b/keyboards/melgeek/mj63/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 65 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 65 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj63/rev1/rev1.c b/keyboards/melgeek/mj63/rev1/rev1.c index a6ee8859b0d..45abafd84d0 100644 --- a/keyboards/melgeek/mj63/rev1/rev1.c +++ b/keyboards/melgeek/mj63/rev1/rev1.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj63/rev1/rules.mk b/keyboards/melgeek/mj63/rev1/rules.mk index cdb90c3f5f8..59359784c08 100644 --- a/keyboards/melgeek/mj63/rev1/rules.mk +++ b/keyboards/melgeek/mj63/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj63/rev2/config.h b/keyboards/melgeek/mj63/rev2/config.h index e6c6e9610e4..616426df655 100644 --- a/keyboards/melgeek/mj63/rev2/config.h +++ b/keyboards/melgeek/mj63/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 71 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 71 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj63/rev2/rev2.c b/keyboards/melgeek/mj63/rev2/rev2.c index 8cacc689aef..b21c4f960c8 100644 --- a/keyboards/melgeek/mj63/rev2/rev2.c +++ b/keyboards/melgeek/mj63/rev2/rev2.c @@ -19,7 +19,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj63/rev2/rules.mk b/keyboards/melgeek/mj63/rev2/rules.mk index cdb90c3f5f8..59359784c08 100644 --- a/keyboards/melgeek/mj63/rev2/rules.mk +++ b/keyboards/melgeek/mj63/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/config.h b/keyboards/melgeek/mj64/config.h index 920d34acd50..a249be3feaa 100644 --- a/keyboards/melgeek/mj64/config.h +++ b/keyboards/melgeek/mj64/config.h @@ -41,11 +41,55 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj64/rev1/config.h b/keyboards/melgeek/mj64/rev1/config.h index fb45ef3582a..db846cb0118 100644 --- a/keyboards/melgeek/mj64/rev1/config.h +++ b/keyboards/melgeek/mj64/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 64 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/rev1/rev1.c b/keyboards/melgeek/mj64/rev1/rev1.c index 446ba779d01..3279e7a1fe3 100644 --- a/keyboards/melgeek/mj64/rev1/rev1.c +++ b/keyboards/melgeek/mj64/rev1/rev1.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj64/rev1/rules.mk b/keyboards/melgeek/mj64/rev1/rules.mk index 036eba86303..581d808f640 100644 --- a/keyboards/melgeek/mj64/rev1/rules.mk +++ b/keyboards/melgeek/mj64/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/rev2/config.h b/keyboards/melgeek/mj64/rev2/config.h index 8af6833b218..fbe170f18eb 100644 --- a/keyboards/melgeek/mj64/rev2/config.h +++ b/keyboards/melgeek/mj64/rev2/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 66 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 66 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/rev2/rev2.c b/keyboards/melgeek/mj64/rev2/rev2.c index 444e8f60ac5..b0653f9e71f 100644 --- a/keyboards/melgeek/mj64/rev2/rev2.c +++ b/keyboards/melgeek/mj64/rev2/rev2.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj64/rev2/rules.mk b/keyboards/melgeek/mj64/rev2/rules.mk index 036eba86303..581d808f640 100644 --- a/keyboards/melgeek/mj64/rev2/rules.mk +++ b/keyboards/melgeek/mj64/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj64/rev3/config.h b/keyboards/melgeek/mj64/rev3/config.h index 26909d55984..dfde77f24ac 100644 --- a/keyboards/melgeek/mj64/rev3/config.h +++ b/keyboards/melgeek/mj64/rev3/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 72 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 72 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj64/rev3/rev3.c b/keyboards/melgeek/mj64/rev3/rev3.c index 2a1283ec70f..b67dbee75be 100644 --- a/keyboards/melgeek/mj64/rev3/rev3.c +++ b/keyboards/melgeek/mj64/rev3/rev3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB3 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB4 */ diff --git a/keyboards/melgeek/mj64/rev3/rules.mk b/keyboards/melgeek/mj64/rev3/rules.mk index 036eba86303..581d808f640 100644 --- a/keyboards/melgeek/mj64/rev3/rules.mk +++ b/keyboards/melgeek/mj64/rev3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj65/config.h b/keyboards/melgeek/mj65/config.h index 399c243ac60..70a12d92557 100644 --- a/keyboards/melgeek/mj65/config.h +++ b/keyboards/melgeek/mj65/config.h @@ -41,11 +41,55 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mj65/rev3/config.h b/keyboards/melgeek/mj65/rev3/config.h index 7955f4be971..d9a8c5a815c 100644 --- a/keyboards/melgeek/mj65/rev3/config.h +++ b/keyboards/melgeek/mj65/rev3/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 76 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 76 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mj65/rev3/rev3.c b/keyboards/melgeek/mj65/rev3/rev3.c index 6335edd7962..f02c29e7474 100644 --- a/keyboards/melgeek/mj65/rev3/rev3.c +++ b/keyboards/melgeek/mj65/rev3/rev3.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mj65/rev3/rules.mk b/keyboards/melgeek/mj65/rev3/rules.mk index 790c0efb187..67dab4c8bd4 100644 --- a/keyboards/melgeek/mj65/rev3/rules.mk +++ b/keyboards/melgeek/mj65/rev3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mj6xy/info.json b/keyboards/melgeek/mj6xy/info.json index 7465ed73047..712b97295cf 100755 --- a/keyboards/melgeek/mj6xy/info.json +++ b/keyboards/melgeek/mj6xy/info.json @@ -3266,7 +3266,6 @@ {"x": 10.5, "y": 1}, {"x": 11.5, "y": 1}, {"x": 12.5, "y": 1}, - {"x": 13.5, "y": 1, "w": 1.5}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2}, @@ -3413,7 +3412,6 @@ {"x": 10.5, "y": 1}, {"x": 11.5, "y": 1}, {"x": 12.5, "y": 1}, - {"x": 13.5, "y": 1, "w": 1.5}, {"x": 0, "y": 2, "w": 1.75}, {"x": 1.75, "y": 2}, diff --git a/keyboards/melgeek/mj6xy/rev3/rules.mk b/keyboards/melgeek/mj6xy/rev3/rules.mk index c492c55d523..54f7c83ac3e 100755 --- a/keyboards/melgeek/mj6xy/rev3/rules.mk +++ b/keyboards/melgeek/mj6xy/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mojo68/config.h b/keyboards/melgeek/mojo68/config.h index c4c1dbb0b72..15ea1a58b44 100755 --- a/keyboards/melgeek/mojo68/config.h +++ b/keyboards/melgeek/mojo68/config.h @@ -41,11 +41,54 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo68/rev1/config.h b/keyboards/melgeek/mojo68/rev1/config.h index aed2a45c37f..74a7e3dc26e 100755 --- a/keyboards/melgeek/mojo68/rev1/config.h +++ b/keyboards/melgeek/mojo68/rev1/config.h @@ -34,6 +34,5 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 68 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 68 #define DRIVER_INDICATOR_LED_TOTAL 3 diff --git a/keyboards/melgeek/mojo68/rev1/rev1.c b/keyboards/melgeek/mojo68/rev1/rev1.c index cc45417e88b..27c9212ac6f 100755 --- a/keyboards/melgeek/mojo68/rev1/rev1.c +++ b/keyboards/melgeek/mojo68/rev1/rev1.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS9_SW1, CS8_SW1, CS7_SW1}, /* RGB1 */ {0, CS9_SW2, CS8_SW2, CS7_SW2}, /* RGB2 */ {0, CS9_SW3, CS8_SW3, CS7_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mojo68/rev1/rules.mk b/keyboards/melgeek/mojo68/rev1/rules.mk index 7e9cdf0d0e3..f802330c184 100755 --- a/keyboards/melgeek/mojo68/rev1/rules.mk +++ b/keyboards/melgeek/mojo68/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/mojo75/config.h b/keyboards/melgeek/mojo75/config.h index d5bb4b4547f..9e2d1080d1f 100644 --- a/keyboards/melgeek/mojo75/config.h +++ b/keyboards/melgeek/mojo75/config.h @@ -41,12 +41,56 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 diff --git a/keyboards/melgeek/mojo75/rev1/config.h b/keyboards/melgeek/mojo75/rev1/config.h index c841c96fdec..eaac850b6d3 100644 --- a/keyboards/melgeek/mojo75/rev1/config.h +++ b/keyboards/melgeek/mojo75/rev1/config.h @@ -34,7 +34,6 @@ /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define DRIVER_1_LED_TOTAL 92 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 92 #define DRIVER_INDICATOR_LED_TOTAL 0 diff --git a/keyboards/melgeek/mojo75/rev1/rev1.c b/keyboards/melgeek/mojo75/rev1/rev1.c index 07ae916da2c..ae103801e2f 100644 --- a/keyboards/melgeek/mojo75/rev1/rev1.c +++ b/keyboards/melgeek/mojo75/rev1/rev1.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS6_SW1, CS5_SW1, CS4_SW1}, /* RGB1 */ {0, CS6_SW2, CS5_SW2, CS4_SW2}, /* RGB2 */ {0, CS6_SW3, CS5_SW3, CS4_SW3}, /* RGB3 */ diff --git a/keyboards/melgeek/mojo75/rev1/rules.mk b/keyboards/melgeek/mojo75/rev1/rules.mk index 850c0993dd8..2c8ef27319b 100644 --- a/keyboards/melgeek/mojo75/rev1/rules.mk +++ b/keyboards/melgeek/mojo75/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/z70ultra/config.h b/keyboards/melgeek/z70ultra/config.h index e4530e2eaa7..2df25bf5018 100644 --- a/keyboards/melgeek/z70ultra/config.h +++ b/keyboards/melgeek/z70ultra/config.h @@ -40,14 +40,57 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_LED_PROCESS_LIMIT 4 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH //#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL #define DRIVER_ADDR_1 0b0110000 -#define DRIVER_ADDR_2 0b0110000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 69 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 69 #define DRIVER_INDICATOR_LED_TOTAL 6 diff --git a/keyboards/melgeek/z70ultra/rev1/rules.mk b/keyboards/melgeek/z70ultra/rev1/rules.mk index c643bd53594..bfac26d190b 100644 --- a/keyboards/melgeek/z70ultra/rev1/rules.mk +++ b/keyboards/melgeek/z70ultra/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/melgeek/z70ultra/z70ultra.c b/keyboards/melgeek/z70ultra/z70ultra.c index 552576cd7c0..6be690c01e3 100644 --- a/keyboards/melgeek/z70ultra/z70ultra.c +++ b/keyboards/melgeek/z70ultra/z70ultra.c @@ -18,7 +18,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, CS28_SW1, CS30_SW1, CS29_SW1}, /* RGB10 */ {0, CS28_SW2, CS30_SW2, CS29_SW2}, /* RGB11 */ {0, CS28_SW3, CS30_SW3, CS29_SW3}, /* RGB12 */ diff --git a/keyboards/melody96/keymaps/konstantin/rules.mk b/keyboards/melody96/keymaps/konstantin/rules.mk index 816ece7b268..b315c8e6b96 100644 --- a/keyboards/melody96/keymaps/konstantin/rules.mk +++ b/keyboards/melody96/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/melody96/rules.mk b/keyboards/melody96/rules.mk index 89557e4ea79..d45a04dedf5 100644 --- a/keyboards/melody96/rules.mk +++ b/keyboards/melody96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index 34624d2b6a9..0757846f572 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -108,5 +107,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/meme/meme.h b/keyboards/meme/meme.h index 4c4b29a046c..36c533ea9d6 100644 --- a/keyboards/meme/meme.h +++ b/keyboards/meme/meme.h @@ -13,90 +13,85 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MEME_H -#define MEME_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_spicy( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, K16, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k95, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, k95, k96, k97 } \ } #define LAYOUT_normie( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K95, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, K95, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k95, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, k95, k96, k97 } \ } #define LAYOUT_dank( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, KC_NO, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, XXX, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, XXX, k96, k97 } \ } #define LAYOUT_meme( \ - K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K07, K17, \ - K20, K30, K21, K31, K22, K32, K23, K33, K24, K34, K25, K35, K26, K36, K37, \ - K40, K50, K41, K51, K42, K52, K43, K53, K44, K54, K45, K55, K56, K57, \ - K60, K70, K61, K71, K62, K72, K63, K73, K64, K74, K65, K76, K67, K77, \ - K80, K90, K81, K92, K85, K86, K96, K87, K97 \ -)\ -{\ - {K00, K01, K02, K03, K04, K05, K06, K07}, \ - {K10, K11, K12, K13, K14, K15, K16, K17}, \ - {K20, K21, K22, K23, K24, K25, K26, KC_NO}, \ - {K30, K31, K32, K33, K34, K35, K36, K37}, \ - {K40, K41, K42, K43, K44, K45, KC_NO, KC_NO}, \ - {K50, K51, K52, K53, K54, K55, K56, K57}, \ - {K60, K61, K62, K63, K64, K65, KC_NO, K67}, \ - {K70, K71, K72, K73, K74, KC_NO, K76, K77}, \ - {K80, K81, KC_NO, KC_NO, KC_NO, K85, K86, K87}, \ - {K90, KC_NO, K92, KC_NO, KC_NO, KC_NO, K96, K97}, \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k56, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k76, k67, k77, \ + k80, k90, k81, k92, k85, k86, k96, k87, k97 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, XXX, k67 }, \ + { k70, k71, k72, k73, k74, XXX, k76, k77 }, \ + { k80, k81, XXX, XXX, XXX, k85, k86, k87 }, \ + { k90, XXX, k92, XXX, XXX, XXX, k96, k97 } \ } - - -#endif diff --git a/keyboards/merge/um70/keymaps/default/keymap.c b/keyboards/merge/um70/keymaps/default/keymap.c index 0a775929d0c..926f7836aad 100644 --- a/keyboards/merge/um70/keymaps/default/keymap.c +++ b/keyboards/merge/um70/keymaps/default/keymap.c @@ -169,7 +169,7 @@ static void print_status_narrow(void) { // WPM counter End } -void oled_task_user(void) { +bool oled_task_user(void) { current_wpm = get_current_wpm(); if (is_keyboard_master()) { print_status_narrow(); @@ -178,6 +178,7 @@ void oled_task_user(void) { render_logo(); //print_status_narrow(); } + return false; } #endif diff --git a/keyboards/merge/um70/keymaps/via/keymap.c b/keyboards/merge/um70/keymaps/via/keymap.c index aaf682ffd1b..f7255eacf29 100644 --- a/keyboards/merge/um70/keymaps/via/keymap.c +++ b/keyboards/merge/um70/keymaps/via/keymap.c @@ -173,7 +173,7 @@ static void print_status_narrow(void) { // WPM counter End } -void oled_task_user(void) { +bool oled_task_user(void) { current_wpm = get_current_wpm(); if (is_keyboard_master()) { print_status_narrow(); @@ -182,6 +182,7 @@ void oled_task_user(void) { render_logo(); //print_status_narrow(); } + return false; } #endif diff --git a/keyboards/merge/um70/rules.mk b/keyboards/merge/um70/rules.mk index b4334c6f9c3..3347a8ebbf7 100644 --- a/keyboards/merge/um70/rules.mk +++ b/keyboards/merge/um70/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mesa/mesa_tkl/rules.mk b/keyboards/mesa/mesa_tkl/rules.mk index 6a471b03e28..2eb93696592 100644 --- a/keyboards/mesa/mesa_tkl/rules.mk +++ b/keyboards/mesa/mesa_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/meson/rules.mk b/keyboards/meson/rules.mk index 3b3aa04ba67..52935ed9d8b 100644 --- a/keyboards/meson/rules.mk +++ b/keyboards/meson/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # change yes to no to disable # SPLIT_KEYBOARD = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/metamechs/timberwolf/rules.mk b/keyboards/metamechs/timberwolf/rules.mk index 4461fa8a6fe..63c334e1912 100644 --- a/keyboards/metamechs/timberwolf/rules.mk +++ b/keyboards/metamechs/timberwolf/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mexsistor/ludmila/rules.mk b/keyboards/mexsistor/ludmila/rules.mk index 5c594082ec0..971b22c783a 100644 --- a/keyboards/mexsistor/ludmila/rules.mk +++ b/keyboards/mexsistor/ludmila/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = atmel-dfu # CUSTOM_MATRIX = lite SRC = matrix.c -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/miller/gm862/config.h b/keyboards/miller/gm862/config.h index e6e1b4c1dfd..09429b4d198 100644 --- a/keyboards/miller/gm862/config.h +++ b/keyboards/miller/gm862/config.h @@ -39,24 +39,56 @@ # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 62 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 62 #endif diff --git a/keyboards/miller/gm862/gm862.c b/keyboards/miller/gm862/gm862.c index d67104838bc..5262957767d 100644 --- a/keyboards/miller/gm862/gm862.c +++ b/keyboards/miller/gm862/gm862.c @@ -1,7 +1,7 @@ #include "gm862.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, B_1, A_1, C_1}, {0, B_2, A_2, C_2}, {0, B_3, A_3, C_3}, diff --git a/keyboards/miller/gm862/rules.mk b/keyboards/miller/gm862/rules.mk index c4d5352324e..41fdb211ed4 100644 --- a/keyboards/miller/gm862/rules.mk +++ b/keyboards/miller/gm862/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/millipad/rules.mk b/keyboards/millipad/rules.mk index 64bc93c9c6f..2af6060bf90 100644 --- a/keyboards/millipad/rules.mk +++ b/keyboards/millipad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mini_elixivy/rules.mk b/keyboards/mini_elixivy/rules.mk index c9314512734..c1b300af904 100644 --- a/keyboards/mini_elixivy/rules.mk +++ b/keyboards/mini_elixivy/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/miniaxe/miniaxe.h b/keyboards/miniaxe/miniaxe.h index b6a60511239..fc23865c363 100644 --- a/keyboards/miniaxe/miniaxe.h +++ b/keyboards/miniaxe/miniaxe.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MINIAXE_H -#define MINIAXE_H + +#pragma once #include "quantum.h" @@ -31,22 +31,19 @@ #define ___ KC_NO #define LAYOUT_split_3x5_3( \ - L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ - L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ - L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ - L16, L17, L18, R16, R17, R18 \ - ) \ - { \ - { L01, L02, L03, L04, L05 }, \ - { L06, L07, L08, L09, L10 }, \ - { L11, L12, L13, L14, L15 }, \ - { L16, L17, L18, ___, ___ }, \ - { R01, R02, R03, R04, R05 }, \ - { R06, R07, R08, R09, R10 }, \ - { R11, R12, R13, R14, R15 }, \ - { R16, R17, R18, ___, ___ } \ - } - -#endif + L01, L02, L03, L04, L05, R01, R02, R03, R04, R05, \ + L06, L07, L08, L09, L10, R06, R07, R08, R09, R10, \ + L11, L12, L13, L14, L15, R11, R12, R13, R14, R15, \ + L16, L17, L18, R16, R17, R18 \ +) { \ + { L01, L02, L03, L04, L05 }, \ + { L06, L07, L08, L09, L10 }, \ + { L11, L12, L13, L14, L15 }, \ + { L16, L17, L18, ___, ___ }, \ + { R01, R02, R03, R04, R05 }, \ + { R06, R07, R08, R09, R10 }, \ + { R11, R12, R13, R14, R15 }, \ + { R16, R17, R18, ___, ___ } \ +} #define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/minim/rules.mk b/keyboards/minim/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/minim/rules.mk +++ b/keyboards/minim/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/minimon/index_tab/index_tab.h b/keyboards/minimon/index_tab/index_tab.h index cb9d3c5ae6b..e1419379baf 100644 --- a/keyboards/minimon/index_tab/index_tab.h +++ b/keyboards/minimon/index_tab/index_tab.h @@ -18,7 +18,31 @@ #include "quantum.h" -#define LAYOUT( \ +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3c │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │40 │41 │42 │43 │44 │45 │46 │47 │48 │49 │4a │4b │4c │ + * ├───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┼───┤ + * │50 │51 │52 │53 │54 │55 │56 │57 │58 │59 │5a │5b │5c │ + * └───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ + * ┌───┬───┬───┬───┬───────┬───────┬───┬───┬───┬───┬───┐ + * │50 │51 │52 │53 │54 │56 │58 │59 │5a │5b │5c │ 2x2u + * └───┴───┴───┴───┴───────┴───────┴───┴───┴───┴───┴───┘ + * ┌───┬───┬───┬───────────────────────────┬───┬───┬───┐ + * │50 │51 │52 │ 56 │5a │5b │5c │ 7u_space + * └───┴───┴───┴───────────────────────────┴───┴───┴───┘ + */ + +#define LAYOUT_ortho_6x13( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, \ @@ -34,3 +58,37 @@ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c }, \ { K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5a, K5b, K5c } \ } + +#define LAYOUT_2x2u( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c, \ + K50, K51, K52, K53, K54, K56, K58, K59, K5a, K5b, K5c \ +) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c }, \ + { K50, K51, K52, K53, K54, XXX, K56, XXX, K58, K59, K5a, K5b, K5c } \ + } + +#define LAYOUT_7u_space( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c, \ + K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c, \ + K50, K51, K52, K56, K5a, K5b, K5c \ +) \ + { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0a, K0b, K0c }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1a, K1b, K1c }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2a, K2b, K2c }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3a, K3b, K3c }, \ + { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4a, K4b, K4c }, \ + { K50, K51, K52, XXX, XXX, XXX, K56, XXX, XXX, XXX, K5a, K5b, K5c } \ + } diff --git a/keyboards/minimon/index_tab/info.json b/keyboards/minimon/index_tab/info.json index 21ff5a3cde1..209d3044fe4 100644 --- a/keyboards/minimon/index_tab/info.json +++ b/keyboards/minimon/index_tab/info.json @@ -1,17 +1,263 @@ { - "keyboard_name": "Index Tab", - "maintainer": "kyrremann", - "url": "https://github.com/Kyrremann/index-tab", - "layouts": { - "LAYOUT_all": { - "layout": [ - {"label":"CAPS", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, - {"label":"<", "x":0, "y":1}, {"label":"1", "x":1, "y":1}, {"label":"2", "x":2, "y":1}, {"label":"3", "x":3, "y":1}, {"label":"4", "x":4, "y":1}, {"label":"5", "x":5, "y":1}, {"label":"6", "x":6, "y":1}, {"label":"7", "x":7, "y":1}, {"label":"8", "x":8, "y":1}, {"label":"9", "x":9, "y":1}, {"label":"0", "x":10, "y":1}, {"label":"+", "x":11, "y":1}, {"label":"\u00b4", "x":12, "y":1}, - {"label":"TAB", "x":0, "y":2}, {"label":"q", "x":1, "y":2}, {"label":"w", "x":2, "y":2}, {"label":"e", "x":3, "y":2}, {"label":"r", "x":4, "y":2}, {"label":"t", "x":5, "y":2}, {"label":"y", "x":6, "y":2}, {"label":"u", "x":7, "y":2}, {"label":"i", "x":8, "y":2}, {"label":"o", "x":9, "y":2}, {"label":"p", "x":10, "y":2}, {"label":"\u00e5", "x":11, "y":2}, {"label":"BKSP", "x":12, "y":2}, - {"label":"CTRL", "x":0, "y":3}, {"label":"a", "x":1, "y":3}, {"label":"s", "x":2, "y":3}, {"label":"d", "x":3, "y":3}, {"label":"f", "x":4, "y":3}, {"label":"g", "x":5, "y":3}, {"label":"h", "x":6, "y":3}, {"label":"j", "x":7, "y":3}, {"label":"k", "x":8, "y":3}, {"label":"l", "x":9, "y":3}, {"label":"\u00f8", "x":10, "y":3}, {"label":"\u00e6", "x":11, "y":3}, {"label":"\u00a8", "x":12, "y":3}, - {"label":"SHIFT", "x":0, "y":4}, {"label":"z", "x":1, "y":4}, {"label":"x", "x":2, "y":4}, {"label":"c", "x":3, "y":4}, {"label":"v", "x":4, "y":4}, {"label":"b", "x":5, "y":4}, {"label":"n", "x":6, "y":4}, {"label":"m", "x":7, "y":4}, {"label":",", "x":8, "y":4}, {"label":".", "x":9, "y":4}, {"label":"-", "x":10, "y":4}, {"label":"\u2191", "x":11, "y":4}, {"label":"\u21b2", "x":12, "y":4}, - {"label":"ESC", "x":0, "y":5}, {"label":"\u00a7", "x":1, "y":5}, {"label":"WIN", "x":2, "y":5}, {"label":"LALT", "x":3, "y":5}, {"x":4, "y":5, "w":2}, {"x":6, "y":5, "w":2}, {"label":"FN", "x":8, "y":5}, {"label":"@", "x":9, "y":5}, {"label":"\u2190", "x":10, "y":5}, {"label":"\u2193", "x":11, "y":5}, {"label":"\u2192", "x":12, "y":5} - ] + "keyboard_name": "Index Tab", + "maintainer": "kyrremann", + "url": "https://github.com/Kyrremann/index-tab", + "layout_aliases": { + "LAYOUT": "LAYOUT_ortho_6x13" + }, + "layouts": { + "LAYOUT_ortho_6x13": { + "layout": [ + {"label":"CAPS", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + + {"label":"<>", "x":0, "y":1}, + {"label":"1!", "x":1, "y":1}, + {"label":"2\"", "x":2, "y":1}, + {"label":"3#", "x":3, "y":1}, + {"label":"4\u00a4", "x":4, "y":1}, + {"label":"5%", "x":5, "y":1}, + {"label":"6&", "x":6, "y":1}, + {"label":"7/", "x":7, "y":1}, + {"label":"8(", "x":8, "y":1}, + {"label":"9)", "x":9, "y":1}, + {"label":"0=", "x":10, "y":1}, + {"label":"+?", "x":11, "y":1}, + {"label":"\\`", "x":12, "y":1}, + + {"label":"TAB", "x":0, "y":2}, + {"label":"Q", "x":1, "y":2}, + {"label":"W", "x":2, "y":2}, + {"label":"E", "x":3, "y":2}, + {"label":"R", "x":4, "y":2}, + {"label":"T", "x":5, "y":2}, + {"label":"Y", "x":6, "y":2}, + {"label":"U", "x":7, "y":2}, + {"label":"I", "x":8, "y":2}, + {"label":"O", "x":9, "y":2}, + {"label":"P", "x":10, "y":2}, + {"label":"\u00c5", "x":11, "y":2}, + {"label":"BKSP", "x":12, "y":2}, + + {"label":"CTRL", "x":0, "y":3}, + {"label":"A", "x":1, "y":3}, + {"label":"S", "x":2, "y":3}, + {"label":"D", "x":3, "y":3}, + {"label":"F", "x":4, "y":3}, + {"label":"G", "x":5, "y":3}, + {"label":"H", "x":6, "y":3}, + {"label":"J", "x":7, "y":3}, + {"label":"K", "x":8, "y":3}, + {"label":"L", "x":9, "y":3}, + {"label":"\u00d8", "x":10, "y":3}, + {"label":"\u00c6", "x":11, "y":3}, + {"label":"\u00a8^", "x":12, "y":3}, + + {"label":"SHIFT", "x":0, "y":4}, + {"label":"Z", "x":1, "y":4}, + {"label":"X", "x":2, "y":4}, + {"label":"C", "x":3, "y":4}, + {"label":"V", "x":4, "y":4}, + {"label":"B", "x":5, "y":4}, + {"label":"N", "x":6, "y":4}, + {"label":"M", "x":7, "y":4}, + {"label":",;", "x":8, "y":4}, + {"label":".:", "x":9, "y":4}, + {"label":"-_", "x":10, "y":4}, + {"label":"\u2191", "x":11, "y":4}, + {"label":"\u21b2", "x":12, "y":4}, + + {"label":"ESC", "x":0, "y":5}, + {"label":"|\u00a7", "x":1, "y":5}, + {"label":"WIN", "x":2, "y":5}, + {"label":"LALT", "x":3, "y":5}, + {"label":"Space", "x":4, "y":5}, + {"label":"Space", "x":5, "y":5}, + {"label":"Space", "x":6, "y":5}, + {"label":"Space", "x":7, "y":5}, + {"label":"FN", "x":8, "y":5}, + {"label":"'*", "x":9, "y":5}, + {"label":"\u2190", "x":10, "y":5}, + {"label":"\u2193", "x":11, "y":5}, + {"label":"\u2192", "x":12, "y":5} + ] + }, + "LAYOUT_2x2u": { + "layout": [ + {"label":"CAPS", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + + {"label":"<>", "x":0, "y":1}, + {"label":"1!", "x":1, "y":1}, + {"label":"2\"", "x":2, "y":1}, + {"label":"3#", "x":3, "y":1}, + {"label":"4\u00a4", "x":4, "y":1}, + {"label":"5%", "x":5, "y":1}, + {"label":"6&", "x":6, "y":1}, + {"label":"7/", "x":7, "y":1}, + {"label":"8(", "x":8, "y":1}, + {"label":"9)", "x":9, "y":1}, + {"label":"0=", "x":10, "y":1}, + {"label":"+?", "x":11, "y":1}, + {"label":"\\`", "x":12, "y":1}, + + {"label":"TAB", "x":0, "y":2}, + {"label":"Q", "x":1, "y":2}, + {"label":"W", "x":2, "y":2}, + {"label":"E", "x":3, "y":2}, + {"label":"R", "x":4, "y":2}, + {"label":"T", "x":5, "y":2}, + {"label":"Y", "x":6, "y":2}, + {"label":"U", "x":7, "y":2}, + {"label":"I", "x":8, "y":2}, + {"label":"O", "x":9, "y":2}, + {"label":"P", "x":10, "y":2}, + {"label":"\u00c5", "x":11, "y":2}, + {"label":"BKSP", "x":12, "y":2}, + + {"label":"CTRL", "x":0, "y":3}, + {"label":"A", "x":1, "y":3}, + {"label":"S", "x":2, "y":3}, + {"label":"D", "x":3, "y":3}, + {"label":"F", "x":4, "y":3}, + {"label":"G", "x":5, "y":3}, + {"label":"H", "x":6, "y":3}, + {"label":"J", "x":7, "y":3}, + {"label":"K", "x":8, "y":3}, + {"label":"L", "x":9, "y":3}, + {"label":"\u00d8", "x":10, "y":3}, + {"label":"\u00c6", "x":11, "y":3}, + {"label":"\u00a8^", "x":12, "y":3}, + + {"label":"SHIFT", "x":0, "y":4}, + {"label":"Z", "x":1, "y":4}, + {"label":"X", "x":2, "y":4}, + {"label":"C", "x":3, "y":4}, + {"label":"V", "x":4, "y":4}, + {"label":"B", "x":5, "y":4}, + {"label":"N", "x":6, "y":4}, + {"label":"M", "x":7, "y":4}, + {"label":",;", "x":8, "y":4}, + {"label":".:", "x":9, "y":4}, + {"label":"-_", "x":10, "y":4}, + {"label":"\u2191", "x":11, "y":4}, + {"label":"\u21b2", "x":12, "y":4}, + + {"label":"ESC", "x":0, "y":5}, + {"label":"|\u00a7", "x":1, "y":5}, + {"label":"WIN", "x":2, "y":5}, + {"label":"LALT", "x":3, "y":5}, + {"label":"Space", "x":4, "y":5, "w":2}, + {"label":"Space", "x":6, "y":5, "w":2}, + {"label":"FN", "x":8, "y":5}, + {"label":"'*", "x":9, "y":5}, + {"label":"\u2190", "x":10, "y":5}, + {"label":"\u2193", "x":11, "y":5}, + {"label":"\u2192", "x":12, "y":5} + ] + }, + "LAYOUT_7u_space": { + "layout": [ + {"label":"Fn/Caps", "x":0, "y":0}, + {"label":"F1", "x":1, "y":0}, + {"label":"F2", "x":2, "y":0}, + {"label":"F3", "x":3, "y":0}, + {"label":"F4", "x":4, "y":0}, + {"label":"F5", "x":5, "y":0}, + {"label":"F6", "x":6, "y":0}, + {"label":"F7", "x":7, "y":0}, + {"label":"F8", "x":8, "y":0}, + {"label":"F9", "x":9, "y":0}, + {"label":"F10", "x":10, "y":0}, + {"label":"F11", "x":11, "y":0}, + {"label":"F12", "x":12, "y":0}, + + {"label":"<>", "x":0, "y":1}, + {"label":"1!", "x":1, "y":1}, + {"label":"2\"", "x":2, "y":1}, + {"label":"3#", "x":3, "y":1}, + {"label":"4\u00a4", "x":4, "y":1}, + {"label":"5%", "x":5, "y":1}, + {"label":"6&", "x":6, "y":1}, + {"label":"7/", "x":7, "y":1}, + {"label":"8(", "x":8, "y":1}, + {"label":"9)", "x":9, "y":1}, + {"label":"0=", "x":10, "y":1}, + {"label":"+?", "x":11, "y":1}, + {"label":"\\`", "x":12, "y":1}, + + {"label":"TAB", "x":0, "y":2}, + {"label":"Q", "x":1, "y":2}, + {"label":"W", "x":2, "y":2}, + {"label":"E", "x":3, "y":2}, + {"label":"R", "x":4, "y":2}, + {"label":"T", "x":5, "y":2}, + {"label":"Y", "x":6, "y":2}, + {"label":"U", "x":7, "y":2}, + {"label":"I", "x":8, "y":2}, + {"label":"O", "x":9, "y":2}, + {"label":"P", "x":10, "y":2}, + {"label":"\u00c5", "x":11, "y":2}, + {"label":"BKSP", "x":12, "y":2}, + + {"label":"CTRL", "x":0, "y":3}, + {"label":"A", "x":1, "y":3}, + {"label":"S", "x":2, "y":3}, + {"label":"D", "x":3, "y":3}, + {"label":"F", "x":4, "y":3}, + {"label":"G", "x":5, "y":3}, + {"label":"H", "x":6, "y":3}, + {"label":"J", "x":7, "y":3}, + {"label":"K", "x":8, "y":3}, + {"label":"L", "x":9, "y":3}, + {"label":"\u00d8", "x":10, "y":3}, + {"label":"\u00c6", "x":11, "y":3}, + {"label":"\u00a8^", "x":12, "y":3}, + + {"label":"SHIFT", "x":0, "y":4}, + {"label":"Z", "x":1, "y":4}, + {"label":"X", "x":2, "y":4}, + {"label":"C", "x":3, "y":4}, + {"label":"V", "x":4, "y":4}, + {"label":"B", "x":5, "y":4}, + {"label":"N", "x":6, "y":4}, + {"label":"M", "x":7, "y":4}, + {"label":",;", "x":8, "y":4}, + {"label":".:", "x":9, "y":4}, + {"label":"-_", "x":10, "y":4}, + {"label":"\u2191", "x":11, "y":4}, + {"label":"\u21b2", "x":12, "y":4}, + + {"label":"GESC", "x":0, "y":5}, + {"label":"WIN", "x":1, "y":5}, + {"label":"LALT", "x":2, "y":5}, + {"label":"Space", "x":3, "y":5, "w":7}, + {"label":"\u2190", "x":10, "y":5}, + {"label":"\u2193", "x":11, "y":5}, + {"label":"\u2192", "x":12, "y":5} + ] + } } - } } diff --git a/keyboards/minimon/index_tab/keymaps/default/keymap.c b/keyboards/minimon/index_tab/keymaps/default/keymap.c index 9f2a3d1320e..95e2f3427ed 100644 --- a/keyboards/minimon/index_tab/keymaps/default/keymap.c +++ b/keyboards/minimon/index_tab/keymaps/default/keymap.c @@ -15,7 +15,7 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( +[0] = LAYOUT_ortho_6x13( KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUBS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, TG(1), KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT ), -[1] = LAYOUT( +[1] = LAYOUT_ortho_6x13( KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPLY, KC_MPLY, KC_MPLY, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PENT ), -[2] = LAYOUT( +[2] = LAYOUT_ortho_6x13( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/minimon/index_tab/keymaps/default_2x2u/keymap.c b/keyboards/minimon/index_tab/keymaps/default_2x2u/keymap.c new file mode 100644 index 00000000000..999e19fb691 --- /dev/null +++ b/keyboards/minimon/index_tab/keymaps/default_2x2u/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2020 Kyrre Havik Eriksen + 2021 James Young for QMK (@noroadsleft) +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 . +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_2x2u( + KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NUBS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, + 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_RBRC, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, + KC_ESC, KC_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, TG(1), KC_BSLS, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_2x2u( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PCMM, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_VOLD, KC_MUTE, KC_VOLU, KC_MNXT, KC_P1, KC_P2, KC_P3, KC_PEQL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPLY, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PENT + ), + +}; diff --git a/keyboards/minimon/index_tab/keymaps/default_7u_space/keymap.c b/keyboards/minimon/index_tab/keymaps/default_7u_space/keymap.c new file mode 100644 index 00000000000..ea9e88568fd --- /dev/null +++ b/keyboards/minimon/index_tab/keymaps/default_7u_space/keymap.c @@ -0,0 +1,39 @@ +/* +Copyright 2020 Kyrre Havik Eriksen + 2021 James Young for QMK (@noroadsleft) +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 . +*/ +#include QMK_KEYBOARD_H + +#define LT1_CAP LT(1, KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_7u_space( + LT1_CAP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_NUBS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, + 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_RBRC, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_ENT, + KC_GESC, KC_LGUI, KC_LALT, KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT_7u_space( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_PCMM, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_VOLD, KC_MUTE, KC_VOLU, KC_MNXT, KC_P1, KC_P2, KC_P3, KC_PEQL, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_P0, KC_PDOT, KC_PENT + ), + +}; diff --git a/keyboards/minimon/index_tab/keymaps/via/keymap.c b/keyboards/minimon/index_tab/keymaps/via/keymap.c index f6f0e0da1ef..f3bac2aee81 100644 --- a/keyboards/minimon/index_tab/keymaps/via/keymap.c +++ b/keyboards/minimon/index_tab/keymaps/via/keymap.c @@ -15,7 +15,7 @@ along with this program. If not, see . const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT( +[0] = LAYOUT_ortho_6x13( KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUBS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, @@ -24,7 +24,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_GRV, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, TG(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), -[1] = LAYOUT( +[1] = LAYOUT_ortho_6x13( KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_PPLS, @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_P0, KC_P0, KC_PDOT, KC_PEQL ), -[2] = LAYOUT( +[2] = LAYOUT_ortho_6x13( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), -[3] = LAYOUT( +[3] = LAYOUT_ortho_6x13( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/mio/rules.mk b/keyboards/mio/rules.mk index d533bc65e5e..02ae236709e 100644 --- a/keyboards/mio/rules.mk +++ b/keyboards/mio/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misonoworks/chocolatebar/chocolatebar.c b/keyboards/misonoworks/chocolatebar/chocolatebar.c index 448d9558842..dc9a251df49 100644 --- a/keyboards/misonoworks/chocolatebar/chocolatebar.c +++ b/keyboards/misonoworks/chocolatebar/chocolatebar.c @@ -18,11 +18,14 @@ along with this program. If not, see . #include "chocolatebar.h" #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; // flips the display 180 degrees if offhand +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static const char PROGMEM base_logo[] = {// 'choccy oled base', 32x128px 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x8f, 0xff, 0x7f, 0x1f, 0x0f, 0x0f, 0x1f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7f, 0x7f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7c, 0x38, 0x08, 0x04, 0x02, 0x03, 0xe3, 0x98, 0x08, 0x08, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x0c, 0x9e, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0x61, 0x63, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x30, 0x20, 0x20, 0x30, 0x3f, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x38, 0x3c, 0x30, 0x20, 0x20, 0x30, 0x3f, 0x3e, 0x7e, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0xfc, 0xbc, 0x14, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x14, 0xbc, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x3f, 0x7f, 0x3b, 0x30, 0x00, 0x00, 0x04, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00, 0x00, 0x43, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xc0, 0x80, 0x80, 0xc3, 0xc3, 0xc2, 0xc2, 0xc2, 0xc3, 0xc2, 0xc0, 0xc0, 0xc2, 0xc3, 0xc2, 0xc2, 0xc2, 0x42, 0x43, 0xc0, 0x80, 0x80, 0xc0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x7f, 0xbf, 0xdf, 0xef, 0x67, 0x9b, 0x9d, 0x6e, 0x75, 0xb3, 0xc5, 0xce, 0x57, 0xbb, 0xdc, 0xed, 0xf3, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, @@ -46,5 +49,6 @@ __attribute__((weak)) void oled_task_user(void) { default: oled_write_raw_P(base_logo, sizeof(base_logo)); } + return false; } #endif diff --git a/keyboards/misonoworks/chocolatebar/rules.mk b/keyboards/misonoworks/chocolatebar/rules.mk index b3d9c42372d..c233b8461e8 100644 --- a/keyboards/misonoworks/chocolatebar/rules.mk +++ b/keyboards/misonoworks/chocolatebar/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misonoworks/karina/rules.mk b/keyboards/misonoworks/karina/rules.mk index 377b32a7c1c..ebde6cceace 100644 --- a/keyboards/misonoworks/karina/rules.mk +++ b/keyboards/misonoworks/karina/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misterknife/knife66/rules.mk b/keyboards/misterknife/knife66/rules.mk index 7e753eb94c3..f17458ffef5 100644 --- a/keyboards/misterknife/knife66/rules.mk +++ b/keyboards/misterknife/knife66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/misterknife/knife66_iso/rules.mk b/keyboards/misterknife/knife66_iso/rules.mk index 7e753eb94c3..f17458ffef5 100644 --- a/keyboards/misterknife/knife66_iso/rules.mk +++ b/keyboards/misterknife/knife66_iso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h index 0e089269e8b..94e84e680e7 100644 --- a/keyboards/mitosis/config.h +++ b/keyboards/mitosis/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -66,5 +65,3 @@ along with this program. If not, see . UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); - -#endif diff --git a/keyboards/mitosis/mitosis.h b/keyboards/mitosis/mitosis.h index 80476e71c88..4b7d3a60c41 100644 --- a/keyboards/mitosis/mitosis.h +++ b/keyboards/mitosis/mitosis.h @@ -1,5 +1,4 @@ -#ifndef MITOSIS_H -#define MITOSIS_H +#pragma once #include "quantum.h" @@ -43,21 +42,21 @@ #define set_led_white PORTF |= (1<. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -110,5 +109,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -#endif diff --git a/keyboards/miuni32/miuni32.h b/keyboards/miuni32/miuni32.h index ff74675450e..c95a37e2e89 100644 --- a/keyboards/miuni32/miuni32.h +++ b/keyboards/miuni32/miuni32.h @@ -1,28 +1,27 @@ -#ifndef MIUNI32_H -#define MIUNI32_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K25, K26, K27, K28, K29, K2A \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, KC_NO, K25, K26, K27, K28, K29, K2A } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k25, k26, k27, k28, k29, k2A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, XXX, k25, k26, k27, k28, k29, k2A } \ } #define LAYOUT_ortho_3x11( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ - ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A } \ } #define LAYOUT_all LAYOUT_ortho_3x11 - -#endif diff --git a/keyboards/mnk1800s/rules.mk b/keyboards/mnk1800s/rules.mk index 8887e9fa789..a4cf8bab5a9 100755 --- a/keyboards/mnk1800s/rules.mk +++ b/keyboards/mnk1800s/rules.mk @@ -9,7 +9,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mnk50/rules.mk b/keyboards/mnk50/rules.mk index 999bf58d787..8d14f05b82c 100755 --- a/keyboards/mnk50/rules.mk +++ b/keyboards/mnk50/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mode/m65s/rules.mk b/keyboards/mode/m65s/rules.mk index 6308c54dde0..d564e131427 100644 --- a/keyboards/mode/m65s/rules.mk +++ b/keyboards/mode/m65s/rules.mk @@ -4,7 +4,7 @@ MCU = STM32F401 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/model_v/rules.mk b/keyboards/model_v/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/model_v/rules.mk +++ b/keyboards/model_v/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mokey/ginkgo65/ginkgo65.h b/keyboards/mokey/ginkgo65/ginkgo65.h index 72342f08bb2..1594e5c793a 100644 --- a/keyboards/mokey/ginkgo65/ginkgo65.h +++ b/keyboards/mokey/ginkgo65/ginkgo65.h @@ -19,7 +19,7 @@ #define XXX KC_NO -/*LAYOUT +/*LAYOUT_65_ansi_blocker * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│ k0D │k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ @@ -33,7 +33,7 @@ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT( \ +#define LAYOUT_65_ansi_blocker( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ @@ -47,38 +47,66 @@ { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, XXX }, \ } -/*LAYOUT_iso +/*LAYOUT_65_ansi_blocker_split_bs * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│k0D│k0E│k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ K2D │k1E│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ - * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│k1D│ │k2E│ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ k1D │k1E│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│ k2D │k2E│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ k30 │k32│k33│k34│k35│k36│k37│k38│k39│k3A│k3B│ k3C │k3D│k3E│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │k40 │k41 │k42 │ k44 │k49 │k4A │ │k4C│k4D│k4E│ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT_iso( \ +#define LAYOUT_65_ansi_blocker_split_bs( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ k40, k41, k42, k44, k49, k4A, k4C, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, XXX }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, XXX }, \ } -/*LAYOUT_split_left_shift +/*LAYOUT_65_ansi_blocker_tsangan_split_bs * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│k0D│k0E│k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ + * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ k1D │k1E│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│ k2D │k2E│ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │ k30 │k32│k33│k34│k35│k36│k37│k38│k39│k3A│k3B│ k3C │k3D│k3E│ + * ├─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ + * │k40 │k41│k42 │ k44 │k4A │ │k4C│k4D│k4E│ + * └─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ + 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 +*/ +#define LAYOUT_65_ansi_blocker_tsangan_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k44, k4A, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ + { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, XXX, k4A, XXX, k4C, k4D, k4E, XXX }, \ +} + +/*LAYOUT_65_iso_blocker + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│ k0D │k0F│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ K2D │k1E│ * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│k1D│ │k2E│ @@ -89,21 +117,21 @@ * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT_split_left_shift( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2E, \ +#define LAYOUT_65_iso_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2E, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ k40, k41, k42, k44, k49, k4A, k4C, k4D, k4E \ ) { \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, XXX, }, \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, XXX, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, XXX }, \ } -/*LAYOUT_7u_space +/*LAYOUT_65_iso_blocker_split_bs * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│k0D│k0E│k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ @@ -112,26 +140,26 @@ * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│k1D│ │k2E│ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ * │k30 │k31│k32│k33│k34│k35│k36│k37│k38│k39│k3A│k3B│ k3C │k3D│k3E│ - * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ - * │k40 │k41 │k42 │ k44 │k4A │ │k4C│k4D│k4E│ - * └────┴────┴────┴────────────────────────────┴─────┘ └───┴───┴───┘ + * ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │k40 │k41 │k42 │ k44 │k49 │k4A │ │k4C│k4D│k4E│ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT_7u_space( \ +#define LAYOUT_65_iso_blocker_split_bs( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2E, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ - k40, k41, k42, k44, k4A, k4C, k4D, k4E \ + k40, k41, k42, k44, k49, k4A, k4C, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, XXX, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ - { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, XXX, k4A, XXX, k4C, k4D, k4E, XXX }, \ + { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, k49, k4A, XXX, k4C, k4D, k4E, XXX }, \ } -/*LAYOUT_split_space_1 +/*LAYOUT_65_iso_blocker_tsangan_split_bs * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│k0D│k0E│k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ @@ -140,48 +168,48 @@ * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│k1D│ │k2E│ * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ * │k30 │k31│k32│k33│k34│k35│k36│k37│k38│k39│k3A│k3B│ k3C │k3D│k3E│ - * ├────┼───┴┬──┴─┬─┴───┴───┴┬──┴─┬─┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │k40 │k41 │k42 │k43 │K44 │ K46 │K49 │k4A │ │k4C│k4D│k4E│ - * └────┴────┴────┴──────────┴────┴────────┴────┴────┘ └───┴───┴───┘ + * ├────┴┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬─┬───┼───┼───┤ + * │k40 │k41│k42 │ k44 │k4A │ │k4C│k4D│k4E│ + * └─────┴───┴─────┴───────────────────────────┴─────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT_split_space_1( \ +#define LAYOUT_65_iso_blocker_tsangan_split_bs( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2D, k2E, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ - k40, k41, k42, K43, k44, K46, K49, k4A, k4C, k4D, k4E \ + k40, k41, k42, k44, k4A, k4C, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, XXX, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ - { k40, k41, k42, K43, k44, XXX, K46, XXX, XXX, XXX, k4A, XXX, k4C, k4D, k4E, XXX }, \ + { k40, k41, k42, XXX, k44, XXX, XXX, XXX, XXX, XXX, k4A, XXX, k4C, k4D, k4E, XXX }, \ } -/*LAYOUT_split_space_2 +/*LAYOUT_all * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ * │k00│k01│k02│k03│k04│k05│k06│k07│k08│k09│k0A│k0B│k0C│k0D│k0E│k0F│ * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ K2D │k1E│ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ ├───┤ - * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│k1D│ │k2E│ - * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┼───┤ + * │ k10 │k11│k12│k13│k14│k15│k16│k17│k18│k19│k1A│k1B│k1C│ k1D │k1E│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │ k20 │k21│k22│k23│k24│k25│k26│k27│k28│k29│k2A│k2B│ K2D │k2E│ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │k30 │k31│k32│k33│k34│k35│k36│k37│k38│k39│k3A│k3B│ k3C │k3D│k3E│ * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ * │k40 │k41 │k42 │k43 │K44 │ K46 │K49 │k4A │ │k4C│k4D│k4E│ * └────┴────┴────┴────────┴────┴──────────┴────┴────┘ └───┴───┴───┘ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ -#define LAYOUT_split_space_2( \ +#define LAYOUT_all( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k1D, k2E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ - k40, k41, k42, K43, k44, K46, K49, k4A, k4C, k4D, k4E \ + k40, k41, k42, K43, k44, K46, K49, k4A, k4C, k4D, k4E \ ) { \ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k2D, k1E, XXX, }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, XXX }, \ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E, XXX }, \ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, XXX }, \ { k40, k41, k42, K43, k44, XXX, K46, XXX, XXX, XXX, k4A, XXX, k4C, k4D, k4E, XXX }, \ diff --git a/keyboards/mokey/ginkgo65/info.json b/keyboards/mokey/ginkgo65/info.json index 116b3e057aa..080d97feeb0 100644 --- a/keyboards/mokey/ginkgo65/info.json +++ b/keyboards/mokey/ginkgo65/info.json @@ -1,469 +1,544 @@ { "keyboard_name": "ginkgo65", "url": "", - "maintainer": "mokey", + "maintainer": "rhmokey", + "layout_aliases": { + "LAYOUT": "LAYOUT_65_ansi_blocker" + }, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0e", "x":13, "y":0, "w":2}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k1d", "x":13.5, "y":1, "w":1.5}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k2d", "x":12.75, "y":2, "w":2.25}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":2.25}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15, "y":0}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k44", "x":3.75, "y":4, "w":6.25}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_iso":{ + "LAYOUT_65_ansi_blocker_split_bs": { "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0}, - {"label":"k0e", "x":14, "y":0}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k2d", "x":13.75, "y":1, "w":1.25}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k1d", "x":12.75, "y":2}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":2.25}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k44", "x":3.75, "y":4, "w":6.25}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_split_left_shift":{ + "LAYOUT_65_ansi_blocker_tsangan_split_bs": { "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0}, - {"label":"k0e", "x":14, "y":0}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k2d", "x":13.75, "y":1, "w":1.25}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k1d", "x":12.75, "y":2}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":1.25}, - {"label":"k31", "x":1.25, "y":3}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k44", "x":3.75, "y":4, "w":6.25}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"GUI", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"Fn", "x":11, "y":4, "w":1.5}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_7u_space":{ + "LAYOUT_65_iso_blocker":{ "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0}, - {"label":"k0e", "x":14, "y":0}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k2d", "x":13.75, "y":1, "w":1.25}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k1d", "x":12.75, "y":2}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":1.25}, - {"label":"k31", "x":1.25, "y":3}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, - {"label":"k40", "x":0, "y":4, "w":1.5}, - {"label":"k41", "x":1.5, "y":4,}, - {"label":"k42", "x":2.5, "y":4, "w":1.5}, - {"label":"k44", "x":4, "y":4, "w":7}, - {"label":"k49", "x":11, "y":4, "w":1.5}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_split_space_1":{ + "LAYOUT_65_iso_blocker_split_bs":{ "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0}, - {"label":"k0e", "x":14, "y":0}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k2d", "x":13.75, "y":1, "w":1.25}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k1d", "x":12.75, "y":2}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":1.25}, - {"label":"k31", "x":1.25, "y":3}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k43", "x":3.75, "y":4, "w":2.75}, - {"label":"k44", "x":6.5, "y":4, "w":1.25}, - {"label":"k46", "x":7.75, "y":4, "w":2.25}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} + ] + }, + "LAYOUT_65_iso_blocker_tsangan_split_bs":{ + "layout": [ + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2\"", "x":2, "y":0}, + {"label":"3\u00a3", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'@", "x":11.75, "y":2}, + {"label":"#~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, + + {"label":"Ctrl", "x":0, "y":4, "w":1.5}, + {"label":"GUI", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4, "w":1.5}, + {"label":"Space", "x":4, "y":4, "w":7}, + {"label":"Fn", "x":11, "y":4, "w":1.5}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] }, - "LAYOUT_split_space_2":{ + "LAYOUT_all":{ "layout": [ - {"label":"k00", "x":0, "y":0}, - {"label":"k01", "x":1, "y":0}, - {"label":"k02", "x":2, "y":0}, - {"label":"k03", "x":3, "y":0}, - {"label":"k04", "x":4, "y":0}, - {"label":"k05", "x":5, "y":0}, - {"label":"k06", "x":6, "y":0}, - {"label":"k07", "x":7, "y":0}, - {"label":"k08", "x":8, "y":0}, - {"label":"k09", "x":9, "y":0}, - {"label":"k0a", "x":10, "y":0}, - {"label":"k0b", "x":11, "y":0}, - {"label":"k0c", "x":12, "y":0}, - {"label":"k0d", "x":13, "y":0}, - {"label":"k0e", "x":14, "y":0}, - {"label":"k0f", "x":15, "y":0}, - - {"label":"k10", "x":0, "y":1, "w":1.5}, - {"label":"k11", "x":1.5, "y":1}, - {"label":"k12", "x":2.5, "y":1}, - {"label":"k13", "x":3.5, "y":1}, - {"label":"k14", "x":4.5, "y":1}, - {"label":"k15", "x":5.5, "y":1}, - {"label":"k16", "x":6.5, "y":1}, - {"label":"k17", "x":7.5, "y":1}, - {"label":"k18", "x":8.5, "y":1}, - {"label":"k19", "x":9.5, "y":1}, - {"label":"k1a", "x":10.5, "y":1}, - {"label":"k1b", "x":11.5, "y":1}, - {"label":"k1c", "x":12.5, "y":1}, - {"label":"k2d", "x":13.75, "y":1, "w":1.25}, - {"label":"k1e", "x":15, "y":1,}, - - {"label":"k20", "x":0, "y":2, "w":1.75}, - {"label":"k21", "x":1.75, "y":2}, - {"label":"k22", "x":2.75, "y":2}, - {"label":"k23", "x":3.75, "y":2}, - {"label":"k24", "x":4.75, "y":2}, - {"label":"k25", "x":5.75, "y":2}, - {"label":"k26", "x":6.75, "y":2}, - {"label":"k27", "x":7.75, "y":2}, - {"label":"k28", "x":8.75, "y":2}, - {"label":"k29", "x":9.75, "y":2}, - {"label":"k2a", "x":10.75, "y":2}, - {"label":"k2b", "x":11.75, "y":2}, - {"label":"k1d", "x":12.75, "y":2}, - {"label":"k2e", "x":15, "y":2}, - - {"label":"k30", "x":0, "y":3, "w":1.25}, - {"label":"k31", "x":1.25, "y":3}, - {"label":"k32", "x":2.25, "y":3}, - {"label":"k33", "x":3.25, "y":3}, - {"label":"k34", "x":4.25, "y":3}, - {"label":"k35", "x":5.25, "y":3}, - {"label":"k36", "x":6.25, "y":3}, - {"label":"k37", "x":7.25, "y":3}, - {"label":"k38", "x":8.25, "y":3}, - {"label":"k39", "x":9.25, "y":3}, - {"label":"k3a", "x":10.25, "y":3}, - {"label":"k3b", "x":11.25, "y":3}, - {"label":"k3c", "x":12.25, "y":3, "w":1.75}, - {"label":"k3d", "x":14, "y":3}, - {"label":"k3e", "x":15, "y":3}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + {"label":"Insert", "x":15, "y":0}, + + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, + {"label":"Delete", "x":15, "y":1}, + + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Page Up", "x":15, "y":2}, + + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"label":"\\|", "x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"label":"\u2191", "x":14, "y":3}, + {"label":"Page Down", "x":15, "y":3}, - {"label":"k40", "x":0, "y":4, "w":1.25}, - {"label":"k41", "x":1.25, "y":4, "w":1.25}, - {"label":"k42", "x":2.5, "y":4, "w":1.25}, - {"label":"k43", "x":3.75, "y":4, "w":2.25}, - {"label":"k44", "x":6, "y":4, "w":1.25}, - {"label":"k46", "x":7.25, "y":4, "w":2.75}, - {"label":"k49", "x":10, "y":4, "w":1.25}, - {"label":"k4a", "x":11.25, "y":4, "w":1.25}, - {"label":"k4c", "x":13, "y":4}, - {"label":"k4d", "x":14, "y":4}, - {"label":"k4e", "x":15, "y":4} + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":2.25}, + {"label":"Space", "x":6, "y":4, "w":1.25}, + {"label":"Space", "x":7.25, "y":4, "w":2.75}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Fn", "x":11.25, "y":4, "w":1.25}, + {"label":"\u2190", "x":13, "y":4}, + {"label":"\u2193", "x":14, "y":4}, + {"label":"\u2192", "x":15, "y":4} ] } } -} \ No newline at end of file +} diff --git a/keyboards/mokey/ginkgo65/keymaps/default/keymap.c b/keyboards/mokey/ginkgo65/keymaps/default/keymap.c index 0d411bc9d23..9ac7dc18ba9 100644 --- a/keyboards/mokey/ginkgo65/keymaps/default/keymap.c +++ b/keyboards/mokey/ginkgo65/keymaps/default/keymap.c @@ -32,12 +32,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ - LAYOUT( - /* 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, - KC_TAB, 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_DEL, - KC_CAPS, 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_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + KC_TAB, 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_DEL, + KC_CAPS, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), + + [1] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + }; diff --git a/keyboards/mokey/ginkgo65/keymaps/via/keymap.c b/keyboards/mokey/ginkgo65/keymaps/via/keymap.c index 90e7a8e9047..28fdc1a9b25 100644 --- a/keyboards/mokey/ginkgo65/keymaps/via/keymap.c +++ b/keyboards/mokey/ginkgo65/keymaps/via/keymap.c @@ -16,35 +16,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, - KC_TAB, 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_DEL, - KC_CAPS, 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_PGUP, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT + [0] = LAYOUT_65_ansi_blocker( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, + KC_TAB, 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_DEL, + KC_CAPS, 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_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, - BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______ + [1] = LAYOUT_65_ansi_blocker( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + BL_TOGG, BL_STEP, BL_DEC, BL_INC, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [2] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [3] = LAYOUT_65_ansi_blocker( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + }; diff --git a/keyboards/mokey/ginkgo65/rules.mk b/keyboards/mokey/ginkgo65/rules.mk index 4f1faaec800..807d606d832 100644 --- a/keyboards/mokey/ginkgo65/rules.mk +++ b/keyboards/mokey/ginkgo65/rules.mk @@ -19,3 +19,5 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs diff --git a/keyboards/mokey/mokey64/rules.mk b/keyboards/mokey/mokey64/rules.mk index a1818950958..22bcad10df1 100644 --- a/keyboards/mokey/mokey64/rules.mk +++ b/keyboards/mokey/mokey64/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mokey/xox70/config.h b/keyboards/mokey/xox70/config.h new file mode 100644 index 00000000000..f5c08c4480c --- /dev/null +++ b/keyboards/mokey/xox70/config.h @@ -0,0 +1,36 @@ +/* +Copyright 2021 Kyle McCreery +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 . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6653 +#define PRODUCT_ID 0x3370 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Mokey +#define PRODUCT XOX 70 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 18 + +#define MATRIX_ROW_PINS { F7, B7, F5, F1, B0 } +#define MATRIX_COL_PINS { F6, C7, F4, F5, F1, B6, D0, D2, D3, D1, D7, D4, D5, D6, B4, B5, C6, B7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 diff --git a/keyboards/mokey/xox70/info.json b/keyboards/mokey/xox70/info.json new file mode 100644 index 00000000000..95089f6fc38 --- /dev/null +++ b/keyboards/mokey/xox70/info.json @@ -0,0 +1,248 @@ +{ + "keyboard_name": "xox70", + "url": "", + "maintainer": "Mokey", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0e", "x":13, "y":0, "w":2}, + {"label":"k0f", "x":15.25, "y":0}, + {"label":"k0g", "x":16.25, "y":0}, + {"label":"k0h", "x":17.25, "y":0}, + + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k12", "x":1.5, "y":1}, + {"label":"k13", "x":2.5, "y":1}, + {"label":"k14", "x":3.5, "y":1}, + {"label":"k15", "x":4.5, "y":1}, + {"label":"k16", "x":5.5, "y":1}, + {"label":"k17", "x":6.5, "y":1}, + {"label":"k18", "x":7.5, "y":1}, + {"label":"k19", "x":8.5, "y":1}, + {"label":"k1a", "x":9.5, "y":1}, + {"label":"k1b", "x":10.5, "y":1}, + {"label":"k1c", "x":11.5, "y":1}, + {"label":"k1d", "x":12.5, "y":1}, + {"label":"k1e", "x":13.5, "y":1, "w":1.5}, + {"label":"k1f", "x":15.25, "y":1}, + {"label":"k1g", "x":16.25, "y":1}, + {"label":"k1h", "x":17.25, "y":1}, + + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "y":2}, + {"label":"k28", "x":7.75, "y":2}, + {"label":"k29", "x":8.75, "y":2}, + {"label":"k2a", "x":9.75, "y":2}, + {"label":"k2b", "x":10.75, "y":2}, + {"label":"k2c", "x":11.75, "y":2}, + {"label":"k2d", "x":12.75, "y":2, "w":2.25}, + + {"label":"k30", "x":0, "y":3, "w":2.25}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3d", "x":12.25, "y":3, "w":2.75}, + {"label":"k3g", "x":16.25, "y":3}, + + {"label":"k40", "x":0, "y":4, "w":1.25}, + {"label":"k41", "x":1.25, "y":4, "w":1.25}, + {"label":"k43", "x":2.5, "y":4, "w":1.25}, + {"label":"k46", "x":3.75, "y":4, "w":6.25}, + {"label":"k4a", "x":10, "y":4, "w":1.25}, + {"label":"k4b", "x":11.25, "y":4, "w":1.25}, + {"label":"k4d", "x":12.5, "y":4, "w":1.25}, + {"label":"k4e", "x":13.75, "y":4, "w":1.25}, + {"label":"k4f", "x":15.25, "y":4}, + {"label":"k4g", "x":16.25, "y":4}, + {"label":"k4h", "x":17.25, "y":4} + ] + }, + "LAYOUT_division_backspace":{ + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k0f", "x":15.25, "y":0}, + {"label":"k0g", "x":16.25, "y":0}, + {"label":"k0h", "x":17.25, "y":0}, + + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k12", "x":1.5, "y":1}, + {"label":"k13", "x":2.5, "y":1}, + {"label":"k14", "x":3.5, "y":1}, + {"label":"k15", "x":4.5, "y":1}, + {"label":"k16", "x":5.5, "y":1}, + {"label":"k17", "x":6.5, "y":1}, + {"label":"k18", "x":7.5, "y":1}, + {"label":"k19", "x":8.5, "y":1}, + {"label":"k1a", "x":9.5, "y":1}, + {"label":"k1b", "x":10.5, "y":1}, + {"label":"k1c", "x":11.5, "y":1}, + {"label":"k1d", "x":12.5, "y":1}, + {"label":"k1f", "x":15.25, "y":1}, + {"label":"k1g", "x":16.25, "y":1}, + {"label":"k1h", "x":17.25, "y":1}, + + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "y":2}, + {"label":"k28", "x":7.75, "y":2}, + {"label":"k29", "x":8.75, "y":2}, + {"label":"k2a", "x":9.75, "y":2}, + {"label":"k2b", "x":10.75, "y":2}, + {"label":"k2c", "x":11.75, "y":2}, + {"label":"k1e", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h": 2}, + + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3d", "x":12.25, "y":3, "w":1.75}, + {"label":"k3e", "x":14, "y":3}, + {"label":"k3g", "x":16.25, "y":3}, + + {"label":"k40", "x":0, "y":4, "w":1.5}, + {"label":"k41", "x":1.25, "y":4}, + {"label":"k43", "x":2.5, "y":4, "w":1.5}, + {"label":"k46", "x":4, "y":4, "w":7}, + {"label":"k4b", "x":11, "y":4, "w":1.5}, + {"label":"k4d", "x":12.5, "y":4}, + {"label":"k4e", "x":13.75, "y":4, "w":1.5}, + {"label":"k4f", "x":15.25, "y":4}, + {"label":"k4g", "x":16.25, "y":4}, + {"label":"k4h", "x":17.25, "y":4} + ] + }, + "LAYOUT_iso":{ + "layout": [ + {"label":"k00", "x":0, "y":0}, + {"label":"k01", "x":1, "y":0}, + {"label":"k02", "x":2, "y":0}, + {"label":"k03", "x":3, "y":0}, + {"label":"k04", "x":4, "y":0}, + {"label":"k05", "x":5, "y":0}, + {"label":"k06", "x":6, "y":0}, + {"label":"k07", "x":7, "y":0}, + {"label":"k08", "x":8, "y":0}, + {"label":"k09", "x":9, "y":0}, + {"label":"k0a", "x":10, "y":0}, + {"label":"k0b", "x":11, "y":0}, + {"label":"k0c", "x":12, "y":0}, + {"label":"k0d", "x":13, "y":0}, + {"label":"k0e", "x":14, "y":0}, + {"label":"k0f", "x":15.25, "y":0}, + {"label":"k0g", "x":16.25, "y":0}, + {"label":"k0h", "x":17.25, "y":0}, + + {"label":"k10", "x":0, "y":1, "w":1.5}, + {"label":"k12", "x":1.5, "y":1}, + {"label":"k13", "x":2.5, "y":1}, + {"label":"k14", "x":3.5, "y":1}, + {"label":"k15", "x":4.5, "y":1}, + {"label":"k16", "x":5.5, "y":1}, + {"label":"k17", "x":6.5, "y":1}, + {"label":"k18", "x":7.5, "y":1}, + {"label":"k19", "x":8.5, "y":1}, + {"label":"k1a", "x":9.5, "y":1}, + {"label":"k1b", "x":10.5, "y":1}, + {"label":"k1c", "x":11.5, "y":1}, + {"label":"k1d", "x":12.5, "y":1}, + {"label":"k1f", "x":15.25, "y":1}, + {"label":"k1g", "x":16.25, "y":1}, + {"label":"k1h", "x":17.25, "y":1}, + + {"label":"k20", "x":0, "y":2, "w":1.75}, + {"label":"k22", "x":1.75, "y":2}, + {"label":"k23", "x":2.75, "y":2}, + {"label":"k24", "x":3.75, "y":2}, + {"label":"k25", "x":4.75, "y":2}, + {"label":"k26", "x":5.75, "y":2}, + {"label":"k27", "x":6.75, "y":2}, + {"label":"k28", "x":7.75, "y":2}, + {"label":"k29", "x":8.75, "y":2}, + {"label":"k2a", "x":9.75, "y":2}, + {"label":"k2b", "x":10.75, "y":2}, + {"label":"k2c", "x":11.75, "y":2}, + {"label":"k1e", "x":12.75, "y":2}, + {"label":"k2d", "x":13.75, "y":1, "w":1.25, "h": 2}, + + {"label":"k30", "x":0, "y":3, "w":1.25}, + {"label":"k31", "x":1.25, "y":3}, + {"label":"k32", "x":2.25, "y":3}, + {"label":"k33", "x":3.25, "y":3}, + {"label":"k34", "x":4.25, "y":3}, + {"label":"k35", "x":5.25, "y":3}, + {"label":"k36", "x":6.25, "y":3}, + {"label":"k37", "x":7.25, "y":3}, + {"label":"k38", "x":8.25, "y":3}, + {"label":"k39", "x":9.25, "y":3}, + {"label":"k3a", "x":10.25, "y":3}, + {"label":"k3b", "x":11.25, "y":3}, + {"label":"k3d", "x":12.25, "y":3, "w":1.75}, + {"label":"k3e", "x":14, "y":3}, + {"label":"k3g", "x":16.25, "y":3}, + + {"label":"k40", "x":0, "y":4, "w":1.5}, + {"label":"k43", "x":2.5, "y":4, "w":1.5}, + {"label":"k44", "x":4, "y":4, "w":3}, + {"label":"k46", "x":7, "y":4}, + {"label":"k48", "x":8, "y":4, "w":3}, + {"label":"k4b", "x":11, "y":4, "w":1.5}, + {"label":"k4e", "x":13.5, "y":4, "w":1.5}, + {"label":"k4f", "x":15.25, "y":4}, + {"label":"k4g", "x":16.25, "y":4}, + {"label":"k4h", "x":17.25, "y":4} + ] + } + } +} diff --git a/keyboards/mokey/xox70/keymaps/default/keymap.c b/keyboards/mokey/xox70/keymaps/default/keymap.c new file mode 100644 index 00000000000..710acc04cb4 --- /dev/null +++ b/keyboards/mokey/xox70/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2021 Ocean + * 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 . + */ + +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INSERT, KC_HOME, KC_PGUP, + KC_TAB, 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_DELETE, KC_END, KC_PGDOWN, + KC_CAPS, 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, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_GRV, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/mokey/xox70/keymaps/via/keymap.c b/keyboards/mokey/xox70/keymaps/via/keymap.c new file mode 100644 index 00000000000..66e227e333c --- /dev/null +++ b/keyboards/mokey/xox70/keymaps/via/keymap.c @@ -0,0 +1,51 @@ +/* Copyright 2021 Ocean + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INSERT, KC_HOME, KC_PGUP, + KC_TAB, 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_DELETE, KC_END, KC_PGDOWN, + KC_CAPS, 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, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_GRV, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/mokey/xox70/keymaps/via/rules.mk b/keyboards/mokey/xox70/keymaps/via/rules.mk new file mode 100644 index 00000000000..036bd6d1c3e --- /dev/null +++ b/keyboards/mokey/xox70/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/mokey/xox70/readme.md b/keyboards/mokey/xox70/readme.md new file mode 100644 index 00000000000..fa4d6838e22 --- /dev/null +++ b/keyboards/mokey/xox70/readme.md @@ -0,0 +1,20 @@ +# xox70 PCB + +![xox70](https://raw.githubusercontent.com/rhmokey/123.github.io/main/2021/08/15/hello-world/XOX70.jpg) + +Support Atmega32u4 keyboard,With a variety of configurations + +* Keyboard Maintainer: [Mokey](https://github.com/rhmokey) + +## Bootloader +* **Physical reset button**: Short press the button on the back of the PCB to enter the Bootloader and flash the firmware + +Make example for this keyboard (after setting up your build environment): + + make mokey/xox70:default + +Flashing example for this keyboard: + + make mokey/xox70:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mokey/xox70/rules.mk b/keyboards/mokey/xox70/rules.mk new file mode 100644 index 00000000000..439452f1772 --- /dev/null +++ b/keyboards/mokey/xox70/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mokey/xox70/xox70.c b/keyboards/mokey/xox70/xox70.c new file mode 100644 index 00000000000..7c46b6a54a5 --- /dev/null +++ b/keyboards/mokey/xox70/xox70.c @@ -0,0 +1,15 @@ +/* Copyright 2021 Ocean + * 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 . + */ +#include "xox70.h" \ No newline at end of file diff --git a/keyboards/mokey/xox70/xox70.h b/keyboards/mokey/xox70/xox70.h new file mode 100644 index 00000000000..8c54e630c5f --- /dev/null +++ b/keyboards/mokey/xox70/xox70.h @@ -0,0 +1,65 @@ +/* Copyright 2021 Ocean + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +#define xxx KC_NO + +#define LAYOUT(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k0f, k0g, k0h, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3g, \ + k40, k41, k43, k46, k4a, k4b, k4d, k4e, k4f, k4g, k4h \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e, k0f, k0g, k0h }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, k1h }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO, KC_NO, KC_NO,KC_NO }, \ + { k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, KC_NO, KC_NO, k3g, KC_NO }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e, k4f, k4g, k4h } \ +} + +#define LAYOUT_division_backspace(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, k3g, \ + k40, k41, k43, k46, k4b, k4d, k4e, k4f, k4g, k4h \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, KC_NO }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, KC_NO, KC_NO, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e, KC_NO, k3g, KC_NO }, \ + { k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO,k4b, KC_NO, k4d, k4e, k4f, k4g, k4h } \ +} + +#define LAYOUT_iso(\ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, k3g, \ + k40, k43, k44, k46, k48, k4b, k4e, k4f, k4g, k4h \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, k0h }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1f, k1g, k1h, KC_NO }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k1e, k2d, KC_NO, KC_NO, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e, KC_NO, k3g, KC_NO }, \ + { k40, KC_NO, KC_NO, k43, k44, KC_NO, k46, KC_NO, k48, KC_NO, KC_NO, k4a, KC_NO, k4d, k4e, k4f, k4g, k4h } \ +} diff --git a/keyboards/molecule/rules.mk b/keyboards/molecule/rules.mk index 3efceb761b7..2e48304f769 100755 --- a/keyboards/molecule/rules.mk +++ b/keyboards/molecule/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/momoka_ergo/rules.mk b/keyboards/momoka_ergo/rules.mk index ce5e42d3788..613ac4cb94b 100644 --- a/keyboards/momoka_ergo/rules.mk +++ b/keyboards/momoka_ergo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/monstargear/xo87/rgb/config.h b/keyboards/monstargear/xo87/rgb/config.h index 5ed0ed445da..dabca04514d 100644 --- a/keyboards/monstargear/xo87/rgb/config.h +++ b/keyboards/monstargear/xo87/rgb/config.h @@ -43,6 +43,54 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGBLED_NUM 110 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define DEBOUNCE 5 #define LOCKING_SUPPORT_ENABLE diff --git a/keyboards/monstargear/xo87/rgb/rules.mk b/keyboards/monstargear/xo87/rgb/rules.mk index dcb663e8fd9..3833c1a46ed 100644 --- a/keyboards/monstargear/xo87/rgb/rules.mk +++ b/keyboards/monstargear/xo87/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/monstargear/xo87/solderable/rules.mk b/keyboards/monstargear/xo87/solderable/rules.mk index 02b1308063b..4c611248823 100644 --- a/keyboards/monstargear/xo87/solderable/rules.mk +++ b/keyboards/monstargear/xo87/solderable/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = lufa-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/montex/rules.mk b/keyboards/montex/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/montex/rules.mk +++ b/keyboards/montex/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/montsinger/rebound/rev1/rules.mk b/keyboards/montsinger/rebound/rev1/rules.mk index 605b89e3570..4e41713e2f2 100644 --- a/keyboards/montsinger/rebound/rev1/rules.mk +++ b/keyboards/montsinger/rebound/rev1/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/montsinger/rebound/rev2/rules.mk b/keyboards/montsinger/rebound/rev2/rules.mk index 163a56eac2c..ad3cbd0df1f 100644 --- a/keyboards/montsinger/rebound/rev2/rules.mk +++ b/keyboards/montsinger/rebound/rev2/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c index 887bffeb820..207f907f6d5 100644 --- a/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev3/keymaps/rossman360/keymap.c @@ -75,7 +75,7 @@ case _BASE: } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); @@ -107,6 +107,7 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/montsinger/rebound/rev3/rules.mk b/keyboards/montsinger/rebound/rev3/rules.mk index 163a56eac2c..ad3cbd0df1f 100644 --- a/keyboards/montsinger/rebound/rev3/rules.mk +++ b/keyboards/montsinger/rebound/rev3/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c index 1465372ec23..d49465eea9c 100644 --- a/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c +++ b/keyboards/montsinger/rebound/rev4/keymaps/rossman360/keymap.c @@ -84,7 +84,7 @@ case _DEL: } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR(""), false); @@ -116,6 +116,7 @@ void oled_task_user(void) { oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/montsinger/rebound/rev4/rules.mk b/keyboards/montsinger/rebound/rev4/rules.mk index 3d85724f511..6713705c5a9 100644 --- a/keyboards/montsinger/rebound/rev4/rules.mk +++ b/keyboards/montsinger/rebound/rev4/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/montsinger/rewind/rules.mk b/keyboards/montsinger/rewind/rules.mk index ac5cb99ad27..67621979401 100644 --- a/keyboards/montsinger/rewind/rules.mk +++ b/keyboards/montsinger/rewind/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = caterina -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/moonlander/config.h b/keyboards/moonlander/config.h index f2e5088a34a..1c6cbb5c63c 100644 --- a/keyboards/moonlander/config.h +++ b/keyboards/moonlander/config.h @@ -92,6 +92,54 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_KEYPRESSES #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define MUSIC_MAP diff --git a/keyboards/moonlander/keymaps/drashna/rules.mk b/keyboards/moonlander/keymaps/drashna/rules.mk index 0af16d6e179..2a6d20bed54 100644 --- a/keyboards/moonlander/keymaps/drashna/rules.mk +++ b/keyboards/moonlander/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite UNICODE_ENABLE = yes UNICODEMAP_ENABLE = no diff --git a/keyboards/moonlander/moonlander.c b/keyboards/moonlander/moonlander.c index 8688b9efa4f..3f9b3d40a47 100644 --- a/keyboards/moonlander/moonlander.c +++ b/keyboards/moonlander/moonlander.c @@ -203,7 +203,7 @@ layer_state_t layer_state_set_kb(layer_state_t state) { #ifdef RGB_MATRIX_ENABLE // clang-format off -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mountainblocks/mb17/rules.mk b/keyboards/mountainblocks/mb17/rules.mk index bd712c09820..74a7851e6c7 100644 --- a/keyboards/mountainblocks/mb17/rules.mk +++ b/keyboards/mountainblocks/mb17/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index c1180612ad0..7dcd4ac0243 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -27,7 +27,7 @@ # undef sendchar static int8_t capture_sendchar(uint8_t c) { // sendchar(c); - uart_putchar(c); + uart_write(c); return 0; } #endif diff --git a/keyboards/mschwingen/modelm/post_rules.mk b/keyboards/mschwingen/modelm/post_rules.mk new file mode 100644 index 00000000000..a1c2040f4c5 --- /dev/null +++ b/keyboards/mschwingen/modelm/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(UART_DEBUG)), yes) + OPT_DEFS += -DUART_DEBUG +endif diff --git a/keyboards/mschwingen/modelm/rules.mk b/keyboards/mschwingen/modelm/rules.mk index 11282805cf8..5e88410862a 100644 --- a/keyboards/mschwingen/modelm/rules.mk +++ b/keyboards/mschwingen/modelm/rules.mk @@ -35,8 +35,4 @@ OPT_DEFS += -DSLEEP_LED_ENABLE # we need our own sleep callbacks to turn of WS28 LTO_ENABLE = yes -ifeq ($(strip $(UART_DEBUG)), yes) - OPT_DEFS += -DUART_DEBUG -endif - DEFAULT_FOLDER = mschwingen/modelm/led_wired diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index 84e1cb507c0..a48d758e7f5 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -117,5 +116,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/mt40/mt40.h b/keyboards/mt40/mt40.h index c202d5f6c7f..dc0de22b287 100644 --- a/keyboards/mt40/mt40.h +++ b/keyboards/mt40/mt40.h @@ -13,31 +13,30 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MT40_H -#define MT40_H + +#pragma once #include "quantum.h" +#define XXX KC_NO // This a shortcut to help you visually see your layout. // The following is an example using the Planck MIT layout // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_planck_mit( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K37, K38, K39, K3A, K3B \ + k40, k31, k32, k33, k34, k35, k52, k5C, k6C, k62, k3A, k4E, \ + k30, k21, k22, k23, k24, k25, k53, k5D, k6D, k63, k2A, k2B, \ + k10, k11, k12, k13, k14, k15, k54, k5E, k6E, k64, k1A, k66, \ + k20, k00, k01, k02, k04, k05, k0B, k56, k58, k57, k59 \ ) { \ - { K31, K32, K33, KC_NO, K34, K35, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K37, KC_NO, KC_NO, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, KC_NO, KC_NO, KC_NO, KC_NO, K2A, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K30, K11, K12, K13, K14, K15, KC_NO, KC_NO, KC_NO, KC_NO, K1A, K1B, KC_NO, KC_NO, KC_NO }, \ - { K10, K01, K02, K03, K04, K05, KC_NO, KC_NO, KC_NO, KC_NO, K0A, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K00, 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, K0B }, \ - { KC_NO, KC_NO, K06, K16, K26, K35, K38, K3A, K39, K3B, KC_NO, KC_NO, K07, K17, K27 }, \ - { KC_NO, KC_NO, K09, K19, K29, KC_NO, K2B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K08, K18, K28 } \ + { k00, k01, k02, XXX, k04, k05, XXX, XXX, XXX, XXX, XXX, k0B, XXX, XXX, XXX }, \ + { k10, k11, k12, k13, k14, k15, XXX, XXX, XXX, XXX, k1A, XXX, XXX, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, XXX, XXX, XXX, XXX, k2A, k2B, XXX, XXX, XXX }, \ + { k30, k31, k32, k33, k34, k35, XXX, XXX, XXX, XXX, k3A, XXX, XXX, XXX, XXX }, \ + { k40, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4E }, \ + { XXX, XXX, k52, k53, k54, k05, k56, k57, k58, k59, XXX, XXX, k5C, k5D, k5E }, \ + { XXX, XXX, k62, k63, k64, XXX, k66, XXX, XXX, XXX, XXX, XXX, k6C, k6D, k6E } \ } #define LAYOUT LAYOUT_planck_mit - -#endif diff --git a/keyboards/mt40/rules.mk b/keyboards/mt40/rules.mk index 8df082b02ce..4c369aeccfd 100644 --- a/keyboards/mt40/rules.mk +++ b/keyboards/mt40/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mt64rgb/config.h b/keyboards/mt64rgb/config.h index 8574d723600..ea7659b4719 100644 --- a/keyboards/mt64rgb/config.h +++ b/keyboards/mt64rgb/config.h @@ -1,18 +1,18 @@ -/* Copyright 2020 MT - * - * 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 . - */ +/* Copyright 2020 MT + * + * 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 . + */ #pragma once #include "config_common.h" @@ -54,29 +54,60 @@ #define RGB_MATRIX_LED_PROCESS_LIMIT 20 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 - -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 64 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL - - -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + +#define DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 64 + + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +// # define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif diff --git a/keyboards/mt64rgb/mt64rgb.c b/keyboards/mt64rgb/mt64rgb.c index a0b8e8da71b..f0c444e8fa5 100644 --- a/keyboards/mt64rgb/mt64rgb.c +++ b/keyboards/mt64rgb/mt64rgb.c @@ -16,7 +16,7 @@ #include "mt64rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mt64rgb/rules.mk b/keyboards/mt64rgb/rules.mk index af7999fb520..668ce65eb98 100644 --- a/keyboards/mt64rgb/rules.mk +++ b/keyboards/mt64rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mt84/config.h b/keyboards/mt84/config.h index 66460a9fda6..bde8919ba7e 100644 --- a/keyboards/mt84/config.h +++ b/keyboards/mt84/config.h @@ -1,17 +1,17 @@ /* Copyright 2020 MT <704340378@qq.com> - * - * 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 . + * + * 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 . */ #pragma once @@ -56,40 +56,70 @@ #define DRIVER_ADDR_1 0b1010000 #define DRIVER_ADDR_2 0b1011111 - + #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 44 #define DRIVER_2_LED_TOTAL 40 #define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - - - #define DISABLE_RGB_MATRIX_ALPHAS_MODS - #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - #define DISABLE_RGB_MATRIX_BAND_SAT - #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT - #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT - #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS - #define DISABLE_RGB_MATRIX_TYPING_HEATMAP - #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + + // RGB Matrix Animation modes. Explicitly enabled + // For full list of effects, see: + // https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects + // # define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING + // # define ENABLE_RGB_MATRIX_BAND_SAT + // # define ENABLE_RGB_MATRIX_BAND_VAL + // # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + // # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + // # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + // # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON + // # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL + // enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined + // # define ENABLE_RGB_MATRIX_TYPING_HEATMAP + // # define ENABLE_RGB_MATRIX_DIGITAL_RAIN + // enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + // # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + // # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + // # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + // # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif #define RGB_DI_PIN B0 #ifdef RGB_DI_PIN -// define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_EFFECT_STATIC_GRADIENT -#define RGBLIGHT_EFFECT_RAINBOW_SWIRL -#define RGBLIGHT_EFFECT_BREATHING + // define RGBLIGHT_ANIMATIONS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_BREATHING # define RGBLED_NUM 18 # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 @@ -104,4 +134,3 @@ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - diff --git a/keyboards/mt84/mt84.c b/keyboards/mt84/mt84.c index 9b00aa635ef..e15a1ff9518 100644 --- a/keyboards/mt84/mt84.c +++ b/keyboards/mt84/mt84.c @@ -16,7 +16,7 @@ #include "mt84.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/mt84/rules.mk b/keyboards/mt84/rules.mk index 197fb9a3c1a..9a6a206000d 100644 --- a/keyboards/mt84/rules.mk +++ b/keyboards/mt84/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mt980/rules.mk b/keyboards/mt980/rules.mk index d5af1faeb27..c6039722efe 100644 --- a/keyboards/mt980/rules.mk +++ b/keyboards/mt980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mtbkeys/mtb60/hotswap/config.h b/keyboards/mtbkeys/mtb60/hotswap/config.h new file mode 100644 index 00000000000..6cfc3122438 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2021 MTBKeys + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MTBKeys +#define PRODUCT honeyboard60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pinout */ +#define MATRIX_ROW_PINS { D6, D7, B4, B5, D5 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, B7, B6, F7, C6, C7, F6, F4, F1, F0, F5, E6 } +#define UNUSED_PINS + +/* diode direction: COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Pin WS2812 RGB LEDs are connected to */ +#define RGB_DI_PIN D4 + +#ifdef RGB_DI_PIN +# define RGBLED_NUM 16 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* Turn RGB light off when the host goes to sleep */ +# define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_TWINKLE +# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL /* Set default RGB */ +#endif /* RGB_DI_PIN */ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mtbkeys/mtb60/hotswap/hotswap.c b/keyboards/mtbkeys/mtb60/hotswap/hotswap.c new file mode 100644 index 00000000000..f23de6af541 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/hotswap.c @@ -0,0 +1,17 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ + +#include "hotswap.h" diff --git a/keyboards/mtbkeys/mtb60/hotswap/hotswap.h b/keyboards/mtbkeys/mtb60/hotswap/hotswap.h new file mode 100644 index 00000000000..7dae44b5da3 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/hotswap.h @@ -0,0 +1,33 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, ke0, \ + k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, ke1, \ + k02, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, \ + k03, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kd3, \ + k04, k14, k24, k64, ka4, kb4, kd4, ke4 \ +) { \ + { k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, KC_NO, ke0 }, \ + { KC_NO, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, ke1 }, \ + { k02, KC_NO, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, KC_NO }, \ + { k03, KC_NO, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, KC_NO, kd3, KC_NO }, \ + { k04, k14, k24, KC_NO, KC_NO, KC_NO, k64, KC_NO, KC_NO, KC_NO, ka4, kb4, kd4, KC_NO, ke4 } \ +} diff --git a/keyboards/mtbkeys/mtb60/hotswap/info.json b/keyboards/mtbkeys/mtb60/hotswap/info.json new file mode 100644 index 00000000000..5718d705074 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/info.json @@ -0,0 +1,72 @@ +{ + "keyboard_name": "MTB60", + "url": "mtbkeys.com", + "maintainer": "MTBKeys", + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label": "Esc" , "x": 0, "y": 0 }, + {"label": "!" , "x": 1, "y": 0 }, + {"label": "@" , "x": 2, "y": 0 }, + {"label": "#" , "x": 3, "y": 0 }, + {"label": "$" , "x": 4, "y": 0 }, + {"label": "%" , "x": 5, "y": 0 }, + {"label": "^" , "x": 6, "y": 0 }, + {"label": "&" , "x": 7, "y": 0 }, + {"label": "*" , "x": 8, "y": 0 }, + {"label": "(" , "x": 9, "y": 0 }, + {"label": ")" , "x": 10, "y": 0 }, + {"label": "_" , "x": 11, "y": 0 }, + {"label": "+" , "x": 12, "y": 0 }, + {"label": "Back Space", "x": 13, "y": 0, "w": 2}, + {"label": "Tab", "x": 0 , "y": 1, "w": 1.5}, + {"label": "Q" , "x": 1.5, "y": 1 }, + {"label": "W" , "x": 2.5, "y": 1 }, + {"label": "E" , "x": 3.5, "y": 1 }, + {"label": "R" , "x": 4.5, "y": 1 }, + {"label": "T" , "x": 5.5, "y": 1 }, + {"label": "Y" , "x": 6.5, "y": 1 }, + {"label": "U" , "x": 7.5, "y": 1 }, + {"label": "I" , "x": 8.5, "y": 1 }, + {"label": "O" , "x": 9.5, "y": 1 }, + {"label": "P" , "x": 10.5, "y": 1 }, + {"label": "{" , "x": 11.5, "y": 1 }, + {"label": "}" , "x": 12.5, "y": 1 }, + {"label": "|" , "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "x": 0 , "y": 2, "w": 1.75}, + {"label": "A" , "x": 1.75, "y": 2 }, + {"label": "S" , "x": 2.75, "y": 2 }, + {"label": "D" , "x": 3.75, "y": 2 }, + {"label": "F" , "x": 4.75, "y": 2 }, + {"label": "G" , "x": 5.75, "y": 2 }, + {"label": "H" , "x": 6.75, "y": 2 }, + {"label": "J" , "x": 7.75, "y": 2 }, + {"label": "K" , "x": 8.75, "y": 2 }, + {"label": "L" , "x": 9.75, "y": 2 }, + {"label": ":" , "x": 10.75, "y": 2 }, + {"label": "\"" , "x": 11.75, "y": 2 }, + {"label": "Enter" , "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Left Shift" , "x": 0 , "y": 3, "w": 2.25}, + {"label": "Z" , "x": 2.25, "y": 3 }, + {"label": "X" , "x": 3.25, "y": 3 }, + {"label": "C" , "x": 4.25, "y": 3 }, + {"label": "V" , "x": 5.25, "y": 3 }, + {"label": "B" , "x": 6.25, "y": 3 }, + {"label": "N" , "x": 7.25, "y": 3 }, + {"label": "M" , "x": 8.25, "y": 3 }, + {"label": "<" , "x": 9.25, "y": 3 }, + {"label": ">" , "x": 10.25, "y": 3 }, + {"label": "?" , "x": 11.25, "y": 3 }, + {"label": "Right Shift", "x": 12.25, "y": 3, "w": 2.75}, + {"label": "Left Ctrl" , "x": 0 , "y": 4, "w": 1.25}, + {"label": "GUI" , "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Left Alt" , "x": 2.5 , "y": 4, "w": 1.25}, + {"label": "Space" , "x": 3.75, "y": 4, "w": 6.25}, + {"label": "Right Ctrl", "x": 10 , "y": 4, "w": 1.25}, + {"label": "GUI" , "x": 11.25, "y": 4, "w": 1.25}, + {"label": "MO(1)" , "x": 12.5 , "y": 4, "w": 1.25}, + {"label": "Right Ctrl", "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/mtbkeys/mtb60/hotswap/keymaps/default/keymap.c b/keyboards/mtbkeys/mtb60/hotswap/keymaps/default/keymap.c new file mode 100644 index 00000000000..648c8201f52 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, ///< Default Layer + _FN ///< Function Layer +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, 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_CAPS, 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, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RCTL + ), + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, RGB_TOG + ) +}; diff --git a/keyboards/mtbkeys/mtb60/hotswap/readme.md b/keyboards/mtbkeys/mtb60/hotswap/readme.md new file mode 100644 index 00000000000..7afa26bbd47 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/readme.md @@ -0,0 +1,26 @@ +# MTB60 (Hotswap Edition) + +## Details + +* Keyboard Maintainer: [MTBKeys](https://mtbkeys.com/) +* Hardware Supported: MTB60 PCB (Hotswap edition) +* Hardware Availability: [HB60 on MTBKeys Website](https://mtbkeys.com/) + +## Building Firmware + +Make example for this keyboard (after setting up your build environment): + + make mtbkeys/mtb60/hotswap:default + +Flashing example for this keyboard: + + make mtbkeys/mtb60/hotswap:default:flash + +## Bootloader + +Enter the bootloader in 2 ways: + +1. **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +2. **Physical reset button**: Briefly press the button on the back of the PCB + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mtbkeys/mtb60/hotswap/rules.mk b/keyboards/mtbkeys/mtb60/hotswap/rules.mk new file mode 100644 index 00000000000..02ae236709e --- /dev/null +++ b/keyboards/mtbkeys/mtb60/hotswap/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mtbkeys/mtb60/solder/config.h b/keyboards/mtbkeys/mtb60/solder/config.h new file mode 100644 index 00000000000..02037e83df3 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2021 MTBKeys + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER MTBKeys +#define PRODUCT MTB60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pinout */ +#define MATRIX_ROW_PINS { D0, D1, F4, F1, D2 } +#define MATRIX_COL_PINS { E6, F0, F5, F6, F7, D5, D3, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* diode direction: COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Pin WS2812 RGB LEDs are connected to */ +#define RGB_DI_PIN B0 + +#ifdef RGB_DI_PIN +# define RGBLED_NUM 16 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* Turn RGB light off when the host goes to sleep */ +# define RGBLIGHT_EFFECT_ALTERNATING +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_SNAKE +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_TWINKLE +# define RGBLIGHT_DEFAULT_MODE RGBLIGHT_MODE_RAINBOW_SWIRL /* Set default RGB */ +#endif /* RGB_DI_PIN */ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE + +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +#define BOOTMAGIC_LITE_ROW 0 +#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/mtbkeys/mtb60/solder/info.json b/keyboards/mtbkeys/mtb60/solder/info.json new file mode 100644 index 00000000000..e60d3eee2fe --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/info.json @@ -0,0 +1,75 @@ +{ + "keyboard_name": "MTB60", + "url": "mtbkeys.com", + "maintainer": "MTBKeys", + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label": "Esc" , "x": 0, "y": 0}, + {"label": "!" , "x": 1, "y": 0}, + {"label": "@" , "x": 2, "y": 0}, + {"label": "#" , "x": 3, "y": 0}, + {"label": "$" , "x": 4, "y": 0}, + {"label": "%" , "x": 5, "y": 0}, + {"label": "^" , "x": 6, "y": 0}, + {"label": "&" , "x": 7, "y": 0}, + {"label": "*" , "x": 8, "y": 0}, + {"label": "(" , "x": 9, "y": 0}, + {"label": ")" , "x": 10, "y": 0}, + {"label": "_" , "x": 11, "y": 0}, + {"label": "+" , "x": 12, "y": 0}, + {"label": "Back Space", "x": 13, "y": 0}, + {"label": "Delete" , "x": 14, "y": 0}, + {"label": "Tab", "x": 0 , "y": 1, "w": 1.5}, + {"label": "Q" , "x": 1.5, "y": 1 }, + {"label": "W" , "x": 2.5, "y": 1 }, + {"label": "E" , "x": 3.5, "y": 1 }, + {"label": "R" , "x": 4.5, "y": 1 }, + {"label": "T" , "x": 5.5, "y": 1 }, + {"label": "Y" , "x": 6.5, "y": 1 }, + {"label": "U" , "x": 7.5, "y": 1 }, + {"label": "I" , "x": 8.5, "y": 1 }, + {"label": "O" , "x": 9.5, "y": 1 }, + {"label": "P" , "x": 10.5, "y": 1 }, + {"label": "{" , "x": 11.5, "y": 1 }, + {"label": "}" , "x": 12.5, "y": 1 }, + {"label": "|" , "x": 13.5, "y": 1, "w": 1.5}, + {"label": "Caps Lock", "x": 0 , "y": 2, "w": 1.75}, + {"label": "A" , "x": 1.75, "y": 2 }, + {"label": "S" , "x": 2.75, "y": 2 }, + {"label": "D" , "x": 3.75, "y": 2 }, + {"label": "F" , "x": 4.75, "y": 2 }, + {"label": "G" , "x": 5.75, "y": 2 }, + {"label": "H" , "x": 6.75, "y": 2 }, + {"label": "J" , "x": 7.75, "y": 2 }, + {"label": "K" , "x": 8.75, "y": 2 }, + {"label": "L" , "x": 9.75, "y": 2 }, + {"label": ":" , "x": 10.75, "y": 2 }, + {"label": "\"" , "x": 11.75, "y": 2 }, + {"label": "Enter" , "x": 12.75, "y": 2, "w": 2.25}, + {"label": "Left Shift" , "x": 0 , "y": 3, "w": 2.25}, + {"label": "Z" , "x": 2.25, "y": 3 }, + {"label": "X" , "x": 3.25, "y": 3 }, + {"label": "C" , "x": 4.25, "y": 3 }, + {"label": "V" , "x": 5.25, "y": 3 }, + {"label": "B" , "x": 6.25, "y": 3 }, + {"label": "N" , "x": 7.25, "y": 3 }, + {"label": "M" , "x": 8.25, "y": 3 }, + {"label": "<" , "x": 9.25, "y": 3 }, + {"label": ">" , "x": 10.25, "y": 3 }, + {"label": "?" , "x": 11.25, "y": 3 }, + {"label": "Right Shift", "x": 12.25, "y": 3, "w": 2.75}, + {"label": "Left Ctrl" , "x": 0 , "y": 4, "w": 1.25}, + {"label": "GUI" , "x": 1.25, "y": 4, "w": 1.25}, + {"label": "Left Alt" , "x": 2.5 , "y": 4, "w": 1.25}, + {"label": "Space" , "x": 3.75, "y": 4, "w": 2.25}, + {"label": "Space" , "x": 6 , "y": 4, "w": 1.25}, + {"label": "Space" , "x": 7.25, "y": 4, "w": 2.75}, + {"label": "Right Ctrl", "x": 10 , "y": 4, "w": 1.25}, + {"label": "GUI" , "x": 11.25, "y": 4, "w": 1.25}, + {"label": "MO(1)" , "x": 12.5 , "y": 4, "w": 1.25}, + {"label": "Right Ctrl", "x": 13.75, "y": 4, "w": 1.25} + ] + } + } +} diff --git a/keyboards/mtbkeys/mtb60/solder/keymaps/default/keymap.c b/keyboards/mtbkeys/mtb60/solder/keymaps/default/keymap.c new file mode 100644 index 00000000000..6ed34b64325 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, + KC_TAB, 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_CAPS, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, MO(_FN), KC_RGUI, KC_RCTL + ), + [_FN] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/mtbkeys/mtb60/solder/readme.md b/keyboards/mtbkeys/mtb60/solder/readme.md new file mode 100644 index 00000000000..adaa94244fa --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/readme.md @@ -0,0 +1,26 @@ +# MTB60 (Solder Edition) + +## Details + +* Keyboard Maintainer: [MTBKeys](https://mtbkeys.com/) +* Hardware Supported: MTB60 PCB (Solder edition) +* Hardware Availability: [HB60 on MTBKeys Website](https://mtbkeys.com/) + +## Building Firmware + +Make example for this keyboard (after setting up your build environment): + + make mtbkeys/mtb60/solder:default + +Flashing example for this keyboard: + + make mtbkeys/mtb60/solder:default:flash + +## Bootloader + +Enter the bootloader in 2 ways: + +1. **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard +2. **Physical reset button**: Briefly press the button on the back of the PCB + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/mtbkeys/mtb60/solder/rules.mk b/keyboards/mtbkeys/mtb60/solder/rules.mk new file mode 100644 index 00000000000..33e17633756 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output diff --git a/keyboards/mtbkeys/mtb60/solder/solder.c b/keyboards/mtbkeys/mtb60/solder/solder.c new file mode 100644 index 00000000000..9bb7f2b98e4 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/solder.c @@ -0,0 +1,17 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ + +#include "solder.h" diff --git a/keyboards/mtbkeys/mtb60/solder/solder.h b/keyboards/mtbkeys/mtb60/solder/solder.h new file mode 100644 index 00000000000..31756e7af75 --- /dev/null +++ b/keyboards/mtbkeys/mtb60/solder/solder.h @@ -0,0 +1,33 @@ +/* Copyright 2021 MTBKeys + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, ke0, \ + k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, ke1, \ + k02, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, \ + k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kc3, kd3, ke3, \ + k04, k14, k34, k44, k64, k84, ka4, kb4, kc4, kd4, ke4 \ +) { \ + { k00, k10, k20, k30, k40, k50, k60, k70, k80, k90, ka0, kb0, kc0, kd0, ke0 }, \ + { KC_NO, k11, k21, k31, k41, k51, k61, k71, k81, k91, ka1, kb1, kc1, kd1, ke1 }, \ + { k02, KC_NO, k22, k32, k42, k52, k62, k72, k82, k92, ka2, kb2, kc2, kd2, KC_NO }, \ + { k03, k13, k23, k33, k43, k53, k63, k73, k83, k93, ka3, kb3, kc3, kd3, ke3 }, \ + { k04, k14, KC_NO, k34, k44, KC_NO, k64, KC_NO, k84, KC_NO, ka4, kb4, kc4, kd4, ke4 } \ +} diff --git a/keyboards/mwstudio/mw65_rgb/info.json b/keyboards/mwstudio/mw65_rgb/info.json index affcdadbc0f..870a848b856 100644 --- a/keyboards/mwstudio/mw65_rgb/info.json +++ b/keyboards/mwstudio/mw65_rgb/info.json @@ -1,25 +1,27 @@ { "keyboard_name": "MW65_RGB", "url": "", - "maintainer": "qmk", + "maintainer": "TW59420", "layouts": { "LAYOUT": { "layout": [ - {"label":"ESC", "x":0, "y":0}, - {"label":"1", "x":1, "y":0}, - {"label":"2", "x":2, "y":0}, - {"label":"3", "x":3, "y":0}, - {"label":"4", "x":4, "y":0}, - {"label":"5", "x":5, "y":0}, - {"label":"6", "x":6, "y":0}, - {"label":"7", "x":7, "y":0}, - {"label":"8", "x":8, "y":0}, - {"label":"9", "x":9, "y":0}, - {"label":"0", "x":10, "y":0}, - {"label":"-", "x":11, "y":0}, - {"label":"=", "x":12, "y":0}, + {"label":"Esc", "x":0, "y":0}, + {"label":"1!", "x":1, "y":0}, + {"label":"2@", "x":2, "y":0}, + {"label":"3#", "x":3, "y":0}, + {"label":"4$", "x":4, "y":0}, + {"label":"5%", "x":5, "y":0}, + {"label":"6^", "x":6, "y":0}, + {"label":"7&", "x":7, "y":0}, + {"label":"8*", "x":8, "y":0}, + {"label":"9(", "x":9, "y":0}, + {"label":"0)", "x":10, "y":0}, + {"label":"-_", "x":11, "y":0}, + {"label":"=+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, - {"label":"Delete", "x":15, "y":0}, + {"label":"Encoder CCW", "x":15, "y":0, "w":0.5}, + {"label":"Delete", "x":15.5, "y":0}, + {"label":"Encoder CW", "x":16.5, "y":0, "w":0.5}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, @@ -32,9 +34,9 @@ {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, - {"label":"[", "x":11.5, "y":1}, - {"label":"]", "x":12.5, "y":1}, - {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"[{", "x":11.5, "y":1}, + {"label":"]}", "x":12.5, "y":1}, + {"label":"\\|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, @@ -47,8 +49,8 @@ {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, - {"label":";", "x":10.75, "y":2}, - {"label":"'", "x":11.75, "y":2}, + {"label":";:", "x":10.75, "y":2}, + {"label":"'\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, @@ -60,9 +62,9 @@ {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, - {"label":",", "x":9.25, "y":3}, - {"label":".", "x":10.25, "y":3}, - {"label":"/", "x":11.25, "y":3}, + {"label":",<", "x":9.25, "y":3}, + {"label":".>", "x":10.25, "y":3}, + {"label":"/?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, @@ -70,9 +72,7 @@ {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, - {"label":"Vol-", "x":3.75, "y":4 }, - {"label":"Vol+", "x":4.75, "y":4 }, - {"x":5.75, "y":4, "w":4.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Fn", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c index 9466b0f2836..7028a223c5c 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/default/keymap.c @@ -18,34 +18,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, 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_PGUP, - KC_CAPS, 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_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU, + KC_TAB, 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_PGUP, + KC_CAPS, 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c index 6506433998e..78a17233e3a 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw65_rgb/keymaps/via/keymap.c @@ -29,35 +29,35 @@ user_config_t user_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, 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_PGUP, - KC_CAPS, 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_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_VOLD, KC_DEL, KC_VOLU, + KC_TAB, 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_PGUP, + KC_CAPS, 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, RGB_TOG, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, RGB_HUI, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, RGB_HUI, _______, RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER00, RGB_SAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER01, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, USER01, RGB_VAI, RGB_SAD, + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; diff --git a/keyboards/mwstudio/mw65_rgb/mw65_rgb.h b/keyboards/mwstudio/mw65_rgb/mw65_rgb.h index b491e324e28..fb769eda083 100644 --- a/keyboards/mwstudio/mw65_rgb/mw65_rgb.h +++ b/keyboards/mwstudio/mw65_rgb/mw65_rgb.h @@ -17,17 +17,33 @@ #include "quantum.h" +#define XXX KC_NO + +/* 44 ◯ 43 + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1E │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2E │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3E │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │46 │4A │4B │ │4C │4D │4E │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ - K400, K401, K402, K403, K404, K406, K410, K411, K412, K413, K414 \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K44, K0E, K43, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214 }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ - { K400, K401, K402, K403, K404, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414 }, \ - { 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 } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D, K2E }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, K44, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D, K4E }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } diff --git a/keyboards/mwstudio/mw75/config.h b/keyboards/mwstudio/mw75/config.h index 58fcdf2c7c0..28532766537 100644 --- a/keyboards/mwstudio/mw75/config.h +++ b/keyboards/mwstudio/mw75/config.h @@ -52,20 +52,50 @@ #define RGBLED_NUM 97 #define RGB_MATRIX_KEYPRESSES -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// #define DISABLE_RGB_MATRIX_BAND_SAT -// #define DISABLE_RGB_MATRIX_BAND_VAL -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/mwstudio/mw75/info.json b/keyboards/mwstudio/mw75/info.json index 0c53689865b..2eabde14959 100644 --- a/keyboards/mwstudio/mw75/info.json +++ b/keyboards/mwstudio/mw75/info.json @@ -1,7 +1,7 @@ { "keyboard_name": "MW75", "url": "", - "maintainer": "qmk", + "maintainer": "TW59420", "layouts": { "LAYOUT": { "layout": [ @@ -18,21 +18,23 @@ {"label":"F10", "x":11.5, "y":0}, {"label":"F11", "x":12.5, "y":0}, {"label":"F12", "x":13.5, "y":0}, - {"label":"DEL", "x":15, "y":0}, + {"label":"Encoder CCW", "x":15, "y":0, "w":0.5}, + {"label":"Encoder Click", "x":15.5, "y":0}, + {"label":"Encoder CW", "x":16.5, "y":0, "w":0.5}, - {"label":"`", "x":0, "y":1.5}, - {"label":"1", "x":1, "y":1.5}, - {"label":"2", "x":2, "y":1.5}, - {"label":"3", "x":3, "y":1.5}, - {"label":"4", "x":4, "y":1.5}, - {"label":"5", "x":5, "y":1.5}, - {"label":"6", "x":6, "y":1.5}, - {"label":"7", "x":7, "y":1.5}, - {"label":"8", "x":8, "y":1.5}, - {"label":"9", "x":9, "y":1.5}, - {"label":"0", "x":10, "y":1.5}, - {"label":"-", "x":11, "y":1.5}, - {"label":"=", "x":12, "y":1.5}, + {"label":"`~", "x":0, "y":1.5}, + {"label":"1!", "x":1, "y":1.5}, + {"label":"2@", "x":2, "y":1.5}, + {"label":"3#", "x":3, "y":1.5}, + {"label":"4$", "x":4, "y":1.5}, + {"label":"5%", "x":5, "y":1.5}, + {"label":"6^", "x":6, "y":1.5}, + {"label":"7&", "x":7, "y":1.5}, + {"label":"8*", "x":8, "y":1.5}, + {"label":"9(", "x":9, "y":1.5}, + {"label":"0)", "x":10, "y":1.5}, + {"label":"-_", "x":11, "y":1.5}, + {"label":"=+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Delete", "x":15, "y":1.5}, @@ -47,9 +49,9 @@ {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, - {"label":"[", "x":11.5, "y":2.5}, - {"label":"]", "x":12.5, "y":2.5}, - {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, + {"label":"[{", "x":11.5, "y":2.5}, + {"label":"]}", "x":12.5, "y":2.5}, + {"label":"\\|", "x":13.5, "y":2.5, "w":1.5}, {"label":"PgUp", "x":15, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, @@ -62,8 +64,8 @@ {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, - {"label":";", "x":10.75, "y":3.5}, - {"label":"'", "x":11.75, "y":3.5}, + {"label":";:", "x":10.75, "y":3.5}, + {"label":"'\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"PgDn", "x":15, "y":3.5}, @@ -75,9 +77,9 @@ {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, - {"label":",", "x":9.25, "y":4.5}, - {"label":".", "x":10.25, "y":4.5}, - {"label":"/", "x":11.25, "y":4.5}, + {"label":",<", "x":9.25, "y":4.5}, + {"label":".>", "x":10.25, "y":4.5}, + {"label":"/?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14, "y":4.5}, {"label":"End", "x":15, "y":4.5}, @@ -85,9 +87,7 @@ {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, - {"label":"Vol-", "x":3.75, "y":5.5 }, - {"label":"Vol+", "x":4.75, "y":5.5 }, - {"x":5.75, "y":5.5, "w":4.25}, + {"label":"Space", "x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.25}, {"label":"Fn", "x":11.25, "y":5.5, "w":1.25}, {"label":"\u2190", "x":13, "y":5.5}, diff --git a/keyboards/mwstudio/mw75/keymaps/default/keymap.c b/keyboards/mwstudio/mw75/keymaps/default/keymap.c index 44eb8d0c04a..12ac4ce74a4 100644 --- a/keyboards/mwstudio/mw75/keymaps/default/keymap.c +++ b/keyboards/mwstudio/mw75/keymaps/default/keymap.c @@ -19,39 +19,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, 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_PGUP, - KC_CAPS, 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_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, RGB_TOG, KC_VOLU, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, 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_PGUP, + KC_CAPS, 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + }; diff --git a/keyboards/mwstudio/mw75/keymaps/via/keymap.c b/keyboards/mwstudio/mw75/keymaps/via/keymap.c index 44eb8d0c04a..12ac4ce74a4 100644 --- a/keyboards/mwstudio/mw75/keymaps/via/keymap.c +++ b/keyboards/mwstudio/mw75/keymaps/via/keymap.c @@ -19,39 +19,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, - KC_TAB, 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_PGUP, - KC_CAPS, 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_PGDN, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_VOLU, KC_VOLD, KC_SPACE, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, RGB_TOG, KC_VOLU, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, 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_PGUP, + KC_CAPS, 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_PGDN, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT ), - [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, - _______, _______, _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI + [1] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, + RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_SAD, + _______, _______, _______, _______, RGB_MOD, _______, RGB_SPD, RGB_VAD, RGB_SPI ), - [2] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [3] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + }; diff --git a/keyboards/mwstudio/mw75/mw75.h b/keyboards/mwstudio/mw75/mw75.h index a322ed4a1b6..c6542fc57a2 100644 --- a/keyboards/mwstudio/mw75/mw75.h +++ b/keyboards/mwstudio/mw75/mw75.h @@ -18,19 +18,38 @@ #include "quantum.h" +#define XXX KC_NO + +/* 54 ◯ 53 + * ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┐ + * │01 │ │02 │03 │04 │05 │ │06 │07 │08 │09 │ │0A │0B │0C │0D │ │0E │ + * └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┘ + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1E │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2C │2D │2E │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │30 │31 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3D │3E │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │40 │42 │43 │44 │45 │46 │47 │48 │49 │4A │4B │4C │4D │4E │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │50 │51 │52 │56 │5A │5B │ │5C │5D │5E │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + #define LAYOUT( \ - K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014,\ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114,\ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214,\ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314,\ - K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414,\ - K500, K501, K502, K503, K504, K506, K510, K511, K512, K513, K514\ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K54, K0E, K53, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ + K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, \ + K50, K51, K52, K56, K5A, K5B, K5C, K5D, K5E \ ) { \ - { KC_NO, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 },\ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 },\ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 },\ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 },\ - { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 },\ - { K500, K501, K502, K503, K504, KC_NO, K506, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514 },\ - { 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 } \ + { XXX, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D, K3E }, \ + { K40, XXX, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E }, \ + { K50, K51, K52, K53, K54, XXX, K56, XXX, XXX, XXX, K5A, K5B, K5C, K5D, K5E }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \ } diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 8cb21569422..67f5b8fa276 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -87,5 +86,3 @@ along with this program. If not, see . * */ //#define FORCE_NKRO - -#endif diff --git a/keyboards/mxss/mxss.c b/keyboards/mxss/mxss.c index f591d39e678..21beee232ce 100644 --- a/keyboards/mxss/mxss.c +++ b/keyboards/mxss/mxss.c @@ -17,7 +17,7 @@ */ #include QMK_KEYBOARD_H -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "action_layer.h" #include "rgblight.h" #include "via.h" diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c index 3c4309f0702..f5e4613dfb2 100644 --- a/keyboards/mxss/mxss_frontled.c +++ b/keyboards/mxss/mxss_frontled.c @@ -17,7 +17,7 @@ */ #include "mxss_frontled.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "rgblight.h" #include "via.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic diff --git a/keyboards/mxss/rgblight.c b/keyboards/mxss/rgblight.c index d2d79815cd0..b2df351c55c 100644 --- a/keyboards/mxss/rgblight.c +++ b/keyboards/mxss/rgblight.c @@ -23,10 +23,6 @@ #ifdef EEPROM_ENABLE # include "eeprom.h" #endif -#ifdef STM32_EEPROM_ENABLE -# include -# include "eeprom_stm32.h" -#endif #include "wait.h" #include "progmem.h" #include "timer.h" diff --git a/keyboards/mxss/rules.mk b/keyboards/mxss/rules.mk index bd456fb5033..c5f10214173 100644 --- a/keyboards/mxss/rules.mk +++ b/keyboards/mxss/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/mysticworks/wyvern/rules.mk b/keyboards/mysticworks/wyvern/rules.mk index 37091d2466d..7831fa4b5b9 100644 --- a/keyboards/mysticworks/wyvern/rules.mk +++ b/keyboards/mysticworks/wyvern/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nack/config.h b/keyboards/nack/config.h index 26fe7edf2c0..82daf71037e 100644 --- a/keyboards/nack/config.h +++ b/keyboards/nack/config.h @@ -45,6 +45,55 @@ along with this program. If not, see . #define RGB_MATRIX_HUE_STEP 10 #define RGB_MATRIX_SAT_STEP 10 #define RGB_MATRIX_VAL_STEP 10 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif #ifdef AUDIO_ENABLE diff --git a/keyboards/naiping/np64/rules.mk b/keyboards/naiping/np64/rules.mk index ad2e51f96f1..d9ca1c51e7a 100644 --- a/keyboards/naiping/np64/rules.mk +++ b/keyboards/naiping/np64/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/naiping/nphhkb/rules.mk b/keyboards/naiping/nphhkb/rules.mk index d30df5c6142..e8ba2cfa8f0 100644 --- a/keyboards/naiping/nphhkb/rules.mk +++ b/keyboards/naiping/nphhkb/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/naiping/npminila/rules.mk b/keyboards/naiping/npminila/rules.mk index 945a795d044..8ac8fcb8be9 100644 --- a/keyboards/naiping/npminila/rules.mk +++ b/keyboards/naiping/npminila/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/naked60/rules.mk b/keyboards/naked60/rules.mk index 97e9fd10265..1cdec19aa32 100644 --- a/keyboards/naked60/rules.mk +++ b/keyboards/naked60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/namecard2x4/namecard2x4.h b/keyboards/namecard2x4/namecard2x4.h index f2e27a01027..f3f6992703a 100644 --- a/keyboards/namecard2x4/namecard2x4.h +++ b/keyboards/namecard2x4/namecard2x4.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef NAMECARD2X4_H -#define NAMECARD2X4_H + +#pragma once #include "quantum.h" @@ -24,10 +24,8 @@ // The second converts the arguments into a two-dimensional array #define LAYOUT( \ k00, k01, k02, k03, \ - k10, k11, k12, k13 \ + k10, k11, k12, k13 \ ) { \ { k00, k01, k02, k03 }, \ - { k10, k11, k12, k13 }, \ + { k10, k11, k12, k13 } \ } - -#endif diff --git a/keyboards/nebula12/rules.mk b/keyboards/nebula12/rules.mk index f336ee1a28b..f75c73dd6dc 100755 --- a/keyboards/nebula12/rules.mk +++ b/keyboards/nebula12/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nebula68/rules.mk b/keyboards/nebula68/rules.mk index 041753e86eb..99944879456 100755 --- a/keyboards/nebula68/rules.mk +++ b/keyboards/nebula68/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/neito/rules.mk b/keyboards/neito/rules.mk index ab14f2b9c5f..6d73c173322 100644 --- a/keyboards/neito/rules.mk +++ b/keyboards/neito/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nek_type_a/mcp23017.h b/keyboards/nek_type_a/mcp23017.h index 41c747beab2..df1a305571a 100644 --- a/keyboards/nek_type_a/mcp23017.h +++ b/keyboards/nek_type_a/mcp23017.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef MAP23017_H -#define MAP23017_H + +#pragma once #define EXPANDER_ADDR 0x27 #define I2C_TIMEOUT 200 // milliseconds @@ -67,5 +67,3 @@ void expander_init(void); void expander_select(uint8_t pin); void expander_unselect(uint8_t pin); void expander_unselect_all(void); - -#endif \ No newline at end of file diff --git a/keyboards/nek_type_a/nek_type_a.h b/keyboards/nek_type_a/nek_type_a.h index 9bf6028cb99..78f019c0fd6 100644 --- a/keyboards/nek_type_a/nek_type_a.h +++ b/keyboards/nek_type_a/nek_type_a.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef NEK_TYPE_A_H -#define NEK_TYPE_A_H + +#pragma once #include "quantum.h" #include @@ -39,20 +39,20 @@ extern bool i2c_initialized; void init_expander(void); +#define XXX KC_NO + #define LAYOUT( \ L12, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B, \ L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, R28, R29, R2A, R2B, \ L31, L32, L33, L34, L35, L36, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B, \ - L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ - L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ - L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ -) \ -{ \ - { KC_NO, L12, KC_NO, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ - { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, KC_NO, R28, R29, R2A, R2B }, \ - { L31, L32, L33, L34, L35, L36, KC_NO, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ - { L41, L42, L43, L44, L45, L46, KC_NO, R41, R42, R43, R44, R45, R46, KC_NO, R48, KC_NO, KC_NO, KC_NO }, \ - { L51, L52, L53, L54, L55, L56, KC_NO, R51, R52, R53, R54, R55, KC_NO, KC_NO, R58, KC_NO, R5A, KC_NO }, \ - { L61, L62, L63, KC_NO, L65, KC_NO, KC_NO, R61, KC_NO, R63, KC_NO, R65, R66, KC_NO, R68, R69, R6A, R6B }, \ + L41, L42, L43, L44, L45, L46, R41, R42, R43, R44, R45, R46, R48, \ + L51, L52, L53, L54, L55, L56, R51, R52, R53, R54, R55, R58, R5A, \ + L61, L62, L63, L65, R61, R63, R65, R66, R68, R69, R6A, R6B \ +) { \ + { XXX, L12, XXX, L14, L15, L16, L17, R11, R12, R13, R14, R15, R16, R17, R18, R19, R1A, R1B }, \ + { L21, L22, L23, L24, L25, L26, L27, R21, R22, R23, R24, R25, R26, XXX, R28, R29, R2A, R2B }, \ + { L31, L32, L33, L34, L35, L36, XXX, R31, R32, R33, R34, R35, R36, R37, R38, R39, R3A, R3B }, \ + { L41, L42, L43, L44, L45, L46, XXX, R41, R42, R43, R44, R45, R46, XXX, R48, XXX, XXX, XXX }, \ + { L51, L52, L53, L54, L55, L56, XXX, R51, R52, R53, R54, R55, XXX, XXX, R58, XXX, R5A, XXX }, \ + { L61, L62, L63, XXX, L65, XXX, XXX, R61, XXX, R63, XXX, R65, R66, XXX, R68, R69, R6A, R6B } \ } -#endif diff --git a/keyboards/nek_type_a/rules.mk b/keyboards/nek_type_a/rules.mk index 55baa97712b..311f5a77e2d 100644 --- a/keyboards/nek_type_a/rules.mk +++ b/keyboards/nek_type_a/rules.mk @@ -18,10 +18,10 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output CUSTOM_MATRIX = yes DEBUG_ENABLE = yes -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE SRC += matrix.c mcp23017.c diff --git a/keyboards/nemui/rules.mk b/keyboards/nemui/rules.mk index 17aa543022b..f68afca696c 100644 --- a/keyboards/nemui/rules.mk +++ b/keyboards/nemui/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/neokeys/g67/hotswap/rules.mk b/keyboards/neokeys/g67/hotswap/rules.mk index d58ff8f0637..bf105353e17 100644 --- a/keyboards/neokeys/g67/hotswap/rules.mk +++ b/keyboards/neokeys/g67/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/neokeys/g67/soldered/rules.mk b/keyboards/neokeys/g67/soldered/rules.mk index 20d9fc90721..8736f1580d8 100644 --- a/keyboards/neokeys/g67/soldered/rules.mk +++ b/keyboards/neokeys/g67/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/neopad/rev1/rules.mk b/keyboards/neopad/rev1/rules.mk index f5252179f6e..6302e98d3e7 100755 --- a/keyboards/neopad/rev1/rules.mk +++ b/keyboards/neopad/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/neson_design/n6/config.h b/keyboards/neson_design/n6/config.h index d3b49becb32..4a9d3c56c69 100644 --- a/keyboards/neson_design/n6/config.h +++ b/keyboards/neson_design/n6/config.h @@ -59,9 +59,8 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#define DRIVER_1_LED_TOTAL 32 #define DRIVER_ADDR_1 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +#define DRIVER_LED_TOTAL 32 #define CAPS_PIN F5 diff --git a/keyboards/neson_design/n6/n6.c b/keyboards/neson_design/n6/n6.c index 15f14d7e32f..e99467fa0c7 100644 --- a/keyboards/neson_design/n6/n6.c +++ b/keyboards/neson_design/n6/n6.c @@ -187,7 +187,7 @@ static void self_testing(void) update_ticks(); } -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/neson_design/n6/rules.mk b/keyboards/neson_design/n6/rules.mk index d7dde7ad156..6e14e0a32c5 100644 --- a/keyboards/neson_design/n6/rules.mk +++ b/keyboards/neson_design/n6/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/newgame40/newgame40.h b/keyboards/newgame40/newgame40.h index 6044f376574..e6146e4f143 100644 --- a/keyboards/newgame40/newgame40.h +++ b/keyboards/newgame40/newgame40.h @@ -1,19 +1,15 @@ -#ifndef NEWGAME40_H -#define NEWGAME40_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x10( \ - k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, \ - k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, \ - k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, \ - k401, k402, k403, k404, k405, k406, k407, k408, k409, k410 \ -) \ -{ \ - {k101, k102, k103, k104, k105, k106, k107, k108, k109, k110}, \ - {k201, k202, k203, k204, k205, k206, k207, k208, k209, k210}, \ - {k301, k302, k303, k304, k305, k306, k307, k308, k309, k310}, \ - {k401, k402, k403, k404, k405, k406, k407, k408, k409, k410} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \ } - -#endif diff --git a/keyboards/newgame40/post_rules.mk b/keyboards/newgame40/post_rules.mk new file mode 100644 index 00000000000..68229fe12b9 --- /dev/null +++ b/keyboards/newgame40/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif diff --git a/keyboards/newgame40/rules.mk b/keyboards/newgame40/rules.mk index 28039b7e577..7cbe09e69e7 100644 --- a/keyboards/newgame40/rules.mk +++ b/keyboards/newgame40/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -20,10 +20,6 @@ UNICODE_ENABLE = yes # Unicode RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. IOS_DEVICE_ENABLE = no # connect to IOS Device - ifeq ($(strip $(IOS_DEVICE_ENABLE )), yes) - OPT_DEFS += -DIOS_DEVICE_ENABLE - endif - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/nibiria/stream15/rules.mk b/keyboards/nibiria/stream15/rules.mk index 627f2f6ff2b..7bb517154d7 100644 --- a/keyboards/nibiria/stream15/rules.mk +++ b/keyboards/nibiria/stream15/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightingale_studios/hailey/rules.mk b/keyboards/nightingale_studios/hailey/rules.mk index 5a6f089b39a..d430bd9318f 100644 --- a/keyboards/nightingale_studios/hailey/rules.mk +++ b/keyboards/nightingale_studios/hailey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/adellein/rules.mk b/keyboards/nightly_boards/adellein/rules.mk index bc1b62e2cd4..c3e7be7b86c 100644 --- a/keyboards/nightly_boards/adellein/rules.mk +++ b/keyboards/nightly_boards/adellein/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/alter/rev1/rules.mk b/keyboards/nightly_boards/alter/rev1/rules.mk index e303da2db7a..550efe28111 100644 --- a/keyboards/nightly_boards/alter/rev1/rules.mk +++ b/keyboards/nightly_boards/alter/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n2/rules.mk b/keyboards/nightly_boards/n2/rules.mk index 0b052e33124..98872ee082e 100644 --- a/keyboards/nightly_boards/n2/rules.mk +++ b/keyboards/nightly_boards/n2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n40_o/rules.mk b/keyboards/nightly_boards/n40_o/rules.mk index e4d99b77dfc..4d3958202ca 100644 --- a/keyboards/nightly_boards/n40_o/rules.mk +++ b/keyboards/nightly_boards/n40_o/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n60_s/rules.mk b/keyboards/nightly_boards/n60_s/rules.mk index 92ed117f8b4..d7e8e4b0a66 100644 --- a/keyboards/nightly_boards/n60_s/rules.mk +++ b/keyboards/nightly_boards/n60_s/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n87/rules.mk b/keyboards/nightly_boards/n87/rules.mk index d077d56b4a5..44a9dbc15f7 100644 --- a/keyboards/nightly_boards/n87/rules.mk +++ b/keyboards/nightly_boards/n87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/n9/rules.mk b/keyboards/nightly_boards/n9/rules.mk index 6e92f6cb323..14b73e2ce96 100644 --- a/keyboards/nightly_boards/n9/rules.mk +++ b/keyboards/nightly_boards/n9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/octopad/rules.mk b/keyboards/nightly_boards/octopad/rules.mk index 283472fce34..f4e4d755916 100644 --- a/keyboards/nightly_boards/octopad/rules.mk +++ b/keyboards/nightly_boards/octopad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightly_boards/ph_arisu/rules.mk b/keyboards/nightly_boards/ph_arisu/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/nightly_boards/ph_arisu/rules.mk +++ b/keyboards/nightly_boards/ph_arisu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nightmare/rules.mk b/keyboards/nightmare/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/nightmare/rules.mk +++ b/keyboards/nightmare/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/nimrod/rules.mk b/keyboards/nimrod/rules.mk index d9d724403b8..1b29312ff40 100644 --- a/keyboards/nimrod/rules.mk +++ b/keyboards/nimrod/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nix_studio/oxalys80/rules.mk b/keyboards/nix_studio/oxalys80/rules.mk index 998e0ad73df..b30d9f33014 100644 --- a/keyboards/nix_studio/oxalys80/rules.mk +++ b/keyboards/nix_studio/oxalys80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nk1/rules.mk b/keyboards/nk1/rules.mk index ef5045c1582..98e1ade7904 100644 --- a/keyboards/nk1/rules.mk +++ b/keyboards/nk1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nk65/rules.mk b/keyboards/nk65/rules.mk index 56e222be1e9..fcb2fca0e84 100755 --- a/keyboards/nk65/rules.mk +++ b/keyboards/nk65/rules.mk @@ -14,7 +14,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # comment out to disable the options. # BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nk87/rules.mk b/keyboards/nk87/rules.mk index 4eae4bf99a4..4018d3cf176 100755 --- a/keyboards/nk87/rules.mk +++ b/keyboards/nk87/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nknl7en/rules.mk b/keyboards/nknl7en/rules.mk index b32cbc2f64c..9bdc73b7615 100644 --- a/keyboards/nknl7en/rules.mk +++ b/keyboards/nknl7en/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nknl7jp/rules.mk b/keyboards/nknl7jp/rules.mk index b32cbc2f64c..9bdc73b7615 100644 --- a/keyboards/nknl7jp/rules.mk +++ b/keyboards/nknl7jp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nomu30/rev1/rules.mk b/keyboards/nomu30/rev1/rules.mk index f7d33ff70a6..da812eb7d0b 100644 --- a/keyboards/nomu30/rev1/rules.mk +++ b/keyboards/nomu30/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nomu30/rev2/rules.mk b/keyboards/nomu30/rev2/rules.mk index 8e2312c7d6a..167188e2bd9 100644 --- a/keyboards/nomu30/rev2/rules.mk +++ b/keyboards/nomu30/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nopunin10did/jabberwocky/rules.mk b/keyboards/nopunin10did/jabberwocky/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/nopunin10did/jabberwocky/rules.mk +++ b/keyboards/nopunin10did/jabberwocky/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nopunin10did/railroad/rev0/rules.mk b/keyboards/nopunin10did/railroad/rev0/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/nopunin10did/railroad/rev0/rules.mk +++ b/keyboards/nopunin10did/railroad/rev0/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/220/rules.mk b/keyboards/noxary/220/rules.mk index 04660de94a2..26f737d666a 100644 --- a/keyboards/noxary/220/rules.mk +++ b/keyboards/noxary/220/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/noxary/260/rules.mk b/keyboards/noxary/260/rules.mk index f3c72a4c408..3984ce05283 100644 --- a/keyboards/noxary/260/rules.mk +++ b/keyboards/noxary/260/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/noxary/268/rules.mk b/keyboards/noxary/268/rules.mk index 6785f2fb501..0b23d7cb966 100644 --- a/keyboards/noxary/268/rules.mk +++ b/keyboards/noxary/268/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/noxary/268_2/rules.mk b/keyboards/noxary/268_2/rules.mk index 4236ca3806b..6fcd895aa6e 100644 --- a/keyboards/noxary/268_2/rules.mk +++ b/keyboards/noxary/268_2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/268_2_rgb/rules.mk b/keyboards/noxary/268_2_rgb/rules.mk index c1677dcd9ed..4d48dda2cf0 100644 --- a/keyboards/noxary/268_2_rgb/rules.mk +++ b/keyboards/noxary/268_2_rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/280/rules.mk b/keyboards/noxary/280/rules.mk index 6785f2fb501..0b23d7cb966 100644 --- a/keyboards/noxary/280/rules.mk +++ b/keyboards/noxary/280/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/noxary/378/rules.mk b/keyboards/noxary/378/rules.mk index fd9a5c3af05..b40095525f6 100644 --- a/keyboards/noxary/378/rules.mk +++ b/keyboards/noxary/378/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/vulcan/rules.mk b/keyboards/noxary/vulcan/rules.mk index dbdb94b18fe..739557beb61 100644 --- a/keyboards/noxary/vulcan/rules.mk +++ b/keyboards/noxary/vulcan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/x268/rules.mk b/keyboards/noxary/x268/rules.mk index fcc43a2f73a..1709fdacac4 100644 --- a/keyboards/noxary/x268/rules.mk +++ b/keyboards/noxary/x268/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/noxary/x268/x268.h b/keyboards/noxary/x268/x268.h index 9961b7dfdb1..d2f63dc919e 100644 --- a/keyboards/noxary/x268/x268.h +++ b/keyboards/noxary/x268/x268.h @@ -13,23 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef X268_H -#define X268_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \ - K400, K401, K402, K406, K409, K410, K411, K412, K414, K415 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, \ + k40, k41, k42, k46, k49, k4A, k4B, k4C, k4E, k4F \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, K411, K412, KC_NO, K414, K415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, XXX, k3E, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, k4A, k4B, k4C, XXX, k4E, k4F } \ } - -#endif diff --git a/keyboards/np12/rules.mk b/keyboards/np12/rules.mk index 7565bca8608..786af209df3 100644 --- a/keyboards/np12/rules.mk +++ b/keyboards/np12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/nullbitsco/common/remote_kb.c b/keyboards/nullbitsco/common/remote_kb.c index 89cbf9a92a9..4dcc9f46162 100644 --- a/keyboards/nullbitsco/common/remote_kb.c +++ b/keyboards/nullbitsco/common/remote_kb.c @@ -63,9 +63,7 @@ static void send_msg(uint16_t keycode, bool pressed) { msg[IDX_PRESSED] = pressed; msg[IDX_CHECKSUM] = chksum8(msg, UART_MSG_LEN-1); - for (int i=0; i= 3000) { set_oled_mode(OLED_MODE_IDLE); } render_frame(); + return false; } #endif diff --git a/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c b/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c index d628a976fb2..e549f22a836 100644 --- a/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c +++ b/keyboards/nullbitsco/nibble/keymaps/snailmap/keymap.c @@ -106,73 +106,73 @@ static void write_pixel(int x, int y, bool onoff) { static void render_background(void) { if (oled_horizontal) { static const char PROGMEM oled_keymap_horizontal[] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, - 0x84, 0x80, 0x80, 0x80, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, - 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, - 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, - 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, - 0x80, 0x04, 0x04, 0x04, 0x04, 0x84, 0x84, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, - 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, - 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, - 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, - 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, + 0x84, 0x80, 0x80, 0x80, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, + 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, + 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, + 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, 0x80, 0x04, 0x00, 0x00, 0x00, + 0x80, 0x04, 0x04, 0x04, 0x04, 0x84, 0x84, 0x84, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, + 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; oled_write_raw_P(oled_keymap_horizontal, sizeof(oled_keymap_horizontal)); } else { static const char PROGMEM oled_keymap_vertical[] = { - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, - 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, - 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, - 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, - 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, - 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, - 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, - 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x87, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, + 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, + 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, + 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; oled_write_raw_P(oled_keymap_vertical, sizeof(oled_keymap_vertical)); @@ -257,7 +257,7 @@ static void render_keymap(uint8_t key_row, uint8_t key_col, bool onoff) { int top = keymap_coords[key_row][key_col][1] + keymap_template[1]; int right = left + length - 1; int bottom = top + 4; - + // Special case 1 - Draw enter key on ISO layout, return if ((ansi_layout == false) && (key_row == 2) && (key_col == 14)) { for (int i = 0; i < 10; i++) { @@ -427,7 +427,7 @@ static void render_wpm_graph(int current_wpm) { } // Call OLED functions -void oled_task_user(void) { +bool oled_task_user(void) { // Draw OLED keyboard, prevent redraw if (first_loop) { render_background(); @@ -456,6 +456,7 @@ void oled_task_user(void) { render_wpm_graph(current_wpm); timer = timer_read(); } + return false; } #endif @@ -463,7 +464,7 @@ void oled_task_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Forwards keystrokes from an external input device over UART/TRRS process_record_remote_kb(keycode, record); - + #ifdef OLED_ENABLE // Toggle pixels surrounding key render_keymap(record->event.key.row, record->event.key.col, record->event.pressed); @@ -472,7 +473,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -// Rotary encoder - RGB and OLED settings +// Rotary encoder - RGB and OLED settings void change_RGB(bool clockwise) { // While on any layer except default: // Rotary = RGB Mode bool shift = get_mods() & MOD_MASK_SHIFT; // Rotary + Shift = OLED Brightness @@ -539,4 +540,4 @@ void matrix_init_user(void) { // Scan and parse keystrokes from remote keyboard, if connected void matrix_scan_user(void) { matrix_scan_remote_kb(); -} \ No newline at end of file +} diff --git a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c index 109da78ad6f..b1c9282253d 100644 --- a/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c +++ b/keyboards/nullbitsco/scramble/keymaps/oled/keymap.c @@ -67,8 +67,9 @@ static void render_logo(void) { oled_write_raw_P(nullbits_logo, sizeof(nullbits_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); + return false; } #endif diff --git a/keyboards/numatreus/post_rules.mk b/keyboards/numatreus/post_rules.mk new file mode 100644 index 00000000000..1f49875d0fe --- /dev/null +++ b/keyboards/numatreus/post_rules.mk @@ -0,0 +1,3 @@ +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DLED_ANIMATIONS +endif diff --git a/keyboards/numatreus/rules.mk b/keyboards/numatreus/rules.mk index ce93d2ef340..8a1b3979f85 100644 --- a/keyboards/numatreus/rules.mk +++ b/keyboards/numatreus/rules.mk @@ -18,9 +18,5 @@ UNICODE_ENABLE = yes # Unicode RGBLIGHT_ENABLE = no LED_ANIMATIONS = no -ifeq ($(strip $(LED_ANIMATIONS)), yes) - OPT_DEFS += -DLED_ANIMATIONS -endif - # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/ocean/gin_v2/rules.mk b/keyboards/ocean/gin_v2/rules.mk index ef357c09e8b..9578124554c 100644 --- a/keyboards/ocean/gin_v2/rules.mk +++ b/keyboards/ocean/gin_v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ocean/slamz/rules.mk b/keyboards/ocean/slamz/rules.mk index ef357c09e8b..9578124554c 100644 --- a/keyboards/ocean/slamz/rules.mk +++ b/keyboards/ocean/slamz/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ocean/stealth/rules.mk b/keyboards/ocean/stealth/rules.mk index a5b7ca97995..e6f23c3ee3c 100644 --- a/keyboards/ocean/stealth/rules.mk +++ b/keyboards/ocean/stealth/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ocean/wang_ergo/info.json b/keyboards/ocean/wang_ergo/info.json index 7853de6a44a..5ade58c54c7 100644 --- a/keyboards/ocean/wang_ergo/info.json +++ b/keyboards/ocean/wang_ergo/info.json @@ -1,10 +1,114 @@ { - "keyboard_name": "Wang Ergo", - "url": "", - "maintainer": "Ocean", + "keyboard_name": "Wang Ergo", + "url": "", + "maintainer": "oceeean", + "layout_aliases": { + "LAYOUT": "LAYOUT_all" + }, "layouts": { - "LAYOUT": { - "layout": [{"label":"0,0", "x":1.75, "y":2.25}, {"label":"0,11", "x":15.15, "y":2.25}, {"label":"3,10", "x":16.15, "y":2.25}, {"label":"1,0", "x":1.5, "y":3.25, "w":1.25}, {"label":"1,11", "x":15.15, "y":3.25, "w":1.75}, {"label":"2,0", "x":1, "y":4.25, "w":1.75}, {"label":"2,11", "x":15.15, "y":4.25, "w":1.25}, {"label":"3,0", "x":0.75, "y":5.25}, {"label":"3,1", "x":1.75, "y":5.25}, {"label":"3,11", "x":15.15, "y":5.25}, {"label":"0,1", "x":3.15, "y":2}, {"label":"1,1", "x":3.15, "y":3}, {"label":"2,1", "x":3.15, "y":4}, {"label":"0,2", "x":4.5, "y":1.75}, {"label":"0,3", "x":5.5, "y":1.75}, {"label":"0,4", "x":6.5, "y":1.75}, {"label":"0,5", "x":7.5, "y":1.75}, {"label":"1,2", "x":4.5, "y":2.75}, {"label":"1,3", "x":5.5, "y":2.75}, {"label":"1,4", "x":6.5, "y":2.75}, {"label":"1,5", "x":7.5, "y":2.75}, {"label":"2,2", "x":4.5, "y":3.75}, {"label":"2,3", "x":5.5, "y":3.75}, {"label":"2,4", "x":6.5, "y":3.75}, {"label":"2,5", "x":7.5, "y":3.75}, {"label":"3,3", "x":5.5, "y":4.75}, {"label":"3,4", "x":6.5, "y":4.75}, {"label":"3,5", "x":7.5, "y":4.75}, {"label":"0,6", "x":9.25, "y":4.25}, {"label":"0,7", "x":10.25, "y":4.25}, {"label":"0,8", "x":11.25, "y":4.25}, {"label":"0,9", "x":12.25, "y":4.25}, {"label":"1,6", "x":9.25, "y":5.25}, {"label":"1,7", "x":10.25, "y":5.25}, {"label":"1,8", "x":11.25, "y":5.25}, {"label":"1,9", "x":12.25, "y":5.25}, {"label":"2,6", "x":9.25, "y":6.25}, {"label":"2,7", "x":10.25, "y":6.25}, {"label":"2,8", "x":11.25, "y":6.25}, {"label":"2,9", "x":12.25, "y":6.25}, {"label":"3,6", "x":9.25, "y":7.25}, {"label":"3,7", "x":10.25, "y":7.25}, {"label":"3,8", "x":11.25, "y":7.25}, {"label":"0,10", "x":13.75, "y":3.25}, {"label":"1,10", "x":13.75, "y":4.25}, {"label":"2,10", "x":13.75, "y":5.25}] + "LAYOUT_all": { + "layout": [ + {"label":"Esc", "x":1, "y":0}, + {"label":"Q", "x":2, "y":0}, + {"label":"W", "x":3, "y":0}, + {"label":"E", "x":4, "y":0}, + {"label":"R", "x":5, "y":0}, + {"label":"T", "x":6, "y":0}, + {"label":"Y", "x":8, "y":0}, + {"label":"U", "x":9, "y":0}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0}, + {"label":"P", "x":12, "y":0}, + {"label":"Del", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + + {"label":"Tab", "x":0.75, "y":1, "w":1.25}, + {"label":"A", "x":2, "y":1}, + {"label":"S", "x":3, "y":1}, + {"label":"D", "x":4, "y":1}, + {"label":"F", "x":5, "y":1}, + {"label":"G", "x":6, "y":1}, + {"label":"H", "x":8, "y":1}, + {"label":"J", "x":9, "y":1}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1}, + {"label":";:", "x":12, "y":1}, + {"label":"Enter", "x":13, "y":1, "w":1.75}, + + {"label":"Shift", "x":0.25, "y":2, "w":1.75}, + {"label":"Z", "x":2, "y":2}, + {"label":"X", "x":3, "y":2}, + {"label":"C", "x":4, "y":2}, + {"label":"V", "x":5, "y":2}, + {"label":"B", "x":6, "y":2}, + {"label":"N", "x":8, "y":2}, + {"label":"M", "x":9, "y":2}, + {"label":",<", "x":10, "y":2}, + {"label":".>", "x":11, "y":2}, + {"label":"/?", "x":12, "y":2}, + {"label":"Fn", "x":13, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Alt", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Space", "x":8, "y":3}, + {"label":"Space", "x":9, "y":3}, + {"label":"Alt", "x":10, "y":3}, + {"label":"Ctrl", "x":13, "y":3} + ] + }, + "LAYOUT_2x2u": { + "layout": [ + {"label":"Esc", "x":1, "y":0}, + {"label":"Q", "x":2, "y":0}, + {"label":"W", "x":3, "y":0}, + {"label":"E", "x":4, "y":0}, + {"label":"R", "x":5, "y":0}, + {"label":"T", "x":6, "y":0}, + {"label":"Y", "x":8, "y":0}, + {"label":"U", "x":9, "y":0}, + {"label":"I", "x":10, "y":0}, + {"label":"O", "x":11, "y":0}, + {"label":"P", "x":12, "y":0}, + {"label":"Del", "x":13, "y":0}, + {"label":"Backspace", "x":14, "y":0}, + + {"label":"Tab", "x":0.75, "y":1, "w":1.25}, + {"label":"A", "x":2, "y":1}, + {"label":"S", "x":3, "y":1}, + {"label":"D", "x":4, "y":1}, + {"label":"F", "x":5, "y":1}, + {"label":"G", "x":6, "y":1}, + {"label":"H", "x":8, "y":1}, + {"label":"J", "x":9, "y":1}, + {"label":"K", "x":10, "y":1}, + {"label":"L", "x":11, "y":1}, + {"label":";:", "x":12, "y":1}, + {"label":"Enter", "x":13, "y":1, "w":1.75}, + + {"label":"Shift", "x":0.25, "y":2, "w":1.75}, + {"label":"Z", "x":2, "y":2}, + {"label":"X", "x":3, "y":2}, + {"label":"C", "x":4, "y":2}, + {"label":"V", "x":5, "y":2}, + {"label":"B", "x":6, "y":2}, + {"label":"N", "x":8, "y":2}, + {"label":"M", "x":9, "y":2}, + {"label":",<", "x":10, "y":2}, + {"label":".>", "x":11, "y":2}, + {"label":"/?", "x":12, "y":2}, + {"label":"Fn", "x":13, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"GUI", "x":1, "y":3}, + {"label":"Alt", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3, "w":2}, + {"label":"Space", "x":8, "y":3, "w":2}, + {"label":"Alt", "x":10, "y":3}, + {"label":"Ctrl", "x":13, "y":3} + ] } } -} \ No newline at end of file +} diff --git a/keyboards/ocean/wang_ergo/keymaps/default/keymap.c b/keyboards/ocean/wang_ergo/keymaps/default/keymap.c index 623f574cd24..a50dde256ba 100644 --- a/keyboards/ocean/wang_ergo/keymaps/default/keymap.c +++ b/keyboards/ocean/wang_ergo/keymaps/default/keymap.c @@ -15,10 +15,10 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_BSPC, KC_RCTL + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL ), }; diff --git a/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c b/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c new file mode 100644 index 00000000000..7177819e455 --- /dev/null +++ b/keyboards/ocean/wang_ergo/keymaps/default_2x2u/keymap.c @@ -0,0 +1,24 @@ +/* Copyright 2021 Ocean + * 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_2x2u( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCTL + ), +}; diff --git a/keyboards/ocean/wang_ergo/keymaps/via/keymap.c b/keyboards/ocean/wang_ergo/keymaps/via/keymap.c index 431dac64e4f..c13785686fb 100644 --- a/keyboards/ocean/wang_ergo/keymaps/via/keymap.c +++ b/keyboards/ocean/wang_ergo/keymaps/via/keymap.c @@ -15,31 +15,31 @@ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_BSPC, KC_RCTL + [0] = LAYOUT_all( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL ), - [1] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [3] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/ocean/wang_ergo/rules.mk b/keyboards/ocean/wang_ergo/rules.mk index 6fe93c32ad0..e6f23c3ee3c 100644 --- a/keyboards/ocean/wang_ergo/rules.mk +++ b/keyboards/ocean/wang_ergo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ocean/wang_ergo/wang_ergo.h b/keyboards/ocean/wang_ergo/wang_ergo.h index c57cc6c6714..68074c29986 100644 --- a/keyboards/ocean/wang_ergo/wang_ergo.h +++ b/keyboards/ocean/wang_ergo/wang_ergo.h @@ -17,15 +17,45 @@ #include "quantum.h" -#define LAYOUT(\ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K33, K34, K35, K36, K37, K38, K3A, K3B \ +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┐ + * │00 │01 │02 │03 │04 │05 │ │06 │07 │08 │09 │0A │0B │3A │ + * ┌┴───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┴──┬┘ + * │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │ + * ┌─┴────┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼────┬─┘ + * │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │ + * ┌┴──┬───┼───┴───┼───┼───┼───┤ ├───┼───┼───┼───┴───┼───┬┘ + * │30 │31 │ │33 │34 │35 │ │36 │37 │38 │ │3B │ + * └───┴───┘ └───┴───┴───┘ └───┴───┴───┘ └───┘ + * ┌───────┐ ┌───────┐ + * │35 │ │36 │ + * └───────┘ └───────┘ + */ + +#define LAYOUT_all(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K34, K35, K36, K37, K38, K3B \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, XXX, K33, K34, K35, K36, K37, K38, XXX, K3A, K3B }, \ +} + +#define LAYOUT_2x2u(\ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K33, K35, K36, K38, K3B \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, KC_NO, K33, K34, K35, K36, K37, K38, KC_NO, K3A, K3B }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, XXX, K33, XXX, K35, K36, XXX, K38, XXX, K3A, K3B }, \ } diff --git a/keyboards/ocean/wang_v2/rules.mk b/keyboards/ocean/wang_v2/rules.mk index 1dfaf69d229..d462cab2fa0 100644 --- a/keyboards/ocean/wang_v2/rules.mk +++ b/keyboards/ocean/wang_v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/oddball/config.h b/keyboards/oddball/config.h index 050084d2d39..4bc9c7997c2 100644 --- a/keyboards/oddball/config.h +++ b/keyboards/oddball/config.h @@ -58,3 +58,6 @@ /* Bootmagic Lite key configuration */ // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 + +#define ADNS9800_CS_PIN SPI_SS_PIN +#define PMW3360_CS_PIN SPI_SS_PIN diff --git a/keyboards/oddball/keymaps/default/config.h b/keyboards/oddball/keymaps/default/config.h deleted file mode 100644 index 7eddc070dcd..00000000000 --- a/keyboards/oddball/keymaps/default/config.h +++ /dev/null @@ -1 +0,0 @@ -#define ADNS_9800 diff --git a/keyboards/oddball/keymaps/default/rules.mk b/keyboards/oddball/keymaps/default/rules.mk new file mode 100644 index 00000000000..84de35aeb14 --- /dev/null +++ b/keyboards/oddball/keymaps/default/rules.mk @@ -0,0 +1 @@ +POINTING_DEVICE_DRIVER = adns9800 diff --git a/keyboards/oddball/keymaps/pmw3360/config.h b/keyboards/oddball/keymaps/pmw3360/config.h deleted file mode 100644 index f9af5f39113..00000000000 --- a/keyboards/oddball/keymaps/pmw3360/config.h +++ /dev/null @@ -1 +0,0 @@ -#define PMW_3360 diff --git a/keyboards/oddball/keymaps/pmw3360/rules.mk b/keyboards/oddball/keymaps/pmw3360/rules.mk new file mode 100644 index 00000000000..fab9162dc64 --- /dev/null +++ b/keyboards/oddball/keymaps/pmw3360/rules.mk @@ -0,0 +1 @@ +POINTING_DEVICE_DRIVER = pmw3360 diff --git a/keyboards/oddball/oddball.c b/keyboards/oddball/oddball.c index 7ac6d99016b..bbc3b3f2e4d 100644 --- a/keyboards/oddball/oddball.c +++ b/keyboards/oddball/oddball.c @@ -16,21 +16,17 @@ #include "oddball.h" #include "pointing_device.h" -#include "optical_sensor/optical_sensor.h" - -#define CLAMP_HID(value) value < -127 ? -127 : value > 127 ? 127 : value +extern const pointing_device_driver_t pointing_device_driver; static bool scroll_pressed; static bool mouse_buttons_dirty; static int8_t scroll_h; static int8_t scroll_v; -void pointing_device_init(void){ +void pointing_device_init_kb(void){ if(!is_keyboard_master()) return; - optical_sensor_init(); - // read config from EEPROM and update if needed config_oddball_t kb_config; @@ -41,21 +37,17 @@ void pointing_device_init(void){ eeconfig_update_kb(kb_config.raw); } - optical_sensor_set_config((config_optical_sensor_t){ kb_config.cpi }); + pointing_device_set_cpi(kb_config.cpi); } -void pointing_device_task(void){ - if(!is_keyboard_master()) - return; - - report_mouse_t mouse_report = pointing_device_get_report(); - report_optical_sensor_t sensor_report = optical_sensor_get_report(); - - int8_t clamped_x = CLAMP_HID(sensor_report.x); - int8_t clamped_y = CLAMP_HID(sensor_report.y); +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + if (!is_keyboard_master()) return mouse_report; - if(scroll_pressed) { + int8_t clamped_x = mouse_report.x, clamped_y = mouse_report.y; + mouse_report.x = 0; + mouse_report.y = 0; + if (scroll_pressed) { // accumulate scroll scroll_h += clamped_x; scroll_v += clamped_y; @@ -65,33 +57,21 @@ void pointing_device_task(void){ // clear accumulated scroll on assignment - if(scaled_scroll_h != 0){ + if (scaled_scroll_h != 0) { mouse_report.h = -scaled_scroll_h; - scroll_h = 0; + scroll_h = 0; } - if(scaled_scroll_v != 0){ + if (scaled_scroll_v != 0) { mouse_report.v = -scaled_scroll_v; - scroll_v = 0; + scroll_v = 0; } - } - else { + } else { mouse_report.x = -clamped_x; mouse_report.y = clamped_y; } - pointing_device_set_report(mouse_report); - - // only send report on change as even sending report with no change is treated as movement - if(mouse_buttons_dirty || - mouse_report.x != 0 || - mouse_report.y != 0 || - mouse_report.h != 0 || - mouse_report.v != 0){ - - mouse_buttons_dirty = false; - pointing_device_send(); - } + return mouse_report; } static void on_cpi_button(uint16_t cpi, keyrecord_t *record) { @@ -99,7 +79,7 @@ static void on_cpi_button(uint16_t cpi, keyrecord_t *record) { if(!record->event.pressed) return; - optical_sensor_set_config((config_optical_sensor_t){ cpi }); + pointing_device_set_cpi(cpi); config_oddball_t kb_config; kb_config.cpi = cpi; @@ -165,5 +145,5 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { default: return true; - } + } } diff --git a/keyboards/oddball/optical_sensor/optical_sensor.h b/keyboards/oddball/optical_sensor/optical_sensor.h deleted file mode 100644 index 00955209e28..00000000000 --- a/keyboards/oddball/optical_sensor/optical_sensor.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright 2020 Alexander Tulloh - * - * 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 . - */ - -/* common interface for opitcal sensors */ - -#if defined ADNS_9800 - #include "drivers/sensors/adns9800.h" - #define config_optical_sensor_t config_adns_t - #define report_optical_sensor_t report_adns_t - #define optical_sensor_init adns_init - #define optical_sensor_get_config adns_get_config - #define optical_sensor_set_config adns_set_config - #define optical_sensor_get_report adns_get_report -#elif defined PMW_3360 - #include "../pmw/pmw.h" - #define config_optical_sensor_t config_pmw_t - #define report_optical_sensor_t report_pmw_t - #define optical_sensor_init pmw_init - #define optical_sensor_get_config pmw_get_config - #define optical_sensor_set_config pmw_set_config - #define optical_sensor_get_report pmw_get_report -#else - /* fallback stub */ - - #include - - typedef struct { - uint16_t cpi; - } config_optical_sensor_t; - - typedef struct { - int16_t x; - int16_t y; - } report_optical_sensor_t; - - #define optical_sensor_init(){ } - #define optical_sensor_get_config() (config_optical_sensor_t){ } - #define optical_sensor_set_config(config_optical_sensor_t){ } - #define optical_sensor_get_report() (report_optical_sensor_t){ } -#endif diff --git a/keyboards/oddball/pmw/pmw.c b/keyboards/oddball/pmw/pmw.c deleted file mode 100644 index 51d69270240..00000000000 --- a/keyboards/oddball/pmw/pmw.c +++ /dev/null @@ -1,226 +0,0 @@ -/* Copyright 2020 Alexander Tulloh - * - * 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 . - */ - -#include "spi_master.h" -#include "quantum.h" -#include "pmw3360_srom_0x04.h" -#include "pmw.h" - -// registers -#define Product_ID 0x00 -#define Revision_ID 0x01 -#define Motion 0x02 -#define Delta_X_L 0x03 -#define Delta_X_H 0x04 -#define Delta_Y_L 0x05 -#define Delta_Y_H 0x06 -#define SQUAL 0x07 -#define Raw_Data_Sum 0x08 -#define Maximum_Raw_data 0x09 -#define Minimum_Raw_data 0x0A -#define Shutter_Lower 0x0B -#define Shutter_Upper 0x0C -#define Control 0x0D -#define Config1 0x0F -#define Config2 0x10 -#define Angle_Tune 0x11 -#define Frame_Capture 0x12 -#define SROM_Enable 0x13 -#define Run_Downshift 0x14 -#define Rest1_Rate_Lower 0x15 -#define Rest1_Rate_Upper 0x16 -#define Rest1_Downshift 0x17 -#define Rest2_Rate_Lower 0x18 -#define Rest2_Rate_Upper 0x19 -#define Rest2_Downshift 0x1A -#define Rest3_Rate_Lower 0x1B -#define Rest3_Rate_Upper 0x1C -#define Observation 0x24 -#define Data_Out_Lower 0x25 -#define Data_Out_Upper 0x26 -#define Raw_Data_Dump 0x29 -#define SROM_ID 0x2A -#define Min_SQ_Run 0x2B -#define Raw_Data_Threshold 0x2C -#define Config5 0x2F -#define Power_Up_Reset 0x3A -#define Shutdown 0x3B -#define Inverse_Product_ID 0x3F -#define LiftCutoff_Tune3 0x41 -#define Angle_Snap 0x42 -#define LiftCutoff_Tune1 0x4A -#define Motion_Burst 0x50 -#define LiftCutoff_Tune_Timeout 0x58 -#define LiftCutoff_Tune_Min_Length 0x5A -#define SROM_Load_Burst 0x62 -#define Lift_Config 0x63 -#define Raw_Data_Burst 0x64 -#define LiftCutoff_Tune2 0x65 - -#define PMW_CLOCK_SPEED 70000000 -#define MIN_CPI 100 -#define MAX_CPI 12000 -#define CPI_STEP 100 -#define CLAMP_CPI(value) value < MIN_CPI ? MIN_CPI : value > MAX_CPI ? MAX_CPI : value -#define SPI_MODE 3 -#define SPI_DIVISOR (F_CPU / PMW_CLOCK_SPEED) -#define US_BETWEEN_WRITES 180 -#define US_BETWEEN_READS 20 -#define US_BEFORE_MOTION 35 - -#define MSB1 0x80 - -extern const uint16_t pmw_firmware_length; -extern const uint8_t pmw_firmware_data[]; - -void pmw_spi_start(void){ - spi_start(SPI_SS_PIN, false, SPI_MODE, SPI_DIVISOR); -} - -void pmw_write(uint8_t reg_addr, uint8_t data){ - - pmw_spi_start(); - spi_write(reg_addr | MSB1 ); - spi_write(data); - spi_stop(); - wait_us(US_BETWEEN_WRITES); -} - -uint8_t pmw_read(uint8_t reg_addr){ - - pmw_spi_start(); - spi_write(reg_addr & 0x7f ); - uint8_t data = spi_read(); - spi_stop(); - wait_us(US_BETWEEN_READS); - - return data; -} - -void pmw_init() { - - setPinOutput(SPI_SS_PIN); - - spi_init(); - - // reboot - pmw_write(Power_Up_Reset, 0x5a); - wait_ms(50); - - // read registers and discard - pmw_read(Motion); - pmw_read(Delta_X_L); - pmw_read(Delta_X_H); - pmw_read(Delta_Y_L); - pmw_read(Delta_Y_H); - - // upload firmware - - // disable rest mode - pmw_write(Config2, 0x20); - - // enable initialisation - pmw_write(SROM_Enable, 0x1d); - - // wait a frame - wait_ms(10); - - // start SROM download - pmw_write(SROM_Enable, 0x18); - - // write the SROM file - - pmw_spi_start(); - - spi_write(SROM_Load_Burst | 0x80); - wait_us(15); - - // send all bytes of the firmware - unsigned char c; - for(int i = 0; i < pmw_firmware_length; i++){ - c = (unsigned char)pgm_read_byte(pmw_firmware_data + i); - spi_write(c); - wait_us(15); - } - - spi_stop(); - wait_us(US_BETWEEN_WRITES); - - // read id - pmw_read(SROM_ID); - - // wired mouse - pmw_write(Config2, 0x00); - - // first motion burst; write anything - pmw_write(Motion_Burst, 0xFF); - writePinLow(SPI_SS_PIN); -} - -config_pmw_t pmw_get_config(void) { - uint8_t config_1 = pmw_read(Config1); - return (config_pmw_t){ (config_1 & 0xFF) * CPI_STEP }; -} - -void pmw_set_config(config_pmw_t config) { - uint8_t config_1 = (CLAMP_CPI(config.cpi) / CPI_STEP) & 0xFF; - pmw_write(Config1, config_1); -} - -static int16_t convertDeltaToInt(uint8_t high, uint8_t low){ - - // join bytes into twos compliment - uint16_t twos_comp = (high << 8) | low; - - // convert twos comp to int - if (twos_comp & 0x8000) - return -1 * (~twos_comp + 1); - - return twos_comp; -} - -report_pmw_t pmw_get_report(void) { - - report_pmw_t report = {0, 0}; - - pmw_spi_start(); - - // start burst mode - spi_write(Motion_Burst & 0x7f); - - wait_us(US_BEFORE_MOTION); - - uint8_t motion = spi_read(); - - if(motion & 0x80) { - - // clear observation register - spi_read(); - - // delta registers - uint8_t delta_x_l = spi_read(); - uint8_t delta_x_h = spi_read(); - uint8_t delta_y_l = spi_read(); - uint8_t delta_y_h = spi_read(); - - report.x = convertDeltaToInt(delta_x_h, delta_x_l); - report.y = convertDeltaToInt(delta_y_h, delta_y_l); - } - - spi_stop(); - - return report; -} diff --git a/keyboards/oddball/pmw/pmw.h b/keyboards/oddball/pmw/pmw.h deleted file mode 100644 index cc3c9ec5eb0..00000000000 --- a/keyboards/oddball/pmw/pmw.h +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright 2020 Alexander Tulloh - * - * 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 . - */ - -#pragma once - -#include - -typedef struct { - /* 100 - 12000 CPI supported */ - uint16_t cpi; -} config_pmw_t; - -typedef struct { - int16_t x; - int16_t y; -} report_pmw_t; - -void pmw_init(void); -config_pmw_t pmw_get_config(void); -void pmw_set_config(config_pmw_t); -/* Reads and clears the current delta values on the PMW sensor */ -report_pmw_t pmw_get_report(void); diff --git a/keyboards/oddball/pmw/pmw3360_srom_0x04.h b/keyboards/oddball/pmw/pmw3360_srom_0x04.h deleted file mode 100644 index 0dda4f1ab4e..00000000000 --- a/keyboards/oddball/pmw/pmw3360_srom_0x04.h +++ /dev/null @@ -1,280 +0,0 @@ -#pragma once - -#include "progmem.h" - -const uint16_t pmw_firmware_length = 4094; - -const uint8_t pmw_firmware_data[] PROGMEM = { -0x01, 0x04, 0x8e, 0x96, 0x6e, 0x77, 0x3e, 0xfe, 0x7e, 0x5f, 0x1d, 0xb8, 0xf2, 0x66, 0x4e, -0xff, 0x5d, 0x19, 0xb0, 0xc2, 0x04, 0x69, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0xb0, -0xc3, 0xe5, 0x29, 0xb1, 0xe0, 0x23, 0xa5, 0xa9, 0xb1, 0xc1, 0x00, 0x82, 0x67, 0x4c, 0x1a, -0x97, 0x8d, 0x79, 0x51, 0x20, 0xc7, 0x06, 0x8e, 0x7c, 0x7c, 0x7a, 0x76, 0x4f, 0xfd, 0x59, -0x30, 0xe2, 0x46, 0x0e, 0x9e, 0xbe, 0xdf, 0x1d, 0x99, 0x91, 0xa0, 0xa5, 0xa1, 0xa9, 0xd0, -0x22, 0xc6, 0xef, 0x5c, 0x1b, 0x95, 0x89, 0x90, 0xa2, 0xa7, 0xcc, 0xfb, 0x55, 0x28, 0xb3, -0xe4, 0x4a, 0xf7, 0x6c, 0x3b, 0xf4, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0x9d, 0xb8, 0xd3, 0x05, -0x88, 0x92, 0xa6, 0xce, 0x1e, 0xbe, 0xdf, 0x1d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x5c, 0x07, -0x11, 0x5d, 0x98, 0x0b, 0x9d, 0x94, 0x97, 0xee, 0x4e, 0x45, 0x33, 0x6b, 0x44, 0xc7, 0x29, -0x56, 0x27, 0x30, 0xc6, 0xa7, 0xd5, 0xf2, 0x56, 0xdf, 0xb4, 0x38, 0x62, 0xcb, 0xa0, 0xb6, -0xe3, 0x0f, 0x84, 0x06, 0x24, 0x05, 0x65, 0x6f, 0x76, 0x89, 0xb5, 0x77, 0x41, 0x27, 0x82, -0x66, 0x65, 0x82, 0xcc, 0xd5, 0xe6, 0x20, 0xd5, 0x27, 0x17, 0xc5, 0xf8, 0x03, 0x23, 0x7c, -0x5f, 0x64, 0xa5, 0x1d, 0xc1, 0xd6, 0x36, 0xcb, 0x4c, 0xd4, 0xdb, 0x66, 0xd7, 0x8b, 0xb1, -0x99, 0x7e, 0x6f, 0x4c, 0x36, 0x40, 0x06, 0xd6, 0xeb, 0xd7, 0xa2, 0xe4, 0xf4, 0x95, 0x51, -0x5a, 0x54, 0x96, 0xd5, 0x53, 0x44, 0xd7, 0x8c, 0xe0, 0xb9, 0x40, 0x68, 0xd2, 0x18, 0xe9, -0xdd, 0x9a, 0x23, 0x92, 0x48, 0xee, 0x7f, 0x43, 0xaf, 0xea, 0x77, 0x38, 0x84, 0x8c, 0x0a, -0x72, 0xaf, 0x69, 0xf8, 0xdd, 0xf1, 0x24, 0x83, 0xa3, 0xf8, 0x4a, 0xbf, 0xf5, 0x94, 0x13, -0xdb, 0xbb, 0xd8, 0xb4, 0xb3, 0xa0, 0xfb, 0x45, 0x50, 0x60, 0x30, 0x59, 0x12, 0x31, 0x71, -0xa2, 0xd3, 0x13, 0xe7, 0xfa, 0xe7, 0xce, 0x0f, 0x63, 0x15, 0x0b, 0x6b, 0x94, 0xbb, 0x37, -0x83, 0x26, 0x05, 0x9d, 0xfb, 0x46, 0x92, 0xfc, 0x0a, 0x15, 0xd1, 0x0d, 0x73, 0x92, 0xd6, -0x8c, 0x1b, 0x8c, 0xb8, 0x55, 0x8a, 0xce, 0xbd, 0xfe, 0x8e, 0xfc, 0xed, 0x09, 0x12, 0x83, -0x91, 0x82, 0x51, 0x31, 0x23, 0xfb, 0xb4, 0x0c, 0x76, 0xad, 0x7c, 0xd9, 0xb4, 0x4b, 0xb2, -0x67, 0x14, 0x09, 0x9c, 0x7f, 0x0c, 0x18, 0xba, 0x3b, 0xd6, 0x8e, 0x14, 0x2a, 0xe4, 0x1b, -0x52, 0x9f, 0x2b, 0x7d, 0xe1, 0xfb, 0x6a, 0x33, 0x02, 0xfa, 0xac, 0x5a, 0xf2, 0x3e, 0x88, -0x7e, 0xae, 0xd1, 0xf3, 0x78, 0xe8, 0x05, 0xd1, 0xe3, 0xdc, 0x21, 0xf6, 0xe1, 0x9a, 0xbd, -0x17, 0x0e, 0xd9, 0x46, 0x9b, 0x88, 0x03, 0xea, 0xf6, 0x66, 0xbe, 0x0e, 0x1b, 0x50, 0x49, -0x96, 0x40, 0x97, 0xf1, 0xf1, 0xe4, 0x80, 0xa6, 0x6e, 0xe8, 0x77, 0x34, 0xbf, 0x29, 0x40, -0x44, 0xc2, 0xff, 0x4e, 0x98, 0xd3, 0x9c, 0xa3, 0x32, 0x2b, 0x76, 0x51, 0x04, 0x09, 0xe7, -0xa9, 0xd1, 0xa6, 0x32, 0xb1, 0x23, 0x53, 0xe2, 0x47, 0xab, 0xd6, 0xf5, 0x69, 0x5c, 0x3e, -0x5f, 0xfa, 0xae, 0x45, 0x20, 0xe5, 0xd2, 0x44, 0xff, 0x39, 0x32, 0x6d, 0xfd, 0x27, 0x57, -0x5c, 0xfd, 0xf0, 0xde, 0xc1, 0xb5, 0x99, 0xe5, 0xf5, 0x1c, 0x77, 0x01, 0x75, 0xc5, 0x6d, -0x58, 0x92, 0xf2, 0xb2, 0x47, 0x00, 0x01, 0x26, 0x96, 0x7a, 0x30, 0xff, 0xb7, 0xf0, 0xef, -0x77, 0xc1, 0x8a, 0x5d, 0xdc, 0xc0, 0xd1, 0x29, 0x30, 0x1e, 0x77, 0x38, 0x7a, 0x94, 0xf1, -0xb8, 0x7a, 0x7e, 0xef, 0xa4, 0xd1, 0xac, 0x31, 0x4a, 0xf2, 0x5d, 0x64, 0x3d, 0xb2, 0xe2, -0xf0, 0x08, 0x99, 0xfc, 0x70, 0xee, 0x24, 0xa7, 0x7e, 0xee, 0x1e, 0x20, 0x69, 0x7d, 0x44, -0xbf, 0x87, 0x42, 0xdf, 0x88, 0x3b, 0x0c, 0xda, 0x42, 0xc9, 0x04, 0xf9, 0x45, 0x50, 0xfc, -0x83, 0x8f, 0x11, 0x6a, 0x72, 0xbc, 0x99, 0x95, 0xf0, 0xac, 0x3d, 0xa7, 0x3b, 0xcd, 0x1c, -0xe2, 0x88, 0x79, 0x37, 0x11, 0x5f, 0x39, 0x89, 0x95, 0x0a, 0x16, 0x84, 0x7a, 0xf6, 0x8a, -0xa4, 0x28, 0xe4, 0xed, 0x83, 0x80, 0x3b, 0xb1, 0x23, 0xa5, 0x03, 0x10, 0xf4, 0x66, 0xea, -0xbb, 0x0c, 0x0f, 0xc5, 0xec, 0x6c, 0x69, 0xc5, 0xd3, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0x99, -0x88, 0x76, 0x08, 0xa0, 0xa8, 0x95, 0x7c, 0xd8, 0x38, 0x6d, 0xcd, 0x59, 0x02, 0x51, 0x4b, -0xf1, 0xb5, 0x2b, 0x50, 0xe3, 0xb6, 0xbd, 0xd0, 0x72, 0xcf, 0x9e, 0xfd, 0x6e, 0xbb, 0x44, -0xc8, 0x24, 0x8a, 0x77, 0x18, 0x8a, 0x13, 0x06, 0xef, 0x97, 0x7d, 0xfa, 0x81, 0xf0, 0x31, -0xe6, 0xfa, 0x77, 0xed, 0x31, 0x06, 0x31, 0x5b, 0x54, 0x8a, 0x9f, 0x30, 0x68, 0xdb, 0xe2, -0x40, 0xf8, 0x4e, 0x73, 0xfa, 0xab, 0x74, 0x8b, 0x10, 0x58, 0x13, 0xdc, 0xd2, 0xe6, 0x78, -0xd1, 0x32, 0x2e, 0x8a, 0x9f, 0x2c, 0x58, 0x06, 0x48, 0x27, 0xc5, 0xa9, 0x5e, 0x81, 0x47, -0x89, 0x46, 0x21, 0x91, 0x03, 0x70, 0xa4, 0x3e, 0x88, 0x9c, 0xda, 0x33, 0x0a, 0xce, 0xbc, -0x8b, 0x8e, 0xcf, 0x9f, 0xd3, 0x71, 0x80, 0x43, 0xcf, 0x6b, 0xa9, 0x51, 0x83, 0x76, 0x30, -0x82, 0xc5, 0x6a, 0x85, 0x39, 0x11, 0x50, 0x1a, 0x82, 0xdc, 0x1e, 0x1c, 0xd5, 0x7d, 0xa9, -0x71, 0x99, 0x33, 0x47, 0x19, 0x97, 0xb3, 0x5a, 0xb1, 0xdf, 0xed, 0xa4, 0xf2, 0xe6, 0x26, -0x84, 0xa2, 0x28, 0x9a, 0x9e, 0xdf, 0xa6, 0x6a, 0xf4, 0xd6, 0xfc, 0x2e, 0x5b, 0x9d, 0x1a, -0x2a, 0x27, 0x68, 0xfb, 0xc1, 0x83, 0x21, 0x4b, 0x90, 0xe0, 0x36, 0xdd, 0x5b, 0x31, 0x42, -0x55, 0xa0, 0x13, 0xf7, 0xd0, 0x89, 0x53, 0x71, 0x99, 0x57, 0x09, 0x29, 0xc5, 0xf3, 0x21, -0xf8, 0x37, 0x2f, 0x40, 0xf3, 0xd4, 0xaf, 0x16, 0x08, 0x36, 0x02, 0xfc, 0x77, 0xc5, 0x8b, -0x04, 0x90, 0x56, 0xb9, 0xc9, 0x67, 0x9a, 0x99, 0xe8, 0x00, 0xd3, 0x86, 0xff, 0x97, 0x2d, -0x08, 0xe9, 0xb7, 0xb3, 0x91, 0xbc, 0xdf, 0x45, 0xc6, 0xed, 0x0f, 0x8c, 0x4c, 0x1e, 0xe6, -0x5b, 0x6e, 0x38, 0x30, 0xe4, 0xaa, 0xe3, 0x95, 0xde, 0xb9, 0xe4, 0x9a, 0xf5, 0xb2, 0x55, -0x9a, 0x87, 0x9b, 0xf6, 0x6a, 0xb2, 0xf2, 0x77, 0x9a, 0x31, 0xf4, 0x7a, 0x31, 0xd1, 0x1d, -0x04, 0xc0, 0x7c, 0x32, 0xa2, 0x9e, 0x9a, 0xf5, 0x62, 0xf8, 0x27, 0x8d, 0xbf, 0x51, 0xff, -0xd3, 0xdf, 0x64, 0x37, 0x3f, 0x2a, 0x6f, 0x76, 0x3a, 0x7d, 0x77, 0x06, 0x9e, 0x77, 0x7f, -0x5e, 0xeb, 0x32, 0x51, 0xf9, 0x16, 0x66, 0x9a, 0x09, 0xf3, 0xb0, 0x08, 0xa4, 0x70, 0x96, -0x46, 0x30, 0xff, 0xda, 0x4f, 0xe9, 0x1b, 0xed, 0x8d, 0xf8, 0x74, 0x1f, 0x31, 0x92, 0xb3, -0x73, 0x17, 0x36, 0xdb, 0x91, 0x30, 0xd6, 0x88, 0x55, 0x6b, 0x34, 0x77, 0x87, 0x7a, 0xe7, -0xee, 0x06, 0xc6, 0x1c, 0x8c, 0x19, 0x0c, 0x48, 0x46, 0x23, 0x5e, 0x9c, 0x07, 0x5c, 0xbf, -0xb4, 0x7e, 0xd6, 0x4f, 0x74, 0x9c, 0xe2, 0xc5, 0x50, 0x8b, 0xc5, 0x8b, 0x15, 0x90, 0x60, -0x62, 0x57, 0x29, 0xd0, 0x13, 0x43, 0xa1, 0x80, 0x88, 0x91, 0x00, 0x44, 0xc7, 0x4d, 0x19, -0x86, 0xcc, 0x2f, 0x2a, 0x75, 0x5a, 0xfc, 0xeb, 0x97, 0x2a, 0x70, 0xe3, 0x78, 0xd8, 0x91, -0xb0, 0x4f, 0x99, 0x07, 0xa3, 0x95, 0xea, 0x24, 0x21, 0xd5, 0xde, 0x51, 0x20, 0x93, 0x27, -0x0a, 0x30, 0x73, 0xa8, 0xff, 0x8a, 0x97, 0xe9, 0xa7, 0x6a, 0x8e, 0x0d, 0xe8, 0xf0, 0xdf, -0xec, 0xea, 0xb4, 0x6c, 0x1d, 0x39, 0x2a, 0x62, 0x2d, 0x3d, 0x5a, 0x8b, 0x65, 0xf8, 0x90, -0x05, 0x2e, 0x7e, 0x91, 0x2c, 0x78, 0xef, 0x8e, 0x7a, 0xc1, 0x2f, 0xac, 0x78, 0xee, 0xaf, -0x28, 0x45, 0x06, 0x4c, 0x26, 0xaf, 0x3b, 0xa2, 0xdb, 0xa3, 0x93, 0x06, 0xb5, 0x3c, 0xa5, -0xd8, 0xee, 0x8f, 0xaf, 0x25, 0xcc, 0x3f, 0x85, 0x68, 0x48, 0xa9, 0x62, 0xcc, 0x97, 0x8f, -0x7f, 0x2a, 0xea, 0xe0, 0x15, 0x0a, 0xad, 0x62, 0x07, 0xbd, 0x45, 0xf8, 0x41, 0xd8, 0x36, -0xcb, 0x4c, 0xdb, 0x6e, 0xe6, 0x3a, 0xe7, 0xda, 0x15, 0xe9, 0x29, 0x1e, 0x12, 0x10, 0xa0, -0x14, 0x2c, 0x0e, 0x3d, 0xf4, 0xbf, 0x39, 0x41, 0x92, 0x75, 0x0b, 0x25, 0x7b, 0xa3, 0xce, -0x39, 0x9c, 0x15, 0x64, 0xc8, 0xfa, 0x3d, 0xef, 0x73, 0x27, 0xfe, 0x26, 0x2e, 0xce, 0xda, -0x6e, 0xfd, 0x71, 0x8e, 0xdd, 0xfe, 0x76, 0xee, 0xdc, 0x12, 0x5c, 0x02, 0xc5, 0x3a, 0x4e, -0x4e, 0x4f, 0xbf, 0xca, 0x40, 0x15, 0xc7, 0x6e, 0x8d, 0x41, 0xf1, 0x10, 0xe0, 0x4f, 0x7e, -0x97, 0x7f, 0x1c, 0xae, 0x47, 0x8e, 0x6b, 0xb1, 0x25, 0x31, 0xb0, 0x73, 0xc7, 0x1b, 0x97, -0x79, 0xf9, 0x80, 0xd3, 0x66, 0x22, 0x30, 0x07, 0x74, 0x1e, 0xe4, 0xd0, 0x80, 0x21, 0xd6, -0xee, 0x6b, 0x6c, 0x4f, 0xbf, 0xf5, 0xb7, 0xd9, 0x09, 0x87, 0x2f, 0xa9, 0x14, 0xbe, 0x27, -0xd9, 0x72, 0x50, 0x01, 0xd4, 0x13, 0x73, 0xa6, 0xa7, 0x51, 0x02, 0x75, 0x25, 0xe1, 0xb3, -0x45, 0x34, 0x7d, 0xa8, 0x8e, 0xeb, 0xf3, 0x16, 0x49, 0xcb, 0x4f, 0x8c, 0xa1, 0xb9, 0x36, -0x85, 0x39, 0x75, 0x5d, 0x08, 0x00, 0xae, 0xeb, 0xf6, 0xea, 0xd7, 0x13, 0x3a, 0x21, 0x5a, -0x5f, 0x30, 0x84, 0x52, 0x26, 0x95, 0xc9, 0x14, 0xf2, 0x57, 0x55, 0x6b, 0xb1, 0x10, 0xc2, -0xe1, 0xbd, 0x3b, 0x51, 0xc0, 0xb7, 0x55, 0x4c, 0x71, 0x12, 0x26, 0xc7, 0x0d, 0xf9, 0x51, -0xa4, 0x38, 0x02, 0x05, 0x7f, 0xb8, 0xf1, 0x72, 0x4b, 0xbf, 0x71, 0x89, 0x14, 0xf3, 0x77, -0x38, 0xd9, 0x71, 0x24, 0xf3, 0x00, 0x11, 0xa1, 0xd8, 0xd4, 0x69, 0x27, 0x08, 0x37, 0x35, -0xc9, 0x11, 0x9d, 0x90, 0x1c, 0x0e, 0xe7, 0x1c, 0xff, 0x2d, 0x1e, 0xe8, 0x92, 0xe1, 0x18, -0x10, 0x95, 0x7c, 0xe0, 0x80, 0xf4, 0x96, 0x43, 0x21, 0xf9, 0x75, 0x21, 0x64, 0x38, 0xdd, -0x9f, 0x1e, 0x95, 0x16, 0xda, 0x56, 0x1d, 0x4f, 0x9a, 0x53, 0xb2, 0xe2, 0xe4, 0x18, 0xcb, -0x6b, 0x1a, 0x65, 0xeb, 0x56, 0xc6, 0x3b, 0xe5, 0xfe, 0xd8, 0x26, 0x3f, 0x3a, 0x84, 0x59, -0x72, 0x66, 0xa2, 0xf3, 0x75, 0xff, 0xfb, 0x60, 0xb3, 0x22, 0xad, 0x3f, 0x2d, 0x6b, 0xf9, -0xeb, 0xea, 0x05, 0x7c, 0xd8, 0x8f, 0x6d, 0x2c, 0x98, 0x9e, 0x2b, 0x93, 0xf1, 0x5e, 0x46, -0xf0, 0x87, 0x49, 0x29, 0x73, 0x68, 0xd7, 0x7f, 0xf9, 0xf0, 0xe5, 0x7d, 0xdb, 0x1d, 0x75, -0x19, 0xf3, 0xc4, 0x58, 0x9b, 0x17, 0x88, 0xa8, 0x92, 0xe0, 0xbe, 0xbd, 0x8b, 0x1d, 0x8d, -0x9f, 0x56, 0x76, 0xad, 0xaf, 0x29, 0xe2, 0xd9, 0xd5, 0x52, 0xf6, 0xb5, 0x56, 0x35, 0x57, -0x3a, 0xc8, 0xe1, 0x56, 0x43, 0x19, 0x94, 0xd3, 0x04, 0x9b, 0x6d, 0x35, 0xd8, 0x0b, 0x5f, -0x4d, 0x19, 0x8e, 0xec, 0xfa, 0x64, 0x91, 0x0a, 0x72, 0x20, 0x2b, 0xbc, 0x1a, 0x4a, 0xfe, -0x8b, 0xfd, 0xbb, 0xed, 0x1b, 0x23, 0xea, 0xad, 0x72, 0x82, 0xa1, 0x29, 0x99, 0x71, 0xbd, -0xf0, 0x95, 0xc1, 0x03, 0xdd, 0x7b, 0xc2, 0xb2, 0x3c, 0x28, 0x54, 0xd3, 0x68, 0xa4, 0x72, -0xc8, 0x66, 0x96, 0xe0, 0xd1, 0xd8, 0x7f, 0xf8, 0xd1, 0x26, 0x2b, 0xf7, 0xad, 0xba, 0x55, -0xca, 0x15, 0xb9, 0x32, 0xc3, 0xe5, 0x88, 0x97, 0x8e, 0x5c, 0xfb, 0x92, 0x25, 0x8b, 0xbf, -0xa2, 0x45, 0x55, 0x7a, 0xa7, 0x6f, 0x8b, 0x57, 0x5b, 0xcf, 0x0e, 0xcb, 0x1d, 0xfb, 0x20, -0x82, 0x77, 0xa8, 0x8c, 0xcc, 0x16, 0xce, 0x1d, 0xfa, 0xde, 0xcc, 0x0b, 0x62, 0xfe, 0xcc, -0xe1, 0xb7, 0xf0, 0xc3, 0x81, 0x64, 0x73, 0x40, 0xa0, 0xc2, 0x4d, 0x89, 0x11, 0x75, 0x33, -0x55, 0x33, 0x8d, 0xe8, 0x4a, 0xfd, 0xea, 0x6e, 0x30, 0x0b, 0xd7, 0x31, 0x2c, 0xde, 0x47, -0xe3, 0xbf, 0xf8, 0x55, 0x42, 0xe2, 0x7f, 0x59, 0xe5, 0x17, 0xef, 0x99, 0x34, 0x69, 0x91, -0xb1, 0x23, 0x8e, 0x20, 0x87, 0x2d, 0xa8, 0xfe, 0xd5, 0x8a, 0xf3, 0x84, 0x3a, 0xf0, 0x37, -0xe4, 0x09, 0x00, 0x54, 0xee, 0x67, 0x49, 0x93, 0xe4, 0x81, 0x70, 0xe3, 0x90, 0x4d, 0xef, -0xfe, 0x41, 0xb7, 0x99, 0x7b, 0xc1, 0x83, 0xba, 0x62, 0x12, 0x6f, 0x7d, 0xde, 0x6b, 0xaf, -0xda, 0x16, 0xf9, 0x55, 0x51, 0xee, 0xa6, 0x0c, 0x2b, 0x02, 0xa3, 0xfd, 0x8d, 0xfb, 0x30, -0x17, 0xe4, 0x6f, 0xdf, 0x36, 0x71, 0xc4, 0xca, 0x87, 0x25, 0x48, 0xb0, 0x47, 0xec, 0xea, -0xb4, 0xbf, 0xa5, 0x4d, 0x9b, 0x9f, 0x02, 0x93, 0xc4, 0xe3, 0xe4, 0xe8, 0x42, 0x2d, 0x68, -0x81, 0x15, 0x0a, 0xeb, 0x84, 0x5b, 0xd6, 0xa8, 0x74, 0xfb, 0x7d, 0x1d, 0xcb, 0x2c, 0xda, -0x46, 0x2a, 0x76, 0x62, 0xce, 0xbc, 0x5c, 0x9e, 0x8b, 0xe7, 0xcf, 0xbe, 0x78, 0xf5, 0x7c, -0xeb, 0xb3, 0x3a, 0x9c, 0xaa, 0x6f, 0xcc, 0x72, 0xd1, 0x59, 0xf2, 0x11, 0x23, 0xd6, 0x3f, -0x48, 0xd1, 0xb7, 0xce, 0xb0, 0xbf, 0xcb, 0xea, 0x80, 0xde, 0x57, 0xd4, 0x5e, 0x97, 0x2f, -0x75, 0xd1, 0x50, 0x8e, 0x80, 0x2c, 0x66, 0x79, 0xbf, 0x72, 0x4b, 0xbd, 0x8a, 0x81, 0x6c, -0xd3, 0xe1, 0x01, 0xdc, 0xd2, 0x15, 0x26, 0xc5, 0x36, 0xda, 0x2c, 0x1a, 0xc0, 0x27, 0x94, -0xed, 0xb7, 0x9b, 0x85, 0x0b, 0x5e, 0x80, 0x97, 0xc5, 0xec, 0x4f, 0xec, 0x88, 0x5d, 0x50, -0x07, 0x35, 0x47, 0xdc, 0x0b, 0x3b, 0x3d, 0xdd, 0x60, 0xaf, 0xa8, 0x5d, 0x81, 0x38, 0x24, -0x25, 0x5d, 0x5c, 0x15, 0xd1, 0xde, 0xb3, 0xab, 0xec, 0x05, 0x69, 0xef, 0x83, 0xed, 0x57, -0x54, 0xb8, 0x64, 0x64, 0x11, 0x16, 0x32, 0x69, 0xda, 0x9f, 0x2d, 0x7f, 0x36, 0xbb, 0x44, -0x5a, 0x34, 0xe8, 0x7f, 0xbf, 0x03, 0xeb, 0x00, 0x7f, 0x59, 0x68, 0x22, 0x79, 0xcf, 0x73, -0x6c, 0x2c, 0x29, 0xa7, 0xa1, 0x5f, 0x38, 0xa1, 0x1d, 0xf0, 0x20, 0x53, 0xe0, 0x1a, 0x63, -0x14, 0x58, 0x71, 0x10, 0xaa, 0x08, 0x0c, 0x3e, 0x16, 0x1a, 0x60, 0x22, 0x82, 0x7f, 0xba, -0xa4, 0x43, 0xa0, 0xd0, 0xac, 0x1b, 0xd5, 0x6b, 0x64, 0xb5, 0x14, 0x93, 0x31, 0x9e, 0x53, -0x50, 0xd0, 0x57, 0x66, 0xee, 0x5a, 0x4f, 0xfb, 0x03, 0x2a, 0x69, 0x58, 0x76, 0xf1, 0x83, -0xf7, 0x4e, 0xba, 0x8c, 0x42, 0x06, 0x60, 0x5d, 0x6d, 0xce, 0x60, 0x88, 0xae, 0xa4, 0xc3, -0xf1, 0x03, 0xa5, 0x4b, 0x98, 0xa1, 0xff, 0x67, 0xe1, 0xac, 0xa2, 0xb8, 0x62, 0xd7, 0x6f, -0xa0, 0x31, 0xb4, 0xd2, 0x77, 0xaf, 0x21, 0x10, 0x06, 0xc6, 0x9a, 0xff, 0x1d, 0x09, 0x17, -0x0e, 0x5f, 0xf1, 0xaa, 0x54, 0x34, 0x4b, 0x45, 0x8a, 0x87, 0x63, 0xa6, 0xdc, 0xf9, 0x24, -0x30, 0x67, 0xc6, 0xb2, 0xd6, 0x61, 0x33, 0x69, 0xee, 0x50, 0x61, 0x57, 0x28, 0xe7, 0x7e, -0xee, 0xec, 0x3a, 0x5a, 0x73, 0x4e, 0xa8, 0x8d, 0xe4, 0x18, 0xea, 0xec, 0x41, 0x64, 0xc8, -0xe2, 0xe8, 0x66, 0xb6, 0x2d, 0xb6, 0xfb, 0x6a, 0x6c, 0x16, 0xb3, 0xdd, 0x46, 0x43, 0xb9, -0x73, 0x00, 0x6a, 0x71, 0xed, 0x4e, 0x9d, 0x25, 0x1a, 0xc3, 0x3c, 0x4a, 0x95, 0x15, 0x99, -0x35, 0x81, 0x14, 0x02, 0xd6, 0x98, 0x9b, 0xec, 0xd8, 0x23, 0x3b, 0x84, 0x29, 0xaf, 0x0c, -0x99, 0x83, 0xa6, 0x9a, 0x34, 0x4f, 0xfa, 0xe8, 0xd0, 0x3c, 0x4b, 0xd0, 0xfb, 0xb6, 0x68, -0xb8, 0x9e, 0x8f, 0xcd, 0xf7, 0x60, 0x2d, 0x7a, 0x22, 0xe5, 0x7d, 0xab, 0x65, 0x1b, 0x95, -0xa7, 0xa8, 0x7f, 0xb6, 0x77, 0x47, 0x7b, 0x5f, 0x8b, 0x12, 0x72, 0xd0, 0xd4, 0x91, 0xef, -0xde, 0x19, 0x50, 0x3c, 0xa7, 0x8b, 0xc4, 0xa9, 0xb3, 0x23, 0xcb, 0x76, 0xe6, 0x81, 0xf0, -0xc1, 0x04, 0x8f, 0xa3, 0xb8, 0x54, 0x5b, 0x97, 0xac, 0x19, 0xff, 0x3f, 0x55, 0x27, 0x2f, -0xe0, 0x1d, 0x42, 0x9b, 0x57, 0xfc, 0x4b, 0x4e, 0x0f, 0xce, 0x98, 0xa9, 0x43, 0x57, 0x03, -0xbd, 0xe7, 0xc8, 0x94, 0xdf, 0x6e, 0x36, 0x73, 0x32, 0xb4, 0xef, 0x2e, 0x85, 0x7a, 0x6e, -0xfc, 0x6c, 0x18, 0x82, 0x75, 0x35, 0x90, 0x07, 0xf3, 0xe4, 0x9f, 0x3e, 0xdc, 0x68, 0xf3, -0xb5, 0xf3, 0x19, 0x80, 0x92, 0x06, 0x99, 0xa2, 0xe8, 0x6f, 0xff, 0x2e, 0x7f, 0xae, 0x42, -0xa4, 0x5f, 0xfb, 0xd4, 0x0e, 0x81, 0x2b, 0xc3, 0x04, 0xff, 0x2b, 0xb3, 0x74, 0x4e, 0x36, -0x5b, 0x9c, 0x15, 0x00, 0xc6, 0x47, 0x2b, 0xe8, 0x8b, 0x3d, 0xf1, 0x9c, 0x03, 0x9a, 0x58, -0x7f, 0x9b, 0x9c, 0xbf, 0x85, 0x49, 0x79, 0x35, 0x2e, 0x56, 0x7b, 0x41, 0x14, 0x39, 0x47, -0x83, 0x26, 0xaa, 0x07, 0x89, 0x98, 0x11, 0x1b, 0x86, 0xe7, 0x73, 0x7a, 0xd8, 0x7d, 0x78, -0x61, 0x53, 0xe9, 0x79, 0xf5, 0x36, 0x8d, 0x44, 0x92, 0x84, 0xf9, 0x13, 0x50, 0x58, 0x3b, -0xa4, 0x6a, 0x36, 0x65, 0x49, 0x8e, 0x3c, 0x0e, 0xf1, 0x6f, 0xd2, 0x84, 0xc4, 0x7e, 0x8e, -0x3f, 0x39, 0xae, 0x7c, 0x84, 0xf1, 0x63, 0x37, 0x8e, 0x3c, 0xcc, 0x3e, 0x44, 0x81, 0x45, -0xf1, 0x4b, 0xb9, 0xed, 0x6b, 0x36, 0x5d, 0xbb, 0x20, 0x60, 0x1a, 0x0f, 0xa3, 0xaa, 0x55, -0x77, 0x3a, 0xa9, 0xae, 0x37, 0x4d, 0xba, 0xb8, 0x86, 0x6b, 0xbc, 0x08, 0x50, 0xf6, 0xcc, -0xa4, 0xbd, 0x1d, 0x40, 0x72, 0xa5, 0x86, 0xfa, 0xe2, 0x10, 0xae, 0x3d, 0x58, 0x4b, 0x97, -0xf3, 0x43, 0x74, 0xa9, 0x9e, 0xeb, 0x21, 0xb7, 0x01, 0xa4, 0x86, 0x93, 0x97, 0xee, 0x2f, -0x4f, 0x3b, 0x86, 0xa1, 0x41, 0x6f, 0x41, 0x26, 0x90, 0x78, 0x5c, 0x7f, 0x30, 0x38, 0x4b, -0x3f, 0xaa, 0xec, 0xed, 0x5c, 0x6f, 0x0e, 0xad, 0x43, 0x87, 0xfd, 0x93, 0x35, 0xe6, 0x01, -0xef, 0x41, 0x26, 0x90, 0x99, 0x9e, 0xfb, 0x19, 0x5b, 0xad, 0xd2, 0x91, 0x8a, 0xe0, 0x46, -0xaf, 0x65, 0xfa, 0x4f, 0x84, 0xc1, 0xa1, 0x2d, 0xcf, 0x45, 0x8b, 0xd3, 0x85, 0x50, 0x55, -0x7c, 0xf9, 0x67, 0x88, 0xd4, 0x4e, 0xe9, 0xd7, 0x6b, 0x61, 0x54, 0xa1, 0xa4, 0xa6, 0xa2, -0xc2, 0xbf, 0x30, 0x9c, 0x40, 0x9f, 0x5f, 0xd7, 0x69, 0x2b, 0x24, 0x82, 0x5e, 0xd9, 0xd6, -0xa7, 0x12, 0x54, 0x1a, 0xf7, 0x55, 0x9f, 0x76, 0x50, 0xa9, 0x95, 0x84, 0xe6, 0x6b, 0x6d, -0xb5, 0x96, 0x54, 0xd6, 0xcd, 0xb3, 0xa1, 0x9b, 0x46, 0xa7, 0x94, 0x4d, 0xc4, 0x94, 0xb4, -0x98, 0xe3, 0xe1, 0xe2, 0x34, 0xd5, 0x33, 0x16, 0x07, 0x54, 0xcd, 0xb7, 0x77, 0x53, 0xdb, -0x4f, 0x4d, 0x46, 0x9d, 0xe9, 0xd4, 0x9c, 0x8a, 0x36, 0xb6, 0xb8, 0x38, 0x26, 0x6c, 0x0e, -0xff, 0x9c, 0x1b, 0x43, 0x8b, 0x80, 0xcc, 0xb9, 0x3d, 0xda, 0xc7, 0xf1, 0x8a, 0xf2, 0x6d, -0xb8, 0xd7, 0x74, 0x2f, 0x7e, 0x1e, 0xb7, 0xd3, 0x4a, 0xb4, 0xac, 0xfc, 0x79, 0x48, 0x6c, -0xbc, 0x96, 0xb6, 0x94, 0x46, 0x57, 0x2d, 0xb0, 0xa3, 0xfc, 0x1e, 0xb9, 0x52, 0x60, 0x85, -0x2d, 0x41, 0xd0, 0x43, 0x01, 0x1e, 0x1c, 0xd5, 0x7d, 0xfc, 0xf3, 0x96, 0x0d, 0xc7, 0xcb, -0x2a, 0x29, 0x9a, 0x93, 0xdd, 0x88, 0x2d, 0x37, 0x5d, 0xaa, 0xfb, 0x49, 0x68, 0xa0, 0x9c, -0x50, 0x86, 0x7f, 0x68, 0x56, 0x57, 0xf9, 0x79, 0x18, 0x39, 0xd4, 0xe0, 0x01, 0x84, 0x33, -0x61, 0xca, 0xa5, 0xd2, 0xd6, 0xe4, 0xc9, 0x8a, 0x4a, 0x23, 0x44, 0x4e, 0xbc, 0xf0, 0xdc, -0x24, 0xa1, 0xa0, 0xc4, 0xe2, 0x07, 0x3c, 0x10, 0xc4, 0xb5, 0x25, 0x4b, 0x65, 0x63, 0xf4, -0x80, 0xe7, 0xcf, 0x61, 0xb1, 0x71, 0x82, 0x21, 0x87, 0x2c, 0xf5, 0x91, 0x00, 0x32, 0x0c, -0xec, 0xa9, 0xb5, 0x9a, 0x74, 0x85, 0xe3, 0x36, 0x8f, 0x76, 0x4f, 0x9c, 0x6d, 0xce, 0xbc, -0xad, 0x0a, 0x4b, 0xed, 0x76, 0x04, 0xcb, 0xc3, 0xb9, 0x33, 0x9e, 0x01, 0x93, 0x96, 0x69, -0x7d, 0xc5, 0xa2, 0x45, 0x79, 0x9b, 0x04, 0x5c, 0x84, 0x09, 0xed, 0x88, 0x43, 0xc7, 0xab, -0x93, 0x14, 0x26, 0xa1, 0x40, 0xb5, 0xce, 0x4e, 0xbf, 0x2a, 0x42, 0x85, 0x3e, 0x2c, 0x3b, -0x54, 0xe8, 0x12, 0x1f, 0x0e, 0x97, 0x59, 0xb2, 0x27, 0x89, 0xfa, 0xf2, 0xdf, 0x8e, 0x68, -0x59, 0xdc, 0x06, 0xbc, 0xb6, 0x85, 0x0d, 0x06, 0x22, 0xec, 0xb1, 0xcb, 0xe5, 0x04, 0xe6, -0x3d, 0xb3, 0xb0, 0x41, 0x73, 0x08, 0x3f, 0x3c, 0x58, 0x86, 0x63, 0xeb, 0x50, 0xee, 0x1d, -0x2c, 0x37, 0x74, 0xa9, 0xd3, 0x18, 0xa3, 0x47, 0x6e, 0x93, 0x54, 0xad, 0x0a, 0x5d, 0xb8, -0x2a, 0x55, 0x5d, 0x78, 0xf6, 0xee, 0xbe, 0x8e, 0x3c, 0x76, 0x69, 0xb9, 0x40, 0xc2, 0x34, -0xec, 0x2a, 0xb9, 0xed, 0x7e, 0x20, 0xe4, 0x8d, 0x00, 0x38, 0xc7, 0xe6, 0x8f, 0x44, 0xa8, -0x86, 0xce, 0xeb, 0x2a, 0xe9, 0x90, 0xf1, 0x4c, 0xdf, 0x32, 0xfb, 0x73, 0x1b, 0x6d, 0x92, -0x1e, 0x95, 0xfe, 0xb4, 0xdb, 0x65, 0xdf, 0x4d, 0x23, 0x54, 0x89, 0x48, 0xbf, 0x4a, 0x2e, -0x70, 0xd6, 0xd7, 0x62, 0xb4, 0x33, 0x29, 0xb1, 0x3a, 0x33, 0x4c, 0x23, 0x6d, 0xa6, 0x76, -0xa5, 0x21, 0x63, 0x48, 0xe6, 0x90, 0x5d, 0xed, 0x90, 0x95, 0x0b, 0x7a, 0x84, 0xbe, 0xb8, -0x0d, 0x5e, 0x63, 0x0c, 0x62, 0x26, 0x4c, 0x14, 0x5a, 0xb3, 0xac, 0x23, 0xa4, 0x74, 0xa7, -0x6f, 0x33, 0x30, 0x05, 0x60, 0x01, 0x42, 0xa0, 0x28, 0xb7, 0xee, 0x19, 0x38, 0xf1, 0x64, -0x80, 0x82, 0x43, 0xe1, 0x41, 0x27, 0x1f, 0x1f, 0x90, 0x54, 0x7a, 0xd5, 0x23, 0x2e, 0xd1, -0x3d, 0xcb, 0x28, 0xba, 0x58, 0x7f, 0xdc, 0x7c, 0x91, 0x24, 0xe9, 0x28, 0x51, 0x83, 0x6e, -0xc5, 0x56, 0x21, 0x42, 0xed, 0xa0, 0x56, 0x22, 0xa1, 0x40, 0x80, 0x6b, 0xa8, 0xf7, 0x94, -0xca, 0x13, 0x6b, 0x0c, 0x39, 0xd9, 0xfd, 0xe9, 0xf3, 0x6f, 0xa6, 0x9e, 0xfc, 0x70, 0x8a, -0xb3, 0xbc, 0x59, 0x3c, 0x1e, 0x1d, 0x6c, 0xf9, 0x7c, 0xaf, 0xf9, 0x88, 0x71, 0x95, 0xeb, -0x57, 0x00, 0xbd, 0x9f, 0x8c, 0x4f, 0xe1, 0x24, 0x83, 0xc5, 0x22, 0xea, 0xfd, 0xd3, 0x0c, -0xe2, 0x17, 0x18, 0x7c, 0x6a, 0x4c, 0xde, 0x77, 0xb4, 0x53, 0x9b, 0x4c, 0x81, 0xcd, 0x23, -0x60, 0xaa, 0x0e, 0x25, 0x73, 0x9c, 0x02, 0x79, 0x32, 0x30, 0xdf, 0x74, 0xdf, 0x75, 0x19, -0xf4, 0xa5, 0x14, 0x5c, 0xf7, 0x7a, 0xa8, 0xa5, 0x91, 0x84, 0x7c, 0x60, 0x03, 0x06, 0x3b, -0xcd, 0x50, 0xb6, 0x27, 0x9c, 0xfe, 0xb1, 0xdd, 0xcc, 0xd3, 0xb0, 0x59, 0x24, 0xb2, 0xca, -0xe2, 0x1c, 0x81, 0x22, 0x9d, 0x07, 0x8f, 0x8e, 0xb9, 0xbe, 0x4e, 0xfa, 0xfc, 0x39, 0x65, -0xba, 0xbf, 0x9d, 0x12, 0x37, 0x5e, 0x97, 0x7e, 0xf3, 0x89, 0xf5, 0x5d, 0xf5, 0xe3, 0x09, -0x8c, 0x62, 0xb5, 0x20, 0x9d, 0x0c, 0x53, 0x8a, 0x68, 0x1b, 0xd2, 0x8f, 0x75, 0x17, 0x5d, -0xd4, 0xe5, 0xda, 0x75, 0x62, 0x19, 0x14, 0x6a, 0x26, 0x2d, 0xeb, 0xf8, 0xaf, 0x37, 0xf0, -0x6c, 0xa4, 0x55, 0xb1, 0xbc, 0xe2, 0x33, 0xc0, 0x9a, 0xca, 0xb0, 0x11, 0x49, 0x4f, 0x68, -0x9b, 0x3b, 0x6b, 0x3c, 0xcc, 0x13, 0xf6, 0xc7, 0x85, 0x61, 0x68, 0x42, 0xae, 0xbb, 0xdd, -0xcd, 0x45, 0x16, 0x29, 0x1d, 0xea, 0xdb, 0xc8, 0x03, 0x94, 0x3c, 0xee, 0x4f, 0x82, 0x11, -0xc3, 0xec, 0x28, 0xbd, 0x97, 0x05, 0x99, 0xde, 0xd7, 0xbb, 0x5e, 0x22, 0x1f, 0xd4, 0xeb, -0x64, 0xd9, 0x92, 0xd9, 0x85, 0xb7, 0x6a, 0x05, 0x6a, 0xe4, 0x24, 0x41, 0xf1, 0xcd, 0xf0, -0xd8, 0x3f, 0xf8, 0x9e, 0x0e, 0xcd, 0x0b, 0x7a, 0x70, 0x6b, 0x5a, 0x75, 0x0a, 0x6a, 0x33, -0x88, 0xec, 0x17, 0x75, 0x08, 0x70, 0x10, 0x2f, 0x24, 0xcf, 0xc4, 0xe9, 0x42, 0x00, 0x61, -0x94, 0xca, 0x1f, 0x3a, 0x76, 0x06, 0xfa, 0xd2, 0x48, 0x81, 0xf0, 0x77, 0x60, 0x03, 0x45, -0xd9, 0x61, 0xf4, 0xa4, 0x6f, 0x3d, 0xd9, 0x30, 0xc3, 0x04, 0x6b, 0x54, 0x2a, 0xb7, 0xec, -0x3b, 0xf4, 0x4b, 0xf5, 0x68, 0x52, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xa5, -0xa9, 0xb1, 0xe0, 0x23, 0xc4, 0x0a, 0x77, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xa5, 0xa9, 0xb1, -0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0xeb, 0x54, 0x0b, -0x75, 0x68, 0x52, 0x07, 0x8c, 0x9a, 0x97, 0x8d, 0x79, 0x70, 0x62, 0x46, 0xef, 0x5c, 0x1b, -0x95, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x67, 0x4c, 0x1a, 0xb6, -0xcf, 0xfd, 0x78, 0x53, 0x24, 0xab, 0xb5, 0xc9, 0xf1, 0x60, 0x23, 0xa5, 0xc8, 0x12, 0x87, -0x6d, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xc7, 0x0c, 0x9a, 0x97, 0xac, -0xda, 0x36, 0xee, 0x5e, 0x3e, 0xdf, 0x1d, 0xb8, 0xf2, 0x66, 0x2f, 0xbd, 0xf8, 0x72, 0x47, -0xed, 0x58, 0x13, 0x85, 0x88, 0x92, 0x87, 0x8c, 0x7b, 0x55, 0x09, 0x90, 0xa2, 0xc6, 0xef, -0x3d, 0xf8, 0x53, 0x24, 0xab, 0xd4, 0x2a, 0xb7, 0xec, 0x5a, 0x36, 0xee, 0x5e, 0x3e, 0xdf, -0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x59, 0x30, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x53, 0x05, 0x69, -0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, 0x19, 0xb0, 0xe2, 0x27, 0xcc, 0xfb, 0x74, -0x4b, 0x14, 0x8b, 0x94, 0x8b, 0x75, 0x68, 0x33, 0xc5, 0x08, 0x92, 0x87, 0x8c, 0x9a, 0xb6, -0xcf, 0x1c, 0xba, 0xd7, 0x0d, 0x98, 0xb2, 0xe6, 0x2f, 0xdc, 0x1b, 0x95, 0x89, 0x71, 0x60, -0x23, 0xc4, 0x0a, 0x96, 0x8f, 0x9c, 0xba, 0xf6, 0x6e, 0x3f, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, -0x26, 0xaf, 0xbd, 0xf8, 0x72, 0x66, 0x2f, 0xdc, 0x1b, 0xb4, 0xcb, 0x14, 0x8b, 0x94, 0xaa, -0xb7, 0xcd, 0xf9, 0x51, 0x01, 0x80, 0x82, 0x86, 0x6f, 0x3d, 0xd9, 0x30, 0xe2, 0x27, 0xcc, -0xfb, 0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x70, 0x43, 0x04, 0x6b, 0x35, 0xc9, 0xf1, -0x60, 0x23, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, 0x6d, 0x58, 0x32, 0xe6, 0x2f, 0xbd, -0xf8, 0x72, 0x66, 0x4e, 0x1e, 0xbe, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x1d, 0x99, 0x91, 0xa0, -0xa3, 0xc4, 0x0a, 0x77, 0x4d, 0x18, 0x93, 0xa4, 0xab, 0xd4, 0x0b, 0x75, 0x49, 0x10, 0xa2, -0xc6, 0xef, 0x3d, 0xf8, 0x53, 0x24, 0xab, 0xb5, 0xe8, 0x33, 0xe4, 0x4a, 0x16, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xb3, 0xc5, 0x08, 0x73, 0x45, 0xe9, 0x31, 0xc1, 0xe1, 0x21, -0xa1, 0xa1, 0xa1, 0xc0, 0x02, 0x86, 0x6f, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, 0x93, 0xa4, 0xca, -0x16, 0xae, 0xde, 0x1f, 0x9d, 0x99, 0xb0, 0xe2, 0x46, 0xef, 0x3d, 0xf8, 0x72, 0x47, 0x0c, -0x9a, 0xb6, 0xcf, 0xfd, 0x59, 0x11, 0xa0, 0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0x08, 0x92, 0x87, -0x6d, 0x39, 0xf0, 0x43, 0x04, 0x8a, 0x96, 0xae, 0xde, 0x3e, 0xdf, 0x1d, 0x99, 0x91, 0xa0, -0xc2, 0x06, 0x6f, 0x3d, 0xf8, 0x72, 0x47, 0x0c, 0x9a, 0x97, 0x8d, 0x98, 0x93, 0x85, 0x88, -0x73, 0x45, 0xe9, 0x31, 0xe0, 0x23, 0xa5, 0xa9, 0xd0, 0x03, 0x84, 0x8a, 0x96, 0xae, 0xde, -0x1f, 0xbc, 0xdb, 0x15, 0xa8, 0xd2, 0x26, 0xce, 0xff, 0x5d, 0x19, 0x91, 0x81, 0x80, 0x82, -0x67, 0x2d, 0xd8, 0x13, 0xa4, 0xab, 0xd4, 0x0b, 0x94, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, -0xa3, 0xa5, 0xc8, 0xf3, 0x45, 0xe9, 0x50, 0x22, 0xc6, 0xef, 0x5c, 0x3a, 0xd7, 0x0d, 0x98, -0x93, 0x85, 0x88, 0x73, 0x64, 0x4a, 0xf7, 0x4d, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0x0a, 0x96, -0xae, 0xde, 0x3e, 0xfe, 0x7e, 0x7e, 0x7e, 0x5f, 0x3c, 0xfa, 0x76, 0x4f, 0xfd, 0x78, 0x72, -0x66, 0x2f, 0xbd, 0xd9, 0x30, 0xc3, 0xe5, 0x48, 0x12, 0x87, 0x8c, 0x7b, 0x55, 0x28, 0xd2, -0x07, 0x8c, 0x9a, 0x97, 0xac, 0xda, 0x17, 0x8d, 0x79, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x54, -0x0b, 0x94, 0x8b, 0x94, 0xaa, 0xd6, 0x2e, 0xbf, 0xfc, 0x5b, 0x15, 0xa8, 0xd2, 0x26, 0xaf, -0xdc, 0x1b, 0xb4, 0xea, 0x37, 0xec, 0x3b, 0xf4, 0x6a, 0x37, 0xcd, 0x18, 0x93, 0x85, 0x69, -0x31, 0xc1, 0xe1, 0x40, 0xe3, 0x25, 0xc8, 0x12, 0x87, 0x8c, 0x9a, 0xb6, 0xcf, 0xfd, 0x59, -0x11, 0xa0, 0xc2, 0x06, 0x8e, 0x7f, 0x5d, 0x38, 0xf2, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x37, -0xec, 0x5a, 0x36, 0xee, 0x3f, 0xfc, 0x7a, 0x76, 0x4f, 0x1c, 0x9b, 0x95, 0x89, 0x71, 0x41, -0x00, 0x63, 0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x0f, 0x9c, 0xba, 0xd7, 0x0d, 0x98, 0x93, 0x85, -0x69, 0x31, 0xc1, 0x00, 0x82, 0x86, 0x8e, 0x9e, 0xbe, 0xdf, 0x3c, 0xfa, 0x57, 0x2c, 0xda, -0x36, 0xee, 0x3f, 0xfc, 0x5b, 0x15, 0x89, 0x71, 0x41, 0x00, 0x82, 0x86, 0x8e, 0x7f, 0x5d, -0x38, 0xf2, 0x47, 0xed, 0x58, 0x13, 0xa4, 0xca, 0xf7, 0x4d, 0xf9, 0x51, 0x01, 0x80, 0x63, -0x44, 0xeb, 0x54, 0x2a, 0xd6, 0x2e, 0xbf, 0xdd, 0x19, 0x91, 0xa0, 0xa3, 0xa5, 0xa9, 0xb1, -0xe0, 0x42, 0x06, 0x8e, 0x7f, 0x5d, 0x19, 0x91, 0xa0, 0xa3, 0xc4, 0x0a, 0x96, 0x8f, 0x7d, -0x78, 0x72, 0x47, 0x0c, 0x7b, 0x74, 0x6a, 0x56, 0x2e, 0xde, 0x1f, 0xbc, 0xfa, 0x57, 0x0d, -0x79, 0x51, 0x01, 0x61, 0x21, 0xa1, 0xc0, 0xe3, 0x25, 0xa9, 0xb1, 0xc1, 0xe1, 0x40, 0x02, -0x67, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0x93, 0xa4, 0xab, 0xd4, 0x2a, 0xd6, 0x0f, 0x9c, 0x9b, -0xb4, 0xcb, 0x14, 0xaa, 0xb7, 0xcd, 0xf9, 0x51, 0x20, 0xa3, 0xc4, 0xeb, 0x35, 0xc9, 0xf1, -0x60, 0x42, 0x06, 0x8e, 0x7f, 0x7c, 0x7a, 0x76, 0x6e, 0x3f, 0xfc, 0x7a, 0x76, 0x6e, 0x5e, -0x3e, 0xfe, 0x7e, 0x5f, 0x3c, 0xdb, 0x15, 0x89, 0x71, 0x41, 0xe1, 0x21, 0xc0, 0xe3, 0x44, -0xeb, 0x54, 0x2a, 0xb7, 0xcd, 0xf9, 0x70, 0x62, 0x27, 0xad, 0xd8, 0x32, 0xc7, 0x0c, 0x7b, -0x74, 0x4b, 0x14, 0xaa, 0xb7, 0xec, 0x3b, 0xd5, 0x28, 0xd2, 0x07, 0x6d, 0x39, 0xd1, 0x20, -0xc2, 0xe7, 0x4c, 0x1a, 0x97, 0x8d, 0x98, 0xb2, 0xc7, 0x0c, 0x59, 0x28, 0xf3, 0x9b }; diff --git a/keyboards/oddball/rules.mk b/keyboards/oddball/rules.mk index f1e7d489409..d675ebcf2be 100644 --- a/keyboards/oddball/rules.mk +++ b/keyboards/oddball/rules.mk @@ -21,7 +21,3 @@ SPLIT_KEYBOARD = yes POINTING_DEVICE_ENABLE = yes DEFAULT_FOLDER = oddball/v1 - -SRC += spi_master.c -SRC += drivers/sensors/adns9800.c -SRC += pmw/pmw.c diff --git a/keyboards/odelia/rules.mk b/keyboards/odelia/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/odelia/rules.mk +++ b/keyboards/odelia/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index aafed8a407e..faccfcc646c 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -71,5 +70,3 @@ along with this program. If not, see . #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/ok60/ok60.h b/keyboards/ok60/ok60.h index d64f951c424..4e6aeb2c354 100644 --- a/keyboards/ok60/ok60.h +++ b/keyboards/ok60/ok60.h @@ -1,77 +1,75 @@ -#ifndef OK60_H -#define OK60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_60_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_ansi_split_bksp_rshift( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_iso( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_iso_split_rshift( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K400, K401, K402, K406, K410, K411, K412, K413 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC314 }, \ - { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_60_hhkb( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ - K401, K402, K406, K411, K412 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k41, k42, k46, k4B, k4C \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, KC_NO }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ - { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, K412, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { XXX, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, XXX, XXX } \ } - - -#endif diff --git a/keyboards/ok60/rules.mk b/keyboards/ok60/rules.mk index b8967270096..7c15782a194 100644 --- a/keyboards/ok60/rules.mk +++ b/keyboards/ok60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/omnikey_bh/config.h b/keyboards/omnikey_bh/config.h index 272424cf9ea..7d170077a9c 100644 --- a/keyboards/omnikey_bh/config.h +++ b/keyboards/omnikey_bh/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,5 +45,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/omnikey_bh/rules.mk b/keyboards/omnikey_bh/rules.mk index 635cab95376..5d9c83a5a2e 100644 --- a/keyboards/omnikey_bh/rules.mk +++ b/keyboards/omnikey_bh/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/omnikeyish/rules.mk b/keyboards/omnikeyish/rules.mk index a80b9c8a9eb..70eb8240d63 100644 --- a/keyboards/omnikeyish/rules.mk +++ b/keyboards/omnikeyish/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/opendeck/32/rev1/config.h b/keyboards/opendeck/32/rev1/config.h index 8b25ab2564e..73967671d0e 100644 --- a/keyboards/opendeck/32/rev1/config.h +++ b/keyboards/opendeck/32/rev1/config.h @@ -36,11 +36,58 @@ // RGB matrix #define DRIVER_ADDR_1 0b1110100 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL (4 * 8 * 3) -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +#define DRIVER_LED_TOTAL (4 * 8 * 3) #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_SPIRAL #define RGB_MATRIX_DISABLE_KEYCODES +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Set 0 if debouncing isn't needed #define DEBOUNCE 5 diff --git a/keyboards/opendeck/32/rev1/rev1.c b/keyboards/opendeck/32/rev1/rev1.c index 91f59a60b7b..332dc3cc400 100644 --- a/keyboards/opendeck/32/rev1/rev1.c +++ b/keyboards/opendeck/32/rev1/rev1.c @@ -17,7 +17,7 @@ #include "rev1.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/opus/rules.mk b/keyboards/opus/rules.mk index d295b00f4ff..a84bf226273 100644 --- a/keyboards/opus/rules.mk +++ b/keyboards/opus/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/orange75/rules.mk b/keyboards/orange75/rules.mk index 679653ffbb3..cbfbc1d583e 100644 --- a/keyboards/orange75/rules.mk +++ b/keyboards/orange75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 8189bc09604..42dbb831693 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -72,5 +71,3 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE #define TAPPING_TERM 200 - -#endif diff --git a/keyboards/org60/org60.h b/keyboards/org60/org60.h index 8ee94179cb0..34a41571f81 100644 --- a/keyboards/org60/org60.h +++ b/keyboards/org60/org60.h @@ -1,5 +1,4 @@ -#ifndef Org60_H -#define Org60_H +#pragma once #include "quantum.h" #include "led.h" @@ -19,33 +18,33 @@ inline void org60_bl_led_on(void) { DDRF |= (1<<5); PORTF &= ~(1<<5); } inline void org60_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } inline void org60_bl_led_off(void) { DDRF &= ~(1<<5); PORTF &= ~(1<<5); } +#define XXX KC_NO + /* Org60 Keymap Definition Macro */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K47, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K48, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k49, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k47, k3D, k3C, \ + k40, k41, k42, k45, k4A, k4B, k48, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ - { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,K47, K48, K49, K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, k47, k48, k49, k4A, k4B, k4C, k4D } \ } #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k41, k42, k45, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO,K2D }, \ - { K30, KC_NO,K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO,K3D }, \ - { K40, K41, K42, KC_NO,KC_NO,K45, KC_NO,KC_NO,KC_NO,KC_NO,K4A, K4B, K4C, K4D } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D }, \ + { k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4A, k4B, k4C, k4D } \ } - -#endif diff --git a/keyboards/org60/rules.mk b/keyboards/org60/rules.mk index 35de172038d..6b05c7d99a6 100644 --- a/keyboards/org60/rules.mk +++ b/keyboards/org60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options AUDIO_ENABLE = no # Audio output BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no # Console for debug EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/ortho5by12/rules.mk b/keyboards/ortho5by12/rules.mk index 0712246c027..a907bd4efe0 100644 --- a/keyboards/ortho5by12/rules.mk +++ b/keyboards/ortho5by12/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/orthocode/rules.mk b/keyboards/orthocode/rules.mk index a10ccde0ce4..d3553f56121 100644 --- a/keyboards/orthocode/rules.mk +++ b/keyboards/orthocode/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/owl8/rules.mk b/keyboards/owl8/rules.mk index a48c2c8768b..21c0c67b117 100644 --- a/keyboards/owl8/rules.mk +++ b/keyboards/owl8/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/owlab/jelly_epoch/hotswap/rules.mk b/keyboards/owlab/jelly_epoch/hotswap/rules.mk index 84d97527346..728c7b84c56 100644 --- a/keyboards/owlab/jelly_epoch/hotswap/rules.mk +++ b/keyboards/owlab/jelly_epoch/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/owlab/jelly_epoch/soldered/rules.mk b/keyboards/owlab/jelly_epoch/soldered/rules.mk index 84d97527346..728c7b84c56 100644 --- a/keyboards/owlab/jelly_epoch/soldered/rules.mk +++ b/keyboards/owlab/jelly_epoch/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/owlab/voice65/hotswap/config.h b/keyboards/owlab/voice65/hotswap/config.h index fc894bd3cec..42f97036b35 100644 --- a/keyboards/owlab/voice65/hotswap/config.h +++ b/keyboards/owlab/voice65/hotswap/config.h @@ -77,10 +77,56 @@ along with this program. If not, see . # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 67 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 67 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif /* Encoder */ diff --git a/keyboards/owlab/voice65/hotswap/rules.mk b/keyboards/owlab/voice65/hotswap/rules.mk index 2e0e8fa9622..c7217e605a9 100644 --- a/keyboards/owlab/voice65/hotswap/rules.mk +++ b/keyboards/owlab/voice65/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/owlab/voice65/soldered/config.h b/keyboards/owlab/voice65/soldered/config.h index e0e53a5d5dd..f0c68dc25b8 100644 --- a/keyboards/owlab/voice65/soldered/config.h +++ b/keyboards/owlab/voice65/soldered/config.h @@ -76,10 +76,57 @@ along with this program. If not, see . # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_STARTUP_VAL 128 # define DRIVER_ADDR_1 0b0110000 -# define DRIVER_ADDR_2 0b0110000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 71 -# define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +# define DRIVER_COUNT 1 +# define DRIVER_LED_TOTAL 71 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif /* Encoder */ diff --git a/keyboards/owlab/voice65/soldered/rules.mk b/keyboards/owlab/voice65/soldered/rules.mk index 06fa9852327..e508a48ec80 100644 --- a/keyboards/owlab/voice65/soldered/rules.mk +++ b/keyboards/owlab/voice65/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/paladin64/config.h b/keyboards/paladin64/config.h deleted file mode 100755 index fa588ee3541..00000000000 --- a/keyboards/paladin64/config.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER inachie -#define PRODUCT paladin64 - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -#ifdef PS2_USE_USART - #define PS2_CLOCK_PORT PORTD - #define PS2_CLOCK_PIN PIND - #define PS2_CLOCK_DDR DDRD - #define PS2_CLOCK_BIT 5 - #define PS2_DATA_PORT PORTD - #define PS2_DATA_PIN PIND - #define PS2_DATA_DDR DDRD - #define PS2_DATA_BIT 2 - - /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling - * edge */ - /* set DDR of CLOCK as input to be slave */ - #define PS2_USART_INIT() do { \ - PS2_CLOCK_DDR &= ~(1<", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_60_ansi": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] - }, - - "LAYOUT_infinity": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] - }, - - "LAYOUT_aek_103": { - "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] - }, - - "LAYOUT_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"@", "x":11.75, "y":2}, {"label":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] - } - } - } diff --git a/keyboards/paladin64/keymaps/default/keymap.c b/keyboards/paladin64/keymaps/default/keymap.c deleted file mode 100755 index 15c5858a81b..00000000000 --- a/keyboards/paladin64/keymaps/default/keymap.c +++ /dev/null @@ -1,45 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - /* QWERTY */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, - KC_TAB, 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_BSPC, - MO(3), 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_LCTL), - - /* DVORAK */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, - MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, - KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), - - /* COLEMAK */ - LAYOUT_all( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, - MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, - KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), - KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_APP, KC_RGUI, KC_RALT, KC_RCTL), - - /* FUNCTION */ - LAYOUT_all( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSPC, - KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, RGB_TOG), - - /* AutoMouse */ - LAYOUT_all( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) - -}; diff --git a/keyboards/paladin64/paladin64.c b/keyboards/paladin64/paladin64.c deleted file mode 100755 index 5ef78d5bf77..00000000000 --- a/keyboards/paladin64/paladin64.c +++ /dev/null @@ -1,2 +0,0 @@ -#include "paladin64.h" - diff --git a/keyboards/paladin64/paladin64.h b/keyboards/paladin64/paladin64.h deleted file mode 100755 index 9666b089884..00000000000 --- a/keyboards/paladin64/paladin64.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef PALADIN64_H -#define PALADIN64_H - -#include "quantum.h" - -#define LAYOUT_all( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_iso( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K41, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, K41, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_60_ansi( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_infinity( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K26, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, K22, \ - K30, K40, K50, K60, K70, K00, K10, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { K10, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, K22, K23, K24, K25, K26, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - -#define LAYOUT_aek_103( \ - K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ - K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ - K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ - K31, K42, K51, K61, K62, K71, K72, K01, K02, K11, K12, K21, \ - K30, K40, K50, K60, K70, K00, K20 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06, K07 }, \ - { KC_NO, K11, K12, K13, K14, K15, K16, K17 }, \ - { K20, K21, KC_NO, K23, K24, K25, KC_NO, K27 }, \ - { K30, K31, K32, K33, K34, K35, K36, K37 }, \ - { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ - { K50, K51, K52, K53, K54, K55, K56, K57 }, \ - { K60, K61, K62, K63, K64, K65, K66, K67 }, \ - { K70, K71, K72, K73, K74, K75, K76, K77 } \ -} - - -#endif diff --git a/keyboards/paladin64/readme.md b/keyboards/paladin64/readme.md deleted file mode 100644 index 8d62bb6b717..00000000000 --- a/keyboards/paladin64/readme.md +++ /dev/null @@ -1,19 +0,0 @@ -# Paladin64 ALPS PCB by /u/iNachie - -Firmware for the Paladin64 ALPS64 PCB, with underglow and an optional -trackpoint module. - -Keyboard Maintainer: [/u/iNachie](https://github.com/nachie) -Hardware Supported: Paladin64 ALPS PCB by iNachie -Hardware Availability: [/u/iNachie](https://www.reddit.com/user/inachie/) - -Make example for this keyboard (after setting up your build environment): - - make paladin64:default - -Or to make and flash: - - make paladin64:default:dfu - - -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/paladin64/rules.mk b/keyboards/paladin64/rules.mk deleted file mode 100755 index b25ab43119b..00000000000 --- a/keyboards/paladin64/rules.mk +++ /dev/null @@ -1,24 +0,0 @@ -# MCU name -MCU = atmega32u4 - -# Bootloader selection -BOOTLOADER = atmel-dfu - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -AUDIO_ENABLE = no -RGBLIGHT_ENABLE = yes -#PS2_MOUSE_ENABLE = yes -#PS2_USE_USART = yes -#PS2_USE_INT = yes - -LAYOUTS = 60_ansi diff --git a/keyboards/palette1202/keymaps/default/keymap.c b/keyboards/palette1202/keymaps/default/keymap.c index fb28dedbe5b..a1faa8558f4 100644 --- a/keyboards/palette1202/keymaps/default/keymap.c +++ b/keyboards/palette1202/keymaps/default/keymap.c @@ -274,7 +274,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // OLED Display #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // get layer Number uint8_t currentDefault = get_highest_layer(default_layer_state); uint8_t currentLayer = get_highest_layer(layer_state); @@ -326,5 +326,6 @@ void oled_task_user(void) { // pressed key / 4th line of the logo render_row(3, " "); } + return false; } #endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/keymaps/key-check/keymap.c b/keyboards/palette1202/keymaps/key-check/keymap.c index 6291b5f8a02..00666007a2b 100644 --- a/keyboards/palette1202/keymaps/key-check/keymap.c +++ b/keyboards/palette1202/keymaps/key-check/keymap.c @@ -142,10 +142,11 @@ bool encoder_update_user(uint8_t index, bool clockwise) { // OLED Display #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { render_row(0, "TEST"); render_row(1, "test"); render_row(2, "TEST"); render_row(3, "test"); + return false; } #endif // #ifdef OLED_ENABLE diff --git a/keyboards/palette1202/palette1202.c b/keyboards/palette1202/palette1202.c index be7fd6443ab..a193964e3e9 100644 --- a/keyboards/palette1202/palette1202.c +++ b/keyboards/palette1202/palette1202.c @@ -17,7 +17,7 @@ // initialize OLED if OLED is enabled #ifdef OLED_ENABLE - oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; - } +} #endif diff --git a/keyboards/panc40/rules.mk b/keyboards/panc40/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/panc40/rules.mk +++ b/keyboards/panc40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pearl/keymaps/cijanzen/rules.mk b/keyboards/pearl/keymaps/cijanzen/rules.mk index 8871739202d..c800dc98f8e 100644 --- a/keyboards/pearl/keymaps/cijanzen/rules.mk +++ b/keyboards/pearl/keymaps/cijanzen/rules.mk @@ -1,5 +1,5 @@ # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/peej/tripel/rules.mk b/keyboards/peej/tripel/rules.mk index 4b7af7c3f5a..8e4c582d1ca 100644 --- a/keyboards/peej/tripel/rules.mk +++ b/keyboards/peej/tripel/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/peranekofactory/tone/rev1/rules.mk b/keyboards/peranekofactory/tone/rev1/rules.mk index 7565bca8608..786af209df3 100644 --- a/keyboards/peranekofactory/tone/rev1/rules.mk +++ b/keyboards/peranekofactory/tone/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/peranekofactory/tone/rev2/rules.mk b/keyboards/peranekofactory/tone/rev2/rules.mk index 7565bca8608..786af209df3 100644 --- a/keyboards/peranekofactory/tone/rev2/rules.mk +++ b/keyboards/peranekofactory/tone/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/percent/booster/rules.mk b/keyboards/percent/booster/rules.mk index 388026dfcbf..e096ecf0ad4 100644 --- a/keyboards/percent/booster/rules.mk +++ b/keyboards/percent/booster/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/percent/canoe/config.h b/keyboards/percent/canoe/config.h index c349c1106c7..56793bab419 100644 --- a/keyboards/percent/canoe/config.h +++ b/keyboards/percent/canoe/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CANOE_CONFIG_H -#define CANOE_CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ along with this program. If not, see . #define BACKLIGHT_LEVELS 3 #define RGBLIGHT_ANIMATIONS - -#endif diff --git a/keyboards/percent/canoe/rules.mk b/keyboards/percent/canoe/rules.mk index 39602cba772..fd4f660f2d2 100644 --- a/keyboards/percent/canoe/rules.mk +++ b/keyboards/percent/canoe/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/percent/canoe_gen2/config.h b/keyboards/percent/canoe_gen2/config.h index 6409371d406..2188d9b41cd 100644 --- a/keyboards/percent/canoe_gen2/config.h +++ b/keyboards/percent/canoe_gen2/config.h @@ -65,3 +65,51 @@ along with this program. If not, see . #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS #define RGB_MATRIX_STARTUP_SPD 127 #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc index df0a0b15c20..94ff62b3a8c 100644 --- a/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc +++ b/keyboards/percent/canoe_gen2/rgb_matrix_kb.inc @@ -25,13 +25,13 @@ static bool indicator_static(effect_params_t* params) { HSV hsv = rgb_matrix_config.hsv; RGB rgb = hsv_to_rgb(hsv); RGB_MATRIX_USE_LIMITS(led_min, led_max); - for (uint8_t i = led_min ; i < 74; i++) { + for (uint8_t i = led_min; i < 74; i++) { rgb_matrix_set_color(i, 0x00, 0x00, 0x00); } - for (uint8_t i = 74 ; i < led_max; i++) { + for (uint8_t i = 74; i < led_max; i++) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { @@ -47,7 +47,7 @@ bool effect_runner_indicator(effect_params_t* params, i_f effect_func) { rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } static HSV indicator_gradient_math(HSV hsv, uint8_t i, uint8_t time) { @@ -64,4 +64,4 @@ static HSV indicator_cycle_all_math(HSV hsv, uint8_t i, uint8_t time) { bool indicator_cycle_all(effect_params_t* params) { return effect_runner_indicator(params, &indicator_cycle_all_math); } -#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/keyboards/percent/canoe_gen2/rules.mk b/keyboards/percent/canoe_gen2/rules.mk index 57b63dd91e1..6f69242f1e4 100644 --- a/keyboards/percent/canoe_gen2/rules.mk +++ b/keyboards/percent/canoe_gen2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/percent/skog/rules.mk b/keyboards/percent/skog/rules.mk index 7c8b7f8b205..f3c5286b0f9 100644 --- a/keyboards/percent/skog/rules.mk +++ b/keyboards/percent/skog/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk index 816646d34f7..41dffbfe8c2 100644 --- a/keyboards/phantom/rules.mk +++ b/keyboards/phantom/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phase_studio/titan65/hotswap/rules.mk b/keyboards/phase_studio/titan65/hotswap/rules.mk index c69bf7eb232..0def97ca75a 100644 --- a/keyboards/phase_studio/titan65/hotswap/rules.mk +++ b/keyboards/phase_studio/titan65/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phase_studio/titan65/soldered/rules.mk b/keyboards/phase_studio/titan65/soldered/rules.mk index b19edd1ab2e..6732257d1d4 100644 --- a/keyboards/phase_studio/titan65/soldered/rules.mk +++ b/keyboards/phase_studio/titan65/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/phoenix/rules.mk b/keyboards/phoenix/rules.mk index dd0fea97e05..7104f5785d1 100644 --- a/keyboards/phoenix/rules.mk +++ b/keyboards/phoenix/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/picolab/frusta_fundamental/rules.mk b/keyboards/picolab/frusta_fundamental/rules.mk index cebdc0080a7..59e517d3d6c 100644 --- a/keyboards/picolab/frusta_fundamental/rules.mk +++ b/keyboards/picolab/frusta_fundamental/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pimentoso/touhoupad/rules.mk b/keyboards/pimentoso/touhoupad/rules.mk index 7e416a7bf09..ac010606a25 100644 --- a/keyboards/pimentoso/touhoupad/rules.mk +++ b/keyboards/pimentoso/touhoupad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pinky/pinky.h b/keyboards/pinky/pinky.h index 9cc5d8d5898..67dfbe33701 100644 --- a/keyboards/pinky/pinky.h +++ b/keyboards/pinky/pinky.h @@ -13,17 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PINKY_H -#define PINKY_H -#include "quantum.h" - -#ifdef KEYBOARD_pinky_3 - #include "3.h" -#endif +#pragma once -#ifdef KEYBOARD_pinky_4 - #include "4.h" -#endif +#include "quantum.h" +#if defined(KEYBOARD_pinky_3) +# include "3.h" +#elif defined(KEYBOARD_pinky_4) +# include "4.h" #endif diff --git a/keyboards/pisces/rules.mk b/keyboards/pisces/rules.mk index 88e3b495e57..513eee02a3c 100644 --- a/keyboards/pisces/rules.mk +++ b/keyboards/pisces/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio_mp/rules.mk b/keyboards/pistachio_mp/rules.mk index b49b5e548f8..88b1907502c 100644 --- a/keyboards/pistachio_mp/rules.mk +++ b/keyboards/pistachio_mp/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pistachio_pro/keymaps/default/keymap.c b/keyboards/pistachio_pro/keymaps/default/keymap.c index a79b9a2b52e..3fe6e8a5f52 100644 --- a/keyboards/pistachio_pro/keymaps/default/keymap.c +++ b/keyboards/pistachio_pro/keymaps/default/keymap.c @@ -83,12 +83,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -120,4 +120,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -} \ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/rate/keymap.c b/keyboards/pistachio_pro/keymaps/rate/keymap.c index e08e1677001..7aa70c51d16 100644 --- a/keyboards/pistachio_pro/keymaps/rate/keymap.c +++ b/keyboards/pistachio_pro/keymaps/rate/keymap.c @@ -85,12 +85,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -122,4 +122,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -} \ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/via/keymap.c b/keyboards/pistachio_pro/keymaps/via/keymap.c index 833bbb8ecca..7517b4a6e4f 100644 --- a/keyboards/pistachio_pro/keymaps/via/keymap.c +++ b/keyboards/pistachio_pro/keymaps/via/keymap.c @@ -101,12 +101,12 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_ln_P(PSTR(" - PistachioPro -"), false); print_airstate(); print_keylog(); - return; + return false; } /* Encoder */ @@ -138,4 +138,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; -} \ No newline at end of file +} diff --git a/keyboards/pistachio_pro/keymaps/via/rules.mk b/keyboards/pistachio_pro/keymaps/via/rules.mk index 036bd6d1c3e..36b7ba9cbc9 100644 --- a/keyboards/pistachio_pro/keymaps/via/rules.mk +++ b/keyboards/pistachio_pro/keymaps/via/rules.mk @@ -1 +1,2 @@ -VIA_ENABLE = yes \ No newline at end of file +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/pistachio_pro/rules.mk b/keyboards/pistachio_pro/rules.mk index 02f279deed0..4986b8c9eab 100644 --- a/keyboards/pistachio_pro/rules.mk +++ b/keyboards/pistachio_pro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pizzakeyboards/pizza65/info.json b/keyboards/pizzakeyboards/pizza65/info.json index 66c8e7512fd..0cd80f3f978 100644 --- a/keyboards/pizzakeyboards/pizza65/info.json +++ b/keyboards/pizzakeyboards/pizza65/info.json @@ -264,7 +264,6 @@ {"label": "r2_11", "x": 10.5, "y": 1}, {"label": "r2_12", "x": 11.5, "y": 1}, {"label": "r2_13", "x": 12.5, "y": 1}, - {"label": "r2_14", "x": 13.5, "y": 1}, {"label": "r2_15", "x": 15, "y": 1}, {"label": "r3_01", "x": 0, "y": 2, "w": 1.75}, diff --git a/keyboards/pizzakeyboards/pizza65/rules.mk b/keyboards/pizzakeyboards/pizza65/rules.mk index 2321c6aa61a..73a74eb6402 100644 --- a/keyboards/pizzakeyboards/pizza65/rules.mk +++ b/keyboards/pizzakeyboards/pizza65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pkb65/rules.mk b/keyboards/pkb65/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/pkb65/rules.mk +++ b/keyboards/pkb65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 71111eca215..a86359327a6 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -78,5 +77,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/planck/ez/config.h b/keyboards/planck/ez/config.h index 4d1f1e92fe7..50855147295 100644 --- a/keyboards/planck/ez/config.h +++ b/keyboards/planck/ez/config.h @@ -120,11 +120,9 @@ //#define WS2812_EXTERNAL_PULLUP #define DRIVER_ADDR_1 0b1010000 -#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 47 -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 47 #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS @@ -132,7 +130,54 @@ #define RGB_MATRIX_LED_PROCESS_LIMIT 5 #define RGB_MATRIX_LED_FLUSH_LIMIT 26 - +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/planck/ez/ez.c b/keyboards/planck/ez/ez.c index 27cb2a1d1d4..5c68726a019 100644 --- a/keyboards/planck/ez/ez.c +++ b/keyboards/planck/ez/ez.c @@ -21,7 +21,7 @@ keyboard_config_t keyboard_config; #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/planck/keymaps/aviator/config.h b/keyboards/planck/keymaps/aviator/config.h index b2b3104501a..c0060de1416 100644 --- a/keyboards/planck/keymaps/aviator/config.h +++ b/keyboards/planck/keymaps/aviator/config.h @@ -1,9 +1,8 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 3 #endif @@ -40,5 +39,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/keyboards/planck/keymaps/buffet/config.h b/keyboards/planck/keymaps/buffet/config.h index 478b282b311..a6567d8e565 100644 --- a/keyboards/planck/keymaps/buffet/config.h +++ b/keyboards/planck/keymaps/buffet/config.h @@ -4,43 +4,43 @@ #define PERMISSIVE_HOLD // Disable all RGB effects -#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_RAINDROPS +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +#undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Most tactile encoders have detents every 4 stages #define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/buffet/rules.mk b/keyboards/planck/keymaps/buffet/rules.mk index 7a98333c014..cda82158a2b 100644 --- a/keyboards/planck/keymaps/buffet/rules.mk +++ b/keyboards/planck/keymaps/buffet/rules.mk @@ -1,5 +1,5 @@ AUDIO_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 4ec7d081ba8..87953c339ec 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -14,8 +14,7 @@ * along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #ifndef NO_DEBUG #define NO_DEBUG @@ -28,7 +27,7 @@ #define LEADER_TIMEOUT 300 -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -42,6 +41,3 @@ * borrowed from basic keymap */ #define _____ KC_NO - -#endif - diff --git a/keyboards/planck/keymaps/danielhklein/rules.mk b/keyboards/planck/keymaps/danielhklein/rules.mk index 6b58d814d45..e31e20009a0 100644 --- a/keyboards/planck/keymaps/danielhklein/rules.mk +++ b/keyboards/planck/keymaps/danielhklein/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/foreveranapple/config.h b/keyboards/planck/keymaps/foreveranapple/config.h new file mode 100644 index 00000000000..6e6d0f3ac73 --- /dev/null +++ b/keyboards/planck/keymaps/foreveranapple/config.h @@ -0,0 +1,46 @@ +/* Copyright 2015-2021 Jack Humbert + * + * 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 . + */ + +#pragma once + +#ifdef AUDIO_ENABLE +# define STARTUP_SONG SONG(PLANCK_SOUND) +// #define STARTUP_SONG SONG(NO_SOUND) + +# define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) } +#endif + +/* + * MIDI options + */ + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +// Most tactile encoders have detents every 4 stages +#define ENCODER_RESOLUTION 4 diff --git a/keyboards/planck/keymaps/foreveranapple/keymap.c b/keyboards/planck/keymaps/foreveranapple/keymap.c new file mode 100644 index 00000000000..3c5ab7cd023 --- /dev/null +++ b/keyboards/planck/keymaps/foreveranapple/keymap.c @@ -0,0 +1,413 @@ +/* Copyright 2015-2021 Jack Humbert + * + * 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 . + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + + +enum planck_layers { + _QWERTY, + _OSX, + _NIXQWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + OSX, + NIXQWERTY, + COLEMAK, + DVORAK, + PLOVER, + BACKLIT, + EXT_PLV +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | Alt | GUI |Raise | Space |Lower | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* OSX - Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CMD |Brite | Alt | CTRL |Raise | Space |Lower | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_OSX] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LGUI, BACKLIT, KC_LALT, KC_LCTL, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* NixQwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_NIXQWERTY] = LAYOUT_planck_grid( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , + KC_LCTL, BACKLIT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * v------------------------RGB CONTROL--------------------v + * ,-----------------------------------------------------------------------------------. + * | | Reset|Debug | RGB |RGBMOD| HUE+ | HUE- | SAT+ | SAT- |BRGTH+|BRGTH-| Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | |MUSmod|Aud on|Audoff|AGnorm|AGswap|Qwerty|NixQty| OSX |Plover|Colemk| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof|TermOn|TermOf| | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, NIXQWERTY, OSX, PLOVER, COLEMAK, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case OSX: + if (record->event.pressed) { + set_single_persistent_default_layer(_OSX); + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + } + return false; + break; + case NIXQWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_NIXQWERTY); + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + #ifdef KEYBOARD_planck_rev5 + writePinLow(E6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef KEYBOARD_planck_rev5 + writePinHigh(E6); + #endif + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +bool encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_DOWN); + #else + tap_code(KC_PGDN); + #endif + } else { + #ifdef MOUSEKEY_ENABLE + tap_code(KC_MS_WH_UP); + #else + tap_code(KC_PGUP); + #endif + } + } + return true; +} + +bool dip_switch_update_user(uint8_t index, bool active) { + switch (index) { + case 0: { +#ifdef AUDIO_ENABLE + static bool play_sound = false; +#endif + if (active) { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_song); } +#endif + layer_on(_ADJUST); + } else { +#ifdef AUDIO_ENABLE + if (play_sound) { PLAY_SONG(plover_gb_song); } +#endif + layer_off(_ADJUST); + } +#ifdef AUDIO_ENABLE + play_sound = true; +#endif + break; + } + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + } + } + return true; +} + +void matrix_scan_user(void) { +#ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } else { + if (muse_counter) { + stop_all_notes(); + muse_counter = 0; + } + } +#endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/planck/keymaps/foreveranapple/readme.md b/keyboards/planck/keymaps/foreveranapple/readme.md new file mode 100644 index 00000000000..ddaa58ea369 --- /dev/null +++ b/keyboards/planck/keymaps/foreveranapple/readme.md @@ -0,0 +1,3 @@ +# The Almost Default Planck Layout + +Simple changes right now, just some key shifts. Nothing major. \ No newline at end of file diff --git a/keyboards/planck/keymaps/foreveranapple/rules.mk b/keyboards/planck/keymaps/foreveranapple/rules.mk new file mode 100644 index 00000000000..87df38d49e7 --- /dev/null +++ b/keyboards/planck/keymaps/foreveranapple/rules.mk @@ -0,0 +1,2 @@ +SRC += muse.c +AUDIO_ENABLED = yes \ No newline at end of file diff --git a/keyboards/planck/keymaps/ishtob/rules.mk b/keyboards/planck/keymaps/ishtob/rules.mk index da1cca0e85a..62ed57bb93b 100644 --- a/keyboards/planck/keymaps/ishtob/rules.mk +++ b/keyboards/planck/keymaps/ishtob/rules.mk @@ -2,7 +2,7 @@ # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/keymaps/khord/config.h b/keyboards/planck/keymaps/khord/config.h index 055d741c62b..819cef60c66 100644 --- a/keyboards/planck/keymaps/khord/config.h +++ b/keyboards/planck/keymaps/khord/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -12,7 +11,7 @@ } #endif -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif #define TAPPING_TERM 150 @@ -39,5 +38,3 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 - -#endif diff --git a/keyboards/planck/keymaps/orthodeluxe/rules.mk b/keyboards/planck/keymaps/orthodeluxe/rules.mk index e657235e80c..bf68f645ae0 100644 --- a/keyboards/planck/keymaps/orthodeluxe/rules.mk +++ b/keyboards/planck/keymaps/orthodeluxe/rules.mk @@ -2,4 +2,4 @@ AUDIO_ENABLE = yes BACKLIGHT_ENABLE = no KEY_LOCK_ENABLE = yes MOUSEKEY_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index fc7211fe6af..0fb08540d4b 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -25,7 +24,7 @@ along with this program. If not, see . #define MATRIX_COLS 12 /* Planck PCB default pin-out */ -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define UNUSED_PINS @@ -68,7 +67,7 @@ along with this program. If not, see . /* Only print user print statements */ #define USER_PRINT -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -78,4 +77,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif diff --git a/keyboards/planck/keymaps/vifon/rules.mk b/keyboards/planck/keymaps/vifon/rules.mk index fb322bfc346..8cc3bcfd0cd 100644 --- a/keyboards/planck/keymaps/vifon/rules.mk +++ b/keyboards/planck/keymaps/vifon/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/yale/keymap.c b/keyboards/planck/keymaps/yale/keymap.c index 60bbc758d78..0baa24bdb7b 100644 --- a/keyboards/planck/keymaps/yale/keymap.c +++ b/keyboards/planck/keymaps/yale/keymap.c @@ -68,9 +68,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_NAV] = LAYOUT_planck_grid( - KC_MS_ACCEL2, KC_FN1, KC_FN2, KC_FN3, KC_FN4, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MS_ACCEL2, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_ACCEL1, KC_MS_BTN4, KC_MS_BTN3, KC_MS_BTN2, KC_MS_BTN1, XXXXXXX, KC_MS_LEFT, KC_MS_DOWN, KC_MS_UP, KC_MS_RIGHT, XXXXXXX, XXXXXXX, - KC_MS_ACCEL0, KC_FN9, KC_FN10, KC_FN11, KC_FN12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + KC_MS_ACCEL0, KC_NO, KC_NO, KC_NO, KC_NO, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX ), diff --git a/keyboards/planck/keymaps/zrichard/config.h b/keyboards/planck/keymaps/zrichard/config.h index fb7ebb98850..d12c19065ce 100755 --- a/keyboards/planck/keymaps/zrichard/config.h +++ b/keyboards/planck/keymaps/zrichard/config.h @@ -15,18 +15,16 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" - /* key matrix size */ #define MATRIX_ROWS 4 #define MATRIX_COLS 12 /* Planck PCB default pin-out */ -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define MATRIX_ROW_PINS { D0, D5, B5, B6 } #define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } #define UNUSED_PINS @@ -63,7 +61,7 @@ along with this program. If not, see . /* Only print user print statements */ #define USER_PRINT -#ifndef LIGHT_CONFIG_H +#ifndef KEYBOARD_planck_light #define BACKLIGHT_BREATHING #endif @@ -73,5 +71,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/planck/light/config.h b/keyboards/planck/light/config.h index ccf9f098437..cc7f1fe940a 100644 --- a/keyboards/planck/light/config.h +++ b/keyboards/planck/light/config.h @@ -1,20 +1,21 @@ -#ifndef LIGHT_CONFIG_H -#define LIGHT_CONFIG_H +#pragma once #include "config_common.h" #undef PRODUCT -#define PRODUCT Planck Light +#define PRODUCT Planck Light #define PRODUCT_ID 0xBEA2 #define DEVICE_VER 0x0001 #undef MATRIX_ROW_PINS #undef MATRIX_COL_PINS -#define MATRIX_ROW_PINS { B0, E7, F0, F1 } -#define MATRIX_COL_PINS { E6, E3, E4, D3, D4, D5, C0, A7, A6, E1, E0, D7 } +#define MATRIX_ROW_PINS \ + { B0, E7, F0, F1 } +#define MATRIX_COL_PINS \ + { E6, E3, E4, D3, D4, D5, C0, A7, A6, E1, E0, D7 } -#define AUDIO_PIN C6 +#define AUDIO_PIN C6 #define AUDIO_PIN_ALT B5 #undef BACKLIGHT_PIN @@ -32,13 +33,58 @@ // 0b1110111 AD <-> VCC // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110110 +#define DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 +#define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 25 #define DRIVER_2_LED_TOTAL 24 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) - - -#endif +#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/planck/light/light.c b/keyboards/planck/light/light.c index 839848228db..1967d318d48 100644 --- a/keyboards/planck/light/light.c +++ b/keyboards/planck/light/light.c @@ -16,7 +16,7 @@ #include "light.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/planck/light/light.h b/keyboards/planck/light/light.h index f014c50171e..623ffa707d2 100644 --- a/keyboards/planck/light/light.h +++ b/keyboards/planck/light/light.h @@ -14,40 +14,35 @@ * along with this program. If not, see . */ -#ifndef LIGHT_H -#define LIGHT_H +#pragma once #include "planck.h" #include "rgb_matrix.h" #define LAYOUT_planck_1x2uC( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ - { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ - { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ - { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT LAYOUT_ortho_4x12 #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/planck/light/rules.mk b/keyboards/planck/light/rules.mk index afd75a5fb68..01779bcd715 100644 --- a/keyboards/planck/light/rules.mk +++ b/keyboards/planck/light/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev1/rules.mk b/keyboards/planck/rev1/rules.mk index 63645c35a6f..c56966f0b47 100644 --- a/keyboards/planck/rev1/rules.mk +++ b/keyboards/planck/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev2/rules.mk b/keyboards/planck/rev2/rules.mk index 63645c35a6f..c56966f0b47 100644 --- a/keyboards/planck/rev2/rules.mk +++ b/keyboards/planck/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk index 63645c35a6f..c56966f0b47 100644 --- a/keyboards/planck/rev3/rules.mk +++ b/keyboards/planck/rev3/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk index dbabe1bf25d..fdd03f5a48e 100644 --- a/keyboards/planck/rev4/rules.mk +++ b/keyboards/planck/rev4/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev5/rules.mk b/keyboards/planck/rev5/rules.mk index edba079eaa7..23c00ed7fa3 100644 --- a/keyboards/planck/rev5/rules.mk +++ b/keyboards/planck/rev5/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index bae075de10b..aa70d46a8e6 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef REV6_CONFIG_H -#define REV6_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define PRODUCT_ID 0xA4F9 @@ -121,5 +120,3 @@ #define WS2812_DMA_CHANNEL 2 #define RGB_DISABLE_WHEN_USB_SUSPENDED - -#endif diff --git a/keyboards/planck/rev6/rev6.h b/keyboards/planck/rev6/rev6.h index 9fd51e70fe4..9bf3603ed75 100644 --- a/keyboards/planck/rev6/rev6.h +++ b/keyboards/planck/rev6/rev6.h @@ -13,99 +13,92 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef REV6_H -#define REV6_H +#pragma once #include "planck.h" +#define XXX KC_NO + #define LAYOUT_planck_1x2uC( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, KC_NO } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k70, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, XXX } \ } #define LAYOUT_planck_1x2uR( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, k34, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k75, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { XXX, k71, k72, k73, k74, k75 } \ } #define LAYOUT_planck_1x2uL( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, KC_NO, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k75, k70, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, XXX, k75 } \ } #define LAYOUT_planck_2x2u( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k35, k37, k38, k39, k3a, k3b \ -) \ -{ \ - { k00, k01, k02, k03, k04, k05 }, \ - { k10, k11, k12, k13, k14, k15 }, \ - { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { KC_NO, k37, k38, k33, KC_NO, k35 } \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k75, k71, k72, k33, k34, k35 \ +) { \ + { k00, k01, k02, k03, k04, k05 }, \ + { k10, k11, k12, k13, k14, k15 }, \ + { k20, k21, k22, k23, k24, k25 }, \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { XXX, k71, k72, k73, XXX, k75 } \ } #define LAYOUT_ortho_4x12( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ -) \ -{ \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k73, k74, k75, k70, k71, k72, k33, k34, k35 \ +) { \ { k00, k01, k02, k03, k04, k05 }, \ { k10, k11, k12, k13, k14, k15 }, \ { k20, k21, k22, k23, k24, k25 }, \ - { k30, k31, k32, k39, k3a, k3b }, \ - { k06, k07, k08, k09, k0a, k0b }, \ - { k16, k17, k18, k19, k1a, k1b }, \ - { k26, k27, k28, k29, k2a, k2b }, \ - { k36, k37, k38, k33, k34, k35 } \ + { k30, k31, k32, k33, k34, k35 }, \ + { k40, k41, k42, k43, k44, k45 }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k60, k61, k62, k63, k64, k65 }, \ + { k70, k71, k72, k73, k74, k75 } \ } - #define LAYOUT LAYOUT_ortho_4x12 #define LAYOUT_planck_mit LAYOUT_planck_1x2uC #define LAYOUT_planck_grid LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/planck/rev6/rules.mk b/keyboards/planck/rev6/rules.mk index 6150d5d1ce8..b4c90c0cfeb 100644 --- a/keyboards/planck/rev6/rules.mk +++ b/keyboards/planck/rev6/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/planck/thk/rules.mk b/keyboards/planck/thk/rules.mk index 0095bba5a88..82e38fc7f4a 100644 --- a/keyboards/planck/thk/rules.mk +++ b/keyboards/planck/thk/rules.mk @@ -25,7 +25,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk index 89557e4ea79..d45a04dedf5 100644 --- a/keyboards/playkbtw/ca66/rules.mk +++ b/keyboards/playkbtw/ca66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/helen80/rules.mk b/keyboards/playkbtw/helen80/rules.mk index 0163d38c55c..73350449337 100644 --- a/keyboards/playkbtw/helen80/rules.mk +++ b/keyboards/playkbtw/helen80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 6084f34197c..0a6ee47d44d 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/playkbtw/pk60/pk60.h b/keyboards/playkbtw/pk60/pk60.h index 4a7a8f3bf00..c92057c0a6e 100644 --- a/keyboards/playkbtw/pk60/pk60.h +++ b/keyboards/playkbtw/pk60/pk60.h @@ -1,90 +1,89 @@ -#ifndef pk60_H -#define pk60_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_60_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, XXX, k4C, k4D, XXX } \ } #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KC_NO, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, KC_NO, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, XXX, k4C, k4D, XXX } \ } #define LAYOUT_225u_arrow( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_2u_arrow( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K47, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k47, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, KC_NO, K47, KC_NO, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_minila( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k47, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, k47, k48, k49, k4A, k4B, k4C, k4D, XXX } \ } #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K43, K47, K48, K49, K4A, K4B, K4C, K4D \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k47, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, K47, K48, K49, K4A, K4B, K4C, K4D, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, XXX, XXX, XXX, k47, k48, k49, k4A, k4B, k4C, k4D, XXX } \ } - -#endif \ No newline at end of file diff --git a/keyboards/playkbtw/pk60/rules.mk b/keyboards/playkbtw/pk60/rules.mk index f8416044b95..f3322308e2f 100644 --- a/keyboards/playkbtw/pk60/rules.mk +++ b/keyboards/playkbtw/pk60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/playkbtw/pk64rgb/pk64rgb.c b/keyboards/playkbtw/pk64rgb/pk64rgb.c index 244a479672e..bc1f63a5ba0 100644 --- a/keyboards/playkbtw/pk64rgb/pk64rgb.c +++ b/keyboards/playkbtw/pk64rgb/pk64rgb.c @@ -17,7 +17,7 @@ #include "pk64rgb.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/plexus75/rules.mk b/keyboards/plexus75/rules.mk index 44ffee7ef25..70b5c558df5 100644 --- a/keyboards/plexus75/rules.mk +++ b/keyboards/plexus75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index 0bf96a20f77..1b00ef3b71e 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -31,7 +31,8 @@ # define OPT_SCALE 1 // Multiplier for wheel #endif #ifndef PLOOPY_DPI_OPTIONS -# define PLOOPY_DPI_OPTIONS { 1200, 1600, 2400 } +# define PLOOPY_DPI_OPTIONS \ + { 1200, 1600, 2400 } # ifndef PLOOPY_DPI_DEFAULT # define PLOOPY_DPI_DEFAULT 1 # endif @@ -40,10 +41,10 @@ # define PLOOPY_DPI_DEFAULT 0 #endif #ifndef PLOOPY_DRAGSCROLL_DPI -# define PLOOPY_DRAGSCROLL_DPI 100 // Fixed-DPI Drag Scroll +# define PLOOPY_DRAGSCROLL_DPI 100 // Fixed-DPI Drag Scroll #endif #ifndef PLOOPY_DRAGSCROLL_MULTIPLIER -# define PLOOPY_DRAGSCROLL_MULTIPLIER 0.75 // Variable-DPI Drag Scroll +# define PLOOPY_DRAGSCROLL_MULTIPLIER 0.75 // Variable-DPI Drag Scroll #endif keyboard_config_t keyboard_config; @@ -65,13 +66,7 @@ uint8_t OptLowPin = OPT_ENC1; bool debug_encoder = false; bool is_drag_scroll = false; -__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { - mouse_report->h = h; - mouse_report->v = v; -} - -__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { - // TODO: Replace this with interrupt driven code, polling is S L O W +void process_wheel(report_mouse_t* mouse_report) { // Lovingly ripped from the Ploopy Source // If the mouse wheel was just released, do not scroll. @@ -99,56 +94,25 @@ __attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { int dir = opt_encoder_handler(p1, p2); if (dir == 0) return; - process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); -} - -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; + mouse_report->v = (int8_t)(dir * OPT_SCALE); } -__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { - report_pmw_t data = pmw_read_burst(); - if (data.isOnSurface && data.isMotion) { - // Reset timer if stopped moving - if (!data.isMotion) { - if (MotionStart != 0) MotionStart = 0; - return; - } - - // Set timer if new motion - if ((MotionStart == 0) && data.isMotion) { - if (debug_mouse) dprintf("Starting motion.\n"); - MotionStart = timer_read(); - } +__attribute__((weak)) report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + process_wheel(&mouse_report); - if (debug_mouse) { - dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); - } - if (debug_mouse) { - dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); - } -#if defined(PROFILE_LINEAR) - float scale = float(timer_elaspsed(MotionStart)) / 1000.0; - data.dx *= scale; - data.dy *= scale; -#elif defined(PROFILE_INVERSE) - // TODO + if (is_drag_scroll) { + mouse_report.h = mouse_report.x; +#ifdef PLOOPY_DRAGSCROLL_INVERT + // Invert vertical scroll direction + mouse_report.v = -mouse_report.y; #else - // no post processing + mouse_report.v = mouse_report.y; #endif - // apply multiplier - // data.dx *= mouse_multiplier; - // data.dy *= mouse_multiplier; - - // Wrap to HID size - data.dx = constrain(data.dx, -127, 127); - data.dy = constrain(data.dy, -127, 127); - if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); - // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - - process_mouse_user(mouse_report, data.dx, data.dy); + mouse_report.x = 0; + mouse_report.y = 0; } + + return pointing_device_task_user(mouse_report); } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -169,7 +133,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (keycode == DPI_CONFIG && record->event.pressed) { keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; eeconfig_update_kb(keyboard_config.raw); - pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); } if (keycode == DRAG_SCROLL) { @@ -180,9 +144,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { is_drag_scroll ^= 1; } #ifdef PLOOPY_DRAGSCROLL_FIXED - pmw_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); #else - pmw_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]); #endif } @@ -194,11 +158,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifndef MOUSEKEY_ENABLE if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } + currentReport.buttons = pointing_device_handle_buttons(currentReport.buttons, record->event.pressed, keycode - KC_MS_BTN1); pointing_device_set_report(currentReport); pointing_device_send(); } @@ -240,35 +200,12 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void pointing_device_init(void) { - // initialize ball sensor - pmw_spi_init(); +void pointing_device_init_kb(void) { + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); // initialize the scroll wheel's optical encoder opt_encoder_init(); } - -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - process_wheel(&mouse_report); - process_mouse(&mouse_report); - - if (is_drag_scroll) { - mouse_report.h = mouse_report.x; -#ifdef PLOOPY_DRAGSCROLL_INVERT - // Invert vertical scroll direction - mouse_report.v = -mouse_report.y; -#else - mouse_report.v = mouse_report.y; -#endif - mouse_report.x = 0; - mouse_report.y = 0; - } - - pointing_device_set_report(mouse_report); - pointing_device_send(); -} - void eeconfig_init_kb(void) { keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; eeconfig_update_kb(keyboard_config.raw); @@ -284,9 +221,3 @@ void matrix_init_kb(void) { } matrix_init_user(); } - -void keyboard_post_init_kb(void) { - pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); - - keyboard_post_init_user(); -} diff --git a/keyboards/ploopyco/mouse/mouse.h b/keyboards/ploopyco/mouse/mouse.h index d11aa5e9a46..ee598271395 100644 --- a/keyboards/ploopyco/mouse/mouse.h +++ b/keyboards/ploopyco/mouse/mouse.h @@ -19,11 +19,8 @@ #pragma once #include "quantum.h" -#include "spi_master.h" -#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" -#include "pointing_device.h" // Sensor defs #define OPT_ENC1 F0 @@ -31,10 +28,7 @@ #define OPT_ENC1_MUX 0 #define OPT_ENC2_MUX 4 -void process_mouse(report_mouse_t* mouse_report); -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); void process_wheel(report_mouse_t* mouse_report); -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); #define LAYOUT(BLL, BL, BM, BR, BRR, BF, BB, BDPI) \ { {BL, BM, BR, BF, BB, BRR, BLL, BDPI}, } diff --git a/keyboards/ploopyco/mouse/rules.mk b/keyboards/ploopyco/mouse/rules.mk index 20b96abab49..45cb38901a0 100644 --- a/keyboards/ploopyco/mouse/rules.mk +++ b/keyboards/ploopyco/mouse/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -22,7 +22,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pmw3360 MOUSEKEY_ENABLE = yes # Mouse keys -QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += drivers/sensors/pmw3360.c opt_encoder.c +QUANTUM_LIB_SRC += analog.c +SRC += opt_encoder.c diff --git a/keyboards/ploopyco/trackball/rules.mk b/keyboards/ploopyco/trackball/rules.mk index 9b7285a015e..d118581523c 100644 --- a/keyboards/ploopyco/trackball/rules.mk +++ b/keyboards/ploopyco/trackball/rules.mk @@ -7,7 +7,7 @@ F_CPU = 8000000 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -19,9 +19,10 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = pmw3360 MOUSEKEY_ENABLE = yes # Mouse keys -QUANTUM_LIB_SRC += analog.c spi_master.c -SRC += drivers/sensors/pmw3360.c opt_encoder.c +QUANTUM_LIB_SRC += analog.c +SRC += opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball/rev1_005 diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index 71902099796..da4bbf224e1 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c @@ -65,12 +65,7 @@ uint8_t OptLowPin = OPT_ENC1; bool debug_encoder = false; bool is_drag_scroll = false; -__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { - mouse_report->h = h; - mouse_report->v = v; -} - -__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { +void process_wheel(report_mouse_t* mouse_report) { // TODO: Replace this with interrupt driven code, polling is S L O W // Lovingly ripped from the Ploopy Source @@ -99,56 +94,25 @@ __attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { int dir = opt_encoder_handler(p1, p2); if (dir == 0) return; - process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); + mouse_report->v = (int8_t)(dir * OPT_SCALE); } -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; -} - -__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { - report_pmw_t data = pmw_read_burst(); - if (data.isOnSurface && data.isMotion) { - // Reset timer if stopped moving - if (!data.isMotion) { - if (MotionStart != 0) MotionStart = 0; - return; - } - - // Set timer if new motion - if ((MotionStart == 0) && data.isMotion) { - if (debug_mouse) dprintf("Starting motion.\n"); - MotionStart = timer_read(); - } +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { + process_wheel(&mouse_report); - if (debug_mouse) { - dprintf("Delt] d: %d t: %u\n", abs(data.dx) + abs(data.dy), MotionStart); - } - if (debug_mouse) { - dprintf("Pre ] X: %d, Y: %d\n", data.dx, data.dy); - } -#if defined(PROFILE_LINEAR) - float scale = float(timer_elaspsed(MotionStart)) / 1000.0; - data.dx *= scale; - data.dy *= scale; -#elif defined(PROFILE_INVERSE) - // TODO + if (is_drag_scroll) { + mouse_report.h = mouse_report.x; +#ifdef PLOOPY_DRAGSCROLL_INVERT + // Invert vertical scroll direction + mouse_report.v = -mouse_report.y; #else - // no post processing + mouse_report.v = mouse_report.y; #endif - // apply multiplier - // data.dx *= mouse_multiplier; - // data.dy *= mouse_multiplier; - - // Wrap to HID size - data.dx = constrain(data.dx, -127, 127); - data.dy = constrain(data.dy, -127, 127); - if (debug_mouse) dprintf("Cons] X: %d, Y: %d\n", data.dx, data.dy); - // dprintf("Elapsed:%u, X: %f Y: %\n", i, pgm_read_byte(firmware_data+i)); - - process_mouse_user(mouse_report, data.dx, -data.dy); + mouse_report.x = 0; + mouse_report.y = 0; } + + return pointing_device_task_user(mouse_report); } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -169,7 +133,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (keycode == DPI_CONFIG && record->event.pressed) { keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; eeconfig_update_kb(keyboard_config.raw); - pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); } if (keycode == DRAG_SCROLL) { @@ -180,9 +144,9 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { is_drag_scroll ^= 1; } #ifdef PLOOPY_DRAGSCROLL_FIXED - pmw_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); #else - pmw_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(is_drag_scroll ? (dpi_array[keyboard_config.dpi_config] * PLOOPY_DRAGSCROLL_MULTIPLIER) : dpi_array[keyboard_config.dpi_config]); #endif } @@ -194,11 +158,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifndef MOUSEKEY_ENABLE if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } + currentReport.buttons = pointing_device_handle_buttons(currentReport.buttons, record->event.pressed, keycode - KC_MS_BTN1); pointing_device_set_report(currentReport); pointing_device_send(); } @@ -239,35 +199,12 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void pointing_device_init(void) { - // initialize ball sensor - pmw_spi_init(); +void pointing_device_init_kb(void) { + pmw3360_set_cpi(dpi_array[keyboard_config.dpi_config]); // initialize the scroll wheel's optical encoder opt_encoder_init(); } - -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - process_wheel(&mouse_report); - process_mouse(&mouse_report); - - if (is_drag_scroll) { - mouse_report.h = mouse_report.x; -#ifdef PLOOPY_DRAGSCROLL_INVERT - // Invert vertical scroll direction - mouse_report.v = -mouse_report.y; -#else - mouse_report.v = mouse_report.y; -#endif - mouse_report.x = 0; - mouse_report.y = 0; - } - - pointing_device_set_report(mouse_report); - pointing_device_send(); -} - void eeconfig_init_kb(void) { keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; eeconfig_update_kb(keyboard_config.raw); @@ -285,7 +222,7 @@ void matrix_init_kb(void) { } void keyboard_post_init_kb(void) { - pmw_set_cpi(dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); keyboard_post_init_user(); } diff --git a/keyboards/ploopyco/trackball/trackball.h b/keyboards/ploopyco/trackball/trackball.h index 70f5d83b11f..52d955325b2 100644 --- a/keyboards/ploopyco/trackball/trackball.h +++ b/keyboards/ploopyco/trackball/trackball.h @@ -19,11 +19,8 @@ #pragma once #include "quantum.h" -#include "spi_master.h" -#include "drivers/sensors/pmw3360.h" #include "analog.h" #include "opt_encoder.h" -#include "pointing_device.h" #if defined(KEYBOARD_ploopyco_trackball_rev1) # include "rev1.h" #elif defined(KEYBOARD_ploopyco_trackball_rev1_005) @@ -36,10 +33,7 @@ #define OPT_ENC1_MUX 0 #define OPT_ENC2_MUX 4 -void process_mouse(report_mouse_t* mouse_report); -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); void process_wheel(report_mouse_t* mouse_report); -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); #define LAYOUT(BL, BM, BR, BF, BB) \ { {BL, BM, BR, BF, BB}, } diff --git a/keyboards/ploopyco/trackball_mini/config.h b/keyboards/ploopyco/trackball_mini/config.h index f76a6eb2c1c..52d7390ca25 100644 --- a/keyboards/ploopyco/trackball_mini/config.h +++ b/keyboards/ploopyco/trackball_mini/config.h @@ -56,3 +56,9 @@ // If board has a debug LED, you can enable it by defining this // #define DEBUG_LED_PIN F7 + +#define ADNS5050_SCLK_PIN B7 +#define ADNS5050_SDIO_PIN C6 +#define ADNS5050_CS_PIN B4 + +#define POINTING_DEVICE_ROTATION_90 diff --git a/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c b/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c index 7784bc85538..7eb973216b9 100644 --- a/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c +++ b/keyboards/ploopyco/trackball_mini/keymaps/drag_scroll/keymap.c @@ -44,7 +44,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // to only scroll in one direction, if you wanted, as well. In fact, // there is no reason that you need to send this to the mouse report. // You could have it register a key, instead. -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { +void process_mouse_user(report_mouse_t* mouse_report, int8_t x, int8_t y) { if (is_drag_scroll) { mouse_report->h = x; mouse_report->v = y; diff --git a/keyboards/ploopyco/trackball_mini/readme.md b/keyboards/ploopyco/trackball_mini/readme.md index 3c21a57cfde..a3aebb06e69 100644 --- a/keyboards/ploopyco/trackball_mini/readme.md +++ b/keyboards/ploopyco/trackball_mini/readme.md @@ -56,7 +56,7 @@ Additionally, you can change the DPI/CPI or speed of the trackball by calling `a To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIONS` to set the array, and `PLOOPY_DPI_DEFAULT`. ```c -#define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375} +#define PLOOPY_DPI_OPTIONS { 375, 750, 1375} #define PLOOPY_DPI_DEFAULT 2 ``` @@ -73,7 +73,7 @@ Nothing needs to be enabled to use this functionality. Just add the `DRAG_SCROL ### Drag Scroll Configuration * `#define PLOOPY_DRAGSCROLL_MOMENTARY` - Makes the key into a momentary key, rather than a toggle. -* `#define PLOOPY_DRAGSCROLL_DPI CPI375` - When the fixed DPI option is enabled, this sets the DPI to be used for Drag Scroll. +* `#define PLOOPY_DRAGSCROLL_DPI 375` - When the fixed DPI option is enabled, this sets the DPI to be used for Drag Scroll. * `#define PLOOPY_DRAGSCROLL_INVERT` - This reverses the direction that the scroll is performed. ## Fuse settings diff --git a/keyboards/ploopyco/trackball_mini/rules.mk b/keyboards/ploopyco/trackball_mini/rules.mk index 6fc5199edcc..8d76c9b3dcb 100644 --- a/keyboards/ploopyco/trackball_mini/rules.mk +++ b/keyboards/ploopyco/trackball_mini/rules.mk @@ -1,16 +1,13 @@ # MCU name MCU = atmega32u4 -# Processor frequency -F_CPU = 16000000 - # Bootloader selection BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration @@ -22,9 +19,10 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = adns5050 MOUSEKEY_ENABLE = no # Mouse keys QUANTUM_LIB_SRC += analog.c -SRC += drivers/sensors/adns5050.c opt_encoder.c +SRC += opt_encoder.c DEFAULT_FOLDER = ploopyco/trackball_mini/rev1_001 diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.c b/keyboards/ploopyco/trackball_mini/trackball_mini.c index b50850b5491..2158a8f4889 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.c +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.c @@ -37,20 +37,17 @@ # define OPT_SCALE 1 // Multiplier for wheel #endif -#define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375 } +#define PLOOPY_DPI_OPTIONS \ + { 375, 750, 1375 } #define PLOOPY_DPI_DEFAULT 2 #ifndef PLOOPY_DRAGSCROLL_DPI -# define PLOOPY_DRAGSCROLL_DPI CPI375 // Fixed-DPI Drag Scroll +# define PLOOPY_DRAGSCROLL_DPI 375 // Fixed-DPI Drag Scroll #endif #ifndef PLOOPY_DRAGSCROLL_MULTIPLIER # define PLOOPY_DRAGSCROLL_MULTIPLIER 0.75 // Variable-DPI Drag Scroll #endif -// Transformation constants for delta-X and delta-Y -const static float ADNS_X_TRANSFORM = -1.0; -const static float ADNS_Y_TRANSFORM = 1.0; - keyboard_config_t keyboard_config; uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; #define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) @@ -70,12 +67,7 @@ uint8_t OptLowPin = OPT_ENC1; bool debug_encoder = false; bool is_drag_scroll = false; -__attribute__((weak)) void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v) { - mouse_report->h = h; - mouse_report->v = v; -} - -__attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { +void process_wheel(report_mouse_t* mouse_report) { // If the mouse wheel was just released, do not scroll. if (timer_elapsed(lastMidClick) < SCROLL_BUTT_DEBOUNCE) return; @@ -103,33 +95,31 @@ __attribute__((weak)) void process_wheel(report_mouse_t* mouse_report) { if (dir == 0) return; - process_wheel_user(mouse_report, mouse_report->h, (int)(mouse_report->v + (dir * OPT_SCALE))); + mouse_report->v = (int8_t)(dir * OPT_SCALE); } -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; -} - -__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { - report_adns_t data = adns_read_burst(); - - if (data.dx != 0 || data.dy != 0) { - if (debug_mouse) - dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); +void pointing_device_init_kb(void) { + opt_encoder_init(); - // Apply delta-X and delta-Y transformations. - // x and y are swapped - // the sensor is rotated - // by 90 degrees - float xt = (float) data.dy * ADNS_X_TRANSFORM; - float yt = (float) data.dx * ADNS_Y_TRANSFORM; + // set the DPI. + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); +} - int16_t xti = (int16_t)xt; - int16_t yti = (int16_t)yt; +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { - process_mouse_user(mouse_report, xti, yti); + if (is_drag_scroll) { + mouse_report.h = mouse_report.x; +#ifdef PLOOPY_DRAGSCROLL_INVERT + // Invert vertical scroll direction + mouse_report.v = -mouse_report.y; +#else + mouse_report.v = mouse_report.y; +#endif + mouse_report.x = 0; + mouse_report.y = 0; } + + return pointing_device_task_user(mouse_report); } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { @@ -147,7 +137,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { if (keycode == DPI_CONFIG && record->event.pressed) { keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; eeconfig_update_kb(keyboard_config.raw); - adns_set_cpi(dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); } if (keycode == DRAG_SCROLL) { @@ -157,7 +147,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { { is_drag_scroll ^= 1; } - adns_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); + pointing_device_set_cpi(is_drag_scroll ? PLOOPY_DRAGSCROLL_DPI : dpi_array[keyboard_config.dpi_config]); } /* If Mousekeys is disabled, then use handle the mouse button @@ -168,11 +158,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { #ifndef MOUSEKEY_ENABLE if (IS_MOUSEKEY_BUTTON(keycode)) { report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } + currentReport.buttons = pointing_device_handle_buttons(currentReport.buttons, record->event.pressed, keycode - KC_MS_BTN1); pointing_device_set_report(currentReport); pointing_device_send(); } @@ -207,48 +193,6 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void pointing_device_init(void) { - adns_init(); - opt_encoder_init(); - - // reboot the adns. - // if the adns hasn't initialized yet, this is harmless. - adns_write_reg(REG_CHIP_RESET, 0x5a); - - // wait maximum time before adns is ready. - // this ensures that the adns is actuall ready after reset. - wait_ms(55); - - // read a burst from the adns and then discard it. - // gets the adns ready for write commands - // (for example, setting the dpi). - adns_read_burst(); - - // set the DPI. - adns_set_cpi(dpi_array[keyboard_config.dpi_config]); -} - -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - process_wheel(&mouse_report); - process_mouse(&mouse_report); - - if (is_drag_scroll) { - mouse_report.h = mouse_report.x; -#ifdef PLOOPY_DRAGSCROLL_INVERT - // Invert vertical scroll direction - mouse_report.v = -mouse_report.y; -#else - mouse_report.v = mouse_report.y; -#endif - mouse_report.x = 0; - mouse_report.y = 0; - } - - pointing_device_set_report(mouse_report); - pointing_device_send(); -} - void eeconfig_init_kb(void) { keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; eeconfig_update_kb(keyboard_config.raw); diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.h b/keyboards/ploopyco/trackball_mini/trackball_mini.h index 7bcb02a940c..fc86fe776e7 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.h +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.h @@ -20,10 +20,8 @@ #pragma once #include "quantum.h" -#include "drivers/sensors/adns5050.h" #include "analog.h" #include "opt_encoder.h" -#include "pointing_device.h" // Sensor defs #define OPT_ENC1 F0 @@ -31,10 +29,7 @@ #define OPT_ENC1_MUX 0 #define OPT_ENC2_MUX 4 -void process_mouse(report_mouse_t* mouse_report); -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); void process_wheel(report_mouse_t* mouse_report); -void process_wheel_user(report_mouse_t* mouse_report, int16_t h, int16_t v); #define LAYOUT(BL, BM, BR, BF, BB) \ { {BL, BM, BR, BF, BB}, } diff --git a/keyboards/ploopyco/trackball_nano/config.h b/keyboards/ploopyco/trackball_nano/config.h index 7450f5574cb..7d109db99ed 100644 --- a/keyboards/ploopyco/trackball_nano/config.h +++ b/keyboards/ploopyco/trackball_nano/config.h @@ -45,3 +45,9 @@ a polling rate as possible. */ #define USB_POLLING_INTERVAL_MS 1 #define USB_MAX_POWER_CONSUMPTION 100 + +#define ADNS5050_SCLK_PIN B7 +#define ADNS5050_SDIO_PIN C6 +#define ADNS5050_CS_PIN B4 + +#define POINTING_DEVICE_ROTATION_90 diff --git a/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c b/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c index 6f568ecf511..9e33db3783a 100644 --- a/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c +++ b/keyboards/ploopyco/trackball_nano/keymaps/maddie/keymap.c @@ -21,14 +21,14 @@ // safe range starts at `PLOOPY_SAFE_RANGE` instead. uint8_t scroll_enabled = 0; uint8_t lock_state = 0; -int16_t delta_x = 0; -int16_t delta_y = 0; +int8_t delta_x = 0; +int8_t delta_y = 0; -void process_mouse_user(report_mouse_t *mouse_report, int16_t x, int16_t y) { - if (scroll_enabled) { - delta_x += x; +void process_mouse_user(report_mouse_t *mouse_report, int8_t x, int8_t y) { + if (scroll_enabled) { + delta_x += x; delta_y += y; - + if (delta_x > 60) { mouse_report->h = 1; delta_x = 0; @@ -44,10 +44,10 @@ void process_mouse_user(report_mouse_t *mouse_report, int16_t x, int16_t y) { mouse_report->v = 1; delta_y = 0; } - } else { - mouse_report->x = x; + } else { + mouse_report->x = x; mouse_report->y = y; - } + } } void keyboard_post_init_user(void) { @@ -62,7 +62,7 @@ bool led_update_user(led_t led_state) { scroll_timer = timer_read(); lock_count = 0; } - + if (led_state.num_lock != lock_state) { lock_count++; @@ -73,7 +73,7 @@ bool led_update_user(led_t led_state) { delta_y = 0; } } - + lock_state = led_state.num_lock; return true; } diff --git a/keyboards/ploopyco/trackball_nano/readme.md b/keyboards/ploopyco/trackball_nano/readme.md index a82b3bc7111..0d427bfb55e 100644 --- a/keyboards/ploopyco/trackball_nano/readme.md +++ b/keyboards/ploopyco/trackball_nano/readme.md @@ -35,7 +35,7 @@ You can change the DPI/CPI or speed of the trackball by calling `adns_set_cpi` a To configure/set your own array, there are two defines to use, `PLOOPY_DPI_OPTIONS` to set the array, and `PLOOPY_DPI_DEFAULT`. ```c -#define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375} +#define PLOOPY_DPI_OPTIONS { 375, 750, 1375} #define PLOOPY_DPI_DEFAULT 1 ``` diff --git a/keyboards/ploopyco/trackball_nano/rules.mk b/keyboards/ploopyco/trackball_nano/rules.mk index a26ad93c89d..1a29a561e74 100644 --- a/keyboards/ploopyco/trackball_nano/rules.mk +++ b/keyboards/ploopyco/trackball_nano/rules.mk @@ -1,9 +1,6 @@ # MCU name MCU = atmega32u4 -# Processor frequency -F_CPU = 16000000 - # Bootloader selection BOOTLOADER = atmel-dfu @@ -22,9 +19,7 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output POINTING_DEVICE_ENABLE = yes +POINTING_DEVICE_DRIVER = adns5050 MOUSEKEY_ENABLE = no # Mouse keys -QUANTUM_LIB_SRC += analog.c -SRC += drivers/sensors/adns5050.c opt_encoder.c - DEFAULT_FOLDER = ploopyco/trackball_nano/rev1_001 diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c index 9bcfa59ef8e..2702f605572 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.c +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c @@ -37,7 +37,8 @@ #endif #ifndef PLOOPY_DPI_OPTIONS -# define PLOOPY_DPI_OPTIONS { CPI375, CPI750, CPI1375 } +# define PLOOPY_DPI_OPTIONS \ + { 375, 750, 1375 } # ifndef PLOOPY_DPI_DEFAULT # define PLOOPY_DPI_DEFAULT 2 # endif @@ -49,12 +50,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -// Transformation constants for delta-X and delta-Y -const static float ADNS_X_TRANSFORM = -1.0; -const static float ADNS_Y_TRANSFORM = 1.0; - keyboard_config_t keyboard_config; -uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; +uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; #define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) // TODO: Implement libinput profiles @@ -63,77 +60,13 @@ uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; // Valid options are ACC_NONE, ACC_LINEAR, ACC_CUSTOM, ACC_QUADRATIC // Trackball State -bool is_scroll_clicked = false; -bool BurstState = false; // init burst state for Trackball module -uint16_t MotionStart = 0; // Timer for accel, 0 is resting state -uint16_t lastScroll = 0; // Previous confirmed wheel event -uint16_t lastMidClick = 0; // Stops scrollwheel from being read if it was pressed -uint8_t OptLowPin = OPT_ENC1; -bool debug_encoder = false; - -__attribute__((weak)) void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) { - mouse_report->x = x; - mouse_report->y = y; -} - -__attribute__((weak)) void process_mouse(report_mouse_t* mouse_report) { - report_adns_t data = adns_read_burst(); - - if (data.dx != 0 || data.dy != 0) { - if (debug_mouse) - dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); - - // Apply delta-X and delta-Y transformations. - // x and y are swapped - // the sensor is rotated - // by 90 degrees - float xt = (float) data.dy * ADNS_X_TRANSFORM; - float yt = (float) data.dx * ADNS_Y_TRANSFORM; - - int16_t xti = (int16_t)xt; - int16_t yti = (int16_t)yt; - - process_mouse_user(mouse_report, xti, yti); - } -} - -bool process_record_kb(uint16_t keycode, keyrecord_t* record) { - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); - - // Update Timer to prevent accidental scrolls - if ((record->event.key.col == 1) && (record->event.key.row == 0)) { - lastMidClick = timer_read(); - is_scroll_clicked = record->event.pressed; - } - - if (!process_record_user(keycode, record)) - return false; - - if (keycode == DPI_CONFIG && record->event.pressed) { - keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; - eeconfig_update_kb(keyboard_config.raw); - adns_set_cpi(dpi_array[keyboard_config.dpi_config]); - } +bool is_scroll_clicked = false; +bool BurstState = false; // init burst state for Trackball module +uint16_t MotionStart = 0; // Timer for accel, 0 is resting state -/* If Mousekeys is disabled, then use handle the mouse button - * keycodes. This makes things simpler, and allows usage of - * the keycodes in a consistent manner. But only do this if - * Mousekeys is not enable, so it's not handled twice. - */ -#ifndef MOUSEKEY_ENABLE - if (IS_MOUSEKEY_BUTTON(keycode)) { - report_mouse_t currentReport = pointing_device_get_report(); - if (record->event.pressed) { - currentReport.buttons |= 1 << (keycode - KC_MS_BTN1); - } else { - currentReport.buttons &= ~(1 << (keycode - KC_MS_BTN1)); - } - pointing_device_set_report(currentReport); - pointing_device_send(); - } -#endif - - return true; +void pointing_device_init_kb(void) { + // set the DPI. + pointing_device_set_cpi(dpi_array[keyboard_config.dpi_config]); } // Hardware Setup @@ -143,9 +76,6 @@ void keyboard_pre_init_kb(void) { // debug_mouse = true; // debug_encoder = true; - setPinInput(OPT_ENC1); - setPinInput(OPT_ENC2); - /* Ground all output pins connected to ground. This provides additional * pathways to ground. If you're messing with this, know this: driving ANY * of these pins high will cause a short. On the MCU. Ka-blooey. @@ -162,34 +92,6 @@ void keyboard_pre_init_kb(void) { keyboard_pre_init_user(); } -void pointing_device_init(void) { - adns_init(); - opt_encoder_init(); - - // reboot the adns. - // if the adns hasn't initialized yet, this is harmless. - adns_write_reg(REG_CHIP_RESET, 0x5a); - - // wait maximum time before adns is ready. - // this ensures that the adns is actuall ready after reset. - wait_ms(55); - - // read a burst from the adns and then discard it. - // gets the adns ready for write commands - // (for example, setting the dpi). - adns_read_burst(); - - // set the DPI. - adns_set_cpi(dpi_array[keyboard_config.dpi_config]); -} - -void pointing_device_task(void) { - report_mouse_t mouse_report = pointing_device_get_report(); - process_mouse(&mouse_report); - pointing_device_set_report(mouse_report); - pointing_device_send(); -} - void eeconfig_init_kb(void) { keyboard_config.dpi_config = PLOOPY_DPI_DEFAULT; eeconfig_update_kb(keyboard_config.raw); diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.h b/keyboards/ploopyco/trackball_nano/trackball_nano.h index 6c8ecace7d0..88725eab686 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.h +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.h @@ -20,19 +20,6 @@ #pragma once #include "quantum.h" -#include "drivers/sensors/adns5050.h" -#include "analog.h" -#include "opt_encoder.h" -#include "pointing_device.h" - -// Sensor defs -#define OPT_ENC1 F0 -#define OPT_ENC2 F4 -#define OPT_ENC1_MUX 0 -#define OPT_ENC2_MUX 4 - -void process_mouse(report_mouse_t* mouse_report); -void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y); #define LAYOUT(k00) {{ KC_NO }} diff --git a/keyboards/pluckey/info.json b/keyboards/pluckey/info.json index 0a6bd1832df..de58bee8029 100644 --- a/keyboards/pluckey/info.json +++ b/keyboards/pluckey/info.json @@ -2,147 +2,158 @@ "keyboard_name": "pluckey", "url": "https://github.com/floookay/pluckey", "maintainer": "floookay", + "layout_aliases": { + "LAYOUT": "LAYOUT_all" + }, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [ - {"x":3.5, "y":0}, - {"x":15, "y":0}, - {"x":2.5, "y":0.125}, - {"x":4.5, "y":0.125}, - {"x":14, "y":0.125}, - {"x":16, "y":0.125}, - {"x":5.5, "y":0.25}, - {"x":6.5, "y":0.25}, - {"x":12, "y":0.25}, - {"x":13, "y":0.25}, - {"x":0, "y":0.625, "w":1.5}, - {"x":1.5, "y":0.625}, - {"x":17, "y":0.625}, - {"x":18, "y":0.625, "w":1.5}, - {"x":3.5, "y":1.0}, - {"x":15, "y":1.0}, - {"x":2.5, "y":1.125}, - {"x":4.5, "y":1.125}, - {"x":14, "y":1.125}, - {"x":16, "y":1.125}, - {"x":5.5, "y":1.25}, - {"x":6.5, "y":1.25}, - {"x":12, "y":1.25}, - {"x":13, "y":1.25}, - {"x":0, "y":1.625, "w":1.5}, - {"x":1.5, "y":1.625}, - {"x":17, "y":1.625}, - {"x":18, "y":1.625, "w":1.5}, - {"x":3.5, "y":2}, - {"x":15, "y":2}, - {"x":2.5, "y":2.125}, - {"x":4.5, "y":2.125}, - {"x":14, "y":2.125}, - {"x":16, "y":2.125}, - {"x":5.5, "y":2.25}, - {"x":6.5, "y":2.25}, - {"x":12, "y":2.25}, - {"x":13, "y":2.25}, - {"x":0, "y":2.625, "w":1.5}, - {"x":1.5, "y":2.625}, - {"x":17, "y":2.625}, - {"x":18, "y":2.625, "w":1.5}, - {"x":6.5, "y":3.25}, - {"x":12, "y":3.25}, - {"x":3.5, "y":3}, - {"x":15, "y":3}, - {"x":2.5, "y":3.125}, - {"x":4.5, "y":3.125}, - {"x":14, "y":3.125}, - {"x":16, "y":3.125}, - {"x":5.5, "y":3.25}, - {"x":13, "y":3.25}, - {"x":0, "y":3.625, "w":1.5}, - {"x":1.5, "y":3.625}, - {"x":17, "y":3.625}, - {"x":18, "y":3.625, "w":1.5}, - {"x":7.5, "y":3.75}, - {"x":11, "y":3.75}, - {"x":3.5, "y":4}, - {"x":15, "y":4}, - {"x":2.5, "y":4.125}, - {"x":4.5, "y":4.125}, - {"x":14, "y":4.125}, - {"x":16, "y":4.125}, - {"x":5.75, "y":4.5, "w":1.5}, - {"x":12.25, "y":4.5, "w":1.5}, - {"x":7.25, "y":4.75}, - {"x":11.25, "y":4.75} + {"label":"Esc", "x":0, "y":0.625, "w":1.5}, + {"label":"1!", "x":1.5, "y":0.625}, + {"label":"2@", "x":2.5, "y":0.125}, + {"label":"3#", "x":3.5, "y":0}, + {"label":"4$", "x":4.5, "y":0.125}, + {"label":"5%", "x":5.5, "y":0.25}, + {"label":"-_", "x":6.5, "y":0.25}, + {"label":"=+", "x":12, "y":0.25}, + {"label":"6^", "x":13, "y":0.25}, + {"label":"7&", "x":14, "y":0.125}, + {"label":"8*", "x":15, "y":0}, + {"label":"9(", "x":16, "y":0.125}, + {"label":"0)", "x":17, "y":0.625}, + {"label":"`~", "x":18, "y":0.625, "w":1.5}, + + {"label":"Tab", "x":0, "y":1.625, "w":1.5}, + {"label":"Q", "x":1.5, "y":1.625}, + {"label":"W", "x":2.5, "y":1.125}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1.125}, + {"label":"T", "x":5.5, "y":1.25}, + {"label":"[{", "x":6.5, "y":1.25}, + {"label":"]}", "x":12, "y":1.25}, + {"label":"Y", "x":13, "y":1.25}, + {"label":"U", "x":14, "y":1.125}, + {"label":"I", "x":16, "y":1.125}, + {"label":"O", "x":15, "y":1}, + {"label":"P", "x":17, "y":1.625}, + {"label":"\\|", "x":18, "y":1.625, "w":1.5}, + + {"label":"Ctrl", "x":0, "y":2.625, "w":1.5}, + {"label":"A", "x":1.5, "y":2.625}, + {"label":"S", "x":2.5, "y":2.125}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2.125}, + {"label":"G", "x":5.5, "y":2.25}, + {"label":"(", "x":6.5, "y":2.25}, + {"label":")", "x":12, "y":2.25}, + {"label":"H", "x":13, "y":2.25}, + {"label":"J", "x":14, "y":2.125}, + {"label":"K", "x":16, "y":2.125}, + {"label":"L", "x":15, "y":2}, + {"label":";:", "x":17, "y":2.625}, + {"label":"'\"", "x":18, "y":2.625, "w":1.5}, + + {"label":"Shift", "x":0, "y":3.625, "w":1.5}, + {"label":"Z", "x":1.5, "y":3.625}, + {"label":"X", "x":2.5, "y":3.125}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3.125}, + {"label":"B", "x":5.5, "y":3.25}, + {"label":"{", "x":6.5, "y":3.25}, + {"label":"Home", "x":7.5, "y":3.75}, + {"label":"End", "x":11, "y":3.75}, + {"label":"}", "x":12, "y":3.25}, + {"label":"N", "x":13, "y":3.25}, + {"label":"M", "x":14, "y":3.125}, + {"label":",<", "x":15, "y":3}, + {"label":".>", "x":16, "y":3.125}, + {"label":"/?", "x":17, "y":3.625}, + {"label":"Shift", "x":18, "y":3.625, "w":1.5}, + + {"label":"GUI", "x":2.5, "y":4.125}, + {"label":"Alt", "x":3.5, "y":4}, + {"label":"Lower", "x":4.5, "y":4.125}, + {"label":"Space", "x":5.75, "y":4.5, "w":1.5}, + {"label":"Backspace", "x":7.25, "y":4.75}, + {"label":"Enter", "x":11.25, "y":4.75}, + {"label":"Space", "x":12.25, "y":4.5, "w":1.5}, + {"label":"Raise", "x":14, "y":4.125}, + {"label":"Alt", "x":15, "y":4}, + {"label":"MEH", "x":16, "y":4.125} ] }, "LAYOUT_ergo": { "layout": [ - {"x":3.5, "y":0}, - {"x":15, "y":0}, - {"x":2.5, "y":0.125}, - {"x":4.5, "y":0.125}, - {"x":14, "y":0.125}, - {"x":16, "y":0.125}, - {"x":5.5, "y":0.25}, - {"x":6.5, "y":0.25}, - {"x":12, "y":0.25}, - {"x":13, "y":0.25}, - {"x":0, "y":0.625, "w":1.5}, - {"x":1.5, "y":0.625}, - {"x":17, "y":0.625}, - {"x":18, "y":0.625, "w":1.5}, - {"x":3.5, "y":1.0}, - {"x":15, "y":1.0}, - {"x":2.5, "y":1.125}, - {"x":4.5, "y":1.125}, - {"x":14, "y":1.125}, - {"x":16, "y":1.125}, - {"x":5.5, "y":1.25}, - {"x":6.5, "y":1.25, "h":1.5}, - {"x":12, "y":1.25, "h":1.5}, - {"x":13, "y":1.25}, - {"x":0, "y":1.625, "w":1.5}, - {"x":1.5, "y":1.625}, - {"x":17, "y":1.625}, - {"x":18, "y":1.625, "w":1.5}, - {"x":3.5, "y":2}, - {"x":15, "y":2}, - {"x":2.5, "y":2.125}, - {"x":4.5, "y":2.125}, - {"x":14, "y":2.125}, - {"x":16, "y":2.125}, - {"x":5.5, "y":2.25}, - {"x":13, "y":2.25}, - {"x":0, "y":2.625, "w":1.5}, - {"x":1.5, "y":2.625}, - {"x":17, "y":2.625}, - {"x":18, "y":2.625, "w":1.5}, - {"x":6.5, "y":2.75, "h":1.5}, - {"x":12, "y":2.75, "h":1.5}, - {"x":3.5, "y":3}, - {"x":15, "y":3}, - {"x":2.5, "y":3.125}, - {"x":4.5, "y":3.125}, - {"x":14, "y":3.125}, - {"x":16, "y":3.125}, - {"x":5.5, "y":3.25}, - {"x":13, "y":3.25}, - {"x":0, "y":3.625, "w":1.5}, - {"x":1.5, "y":3.625}, - {"x":17, "y":3.625}, - {"x":18, "y":3.625, "w":1.5}, - {"x":7.5, "y":3.75}, - {"x":11, "y":3.75}, - {"x":3.5, "y":4}, - {"x":15, "y":4}, - {"x":2.5, "y":4.125}, - {"x":4.5, "y":4.125}, - {"x":14, "y":4.125}, - {"x":16, "y":4.125}, - {"x":5.75, "y":4.5, "w":1.5}, - {"x":12.25, "y":4.5, "w":1.5}, - {"x":7.25, "y":4.75}, - {"x":11.25, "y":4.75} + {"label":"Esc", "x":0, "y":0.625, "w":1.5}, + {"label":"1!", "x":1.5, "y":0.625}, + {"label":"2@", "x":2.5, "y":0.125}, + {"label":"3#", "x":3.5, "y":0}, + {"label":"4$", "x":4.5, "y":0.125}, + {"label":"5%", "x":5.5, "y":0.25}, + {"label":"-_", "x":6.5, "y":0.25}, + {"label":"=+", "x":12, "y":0.25}, + {"label":"6^", "x":13, "y":0.25}, + {"label":"7&", "x":14, "y":0.125}, + {"label":"8*", "x":15, "y":0}, + {"label":"9(", "x":16, "y":0.125}, + {"label":"0)", "x":17, "y":0.625}, + {"label":"`~", "x":18, "y":0.625, "w":1.5}, + + {"label":"Tab", "x":0, "y":1.625, "w":1.5}, + {"label":"Q", "x":1.5, "y":1.625}, + {"label":"W", "x":2.5, "y":1.125}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1.125}, + {"label":"T", "x":5.5, "y":1.25}, + {"label":"[{", "x":6.5, "y":1.25, "h":1.5}, + {"label":"]}", "x":12, "y":1.25, "h":1.5}, + {"label":"Y", "x":13, "y":1.25}, + {"label":"U", "x":14, "y":1.125}, + {"label":"I", "x":16, "y":1.125}, + {"label":"O", "x":15, "y":1}, + {"label":"P", "x":17, "y":1.625}, + {"label":"\\|", "x":18, "y":1.625, "w":1.5}, + + {"label":"Ctrl", "x":0, "y":2.625, "w":1.5}, + {"label":"A", "x":1.5, "y":2.625}, + {"label":"S", "x":2.5, "y":2.125}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2.125}, + {"label":"G", "x":5.5, "y":2.25}, + {"label":"H", "x":13, "y":2.25}, + {"label":"J", "x":14, "y":2.125}, + {"label":"K", "x":16, "y":2.125}, + {"label":"L", "x":15, "y":2}, + {"label":";:", "x":17, "y":2.625}, + {"label":"'\"", "x":18, "y":2.625, "w":1.5}, + + {"label":"Shift", "x":0, "y":3.625, "w":1.5}, + {"label":"Z", "x":1.5, "y":3.625}, + {"label":"X", "x":2.5, "y":3.125}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3.125}, + {"label":"B", "x":5.5, "y":3.25}, + {"label":"(", "x":6.5, "y":2.75, "h":1.5}, + {"label":"Home", "x":7.5, "y":3.75}, + {"label":"End", "x":11, "y":3.75}, + {"label":")", "x":12, "y":2.75, "h":1.5}, + {"label":"N", "x":13, "y":3.25}, + {"label":"M", "x":14, "y":3.125}, + {"label":",<", "x":15, "y":3}, + {"label":".>", "x":16, "y":3.125}, + {"label":"/?", "x":17, "y":3.625}, + {"label":"Shift", "x":18, "y":3.625, "w":1.5}, + + {"label":"GUI", "x":2.5, "y":4.125}, + {"label":"Alt", "x":3.5, "y":4}, + {"label":"Lower", "x":4.5, "y":4.125}, + {"label":"Space", "x":5.75, "y":4.5, "w":1.5}, + {"label":"Backspace", "x":7.25, "y":4.75}, + {"label":"Enter", "x":11.25, "y":4.75}, + {"label":"Space", "x":12.25, "y":4.5, "w":1.5}, + {"label":"Raise", "x":14, "y":4.125}, + {"label":"Alt", "x":15, "y":4}, + {"label":"MEH", "x":16, "y":4.125} ] } } diff --git a/keyboards/pluckey/keymaps/default/keymap.c b/keyboards/pluckey/keymaps/default/keymap.c index 31042fc6925..787bb192b20 100644 --- a/keyboards/pluckey/keymaps/default/keymap.c +++ b/keyboards/pluckey/keymaps/default/keymap.c @@ -35,28 +35,28 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LPRN, KC_RPRN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_HOME, KC_END, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LGUI, KC_LALT, MO_LOW, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, MO_RAIS, KC_RALT, KC_MEH ), - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT_all( _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_LPRN, KC_RPRN, KC_PLUS, KC_PIPE, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_LPRN, KC_RPRN, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, _______, _______, _______, _______, _______, _______, M_ARROW, KC_PGUP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO_CURR, _______, KC_DEL, _______, _______, MO_ADJU, _______, _______ ), - [_RAISE] = LAYOUT( + [_RAISE] = LAYOUT_all( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, KC_LPRN, KC_RPRN, _______, KC_BTN4, KC_UP, KC_BTN5, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, _______, _______, KC_VOLD, _______, _______, M_ARROW, KC_PGUP, KC_PGDN, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, MO_ADJU, _______, KC_DEL, _______, _______, MO_CURR, _______, _______ ), - [_ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT_all( KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, _______, diff --git a/keyboards/pluckey/keymaps/default_ergo/keymap.c b/keyboards/pluckey/keymaps/default_ergo/keymap.c new file mode 100644 index 00000000000..313b118b8ae --- /dev/null +++ b/keyboards/pluckey/keymaps/default_ergo/keymap.c @@ -0,0 +1,77 @@ +/* Copyright 2021 floookay + * + * 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 . + */ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + M_ARROW +}; + +#define MO_LOW MO(_LOWER) +#define MO_RAIS MO(_RAISE) +#define MO_ADJU MO(_ADJUST) +#define MO_CURR _______ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_ergo( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LPRN, KC_HOME, KC_END, KC_RPRN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT, MO_LOW, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, MO_RAIS, KC_RALT, KC_MEH + ), + [_LOWER] = LAYOUT_ergo( + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PSCR, + _______, _______, _______, _______, KC_PIPE, KC_UNDS, KC_LPRN, KC_RPRN, KC_PLUS, KC_PIPE, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, _______, _______, _______, _______, _______, M_ARROW, KC_PGUP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, + _______, _______, MO_CURR, _______, KC_DEL, _______, _______, MO_ADJU, _______, _______ + ), + [_RAISE] = LAYOUT_ergo( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, + _______, _______, _______, KC_VOLU, _______, _______, KC_LPRN, KC_RPRN, _______, KC_BTN4, KC_UP, KC_BTN5, _______, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, + _______, _______, _______, KC_VOLD, _______, _______, M_ARROW, KC_PGUP, KC_PGDN, _______, _______, _______, KC_PGDN, _______, _______, _______, + _______, _______, MO_ADJU, _______, KC_DEL, _______, _______, MO_CURR, _______, _______ + ), + [_ADJUST] = LAYOUT_ergo( + KC_SLEP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_WH_U, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_WH_L, KC_WH_D, KC_WH_R, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_CLR, _______, _______, _______, _______, _______ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M_ARROW: + if (record->event.pressed) { + SEND_STRING("->"); + } + break; + } + return true; +} diff --git a/keyboards/pluckey/pluckey.h b/keyboards/pluckey/pluckey.h index 628a89baa9a..d7d6dc4d3af 100644 --- a/keyboards/pluckey/pluckey.h +++ b/keyboards/pluckey/pluckey.h @@ -18,6 +18,22 @@ #include "quantum.h" +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐ + * ┌─────┬───┤L02│L03│L04│L05│L06│ │R00│R01│R02│R03│R04├───┬─────┐ + * │L00 │L01├───┼───┼───┼───┼───┤ ┌───┐ ┌───┐ ├───┼───┼───┼───┼───┤R05│R06 │ + * ├─────┼───┤L12│L13│L14│L15│L16│ │L16│ │R10│ │R10│R11│R12│R13│R14├───┼─────┤ + * │L10 │L11├───┼───┼───┼───┼───┤ │ │ │ │ ├───┼───┼───┼───┼───┤R15│R16 │ + * ├─────┼───┤L22│L23│L24│L25│L26│ ├───┤ ├───┤ │R20│R21│R22│R23│R24├───┼─────┤ + * │L20 │L21├───┼───┼───┼───┼───┼───┐ │L36├───┐ ┌───┤R30│ ┌───┼───┼───┼───┼───┼───┤R25│R26 │ + * ├─────┼───┤L32│L33│L34│L35│L36│L41│ │ │ │ │ │ │ │R45│R30│R31│R32│R33│R34├───┼─────┤ + * │L30 │L31├───┼───┼───┼┬──┴──┬┴──┬┘ └──┬┘ ┌┘ └┐ └┬──┘ └┬──┴┬──┴──┬┼───┼───┼───┤R35│R36 │ + * └─────┴───┤L42│L43│L44││L45 │L46│ │L46│ │R40│ │R40│R41 ││R42│R43│R44├───┴─────┘ + * └───┴───┴───┘└─────┴───┘ └───┘ └───┘ └───┴─────┘└───┴───┴───┘ + */ + /* This is a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -26,21 +42,40 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ +#define LAYOUT_all( \ l00, l01, l02, l03, l04, l05, l06, r00, r01, r02, r03, r04, r05, r06, \ l10, l11, l12, l13, l14, l15, l16, r10, r11, r12, r13, r14, r15, r16, \ l20, l21, l22, l23, l24, l25, l26, r20, r21, r22, r23, r24, r25, r26, \ l30, l31, l32, l33, l34, l35, l36, l41, r45, r30, r31, r32, r33, r34, r35, r36, \ l42, l43, l44, l45, l46, r40, r41, r42, r43, r44 \ ){ \ - { l00, l01, l02, l03, l04, l05, l06 }, \ - { l10, l11, l12, l13, l14, l15, l16 }, \ - { l20, l21, l22, l23, l24, l25, l26 }, \ - { l30, l31, l32, l33, l34, l35, l36 }, \ - { KC_NO, l41, l42, l43, l44, l45, l46 }, \ - { r06, r05, r04, r03, r02, r01, r00 }, \ - { r16, r15, r14, r13, r12, r11, r10 }, \ - { r26, r25, r24, r23, r22, r21, r20 }, \ - { r36, r35, r34, r33, r32, r31, r30 }, \ - { KC_NO, r45, r44, r43, r42, r41, r40 } \ + { l00, l01, l02, l03, l04, l05, l06 }, \ + { l10, l11, l12, l13, l14, l15, l16 }, \ + { l20, l21, l22, l23, l24, l25, l26 }, \ + { l30, l31, l32, l33, l34, l35, l36 }, \ + { XXX, l41, l42, l43, l44, l45, l46 }, \ + { r06, r05, r04, r03, r02, r01, r00 }, \ + { r16, r15, r14, r13, r12, r11, r10 }, \ + { r26, r25, r24, r23, r22, r21, r20 }, \ + { r36, r35, r34, r33, r32, r31, r30 }, \ + { XXX, r45, r44, r43, r42, r41, r40 } \ +} + +#define LAYOUT_ergo( \ + l00, l01, l02, l03, l04, l05, l06, r00, r01, r02, r03, r04, r05, r06, \ + l10, l11, l12, l13, l14, l15, l16, r10, r11, r12, r13, r14, r15, r16, \ + l20, l21, l22, l23, l24, l25, r21, r22, r23, r24, r25, r26, \ + l30, l31, l32, l33, l34, l35, l36, l41, r45, r30, r31, r32, r33, r34, r35, r36, \ + l42, l43, l44, l45, l46, r40, r41, r42, r43, r44 \ +){ \ + { l00, l01, l02, l03, l04, l05, l06 }, \ + { l10, l11, l12, l13, l14, l15, l16 }, \ + { l20, l21, l22, l23, l24, l25, XXX }, \ + { l30, l31, l32, l33, l34, l35, l36 }, \ + { XXX, l41, l42, l43, l44, l45, l46 }, \ + { r06, r05, r04, r03, r02, r01, r00 }, \ + { r16, r15, r14, r13, r12, r11, r10 }, \ + { r26, r25, r24, r23, r22, r21, XXX }, \ + { r36, r35, r34, r33, r32, r31, r30 }, \ + { XXX, r45, r44, r43, r42, r41, r40 } \ } diff --git a/keyboards/plume/plume65/rules.mk b/keyboards/plume/plume65/rules.mk index 1469070fe02..dffafb00a49 100644 --- a/keyboards/plume/plume65/rules.mk +++ b/keyboards/plume/plume65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/plut0nium/0x3e/keymaps/default/keymap.c b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c index ed2c464e463..bca46e9910c 100644 --- a/keyboards/plut0nium/0x3e/keymaps/default/keymap.c +++ b/keyboards/plut0nium/0x3e/keymaps/default/keymap.c @@ -24,30 +24,30 @@ enum layer_names { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base */ [_QWERTY] = LAYOUT( - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, KC_SPC, KC_SPC, KC_PGDN, KC_SPC, KC_SPC, KC_RALT, KC_LBRC, KC_RBRC, KC_RCTL + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGUP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_MENU, KC_LALT, KC_SPC, KC_SPC, KC_PGDN, KC_SPC, KC_SPC, KC_RALT, KC_LBRC, KC_RBRC, KC_RCTL ), [_FN] = LAYOUT( - KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, - RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + RESET, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, _______, KC_END, _______, _______, BL_INC, KC_MPLY, KC_VOLU, KC_MUTE, _______, RGB_HUD, RGB_SAD, RGB_VAD, RGB_TOG, RGB_TOG, KC_HOME, BL_TOGG, BL_TOGG, BL_DEC, KC_MPRV, KC_VOLD, KC_MNXT ) }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM my_logo[] = { // '0x3E_logo_32x16', 32x16px - 0xff, 0x0f, 0x07, 0xf3, 0x73, 0xb3, 0x07, 0x0f, 0xff, 0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0xff, - 0xe7, 0xe3, 0x33, 0x33, 0x03, 0x87, 0xff, 0xff, 0x03, 0x03, 0x33, 0x33, 0x33, 0xf3, 0xff, 0xff, - 0x7f, 0x78, 0x70, 0x66, 0x67, 0x67, 0x70, 0x78, 0x7f, 0x67, 0x62, 0x78, 0x78, 0x62, 0x67, 0x7f, + 0xff, 0x0f, 0x07, 0xf3, 0x73, 0xb3, 0x07, 0x0f, 0xff, 0x3f, 0x3f, 0xff, 0xff, 0x3f, 0x3f, 0xff, + 0xe7, 0xe3, 0x33, 0x33, 0x03, 0x87, 0xff, 0xff, 0x03, 0x03, 0x33, 0x33, 0x33, 0xf3, 0xff, 0xff, + 0x7f, 0x78, 0x70, 0x66, 0x67, 0x67, 0x70, 0x78, 0x7f, 0x67, 0x62, 0x78, 0x78, 0x62, 0x67, 0x7f, 0x73, 0x63, 0x67, 0x67, 0x60, 0x70, 0x7f, 0x7f, 0x60, 0x60, 0x67, 0x67, 0x67, 0x67, 0x7f, 0x7f - }; + }; oled_write_raw_P(my_logo, sizeof(my_logo)); } @@ -117,7 +117,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 180 degrees if offhand } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); oled_set_cursor(0,2); // default logo is 16px high (2 lines) @@ -153,5 +153,6 @@ void oled_task_user(void) { render_rgb_status(); #endif + return false; } #endif diff --git a/keyboards/plut0nium/0x3e/rules.mk b/keyboards/plut0nium/0x3e/rules.mk index 7a0ec2db214..820f08573bd 100644 --- a/keyboards/plut0nium/0x3e/rules.mk +++ b/keyboards/plut0nium/0x3e/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -15,5 +15,5 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow -OLED_DRIVER_ENABLE = yes +OLED_ENABLE = yes LTO_ENABLE = yes diff --git a/keyboards/pohjolaworks/louhi/rules.mk b/keyboards/pohjolaworks/louhi/rules.mk index 7565bca8608..786af209df3 100644 --- a/keyboards/pohjolaworks/louhi/rules.mk +++ b/keyboards/pohjolaworks/louhi/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/poker87c/rules.mk b/keyboards/poker87c/rules.mk index b092d33b6ad..131264b21a5 100644 --- a/keyboards/poker87c/rules.mk +++ b/keyboards/poker87c/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/poker87d/rules.mk b/keyboards/poker87d/rules.mk index d2668e7e908..65c9772e7a5 100644 --- a/keyboards/poker87d/rules.mk +++ b/keyboards/poker87d/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/polycarbdiet/s20/rules.mk b/keyboards/polycarbdiet/s20/rules.mk index 4e17fcc5b79..f01d87605c2 100644 --- a/keyboards/polycarbdiet/s20/rules.mk +++ b/keyboards/polycarbdiet/s20/rules.mk @@ -6,7 +6,7 @@ BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pom_keyboards/tnln95/rules.mk b/keyboards/pom_keyboards/tnln95/rules.mk index 9fcdb878a2d..8ef55ee35d7 100644 --- a/keyboards/pom_keyboards/tnln95/rules.mk +++ b/keyboards/pom_keyboards/tnln95/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/portal_66/hotswap/hotswap.h b/keyboards/portal_66/hotswap/hotswap.h index 734184dd77b..484594b9cba 100644 --- a/keyboards/portal_66/hotswap/hotswap.h +++ b/keyboards/portal_66/hotswap/hotswap.h @@ -18,16 +18,32 @@ #include "quantum.h" -#define LAYOUT( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ - k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ - k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┬───┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0E │0F │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┼───┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1F │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2F │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3F │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │46 │49 │4B │ │4C │4D │4F │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + */ + +#define LAYOUT_65_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \ ) { \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ - { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ - { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \ } diff --git a/keyboards/portal_66/hotswap/info.json b/keyboards/portal_66/hotswap/info.json index e90bdd8813c..984134a4e74 100644 --- a/keyboards/portal_66/hotswap/info.json +++ b/keyboards/portal_66/hotswap/info.json @@ -1,8 +1,11 @@ { "keyboard_name": "Portal 66 Hotswap", "maintainer": "matthewdias", + "layout_aliases": { + "LAYOUT": "LAYOUT_65_ansi_blocker" + }, "layouts": { - "LAYOUT": { + "LAYOUT_65_ansi_blocker": { "layout": [ { "x":0, "y":0 }, { "x":1, "y":0 }, diff --git a/keyboards/portal_66/hotswap/keymaps/default/keymap.c b/keyboards/portal_66/hotswap/keymaps/default/keymap.c index a476f5984d3..5f9143a2ad1 100644 --- a/keyboards/portal_66/hotswap/keymaps/default/keymap.c +++ b/keyboards/portal_66/hotswap/keymaps/default/keymap.c @@ -21,14 +21,14 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_65_ansi_blocker( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, 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_END, KC_CAPS, 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_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN] = LAYOUT( + [_FN] = LAYOUT_65_ansi_blocker( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/portal_66/hotswap/keymaps/via/keymap.c b/keyboards/portal_66/hotswap/keymaps/via/keymap.c index a89f1eee66c..7f9878eae3d 100644 --- a/keyboards/portal_66/hotswap/keymaps/via/keymap.c +++ b/keyboards/portal_66/hotswap/keymaps/via/keymap.c @@ -23,28 +23,28 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_L0] = LAYOUT( + [_L0] = LAYOUT_65_ansi_blocker( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME, KC_TAB, 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_END, KC_CAPS, 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_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT ), - [_L1] = LAYOUT( + [_L1] = LAYOUT_65_ansi_blocker( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_L2] = LAYOUT( + [_L2] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_L3] = LAYOUT( + [_L3] = LAYOUT_65_ansi_blocker( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/portal_66/hotswap/rules.mk b/keyboards/portal_66/hotswap/rules.mk index c79f74e34b9..7e08b05d501 100644 --- a/keyboards/portal_66/hotswap/rules.mk +++ b/keyboards/portal_66/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -19,3 +19,5 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker diff --git a/keyboards/portal_66/soldered/info.json b/keyboards/portal_66/soldered/info.json index 730b5400ead..de621a2f703 100644 --- a/keyboards/portal_66/soldered/info.json +++ b/keyboards/portal_66/soldered/info.json @@ -1,8 +1,14 @@ { "keyboard_name": "Portal 66", "maintainer": "matthewdias", + "layout_aliases": { + "LAYOUT_65_ansi_split_bs": "LAYOUT_65_ansi_blocker_split_bs", + "LAYOUT_65_ansi": "LAYOUT_65_ansi_blocker", + "LAYOUT_65_tsangan_split_bs": "LAYOUT_65_ansi_blocker_tsangan_split_bs", + "LAYOUT_65_iso": "LAYOUT_65_iso_blocker" + }, "layouts": { - "LAYOUT_65_ansi_split_bs": { + "LAYOUT_65_ansi_blocker_split_bs": { "layout": [ { "x":0, "y":0 }, { "x":1, "y":0 }, @@ -78,7 +84,7 @@ { "x":15, "y":4 } ] }, - "LAYOUT_65_ansi": { + "LAYOUT_65_ansi_blocker": { "layout": [ { "x":0, "y":0 }, { "x":1, "y":0 }, @@ -153,7 +159,7 @@ { "x":15, "y":4 } ] }, - "LAYOUT_65_tsangan_split_bs": { + "LAYOUT_65_ansi_blocker_tsangan_split_bs": { "layout": [ { "x":0, "y":0 }, { "x":1, "y":0 }, @@ -228,7 +234,84 @@ { "x":15, "y":4 } ] }, - "LAYOUT_65_iso": { + "LAYOUT_65_iso_blocker_split_bs": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2 }, + { "x":13.75, "y":1, "w":1.25, "h":2 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":1.25 }, + { "x":1.25, "y":3 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.25 }, + { "x":1.25, "y":4, "w":1.25 }, + { "x":2.5, "y":4, "w":1.25 }, + { "x":3.75, "y":4, "w":6.25 }, + { "x":10, "y":4, "w":1.25 }, + { "x":11.25, "y":4, "w":1.25 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] + }, + "LAYOUT_65_iso_blocker": { "layout": [ { "x":0, "y":0 }, { "x":1, "y":0 }, @@ -303,6 +386,82 @@ { "x":14, "y":4 }, { "x":15, "y":4 } ] + }, + "LAYOUT_65_iso_blocker_tsangan_split_bs": { + "layout": [ + { "x":0, "y":0 }, + { "x":1, "y":0 }, + { "x":2, "y":0 }, + { "x":3, "y":0 }, + { "x":4, "y":0 }, + { "x":5, "y":0 }, + { "x":6, "y":0 }, + { "x":7, "y":0 }, + { "x":8, "y":0 }, + { "x":9, "y":0 }, + { "x":10, "y":0 }, + { "x":11, "y":0 }, + { "x":12, "y":0 }, + { "x":13, "y":0 }, + { "x":14, "y":0 }, + { "x":15, "y":0 }, + + { "x":0, "y":1, "w":1.5 }, + { "x":1.5, "y":1 }, + { "x":2.5, "y":1 }, + { "x":3.5, "y":1 }, + { "x":4.5, "y":1 }, + { "x":5.5, "y":1 }, + { "x":6.5, "y":1 }, + { "x":7.5, "y":1 }, + { "x":8.5, "y":1 }, + { "x":9.5, "y":1 }, + { "x":10.5, "y":1 }, + { "x":11.5, "y":1 }, + { "x":12.5, "y":1 }, + { "x":15, "y":1 }, + + { "x":0, "y":2, "w":1.75 }, + { "x":1.75, "y":2 }, + { "x":2.75, "y":2 }, + { "x":3.75, "y":2 }, + { "x":4.75, "y":2 }, + { "x":5.75, "y":2 }, + { "x":6.75, "y":2 }, + { "x":7.75, "y":2 }, + { "x":8.75, "y":2 }, + { "x":9.75, "y":2 }, + { "x":10.75, "y":2 }, + { "x":11.75, "y":2 }, + { "x":12.75, "y":2 }, + { "x":13.75, "y":1, "w":1.25, "h":2 }, + { "x":15, "y":2 }, + + { "x":0, "y":3, "w":1.25 }, + { "x":1.25, "y":3 }, + { "x":2.25, "y":3 }, + { "x":3.25, "y":3 }, + { "x":4.25, "y":3 }, + { "x":5.25, "y":3 }, + { "x":6.25, "y":3 }, + { "x":7.25, "y":3 }, + { "x":8.25, "y":3 }, + { "x":9.25, "y":3 }, + { "x":10.25, "y":3 }, + { "x":11.25, "y":3 }, + { "x":12.25, "y":3, "w":1.75 }, + { "x":14, "y":3 }, + { "x":15, "y":3 }, + + { "x":0, "y":4, "w":1.5 }, + { "x":1.5, "y":4, "w":1 }, + { "x":2.5, "y":4, "w":1.5 }, + { "x":4, "y":4, "w":7 }, + { "x":11, "y":4, "w":1.5 }, + { "x":13, "y":4 }, + { "x":14, "y":4 }, + { "x":15, "y":4 } + ] } } } diff --git a/keyboards/portal_66/soldered/keymaps/default/keymap.c b/keyboards/portal_66/soldered/keymaps/default/keymap.c index 3260f412a23..8b40550b86a 100644 --- a/keyboards/portal_66/soldered/keymaps/default/keymap.c +++ b/keyboards/portal_66/soldered/keymaps/default/keymap.c @@ -21,14 +21,14 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT_65_ansi_split_bs( + [_BASE] = LAYOUT_65_ansi_blocker_split_bs( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, KC_TAB, 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_END, KC_CAPS, 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_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT ), - [_FN] = LAYOUT_65_ansi_split_bs( + [_FN] = LAYOUT_65_ansi_blocker_split_bs( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/portal_66/soldered/keymaps/via/keymap.c b/keyboards/portal_66/soldered/keymaps/via/keymap.c index 7ea1f44b0b4..97c74de1f17 100644 --- a/keyboards/portal_66/soldered/keymaps/via/keymap.c +++ b/keyboards/portal_66/soldered/keymaps/via/keymap.c @@ -23,28 +23,28 @@ enum layer_names { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_L0] = LAYOUT_65_ansi_split_bs( + [_L0] = LAYOUT_65_ansi_blocker_split_bs( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_HOME, KC_TAB, 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_END, KC_CAPS, 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_PGUP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_L1), KC_LEFT, KC_DOWN, KC_RGHT ), - [_L1] = LAYOUT_65_ansi_split_bs( + [_L1] = LAYOUT_65_ansi_blocker_split_bs( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_L2] = LAYOUT_65_ansi_split_bs( + [_L2] = LAYOUT_65_ansi_blocker_split_bs( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), - [_L3] = LAYOUT_65_ansi_split_bs( + [_L3] = LAYOUT_65_ansi_blocker_split_bs( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, diff --git a/keyboards/portal_66/soldered/rules.mk b/keyboards/portal_66/soldered/rules.mk index 9906266f482..01798d604f1 100644 --- a/keyboards/portal_66/soldered/rules.mk +++ b/keyboards/portal_66/soldered/rules.mk @@ -19,3 +19,5 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +LAYOUTS = 65_ansi_blocker 65_ansi_blocker_split_bs 65_iso_blocker 65_iso_blocker_split_bs diff --git a/keyboards/portal_66/soldered/soldered.h b/keyboards/portal_66/soldered/soldered.h index 9fde7850d76..b2ae9cbaac6 100644 --- a/keyboards/portal_66/soldered/soldered.h +++ b/keyboards/portal_66/soldered/soldered.h @@ -18,58 +18,105 @@ #include "quantum.h" -#define LAYOUT_65_ansi_split_bs( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ - k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ - k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +#define XXX KC_NO + +/* + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───────┐ + * │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0A │0B │0C │0D │0E │0F │ │0E │ 2u Backspace + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ └─┬─────┤ + * │10 │11 │12 │13 │14 │15 │16 │17 │18 │19 │1A │1B │1C │1D │1F │ │ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ ┌──┴┐2D │ ISO Enter + * │20 │21 │22 │23 │24 │25 │26 │27 │28 │29 │2A │2B │2D │2F │ │2C │ │ + * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ └───┴────┘ + * │30 │32 │33 │34 │35 │36 │37 │38 │39 │3A │3B │3C │3D │3F │ + * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ + * │40 │41 │42 │46 │49 │4B │ │4C │4D │4F │ + * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ + * ┌─────┬───┬─────┬───────────────────────────┬─────┐ + * │40 │41 │42 │46 │4B │ Tsangan + * └─────┴───┴─────┴───────────────────────────┴─────┘ + */ + +#define LAYOUT_65_ansi_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \ +} + +#define LAYOUT_65_ansi_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \ +} + +#define LAYOUT_65_ansi_blocker_tsangan_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k4B, k4C, k4D, k4F \ ) { \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ - { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ - { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, XXX, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, k4D, XXX, k4F } \ } -#define LAYOUT_65_ansi( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ - k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ - k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +#define LAYOUT_65_iso_blocker_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \ ) { \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ - { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ - { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \ } -#define LAYOUT_65_tsangan_split_bs( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k115, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k213, k215, \ - k300, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ - k400, k401, k402, k406, k411, k412, k413, k415 \ +#define LAYOUT_65_iso_blocker( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k49, k4B, k4C, k4D, k4F \ ) { \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, KC_NO, k115 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, KC_NO, k213, KC_NO, k215 }, \ - { k300, KC_NO, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ - { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, k413, KC_NO, k415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, k49, XXX, k4B, k4C, k4D, XXX, k4F } \ } -#define LAYOUT_65_iso( \ - k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k014, k015, \ - k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k115, \ - k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, k215, \ - k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, k315, \ - k400, k401, k402, k406, k409, k411, k412, k413, k415 \ +#define LAYOUT_65_iso_blocker_tsangan_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k40, k41, k42, k46, k4B, k4C, k4D, k4F \ ) { \ - { k000, k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, KC_NO, k014, k015 }, \ - { k100, k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, KC_NO, KC_NO, k115 }, \ - { k200, k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, KC_NO, k215 }, \ - { k300, k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, KC_NO, k315 }, \ - { k400, k401, k402, KC_NO, KC_NO, KC_NO, k406, KC_NO, KC_NO, k409, KC_NO, k411, k412, k413, KC_NO, k415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, XXX, XXX, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, XXX, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, k3F }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, XXX, k4B, k4C, k4D, XXX, k4F } \ } diff --git a/keyboards/pos78/rules.mk b/keyboards/pos78/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/pos78/rules.mk +++ b/keyboards/pos78/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index dfd0a8439a5..8f72de90943 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -78,5 +77,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/preonic/keymaps/arkag/rules.mk b/keyboards/preonic/keymaps/arkag/rules.mk index 671da6f94d1..5b87801fca6 100644 --- a/keyboards/preonic/keymaps/arkag/rules.mk +++ b/keyboards/preonic/keymaps/arkag/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no STENO_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/preonic/keymaps/badger/keymap.c b/keyboards/preonic/keymaps/badger/keymap.c index 495cf28c455..761beb861fa 100644 --- a/keyboards/preonic/keymaps/badger/keymap.c +++ b/keyboards/preonic/keymaps/badger/keymap.c @@ -14,7 +14,7 @@ along with this program. If not, see . */ // if not REV3, just compile the default keymaps -#ifndef REV3_CONFIG_H +#ifndef KEYBOARD_preonic_rev3 #include "../default/keymap.c" #else diff --git a/keyboards/preonic/keymaps/dlaroe/rules.mk b/keyboards/preonic/keymaps/dlaroe/rules.mk index 38fb7375c09..4a62771e705 100644 --- a/keyboards/preonic/keymaps/dlaroe/rules.mk +++ b/keyboards/preonic/keymaps/dlaroe/rules.mk @@ -4,7 +4,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/preonic/rev1/config.h b/keyboards/preonic/rev1/config.h index 76b6465909a..a1091b10ed0 100644 --- a/keyboards/preonic/rev1/config.h +++ b/keyboards/preonic/rev1/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x0001 #define PRODUCT_ID 0x67F3 - -#endif \ No newline at end of file diff --git a/keyboards/preonic/rev1/rules.mk b/keyboards/preonic/rev1/rules.mk index 5cc5be7f7b0..58c48aa5e05 100644 --- a/keyboards/preonic/rev1/rules.mk +++ b/keyboards/preonic/rev1/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/preonic/rev2/config.h b/keyboards/preonic/rev2/config.h index 29fc091848d..a62fed48508 100644 --- a/keyboards/preonic/rev2/config.h +++ b/keyboards/preonic/rev2/config.h @@ -15,12 +15,9 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef REV2_CONFIG_H -#define REV2_CONFIG_H +#pragma once #include "config_common.h" #define DEVICE_VER 0x0002 #define PRODUCT_ID 0x67F3 - -#endif \ No newline at end of file diff --git a/keyboards/preonic/rev2/rules.mk b/keyboards/preonic/rev2/rules.mk index 9d3bef39f10..2fcfb66c309 100644 --- a/keyboards/preonic/rev2/rules.mk +++ b/keyboards/preonic/rev2/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = qmk-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 420e7e54130..f2c4b3c3d8c 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -15,8 +15,7 @@ * along with this program. If not, see . */ -#ifndef REV3_CONFIG_H -#define REV3_CONFIG_H +#pragma once /* USB Device descriptor parameter */ #define DEVICE_VER 0x0003 @@ -107,5 +106,3 @@ #define WS2812_PWM_PAL_MODE 1 #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 #define WS2812_DMA_CHANNEL 2 - -#endif diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index b89945642bb..5faf3fda491 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = stm32-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/primekb/meridian/ktr1010/config.h b/keyboards/primekb/meridian/ktr1010/config.h new file mode 100644 index 00000000000..bf91dc9715f --- /dev/null +++ b/keyboards/primekb/meridian/ktr1010/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x004D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Prime Keyboards +#define PRODUCT Meridian + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 3 +// Special timing definitions for KTR101 +#define WS2812_TIMING 1325 +#define WS2812_T0H 350 +#define WS2812_T1H 975 +#define WS2812_T0L 975 +#define WS2812_T1L 350 +#define WS2812_RES_US 100 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/primekb/meridian/ktr1010/rules.mk b/keyboards/primekb/meridian/ktr1010/rules.mk new file mode 100644 index 00000000000..1bc213906fd --- /dev/null +++ b/keyboards/primekb/meridian/ktr1010/rules.mk @@ -0,0 +1 @@ +WS2812_DRIVER = bitbang diff --git a/keyboards/primekb/meridian/readme.md b/keyboards/primekb/meridian/readme.md index 0e3339a5974..01df9c5ba3b 100644 --- a/keyboards/primekb/meridian/readme.md +++ b/keyboards/primekb/meridian/readme.md @@ -5,8 +5,28 @@ * Keyboard Maintainer: [Holten Campbell](https://github.com/holtenc) * Hardware Supported: STM32F072CBT6 -Make example for this keyboard (after setting up your build environment): +## Compiling firmware and flashing - make primekb/meridian:default +### Enter bootloader + +The DFU state in the bootloader can be accessed in 3 ways: + +* **Bootmagic reset**: hold down the key at (0,0) in the matrix (usually Escape) and plug in the keyboard; or +* **Physical reset button**: press the button on the bottom of the PCB; or +* **Keycode in layout**: press the key mapped to `RESET` if it is available (Escape key on layer 1 in the default layout). + +### Compile firmware + +The Meridian PCB was delivered in two variants, equal in design but using different RGB LED models: one using WS2812 and another using KTR1010 LEDs. Both can be compiled using + + make primekb/meridian/ws1812:default + make primekb/meridian/ktr1010:default + +After compiling, enter bootloader in the PCB and flash the firmware using `dfu-util` or QMK Toolbox. For direct compile-and-flashing, put the PCB in DFU state and use + + make primekb/meridian/ws1812:default:flash + make primekb/meridian/ktr1010:default:flash + +VIA-supported firmwares are also available. See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/primekb/meridian/rules.mk b/keyboards/primekb/meridian/rules.mk index 03b75985216..f6c9d4ee60d 100644 --- a/keyboards/primekb/meridian/rules.mk +++ b/keyboards/primekb/meridian/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -19,7 +19,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -WS2812_DRIVER = spi # Enter lower-power sleep mode when on the ChibiOS idle thread OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/primekb/meridian/ws2812/config.h b/keyboards/primekb/meridian/ws2812/config.h new file mode 100644 index 00000000000..082392c6bd2 --- /dev/null +++ b/keyboards/primekb/meridian/ws2812/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2020 Holten Campbell + +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 . +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x5052 +#define PRODUCT_ID 0x004D +#define DEVICE_VER 0x0001 +#define MANUFACTURER Prime Keyboards +#define PRODUCT Meridian + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_COL_PINS { B11, B10, B2, B1, B0, A7, B9, B8, B7, B6, B5, B4, B3, A15 } +#define MATRIX_ROW_PINS { A6, A5, A4, A3, A2 } +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN B15 +#define RGBLED_NUM 3 +#define WS2812_SPI SPID2 +#define WS2812_SPI_MOSI_PAL_MODE 0 +#define WS2812_SPI_SCK_PAL_MODE 0 +#define WS2812_SPI_SCK_PIN B13 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE diff --git a/keyboards/primekb/meridian/ws2812/rules.mk b/keyboards/primekb/meridian/ws2812/rules.mk new file mode 100644 index 00000000000..c09c0d5fa44 --- /dev/null +++ b/keyboards/primekb/meridian/ws2812/rules.mk @@ -0,0 +1 @@ +WS2812_DRIVER = spi diff --git a/keyboards/primekb/prime_e/rules.mk b/keyboards/primekb/prime_e/rules.mk index c10645db9ad..7ae7f2593de 100644 --- a/keyboards/primekb/prime_e/rules.mk +++ b/keyboards/primekb/prime_e/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/primekb/prime_o/prime_o.h b/keyboards/primekb/prime_o/prime_o.h index 99a80545225..fec3392b319 100644 --- a/keyboards/primekb/prime_o/prime_o.h +++ b/keyboards/primekb/prime_o/prime_o.h @@ -13,28 +13,26 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIME_O_H -#define PRIME_O_H + +#pragma once #include "quantum.h" #define LAYOUT( \ - K001, K008, K013, K018, K023, K029, K035, K041, K046, K052, K058, K064, K071, K076, K081, K086, \ - K002, K009, K014, K019, K024, K030, K036, K042, K047, K053, K059, K065, K072, K077, K082, K087, \ - K004, K010, K015, K020, K025, K031, K037, K043, K048, K054, K060, K066, K073, K078, K083, K089, \ - K005, K011, K016, K021, K026, K032, K038, K044, K049, K055, K061, K067, K074, K079, K084, K090, \ - K007, K012, K017, K022, K028, K034, K040, K045, K051, K057, K063, K069, K075, K080, K085, K092 \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k30, k60, k31, k61, k32, k62, k33, k63, k34, k64, k35, k65, k36, k66, k37, k67, \ + k20, k70, k21, k71, k22, k72, k23, k73, k24, k74, k25, k75, k26, k76, k27, k77, \ + k10, k80, k11, k81, k12, k82, k13, k83, k14, k84, k15, k85, k16, k86, k17, k87, \ + k00, k90, k01, k91, k02, k92, k03, k93, k04, k94, k05, k95, k06, k96, k07, k97 \ ) { \ - { K007, K017, K028, K040, K051, K063, K075, K085 }, \ - { K005, K016, K026, K038, K049, K061, K074, K084 }, \ - { K004, K015, K025, K037, K048, K060, K073, K083 }, \ - { K002, K014, K024, K036, K047, K059, K072, K082 }, \ - { K001, K013, K023, K035, K046, K058, K071, K081 }, \ - { K008, K018, K029, K041, K052, K064, K076, K086 }, \ - { K009, K019, K030, K042, K053, K065, K077, K087 }, \ - { K010, K020, K031, K043, K054, K066, K078, K089 }, \ - { K011, K021, K032, K044, K055, K067, K079, K090 }, \ - { K012, K022, K034, K045, K057, K069, K080, K092 } \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 }, \ + { k80, k81, k82, k83, k84, k85, k86, k87 }, \ + { k90, k91, k92, k93, k94, k95, k96, k97 } \ } - -#endif diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index abf559d8aa6..b73eb346a79 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -61,5 +60,3 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/primekb/prime_r/prime_r.h b/keyboards/primekb/prime_r/prime_r.h index 8295fc336cc..905b5c8cf8b 100644 --- a/keyboards/primekb/prime_r/prime_r.h +++ b/keyboards/primekb/prime_r/prime_r.h @@ -13,23 +13,23 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef PRIMER_H -#define PRIMER_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K212, K213, K214, K215, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ - K400, K402, K403, K404, K405, K407, K409, K410, K411, K412, K413, K414, K415 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2C, k2D, k2E, k2F, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, \ + k40, k42, k43, k44, k45, k47, k49, k4A, k4B, k4C, k4D, k4E, k4F \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, KC_NO, K212, K213, K214, K215 }, \ - { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ - { K400, KC_NO, K402, K403, K404, K405, KC_NO, K407, KC_NO, K409, K410, K411, K412, K413, K414, K415 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, XXX, k2C, k2D, k2E, k2F }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ + { k40, XXX, k42, k43, k44, k45, XXX, k47, XXX, k49, k4A, k4B, k4C, k4D, k4E, k4F } \ } - -#endif \ No newline at end of file diff --git a/keyboards/primekb/prime_r/rules.mk b/keyboards/primekb/prime_r/rules.mk index 8450077342b..af2fdc22c9d 100644 --- a/keyboards/primekb/prime_r/rules.mk +++ b/keyboards/primekb/prime_r/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/program_yoink/rules.mk b/keyboards/program_yoink/rules.mk index d068d66ca06..afb9e42e2d1 100644 --- a/keyboards/program_yoink/rules.mk +++ b/keyboards/program_yoink/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/projectcain/vault45/info.json b/keyboards/projectcain/vault45/info.json index de2f299b64d..6f272e3bbaa 100644 --- a/keyboards/projectcain/vault45/info.json +++ b/keyboards/projectcain/vault45/info.json @@ -1,7 +1,7 @@ { - "keyboard_name": "Vault 45", - "url": "", - "maintainer": "projectcain", + "keyboard_name": "Vault 45", + "url": "", + "maintainer": "projectcain", "layout_aliases": { "LAYOUT": "LAYOUT_all" }, diff --git a/keyboards/projectcain/vault45/rules.mk b/keyboards/projectcain/vault45/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/projectcain/vault45/rules.mk +++ b/keyboards/projectcain/vault45/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/projectkb/alice/rev1/rules.mk b/keyboards/projectkb/alice/rev1/rules.mk index 1a716b92356..64e923fc4f1 100644 --- a/keyboards/projectkb/alice/rev1/rules.mk +++ b/keyboards/projectkb/alice/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/projectkb/alice/rev2/rules.mk b/keyboards/projectkb/alice/rev2/rules.mk index 1a716b92356..64e923fc4f1 100644 --- a/keyboards/projectkb/alice/rev2/rules.mk +++ b/keyboards/projectkb/alice/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/prototypist/j01/rules.mk b/keyboards/prototypist/j01/rules.mk index 437af0317e7..f8d06dd9f79 100644 --- a/keyboards/prototypist/j01/rules.mk +++ b/keyboards/prototypist/j01/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/pteron36/keymaps/via/keymap.c b/keyboards/pteron36/keymaps/via/keymap.c index ce96ea6c598..47533efc933 100644 --- a/keyboards/pteron36/keymaps/via/keymap.c +++ b/keyboards/pteron36/keymaps/via/keymap.c @@ -1,19 +1,19 @@ /* Copyright HarshitGoel96 2020 * With permission from mattdibi, the original maintainer of the Redox hardware. - * - * 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 . - */ + * + * 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 . + */ #include QMK_KEYBOARD_H // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -#ifdef OLED_DRIVER_ENABLE +#ifdef OLED_ENABLE static void render_logo(void) { static const char PROGMEM qmk_logo[] = { @@ -131,12 +131,13 @@ static void render_status(void){ oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); // Renders a static logo oled_scroll_left(); // Turns on scrolling } + return false; } #endif diff --git a/keyboards/pteron36/pteron36.c b/keyboards/pteron36/pteron36.c index 3288626f00f..1281b5306e5 100644 --- a/keyboards/pteron36/pteron36.c +++ b/keyboards/pteron36/pteron36.c @@ -36,12 +36,15 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { return true; } //common oled support. -#ifdef OLED_DRIVER_ENABLE -__attribute__((weak)) void oled_task_user(void) { +#ifdef OLED_ENABLE +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { oled_write_P(PSTR("Layer: "), false); switch (get_highest_layer(layer_state)) { - case _QWERTY: + case 0: oled_write_ln_P(PSTR("Default"), false); break; default: @@ -62,5 +65,6 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(qmk_logo, false); oled_scroll_left(); // Turns on scrolling } + return false; } #endif diff --git a/keyboards/pteron36/rules.mk b/keyboards/pteron36/rules.mk index a12be263511..dc6d2485f64 100644 --- a/keyboards/pteron36/rules.mk +++ b/keyboards/pteron36/rules.mk @@ -19,7 +19,7 @@ NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output -OLED_DRIVER_ENABLE = yes # OLED display +OLED_ENABLE = yes # OLED display ENCODER_ENABLE = yes # Encoder support SPLIT_KEYBOARD = yes # Split enable diff --git a/keyboards/puck/puck.h b/keyboards/puck/puck.h index 0f2a284a67f..31fff795552 100644 --- a/keyboards/puck/puck.h +++ b/keyboards/puck/puck.h @@ -1,18 +1,15 @@ -#ifndef PUCK_H -#define PUCK_H +#pragma once #include "quantum.h" #define LAYOUT( \ - K00, K01, K02, \ - K03, K04, K05, \ - K06, K07, K08, \ - K09, K0A, K0B \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22, \ + k30, k31, k32 \ ) { \ - { K00, K01, K02 }, \ - { K03, K04, K05 }, \ - { K06, K07, K08 }, \ - { K09, K0A, K0B }, \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 }, \ + { k30, k31, k32 } \ } - -#endif diff --git a/keyboards/pursuit40/rules.mk b/keyboards/pursuit40/rules.mk index 706a8ae201e..cf5d2e685d9 100644 --- a/keyboards/pursuit40/rules.mk +++ b/keyboards/pursuit40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/q4z/rules.mk b/keyboards/q4z/rules.mk index 5377dfaaf7e..a01184d679f 100644 --- a/keyboards/q4z/rules.mk +++ b/keyboards/q4z/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/qaz/rules.mk b/keyboards/qaz/rules.mk index 90c3141cf29..7cd5f80392d 100644 --- a/keyboards/qaz/rules.mk +++ b/keyboards/qaz/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/quad_h/lb75/rules.mk b/keyboards/quad_h/lb75/rules.mk index ade3865832e..d6b0bdad95f 100644 --- a/keyboards/quad_h/lb75/rules.mk +++ b/keyboards/quad_h/lb75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/quantrik/kyuu/rules.mk b/keyboards/quantrik/kyuu/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/quantrik/kyuu/rules.mk +++ b/keyboards/quantrik/kyuu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/quark/rules.mk b/keyboards/quark/rules.mk index 0566e5e82b5..0cd8f878637 100644 --- a/keyboards/quark/rules.mk +++ b/keyboards/quark/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk index d1a33ed5d4a..6a1a8139732 100644 --- a/keyboards/qvex/lynepad/rules.mk +++ b/keyboards/qvex/lynepad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rabbit_capture_plan/rules.mk b/keyboards/rabbit_capture_plan/rules.mk index d2a391d869f..7fa142f6233 100644 --- a/keyboards/rabbit_capture_plan/rules.mk +++ b/keyboards/rabbit_capture_plan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rainkeeb/keymaps/default/keymap.c b/keyboards/rainkeeb/keymaps/default/keymap.c index 3d82661f8c8..08cf7462c31 100644 --- a/keyboards/rainkeeb/keymaps/default/keymap.c +++ b/keyboards/rainkeeb/keymaps/default/keymap.c @@ -87,7 +87,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { char wpm[10]; -void oled_task_user(void) { +bool oled_task_user(void) { sprintf(wpm, "WPM: %03d", get_current_wpm()); // Host Keyboard Layer Status @@ -113,4 +113,5 @@ void oled_task_user(void) { } oled_write_P(PSTR(" "), false); oled_write(wpm, false); + return false; } diff --git a/keyboards/rainkeeb/keymaps/via/keymap.c b/keyboards/rainkeeb/keymaps/via/keymap.c index 3d82661f8c8..08cf7462c31 100644 --- a/keyboards/rainkeeb/keymaps/via/keymap.c +++ b/keyboards/rainkeeb/keymaps/via/keymap.c @@ -87,7 +87,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { char wpm[10]; -void oled_task_user(void) { +bool oled_task_user(void) { sprintf(wpm, "WPM: %03d", get_current_wpm()); // Host Keyboard Layer Status @@ -113,4 +113,5 @@ void oled_task_user(void) { } oled_write_P(PSTR(" "), false); oled_write(wpm, false); + return false; } diff --git a/keyboards/rainkeeb/rules.mk b/keyboards/rainkeeb/rules.mk index 64a8cc3a1e0..058ed8e5776 100644 --- a/keyboards/rainkeeb/rules.mk +++ b/keyboards/rainkeeb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/aelith/rules.mk b/keyboards/ramonimbao/aelith/rules.mk index e7a71be04aa..de578c57a5f 100644 --- a/keyboards/ramonimbao/aelith/rules.mk +++ b/keyboards/ramonimbao/aelith/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/chevron/rules.mk b/keyboards/ramonimbao/chevron/rules.mk index 49a89f4a63d..533e0f2cc8f 100644 --- a/keyboards/ramonimbao/chevron/rules.mk +++ b/keyboards/ramonimbao/chevron/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c index ac3c11e6995..a04192a3e49 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/default/keymap.c @@ -80,7 +80,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -94,5 +94,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c index 3409fbc16ea..6d280905dcc 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/iso/keymap.c @@ -80,7 +80,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -94,5 +94,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c index 5c97a3fb839..fceca1a8bd3 100644 --- a/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/herringbone/pro/keymaps/via/keymap.c @@ -132,7 +132,7 @@ static void render_pattern(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { // Render Herringbone pattern render_pattern(); oled_render(); @@ -146,5 +146,6 @@ void oled_task_user(void) { oled_set_cursor(0, 2); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); oled_render(); + return false; } #endif diff --git a/keyboards/ramonimbao/herringbone/pro/rules.mk b/keyboards/ramonimbao/herringbone/pro/rules.mk index ec75f3e1220..aa551caae0c 100644 --- a/keyboards/ramonimbao/herringbone/pro/rules.mk +++ b/keyboards/ramonimbao/herringbone/pro/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/herringbone/v1/rules.mk b/keyboards/ramonimbao/herringbone/v1/rules.mk index 49a15005c4a..c1b6074978e 100644 --- a/keyboards/ramonimbao/herringbone/v1/rules.mk +++ b/keyboards/ramonimbao/herringbone/v1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/mona/v1/rules.mk b/keyboards/ramonimbao/mona/v1/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/ramonimbao/mona/v1/rules.mk +++ b/keyboards/ramonimbao/mona/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/mona/v1_1/rules.mk b/keyboards/ramonimbao/mona/v1_1/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/ramonimbao/mona/v1_1/rules.mk +++ b/keyboards/ramonimbao/mona/v1_1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c index 1d8b938fd9d..e44b56e55f6 100644 --- a/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c +++ b/keyboards/ramonimbao/tkl_ff/keymaps/default/keymap.c @@ -25,3 +25,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c index 2729e390dae..17997828df5 100644 --- a/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c +++ b/keyboards/ramonimbao/tkl_ff/keymaps/iso/keymap.c @@ -25,3 +25,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT ) }; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c b/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c index d46f3aade64..298b7a1fa28 100644 --- a/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c +++ b/keyboards/ramonimbao/tkl_ff/keymaps/via/keymap.c @@ -49,3 +49,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/ramonimbao/tkl_ff/readme.md b/keyboards/ramonimbao/tkl_ff/readme.md index 06a64210ba4..ffc11f585e2 100644 --- a/keyboards/ramonimbao/tkl_ff/readme.md +++ b/keyboards/ramonimbao/tkl_ff/readme.md @@ -2,7 +2,7 @@ ![TKL-FF](https://i.imgur.com/GJCo3F5l.png) -A TKL PCB made for the Geonworks Frog keyboard that supports both F12 and F13. +A TKL PCB made for the Geonworks Frog keyboard that supports both F12 and F13. V2 simply adds RGB indicator LEDs. * Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) * Hardware Supported: ATmega32u4 diff --git a/keyboards/ramonimbao/tkl_ff/rules.mk b/keyboards/ramonimbao/tkl_ff/rules.mk index 5f64bd414b2..9906266f482 100644 --- a/keyboards/ramonimbao/tkl_ff/rules.mk +++ b/keyboards/ramonimbao/tkl_ff/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ramonimbao/tkl_ff/v2/config.h b/keyboards/ramonimbao/tkl_ff/v2/config.h new file mode 100644 index 00000000000..a35d1bc5997 --- /dev/null +++ b/keyboards/ramonimbao/tkl_ff/v2/config.h @@ -0,0 +1,52 @@ +/* Copyright 2021 Ramon Imbao + * + * 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 . + */ +#pragma once + +#include "config_common.h" + +#undef PRODUCT_ID +#define PRODUCT_ID 0x10FF + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +# define RGBLED_NUM 26 +# define RGBLIGHT_HUE_STEP 32 +# define RGBLIGHT_SAT_STEP 32 +# define RGBLIGHT_VAL_STEP 32 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// # define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif diff --git a/keyboards/ramonimbao/tkl_ff/v2/rules.mk b/keyboards/ramonimbao/tkl_ff/v2/rules.mk new file mode 100644 index 00000000000..84ef473c02e --- /dev/null +++ b/keyboards/ramonimbao/tkl_ff/v2/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow diff --git a/keyboards/ramonimbao/tkl_ff/v2/v2.c b/keyboards/ramonimbao/tkl_ff/v2/v2.c new file mode 100644 index 00000000000..de5f32e3ca6 --- /dev/null +++ b/keyboards/ramonimbao/tkl_ff/v2/v2.c @@ -0,0 +1,17 @@ +/* Copyright 2021 Ramon Imbao + * + * 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 . + */ + +#include "v2.h" diff --git a/keyboards/ramonimbao/tkl_ff/v2/v2.h b/keyboards/ramonimbao/tkl_ff/v2/v2.h new file mode 100644 index 00000000000..7c4566defb3 --- /dev/null +++ b/keyboards/ramonimbao/tkl_ff/v2/v2.h @@ -0,0 +1,18 @@ +/* Copyright 2021 Ramon Imbao + * + * 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 . + */ +#pragma once + +#include "quantum.h" diff --git a/keyboards/ramonimbao/wete/keymaps/via/rules.mk b/keyboards/ramonimbao/wete/keymaps/via/rules.mk index 5abd4f5bdf9..666e72557b0 100644 --- a/keyboards/ramonimbao/wete/keymaps/via/rules.mk +++ b/keyboards/ramonimbao/wete/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/keyboards/rart/rart45/rules.mk b/keyboards/rart/rart45/rules.mk index 7a50fbb7785..2057d9c9399 100644 --- a/keyboards/rart/rart45/rules.mk +++ b/keyboards/rart/rart45/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rart4x4/rules.mk b/keyboards/rart/rart4x4/rules.mk index faf08d6efb9..044487bcfef 100644 --- a/keyboards/rart/rart4x4/rules.mk +++ b/keyboards/rart/rart4x4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rart67/rules.mk b/keyboards/rart/rart67/rules.mk index 38eabd36706..dd2a91bc835 100644 --- a/keyboards/rart/rart67/rules.mk +++ b/keyboards/rart/rart67/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rart/rart67m/rart67m.c b/keyboards/rart/rart67m/rart67m.c index 6b2c6dffbbb..e696a5cf3e4 100644 --- a/keyboards/rart/rart67m/rart67m.c +++ b/keyboards/rart/rart67m/rart67m.c @@ -21,11 +21,14 @@ #define ANIM_FRAME_DURATION 200 #define ANIM_SIZE 512 #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static uint32_t anim_timer = 0; static uint32_t anim_sleep = 0; static uint8_t current_idle_frame = 0; @@ -128,7 +131,7 @@ static uint8_t current_tap_frame = 0; } } } - + return false; } -#endif \ No newline at end of file +#endif diff --git a/keyboards/rart/rart75/rules.mk b/keyboards/rart/rart75/rules.mk index 528d54d5de5..a256d126cf1 100644 --- a/keyboards/rart/rart75/rules.mk +++ b/keyboards/rart/rart75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rart/rart75m/rart75m.c b/keyboards/rart/rart75m/rart75m.c index 73e37d2d1a3..87a12a9a1f7 100644 --- a/keyboards/rart/rart75m/rart75m.c +++ b/keyboards/rart/rart75m/rart75m.c @@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("R A R T 7 5 M\nLayer: "), false); @@ -52,6 +55,8 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/rart/rart75m/rules.mk b/keyboards/rart/rart75m/rules.mk index e084a746f6e..0b2ca0a4c1c 100644 --- a/keyboards/rart/rart75m/rules.mk +++ b/keyboards/rart/rart75m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rartand/keymaps/default/keymap.c b/keyboards/rart/rartand/keymaps/default/keymap.c index 2dd9378b0dc..3d04ffc6f3b 100644 --- a/keyboards/rart/rartand/keymaps/default/keymap.c +++ b/keyboards/rart/rartand/keymaps/default/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); @@ -74,5 +74,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartand/keymaps/via/keymap.c b/keyboards/rart/rartand/keymaps/via/keymap.c index 2dd9378b0dc..3d04ffc6f3b 100644 --- a/keyboards/rart/rartand/keymaps/via/keymap.c +++ b/keyboards/rart/rartand/keymaps/via/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T A N D *\n Powered by QMK\nLayer: "), false); @@ -74,5 +74,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartand/rules.mk b/keyboards/rart/rartand/rules.mk index 643b6604bb9..4eec21d3ad5 100644 --- a/keyboards/rart/rartand/rules.mk +++ b/keyboards/rart/rartand/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rartland/rartland.c b/keyboards/rart/rartland/rartland.c index 089ba9295cd..e4a555d1282 100644 --- a/keyboards/rart/rartland/rartland.c +++ b/keyboards/rart/rartland/rartland.c @@ -31,7 +31,10 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L A N D\nLayer: "), false); @@ -52,5 +55,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/rart/rartland/rules.mk b/keyboards/rart/rartland/rules.mk index b5b4a0c2a00..b490b53538b 100644 --- a/keyboards/rart/rartland/rules.mk +++ b/keyboards/rart/rartland/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rartlice/keymaps/default/keymap.c b/keyboards/rart/rartlice/keymaps/default/keymap.c index 2ba4abff31b..372a856bc2a 100644 --- a/keyboards/rart/rartlice/keymaps/default/keymap.c +++ b/keyboards/rart/rartlice/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("R A R T L I C E\nLayer: "), false); @@ -56,5 +56,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartlice/keymaps/via/keymap.c b/keyboards/rart/rartlice/keymaps/via/keymap.c index 22e52c403d5..700bb7f414e 100644 --- a/keyboards/rart/rartlice/keymaps/via/keymap.c +++ b/keyboards/rart/rartlice/keymaps/via/keymap.c @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("* R A R T L I C E *\n Powered by QMK\nLayer: "), false); @@ -76,5 +76,6 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/rart/rartlite/rules.mk b/keyboards/rart/rartlite/rules.mk index 81fbef3163e..e0923782c93 100644 --- a/keyboards/rart/rartlite/rules.mk +++ b/keyboards/rart/rartlite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rart/rartpad/rules.mk b/keyboards/rart/rartpad/rules.mk index 683a8fd3484..128194a0311 100644 --- a/keyboards/rart/rartpad/rules.mk +++ b/keyboards/rart/rartpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/retro_75/rules.mk b/keyboards/retro_75/rules.mk index 9c4bfcdea6b..7cceca328db 100644 --- a/keyboards/retro_75/rules.mk +++ b/keyboards/retro_75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/reversestudio/decadepad/rules.mk b/keyboards/reversestudio/decadepad/rules.mk index 2c272ca2fa0..b752edc4674 100644 --- a/keyboards/reversestudio/decadepad/rules.mk +++ b/keyboards/reversestudio/decadepad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rgbkb/mun/config.h b/keyboards/rgbkb/mun/config.h index 5d1a2ce2024..af0876861e0 100644 --- a/keyboards/rgbkb/mun/config.h +++ b/keyboards/rgbkb/mun/config.h @@ -87,6 +87,54 @@ #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #if RGB_UNLIMITED_POWER #define RGBLIGHT_LIMIT_VAL 255 diff --git a/keyboards/rgbkb/mun/keymaps/default/config.h b/keyboards/rgbkb/mun/keymaps/default/config.h index 9719d17437a..debd16163b6 100644 --- a/keyboards/rgbkb/mun/keymaps/default/config.h +++ b/keyboards/rgbkb/mun/keymaps/default/config.h @@ -10,11 +10,11 @@ #pragma once // No need for the single versions when multi performance isn't a problem =D -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) // #define RGB_DISABLE_TIMEOUT 1200000 diff --git a/keyboards/rgbkb/mun/keymaps/default/keymap.c b/keyboards/rgbkb/mun/keymaps/default/keymap.c index b120c3a37af..866b8a0d15a 100644 --- a/keyboards/rgbkb/mun/keymaps/default/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/default/keymap.c @@ -230,7 +230,7 @@ static void render_touch(void) oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_icon(); oled_write_P(PSTR(" "), false); @@ -245,6 +245,7 @@ void oled_task_user(void) { oled_write_P(PSTR(" "), false); render_rgb_menu(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/rgbkb/mun/keymaps/via/config.h b/keyboards/rgbkb/mun/keymaps/via/config.h index 967b309f63d..cfcaa9a1ed6 100644 --- a/keyboards/rgbkb/mun/keymaps/via/config.h +++ b/keyboards/rgbkb/mun/keymaps/via/config.h @@ -10,11 +10,11 @@ #pragma once // No need for the single versions when multi performance isn't a problem =D -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) // #define RGB_DISABLE_TIMEOUT 1200000 diff --git a/keyboards/rgbkb/mun/keymaps/via/keymap.c b/keyboards/rgbkb/mun/keymaps/via/keymap.c index b120c3a37af..866b8a0d15a 100644 --- a/keyboards/rgbkb/mun/keymaps/via/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/via/keymap.c @@ -230,7 +230,7 @@ static void render_touch(void) oled_write_P(touch_encoder_calibrating() ? PSTR("CLBRT") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_left()) { render_icon(); oled_write_P(PSTR(" "), false); @@ -245,6 +245,7 @@ void oled_task_user(void) { oled_write_P(PSTR(" "), false); render_rgb_menu(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h index f36e5760fc9..42e60191fcc 100644 --- a/keyboards/rgbkb/mun/keymaps/xulkal2/config.h +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/config.h @@ -22,11 +22,11 @@ #define RCPC_KEYS KC_RCTL, KC_TRNS, KC_EQL // No need for the single versions when multi performance isn't a problem =D -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) // #define RGB_DISABLE_TIMEOUT 1200000 diff --git a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c index cd1eec75158..ae5c0c9b19b 100644 --- a/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c +++ b/keyboards/rgbkb/mun/keymaps/xulkal2/keymap.c @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, EEP_RST, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_PDOT, KC_PENT, _______, - + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) @@ -223,7 +223,7 @@ void render_debug_scan(void) { } #endif -void oled_task_user(void) { +bool oled_task_user(void) { #if !defined(MATRIX_SCAN_DEBUG) if (is_keyboard_left()) { render_layer(); @@ -241,8 +241,9 @@ void oled_task_user(void) { #endif oled_set_cursor(0, 12); render_icon(); + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; -} \ No newline at end of file +} diff --git a/keyboards/rgbkb/pan/config.h b/keyboards/rgbkb/pan/config.h index a1a2aae9fc8..43c534ca929 100644 --- a/keyboards/rgbkb/pan/config.h +++ b/keyboards/rgbkb/pan/config.h @@ -39,5 +39,54 @@ along with this program. If not, see . #define RGBLIGHT_LIMIT_VAL 120 #define USB_MAX_POWER_CONSUMPTION 500 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/rgbkb/pan/keymaps/default/keymap.c b/keyboards/rgbkb/pan/keymaps/default/keymap.c index dac385aa4c1..1188db837ca 100644 --- a/keyboards/rgbkb/pan/keymaps/default/keymap.c +++ b/keyboards/rgbkb/pan/keymaps/default/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("RGBKB Pan\n"), false); oled_write_P(PSTR("Layer: "), false); @@ -97,6 +97,8 @@ void oled_task_user(void) { led_t led_state = host_keyboard_led_state(); oled_write_P(led_state.num_lock ? PSTR("Numlock On\n") : PSTR(" \n"), false); oled_write_P(led_state.caps_lock ? PSTR("Capslock On \n") : PSTR(" \n"), false); + + return false; } #endif diff --git a/keyboards/rgbkb/pan/rules.mk b/keyboards/rgbkb/pan/rules.mk index 106120cb8d7..0767977a797 100644 --- a/keyboards/rgbkb/pan/rules.mk +++ b/keyboards/rgbkb/pan/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rgbkb/sol/config.h b/keyboards/rgbkb/sol/config.h index f42783f719d..e8138945492 100644 --- a/keyboards/rgbkb/sol/config.h +++ b/keyboards/rgbkb/sol/config.h @@ -48,6 +48,54 @@ along with this program. If not, see . #define RGBLIGHT_LIMIT_VAL 120 #endif #define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #define LED_HITS_TO_REMEMBER 5 diff --git a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c index aa465a6962a..d6867ffa9ba 100644 --- a/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/brianweyer/keymap.c @@ -260,11 +260,13 @@ static void render_status(void) { oled_write_P(led_usb_state & (1< ANIM_FRAME_DURATION) && (splash_dur_counter < SPLASH_DUR)) @@ -348,6 +348,7 @@ void oled_task_user(void) } + return false; } // Process the extra/extended keycode functionality diff --git a/keyboards/rocketboard_16/keymaps/via/keymap.c b/keyboards/rocketboard_16/keymaps/via/keymap.c index 761816cae55..6d75d40fbdb 100644 --- a/keyboards/rocketboard_16/keymaps/via/keymap.c +++ b/keyboards/rocketboard_16/keymaps/via/keymap.c @@ -209,7 +209,7 @@ static void render_logo(uint8_t startX, uint8_t startY) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) +bool oled_task_user(void) { // Playing the animation if((timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) && (splash_dur_counter < SPLASH_DUR)) @@ -348,6 +348,7 @@ void oled_task_user(void) } + return false; } // Process the extra/extended keycode functionality diff --git a/keyboards/rocketboard_16/rules.mk b/keyboards/rocketboard_16/rules.mk index f51d481382d..dd7f88d6164 100644 --- a/keyboards/rocketboard_16/rules.mk +++ b/keyboards/rocketboard_16/rules.mk @@ -18,7 +18,7 @@ SRC += keycode_lookup.c # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rominronin/katana60/rev1/rules.mk b/keyboards/rominronin/katana60/rev1/rules.mk index 077733ea876..bcf7f652ec3 100644 --- a/keyboards/rominronin/katana60/rev1/rules.mk +++ b/keyboards/rominronin/katana60/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/roseslite/rules.mk b/keyboards/roseslite/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/roseslite/rules.mk +++ b/keyboards/roseslite/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rotr/rules.mk b/keyboards/rotr/rules.mk index 1d5a162194c..6d85d5f50e4 100644 --- a/keyboards/rotr/rules.mk +++ b/keyboards/rotr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/rpiguy9907/southpaw66/rules.mk b/keyboards/rpiguy9907/southpaw66/rules.mk index 9854bd78f99..f42a5203ef8 100644 --- a/keyboards/rpiguy9907/southpaw66/rules.mk +++ b/keyboards/rpiguy9907/southpaw66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/rubi/lib/oled.c b/keyboards/rubi/lib/oled.c index d48d27323c6..9534cdd9b79 100644 --- a/keyboards/rubi/lib/oled.c +++ b/keyboards/rubi/lib/oled.c @@ -239,7 +239,8 @@ void render_frame(void) { } } -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } if (timer_elapsed(oled_frame_timer) > OLED_FRAME_TIMEOUT) { oled_clear(); oled_frame_timer = timer_read(); @@ -259,9 +260,10 @@ __attribute__((weak)) void oled_task_user(void) { } else { oled_mode = OLED_MODE_DEFAULT; } + return false; } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { oled_logo_timer = timer_read(); oled_frame_timer = timer_read(); return rotation; diff --git a/keyboards/runes/vaengr/rules.mk b/keyboards/runes/vaengr/rules.mk index 9ca749f6d9d..2429ba6d969 100644 --- a/keyboards/runes/vaengr/rules.mk +++ b/keyboards/runes/vaengr/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ryanbaekr/rb86/rules.mk b/keyboards/ryanbaekr/rb86/rules.mk index 20b467521e6..74a7851e6c7 100644 --- a/keyboards/ryanbaekr/rb86/rules.mk +++ b/keyboards/ryanbaekr/rb86/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/ryloo_studio/m0110/rules.mk b/keyboards/ryloo_studio/m0110/rules.mk index 1905dbc5b24..f494298fd67 100755 --- a/keyboards/ryloo_studio/m0110/rules.mk +++ b/keyboards/ryloo_studio/m0110/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sam/s80/rules.mk b/keyboards/sam/s80/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/sam/s80/rules.mk +++ b/keyboards/sam/s80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sam/sg81m/rules.mk b/keyboards/sam/sg81m/rules.mk index 6bbd42be615..80af78e3cf9 100644 --- a/keyboards/sam/sg81m/rules.mk +++ b/keyboards/sam/sg81m/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sanctified/dystopia/rules.mk b/keyboards/sanctified/dystopia/rules.mk index 643e7a05d83..ff14db03f19 100644 --- a/keyboards/sanctified/dystopia/rules.mk +++ b/keyboards/sanctified/dystopia/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/satt/vision/rules.mk b/keyboards/satt/vision/rules.mk index 65058d09c2e..5a5651dfb58 100644 --- a/keyboards/satt/vision/rules.mk +++ b/keyboards/satt/vision/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sawnsprojects/satxri6key/config.h b/keyboards/sawnsprojects/satxri6key/config.h index 129f2536b9d..bb334c7221e 100644 --- a/keyboards/sawnsprojects/satxri6key/config.h +++ b/keyboards/sawnsprojects/satxri6key/config.h @@ -75,3 +75,48 @@ #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Sets the default mode, if none has been set + +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c index e09ef997fe0..0a2bdb39dc0 100644 --- a/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c +++ b/keyboards/sawnsprojects/satxri6key/keymaps/via/keymap.c @@ -145,7 +145,7 @@ static void render_anim(void) { } // Used to draw on to the oled screen -void oled_task_user(void) { +bool oled_task_user(void) { render_anim(); // renders pixelart oled_set_cursor(0, 0); // sets cursor to (row, column) using charactar spacing (5 rows on 128x32 screen, anything more will overflow back to the top) @@ -160,5 +160,6 @@ void oled_task_user(void) { led_t led_state = host_keyboard_led_state(); // caps lock stuff, prints CAPS on new line if caps led is on oled_set_cursor(0, 1); oled_write_P(led_state.caps_lock ? PSTR("CAPS") : PSTR(" "), false); + return false; } #endif diff --git a/keyboards/sawnsprojects/satxri6key/rules.mk b/keyboards/sawnsprojects/satxri6key/rules.mk index b1039452ec5..bff898cce58 100644 --- a/keyboards/sawnsprojects/satxri6key/rules.mk +++ b/keyboards/sawnsprojects/satxri6key/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk index 5f084a84ab9..f8c675daaa8 100644 --- a/keyboards/scarletbandana/rules.mk +++ b/keyboards/scarletbandana/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/scatter42/rules.mk b/keyboards/scatter42/rules.mk index c0d6e2c1b11..04adaadcc90 100644 --- a/keyboards/scatter42/rules.mk +++ b/keyboards/scatter42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sck/gtm/rules.mk b/keyboards/sck/gtm/rules.mk index a0f503ea6f7..3585bec2e37 100644 --- a/keyboards/sck/gtm/rules.mk +++ b/keyboards/sck/gtm/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sck/m0116b/rules.mk b/keyboards/sck/m0116b/rules.mk index 576d4ef5f27..10e9616d6fd 100644 --- a/keyboards/sck/m0116b/rules.mk +++ b/keyboards/sck/m0116b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sck/neiso/rules.mk b/keyboards/sck/neiso/rules.mk index bc83db6a6c2..43530f6244f 100644 --- a/keyboards/sck/neiso/rules.mk +++ b/keyboards/sck/neiso/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sck/osa/rules.mk b/keyboards/sck/osa/rules.mk index 3698c0ba0ea..9841c0ca884 100644 --- a/keyboards/sck/osa/rules.mk +++ b/keyboards/sck/osa/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/scythe/rules.mk b/keyboards/scythe/rules.mk index 5d08e37774f..017023d00e5 100644 --- a/keyboards/scythe/rules.mk +++ b/keyboards/scythe/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/seigaiha/rules.mk b/keyboards/seigaiha/rules.mk index 7bf6ba38009..a56deff61e4 100644 --- a/keyboards/seigaiha/rules.mk +++ b/keyboards/seigaiha/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sekigon/grs_70ec/rules.mk b/keyboards/sekigon/grs_70ec/rules.mk index 4288498b777..aeb1f81ced6 100644 --- a/keyboards/sekigon/grs_70ec/rules.mk +++ b/keyboards/sekigon/grs_70ec/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sendyyeah/pix/keymaps/default/keymap.c b/keyboards/sendyyeah/pix/keymaps/default/keymap.c index ee98aedd8a8..bcaf52d53be 100644 --- a/keyboards/sendyyeah/pix/keymaps/default/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/default/keymap.c @@ -174,7 +174,7 @@ void draw_brightness_icon(int key_position, int row) { oled_write_P(ICON_BRIGHTNESS_1, false); } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; @@ -229,6 +229,7 @@ void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/sendyyeah/pix/keymaps/via/keymap.c b/keyboards/sendyyeah/pix/keymaps/via/keymap.c index ee98aedd8a8..bcaf52d53be 100644 --- a/keyboards/sendyyeah/pix/keymaps/via/keymap.c +++ b/keyboards/sendyyeah/pix/keymaps/via/keymap.c @@ -174,7 +174,7 @@ void draw_brightness_icon(int key_position, int row) { oled_write_P(ICON_BRIGHTNESS_1, false); } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status static const char PROGMEM ICON_LAYER[] = {0x80, 0x81, 0x82, 0x83, 0}; static const char PROGMEM ICON_ENCODER[] = {0x84, 0x85, 0x86, 0x87, 0}; @@ -229,6 +229,7 @@ void oled_task_user(void) { break; } + return false; } #endif diff --git a/keyboards/senselessclay/had60/rules.mk b/keyboards/senselessclay/had60/rules.mk index defd222ae83..8075959d81f 100644 --- a/keyboards/senselessclay/had60/rules.mk +++ b/keyboards/senselessclay/had60/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sentraq/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index 328768f9e72..5da97f696d5 100644 --- a/keyboards/sentraq/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk index 0954c54c980..0c19dc9db3d 100644 --- a/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) diff --git a/keyboards/sentraq/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index dd294d1be39..9fd43fea37f 100644 --- a/keyboards/sentraq/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/sentraq/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index 4d4819efced..2f02e8e162d 100644 --- a/keyboards/sentraq/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/sentraq/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index 2289322fa7d..22d25d56c62 100644 --- a/keyboards/sentraq/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/sentraq/s65_x/config.h b/keyboards/sentraq/s65_x/config.h index d3c9adbf3c1..b8886bf67fa 100644 --- a/keyboards/sentraq/s65_x/config.h +++ b/keyboards/sentraq/s65_x/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,5 +43,3 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -#endif diff --git a/keyboards/sentraq/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index 7212ce40d30..212786d8e6a 100644 --- a/keyboards/sentraq/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/sets3n/kk980/rules.mk b/keyboards/sets3n/kk980/rules.mk index 1047658606e..eb485c4349b 100644 --- a/keyboards/sets3n/kk980/rules.mk +++ b/keyboards/sets3n/kk980/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/setta21/keymaps/salicylic/keymap.c b/keyboards/setta21/keymaps/salicylic/keymap.c index 568afd1339b..06fa89c9c73 100644 --- a/keyboards/setta21/keymaps/salicylic/keymap.c +++ b/keyboards/setta21/keymaps/salicylic/keymap.c @@ -190,8 +190,9 @@ void render_status(void) { render_layer_state(); } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) + return false; } #endif diff --git a/keyboards/shambles/rules.mk b/keyboards/shambles/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/shambles/rules.mk +++ b/keyboards/shambles/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/shk9/rules.mk b/keyboards/shk9/rules.mk index dbdb94b18fe..739557beb61 100644 --- a/keyboards/shk9/rules.mk +++ b/keyboards/shk9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sidderskb/majbritt/rev2/info.json b/keyboards/sidderskb/majbritt/rev2/info.json index 788657f3bcc..3e2aa450ad0 100644 --- a/keyboards/sidderskb/majbritt/rev2/info.json +++ b/keyboards/sidderskb/majbritt/rev2/info.json @@ -1,10 +1,81 @@ { "keyboard_name": "Majbritt Rev2", - "url": "https://sidderskb.co.uk/", "maintainer": "Sleepdealr", + "url": "https://sidderskb.co.uk/", "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0.75, "y":0}, {"label":"!", "x":1.75, "y":0}, {"label":"\"", "x":2.75, "y":0}, {"label":"\u00a3", "x":3.75, "y":0}, {"label":"$", "x":4.75, "y":0}, {"label":"%", "x":5.75, "y":0}, {"label":"^", "x":6.75, "y":0}, {"label":"&", "x":8.5, "y":0}, {"label":"*", "x":9.5, "y":0}, {"label":"(", "x":10.5, "y":0}, {"label":")", "x":11.5, "y":0}, {"label":"_", "x":12.5, "y":0}, {"label":"+", "x":13.5, "y":0}, {"label":"|", "x":14.5, "y":0}, {"label":"~", "x":15.5, "y":0}, {"label":"Del", "x":16.5, "y":0}, {"label":"Tab", "x":0.5, "y":1, "w":1.5}, {"label":"Q", "x":2, "y":1}, {"label":"W", "x":3, "y":1}, {"label":"E", "x":4, "y":1}, {"label":"R", "x":5, "y":1}, {"label":"T", "x":6, "y":1}, {"label":"Y", "x":8, "y":1}, {"label":"U", "x":9, "y":1}, {"label":"I", "x":10, "y":1}, {"label":"O", "x":11, "y":1}, {"label":"P", "x":12, "y":1}, {"label":"{", "x":13, "y":1}, {"label":"}", "x":14, "y":1}, {"label":"Enter", "x":15.25, "y":1, "w":1.25, "h":2}, {"label":"Pgup", "x":16.5, "y":1}, {"label":"Caps Lock", "x":0.25, "y":2, "w":1.75}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":8.25, "y":2}, {"label":"J", "x":9.25, "y":2}, {"label":"K", "x":10.25, "y":2}, {"label":"L", "x":11.25, "y":2}, {"label":":", "x":12.25, "y":2}, {"label":"@", "x":13.25, "y":2}, {"label":"~", "x":14.25, "y":2}, {"label":"Pgdn", "x":16.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":8.75, "y":3}, {"label":"M", "x":9.75, "y":3}, {"label":"<", "x":10.75, "y":3}, {"label":">", "x":11.75, "y":3}, {"label":"?", "x":12.75, "y":3}, {"label":"Shift", "x":13.75, "y":3, "w":1.75}, {"label":"Up", "x":15.5, "y":3}, {"label":"Fn", "x":16.5, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":3, "y":4, "w":1.5}, {"label":"LSpace", "x":4.5, "y":4, "w":2.25}, {"label":"Fn", "x":6.75, "y":4}, {"label":"RSpace", "x":8.25, "y":4, "w":2.75}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Left", "x":14.5, "y":4}, {"label":"Down", "x":15.5, "y":4}, {"label":"Right", "x":16.5, "y":4}] + "layout": [ + { "label": "Esc", "x": 0.75, "y": 0 }, + { "label": "!", "x": 1.75, "y": 0 }, + { "label": "\"", "x": 2.75, "y": 0 }, + { "label": "\u00a3", "x": 3.75, "y": 0 }, + { "label": "$", "x": 4.75, "y": 0 }, + { "label": "%", "x": 5.75, "y": 0 }, + { "label": "^", "x": 6.75, "y": 0 }, + { "label": "&", "x": 8.5, "y": 0 }, + { "label": "*", "x": 9.5, "y": 0 }, + { "label": "(", "x": 10.5, "y": 0 }, + { "label": ")", "x": 11.5, "y": 0 }, + { "label": "_", "x": 12.5, "y": 0 }, + { "label": "+", "x": 13.5, "y": 0 }, + { "label": "|", "x": 14.5, "y": 0 }, + { "label": "~", "x": 15.5, "y": 0 }, + { "label": "Del", "x": 16.5, "y": 0 }, + { "label": "Tab", "w": 1.5, "x": 0.5, "y": 1 }, + { "label": "Q", "x": 2, "y": 1 }, + { "label": "W", "x": 3, "y": 1 }, + { "label": "E", "x": 4, "y": 1 }, + { "label": "R", "x": 5, "y": 1 }, + { "label": "T", "x": 6, "y": 1 }, + { "label": "Y", "x": 8, "y": 1 }, + { "label": "U", "x": 9, "y": 1 }, + { "label": "I", "x": 10, "y": 1 }, + { "label": "O", "x": 11, "y": 1 }, + { "label": "P", "x": 12, "y": 1 }, + { "label": "{", "x": 13, "y": 1 }, + { "label": "}", "x": 14, "y": 1 }, + { "label": "Enter", "w": 1.5, "x": 15, "y": 1 }, + { "label": "Pgup", "x": 16.5, "y": 1 }, + { "label": "Caps Lock", "w": 1.75, "x": 0.25, "y": 2 }, + { "label": "A", "x": 2, "y": 2 }, + { "label": "S", "x": 3, "y": 2 }, + { "label": "D", "x": 4, "y": 2 }, + { "label": "F", "x": 5, "y": 2 }, + { "label": "G", "x": 6, "y": 2 }, + { "label": "H", "x": 8.25, "y": 2 }, + { "label": "J", "x": 9.25, "y": 2 }, + { "label": "K", "x": 10.25, "y": 2 }, + { "label": "L", "x": 11.25, "y": 2 }, + { "label": ":", "x": 12.25, "y": 2 }, + { "label": "@", "x": 13.25, "y": 2 }, + { "label": "~", "x": 14.25, "y": 2 }, + { "label": "Enter", "w": 1.25, "x": 15.25, "y": 2 }, + { "label": "Pgdn", "x": 16.5, "y": 2 }, + { "label": "Shift", "w": 1.25, "x": 0, "y": 3 }, + { "label": "|", "x": 1.25, "y": 3 }, + { "label": "Z", "x": 2.25, "y": 3 }, + { "label": "X", "x": 3.25, "y": 3 }, + { "label": "C", "x": 4.25, "y": 3 }, + { "label": "V", "x": 5.25, "y": 3 }, + { "label": "B", "x": 6.25, "y": 3 }, + { "label": "N", "x": 8.75, "y": 3 }, + { "label": "M", "x": 9.75, "y": 3 }, + { "label": "<", "x": 10.75, "y": 3 }, + { "label": ">", "x": 11.75, "y": 3 }, + { "label": "?", "x": 12.75, "y": 3 }, + { "label": "Shift", "w": 1.75, "x": 13.75, "y": 3 }, + { "label": "Up", "x": 15.5, "y": 3 }, + { "label": "Fn", "x": 16.5, "y": 3 }, + { "label": "Ctrl", "w": 1.5, "x": 0, "y": 4 }, + { "label": "Alt", "w": 1.5, "x": 3, "y": 4 }, + { "label": "LSpace", "w": 2.25, "x": 4.5, "y": 4 }, + { "label": "Fn", "x": 6.75, "y": 4 }, + { "label": "RSpace", "w": 2.75, "x": 8.25, "y": 4 }, + { "label": "AltGr", "w": 1.5, "x": 11, "y": 4 }, + { "label": "Left", "x": 14.5, "y": 4 }, + { "label": "Down", "x": 15.5, "y": 4 }, + { "label": "Right", "x": 16.5, "y": 4 } + ] } } } diff --git a/keyboards/sidderskb/majbritt/rev2/rules.mk b/keyboards/sidderskb/majbritt/rev2/rules.mk index 6d215c545e2..5d39fd5c33c 100644 --- a/keyboards/sidderskb/majbritt/rev2/rules.mk +++ b/keyboards/sidderskb/majbritt/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/silverbullet44/rules.mk b/keyboards/silverbullet44/rules.mk index 14f8ec679f1..832dcdae3ef 100644 --- a/keyboards/silverbullet44/rules.mk +++ b/keyboards/silverbullet44/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/singa/keymaps/test/config.h b/keyboards/singa/keymaps/test/config.h deleted file mode 100644 index e176ed34798..00000000000 --- a/keyboards/singa/keymaps/test/config.h +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright 2018 amnesia0287 - * - * 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 . - */ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" - -// place overrides here - -#endif diff --git a/keyboards/sirius/uni660/rev1/rules.mk b/keyboards/sirius/uni660/rev1/rules.mk index 03da267c27a..8cbb59fb2a9 100644 --- a/keyboards/sirius/uni660/rev1/rules.mk +++ b/keyboards/sirius/uni660/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sirius/uni660/rev2/rules.mk b/keyboards/sirius/uni660/rev2/rules.mk index ea4f0cdf2c7..f22f1f869b1 100644 --- a/keyboards/sirius/uni660/rev2/rules.mk +++ b/keyboards/sirius/uni660/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk index 45e163c2019..23c51b3ac28 100644 --- a/keyboards/sirius/unigo66/rules.mk +++ b/keyboards/sirius/unigo66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sixkeyboard/config.h b/keyboards/sixkeyboard/config.h index b438ceea9e3..d6505e70c7a 100644 --- a/keyboards/sixkeyboard/config.h +++ b/keyboards/sixkeyboard/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -65,5 +64,3 @@ along with this program. If not, see . #define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/sixkeyboard/sixkeyboard.h b/keyboards/sixkeyboard/sixkeyboard.h index 353e2a78c8b..3f563af6d10 100644 --- a/keyboards/sixkeyboard/sixkeyboard.h +++ b/keyboards/sixkeyboard/sixkeyboard.h @@ -1,20 +1,7 @@ -#ifndef SIXKEYBOARD_H -#define SIXKEYBOARD_H +#pragma once #include "quantum.h" -// This macro is an example of using a non-standard row-column matrix. The -// keyboard in question had 11 rows and 8 columns, but the rows were not all -// horizontal, and the columns were not all vertical. For example, row 2 -// contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and -// "Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", -// "Left Alt", "Up Arrow", and "Down Arrow". -// -// The macro makes programming the keys easier and in a more straight-forward -// manner because it realigns the keys into a 6x15 sensible keyboard layout -// instead of the obtuse 11x8 matrix. - - /* * ┌───┬───┬───┐ * │ A │ B │ C │ @@ -24,11 +11,8 @@ */ #define LAYOUT_ortho_2x3( \ k00, k01, k02, \ - k10, k11, k12 \ - ) { \ + k10, k11, k12 \ +) { \ { k00, k01, k02 }, \ - { k10, k11, k12 } \ + { k10, k11, k12 } \ } - - -#endif diff --git a/keyboards/skeletn87/hotswap/rules.mk b/keyboards/skeletn87/hotswap/rules.mk index f0b40fd4cee..490ca4bb1f6 100644 --- a/keyboards/skeletn87/hotswap/rules.mk +++ b/keyboards/skeletn87/hotswap/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/skeletn87/soldered/rules.mk b/keyboards/skeletn87/soldered/rules.mk index 2469ae57e3d..dedf9658cf0 100644 --- a/keyboards/skeletn87/soldered/rules.mk +++ b/keyboards/skeletn87/soldered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/skergo/rules.mk b/keyboards/skergo/rules.mk index dffe35fa387..9354e10b87a 100644 --- a/keyboards/skergo/rules.mk +++ b/keyboards/skergo/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/slz40/rules.mk b/keyboards/slz40/rules.mk index c79f74e34b9..9906266f482 100644 --- a/keyboards/slz40/rules.mk +++ b/keyboards/slz40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/smallice/rules.mk b/keyboards/smallice/rules.mk index 85870d1f742..33e17633756 100644 --- a/keyboards/smallice/rules.mk +++ b/keyboards/smallice/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/smallkeyboard/config.h b/keyboards/smallkeyboard/config.h index 689d53d54eb..0a7d06f39de 100644 --- a/keyboards/smallkeyboard/config.h +++ b/keyboards/smallkeyboard/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 zhouqiong19840119 - * - * 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 . - */ + * + * 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 . + */ #pragma once @@ -50,31 +50,58 @@ #define DEBOUNCE 3 /* disable these deprecated features by default */ -//#ifndef LINK_TIME_OPTIMIZATION_ENABLE -//# define NO_ACTION_MACRO -//# define NO_ACTION_FUNCTION -//#endif +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION #ifdef RGB_MATRIX_ENABLE # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_FRAMEBUFFER_EFFECTS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +// #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +// #define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +// #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +// #define ENABLE_RGB_MATRIX_FRACTAL +#define ENABLE_RGB_MATRIX_PIXEL_RAIN + +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// #define ENABLE_RGB_MATRIX_SPLASH +// #define ENABLE_RGB_MATRIX_MULTISPLASH +// #define ENABLE_RGB_MATRIX_SOLID_SPLASH +// #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // This is a 7-bit address, that gets left-shifted and bit 0 // set to 0 for write, 1 for read (as per I2C protocol) @@ -84,14 +111,9 @@ // 0b1110101 AD <-> SCL // 0b1110110 AD <-> SDA #define DRIVER_ADDR_1 0b1110100 -//#define DRIVER_ADDR_2 0b1110110 #define DRIVER_COUNT 1 -#define DRIVER_1_LED_TOTAL 6 -//#define DRIVER_1_LED_TOTAL 25 -//#define DRIVER_2_LED_TOTAL 24 -//#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL +#define DRIVER_LED_TOTAL 6 #endif //#define RGB_DI_PIN B7 //#ifdef RGB_DI_PIN diff --git a/keyboards/smallkeyboard/rules.mk b/keyboards/smallkeyboard/rules.mk index bf7736d00fd..a7fab999d67 100644 --- a/keyboards/smallkeyboard/rules.mk +++ b/keyboards/smallkeyboard/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/smallkeyboard/smallkeyboard.c b/keyboards/smallkeyboard/smallkeyboard.c index f89a6d32b30..af38cb61218 100644 --- a/keyboards/smallkeyboard/smallkeyboard.c +++ b/keyboards/smallkeyboard/smallkeyboard.c @@ -17,7 +17,7 @@ #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/smk60/rules.mk b/keyboards/smk60/rules.mk index 30872a3c27d..b78ba10b0f7 100644 --- a/keyboards/smk60/rules.mk +++ b/keyboards/smk60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/snampad/rules.mk b/keyboards/snampad/rules.mk index f6f0c8516b5..487122c0263 100644 --- a/keyboards/snampad/rules.mk +++ b/keyboards/snampad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/sneakbox/aliceclone/rules.mk b/keyboards/sneakbox/aliceclone/rules.mk index 37cfa91d239..7d6d1e8abd0 100644 --- a/keyboards/sneakbox/aliceclone/rules.mk +++ b/keyboards/sneakbox/aliceclone/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sneakbox/ava/rules.mk b/keyboards/sneakbox/ava/rules.mk index 4fec84130cf..c28edc9134e 100644 --- a/keyboards/sneakbox/ava/rules.mk +++ b/keyboards/sneakbox/ava/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sneakbox/disarray/ortho/rules.mk b/keyboards/sneakbox/disarray/ortho/rules.mk index d747921e916..baba7d9d862 100644 --- a/keyboards/sneakbox/disarray/ortho/rules.mk +++ b/keyboards/sneakbox/disarray/ortho/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sneakbox/disarray/staggered/rules.mk b/keyboards/sneakbox/disarray/staggered/rules.mk index d747921e916..baba7d9d862 100644 --- a/keyboards/sneakbox/disarray/staggered/rules.mk +++ b/keyboards/sneakbox/disarray/staggered/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sofle/keymaps/default/keymap.c b/keyboards/sofle/keymaps/default/keymap.c index a64d274b554..6c078a1292a 100644 --- a/keyboards/sofle/keymaps/default/keymap.c +++ b/keyboards/sofle/keymaps/default/keymap.c @@ -200,12 +200,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/default/rules.mk b/keyboards/sofle/keymaps/default/rules.mk index e87a55ede46..c21a769a2ec 100644 --- a/keyboards/sofle/keymaps/default/rules.mk +++ b/keyboards/sofle/keymaps/default/rules.mk @@ -2,5 +2,5 @@ OLED_ENABLE = yes OLED_DRIVER = SSD1306 ENCODER_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no EXTRAKEY_ENABLE = yes diff --git a/keyboards/sofle/keymaps/devdev/config.h b/keyboards/sofle/keymaps/devdev/config.h index 32d07173521..c34da8382b9 100644 --- a/keyboards/sofle/keymaps/devdev/config.h +++ b/keyboards/sofle/keymaps/devdev/config.h @@ -99,32 +99,32 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + // # undef ENABLE_RGB_MATRIX_ALPHAS_MODS + // # undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + // # undef ENABLE_RGB_MATRIX_BREATHING + // # undef ENABLE_RGB_MATRIX_CYCLE_ALL + // # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // # undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + // # undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // # undef ENABLE_RGB_MATRIX_DUAL_BEACON + // # undef ENABLE_RGB_MATRIX_RAINBOW_BEACON + // # undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + // # undef ENABLE_RGB_MATRIX_RAINDROPS + // # undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + // # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP + // # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + // # undef ENABLE_RGB_MATRIX_SPLASH + // # undef ENABLE_RGB_MATRIX_MULTISPLASH + // # undef ENABLE_RGB_MATRIX_SOLID_SPLASH + // # undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/sofle/keymaps/devdev/keymap.c b/keyboards/sofle/keymaps/devdev/keymap.c index a0945b28f0f..b805f7f176e 100644 --- a/keyboards/sofle/keymaps/devdev/keymap.c +++ b/keyboards/sofle/keymaps/devdev/keymap.c @@ -465,12 +465,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/helltm/keymap.c b/keyboards/sofle/keymaps/helltm/keymap.c index 3e1bcc82ea8..8d6289af42b 100644 --- a/keyboards/sofle/keymaps/helltm/keymap.c +++ b/keyboards/sofle/keymaps/helltm/keymap.c @@ -392,7 +392,7 @@ static void print_status_narrow(void) { oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { /* KEYBOARD PET VARIABLES START */ current_wpm = get_current_wpm(); @@ -405,6 +405,7 @@ void oled_task_user(void) { } else { print_logo_narrow(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/j4ckofalltrades/oled.c b/keyboards/sofle/keymaps/j4ckofalltrades/oled.c index 46c791b0536..de561bd0fa0 100644 --- a/keyboards/sofle/keymaps/j4ckofalltrades/oled.c +++ b/keyboards/sofle/keymaps/j4ckofalltrades/oled.c @@ -65,12 +65,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/killmaster/keymap.c b/keyboards/sofle/keymaps/killmaster/keymap.c index 34c07f3c455..71db0fc8536 100644 --- a/keyboards/sofle/keymaps/killmaster/keymap.c +++ b/keyboards/sofle/keymaps/killmaster/keymap.c @@ -211,12 +211,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } diff --git a/keyboards/sofle/keymaps/rgb_default/config.h b/keyboards/sofle/keymaps/rgb_default/config.h index 32d07173521..c34da8382b9 100644 --- a/keyboards/sofle/keymaps/rgb_default/config.h +++ b/keyboards/sofle/keymaps/rgb_default/config.h @@ -99,32 +99,32 @@ /* Disable the animations you don't want/need. You will need to disable a good number of these * * because they take up a lot of space. Disable until you can successfully compile your firmware. */ -// # define DISABLE_RGB_MATRIX_ALPHAS_MODS -// # define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// # define DISABLE_RGB_MATRIX_BREATHING -// # define DISABLE_RGB_MATRIX_CYCLE_ALL -// # define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -// # define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// # define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -// # define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_BEACON -// # define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -// # define DISABLE_RGB_MATRIX_RAINDROPS -// # define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -// # define DISABLE_RGB_MATRIX_DIGITAL_RAIN -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -// # define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -// # define DISABLE_RGB_MATRIX_SPLASH -// # define DISABLE_RGB_MATRIX_MULTISPLASH -// # define DISABLE_RGB_MATRIX_SOLID_SPLASH -// # define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH + // # undef ENABLE_RGB_MATRIX_ALPHAS_MODS + // # undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + // # undef ENABLE_RGB_MATRIX_BREATHING + // # undef ENABLE_RGB_MATRIX_CYCLE_ALL + // # undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + // # undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN + // # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL + // # undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + // # undef ENABLE_RGB_MATRIX_DUAL_BEACON + // # undef ENABLE_RGB_MATRIX_RAINBOW_BEACON + // # undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + // # undef ENABLE_RGB_MATRIX_RAINDROPS + // # undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + // # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP + // # undef ENABLE_RGB_MATRIX_DIGITAL_RAIN + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + // # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + // # undef ENABLE_RGB_MATRIX_SPLASH + // # undef ENABLE_RGB_MATRIX_MULTISPLASH + // # undef ENABLE_RGB_MATRIX_SOLID_SPLASH + // # undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif diff --git a/keyboards/sofle/keymaps/rgb_default/keymap.c b/keyboards/sofle/keymaps/rgb_default/keymap.c index 13edbc52070..30f374f2964 100644 --- a/keyboards/sofle/keymaps/rgb_default/keymap.c +++ b/keyboards/sofle/keymaps/rgb_default/keymap.c @@ -256,9 +256,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* NUMPAD * ,-----------------------------------------. ,-----------------------------------------. - * | trans| | | | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * | trans| | | | | | | |NumLck| | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | | | | | | | | 7 | 8 | 9 | * | F12 | + * | ` | | | | | | | ^ | 7 | 8 | 9 | * | | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | trans| | | | | |-------. ,-------| - | 4 | 5 | 6 | | | | * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| @@ -270,27 +270,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_NUMPAD] = LAYOUT( //,------------------------------------------------. ,---------------------------------------------------. - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_NLCK, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, //|------+-------+--------+--------+--------+------| |--------+-------+--------+--------+--------+---------| - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CIRC, KC_P7, KC_P8, KC_P9, KC_ASTR, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CIRC, KC_P7, KC_P8, KC_P9, KC_ASTR, XXXXXXX, //|------+-------+--------+--------+--------+------| |--------+-------+--------+--------+--------+---------| XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_P4, KC_P5, KC_P6, KC_EQL, KC_PIPE, //|------+-------+--------+--------+--------+------| === | | === |--------+-------+--------+--------+--------+---------| - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,_______, _______,KC_PLUS, KC_P1, KC_P2, KC_P3, KC_SLSH, _______, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,_______, _______,KC_PLUS, KC_P1, KC_P2, KC_P3, KC_SLSH, _______, //|------+-------+--------+--------+--------+------| === | | === |--------+-------+--------+--------+--------+---------| - _______, OSM(MOD_MEH), _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______ + _______, OSM(MOD_MEH), _______, _______, _______, _______, _______, KC_P0, KC_PDOT, _______ // \--------+--------+--------+---------+-------| |--------+---------+--------+---------+-------/ ), /* SWITCH * ,-----------------------------------------. ,-----------------------------------------. - * | cole | qwer | low |raise | adj |numpd | | | F7 | F8 | F9 | F10 | F11 | + * | | | | | | | | | | | | | | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | ` | | | | | | | | 7 | 8 | 9 | * | F12 | + * | qwer | cole |col_dh| low | raise| adj | |numpad| | | | |RESET | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | trans| | | | | |-------. ,-------| - | 4 | 5 | 6 | | | | + * | | | | | | |-------. ,-------| | | | | |EEP_RST| * |------+------+------+------+------+------| MUTE | | |------+------+------+------+------+------| - * | trans| | | | | |-------| |-------| + | 1 | 2 | 3 | \ | Shift| + * | SLEEP| | | | | |-------| |-------| | | | | | | * `-----------------------------------------/ / \ \-----------------------------------------' * | Bspc | WIN |LOWER | Enter| /Space / \Enter \ |SPACE | 0 | . | RAlt | * | | | | |/ / \ \ | | | | | @@ -301,13 +301,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //,------------------------------------------------. ,---------------------------------------------------. _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, //|------+-------+--------+--------+--------+------| |--------+-------+--------+--------+--------+---------| - TO(0), TO(1), TO(2), TO(3), TO(4), TO(5), KC_NO, TO(7), KC_NO, KC_NO, KC_NO, RESET, + TO(0), TO(1), TO(2), TO(3), TO(4), TO(5), TO(6), KC_NO, KC_NO, KC_NO, KC_NO, RESET, //|------+-------+--------+--------+--------+------| |--------+-------+--------+--------+--------+---------| - KC_NO, KC_NO, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, EEP_RST, + KC_NO, KC_NO, KC_BRIU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, EEP_RST, //|------+-------+--------+--------+--------+------| === | | === |--------+-------+--------+--------+--------+---------| - KC_SYSTEM_SLEEP,KC_NO,KC_BRID,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_SYSTEM_SLEEP,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 // \--------+--------+--------+---------+-------| |--------+---------+--------+---------+-------/ ), @@ -465,12 +465,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/sofle/keymaps/via/oled.c b/keyboards/sofle/keymaps/via/oled.c index 8a230f00011..74f06cedc54 100644 --- a/keyboards/sofle/keymaps/via/oled.c +++ b/keyboards/sofle/keymaps/via/oled.c @@ -73,12 +73,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } #endif diff --git a/keyboards/soup10/rules.mk b/keyboards/soup10/rules.mk index 0fb4610a395..a683e5c39d7 100644 --- a/keyboards/soup10/rules.mk +++ b/keyboards/soup10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk index c43c083b778..00c8642a666 100644 --- a/keyboards/southpole/rules.mk +++ b/keyboards/southpole/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sowbug/68keys/config.h b/keyboards/sowbug/68keys/config.h index 21e30433543..0aad9a45747 100644 --- a/keyboards/sowbug/68keys/config.h +++ b/keyboards/sowbug/68keys/config.h @@ -52,3 +52,51 @@ #define DRIVER_LED_TOTAL RGBLED_NUM #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/sowbug/68keys/rules.mk b/keyboards/sowbug/68keys/rules.mk index 1f84ebb08c4..a2fd3d03100 100644 --- a/keyboards/sowbug/68keys/rules.mk +++ b/keyboards/sowbug/68keys/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sowbug/ansi_tkl/config.h b/keyboards/sowbug/ansi_tkl/config.h index 8e772454000..505453b72b5 100644 --- a/keyboards/sowbug/ansi_tkl/config.h +++ b/keyboards/sowbug/ansi_tkl/config.h @@ -49,6 +49,55 @@ #define RGB_MATRIX_FRAMEBUFFER_EFFECTS #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 128 +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + // Want backlighting and RGB Matrix patterns? See the note in the readme, // apply the patches, and then uncomment the line below as well as the ones // in rules.mk. diff --git a/keyboards/sowbug/ansi_tkl/rules.mk b/keyboards/sowbug/ansi_tkl/rules.mk index 1f84ebb08c4..a2fd3d03100 100644 --- a/keyboards/sowbug/ansi_tkl/rules.mk +++ b/keyboards/sowbug/ansi_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/soy20/rules.mk b/keyboards/soy20/rules.mk index 2dd235a716e..673cc411ad5 100644 --- a/keyboards/soy20/rules.mk +++ b/keyboards/soy20/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/space_space/rev1/rules.mk b/keyboards/space_space/rev1/rules.mk index fdbad5fc48a..698cce9fb10 100644 --- a/keyboards/space_space/rev1/rules.mk +++ b/keyboards/space_space/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/space_space/rev2/rules.mk b/keyboards/space_space/rev2/rules.mk index 32bf292746d..c1ecc763c5f 100644 --- a/keyboards/space_space/rev2/rules.mk +++ b/keyboards/space_space/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/spaceman/pancake/rev1/feather/config.h b/keyboards/spaceman/pancake/rev1/feather/config.h index e72b25f3dbe..cb80721e462 100644 --- a/keyboards/spaceman/pancake/rev1/feather/config.h +++ b/keyboards/spaceman/pancake/rev1/feather/config.h @@ -21,8 +21,4 @@ #define MATRIX_COL_PINS { C7, D6, B7, B6, F0, D2, D3, F1, F4, F5, F6, F7 } #define UNUSED_PINS -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 - #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/spaceman/pancake/rev1/feather/rules.mk b/keyboards/spaceman/pancake/rev1/feather/rules.mk index b749dc23275..2bf90799704 100644 --- a/keyboards/spaceman/pancake/rev1/feather/rules.mk +++ b/keyboards/spaceman/pancake/rev1/feather/rules.mk @@ -10,8 +10,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BLUETOOTH = AdafruitBLE -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -21,6 +20,8 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https: BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below RGBLIGHT_ENABLE = no # This can be enabled if a ws2812 strip is connected to the expansion port. +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE LAYOUTS = ortho_4x12 planck_mit diff --git a/keyboards/spaceman/pancake/rev1/promicro/rules.mk b/keyboards/spaceman/pancake/rev1/promicro/rules.mk index c50dff2f484..4d95e61b42d 100644 --- a/keyboards/spaceman/pancake/rev1/promicro/rules.mk +++ b/keyboards/spaceman/pancake/rev1/promicro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spaceman/pancake/rev2/rev2.c b/keyboards/spaceman/pancake/rev2/rev2.c index cd13099a9c1..9b186192c5b 100644 --- a/keyboards/spaceman/pancake/rev2/rev2.c +++ b/keyboards/spaceman/pancake/rev2/rev2.c @@ -17,10 +17,14 @@ #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_270; } -__attribute__((weak)) void oled_task_user(void) { + +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } static const char PROGMEM pancake_logo[] = { 0x00, 0x00, 0x3e, 0x0a, 0x04, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x0c, 0x18, 0x3e, 0x00, 0x3e, 0x22, 0x22, 0x00, 0x3c, 0x0a, 0x3c, 0x00, 0x3e, 0x08, 0x36, 0x00, 0x3e, 0x2a, 0x22, 0x00, 0x00, @@ -50,5 +54,6 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_ln_P(PSTR("Undefined"), false); break; } + return false; } #endif diff --git a/keyboards/spaceman/pancake/rev2/rules.mk b/keyboards/spaceman/pancake/rev2/rules.mk index 2e68f3593fd..27b9094b575 100644 --- a/keyboards/spaceman/pancake/rev2/rules.mk +++ b/keyboards/spaceman/pancake/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spaceman/yun65/rules.mk b/keyboards/spaceman/yun65/rules.mk index c635b45e552..a824dac4aea 100644 --- a/keyboards/spaceman/yun65/rules.mk +++ b/keyboards/spaceman/yun65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/spacey/info.json b/keyboards/spacey/info.json index 1bb8dea95a5..94d68addf45 100644 --- a/keyboards/spacey/info.json +++ b/keyboards/spacey/info.json @@ -71,10 +71,10 @@ {"label":"k43", "x":3, "y":4}, {"label":"k44", "x":4, "y":4}, {"label":"k45", "x":5, "y":4}, - + {"label":"k46", "x":6, "y":4}, {"label":"k47", "x":7, "y":4}, {"label":"k48", "x":8, "y":4}, - + {"label":"k49", "x":9, "y":4}, {"label":"k4A", "x":10, "y":4}, {"label":"k4B", "x":11, "y":4}, {"label":"k4C", "x":12, "y":4}, diff --git a/keyboards/spacey/rules.mk b/keyboards/spacey/rules.mk index c52d9b7eca0..baba7d9d862 100644 --- a/keyboards/spacey/rules.mk +++ b/keyboards/spacey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sparrow62/rules.mk b/keyboards/sparrow62/rules.mk index 98c686e153e..d2af5cf14a9 100644 --- a/keyboards/sparrow62/rules.mk +++ b/keyboards/sparrow62/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/specskeys/rules.mk b/keyboards/specskeys/rules.mk index 0f447df5225..bec579b6411 100644 --- a/keyboards/specskeys/rules.mk +++ b/keyboards/specskeys/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/spiderisland/split78/rules.mk b/keyboards/spiderisland/split78/rules.mk index ba4001497c7..e125ff05a3a 100644 --- a/keyboards/spiderisland/split78/rules.mk +++ b/keyboards/spiderisland/split78/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/splitish/rules.mk b/keyboards/splitish/rules.mk index 237122cda5a..755a4d5d2d4 100644 --- a/keyboards/splitish/rules.mk +++ b/keyboards/splitish/rules.mk @@ -4,7 +4,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = caterina -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c index 8ba098eed2d..baf46eeac6e 100644 --- a/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/asapjockey/keymap.c @@ -246,12 +246,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/benji/keymap.c b/keyboards/splitkb/kyria/keymaps/benji/keymap.c index a670b776111..1ad50e5fc4f 100644 --- a/keyboards/splitkb/kyria/keymaps/benji/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/benji/keymap.c @@ -200,12 +200,13 @@ static void render_status(void) { oled_write_P(led_usb_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c b/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c index d0620309b6f..7e485a7be8e 100644 --- a/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cjuniet/keymap.c @@ -117,11 +117,12 @@ static void render_status(void) { oled_write_ln_P(PSTR(" Layer\n"), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); render_status_bar(); } else { render_kyria_logo(); } + return false; } diff --git a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c index 25a58038dc0..1abf865010c 100644 --- a/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/cwebster2/keymap.c @@ -391,12 +391,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/default/keymap.c b/keyboards/splitkb/kyria/keymaps/default/keymap.c index 243104afc6d..20cb279ff62 100644 --- a/keyboards/splitkb/kyria/keymaps/default/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/default/keymap.c @@ -226,7 +226,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -287,6 +287,7 @@ void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk index 6accf8cc038..2f4f4d091ff 100644 --- a/keyboards/splitkb/kyria/keymaps/drashna/rules.mk +++ b/keyboards/splitkb/kyria/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug @@ -17,3 +17,4 @@ KEY_LOCK_ENABLE = no WPM_ENABLE = yes SWAP_HANDS_ENABLE = yes LTO_ENABLE = no +CTPC = yes diff --git a/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c index 67881b03e6f..df542977a1f 100644 --- a/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/ghidalgo93/keymap.c @@ -214,12 +214,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/gotham/keymap.c b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c index 498e1c1124c..5fdeb494e67 100644 --- a/keyboards/splitkb/kyria/keymaps/gotham/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/gotham/keymap.c @@ -106,7 +106,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { #ifdef OLED_ENABLE oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } -void oled_task_user(void) { render_status(); } +bool oled_task_user(void) { + render_status(); + return false; +} #endif #ifdef ENCODER_ENABLE diff --git a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c index 6121dd0f879..af583a607fc 100644 --- a/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/j-inc/keymap.c @@ -317,7 +317,7 @@ static void render_anim(void) { // oled_write_raw_P(skull, 801); // } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { //render_skull(); //oled_set_cursor(7,6); @@ -335,6 +335,7 @@ void oled_task_user(void) { oled_write(wpm_str, false); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c index a9c8db28d51..e78e15ea3e9 100644 --- a/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/jhelvy/keymap.c @@ -161,12 +161,13 @@ static void render_status(void) { } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c b/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c index fe9c96d5569..732cca8f7b8 100644 --- a/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c +++ b/keyboards/splitkb/kyria/keymaps/john-ezra/oled.c @@ -478,12 +478,13 @@ void render_status_secondary(void) { render_wpm_graph(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_status_secondary(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c index 89efaec5597..7b567cbd607 100644 --- a/keyboards/splitkb/kyria/keymaps/mattir/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/mattir/keymap.c @@ -193,12 +193,13 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard layer } else { render_mattir_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c index 216f4753470..813328aa0c3 100644 --- a/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c +++ b/keyboards/splitkb/kyria/keymaps/ninjonas/oled.c @@ -198,12 +198,13 @@ static void render_status(void) { render_mod_state(get_mods()|get_oneshot_mods()); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c index 8b4b0c26306..222759d60d2 100644 --- a/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/plattfot/keymap.c @@ -327,12 +327,13 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_static_info(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/shinze/keymap.c b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c index ad9ca4da1df..3483410525f 100644 --- a/keyboards/splitkb/kyria/keymaps/shinze/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/shinze/keymap.c @@ -216,12 +216,13 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c index 51a91fc9159..16d2bad8a4b 100644 --- a/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/tessachka/keymap.c @@ -231,11 +231,12 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c index 24be4135ea9..0a4f1887c34 100644 --- a/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/thomasbaart/keymap.c @@ -298,12 +298,13 @@ static void render_status(void) { oled_write_P(IS_LED_ON(led_usb_state, USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/via/keymap.c b/keyboards/splitkb/kyria/keymaps/via/keymap.c index 730b5028cc2..6835652a70d 100644 --- a/keyboards/splitkb/kyria/keymaps/via/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/via/keymap.c @@ -191,7 +191,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { #endif #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -244,5 +244,6 @@ void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c index 08290303108..4f0df9354f9 100755 --- a/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c +++ b/keyboards/splitkb/kyria/keymaps/winternebs/keymap.c @@ -695,7 +695,7 @@ static void render_logo(void) { oled_set_cursor(6,6); oled_write_P(PSTR(" play asc "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_anim(); oled_set_cursor(0,7); @@ -728,5 +728,6 @@ void oled_task_user(void) { oled_scroll_left(); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/keymaps/zigotica/oled.c b/keyboards/splitkb/kyria/keymaps/zigotica/oled.c index 46bb2c3cea4..ba1415deedf 100644 --- a/keyboards/splitkb/kyria/keymaps/zigotica/oled.c +++ b/keyboards/splitkb/kyria/keymaps/zigotica/oled.c @@ -77,11 +77,11 @@ static void render_status(void) { oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (!is_keyboard_left()) { render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) } else { render_kyria_logo(); } + return false; } - diff --git a/keyboards/splitkb/kyria/readme.md b/keyboards/splitkb/kyria/readme.md index 5ce652589c7..7ecf3946f7c 100644 --- a/keyboards/splitkb/kyria/readme.md +++ b/keyboards/splitkb/kyria/readme.md @@ -10,7 +10,8 @@ Hardware Availability: [splitkb.com](https://splitkb.com) and partners. Make example for this keyboard (after setting up your build environment): - make splitkb/kyria:default + make splitkb/kyria/rev1:default + make splitkb/kyria/rev1/proton_c:default Example of flashing this keyboard: @@ -19,3 +20,22 @@ Example of flashing this keyboard: See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). A build guide for the Kyria can be found at [docs.splitkb.com](https://docs.splitkb.com/hc/en-us/articles/360010552059-Kyria-Build-Guide-Introduction). + +## Proton C Conversion Guide + +If you're one of the lucky people to have Proton Cs to use with their Kyria, there are a couple of caveats to getting this working. + +1. You need to have 2x Proton Cs, as you cannot mix and match with Pro Micros or Elite C's. They both need to be Proton Cs. +2. You'll need to do some modding to enable proper support with the Proton C. + +By design, the Kyria uses every available pin on the Pro Micro footprint. This includes using D3 (RX) for RGB. This poses a challenge with using the Proton C, since it needs both the TX and RX pins. The Proton C needs both pins, especially if you plan on using Full Duplex Serial. + +To fix this, you need to break off the last header position on the right-hand side on the footprint. This is the `TX0/D3` pad. Leave this pad without a header connected to. + +From the A9 pin on the Proton C, you want to run a wire from it to the `SDA + Extra Data` pad near the TRRS jack on the PCB. This will allow for proper, full duplex communication over the TRRS cable. + +To get RGB working properly, as well, you want to run a wire from the `A3` pin on the Proton C, next to the GND and DFU pin, right under the USB port. Run this to the `TX0/D3` pad (the one you left without a header pin on the PCB). + +Once you've done that, you can solder in the Proton C. and flash it. + +![Proton C](https://i.imgur.com/nICqWLo.jpg) diff --git a/keyboards/splitkb/kyria/rev1/config.h b/keyboards/splitkb/kyria/rev1/config.h index a330dfc10f8..e19e8dfa9c2 100644 --- a/keyboards/splitkb/kyria/rev1/config.h +++ b/keyboards/splitkb/kyria/rev1/config.h @@ -57,18 +57,31 @@ along with this program. If not, see . /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ -#define SOFT_SERIAL_PIN D2 -#define RGB_DI_PIN D3 +#if defined(CONVERT_TO_PROTON_C) +# define SERIAL_USART_FULL_DUPLEX // Enable full duplex operation mode. +# define SERIAL_USART_PIN_SWAP // Swap TX and RX pins if keyboard is master halve. +# define SERIAL_USART_DRIVER SD1 // USART driver of TX pin. default: SD1 +# define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7 +# define SERIAL_USART_TX_PIN D3 +# define SERIAL_USART_RX_PIN D2 + +# define RGB_DI_PIN PAL_LINE(GPIOA, 3) +# define WS2812_PWM_DRIVER PWMD2 // default: PWMD2 +# define WS2812_PWM_CHANNEL 4 // default: 2 +# define WS2812_PWM_PAL_MODE 1 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 2 +# 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. +#else +# define RGB_DI_PIN D3 +# define SOFT_SERIAL_PIN D2 +#endif + #define RGBLED_SPLIT \ { 10, 10 } #define RGBLED_NUM 20 -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - #ifdef OLED_ENABLE # define OLED_DISPLAY_128X64 # define SPLIT_OLED_ENABLE diff --git a/keyboards/splitkb/kyria/rev1/proton_c/chconf.h b/keyboards/splitkb/kyria/rev1/proton_c/chconf.h new file mode 100644 index 00000000000..7ca1d3d2431 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/chconf.h @@ -0,0 +1,22 @@ +/* Copyright 2020 QMK + * + * 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 . + */ + +#pragma once + +#define CH_CFG_ST_RESOLUTION 16 +#define CH_CFG_ST_FREQUENCY 10000 + +#include_next "chconf.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/halconf.h b/keyboards/splitkb/kyria/rev1/proton_c/halconf.h new file mode 100644 index 00000000000..99f2e11b9a3 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/halconf.h @@ -0,0 +1,22 @@ +/* Copyright 2020 QMK + * + * 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 3 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 . + */ +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_SERIAL TRUE + +#include_next diff --git a/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h b/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h new file mode 100644 index 00000000000..58348af390c --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/mcuconf.h @@ -0,0 +1,29 @@ +/* Copyright 2020 QMK + * + * 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 3 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 . + */ +#pragma once + +#include_next + +#undef STM32_PWM_USE_TIM2 +#define STM32_PWM_USE_TIM2 TRUE +#undef STM32_PWM_USE_TIM3 +#define STM32_PWM_USE_TIM3 FALSE + +#undef STM32_SERIAL_USE_USART1 +#define STM32_SERIAL_USE_USART1 TRUE + +#undef STM32_ST_USE_TIMER +#define STM32_ST_USE_TIMER 3 diff --git a/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c new file mode 100644 index 00000000000..628fabb2e53 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.c @@ -0,0 +1,17 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#include "proton_c.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h new file mode 100644 index 00000000000..718f5636ff1 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/proton_c.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Thomas Baart + * + * 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 . + */ + +#pragma once + +#include "rev1.h" diff --git a/keyboards/splitkb/kyria/rev1/proton_c/rules.mk b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk new file mode 100644 index 00000000000..9e0942398f8 --- /dev/null +++ b/keyboards/splitkb/kyria/rev1/proton_c/rules.mk @@ -0,0 +1,5 @@ +WS2812_DRIVER = pwm +SERIAL_DRIVER = usart +AUDIO_ENABLE = no +LTO_ENABLE = no +CONVERT_TO_PROTON_C = yes diff --git a/keyboards/splitkb/kyria/rev1/rev1.c b/keyboards/splitkb/kyria/rev1/rev1.c index ac82f7373d7..b2641fb40e3 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.c +++ b/keyboards/splitkb/kyria/rev1/rev1.c @@ -56,9 +56,14 @@ led_config_t g_led_config = { { #endif #ifdef OLED_ENABLE -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_keyboard_master()) { // QMK Logo and version information // clang-format off @@ -119,6 +124,7 @@ __attribute__((weak)) void oled_task_user(void) { // clang-format on oled_write_raw_P(kyria_logo, sizeof(kyria_logo)); } + return false; } #endif diff --git a/keyboards/splitkb/kyria/rev1/rev1.h b/keyboards/splitkb/kyria/rev1/rev1.h index bf9864fe36c..8a5fbeb21d2 100644 --- a/keyboards/splitkb/kyria/rev1/rev1.h +++ b/keyboards/splitkb/kyria/rev1/rev1.h @@ -16,6 +16,9 @@ #pragma once #include "kyria.h" +#ifdef KEYBOARD_splitkb_kyria_rev1_proton_c +# include "proton_c.h" +#endif /* This a shortcut to help you visually see your layout. * diff --git a/keyboards/splitkb/kyria/rules.mk b/keyboards/splitkb/kyria/rules.mk index f0e5cfc3d5f..42016a3ca83 100644 --- a/keyboards/splitkb/kyria/rules.mk +++ b/keyboards/splitkb/kyria/rules.mk @@ -7,8 +7,8 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/splitkb/zima/keymaps/drashna/keymap.c b/keyboards/splitkb/zima/keymaps/drashna/keymap.c index 29d03ec9182..b3133c601b7 100644 --- a/keyboards/splitkb/zima/keymaps/drashna/keymap.c +++ b/keyboards/splitkb/zima/keymaps/drashna/keymap.c @@ -78,10 +78,10 @@ void render_user_status(void) { void keyboard_post_init_user(void) { oled_scroll_set_speed(0); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_asleep) { oled_off(); - return; + return false;; } if (timer_elapsed32(oled_timer) < 30000) { @@ -131,6 +131,7 @@ void oled_task_user(void) { oled_off(); } } + return false; } void suspend_power_down_user(void) { is_asleep = true; } diff --git a/keyboards/splitkb/zima/keymaps/via/rules.mk b/keyboards/splitkb/zima/keymaps/via/rules.mk index 1eb438e4696..5ddd38bb0fd 100644 --- a/keyboards/splitkb/zima/keymaps/via/rules.mk +++ b/keyboards/splitkb/zima/keymaps/via/rules.mk @@ -1,2 +1,6 @@ VIA_ENABLE = yes HAPTIC_ENABLE = no + +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no diff --git a/keyboards/splitkb/zima/rules.mk b/keyboards/splitkb/zima/rules.mk index ecb6fd7cf17..070d4fec9f4 100644 --- a/keyboards/splitkb/zima/rules.mk +++ b/keyboards/splitkb/zima/rules.mk @@ -22,7 +22,8 @@ AUDIO_ENABLE = yes # Audio output ENCODER_ENABLE = yes # ENables the use of one or more encoders OLED_ENABLE = yes -OLED_DRIVER = SSD1306 # Enables the use of OLED displays -HAPTIC_ENABLE += DRV2605L # Supported but not included by defaut +OLED_DRIVER = SSD1306 # Enables the use of OLED displays +HAPTIC_ENABLE = yes # Supported but not included by defaut +HAPTIC_DRIVER = DRV2605L LTO_ENABLE = yes diff --git a/keyboards/splitkb/zima/zima.c b/keyboards/splitkb/zima/zima.c index 6570f3449cd..f39e3a39ebb 100644 --- a/keyboards/splitkb/zima/zima.c +++ b/keyboards/splitkb/zima/zima.c @@ -35,12 +35,17 @@ void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_180; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_180; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } if (is_asleep) { oled_off(); - return; + return false; } if (timer_elapsed32(oled_timer) < 30000) { @@ -83,6 +88,7 @@ __attribute__((weak)) void oled_task_user(void) { oled_off(); } } + return false; } bool process_record_kb(uint16_t keycode, keyrecord_t* record) { diff --git a/keyboards/splitreus62/rules.mk b/keyboards/splitreus62/rules.mk index b5f2571dc7b..e82ed29fc22 100644 --- a/keyboards/splitreus62/rules.mk +++ b/keyboards/splitreus62/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/standaside/rules.mk b/keyboards/standaside/rules.mk index 47037373f42..52bb6359404 100644 --- a/keyboards/standaside/rules.mk +++ b/keyboards/standaside/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/standaside/standaside.h b/keyboards/standaside/standaside.h index b6616963979..9601f1257cf 100644 --- a/keyboards/standaside/standaside.h +++ b/keyboards/standaside/standaside.h @@ -1,29 +1,23 @@ - -#ifndef STANDASIDE_H -#define STANDASIDE_H +#pragma once #include "quantum.h" -#define ___ KC_NO // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array #define LAYOUT_ortho_4x16( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, K15, \ - K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K30, K31, \ - K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, K45, K46, K47, \ - K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K60, K61, K62, K63 \ -) \ -{ \ - { K00, K02, K04, K06, K08, K10, K12, K14 }, \ - { K01, K03, K05, K07, K09, K11, K13, K15 }, \ - { K16, K18, K20, K22, K24, K26, K28, K30 }, \ - { K17, K19, K21, K23, K25, K27, K29, K31 }, \ - { K32, K34, K36, K38, K40, K42, K44, K46 }, \ - { K33, K35, K37, K39, K41, K43, K45, K47 }, \ - { K48, K50, K52, K54, K56, K58, K60, K62 }, \ - { K49, K51, K53, K55, K57, K59, K61, K63 } \ + k00, k10, k01, k11, k02, k12, k03, k13, k04, k14, k05, k15, k06, k16, k07, k17, \ + k20, k30, k21, k31, k22, k32, k23, k33, k24, k34, k25, k35, k26, k36, k27, k37, \ + k40, k50, k41, k51, k42, k52, k43, k53, k44, k54, k45, k55, k46, k56, k47, k57, \ + k60, k70, k61, k71, k62, k72, k63, k73, k64, k74, k65, k75, k66, k76, k67, k77 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27 }, \ + { k30, k31, k32, k33, k34, k35, k36, k37 }, \ + { k40, k41, k42, k43, k44, k45, k46, k47 }, \ + { k50, k51, k52, k53, k54, k55, k56, k57 }, \ + { k60, k61, k62, k63, k64, k65, k66, k67 }, \ + { k70, k71, k72, k73, k74, k75, k76, k77 } \ } - -#endif diff --git a/keyboards/stella/rules.mk b/keyboards/stella/rules.mk index 6d598b616b6..f9ce5db399f 100644 --- a/keyboards/stella/rules.mk +++ b/keyboards/stella/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/stratos/rules.mk b/keyboards/stratos/rules.mk index 59fce3c8ad6..152a85dd4d0 100644 --- a/keyboards/stratos/rules.mk +++ b/keyboards/stratos/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/studiokestra/cascade/rules.mk b/keyboards/studiokestra/cascade/rules.mk index 8d08446ee2b..0acd19e6706 100644 --- a/keyboards/studiokestra/cascade/rules.mk +++ b/keyboards/studiokestra/cascade/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/studiokestra/nue/rules.mk b/keyboards/studiokestra/nue/rules.mk index df18dc487eb..5c194d1aeb6 100644 --- a/keyboards/studiokestra/nue/rules.mk +++ b/keyboards/studiokestra/nue/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h index b19339ad6cb..47fcc72fd2c 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -75,5 +74,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/suihankey/alpha/keymaps/default/keymap.c b/keyboards/suihankey/alpha/keymaps/default/keymap.c index 79c4c3df6ec..b682f0f15d7 100644 --- a/keyboards/suihankey/alpha/keymaps/default/keymap.c +++ b/keyboards/suihankey/alpha/keymaps/default/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -80,5 +80,7 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/suihankey/rev1/keymaps/default/keymap.c b/keyboards/suihankey/rev1/keymaps/default/keymap.c index 79c4c3df6ec..b682f0f15d7 100644 --- a/keyboards/suihankey/rev1/keymaps/default/keymap.c +++ b/keyboards/suihankey/rev1/keymaps/default/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("Layer: "), false); switch (biton32(layer_state)) { case BASE: @@ -80,5 +80,7 @@ void oled_task_user(void) { oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/suihankey/rules.mk b/keyboards/suihankey/rules.mk index 2a0566f9444..89b68dc07f4 100644 --- a/keyboards/suihankey/rules.mk +++ b/keyboards/suihankey/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/swiftrax/retropad/rules.mk b/keyboards/swiftrax/retropad/rules.mk index 1acfa0949cb..700fc37e419 100644 --- a/keyboards/swiftrax/retropad/rules.mk +++ b/keyboards/swiftrax/retropad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/switchplate/southpaw_65/rules.mk b/keyboards/switchplate/southpaw_65/rules.mk index baade350b0a..36287cd37b2 100644 --- a/keyboards/switchplate/southpaw_65/rules.mk +++ b/keyboards/switchplate/southpaw_65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/switchplate/southpaw_fullsize/rules.mk b/keyboards/switchplate/southpaw_fullsize/rules.mk index 39c00d844f4..756d8d421d7 100644 --- a/keyboards/switchplate/southpaw_fullsize/rules.mk +++ b/keyboards/switchplate/southpaw_fullsize/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/switchplate/switchplate910/rules.mk b/keyboards/switchplate/switchplate910/rules.mk index 0641b5d22e4..4f1faaec800 100644 --- a/keyboards/switchplate/switchplate910/rules.mk +++ b/keyboards/switchplate/switchplate910/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sx60/rules.mk b/keyboards/sx60/rules.mk index a8c067cf0cd..1d4118233d9 100755 --- a/keyboards/sx60/rules.mk +++ b/keyboards/sx60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/sx60/sx60.h b/keyboards/sx60/sx60.h index f533d8e8998..605b6fe78dc 100755 --- a/keyboards/sx60/sx60.h +++ b/keyboards/sx60/sx60.h @@ -1,5 +1,4 @@ -#ifndef SX60_H -#define SX60_H +#pragma once #include "quantum.h" #include @@ -23,60 +22,60 @@ extern uint8_t mcp23018_status; uint8_t init_mcp23018(void); +#define XXX KC_NO + #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, K44, \ - K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, \ - K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K70, K71 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, K44 }, \ - { K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K59 }, \ - { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, K66, K67, K68, K69, K70, K71, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } #define LAYOUT_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, \ - K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68, K69 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ - { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K57 }, \ - { K58, K59, K60, K61, K62, K63, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4E, XXX, XXX } \ } #define LAYOUT_ansi_split_bs( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, K43, \ - K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, \ - K57, K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ - { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ - { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ - { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, KC_NO, KC_NO }, \ - { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } #define LAYOUT_ansi_split_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \ - K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, K42, \ - K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, \ - K57, K58, K59, K60, K61, K62, K63, K64, K65, K66, K67, K68 \ + k00, k01, k02, k03, k04, k05, k06, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k21, k22, k23, k24, k25, k26, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k43, k44, k45, k48, k49, k4A, k4B, k4C, k4D \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K13 }, \ - { K14, K15, K16, K17, K18, K19, K20, KC_NO, K21, K22, K23, K24, K25, K26, K27, K28 }, \ - { K29, K30, K31, K32, K33, K34, K35, KC_NO, K36, K37, K38, K39, K40, K41, K42, KC_NO }, \ - { K43, K44, KC_NO, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K56 }, \ - { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ + { k00, k01, k02, k03, k04, k05, k06, XXX, k08, k09, k0A, k0B, k0C, k0D, k0E, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, XXX, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, k21, k22, k23, k24, k25, k26, XXX, k28, k29, k2A, k2B, k2C, k2D, k2E, XXX }, \ + { k30, k31, XXX, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3E }, \ + { k40, k41, k42, k43, k44, k45, XXX, XXX, k48, k49, k4A, k4B, k4C, k4D, XXX, XXX } \ } - -#endif diff --git a/keyboards/tada68/keymaps/abishalom/rules.mk b/keyboards/tada68/keymaps/abishalom/rules.mk index b04b98e5799..f125bbcdf30 100644 --- a/keyboards/tada68/keymaps/abishalom/rules.mk +++ b/keyboards/tada68/keymaps/abishalom/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tada68/keymaps/dlg/rules.mk b/keyboards/tada68/keymaps/dlg/rules.mk index 021059686d9..e381f2fdda6 100644 --- a/keyboards/tada68/keymaps/dlg/rules.mk +++ b/keyboards/tada68/keymaps/dlg/rules.mk @@ -2,7 +2,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c index eb0ea5029c4..e4bcb3625ae 100644 --- a/keyboards/takashicompany/endzone34/keymaps/default/keymap.c +++ b/keyboards/takashicompany/endzone34/keymaps/default/keymap.c @@ -77,7 +77,7 @@ static void render_logo(void) { oled_write_raw_P(my_logo, sizeof(my_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { render_logo(); @@ -108,5 +108,6 @@ void oled_task_user(void) { oled_write_ln(count_str, false); + return false; } #endif diff --git a/keyboards/takashicompany/endzone34/rules.mk b/keyboards/takashicompany/endzone34/rules.mk index 7c691e47f93..19fb27ff1b9 100644 --- a/keyboards/takashicompany/endzone34/rules.mk +++ b/keyboards/takashicompany/endzone34/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/taleguers/taleguers75/rules.mk b/keyboards/taleguers/taleguers75/rules.mk index 377b32a7c1c..ebde6cceace 100644 --- a/keyboards/taleguers/taleguers75/rules.mk +++ b/keyboards/taleguers/taleguers75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index f73ffa79a2f..4680753dd49 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -76,5 +75,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/tau4/keymaps/default/keymap.c b/keyboards/tau4/keymaps/default/keymap.c index 1a1e5b38ce3..6c1b2342a29 100755 --- a/keyboards/tau4/keymaps/default/keymap.c +++ b/keyboards/tau4/keymaps/default/keymap.c @@ -140,7 +140,8 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); + return false; } #endif diff --git a/keyboards/team0110/p1800fl/rules.mk b/keyboards/team0110/p1800fl/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/team0110/p1800fl/rules.mk +++ b/keyboards/team0110/p1800fl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/technika/rules.mk b/keyboards/technika/rules.mk index 52e59f74a80..e3015bd416e 100644 --- a/keyboards/technika/rules.mk +++ b/keyboards/technika/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c index fc3a45c9821..685fbd7e04d 100644 --- a/keyboards/tender/macrowo_pad/keymaps/default/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/default/keymap.c @@ -50,7 +50,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("OWO\nWhat's\nthis?"), false); + return false; } #endif diff --git a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c index 84c7e3e4478..e4e2c131ed5 100644 --- a/keyboards/tender/macrowo_pad/keymaps/via/keymap.c +++ b/keyboards/tender/macrowo_pad/keymaps/via/keymap.c @@ -58,7 +58,8 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; } -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("OWO\nWhat's\nthis?"), false); + return false; } #endif diff --git a/keyboards/tender/macrowo_pad/rules.mk b/keyboards/tender/macrowo_pad/rules.mk index b4046de018e..265cb97514e 100644 --- a/keyboards/tender/macrowo_pad/rules.mk +++ b/keyboards/tender/macrowo_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/tenki/rules.mk b/keyboards/tenki/rules.mk index bb94964d6fd..8b706cd5e94 100644 --- a/keyboards/tenki/rules.mk +++ b/keyboards/tenki/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/terrazzo/config.h b/keyboards/terrazzo/config.h index 907c94ff525..43720fa78f9 100644 --- a/keyboards/terrazzo/config.h +++ b/keyboards/terrazzo/config.h @@ -91,27 +91,31 @@ so there is only one configuration. */ #define LED_MATRIX_MAXIMUM_BRIGHTNESS 20 #define LED_DISABLE_WHEN_USB_SUSPENDED -#define DISABLE_LED_MATRIX_ALPHAS_MODS -#define DISABLE_LED_MATRIX_BREATHING -#define DISABLE_LED_MATRIX_BAND -#define DISABLE_LED_MATRIX_BAND_PINWHEEL -#define DISABLE_LED_MATRIX_BAND_SPIRAL -#define DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_LED_MATRIX_CYCLE_UP_DOWN -#define DISABLE_LED_MATRIX_CYCLE_OUT_IN -#define DISABLE_LED_MATRIX_DUAL_BEACON -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_LED_MATRIX_SOLID_SPLASH -#define DISABLE_LED_MATRIX_SOLID_MULTISPLASH -#define DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT -#define DISABLE_LED_MATRIX_WAVE_UP_DOWN - +// LED Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects +// # define ENABLE_LED_MATRIX_ALPHAS_MODS +// # define ENABLE_LED_MATRIX_BREATHING +// # define ENABLE_LED_MATRIX_BAND +// # define ENABLE_LED_MATRIX_BAND_PINWHEEL +// # define ENABLE_LED_MATRIX_BAND_SPIRAL +// # define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_LED_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_LED_MATRIX_CYCLE_OUT_IN +// # define ENABLE_LED_MATRIX_DUAL_BEACON +// # if defined(LED_MATRIX_KEYREACTIVE_ENABLED) +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_LED_MATRIX_SPLASH +// # define ENABLE_LED_MATRIX_MULTISPLASH +// # endif +// # define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +// # define ENABLE_LED_MATRIX_WAVE_UP_DOWN #endif /* Terrazzo animations */ diff --git a/keyboards/terrazzo/rules.mk b/keyboards/terrazzo/rules.mk index c5431060727..c352147d21d 100644 --- a/keyboards/terrazzo/rules.mk +++ b/keyboards/terrazzo/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/terrazzo/terrazzo.c b/keyboards/terrazzo/terrazzo.c index 19ac6be4911..731efec20c0 100644 --- a/keyboards/terrazzo/terrazzo.c +++ b/keyboards/terrazzo/terrazzo.c @@ -21,7 +21,7 @@ #include "print.h" #include "quantum.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * https://cdn-learn.adafruit.com/downloads/pdf/adafruit-15x7-7x15-charlieplex-led-matrix-charliewing-featherwing.pdf */ diff --git a/keyboards/tetris/tetris.h b/keyboards/tetris/tetris.h index f5d13e5c2f8..56f4ecbfc72 100755 --- a/keyboards/tetris/tetris.h +++ b/keyboards/tetris/tetris.h @@ -1,20 +1,19 @@ -#ifndef TETRIS_H -#define TETRIS_H +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311, \ - K400, K401, K410, K411 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3A, k3B, \ + k40, k41, k4A, k4B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 }, \ - { K400, K401, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K410, K411 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, XXX, k37, k38, k39, k3A, k3B }, \ + { k40, k41, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k4A, k4B } \ } - -#endif diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index b3194d5324b..2a437c3c13f 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/tgr/jane/jane.c b/keyboards/tgr/jane/jane.c deleted file mode 100644 index d4cdebaa259..00000000000 --- a/keyboards/tgr/jane/jane.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2019 MechMerlin - * - * 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 . - */ - -#include "jane.h" diff --git a/keyboards/tgr/jane/config.h b/keyboards/tgr/jane/v2/config.h similarity index 100% rename from keyboards/tgr/jane/config.h rename to keyboards/tgr/jane/v2/config.h diff --git a/keyboards/tgr/jane/info.json b/keyboards/tgr/jane/v2/info.json similarity index 100% rename from keyboards/tgr/jane/info.json rename to keyboards/tgr/jane/v2/info.json diff --git a/keyboards/tgr/jane/keymaps/default/config.h b/keyboards/tgr/jane/v2/keymaps/default/config.h similarity index 100% rename from keyboards/tgr/jane/keymaps/default/config.h rename to keyboards/tgr/jane/v2/keymaps/default/config.h diff --git a/keyboards/tgr/jane/keymaps/default/keymap.c b/keyboards/tgr/jane/v2/keymaps/default/keymap.c similarity index 100% rename from keyboards/tgr/jane/keymaps/default/keymap.c rename to keyboards/tgr/jane/v2/keymaps/default/keymap.c diff --git a/keyboards/tgr/jane/keymaps/default/readme.md b/keyboards/tgr/jane/v2/keymaps/default/readme.md similarity index 100% rename from keyboards/tgr/jane/keymaps/default/readme.md rename to keyboards/tgr/jane/v2/keymaps/default/readme.md diff --git a/keyboards/tgr/jane/keymaps/via/config.h b/keyboards/tgr/jane/v2/keymaps/via/config.h similarity index 100% rename from keyboards/tgr/jane/keymaps/via/config.h rename to keyboards/tgr/jane/v2/keymaps/via/config.h diff --git a/keyboards/tgr/jane/keymaps/via/keymap.c b/keyboards/tgr/jane/v2/keymaps/via/keymap.c similarity index 100% rename from keyboards/tgr/jane/keymaps/via/keymap.c rename to keyboards/tgr/jane/v2/keymaps/via/keymap.c diff --git a/keyboards/tgr/jane/v2/keymaps/via/rules.mk b/keyboards/tgr/jane/v2/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/tgr/jane/v2/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/tgr/jane/readme.md b/keyboards/tgr/jane/v2/readme.md similarity index 100% rename from keyboards/tgr/jane/readme.md rename to keyboards/tgr/jane/v2/readme.md diff --git a/keyboards/tgr/jane/rules.mk b/keyboards/tgr/jane/v2/rules.mk similarity index 100% rename from keyboards/tgr/jane/rules.mk rename to keyboards/tgr/jane/v2/rules.mk diff --git a/keyboards/tgr/jane/v2/v2.c b/keyboards/tgr/jane/v2/v2.c new file mode 100644 index 00000000000..3d987485166 --- /dev/null +++ b/keyboards/tgr/jane/v2/v2.c @@ -0,0 +1,17 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include "v2.h" diff --git a/keyboards/tgr/jane/jane.h b/keyboards/tgr/jane/v2/v2.h similarity index 100% rename from keyboards/tgr/jane/jane.h rename to keyboards/tgr/jane/v2/v2.h diff --git a/keyboards/tgr/jane/v2ce/config.h b/keyboards/tgr/jane/v2ce/config.h new file mode 100644 index 00000000000..e6f6e99e7d0 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/config.h @@ -0,0 +1,42 @@ +/* Copyright 2021 MechMerlin + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +#define VENDOR_ID 0x5447 // TG +#define PRODUCT_ID 0x4A43 // JC +#define DEVICE_VER 0x0200 +#define MANUFACTURER TGR +#define PRODUCT Jane + +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +// 0 1 2 3 4 5 6 7 8 9 A B C D E +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCE 5 + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + +#define LED_CAPS_LOCK_PIN D1 +#define LED_NUM_LOCK_PIN D6 diff --git a/keyboards/tgr/jane/v2ce/info.json b/keyboards/tgr/jane/v2ce/info.json new file mode 100644 index 00000000000..bc9970fe78a --- /dev/null +++ b/keyboards/tgr/jane/v2ce/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "TGR Jane v2 CE", + "url": "", + "maintainer": "qmk", + "width": 18.25, + "height": 6.5, + "layouts": { + "LAYOUT_all_f13": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5}, {"x":14, "y":1.5}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":13.75, "y":3.5, "w":1.25}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5}, {"x":2.25, "y":5.5}, {"x":3.25, "y":5.5, "w":1.25}, {"x":4.5, "y":5.5, "w":1.25}, {"x":5.75, "y":5.5, "w":1.25}, {"x":7, "y":5.5, "w":1.25}, {"x":8.25, "y":5.5, "w":1.25}, {"x":9.5, "y":5.5, "w":1.25}, {"x":10.75, "y":5.5}, {"x":11.75, "y":5.5}, {"x":12.75, "y":5.5}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_ansi_f13": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_ansi_tsangan_f13": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.5, "y":2.5, "w":1.5}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5, "w":2.25}, {"x":0, "y":4.5, "w":2.25}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso_f13": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":2.75}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.25}, {"x":1.25, "y":5.5, "w":1.25}, {"x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"x":10, "y":5.5, "w":1.25}, {"x":11.25, "y":5.5, "w":1.25}, {"x":12.5, "y":5.5, "w":1.25}, {"x":13.75, "y":5.5, "w":1.25}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + }, + + "LAYOUT_tkl_iso_tsangan_f13": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.75, "y":0}, {"x":10.75, "y":0}, {"x":11.75, "y":0}, {"x":12.75, "y":0}, {"x":14, "y":0}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"x":17.25, "y":0}, {"x":0, "y":1.5}, {"x":1, "y":1.5}, {"x":2, "y":1.5}, {"x":3, "y":1.5}, {"x":4, "y":1.5}, {"x":5, "y":1.5}, {"x":6, "y":1.5}, {"x":7, "y":1.5}, {"x":8, "y":1.5}, {"x":9, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.5}, {"x":12, "y":1.5}, {"x":13, "y":1.5, "w":2}, {"x":15.25, "y":1.5}, {"x":16.25, "y":1.5}, {"x":17.25, "y":1.5}, {"x":0, "y":2.5, "w":1.5}, {"x":1.5, "y":2.5}, {"x":2.5, "y":2.5}, {"x":3.5, "y":2.5}, {"x":4.5, "y":2.5}, {"x":5.5, "y":2.5}, {"x":6.5, "y":2.5}, {"x":7.5, "y":2.5}, {"x":8.5, "y":2.5}, {"x":9.5, "y":2.5}, {"x":10.5, "y":2.5}, {"x":11.5, "y":2.5}, {"x":12.5, "y":2.5}, {"x":13.75, "y":2.5, "w":1.25, "h":2}, {"x":15.25, "y":2.5}, {"x":16.25, "y":2.5}, {"x":17.25, "y":2.5}, {"x":0, "y":3.5, "w":1.75}, {"x":1.75, "y":3.5}, {"x":2.75, "y":3.5}, {"x":3.75, "y":3.5}, {"x":4.75, "y":3.5}, {"x":5.75, "y":3.5}, {"x":6.75, "y":3.5}, {"x":7.75, "y":3.5}, {"x":8.75, "y":3.5}, {"x":9.75, "y":3.5}, {"x":10.75, "y":3.5}, {"x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"x":0, "y":4.5, "w":1.25}, {"x":1.25, "y":4.5}, {"x":2.25, "y":4.5}, {"x":3.25, "y":4.5}, {"x":4.25, "y":4.5}, {"x":5.25, "y":4.5}, {"x":6.25, "y":4.5}, {"x":7.25, "y":4.5}, {"x":8.25, "y":4.5}, {"x":9.25, "y":4.5}, {"x":10.25, "y":4.5}, {"x":11.25, "y":4.5}, {"x":12.25, "y":4.5, "w":1.75}, {"x":14, "y":4.5}, {"x":16.25, "y":4.5}, {"x":0, "y":5.5, "w":1.5}, {"x":1.5, "y":5.5}, {"x":2.5, "y":5.5, "w":1.5}, {"x":4, "y":5.5, "w":7}, {"x":11, "y":5.5, "w":1.5}, {"x":12.5, "y":5.5}, {"x":13.5, "y":5.5, "w":1.5}, {"x":15.25, "y":5.5}, {"x":16.25, "y":5.5}, {"x":17.25, "y":5.5}] + } + } +} diff --git a/keyboards/tgr/jane/v2ce/keymaps/default/keymap.c b/keyboards/tgr/jane/v2ce/keymaps/default/keymap.c new file mode 100644 index 00000000000..45c09166fcd --- /dev/null +++ b/keyboards/tgr/jane/v2ce/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* Copyright 2019 MechMerlin + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi_f13( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR,KC_SLCK,KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, + KC_TAB, 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_DEL ,KC_END ,KC_PGDN, + KC_CAPS, 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,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT) +}; diff --git a/keyboards/tgr/jane/v2ce/keymaps/default/readme.md b/keyboards/tgr/jane/v2ce/keymaps/default/readme.md new file mode 100644 index 00000000000..983182da247 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Jane \ No newline at end of file diff --git a/keyboards/tgr/jane/v2ce/keymaps/via/config.h b/keyboards/tgr/jane/v2ce/keymaps/via/config.h new file mode 100644 index 00000000000..6e6f025fbbc --- /dev/null +++ b/keyboards/tgr/jane/v2ce/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 MechMerlin + * + * 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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/tgr/jane/v2ce/keymaps/via/keymap.c b/keyboards/tgr/jane/v2ce/keymaps/via/keymap.c new file mode 100644 index 00000000000..47407346fa1 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/keymaps/via/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2021 MechMerlin + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_tkl_ansi_f13( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_PSCR,KC_SLCK,KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS ,KC_HOME,KC_PGUP, + KC_TAB, 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_DEL ,KC_END ,KC_PGDN, + KC_CAPS, 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,KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, KC_APP,KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + +[1] = LAYOUT_tkl_ansi_f13( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), + +[2] = LAYOUT_tkl_ansi_f13( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), +}; diff --git a/keyboards/tgr/jane/v2ce/keymaps/via/rules.mk b/keyboards/tgr/jane/v2ce/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/tgr/jane/v2ce/readme.md b/keyboards/tgr/jane/v2ce/readme.md new file mode 100644 index 00000000000..20e949caa57 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/readme.md @@ -0,0 +1,19 @@ +# Jane v2 CE + +TKL Custom Keyboard with F13 key + +* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +* Hardware Supported: TGR Jane CE (Pontoporia CE) PCB v1.2 +* Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=100415.0) + +Make example for this keyboard (after setting up your build environment): + + make tgr/jane/v2ce:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make tgr/jane/v2ce:default:flash + +**Reset Key**: Hold down the key located at *K00*, commonly programmed as *Esc* while plugging in the keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/tgr/jane/v2ce/rules.mk b/keyboards/tgr/jane/v2ce/rules.mk new file mode 100644 index 00000000000..92e3fcec393 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadHID + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +WS2812_DRIVER = i2c diff --git a/keyboards/tgr/jane/v2ce/v2ce.c b/keyboards/tgr/jane/v2ce/v2ce.c new file mode 100644 index 00000000000..6d478efce92 --- /dev/null +++ b/keyboards/tgr/jane/v2ce/v2ce.c @@ -0,0 +1,17 @@ +/* Copyright 2021 MechMerlin + * + * 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 . + */ + +#include "v2ce.h" diff --git a/keyboards/tgr/jane/v2ce/v2ce.h b/keyboards/tgr/jane/v2ce/v2ce.h new file mode 100644 index 00000000000..70f306912bc --- /dev/null +++ b/keyboards/tgr/jane/v2ce/v2ce.h @@ -0,0 +1,113 @@ +/* Copyright 2021 MechMerlin + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array + +#define LAYOUT_all_f13( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k53, k54, k55, k57, k58, k59, k5A, k5B, k5C, k5D, k5E, k3E, k4E \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, k53, k54, k55, KC_NO, k57, k58, k59, k5A, k5B, k5C, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + + +#define LAYOUT_tkl_ansi_f13( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + +#define LAYOUT_tkl_ansi_tsangan_f13( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E }, \ + { k40, KC_NO, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + +#define LAYOUT_tkl_iso_f13( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5D, k5E, k3E, k4E \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, KC_NO, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, k5D, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} + +#define LAYOUT_tkl_iso_tsangan_f13( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k6A, k0D, k0E, k6B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k6C, k6D, k6E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k7C, k7D, k7E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k2E, \ + k50, k51, k52, k55, k58, k59, k5A, k5E, k3E, k4E \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, KC_NO, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E }, \ + { k50, k51, k52, KC_NO, KC_NO, k55, KC_NO, KC_NO, k58, k59, k5A, KC_NO, KC_NO, KC_NO, k5E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k6A, k6B, k6C, k6D, k6E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, k7C, k7D, k7E }, \ +} diff --git a/keyboards/the_royal/liminal/rules.mk b/keyboards/the_royal/liminal/rules.mk index aade774c6af..e240497ddcd 100644 --- a/keyboards/the_royal/liminal/rules.mk +++ b/keyboards/the_royal/liminal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # - change yes to no to disable -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/the_royal/schwann/rules.mk b/keyboards/the_royal/schwann/rules.mk index 06faa7f4578..ed04528a0d4 100644 --- a/keyboards/the_royal/schwann/rules.mk +++ b/keyboards/the_royal/schwann/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/thevankeyboards/bananasplit/rules.mk b/keyboards/thevankeyboards/bananasplit/rules.mk index 459697cb799..095eec2fa00 100644 --- a/keyboards/thevankeyboards/bananasplit/rules.mk +++ b/keyboards/thevankeyboards/bananasplit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/thevankeyboards/caravan/rules.mk b/keyboards/thevankeyboards/caravan/rules.mk index 66cda91707b..0741a01a986 100644 --- a/keyboards/thevankeyboards/caravan/rules.mk +++ b/keyboards/thevankeyboards/caravan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/thevankeyboards/jetvan/rules.mk b/keyboards/thevankeyboards/jetvan/rules.mk index 596a72d429b..3b5a20f343b 100644 --- a/keyboards/thevankeyboards/jetvan/rules.mk +++ b/keyboards/thevankeyboards/jetvan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h index 80984227848..9db4d596de6 100644 --- a/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h +++ b/keyboards/thevankeyboards/minivan/keymaps/josjoha/config.h @@ -24,7 +24,7 @@ along with this program. If not, see . // place overrides here // Some defines meant to decrease the firmware size. The firmware is otherwise over the maximum (atmega32u4) -//# ifndef LINK_TIME_OPTIMIZATION_ENABLE +//# ifndef LTO_ENABLE //Disable old style macro handling: MACRO() & action_get_macro //# define NO_ACTION_MACRO // This saves 320 bytes //disable calling of action_function() from the fn_actions array (deprecated) @@ -40,7 +40,7 @@ along with this program. If not, see . // Attempts to reduce firmware size: - //#define LINK_TIME_OPTIMIZATION_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020 + //#define LTO_ENABLE // Did not decrease firmware size when tested on 26 Jan 2020 //#define NO_DEBUG //disable debugging (already defined) //#define NO_PRINT JJdisable printing/debugging using hid_listen (already defined) //#define NO_ACTION_LAYER //disable layers (obviously need layers) diff --git a/keyboards/thevankeyboards/minivan/rules.mk b/keyboards/thevankeyboards/minivan/rules.mk index b3af99d92b8..51a3e08ac2d 100644 --- a/keyboards/thevankeyboards/minivan/rules.mk +++ b/keyboards/thevankeyboards/minivan/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index edb1bd91c99..4572f5e2b90 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -103,5 +102,3 @@ along with this program. If not, see . //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/thevankeyboards/roadkit/roadkit.h b/keyboards/thevankeyboards/roadkit/roadkit.h index 62cfabc5eba..f367c88ff49 100644 --- a/keyboards/thevankeyboards/roadkit/roadkit.h +++ b/keyboards/thevankeyboards/roadkit/roadkit.h @@ -1,33 +1,30 @@ -#ifndef ROADKIT_H -#define ROADKIT_H +#pragma once #include "quantum.h" +#define XXX KC_NO + // This is a shortcut to help you visually see your layout. #define LAYOUT_numpad_4x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, \ - K20, K21, K22, K23, \ - K30, K32 \ -) \ -{ \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, KC_NO }, \ - { K20, K21, K22, K23 }, \ - { K30, KC_NO, K32, KC_NO } \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k23, \ + k30, k32 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, XXX }, \ + { k20, k21, k22, k23 }, \ + { k30, XXX, k32, XXX } \ } #define LAYOUT_ortho_4x4( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22, K23, \ - K30, K31, K32, K33 \ -) \ -{ \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, K23 }, \ - { K30, K31, K32, K33 } \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) { \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 } \ } - -#endif diff --git a/keyboards/thevankeyboards/roadkit/rules.mk b/keyboards/thevankeyboards/roadkit/rules.mk index 4de3295a9d4..11c22872f43 100644 --- a/keyboards/thevankeyboards/roadkit/rules.mk +++ b/keyboards/thevankeyboards/roadkit/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tiger910/rules.mk b/keyboards/tiger910/rules.mk index 9d0a467da54..b49ff27f8ea 100644 --- a/keyboards/tiger910/rules.mk +++ b/keyboards/tiger910/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tkc/candybar/lefty/rules.mk b/keyboards/tkc/candybar/lefty/rules.mk index 61f8cc6fa9b..3244267430b 100644 --- a/keyboards/tkc/candybar/lefty/rules.mk +++ b/keyboards/tkc/candybar/lefty/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = stm32-dfu # EXTRAFLAGS+=-flto LTO_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/candybar/righty/rules.mk b/keyboards/tkc/candybar/righty/rules.mk index 61f8cc6fa9b..3244267430b 100644 --- a/keyboards/tkc/candybar/righty/rules.mk +++ b/keyboards/tkc/candybar/righty/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = stm32-dfu # EXTRAFLAGS+=-flto LTO_ENABLE = yes BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/godspeed75/rules.mk b/keyboards/tkc/godspeed75/rules.mk index 2df38d26259..bcb4ec97244 100644 --- a/keyboards/tkc/godspeed75/rules.mk +++ b/keyboards/tkc/godspeed75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/m0lly/keymaps/default/keymap.c b/keyboards/tkc/m0lly/keymaps/default/keymap.c index 846429674f2..bb065fa239d 100644 --- a/keyboards/tkc/m0lly/keymaps/default/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/default/keymap.c @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); // Layer status @@ -91,5 +91,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/m0lly/keymaps/via/keymap.c b/keyboards/tkc/m0lly/keymaps/via/keymap.c index 333e29f4ec1..40f75b45792 100644 --- a/keyboards/tkc/m0lly/keymaps/via/keymap.c +++ b/keyboards/tkc/m0lly/keymaps/via/keymap.c @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("M0lly\n"),false); // Layer Status @@ -115,5 +115,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/m0lly/rules.mk b/keyboards/tkc/m0lly/rules.mk index 155fab235b7..22cdfb608e5 100644 --- a/keyboards/tkc/m0lly/rules.mk +++ b/keyboards/tkc/m0lly/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = qmk-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tkc/osav2/rules.mk b/keyboards/tkc/osav2/rules.mk index 6a44150852d..ae6042f986f 100644 --- a/keyboards/tkc/osav2/rules.mk +++ b/keyboards/tkc/osav2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tkc/portico/config.h b/keyboards/tkc/portico/config.h index ba4f11a41ef..35d615a023a 100644 --- a/keyboards/tkc/portico/config.h +++ b/keyboards/tkc/portico/config.h @@ -47,22 +47,22 @@ along with this program. If not, see . # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended # define RGB_MATRIX_KEYPRESSES -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define DRIVER_ADDR_1 0x74 # define DRIVER_ADDR_2 0x77 @@ -128,4 +128,4 @@ along with this program. If not, see . // VIA lighting is handled by the keyboard-level code #define VIA_CUSTOM_LIGHTING_ENABLE -#endif \ No newline at end of file +#endif diff --git a/keyboards/tkc/portico/portico.c b/keyboards/tkc/portico/portico.c index e3d3a14880b..0e2b4b2499a 100644 --- a/keyboards/tkc/portico/portico.c +++ b/keyboards/tkc/portico/portico.c @@ -19,7 +19,7 @@ along with this program. If not, see . #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, C2_1, C3_1, C4_1 }, { 0, C1_1, C3_2, C4_2 }, { 0, C1_2, C2_2, C4_3 }, diff --git a/keyboards/tkc/portico/rules.mk b/keyboards/tkc/portico/rules.mk index 581d34624f9..2e2fb5cffe5 100644 --- a/keyboards/tkc/portico/rules.mk +++ b/keyboards/tkc/portico/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/tkc1800/keymaps/default/keymap.c b/keyboards/tkc/tkc1800/keymaps/default/keymap.c index 762d5c4ed6e..29a19e680d4 100644 --- a/keyboards/tkc/tkc1800/keymaps/default/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/default/keymap.c @@ -80,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -102,5 +102,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c index dd552cee860..9eceaa5bda5 100644 --- a/keyboards/tkc/tkc1800/keymaps/smt/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/smt/keymap.c @@ -145,7 +145,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -173,5 +173,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/via/keymap.c b/keyboards/tkc/tkc1800/keymaps/via/keymap.c index d05a1d420c1..74ab1149f66 100644 --- a/keyboards/tkc/tkc1800/keymaps/via/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/via/keymap.c @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -126,5 +126,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c index da8e8b93208..9349af7bcd2 100644 --- a/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/wkl/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -84,5 +84,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c index cee80a48c79..2ebfe33c3da 100644 --- a/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c +++ b/keyboards/tkc/tkc1800/keymaps/yanfali/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef OLED_ENABLE -void oled_task_user(void) { +bool oled_task_user(void) { oled_write_P(PSTR("TKC1800\n"),false); // Host Keyboard Layer Status oled_write_P(PSTR("Layer: "), false); @@ -84,5 +84,7 @@ void oled_task_user(void) { oled_write_P(led_state.num_lock ? PSTR("NUM ") : PSTR(" "), false); oled_write_P(led_state.caps_lock ? PSTR("CAP ") : PSTR(" "), false); oled_write_P(led_state.scroll_lock ? PSTR("SCR ") : PSTR(" "), false); + + return false; } #endif diff --git a/keyboards/tkc/tkc1800/rules.mk b/keyboards/tkc/tkc1800/rules.mk index d97c861178d..7e04b86fca6 100644 --- a/keyboards/tkc/tkc1800/rules.mk +++ b/keyboards/tkc/tkc1800/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = qmk-dfu # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkc/tkl_ab87/rules.mk b/keyboards/tkc/tkl_ab87/rules.mk index ade3865832e..d6b0bdad95f 100644 --- a/keyboards/tkc/tkl_ab87/rules.mk +++ b/keyboards/tkc/tkl_ab87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkw/grandiceps/keymaps/default/keymap.c b/keyboards/tkw/grandiceps/keymaps/default/keymap.c index 14ae9619ead..e3de33616e3 100644 --- a/keyboards/tkw/grandiceps/keymaps/default/keymap.c +++ b/keyboards/tkw/grandiceps/keymaps/default/keymap.c @@ -416,12 +416,13 @@ static void print_status_narrow(void) { oled_write_P(PSTR("\n\n"), false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { print_status_narrow(); } else { render_logo(); } + return false; } oled_rotation_t oled_init_user(oled_rotation_t rotation) { diff --git a/keyboards/tkw/grandiceps/rev2/rules.mk b/keyboards/tkw/grandiceps/rev2/rules.mk index c8f3f05bdd7..3e82c4507ef 100644 --- a/keyboards/tkw/grandiceps/rev2/rules.mk +++ b/keyboards/tkw/grandiceps/rev2/rules.mk @@ -1,5 +1,4 @@ EEPROM_DRIVER = i2c POINTING_DEVICE_ENABLE = yes -SRC += drivers/sensors/pimoroni_trackball.c -QUANTUM_LIB_SRC += i2c_master.c +POINTING_DEVICE_DRIVER = pimoroni_trackball diff --git a/keyboards/tkw/grandiceps/rules.mk b/keyboards/tkw/grandiceps/rules.mk index 08a12d114ef..fefbec50762 100644 --- a/keyboards/tkw/grandiceps/rules.mk +++ b/keyboards/tkw/grandiceps/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkw/stoutgat/v1/rules.mk b/keyboards/tkw/stoutgat/v1/rules.mk index bd0a85e7de1..c74c1b2e24c 100644 --- a/keyboards/tkw/stoutgat/v1/rules.mk +++ b/keyboards/tkw/stoutgat/v1/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = usbasploader # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tkw/stoutgat/v2/rules.mk b/keyboards/tkw/stoutgat/v2/rules.mk index ff24f4f6a53..9de812f2834 100644 --- a/keyboards/tkw/stoutgat/v2/rules.mk +++ b/keyboards/tkw/stoutgat/v2/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/tmo50/rules.mk b/keyboards/tmo50/rules.mk index c1677dcd9ed..4d48dda2cf0 100644 --- a/keyboards/tmo50/rules.mk +++ b/keyboards/tmo50/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index e4391437b66..793e740fa3e 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/tokyokeyboard/alix40/config.h b/keyboards/tokyokeyboard/alix40/config.h index 113412e95a6..f4b4e6e5ab8 100644 --- a/keyboards/tokyokeyboard/alix40/config.h +++ b/keyboards/tokyokeyboard/alix40/config.h @@ -65,9 +65,6 @@ along with this program. If not, see . #define QMK_ESC_INPUT D7 // usually ROW /* Bluetooth */ -#define AdafruitBleResetPin D4 -#define AdafruitBleCSPin B4 -#define AdafruitBleIRQPin E6 #define BATTERY_LEVEL_PIN B6 #define VIA_HAS_BROKEN_KEYCODES diff --git a/keyboards/tokyokeyboard/alix40/rules.mk b/keyboards/tokyokeyboard/alix40/rules.mk index 5fedaed8350..031e0ef7e16 100644 --- a/keyboards/tokyokeyboard/alix40/rules.mk +++ b/keyboards/tokyokeyboard/alix40/rules.mk @@ -10,7 +10,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -21,6 +21,6 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend NKRO_ENABLE = no # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow -BLUETOOTH_ENABLE = no # Enable Bluetooth AUDIO_ENABLE = no # Audio output -BLUETOOTH = AdafruitBLE +BLUETOOTH_ENABLE = yes +BLUETOOTH_DRIVER = AdafruitBLE diff --git a/keyboards/tokyokeyboard/tokyo60/rules.mk b/keyboards/tokyokeyboard/tokyo60/rules.mk index 2703c4269f3..627e2c77717 100644 --- a/keyboards/tokyokeyboard/tokyo60/rules.mk +++ b/keyboards/tokyokeyboard/tokyo60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/torn/bongocat.c b/keyboards/torn/bongocat.c index 00f5cda6ac6..21322c9536e 100644 --- a/keyboards/torn/bongocat.c +++ b/keyboards/torn/bongocat.c @@ -34,7 +34,10 @@ static bool show_logo = true; __attribute__((weak)) extern const char PROGMEM bongocat_logo[]; -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // clang-format off static const char PROGMEM idle[][FRAME_SIZE] = { @@ -347,7 +350,7 @@ void oled_task_user(void) { oled_off(); anim_timer = 0; show_logo = true; - return; + return false; } if (timer_elapsed32(anim_timer) > FRAME_DURATION) { @@ -369,6 +372,7 @@ void oled_task_user(void) { } current_frame++; } + return false; } bool process_record_kb(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/tr60w/rules.mk b/keyboards/tr60w/rules.mk index 81f481950a6..aeff331e7e1 100644 --- a/keyboards/tr60w/rules.mk +++ b/keyboards/tr60w/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/treadstone48/keymaps/default/keymap.c b/keyboards/treadstone48/keymaps/default/keymap.c index fc53d7e578a..f1b37364b52 100644 --- a/keyboards/treadstone48/keymaps/default/keymap.c +++ b/keyboards/treadstone48/keymaps/default/keymap.c @@ -167,13 +167,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treadstone48/keymaps/like_jis/keymap.c b/keyboards/treadstone48/keymaps/like_jis/keymap.c index b86ab5cdbdd..1e90a2416e7 100644 --- a/keyboards/treadstone48/keymaps/like_jis/keymap.c +++ b/keyboards/treadstone48/keymaps/like_jis/keymap.c @@ -167,13 +167,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c index a6a52e06780..e1f08358813 100644 --- a/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c +++ b/keyboards/treadstone48/rev1/keymaps/like_jis_rs/keymap.c @@ -219,13 +219,14 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { render_status(); } else { render_logo(); } + return false; } #else diff --git a/keyboards/treasure/type9/type9.h b/keyboards/treasure/type9/type9.h index 4e3c235d11b..6034416f16e 100644 --- a/keyboards/treasure/type9/type9.h +++ b/keyboards/treasure/type9/type9.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef TYPE9_H -#define TYPE9_H + +#pragma once #include "quantum.h" @@ -26,15 +26,12 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ - K00, K01, K02, \ - K10, K11, K12, \ - K20, K21, K22 \ -) \ -{ \ - { K00, K01, K02 }, \ - { K10, K11, K12 }, \ - { K20, K21, K22 }, \ +#define LAYOUT( \ + k00, k01, k02, \ + k10, k11, k12, \ + k20, k21, k22 \ +) { \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ + { k20, k21, k22 } \ } - -#endif diff --git a/keyboards/treasure/type9s2/rules.mk b/keyboards/treasure/type9s2/rules.mk index d2149ad8c2b..4f69f205ddb 100644 --- a/keyboards/treasure/type9s2/rules.mk +++ b/keyboards/treasure/type9s2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/tszaboo/ortho4exent/rules.mk b/keyboards/tszaboo/ortho4exent/rules.mk index 35251454958..66770322ba8 100644 --- a/keyboards/tszaboo/ortho4exent/rules.mk +++ b/keyboards/tszaboo/ortho4exent/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/tunks/ergo33/rules.mk b/keyboards/tunks/ergo33/rules.mk index c5090400102..6c02969ec55 100644 --- a/keyboards/tunks/ergo33/rules.mk +++ b/keyboards/tunks/ergo33/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes # Audio control and System control MOUSEKEY_ENABLE = yes # Mouse keys COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/tw40/rules.mk b/keyboards/tw40/rules.mk index 85870d1f742..33e17633756 100644 --- a/keyboards/tw40/rules.mk +++ b/keyboards/tw40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/txuu/rules.mk b/keyboards/txuu/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/txuu/rules.mk +++ b/keyboards/txuu/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ua62/rules.mk b/keyboards/ua62/rules.mk index bd712c09820..74a7851e6c7 100644 --- a/keyboards/ua62/rules.mk +++ b/keyboards/ua62/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 272e8401e6d..4ac138a9b5f 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -63,5 +62,3 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/uk78/uk78.h b/keyboards/uk78/uk78.h index 32c72d8fde9..46e53e7b319 100644 --- a/keyboards/uk78/uk78.h +++ b/keyboards/uk78/uk78.h @@ -1,49 +1,47 @@ -#ifndef UK78_H -#define UK78_H +#pragma once #include "quantum.h" // readability -#define ____ KC_NO +#define ___ KC_NO /* Re: Right Shift * - * Per a conversation I had on reddit with Rozakiin, matrix positions K312, - * K313 and K314 are never in use all together at the same time. + * Per a conversation I had on reddit with Rozakiin, matrix positions k3C, + * k3D and k3E are never in use all together at the same time. * - * A 2.75u-sized right Shift uses position K313, rendering K312 and K314 + * A 2.75u-sized right Shift uses position k3D, rendering k3C and k3E * inaccessible. * * A split right Shift, in either 1.75u/1u or 1u/1.75u (JIS layout) uses - * positions K312 and K314, rendering K313 inaccessible. + * positions k3C and k3E, rendering k3D inaccessible. * * - @noroadsleft * July 13, 2018 */ - #define LAYOUT_all( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, k2H, k2I, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214, K215, K216, K217, K218 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, ___, k2E, k2F, k2G, k2H, k2I }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, k4B, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } /* LAYOUT_ansi * * This layout uses: * - * - Split Backspace (K013 and K014) - * - ANSI Enter (K214) - * - ANSI 2.25u Left Shift (K300) - * - Compact right Shift (K312 and K314) - * - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left + * - Split Backspace (k0D and k0E) + * - ANSI Enter (k2E) + * - ANSI 2.25u Left Shift (k30) + * - Compact right Shift (k3C and k3E) + * - Two 1.5u modifiers (k4A and k4C) between the spacebar and the Left * arrow key * ,---------------------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- | @@ -58,28 +56,28 @@ * `---------------------------------------------------------------------------' */ #define LAYOUT_ansi( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, K216, K217, K218, \ - K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2E, k2F, k2G, k2H, k2I, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, ____, K214, K215, K216, K217, K218 }, \ - { K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, ___, k2E, k2F, k2G, k2H, k2I }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, ___, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } /* LAYOUT_iso * * This layout uses: * - * - Split Backspace (K013 and K014) - * - ISO Enter (K114) - * - ISO Left Shift and 1u (K300 and K301) - * - Compact right Shift (K312 and K314) - * - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left + * - Split Backspace (k0D and k0E) + * - ISO Enter (k1E) + * - ISO Left Shift and 1u (k30 and k31) + * - Compact right Shift (k3C and k3E) + * - Two 1.5u modifiers (k4A and k4C) between the spacebar and the Left * arrow key * ,---------------------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- | @@ -94,17 +92,15 @@ * `---------------------------------------------------------------------------' */ #define LAYOUT_iso( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, K216, K217, K218, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \ - K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, k1F, k1G, k1H, k1I, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2F, k2G, k2H, k2I, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3E, k3F, k3G, k3H, k3I, \ + k40, k41, k42, k46, k4A, k4C, k4D, k4E, k4F, k4G, k4H, k4I \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, ____, K215, K216, K217, K218 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \ - { K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, k0H, k0I }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, k1F, k1G, k1H, k1I }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, ___, ___, k2F, k2G, k2H, k2I }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, ___, k3E, k3F, k3G, k3H, k3I }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, ___, k4A, ___, k4C, k4D, k4E, k4F, k4G, k4H, k4I } \ } - -#endif diff --git a/keyboards/underscore33/rev1/rules.mk b/keyboards/underscore33/rev1/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/underscore33/rev1/rules.mk +++ b/keyboards/underscore33/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/underscore33/rev2/rules.mk b/keyboards/underscore33/rev2/rules.mk index 7dd60037e5a..40587ac8aef 100644 --- a/keyboards/underscore33/rev2/rules.mk +++ b/keyboards/underscore33/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ungodly/launch_pad/config.h b/keyboards/ungodly/launch_pad/config.h index 66d940c1b7e..cf639a4f28e 100644 --- a/keyboards/ungodly/launch_pad/config.h +++ b/keyboards/ungodly/launch_pad/config.h @@ -67,43 +67,55 @@ # define RGB_MATRIX_SPD_STEP 10 # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_PINWHEEL // default mode -/* Reduce the firmware size by only enabling the rgb animations you desire. */ -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -// # define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +// # define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// # define ENABLE_RGB_MATRIX_CYCLE_ALL +// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// # define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// # define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + #endif /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c index 42b6b397ca0..43e0e72bdc1 100644 --- a/keyboards/ungodly/launch_pad/keymaps/default/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/default/keymap.c @@ -274,7 +274,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -290,5 +290,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c index 083bb8b8156..0854715befa 100644 --- a/keyboards/ungodly/launch_pad/keymaps/via/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/via/keymap.c @@ -273,7 +273,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -289,5 +289,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c index 4f856b9770b..63f142d913d 100644 --- a/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c +++ b/keyboards/ungodly/launch_pad/keymaps/warzone/keymap.c @@ -249,7 +249,7 @@ static void render_light_logo(void) { oled_write_raw_P(light_logo, sizeof(light_logo)); } -void oled_task_user(void) { +bool oled_task_user(void) { switch (get_highest_layer(layer_state)) { case 0: render_rocket_logo(); @@ -265,5 +265,6 @@ void oled_task_user(void) { oled_write_ln_P(PSTR(" UND"), false); break; } + return false; } #endif diff --git a/keyboards/ungodly/launch_pad/rules.mk b/keyboards/ungodly/launch_pad/rules.mk index 47bfae5cbf6..fb7875dfa4e 100644 --- a/keyboards/ungodly/launch_pad/rules.mk +++ b/keyboards/ungodly/launch_pad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ungodly/nines/rules.mk b/keyboards/ungodly/nines/rules.mk index c88c1b43445..ed8f6b6ea48 100644 --- a/keyboards/ungodly/nines/rules.mk +++ b/keyboards/ungodly/nines/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h index fb9a8722994..feb2e32d570 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/config.h @@ -63,8 +63,10 @@ #define STM32_HSECLK 16000000 #define SOLENOID_PIN B5 +#define HAPTIC_ENABLE_PIN C13 #define SOLENOID_DEFAULT_DWELL 4 #define SOLENOID_MIN_DWELL 4 +#define HAPTIC_OFF_IN_LOW_POWER 1 #define NO_HAPTIC_MOD #define LED_NUM_LOCK_PIN C12 diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/overnumpad_1xb.c index c4229ef9973..cb5ec3dc124 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/overnumpad_1xb.c @@ -18,10 +18,6 @@ void keyboard_post_init_kb(void) { - // Solenoid enable: - setPinOutput(C13); - writePin(C13, 1); - //debug_enable=true; //debug_matrix=true; } diff --git a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk index 507f4fcd377..323a834c533 100644 --- a/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_post_2013/overnumpad_1xb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key. +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h index fb9a8722994..feb2e32d570 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/config.h @@ -63,8 +63,10 @@ #define STM32_HSECLK 16000000 #define SOLENOID_PIN B5 +#define HAPTIC_ENABLE_PIN C13 #define SOLENOID_DEFAULT_DWELL 4 #define SOLENOID_MIN_DWELL 4 +#define HAPTIC_OFF_IN_LOW_POWER 1 #define NO_HAPTIC_MOD #define LED_NUM_LOCK_PIN C12 diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/overnumpad_1xb.c index c4229ef9973..cb5ec3dc124 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/overnumpad_1xb.c @@ -18,10 +18,6 @@ void keyboard_post_init_kb(void) { - // Solenoid enable: - setPinOutput(C13); - writePin(C13, 1); - //debug_enable=true; //debug_matrix=true; } diff --git a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk index 30eb89bb7e5..2e6453ccdfe 100644 --- a/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/classic_ultracl_pre_2013/overnumpad_1xb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key. +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,5 +22,7 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID + LAYOUTS = fullsize_ansi fullsize_iso diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h index bfb1a9cf687..597d287b077 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/config.h @@ -63,8 +63,10 @@ #define STM32_HSECLK 16000000 #define SOLENOID_PIN B5 +#define HAPTIC_ENABLE_PIN C13 #define SOLENOID_DEFAULT_DWELL 4 #define SOLENOID_MIN_DWELL 4 +#define HAPTIC_OFF_IN_LOW_POWER 1 #define NO_HAPTIC_MOD #define LED_CAPS_LOCK_PIN C12 diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c index 41f51b7575e..eda367804d0 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,9 +23,6 @@ void keyboard_post_init_kb(void) setPinOutput(C11); // middle led, always off on Spacesaver M writePin(C11, 0); setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer - // Solenoid enable: - setPinOutput(C13); - writePin(C13, 1); //debug_enable=true; //debug_matrix=true; diff --git a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk index 507f4fcd377..323a834c533 100644 --- a/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_post_2013/overnumpad_1xb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key. +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h index f3ce89431e7..7bd5b224dff 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/config.h @@ -64,8 +64,10 @@ #define STM32_HSECLK 16000000 #define SOLENOID_PIN B5 +#define HAPTIC_ENABLE_PIN C13 #define SOLENOID_DEFAULT_DWELL 4 #define SOLENOID_MIN_DWELL 4 +#define HAPTIC_OFF_IN_LOW_POWER 1 #define NO_HAPTIC_MOD #define LED_CAPS_LOCK_PIN C12 diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c index 5d91eae20e6..b7e3fd9632e 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/overnumpad_1xb.c @@ -23,9 +23,6 @@ void keyboard_post_init_kb(void) setPinOutput(C11); // middle led, always off on Spacesaver M writePin(C11, 0); setPinOutput(C10); // right-most led, normally Scroll Lock, but on Spacesaver M indicates function layer - // Solenoid enable: - setPinOutput(C13); - writePin(C13, 1); //debug_enable=true; //debug_matrix=true; diff --git a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk index 507f4fcd377..323a834c533 100644 --- a/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk +++ b/keyboards/unicomp/spacesaver_m_pre_2013/overnumpad_1xb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Enter bootloader mode when holding the ESC key. +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -22,4 +22,5 @@ ENCODER_ENABLE = no # Enable rotary encoder support AUDIO_ENABLE = no # Audio output KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID diff --git a/keyboards/unison/keymaps/via/rules.mk b/keyboards/unison/keymaps/via/rules.mk index e452e833508..a5832e84aee 100644 --- a/keyboards/unison/keymaps/via/rules.mk +++ b/keyboards/unison/keymaps/via/rules.mk @@ -1,5 +1,5 @@ MOUSEKEY_ENABLE = yes AUDIO_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite VIA_ENABLE = yes diff --git a/keyboards/uno/rules.mk b/keyboards/uno/rules.mk index ba2ecf38c30..6a63c958d34 100644 --- a/keyboards/uno/rules.mk +++ b/keyboards/uno/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ut472/rules.mk b/keyboards/ut472/rules.mk index 23a07300526..1629e401889 100644 --- a/keyboards/ut472/rules.mk +++ b/keyboards/ut472/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/utd80/rules.mk b/keyboards/utd80/rules.mk index dff8d21f97b..c8629bd704b 100644 --- a/keyboards/utd80/rules.mk +++ b/keyboards/utd80/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/uzu42/keymaps/default/keymap.c b/keyboards/uzu42/keymaps/default/keymap.c index 54b944b2445..fbed8b0638f 100644 --- a/keyboards/uzu42/keymaps/default/keymap.c +++ b/keyboards/uzu42/keymaps/default/keymap.c @@ -197,7 +197,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return rotation; } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here oled_write_ln(read_layer_state(), false); @@ -209,6 +209,7 @@ void oled_task_user(void) { } else { oled_write(read_logo(), false); } + return false; } #endif // OLED_ENABLE diff --git a/keyboards/v4n4g0rth0n/v1/rules.mk b/keyboards/v4n4g0rth0n/v1/rules.mk index 3664c9aa978..62be7cc1577 100644 --- a/keyboards/v4n4g0rth0n/v1/rules.mk +++ b/keyboards/v4n4g0rth0n/v1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/v4n4g0rth0n/v2/rules.mk b/keyboards/v4n4g0rth0n/v2/rules.mk index 2581e2f39ec..b0b6b8602bd 100644 --- a/keyboards/v4n4g0rth0n/v2/rules.mk +++ b/keyboards/v4n4g0rth0n/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/vagrant_10/rules.mk b/keyboards/vagrant_10/rules.mk index 4411195da2a..9578124554c 100755 --- a/keyboards/vagrant_10/rules.mk +++ b/keyboards/vagrant_10/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/viktus/sp111/rules.mk b/keyboards/viktus/sp111/rules.mk index 7036a99cee1..3c125ed779b 100644 --- a/keyboards/viktus/sp111/rules.mk +++ b/keyboards/viktus/sp111/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/viktus/sp_mini/keymaps/via/rules.mk b/keyboards/viktus/sp_mini/keymaps/via/rules.mk index 16d33cd89fe..36b7ba9cbc9 100644 --- a/keyboards/viktus/sp_mini/keymaps/via/rules.mk +++ b/keyboards/viktus/sp_mini/keymaps/via/rules.mk @@ -1,2 +1,2 @@ VIA_ENABLE = yes - +LTO_ENABLE = yes diff --git a/keyboards/viktus/sp_mini/rules.mk b/keyboards/viktus/sp_mini/rules.mk index 440763ab305..6fb8723aefa 100644 --- a/keyboards/viktus/sp_mini/rules.mk +++ b/keyboards/viktus/sp_mini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/viktus/styrka/rules.mk b/keyboards/viktus/styrka/rules.mk index 1209331901e..22f971288e2 100644 --- a/keyboards/viktus/styrka/rules.mk +++ b/keyboards/viktus/styrka/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/vn66/rules.mk b/keyboards/vn66/rules.mk index 93397c93bd2..671ad04e1c8 100644 --- a/keyboards/vn66/rules.mk +++ b/keyboards/vn66/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/waldo/keymaps/default_split_shft_bck/config.h b/keyboards/waldo/keymaps/default_split_shft_bck/config.h deleted file mode 100644 index 19a485296eb..00000000000 --- a/keyboards/waldo/keymaps/default_split_shft_bck/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - - -#endif diff --git a/keyboards/waldo/rules.mk b/keyboards/waldo/rules.mk index 2a1bb2cab7f..6a802bea0fe 100644 --- a/keyboards/waldo/rules.mk +++ b/keyboards/waldo/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/walletburner/cajal/rules.mk b/keyboards/walletburner/cajal/rules.mk index 58ae98074cb..de783b3bd20 100644 --- a/keyboards/walletburner/cajal/rules.mk +++ b/keyboards/walletburner/cajal/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/walletburner/neuron/rules.mk b/keyboards/walletburner/neuron/rules.mk index cd13b1bc52b..855e36c3dd2 100644 --- a/keyboards/walletburner/neuron/rules.mk +++ b/keyboards/walletburner/neuron/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wekey/we27/config.h b/keyboards/wekey/we27/config.h index 332b476a4df..851e85aabbb 100644 --- a/keyboards/wekey/we27/config.h +++ b/keyboards/wekey/we27/config.h @@ -66,56 +66,68 @@ along with this program. If not, see . #define RGB_MATRIX_STARTUP_SPD 127 // Sets the default animation speed, if none has been set #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR // Sets the default mode, if none has been set -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT // * -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // * -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_HUE_BREATHING -#define DISABLE_RGB_MATRIX_HUE_PENDULUM -#define DISABLE_RGB_MATRIX_HUE_WAVE -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +// # define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// # define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +// # define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +// # define ENABLE_RGB_MATRIX_CYCLE_ALL +// # define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// # define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +// # define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +// # define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +// # define ENABLE_RGB_MATRIX_DUAL_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_BEACON +// # define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// # define ENABLE_RGB_MATRIX_RAINDROPS +// # define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +// # define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif #ifdef ENCODER_ENABLE #define ENCODERS_PAD_A { D3 } -#define ENCODERS_PAD_B { D2 } -#define ENCODER_RESOLUTION 2 - -#define ENCODERS 1 -#define ENCODERS_CW_KEY { { 4, 5 } } +# define ENCODERS_PAD_B \ + { D2 } +# define ENCODER_RESOLUTION 2 + +# define ENCODERS 1 +# define ENCODERS_CW_KEY \ + { \ + { 4, 5 } \ + } #define ENCODERS_CCW_KEY { { 4, 3 } } #endif diff --git a/keyboards/wekey/we27/rules.mk b/keyboards/wekey/we27/rules.mk index eab090252e1..4ba0911ec6b 100644 --- a/keyboards/wekey/we27/rules.mk +++ b/keyboards/wekey/we27/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/westfoxtrot/aanzee/aanzee.h b/keyboards/westfoxtrot/aanzee/aanzee.h index aa1b9165606..1cfa1784fb9 100644 --- a/keyboards/westfoxtrot/aanzee/aanzee.h +++ b/keyboards/westfoxtrot/aanzee/aanzee.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef AANZEE_H -#define AANZEE_H + +#pragma once #define ___ KC_NO @@ -28,38 +28,33 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -// readability - #define LAYOUT_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ -) \ -{ \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, ___}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, ___, K2D, K2E, ___}, \ - {K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0F, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, ___ }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, ___, k2D, k2E, ___ }, \ + { k30, ___, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4A, ___, k4C, k4D, k4E, ___ } \ } + #define LAYOUT_iso( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K49, K4A, K4C, K4D, K4E \ -) \ -{ \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, ___}, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___, K1E, ___}, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, ___}, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ - {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, ___, K4C, K4D, K4E, ___} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, ___ }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, ___, k1E, ___ }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, ___ }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, ___ }, \ + { k40, k41, k42, ___, ___, ___, k46, ___, ___, k49, k4A, ___, k4C, k4D, k4E, ___ } \ } void matrix_init_user(void); void matrix_scan_user(void); - -#endif diff --git a/keyboards/westfoxtrot/cyclops/cyclops.h b/keyboards/westfoxtrot/cyclops/cyclops.h index d82c56744cd..50744929de3 100644 --- a/keyboards/westfoxtrot/cyclops/cyclops.h +++ b/keyboards/westfoxtrot/cyclops/cyclops.h @@ -13,11 +13,13 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef CYCLOPS_H -#define CYCLOPS_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + /* This a shortcut to help you visually see your layout. * * The first section contains all of the arguments representing the physical @@ -27,17 +29,15 @@ * represents the switch matrix. */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K4D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4E, K2E \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k4D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k4A, k4B, k4C, k4E, k2E \ ) { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, KC_NO, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ - { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E }, \ + { k10, XXX, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, XXX, XXX, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/westfoxtrot/prophet/rules.mk b/keyboards/westfoxtrot/prophet/rules.mk index 85aad7bfdfe..668c6bdce6b 100644 --- a/keyboards/westfoxtrot/prophet/rules.mk +++ b/keyboards/westfoxtrot/prophet/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/whale/sk/v3/rules.mk b/keyboards/whale/sk/v3/rules.mk index 1d56cd54327..f29c2f1835e 100644 --- a/keyboards/whale/sk/v3/rules.mk +++ b/keyboards/whale/sk/v3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wheatfield/blocked65/rules.mk b/keyboards/wheatfield/blocked65/rules.mk index f0b84d209f3..4bc1dcf3124 100644 --- a/keyboards/wheatfield/blocked65/rules.mk +++ b/keyboards/wheatfield/blocked65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index 1cdac01d07b..d2b6639a306 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -72,9 +72,8 @@ along with this program. If not, see . #define I2C1_CLOCK_SPEED 400000 #define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 #define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 -#define I2C1_BANK GPIOB -#define I2C1_SCL 0 -#define I2C1_SDA 1 +#define I2C1_SCL_PIN B0 +#define I2C1_SDA_PIN B1 /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. * This is useful for the Windows task manager shortcut (ctrl+shift+esc). diff --git a/keyboards/whitefox/gfxconf.h b/keyboards/whitefox/gfxconf.h deleted file mode 100644 index ca338399d31..00000000000 --- a/keyboards/whitefox/gfxconf.h +++ /dev/null @@ -1,27 +0,0 @@ -/** - * This file has a different license to the rest of the uGFX system. - * You can copy, modify and distribute this file as you see fit. - * You do not need to publish your source modifications to this file. - * The only thing you are not permitted to do is to relicense it - * under a different license. - */ - -/** - * Copy this file into your project directory and rename it as gfxconf.h - * Edit your copy to turn on the uGFX features you want to use. - * The values below are the defaults. - * - * Only remove the comments from lines where you want to change the - * default value. This allows definitions to be included from - * driver makefiles when required and provides the best future - * compatibility for your project. - * - * Please use spaces instead of tabs in this file. - */ - -#ifndef _GFXCONF_H -#define _GFXCONF_H - -#include "common_gfxconf.h" - -#endif /* _GFXCONF_H */ diff --git a/keyboards/whitefox/keymaps/konstantin/rules.mk b/keyboards/whitefox/keymaps/konstantin/rules.mk index afdeb979e8f..db238f1d04e 100644 --- a/keyboards/whitefox/keymaps/konstantin/rules.mk +++ b/keyboards/whitefox/keymaps/konstantin/rules.mk @@ -1,5 +1,5 @@ # Generic features -BOOTMAGIC_ENABLE = yes +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = yes CONSOLE_ENABLE = yes EXTRAKEY_ENABLE = yes diff --git a/keyboards/whitefox/rules.mk b/keyboards/whitefox/rules.mk index c25f83f0ca6..6faf3e20c38 100644 --- a/keyboards/whitefox/rules.mk +++ b/keyboards/whitefox/rules.mk @@ -14,7 +14,7 @@ BOARD = IC_TEENSY_3_1 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/whitefox/visualizer.c b/keyboards/whitefox/visualizer.c deleted file mode 100644 index 3846e927896..00000000000 --- a/keyboards/whitefox/visualizer.c +++ /dev/null @@ -1,54 +0,0 @@ -/* 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 . - */ - -#include "visualizer.h" -#include "visualizer_keyframes.h" -#include "default_animations.h" - -static bool initial_update = true; - -// Feel free to modify the animations below, or even add new ones if needed - -void initialize_user_visualizer(visualizer_state_t *state) { - // The brightness will be dynamically adjustable in the future - // But for now, change it here. - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} - -void update_user_visualizer_state(visualizer_state_t *state, visualizer_keyboard_status_t *prev_status) { - // Add more tests, change the colors and layer texts here - // Usually you want to check the high bits (higher layers first) - // because that's the order layers are processed for keypresses - // You can for check for example: - // state->status.layer - // state->status.default_layer - // state->status.leds (see led.h for available statuses) - - if (initial_update) { - initial_update = false; - start_keyframe_animation(&led_test_animation); - } -} - -void user_visualizer_suspend(visualizer_state_t *state) { - start_keyframe_animation(&default_suspend_animation); -} - -void user_visualizer_resume(visualizer_state_t *state) { - initial_update = true; - start_keyframe_animation(&default_startup_animation); -} diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c index b17af15127c..99c59f7732a 100644 --- a/keyboards/whitefox/whitefox.c +++ b/keyboards/whitefox/whitefox.c @@ -18,7 +18,7 @@ along with this program. If not, see . #include "whitefox.h" #ifdef LED_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { // The numbers in the comments are the led numbers DXX on the PCB /* Refer to IS31 manual for these locations * driver diff --git a/keyboards/wilba_tech/rama_works_kara/rules.mk b/keyboards/wilba_tech/rama_works_kara/rules.mk index cb282937586..920708f8b21 100644 --- a/keyboards/wilba_tech/rama_works_kara/rules.mk +++ b/keyboards/wilba_tech/rama_works_kara/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_koyu/rules.mk b/keyboards/wilba_tech/rama_works_koyu/rules.mk index 803847b53c9..74531d864ef 100644 --- a/keyboards/wilba_tech/rama_works_koyu/rules.mk +++ b/keyboards/wilba_tech/rama_works_koyu/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h index d55ad598cad..c23a4d003cf 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h +++ b/keyboards/wilba_tech/rama_works_m10_b/rama_works_m10_b.h @@ -13,17 +13,18 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "quantum.h" +#pragma once -#ifndef RAMA_M10_B_H -#define RAMA_M10_B_H +#include "quantum.h" // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 ) \ - { \ - {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \ - } -#endif // RAMA_M10_B +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05, \ + k06, k07, k08, \ + k09 \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 } \ +} diff --git a/keyboards/wilba_tech/rama_works_m10_b/rules.mk b/keyboards/wilba_tech/rama_works_m10_b/rules.mk index 0bedbef4539..2eb8c5dbde3 100644 --- a/keyboards/wilba_tech/rama_works_m10_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m10_c/rules.mk b/keyboards/wilba_tech/rama_works_m10_c/rules.mk index 24d780ca3b5..c98d93e6239 100644 --- a/keyboards/wilba_tech/rama_works_m10_c/rules.mk +++ b/keyboards/wilba_tech/rama_works_m10_c/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m50_a/rules.mk b/keyboards/wilba_tech/rama_works_m50_a/rules.mk index 24d780ca3b5..c98d93e6239 100644 --- a/keyboards/wilba_tech/rama_works_m50_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m50_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m50_ax/rules.mk b/keyboards/wilba_tech/rama_works_m50_ax/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/rama_works_m50_ax/rules.mk +++ b/keyboards/wilba_tech/rama_works_m50_ax/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m60_a/rules.mk b/keyboards/wilba_tech/rama_works_m60_a/rules.mk index c75ab4e04f0..d788e14e2b6 100644 --- a/keyboards/wilba_tech/rama_works_m60_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m60_a/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m65_b/rules.mk b/keyboards/wilba_tech/rama_works_m65_b/rules.mk index 24d780ca3b5..c98d93e6239 100644 --- a/keyboards/wilba_tech/rama_works_m65_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m65_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk index 24d780ca3b5..c98d93e6239 100644 --- a/keyboards/wilba_tech/rama_works_m65_bx/rules.mk +++ b/keyboards/wilba_tech/rama_works_m65_bx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h index d3c7bad3323..0a38581450c 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h +++ b/keyboards/wilba_tech/rama_works_m6_a/rama_works_m6_a.h @@ -13,17 +13,17 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "quantum.h" -#ifndef RAMA_M6_A_H -#define RAMA_M6_A_H +#pragma once + +#include "quantum.h" // This a shortcut to help you visually see your layout. // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05) \ - { \ - {K00, K01, K02, K03, K04, K05}, \ - } -#endif // RAMA_M6_A +#define LAYOUT( \ + k00, k01, k02, \ + k03, k04, k05 \ +) { \ + { k00, k01, k02, k03, k04, k05 } \ +} diff --git a/keyboards/wilba_tech/rama_works_m6_a/rules.mk b/keyboards/wilba_tech/rama_works_m6_a/rules.mk index 446bf71d476..b2c38b0dcb7 100644 --- a/keyboards/wilba_tech/rama_works_m6_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_a/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_m6_b/rules.mk b/keyboards/wilba_tech/rama_works_m6_b/rules.mk index d0d63b3dfcf..79a0d3f8f69 100644 --- a/keyboards/wilba_tech/rama_works_m6_b/rules.mk +++ b/keyboards/wilba_tech/rama_works_m6_b/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/rama_works_u80_a/rules.mk b/keyboards/wilba_tech/rama_works_u80_a/rules.mk index ceedde0d4e9..459738b96a2 100644 --- a/keyboards/wilba_tech/rama_works_u80_a/rules.mk +++ b/keyboards/wilba_tech/rama_works_u80_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_b/rules.mk b/keyboards/wilba_tech/wt60_b/rules.mk index 252739a1a43..7aa382d9ba2 100644 --- a/keyboards/wilba_tech/wt60_b/rules.mk +++ b/keyboards/wilba_tech/wt60_b/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_bx/rules.mk b/keyboards/wilba_tech/wt60_bx/rules.mk index 252739a1a43..7aa382d9ba2 100644 --- a/keyboards/wilba_tech/wt60_bx/rules.mk +++ b/keyboards/wilba_tech/wt60_bx/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_c/rules.mk b/keyboards/wilba_tech/wt60_c/rules.mk index 252739a1a43..7aa382d9ba2 100644 --- a/keyboards/wilba_tech/wt60_c/rules.mk +++ b/keyboards/wilba_tech/wt60_c/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_d/rules.mk b/keyboards/wilba_tech/wt60_d/rules.mk index 0bedbef4539..2eb8c5dbde3 100644 --- a/keyboards/wilba_tech/wt60_d/rules.mk +++ b/keyboards/wilba_tech/wt60_d/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_g/rules.mk b/keyboards/wilba_tech/wt60_g/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt60_g/rules.mk +++ b/keyboards/wilba_tech/wt60_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_g2/rules.mk b/keyboards/wilba_tech/wt60_g2/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt60_g2/rules.mk +++ b/keyboards/wilba_tech/wt60_g2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h1/rules.mk b/keyboards/wilba_tech/wt60_h1/rules.mk index 941525e8ed8..70d226937b2 100644 --- a/keyboards/wilba_tech/wt60_h1/rules.mk +++ b/keyboards/wilba_tech/wt60_h1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h2/rules.mk b/keyboards/wilba_tech/wt60_h2/rules.mk index 6a471b03e28..2eb93696592 100644 --- a/keyboards/wilba_tech/wt60_h2/rules.mk +++ b/keyboards/wilba_tech/wt60_h2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_h3/rules.mk b/keyboards/wilba_tech/wt60_h3/rules.mk index 6a471b03e28..2eb93696592 100644 --- a/keyboards/wilba_tech/wt60_h3/rules.mk +++ b/keyboards/wilba_tech/wt60_h3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt60_xt/rules.mk b/keyboards/wilba_tech/wt60_xt/rules.mk index dde7c27f425..19efed0ace1 100644 --- a/keyboards/wilba_tech/wt60_xt/rules.mk +++ b/keyboards/wilba_tech/wt60_xt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_b/rules.mk b/keyboards/wilba_tech/wt65_b/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt65_b/rules.mk +++ b/keyboards/wilba_tech/wt65_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_f/rules.mk b/keyboards/wilba_tech/wt65_f/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_f/rules.mk +++ b/keyboards/wilba_tech/wt65_f/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_fx/rules.mk b/keyboards/wilba_tech/wt65_fx/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_fx/rules.mk +++ b/keyboards/wilba_tech/wt65_fx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_g/rules.mk b/keyboards/wilba_tech/wt65_g/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_g/rules.mk +++ b/keyboards/wilba_tech/wt65_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_g2/rules.mk b/keyboards/wilba_tech/wt65_g2/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_g2/rules.mk +++ b/keyboards/wilba_tech/wt65_g2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_h1/rules.mk b/keyboards/wilba_tech/wt65_h1/rules.mk index 0f097b596a4..85e66958286 100644 --- a/keyboards/wilba_tech/wt65_h1/rules.mk +++ b/keyboards/wilba_tech/wt65_h1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_xt/rules.mk b/keyboards/wilba_tech/wt65_xt/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_xt/rules.mk +++ b/keyboards/wilba_tech/wt65_xt/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt65_xtx/rules.mk b/keyboards/wilba_tech/wt65_xtx/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt65_xtx/rules.mk +++ b/keyboards/wilba_tech/wt65_xtx/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt69_a/rules.mk b/keyboards/wilba_tech/wt69_a/rules.mk index c70f8cced6d..b0c316a58c5 100644 --- a/keyboards/wilba_tech/wt69_a/rules.mk +++ b/keyboards/wilba_tech/wt69_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt70_jb/rules.mk b/keyboards/wilba_tech/wt70_jb/rules.mk index 009828ee339..ddf73ecae94 100644 --- a/keyboards/wilba_tech/wt70_jb/rules.mk +++ b/keyboards/wilba_tech/wt70_jb/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt75_a/rules.mk +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt75_b/rules.mk b/keyboards/wilba_tech/wt75_b/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt75_b/rules.mk +++ b/keyboards/wilba_tech/wt75_b/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt75_c/rules.mk b/keyboards/wilba_tech/wt75_c/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt75_c/rules.mk +++ b/keyboards/wilba_tech/wt75_c/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 2c07cd045de..9a23a00faa1 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt80_bc/rules.mk b/keyboards/wilba_tech/wt80_bc/rules.mk index da542bd80d1..db5a3c88d6d 100644 --- a/keyboards/wilba_tech/wt80_bc/rules.mk +++ b/keyboards/wilba_tech/wt80_bc/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt80_g/rules.mk b/keyboards/wilba_tech/wt80_g/rules.mk index c5ba7adeeea..1f7b6c1a8d6 100644 --- a/keyboards/wilba_tech/wt80_g/rules.mk +++ b/keyboards/wilba_tech/wt80_g/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index c70f8cced6d..b0c316a58c5 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/wt_main.c b/keyboards/wilba_tech/wt_main.c index d5e136e06b7..a8ad795446d 100644 --- a/keyboards/wilba_tech/wt_main.c +++ b/keyboards/wilba_tech/wt_main.c @@ -27,7 +27,7 @@ #include "via.h" #ifndef VIA_ENABLE -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic #endif diff --git a/keyboards/wilba_tech/wt_mono_backlight.c b/keyboards/wilba_tech/wt_mono_backlight.c index 77cee34ca65..5e2fde810c0 100644 --- a/keyboards/wilba_tech/wt_mono_backlight.c +++ b/keyboards/wilba_tech/wt_mono_backlight.c @@ -24,7 +24,7 @@ #include "progmem.h" #include "quantum/color.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "via.h" // uses EEPROM address, lighting value IDs #define MONO_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) diff --git a/keyboards/wilba_tech/wt_rgb_backlight.c b/keyboards/wilba_tech/wt_rgb_backlight.c index 82b1fb2fb36..cc34a90c754 100644 --- a/keyboards/wilba_tech/wt_rgb_backlight.c +++ b/keyboards/wilba_tech/wt_rgb_backlight.c @@ -68,7 +68,7 @@ LED_TYPE g_ws2812_leds[WS2812_LED_TOTAL]; #include "progmem.h" #include "quantum/color.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "via.h" // uses EEPROM address, lighting value IDs #define RGB_BACKLIGHT_CONFIG_EEPROM_ADDR (VIA_EEPROM_CUSTOM_CONFIG_ADDR) @@ -158,7 +158,7 @@ uint32_t g_any_key_hit = 0; // ADDR_2 is not needed. it is here as a dummy #define ISSI_ADDR_1 0x50 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -239,7 +239,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x50 #define ISSI_ADDR_2 0x52 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -382,7 +382,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { // set to 0 for write, 1 for read (as per I2C protocol) #define ISSI_ADDR_1 0x74 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -414,7 +414,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_2 0x76 // 11101[10] <- SDA #define ISSI_ADDR_3 0x75 // 11101[01] <- SCL -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -541,7 +541,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x76 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -622,7 +622,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x77 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location @@ -709,7 +709,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_9, C3_10, C4_10}, // LB1 {0, C1_10, C2_10, C4_11}, // LB2 {0, C1_11, C2_11, C3_11}, // LB3 @@ -729,7 +729,7 @@ const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { #define ISSI_ADDR_1 0x74 #define ISSI_ADDR_2 0x76 -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk index 1fa405e784a..0158bb397a9 100644 --- a/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk +++ b/keyboards/wilba_tech/zeal60/keymaps/sethBarberee/rules.mk @@ -1,2 +1,2 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite VIA_ENABLE = yes diff --git a/keyboards/wilba_tech/zeal60/rules.mk b/keyboards/wilba_tech/zeal60/rules.mk index 1c385162e51..a8e880eac2c 100644 --- a/keyboards/wilba_tech/zeal60/rules.mk +++ b/keyboards/wilba_tech/zeal60/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wilba_tech/zeal65/rules.mk b/keyboards/wilba_tech/zeal65/rules.mk index 846c2d131e7..6569c24fed0 100644 --- a/keyboards/wilba_tech/zeal65/rules.mk +++ b/keyboards/wilba_tech/zeal65/rules.mk @@ -13,7 +13,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wings42/rules.mk b/keyboards/wings42/rules.mk index cbe5beea619..d607ffb581c 100644 --- a/keyboards/wings42/rules.mk +++ b/keyboards/wings42/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/winkeyless/b87/b87.c b/keyboards/winkeyless/b87/b87.c new file mode 100644 index 00000000000..46c5ad2bf06 --- /dev/null +++ b/keyboards/winkeyless/b87/b87.c @@ -0,0 +1,19 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +// not much here + +#include "b87.h" diff --git a/keyboards/winkeyless/b87/b87.h b/keyboards/winkeyless/b87/b87.h new file mode 100644 index 00000000000..27ece385754 --- /dev/null +++ b/keyboards/winkeyless/b87/b87.h @@ -0,0 +1,40 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +#define ___ KC_NO + + +#define LAYOUT_all( \ + K00, K02, K03, K04, K05, K60, K66, K76, K70, K07, K08, K09, K0A, K49, K4A, K3A, \ + K10, K11, K12, K13, K14, K15, K61, K67, K77, K71, K16, K17, K18, K19, K1A, K59, K5A, K7B, \ + K20, K21, K22, K23, K24, K25, K62, K68, K78, K72, K26, K27, K28, K29, K7E, K7D, K7C, \ + K30, K31, K32, K33, K34, K35, K63, K69, K79, K73, K36, K37, K38, K39, \ + K40, K53, K41, K42, K43, K44, K45, K64, K6A, K7A, K74, K46, K47, K48, K6C, \ + K50, K51, K52, K65, K75, K56, K57, K58, K6E, K6D, K6B \ +){ \ + {K00, ___, K02, K03, K04, K05, ___, K07, K08, K09, K0A, ___, ___, ___, ___}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, ___, ___, ___, ___}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, ___, ___, ___, ___, ___}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, ___, ___, ___, ___}, \ + {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, ___, ___, ___, ___}, \ + {K50, K51, K52, K53, ___, ___, K56, K57, K58, K59, K5A, ___, ___, ___, ___}, \ + {K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K6C, K6D, K6E}, \ + {K70, K71, K72, K73, K74, K75, K76, K77, K78, K79, K7A, K7B, K7C, K7D, K7E} \ +} diff --git a/keyboards/winkeyless/b87/config.h b/keyboards/winkeyless/b87/config.h new file mode 100644 index 00000000000..0598ee700b9 --- /dev/null +++ b/keyboards/winkeyless/b87/config.h @@ -0,0 +1,56 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor paramater */ +#define VENDOR_ID 0x20A0 // +#define PRODUCT_ID 0x0B87 // B87 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Winkeyless +#define PRODUCT B87 // QMK PORT + +/* Define Matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +/*Define Matrix Pins */ +#define MATRIX_ROW_PINS {B5, B4, B3, B2, B1, B0, B6, B7} +#define MATRIX_COL_PINS {A0, A1, A2, A3, A4, A5, C5, C4, C3, C2, D7, C6, C7, A7, A6} + +#define RGBLED_NUM 20 // Number of LEDs +// RGB effects +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN D4 +#define BACKLIGHT_LEVELS 3 + +#define LED_CAPS_LOCK_PIN D1 +#define LED_SCROLL_LOCK_PIN D6 diff --git a/keyboards/winkeyless/b87/info.json b/keyboards/winkeyless/b87/info.json new file mode 100644 index 00000000000..93721d70783 --- /dev/null +++ b/keyboards/winkeyless/b87/info.json @@ -0,0 +1,102 @@ +{ + "keyboard_name": "B87", + "url": "", + "maintainer": "qmk", + "layouts": { + "LAYOUT_all": { + "layout": [ + { "label": "Esc", "x": 0, "y": 0 }, + { "label": "F1", "x": 2, "y": 0 }, + { "label": "F2", "x": 3, "y": 0 }, + { "label": "F3", "x": 4, "y": 0 }, + { "label": "F4", "x": 5, "y": 0 }, + { "label": "F5", "x": 6.5, "y": 0 }, + { "label": "F6", "x": 7.5, "y": 0 }, + { "label": "F7", "x": 8.5, "y": 0 }, + { "label": "F8", "x": 9.5, "y": 0 }, + { "label": "F9", "x": 11, "y": 0 }, + { "label": "F10", "x": 12, "y": 0 }, + { "label": "F11", "x": 13, "y": 0 }, + { "label": "F12", "x": 14, "y": 0 }, + { "label": "PrtSc", "x": 15.25, "y": 0 }, + { "label": "Scroll Lock", "x": 16.25, "y": 0 }, + { "label": "Pause", "x": 17.25, "y": 0 }, + { "label": "~", "x": 0, "y": 1.25 }, + { "label": "!", "x": 1, "y": 1.25 }, + { "label": "@", "x": 2, "y": 1.25 }, + { "label": "#", "x": 3, "y": 1.25 }, + { "label": "$", "x": 4, "y": 1.25 }, + { "label": "%", "x": 5, "y": 1.25 }, + { "label": "^", "x": 6, "y": 1.25 }, + { "label": "&", "x": 7, "y": 1.25 }, + { "label": "*", "x": 8, "y": 1.25 }, + { "label": "(", "x": 9, "y": 1.25 }, + { "label": ")", "x": 10, "y": 1.25 }, + { "label": "_", "x": 11, "y": 1.25 }, + { "label": "+", "x": 12, "y": 1.25 }, + { "x": 13, "y": 1.25 }, + { "label": "Bksp", "x": 14, "y": 1.25 }, + { "label": "Insert", "x": 15.25, "y": 1.25 }, + { "label": "Home", "x": 16.25, "y": 1.25 }, + { "label": "PgUp", "x": 17.25, "y": 1.25 }, + { "label": "Tab", "x": 0, "y": 2.25, "w": 1.5 }, + { "label": "Q", "x": 1.5, "y": 2.25 }, + { "label": "W", "x": 2.5, "y": 2.25 }, + { "label": "E", "x": 3.5, "y": 2.25 }, + { "label": "R", "x": 4.5, "y": 2.25 }, + { "label": "T", "x": 5.5, "y": 2.25 }, + { "label": "Y", "x": 6.5, "y": 2.25 }, + { "label": "U", "x": 7.5, "y": 2.25 }, + { "label": "I", "x": 8.5, "y": 2.25 }, + { "label": "O", "x": 9.5, "y": 2.25 }, + { "label": "P", "x": 10.5, "y": 2.25 }, + { "label": "{", "x": 11.5, "y": 2.25 }, + { "label": "}", "x": 12.5, "y": 2.25 }, + { "label": "|", "x": 13.5, "y": 2.25, "w": 1.5 }, + { "label": "Delete", "x": 15.25, "y": 2.25 }, + { "label": "End", "x": 16.25, "y": 2.25 }, + { "label": "PgDn", "x": 17.25, "y": 2.25 }, + { "label": "Caps Lock", "x": 0, "y": 3.25, "w": 1.75 }, + { "label": "A", "x": 1.75, "y": 3.25 }, + { "label": "S", "x": 2.75, "y": 3.25 }, + { "label": "D", "x": 3.75, "y": 3.25 }, + { "label": "F", "x": 4.75, "y": 3.25 }, + { "label": "G", "x": 5.75, "y": 3.25 }, + { "label": "H", "x": 6.75, "y": 3.25 }, + { "label": "J", "x": 7.75, "y": 3.25 }, + { "label": "K", "x": 8.75, "y": 3.25 }, + { "label": "L", "x": 9.75, "y": 3.25 }, + { "label": ":", "x": 10.75, "y": 3.25 }, + { "label": "\"", "x": 11.75, "y": 3.25 }, + { "x": 12.75, "y": 3.25 }, + { "label": "Enter", "x": 13.75, "y": 3.25, "w": 1.25 }, + { "label": "Shift", "x": 0, "y": 4.25, "w": 1.25 }, + { "x": 1.25, "y": 4.25 }, + { "label": "Z", "x": 2.25, "y": 4.25 }, + { "label": "X", "x": 3.25, "y": 4.25 }, + { "label": "C", "x": 4.25, "y": 4.25 }, + { "label": "V", "x": 5.25, "y": 4.25 }, + { "label": "B", "x": 6.25, "y": 4.25 }, + { "label": "N", "x": 7.25, "y": 4.25 }, + { "label": "M", "x": 8.25, "y": 4.25 }, + { "label": "<", "x": 9.25, "y": 4.25 }, + { "label": ">", "x": 10.25, "y": 4.25 }, + { "label": "?", "x": 11.25, "y": 4.25 }, + { "label": "Shift", "x": 12.25, "y": 4.25, "w": 1.75 }, + { "x": 14, "y": 4.25 }, + { "label": "\u2191", "x": 16.25, "y": 4.25 }, + { "label": "Ctrl", "x": 0, "y": 5.25, "w": 1.25 }, + { "label": "Win", "x": 1.25, "y": 5.25, "w": 1.25 }, + { "label": "Alt", "x": 2.5, "y": 5.25, "w": 1.25 }, + { "x": 3.75, "y": 5.25, "w": 6.25 }, + { "label": "Alt", "x": 10, "y": 5.25, "w": 1.25 }, + { "label": "Win", "x": 11.25, "y": 5.25, "w": 1.25 }, + { "label": "Menu", "x": 12.5, "y": 5.25, "w": 1.25 }, + { "label": "Ctrl", "x": 13.75, "y": 5.25, "w": 1.25 }, + { "label": "\u2190", "x": 15.25, "y": 5.25 }, + { "label": "\u2193", "x": 16.25, "y": 5.25 }, + { "label": "\u2192", "x": 17.25, "y": 5.25 } + ] + } + } +} diff --git a/keyboards/winkeyless/b87/keymaps/default/keymap.c b/keyboards/winkeyless/b87/keymaps/default/keymap.c new file mode 100644 index 00000000000..4b48b09fe85 --- /dev/null +++ b/keyboards/winkeyless/b87/keymaps/default/keymap.c @@ -0,0 +1,55 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +//base layer +[0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), +[3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; \ No newline at end of file diff --git a/keyboards/winkeyless/b87/keymaps/via/config.h b/keyboards/winkeyless/b87/keymaps/via/config.h new file mode 100644 index 00000000000..ce14d287499 --- /dev/null +++ b/keyboards/winkeyless/b87/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/winkeyless/b87/keymaps/via/keymap.c b/keyboards/winkeyless/b87/keymaps/via/keymap.c new file mode 100644 index 00000000000..2dc28901807 --- /dev/null +++ b/keyboards/winkeyless/b87/keymaps/via/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2021 Joah Nelson (Jels) + * + * 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +//base layer +[0] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + KC_TAB, 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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, + KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT +), +[1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +[2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +) +}; \ No newline at end of file diff --git a/keyboards/winkeyless/b87/keymaps/via/rules.mk b/keyboards/winkeyless/b87/keymaps/via/rules.mk new file mode 100644 index 00000000000..36b7ba9cbc9 --- /dev/null +++ b/keyboards/winkeyless/b87/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/winkeyless/b87/readme.md b/keyboards/winkeyless/b87/readme.md new file mode 100644 index 00000000000..ea617f7c895 --- /dev/null +++ b/keyboards/winkeyless/b87/readme.md @@ -0,0 +1,23 @@ +# B87 + +A TKL keyboard with RGB underglow. + +QMK Firmware is not the official firmware for the B.mini. + +* Keyboard Maintainer: QMK Community +* Hardware Supported: B87 PCB +* Hardware Availability: + +Make example for this keyboard (after setting up your build environment): + + make winkeyless/b87:default + +Flashing example for this keyboard ([after setting up the bootloadHID flashing environment](https://docs.qmk.fm/#/flashing_bootloadhid)) + + make winkeyless/b87:default:flash + +This firmware can also be flashed onto the KBDFans KBD75 Round 1 Bootmapper Client boards sold during the 2017 and early 2018 timeframe. + +**Reset Key**: Hold down the top left most key located at `K00`, commonly programmed as Escape while plugging in the keyboard. + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/winkeyless/b87/rules.mk b/keyboards/winkeyless/b87/rules.mk new file mode 100644 index 00000000000..95661748136 --- /dev/null +++ b/keyboards/winkeyless/b87/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32a + +# Bootloader selection +BOOTLOADER = bootloadhid + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +WS2812_DRIVER = i2c diff --git a/keyboards/winkeyless/bmini/rules.mk b/keyboards/winkeyless/bmini/rules.mk index af36151cccd..694ad609a25 100644 --- a/keyboards/winkeyless/bmini/rules.mk +++ b/keyboards/winkeyless/bmini/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/winkeyless/bminiex/rules.mk b/keyboards/winkeyless/bminiex/rules.mk index f10c10e85fb..f8743893fe7 100644 --- a/keyboards/winkeyless/bminiex/rules.mk +++ b/keyboards/winkeyless/bminiex/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h index bd8e3d075cc..b40c1207fef 100644 --- a/keyboards/work_louder/loop/config.h +++ b/keyboards/work_louder/loop/config.h @@ -94,6 +94,55 @@ along with this program. If not, see . #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/work_louder/loop/rules.mk b/keyboards/work_louder/loop/rules.mk index 135291a7e26..0069fba60c8 100644 --- a/keyboards/work_louder/loop/rules.mk +++ b/keyboards/work_louder/loop/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -24,5 +24,6 @@ LTO_ENABLE = yes RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 +LTO_ENABLE = yes SRC += rgb_functions.c diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h index 1a47e725bb8..ac12c871998 100644 --- a/keyboards/work_louder/nano/config.h +++ b/keyboards/work_louder/nano/config.h @@ -92,6 +92,55 @@ along with this program. If not, see . #define RGB_MATRIX_DISABLE_KEYCODES #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/work_louder/nano/rules.mk b/keyboards/work_louder/nano/rules.mk index a97f070422f..a731c09deca 100644 --- a/keyboards/work_louder/nano/rules.mk +++ b/keyboards/work_louder/nano/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h index fb9723db0b6..78444e744f8 100644 --- a/keyboards/work_louder/work_board/config.h +++ b/keyboards/work_louder/work_board/config.h @@ -83,6 +83,55 @@ along with this program. If not, see . #define RGB_MATRIX_DISABLE_KEYCODES #define RGB_DISABLE_WHEN_USB_SUSPENDED +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 diff --git a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk index 6a4558aa0e0..363f2d0edb5 100644 --- a/keyboards/work_louder/work_board/keymaps/drashna/rules.mk +++ b/keyboards/work_louder/work_board/keymaps/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite EXTRAKEY_ENABLE = yes TAP_DANCE_ENABLE = no NKRO_ENABLE = yes diff --git a/keyboards/work_louder/work_board/rules.mk b/keyboards/work_louder/work_board/rules.mk index a97f070422f..a731c09deca 100644 --- a/keyboards/work_louder/work_board/rules.mk +++ b/keyboards/work_louder/work_board/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/work_louder/work_board/work_board.c b/keyboards/work_louder/work_board/work_board.c index a2722a055a1..7a8edc1a9ea 100644 --- a/keyboards/work_louder/work_board/work_board.c +++ b/keyboards/work_louder/work_board/work_board.c @@ -34,9 +34,14 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { # ifdef RGB_MATRIX_ENABLE # error Cannot run OLED and Per Key RGB at the same time due to pin conflicts # endif -__attribute__((weak)) oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_90; } +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_90; +} -__attribute__((weak)) void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } oled_write_P(PSTR("LAYER"), false); oled_write_P(PSTR("Lower"), layer_state_is(3)); oled_write_P(PSTR("Raise"), layer_state_is(4)); @@ -70,6 +75,8 @@ __attribute__((weak)) void oled_task_user(void) { oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui); oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui); oled_write_P(PSTR(" NKRO"), keymap_config.nkro); + + return false; } #endif diff --git a/keyboards/wsk/alpha9/rules.mk b/keyboards/wsk/alpha9/rules.mk index 90c3141cf29..7cd5f80392d 100644 --- a/keyboards/wsk/alpha9/rules.mk +++ b/keyboards/wsk/alpha9/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/g4m3ralpha/rules.mk b/keyboards/wsk/g4m3ralpha/rules.mk index 90c3141cf29..7cd5f80392d 100644 --- a/keyboards/wsk/g4m3ralpha/rules.mk +++ b/keyboards/wsk/g4m3ralpha/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/houndstooth/rules.mk b/keyboards/wsk/houndstooth/rules.mk index fc6bef673f6..f114ee6a016 100644 --- a/keyboards/wsk/houndstooth/rules.mk +++ b/keyboards/wsk/houndstooth/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/kodachi50/rules.mk b/keyboards/wsk/kodachi50/rules.mk index 437fc01ecce..5ec96c6110e 100644 --- a/keyboards/wsk/kodachi50/rules.mk +++ b/keyboards/wsk/kodachi50/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/pain27/rules.mk b/keyboards/wsk/pain27/rules.mk index cb1b3044fd1..9c1964d2d28 100644 --- a/keyboards/wsk/pain27/rules.mk +++ b/keyboards/wsk/pain27/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/sl40/rules.mk b/keyboards/wsk/sl40/rules.mk index 437fc01ecce..5ec96c6110e 100644 --- a/keyboards/wsk/sl40/rules.mk +++ b/keyboards/wsk/sl40/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wsk/tkl30/rules.mk b/keyboards/wsk/tkl30/rules.mk index 4411195da2a..9578124554c 100644 --- a/keyboards/wsk/tkl30/rules.mk +++ b/keyboards/wsk/tkl30/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wuque/ikki68/rules.mk b/keyboards/wuque/ikki68/rules.mk index 42b9a840772..0aa1c579123 100644 --- a/keyboards/wuque/ikki68/rules.mk +++ b/keyboards/wuque/ikki68/rules.mk @@ -9,7 +9,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wuque/ikki68_aurora/rules.mk b/keyboards/wuque/ikki68_aurora/rules.mk index 52e1608e826..f4bf6bce632 100644 --- a/keyboards/wuque/ikki68_aurora/rules.mk +++ b/keyboards/wuque/ikki68_aurora/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/wuque/mammoth20x/rules.mk b/keyboards/wuque/mammoth20x/rules.mk index cba836c456d..ebe3ad24c00 100644 --- a/keyboards/wuque/mammoth20x/rules.mk +++ b/keyboards/wuque/mammoth20x/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/wuque/serneity65/rules.mk b/keyboards/wuque/serneity65/rules.mk index 7aaba81e469..3d3efcd480a 100644 --- a/keyboards/wuque/serneity65/rules.mk +++ b/keyboards/wuque/serneity65/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/x16/rules.mk b/keyboards/x16/rules.mk index dc7d341bbb2..5f180ae00de 100644 --- a/keyboards/x16/rules.mk +++ b/keyboards/x16/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/knight/config.h b/keyboards/xbows/knight/config.h index 1c89b83ecfc..dfd477cbc92 100644 --- a/keyboards/xbows/knight/config.h +++ b/keyboards/xbows/knight/config.h @@ -44,6 +44,55 @@ # define RGB_MATRIX_CENTER \ { 92, 33 } +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 # define DRIVER_ADDR_3 0b1110101 diff --git a/keyboards/xbows/knight/keymaps/default/config.h b/keyboards/xbows/knight/keymaps/default/config.h index 22a7112f8cc..fcd14ee048e 100644 --- a/keyboards/xbows/knight/keymaps/default/config.h +++ b/keyboards/xbows/knight/keymaps/default/config.h @@ -17,34 +17,27 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set +# undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/knight/keymaps/via/config.h b/keyboards/xbows/knight/keymaps/via/config.h index aa5e4c1cd20..cf06e7d07db 100644 --- a/keyboards/xbows/knight/keymaps/via/config.h +++ b/keyboards/xbows/knight/keymaps/via/config.h @@ -17,48 +17,47 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -//# define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -//# define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -//# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -//# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -//# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -//# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +//# undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +//# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +//# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +//# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +//# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +//# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/knight/knight.c b/keyboards/xbows/knight/knight.c index 539ecb653e1..8c2fd9dfa20 100644 --- a/keyboards/xbows/knight/knight.c +++ b/keyboards/xbows/knight/knight.c @@ -15,7 +15,7 @@ */ #include "knight.h" #ifdef RGB_MATRIX_ENABLE - const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/knight/rules.mk b/keyboards/xbows/knight/rules.mk index 2ec14e40573..54153743538 100644 --- a/keyboards/xbows/knight/rules.mk +++ b/keyboards/xbows/knight/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/knight_plus/config.h b/keyboards/xbows/knight_plus/config.h index 5282476b4f1..ee71bb6baff 100644 --- a/keyboards/xbows/knight_plus/config.h +++ b/keyboards/xbows/knight_plus/config.h @@ -44,6 +44,55 @@ # define RGB_MATRIX_CENTER \ { 92, 43 } +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 # define DRIVER_ADDR_3 0b1110101 diff --git a/keyboards/xbows/knight_plus/keymaps/default/config.h b/keyboards/xbows/knight_plus/keymaps/default/config.h index 22a7112f8cc..fcd14ee048e 100644 --- a/keyboards/xbows/knight_plus/keymaps/default/config.h +++ b/keyboards/xbows/knight_plus/keymaps/default/config.h @@ -17,34 +17,27 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set +# undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/knight_plus/keymaps/via/config.h b/keyboards/xbows/knight_plus/keymaps/via/config.h index aa5e4c1cd20..cf06e7d07db 100644 --- a/keyboards/xbows/knight_plus/keymaps/via/config.h +++ b/keyboards/xbows/knight_plus/keymaps/via/config.h @@ -17,48 +17,47 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -//# define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -//# define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -//# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -//# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -//# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -//# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +//# undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +//# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +//# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +//# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +//# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +//# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/knight_plus/knight_plus.c b/keyboards/xbows/knight_plus/knight_plus.c index c5dd1a5fd61..ede23dc63d9 100644 --- a/keyboards/xbows/knight_plus/knight_plus.c +++ b/keyboards/xbows/knight_plus/knight_plus.c @@ -15,7 +15,7 @@ */ #include "knight_plus.h" #ifdef RGB_MATRIX_ENABLE - const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/knight_plus/rules.mk b/keyboards/xbows/knight_plus/rules.mk index 2ec14e40573..54153743538 100644 --- a/keyboards/xbows/knight_plus/rules.mk +++ b/keyboards/xbows/knight_plus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/nature/config.h b/keyboards/xbows/nature/config.h index 2c886533bbc..922e479a500 100644 --- a/keyboards/xbows/nature/config.h +++ b/keyboards/xbows/nature/config.h @@ -39,40 +39,61 @@ # define RGB_MATRIX_LED_FLUSH_LIMIT 16 # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# define RGB_MATRIX_KEYPRESSES +// # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_CENTER \ { 92, 33 } # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # define ENABLE_RGB_MATRIX_HUE_BREATHING +// # define ENABLE_RGB_MATRIX_HUE_PENDULUM +// # define ENABLE_RGB_MATRIX_HUE_WAVE +// # define ENABLE_RGB_MATRIX_PIXEL_RAIN +// # define ENABLE_RGB_MATRIX_PIXEL_FLOW +// # define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110110 diff --git a/keyboards/xbows/nature/nature.c b/keyboards/xbows/nature/nature.c index b7b10d5abbb..80d695fecf8 100644 --- a/keyboards/xbows/nature/nature.c +++ b/keyboards/xbows/nature/nature.c @@ -15,7 +15,7 @@ */ #include "nature.h" #ifdef RGB_MATRIX_ENABLE - const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C1_3, C2_3, C3_3}, // L01 {0, C1_4, C2_4, C3_4}, // L02 diff --git a/keyboards/xbows/nature/rules.mk b/keyboards/xbows/nature/rules.mk index c3b73b76602..b0cb8fcb617 100644 --- a/keyboards/xbows/nature/rules.mk +++ b/keyboards/xbows/nature/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/numpad/config.h b/keyboards/xbows/numpad/config.h index d3ef6ed9d12..59616eba3b8 100644 --- a/keyboards/xbows/numpad/config.h +++ b/keyboards/xbows/numpad/config.h @@ -44,8 +44,56 @@ # define RGB_MATRIX_CENTER \ { 30, 32 } +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1110111 # define DRIVER_COUNT 1 -# define DRIVER_1_LED_TOTAL 22 -# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL) +# define DRIVER_LED_TOTAL 22 #endif diff --git a/keyboards/xbows/numpad/keymaps/default/config.h b/keyboards/xbows/numpad/keymaps/default/config.h index 22a7112f8cc..3e3358e344d 100644 --- a/keyboards/xbows/numpad/keymaps/default/config.h +++ b/keyboards/xbows/numpad/keymaps/default/config.h @@ -15,36 +15,30 @@ */ #pragma once -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set + #ifdef RGB_MATRIX_ENABLE + # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/numpad/keymaps/via/config.h b/keyboards/xbows/numpad/keymaps/via/config.h index aa5e4c1cd20..cf06e7d07db 100644 --- a/keyboards/xbows/numpad/keymaps/via/config.h +++ b/keyboards/xbows/numpad/keymaps/via/config.h @@ -17,48 +17,47 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -//# define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -//# define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -//# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -//# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -//# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -//# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +//# undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +//# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +//# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +//# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +//# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +//# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/numpad/numpad.c b/keyboards/xbows/numpad/numpad.c index 8f25152e338..bbc2a1e98a2 100644 --- a/keyboards/xbows/numpad/numpad.c +++ b/keyboards/xbows/numpad/numpad.c @@ -15,7 +15,7 @@ */ #include "numpad.h" #ifdef RGB_MATRIX_ENABLE - const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { + const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C3_3, C2_3, C1_3}, // L01 {0, C3_4, C2_4, C1_4}, // L02 diff --git a/keyboards/xbows/numpad/rules.mk b/keyboards/xbows/numpad/rules.mk index 2ec14e40573..54153743538 100644 --- a/keyboards/xbows/numpad/rules.mk +++ b/keyboards/xbows/numpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/ranger/config.h b/keyboards/xbows/ranger/config.h index 7a67afd7dad..1447a26d032 100644 --- a/keyboards/xbows/ranger/config.h +++ b/keyboards/xbows/ranger/config.h @@ -42,6 +42,56 @@ # define RGB_MATRIX_KEYPRESSES # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 # define RGB_MATRIX_CENTER { 103, 32 } + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + # define DRIVER_ADDR_1 0b1110100 # define DRIVER_ADDR_2 0b1110101 # define DRIVER_ADDR_3 0b1110110 diff --git a/keyboards/xbows/ranger/keymaps/default/config.h b/keyboards/xbows/ranger/keymaps/default/config.h index 22a7112f8cc..2e662068f63 100644 --- a/keyboards/xbows/ranger/keymaps/default/config.h +++ b/keyboards/xbows/ranger/keymaps/default/config.h @@ -18,33 +18,27 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_SOLID_COLOR // Static single hue, no speed support +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +// # undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +// # undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/ranger/keymaps/via/config.h b/keyboards/xbows/ranger/keymaps/via/config.h index aa5e4c1cd20..cf06e7d07db 100644 --- a/keyboards/xbows/ranger/keymaps/via/config.h +++ b/keyboards/xbows/ranger/keymaps/via/config.h @@ -17,48 +17,47 @@ #ifdef RGB_MATRIX_ENABLE # define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT // Sets the default mode, if none has been set -# define DISABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes -//# define DISABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation -# define DISABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness -//# define DISABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient -//# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom -//# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard -# define DISABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard -//# define DISABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard -# define DISABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation -//# define DISABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back -# define DISABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left -//# define DISABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS // Static dual hue, speed is hue for secondary hue +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN // Static gradient top to bottom, speed controls how much gradient changes +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT // Static gradient left to right, speed controls how much gradient changes +//# undef ENABLE_RGB_MATRIX_BREATHING // Single hue brightness cycling animation +# undef ENABLE_RGB_MATRIX_BAND_SAT // Single hue band fading saturation scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_VAL // Single hue band fading brightness scrolling left to right +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT // Single hue 3 blade spinning pinwheel fades saturation +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL // Single hue 3 blade spinning pinwheel fades brightness +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT // Single hue spinning spiral fades saturation +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL // Single hue spinning spiral fades brightness +//# undef ENABLE_RGB_MATRIX_CYCLE_ALL // Full keyboard solid hue cycling through full gradient +//# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT // Full gradient scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom +//# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard +# undef ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard +//# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard +# undef ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation +//# undef ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left +//# undef ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation -# define DISABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! - -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out -//# define DISABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out -# define DISABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out -# define DISABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out -//# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN // That famous computer simulation +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP // How hot is your WPM! +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE // Pulses keys hit to hue & value then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out +//# undef ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out +# undef ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out +//# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out #endif diff --git a/keyboards/xbows/ranger/ranger.c b/keyboards/xbows/ranger/ranger.c index 618afbdbf29..9a09918967e 100644 --- a/keyboards/xbows/ranger/ranger.c +++ b/keyboards/xbows/ranger/ranger.c @@ -15,7 +15,7 @@ */ #include "ranger.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C3_3, C2_3, C1_3}, // L01 {0, C3_4, C2_4, C1_4}, // L02 diff --git a/keyboards/xbows/ranger/rules.mk b/keyboards/xbows/ranger/rules.mk index 7eb7792c925..27dc0951162 100644 --- a/keyboards/xbows/ranger/rules.mk +++ b/keyboards/xbows/ranger/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xbows/woody/config.h b/keyboards/xbows/woody/config.h index ea27508da83..9d04eb84c47 100644 --- a/keyboards/xbows/woody/config.h +++ b/keyboards/xbows/woody/config.h @@ -19,25 +19,60 @@ #define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended #define RGB_MATRIX_KEYPRESSES #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 -#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DRIVER_ADDR_1 0b1110100 -#define DRIVER_ADDR_2 0b1110110 -#define DRIVER_COUNT 2 -#define DRIVER_1_LED_TOTAL 35 -#define DRIVER_2_LED_TOTAL 32 -#define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +// # define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +// # define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +// # define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +// # define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +// # define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +// # define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +// # define ENABLE_RGB_MATRIX_SPLASH +// # define ENABLE_RGB_MATRIX_MULTISPLASH +// # define ENABLE_RGB_MATRIX_SOLID_SPLASH +// # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define DRIVER_ADDR_1 0b1110100 +# define DRIVER_ADDR_2 0b1110110 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 35 +# define DRIVER_2_LED_TOTAL 32 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) #endif diff --git a/keyboards/xbows/woody/rules.mk b/keyboards/xbows/woody/rules.mk index 4e27783c80f..4161daf2b76 100644 --- a/keyboards/xbows/woody/rules.mk +++ b/keyboards/xbows/woody/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32u4 # Bootloader selection BOOTLOADER = atmel-dfu -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite BACKLIGHT_ENABLE = no MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/keyboards/xbows/woody/woody.c b/keyboards/xbows/woody/woody.c index 39d87442c64..41601d39a98 100644 --- a/keyboards/xbows/woody/woody.c +++ b/keyboards/xbows/woody/woody.c @@ -1,6 +1,6 @@ #include "woody.h" #ifdef RGB_MATRIX_ENABLE -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { {0, C8_8, C7_8, C6_8}, // LA17 {0, C9_8, C7_7, C6_7}, // LA16 diff --git a/keyboards/xelus/akis/rules.mk b/keyboards/xelus/akis/rules.mk index 84ce4080fc4..4802a533f17 100644 --- a/keyboards/xelus/akis/rules.mk +++ b/keyboards/xelus/akis/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/dawn60/rev1/rules.mk b/keyboards/xelus/dawn60/rev1/rules.mk index f82a270f440..caf6e44162c 100644 --- a/keyboards/xelus/dawn60/rev1/rules.mk +++ b/keyboards/xelus/dawn60/rev1/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/dawn60/rev1_qmk/config.h b/keyboards/xelus/dawn60/rev1_qmk/config.h index 07de129c0b5..67c88efb4ca 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/config.h +++ b/keyboards/xelus/dawn60/rev1_qmk/config.h @@ -71,3 +71,52 @@ // | ? | Shift | Fn | vs | Shift | Up | Fn | // `------------------' `-------------------' #define RGB_BACKLIGHT_USE_SPLIT_RIGHT_SHIFT 1 + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c index c6ddef09314..8b044ee4f6b 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c +++ b/keyboards/xelus/dawn60/rev1_qmk/rev1_qmk.c @@ -25,7 +25,7 @@ #ifdef RGB_MATRIX_ENABLE LED_TYPE rgb_matrix_ws2812_array[WS2812_LED_TOTAL]; -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/xelus/dawn60/rev1_qmk/rules.mk b/keyboards/xelus/dawn60/rev1_qmk/rules.mk index bfaea5f495e..94ebeb89cc0 100644 --- a/keyboards/xelus/dawn60/rev1_qmk/rules.mk +++ b/keyboards/xelus/dawn60/rev1_qmk/rules.mk @@ -12,7 +12,7 @@ OPT_DEFS += -DNO_SUSPEND_POWER_DOWN # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/dharma/rules.mk b/keyboards/xelus/dharma/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/xelus/dharma/rules.mk +++ b/keyboards/xelus/dharma/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/kangaroo/config.h b/keyboards/xelus/kangaroo/config.h index f6b17c24a37..1d746b342e0 100644 --- a/keyboards/xelus/kangaroo/config.h +++ b/keyboards/xelus/kangaroo/config.h @@ -43,8 +43,8 @@ #define LOCKING_RESYNC_ENABLE // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/xelus/kangaroo/rules.mk b/keyboards/xelus/kangaroo/rules.mk index bc2d3ce6dfe..35ee83cc362 100644 --- a/keyboards/xelus/kangaroo/rules.mk +++ b/keyboards/xelus/kangaroo/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/ninjin/rules.mk b/keyboards/xelus/ninjin/rules.mk index f979bc72df0..1afe6ec5576 100644 --- a/keyboards/xelus/ninjin/rules.mk +++ b/keyboards/xelus/ninjin/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/pachi/mini_32u4/rules.mk b/keyboards/xelus/pachi/mini_32u4/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/xelus/pachi/mini_32u4/rules.mk +++ b/keyboards/xelus/pachi/mini_32u4/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/pachi/rev1/rules.mk b/keyboards/xelus/pachi/rev1/rules.mk index 2b3cff3b52e..770d329cac2 100644 --- a/keyboards/xelus/pachi/rev1/rules.mk +++ b/keyboards/xelus/pachi/rev1/rules.mk @@ -10,7 +10,7 @@ OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/pachi/rgb/rev1/config.h b/keyboards/xelus/pachi/rgb/rev1/config.h index 276a128e0cc..66aab54276c 100644 --- a/keyboards/xelus/pachi/rgb/rev1/config.h +++ b/keyboards/xelus/pachi/rgb/rev1/config.h @@ -50,10 +50,10 @@ #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U -#define I2C1_TIMINGR_SCLDEL 11U +#define I2C1_TIMINGR_SCLDEL 7U #define I2C1_TIMINGR_SDADEL 0U -#define I2C1_TIMINGR_SCLH 14U -#define I2C1_TIMINGR_SCLL 42U +#define I2C1_TIMINGR_SCLH 45U +#define I2C1_TIMINGR_SCLL 149U // I2C EEPROM #define EEPROM_I2C_24LC64 diff --git a/keyboards/xelus/pachi/rgb/rev1/rev1.c b/keyboards/xelus/pachi/rgb/rev1/rev1.c index 74f46e68127..70742650094 100644 --- a/keyboards/xelus/pachi/rgb/rev1/rev1.c +++ b/keyboards/xelus/pachi/rgb/rev1/rev1.c @@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } #ifdef RGB_MATRIX_ENABLE #include "i2c_master.h" #include "drivers/led/issi/is31fl3741.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/xelus/pachi/rgb/rev1/rules.mk b/keyboards/xelus/pachi/rgb/rev1/rules.mk index 05eac7e9596..501060fbd1a 100644 --- a/keyboards/xelus/pachi/rgb/rev1/rules.mk +++ b/keyboards/xelus/pachi/rgb/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/pachi/rgb/rev2/config.h b/keyboards/xelus/pachi/rgb/rev2/config.h index f66afcfb795..46f22acb589 100644 --- a/keyboards/xelus/pachi/rgb/rev2/config.h +++ b/keyboards/xelus/pachi/rgb/rev2/config.h @@ -50,10 +50,10 @@ #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U -#define I2C1_TIMINGR_SCLDEL 11U +#define I2C1_TIMINGR_SCLDEL 7U #define I2C1_TIMINGR_SDADEL 0U -#define I2C1_TIMINGR_SCLH 14U -#define I2C1_TIMINGR_SCLL 42U +#define I2C1_TIMINGR_SCLH 45U +#define I2C1_TIMINGR_SCLL 149U // I2C EEPROM #define EEPROM_I2C_24LC64 diff --git a/keyboards/xelus/pachi/rgb/rev2/rev2.c b/keyboards/xelus/pachi/rgb/rev2/rev2.c index 3a2e7cacada..b8a7bc27308 100644 --- a/keyboards/xelus/pachi/rgb/rev2/rev2.c +++ b/keyboards/xelus/pachi/rgb/rev2/rev2.c @@ -22,7 +22,7 @@ void matrix_io_delay(void) { __asm__ volatile("nop\nnop\nnop\n"); } #ifdef RGB_MATRIX_ENABLE #include "i2c_master.h" #include "drivers/led/issi/is31fl3741.h" -const is31_led __flash g_is31_leds[DRIVER_LED_TOTAL] = { +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver * | R location diff --git a/keyboards/xelus/rs60/rules.mk b/keyboards/xelus/rs60/rules.mk index 4f877595321..7b919611d17 100644 --- a/keyboards/xelus/rs60/rules.mk +++ b/keyboards/xelus/rs60/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/snap96/rules.mk b/keyboards/xelus/snap96/rules.mk index 83626597d5e..d1f65972c2a 100644 --- a/keyboards/xelus/snap96/rules.mk +++ b/keyboards/xelus/snap96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/trinityxttkl/rules.mk b/keyboards/xelus/trinityxttkl/rules.mk index e6a55577a51..a9f13972890 100644 --- a/keyboards/xelus/trinityxttkl/rules.mk +++ b/keyboards/xelus/trinityxttkl/rules.mk @@ -11,7 +11,7 @@ DFU_SUFFIX_ARGS = -v FFFF -p FFFF # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xelus/valor/rev1/rules.mk b/keyboards/xelus/valor/rev1/rules.mk index 4b4bee5b890..383102c0c64 100644 --- a/keyboards/xelus/valor/rev1/rules.mk +++ b/keyboards/xelus/valor/rev1/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/valor/rev2/config.h b/keyboards/xelus/valor/rev2/config.h index 2ab581c7536..8201373d234 100644 --- a/keyboards/xelus/valor/rev2/config.h +++ b/keyboards/xelus/valor/rev2/config.h @@ -47,15 +47,15 @@ #define LOCKING_RESYNC_ENABLE // I2C setup -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 4 #define I2C1_SDA_PAL_MODE 4 #define I2C1_TIMINGR_PRESC 0U -#define I2C1_TIMINGR_SCLDEL 11U +#define I2C1_TIMINGR_SCLDEL 7U #define I2C1_TIMINGR_SDADEL 0U -#define I2C1_TIMINGR_SCLH 14U -#define I2C1_TIMINGR_SCLL 42U +#define I2C1_TIMINGR_SCLH 45U +#define I2C1_TIMINGR_SCLL 149U // I2C EEPROM #define EEPROM_I2C_24LC64 @@ -86,3 +86,52 @@ #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 #define RGB_DISABLE_WHEN_USB_SUSPENDED #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CUSTOM_test_mode + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/xelus/valor/rev2/rules.mk b/keyboards/xelus/valor/rev2/rules.mk index 59ad94b0873..ef41080c423 100644 --- a/keyboards/xelus/valor/rev2/rules.mk +++ b/keyboards/xelus/valor/rev2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xelus/valor_frl_tkl/config.h b/keyboards/xelus/valor_frl_tkl/config.h index 5319a95bae2..c1c08878c0f 100644 --- a/keyboards/xelus/valor_frl_tkl/config.h +++ b/keyboards/xelus/valor_frl_tkl/config.h @@ -47,8 +47,8 @@ #define LOCKING_RESYNC_ENABLE // I2C OLED defines -#define I2C1_SCL 8 -#define I2C1_SDA 9 +#define I2C1_SCL_PIN B8 +#define I2C1_SDA_PIN B9 #define I2C1_SCL_PAL_MODE 1 #define I2C1_SDA_PAL_MODE 1 diff --git a/keyboards/xelus/valor_frl_tkl/rules.mk b/keyboards/xelus/valor_frl_tkl/rules.mk index 8bf172a1f66..649d814696b 100644 --- a/keyboards/xelus/valor_frl_tkl/rules.mk +++ b/keyboards/xelus/valor_frl_tkl/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xiudi/xd002/readme.md b/keyboards/xiudi/xd002/readme.md index 65522fda2c2..395a5407091 100644 --- a/keyboards/xiudi/xd002/readme.md +++ b/keyboards/xiudi/xd002/readme.md @@ -37,7 +37,7 @@ sudo udevadm trigger **Reset Key**: Hold down key nearest to the USB socket while plugging in the keyboard. ```bash -make xd002:default:flash +make xiudi/xd002:default:flash # or directly with... micronucleus --run diff --git a/keyboards/xiudi/xd004/keymaps/system_and_media/readme.md b/keyboards/xiudi/xd004/keymaps/system_and_media/readme.md index d684d463c6c..3e5533b036d 100644 --- a/keyboards/xiudi/xd004/keymaps/system_and_media/readme.md +++ b/keyboards/xiudi/xd004/keymaps/system_and_media/readme.md @@ -6,4 +6,4 @@ It also has a 'Super Alt-F4' key for Windows that, when tapped does Alt-F4, unle ## Build -To build the keymap, simply run `make xd004:system_and_media`. +To build the keymap, simply run `make xiudi/xd004:system_and_media`. diff --git a/keyboards/xiudi/xd004/v1/rules.mk b/keyboards/xiudi/xd004/v1/rules.mk index cc04c573242..b81a68c3b15 100644 --- a/keyboards/xiudi/xd004/v1/rules.mk +++ b/keyboards/xiudi/xd004/v1/rules.mk @@ -5,7 +5,7 @@ MCU = atmega16u2 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd60/keymaps/Jos/README.md b/keyboards/xiudi/xd60/keymaps/Jos/README.md index b4382acfeb3..c93ea25bfd5 100644 --- a/keyboards/xiudi/xd60/keymaps/Jos/README.md +++ b/keyboards/xiudi/xd60/keymaps/Jos/README.md @@ -19,4 +19,4 @@ There are a few `#define` lines at the beginning of the keymap file that enable # Build -To build, simply run `make xd60:Jos` +To build, simply run `make xiudi/xd60:Jos` diff --git a/keyboards/xiudi/xd60/keymaps/birkir/readme.md b/keyboards/xiudi/xd60/keymaps/birkir/readme.md index 670b6bb3142..47a1523f6c5 100644 --- a/keyboards/xiudi/xd60/keymaps/birkir/readme.md +++ b/keyboards/xiudi/xd60/keymaps/birkir/readme.md @@ -42,4 +42,4 @@ RGB settings are persisted for layer 0 when done. - More dynamic keyboard configuration on Layer 2 ## Build -To build the default keymap, simply run `make xd60:birkir`. +To build the default keymap, simply run `make xiudi/xd60:birkir`. diff --git a/keyboards/xiudi/xd60/keymaps/default/readme.md b/keyboards/xiudi/xd60/keymaps/default/readme.md index 7d6bc75365c..517dfef6335 100644 --- a/keyboards/xiudi/xd60/keymaps/default/readme.md +++ b/keyboards/xiudi/xd60/keymaps/default/readme.md @@ -9,5 +9,5 @@ Default Keymap for XD60 as indicated on the original sale page. To build the default keymap, simply run: - make xd60/rev2:default # XD60 rev2 - make xd60/rev3:default # XD60 rev3 + make xiudi/xd60/rev2:default # XD60 rev2 + make xiudi/xd60/rev3:default # XD60 rev3 diff --git a/keyboards/xiudi/xd60/keymaps/edulpn/readme.md b/keyboards/xiudi/xd60/keymaps/edulpn/readme.md index 14f7da063d1..ba37eb6d7e1 100644 --- a/keyboards/xiudi/xd60/keymaps/edulpn/readme.md +++ b/keyboards/xiudi/xd60/keymaps/edulpn/readme.md @@ -6,4 +6,4 @@ ![Edulpn Keymap for the XD60 PCB](https://i.imgur.com/PoL5qcr.png) ## Build -To build the default keymap, simply run `make xd60:edulpn`. +To build the default keymap, simply run `make xiudi/xd60:edulpn`. diff --git a/keyboards/xiudi/xd60/keymaps/edulpn64/readme.md b/keyboards/xiudi/xd60/keymaps/edulpn64/readme.md index a3208564a0d..0fd6e827524 100644 --- a/keyboards/xiudi/xd60/keymaps/edulpn64/readme.md +++ b/keyboards/xiudi/xd60/keymaps/edulpn64/readme.md @@ -6,4 +6,4 @@ This keymap uses the Default XD60 base layer, but follows the GK64 function layer (one of my XD60 boards use GK64 keycaps). ## Build -To build the default keymap, simply run `make xd60:edulpn64`. +To build the default keymap, simply run `make xiudi/xd60:edulpn64`. diff --git a/keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md b/keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md index 753c6bbb2dd..63e507935d6 100755 --- a/keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md +++ b/keyboards/xiudi/xd60/keymaps/fvolpe83/readme.md @@ -27,7 +27,7 @@ via has been enabled To build the keymap, simply run: - make xd60/rev3:fvolpe83 # XD60 rev3 + make xiudi/xd60/rev3:fvolpe83 # XD60 rev3 ![Keyboard Layout (Physical appearence)](https://i.imgur.com/CSRPjbX.png "physical layout") diff --git a/keyboards/xiudi/xd60/keymaps/iso/readme.md b/keyboards/xiudi/xd60/keymaps/iso/readme.md index 84374fa1858..40f24c5c40d 100644 --- a/keyboards/xiudi/xd60/keymaps/iso/readme.md +++ b/keyboards/xiudi/xd60/keymaps/iso/readme.md @@ -16,5 +16,5 @@ iso Keymap for XD60. To build the default keymap, simply run: - make xd60/rev2:iso # XD60 rev2 - make xd60/rev3:iso # XD60 rev3 + make xiudi/xd60/rev2:iso # XD60 rev2 + make xiudi/xd60/rev3:iso # XD60 rev3 diff --git a/keyboards/xiudi/xd60/keymaps/kmontag42/readme.md b/keyboards/xiudi/xd60/keymaps/kmontag42/readme.md index a23f6a8bec7..fcbf2099c8b 100644 --- a/keyboards/xiudi/xd60/keymaps/kmontag42/readme.md +++ b/keyboards/xiudi/xd60/keymaps/kmontag42/readme.md @@ -15,4 +15,4 @@ This layout is WIP for me as I use my shiny new keyboard more and more. I will * I use emacs, which could account for some of the oddities in my layout and macros ## Build -To build the default keymap, simply run `make xd60:kmontag42`. +To build the default keymap, simply run `make xiudi/xd60:kmontag42`. diff --git a/keyboards/xiudi/xd60/keymaps/krusli/readme.md b/keyboards/xiudi/xd60/keymaps/krusli/readme.md index 34f46e026ca..c6d6834e6a4 100644 --- a/keyboards/xiudi/xd60/keymaps/krusli/readme.md +++ b/keyboards/xiudi/xd60/keymaps/krusli/readme.md @@ -4,4 +4,4 @@ Keymap for the XD60 (ANSI) with 2.25u left shift, split right shift. HHKB-like function layer. ## Build -To build this keymap, simply run `make xd60:krusli` on the top-level directory for QMK. +To build this keymap, simply run `make xiudi/xd60:krusli` on the top-level directory for QMK. diff --git a/keyboards/xiudi/xd60/keymaps/melka/readme.md b/keyboards/xiudi/xd60/keymaps/melka/readme.md index b9d9065da78..23e7ab0b092 100644 --- a/keyboards/xiudi/xd60/keymaps/melka/readme.md +++ b/keyboards/xiudi/xd60/keymaps/melka/readme.md @@ -18,4 +18,4 @@ To define your password, rename passwd_template.h file to passwd.h and edit the To build this keymap, simply run: - make xd60/rev3:melka # XD60 rev3 + make xiudi/xd60/rev3:melka # XD60 rev3 diff --git a/keyboards/xiudi/xd60/keymaps/petesmom/README.md b/keyboards/xiudi/xd60/keymaps/petesmom/README.md index dceb402d722..075928205c4 100644 --- a/keyboards/xiudi/xd60/keymaps/petesmom/README.md +++ b/keyboards/xiudi/xd60/keymaps/petesmom/README.md @@ -4,10 +4,10 @@ Customized xd60 keymap based on yuuki's but a step sideways with Mac support. Fo ## Programming Instructions -Change the layout in `keymap.c` then run `make xd60-petesmom`. The compiled file will be located in `.build/xd60_petesmom.hex` relative to the project root. To flash it onto your keyboard, use whatever program works on your OS. I personally use `dfu-programmer`, and run: +Change the layout in `keymap.c` then run `make xiudi/xd60:petesmom`. The compiled file will be located in `.build/xiudi_xd60_petesmom.hex` relative to the project root. To flash it onto your keyboard, use whatever program works on your OS. I personally use `dfu-programmer`, and run: * `sudo dfu-programmer atmega32u4 erase` -* `sudo dfu-programmer atmega32u4 flash .build/xd60-petesmom.hex` +* `sudo dfu-programmer atmega32u4 flash .build/xiudi_xd60-petesmom.hex` * `sudo dfu-programmer atmega32u4 start` ## Layout diff --git a/keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md b/keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md index b8a3ac4fff4..7e74f753ff4 100644 --- a/keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md +++ b/keyboards/xiudi/xd60/keymaps/semicolonsnet/readme.md @@ -9,5 +9,5 @@ Custom Keymap for XD60 - uses a META key and lots of shortcut keys that are late To build the default keymap, simply run: - make xd60/rev2:default # XD60 rev2 - make xd60/rev3:default # XD60 rev3 \ No newline at end of file + make xiudi/xd60/rev2:default # XD60 rev2 + make xiudi/xd60/rev3:default # XD60 rev3 \ No newline at end of file diff --git a/keyboards/xiudi/xd60/keymaps/styr/readme.md b/keyboards/xiudi/xd60/keymaps/styr/readme.md index 8d9edf7c48c..1c5d160cfa5 100644 --- a/keyboards/xiudi/xd60/keymaps/styr/readme.md +++ b/keyboards/xiudi/xd60/keymaps/styr/readme.md @@ -4,4 +4,4 @@ Default Keymap for XD60 as indicated on the original sale page. ## Build -To build the default keymap, simply run `make xd60/rev3:styr`. +To build the default keymap, simply run `make xiudi/xd60/rev3:styr`. diff --git a/keyboards/xiudi/xd60/keymaps/supercoffee/readme.md b/keyboards/xiudi/xd60/keymaps/supercoffee/readme.md index ccfdca8b255..111f34e7202 100644 --- a/keyboards/xiudi/xd60/keymaps/supercoffee/readme.md +++ b/keyboards/xiudi/xd60/keymaps/supercoffee/readme.md @@ -6,4 +6,4 @@ 60% Keymap for XD60 with GH60 ANSI layout. Arrow keys mapped to WASD in function layer. ## Build -To build the default keymap, simply run `make xd60:supercoffee`. +To build the default keymap, simply run `make xiudi/xd60:supercoffee`. diff --git a/keyboards/xiudi/xd60/keymaps/yuuki/README.md b/keyboards/xiudi/xd60/keymaps/yuuki/README.md index ebb2f8c1c98..ba0de049ee2 100644 --- a/keyboards/xiudi/xd60/keymaps/yuuki/README.md +++ b/keyboards/xiudi/xd60/keymaps/yuuki/README.md @@ -4,11 +4,11 @@ Customized xd60 keymap with inspirations from HHKB and the layout I used on my V ## Programming Instructions -Change the layout in `keymap.c` then run `make xd60:yuuki`. The compiled file will be located in `.build/xd60_yuuki.hex` relative to the project root. To flash it onto your keyboard, use whatever program works on your OS. I personally use `dfu-programmer`, and run: +Change the layout in `keymap.c` then run `make xiudi/xd60:yuuki`. The compiled file will be located in `.build/xiudi_xd60_yuuki.hex` relative to the project root. To flash it onto your keyboard, use whatever program works on your OS. I personally use `dfu-programmer`, and run: * reset keyboard by pressing the reset button on the back of the PCB * `sudo dfu-programmer atmega32u4 erase` -* `sudo dfu-programmer atmega32u4 flash .build/xd60_yuuki.hex` +* `sudo dfu-programmer atmega32u4 flash .build/xiudi_xd60_yuuki.hex` * `sudo dfu-programmer atmega32u4 start` ## Layout diff --git a/keyboards/xiudi/xd60/rev2/rules.mk b/keyboards/xiudi/xd60/rev2/rules.mk index c825de8dbe5..e56178d7bf3 100644 --- a/keyboards/xiudi/xd60/rev2/rules.mk +++ b/keyboards/xiudi/xd60/rev2/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd60/rev3/rules.mk b/keyboards/xiudi/xd60/rev3/rules.mk index c825de8dbe5..e56178d7bf3 100644 --- a/keyboards/xiudi/xd60/rev3/rules.mk +++ b/keyboards/xiudi/xd60/rev3/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = atmel-dfu # Build Options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd68/keymaps/default/readme.md b/keyboards/xiudi/xd68/keymaps/default/readme.md index f26e1bd63f7..7f5c5c39eaf 100644 --- a/keyboards/xiudi/xd68/keymaps/default/readme.md +++ b/keyboards/xiudi/xd68/keymaps/default/readme.md @@ -1,5 +1,5 @@ # XD68 layout for Default ANSI ``` -make xd68:default +make xiudi/xd68:default ``` diff --git a/keyboards/xiudi/xd68/keymaps/default_iso/readme.md b/keyboards/xiudi/xd68/keymaps/default_iso/readme.md index d61877e77eb..a91aff3992a 100644 --- a/keyboards/xiudi/xd68/keymaps/default_iso/readme.md +++ b/keyboards/xiudi/xd68/keymaps/default_iso/readme.md @@ -1,5 +1,5 @@ # XD68 layout for Default ISO ``` -make xd68:default_iso +make xiudi/xd68:default_iso ``` diff --git a/keyboards/xiudi/xd68/rules.mk b/keyboards/xiudi/xd68/rules.mk index 4310c112062..4e236fdc50d 100644 --- a/keyboards/xiudi/xd68/rules.mk +++ b/keyboards/xiudi/xd68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # QMK Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk b/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk index 45ff7b8e8d7..4b2777fd21e 100644 --- a/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk +++ b/keyboards/xiudi/xd75/keymaps/4sstylz/rules.mk @@ -17,7 +17,7 @@ COMBO_ENABLE = yes # Enable combo for special function when using multiple k BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md b/keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md index f96c8ea976c..a0ade691aa3 100644 --- a/keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md +++ b/keyboards/xiudi/xd75/keymaps/bbaserdem/readme.md @@ -9,6 +9,6 @@ Take the board into reset mode, then ``` -make xd75:bbaserdem:dfu +make xiudi/xd75:bbaserdem:dfu ``` Either sudo it or set permissions in udev. diff --git a/keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md b/keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md index 947acca1015..17232175e31 100644 --- a/keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md +++ b/keyboards/xiudi/xd75/keymaps/buzzlighter1/readme.md @@ -50,5 +50,5 @@ $ cd qmk_firmware build ``` -$ make xd75:buzzlighter1 +$ make xiudi/xd75:buzzlighter1 ``` \ No newline at end of file diff --git a/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk b/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk index d018ebecfaf..108a4f6330c 100644 --- a/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk +++ b/keyboards/xiudi/xd75/keymaps/buzzlighter1/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = no diff --git a/keyboards/xiudi/xd75/keymaps/clanghans/readme.md b/keyboards/xiudi/xd75/keymaps/clanghans/readme.md index bce20f61336..eed6369ada9 100755 --- a/keyboards/xiudi/xd75/keymaps/clanghans/readme.md +++ b/keyboards/xiudi/xd75/keymaps/clanghans/readme.md @@ -5,7 +5,7 @@ * Build/Flash qmk setup - qmk compile -kb xd75 -km clanghans - qmk flash -kb xd75 -km clanghans + qmk compile -kb xiudi/xd75 -km clanghans + qmk flash -kb xiudi/xd75 -km clanghans Hit 'Raise'+'PgUp' for entering bootloader mode diff --git a/keyboards/xiudi/xd75/keymaps/colinta/readme.md b/keyboards/xiudi/xd75/keymaps/colinta/readme.md index e3f59d681fa..e4e8049015f 100644 --- a/keyboards/xiudi/xd75/keymaps/colinta/readme.md +++ b/keyboards/xiudi/xd75/keymaps/colinta/readme.md @@ -1,7 +1,7 @@ # colinta's keymap for XD75 ``` -make xd75:colinta:dfu +make xiudi/xd75:colinta:dfu ``` The default layout is a Colemak keyboard with "one-shot" keys assigned to the modifier keys. @@ -41,13 +41,13 @@ If you would *also* like to take advantage of this feature, you'll first want to # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ -/keyboards/xd75/keymaps/colinta/secrets.h +/keyboards/xiudi/xd75/keymaps/colinta/secrets.h ``` Then you can create this file and add your macro strings to it: ``` -$EDITOR keyboards/xd75/keymaps/colinta/secrets.h +$EDITOR keyboards/xiudi/xd75/keymaps/colinta/secrets.h ``` ###### secrets.h @@ -60,5 +60,5 @@ $EDITOR keyboards/xd75/keymaps/colinta/secrets.h To include the feature at compile time, include the flag `IS_COLINTA` like so: ``` -make xd75:colinta:dfu EXTRAFLAGS=-DIS_COLINTA +make xiudi/xd75:colinta:dfu EXTRAFLAGS=-DIS_COLINTA ``` diff --git a/keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md b/keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md index 7954a683a0a..82172ff9816 100644 --- a/keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md +++ b/keyboards/xiudi/xd75/keymaps/developper_bepo/readme.md @@ -10,4 +10,4 @@ Keyboard maintainer: [Quentin Lebastard](https://github.com/lebastaq) Make example for this keyboard (after setting up your build environment): - make xd75:developper_bepo + make xiudi/xd75:developper_bepo diff --git a/keyboards/xiudi/xd75/keymaps/fabian/rules.mk b/keyboards/xiudi/xd75/keymaps/fabian/rules.mk index 3ff9b75d30a..a494cc8a8e1 100644 --- a/keyboards/xiudi/xd75/keymaps/fabian/rules.mk +++ b/keyboards/xiudi/xd75/keymaps/fabian/rules.mk @@ -18,7 +18,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/xiudi/xd75/keymaps/french/readme.md b/keyboards/xiudi/xd75/keymaps/french/readme.md index 8c5330290ee..a45bf248dab 100644 --- a/keyboards/xiudi/xd75/keymaps/french/readme.md +++ b/keyboards/xiudi/xd75/keymaps/french/readme.md @@ -16,5 +16,5 @@ La touche de fonction permet elle d'avoir accès aux différentes touches multim # Compilation ``` -make xd75:french:dfu +make xiudi/xd75:french:dfu ``` diff --git a/keyboards/xiudi/xd75/keymaps/revok75/rules.mk b/keyboards/xiudi/xd75/keymaps/revok75/rules.mk index 80119878431..a9aedf5920d 100644 --- a/keyboards/xiudi/xd75/keymaps/revok75/rules.mk +++ b/keyboards/xiudi/xd75/keymaps/revok75/rules.mk @@ -13,6 +13,6 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite BACKLIGHT_ENABLE = yes RGBLIGHT_ENABLE = yes diff --git a/keyboards/xiudi/xd75/keymaps/scheiklp/readme.md b/keyboards/xiudi/xd75/keymaps/scheiklp/readme.md index 58c65f0884d..c8c2dc9a2c2 100644 --- a/keyboards/xiudi/xd75/keymaps/scheiklp/readme.md +++ b/keyboards/xiudi/xd75/keymaps/scheiklp/readme.md @@ -1,9 +1,9 @@ # KOY Layout for the xd75 pcb board Compile the layout ```bash -qmk compile -kb xd75 -km scheiklp +qmk compile -kb xiudi/xd75 -km scheiklp ``` and flash it to the board ```bash -qmk flash -kb xd75 -km scheiklp +qmk flash -kb xiudi/xd75 -km scheiklp ``` diff --git a/keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md b/keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md index 835ef09fb23..a430be0a27b 100644 --- a/keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md +++ b/keyboards/xiudi/xd75/keymaps/tdl-jturner/readme.md @@ -3,7 +3,7 @@ Keyboard Layout Editor: [Link](http://www.keyboard-layout-editor.com/#/gists/b2b23097ef70fd9170e266e4cbc06c02) -Make Command: make xd75:tdl-jturner +Make Command: make xiudi/xd75:tdl-jturner Notes: * Based on Qwerty diff --git a/keyboards/xiudi/xd75/rules.mk b/keyboards/xiudi/xd75/rules.mk index 9e10e4bfa8c..171f71b8274 100644 --- a/keyboards/xiudi/xd75/rules.mk +++ b/keyboards/xiudi/xd75/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd84/rules.mk b/keyboards/xiudi/xd84/rules.mk index 54809bc998f..a7aeeed6b75 100644 --- a/keyboards/xiudi/xd84/rules.mk +++ b/keyboards/xiudi/xd84/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd84pro/rules.mk b/keyboards/xiudi/xd84pro/rules.mk index 8c38fcbb554..e70a8a7a730 100644 --- a/keyboards/xiudi/xd84pro/rules.mk +++ b/keyboards/xiudi/xd84pro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk b/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk index 8d4da89e39a..fa5f343e706 100755 --- a/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk +++ b/keyboards/xiudi/xd87/keymaps/default_underglow/rules.mk @@ -1,3 +1,3 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes diff --git a/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk b/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk index 8d4da89e39a..fa5f343e706 100755 --- a/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk +++ b/keyboards/xiudi/xd87/keymaps/mac_underglow/rules.mk @@ -1,3 +1,3 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite COMMAND_ENABLE = no RGBLIGHT_ENABLE = yes diff --git a/keyboards/xiudi/xd87/rules.mk b/keyboards/xiudi/xd87/rules.mk index 5fb8c67600c..900071f1c67 100644 --- a/keyboards/xiudi/xd87/rules.mk +++ b/keyboards/xiudi/xd87/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/xiudi/xd87/xd87.h b/keyboards/xiudi/xd87/xd87.h index 0dec1f6a14e..2d700d7ba41 100644 --- a/keyboards/xiudi/xd87/xd87.h +++ b/keyboards/xiudi/xd87/xd87.h @@ -13,58 +13,57 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef XD87_H -#define XD87_H + +#pragma once #include "quantum.h" +#define XXX KC_NO + #define LAYOUT_all( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K3E, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G, \ - K50, K51, K52, K55, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k3E, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G, \ + k50, k51, k52, k55, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ -/* 0 1 2 3 4 5 6 7 8 9 A B C D E F G */ \ -/* 0 */ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ -/* 1 */ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ -/* 2 */ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ -/* 3 */ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO, KC_NO }, \ -/* 4 */ { K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K4G }, \ -/* 5 */ { K50, K51, K52, KC_NO, KC_NO, K55, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, k4G }, \ + { k50, k51, k52, XXX, XXX, k55, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } #define LAYOUT_tkl_ansi( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ - K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ - {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G }, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, KC_NO, KC_NO,KC_NO }, \ - {K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ - {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, XXX, k3D, XXX, XXX, XXX }, \ + { k40, XXX, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } #define LAYOUT_tkl_iso( \ - K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, K2F, K2G, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ - K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ - K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ + k00, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2E, k2F, k2G, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4F, \ + k50, k51, k52, k58, k5A, k5B, k5C, k5D, k5E, k5F, k5G \ ) { \ - {K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G }, \ - {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G }, \ - {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, KC_NO, K2E, K2F, K2G }, \ - {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, KC_NO,KC_NO }, \ - {K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO }, \ - {K50, K51, K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K58, KC_NO, K5A, K5B, K5C, K5D, K5E, K5F, K5G } \ + { k00, XXX, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k1G }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, XXX, XXX, k4F, XXX }, \ + { k50, k51, k52, XXX, XXX, XXX, XXX, XXX, k58, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \ } - -#endif diff --git a/keyboards/xiudi/xd96/rules.mk b/keyboards/xiudi/xd96/rules.mk index baade350b0a..36287cd37b2 100644 --- a/keyboards/xiudi/xd96/rules.mk +++ b/keyboards/xiudi/xd96/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index c54e4323985..773f612089c 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -48,5 +47,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/xw60/rules.mk b/keyboards/xw60/rules.mk index 5921be64c39..996e6304551 100644 --- a/keyboards/xw60/rules.mk +++ b/keyboards/xw60/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug @@ -17,6 +17,7 @@ NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: ht BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -HAPTIC_ENABLE += SOLENOID +HAPTIC_ENABLE = yes +HAPTIC_DRIVER = SOLENOID # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/yampad/keymaps/default/keymap.c b/keyboards/yampad/keymaps/default/keymap.c index d22eb26177b..51d921be3f9 100644 --- a/keyboards/yampad/keymaps/default/keymap.c +++ b/keyboards/yampad/keymaps/default/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/keymaps/traditional/keymap.c b/keyboards/yampad/keymaps/traditional/keymap.c index 57462c050ca..78778cc34b3 100644 --- a/keyboards/yampad/keymaps/traditional/keymap.c +++ b/keyboards/yampad/keymaps/traditional/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/keymaps/via/keymap.c b/keyboards/yampad/keymaps/via/keymap.c index d22eb26177b..51d921be3f9 100644 --- a/keyboards/yampad/keymaps/via/keymap.c +++ b/keyboards/yampad/keymaps/via/keymap.c @@ -122,7 +122,7 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; // flips the display 270 degrees } -void oled_task_user(void) { +bool oled_task_user(void) { // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -159,5 +159,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yampad/yampad.c b/keyboards/yampad/yampad.c index 950a9872194..eab218d3b95 100644 --- a/keyboards/yampad/yampad.c +++ b/keyboards/yampad/yampad.c @@ -17,13 +17,14 @@ #include "yampad.h" #if defined(OLED_ENABLE) -__attribute__((weak)) -oled_rotation_t oled_init_user(oled_rotation_t rotation) { - return OLED_ROTATION_270; // flips the display 270 degrees +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { + return OLED_ROTATION_270; } -__attribute__((weak)) -void oled_task_user(void) { +bool oled_task_kb(void) { + if (!oled_task_user()) { + return false; + } // Host Keyboard Layer Status oled_write_P(PSTR("Layer"), false); switch (get_highest_layer(layer_state)) { @@ -60,5 +61,7 @@ void oled_task_user(void) { (uint8_t)(rgblight_get_sat() / RGBLIGHT_SAT_STEP), (uint8_t)(rgblight_get_val() / RGBLIGHT_VAL_STEP)); oled_write(led_buf, false); + + return false; } #endif diff --git a/keyboards/yanghu/unicorne/unicorne.c b/keyboards/yanghu/unicorne/unicorne.c index 27b87253df2..bce8f52075d 100644 --- a/keyboards/yanghu/unicorne/unicorne.c +++ b/keyboards/yanghu/unicorne/unicorne.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ #include "unicorne.h" - +#include "i2c_master.h" // Custom i2c init to enable internal pull up resistor for i2c. void i2c_init(void) { @@ -23,13 +23,13 @@ void i2c_init(void) { is_initialised = true; // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT); chThdSleepMilliseconds(10); // Use internal pull up since we do not have pull up on i2c pins in v1 design. - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); } } @@ -58,7 +58,7 @@ led_config_t g_led_config = {{ {208, 44}, {130, 60} }, {// LED Index to Flag - LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, + LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL, LED_FLAG_ALL }}; // clang-format on @@ -138,11 +138,13 @@ void set_keylog(uint16_t keycode, keyrecord_t *record) { __attribute__((weak)) void oled_render_keylog(void) { oled_write(keylog_str, false); } // Keymaps can override this function -__attribute__((weak)) void oled_task_user(void) { +__attribute__((weak)) bool oled_task_kb(void) { + if (!oled_task_user()) { return false; } /* oled_render_keylog(); */ oled_render_layer(); oled_render_mods(); led_t led_state = host_keyboard_led_state(); oled_render_capslock(led_state.caps_lock); + return true; } #endif diff --git a/keyboards/yasui/rules.mk b/keyboards/yasui/rules.mk index b004c534bb9..e912b1df7f5 100644 --- a/keyboards/yasui/rules.mk +++ b/keyboards/yasui/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yatara/drink_me/rules.mk b/keyboards/yatara/drink_me/rules.mk index ec3729d1155..61b03c131dd 100644 --- a/keyboards/yatara/drink_me/rules.mk +++ b/keyboards/yatara/drink_me/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yd60mq/rules.mk b/keyboards/yd60mq/rules.mk index 280751e6097..8fec0820942 100644 --- a/keyboards/yd60mq/rules.mk +++ b/keyboards/yd60mq/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yd68/yd68.h b/keyboards/yd68/yd68.h index d5d98dec088..3303bd899e3 100644 --- a/keyboards/yd68/yd68.h +++ b/keyboards/yd68/yd68.h @@ -13,8 +13,8 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef YD68_H -#define YD68_H + +#pragma once #include "quantum.h" @@ -45,18 +45,15 @@ // The second converts the arguments into a two-dimensional array #define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, k48, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, k2e, \ - k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e, \ - k40, k41, k42, k46, k49, k4a, k4b, k4c, k4d, k4e \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, XXX, k0e}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e}, \ - {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d, k2e}, \ - {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, k3e}, \ - {k40, k41, k42, XXX, XXX, XXX, k46, XXX, k48, k49, k4a, k4b, k4c, k4d, k4e} \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0E, k48, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, k2E, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, \ + k40, k41, k42, k46, k49, k4A, k4B, k4C, k4D, k4E \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, XXX, k0E }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, XXX, k2D, k2E }, \ + { k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E }, \ + { k40, k41, k42, XXX, XXX, XXX, k46, XXX, k48, k49, k4A, k4B, k4C, k4D, k4E } \ } - -#endif diff --git a/keyboards/ymd75/rev1/rules.mk b/keyboards/ymd75/rev1/rules.mk index 130203f63d1..e2b35d63fa8 100644 --- a/keyboards/ymd75/rev1/rules.mk +++ b/keyboards/ymd75/rev1/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymd75/rev2/rules.mk b/keyboards/ymd75/rev2/rules.mk index 130203f63d1..e2b35d63fa8 100644 --- a/keyboards/ymd75/rev2/rules.mk +++ b/keyboards/ymd75/rev2/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32a BOOTLOADER = bootloadhid # build options -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes CONSOLE_ENABLE = no diff --git a/keyboards/ymd75/rev3/rules.mk b/keyboards/ymd75/rev3/rules.mk index a37c1473ee6..fbab065d48a 100644 --- a/keyboards/ymd75/rev3/rules.mk +++ b/keyboards/ymd75/rev3/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/np24/u4rgb6/rules.mk b/keyboards/ymdk/np24/u4rgb6/rules.mk index 260daf07db4..fdbf3c60e72 100644 --- a/keyboards/ymdk/np24/u4rgb6/rules.mk +++ b/keyboards/ymdk/np24/u4rgb6/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/sp64/rules.mk b/keyboards/ymdk/sp64/rules.mk index 77ec305d51b..d2c74bbe09e 100644 --- a/keyboards/ymdk/sp64/rules.mk +++ b/keyboards/ymdk/sp64/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/wings/rules.mk b/keyboards/ymdk/wings/rules.mk index f88a26d4c94..bf9ede20bd8 100644 --- a/keyboards/ymdk/wings/rules.mk +++ b/keyboards/ymdk/wings/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/wingshs/rules.mk b/keyboards/ymdk/wingshs/rules.mk index 6ff132876ed..bf9ede20bd8 100644 --- a/keyboards/ymdk/wingshs/rules.mk +++ b/keyboards/ymdk/wingshs/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ym68/rules.mk b/keyboards/ymdk/ym68/rules.mk index dbdd2741233..1a2408fb701 100644 --- a/keyboards/ymdk/ym68/rules.mk +++ b/keyboards/ymdk/ym68/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ymd09/rules.mk b/keyboards/ymdk/ymd09/rules.mk index 8a43e9d186c..ff96ae2fa90 100644 --- a/keyboards/ymdk/ymd09/rules.mk +++ b/keyboards/ymdk/ymd09/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ymd40/v2/rules.mk b/keyboards/ymdk/ymd40/v2/rules.mk index 847728b0436..449f2d14cc0 100644 --- a/keyboards/ymdk/ymd40/v2/rules.mk +++ b/keyboards/ymdk/ymd40/v2/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk/ymd67/rules.mk b/keyboards/ymdk/ymd67/rules.mk index 13bd7ff27fc..92d0c70aa1a 100644 --- a/keyboards/ymdk/ymd67/rules.mk +++ b/keyboards/ymdk/ymd67/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ymdk_np21/rules.mk b/keyboards/ymdk_np21/rules.mk index 54b2cbb1544..611a7935c18 100644 --- a/keyboards/ymdk_np21/rules.mk +++ b/keyboards/ymdk_np21/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = bootloadhid # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yncognito/batpad/config.h b/keyboards/yncognito/batpad/config.h index 7ca4072e071..50fec3d69a2 100644 --- a/keyboards/yncognito/batpad/config.h +++ b/keyboards/yncognito/batpad/config.h @@ -55,3 +55,52 @@ along with this program. If not, see . #define RGB_MATRIX_LED_FLUSH_LIMIT 16 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255 #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_ALL + +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +#define ENABLE_RGB_MATRIX_ALPHAS_MODS +#define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_BREATHING +#define ENABLE_RGB_MATRIX_BAND_SAT +#define ENABLE_RGB_MATRIX_BAND_VAL +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#define ENABLE_RGB_MATRIX_CYCLE_ALL +#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#define ENABLE_RGB_MATRIX_DUAL_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_BEACON +#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#define ENABLE_RGB_MATRIX_RAINDROPS +#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#define ENABLE_RGB_MATRIX_HUE_BREATHING +#define ENABLE_RGB_MATRIX_HUE_PENDULUM +#define ENABLE_RGB_MATRIX_HUE_WAVE +#define ENABLE_RGB_MATRIX_PIXEL_RAIN +#define ENABLE_RGB_MATRIX_PIXEL_FLOW +#define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +#define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#define ENABLE_RGB_MATRIX_SPLASH +#define ENABLE_RGB_MATRIX_MULTISPLASH +#define ENABLE_RGB_MATRIX_SOLID_SPLASH +#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH diff --git a/keyboards/yncognito/batpad/rules.mk b/keyboards/yncognito/batpad/rules.mk index ab2800ba340..0f6abaa263e 100644 --- a/keyboards/yncognito/batpad/rules.mk +++ b/keyboards/yncognito/batpad/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yoichiro/lunakey_macro/rules.mk b/keyboards/yoichiro/lunakey_macro/rules.mk index 5e2b08db0cc..419033f64c9 100644 --- a/keyboards/yoichiro/lunakey_macro/rules.mk +++ b/keyboards/yoichiro/lunakey_macro/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = no # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yoichiro/lunakey_mini/rules.mk b/keyboards/yoichiro/lunakey_mini/rules.mk index b35ad058460..62691dc4f25 100644 --- a/keyboards/yoichiro/lunakey_mini/rules.mk +++ b/keyboards/yoichiro/lunakey_mini/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yosino58/rev1/split_scomm.h b/keyboards/yosino58/rev1/split_scomm.h index 873d8939d81..16887eb74f7 100644 --- a/keyboards/yosino58/rev1/split_scomm.h +++ b/keyboards/yosino58/rev1/split_scomm.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_COMM_H -#define SPLIT_COMM_H +#pragma once #ifndef SERIAL_USE_MULTI_TRANSACTION /* --- USE Simple API (OLD API, compatible with let's split serial.c) --- */ @@ -20,5 +19,3 @@ void serial_slave_init(void); int serial_update_buffers(int master_changed); #endif - -#endif /* SPLIT_COMM_H */ diff --git a/keyboards/yosino58/rev1/split_util.h b/keyboards/yosino58/rev1/split_util.h index 687ca19bd3e..f593047560a 100644 --- a/keyboards/yosino58/rev1/split_util.h +++ b/keyboards/yosino58/rev1/split_util.h @@ -1,5 +1,4 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H +#pragma once #include #include "eeconfig.h" @@ -15,5 +14,3 @@ void split_keyboard_setup(void); bool has_usb(void); void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/yosino58/serial.h b/keyboards/yosino58/serial.h index 7e0c0847a43..ac3459c876a 100644 --- a/keyboards/yosino58/serial.h +++ b/keyboards/yosino58/serial.h @@ -1,5 +1,4 @@ -#ifndef SOFT_SERIAL_H -#define SOFT_SERIAL_H +#pragma once #include @@ -80,5 +79,3 @@ int soft_serial_transaction(int sstd_index); #ifdef SERIAL_USE_MULTI_TRANSACTION int soft_serial_get_and_clean_status(int sstd_index); #endif - -#endif /* SOFT_SERIAL_H */ diff --git a/keyboards/yugo_m/model_m_101/rules.mk b/keyboards/yugo_m/model_m_101/rules.mk index a83750932aa..41e7e023ffe 100644 --- a/keyboards/yugo_m/model_m_101/rules.mk +++ b/keyboards/yugo_m/model_m_101/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc index 87738389b7d..0232b05ab94 100644 --- a/keyboards/yushakobo/quick17/rgb_matrix_kb.inc +++ b/keyboards/yushakobo/quick17/rgb_matrix_kb.inc @@ -111,7 +111,7 @@ static bool quick17_rgbm_effect (effect_params_t* params) { led_color_set(i, rgb_keymaps[_CONTROL][i]); } } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } #endif diff --git a/keyboards/yushakobo/quick7/rules.mk b/keyboards/yushakobo/quick7/rules.mk index 9813e7659f7..0d700a132e3 100644 --- a/keyboards/yushakobo/quick7/rules.mk +++ b/keyboards/yushakobo/quick7/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug diff --git a/keyboards/yynmt/acperience12/rules.mk b/keyboards/yynmt/acperience12/rules.mk index 02f70ba3589..274a17b4f83 100644 --- a/keyboards/yynmt/acperience12/rules.mk +++ b/keyboards/yynmt/acperience12/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/z12/keymaps/zigotica/oled.c b/keyboards/z12/keymaps/zigotica/oled.c index 4b428a42b1d..fa11a3d6c6f 100644 --- a/keyboards/z12/keymaps/zigotica/oled.c +++ b/keyboards/z12/keymaps/zigotica/oled.c @@ -37,7 +37,7 @@ static void render_status(void) { } } -void oled_task_user(void) { +bool oled_task_user(void) { render_status(); + return false; } - diff --git a/keyboards/z12/rules.mk b/keyboards/z12/rules.mk index 32cdab8e959..b59ce00b476 100644 --- a/keyboards/z12/rules.mk +++ b/keyboards/z12/rules.mk @@ -5,7 +5,7 @@ MCU = atmega32u4 BOOTLOADER = caterina # Build Options -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/z150_bh/rules.mk b/keyboards/z150_bh/rules.mk index 635cab95376..5d9c83a5a2e 100644 --- a/keyboards/z150_bh/rules.mk +++ b/keyboards/z150_bh/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = halfkay # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/z34/rules.mk b/keyboards/z34/rules.mk index 6370c7a93f7..cec101f9315 100644 --- a/keyboards/z34/rules.mk +++ b/keyboards/z34/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zj68/rules.mk b/keyboards/zj68/rules.mk index 712ad0a4971..e6224a10491 100644 --- a/keyboards/zj68/rules.mk +++ b/keyboards/zj68/rules.mk @@ -8,7 +8,7 @@ BOOTLOADER = atmel-dfu # comment out to disable the options. # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index fd5632199bf..922c446a016 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,5 +44,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk index d53de8978fb..4ed89a93f09 100755 --- a/keyboards/zlant/rules.mk +++ b/keyboards/zlant/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h index 5fbc968ad89..86cd9fef859 100755 --- a/keyboards/zlant/zlant.h +++ b/keyboards/zlant/zlant.h @@ -1,32 +1,29 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" #define LAYOUT_ortho_4x12( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B } \ } #define LAYOUT_planck_mit( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ - K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, \ + k30, k31, k32, k33, k34, k35, k37, k38, k39, k3A, k3B \ ) { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \ - { K300, K301, K302, K303, K304, K305, K305, K307, K308, K309, K310, K311 } \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B }, \ + { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3A, k3B } \ } #define LAYOUT LAYOUT_ortho_4x12 - -#endif diff --git a/keyboards/zoo/wampus/rules.mk b/keyboards/zoo/wampus/rules.mk index 11fc79f0fa2..08c35a116c5 100644 --- a/keyboards/zoo/wampus/rules.mk +++ b/keyboards/zoo/wampus/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zoo/wampus/wampus.c b/keyboards/zoo/wampus/wampus.c index 350d47a3ede..aa41c271083 100644 --- a/keyboards/zoo/wampus/wampus.c +++ b/keyboards/zoo/wampus/wampus.c @@ -22,8 +22,7 @@ void board_init(void) { SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); } -oled_rotation_t oled_init_user(oled_rotation_t rotation) { +oled_rotation_t oled_init_kb(oled_rotation_t rotation) { return OLED_ROTATION_180; } - #endif diff --git a/keyboards/ztboards/after/rules.mk b/keyboards/ztboards/after/rules.mk index 3535a6619bf..0f03cb3530c 100644 --- a/keyboards/ztboards/after/rules.mk +++ b/keyboards/ztboards/after/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/ztboards/noon/rules.mk b/keyboards/ztboards/noon/rules.mk index 49ec442115c..9c78569f938 100644 --- a/keyboards/ztboards/noon/rules.mk +++ b/keyboards/ztboards/noon/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zvecr/split_blackpill/rules.mk b/keyboards/zvecr/split_blackpill/rules.mk index ae2d38186c0..86469ce1905 100644 --- a/keyboards/zvecr/split_blackpill/rules.mk +++ b/keyboards/zvecr/split_blackpill/rules.mk @@ -7,7 +7,7 @@ BOOTLOADER = stm32duino # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/keyboards/zvecr/zv48/rules.mk b/keyboards/zvecr/zv48/rules.mk index ac7eebbce3c..97238e5e072 100644 --- a/keyboards/zvecr/zv48/rules.mk +++ b/keyboards/zvecr/zv48/rules.mk @@ -1,7 +1,7 @@ # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite KEYBOARD_SHARED_EP = yes # Free up some extra endpoints - needed if console+mouse+extra MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control diff --git a/layouts/community/65_ansi_blocker/brandonschlack/config.h b/layouts/community/65_ansi_blocker/brandonschlack/config.h index e7b09f422c7..ea8ca619011 100644 --- a/layouts/community/65_ansi_blocker/brandonschlack/config.h +++ b/layouts/community/65_ansi_blocker/brandonschlack/config.h @@ -17,46 +17,46 @@ #ifdef RGB_MATRIX_ENABLE // Disable RGB Effects -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define QMK_KEYS_PER_SCAN 4 +# define QMK_KEYS_PER_SCAN 4 -#define USB_LED_CAPS_LOCK_SCANCODE 30 +# define USB_LED_CAPS_LOCK_SCANCODE 30 #endif #ifdef KEYBOARD_massdrop_alt diff --git a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h index 9506c7fe910..fe3dcd41c2b 100644 --- a/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h +++ b/layouts/community/65_ansi_blocker_split_bs/brandonschlack-split/config.h @@ -17,46 +17,46 @@ #ifdef RGB_MATRIX_ENABLE // Disable RGB Effects -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -// #define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_RAINBOW_BEACON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_RAINDROPS -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_TYPING_HEATMAP -#define DISABLE_RGB_MATRIX_DIGITAL_RAIN -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +// #undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define QMK_KEYS_PER_SCAN 4 +# define QMK_KEYS_PER_SCAN 4 -#define USB_LED_CAPS_LOCK_SCANCODE 30 +# define USB_LED_CAPS_LOCK_SCANCODE 30 #endif #ifdef KEYBOARD_massdrop_alt diff --git a/layouts/community/ergodox/333fred/keymap.c b/layouts/community/ergodox/333fred/keymap.c index b9aefd92930..5dee9a1e3f6 100644 --- a/layouts/community/ergodox/333fred/keymap.c +++ b/layouts/community/ergodox/333fred/keymap.c @@ -272,3 +272,43 @@ void matrix_scan_user(void) { ergodox_led_all_on(); } +#ifdef ST7565_ENABLE + +void st7565_task_user(void) { + // The colors will need to be ported over to the quantum painter API when + // https://github.com/qmk/qmk_firmware/pull/10174 is merged. + + st7565_clear(); + switch (get_highest_layer(layer_state)) { + case BASE: + //state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); + st7565_write_P(PSTR("Default\n"), false); + break; + case CODEFLOW: + //state->target_lcd_color = LCD_COLOR(216, 90, 0xFF); + st7565_write_P(PSTR("Code\n"), false); + break; + case SYMB: + //state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); + st7565_write_P(PSTR("Symbol\n"), false); + break; + case MDIA: + //state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); + st7565_write_P(PSTR("Media\n"), false); + break; + case VIM: + //state->target_lcd_color = LCD_COLOR(140, 100, 60); + st7565_write_P(PSTR("Movement\n"), false); + break; + case GAME: + //state->target_lcd_color = LCD_COLOR(0, 255, 60); + st7565_write_P(PSTR("Game\n"), false); + break; + case GAME_ARROW: + //state->target_lcd_color = LCD_COLOR(0, 255, 60); + st7565_write_P(PSTR("Game Arrow\n"), false); + break; + } +} + +#endif diff --git a/layouts/community/ergodox/333fred/rules.mk b/layouts/community/ergodox/333fred/rules.mk index f6c71feb462..9a3e2b97e59 100644 --- a/layouts/community/ergodox/333fred/rules.mk +++ b/layouts/community/ergodox/333fred/rules.mk @@ -1,5 +1,2 @@ -LCD_BACKLIGHT_ENABLE = yes -LCD_ENABLE = yes -BACKLIGHT_ENABLE = yes KEY_LOCK_ENABLE = yes CONSOLE_ENABLE = no diff --git a/layouts/community/ergodox/333fred/visualizer.c b/layouts/community/ergodox/333fred/visualizer.c deleted file mode 100644 index d13b3cd7947..00000000000 --- a/layouts/community/ergodox/333fred/visualizer.c +++ /dev/null @@ -1,39 +0,0 @@ -/* -Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL. -*/ - -#include "simple_visualizer.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - uint8_t saturation = 60; - if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - saturation = 255; - } - if (state->status.layer & 0x80) { - state->target_lcd_color = LCD_COLOR(0, 255, 60); - state->layer_text = "Game Arrow"; - } else if (state->status.layer & 0x40) { - state->target_lcd_color = LCD_COLOR(0, 255, 60); - state->layer_text = "Game"; - } else if (state->status.layer & 0x20) { - state->target_lcd_color = LCD_COLOR(140, 100, 60); - state->layer_text = "Movement"; - } else if (state->status.layer & 0x10) { - state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); - state->layer_text = "Media"; - } else if (state->status.layer & 0x8) { - state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); - state->layer_text = "Symbol"; - } else if (state->status.layer & 0x2 || state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(216, 90, 0xFF); - state->layer_text = "Code"; - } else { - state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); - state->layer_text = "Default"; - } -} diff --git a/layouts/community/ergodox/adnw_p_u_q/visualizer.c b/layouts/community/ergodox/adnw_p_u_q/visualizer.c deleted file mode 100644 index 9a4d485387d..00000000000 --- a/layouts/community/ergodox/adnw_p_u_q/visualizer.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Note: this is a modified copy of ../default/visualizer.c, originally licensed GPL. -*/ - -#include "simple_visualizer.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - - if (state->status.layer & 0x20) { - state->target_lcd_color = LCD_COLOR(127, 0xFF, 0xFF); - state->layer_text = "Mouse"; - } else if (state->status.layer & 0x10) { - state->target_lcd_color = LCD_COLOR(85, 0xFF, 0xFF); - state->layer_text = "Symbol"; - } else if (state->status.layer & 0x8) { - state->target_lcd_color = LCD_COLOR(64, 0xFF, 0xFF); - state->layer_text = "Brackets"; - } else if (state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(42, 0xFF, 0xFF); - state->layer_text = "Diak"; - } else if (state->status.layer & 0x2) { - state->target_lcd_color = LCD_COLOR(21, 0xFF, 0xFF); - state->layer_text = "Terminal"; - } else { - state->target_lcd_color = LCD_COLOR(192, 0xFF, 0xFF); - state->layer_text = "Vim"; - } -} - diff --git a/layouts/community/ergodox/algernon/COPYING b/layouts/community/ergodox/algernon/COPYING deleted file mode 100644 index 94a9ed024d3..00000000000 --- a/layouts/community/ergodox/algernon/COPYING +++ /dev/null @@ -1,674 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU General Public License is a free, copyleft license for -software and other kinds of works. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -the GNU General Public License is intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. We, the Free Software Foundation, use the -GNU General Public License for most of our software; it applies also to -any other work released this way by its authors. You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - To protect your rights, we need to prevent others from denying you -these rights or asking you to surrender the rights. Therefore, you have -certain responsibilities if you distribute copies of the software, or if -you modify it: responsibilities to respect the freedom of others. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must pass on to the recipients the same -freedoms that you received. You must make sure that they, too, receive -or can get the source code. And you must show them these terms so they -know their rights. - - Developers that use the GNU GPL protect your rights with two steps: -(1) assert copyright on the software, and (2) offer you this License -giving you legal permission to copy, distribute and/or modify it. - - For the developers' and authors' protection, the GPL clearly explains -that there is no warranty for this free software. For both users' and -authors' sake, the GPL requires that modified versions be marked as -changed, so that their problems will not be attributed erroneously to -authors of previous versions. - - Some devices are designed to deny users access to install or run -modified versions of the software inside them, although the manufacturer -can do so. This is fundamentally incompatible with the aim of -protecting users' freedom to change the software. The systematic -pattern of such abuse occurs in the area of products for individuals to -use, which is precisely where it is most unacceptable. Therefore, we -have designed this version of the GPL to prohibit the practice for those -products. If such problems arise substantially in other domains, we -stand ready to extend this provision to those domains in future versions -of the GPL, as needed to protect the freedom of users. - - Finally, every program is threatened constantly by software patents. -States should not allow patents to restrict development and use of -software on general-purpose computers, but in those that do, we wish to -avoid the special danger that patents applied to a free program could -make it effectively proprietary. To prevent this, the GPL assures that -patents cannot be used to render the program non-free. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU Affero General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the special requirements of the GNU Affero General Public License, -section 13, concerning interaction through a network will apply to the -combination as such. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 3 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 . - -Also add information on how to contact you by electronic and paper mail. - - If the program does terminal interaction, make it output a short -notice like this when it starts in an interactive mode: - - Copyright (C) - This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands -might be different; for a GUI interface, you would use an "about box". - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. diff --git a/layouts/community/ergodox/algernon/NEWS.md b/layouts/community/ergodox/algernon/NEWS.md deleted file mode 100644 index a6ce9813baf..00000000000 --- a/layouts/community/ergodox/algernon/NEWS.md +++ /dev/null @@ -1,229 +0,0 @@ - - -## v1.12 - -*2018-11-22* - -### Overall changes - -* Updated to work with QMK master. - -### Miscellaneous - -* The `😂` symbol can be entered with UCIS. -* `LEAD r` now inputs `Right Alt`. - -## v1.11 - -*2017-10-01* - -### Overall changes - -* Updated to work with QMK master. -* The `$` and `^` symbols on the number row were swapped on both the base and the ADORE layers. -* The bracket tap-dance keys can now be used to input Japanese brackets, `「` and `」` with a third tap. -* The second column of the top row on the right side will act as a "Social" application selector on the `AppSel` layer. -* The third key on the same column will select a password manager. -* The `GUI` key will now launch `rofi` when triple-tapped. - -### Miscellaneous - -* The `👶` symbol can be entered with UCIS. -* The `👪` symbol can be entered with UCIS. - -### Tools - -* `tools/hid-commands` can now find the `Mstdn`, not just `Slack`, as the "Slack"/chat app. -* `tools/hid-commands` can now find the Plex web app as a music/media player. -* `tools/hid-commands` now understands the "Social" application selector. It raises the `Mstdn` and `Tweetdeck` windows, but keeps focus on the previous window. -* `tools/hid-commands` now understands the "Social2" application selector, which raises `Signal` and `Viber`, but keeps focus on the previous window. -* `tools/hid-commands` is now able to select a password manager (KeePass*). -* `tools/hid-commands` can now run `rofi` when receiving an `appsel_helper` command (triggered by a triple-tapped `GUI` key). - -## v1.10 - -*2016-12-28* - -### Miscellaneous - -* `µ` can now be entered with UCIS. -* `™` can now be entered with UCIS. - -### Tools - -* `tools/hid-commands` can now find Banshee, and prefers it over Kodi. -* `tools/hid-commands` can now find Chrome too, not juts Chromium. - -## v1.9 - -*2016-10-16* - -### Overall changes - -* `F12` was replaced by an `Fx` key, that activate the **Media** layer as a one-shot layer, and also `Alt` as a one-shot modifier. - -### Base layer changes - -* The `Media Stop` key is now a tap-dance key, and resets the device for programming on the fourth tap. - -### Miscellaneous - -* `π` can now be entered with UCIS. -* `🐁` can now be entered with UCIS. - -### Tools - -* The `tools/layer-notify` tool was removed, it was an example, which I don't use. - -#### `tools/hid-commands` - -* Now looks at the `DISABLE_APPSEL_START` environment value, and does not display an AppSel notification if it is non-empty. -* Will attempt to re-program the keyboard when receiving a `reflash` command. -* No longer tries to select Emacs 24 on `APPSEL_EMACS`, rather, it goes for any Emacs. -* The `APPSEL_MUSIC` command now includes Kodi in the list too, as the last choice. - -## v1.8 - -*2016-10-03* - -### ADORE - -* Major rearrangements were made, to reduce pinky use, and to balance out the hand usage. - -### Tools - -* The `hid-commands` tool will now display a notification when the **AppSel** layer is triggered. -* The `log-to-heatmap.py` tool now treats the innermost keys on the bottom row as thumb keys, as far as statistics are concerned. - -### Miscellaneous - -* Fixed the **Steno** toggle key. - -## v1.7 - -*2016-09-18* - -### Overall changes - -* The number row has been completely rearranged on both the **Base** and the **ADORE** layers. -* The number/function key behavior was changed: function keys are now on the **Media**. -* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers. -* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. -* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. - -### ADORE - -* `Y` and `X` have been swapped again. - -### Media/Navigation layer - -* The function keys are now on this layer. -* Mouse keys have been removed. -* Media start/stop/prev/next have been removed. -* `Print screen` has been removed. -* There is only one screen lock key now. - -### Heatmap - -* Fixed a few issues in the finger-stats calculation. -* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. -* The heatmap tool will now colorize the stats by default. -* The periodic stats are now printed in a more compact format. - -### Tools - -* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. -* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. -* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. - -## v1.6 - -*2016-08-24* - -### Base layer changes - -* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. -* The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`. -* The `Apps` key has been replaced by `F12`. -* The `-`/`_` is no longer a tap-dance key. - -### ADORE layer changes - -* Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations. - -### Miscellaneous changes - -* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. -* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. -* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. - -### Heatmap - -* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. -* The heatmap generator received a lot of updates. - -## v1.5 - -*2016-08-12* - -* The **1HAND** layer has been removed. -* A `Delete` key is now available on the right thumb cluster. -* The **ADORE** layer received a major update, see the layout image above. -* It is now possible to enable automatic logging for the **ADORE** layer, by setting the `ADORE_AUTOLOG` makefile variable to `yes` when compiling the keymap. It is off by default. -* The `~` key and the `Media Next/Prev` key have been swapped on the **Base** layer. -* On the **ARROW** layer, `Backspace` has been replaced by `Enter`. -* There is some experimental support for entering Unicode symbols. - -## v1.4 - -*2016-07-29* - -* When toggling the key logging on or off, the LEDs will do a little dance. -* The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. -* The `TAB`/`ARRW` key was turned into a tap-dance key, allowing one to toggle the **ARROW** layer on by double-tapping, and as such, avoid the need to hold the key. -* The `-`/`_` key was turned into a tap-dance key too. -* There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. - -## v1.3 - -*2016-07-06* - -* Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a *heatmap* out of the logs. -* The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the **Base** layer for an image that shows where arrows are. -* The **experimental** layer has been redone, and is now called **ADORE**, and as such, can be enabled by `LEAD a` now. -* Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. - -## v1.2 - -*2016-06-22* - -* The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with certain operating systems. -* The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. -* The `=` and `\` keys were swapped, `=` moved to the home row, on both the **Base** and the **experimental** layers. -* The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. -* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. -* `LEAD v` types the firmware version, and the keymap version. -* On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. -* The **Steno** layer gained a few more `#` and `*` keys, to make it easier on my fingers. - -## v1.1 - -*2016-06-14* - -* The keyboard starts in NKRO mode, bootmagic and other things are disabled. -* A **Steno** layer was added, to be used with Plover. -* An **experimental** layer was added, something halfway between Dvorak and Capewell-Dvorak. A work in progress. -* `LEAD y` types `\o/`. -* Some keys on the **Base** layer have been moved around: - - `?` moved to the left pinky, left of `Q`. - - `=` shifted one row down, but `F11` stayed where it was. - - `-` on the left half was replaced by `Tab`. - - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. - - `:` now inputs `;` when shifted. -* `ESC` cancels the **Hungarian** layer too, not just modifiers. - -## v1.0 - -*2016-05-26* - -Initial version. diff --git a/layouts/community/ergodox/algernon/config.h b/layouts/community/ergodox/algernon/config.h deleted file mode 100644 index 583c3911f18..00000000000 --- a/layouts/community/ergodox/algernon/config.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#undef MOUSEKEY_TIME_TO_MAX -#undef MOUSEKEY_MAX_SPEED - -#define MOUSEKEY_TIME_TO_MAX 1 -#define MOUSEKEY_MAX_SPEED 2 - -#undef MOUSEKEY_DELAY -#define MOUSEKEY_DELAY 0 - -#undef MOUSEKEY_WHEEL_DELAY -#define MOUSEKEY_WHEEL_DELAY 0 - -#define ONESHOT_TAP_TOGGLE 2 -#define ONESHOT_TIMEOUT 3000 - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#undef LEADER_TIMEOUT -#define LEADER_TIMEOUT 1000 diff --git a/layouts/community/ergodox/algernon/images/adore-layer.png b/layouts/community/ergodox/algernon/images/adore-layer.png deleted file mode 100644 index 75d2ca4f08b..00000000000 Binary files a/layouts/community/ergodox/algernon/images/adore-layer.png and /dev/null differ diff --git a/layouts/community/ergodox/algernon/images/base-layer.png b/layouts/community/ergodox/algernon/images/base-layer.png deleted file mode 100644 index 2ca7a273bed..00000000000 Binary files a/layouts/community/ergodox/algernon/images/base-layer.png and /dev/null differ diff --git a/layouts/community/ergodox/algernon/images/heatmap.png b/layouts/community/ergodox/algernon/images/heatmap.png deleted file mode 100644 index 4f55c5adff5..00000000000 Binary files a/layouts/community/ergodox/algernon/images/heatmap.png and /dev/null differ diff --git a/layouts/community/ergodox/algernon/images/steno-layer.png b/layouts/community/ergodox/algernon/images/steno-layer.png deleted file mode 100644 index 9a2ba55effa..00000000000 Binary files a/layouts/community/ergodox/algernon/images/steno-layer.png and /dev/null differ diff --git a/layouts/community/ergodox/algernon/keymap.c b/layouts/community/ergodox/algernon/keymap.c deleted file mode 100644 index 06808709542..00000000000 --- a/layouts/community/ergodox/algernon/keymap.c +++ /dev/null @@ -1,1194 +0,0 @@ -/* - * algernon's ErgoDox EZ layout, please see the readme.md file! - */ - -#include -#include QMK_KEYBOARD_H -#include "led.h" -#include "debug.h" -#include "action_layer.h" -#include "action_util.h" -#include "timer.h" -#include "keymap_plover.h" -#include "eeconfig.h" -#include "wait.h" -#include "version.h" -#include "print.h" - -/* Layers */ - -enum { - BASE = 0, - ADORE, - ARRW, - APPSEL, - HUN, - NMDIA, - PLVR, -}; - -/* Macros */ - -enum { - NONE = 0, - // Buttons that do extra stuff - A_GUI, - A_PLVR, - A_MPN, - - // Application select keys - APP_SLK, // Slack - APP_EMCS, // Emacs - APP_TERM, // Terminal - APP_CHRM, // Chrome - APP_MSIC, // Music - APP_SOCL, // Social - APP_PMGR, // Password manager - APP_SCL2, // Social #2 - - // Hungarian layer keys - HU_AACU, // Á - HU_OACU, // Ó - HU_EACU, // É - HU_UACU, // Ú - HU_IACU, // Í - HU_ODIA, // Ö - HU_UDIA, // Ü - HU_ODAC, // Ő - HU_UDAC, // Ű - - // number/symbol keys - A_1, // 1 - A_2, // 2 - A_3, // ... - A_4, - A_5, - A_6, - A_7, - A_8, - A_9, - A_0, - - // Fx - Fx, -}; - -/* Fn keys */ - -enum { - F_BSE = 0, - F_HUN, - F_GUI, -}; - -/* Custom keycodes */ - -enum { - CT_CLN = 0, - CT_TA, - CT_LBP, - CT_RBP, - CT_TMUX, - CT_TPS, - CT_SR, -}; - -/* States & timers */ - -uint16_t gui_timer = 0; - -#if KEYLOGGER_ENABLE -# ifdef AUTOLOG_ENABLE -bool log_enable = true; -# else -bool log_enable = false; -# endif -#endif - -bool time_travel = false; -bool skip_leds = false; - -static uint8_t is_adore = 0; - -/* The Keymap */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Keymap 0: Base Layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | - * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| - * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| - * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop/Reset| - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | : | | - | | | | | - * `-----------------------------------' `-----------------------------------' - * ,-------------. ,-------------. - * | LAlt | GUI | | MDIA | Del | - * ,------|------|------| |------+------+------. - * | | | Ctrl | | LEAD | | | - * |Backsp|LShift|------| |------| Enter| Space| - * | | | ESC | | HUN | | | - * `--------------------' `--------------------' - */ -[BASE] = LAYOUT_ergodox( -// left hand - M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 -,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - - ,OSM(MOD_LALT),F(F_GUI) - ,OSM(MOD_LCTL) - ,KC_BSPC,OSM(MOD_LSFT),KC_ESC - - // right hand - ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) - ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS - ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,TD(CT_SR) - ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,OSL(NMDIA),KC_DEL - ,KC_LEAD - ,F(F_HUN) ,KC_ENT ,KC_SPC - ), - -/* Keymap 1: Adore layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | Fx | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | \ | X | W | C | H | F | ( | | ) | M | G | L | P | / | `~ | - * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| - * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | - * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | | | pane | B | K | V | Y | J | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | : | | - | | | | | - * `-----------------------------------' `-----------------------------------' - * ,-------------. ,-------------. - * | LAlt | GUI | | MDIA | Del | - * ,------|------|------| |------+------+------. - * | | | Ctrl | | HUN | | | - * |Backsp|LShift|------| |------| Enter| Space| - * | | | ESC | | LEAD | | | - * `--------------------' `--------------------' - */ -[ADORE] = LAYOUT_ergodox( -// left hand - KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 -,KC_BSLS ,KC_X ,KC_W ,KC_C ,KC_H ,KC_F ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U -,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) - - ,OSM(MOD_LALT),F(F_GUI) - ,OSM(MOD_LCTL) - ,KC_BSPC,OSM(F_LSFT),KC_ESC - - // right hand - ,M(Fx) ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) - ,TD(CT_RBP),KC_M ,KC_G ,KC_L ,KC_P ,KC_SLSH ,KC_GRV - ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_Y ,KC_J ,KC_NO - ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,OSL(NMDIA),KC_DEL - ,F(F_HUN) - ,KC_LEAD ,KC_ENT ,KC_SPC - ), - -/* Keymap 2: Arrow layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | | | | | | | | | Home | Up | End | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | |------| |------| | Left | Down | Rght | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | Enter| |------| |------| PgUp | PgDn | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[ARRW] = LAYOUT_ergodox( -// left hand - KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_ENT ,KC_TRNS ,KC_TRNS - - // right hand - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_PGUP ,KC_PGDN - ), - -/* Keymap 3: Application select layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | |Music |Slack |Emacs |Term |Chrome| | | |Social|PWMgr |Scl2 | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | |------| |------| | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[APPSEL] = LAYOUT_ergodox( -// left hand - KC_TRNS ,M(APP_MSIC),M(APP_SLK),M(APP_EMCS),M(APP_TERM),M(APP_CHRM),KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS -,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - - // right hand - ,KC_TRNS ,M(APP_SOCL) ,M(APP_PMGR) ,M(APP_SCL2) ,KC_NO ,KC_NO ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS - - ,KC_TRNS ,KC_TRNS - ,KC_TRNS - ,KC_TRNS ,KC_TRNS ,KC_TRNS - ), - - -/* Keymap 4: Hungarian Layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | Ő | | Ű | | | | | | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Á | Ó | É | Ú | Í |------| |------| | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | Ö | | Ü | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | BASE | | | - * `--------------------' `--------------------' - */ - -[HUN] = LAYOUT_ergodox( -// left hand - KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,M(HU_ODAC),KC_NO ,M(HU_UDAC),KC_NO ,KC_NO -,KC_NO ,M(HU_AACU),M(HU_OACU) ,M(HU_EACU),M(HU_UACU) ,M(HU_IACU) -,KC_NO ,KC_NO ,M(HU_ODIA) ,KC_NO ,M(HU_UDIA) ,KC_NO ,KC_NO -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - - ,KC_NO ,KC_NO - ,KC_NO - ,KC_NO ,KC_TRNS ,KC_TRNS - - // right hand - ,KC_TRNS ,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 - ,F(F_BSE),KC_TRNS ,KC_TRNS - ), - -/* Keymap 5: Navigation & Media layer - * - * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | | F9 | F7 | F5 | F3 | F1 |ScrLCK| | | F10 | F2 | F4 | F6 | F8 | | - * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | |------| |------| | | | | | | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | | | | | | | | | | | | | | | - * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | Mute | VlUp | | BASE | | - * ,------|------|------| |------+------+------. - * | | | VlDn | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -[NMDIA] = LAYOUT_ergodox( -// left hand - KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,LGUI(KC_L) -,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_MUTE ,KC_VOLU - ,KC_VOLD - ,KC_NO ,KC_NO ,KC_TRNS - - // right hand - ,KC_TRNS ,KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_UP ,KC_NO ,KC_NO ,KC_NO - ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RGHT ,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_TRNS ,KC_NO - ,KC_NO - ,KC_NO ,KC_NO ,KC_NO - ), - -/* Keymap 6: Steno for Plover - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | BASE | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | # | # | # | # | # | # | | # | # | # | # | # | # | # | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | T | P | H | |------| |------| | F | P | L | T | D | - * |--------+ S +------+------+------+ * | * | | * | * +------+------+------+------+--------| - * | | | K | W | R | | | | | | R | B | G | S | Z | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | A | O |------| |------| E | U | - * | | | | | | | | - * `--------------------' `--------------------' - */ - -[PLVR] = LAYOUT_ergodox( -// left hand -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, -KC_NO, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, -KC_NO, PV_LS, PV_LT, PV_LP, PV_LH, PV_STAR, -KC_NO, PV_LS, PV_LK, PV_LW, PV_LR, PV_STAR, PV_STAR, -KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_NO, - PV_A, PV_O, KC_NO, - - // right hand - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, M(A_PLVR), - PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, PV_NUM, - PV_STAR, PV_RF, PV_RP, PV_RL, PV_RT, PV_RD, - PV_STAR, PV_STAR, PV_RR, PV_RB, PV_RG, PV_RS, PV_RZ, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, - KC_NO, - KC_NO,PV_E, PV_U - ), - -}; - -const uint16_t PROGMEM fn_actions[] = { - [F_BSE] = ACTION_LAYER_CLEAR(ON_PRESS) - ,[F_HUN] = ACTION_LAYER_INVERT(HUN, ON_PRESS) - ,[F_GUI] = ACTION_MACRO_TAP(A_GUI) -}; - -static void toggle_steno(int pressed) -{ - uint8_t layer = biton32(layer_state); - - if (pressed) { - if (layer != PLVR) layer_on(PLVR); else layer_off(PLVR); - - register_code(PV_LP); - register_code(PV_LH); - register_code(PV_LR); - register_code(PV_O); - register_code(PV_RL); - register_code(PV_RG); - } else { - unregister_code(PV_LP); - unregister_code(PV_LH); - unregister_code(PV_LR); - unregister_code(PV_O); - unregister_code(PV_RL); - unregister_code(PV_RG); - } -} - -static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) -{ - uint8_t need_shift = 0; - uint8_t hold_shift = 0; - - if (!record->event.pressed) - return MACRO_NONE; - - layer_off (HUN); - - if (keyboard_report->mods & MOD_BIT (KC_LSFT)) { - hold_shift = 1; - need_shift = 1; - unregister_code (KC_LSFT); - } - if ((get_oneshot_mods () & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out ()) { - need_shift = 1; - hold_shift = 0; - unregister_code (KC_LSFT); - } - - clear_oneshot_mods (); - - register_code (KC_RALT); - unregister_code (KC_RALT); - if (accent == (KC_DQT)) { - register_code (KC_RSFT); - } - register_code (accent); - unregister_code (accent); - if (need_shift && accent != (KC_DQT)) { - register_code (KC_RSFT); - } else if (accent == (KC_DQT) && !need_shift) { - unregister_code (KC_RSFT); - } - register_code (hun_char); - unregister_code (hun_char); - if (need_shift || accent == (KC_DQT)) - unregister_code (KC_RSFT); - if (hold_shift) - register_code (KC_LSFT); - - return MACRO_NONE; -} - -static void ang_handle_num_row(uint8_t id, keyrecord_t *record) { - uint8_t idx = id - A_1; - uint8_t kc; - static bool shifted[10]; - - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - if (record->event.pressed) - shifted[idx] = true; - } - - if (!shifted[idx]) { - kc = idx + KC_1; - } else { - switch (id) { - case A_8: - case A_9: - shifted[idx] = false; - return; - - case A_7: - kc = KC_2; - break; - case A_5: - kc = KC_8; - break; - case A_3: - kc = KC_4; - break; - case A_1: - kc = KC_6; - break; - - case A_0: - kc = KC_5; - break; - case A_2: - kc = KC_1; - break; - case A_4: - kc = KC_3; - break; - case A_6: - kc = KC_7; - break; - } - } - - if (record->event.pressed) { - register_code (kc); - } else { - unregister_code (kc); - shifted[idx] = false; - } -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case A_MPN: - if (record->event.pressed) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - int oneshot = ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out()); - - if (oneshot) - clear_oneshot_mods (); - unregister_code (KC_LSFT); - - register_code (KC_MPRV); - unregister_code (KC_MPRV); - - if (!oneshot) - register_code (KC_LSFT); - } else { - return MACRO (T(MNXT), END); - } - } - break; - - /* Hungarian layer */ - case HU_AACU: - return ang_do_hun (record, KC_QUOT, KC_A); - case HU_OACU: - return ang_do_hun (record, KC_QUOT, KC_O); - case HU_EACU: - return ang_do_hun (record, KC_QUOT, KC_E); - case HU_UACU: - return ang_do_hun (record, KC_QUOT, KC_U); - case HU_IACU: - return ang_do_hun (record, KC_QUOT, KC_I); - case HU_ODIA: - return ang_do_hun (record, KC_DQT, KC_O); - case HU_UDIA: - return ang_do_hun (record, KC_DQT, KC_U); - case HU_ODAC: - return ang_do_hun (record, KC_EQL, KC_O); - case HU_UDAC: - return ang_do_hun (record, KC_EQL, KC_U); - - /* Plover base */ - case A_PLVR: - toggle_steno(record->event.pressed); - break; - - /* Fx */ - case Fx: - if (record->event.pressed) { - set_oneshot_mods (MOD_LALT); - layer_on (NMDIA); - set_oneshot_layer (NMDIA, ONESHOT_START); - } else { - clear_oneshot_layer_state (ONESHOT_PRESSED); - } - break; - - /* GUI & AppSel */ - case A_GUI: - if (record->event.pressed) { - register_code (KC_LGUI); - if (record->tap.count && !record->tap.interrupted) { - if (record->tap.count == 2) { - uprintf("CMD:appsel_start\n"); - layer_on (APPSEL); - set_oneshot_layer (APPSEL, ONESHOT_START); - } else if (record->tap.count >= 3) { - uprintf("CMD:appsel_helper\n"); - layer_off (APPSEL); - clear_oneshot_layer_state (ONESHOT_PRESSED); - } - } else { - record->tap.count = 0; - } - gui_timer = 0; - } else { - if (record->tap.count >= 2) - { - clear_oneshot_layer_state (ONESHOT_PRESSED); - } - gui_timer = timer_read (); - } - break; - - case APP_SLK: - if (record->event.pressed) - uprintf("CMD:appsel_slack\n"); - break; - - case APP_EMCS: - if (record->event.pressed) - uprintf("CMD:appsel_emacs\n"); - break; - - case APP_TERM: - if (record->event.pressed) - uprintf("CMD:appsel_term\n"); - break; - - case APP_CHRM: - if (record->event.pressed) - uprintf("CMD:appsel_chrome\n"); - break; - - case APP_MSIC: - if (record->event.pressed) - uprintf("CMD:appsel_music\n"); - break; - - case APP_SOCL: - if (record->event.pressed) - uprintf("CMD:appsel_social\n"); - break; - - case APP_PMGR: - if (record->event.pressed) - uprintf("CMD:appsel_pwmgr\n"); - break; - - case APP_SCL2: - if (record->event.pressed) - uprintf("CMD:appsel_social2\n"); - break; - - // number row and symbols - case A_1 ... A_0: - ang_handle_num_row(id, record); - break; - } - - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - uint8_t dl; - - set_unicode_input_mode(UC_LNX); - - ergodox_led_all_on(); - for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { - ergodox_led_all_set (i); - wait_ms (5); - } - wait_ms(1000); - for (int i = LED_BRIGHTNESS_LO; i > 0; i--) { - ergodox_led_all_set (i); - wait_ms (10); - } - ergodox_led_all_off(); - - if (!eeconfig_is_enabled()) - eeconfig_init(); - dl = eeconfig_read_default_layer (); - if (dl == (1UL << ADORE)) { - is_adore = 1; - } -}; - -LEADER_EXTERNS(); - -static void ang_tap (uint16_t code, ...) { - uint16_t kc = code; - va_list ap; - - va_start(ap, code); - - do { - register_code16(kc); - unregister_code16(kc); - wait_ms(50); - kc = va_arg(ap, int); - } while (kc != 0); - va_end(ap); -} - -#define TAP_ONCE(code) \ - register_code (code); \ - unregister_code (code) - -typedef struct { - bool layer_toggle; - bool sticky; -} td_ta_state_t; - -static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (td_ta->sticky) { - td_ta->sticky = false; - td_ta->layer_toggle = false; - layer_off (ARRW); - return; - } - - if (state->count == 1 && !state->pressed) { - register_code (KC_TAB); - td_ta->sticky = false; - td_ta->layer_toggle = false; - } else { - td_ta->layer_toggle = true; - layer_on (ARRW); - td_ta->sticky = (state->count == 2); - } -} - -static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { - td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - - if (!td_ta->layer_toggle) - unregister_code (KC_TAB); - if (!td_ta->sticky) - layer_off (ARRW); -} - -static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code(KC_LALT); - register_code(KC_SPC); - unregister_code(KC_SPC); - unregister_code(KC_LALT); - } else { - register_code(KC_LCTL); - register_code(KC_A); - unregister_code(KC_A); - unregister_code(KC_LCTL); - } -} - -static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) { - uint8_t kc = KC_P; - - if (state->count >= 2) { - kc = KC_Z; - } - - register_code(KC_LALT); - register_code(KC_SPC); - unregister_code(KC_SPC); - unregister_code(KC_LALT); - - register_code(kc); - unregister_code(kc); -} - -static void -_td_sr_each (qk_tap_dance_state_t *state, void *user_data) { - skip_leds = true; - - switch (state->count) { - case 1: - ergodox_right_led_3_on (); - break; - case 2: - ergodox_right_led_2_on (); - break; - case 3: - ergodox_right_led_1_on (); - break; - case 4: - ergodox_right_led_3_off (); - wait_ms (50); - ergodox_right_led_2_off (); - wait_ms (50); - ergodox_right_led_1_off (); - break; - } -} - -static void -_td_sr_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_MSTP); - } - if (state->count >= 4) { - uprintf("CMD:reflash\n"); - wait_ms (1000); - reset_keyboard (); - reset_tap_dance (state); - } -} - -static void -_td_sr_reset (qk_tap_dance_state_t *state, void *user_data) { - ergodox_right_led_1_off (); - wait_ms (50); - ergodox_right_led_2_off (); - wait_ms (50); - ergodox_right_led_3_off (); - - if (state->count == 1) { - unregister_code (KC_MSTP); - } -} - -static void -_td_brackets_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - if (state->keycode == TD(CT_LBP)) - register_code16 (KC_LBRC); - else - register_code16 (KC_RBRC); - } else if (state->count == 2) { - if (state->keycode == TD(CT_LBP)) - register_code16 (KC_LPRN); - else - register_code16 (KC_RPRN); - } else if (state->count == 3) { - unicode_input_start(); - - if (state->keycode == TD(CT_LBP)) - register_hex (0x300c); - else - register_hex (0x300d); - - unicode_input_finish(); - } -} - -static void -_td_brackets_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - if (state->keycode == TD(CT_LBP)) - unregister_code16 (KC_LBRC); - else - unregister_code16 (KC_RBRC); - } else if (state->count == 2) { - if (state->keycode == TD(CT_LBP)) - unregister_code16 (KC_LPRN); - else - unregister_code16 (KC_RPRN); - } -} - -qk_tap_dance_action_t tap_dance_actions[] = { - [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) - ,[CT_TA] = { - .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false }) - } - ,[CT_LBP] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, _td_brackets_finished, _td_brackets_reset) - ,[CT_RBP] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, _td_brackets_finished, _td_brackets_reset) - ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) - ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) - ,[CT_SR] = ACTION_TAP_DANCE_FN_ADVANCED (_td_sr_each, _td_sr_finished, _td_sr_reset) -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - bool is_arrow = false; - - if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) - unregister_code (KC_LGUI); - - if (!skip_leds) { - if (layer == HUN) { - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - } else if (layer == NMDIA) { - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - } else if (layer == PLVR) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - } else if (layer == ADORE) { - ergodox_right_led_1_on (); - ergodox_right_led_2_on (); - ergodox_right_led_3_on (); - - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); - } - } - - if (layer_state & (1UL << ARRW)) { - if (!skip_leds) { - ergodox_right_led_1_on (); - ergodox_right_led_3_on (); - } - is_arrow = true; - } - - if (!skip_leds) { - if (keyboard_report->mods & MOD_BIT(KC_LSFT) || - ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_1_set (LED_BRIGHTNESS_HI); - ergodox_right_led_1_on (); - } else { - ergodox_right_led_1_set (LED_BRIGHTNESS_LO); - if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) - ergodox_right_led_1_off (); - } - - if (keyboard_report->mods & MOD_BIT(KC_LALT) || - ((get_oneshot_mods() & MOD_BIT(KC_LALT)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_2_set (LED_BRIGHTNESS_HI); - ergodox_right_led_2_on (); - } else { - ergodox_right_led_2_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != NMDIA && layer != PLVR && layer != ADORE) - ergodox_right_led_2_off (); - } - - if (keyboard_report->mods & MOD_BIT(KC_LCTRL) || - ((get_oneshot_mods() & MOD_BIT(KC_LCTRL)) && !has_oneshot_mods_timed_out())) { - ergodox_right_led_3_set (LED_BRIGHTNESS_HI); - ergodox_right_led_3_on (); - } else { - ergodox_right_led_3_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) - ergodox_right_led_3_off (); - } - } - - LEADER_DICTIONARY() { - leading = false; - leader_end (); - - SEQ_ONE_KEY (KC_C) { - ang_tap (LSFT(KC_C), KC_S, KC_I, KC_L, KC_L, KC_RALT, KC_QUOT, KC_A, KC_M, KC_A, KC_S, - KC_S, KC_Z, KC_O, KC_N, KC_Y, KC_K, KC_RALT, KC_QUOT, KC_A, KC_M, 0); - } - - SEQ_ONE_KEY (KC_K) { - ang_tap (KC_SPC, LSFT(KC_7), KC_SPC, 0); - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - ang_tap (KC_1, KC_F, KC_4, KC_7, KC_6, 0); - register_code (KC_ENT); - unregister_code (KC_ENT); - ang_tap (KC_END, 0); - register_code(KC_LCTL); - register_code(KC_LSFT); - register_code(KC_U); - unregister_code(KC_U); - unregister_code(KC_LSFT); - unregister_code(KC_LCTL); - ang_tap (KC_1, KC_F, KC_4, KC_7, KC_6, 0); - register_code (KC_SPC); - unregister_code (KC_SPC); - } - - SEQ_ONE_KEY (KC_G) { - ang_tap (LSFT(KC_G), KC_E, KC_J, KC_G, KC_RALT, KC_EQL, KC_O, - KC_RALT, KC_EQL, KC_O, - KC_RALT, KC_EQL, KC_O, 0); - } - -#if KEYLOGGER_ENABLE - SEQ_ONE_KEY (KC_D) { - ergodox_led_all_on(); - wait_ms(100); - ergodox_led_all_off(); - log_enable = !log_enable; - } -#endif - - SEQ_ONE_KEY (KC_R) { - ang_tap(KC_RALT, 0); - } - - SEQ_ONE_KEY (KC_T) { - time_travel = !time_travel; - } - - SEQ_ONE_KEY (KC_U) { - qk_ucis_start(); - } - - SEQ_ONE_KEY (KC_V) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ (" QMK_VERSION "/" LAYOUT_ergodox_VERSION ")"); - } - - SEQ_ONE_KEY (KC_L) { - /* λ */ - unicode_input_start(); - register_hex(0x03bb); - unicode_input_finish(); - } - - SEQ_ONE_KEY (KC_Y) { - ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); - } - - SEQ_ONE_KEY (KC_S) { - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); - } - - SEQ_TWO_KEYS (KC_W, KC_M) { - uprintf("CMD:wm\n"); - } - - SEQ_ONE_KEY (KC_A) { - if (is_adore == 0) { - default_layer_and (0); - default_layer_or ((1UL << ADORE)); - eeconfig_update_default_layer ((1UL << ADORE)); - is_adore = 1; - - ergodox_led_all_off (); - ergodox_right_led_3_on (); - wait_ms (100); - ergodox_right_led_2_on (); - wait_ms (100); - ergodox_right_led_3_off (); - ergodox_right_led_1_on (); - wait_ms (100); - ergodox_right_led_2_off (); - wait_ms (100); - ergodox_right_led_1_off (); - } else { - is_adore = 0; - default_layer_and (0); - default_layer_or (1UL << BASE); - eeconfig_update_default_layer ((1UL << BASE)); - - ergodox_led_all_off (); - ergodox_right_led_1_on (); - wait_ms (100); - ergodox_right_led_2_on (); - wait_ms (100); - ergodox_right_led_1_off (); - ergodox_right_led_3_on (); - wait_ms (100); - ergodox_right_led_2_off (); - wait_ms (100); - ergodox_right_led_3_off (); - } - } - } -} - -static uint16_t last4[4]; - -const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE -( - UCIS_SYM("poop", 0x1f4a9), - UCIS_SYM("rofl", 0x1f923), - UCIS_SYM("kiss", 0x1f619), - UCIS_SYM("snowman", 0x2603), - UCIS_SYM("coffee", 0x2615), - UCIS_SYM("heart", 0x2764), - UCIS_SYM("bolt", 0x26a1), - UCIS_SYM("pi", 0x03c0), - UCIS_SYM("mouse", 0x1f401), - UCIS_SYM("micro", 0x00b5), - UCIS_SYM("tm", 0x2122), - UCIS_SYM("child", 0x1f476), - UCIS_SYM("family", 0x1F46A), - UCIS_SYM("joy", 0x1F602) -); - -bool process_record_user (uint16_t keycode, keyrecord_t *record) { -#if KEYLOGGER_ENABLE - if (log_enable) { - uint8_t layer = biton32(layer_state); - - if ((layer == ADORE) || (layer == BASE)) - uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, - record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); - } -#endif - - if (keycode == KC_ESC && record->event.pressed) { - bool queue = true; - - if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { - clear_oneshot_mods (); - queue = false; - } - if (layer_state & (1UL<event.pressed) { - uint8_t p; - - // shift cache one to the left - for (p = 0; p < 3; p++) { - last4[p] = last4[p + 1]; - } - last4[3] = keycode; - - if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) { - ang_tap (KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0); - register_code (KC_RSFT); - register_code (KC_EQL); - unregister_code (KC_EQL); - unregister_code (KC_RSFT); - - ang_tap (KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0); - - return false; - } - } - - return true; -} - -void qk_ucis_symbol_fallback (void) { - for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - uint8_t code; - - if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0))) - code = qk_ucis_state.codes[i] - M(A_1) + KC_1; - else - code = qk_ucis_state.codes[i]; - register_code(code); - unregister_code(code); - wait_ms (10); - } -} diff --git a/layouts/community/ergodox/algernon/readme.md b/layouts/community/ergodox/algernon/readme.md deleted file mode 100644 index a25018a7bc6..00000000000 --- a/layouts/community/ergodox/algernon/readme.md +++ /dev/null @@ -1,152 +0,0 @@ - - -algernon's layout -======================= - -This is the layout I used to use on my [ErgoDox EZ][ez], while I was using [QMK][qmk]. I no longer do so, and this repository is obsolete, and not updated anymore. My current firmware is based on [Kaleidoscope][kaleidoscope], and is located [elsewhere][ergodox-sketch]. I'm keeping the repo around for historical and educational purposes. - - [kaleidoscope]: https://github.com/keyboardio/Kaleidoscope - [ergodox-sketch]: https://git.madhouse-project.org/algernon/ErgoDox-sketch - -Nevertheless, this is an unconventional layout for the [ErgoDox EZ][ez]. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox]. - - [ez]: https://ergodox-ez.com/ - [blog-ergodox]: https://asylum.madhouse-project.org/blog/tags/ergodox/ - -Some of the things in the layout only work when one uses [Spacemacs][spacemacs] and [GNOME][gnome] under Linux. Your mileage may vary. - - [spacemacs]: http://spacemacs.org/ - [gnome]: https://www.gnome.org/ - -## Table of Contents - -* [Layouts](#layouts) - - [Base layer](#base-layer) - - [ADORE layer](#adore-layer) - - [Steno layer](#steno-layer) - - [LED states](#led-states) -* [Tools](#tools) - - [Heatmap](#heatmap) - - [Layer notification](#layer-notification) -* [Special features](#special-features) - - [Unicode Symbol Input](#unicode-symbol-input) -* [Building](#building) - - [Using on Windows](#using-on-windows) -* [Changelog](https://github.com/algernon/ergodox-layout/blob/master/NEWS.md#readme) -* [License](#license) - -# Layouts - -## Base layer - -[![Base layer](https://github.com/algernon/ergodox-layout/raw/master/images/base-layer.png)](http://www.keyboard-layout-editor.com/#/gists/28f7eb305fdbff943613e1dc7aa9e82b) - -At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave: - -* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer. -* The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. -* The `GUI` key is special, because while a single tap works as usual, when double-tapped, it turns the number row into an application selector, and when triple tapped, it runs an application selector program on the host. -* The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. -* The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. -* The **Fx** key is one-shot, and activates the **Media** layer, along with a one-shot `Alt`. -* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. -* Tapping the `:` key once yields `:`, tapping it twice yields `;`. -* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. -* The **Lead** key allows me to type in a sequence of keys, and trigger some actions: - - `LEAD l` uses the unicode input method to enter a `λ`. - - `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯` - - `LEAD y` types `\o/`. - - `LEAD w m` maximises the currently focused window. - - `LEAD a` makes the [ADORE layer](#adore-layer) the default. - - `LEAD v` prints the firmware version, the keyboard and the keymap. - - `LEAD d` toggles logging keypress positions to the HID console. - - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. - - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. - - `LEAD r` inputs `Right Alt`, which is the `Compose` key of my choice. - -The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front. - -## ADORE layer - -[![ADORE layer](https://github.com/algernon/ergodox-layout/raw/master/images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a) - -My experimental layout, that I keep tweaking. No full description here, because things are very much in flux. - -Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default. - -## Steno layer - -[![Steno layer for Plover](https://github.com/algernon/ergodox-layout/raw/master/images/steno-layer.png)](http://www.keyboard-layout-editor.com/#/gists/401ef9a84369e47c57f9aedcf0a0d667) - -This is to be used with [Plover](http://www.openstenoproject.org/plover/), nothing really fancy here. The **STENO** key toggles the layer on and off, and sends the toggle command to Plover too. - -## LED states - -The primary purpose of the LEDs is to show the modifier status, a secondary, to show which layer is active. Each modifier, `Shift`, `Alt` and `Control` each have their designated LEDs: the *red*, *green* and *blue*, respectively. When a modifier is in a one-shot state, the respective LED will turn on with a dimmer light. If the modifier is toggled on, the brightness of the LED turns full. - -For the layers, the following rules apply: - -* When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. -* When the **Hungarian** layer is active, the *green* and *blue* LEDs are on. -* When the **Media** layer is active, the *red* and *green* ones are on. -* When the **ARROW** layer is active, the *red* and *blue* ones are on. -* For the [Steno layer](#steno-layer), all LEDs will be turned on. - -Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on. - -# Special features - -## Unicode Symbol Input - -Once in the Unicode Symbol Input mode, one is able to type in symbol names, press `Enter` or `Space`, and get the Unicode symbol itself back. When in the mode, a capital `U` is printed first. Once the sequence is finished, all of it is erased by sending enough `Backspace` taps, and the firmware starts the OS-specific unicode input sequence. Then, it looks up the symbol name, and enters the associated code. If it is not found, it will just replay the pressed keycodes. - -For the list of supported symbols, please see the source. - -This is an experimental feature, and may or may not work reliably. - -# Tools - -## Heatmap - -When the keypress logging functionality is enabled (by `LEAD d`), the keyboard will output a line every time a key is pressed, containing the position of the key in the matrix. This allows one to collect this information, and build analytics over it, such as a heat map, including dead keys too. - -Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, either pipe the output of `hid_listen` into it, or pipe it an already saved log, and it will save the results into files in an output directory (given on the command-line). See the output of `tools/log-to-heatmap.py --help` for more information. - - [kle]: http://www.keyboard-layout-editor.com/ - -The generated heatmap looks somewhat like this: - - ![Heatmap](https://github.com/algernon/ergodox-layout/raw/master/images/heatmap.png) - -## Layer notification - -There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example. - -# Building - -To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `layouts/community/algernon_master`, or symlinked there. One way to achieve that is this: - - [algernon:ez-layout]: https://github.com/algernon/ergodox-layout - [qmk]: https://github.com/qmk/qmk_firmware - -``` -$ git clone https://github.com/qmk/qmk_firmware.git -$ cd qmk_firmware -$ git clone https://github.com/algernon/ergodox-layout.git \ - layouts/community/ergodox/algernon_master -$ make ergodox_ez:algernon_master -``` - -From time to time, updates may be submitted back to the QMK repository. If you are reading it there, you can build the firmware like any other firmware included with it (assuming you are in the root directory of the firmware): - -``` -$ make ergodox_ez:algernon -``` - -## Using on Windows - -The keymap default to forcing NKRO, which seems to upset Windows, and except the modifiers, none of them work. If you experience this problem, recompile the firmware with `FORCE_NKRO=no` added to the `make` command line. - -# License - -The layout, being a derivative of the original TMK firmware which is under the GPL-2+, this layout is under the GPL as well, but GPL-3+, rather than the older version. diff --git a/layouts/community/ergodox/algernon/rules.mk b/layouts/community/ergodox/algernon/rules.mk deleted file mode 100644 index e8972cf1003..00000000000 --- a/layouts/community/ergodox/algernon/rules.mk +++ /dev/null @@ -1,43 +0,0 @@ -BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -COMMAND_ENABLE=no -SLEEP_LED_ENABLE=no -FORCE_NKRO ?= yes -DEBUG_ENABLE = no -CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes -KEYLOGGER_ENABLE ?= yes -UCIS_ENABLE = yes -MOUSEKEY_ENABLE = no -LEADER_ENABLE = yes -RGBLIGHT_ENABLE = no - -AUTOLOG_ENABLE ?= yes - -ifeq (${FORCE_NKRO},yes) -OPT_DEFS += -DFORCE_NKRO -endif - -ifeq (${AUTOLOG_ENABLE},yes) -KEYLOGGER_ENABLE = yes -OPT_DEFS += -DAUTOLOG_ENABLE -endif - -ifeq (${KEYLOGGER_ENABLE},yes) -OPT_DEFS += -DKEYLOGGER_ENABLE -CONSOLE_ENABLE = yes -endif - -OPT_DEFS += -DUSER_PRINT - -LAYOUT_ergodox_VERSION = $(shell \ - if [ -d "${LAYOUT_ergodox_PATH}/.git" ]; then \ - cd "${LAYOUT_ergodox_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ - else echo QMK; fi) - -LAYOUT_ergodox_BRANCH = $(shell \ - if [ -d "${LAYOUT_ergodox_PATH}/.git" ]; then \ - cd "${LAYOUT_ergodox_PATH}"; \ - fi; \ - git rev-parse --abbrev-ref HEAD 2>/dev/null) - -OPT_DEFS += -DLAYOUT_ergodox_VERSION=\"$(LAYOUT_ergodox_VERSION)\\\#$(LAYOUT_ergodox_BRANCH)\" diff --git a/layouts/community/ergodox/algernon/tools/heatmap-layout.ADORE.json b/layouts/community/ergodox/algernon/tools/heatmap-layout.ADORE.json deleted file mode 100644 index e09efecc466..00000000000 --- a/layouts/community/ergodox/algernon/tools/heatmap-layout.ADORE.json +++ /dev/null @@ -1,486 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n5\nF5", - { - "x": 10.5, - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n4\nF4" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n7\nF7", - { - "x": 1 - }, - "^\n3\nF3", - { - "x": 8.5 - }, - "!\n2\nF2", - { - "x": 1 - }, - "&\n6\nF6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "$\n1\nF1", - { - "a": 7, - "f": 3 - }, - "F11", - { - "x": 4.5, - "f": 3 - }, - "Fx", - { - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "%\n0\nF10" - ], - [ - { - "y": -0.875, - "f": 9, - "a": 6, - "w": 1.5 - }, - "\n\n", - { - "f": 3, - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - " \n9\nF9", - { - "x": 14.5 - }, - " \n8\nF8", - { - "a": 7, - "w": 1.5 - }, - "STENO" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 6 - }, - "C", - { - "x": 10.5 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 6 - }, - "W", - { - "x": 1, - "a": 6 - }, - "H", - { - "x": 8.5 - }, - "G", - { - "x": 1 - }, - "P" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F", - { - "a": 4, - "fa": [0, 0, 0], - "h": 1.5 - }, - "{\n(\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n)\n]", - { - "a": 6 - }, - "M" - ], - [ - { - "y": -0.875, - "f": 3, - "a": 4, - "w": 1.5 - }, - "\n\n|\n\\", - { - "a": 6, - "f": 3 - }, - "X", - { - "x": 14.5, - "a": 4 - }, - "/\n?", - { - "a": 4, - "w": 1.5 - }, - "~\n`" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "O", - { - "x": 1, - "n": true - }, - "I", - { - "x": 8.5, - "n": true - }, - "R", - { - "x": 1 - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "U", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "a": 7, - "f": 9, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 10.5, - "a": 6, - "f": 3 - }, - "V" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 6 - }, - "Q", - { - "x": 1, - "a": 4 - }, - "<\n,", - { - "x": 8.5, - "a": 6 - }, - "K", - { - "x": 1 - }, - "Y" - ], - [ - { - "y": -0.875, - "x": 5.5, - "a": 4 - }, - ">\n.", - { - "x": 6.5, - "a": 6 - }, - "B" - ], - [ - { - "y": -0.875, - "f": 9, - "w": 1.5, - "g": true - }, - "", - { - "a": 6, - "f": 3, - "g": false - }, - "Z", - { - "x": 14.5 - }, - "J", - { - "f": 9, - "g": true, - "w": 1.5, - "a": 4 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2 - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "f": 2 - }, - "MEDIA", - {}, - "DEL" - ], - [ - { - "x": -3 - }, - "HUN", - { - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "f": 2 - }, - "LEAD" - ] -] diff --git a/layouts/community/ergodox/algernon/tools/heatmap-layout.Dvorak.json b/layouts/community/ergodox/algernon/tools/heatmap-layout.Dvorak.json deleted file mode 100644 index 1e53281c565..00000000000 --- a/layouts/community/ergodox/algernon/tools/heatmap-layout.Dvorak.json +++ /dev/null @@ -1,477 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n5\nF5", - { - "x": 10.5, - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n4\nF4" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n7\nF7", - { - "x": 1 - }, - "^\n3\nF3", - { - "x": 8.5 - }, - "!\n2\nF2", - { - "x": 1 - }, - "&\n6\nF6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "$\n1\nF1", - { - "a": 7, - "f": 3 - }, - "F11", - { - "x": 4.5, - "f": 3 - }, - "Fx", - { - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "%\n0\nF10" - ], - [ - { - "y": -0.875, - "f": 6, - "a": 6, - "w": 1.5 - }, - "\n\n", - { - "f": 3, - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - - }, - " \n9\nF9", - { - "x": 14.5 - }, - " \n8\nF8", - { - "a": 7, - "w": 1.5 - }, - "STENO" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 4 - }, - ">\n.", - { - "x": 10.5, - "a": 6 - }, - "C" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "<\n,", - { - "x": 1, - "a": 6 - }, - "P", - { - "x": 8.5 - }, - "G", - { - "x": 1 - }, - "R" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "Y", - { - "a": 4, - "h": 1.5 - }, - "{\n(\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n)\n]", - { - "a": 6 - }, - "F" - ], - [ - { - "y": -0.875, - "f": 3, - "a": 4, - "w": 1.5 - }, - "\n\n~\n`", - { - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 14.5, - "a": 6 - }, - "L", - { - "a": 4, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "O", - { - "x": 1, - "n": true - }, - "U", - { - "x": 8.5, - "n": true - }, - "H", - { - "x": 1 - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "I", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "a": 7, - "f": 9, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "f": 3, - "a": 6 - }, - "J", - { - "x": 10.5 - }, - "W" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "Q", - { - "x": 1 - }, - "K", - { - "x": 8.5 - }, - "M", - { - "x": 1 - }, - "V" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "X", - { - "x": 6.5 - }, - "B" - ], - [ - { - "y": -0.875, - "f": 9, - "w": 1.5 - }, - "\n\n", - { - "a": 4, - "f": 3 - }, - "?\n/", - { - "x": 14.5, - "a": 6 - }, - "Z", - { - "f": 9, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2 - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "f": 2 - }, - "MEDIA", - {}, - "DEL" - ], - [ - { - "x": -3 - }, - "LEAD", - { - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "f": 2 - }, - "HUN" - ] -] diff --git a/layouts/community/ergodox/algernon/tools/hid-commands b/layouts/community/ergodox/algernon/tools/hid-commands deleted file mode 100755 index 86bff2978ea..00000000000 --- a/layouts/community/ergodox/algernon/tools/hid-commands +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/bash -set -e - -LAST_APPSEL_START=0 - -cmd_wm () { - WIN="$(xdotool getactivewindow)" - wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz - xdotool windowsize ${WIN} 100% 100% - wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz -} - -cmd_appsel_helper () { - rofi -show window -} - -_cmd_appsel () { - wmctrl -x -a $1 || true - xdotool key Escape -} - -cmd_appsel_music () { - wmctrl -x -a rhythmbox || wmctrl -x -a spotify || \ - wmctrl -x -a banshee || wmctrl -x -a kodi || \ - wmctrl -x -a plex || true - xdotool key Escape -} - -cmd_appsel_slack () { - wmctrl -x -a slack || wmctrl -x -a Mstdn || true - xdotool key Escape -} - -cmd_appsel_emacs () { - _cmd_appsel emacs -} - -cmd_appsel_term () { - _cmd_appsel gnome-terminal -} - -cmd_appsel_chrome () { - wmctrl -x -a chrom || wmctrl -x -a Chrome || true - xdotool key Escape -} - -cmd_appsel_start () { - if [ ! -z "${DISABLE_APPSEL_START}" ]; then - return - fi - - APPSEL_START=$(date +%s) - if [ $APPSEL_START -lt $(expr $LAST_APPSEL_START + 10) ]; then - return - fi - LAST_APPSEL_START=$APPSEL_START - notify-send -t 1000 "Please select an application!" -c device -u low \ - -i /usr/share/icons/Adwaita/24x24/devices/video-display.png -} - -cmd_appsel_social () { - # Save the current window - a=$(xdotool getactivewindow) - # Raise & Focus Mstdn & Tweetdeck - wmctrl -x -a trunk.mad-scientist.club.Google-chrome || true; wmctrl -x -a tweetdeck || true - # Focus the previously active window - xdotool windowfocus $a || true; xdotool windowactivate $a || true - - xdotool key Escape -} - -cmd_appsel_social2 () { - # Save the current window - a=$(xdotool getactivewindow) - # Raise & Focus Viber & Signal - wmctrl -x -a Viber || true; wmctrl -a Signal || true - # Focus the previously active window - xdotool windowfocus $a || true; xdotool windowactivate $a || true - - xdotool key Escape -} - -cmd_appsel_pwmgr () { - _cmd_appsel keepass -} - -cmd_reflash () { - teensy_loader_cli -v -w ~/src/ext/qmk_firmware/algernon.hex --mcu atmega32u4 || true -} - -cmd_help () { - cat </dev/null 2>&1; then - cmd_${cmd} - fi -done diff --git a/layouts/community/ergodox/algernon/tools/log-to-heatmap.py b/layouts/community/ergodox/algernon/tools/log-to-heatmap.py deleted file mode 100755 index 5f52d9932ba..00000000000 --- a/layouts/community/ergodox/algernon/tools/log-to-heatmap.py +++ /dev/null @@ -1,342 +0,0 @@ -#! /usr/bin/env python3 -import json -import os -import sys -import re -import argparse -import time - -from math import floor -from os.path import dirname -from blessings import Terminal - -class Heatmap(object): - coords = [ - [ - # Row 0 - [ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2], - [ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6], - ], - [ - # Row 1 - [ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2], - [ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6], - ], - [ - # Row 2 - [12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ], - [ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6], - ], - [ - # Row 3 - [17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0], - [13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6], - ], - [ - # Row 4 - [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], - [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], [] - ], - [ - # Row 5 - [ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2], - [24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ], - ], - ] - - def set_attr_at(self, block, n, attr, fn, val): - blk = self.heatmap[block][n] - if attr in blk: - blk[attr] = fn(blk[attr], val) - else: - blk[attr] = fn(None, val) - - def coord(self, col, row): - return self.coords[row][col] - - @staticmethod - def set_attr(orig, new): - return new - - def set_bg(self, coords, color): - (block, n) = coords - self.set_attr_at(block, n, "c", self.set_attr, color) - #self.set_attr_at(block, n, "g", self.set_attr, False) - - def set_tap_info(self, coords, count, cap): - (block, n) = coords - def _set_tap_info(o, _count, _cap): - ns = 4 - o.count ("\n") - return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) - - if not cap: - cap = 1 - self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap) - - @staticmethod - def heatmap_color (v): - colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]] - fb = 0 - if v <= 0: - idx1, idx2 = 0, 0 - elif v >= 1: - idx1, idx2 = len(colors) - 1, len(colors) - 1 - else: - val = v * (len(colors) - 1) - idx1 = int(floor(val)) - idx2 = idx1 + 1 - fb = val - float(idx1) - - r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0] - g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] - b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] - - r, g, b = [x * 255 for x in (r, g, b)] - return "#%02x%02x%02x" % (int(r), int(g), int(b)) - - def __init__(self, layout): - self.log = {} - self.total = 0 - self.max_cnt = 0 - self.layout = layout - - def update_log(self, coords): - (c, r) = coords - if not (c, r) in self.log: - self.log[(c, r)] = 0 - self.log[(c, r)] = self.log[(c, r)] + 1 - self.total = self.total + 1 - if self.max_cnt < self.log[(c, r)]: - self.max_cnt = self.log[(c, r)] - - def get_heatmap(self): - with open("%s/heatmap-layout.%s.json" % (dirname(sys.argv[0]), self.layout), "r") as f: - self.heatmap = json.load (f) - - ## Reset colors - for row in self.coords: - for coord in row: - if coord != []: - self.set_bg (coord, "#d9dae0") - - for (c, r) in self.log: - coords = self.coord(c, r) - cap = self.max_cnt - if cap == 0: - cap = 1 - v = float(self.log[(c, r)]) / cap - self.set_bg (coords, self.heatmap_color (v)) - self.set_tap_info (coords, self.log[(c, r)], self.total) - return self.heatmap - - def get_stats(self): - usage = [ - # left hand - [0, 0, 0, 0, 0], - # right hand - [0, 0, 0, 0, 0] - ] - finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4] - for (c, r) in self.log: - if r == 5: # thumb cluster - if c <= 6: # left side - usage[0][4] = usage[0][4] + self.log[(c, r)] - else: - usage[1][0] = usage[1][0] + self.log[(c, r)] - elif r == 4 and (c == 4 or c == 9): # bottom row thumb keys - if c <= 6: # left side - usage[0][4] = usage[0][4] + self.log[(c, r)] - else: - usage[1][0] = usage[1][0] + self.log[(c, r)] - else: - fc = c - hand = 0 - if fc >= 7: - hand = 1 - fm = finger_map[fc] - usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] - hand_usage = [0, 0] - for f in usage[0]: - hand_usage[0] = hand_usage[0] + f - for f in usage[1]: - hand_usage[1] = hand_usage[1] + f - - total = self.total - if total == 0: - total = 1 - stats = { - "total-keys": total, - "hands": { - "left": { - "usage": round(float(hand_usage[0]) / total * 100, 2), - "fingers": { - "pinky": 0, - "ring": 0, - "middle": 0, - "index": 0, - "thumb": 0, - } - }, - "right": { - "usage": round(float(hand_usage[1]) / total * 100, 2), - "fingers": { - "thumb": 0, - "index": 0, - "middle": 0, - "ring": 0, - "pinky": 0, - } - }, - } - } - - hmap = ['left', 'right'] - fmap = ['pinky', 'ring', 'middle', 'index', 'thumb', - 'thumb', 'index', 'middle', 'ring', 'pinky'] - for hand_idx in range(len(usage)): - hand = usage[hand_idx] - for finger_idx in range(len(hand)): - stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2) - return stats - -def dump_all(out_dir, heatmaps): - stats = {} - t = Terminal() - t.clear() - sys.stdout.write("\x1b[2J\x1b[H") - - print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir)) - - keys = list(heatmaps.keys()) - keys.sort() - - for layer in keys: - if len(heatmaps[layer].log) == 0: - continue - - with open ("%s/%s.json" % (out_dir, layer), "w") as f: - json.dump(heatmaps[layer].get_heatmap(), f) - stats[layer] = heatmaps[layer].get_stats() - - left = stats[layer]['hands']['left'] - right = stats[layer]['hands']['right'] - - print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer, - total=int(stats[layer]['total-keys'] / 2))) - print (('{t.underline} | ' + \ - 'left ({l[usage]:6.2f}%) | ' + \ - 'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right)) - print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \ - ' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \ - ' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \ - ' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \ - ' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \ - '').format(left=left['fingers'], right=right['fingers'], t=t)) - -def process_line(line, heatmaps, opts, stamped_log = None): - m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) - if not m: - return False - if stamped_log is not None: - if line.startswith("KL:"): - print ("%10.10f %s" % (time.time(), line), - file = stamped_log, end = '') - else: - print (line, - file = stamped_log, end = '') - stamped_log.flush() - - (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) - if (c, r) not in opts.allowed_keys: - return False - - heatmaps[l].update_log ((c, r)) - - return True - -def setup_allowed_keys(opts): - if len(opts.only_key): - incmap={} - for v in opts.only_key: - m = re.search ('(\d+),(\d+)', v) - if not m: - continue - (c, r) = (int(m.group(1)), int(m.group(2))) - incmap[(c, r)] = True - else: - incmap={} - for r in range(0, 6): - for c in range(0, 14): - incmap[(c, r)] = True - - for v in opts.ignore_key: - m = re.search ('(\d+),(\d+)', v) - if not m: - continue - (c, r) = (int(m.group(1)), int(m.group(2))) - del(incmap[(c, r)]) - - return incmap - -def main(opts): - heatmaps = {"Dvorak": Heatmap("Dvorak"), - "ADORE": Heatmap("ADORE") - } - cnt = 0 - out_dir = opts.outdir - - if not os.path.exists(out_dir): - os.makedirs(out_dir) - - opts.allowed_keys = setup_allowed_keys(opts) - - if not opts.one_shot: - - try: - with open("%s/stamped-log" % out_dir, "r") as f: - while True: - line = f.readline() - if not line: - break - if not process_line(line, heatmaps, opts): - continue - except Exception: - pass - - stamped_log = open ("%s/stamped-log" % (out_dir), "a+") - else: - stamped_log = None - - while True: - line = sys.stdin.readline() - if not line: - break - if not process_line(line, heatmaps, opts, stamped_log): - continue - - cnt = cnt + 1 - - if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot: - cnt = 0 - dump_all(out_dir, heatmaps) - - dump_all (out_dir, heatmaps) - -if __name__ == "__main__": - parser = argparse.ArgumentParser (description = "keylog to heatmap processor") - parser.add_argument ('outdir', action = 'store', - help = 'Output directory') - parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, - default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') - parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str, - default = [], help = 'Ignore the key at position (x, y)') - parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str, - default = [], help = 'Only include key at position (x, y)') - parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true', - help = 'Do not load previous data, and do not update it, either.') - args = parser.parse_args() - if len(args.ignore_key) and len(args.only_key): - print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!", - file = sys.stderr) - sys.exit(1) - main(args) diff --git a/layouts/community/ergodox/algernon/tools/text-to-log.py b/layouts/community/ergodox/algernon/tools/text-to-log.py deleted file mode 100755 index ba60a2e281d..00000000000 --- a/layouts/community/ergodox/algernon/tools/text-to-log.py +++ /dev/null @@ -1,106 +0,0 @@ -#!/usr/bin/env python3 - -import sys - -charmap = { - '9': [[1, 0]], - '7': [[2, 0]], '@': [[2, 5], [2, 0]], - '5': [[3, 0]], '*': [[2, 5], [3, 0]], - '3': [[4, 0]], '^': [[2, 5], [4, 0]], - '1': [[5, 0]], '$': [[2, 5], [5, 0]], - '0': [[8, 0]], '%': [[2, 5], [8, 0]], - '2': [[9, 0]], '!': [[2, 5], [9, 0]], - '4': [[10, 0]], '#': [[2, 5], [10, 0]], - '6': [[11, 0]], '&': [[2, 5], [11, 0]], - '8': [[12, 0]], - - '\\': [[0, 1]], '|': [[2, 5], [0, 1]], - 'x': [[1, 1]], 'X': [[2, 5], [1, 1]], - 'w': [[2, 1]], 'W': [[2, 5], [2, 1]], - 'c': [[3, 1]], 'C': [[2, 5], [3, 1]], - 'h': [[4, 1]], 'H': [[2, 5], [4, 1]], - 'f': [[5, 1]], 'F': [[2, 5], [5, 1]], - '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]], - ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]], - 'm': [[8, 1]], 'M': [[2, 5], [8, 1]], - 'g': [[9, 1]], 'G': [[2, 5], [9, 1]], - 'l': [[10, 1]], 'L': [[2, 5], [10, 1]], - 'p': [[11, 1]], 'P': [[2, 5], [11, 1]], - '/': [[12, 1]], '?': [[2, 5], [12, 1]], - '`': [[13, 1]], '~': [[2, 5], [13, 1]], - - '\t': [[0, 2]], - 'a': [[1, 2]], 'A': [[2, 5], [1, 2]], - 'o': [[2, 2]], 'O': [[2, 5], [2, 2]], - 'e': [[3, 2]], 'E': [[2, 5], [3, 2]], - 'i': [[4, 2]], 'I': [[2, 5], [4, 2]], - 'u': [[5, 2]], 'U': [[2, 5], [5, 2]], - 'd': [[8, 2]], 'D': [[2, 5], [8, 2]], - 'r': [[9, 2]], 'R': [[2, 5], [9, 2]], - 't': [[10, 2]], 'T': [[2, 5], [10, 2]], - 'n': [[11, 2]], 'N': [[2, 5], [11, 2]], - 's': [[12, 2]], 'S': [[2, 5], [12, 2]], - '=': [[13, 2]], '+': [[2, 5], [13, 2]], - - 'z': [[1, 3]], 'Z': [[2, 5], [1, 3]], - 'q': [[2, 3]], 'Q': [[2, 5], [2, 3]], - '\'': [[3, 3]], '"': [[2, 5], [3, 3]], - ',': [[4, 3]], '<': [[2, 5], [4, 3]], - '.': [[5, 3]], '>': [[2, 5], [5, 3]], - 'b': [[8, 3]], 'B': [[2, 5], [8, 3]], - 'k': [[9, 3]], 'K': [[2, 5], [9, 3]], - 'v': [[10, 3]], 'V': [[2, 5], [10, 3]], - 'y': [[11, 3]], 'Y': [[2, 5], [11, 3]], - 'j': [[12, 3]], 'J': [[2, 5], [12, 3]], - - ':': [[4, 4]], ';': [[4, 4], [4, 4]], - '-': [[9, 4]], '_': [[2, 5], [9, 4]], - - ' ': [[10, 5]], - '\n': [[11, 5]], - - ## Layered things - # Hungarian - 'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]], - 'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]], - 'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]], - 'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]], - 'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]], - 'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]], - 'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]], - 'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]], - 'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]], -} - -def lookup_char(layer, ch): - if ch in charmap: - return charmap[ch] - return None - -def process_char(layer, ch, out=sys.stdout): - keys = lookup_char(layer, ch) - if not keys: - print ("Unknown char: %s" % ch, file=sys.stderr) - else: - for (c, r) in keys: - print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out) - print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out) - -def process_file(fn, layer, out=sys.stdout): - with open(fn, "r") as f: - ch = f.read(1) - while ch: - process_char(layer, ch, out) - ch = f.read(1) - -if sys.argv[1] == '-': - out='/dev/stdin' -else: - out=sys.argv[1] - -if len(sys.argv) >= 2: - layer = 'ADORE' -else: - layer = sys.argv[2] - -process_file(out, layer = layer) diff --git a/layouts/community/ergodox/belak/keymap.c b/layouts/community/ergodox/belak/keymap.c index bca0dec913f..de0fe1b1aef 100644 --- a/layouts/community/ergodox/belak/keymap.c +++ b/layouts/community/ergodox/belak/keymap.c @@ -33,11 +33,6 @@ enum belak_keycodes { E_TSET, }; -inline void tap(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -}; - // TODO: Add LED support to the tap dance by using the advanced macro #define LTOGGLE TD(TD_LAYER_TOGGLE) @@ -273,17 +268,17 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case E_SHRUG: // ¯\_(ツ)_/¯ if (record->event.pressed) { process_unicode((0x00AF|QK_UNICODE), record); // Hand - tap(KC_BSLS); // Arm + tap_code16(KC_BSLS); // Arm register_code(KC_RSFT); - tap(KC_UNDS); // Arm - tap(KC_LPRN); // Head + tap_code16(KC_UNDS); // Arm + tap_code16(KC_LPRN); // Head unregister_code(KC_RSFT); process_unicode((0x30C4|QK_UNICODE), record); // Face register_code(KC_RSFT); - tap(KC_RPRN); // Head - tap(KC_UNDS); // Arm + tap_code16(KC_RPRN); // Head + tap_code16(KC_UNDS); // Arm unregister_code(KC_RSFT); - tap(KC_SLSH); // Arm + tap_code16(KC_SLSH); // Arm process_unicode((0x00AF|QK_UNICODE), record); // Hand } return false; @@ -291,19 +286,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case E_TFLIP: // (╯°□°)╯ ︵ ┻━┻ if (record->event.pressed) { register_code(KC_RSFT); - tap(KC_9); + tap_code16(KC_9); unregister_code(KC_RSFT); process_unicode((0x256F|QK_UNICODE), record); // Arm process_unicode((0x00B0|QK_UNICODE), record); // Eye process_unicode((0x25A1|QK_UNICODE), record); // Mouth process_unicode((0x00B0|QK_UNICODE), record); // Eye register_code(KC_RSFT); - tap(KC_0); + tap_code16(KC_0); unregister_code(KC_RSFT); process_unicode((0x256F|QK_UNICODE), record); // Arm - tap(KC_SPC); + tap_code16(KC_SPC); process_unicode((0x0361|QK_UNICODE), record); // Flippy - tap(KC_SPC); + tap_code16(KC_SPC); process_unicode((0x253B|QK_UNICODE), record); // Table process_unicode((0x2501|QK_UNICODE), record); // Table process_unicode((0x253B|QK_UNICODE), record); // Table @@ -316,18 +311,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { process_unicode((0x2500|QK_UNICODE), record); // Table process_unicode((0x2500|QK_UNICODE), record); // Table process_unicode((0x252C|QK_UNICODE), record); // Table - tap(KC_SPC); + tap_code16(KC_SPC); process_unicode((0x30CE|QK_UNICODE), record); // Arm register_code(KC_RSFT); - tap(KC_9); + tap_code16(KC_9); unregister_code(KC_RSFT); - tap(KC_SPC); + tap_code16(KC_SPC); process_unicode((0x309C|QK_UNICODE), record); // Eye - tap(KC_MINS); + tap_code16(KC_MINS); process_unicode((0x309C|QK_UNICODE), record); // Eye process_unicode((0x30CE|QK_UNICODE), record); // Arm register_code(KC_RSFT); - tap(KC_0); + tap_code16(KC_0); unregister_code(KC_RSFT); } return false; diff --git a/layouts/community/ergodox/belak/visualizer.c b/layouts/community/ergodox/belak/visualizer.c deleted file mode 100644 index b92890a668a..00000000000 --- a/layouts/community/ergodox/belak/visualizer.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -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 . -*/ - -// Currently we are assuming that both the backlight and LCD are enabled -// But it's entirely possible to write a custom visualizer that use only -// one of them -#ifndef LCD_BACKLIGHT_ENABLE -#error This visualizer needs that LCD backlight is enabled -#endif - -#ifndef LCD_ENABLE -#error This visualizer needs that LCD is enabled -#endif - -#include "simple_visualizer.h" - -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - uint8_t saturation = 60; - if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - saturation = 255; - } - - if (state->status.layer & 0x4) { - state->target_lcd_color = LCD_COLOR(0, saturation, 0xFF); - state->layer_text = "Media"; - } - else if (state->status.layer & 0x2) { - state->target_lcd_color = LCD_COLOR(168, saturation, 0xFF); - state->layer_text = "Symbols"; - } - else { - state->target_lcd_color = LCD_COLOR(84, saturation, 0xFF); - state->layer_text = "Base"; - } -} diff --git a/layouts/community/ergodox/choromanski/visualizer.c b/layouts/community/ergodox/choromanski/visualizer.c deleted file mode 100644 index e207c66822e..00000000000 --- a/layouts/community/ergodox/choromanski/visualizer.c +++ /dev/null @@ -1,62 +0,0 @@ -/* -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 . -*/ - -#include "simple_visualizer.h" - -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - - if (state->status.layer & 0x20) { - //GREEN - state->target_lcd_color = LCD_COLOR(85, 255, 128); - state->layer_text = "Gaming"; - } - else if (state->status.layer & 0x10) { - //ORANGE - state->target_lcd_color = LCD_COLOR(28, 255, 230); - state->layer_text = "Numpad & Mouse"; - } - else if (state->status.layer & 0x8) { - //YELLOW - state->target_lcd_color = LCD_COLOR(38, 255, 230); - state->layer_text = "Symbols"; - } - else if (state->status.layer & 0x4) { - //RED - state->target_lcd_color = LCD_COLOR(0, 255, 95); - if (state->status.layer & 0x2){ - state->layer_text = "Qwerty - Fn"; - }else{ - state->layer_text = "Colemak - Fn"; - } - } - else if (state->status.layer & 0x2) { - //BLUE - state->target_lcd_color = LCD_COLOR(149, 255, 192); - state->layer_text = "Qwerty"; - } - else { - //PURPLE - state->target_lcd_color = LCD_COLOR(200, 255, 192); - state->layer_text = "Colemak"; - } -} - diff --git a/layouts/community/ergodox/dragon788/keymap.c b/layouts/community/ergodox/dragon788/keymap.c index e7778648516..956a592b6d8 100644 --- a/layouts/community/ergodox/dragon788/keymap.c +++ b/layouts/community/ergodox/dragon788/keymap.c @@ -164,7 +164,7 @@ LAYOUT_ergodox( KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_FN4, KC_NO, + KC_NO, KC_NO, KC_NO, KC_C, KC_V, KC_NO, // right hand diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c index dd47899d7ad..3c9bcfeaa26 100644 --- a/layouts/community/ergodox/drashna/keymap.c +++ b/layouts/community/ergodox/drashna/keymap.c @@ -186,20 +186,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef PIMORONI_TRACKBALL_ENABLE void run_trackball_cleanup(void) { - if (trackball_is_scrolling()) { - trackball_set_rgbw(RGB_CYAN, 0x00); - } else if (trackball_get_precision() != 1.0) { - trackball_set_rgbw(RGB_GREEN, 0x00); - } else { - trackball_set_rgbw(RGB_MAGENTA, 0x00); - } + // if (trackball_is_scrolling()) { + // trackball_set_rgbw(RGB_CYAN, 0x00); + // } else if (trackball_get_precision() != 1.0) { + // trackball_set_rgbw(RGB_GREEN, 0x00); + // } else { + // trackball_set_rgbw(RGB_MAGENTA, 0x00); + // } } void keyboard_post_init_keymap(void) { // trackball_set_precision(1.5); - trackball_set_rgbw(RGB_MAGENTA, 0x00); + // trackball_set_rgbw(RGB_MAGENTA, 0x00); } -void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } +// void shutdown_keymap(void) { trackball_set_rgbw(RGB_RED, 0x00); } static bool mouse_button_one, trackball_button_one; @@ -244,16 +244,16 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { break; #ifdef PIMORONI_TRACKBALL_ENABLE case PM_SCROLL: - trackball_set_scrolling(record->event.pressed); + // trackball_set_scrolling(record->event.pressed); run_trackball_cleanup(); break; case PM_PRECISION: - if (record->event.pressed) { - trackball_set_precision(1.5); - } else { - trackball_set_precision(1); - } - run_trackball_cleanup(); + // if (record->event.pressed) { + // trackball_set_precision(1.5); + // } else { + // trackball_set_precision(1); + // } + // run_trackball_cleanup(); break; # if !defined(MOUSEKEY_ENABLE) case KC_MS_BTN1: diff --git a/layouts/community/ergodox/drashna/rules.mk b/layouts/community/ergodox/drashna/rules.mk index 4c47e071334..853f1efd246 100644 --- a/layouts/community/ergodox/drashna/rules.mk +++ b/layouts/community/ergodox/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite TAP_DANCE_ENABLE = no COMMAND_ENABLE = no # Commands for debug and configuration CONSOLE_ENABLE = no diff --git a/layouts/community/ergodox/drashna/visualizer.c_old b/layouts/community/ergodox/drashna/visualizer.c_old deleted file mode 100644 index 6b1c3ff498b..00000000000 --- a/layouts/community/ergodox/drashna/visualizer.c_old +++ /dev/null @@ -1,77 +0,0 @@ -/* -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 . -*/ - -#include "./simple_visualizer.h" -#include "util.h" -#include "drashna.h" -#include "rgblight_list.h" - -#define LCD_COLOR_wrapper(...) LCD_COLOR(__VA_ARGS__) -// This function should be implemented by the keymap visualizer -// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing -// that the simple_visualizer assumes that you are updating -// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is -// stopped. This can be done by either double buffering it or by using constant strings -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - - switch(get_highest_layer(state->status.layer|default_layer_state)) { - case _LOWER: - state->layer_text = "Lower"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_GREEN); - break; - case _RAISE: - state->layer_text = "Raise"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_YELLOW); - break; - case _ADJUST: - state->layer_text = "Adjust"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_RED); - break; - case _MACROS: - state->layer_text = "Macros"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_ORANGE); - break; - case _MEDIA: - state->layer_text = "Media"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_CHARTREUSE); - break; - case _GAMEPAD: - state->layer_text = "Game"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_ORANGE); - break; - case _QWERTY: - state->layer_text = "QWERTY"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_CYAN); - break; - case _WORKMAN: - state->layer_text = "Workman"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_GOLDENROD); - break; - case _DVORAK: - state->layer_text = "Dvorak"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_SPRINGGREEN); - break; - case _COLEMAK: - state->layer_text = "Colemak"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_MAGENTA); - break; break; - default: - state->layer_text = "NONE"; - state->target_lcd_color = LCD_COLOR_wrapper(HSV_RED); - break; - } -} diff --git a/layouts/community/ergodox/dvorak_plover/keymap.c b/layouts/community/ergodox/dvorak_plover/keymap.c index 882a351d18a..989aafb90ab 100644 --- a/layouts/community/ergodox/dvorak_plover/keymap.c +++ b/layouts/community/ergodox/dvorak_plover/keymap.c @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_FN4, KC_NO, + KC_NO, KC_NO, KC_NO, KC_C, KC_V, KC_NO, // right hand diff --git a/layouts/community/ergodox/haegin/keymap.c b/layouts/community/ergodox/haegin/keymap.c index fbbe3e72e0f..c3c2afecb8c 100644 --- a/layouts/community/ergodox/haegin/keymap.c +++ b/layouts/community/ergodox/haegin/keymap.c @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, LT(MEDIA, KC_BSLS), KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, MEH_T(KC_NO), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, - ALT_T(KC_UP), KC_DOWN, KC_LBRC, KC_RBRC, KC_FN2, + ALT_T(KC_UP), KC_DOWN, KC_LBRC, KC_RBRC, KC_NO, KC_PGUP, CTL_T(KC_ESC), KC_PGDN, LCTL(KC_B), LT(MEDIA, KC_TAB), LT(SYMBOLS, KC_ENT) diff --git a/layouts/community/ergodox/jackhumbert/keymap.c b/layouts/community/ergodox/jackhumbert/keymap.c index 745d632d022..9d357881e23 100644 --- a/layouts/community/ergodox/jackhumbert/keymap.c +++ b/layouts/community/ergodox/jackhumbert/keymap.c @@ -85,11 +85,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) eeconfig_init(); } break; - case 2: - if (record->event.pressed) { // For resetting EEPROM - api_send_unicode(0x0CA0); - } - break; } return MACRO_NONE; }; diff --git a/layouts/community/ergodox/jjerrell/rules.mk b/layouts/community/ergodox/jjerrell/rules.mk index 4288a264c67..6f3150d7d42 100644 --- a/layouts/community/ergodox/jjerrell/rules.mk +++ b/layouts/community/ergodox/jjerrell/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite TAP_DANCE_ENABLE = no COMMAND_ENABLE = no CONSOLE_ENABLE = yes diff --git a/layouts/community/ergodox/kines-ish/keymap.c b/layouts/community/ergodox/kines-ish/keymap.c index 8acab5ca522..2d1513667f8 100644 --- a/layouts/community/ergodox/kines-ish/keymap.c +++ b/layouts/community/ergodox/kines-ish/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN2, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_NO, KC_LGUI, KC_RCTL, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC diff --git a/layouts/community/ergodox/mpiechotka/keymap.c b/layouts/community/ergodox/mpiechotka/keymap.c index 6a89e38a327..a83725519b3 100644 --- a/layouts/community/ergodox/mpiechotka/keymap.c +++ b/layouts/community/ergodox/mpiechotka/keymap.c @@ -1,21 +1,20 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" + #include "keymap_colemak.h" -enum { +enum layer_names { BASE = 0, BASE_CM, SYMB, MACR }; -enum { - LWIN = 1, - PC1, - PC2, - PC3, - PC4 +enum custom_keycodes { + LWIN = SAFE_RANGE, + KC_PC1, + KC_PC2, + KC_PC3, + KC_PC4 }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_EQL, LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - KC_LALT, F(LWIN), + KC_LALT, LWIN, KC_HOME, SFT_T(KC_SPC),CTL_T(KC_BSPC),LT(SYMB, KC_END), // right hand @@ -94,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, CM_A, CM_R, CM_S, CM_T, CM_D, KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, KC_EQL, LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - KC_LALT, F(LWIN), + KC_LALT, LWIN, KC_HOME, SFT_T(KC_SPC),CTL_T(KC_BSPC),LT(SYMB, KC_END), // right hand @@ -174,7 +173,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MACR] = LAYOUT_ergodox( KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, DF(BASE), DF(BASE_CM), KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, F(PC1), F(PC2), F(PC3), F(PC4), KC_NO, + KC_NO, KC_PC1, KC_PC2, KC_PC3, KC_PC4, 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_TRNS,KC_TRNS, @@ -192,72 +191,60 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [LWIN] = ACTION_MACRO(LWIN), - [PC1] = ACTION_MACRO(PC1), - [PC2] = ACTION_MACRO(PC2), - [PC3] = ACTION_MACRO(PC3), - [PC4] = ACTION_MACRO(PC4) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 0: - if (record->event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - case LWIN: - if (record->event.pressed) { - register_code(KC_RSFT); - unregister_code(KC_RSFT); - register_code(KC_LGUI); - } else { - unregister_code(KC_LGUI); - } - break; - case PC1: - if (!record->event.pressed) { - return MACRO(T(SLCK), W(50), T(SLCK), W(50), T(1), W(50), T(ENT), END); - } - break; - case PC2: - if (!record->event.pressed) { - return MACRO(T(SLCK), W(50), T(SLCK), W(50), T(2), W(50), T(ENT), END); - } - break; - case PC3: - if (!record->event.pressed) { - return MACRO(T(SLCK), W(50), T(SLCK), W(50), T(3), W(50), T(ENT), END); - } - break; - case PC4: - if (!record->event.pressed) { - return MACRO(T(SLCK), W(50), T(SLCK), W(50), T(4), W(50), T(ENT), END); - } - break; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LWIN: + if (record->event.pressed) { + tap_code(KC_RSFT); + register_code(KC_LGUI); + } else { + unregister_code(KC_LGUI); + } + return false; + case KC_PC1: + if (record->event.pressed) { + tap_code_delay(KC_SLCK, 50); + wait_ms(50); + tap_code_delay(KC_1, 50); + tap_code(KC_ENT); + } + return false; + case KC_PC2: + if (record->event.pressed) { + tap_code_delay(KC_SLCK, 50); + wait_ms(50); + tap_code_delay(KC_2, 50); + tap_code(KC_ENT); + } + return false; + case KC_PC3: + if (record->event.pressed) { + tap_code_delay(KC_SLCK, 50); + wait_ms(50); + tap_code_delay(KC_3, 50); + tap_code(KC_ENT); + } + return false; + case KC_PC4: + if (record->event.pressed) { + tap_code_delay(KC_SLCK, 50); + wait_ms(50); + tap_code_delay(KC_4, 50); + tap_code(KC_ENT); + } + return false; } - return MACRO_NONE; + return true; } -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { + + switch (get_highest_layer(layer_state)) { // TODO: Make this relevant to the ErgoDox EZ. case SYMB: ergodox_right_led_1_on(); @@ -269,4 +256,4 @@ void matrix_scan_user(void) { // none break; } -}; +} diff --git a/layouts/community/ergodox/ordinary/keymap.c b/layouts/community/ergodox/ordinary/keymap.c index 86ab8649100..8d0425e49b2 100644 --- a/layouts/community/ergodox/ordinary/keymap.c +++ b/layouts/community/ergodox/ordinary/keymap.c @@ -1,34 +1,12 @@ #include QMK_KEYBOARD_H -#include "led.h" -#include "mousekey.h" -#include "debug.h" -#include "action_layer.h" -#include "action_util.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols layer -#define MDIA 2 // media layer -#define SPEC 3 // special layer -#define RBASE 4 // reverse default layer - -#define LSymb 10 // left symbol-shift key -#define LMdia 11 // left media-shift key -#define LSpec 12 // left special-shift key -#define RSymb 13 // right symbol-shift key -#define RMdia 14 // right media-shift key -#define RSpec 15 // right special-shift key - -#define NotEq 16 // != macro -#define GrtEq 17 // >= macro -#define LesEq 18 // <= macro -#define DeRef 19 // -> macro - -#define MUL 20 // mouse up left -#define MUR 21 // mouse up right -#define MDL 22 // mouse down left -#define MDR 23 // mouse down right - +enum layer_names { + BASE, // default layer + SYMB, // symbols layer + MDIA, // media layer + SPEC, // special layer + RBASE // reverse default layer +}; /* * The Ordinary Layout for the Ergodox EZ keyboard, v5 @@ -69,18 +47,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC -,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G + KC_NO ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC +,KC_NO ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,KC_NO ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) ,KC_LCTL ,MEH_T(KC_NO) ,ALL_T(KC_NO),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN // right hand - ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) - ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),F(RSymb) + ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NO + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_NO + ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),KC_NO ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT ,KC_RGUI ,KC_RALT,KC_HYPR,KC_MEH ,KC_RCTL ,KC_LEFT ,KC_RGHT @@ -116,9 +94,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV ,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_QUOT ,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) - ,M(GrtEq),M(LesEq) + ,KC_NO,KC_NO ,KC_NO - ,KC_PLUS ,KC_EQL ,M(NotEq) + ,KC_PLUS ,KC_EQL ,KC_NO // right hand ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS @@ -127,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO - ,M(DeRef) ,LSFT(KC_MINS),KC_MINS + ,KC_NO ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* @@ -154,9 +132,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MDIA] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC -,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U +,KC_TRNS ,KC_POWER ,KC_NO ,KC_MS_U ,KC_NO ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD -,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D +,KC_TRNS ,KC_NO ,KC_NO ,KC_MS_D ,KC_NO ,KC_MUTE ,KC_WH_D ,KC_NO ,KC_NO ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 ,KC_WSTP ,KC_WREF ,KC_WSCH @@ -257,248 +235,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - // the faux shift keys are implemented as macro taps - [LSymb] = ACTION_MACRO_TAP(LSymb) - ,[LMdia] = ACTION_MACRO_TAP(LMdia) - ,[LSpec] = ACTION_MACRO_TAP(LSpec) - ,[RSymb] = ACTION_MACRO_TAP(RSymb) - ,[RMdia] = ACTION_MACRO_TAP(RMdia) - ,[RSpec] = ACTION_MACRO_TAP(RSpec) -}; - -uint16_t symb_shift = 0; -uint16_t mdia_shift = 0; -uint16_t spec_shift = 0; - -bool mdia_lock = false; -bool symb_lock = false; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - // There are two shift keys for each layer so we increment a layer_shift var when one - // is pressed and decrement when one is released. The shift counts are bound between 0 and 2 - // only because sometimes rapid pressing led to irregular events; this way the states - // are self healing during use. - - case LSymb: // - if (record->event.pressed) { // when the LSymb button is pressed - if(++symb_shift > 2) symb_shift = 2; // increment the symb shift count, max two - if(spec_shift) symb_lock = !symb_lock; // if the Special layer is on, toggle the shift lock - layer_on(SYMB); // in any case, turn on the Symbols layer - } else { // when the LSymb button is released - if(--symb_shift < 0) symb_shift = 0; // decrement the shift count, minimum zero - if((!symb_shift) && (!symb_lock)) layer_off(SYMB); // if both shifts are released and the lock is off, turn off the Symbols layer - } - break; - - case LMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - register_code(KC_TAB); - } else { - if(spec_shift) mdia_lock = !mdia_lock; - if(++mdia_shift > 2) mdia_shift = 2; - layer_on(MDIA); - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - unregister_code(KC_TAB); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case LSpec: - if (record->event.pressed) { // when the LSpec button is pressed - if(symb_shift) symb_lock = !symb_lock; // if another layer button is engaged, then - else if(mdia_shift) mdia_lock = !mdia_lock; // lock that layer, be it caps or symb or mdia - else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { - register_code(KC_GRV); // otherwise, if it's an uninterrupted tap, emit a char - } else { - if(++spec_shift > 2) spec_shift = 2; - layer_on(SPEC); // otherwise, turn on the Special layer - } - } else { - if(record->tap.count && !record->tap.interrupted && (!spec_shift)) { - unregister_code(KC_GRV); - } else { - if(--spec_shift < 0) spec_shift = 0; - if(!spec_shift) layer_off(SPEC); - } - } - break; - - case RSymb: - if (record->event.pressed) { - if (record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) { - register_code(KC_QUOT); - } else { - if(++symb_shift > 2) symb_shift = 2; - if(spec_shift) symb_lock = !symb_lock; - layer_on(SYMB); - } - } else { - if(record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) { - unregister_code(KC_QUOT); - } else { - if(--symb_shift < 0) symb_shift = 0; - if((!symb_shift) && (!symb_lock)) layer_off(SYMB); - } - } - break; - - case RMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - register_code(KC_BSLS); - } else { - if(++mdia_shift > 2) mdia_shift = 2; - if(spec_shift) mdia_lock = !mdia_lock; - layer_on(MDIA); - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - unregister_code(KC_BSLS); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case RSpec: - if (record->event.pressed) { - if(symb_shift) symb_lock = !symb_lock; - else if(mdia_shift) mdia_lock = !mdia_lock; - else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { - register_code(KC_EQL); - } else { - if(++spec_shift > 2) spec_shift = 2; - layer_on(SPEC); - } - } else { - if(record->tap.count && !record->tap.interrupted && (!spec_shift)) { - unregister_code(KC_EQL); - } else { - if(--spec_shift < 0) spec_shift = 0; - if(!spec_shift) layer_off(SPEC); - } - } - break; - - case NotEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // != - } - break; - - case GrtEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(COMM), U(LSFT), T(EQL), END ); // <= - } - break; - - case LesEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(DOT), U(LSFT), T(EQL), END ); // >= - } - break; - - case DeRef: - if (record->event.pressed) { - return MACRO( I(10), T(MINS), D(LSFT), T(DOT), U(LSFT), END ); // -> - } - break; - - // mouse diagonals - - case MUL: // mouse up left - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MUR: // mouse up right - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - case MDL: // mouse down left - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MDR: // mouse down right - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - default: - // none - break; - } - - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { // shift or caps lock turns on red light - if((keyboard_report->mods & MOD_BIT(KC_LSFT)) - || (keyboard_report->mods & MOD_BIT(KC_RSFT)) - || (host_keyboard_leds() & (1<mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<= macro -#define LesEq 18 // <= macro -#define DeRef 19 // -> macro - -#define MUL 20 // mouse up left -#define MUR 21 // mouse up right -#define MDL 22 // mouse down left -#define MDR 23 // mouse down right - +enum layer_names { + BASE, // default layer + SYMB, // symbols layer + MDIA, // media layer + SPEC, // special layer + RBASE // reverse default layer +}; /* * The Ordinary Layout for the Ergodox EZ keyboard, v5 @@ -69,18 +47,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - F(LSpec) ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC -,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,LSFT(KC_TAB) -,M(LSymb) ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G + KC_NO ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_ESC +,KC_NO ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,LSFT(KC_TAB) +,KC_NO ,LT(RBASE, KC_A),KC_S ,KC_D ,LT(RBASE, KC_F) ,KC_G ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LBRC ,KC_LEFT ,KC_RIGHT ,KC_LCTL,KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN // right hand - ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) - ,KC_TAB ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) - ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),F(RSymb) + ,KC_MINS ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NO + ,KC_TAB ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_NO + ,KC_H ,LT(RBASE, KC_J),KC_K ,KC_L ,LT(RBASE,KC_SCLN),KC_NO ,KC_RBRC ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_RSFT ,KC_RGUI ,KC_RALT,KC_RCTL,KC_UP ,KC_DOWN ,KC_LEFT ,KC_RGHT @@ -116,9 +94,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_TRNS ,KC_HASH ,KC_DLR ,KC_LPRN ,KC_RPRN ,KC_GRV ,KC_TRNS ,KC_PERC ,KC_CIRC ,KC_LBRC ,KC_RBRC ,KC_TILD ,KC_QUOT ,KC_SCLN ,KC_AMPR ,KC_ASTR ,LSFT(KC_COMM),LSFT(KC_DOT) - ,M(GrtEq),M(LesEq) + ,KC_NO,KC_NO ,KC_NO - ,KC_PLUS ,KC_EQL ,M(NotEq) + ,KC_PLUS ,KC_EQL ,KC_NO // right hand ,KC_MINS ,KC_F6 ,KC_F7 ,KC_F8 ,KC_F9 ,KC_F10 ,KC_TRNS ,LSFT(KC_DOT),KC_PIPE ,KC_7 ,KC_8 ,KC_9 ,KC_SLSH ,KC_TRNS @@ -127,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ,KC_0 ,KC_DOT ,KC_EQL,KC_PLUS ,KC_ENT ,KC_NO ,KC_NO ,KC_NO - ,M(DeRef) ,LSFT(KC_MINS),KC_MINS + ,KC_NO ,LSFT(KC_MINS),KC_MINS ), /******* Media Layer ******************************************************************************************************* @@ -154,9 +132,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MDIA] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC -,KC_TRNS ,KC_POWER ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U +,KC_TRNS ,KC_POWER ,KC_NO ,KC_MS_U ,KC_NO ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_SLEP ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD -,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D +,KC_TRNS ,KC_NO ,KC_NO ,KC_MS_D ,KC_NO ,KC_MUTE ,KC_WH_D ,KC_NO ,KC_NO ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 ,KC_WSTP ,KC_WREF ,KC_WSCH @@ -257,248 +235,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - // the faux shift keys are implemented as macro taps - [LSymb] = ACTION_MACRO_TAP(LSymb) - ,[LMdia] = ACTION_MACRO_TAP(LMdia) - ,[LSpec] = ACTION_MACRO_TAP(LSpec) - ,[RSymb] = ACTION_MACRO_TAP(RSymb) - ,[RMdia] = ACTION_MACRO_TAP(RMdia) - ,[RSpec] = ACTION_MACRO_TAP(RSpec) -}; - -uint16_t symb_shift = 0; -uint16_t mdia_shift = 0; -uint16_t spec_shift = 0; - -bool mdia_lock = false; -bool symb_lock = false; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - // There are two shift keys for each layer so we increment a layer_shift var when one - // is pressed and decrement when one is released. The shift counts are bound between 0 and 2 - // only because sometimes rapid pressing led to irregular events; this way the states - // are self healing during use. - - case LSymb: // - if (record->event.pressed) { // when the LSymb button is pressed - if(++symb_shift > 2) symb_shift = 2; // increment the symb shift count, max two - if(spec_shift) symb_lock = !symb_lock; // if the Special layer is on, toggle the shift lock - layer_on(SYMB); // in any case, turn on the Symbols layer - } else { // when the LSymb button is released - if(--symb_shift < 0) symb_shift = 0; // decrement the shift count, minimum zero - if((!symb_shift) && (!symb_lock)) layer_off(SYMB); // if both shifts are released and the lock is off, turn off the Symbols layer - } - break; - - case LMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - register_code(KC_TAB); - } else { - if(spec_shift) mdia_lock = !mdia_lock; - if(++mdia_shift > 2) mdia_shift = 2; - layer_on(MDIA); - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - unregister_code(KC_TAB); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case LSpec: - if (record->event.pressed) { // when the LSpec button is pressed - if(symb_shift) symb_lock = !symb_lock; // if another layer button is engaged, then - else if(mdia_shift) mdia_lock = !mdia_lock; // lock that layer, be it caps or symb or mdia - else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { - register_code(KC_GRV); // otherwise, if it's an uninterrupted tap, emit a char - } else { - if(++spec_shift > 2) spec_shift = 2; - layer_on(SPEC); // otherwise, turn on the Special layer - } - } else { - if(record->tap.count && !record->tap.interrupted && (!spec_shift)) { - unregister_code(KC_GRV); - } else { - if(--spec_shift < 0) spec_shift = 0; - if(!spec_shift) layer_off(SPEC); - } - } - break; - - case RSymb: - if (record->event.pressed) { - if (record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) { - register_code(KC_QUOT); - } else { - if(++symb_shift > 2) symb_shift = 2; - if(spec_shift) symb_lock = !symb_lock; - layer_on(SYMB); - } - } else { - if(record->tap.count && (!symb_shift) && (!symb_lock) && (!spec_shift)) { - unregister_code(KC_QUOT); - } else { - if(--symb_shift < 0) symb_shift = 0; - if((!symb_shift) && (!symb_lock)) layer_off(SYMB); - } - } - break; - - case RMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - register_code(KC_BSLS); - } else { - if(++mdia_shift > 2) mdia_shift = 2; - if(spec_shift) mdia_lock = !mdia_lock; - layer_on(MDIA); - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock) && (!spec_shift)) { - unregister_code(KC_BSLS); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case RSpec: - if (record->event.pressed) { - if(symb_shift) symb_lock = !symb_lock; - else if(mdia_shift) mdia_lock = !mdia_lock; - else if (record->tap.count && !record->tap.interrupted && (!spec_shift)) { - register_code(KC_EQL); - } else { - if(++spec_shift > 2) spec_shift = 2; - layer_on(SPEC); - } - } else { - if(record->tap.count && !record->tap.interrupted && (!spec_shift)) { - unregister_code(KC_EQL); - } else { - if(--spec_shift < 0) spec_shift = 0; - if(!spec_shift) layer_off(SPEC); - } - } - break; - - case NotEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(1), U(LSFT), T(EQL), END ); // != - } - break; - - case GrtEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(COMM), U(LSFT), T(EQL), END ); // <= - } - break; - - case LesEq: - if (record->event.pressed) { - return MACRO( I(10), D(LSFT), T(DOT), U(LSFT), T(EQL), END ); // >= - } - break; - - case DeRef: - if (record->event.pressed) { - return MACRO( I(10), T(MINS), D(LSFT), T(DOT), U(LSFT), END ); // -> - } - break; - - // mouse diagonals - - case MUL: // mouse up left - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MUR: // mouse up right - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - case MDL: // mouse down left - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MDR: // mouse down right - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - default: - // none - break; - } - - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { // shift or caps lock turns on red light - if((keyboard_report->mods & MOD_BIT(KC_LSFT)) - || (keyboard_report->mods & MOD_BIT(KC_RSFT)) - || (host_keyboard_leds() & (1<mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<status.layer); - - // Go from highest to lowest layer to get the right text/color combination. - switch (layer) { - // #AEB2F4 / hsv(65.71%, 28.69%, 95.69%) - case FKEYS: - // #F4AEDC / hsv(89.05%, 28.69%, 95.69%) - state->layer_text = "FUNCTION KEYS"; - state->target_lcd_color = LCD_COLOR(228, 73, 245); - break; - case US_1: - // #F4B993 / hsv(6.53%, 39.75%, 95.69%) - state->layer_text = "QWERTY"; - state->target_lcd_color = LCD_COLOR(17, 102, 245); - break; - case NEO_6: - // #F4E393 / hsv(13.75%, 39.75%, 95.69%) - state->layer_text = "NEO: 6"; - state->target_lcd_color = LCD_COLOR(35, 102, 245); - break; - case NEO_5: - // #C6F493 / hsv(24.57%, 39.75%, 95.69%) - state->layer_text = "NEO: 5"; - state->target_lcd_color = LCD_COLOR(63, 102, 245); - break; - case NEO_4: - // #8EEBC9 / hsv(43.91%, 39.57%, 92.16%) - state->layer_text = "NEO: 4"; - state->target_lcd_color = LCD_COLOR(112, 101, 189); - break; - case NEO_3: - // #93D2F4 / hsv(55.84%, 39.75%, 95.69%) - state->layer_text = "NEO: 3"; - state->target_lcd_color = LCD_COLOR(143, 102, 245); - break; - default: - // #EEEEEE / hsv(0%, 0%, 93%) - state->layer_text = "NEO: 1"; - state->target_lcd_color = LCD_COLOR(0, 0, 255); - break; - } -} diff --git a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c index 6bf0285ab6a..54e1183e9f7 100644 --- a/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c +++ b/layouts/community/ergodox/osx_whiskey_tango_foxtrot_capslock/keymap.c @@ -4,21 +4,17 @@ */ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" -#include "timer.h" -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys +enum layer_names { + BASE, // default layer + SYMB, // symbols + MDIA // media keys +}; #define BLINK_BASE 150U // timer threshold for blinking on MDIA layer typedef enum onoff_t {OFF, ON} onoff; -#define caps_led_on ergodox_right_led_2_on -#define caps_led_off ergodox_right_led_2_off - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -45,18 +41,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = LAYOUT_ergodox( // layer 0 : default // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, - KC_TAB, M(KC_Q), M(KC_W), M(KC_E), M(KC_R), M(KC_T), KC_LBRC, - M(KC_CAPS), M(KC_A), M(KC_S), M(KC_D), M(KC_F), M(KC_G), - KC_LSFT, M(KC_Z), M(KC_X), M(KC_C), M(KC_V), M(KC_B), MO(SYMB), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(SYMB), KC_LCTL, KC_LALT, KC_LGUI, KC_LEFT, KC_RGHT, - KC_TRNS, F(1), + KC_TRNS, TG(SYMB), KC_HOME, KC_BSPC, KC_DEL, KC_END, // right hand KC_GRV, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, - KC_RBRC, M(KC_Y), M(KC_U), M(KC_I), M(KC_O), M(KC_P), KC_BSLS, - M(KC_H), M(KC_J), M(KC_K), M(KC_L), KC_SCLN, KC_QUOT, - MO(SYMB), M(KC_N), M(KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(SYMB), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DOWN, KC_UP, KC_RCTL, KC_RGUI, KC_RALT, KC_RALT, KC_RCTL, KC_PGUP, @@ -91,7 +87,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - F(3), F(2), + TG(SYMB),TG(MDIA), KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, // right hand @@ -132,7 +128,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, - F(4), KC_NO, + TG(MDIA),KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand @@ -147,64 +143,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_ON(SYMB,ON_RELEASE), // FN1 - Enable Layer 1 (Symbols) - [2] = ACTION_LAYER_ON(MDIA,ON_RELEASE), // FN2 - Enable Layer 2 (Media) - [3] = ACTION_LAYER_OFF(SYMB,ON_RELEASE), // FN3 - Disable Layer 1 (Symbols) - [4] = ACTION_LAYER_OFF(MDIA,ON_RELEASE), // FN4 - Disable Layer 2 (MMedia) -}; - - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - static onoff caps_state = OFF; - switch(id) { - case KC_CAPS: - if (record->event.pressed) { - // Toggle caps state; - if (caps_state == OFF) { - // Turn it on then! - caps_led_on(); - caps_state = ON; - } else { - caps_led_off(); - caps_state = OFF; - } - } - break; - default: - if (record->event.pressed) { - bool shifted = false; - if (caps_state == ON && get_mods() == 0) { - register_code(KC_LSFT); - shifted = true; - } - register_code(id); - if(shifted) { - unregister_code(KC_LSFT); - } - } else { - unregister_code(id); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -} // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); static onoff board_led_state = OFF; static uint16_t dt = 0; static uint8_t oldlayer = 0; - if(oldlayer != layer) { + if (oldlayer != layer) { // Layer was just toggled. - if(layer == BASE) { + if (layer == BASE) { ergodox_board_led_off(); board_led_state = OFF; } else { @@ -213,10 +162,10 @@ void matrix_scan_user(void) { } } else if (layer >= MDIA) { // We need to do blinking. - if(timer_elapsed(dt) > BLINK_BASE) { + if (timer_elapsed(dt) > BLINK_BASE) { // toggle dt = timer_read(); - if(board_led_state == OFF) { + if (board_led_state == OFF) { ergodox_board_led_on(); board_led_state = ON; } else { diff --git a/layouts/community/ergodox/plover/keymap.c b/layouts/community/ergodox/plover/keymap.c index b196346436b..ffb869309ab 100644 --- a/layouts/community/ergodox/plover/keymap.c +++ b/layouts/community/ergodox/plover/keymap.c @@ -164,7 +164,7 @@ LAYOUT_ergodox( KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_FN4, KC_NO, + KC_NO, KC_NO, KC_NO, KC_C, KC_V, KC_NO, // right hand diff --git a/layouts/community/ergodox/plums/keymap.c b/layouts/community/ergodox/plums/keymap.c index c75ce0f9778..dd273e579b6 100644 --- a/layouts/community/ergodox/plums/keymap.c +++ b/layouts/community/ergodox/plums/keymap.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "debug.h" -#include "action_layer.h" #define BASE 0 // default layer #define SYMB 1 // symbols @@ -36,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_LGUI, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, TG(SYMB), - F(0), KC_LCBR, KC_LPRN,KC_PIPE,KC_COLN, + KC_NO, KC_LCBR, KC_LPRN,KC_PIPE,KC_COLN, LGUI(KC_LALT), KC_LALT, KC_HOME, KC_BSPC, KC_ESC, KC_END, @@ -45,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, TG(MDIA), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_MINS, KC_EQL, KC_RPRN, KC_RCBR, F(1), + KC_MINS, KC_EQL, KC_RPRN, KC_RCBR, KC_NO, KC_RALT, KC_MPLY, KC_PGUP, KC_PGDN, KC_ENT, KC_SPC @@ -135,85 +133,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MACRO_TAP(0), // FN0 - Ctrl + a (For screen/tmux) - [1] = ACTION_MACRO_TAP(1) // FN1 - Ctrl + ` (For quake style console) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: - if (record->event.pressed) { - if (record->tap.count) { - if (record->tap.interrupted) { - record->tap.count = 0; - // hold press action - register_code(KC_LCTL); - } else { - // tap press action - return MACRO( D(LCTL), T(A), U(LCTL), END ); - } - } else { - // hold press action - register_code(KC_LCTL); - } - } else { - if (record->tap.count) { - // tap release action - } else { - // hold release action - unregister_code(KC_LCTL); - } - record->tap.count = 0; - } - break; - case 1: - if (record->event.pressed) { - if (record->tap.count) { - if (record->tap.interrupted) { - record->tap.count = 0; - // hold press action - register_code(KC_RCTL); - } else { - // tap press action - return MACRO( DOWN(KC_RCTL), TYPE(KC_GRV), UP(KC_RCTL), END ); - } - } else { - // hold press action - register_code(KC_RCTL); - } - } else { - if (record->tap.count) { - // tap release action - } else { - // hold release action - unregister_code(KC_RCTL); - } - record->tap.count = 0; - } - break; - } - return MACRO_NONE; -}; - - - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { + + switch (get_highest_layer(layer_state)) { // TODO: Make this relevant to the ErgoDox EZ. case 1: ergodox_right_led_1_on(); @@ -225,5 +152,4 @@ void matrix_scan_user(void) { // none break; } - -}; +} diff --git a/layouts/community/ergodox/teckinesis/keymap.c b/layouts/community/ergodox/teckinesis/keymap.c index 0b65572f681..509b91af901 100644 --- a/layouts/community/ergodox/teckinesis/keymap.c +++ b/layouts/community/ergodox/teckinesis/keymap.c @@ -1,28 +1,11 @@ #include QMK_KEYBOARD_H -#include "led.h" -#include "debug.h" -#include "action_layer.h" -#include "action_util.h" -#include "mousekey.h" -#define BASE 0 // default layer -#define SYMB 1 // symbols layer -#define MDIA 2 // media layer -#define SPEC 3 // special layer - -#define LCaps 10 // left caps-shift key -#define LSymb 11 // left symbol-shift key -#define LMdia 12 // left media-shift key -#define LSpec 13 // left special-shift key -#define RCaps 14 // right caps-shift key -#define RSymb 15 // right symbol-shift key -#define RMdia 16 // right media-shift key -#define RSpec 17 // right special-shift key - -#define MUL 20 // mouse up left -#define MUR 21 // mouse up right -#define MDL 22 // mouse down left -#define MDR 23 // mouse down right +enum layer_names { + BASE, // default layer + SYMB, // symbols layer + MDIA, // media layer + SPEC // special layer +}; /* * teckinesis layout for ErgoDox (EZ) @@ -62,19 +45,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = LAYOUT_ergodox( // left hand - F(LSpec),KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC -,F(LMdia) ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC -,M(LSymb) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G -,M(LCaps) ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) + KC_NO ,KC_1,KC_2,KC_3 ,KC_4 ,KC_5 ,KC_ESC +,KC_NO ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC +,KC_NO ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G +,KC_NO ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,LSFT(KC_TAB) ,KC_LCTL,MEH_T(KC_BSLS),ALL_T(KC_SLSH),KC_LALT,KC_LGUI ,KC_HOME,KC_END ,KC_PGUP ,KC_BSPC,KC_DEL ,KC_PGDN // right hand - ,KC_GRV ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,F(RSpec) - ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,F(RMdia) - ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,F(RSymb) - ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,M(RCaps) + ,KC_GRV ,KC_6 ,KC_7 ,KC_8 ,KC_9 ,KC_0 ,KC_NO + ,KC_RBRC ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KC_NO + ,KC_H ,KC_J ,KC_K ,KC_L ,KC_SCLN ,KC_NO + ,KC_TAB ,KC_N ,KC_M ,KC_COMM,KC_DOT ,KC_SLSH ,KC_NO ,KC_RGUI,KC_RALT,ALL_T(KC_LBRC),MEH_T(KC_RBRC),KC_RCTL ,KC_LEFT ,KC_RGHT ,KC_UP @@ -147,9 +130,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MDIA] = LAYOUT_ergodox( // left hand KC_TRNS ,KC_F11 ,KC_F12 ,KC_F13 ,KC_F14 ,KC_F15 ,KC_ESC -,KC_TRNS ,KC_NO ,M(MUL) ,KC_MS_U ,M(MUR) ,KC_VOLU ,KC_WH_U +,KC_TRNS ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_VOLU ,KC_WH_U ,KC_TRNS ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_VOLD -,KC_TRNS ,KC_NO ,M(MDL) ,KC_MS_D ,M(MDR) ,KC_MUTE ,KC_WH_D +,KC_TRNS ,KC_NO ,KC_NO ,KC_MS_D ,KC_NO ,KC_MUTE ,KC_WH_D ,KC_LCTL ,KC_MEH ,KC_BTN3 ,KC_BTN1 ,KC_BTN2 ,KC_WSTP ,KC_WREF ,KC_WSCH @@ -210,246 +193,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -const uint16_t PROGMEM fn_actions[] = { - // the faux shift keys are implemented as macro taps - [LCaps] = ACTION_MACRO_TAP(LCaps) - ,[LSymb] = ACTION_MACRO_TAP(LSymb) - ,[LMdia] = ACTION_MACRO_TAP(LMdia) - ,[LSpec] = ACTION_MACRO_TAP(LSpec) - ,[RCaps] = ACTION_MACRO_TAP(RCaps) - ,[RSymb] = ACTION_MACRO_TAP(RSymb) - ,[RMdia] = ACTION_MACRO_TAP(RMdia) - ,[RSpec] = ACTION_MACRO_TAP(RSpec) -}; - -uint16_t caps_shift = 0; -uint16_t symb_shift = 0; -uint16_t mdia_shift = 0; - -bool symb_lock = false; -bool mdia_lock = false; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - // There are two shift keys for each layer so we increment a layer_shift var when one - // is pressed and decrement when one is released. If both are pressed at the same time - // then the layer is locked (or unlocked). The shift counts are bound between 0 and 2 - // only because sometimes rapid pressing led to irregular events; this way the states - // are self healing during use. - - case LCaps: // both caps-shift keys trigger Left Shift - case RCaps: // so they don't interfere with the magic combo - if (record->event.pressed && !record->tap.count) { - if(++caps_shift > 2) caps_shift = 2; - if(caps_shift == 2) { - register_code(KC_CAPS); - unregister_code(KC_CAPS); - } else if(caps_shift == 1) { - register_code(KC_LSFT); - } - } else { - if(--caps_shift < 0) caps_shift = 0; - if(caps_shift == 0) unregister_code(KC_LSFT); - } - break; - - case LSymb: - if (record->event.pressed) { - if(++symb_shift > 2) symb_shift = 2; - if(symb_shift == 2) { - symb_lock = !symb_lock; - } else if(symb_shift == 1) { - layer_on(SYMB); - } - } else { - if(--symb_shift < 0) symb_shift = 0; - if((symb_shift == 0) && (!symb_lock)) layer_off(SYMB); - } - break; - - case LMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock)) { - register_code(KC_TAB); - } else { - if(++mdia_shift > 2) mdia_shift = 2; - if(mdia_shift == 2) { - mdia_lock = !mdia_lock; - } else if(mdia_shift == 1) { - layer_on(MDIA); - } - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock)) { - unregister_code(KC_TAB); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case LSpec: - if (record->event.pressed) { - if (record->tap.count && !record->tap.interrupted) { - register_code(KC_EQL); - } else { - layer_on(SPEC); - } - } else { - if(record->tap.count && !record->tap.interrupted) { - unregister_code(KC_EQL); - } else { - layer_off(SPEC); - } - } - break; - - case RSymb: - if (record->event.pressed) { - if (record->tap.count && (!symb_shift) && (!symb_lock)) { - register_code(KC_QUOT); - } else { - if(++symb_shift > 2) symb_shift = 2; - if(symb_shift == 2) { - symb_lock = !symb_lock; - } else if(symb_shift == 1) { - layer_on(SYMB); - } - } - } else { - if(record->tap.count && symb_shift == 0) { - unregister_code(KC_QUOT); - } else { - if(--symb_shift < 0) symb_shift = 0; - if((!symb_shift) && (!symb_lock)) layer_off(SYMB); - } - } - break; - - case RMdia: - if (record->event.pressed) { - if (record->tap.count && (!mdia_shift) && (!mdia_lock)) { - register_code(KC_BSLS); - } else { - if(++mdia_shift > 2) mdia_shift = 2; - if(mdia_shift == 2) { - mdia_lock = !mdia_lock; - } else if(mdia_shift == 1) { - layer_on(MDIA); - } - } - } else { - if(record->tap.count && (!mdia_shift) && (!mdia_lock)) { - unregister_code(KC_BSLS); - } else { - if(--mdia_shift < 0) mdia_shift = 0; - if((!mdia_shift) && (!mdia_lock)) layer_off(MDIA); - } - } - break; - - case RSpec: - if (record->event.pressed) { - if (record->tap.count && !record->tap.interrupted) { - register_code(KC_MINS); - } else { - layer_on(SPEC); - } - } else { - if(record->tap.count && !record->tap.interrupted) { - unregister_code(KC_MINS); - } else { - layer_off(SPEC); - } - } - break; - - // mouse diagonals - - case MUL: // mouse up left - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MUR: // mouse up right - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - case MDL: // mouse down left - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - mousekey_send(); - } - break; - - case MDR: // mouse down right - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - mousekey_send(); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - mousekey_send(); - } - break; - - default: - // none - break; - } - - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { // shift or caps lock turns on red light - if(caps_shift || (keyboard_report->mods & MOD_BIT(KC_RSFT)) || (host_keyboard_leds() & (1<mods & MOD_BIT(KC_RSFT)) || (host_keyboard_led_state().caps_lock)) { ergodox_right_led_1_on(); } else { ergodox_right_led_1_off(); } // Symbol layer turns on green light - if(layer_state & (1UL<event.pressed) { - register_code(KC_RSFT); - } else { - unregister_code(KC_RSFT); - } - break; - case 100: - layer_clear(); - return MACRODOWN(D(LSFT), T(5), U(LSFT), T(FN4), END); - break; - case 101: - layer_clear(); - return MACRODOWN(D(LSFT), T(7), U(LSFT), T(FN4), END); - break; - case 102: - layer_clear(); - return MACRODOWN(D(LSFT), T(SLSH), U(LSFT), T(FN4), END); - break; - case 103: - layer_clear(); - return MACRODOWN(D(LSFT), T(EQL), U(LSFT), T(FN4), END); - break; - case 104: - layer_clear(); - return MACRODOWN(D(LSFT), T(2), U(LSFT), T(FN4), END); - break; - case 105: - layer_clear(); - return MACRODOWN(D(LSFT), T(4), U(LSFT), T(FN4), END); - break; - case 106: - layer_clear(); - return MACRODOWN(D(LSFT), T(MINS), U(LSFT), T(FN4), END); - break; - case 107: - layer_clear(); - return MACRODOWN(T(LBRC), T(FN4), END); - break; - case 108: - layer_clear(); - return MACRODOWN(T(RBRC), T(FN4), END); - break; - case 130: - layer_clear(); - return MACRODOWN(D(LSFT), T(1), U(LSFT), T(FN4), END); - break; - case 109: - layer_clear(); - return MACRODOWN(T(SLSH), T(FN4), END); - break; - case 110: - layer_clear(); - return MACRODOWN(D(LSFT), T(9), U(LSFT), T(FN4), END); - break; - case 111: - layer_clear(); - return MACRODOWN(T(EQL), T(FN4), END); - break; - case 112: - layer_clear(); - return MACRODOWN(T(0), T(FN4), END); - break; - case 113: - layer_clear(); - return MACRODOWN(D(LSFT), T(LBRC), U(LSFT), T(FN4), END); - break; - case 114: - layer_clear(); - return MACRODOWN(D(LSFT), T(RBRC), U(LSFT), T(FN4), END); - break; - case 115: - layer_clear(); - return MACRODOWN(T(1), T(FN4), END); - break; - case 116: - layer_clear(); - return MACRODOWN(D(LSFT), T(8), U(LSFT), T(FN4), END); - break; - case 117: - layer_clear(); - return MACRODOWN(D(LSFT), T(0), U(LSFT), T(FN4), END); - break; - case 118: - layer_clear(); - return MACRODOWN(T(MINS), T(FN4), END); - break; - case 119: - layer_clear(); - return MACRODOWN(D(LSFT), T(QUOT), U(LSFT), T(FN4), END); - break; - case 120: - layer_clear(); - return MACRODOWN(T(6), T(FN4), END); - break; - case 121: - layer_clear(); - return MACRODOWN(T(7), T(FN4), END); - break; - case 122: - layer_clear(); - return MACRODOWN(T(8), T(FN4), END); - break; - case 123: - layer_clear(); - return MACRODOWN(T(9), T(FN4), END); - break; - case 124: - layer_clear(); - return MACRODOWN(D(LSFT), T(BSLS), U(LSFT), T(FN4), END); - break; - case 125: - layer_clear(); - return MACRODOWN(T(BSLS), T(FN4), END); - break; - case 126: - layer_clear(); - return MACRODOWN(T(2), T(FN4), END); - break; - case 127: - layer_clear(); - return MACRODOWN(T(3), T(FN4), END); - break; - case 128: - layer_clear(); - return MACRODOWN(T(4), T(FN4), END); - break; - case 129: - layer_clear(); - return MACRODOWN(T(5), T(FN4), END); - break; - - default: - return MACRO_NONE; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { +void tap_dead_code(uint16_t keycode) { + layer_clear(); + tap_code16(keycode); + layer_on(DEAD); +} -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M_100: + if (record->event.pressed) { + tap_dead_code(S(KC_5)); + } + return false; + case M_101: + if (record->event.pressed) { + tap_dead_code(S(KC_7)); + } + return false; + case M_102: + if (record->event.pressed) { + tap_dead_code(S(KC_SLSH)); + } + return false; + case M_103: + if (record->event.pressed) { + tap_dead_code(S(KC_EQL)); + } + return false; + case M_104: + if (record->event.pressed) { + tap_dead_code(S(KC_2)); + } + return false; + case M_105: + if (record->event.pressed) { + tap_dead_code(S(KC_4)); + } + return false; + case M_106: + if (record->event.pressed) { + tap_dead_code(S(KC_MINS)); + } + return false; + case M_107: + if (record->event.pressed) { + tap_dead_code(KC_LBRC); + } + return false; + case M_108: + if (record->event.pressed) { + tap_dead_code(KC_RBRC); + } + return false; + case M_109: + if (record->event.pressed) { + tap_dead_code(KC_SLSH); + } + return false; + case M_110: + if (record->event.pressed) { + tap_dead_code(S(KC_9)); + } + return false; + case M_111: + if (record->event.pressed) { + tap_dead_code(KC_EQL); + } + return false; + case M_112: + if (record->event.pressed) { + tap_dead_code(KC_0); + } + return false; + case M_113: + if (record->event.pressed) { + tap_dead_code(S(KC_LBRC)); + } + return false; + case M_114: + if (record->event.pressed) { + tap_dead_code(S(KC_RBRC)); + } + return false; + case M_115: + if (record->event.pressed) { + tap_dead_code(KC_1); + } + return false; + case M_116: + if (record->event.pressed) { + tap_dead_code(S(KC_8)); + } + return false; + case M_117: + if (record->event.pressed) { + tap_dead_code(S(KC_0)); + } + return false; + case M_118: + if (record->event.pressed) { + tap_dead_code(KC_MINS); + } + return false; + case M_119: + if (record->event.pressed) { + tap_dead_code(S(KC_QUOT)); + } + return false; + case M_120: + if (record->event.pressed) { + tap_dead_code(KC_6); + } + return false; + case M_121: + if (record->event.pressed) { + tap_dead_code(KC_7); + } + return false; + case M_122: + if (record->event.pressed) { + tap_dead_code(KC_8); + } + return false; + case M_123: + if (record->event.pressed) { + tap_dead_code(KC_9); + } + return false; + case M_124: + if (record->event.pressed) { + tap_dead_code(S(KC_BSLS)); + } + return false; + case M_125: + if (record->event.pressed) { + tap_dead_code(KC_BSLS); + } + return false; + case M_126: + if (record->event.pressed) { + tap_dead_code(KC_2); + } + return false; + case M_127: + if (record->event.pressed) { + tap_dead_code(KC_3); + } + return false; + case M_128: + if (record->event.pressed) { + tap_dead_code(KC_4); + } + return false; + case M_129: + if (record->event.pressed) { + tap_dead_code(KC_5); + } + return false; + case M_130: + if (record->event.pressed) { + tap_dead_code(S(KC_1)); + } + return false; + } + return true; +} // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - ergodox_board_led_off(); ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { + + switch (get_highest_layer(layer_state)) { // TODO: Make this relevant to the ErgoDox EZ. case 1: ergodox_right_led_1_on(); @@ -361,5 +406,4 @@ void matrix_scan_user(void) { // none break; } - -}; +} diff --git a/layouts/community/numpad_5x6/bjohnson/rules.mk b/layouts/community/numpad_5x6/bjohnson/rules.mk index d85826165c4..b54c78f39bc 100644 --- a/layouts/community/numpad_5x6/bjohnson/rules.mk +++ b/layouts/community/numpad_5x6/bjohnson/rules.mk @@ -2,4 +2,4 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no NO_SECRETS = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/layouts/community/numpad_5x6/drashna/rules.mk b/layouts/community/numpad_5x6/drashna/rules.mk index f4854716b49..a2a2b7f8f1c 100644 --- a/layouts/community/numpad_5x6/drashna/rules.mk +++ b/layouts/community/numpad_5x6/drashna/rules.mk @@ -2,7 +2,7 @@ AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = no NO_SECRETS = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite INDICATOR_LIGHTS = no MAKE_BOOTLOADER = yes RGBLIGHT_STARTUP_ANIMATION = yes diff --git a/layouts/community/ortho_4x12/brandonschlack/rules.mk b/layouts/community/ortho_4x12/brandonschlack/rules.mk index d27ef6420d9..0c4b14a4e54 100644 --- a/layouts/community/ortho_4x12/brandonschlack/rules.mk +++ b/layouts/community/ortho_4x12/brandonschlack/rules.mk @@ -6,5 +6,5 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) BACKLIGHT_ENABLE = no # No backlights installed ifeq ($(strip $(KEYBOARD)), jnao) - BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite + BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite endif diff --git a/layouts/community/ortho_4x12/drashna/rules.mk b/layouts/community/ortho_4x12/drashna/rules.mk index 775ad8e6eb4..d7662452606 100644 --- a/layouts/community/ortho_4x12/drashna/rules.mk +++ b/layouts/community/ortho_4x12/drashna/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) TAP_DANCE_ENABLE = no @@ -28,7 +28,6 @@ ifeq ($(strip $(KEYBOARD)), planck/light) RGBLIGHT_ENABLE = yes RGBLIGHT_STARTUP_ANIMATION = yes AUDIO_ENABLE = yes - # HAPTIC_ENABLE += SOLENOID endif ifeq ($(strip $(KEYBOARD)), planck/ez) RGBLIGHT_ENABLE = no diff --git a/layouts/community/ortho_4x12/jjerrell/rules.mk b/layouts/community/ortho_4x12/jjerrell/rules.mk index 39f31a266ec..9b1b8e89152 100644 --- a/layouts/community/ortho_4x12/jjerrell/rules.mk +++ b/layouts/community/ortho_4x12/jjerrell/rules.mk @@ -1,6 +1,6 @@ SRC += muse.c -BOOTMAGIC_ENABLE = lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes TAP_DANCE_ENABLE = no diff --git a/layouts/community/ortho_5x12/brandonschlack/rules.mk b/layouts/community/ortho_5x12/brandonschlack/rules.mk index 0035209d35f..a727043b449 100644 --- a/layouts/community/ortho_5x12/brandonschlack/rules.mk +++ b/layouts/community/ortho_5x12/brandonschlack/rules.mk @@ -6,5 +6,5 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700) BACKLIGHT_ENABLE = no # No backlights installed ifeq ($(strip $(KEYBOARD)), jnao) - BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite + BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite endif diff --git a/layouts/community/split_3x6_3/drashna/rules.mk b/layouts/community/split_3x6_3/drashna/rules.mk index 3a8a771ee1a..2238b570157 100644 --- a/layouts/community/split_3x6_3/drashna/rules.mk +++ b/layouts/community/split_3x6_3/drashna/rules.mk @@ -3,7 +3,7 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = no # Console for debug diff --git a/layouts/default/60_hhkb/default_60_hhkb/keymap.c b/layouts/default/60_hhkb/default_60_hhkb/keymap.c index 73804b8bb8f..81a0fc7d9f3 100644 --- a/layouts/default/60_hhkb/default_60_hhkb/keymap.c +++ b/layouts/default/60_hhkb/default_60_hhkb/keymap.c @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = LAYOUT_60_hhkb( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL, - KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_PENT, _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, _______, _______, _______, _______ diff --git a/layouts/default/64_ansi/default_64_ansi/keymap.c b/layouts/default/64_ansi/default_64_ansi/keymap.c index ff1356e953f..aae78dc8dab 100644 --- a/layouts/default/64_ansi/default_64_ansi/keymap.c +++ b/layouts/default/64_ansi/default_64_ansi/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_64_ansi( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END diff --git a/layouts/default/64_iso/default_64_iso/keymap.c b/layouts/default/64_iso/default_64_iso/keymap.c index a0ac1a15115..45e07dd9cc6 100644 --- a/layouts/default/64_iso/default_64_iso/keymap.c +++ b/layouts/default/64_iso/default_64_iso/keymap.c @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [1] = LAYOUT_64_iso( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, MO(2), KC_HOME, KC_PGDN, KC_END diff --git a/layouts/default/96_ansi/default_96_ansi/keymap.c b/layouts/default/96_ansi/default_96_ansi/keymap.c index 18a67fcefde..35ece2f708c 100644 --- a/layouts/default/96_ansi/default_96_ansi/keymap.c +++ b/layouts/default/96_ansi/default_96_ansi/keymap.c @@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ */ [0] = LAYOUT_96_ansi( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, 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_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, 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_P4, KC_P5, KC_P6, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, diff --git a/layouts/default/96_iso/default_96_iso/keymap.c b/layouts/default/96_iso/default_96_iso/keymap.c index df36f95abc9..742bb9cec31 100644 --- a/layouts/default/96_iso/default_96_iso/keymap.c +++ b/layouts/default/96_iso/default_96_iso/keymap.c @@ -33,8 +33,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┴───┴───┴───┘ */ [0] = LAYOUT_96_iso( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_VOLD, KC_VOLU, KC_MUTE, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, 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_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, diff --git a/layouts/default/fullsize_ansi/default_fullsize_ansi/keymap.c b/layouts/default/fullsize_ansi/default_fullsize_ansi/keymap.c index dbe7c58c6c0..2e7bd55f95d 100644 --- a/layouts/default/fullsize_ansi/default_fullsize_ansi/keymap.c +++ b/layouts/default/fullsize_ansi/default_fullsize_ansi/keymap.c @@ -18,9 +18,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ */ [0] = LAYOUT_fullsize_ansi( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, 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_P4, KC_P5, KC_P6, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, diff --git a/layouts/default/fullsize_iso/default_fullsize_iso/keymap.c b/layouts/default/fullsize_iso/default_fullsize_iso/keymap.c index e2df016ad2b..c88693b2d87 100644 --- a/layouts/default/fullsize_iso/default_fullsize_iso/keymap.c +++ b/layouts/default/fullsize_iso/default_fullsize_iso/keymap.c @@ -18,9 +18,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘ */ [0] = LAYOUT_fullsize_iso( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, 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_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, diff --git a/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c b/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c index 85328983b7d..53cd4d34690 100644 --- a/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c +++ b/layouts/default/numpad_6x4/default_numpad_6x4/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT_numpad_6x4( KC_ESC, KC_TAB, MO(1), KC_BSPC, - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1, KC_P2, KC_P3, diff --git a/layouts/default/numpad_6x5/default_numpad_6x5/keymap.c b/layouts/default/numpad_6x5/default_numpad_6x5/keymap.c index 27ef07d19df..2bdbfc468d4 100644 --- a/layouts/default/numpad_6x5/default_numpad_6x5/keymap.c +++ b/layouts/default/numpad_6x5/default_numpad_6x5/keymap.c @@ -33,12 +33,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └───┴───────┴───┴───┘ */ [0] = LAYOUT_numpad_6x5( - KC_GRAVE, KC_ESC, KC_TAB, MO(1), KC_BSPC, - KC_COMMA, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_LGUI, KC_P7, KC_P8, KC_P9, - KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_LSHIFT, KC_P1, KC_P2, KC_P3, - KC_LCTRL, KC_P0, KC_PDOT, KC_PENT + KC_GRV, KC_ESC, KC_TAB, MO(1), KC_BSPC, + KC_COMM, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, + KC_LGUI, KC_P7, KC_P8, KC_P9, + KC_LALT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_P0, KC_PDOT, KC_PENT ), /* diff --git a/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c b/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c index 9beb9204a92..d1dc759de36 100644 --- a/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c +++ b/layouts/default/ortho_6x4/default_ortho_6x4/keymap.c @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT_ortho_6x4( KC_ESC, KC_TAB, MO(1), KC_BSPC, - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_PPLS, KC_P4, KC_P5, KC_P6, KC_PERC, KC_P1, KC_P2, KC_P3, KC_EQL, diff --git a/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c b/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c index 8b41a22b37c..caed507c75c 100644 --- a/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c +++ b/layouts/default/tkl_ansi/default_tkl_ansi/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ */ [0] = LAYOUT_tkl_ansi( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, 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_DEL, KC_END, KC_PGDN, diff --git a/layouts/default/tkl_iso/default_tkl_iso/keymap.c b/layouts/default/tkl_iso/default_tkl_iso/keymap.c index f82939d876b..2c4ffd01287 100644 --- a/layouts/default/tkl_iso/default_tkl_iso/keymap.c +++ b/layouts/default/tkl_iso/default_tkl_iso/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ */ [0] = LAYOUT_tkl_iso( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_TAB, 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_DEL, KC_END, KC_PGDN, diff --git a/lib/chibios b/lib/chibios index 413e39c5681..d7b9d1c87f7 160000 --- a/lib/chibios +++ b/lib/chibios @@ -1 +1 @@ -Subproject commit 413e39c5681d181720440f2a8b7391f581788d7b +Subproject commit d7b9d1c87f724bd7c8cd1486d6d0dc3ba52e0d52 diff --git a/lib/chibios-contrib b/lib/chibios-contrib index 4568901a91e..d1c2126d1cd 160000 --- a/lib/chibios-contrib +++ b/lib/chibios-contrib @@ -1 +1 @@ -Subproject commit 4568901a91e9bef78ea96a7a83e8150fe1f7353a +Subproject commit d1c2126d1cd867c50127da84425805e225df8555 diff --git a/lib/python/qmk/cli/__init__.py b/lib/python/qmk/cli/__init__.py index ea961315bdc..c51eece9559 100644 --- a/lib/python/qmk/cli/__init__.py +++ b/lib/python/qmk/cli/__init__.py @@ -36,7 +36,6 @@ subcommands = [ 'qmk.cli.chibios.confmigrate', 'qmk.cli.clean', 'qmk.cli.compile', - 'qmk.cli.console', 'qmk.cli.docs', 'qmk.cli.doctor', 'qmk.cli.fileformat', @@ -46,7 +45,9 @@ subcommands = [ 'qmk.cli.format.python', 'qmk.cli.format.text', 'qmk.cli.generate.api', + 'qmk.cli.generate.compilation_database', 'qmk.cli.generate.config_h', + 'qmk.cli.generate.develop_pr_list', 'qmk.cli.generate.dfu_header', 'qmk.cli.generate.docs', 'qmk.cli.generate.info_json', diff --git a/lib/python/qmk/cli/console.py b/lib/python/qmk/cli/console.py deleted file mode 100644 index 98c6bc0dc0f..00000000000 --- a/lib/python/qmk/cli/console.py +++ /dev/null @@ -1,303 +0,0 @@ -"""Acquire debugging information from usb hid devices - -cli implementation of https://www.pjrc.com/teensy/hid_listen.html -""" -from pathlib import Path -from threading import Thread -from time import sleep, strftime - -import hid -import usb.core - -from milc import cli - -LOG_COLOR = { - 'next': 0, - 'colors': [ - '{fg_blue}', - '{fg_cyan}', - '{fg_green}', - '{fg_magenta}', - '{fg_red}', - '{fg_yellow}', - ], -} - -KNOWN_BOOTLOADERS = { - # VID , PID - ('03EB', '2FEF'): 'atmel-dfu: ATmega16U2', - ('03EB', '2FF0'): 'atmel-dfu: ATmega32U2', - ('03EB', '2FF3'): 'atmel-dfu: ATmega16U4', - ('03EB', '2FF4'): 'atmel-dfu: ATmega32U4', - ('03EB', '2FF9'): 'atmel-dfu: AT90USB64', - ('03EB', '2FFA'): 'atmel-dfu: AT90USB162', - ('03EB', '2FFB'): 'atmel-dfu: AT90USB128', - ('03EB', '6124'): 'Microchip SAM-BA', - ('0483', 'DF11'): 'stm32-dfu: STM32 BOOTLOADER', - ('16C0', '05DC'): 'usbasploader: USBaspLoader', - ('16C0', '05DF'): 'bootloadhid: HIDBoot', - ('16C0', '0478'): 'halfkay: Teensy Halfkay', - ('1B4F', '9203'): 'caterina: Pro Micro 3.3V', - ('1B4F', '9205'): 'caterina: Pro Micro 5V', - ('1B4F', '9207'): 'caterina: LilyPadUSB', - ('1C11', 'B007'): 'kiibohd: Kiibohd DFU Bootloader', - ('1EAF', '0003'): 'stm32duino: Maple 003', - ('1FFB', '0101'): 'caterina: Polou A-Star 32U4 Bootloader', - ('2341', '0036'): 'caterina: Arduino Leonardo', - ('2341', '0037'): 'caterina: Arduino Micro', - ('239A', '000C'): 'caterina: Adafruit Feather 32U4', - ('239A', '000D'): 'caterina: Adafruit ItsyBitsy 32U4 3v', - ('239A', '000E'): 'caterina: Adafruit ItsyBitsy 32U4 5v', - ('2A03', '0036'): 'caterina: Arduino Leonardo', - ('2A03', '0037'): 'caterina: Arduino Micro', - ('314B', '0106'): 'apm32-dfu: APM32 DFU ISP Mode', - ('03EB', '2067'): 'qmk-hid: HID Bootloader', - ('03EB', '2045'): 'lufa-ms: LUFA Mass Storage Bootloader' -} - - -class MonitorDevice(object): - def __init__(self, hid_device, numeric): - self.hid_device = hid_device - self.numeric = numeric - self.device = hid.Device(path=hid_device['path']) - self.current_line = '' - - cli.log.info('Console Connected: %(color)s%(manufacturer_string)s %(product_string)s{style_reset_all} (%(color)s%(vendor_id)04X:%(product_id)04X:%(index)d{style_reset_all})', hid_device) - - def read(self, size, encoding='ascii', timeout=1): - """Read size bytes from the device. - """ - return self.device.read(size, timeout).decode(encoding) - - def read_line(self): - """Read from the device's console until we get a \n. - """ - while '\n' not in self.current_line: - self.current_line += self.read(32).replace('\x00', '') - - lines = self.current_line.split('\n', 1) - self.current_line = lines[1] - - return lines[0] - - def run_forever(self): - while True: - try: - message = {**self.hid_device, 'text': self.read_line()} - identifier = (int2hex(message['vendor_id']), int2hex(message['product_id'])) if self.numeric else (message['manufacturer_string'], message['product_string']) - message['identifier'] = ':'.join(identifier) - message['ts'] = '{style_dim}{fg_green}%s{style_reset_all} ' % (strftime(cli.config.general.datetime_fmt),) if cli.args.timestamp else '' - - cli.echo('%(ts)s%(color)s%(identifier)s:%(index)d{style_reset_all}: %(text)s' % message) - - except hid.HIDException: - break - - -class FindDevices(object): - def __init__(self, vid, pid, index, numeric): - self.vid = vid - self.pid = pid - self.index = index - self.numeric = numeric - - def run_forever(self): - """Process messages from our queue in a loop. - """ - live_devices = {} - live_bootloaders = {} - - while True: - try: - for device in list(live_devices): - if not live_devices[device]['thread'].is_alive(): - cli.log.info('Console Disconnected: %(color)s%(manufacturer_string)s %(product_string)s{style_reset_all} (%(color)s%(vendor_id)04X:%(product_id)04X:%(index)d{style_reset_all})', live_devices[device]) - del live_devices[device] - - for device in self.find_devices(): - if device['path'] not in live_devices: - device['color'] = LOG_COLOR['colors'][LOG_COLOR['next']] - LOG_COLOR['next'] = (LOG_COLOR['next'] + 1) % len(LOG_COLOR['colors']) - live_devices[device['path']] = device - - try: - monitor = MonitorDevice(device, self.numeric) - device['thread'] = Thread(target=monitor.run_forever, daemon=True) - - device['thread'].start() - except Exception as e: - device['e'] = e - device['e_name'] = e.__class__.__name__ - cli.log.error("Could not connect to %(color)s%(manufacturer_string)s %(product_string)s{style_reset_all} (%(color)s:%(vendor_id)04X:%(product_id)04X:%(index)d): %(e_name)s: %(e)s", device) - if cli.config.general.verbose: - cli.log.exception(e) - del live_devices[device['path']] - - if cli.args.bootloaders: - for device in self.find_bootloaders(): - if device.address in live_bootloaders: - live_bootloaders[device.address]._qmk_found = True - else: - name = KNOWN_BOOTLOADERS[(int2hex(device.idVendor), int2hex(device.idProduct))] - cli.log.info('Bootloader Connected: {style_bright}{fg_magenta}%s', name) - device._qmk_found = True - live_bootloaders[device.address] = device - - for device in list(live_bootloaders): - if live_bootloaders[device]._qmk_found: - live_bootloaders[device]._qmk_found = False - else: - name = KNOWN_BOOTLOADERS[(int2hex(live_bootloaders[device].idVendor), int2hex(live_bootloaders[device].idProduct))] - cli.log.info('Bootloader Disconnected: {style_bright}{fg_magenta}%s', name) - del live_bootloaders[device] - - sleep(.1) - - except KeyboardInterrupt: - break - - def is_bootloader(self, hid_device): - """Returns true if the device in question matches a known bootloader vid/pid. - """ - return (int2hex(hid_device.idVendor), int2hex(hid_device.idProduct)) in KNOWN_BOOTLOADERS - - def is_console_hid(self, hid_device): - """Returns true when the usage page indicates it's a teensy-style console. - """ - return hid_device['usage_page'] == 0xFF31 and hid_device['usage'] == 0x0074 - - def is_filtered_device(self, hid_device): - """Returns True if the device should be included in the list of available consoles. - """ - return int2hex(hid_device['vendor_id']) == self.vid and int2hex(hid_device['product_id']) == self.pid - - def find_devices_by_report(self, hid_devices): - """Returns a list of available teensy-style consoles by doing a brute-force search. - - Some versions of linux don't report usage and usage_page. In that case we fallback to reading the report (possibly inaccurately) ourselves. - """ - devices = [] - - for device in hid_devices: - path = device['path'].decode('utf-8') - - if path.startswith('/dev/hidraw'): - number = path[11:] - report = Path(f'/sys/class/hidraw/hidraw{number}/device/report_descriptor') - - if report.exists(): - rp = report.read_bytes() - - if rp[1] == 0x31 and rp[3] == 0x09: - devices.append(device) - - return devices - - def find_bootloaders(self): - """Returns a list of available bootloader devices. - """ - return list(filter(self.is_bootloader, usb.core.find(find_all=True))) - - def find_devices(self): - """Returns a list of available teensy-style consoles. - """ - hid_devices = hid.enumerate() - devices = list(filter(self.is_console_hid, hid_devices)) - - if not devices: - devices = self.find_devices_by_report(hid_devices) - - if self.vid and self.pid: - devices = list(filter(self.is_filtered_device, devices)) - - # Add index numbers - device_index = {} - for device in devices: - id = ':'.join((int2hex(device['vendor_id']), int2hex(device['product_id']))) - - if id not in device_index: - device_index[id] = 0 - - device_index[id] += 1 - device['index'] = device_index[id] - - return devices - - -def int2hex(number): - """Returns a string representation of the number as hex. - """ - return "%04X" % number - - -def list_devices(device_finder): - """Show the user a nicely formatted list of devices. - """ - devices = device_finder.find_devices() - - if devices: - cli.log.info('Available devices:') - for dev in devices: - color = LOG_COLOR['colors'][LOG_COLOR['next']] - LOG_COLOR['next'] = (LOG_COLOR['next'] + 1) % len(LOG_COLOR['colors']) - cli.log.info("\t%s%s:%s:%d{style_reset_all}\t%s %s", color, int2hex(dev['vendor_id']), int2hex(dev['product_id']), dev['index'], dev['manufacturer_string'], dev['product_string']) - - if cli.args.bootloaders: - bootloaders = device_finder.find_bootloaders() - - if bootloaders: - cli.log.info('Available Bootloaders:') - - for dev in bootloaders: - cli.log.info("\t%s:%s\t%s", int2hex(dev.idVendor), int2hex(dev.idProduct), KNOWN_BOOTLOADERS[(int2hex(dev.idVendor), int2hex(dev.idProduct))]) - - -@cli.argument('--bootloaders', arg_only=True, default=True, action='store_boolean', help='displaying bootloaders.') -@cli.argument('-d', '--device', help='Device to select - uses format :[:].') -@cli.argument('-l', '--list', arg_only=True, action='store_true', help='List available hid_listen devices.') -@cli.argument('-n', '--numeric', arg_only=True, action='store_true', help='Show VID/PID instead of names.') -@cli.argument('-t', '--timestamp', arg_only=True, action='store_true', help='Print the timestamp for received messages as well.') -@cli.argument('-w', '--wait', type=int, default=1, help="How many seconds to wait between checks (Default: 1)") -@cli.subcommand('Acquire debugging information from usb hid devices.', hidden=False if cli.config.user.developer else True) -def console(cli): - """Acquire debugging information from usb hid devices - """ - vid = None - pid = None - index = 1 - - if cli.config.console.device: - device = cli.config.console.device.split(':') - - if len(device) == 2: - vid, pid = device - - elif len(device) == 3: - vid, pid, index = device - - if not index.isdigit(): - cli.log.error('Device index must be a number! Got "%s" instead.', index) - exit(1) - - index = int(index) - - if index < 1: - cli.log.error('Device index must be greater than 0! Got %s', index) - exit(1) - - else: - cli.log.error('Invalid format for device, expected ":[:]" but got "%s".', cli.config.console.device) - cli.print_help() - exit(1) - - vid = vid.upper() - pid = pid.upper() - - device_finder = FindDevices(vid, pid, index, cli.args.numeric) - - if cli.args.list: - return list_devices(device_finder) - - print('Looking for devices...', flush=True) - device_finder.run_forever() diff --git a/lib/python/qmk/cli/doctor/check.py b/lib/python/qmk/cli/doctor/check.py index 0807f415185..2d691b64b05 100644 --- a/lib/python/qmk/cli/doctor/check.py +++ b/lib/python/qmk/cli/doctor/check.py @@ -26,7 +26,6 @@ ESSENTIAL_BINARIES = { 'arm-none-eabi-gcc': { 'version_arg': '-dumpversion' }, - 'bin/qmk': {}, } diff --git a/lib/python/qmk/cli/flash.py b/lib/python/qmk/cli/flash.py index c2d9e09c693..28e48a41015 100644 --- a/lib/python/qmk/cli/flash.py +++ b/lib/python/qmk/cli/flash.py @@ -18,17 +18,21 @@ def print_bootloader_help(): """Prints the available bootloaders listed in docs.qmk.fm. """ cli.log.info('Here are the available bootloaders:') + cli.echo('\tavrdude') + cli.echo('\tbootloadhid') cli.echo('\tdfu') + cli.echo('\tdfu-util') + cli.echo('\tmdloader') + cli.echo('\tst-flash') + cli.echo('\tst-link-cli') + cli.log.info('Enhanced variants for split keyboards:') + cli.echo('\tavrdude-split-left') + cli.echo('\tavrdude-split-right') cli.echo('\tdfu-ee') cli.echo('\tdfu-split-left') cli.echo('\tdfu-split-right') - cli.echo('\tavrdude') - cli.echo('\tBootloadHID') - cli.echo('\tdfu-util') cli.echo('\tdfu-util-split-left') cli.echo('\tdfu-util-split-right') - cli.echo('\tst-link-cli') - cli.echo('\tst-flash') cli.echo('For more info, visit https://docs.qmk.fm/#/flashing') diff --git a/lib/python/qmk/cli/format/python.py b/lib/python/qmk/cli/format/python.py index 95868d18a05..47b5c45fd50 100755 --- a/lib/python/qmk/cli/format/python.py +++ b/lib/python/qmk/cli/format/python.py @@ -25,9 +25,8 @@ def yapf_run(files): def filter_files(files): """Yield only files to be formatted and skip the rest """ - for file in files: - if file and file.name.split('.')[-1] in py_file_suffixes: + if file and normpath(file).name.split('.')[-1] in py_file_suffixes: yield file else: cli.log.debug('Skipping file %s', file) @@ -53,12 +52,14 @@ def format_python(cli): cli.log.warning('Filenames passed with -a, only formatting: %s', ','.join(map(str, files))) elif cli.args.all_files: - files = py_dirs + git_ls_cmd = ['git', 'ls-files', *py_dirs] + git_ls = cli.run(git_ls_cmd, stdin=DEVNULL) + files = list(filter_files(git_ls.stdout.split('\n'))) else: git_diff_cmd = ['git', 'diff', '--name-only', cli.args.base_branch, *py_dirs] git_diff = cli.run(git_diff_cmd, stdin=DEVNULL) - files = list(filter(None, git_diff.stdout.split('\n'))) + files = list(filter_files(git_diff.stdout.split('\n'))) # Sanity check if not files: diff --git a/lib/python/qmk/cli/generate/compilation_database.py b/lib/python/qmk/cli/generate/compilation_database.py new file mode 100755 index 00000000000..602635270c6 --- /dev/null +++ b/lib/python/qmk/cli/generate/compilation_database.py @@ -0,0 +1,133 @@ +"""Creates a compilation database for the given keyboard build. +""" + +import json +import os +import re +import shlex +import shutil +from functools import lru_cache +from pathlib import Path +from typing import Dict, Iterator, List, Union + +from milc import cli, MILC + +from qmk.commands import create_make_command +from qmk.constants import QMK_FIRMWARE +from qmk.decorators import automagic_keyboard, automagic_keymap + + +@lru_cache(maxsize=10) +def system_libs(binary: str) -> List[Path]: + """Find the system include directory that the given build tool uses. + """ + cli.log.debug("searching for system library directory for binary: %s", binary) + bin_path = shutil.which(binary) + + # Actually query xxxxxx-gcc to find its include paths. + if binary.endswith("gcc") or binary.endswith("g++"): + result = cli.run([binary, '-E', '-Wp,-v', '-'], capture_output=True, check=True, input='\n') + paths = [] + for line in result.stderr.splitlines(): + if line.startswith(" "): + paths.append(Path(line.strip()).resolve()) + return paths + + return list(Path(bin_path).resolve().parent.parent.glob("*/include")) if bin_path else [] + + +file_re = re.compile(r'printf "Compiling: ([^"]+)') +cmd_re = re.compile(r'LOG=\$\((.+?)&&') + + +def parse_make_n(f: Iterator[str]) -> List[Dict[str, str]]: + """parse the output of `make -n ` + + This function makes many assumptions about the format of your build log. + This happens to work right now for qmk. + """ + + state = 'start' + this_file = None + records = [] + for line in f: + if state == 'start': + m = file_re.search(line) + if m: + this_file = m.group(1) + state = 'cmd' + + if state == 'cmd': + assert this_file + m = cmd_re.search(line) + if m: + # we have a hit! + this_cmd = m.group(1) + args = shlex.split(this_cmd) + for s in system_libs(args[0]): + args += ['-isystem', '%s' % s] + new_cmd = ' '.join(shlex.quote(s) for s in args if s != '-mno-thumb-interwork') + records.append({"directory": str(QMK_FIRMWARE.resolve()), "command": new_cmd, "file": this_file}) + state = 'start' + + return records + + +@cli.argument('-kb', '--keyboard', help='The keyboard to build a firmware for. Ignored when a configurator export is supplied.') +@cli.argument('-km', '--keymap', help='The keymap to build a firmware for. Ignored when a configurator export is supplied.') +@cli.subcommand('Create a compilation database.') +@automagic_keyboard +@automagic_keymap +def generate_compilation_database(cli: MILC) -> Union[bool, int]: + """Creates a compilation database for the given keyboard build. + + Does a make clean, then a make -n for this target and uses the dry-run output to create + a compilation database (compile_commands.json). This file can help some IDEs and + IDE-like editors work better. For more information about this: + + https://clang.llvm.org/docs/JSONCompilationDatabase.html + """ + command = None + # check both config domains: the magic decorator fills in `generate_compilation_database` but the user is + # more likely to have set `compile` in their config file. + current_keyboard = cli.config.generate_compilation_database.keyboard or cli.config.user.keyboard + current_keymap = cli.config.generate_compilation_database.keymap or cli.config.user.keymap + + if current_keyboard and current_keymap: + # Generate the make command for a specific keyboard/keymap. + command = create_make_command(current_keyboard, current_keymap, dry_run=True) + elif not current_keyboard: + cli.log.error('Could not determine keyboard!') + elif not current_keymap: + cli.log.error('Could not determine keymap!') + + if not command: + cli.log.error('You must supply both `--keyboard` and `--keymap`, or be in a directory for a keyboard or keymap.') + cli.echo('usage: qmk compiledb [-kb KEYBOARD] [-km KEYMAP]') + return False + + # remove any environment variable overrides which could trip us up + env = os.environ.copy() + env.pop("MAKEFLAGS", None) + + # re-use same executable as the main make invocation (might be gmake) + clean_command = [command[0], 'clean'] + cli.log.info('Making clean with {fg_cyan}%s', ' '.join(clean_command)) + cli.run(clean_command, capture_output=False, check=True, env=env) + + cli.log.info('Gathering build instructions from {fg_cyan}%s', ' '.join(command)) + + result = cli.run(command, capture_output=True, check=True, env=env) + db = parse_make_n(result.stdout.splitlines()) + if not db: + cli.log.error("Failed to parse output from make output:\n%s", result.stdout) + return False + + cli.log.info("Found %s compile commands", len(db)) + + dbpath = QMK_FIRMWARE / 'compile_commands.json' + + cli.log.info(f"Writing build database to {dbpath}") + dbpath.write_text(json.dumps(db, indent=4)) + + return True diff --git a/lib/python/qmk/cli/generate/develop_pr_list.py b/lib/python/qmk/cli/generate/develop_pr_list.py new file mode 100755 index 00000000000..07e46752a6d --- /dev/null +++ b/lib/python/qmk/cli/generate/develop_pr_list.py @@ -0,0 +1,119 @@ +"""Export the initial list of PRs associated with a `develop` merge to `master`. +""" +import os +import re +from pathlib import Path +from subprocess import DEVNULL + +from milc import cli + +cache_timeout = 7 * 86400 +fix_expr = re.compile(r'fix', flags=re.IGNORECASE) +clean1_expr = re.compile(r'\[(develop|keyboard|keymap|core|cli|bug|docs|feature)\]', flags=re.IGNORECASE) +clean2_expr = re.compile(r'^(develop|keyboard|keymap|core|cli|bug|docs|feature):', flags=re.IGNORECASE) + + +def _get_pr_info(cache, gh, pr_num): + pull = cache.get(f'pull:{pr_num}') + if pull is None: + print(f'Retrieving info for PR #{pr_num}') + pull = gh.pulls.get(owner='qmk', repo='qmk_firmware', pull_number=pr_num) + cache.set(f'pull:{pr_num}', pull, cache_timeout) + return pull + + +def _try_open_cache(cli): + # These dependencies are manually handled because people complain. Fun. + try: + from sqlite_cache.sqlite_cache import SqliteCache + except ImportError: + return None + + cache_loc = Path(cli.config_file).parent + return SqliteCache(cache_loc) + + +def _get_github(): + try: + from ghapi.all import GhApi + except ImportError: + return None + + return GhApi() + + +@cli.argument('-f', '--from-ref', default='0.11.0', help='Git revision/tag/reference/branch to begin search') +@cli.argument('-b', '--branch', default='upstream/develop', help='Git branch to iterate (default: "upstream/develop")') +@cli.subcommand('Creates the develop PR list.', hidden=False if cli.config.user.developer else True) +def generate_develop_pr_list(cli): + """Retrieves information from GitHub regarding the list of PRs associated + with a merge of `develop` branch into `master`. + + Requires environment variable GITHUB_TOKEN to be set. + """ + + if 'GITHUB_TOKEN' not in os.environ or os.environ['GITHUB_TOKEN'] == '': + cli.log.error('Environment variable "GITHUB_TOKEN" is not set.') + return 1 + + cache = _try_open_cache(cli) + gh = _get_github() + + git_args = ['git', 'rev-list', '--oneline', '--no-merges', '--reverse', f'{cli.args.from_ref}...{cli.args.branch}', '^upstream/master'] + commit_list = cli.run(git_args, capture_output=True, stdin=DEVNULL) + + if cache is None or gh is None: + cli.log.error('Missing one or more dependent python packages: "ghapi", "python-sqlite-cache"') + return 1 + + pr_list_bugs = [] + pr_list_dependencies = [] + pr_list_core = [] + pr_list_keyboards = [] + pr_list_keyboard_fixes = [] + pr_list_cli = [] + pr_list_others = [] + + def _categorise_commit(commit_info): + def fix_or_normal(info, fixes_collection, normal_collection): + if "bug" in info['pr_labels'] or fix_expr.search(info['title']): + fixes_collection.append(info) + else: + normal_collection.append(info) + + if "dependencies" in commit_info['pr_labels']: + fix_or_normal(commit_info, pr_list_bugs, pr_list_dependencies) + elif "core" in commit_info['pr_labels']: + fix_or_normal(commit_info, pr_list_bugs, pr_list_core) + elif "keyboard" in commit_info['pr_labels'] or "keymap" in commit_info['pr_labels'] or "via" in commit_info['pr_labels']: + fix_or_normal(commit_info, pr_list_keyboard_fixes, pr_list_keyboards) + elif "cli" in commit_info['pr_labels']: + fix_or_normal(commit_info, pr_list_bugs, pr_list_cli) + else: + fix_or_normal(commit_info, pr_list_bugs, pr_list_others) + + git_expr = re.compile(r'^(?P[a-f0-9]+) (?P.*) \(#(?P<pr>[0-9]+)\)$') + for line in commit_list.stdout.split('\n'): + match = git_expr.search(line) + if match: + pr_info = _get_pr_info(cache, gh, match.group("pr")) + commit_info = {'hash': match.group("hash"), 'title': match.group("title"), 'pr_num': int(match.group("pr")), 'pr_labels': [label.name for label in pr_info.labels.items]} + _categorise_commit(commit_info) + + def _dump_commit_list(name, collection): + if len(collection) == 0: + return + print("") + print(f"{name}:") + for commit in sorted(collection, key=lambda x: x['pr_num']): + title = clean1_expr.sub('', clean2_expr.sub('', commit['title'])).strip() + pr_num = commit['pr_num'] + print(f'* {title} ([#{pr_num}](https://github.com/qmk/qmk_firmware/pull/{pr_num}))') + + _dump_commit_list("Core", pr_list_core) + _dump_commit_list("CLI", pr_list_cli) + _dump_commit_list("Submodule updates", pr_list_dependencies) + _dump_commit_list("Keyboards", pr_list_keyboards) + _dump_commit_list("Keyboard fixes", pr_list_keyboard_fixes) + _dump_commit_list("Others", pr_list_others) + _dump_commit_list("Bugs", pr_list_bugs) diff --git a/lib/python/qmk/cli/generate/dfu_header.py b/lib/python/qmk/cli/generate/dfu_header.py index 5a1b109f1e9..7fb585fc7d9 100644 --- a/lib/python/qmk/cli/generate/dfu_header.py +++ b/lib/python/qmk/cli/generate/dfu_header.py @@ -32,7 +32,7 @@ def generate_dfu_header(cli): keyboard_h_lines = ['/* This file was generated by `qmk generate-dfu-header`. Do not edit or copy.', ' */', '', '#pragma once'] keyboard_h_lines.append(f'#define MANUFACTURER {kb_info_json["manufacturer"]}') - keyboard_h_lines.append(f'#define PRODUCT {cli.config.generate_dfu_header.keyboard} Bootloader') + keyboard_h_lines.append(f'#define PRODUCT {kb_info_json["keyboard_name"]} Bootloader') # Optional if 'qmk_lufa_bootloader.esc_output' in kb_info_json: diff --git a/lib/python/qmk/cli/generate/rules_mk.py b/lib/python/qmk/cli/generate/rules_mk.py index dcaff29fae0..5d8d7cc8a7d 100755 --- a/lib/python/qmk/cli/generate/rules_mk.py +++ b/lib/python/qmk/cli/generate/rules_mk.py @@ -67,12 +67,9 @@ def generate_rules_mk(cli): # Iterate through features to enable/disable them if 'features' in kb_info_json: for feature, enabled in kb_info_json['features'].items(): - if feature == 'bootmagic_lite' and enabled: - rules_mk_lines.append('BOOTMAGIC_ENABLE ?= lite') - else: - feature = feature.upper() - enabled = 'yes' if enabled else 'no' - rules_mk_lines.append(f'{feature}_ENABLE ?= {enabled}') + feature = feature.upper() + enabled = 'yes' if enabled else 'no' + rules_mk_lines.append(f'{feature}_ENABLE ?= {enabled}') # Set SPLIT_TRANSPORT, if needed if kb_info_json.get('split', {}).get('transport', {}).get('protocol') == 'custom': diff --git a/lib/python/qmk/cli/json2c.py b/lib/python/qmk/cli/json2c.py index a90578c021d..ae8248e6b72 100755 --- a/lib/python/qmk/cli/json2c.py +++ b/lib/python/qmk/cli/json2c.py @@ -33,7 +33,7 @@ def json2c(cli): cli.args.output = None # Generate the keymap - keymap_c = qmk.keymap.generate_c(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) + keymap_c = qmk.keymap.generate_c(user_keymap) if cli.args.output: cli.args.output.parent.mkdir(parents=True, exist_ok=True) diff --git a/lib/python/qmk/cli/lint.py b/lib/python/qmk/cli/lint.py index 02b31fbc41f..96593ed69b7 100644 --- a/lib/python/qmk/cli/lint.py +++ b/lib/python/qmk/cli/lint.py @@ -1,72 +1,129 @@ """Command to look over a keyboard/keymap and check for common mistakes. """ +from pathlib import Path + from milc import cli from qmk.decorators import automagic_keyboard, automagic_keymap from qmk.info import info_json -from qmk.keyboard import find_readme, keyboard_completer +from qmk.keyboard import keyboard_completer, list_keyboards from qmk.keymap import locate_keymap from qmk.path import is_keyboard, keyboard -@cli.argument('--strict', action='store_true', help='Treat warnings as errors.') -@cli.argument('-kb', '--keyboard', completer=keyboard_completer, help='The keyboard to check.') -@cli.argument('-km', '--keymap', help='The keymap to check.') +def keymap_check(kb, km): + """Perform the keymap level checks. + """ + ok = True + keymap_path = locate_keymap(kb, km) + + if not keymap_path: + ok = False + cli.log.error("%s: Can't find %s keymap.", kb, km) + + return ok + + +def rules_mk_assignment_only(keyboard_path): + """Check the keyboard-level rules.mk to ensure it only has assignments. + """ + current_path = Path() + errors = [] + + for path_part in keyboard_path.parts: + current_path = current_path / path_part + rules_mk = current_path / 'rules.mk' + + if rules_mk.exists(): + continuation = None + + for i, line in enumerate(rules_mk.open()): + line = line.strip() + + if '#' in line: + line = line[:line.index('#')] + + if continuation: + line = continuation + line + continuation = None + + if line: + if line[-1] == '\\': + continuation = line[:-1] + continue + + if line and '=' not in line: + errors.append(f'Non-assignment code on line +{i} {rules_mk}: {line}') + + return errors + + +@cli.argument('--strict', action='store_true', help='Treat warnings as errors') +@cli.argument('-kb', '--keyboard', completer=keyboard_completer, help='Comma separated list of keyboards to check') +@cli.argument('-km', '--keymap', help='The keymap to check') +@cli.argument('--all-kb', action='store_true', arg_only=True, help='Check all keyboards') @cli.subcommand('Check keyboard and keymap for common mistakes.') @automagic_keyboard @automagic_keymap def lint(cli): """Check keyboard and keymap for common mistakes. """ - if not cli.config.lint.keyboard: - cli.log.error('Missing required argument: --keyboard') - cli.print_help() - return False + failed = [] - if not is_keyboard(cli.config.lint.keyboard): - cli.log.error('No such keyboard: %s', cli.config.lint.keyboard) - return False + # Determine our keyboard list + if cli.args.all_kb: + if cli.args.keyboard: + cli.log.warning('Both --all-kb and --keyboard passed, --all-kb takes presidence.') - # Gather data about the keyboard. - ok = True - keyboard_path = keyboard(cli.config.lint.keyboard) - keyboard_info = info_json(cli.config.lint.keyboard) - readme_path = find_readme(cli.config.lint.keyboard) - missing_readme_path = keyboard_path / 'readme.md' + keyboard_list = list_keyboards() + elif not cli.config.lint.keyboard: + cli.log.error('Missing required arguments: --keyboard or --all-kb') + cli.print_help() + return False + else: + keyboard_list = cli.config.lint.keyboard.split(',') - # Check for errors in the info.json - if keyboard_info['parse_errors']: - ok = False - cli.log.error('Errors found when generating info.json.') + # Lint each keyboard + for kb in keyboard_list: + if not is_keyboard(kb): + cli.log.error('No such keyboard: %s', kb) + continue - if cli.config.lint.strict and keyboard_info['parse_warnings']: - ok = False - cli.log.error('Warnings found when generating info.json (Strict mode enabled.)') + # Gather data about the keyboard. + ok = True + keyboard_path = keyboard(kb) + keyboard_info = info_json(kb) - # Check for a readme.md and warn if it doesn't exist - if not readme_path: - ok = False - cli.log.error('Missing %s', missing_readme_path) + # Check for errors in the info.json + if keyboard_info['parse_errors']: + ok = False + cli.log.error('%s: Errors found when generating info.json.', kb) - # Keymap specific checks - if cli.config.lint.keymap: - keymap_path = locate_keymap(cli.config.lint.keyboard, cli.config.lint.keymap) + if cli.config.lint.strict and keyboard_info['parse_warnings']: + ok = False + cli.log.error('%s: Warnings found when generating info.json (Strict mode enabled.)', kb) - if not keymap_path: + # Check the rules.mk file(s) + rules_mk_assignment_errors = rules_mk_assignment_only(keyboard_path) + if rules_mk_assignment_errors: ok = False - cli.log.error("Can't find %s keymap for %s keyboard.", cli.config.lint.keymap, cli.config.lint.keyboard) - else: - keymap_readme = keymap_path.parent / 'readme.md' - if not keymap_readme.exists(): - cli.log.warning('Missing %s', keymap_readme) + cli.log.error('%s: Non-assignment code found in rules.mk. Move it to post_rules.mk instead.', kb) + for assignment_error in rules_mk_assignment_errors: + cli.log.error(assignment_error) - if cli.config.lint.strict: - ok = False + # Keymap specific checks + if cli.config.lint.keymap: + if not keymap_check(kb, cli.config.lint.keymap): + ok = False + + # Report status + if not ok: + failed.append(kb) # Check and report the overall status - if ok: - cli.log.info('Lint check passed!') - return True + if failed: + cli.log.error('Lint check failed for: %s', ', '.join(failed)) + return False - cli.log.error('Lint check failed!') - return False + cli.log.info('Lint check passed!') + return True diff --git a/lib/python/qmk/cli/pytest.py b/lib/python/qmk/cli/pytest.py index bdb336b9a70..a7f01a872aa 100644 --- a/lib/python/qmk/cli/pytest.py +++ b/lib/python/qmk/cli/pytest.py @@ -12,6 +12,6 @@ def pytest(cli): """Run several linting/testing commands. """ nose2 = cli.run(['nose2', '-v'], capture_output=False, stdin=DEVNULL) - flake8 = cli.run(['flake8', 'lib/python', 'bin/qmk'], capture_output=False, stdin=DEVNULL) + flake8 = cli.run(['flake8', 'lib/python'], capture_output=False, stdin=DEVNULL) return flake8.returncode | nose2.returncode diff --git a/lib/python/qmk/commands.py b/lib/python/qmk/commands.py index 421453d8377..5a019437734 100644 --- a/lib/python/qmk/commands.py +++ b/lib/python/qmk/commands.py @@ -28,7 +28,7 @@ def _find_make(): return make_cmd -def create_make_target(target, parallel=1, **env_vars): +def create_make_target(target, dry_run=False, parallel=1, **env_vars): """Create a make command Args: @@ -36,6 +36,9 @@ def create_make_target(target, parallel=1, **env_vars): target Usually a make rule, such as 'clean' or 'all'. + dry_run + make -n -- don't actually build + parallel The number of make jobs to run in parallel @@ -52,10 +55,10 @@ def create_make_target(target, parallel=1, **env_vars): for key, value in env_vars.items(): env.append(f'{key}={value}') - return [make_cmd, *get_make_parallel_args(parallel), *env, target] + return [make_cmd, *(['-n'] if dry_run else []), *get_make_parallel_args(parallel), *env, target] -def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): +def create_make_command(keyboard, keymap, target=None, dry_run=False, parallel=1, **env_vars): """Create a make compile command Args: @@ -69,6 +72,9 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): target Usually a bootloader. + dry_run + make -n -- don't actually build + parallel The number of make jobs to run in parallel @@ -84,7 +90,7 @@ def create_make_command(keyboard, keymap, target=None, parallel=1, **env_vars): if target: make_args.append(target) - return create_make_target(':'.join(make_args), parallel, **env_vars) + return create_make_target(':'.join(make_args), dry_run=dry_run, parallel=parallel, **env_vars) def get_git_version(current_time, repo_dir='.', check_dir='.'): @@ -184,7 +190,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va target = f'{keyboard_filesafe}_{user_keymap["keymap"]}' keyboard_output = Path(f'{KEYBOARD_OUTPUT_PREFIX}{keyboard_filesafe}') keymap_output = Path(f'{keyboard_output}_{user_keymap["keymap"]}') - c_text = qmk.keymap.generate_c(user_keymap['keyboard'], user_keymap['layout'], user_keymap['layers']) + c_text = qmk.keymap.generate_c(user_keymap) keymap_dir = keymap_output / 'src' keymap_c = keymap_dir / 'keymap.c' @@ -233,7 +239,7 @@ def compile_configurator_json(user_keymap, bootloader=None, parallel=1, **env_va f'VERBOSE={verbose}', f'COLOR={color}', 'SILENT=false', - f'QMK_BIN={"bin/qmk" if "DEPRECATED_BIN_QMK" in os.environ else "qmk"}', + 'QMK_BIN="qmk"', ]) return make_command diff --git a/lib/python/qmk/constants.py b/lib/python/qmk/constants.py index 71a6c91c778..754091a97ee 100644 --- a/lib/python/qmk/constants.py +++ b/lib/python/qmk/constants.py @@ -13,7 +13,7 @@ QMK_FIRMWARE_UPSTREAM = 'qmk/qmk_firmware' MAX_KEYBOARD_SUBFOLDERS = 5 # Supported processor types -CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66F18', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443' +CHIBIOS_PROCESSORS = 'cortex-m0', 'cortex-m0plus', 'cortex-m3', 'cortex-m4', 'MKL26Z64', 'MK20DX128', 'MK20DX256', 'MK66FX1M0', 'STM32F042', 'STM32F072', 'STM32F103', 'STM32F303', 'STM32F401', 'STM32F407', 'STM32F411', 'STM32F446', 'STM32G431', 'STM32G474', 'STM32L412', 'STM32L422', 'STM32L433', 'STM32L443', 'GD32VF103', 'WB32F3G71' LUFA_PROCESSORS = 'at90usb162', 'atmega16u2', 'atmega32u2', 'atmega16u4', 'atmega32u4', 'at90usb646', 'at90usb647', 'at90usb1286', 'at90usb1287', None VUSB_PROCESSORS = 'atmega32a', 'atmega328p', 'atmega328', 'attiny85' diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index cc994845196..9a07fc842fb 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -122,11 +122,6 @@ def _extract_features(info_data, rules): if rules.get('BOOTMAGIC_ENABLE') == 'full': rules['BOOTMAGIC_ENABLE'] = 'on' - # Skip non-boolean features we haven't implemented special handling for - for feature in 'HAPTIC_ENABLE', 'QWIIC_ENABLE': - if rules.get(feature): - del rules[feature] - # Process the rest of the rules as booleans for key, value in rules.items(): if key.endswith('_ENABLE'): @@ -629,6 +624,8 @@ def arm_processor_rules(info_data, rules): if 'bootloader' not in info_data: if 'STM32' in info_data['processor']: info_data['bootloader'] = 'stm32-dfu' + elif 'WB32' in info_data['processor']: + info_data['bootloader'] = 'wb32-dfu' else: info_data['bootloader'] = 'unknown' diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index 6eec49cfd1a..00b5a78a5ac 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -17,6 +17,7 @@ from qmk.errors import CppError # The `keymap.c` template to use when a keyboard doesn't have its own DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H +__INCLUDES__ /* THIS FILE WAS GENERATED! * @@ -27,6 +28,7 @@ DEFAULT_KEYMAP_C = """#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { __KEYMAP_GOES_HERE__ }; + """ @@ -180,10 +182,11 @@ def generate_json(keymap, keyboard, layout, layers): return new_keymap -def generate_c(keyboard, layout, layers): - """Returns a `keymap.c` or `keymap.json` for the specified keyboard, layout, and layers. +def generate_c(keymap_json): + """Returns a `keymap.c`. + + `keymap_json` is a dictionary with the following keys: - Args: keyboard The name of the keyboard @@ -192,19 +195,89 @@ def generate_c(keyboard, layout, layers): layers An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. + + macros + A sequence of strings containing macros to implement for this keyboard. """ - new_keymap = template_c(keyboard) + new_keymap = template_c(keymap_json['keyboard']) layer_txt = [] - for layer_num, layer in enumerate(layers): + + for layer_num, layer in enumerate(keymap_json['layers']): if layer_num != 0: layer_txt[-1] = layer_txt[-1] + ',' layer = map(_strip_any, layer) layer_keys = ', '.join(layer) - layer_txt.append('\t[%s] = %s(%s)' % (layer_num, layout, layer_keys)) + layer_txt.append('\t[%s] = %s(%s)' % (layer_num, keymap_json['layout'], layer_keys)) keymap = '\n'.join(layer_txt) new_keymap = new_keymap.replace('__KEYMAP_GOES_HERE__', keymap) + if keymap_json.get('macros'): + macro_txt = [ + 'bool process_record_user(uint16_t keycode, keyrecord_t *record) {', + ' if (record->event.pressed) {', + ' switch (keycode) {', + ] + + for i, macro_array in enumerate(keymap_json['macros']): + macro = [] + + for macro_fragment in macro_array: + if isinstance(macro_fragment, str): + macro_fragment = macro_fragment.replace('\\', '\\\\') + macro_fragment = macro_fragment.replace('\r\n', r'\n') + macro_fragment = macro_fragment.replace('\n', r'\n') + macro_fragment = macro_fragment.replace('\r', r'\n') + macro_fragment = macro_fragment.replace('\t', r'\t') + macro_fragment = macro_fragment.replace('"', r'\"') + + macro.append(f'"{macro_fragment}"') + + elif isinstance(macro_fragment, dict): + newstring = [] + + if macro_fragment['action'] == 'delay': + newstring.append(f"SS_DELAY({macro_fragment['duration']})") + + elif macro_fragment['action'] == 'beep': + newstring.append(r'"\a"') + + elif macro_fragment['action'] == 'tap' and len(macro_fragment['keycodes']) > 1: + last_keycode = macro_fragment['keycodes'].pop() + + for keycode in macro_fragment['keycodes']: + newstring.append(f'SS_DOWN(X_{keycode})') + + newstring.append(f'SS_TAP(X_{last_keycode})') + + for keycode in reversed(macro_fragment['keycodes']): + newstring.append(f'SS_UP(X_{keycode})') + + else: + for keycode in macro_fragment['keycodes']: + newstring.append(f"SS_{macro_fragment['action'].upper()}(X_{keycode})") + + macro.append(''.join(newstring)) + + new_macro = "".join(macro) + new_macro = new_macro.replace('""', '') + macro_txt.append(f' case MACRO_{i}:') + macro_txt.append(f' SEND_STRING({new_macro});') + macro_txt.append(' return false;') + + macro_txt.append(' }') + macro_txt.append(' }') + macro_txt.append('\n return true;') + macro_txt.append('};') + macro_txt.append('') + + new_keymap = '\n'.join((new_keymap, *macro_txt)) + + if keymap_json.get('host_language'): + new_keymap = new_keymap.replace('__INCLUDES__', f'#include "keymap_{keymap_json["host_language"]}.h"\n#include "sendstring_{keymap_json["host_language"]}.h"\n') + else: + new_keymap = new_keymap.replace('__INCLUDES__', '') + return new_keymap @@ -217,7 +290,7 @@ def write_file(keymap_filename, keymap_content): return keymap_filename -def write_json(keyboard, keymap, layout, layers): +def write_json(keyboard, keymap, layout, layers, macros=None): """Generate the `keymap.json` and write it to disk. Returns the filename written to. @@ -235,19 +308,19 @@ def write_json(keyboard, keymap, layout, layers): layers An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. """ - keymap_json = generate_json(keyboard, keymap, layout, layers) + keymap_json = generate_json(keyboard, keymap, layout, layers, macros=None) keymap_content = json.dumps(keymap_json) keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.json' return write_file(keymap_file, keymap_content) -def write(keyboard, keymap, layout, layers): +def write(keymap_json): """Generate the `keymap.c` and write it to disk. Returns the filename written to. - Args: + `keymap_json` should be a dict with the following keys: keyboard The name of the keyboard @@ -259,9 +332,12 @@ def write(keyboard, keymap, layout, layers): layers An array of arrays describing the keymap. Each item in the inner array should be a string that is a valid QMK keycode. + + macros + A list of macros for this keymap. """ - keymap_content = generate_c(keyboard, layout, layers) - keymap_file = qmk.path.keymap(keyboard) / keymap / 'keymap.c' + keymap_content = generate_c(keymap_json) + keymap_file = qmk.path.keymap(keymap_json['keyboard']) / keymap_json['keymap'] / 'keymap.c' return write_file(keymap_file, keymap_content) diff --git a/lib/python/qmk/tests/minimal_info.json b/lib/python/qmk/tests/minimal_info.json index 11ef12fefe0..3aae4722bfe 100644 --- a/lib/python/qmk/tests/minimal_info.json +++ b/lib/python/qmk/tests/minimal_info.json @@ -4,7 +4,7 @@ "layouts": { "LAYOUT": { "layout": [ - { "label": "KC_A", "x": 0, "y": 0, "matrix": [0, 0] } + { "label": "KC_A", "matrix": [0, 0], "x": 0, "y": 0 } ] } } diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index 0dad5d5fc45..2973f817022 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -142,6 +142,14 @@ def test_json2c(): assert result.stdout == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT_ortho_1x1(KC_A)};\n\n' +def test_json2c_macros(): + result = check_subcommand("json2c", 'keyboards/handwired/pytest/macro/keymaps/default/keymap.json') + check_returncode(result) + assert 'LAYOUT_ortho_1x1(MACRO_0)' in result.stdout + assert 'case MACRO_0:' in result.stdout + assert 'SEND_STRING("Hello, World!"SS_TAP(X_ENTER));' in result.stdout + + def test_json2c_stdin(): result = check_subcommand_stdin('keyboards/handwired/pytest/has_template/keymaps/default_json/keymap.json', 'json2c', '-') check_returncode(result) @@ -151,7 +159,7 @@ def test_json2c_stdin(): def test_info(): result = check_subcommand('info', '-kb', 'handwired/pytest/basic') check_returncode(result) - assert 'Keyboard Name: handwired/pytest/basic' in result.stdout + assert 'Keyboard Name: pytest' in result.stdout assert 'Processor: atmega32u4' in result.stdout assert 'Layout:' not in result.stdout assert 'k0' not in result.stdout @@ -160,7 +168,7 @@ def test_info(): def test_info_keyboard_render(): result = check_subcommand('info', '-kb', 'handwired/pytest/basic', '-l') check_returncode(result) - assert 'Keyboard Name: handwired/pytest/basic' in result.stdout + assert 'Keyboard Name: pytest' in result.stdout assert 'Processor: atmega32u4' in result.stdout assert 'Layouts:' in result.stdout assert 'k0' in result.stdout @@ -169,7 +177,7 @@ def test_info_keyboard_render(): def test_info_keymap_render(): result = check_subcommand('info', '-kb', 'handwired/pytest/basic', '-km', 'default_json') check_returncode(result) - assert 'Keyboard Name: handwired/pytest/basic' in result.stdout + assert 'Keyboard Name: pytest' in result.stdout assert 'Processor: atmega32u4' in result.stdout if is_windows: @@ -181,7 +189,7 @@ def test_info_keymap_render(): def test_info_matrix_render(): result = check_subcommand('info', '-kb', 'handwired/pytest/basic', '-m') check_returncode(result) - assert 'Keyboard Name: handwired/pytest/basic' in result.stdout + assert 'Keyboard Name: pytest' in result.stdout assert 'Processor: atmega32u4' in result.stdout assert 'LAYOUT_ortho_1x1' in result.stdout @@ -242,7 +250,7 @@ def test_generate_config_h(): assert '# define DESCRIPTION handwired/pytest/basic' in result.stdout assert '# define DIODE_DIRECTION COL2ROW' in result.stdout assert '# define MANUFACTURER none' in result.stdout - assert '# define PRODUCT handwired/pytest/basic' in result.stdout + assert '# define PRODUCT pytest' in result.stdout assert '# define PRODUCT_ID 0x6465' in result.stdout assert '# define VENDOR_ID 0xFEED' in result.stdout assert '# define MATRIX_COLS 1' in result.stdout diff --git a/lib/python/qmk/tests/test_qmk_keymap.py b/lib/python/qmk/tests/test_qmk_keymap.py index b9e80df6724..5e2efc12329 100644 --- a/lib/python/qmk/tests/test_qmk_keymap.py +++ b/lib/python/qmk/tests/test_qmk_keymap.py @@ -22,7 +22,13 @@ def test_template_json_pytest_has_template(): def test_generate_c_pytest_has_template(): - templ = qmk.keymap.generate_c('handwired/pytest/has_template', 'LAYOUT', [['KC_A']]) + keymap_json = { + 'keyboard': 'handwired/pytest/has_template', + 'layout': 'LAYOUT', + 'layers': [['KC_A']], + 'macros': None, + } + templ = qmk.keymap.generate_c(keymap_json) assert templ == '#include QMK_KEYBOARD_H\nconst uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\t[0] = LAYOUT(KC_A)};\n' diff --git a/lib/ugfx b/lib/ugfx deleted file mode 160000 index 40b48f470ad..00000000000 --- a/lib/ugfx +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 40b48f470addad6a4fb1177de1a69a181158739b diff --git a/paths.mk b/paths.mk new file mode 100644 index 00000000000..5a39d00ecd7 --- /dev/null +++ b/paths.mk @@ -0,0 +1,31 @@ +# Directory common source files exist +TOP_DIR = . +TMK_DIR = tmk_core +TMK_PATH = $(TMK_DIR) +LIB_PATH = lib + +QUANTUM_DIR = quantum +QUANTUM_PATH = $(QUANTUM_DIR) + +DRIVER_DIR = drivers +DRIVER_PATH = $(DRIVER_DIR) + +PLATFORM_DIR = platforms +PLATFORM_PATH = $(PLATFORM_DIR) + +PROTOCOL_DIR = protocol +PROTOCOL_PATH = $(TMK_DIR)/$(PROTOCOL_DIR) + +BUILDDEFS_DIR = builddefs +BUILDDEFS_PATH = $(BUILDDEFS_DIR) + +BUILD_DIR := .build + +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)/sequencer +COMMON_VPATH += $(DRIVER_PATH) diff --git a/tmk_core/common/arm_atsam/_timer.h b/platforms/arm_atsam/_timer.h similarity index 100% rename from tmk_core/common/arm_atsam/_timer.h rename to platforms/arm_atsam/_timer.h diff --git a/tmk_core/common/arm_atsam/_wait.h b/platforms/arm_atsam/_wait.h similarity index 100% rename from tmk_core/common/arm_atsam/_wait.h rename to platforms/arm_atsam/_wait.h diff --git a/tmk_core/common/arm_atsam/atomic_util.h b/platforms/arm_atsam/atomic_util.h similarity index 100% rename from tmk_core/common/arm_atsam/atomic_util.h rename to platforms/arm_atsam/atomic_util.h diff --git a/tmk_core/common/arm_atsam/bootloader.c b/platforms/arm_atsam/bootloader.c similarity index 100% rename from tmk_core/common/arm_atsam/bootloader.c rename to platforms/arm_atsam/bootloader.c diff --git a/platforms/arm_atsam/eeprom.c b/platforms/arm_atsam/eeprom.c new file mode 100644 index 00000000000..ff1a692623a --- /dev/null +++ b/platforms/arm_atsam/eeprom.c @@ -0,0 +1,184 @@ +/* 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 "eeprom.h" +#include "debug.h" +#include "samd51j18a.h" +#include "core_cm4.h" +#include "component/nvmctrl.h" + +#ifndef EEPROM_SIZE +# include "eeconfig.h" +# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +#endif + +#ifndef MAX +# define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) +#endif + +#ifndef BUSY_RETRIES +# define BUSY_RETRIES 10000 +#endif + +// #define DEBUG_EEPROM_OUTPUT + +/* + * Debug print utils + */ +#if defined(DEBUG_EEPROM_OUTPUT) +# define eeprom_printf(fmt, ...) xprintf(fmt, ##__VA_ARGS__); +#else /* NO_DEBUG */ +# define eeprom_printf(fmt, ...) +#endif /* NO_DEBUG */ + +__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE] = {0}; +volatile uint8_t * SmartEEPROM8 = (uint8_t *)SEEPROM_ADDR; + +static inline bool eeprom_is_busy(void) { + int timeout = BUSY_RETRIES; + while (NVMCTRL->SEESTAT.bit.BUSY && timeout-- > 0) + ; + + return NVMCTRL->SEESTAT.bit.BUSY; +} + +static uint32_t get_virtual_eeprom_size(void) { + // clang-format off + static const uint32_t VIRTUAL_EEPROM_MAP[11][8] = { + /* 4 8 16 32 64 128 256 512 */ + /* 0*/ { 0, 0, 0, 0, 0, 0, 0, 0 }, + /* 1*/ { 512, 1024, 2048, 4096, 4096, 4096, 4096, 4096 }, + /* 2*/ { 512, 1024, 2048, 4096, 8192, 8192, 8192, 8192 }, + /* 3*/ { 512, 1024, 2048, 4096, 8192, 16384, 16384, 16384 }, + /* 4*/ { 512, 1024, 2048, 4096, 8192, 16384, 16384, 16384 }, + /* 5*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 32768 }, + /* 6*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 32768 }, + /* 7*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 32768 }, + /* 8*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 32768 }, + /* 9*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536 }, + /*10*/ { 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536 }, + }; + // clang-format on + + static uint32_t virtual_eeprom_size = UINT32_MAX; + if (virtual_eeprom_size == UINT32_MAX) { + virtual_eeprom_size = VIRTUAL_EEPROM_MAP[NVMCTRL->SEESTAT.bit.PSZ][NVMCTRL->SEESTAT.bit.SBLK]; + } + // eeprom_printf("get_virtual_eeprom_size:: %d:%d:%d\n", NVMCTRL->SEESTAT.bit.PSZ, NVMCTRL->SEESTAT.bit.SBLK, virtual_eeprom_size); + return virtual_eeprom_size; +} + +uint8_t eeprom_read_byte(const uint8_t *addr) { + uintptr_t offset = (uintptr_t)addr; + if (offset >= MAX(EEPROM_SIZE, get_virtual_eeprom_size())) { + eeprom_printf("eeprom_read_byte:: out of bounds\n"); + return 0x0; + } + + if (get_virtual_eeprom_size() == 0) { + return buffer[offset]; + } + + if (eeprom_is_busy()) { + eeprom_printf("eeprom_write_byte:: timeout\n"); + return 0x0; + } + + return SmartEEPROM8[offset]; +} + +void eeprom_write_byte(uint8_t *addr, uint8_t value) { + uintptr_t offset = (uintptr_t)addr; + if (offset >= MAX(EEPROM_SIZE, get_virtual_eeprom_size())) { + eeprom_printf("eeprom_write_byte:: out of bounds\n"); + return; + } + + if (get_virtual_eeprom_size() == 0) { + buffer[offset] = value; + return; + } + + if (eeprom_is_busy()) { + eeprom_printf("eeprom_write_byte:: timeout\n"); + return; + } + + SmartEEPROM8[offset] = value; +} + +uint16_t eeprom_read_word(const uint16_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); +} + +uint32_t eeprom_read_dword(const uint32_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); +} + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + const uint8_t *p = (const uint8_t *)addr; + uint8_t * dest = (uint8_t *)buf; + while (len--) { + *dest++ = eeprom_read_byte(p++); + } +} + +void eeprom_write_word(uint16_t *addr, uint16_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p, value >> 8); +} + +void eeprom_write_dword(uint32_t *addr, uint32_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p++, value >> 8); + eeprom_write_byte(p++, value >> 16); + eeprom_write_byte(p, value >> 24); +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + uint8_t * p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} + +void eeprom_update_byte(uint8_t *addr, uint8_t value) { eeprom_write_byte(addr, value); } + +void eeprom_update_word(uint16_t *addr, uint16_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p, value >> 8); +} + +void eeprom_update_dword(uint32_t *addr, uint32_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p++, value >> 8); + eeprom_write_byte(p++, value >> 16); + eeprom_write_byte(p, value >> 24); +} + +void eeprom_update_block(const void *buf, void *addr, size_t len) { + uint8_t * p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} diff --git a/platforms/arm_atsam/flash.mk b/platforms/arm_atsam/flash.mk index f31d4b4d95a..8152610ceb4 100644 --- a/platforms/arm_atsam/flash.mk +++ b/platforms/arm_atsam/flash.mk @@ -3,9 +3,20 @@ # Architecture or project specific options # +MDLOADER_CLI ?= mdloader + +define EXEC_MDLOADER + $(MDLOADER_CLI) --first --download $(BUILD_DIR)/$(TARGET).bin --restart +endef + +mdloader: bin + $(call EXEC_MDLOADER) + flash: bin ifneq ($(strip $(PROGRAM_CMD)),) $(UNSYNC_OUTPUT_CMD) && $(PROGRAM_CMD) +else ifeq ($(strip $(ARM_ATSAM)),SAMD51J18A) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_MDLOADER) else $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_ARCH)" endif diff --git a/platforms/arm_atsam/gpio.h b/platforms/arm_atsam/gpio.h new file mode 100644 index 00000000000..915ed0ef4f7 --- /dev/null +++ b/platforms/arm_atsam/gpio.h @@ -0,0 +1,77 @@ +/* Copyright 2021 QMK + * + * 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 3 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/>. + */ +#pragma once + +#include "stdint.h" +#include "samd51j18a.h" + +#include "pin_defs.h" + +typedef uint8_t pin_t; + +#define SAMD_PORT(pin) ((pin & 0x20) >> 5) +#define SAMD_PIN(pin) (pin & 0x1f) +#define SAMD_PIN_MASK(pin) (1 << (pin & 0x1f)) + +#define setPinInput(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ + PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ + } while (0) + +#define setPinInputHigh(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ + PORT->Group[SAMD_PORT(pin)].OUTSET.reg = SAMD_PIN_MASK(pin); \ + PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ + PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.PULLEN = 1; \ + } while (0) + +#define setPinInputLow(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ + PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ + PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ + PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.PULLEN = 1; \ + } while (0) + +#define setPinOutput(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].DIRSET.reg = SAMD_PIN_MASK(pin); \ + PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ + } while (0) + +#define writePinHigh(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].OUTSET.reg = SAMD_PIN_MASK(pin); \ + } while (0) + +#define writePinLow(pin) \ + do { \ + PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ + } while (0) + +#define writePin(pin, level) \ + do { \ + if (level) \ + PORT->Group[SAMD_PORT(pin)].OUTSET.reg = SAMD_PIN_MASK(pin); \ + else \ + PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ + } while (0) + +#define readPin(pin) ((PORT->Group[SAMD_PORT(pin)].IN.reg & SAMD_PIN_MASK(pin)) != 0) + +#define togglePin(pin) (PORT->Group[SAMD_PORT(pin)].OUTTGL.reg = SAMD_PIN_MASK(pin)) diff --git a/tmk_core/common/arm_atsam/pin_defs.h b/platforms/arm_atsam/pin_defs.h similarity index 100% rename from tmk_core/common/arm_atsam/pin_defs.h rename to platforms/arm_atsam/pin_defs.h diff --git a/tmk_core/common/arm_atsam/platform.c b/platforms/arm_atsam/platform.c similarity index 100% rename from tmk_core/common/arm_atsam/platform.c rename to platforms/arm_atsam/platform.c diff --git a/platforms/arm_atsam/platform.mk b/platforms/arm_atsam/platform.mk new file mode 100644 index 00000000000..b49bf764d7e --- /dev/null +++ b/platforms/arm_atsam/platform.mk @@ -0,0 +1,67 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Compiler settings +# +CC = $(CC_PREFIX) arm-none-eabi-gcc +OBJCOPY = arm-none-eabi-objcopy +OBJDUMP = arm-none-eabi-objdump +SIZE = arm-none-eabi-size +AR = arm-none-eabi-ar +NM = arm-none-eabi-nm +HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature +EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) +BIN = + +COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/include +COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include + +COMPILEFLAGS += -funsigned-char +COMPILEFLAGS += -funsigned-bitfields +COMPILEFLAGS += -ffunction-sections +COMPILEFLAGS += -fshort-enums +COMPILEFLAGS += -fno-inline-small-functions +COMPILEFLAGS += -fno-strict-aliasing +COMPILEFLAGS += -mfloat-abi=hard +COMPILEFLAGS += -mfpu=fpv4-sp-d16 +COMPILEFLAGS += -mthumb + +#ALLOW_WARNINGS = yes + +CFLAGS += $(COMPILEFLAGS) + +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions -std=c++11 + +LDFLAGS +=-Wl,--gc-sections +LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map" +LDFLAGS += -Wl,--start-group +LDFLAGS += -Wl,--end-group +LDFLAGS += --specs=rdimon.specs +LDFLAGS += -T$(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/gcc/gcc/samd51j18a_flash.ld + +OPT_DEFS += -DPROTOCOL_ARM_ATSAM + +MCUFLAGS = -mcpu=$(MCU) +MCUFLAGS += -D__$(ARM_ATSAM)__ + +# List any extra directories to look for libraries here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRALIBDIRS = + +cpfirmware: warn-arm_atsam +.INTERMEDIATE: warn-arm_atsam +warn-arm_atsam: $(FIRMWARE_FORMAT) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) + $(info This MCU support package has a lack of support from the upstream provider (Massdrop).) + $(info There are currently questions about valid licensing, and at this stage it's likely) + $(info their boards and supporting code will be removed from QMK in the near future. Please) + $(info contact Massdrop for support, and encourage them to align their future board design) + $(info choices to gain proper license compatibility with QMK.) + $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) + +# Convert hex to bin. +bin: $(BUILD_DIR)/$(TARGET).hex + $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/common/arm_atsam/platform_deps.h b/platforms/arm_atsam/platform_deps.h similarity index 100% rename from tmk_core/common/arm_atsam/platform_deps.h rename to platforms/arm_atsam/platform_deps.h diff --git a/tmk_core/common/arm_atsam/suspend.c b/platforms/arm_atsam/suspend.c similarity index 100% rename from tmk_core/common/arm_atsam/suspend.c rename to platforms/arm_atsam/suspend.c diff --git a/tmk_core/common/arm_atsam/timer.c b/platforms/arm_atsam/timer.c similarity index 100% rename from tmk_core/common/arm_atsam/timer.c rename to platforms/arm_atsam/timer.c diff --git a/tmk_core/common/atomic_util.h b/platforms/atomic_util.h similarity index 100% rename from tmk_core/common/atomic_util.h rename to platforms/atomic_util.h diff --git a/tmk_core/common/avr/_print.h b/platforms/avr/_print.h similarity index 100% rename from tmk_core/common/avr/_print.h rename to platforms/avr/_print.h diff --git a/tmk_core/common/avr/_timer.h b/platforms/avr/_timer.h similarity index 100% rename from tmk_core/common/avr/_timer.h rename to platforms/avr/_timer.h diff --git a/tmk_core/common/avr/_wait.h b/platforms/avr/_wait.h similarity index 100% rename from tmk_core/common/avr/_wait.h rename to platforms/avr/_wait.h diff --git a/tmk_core/common/avr/atomic_util.h b/platforms/avr/atomic_util.h similarity index 100% rename from tmk_core/common/avr/atomic_util.h rename to platforms/avr/atomic_util.h diff --git a/tmk_core/common/avr/bootloader.c b/platforms/avr/bootloader.c similarity index 100% rename from tmk_core/common/avr/bootloader.c rename to platforms/avr/bootloader.c diff --git a/tmk_core/common/avr/bootloader_size.c b/platforms/avr/bootloader_size.c similarity index 100% rename from tmk_core/common/avr/bootloader_size.c rename to platforms/avr/bootloader_size.c diff --git a/platforms/avr/drivers/analog.c b/platforms/avr/drivers/analog.c index 8d299ffdb92..628835ccef0 100644 --- a/platforms/avr/drivers/analog.c +++ b/platforms/avr/drivers/analog.c @@ -23,29 +23,6 @@ static uint8_t aref = ADC_REF_POWER; void analogReference(uint8_t mode) { aref = mode & (_BV(REFS1) | _BV(REFS0)); } -// Arduino compatible pin input -int16_t analogRead(uint8_t pin) { -#if defined(__AVR_ATmega32U4__) - // clang-format off - static const uint8_t PROGMEM pin_to_mux[] = { - //A0 A1 A2 A3 A4 A5 - //F7 F6 F5 F4 F1 F0 - 0x07, 0x06, 0x05, 0x04, 0x01, 0x00, - //A6 A7 A8 A9 A10 A11 - //D4 D7 B4 B5 B6 D6 - 0x20, 0x22, 0x23, 0x24, 0x25, 0x21 - }; - // clang-format on - if (pin >= 12) return 0; - return adc_read(pgm_read_byte(pin_to_mux + pin)); -#elif defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega328P__) || defined(__AVR_ATmega328__) - if (pin >= 8) return 0; - return adc_read(pin); -#else - return 0; -#endif -} - int16_t analogReadPin(pin_t pin) { return adc_read(pinToMux(pin)); } uint8_t pinToMux(pin_t pin) { diff --git a/platforms/avr/drivers/analog.h b/platforms/avr/drivers/analog.h index 058882450d6..fa2fb0d89b8 100644 --- a/platforms/avr/drivers/analog.h +++ b/platforms/avr/drivers/analog.h @@ -22,8 +22,7 @@ #ifdef __cplusplus extern "C" { #endif -void analogReference(uint8_t mode); -int16_t analogRead(uint8_t pin); +void analogReference(uint8_t mode); int16_t analogReadPin(pin_t pin); uint8_t pinToMux(pin_t pin); diff --git a/quantum/audio/driver_avr_pwm.h b/platforms/avr/drivers/audio_pwm.h similarity index 100% rename from quantum/audio/driver_avr_pwm.h rename to platforms/avr/drivers/audio_pwm.h diff --git a/quantum/audio/driver_avr_pwm_hardware.c b/platforms/avr/drivers/audio_pwm_hardware.c similarity index 100% rename from quantum/audio/driver_avr_pwm_hardware.c rename to platforms/avr/drivers/audio_pwm_hardware.c diff --git a/platforms/avr/drivers/i2c_master.c b/platforms/avr/drivers/i2c_master.c index 2773e00778e..111b55d6b0d 100644 --- a/platforms/avr/drivers/i2c_master.c +++ b/platforms/avr/drivers/i2c_master.c @@ -202,6 +202,25 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, return status; } +i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(devaddr | 0x00, timeout); + if (status >= 0) { + status = i2c_write(regaddr >> 8, timeout); + + if (status >= 0) { + status = i2c_write(regaddr & 0xFF, timeout); + + for (uint16_t i = 0; i < length && status >= 0; i++) { + status = i2c_write(data[i], timeout); + } + } + } + + i2c_stop(); + + return status; +} + i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_status_t status = i2c_start(devaddr, timeout); if (status < 0) { @@ -235,6 +254,43 @@ error: return (status < 0) ? status : I2C_STATUS_SUCCESS; } +i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_status_t status = i2c_start(devaddr, timeout); + if (status < 0) { + goto error; + } + + status = i2c_write(regaddr >> 8, timeout); + if (status < 0) { + goto error; + } + status = i2c_write(regaddr & 0xFF, timeout); + if (status < 0) { + goto error; + } + + status = i2c_start(devaddr | 0x01, timeout); + + for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) { + status = i2c_read_ack(timeout); + if (status >= 0) { + data[i] = status; + } + } + + if (status >= 0) { + status = i2c_read_nack(timeout); + if (status >= 0) { + data[(length - 1)] = status; + } + } + +error: + i2c_stop(); + + return (status < 0) ? status : I2C_STATUS_SUCCESS; +} + void i2c_stop(void) { // transmit STOP condition TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); diff --git a/platforms/avr/drivers/i2c_master.h b/platforms/avr/drivers/i2c_master.h index e5af73364be..2d95846db51 100644 --- a/platforms/avr/drivers/i2c_master.h +++ b/platforms/avr/drivers/i2c_master.h @@ -39,5 +39,7 @@ int16_t i2c_read_nack(uint16_t timeout); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); void i2c_stop(void); diff --git a/platforms/avr/drivers/ps2/ps2_io.c b/platforms/avr/drivers/ps2/ps2_io.c new file mode 100644 index 00000000000..7c826fbf1aa --- /dev/null +++ b/platforms/avr/drivers/ps2/ps2_io.c @@ -0,0 +1,51 @@ +#include <stdbool.h> +#include "ps2_io.h" +#include "gpio.h" +#include "wait.h" + +/* Check port settings for clock and data line */ +#if !(defined(PS2_CLOCK_PIN)) +# error "PS/2 clock setting is required in config.h" +#endif + +#if !(defined(PS2_DATA_PIN)) +# error "PS/2 data setting is required in config.h" +#endif + +/* + * Clock + */ +void clock_init(void) {} + +void clock_lo(void) { + // Transition from input with pull-up to output low via Hi-Z instead of output high + writePinLow(PS2_CLOCK_PIN); + setPinOutput(PS2_CLOCK_PIN); +} + +void clock_hi(void) { setPinInputHigh(PS2_CLOCK_PIN); } + +bool clock_in(void) { + setPinInputHigh(PS2_CLOCK_PIN); + wait_us(1); + return readPin(PS2_CLOCK_PIN); +} + +/* + * Data + */ +void data_init(void) {} + +void data_lo(void) { + // Transition from input with pull-up to output low via Hi-Z instead of output high + writePinLow(PS2_DATA_PIN); + setPinOutput(PS2_DATA_PIN); +} + +void data_hi(void) { setPinInputHigh(PS2_DATA_PIN); } + +bool data_in(void) { + setPinInputHigh(PS2_DATA_PIN); + wait_us(1); + return readPin(PS2_DATA_PIN); +} diff --git a/platforms/avr/drivers/ps2/ps2_usart.c b/platforms/avr/drivers/ps2/ps2_usart.c new file mode 100644 index 00000000000..151cfcd68f3 --- /dev/null +++ b/platforms/avr/drivers/ps2/ps2_usart.c @@ -0,0 +1,227 @@ +/* +Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com> + +This software is licensed with a Modified BSD License. +All of this is supposed to be Free Software, Open Source, DFSG-free, +GPL-compatible, and OK to use in both free and proprietary applications. +Additions and corrections to this file are welcome. + + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +* Neither the name of the copyright holders nor the names of + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +/* + * PS/2 protocol USART version + */ + +#include <stdbool.h> +#include <avr/interrupt.h> +#include <util/delay.h> +#include "gpio.h" +#include "ps2.h" +#include "ps2_io.h" +#include "print.h" + +#ifndef PS2_CLOCK_DDR +# define PS2_CLOCK_DDR PORTx_ADDRESS(PS2_CLOCK_PIN) +#endif +#ifndef PS2_CLOCK_BIT +# define PS2_CLOCK_BIT (PS2_CLOCK_PIN & 0xF) +#endif +#ifndef PS2_DATA_DDR +# define PS2_DATA_DDR PORTx_ADDRESS(PS2_DATA_PIN) +#endif +#ifndef PS2_DATA_BIT +# define PS2_DATA_BIT (PS2_DATA_PIN & 0xF) +#endif + +#define WAIT(stat, us, err) \ + do { \ + if (!wait_##stat(us)) { \ + ps2_error = err; \ + goto ERROR; \ + } \ + } while (0) + +uint8_t ps2_error = PS2_ERR_NONE; + +static inline uint8_t pbuf_dequeue(void); +static inline void pbuf_enqueue(uint8_t data); +static inline bool pbuf_has_data(void); +static inline void pbuf_clear(void); + +void ps2_host_init(void) { + idle(); // without this many USART errors occur when cable is disconnected + PS2_USART_INIT(); + PS2_USART_RX_INT_ON(); + // POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20) + //_delay_ms(2500); +} + +uint8_t ps2_host_send(uint8_t data) { + bool parity = true; + ps2_error = PS2_ERR_NONE; + + PS2_USART_OFF(); + + /* terminate a transmission if we have */ + inhibit(); + _delay_us(100); // [4]p.13 + + /* 'Request to Send' and Start bit */ + data_lo(); + clock_hi(); + WAIT(clock_lo, 10000, 10); // 10ms [5]p.50 + + /* Data bit[2-9] */ + for (uint8_t i = 0; i < 8; i++) { + _delay_us(15); + if (data & (1 << i)) { + parity = !parity; + data_hi(); + } else { + data_lo(); + } + WAIT(clock_hi, 50, 2); + WAIT(clock_lo, 50, 3); + } + + /* Parity bit */ + _delay_us(15); + if (parity) { + data_hi(); + } else { + data_lo(); + } + WAIT(clock_hi, 50, 4); + WAIT(clock_lo, 50, 5); + + /* Stop bit */ + _delay_us(15); + data_hi(); + + /* Ack */ + WAIT(data_lo, 50, 6); + WAIT(clock_lo, 50, 7); + + /* wait for idle state */ + WAIT(clock_hi, 50, 8); + WAIT(data_hi, 50, 9); + + idle(); + PS2_USART_INIT(); + PS2_USART_RX_INT_ON(); + return ps2_host_recv_response(); +ERROR: + idle(); + PS2_USART_INIT(); + PS2_USART_RX_INT_ON(); + return 0; +} + +uint8_t ps2_host_recv_response(void) { + // Command may take 25ms/20ms at most([5]p.46, [3]p.21) + uint8_t retry = 25; + while (retry-- && !pbuf_has_data()) { + _delay_ms(1); + } + return pbuf_dequeue(); +} + +uint8_t ps2_host_recv(void) { + if (pbuf_has_data()) { + ps2_error = PS2_ERR_NONE; + return pbuf_dequeue(); + } else { + ps2_error = PS2_ERR_NODATA; + return 0; + } +} + +ISR(PS2_USART_RX_VECT) { + // TODO: request RESEND when error occurs? + uint8_t error = PS2_USART_ERROR; // USART error should be read before data + uint8_t data = PS2_USART_RX_DATA; + if (!error) { + pbuf_enqueue(data); + } else { + xprintf("PS2 USART error: %02X data: %02X\n", error, data); + } +} + +/* send LED state to keyboard */ +void ps2_host_set_led(uint8_t led) { + ps2_host_send(0xED); + ps2_host_send(led); +} + +/*-------------------------------------------------------------------- + * Ring buffer to store scan codes from keyboard + *------------------------------------------------------------------*/ +#define PBUF_SIZE 32 +static uint8_t pbuf[PBUF_SIZE]; +static uint8_t pbuf_head = 0; +static uint8_t pbuf_tail = 0; +static inline void pbuf_enqueue(uint8_t data) { + uint8_t sreg = SREG; + cli(); + uint8_t next = (pbuf_head + 1) % PBUF_SIZE; + if (next != pbuf_tail) { + pbuf[pbuf_head] = data; + pbuf_head = next; + } else { + print("pbuf: full\n"); + } + SREG = sreg; +} +static inline uint8_t pbuf_dequeue(void) { + uint8_t val = 0; + + uint8_t sreg = SREG; + cli(); + if (pbuf_head != pbuf_tail) { + val = pbuf[pbuf_tail]; + pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; + } + SREG = sreg; + + return val; +} +static inline bool pbuf_has_data(void) { + uint8_t sreg = SREG; + cli(); + bool has_data = (pbuf_head != pbuf_tail); + SREG = sreg; + return has_data; +} +static inline void pbuf_clear(void) { + uint8_t sreg = SREG; + cli(); + pbuf_head = pbuf_tail = 0; + SREG = sreg; +} diff --git a/platforms/avr/drivers/uart.c b/platforms/avr/drivers/uart.c index c6abcb6fe0d..01cf6b1fb8d 100644 --- a/platforms/avr/drivers/uart.c +++ b/platforms/avr/drivers/uart.c @@ -100,7 +100,7 @@ void uart_init(uint32_t baud) { } // Transmit a byte -void uart_putchar(uint8_t c) { +void uart_write(uint8_t data) { uint8_t i; i = tx_buffer_head + 1; @@ -110,27 +110,39 @@ void uart_putchar(uint8_t c) { while (tx_buffer_tail == i) ; // wait until space in buffer // cli(); - tx_buffer[i] = c; + tx_buffer[i] = data; tx_buffer_head = i; UCSRnB = (1 << RXENn) | (1 << TXENn) | (1 << RXCIEn) | (1 << UDRIEn); // sei(); } // Receive a byte -uint8_t uart_getchar(void) { - uint8_t c, i; +uint8_t uart_read(void) { + uint8_t data, i; while (rx_buffer_head == rx_buffer_tail) ; // wait for character i = rx_buffer_tail + 1; if (i >= RX_BUFFER_SIZE) i = 0; - c = rx_buffer[i]; + data = rx_buffer[i]; rx_buffer_tail = i; - return c; + return data; +} + +void uart_transmit(const uint8_t *data, uint16_t length) { + for (uint16_t i = 0; i < length; i++) { + uart_write(data[i]); + } +} + +void uart_receive(uint8_t *data, uint16_t length) { + for (uint16_t i = 0; i < length; i++) { + data[i] = uart_read(); + } } // Return whether the number of bytes waiting in the receive buffer is nonzero. -// Call this before uart_getchar() to check if it will need +// Call this before uart_read() to check if it will need // to wait for a byte to arrive. bool uart_available(void) { uint8_t head, tail; diff --git a/platforms/avr/drivers/uart.h b/platforms/avr/drivers/uart.h index 602eb3d8b0f..e2dc664eda5 100644 --- a/platforms/avr/drivers/uart.h +++ b/platforms/avr/drivers/uart.h @@ -28,8 +28,12 @@ void uart_init(uint32_t baud); -void uart_putchar(uint8_t c); +void uart_write(uint8_t data); -uint8_t uart_getchar(void); +uint8_t uart_read(void); + +void uart_transmit(const uint8_t *data, uint16_t length); + +void uart_receive(uint8_t *data, uint16_t length); bool uart_available(void); diff --git a/platforms/avr/drivers/ws2812.c b/platforms/avr/drivers/ws2812.c index 77c492cd4c4..9150b3c520c 100644 --- a/platforms/avr/drivers/ws2812.c +++ b/platforms/avr/drivers/ws2812.c @@ -52,20 +52,15 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { using the fast 800kHz clockless WS2811/2812 protocol. */ -// Timing in ns -#define w_zeropulse 350 -#define w_onepulse 900 -#define w_totalperiod 1250 - // Fixed cycles used by the inner loop #define w_fixedlow 2 #define w_fixedhigh 4 #define w_fixedtotal 8 // Insert NOPs to match the timing, if possible -#define w_zerocycles (((F_CPU / 1000) * w_zeropulse) / 1000000) -#define w_onecycles (((F_CPU / 1000) * w_onepulse + 500000) / 1000000) -#define w_totalcycles (((F_CPU / 1000) * w_totalperiod + 500000) / 1000000) +#define w_zerocycles (((F_CPU / 1000) * WS2812_T0H) / 1000000) +#define w_onecycles (((F_CPU / 1000) * WS2812_T1H + 500000) / 1000000) +#define w_totalcycles (((F_CPU / 1000) * WS2812_TIMING + 500000) / 1000000) // w1_nops - nops between rising edge and falling edge - low #if w_zerocycles >= w_fixedlow diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk index 985cb60e52d..6d50e72534e 100644 --- a/platforms/avr/flash.mk +++ b/platforms/avr/flash.mk @@ -130,6 +130,15 @@ avrdude-split-right: $(BUILD_DIR)/$(TARGET).hex check-size cpfirmware $(call EXEC_AVRDUDE,eeprom-righthand.eep) define EXEC_USBASP + if $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | grep -q "could not find USB device with"; then \ + printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + until $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp 2>&1 | (! grep -q "could not find USB device with"); do\ + printf "." ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + done ;\ + printf "\n" ;\ + fi $(AVRDUDE_PROGRAMMER) -p $(AVRDUDE_MCU) -c usbasp -U flash:w:$(BUILD_DIR)/$(TARGET).hex endef diff --git a/tmk_core/common/avr/gpio.h b/platforms/avr/gpio.h similarity index 100% rename from tmk_core/common/avr/gpio.h rename to platforms/avr/gpio.h diff --git a/tmk_core/common/avr/pin_defs.h b/platforms/avr/pin_defs.h similarity index 100% rename from tmk_core/common/avr/pin_defs.h rename to platforms/avr/pin_defs.h diff --git a/tmk_core/common/avr/platform.c b/platforms/avr/platform.c similarity index 100% rename from tmk_core/common/avr/platform.c rename to platforms/avr/platform.c diff --git a/platforms/avr/platform.mk b/platforms/avr/platform.mk new file mode 100644 index 00000000000..b45108736f1 --- /dev/null +++ b/platforms/avr/platform.mk @@ -0,0 +1,179 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Compiler settings +# +CC = $(CC_PREFIX) avr-gcc +OBJCOPY = avr-objcopy +OBJDUMP = avr-objdump +SIZE = avr-size +AR = avr-ar +NM = avr-nm +HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature +EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) +BIN = + +COMPILEFLAGS += -funsigned-char +COMPILEFLAGS += -funsigned-bitfields +COMPILEFLAGS += -ffunction-sections +COMPILEFLAGS += -fdata-sections +COMPILEFLAGS += -fpack-struct +COMPILEFLAGS += -fshort-enums + +ASFLAGS += $(AVR_ASFLAGS) + +CFLAGS += $(COMPILEFLAGS) $(AVR_CFLAGS) +CFLAGS += -fno-inline-small-functions +CFLAGS += -fno-strict-aliasing + +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions -std=c++11 + +LDFLAGS +=-Wl,--gc-sections + +OPT_DEFS += -DF_CPU=$(F_CPU)UL + +MCUFLAGS = -mmcu=$(MCU) + +# List any extra directories to look for libraries here. +# Each directory must be seperated by a space. +# Use forward slashes for directory separators. +# For a directory that has spaces, enclose it in quotes. +EXTRALIBDIRS = + + +#---------------- External Memory Options ---------------- + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# used for variables (.data/.bss) and heap (malloc()). +#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff + +# 64 KB of external RAM, starting after internal RAM (ATmega128!), +# only used for heap (malloc()). +#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff + +EXTMEMOPTS = + +#---------------- Debugging Options ---------------- + +# Debugging format. +# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. +# AVR Studio 4.10 requires dwarf-2. +# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. +DEBUG = dwarf-2 + +# For simulavr only - target MCU frequency. +DEBUG_MFREQ = $(F_CPU) + +# Set the DEBUG_UI to either gdb or insight. +# DEBUG_UI = gdb +DEBUG_UI = insight + +# Set the debugging back-end to either avarice, simulavr. +DEBUG_BACKEND = avarice +#DEBUG_BACKEND = simulavr + +# GDB Init Filename. +GDBINIT_FILE = __avr_gdbinit + +# When using avarice settings for the JTAG +JTAG_DEV = /dev/com1 + +# Debugging port used to communicate between GDB / avarice / simulavr. +DEBUG_PORT = 4242 + +# Debugging host used to communicate between GDB / avarice / simulavr, normally +# just set to localhost unless doing some sort of crazy debugging when +# avarice is running on a different computer. +DEBUG_HOST = localhost + +#============================================================================ + +# Convert hex to bin. +bin: $(BUILD_DIR)/$(TARGET).hex +ifeq ($(BOOTLOADER),lufa-ms) + $(eval BIN_PADDING=$(shell n=`expr 32768 - $(BOOTLOADER_SIZE)` && echo $$(($$n)) || echo 0)) + $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin --pad-to $(BIN_PADDING) +else + $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin +endif + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; + +# copy bin to FLASH.bin +flashbin: bin + $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin; + +# Generate avr-gdb config/init file which does the following: +# define the reset signal, load the target file, connect to target, and set +# a breakpoint at main(). +gdb-config: + @$(REMOVE) $(GDBINIT_FILE) + @echo define reset >> $(GDBINIT_FILE) + @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) + @echo end >> $(GDBINIT_FILE) + @echo file $(BUILD_DIR)/$(TARGET).elf >> $(GDBINIT_FILE) + @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) +ifeq ($(DEBUG_BACKEND),simulavr) + @echo load >> $(GDBINIT_FILE) +endif + @echo break main >> $(GDBINIT_FILE) + +debug: gdb-config $(BUILD_DIR)/$(TARGET).elf +ifeq ($(DEBUG_BACKEND), avarice) + @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. + @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ + $(BUILD_DIR)/$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) + @$(WINSHELL) /c pause + +else + @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ + $(DEBUG_MFREQ) --port $(DEBUG_PORT) +endif + @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) + + + + +# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. +COFFCONVERT = $(OBJCOPY) --debugging +COFFCONVERT += --change-section-address .data-0x800000 +COFFCONVERT += --change-section-address .bss-0x800000 +COFFCONVERT += --change-section-address .noinit-0x800000 +COFFCONVERT += --change-section-address .eeprom-0x810000 + + + +coff: $(BUILD_DIR)/$(TARGET).elf + @$(SECHO) $(MSG_COFF) $(BUILD_DIR)/$(TARGET).cof + $(COFFCONVERT) -O coff-avr $< $(BUILD_DIR)/$(TARGET).cof + + +extcoff: $(BUILD_DIR)/$(TARGET).elf + @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof + $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof + +ifeq ($(strip $(BOOTLOADER)), qmk-dfu) +QMK_BOOTLOADER_TYPE = DFU +else ifeq ($(strip $(BOOTLOADER)), qmk-hid) +QMK_BOOTLOADER_TYPE = HID +endif + +bootloader: +ifeq ($(strip $(QMK_BOOTLOADER_TYPE)),) + $(error Please set BOOTLOADER to "qmk-dfu" or "qmk-hid" first!) +else + make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ clean + $(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Keyboard.h + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + $(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0)) + $(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0)) + $(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0)) + make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ MCU=$(MCU) ARCH=$(ARCH) F_CPU=$(F_CPU) FLASH_SIZE_KB=$(FLASH_SIZE_KB) BOOT_SECTION_SIZE_KB=$(BOOT_SECTION_SIZE_KB) + printf "Bootloader$(QMK_BOOTLOADER_TYPE).hex copied to $(TARGET)_bootloader.hex\n" + cp lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Bootloader$(QMK_BOOTLOADER_TYPE).hex $(TARGET)_bootloader.hex +endif + +production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware + @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex + @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex + echo "File sizes:" + $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex diff --git a/tmk_core/common/avr/platform_deps.h b/platforms/avr/platform_deps.h similarity index 100% rename from tmk_core/common/avr/platform_deps.h rename to platforms/avr/platform_deps.h diff --git a/tmk_core/common/avr/printf.c b/platforms/avr/printf.c similarity index 100% rename from tmk_core/common/avr/printf.c rename to platforms/avr/printf.c diff --git a/tmk_core/common/avr/printf.mk b/platforms/avr/printf.mk similarity index 100% rename from tmk_core/common/avr/printf.mk rename to platforms/avr/printf.mk diff --git a/tmk_core/common/avr/sleep_led.c b/platforms/avr/sleep_led.c similarity index 100% rename from tmk_core/common/avr/sleep_led.c rename to platforms/avr/sleep_led.c diff --git a/platforms/avr/suspend.c b/platforms/avr/suspend.c new file mode 100644 index 00000000000..b614746e6cd --- /dev/null +++ b/platforms/avr/suspend.c @@ -0,0 +1,152 @@ +#include <stdbool.h> +#include <avr/sleep.h> +#include <avr/wdt.h> +#include <avr/interrupt.h> +#include "matrix.h" +#include "action.h" +#include "suspend.h" +#include "timer.h" +#include "led.h" +#include "host.h" + +#ifdef PROTOCOL_LUFA +# include "lufa.h" +#endif +#ifdef PROTOCOL_VUSB +# include "vusb.h" +#endif + +/** \brief Suspend idle + * + * FIXME: needs doc + */ +void suspend_idle(uint8_t time) { + cli(); + set_sleep_mode(SLEEP_MODE_IDLE); + sleep_enable(); + sei(); + sleep_cpu(); + sleep_disable(); +} + +// TODO: This needs some cleanup + +#if !defined(NO_SUSPEND_POWER_DOWN) && defined(WDT_vect) + +// clang-format off +#define wdt_intr_enable(value) \ +__asm__ __volatile__ ( \ + "in __tmp_reg__,__SREG__" "\n\t" \ + "cli" "\n\t" \ + "wdr" "\n\t" \ + "sts %0,%1" "\n\t" \ + "out __SREG__,__tmp_reg__" "\n\t" \ + "sts %0,%2" "\n\t" \ + : /* no outputs */ \ + : "M" (_SFR_MEM_ADDR(_WD_CONTROL_REG)), \ + "r" (_BV(_WD_CHANGE_BIT) | _BV(WDE)), \ + "r" ((uint8_t) ((value & 0x08 ? _WD_PS3_MASK : 0x00) | _BV(WDIE) | (value & 0x07))) \ + : "r0" \ +) +// clang-format on + +/** \brief Power down MCU with watchdog timer + * + * wdto: watchdog timer timeout defined in <avr/wdt.h> + * WDTO_15MS + * WDTO_30MS + * WDTO_60MS + * WDTO_120MS + * WDTO_250MS + * WDTO_500MS + * WDTO_1S + * WDTO_2S + * WDTO_4S + * WDTO_8S + */ +static uint8_t wdt_timeout = 0; + +/** \brief Power down + * + * FIXME: needs doc + */ +static void power_down(uint8_t wdto) { + wdt_timeout = wdto; + + // Watchdog Interrupt Mode + wdt_intr_enable(wdto); + + // TODO: more power saving + // See PicoPower application note + // - I/O port input with pullup + // - prescale clock + // - BOD disable + // - Power Reduction Register PRR + set_sleep_mode(SLEEP_MODE_PWR_DOWN); + sleep_enable(); + sei(); + sleep_cpu(); + sleep_disable(); + + // Disable watchdog after sleep + wdt_disable(); +} +#endif + +/** \brief Suspend power down + * + * FIXME: needs doc + */ +void suspend_power_down(void) { +#ifdef PROTOCOL_LUFA + if (USB_DeviceState == DEVICE_STATE_Configured) return; +#endif +#ifdef PROTOCOL_VUSB + if (!vusb_suspended) return; +#endif + + suspend_power_down_quantum(); + +#ifndef NO_SUSPEND_POWER_DOWN + // Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt) +# if defined(WDT_vect) + power_down(WDTO_15MS); +# endif +#endif +} + +__attribute__((weak)) void matrix_power_up(void) {} +__attribute__((weak)) void matrix_power_down(void) {} +bool suspend_wakeup_condition(void) { + matrix_power_up(); + matrix_scan(); + matrix_power_down(); + for (uint8_t r = 0; r < MATRIX_ROWS; r++) { + if (matrix_get_row(r)) return true; + } + return false; +} + +/** \brief run immediately after wakeup + * + * FIXME: needs doc + */ +void suspend_wakeup_init(void) { + // clear keyboard state + clear_keyboard(); + + suspend_wakeup_init_quantum(); +} + +#if !defined(NO_SUSPEND_POWER_DOWN) && defined(WDT_vect) +/* watchdog timeout */ +ISR(WDT_vect) { + // compensate timer for sleep + switch (wdt_timeout) { + case WDTO_15MS: + timer_count += 15 + 2; // WDTO_15MS + 2(from observation) + break; + default:; + } +} +#endif diff --git a/tmk_core/common/avr/timer.c b/platforms/avr/timer.c similarity index 100% rename from tmk_core/common/avr/timer.c rename to platforms/avr/timer.c diff --git a/tmk_core/common/avr/timer_avr.h b/platforms/avr/timer_avr.h similarity index 100% rename from tmk_core/common/avr/timer_avr.h rename to platforms/avr/timer_avr.h diff --git a/tmk_core/common/avr/xprintf.S b/platforms/avr/xprintf.S similarity index 100% rename from tmk_core/common/avr/xprintf.S rename to platforms/avr/xprintf.S diff --git a/tmk_core/common/avr/xprintf.h b/platforms/avr/xprintf.h similarity index 100% rename from tmk_core/common/avr/xprintf.h rename to platforms/avr/xprintf.h diff --git a/tmk_core/common/bootloader.h b/platforms/bootloader.h similarity index 100% rename from tmk_core/common/bootloader.h rename to platforms/bootloader.h diff --git a/tmk_core/common/chibios/_timer.h b/platforms/chibios/_timer.h similarity index 100% rename from tmk_core/common/chibios/_timer.h rename to platforms/chibios/_timer.h diff --git a/tmk_core/common/chibios/_wait.c b/platforms/chibios/_wait.c similarity index 100% rename from tmk_core/common/chibios/_wait.c rename to platforms/chibios/_wait.c diff --git a/platforms/chibios/_wait.h b/platforms/chibios/_wait.h new file mode 100644 index 00000000000..2f36c64a2e6 --- /dev/null +++ b/platforms/chibios/_wait.h @@ -0,0 +1,60 @@ +/* Copyright 2021 QMK + * + * 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 3 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/>. + */ +#pragma once + +#include <ch.h> +#include <hal.h> + +/* chThdSleepX of zero maps to infinite - so we map to a tiny delay to still yield */ +#define wait_ms(ms) \ + do { \ + if (ms != 0) { \ + chThdSleepMilliseconds(ms); \ + } else { \ + chThdSleepMicroseconds(1); \ + } \ + } while (0) + +#ifdef WAIT_US_TIMER +void wait_us(uint16_t duration); +#else +# define wait_us(us) \ + do { \ + if (us != 0) { \ + chThdSleepMicroseconds(us); \ + } else { \ + chThdSleepMicroseconds(1); \ + } \ + } while (0) +#endif + +#include "_wait.c" + +/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus + * to which the GPIO is connected. + * The connected buses differ depending on the various series of MCUs. + * And since the instruction execution clock of the CPU and the bus clock of GPIO are different, + * there is a delay of several clocks to read the change of the input signal. + * + * Define this delay with the GPIO_INPUT_PIN_DELAY macro. + * If the GPIO_INPUT_PIN_DELAY macro is not defined, the following default values will be used. + * (A fairly large value of 0.25 microseconds is set.) + */ +#ifndef GPIO_INPUT_PIN_DELAY +# define GPIO_INPUT_PIN_DELAY (CPU_CLOCK / 1000000L / 4) +#endif + +#define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) diff --git a/tmk_core/common/chibios/atomic_util.h b/platforms/chibios/atomic_util.h similarity index 100% rename from tmk_core/common/chibios/atomic_util.h rename to platforms/chibios/atomic_util.h diff --git a/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h index ba6e934fe7b..a21fd7bd128 100644 --- a/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h +++ b/platforms/chibios/boards/BLACKPILL_STM32_F401/configs/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F401_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED TRUE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -44,13 +48,13 @@ #define STM32_CLOCK48_REQUIRED TRUE #define STM32_SW STM32_SW_PLL #define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLM_VALUE 25 -#define STM32_PLLN_VALUE 336 -#define STM32_PLLP_VALUE 4 -#define STM32_PLLQ_VALUE 7 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV4 -#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_PLLM_VALUE 25 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 4 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 #define STM32_RTCSEL STM32_RTCSEL_LSI #define STM32_RTCPRE_VALUE 8 #define STM32_MCO1SEL STM32_MCO1SEL_HSI @@ -60,9 +64,6 @@ #define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -82,6 +83,19 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 + /* * ADC driver system settings. */ @@ -101,14 +115,8 @@ #define STM32_GPT_USE_TIM4 FALSE #define STM32_GPT_USE_TIM5 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -155,29 +163,20 @@ #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE /* * SERIAL driver system settings. @@ -185,9 +184,6 @@ #define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. @@ -227,9 +223,6 @@ #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0 @@ -241,9 +234,7 @@ #define STM32_USB_USE_OTG1 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h index 0394ff56bb9..131c847661c 100644 --- a/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h +++ b/platforms/chibios/boards/BLACKPILL_STM32_F411/configs/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F411_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED TRUE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -60,9 +64,6 @@ #define STM32_I2SSRC STM32_I2SSRC_CKIN #define STM32_PLLI2SN_VALUE 192 #define STM32_PLLI2SR_VALUE 5 -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -82,6 +83,19 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 + /* * ADC driver system settings. */ @@ -101,14 +115,8 @@ #define STM32_GPT_USE_TIM4 FALSE #define STM32_GPT_USE_TIM5 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -155,29 +163,28 @@ #define STM32_ICU_USE_TIM4 FALSE #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 /* * SERIAL driver system settings. @@ -185,9 +192,6 @@ #define STM32_SERIAL_USE_USART1 FALSE #define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART6 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 /* * SPI driver system settings. @@ -227,9 +231,6 @@ #define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART6_DMA_PRIORITY 0 @@ -241,9 +242,7 @@ #define STM32_USB_USE_OTG1 TRUE #define STM32_USB_OTG1_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/platforms/chibios/boards/GENERIC_STM32_F405XG/board/board.mk b/platforms/chibios/boards/GENERIC_STM32_F405XG/board/board.mk new file mode 100644 index 00000000000..6c837bb8ee2 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F405XG/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) \ No newline at end of file diff --git a/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/board.h b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/board.h new file mode 100644 index 00000000000..8cb771bc12f --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/board.h @@ -0,0 +1,28 @@ +/* Copyright 2020 Nick Brassel (tzarc) + * + * 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 3 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 <https://www.gnu.org/licenses/>. + */ +#pragma once + +#define STM32_HSECLK 12000000 +// The following is required to disable the pull-down on PA9, when PA9 is used for the keyboard matrix: +#define BOARD_OTG_NOVBUSSENS + +#include_next "board.h" + +#undef STM32_HSE_BYPASS + +#undef STM32F407xx +#define STM32F405xG +#define STM32F405xx diff --git a/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h new file mode 100644 index 00000000000..cc52a953ed4 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/config.h @@ -0,0 +1,23 @@ +/* Copyright 2021 Andrei Purdea + * + * 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/>. + */ + +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up by checking against ST's application note AN2606. + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFF0000 +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE +#endif diff --git a/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/mcuconf.h new file mode 100644 index 00000000000..908a580a91b --- /dev/null +++ b/platforms/chibios/boards/GENERIC_STM32_F405XG/configs/mcuconf.h @@ -0,0 +1,352 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +/* + * STM32F4xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F4xx_MCUCONF +#define STM32F405_MCUCONF +#define STM32F415_MCUCONF +#define STM32F407_MCUCONF +#define STM32F417_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_CLOCK48_REQUIRED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLM_VALUE 12 +#define STM32_PLLN_VALUE 336 +#define STM32_PLLP_VALUE 2 +#define STM32_PLLQ_VALUE 7 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV4 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_RTCSEL STM32_RTCSEL_LSI +#define STM32_RTCPRE_VALUE 8 +#define STM32_MCO1SEL STM32_MCO1SEL_HSI +#define STM32_MCO1PRE STM32_MCO1PRE_DIV1 +#define STM32_MCO2SEL STM32_MCO2SEL_SYSCLK +#define STM32_MCO2PRE STM32_MCO2PRE_DIV5 +#define STM32_I2SSRC STM32_I2SSRC_CKIN +#define STM32_PLLI2SN_VALUE 192 +#define STM32_PLLI2SR_VALUE 5 + +/* + * IRQ system settings. + */ +#define STM32_IRQ_EXTI0_PRIORITY 6 +#define STM32_IRQ_EXTI1_PRIORITY 6 +#define STM32_IRQ_EXTI2_PRIORITY 6 +#define STM32_IRQ_EXTI3_PRIORITY 6 +#define STM32_IRQ_EXTI4_PRIORITY 6 +#define STM32_IRQ_EXTI5_9_PRIORITY 6 +#define STM32_IRQ_EXTI10_15_PRIORITY 6 +#define STM32_IRQ_EXTI16_PRIORITY 6 +#define STM32_IRQ_EXTI17_PRIORITY 15 +#define STM32_IRQ_EXTI18_PRIORITY 6 +#define STM32_IRQ_EXTI19_PRIORITY 6 +#define STM32_IRQ_EXTI20_PRIORITY 6 +#define STM32_IRQ_EXTI21_PRIORITY 15 +#define STM32_IRQ_EXTI22_PRIORITY 15 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4 +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_USE_ADC2 FALSE +#define STM32_ADC_USE_ADC3 FALSE +#define STM32_ADC_ADC1_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_ADC_ADC2_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_ADC_ADC3_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC2_DMA_PRIORITY 2 +#define STM32_ADC_ADC3_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 6 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC2_DMA_IRQ_PRIORITY 6 +#define STM32_ADC_ADC3_DMA_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_USE_CAN2 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 +#define STM32_CAN_CAN2_IRQ_PRIORITY 11 + +/* + * DAC driver system settings. + */ +#define STM32_DAC_DUAL_MODE FALSE +#define STM32_DAC_USE_DAC1_CH1 FALSE +#define STM32_DAC_USE_DAC1_CH2 FALSE +#define STM32_DAC_DAC1_CH1_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH2_IRQ_PRIORITY 10 +#define STM32_DAC_DAC1_CH1_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 +#define STM32_DAC_DAC1_CH1_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_DAC_DAC1_CH2_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM6 FALSE +#define STM32_GPT_USE_TIM7 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM11 FALSE +#define STM32_GPT_USE_TIM12 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM6_IRQ_PRIORITY 7 +#define STM32_GPT_TIM7_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 +#define STM32_GPT_TIM9_IRQ_PRIORITY 7 +#define STM32_GPT_TIM11_IRQ_PRIORITY 7 +#define STM32_GPT_TIM12_IRQ_PRIORITY 7 +#define STM32_GPT_TIM14_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_USE_I2C3 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_I2C2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_I2C_I2C3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C3_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_I2C3_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * I2S driver system settings. + */ +#define STM32_I2S_USE_SPI2 FALSE +#define STM32_I2S_USE_SPI3 FALSE +#define STM32_I2S_SPI2_IRQ_PRIORITY 10 +#define STM32_I2S_SPI3_IRQ_PRIORITY 10 +#define STM32_I2S_SPI2_DMA_PRIORITY 1 +#define STM32_I2S_SPI3_DMA_PRIORITY 1 +#define STM32_I2S_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_I2S_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_I2S_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_I2S_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_USE_TIM9 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 +#define STM32_ICU_TIM9_IRQ_PRIORITY 7 + +/* + * MAC driver system settings. + */ +#define STM32_MAC_TRANSMIT_BUFFERS 2 +#define STM32_MAC_RECEIVE_BUFFERS 4 +#define STM32_MAC_BUFFERS_SIZE 1522 +#define STM32_MAC_PHY_TIMEOUT 100 +#define STM32_MAC_ETH1_CHANGE_PHY_STATE TRUE +#define STM32_MAC_ETH1_IRQ_PRIORITY 13 +#define STM32_MAC_IP_CHECKSUM_OFFLOAD 0 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_USE_TIM9 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 +#define STM32_PWM_TIM9_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 + +/* + * SDC driver system settings. + */ +#define STM32_SDC_SDIO_DMA_PRIORITY 3 +#define STM32_SDC_SDIO_IRQ_PRIORITY 9 +#define STM32_SDC_WRITE_TIMEOUT_MS 1000 +#define STM32_SDC_READ_TIMEOUT_MS 1000 +#define STM32_SDC_CLOCK_ACTIVATION_DELAY 10 +#define STM32_SDC_SDIO_UNALIGNED_SUPPORT TRUE +#define STM32_SDC_SDIO_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USE_USART6 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 +#define STM32_SERIAL_USART6_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) +#define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USE_UART4 FALSE +#define STM32_UART_USE_UART5 FALSE +#define STM32_UART_USE_USART6 FALSE +#define STM32_UART_USART1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) +#define STM32_UART_USART1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_UART_USART2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_UART_USART3_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 1) +#define STM32_UART_USART3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) +#define STM32_UART_UART4_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 2) +#define STM32_UART_UART4_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_UART_UART5_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 0) +#define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) +#define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_UART4_IRQ_PRIORITY 12 +#define STM32_UART_UART5_IRQ_PRIORITY 12 +#define STM32_UART_USART6_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_UART4_DMA_PRIORITY 0 +#define STM32_UART_UART5_DMA_PRIORITY 0 +#define STM32_UART_USART6_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_OTG1 TRUE +#define STM32_USB_USE_OTG2 FALSE +#define STM32_USB_OTG1_IRQ_PRIORITY 14 +#define STM32_USB_OTG2_IRQ_PRIORITY 14 +#define STM32_USB_OTG1_RX_FIFO_SIZE 512 +#define STM32_USB_OTG2_RX_FIFO_SIZE 1024 +#define STM32_USB_HOST_WAKEUP_DURATION 2 + +/* + * WDG driver system settings. + */ +#define STM32_WDG_USE_IWDG FALSE + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h index 4be47fe1b04..928ee56c71c 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h +++ b/platforms/chibios/boards/GENERIC_STM32_F407XE/configs/mcuconf.h @@ -344,9 +344,6 @@ #define STM32_USB_OTG2_RX_FIFO_SIZE 1024 #define STM32_USB_HOST_WAKEUP_DURATION 2 -#define STM32_USB_OTG_THREAD_PRIO NORMALPRIO+1 -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 - /* * WDG driver system settings. */ diff --git a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h index d2de75590ed..566c146c259 100644 --- a/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h +++ b/platforms/chibios/boards/GENERIC_STM32_F446XE/configs/mcuconf.h @@ -1,5 +1,5 @@ /* - ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2006..2020 Giovanni Di Sirio Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -32,11 +32,15 @@ */ #define STM32F4xx_MCUCONF +#define STM32F446_MCUCONF /* * HAL driver system settings. */ #define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_BKPRAM_ENABLE FALSE #define STM32_HSI_ENABLED FALSE #define STM32_LSI_ENABLED TRUE #define STM32_HSE_ENABLED TRUE @@ -70,9 +74,6 @@ #define STM32_SAI1SEL STM32_SAI2SEL_PLLR #define STM32_SAI2SEL STM32_SAI2SEL_PLLR #define STM32_CK48MSEL STM32_CK48MSEL_PLLALT -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_BKPRAM_ENABLE FALSE /* * IRQ system settings. @@ -92,6 +93,30 @@ #define STM32_IRQ_EXTI21_PRIORITY 15 #define STM32_IRQ_EXTI22_PRIORITY 15 +#define STM32_IRQ_TIM1_BRK_TIM9_PRIORITY 7 +#define STM32_IRQ_TIM1_UP_TIM10_PRIORITY 7 +#define STM32_IRQ_TIM1_TRGCO_TIM11_PRIORITY 7 +#define STM32_IRQ_TIM1_CC_PRIORITY 7 +#define STM32_IRQ_TIM2_PRIORITY 7 +#define STM32_IRQ_TIM3_PRIORITY 7 +#define STM32_IRQ_TIM4_PRIORITY 7 +#define STM32_IRQ_TIM5_PRIORITY 7 +#define STM32_IRQ_TIM6_PRIORITY 7 +#define STM32_IRQ_TIM7_PRIORITY 7 +#define STM32_IRQ_TIM8_BRK_TIM12_PRIORITY 7 +#define STM32_IRQ_TIM8_UP_TIM13_PRIORITY 7 +#define STM32_IRQ_TIM8_TRGCO_TIM14_PRIORITY 7 +#define STM32_IRQ_TIM8_CC_PRIORITY 7 + +#define STM32_IRQ_USART1_PRIORITY 12 +#define STM32_IRQ_USART2_PRIORITY 12 +#define STM32_IRQ_USART3_PRIORITY 12 +#define STM32_IRQ_UART4_PRIORITY 12 +#define STM32_IRQ_UART5_PRIORITY 12 +#define STM32_IRQ_USART6_PRIORITY 12 +#define STM32_IRQ_UART7_PRIORITY 12 +#define STM32_IRQ_UART8_PRIORITY 12 + /* * ADC driver system settings. */ @@ -143,21 +168,11 @@ #define STM32_GPT_USE_TIM7 FALSE #define STM32_GPT_USE_TIM8 FALSE #define STM32_GPT_USE_TIM9 FALSE +#define STM32_GPT_USE_TIM10 FALSE #define STM32_GPT_USE_TIM11 FALSE #define STM32_GPT_USE_TIM12 FALSE +#define STM32_GPT_USE_TIM13 FALSE #define STM32_GPT_USE_TIM14 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM6_IRQ_PRIORITY 7 -#define STM32_GPT_TIM7_IRQ_PRIORITY 7 -#define STM32_GPT_TIM8_IRQ_PRIORITY 7 -#define STM32_GPT_TIM9_IRQ_PRIORITY 7 -#define STM32_GPT_TIM11_IRQ_PRIORITY 7 -#define STM32_GPT_TIM12_IRQ_PRIORITY 7 -#define STM32_GPT_TIM14_IRQ_PRIORITY 7 /* * I2C driver system settings. @@ -205,13 +220,11 @@ #define STM32_ICU_USE_TIM5 FALSE #define STM32_ICU_USE_TIM8 FALSE #define STM32_ICU_USE_TIM9 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM8_IRQ_PRIORITY 7 -#define STM32_ICU_TIM9_IRQ_PRIORITY 7 +#define STM32_ICU_USE_TIM10 FALSE +#define STM32_ICU_USE_TIM11 FALSE +#define STM32_ICU_USE_TIM12 FALSE +#define STM32_ICU_USE_TIM13 FALSE +#define STM32_ICU_USE_TIM14 FALSE /* * MAC driver system settings. @@ -227,7 +240,6 @@ /* * PWM driver system settings. */ -#define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE @@ -235,13 +247,19 @@ #define STM32_PWM_USE_TIM5 FALSE #define STM32_PWM_USE_TIM8 FALSE #define STM32_PWM_USE_TIM9 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM8_IRQ_PRIORITY 7 -#define STM32_PWM_TIM9_IRQ_PRIORITY 7 +#define STM32_PWM_USE_TIM10 FALSE +#define STM32_PWM_USE_TIM11 FALSE +#define STM32_PWM_USE_TIM12 FALSE +#define STM32_PWM_USE_TIM13 FALSE +#define STM32_PWM_USE_TIM14 FALSE + +/* + * RTC driver system settings. + */ +#define STM32_RTC_PRESA_VALUE 32 +#define STM32_RTC_PRESS_VALUE 1024 +#define STM32_RTC_CR_INIT 0 +#define STM32_RTC_TAMPCR_INIT 0 /* * SDC driver system settings. @@ -265,14 +283,6 @@ #define STM32_SERIAL_USE_USART6 FALSE #define STM32_SERIAL_USE_UART7 FALSE #define STM32_SERIAL_USE_UART8 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART3_PRIORITY 12 -#define STM32_SERIAL_UART4_PRIORITY 12 -#define STM32_SERIAL_UART5_PRIORITY 12 -#define STM32_SERIAL_USART6_PRIORITY 12 -#define STM32_SERIAL_UART7_PRIORITY 12 -#define STM32_SERIAL_UART8_PRIORITY 12 /* * SPI driver system settings. @@ -281,6 +291,8 @@ #define STM32_SPI_USE_SPI2 FALSE #define STM32_SPI_USE_SPI3 FALSE #define STM32_SPI_USE_SPI4 FALSE +#define STM32_SPI_USE_SPI5 FALSE +#define STM32_SPI_USE_SPI6 FALSE #define STM32_SPI_SPI1_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) #define STM32_SPI_SPI1_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) #define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 3) @@ -289,14 +301,22 @@ #define STM32_SPI_SPI3_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) #define STM32_SPI_SPI4_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 0) #define STM32_SPI_SPI4_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 1) +#define STM32_SPI_SPI5_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 3) +#define STM32_SPI_SPI5_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 4) +#define STM32_SPI_SPI6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 6) +#define STM32_SPI_SPI6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 5) #define STM32_SPI_SPI1_DMA_PRIORITY 1 #define STM32_SPI_SPI2_DMA_PRIORITY 1 #define STM32_SPI_SPI3_DMA_PRIORITY 1 #define STM32_SPI_SPI4_DMA_PRIORITY 1 +#define STM32_SPI_SPI5_DMA_PRIORITY 1 +#define STM32_SPI_SPI6_DMA_PRIORITY 1 #define STM32_SPI_SPI1_IRQ_PRIORITY 10 #define STM32_SPI_SPI2_IRQ_PRIORITY 10 #define STM32_SPI_SPI3_IRQ_PRIORITY 10 #define STM32_SPI_SPI4_IRQ_PRIORITY 10 +#define STM32_SPI_SPI5_IRQ_PRIORITY 10 +#define STM32_SPI_SPI6_IRQ_PRIORITY 10 #define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") /* @@ -326,12 +346,6 @@ #define STM32_UART_UART5_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) #define STM32_UART_USART6_RX_DMA_STREAM STM32_DMA_STREAM_ID(2, 2) #define STM32_UART_USART6_TX_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART3_IRQ_PRIORITY 12 -#define STM32_UART_UART4_IRQ_PRIORITY 12 -#define STM32_UART_UART5_IRQ_PRIORITY 12 -#define STM32_UART_USART6_IRQ_PRIORITY 12 #define STM32_UART_USART1_DMA_PRIORITY 0 #define STM32_UART_USART2_DMA_PRIORITY 0 #define STM32_UART_USART3_DMA_PRIORITY 0 @@ -349,9 +363,7 @@ #define STM32_USB_OTG2_IRQ_PRIORITY 14 #define STM32_USB_OTG1_RX_FIFO_SIZE 512 #define STM32_USB_OTG2_RX_FIFO_SIZE 1024 -#define STM32_USB_OTG_THREAD_PRIO LOWPRIO -#define STM32_USB_OTG_THREAD_STACK_SIZE 128 -#define STM32_USB_OTGFIFO_FILL_BASEPRI 0 +#define STM32_USB_HOST_WAKEUP_DURATION 2 /* * WDG driver system settings. diff --git a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h index 182d4885d7d..d115028300b 100644 --- a/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h +++ b/platforms/chibios/boards/GENERIC_STM32_G431XB/configs/mcuconf.h @@ -40,9 +40,24 @@ */ #define STM32_NO_INIT FALSE #define STM32_VOS STM32_VOS_RANGE1 +#define STM32_PWR_BOOST TRUE #define STM32_PWR_CR2 (PWR_CR2_PLS_LEV0) #define STM32_PWR_CR3 (PWR_CR3_EIWF) #define STM32_PWR_CR4 (0U) +#define STM32_PWR_PUCRA (0U) +#define STM32_PWR_PDCRA (0U) +#define STM32_PWR_PUCRB (0U) +#define STM32_PWR_PDCRB (0U) +#define STM32_PWR_PUCRC (0U) +#define STM32_PWR_PDCRC (0U) +#define STM32_PWR_PUCRD (0U) +#define STM32_PWR_PDCRD (0U) +#define STM32_PWR_PUCRE (0U) +#define STM32_PWR_PDCRE (0U) +#define STM32_PWR_PUCRF (0U) +#define STM32_PWR_PDCRF (0U) +#define STM32_PWR_PUCRG (0U) +#define STM32_PWR_PDCRG (0U) #define STM32_HSI16_ENABLED TRUE #define STM32_HSI48_ENABLED TRUE #define STM32_HSE_ENABLED FALSE diff --git a/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h index 117e920e3b3..5710e2cb45b 100644 --- a/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h +++ b/platforms/chibios/boards/GENERIC_STM32_G474XE/configs/mcuconf.h @@ -42,9 +42,24 @@ */ #define STM32_NO_INIT FALSE #define STM32_VOS STM32_VOS_RANGE1 +#define STM32_PWR_BOOST TRUE #define STM32_PWR_CR2 (PWR_CR2_PLS_LEV0) #define STM32_PWR_CR3 (PWR_CR3_EIWF) #define STM32_PWR_CR4 (0U) +#define STM32_PWR_PUCRA (0U) +#define STM32_PWR_PDCRA (0U) +#define STM32_PWR_PUCRB (0U) +#define STM32_PWR_PDCRB (0U) +#define STM32_PWR_PUCRC (0U) +#define STM32_PWR_PDCRC (0U) +#define STM32_PWR_PUCRD (0U) +#define STM32_PWR_PDCRD (0U) +#define STM32_PWR_PUCRE (0U) +#define STM32_PWR_PDCRE (0U) +#define STM32_PWR_PUCRF (0U) +#define STM32_PWR_PDCRF (0U) +#define STM32_PWR_PUCRG (0U) +#define STM32_PWR_PDCRG (0U) #define STM32_HSI16_ENABLED TRUE #define STM32_HSI48_ENABLED TRUE #define STM32_HSE_ENABLED FALSE diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c new file mode 100644 index 00000000000..e38a7e00549 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c @@ -0,0 +1,82 @@ +/* + Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +/*===========================================================================*/ +/* Driver local definitions. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported variables. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local variables and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver local functions. */ +/*===========================================================================*/ + +static void wb32_gpio_init(void) { + +#if WB32_HAS_GPIOA + rccEnableAPB1(RCC_APB1ENR_GPIOAEN); +#endif + +#if WB32_HAS_GPIOB + rccEnableAPB1(RCC_APB1ENR_GPIOBEN); +#endif + +#if WB32_HAS_GPIOC + rccEnableAPB1(RCC_APB1ENR_GPIOCEN); +#endif + +#if WB32_HAS_GPIOD + rccEnableAPB1(RCC_APB1ENR_GPIODEN); +#endif +} + +/*===========================================================================*/ +/* Driver interrupt handlers. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver exported functions. */ +/*===========================================================================*/ +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + wb32_clock_init(); + wb32_gpio_init(); +} +/** + * @brief Board-specific initialization code. + * @note You can add your board-specific code here. + */ +void boardInit(void) { + +} diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.h b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.h new file mode 100644 index 00000000000..51dc84db944 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.h @@ -0,0 +1,56 @@ +#pragma once +/* + Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/* + * Setup board. + */ + +/* + * Board identifier. + */ +#define WB32F3G71x9 +#if !defined(WB32F3G71xx) + #define WB32F3G71xx +#endif + +/*===========================================================================*/ +/* External declarations. */ +/*===========================================================================*/ + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.mk b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.mk new file mode 100644 index 00000000000..842e3359059 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/board/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/board + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/bootloader_defs.h b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/bootloader_defs.h new file mode 100644 index 00000000000..c929d2ad035 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/bootloader_defs.h @@ -0,0 +1,12 @@ +/* Address for jumping to bootloader on WB32 chips. */ +/* It is chip dependent, the correct number can be looked up here: + * http://www.westberrytech.com/down/mcu/data/WB32F3G71xx_rm.pdf + */ +#ifndef WB32_BOOTLOADER_ADDRESS +# undef STM32_BOOTLOADER_ADDRESS +# define WB32_BOOTLOADER_ADDRESS 0x1FFFE000 +# define STM32_BOOTLOADER_ADDRESS WB32_BOOTLOADER_ADDRESS +#else +# undef STM32_BOOTLOADER_ADDRESS +# define STM32_BOOTLOADER_ADDRESS WB32_BOOTLOADER_ADDRESS +#endif diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/config.h b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/config.h new file mode 100644 index 00000000000..3d3e1165e41 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/config.h @@ -0,0 +1,20 @@ +/* Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + * + * 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 3 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 <https://www.gnu.org/licenses/>. + */ +#pragma once + +#ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP +# define EARLY_INIT_PERFORM_BOOTLOADER_JUMP FALSE +#endif diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/mcuconf.h b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/mcuconf.h new file mode 100644 index 00000000000..7c1fdaf57d1 --- /dev/null +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/configs/mcuconf.h @@ -0,0 +1,168 @@ +/* + Copyright (C) 2021 Westberry Technology (ChangZhou) Corp., Ltd + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef MCUCONF_H +#define MCUCONF_H + +#define WB32F3G71xx_MCUCONF TRUE + +/* + * WB32F3G71 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + */ + +/** + * @name Internal clock sources + * @{ + */ +#define WB32_HSECLK 12000000 +#define WB32_LSECLK 32768 + +/* + * HAL driver system settings. + */ +#define WB32_NO_INIT FALSE +#define WB32_MHSI_ENABLED TRUE +#define WB32_FHSI_ENABLED FALSE +#define WB32_LSI_ENABLED FALSE +#define WB32_HSE_ENABLED TRUE +#define WB32_LSE_ENABLED FALSE +#define WB32_PLL_ENABLED TRUE +#define WB32_MAINCLKSRC WB32_MAINCLKSRC_PLL +#define WB32_PLLSRC WB32_PLLSRC_HSE +#define WB32_PLLDIV_VALUE 2 +#define WB32_PLLMUL_VALUE 12 //The allowed range is 12,16,20,24. +#define WB32_HPRE 1 +#define WB32_PPRE1 1 +#define WB32_PPRE2 1 +#define WB32_USBPRE WB32_USBPRE_DIV1P5 + +/* + * EXTI driver system settings. + */ +#define WB32_IRQ_EXTI0_PRIORITY 6 +#define WB32_IRQ_EXTI1_PRIORITY 6 +#define WB32_IRQ_EXTI2_PRIORITY 6 +#define WB32_IRQ_EXTI3_PRIORITY 6 +#define WB32_IRQ_EXTI4_PRIORITY 6 +#define WB32_IRQ_EXTI5_9_PRIORITY 6 +#define WB32_IRQ_EXTI10_15_PRIORITY 6 +#define WB32_IRQ_EXTI16_PRIORITY 6 +#define WB32_IRQ_EXTI17_PRIORITY 6 +#define WB32_IRQ_EXTI18_PRIORITY 6 +#define WB32_IRQ_EXTI19_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define WB32_TIM_MAX_CHANNELS 4 +#define WB32_GPT_USE_TIM1 FALSE +#define WB32_GPT_USE_TIM2 FALSE +#define WB32_GPT_USE_TIM3 FALSE +#define WB32_GPT_USE_TIM4 FALSE +#define WB32_GPT_TIM1_IRQ_PRIORITY 7 +#define WB32_GPT_TIM2_IRQ_PRIORITY 7 +#define WB32_GPT_TIM3_IRQ_PRIORITY 7 +#define WB32_GPT_TIM4_IRQ_PRIORITY 7 + +/* + * ICU driver system settings. + */ +#define WB32_ICU_USE_TIM1 FALSE +#define WB32_ICU_USE_TIM2 FALSE +#define WB32_ICU_USE_TIM3 FALSE +#define WB32_ICU_USE_TIM4 FALSE +#define WB32_ICU_TIM1_IRQ_PRIORITY 7 +#define WB32_ICU_TIM2_IRQ_PRIORITY 7 +#define WB32_ICU_TIM3_IRQ_PRIORITY 7 +#define WB32_ICU_TIM4_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define WB32_PWM_USE_ADVANCED FALSE +#define WB32_PWM_USE_TIM1 FALSE +#define WB32_PWM_USE_TIM2 FALSE +#define WB32_PWM_USE_TIM3 FALSE +#define WB32_PWM_USE_TIM4 FALSE +#define WB32_PWM_TIM1_IRQ_PRIORITY 7 +#define WB32_PWM_TIM2_IRQ_PRIORITY 7 +#define WB32_PWM_TIM3_IRQ_PRIORITY 7 +#define WB32_PWM_TIM4_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define WB32_I2C_USE_I2C1 FALSE +#define WB32_I2C_USE_I2C2 FALSE +#define WB32_I2C_BUSY_TIMEOUT 50 +#define WB32_I2C_I2C1_IRQ_PRIORITY 5 +#define WB32_I2C_I2C2_IRQ_PRIORITY 5 + +/* + * SERIAL driver system settings. + */ +#define WB32_SERIAL_USE_UART1 FALSE +#define WB32_SERIAL_USE_UART2 FALSE +#define WB32_SERIAL_USE_UART3 FALSE +#define WB32_SERIAL_USART1_PRIORITY 12 +#define WB32_SERIAL_USART2_PRIORITY 12 +#define WB32_SERIAL_USART3_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define WB32_SPI_USE_QSPI FALSE +#define WB32_SPI_USE_SPIM2 FALSE +#define WB32_SPI_USE_SPIS1 FALSE +#define WB32_SPI_USE_SPIS2 FALSE +#define WB32_SPI_QSPI_IRQ_PRIORITY 10 +#define WB32_SPI_SPIM2_IRQ_PRIORITY 10 +#define WB32_SPI_SPIS1_IRQ_PRIORITY 10 +#define WB32_SPI_SPIS2_IRQ_PRIORITY 10 + +/* + * ST driver system settings. + */ +#define WB32_ST_IRQ_PRIORITY 8 +#define WB32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define WB32_UART_USE_UART1 FALSE +#define WB32_UART_USE_UART2 FALSE +#define WB32_UART_USE_UART3 FALSE +#define WB32_UART_UART1_IRQ_PRIORITY 12 +#define WB32_UART_UART2_IRQ_PRIORITY 12 +#define WB32_UART_UART3_IRQ_PRIORITY 12 + +/* + * USB driver system settings. + */ +#define WB32_USB_USE_USB1 TRUE +#define WB32_USB_USB1_IRQ_PRIORITY 13 +#define WB32_USB_HOST_WAKEUP_DURATION 10 + + +#endif /* MCUCONF_H */ diff --git a/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h b/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h index a1cbf68086c..f8123329603 100644 --- a/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h +++ b/platforms/chibios/boards/QMK_PROTON_C/configs/chconf.h @@ -40,7 +40,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 diff --git a/platforms/chibios/boards/QMK_PROTON_C/configs/config.h b/platforms/chibios/boards/QMK_PROTON_C/configs/config.h index a73f0c0b475..fa1a73c3549 100644 --- a/platforms/chibios/boards/QMK_PROTON_C/configs/config.h +++ b/platforms/chibios/boards/QMK_PROTON_C/configs/config.h @@ -18,3 +18,12 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE #endif + +#ifdef CONVERT_TO_PROTON_C +# ifndef I2C1_SDA_PIN +# define I2C1_SDA_PIN D1 +# endif +# ifndef I2C1_SCL_PIN +# define I2C1_SCL_PIN D0 +# endif +#endif diff --git a/platforms/chibios/boards/SIPEED_LONGAN_NANO/board/board.mk b/platforms/chibios/boards/SIPEED_LONGAN_NANO/board/board.mk new file mode 100644 index 00000000000..960fc26786f --- /dev/null +++ b/platforms/chibios/boards/SIPEED_LONGAN_NANO/board/board.mk @@ -0,0 +1,9 @@ +# List of all the board related files. +BOARDSRC = ${CHIBIOS_CONTRIB}/os/hal/boards/SIPEED_LONGAN_NANO/board.c + +# Required include directories +BOARDINC = ${CHIBIOS_CONTRIB}/os/hal/boards/SIPEED_LONGAN_NANO + +# Shared variables +ALLCSRC += $(BOARDSRC) +ALLINC += $(BOARDINC) diff --git a/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/chconf.h b/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/chconf.h new file mode 100644 index 00000000000..6e5adb0fe18 --- /dev/null +++ b/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/chconf.h @@ -0,0 +1,23 @@ +/* Copyright 2021 QMK + * + * 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/>. + */ + +/* To compile the ChibiOS syscall stubs with picolibc + * the _reent struct has to be defined. */ +#if !defined(_FROM_ASM_) && defined(USE_PICOLIBC) +struct _reent; +#endif + +#include_next <chconf.h> \ No newline at end of file diff --git a/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/mcuconf.h b/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/mcuconf.h new file mode 100644 index 00000000000..ab086567e55 --- /dev/null +++ b/platforms/chibios/boards/SIPEED_LONGAN_NANO/configs/mcuconf.h @@ -0,0 +1,302 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + ChibiOS - Copyright (C) 2021 Stefan Kerkmann + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#define GD32VF103_MCUCONF +#define GD32VF103CB + +/* + * GD32VF103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 0...15 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. +*/ + +#if defined(OVERCLOCK_120MHZ) +/* (8MHz / 2) * 30 = 120MHz Sysclock */ +#define GD32_ALLOW_120MHZ_SYSCLK +#define GD32_PLLMF_VALUE 30 +#define GD32_USBFSPSC GD32_USBFSPSC_DIV2P5 +#else +/* (8MHz / 2) * 24 = 96MHz Sysclock */ +#define GD32_PLLMF_VALUE 24 +#define GD32_USBFSPSC GD32_USBFSPSC_DIV2 +#endif + +#define GD32_NO_INIT FALSE +#define GD32_IRC8M_ENABLED TRUE +#define GD32_IRC40K_ENABLED FALSE +#define GD32_HXTAL_ENABLED TRUE +#define GD32_LXTAL_ENABLED FALSE +#define GD32_SCS GD32_SCS_PLL +#define GD32_PLLSEL GD32_PLLSEL_PREDV0 +#define GD32_PREDV0SEL GD32_PREDV0SEL_HXTAL +#define GD32_PREDV0_VALUE 2 +#define GD32_PREDV1_VALUE 2 +#define GD32_PLL1MF_VALUE 14 +#define GD32_PLL2MF_VALUE 13 +#define GD32_AHBPSC GD32_AHBPSC_DIV1 +#define GD32_APB1PSC GD32_APB1PSC_DIV2 +#define GD32_APB2PSC GD32_APB2PSC_DIV1 +#define GD32_ADCPSC GD32_ADCPSC_DIV16 +#define GD32_USB_CLOCK_REQUIRED TRUE +#define GD32_I2S_CLOCK_REQUIRED FALSE +#define GD32_CKOUT0SEL GD32_CKOUT0SEL_NOCLOCK +#define GD32_RTCSRC GD32_RTCSRC_NOCLOCK +#define GD32_PVD_ENABLE FALSE +#define GD32_LVDT GD32_LVDT_LEV0 + +/* + * ECLIC system settings. + */ +#define ECLIC_TRIGGER_DEFAULT ECLIC_POSTIVE_EDGE_TRIGGER +#define ECLIC_DMA_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * IRQ system settings. + */ +#define GD32_IRQ_EXTI0_PRIORITY 6 +#define GD32_IRQ_EXTI1_PRIORITY 6 +#define GD32_IRQ_EXTI2_PRIORITY 6 +#define GD32_IRQ_EXTI3_PRIORITY 6 +#define GD32_IRQ_EXTI4_PRIORITY 6 +#define GD32_IRQ_EXTI5_9_PRIORITY 6 +#define GD32_IRQ_EXTI10_15_PRIORITY 6 +#define GD32_IRQ_EXTI0_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI1_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI2_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI3_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI4_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI5_9_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_IRQ_EXTI10_15_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * ADC driver system settings. + */ +#define GD32_ADC_USE_ADC0 FALSE +#define GD32_ADC_ADC0_DMA_PRIORITY 2 +#define GD32_ADC_ADC0_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define GD32_CAN_USE_CAN0 FALSE +#define GD32_CAN_CAN0_IRQ_PRIORITY 11 +#define GD32_CAN_USE_CAN1 FALSE +#define GD32_CAN_CAN1_IRQ_PRIORITY 11 +#define GD32_CAN_CAN0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_CAN_CAN1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * CRC driver system settings. + */ +#define GD32_CRC_USE_CRC0 FALSE +#define GD32_CRC_CRC0_DMA_IRQ_PRIORITY 14 +#define GD32_CRC_CRC0_DMA_PRIORITY 2 +#define GD32_CRC_CRC0_DMA_STREAM GD32_DMA_STREAM_ID(0, 0) +#define CRC_USE_DMA FALSE +#define CRCSW_USE_CRC1 FALSE +#define CRCSW_CRC32_TABLE FALSE +#define CRCSW_CRC16_TABLE FALSE +#define CRCSW_PROGRAMMABLE FALSE + +/* + * DAC driver system settings. + */ +#define GD32_DAC_USE_DAC_CH1 FALSE +#define GD32_DAC_USE_DAC_CH2 FALSE + +/* + * GPT driver system settings. + */ +#define GD32_GPT_USE_TIM0 FALSE +#define GD32_GPT_USE_TIM1 FALSE +#define GD32_GPT_USE_TIM2 FALSE +#define GD32_GPT_USE_TIM3 FALSE +#define GD32_GPT_USE_TIM4 FALSE +#define GD32_GPT_TIM0_IRQ_PRIORITY 7 +#define GD32_GPT_TIM1_IRQ_PRIORITY 7 +#define GD32_GPT_TIM2_IRQ_PRIORITY 7 +#define GD32_GPT_TIM3_IRQ_PRIORITY 7 +#define GD32_GPT_TIM4_IRQ_PRIORITY 7 +#define GD32_GPT_TIM0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM5_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_GPT_TIM6_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * I2S driver system settings. + */ +#define GD32_I2S_USE_SPI1 FALSE +#define GD32_I2S_USE_SPI2 FALSE +#define GD32_I2S_SPI1_IRQ_PRIORITY 10 +#define GD32_I2S_SPI2_IRQ_PRIORITY 10 +#define GD32_I2S_SPI1_DMA_PRIORITY 1 +#define GD32_I2S_SPI2_DMA_PRIORITY 1 +#define GD32_I2S_DMA_ERROR_HOOK(i2sp) osalSysHalt("DMA failure") + +/* + * I2C driver system settings. + */ +#define GD32_I2C_USE_I2C0 FALSE +#define GD32_I2C_USE_I2C1 FALSE +#define GD32_I2C_BUSY_TIMEOUT 50 +#define GD32_I2C_I2C0_IRQ_PRIORITY 10 +#define GD32_I2C_I2C1_IRQ_PRIORITY 5 +#define GD32_I2C_I2C0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_I2C_I2C1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_I2C_I2C0_DMA_PRIORITY 2 +#define GD32_I2C_I2C1_DMA_PRIORITY 2 +#define GD32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define GD32_ICU_USE_TIM0 FALSE +#define GD32_ICU_USE_TIM1 FALSE +#define GD32_ICU_USE_TIM2 FALSE +#define GD32_ICU_USE_TIM3 FALSE +#define GD32_ICU_USE_TIM4 FALSE +#define GD32_ICU_TIM0_IRQ_PRIORITY 7 +#define GD32_ICU_TIM1_IRQ_PRIORITY 7 +#define GD32_ICU_TIM2_IRQ_PRIORITY 7 +#define GD32_ICU_TIM3_IRQ_PRIORITY 7 +#define GD32_ICU_TIM4_IRQ_PRIORITY 7 +#define GD32_ICU_TIM0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_ICU_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_ICU_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_ICU_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_ICU_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * PWM driver system settings. + */ +#define GD32_PWM_USE_ADVANCED FALSE +#define GD32_PWM_USE_TIM0 FALSE +#define GD32_PWM_USE_TIM1 FALSE +#define GD32_PWM_USE_TIM2 FALSE +#define GD32_PWM_USE_TIM3 FALSE +#define GD32_PWM_USE_TIM4 FALSE +#define GD32_PWM_TIM0_IRQ_PRIORITY 10 +#define GD32_PWM_TIM1_IRQ_PRIORITY 10 +#define GD32_PWM_TIM2_IRQ_PRIORITY 10 +#define GD32_PWM_TIM3_IRQ_PRIORITY 10 +#define GD32_PWM_TIM4_IRQ_PRIORITY 10 +#define GD32_PWM_TIM0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_PWM_TIM1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_PWM_TIM2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_PWM_TIM3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_PWM_TIM4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * RTC driver system settings. + */ +#define GD32_RTC_IRQ_PRIORITY 15 +#define GD32_RTC_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * SERIAL driver system settings. + */ +#define GD32_SERIAL_USE_USART0 FALSE +#define GD32_SERIAL_USE_USART1 FALSE +#define GD32_SERIAL_USE_USART2 FALSE +#define GD32_SERIAL_USE_UART3 FALSE +#define GD32_SERIAL_USE_UART4 FALSE +#define GD32_SERIAL_USART0_PRIORITY 10 +#define GD32_SERIAL_USART1_PRIORITY 10 +#define GD32_SERIAL_USART2_PRIORITY 10 +#define GD32_SERIAL_UART3_PRIORITY 10 +#define GD32_SERIAL_UART4_PRIORITY 10 +#define GD32_SERIAL_USART0_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_SERIAL_USART1_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_SERIAL_USART2_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_SERIAL_UART3_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_SERIAL_UART4_TRIGGER ECLIC_TRIGGER_DEFAULT + +/* + * SPI driver system settings. + */ +#define GD32_SPI_USE_SPI0 FALSE +#define GD32_SPI_USE_SPI1 FALSE +#define GD32_SPI_USE_SPI2 FALSE +#define GD32_SPI_SPI0_DMA_PRIORITY 1 +#define GD32_SPI_SPI1_DMA_PRIORITY 1 +#define GD32_SPI_SPI2_DMA_PRIORITY 1 +#define GD32_SPI_SPI0_IRQ_PRIORITY 10 +#define GD32_SPI_SPI1_IRQ_PRIORITY 10 +#define GD32_SPI_SPI2_IRQ_PRIORITY 10 +#define GD32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define GD32_ST_IRQ_PRIORITY 10 +#define GD32_ST_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_ST_USE_TIMER 1 + +/* + * UART driver system settings. + */ +#define GD32_UART_USE_USART0 FALSE +#define GD32_UART_USE_USART1 FALSE +#define GD32_UART_USE_USART2 FALSE +#define GD32_UART_USE_UART3 FALSE +#define GD32_UART_USE_UART4 FALSE +#define GD32_UART_USART0_IRQ_PRIORITY 10 +#define GD32_UART_USART1_IRQ_PRIORITY 10 +#define GD32_UART_USART2_IRQ_PRIORITY 10 +#define GD32_UART_UART3_IRQ_PRIORITY 10 +#define GD32_UART_UART4_IRQ_PRIORITY 10 +#define GD32_UART_USART0_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_UART_USART1_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_UART_USART2_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_UART_UART3_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_UART_UART4_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_UART_USART0_DMA_PRIORITY 3 +#define GD32_UART_USART1_DMA_PRIORITY 3 +#define GD32_UART_USART2_DMA_PRIORITY 3 +#define GD32_UART_UART3_DMA_PRIORITY 3 +#define GD32_UART_UART4_DMA_PRIORITY 3 +#define GD32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define GD32_USB_USE_USBFS TRUE +#define GD32_USB_USBFS_IRQ_PRIORITY 10 +#define GD32_USB_USBFS_IRQ_TRIGGER ECLIC_TRIGGER_DEFAULT +#define GD32_USB_USBFS_RX_FIFO_SIZE 256 + +/* + * WDG driver system settings. + */ +#define GD32_WDG_USE_FWDGT FALSE diff --git a/platforms/chibios/boards/common/configs/chconf.h b/platforms/chibios/boards/common/configs/chconf.h index 44327a82d71..18ad609ca13 100644 --- a/platforms/chibios/boards/common/configs/chconf.h +++ b/platforms/chibios/boards/common/configs/chconf.h @@ -40,7 +40,7 @@ /** * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. + * @note Allowed values are 16, 32 or 64 bits. */ #if !defined(CH_CFG_ST_RESOLUTION) #define CH_CFG_ST_RESOLUTION 32 diff --git a/platforms/chibios/boards/common/ld/STM32F401xC.ld b/platforms/chibios/boards/common/ld/STM32F401xC.ld new file mode 100644 index 00000000000..8fae66cec9a --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F401xC.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F401xC memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 256k - 32k /* Sector 2..6 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 64k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/boards/common/ld/STM32F401xE.ld b/platforms/chibios/boards/common/ld/STM32F401xE.ld new file mode 100644 index 00000000000..69af7ed71ec --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F401xE.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F401xE memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 512k - 32k /* Sector 2..7 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 96k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/boards/common/ld/STM32F405xG.ld b/platforms/chibios/boards/common/ld/STM32F405xG.ld new file mode 100644 index 00000000000..b7d0baa2103 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F405xG.ld @@ -0,0 +1,86 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F405xG memory setup. + * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 1M - 32k /* Sector 2..6 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 128k /* SRAM1 + SRAM2 */ + ram1 (wx) : org = 0x20000000, len = 112k /* SRAM1 */ + ram2 (wx) : org = 0x2001C000, len = 16k /* SRAM2 */ + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x10000000, len = 64k /* CCM SRAM */ + ram5 (wx) : org = 0x40024000, len = 4k /* BCKP SRAM */ + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/boards/common/ld/STM32F411xE.ld b/platforms/chibios/boards/common/ld/STM32F411xE.ld new file mode 100644 index 00000000000..aea8084b516 --- /dev/null +++ b/platforms/chibios/boards/common/ld/STM32F411xE.ld @@ -0,0 +1,85 @@ +/* + ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * STM32F411xE memory setup. + */ +MEMORY +{ + flash0 (rx) : org = 0x08000000, len = 16k /* Sector 0 - Init code as ROM bootloader assumes application starts here */ + flash1 (rx) : org = 0x08004000, len = 16k /* Sector 1 - Emulated eeprom */ + flash2 (rx) : org = 0x08008000, len = 512k - 32k /* Sector 2..7 - Rest of firmware */ + flash3 (rx) : org = 0x00000000, len = 0 + flash4 (rx) : org = 0x00000000, len = 0 + flash5 (rx) : org = 0x00000000, len = 0 + flash6 (rx) : org = 0x00000000, len = 0 + flash7 (rx) : org = 0x00000000, len = 0 + ram0 (wx) : org = 0x20000000, len = 128k + ram1 (wx) : org = 0x00000000, len = 0 + ram2 (wx) : org = 0x00000000, len = 0 + ram3 (wx) : org = 0x00000000, len = 0 + ram4 (wx) : org = 0x00000000, len = 0 + ram5 (wx) : org = 0x00000000, len = 0 + ram6 (wx) : org = 0x00000000, len = 0 + ram7 (wx) : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/platforms/chibios/bootloader.c b/platforms/chibios/bootloader.c new file mode 100644 index 00000000000..5cadadeeeb5 --- /dev/null +++ b/platforms/chibios/bootloader.c @@ -0,0 +1,145 @@ +#include "bootloader.h" + +#include <ch.h> +#include <hal.h> +#include "wait.h" + +/* This code should be checked whether it runs correctly on platforms */ +#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) +#define BOOTLOADER_MAGIC 0xDEADBEEF +#define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) + +#ifndef STM32_BOOTLOADER_DUAL_BANK +# define STM32_BOOTLOADER_DUAL_BANK FALSE +#endif + +#ifdef BOOTLOADER_TINYUF2 + +# define DBL_TAP_MAGIC 0xf01669ef // From tinyuf2's board_api.h + +// defined by linker script +extern uint32_t _board_dfu_dbl_tap[]; +# define DBL_TAP_REG _board_dfu_dbl_tap[0] + +void bootloader_jump(void) { + DBL_TAP_REG = DBL_TAP_MAGIC; + NVIC_SystemReset(); +} + +void enter_bootloader_mode_if_requested(void) { /* not needed, no two-stage reset */ +} + +#elif STM32_BOOTLOADER_DUAL_BANK + +// Need pin definitions +# include "config_common.h" + +# ifndef STM32_BOOTLOADER_DUAL_BANK_GPIO +# error "No STM32_BOOTLOADER_DUAL_BANK_GPIO defined, don't know which pin to toggle" +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_POLARITY +# define STM32_BOOTLOADER_DUAL_BANK_POLARITY 0 +# endif + +# ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY +# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 +# endif + +extern uint32_t __ram0_end__; + +__attribute__((weak)) void bootloader_jump(void) { + // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash + // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do + // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to + // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord + // #hardware channel pins for an example circuit. + palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); +# if STM32_BOOTLOADER_DUAL_BANK_POLARITY + palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# else + palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); +# endif + + // Wait for a while for the capacitor to charge + wait_ms(100); + + // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high + NVIC_SystemReset(); +} + +void enter_bootloader_mode_if_requested(void) {} // not needed at all, but if anybody attempts to invoke it.... + +#elif defined(STM32_BOOTLOADER_ADDRESS) // STM32_BOOTLOADER_DUAL_BANK + +extern uint32_t __ram0_end__; + +__attribute__((weak)) void bootloader_jump(void) { + *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader + NVIC_SystemReset(); +} + +void enter_bootloader_mode_if_requested(void) { + unsigned long *check = MAGIC_ADDR; + if (*check == BOOTLOADER_MAGIC) { + *check = 0; + __set_CONTROL(0); + __set_MSP(*(__IO uint32_t *)STM32_BOOTLOADER_ADDRESS); + __enable_irq(); + + typedef void (*BootJump_t)(void); + BootJump_t boot_jump = *(BootJump_t *)(STM32_BOOTLOADER_ADDRESS + 4); + boot_jump(); + while (1) + ; + } +} + +#elif defined(GD32VF103) + +# define DBGMCU_KEY_UNLOCK 0x4B5A6978 +# define DBGMCU_CMD_RESET 0x1 + +__IO uint32_t *DBGMCU_KEY = (uint32_t *)DBGMCU_BASE + 0x0CU; +__IO uint32_t *DBGMCU_CMD = (uint32_t *)DBGMCU_BASE + 0x08U; + +__attribute__((weak)) void bootloader_jump(void) { + /* The MTIMER unit of the GD32VF103 doesn't have the MSFRST + * register to generate a software reset request. + * BUT instead two undocumented registers in the debug peripheral + * that allow issueing a software reset. WHO would need the MSFRST + * register anyway? Source: + * https://github.com/esmil/gd32vf103inator/blob/master/include/gd32vf103/dbg.h */ + *DBGMCU_KEY = DBGMCU_KEY_UNLOCK; + *DBGMCU_CMD = DBGMCU_CMD_RESET; +} + +void enter_bootloader_mode_if_requested(void) { /* Jumping to bootloader is not possible from user code. */ +} + +#elif defined(KL2x) || defined(K20x) || defined(MK66F18) || defined(MIMXRT1062) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS +/* Kinetis */ + +# if defined(BOOTLOADER_KIIBOHD) +/* Kiibohd Bootloader (MCHCK and Infinity KB) */ +# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 +const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; +__attribute__((weak)) void bootloader_jump(void) { + void *volatile vbat = (void *)VBAT; + __builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); + // request reset + SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; +} + +# else /* defined(BOOTLOADER_KIIBOHD) */ +/* Default for Kinetis - expecting an ARM Teensy */ +# include "wait.h" +__attribute__((weak)) void bootloader_jump(void) { + wait_ms(100); + __BKPT(0); +} +# endif /* defined(BOOTLOADER_KIIBOHD) */ + +#else /* neither STM32 nor KINETIS */ +__attribute__((weak)) void bootloader_jump(void) {} +#endif diff --git a/platforms/chibios/chibios_config.h b/platforms/chibios/chibios_config.h new file mode 100644 index 00000000000..4e357366067 --- /dev/null +++ b/platforms/chibios/chibios_config.h @@ -0,0 +1,90 @@ +/* Copyright 2019 + * + * 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/>. + */ +#pragma once + +#ifndef USB_VBUS_PIN +# define SPLIT_USB_DETECT // Force this on when dedicated pin is not used +#endif + +// STM32 compatibility +#if defined(MCU_STM32) +# define CPU_CLOCK STM32_SYSCLK + +# if defined(STM32F1XX) +# define USE_GPIOV1 +# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_STM32_ALTERNATE_PUSHPULL +# else +# define PAL_OUTPUT_TYPE_OPENDRAIN PAL_STM32_OTYPE_OPENDRAIN +# define PAL_OUTPUT_TYPE_PUSHPULL PAL_STM32_OTYPE_PUSHPULL +# define PAL_OUTPUT_SPEED_HIGHEST PAL_STM32_OSPEED_HIGHEST +# define PAL_PUPDR_FLOATING PAL_STM32_PUPDR_FLOATING +# endif + +# if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) +# define USE_I2CV1 +# endif +#endif + +// GD32 compatibility +#if defined(MCU_GD32V) +# define CPU_CLOCK GD32_SYSCLK + +# if defined(GD32VF103) +# define USE_GPIOV1 +# define USE_I2CV1 +# define PAL_MODE_ALTERNATE_OPENDRAIN PAL_MODE_GD32_ALTERNATE_OPENDRAIN +# define PAL_MODE_ALTERNATE_PUSHPULL PAL_MODE_GD32_ALTERNATE_PUSHPULL +# endif +#endif + +// WB32 compatibility +#if defined(MCU_WB32) +# define CPU_CLOCK WB32_MAINCLK + +# if defined(WB32F3G71xx) +# define PAL_OUTPUT_TYPE_OPENDRAIN PAL_WB32_OTYPE_OPENDRAIN +# define PAL_OUTPUT_TYPE_PUSHPULL PAL_WB32_OTYPE_PUSHPULL +# define PAL_OUTPUT_SPEED_HIGHEST PAL_WB32_OSPEED_HIGH +# define PAL_PUPDR_FLOATING PAL_WB32_PUPDR_FLOATING +# endif +#endif + +#if defined(GD32VF103) +/* This chip has the same API as STM32F103, but uses different names for literally the same thing. + * As of 4.7.2021 QMK is tailored to use STM32 defines/names, for compatibility sake + * we just redefine the GD32 names. */ +# include "gd32v_compatibility.h" +#endif + +// teensy compatibility +#if defined(MCU_KINETIS) +# define CPU_CLOCK KINETIS_SYSCLK_FREQUENCY + +# if defined(K20x) || defined(KL2x) +# define USE_I2CV1 +# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed +# define USE_GPIOV1 +# endif +#endif + +#if defined(HT32) +# define CPU_CLOCK HT32_CK_SYS_FREQUENCY +# define PAL_MODE_ALTERNATE PAL_HT32_MODE_AF +# define PAL_OUTPUT_TYPE_OPENDRAIN (PAL_HT32_MODE_OD | PAL_HT32_MODE_DIR) +# define PAL_OUTPUT_TYPE_PUSHPULL PAL_HT32_MODE_DIR +# define PAL_OUTPUT_SPEED_HIGHEST 0 +#endif diff --git a/platforms/chibios/drivers/analog.c b/platforms/chibios/drivers/analog.c index b1081623d32..eb437665f1d 100644 --- a/platforms/chibios/drivers/analog.c +++ b/platforms/chibios/drivers/analog.c @@ -38,7 +38,7 @@ // Otherwise assume V3 #if defined(STM32F0XX) || defined(STM32L0XX) # define USE_ADCV1 -#elif defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) +#elif defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(GD32VF103) # define USE_ADCV2 #endif @@ -75,7 +75,7 @@ /* User configurable ADC options */ #ifndef ADC_COUNT -# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F4XX) +# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F4XX) || defined(GD32VF103) # define ADC_COUNT 1 # elif defined(STM32F3XX) # define ADC_COUNT 4 @@ -122,7 +122,7 @@ static ADCConversionGroup adcConversionGroup = { .cfgr1 = ADC_CFGR1_CONT | ADC_RESOLUTION, .smpr = ADC_SAMPLING_RATE, #elif defined(USE_ADCV2) -# if !defined(STM32F1XX) +# if !defined(STM32F1XX) && !defined(GD32VF103) .cr2 = ADC_CR2_SWSTART, // F103 seem very unhappy with, F401 seems very unhappy without... # endif .smpr2 = ADC_SMPR2_SMP_AN0(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN1(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN2(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN3(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN4(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN5(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN6(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN7(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN8(ADC_SAMPLING_RATE) | ADC_SMPR2_SMP_AN9(ADC_SAMPLING_RATE), @@ -220,7 +220,7 @@ __attribute__((weak)) adc_mux pinToMux(pin_t pin) { case F9: return TO_MUX( ADC_CHANNEL_IN7, 2 ); case F10: return TO_MUX( ADC_CHANNEL_IN8, 2 ); # endif -#elif defined(STM32F1XX) +#elif defined(STM32F1XX) || defined(GD32VF103) case A0: return TO_MUX( ADC_CHANNEL_IN0, 0 ); case A1: return TO_MUX( ADC_CHANNEL_IN1, 0 ); case A2: return TO_MUX( ADC_CHANNEL_IN2, 0 ); diff --git a/quantum/audio/driver_chibios_dac.h b/platforms/chibios/drivers/audio_dac.h similarity index 100% rename from quantum/audio/driver_chibios_dac.h rename to platforms/chibios/drivers/audio_dac.h diff --git a/quantum/audio/driver_chibios_dac_additive.c b/platforms/chibios/drivers/audio_dac_additive.c similarity index 100% rename from quantum/audio/driver_chibios_dac_additive.c rename to platforms/chibios/drivers/audio_dac_additive.c diff --git a/quantum/audio/driver_chibios_dac_basic.c b/platforms/chibios/drivers/audio_dac_basic.c similarity index 100% rename from quantum/audio/driver_chibios_dac_basic.c rename to platforms/chibios/drivers/audio_dac_basic.c diff --git a/quantum/audio/driver_chibios_pwm.h b/platforms/chibios/drivers/audio_pwm.h similarity index 100% rename from quantum/audio/driver_chibios_pwm.h rename to platforms/chibios/drivers/audio_pwm.h diff --git a/platforms/chibios/drivers/audio_pwm_hardware.c b/platforms/chibios/drivers/audio_pwm_hardware.c new file mode 100644 index 00000000000..cd40019ee7c --- /dev/null +++ b/platforms/chibios/drivers/audio_pwm_hardware.c @@ -0,0 +1,144 @@ +/* Copyright 2020 Jack Humbert + * Copyright 2020 JohSchneider + * + * 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/>. + */ + +/* +Audio Driver: PWM + +the duty-cycle is always kept at 50%, and the pwm-period is adjusted to match the frequency of a note to be played back. + +this driver uses the chibios-PWM system to produce a square-wave on specific output pins that are connected to the PWM hardware. +The hardware directly toggles the pin via its alternate function. see your MCUs data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. + + */ + +#include "audio.h" +#include "ch.h" +#include "hal.h" + +#if !defined(AUDIO_PIN) +# error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" +#endif + +extern bool playing_note; +extern bool playing_melody; +extern uint8_t note_timbre; + +static PWMConfig pwmCFG = { + .frequency = 100000, /* PWM clock frequency */ + // CHIBIOS-BUG? can't set the initial period to <2, or the pwm (hard or software) takes ~130ms with .frequency=500000 for a pwmChangePeriod to take effect; with no output=silence in the meantime + .period = 2, /* initial PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + .callback = NULL, /* no callback, the hardware directly toggles the pin */ + .channels = + { +#if AUDIO_PWM_CHANNEL == 4 + {PWM_OUTPUT_DISABLED, NULL}, /* channel 0 -> TIMx_CH1 */ + {PWM_OUTPUT_DISABLED, NULL}, /* channel 1 -> TIMx_CH2 */ + {PWM_OUTPUT_DISABLED, NULL}, /* channel 2 -> TIMx_CH3 */ + {PWM_OUTPUT_ACTIVE_HIGH, NULL} /* channel 3 -> TIMx_CH4 */ +#elif AUDIO_PWM_CHANNEL == 3 + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH3 */ + {PWM_OUTPUT_DISABLED, NULL} +#elif AUDIO_PWM_CHANNEL == 2 + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH2 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} +#else /*fallback to CH1 */ + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH1 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} +#endif + }, +}; + +static float channel_1_frequency = 0.0f; +void channel_1_set_frequency(float freq) { + channel_1_frequency = freq; + + if (freq <= 0.0) // a pause/rest has freq=0 + return; + + pwmcnt_t period = (pwmCFG.frequency / freq); + pwmChangePeriod(&AUDIO_PWM_DRIVER, period); + pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, + // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH + PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); +} + +float channel_1_get_frequency(void) { return channel_1_frequency; } + +void channel_1_start(void) { + pwmStop(&AUDIO_PWM_DRIVER); + pwmStart(&AUDIO_PWM_DRIVER, &pwmCFG); +} + +void channel_1_stop(void) { pwmStop(&AUDIO_PWM_DRIVER); } + +static void gpt_callback(GPTDriver *gptp); +GPTConfig gptCFG = { + /* a whole note is one beat, which is - per definition in musical_notes.h - set to 64 + the longest note is BREAVE_DOT=128+64=192, the shortest SIXTEENTH=4 + the tempo (which might vary!) is in bpm (beats per minute) + therefore: if the timer ticks away at .frequency = (60*64)Hz, + and the .interval counts from 64 downwards - audio_update_state is + called just often enough to not miss any notes + */ + .frequency = 60 * 64, + .callback = gpt_callback, +}; + +void audio_driver_initialize(void) { + pwmStart(&AUDIO_PWM_DRIVER, &pwmCFG); + + // connect the AUDIO_PIN to the PWM hardware +#if defined(USE_GPIOV1) // STM32F103C8 + palSetLineMode(AUDIO_PIN, PAL_MODE_ALTERNATE_PUSHPULL); +#else // GPIOv2 (or GPIOv3 for f4xx, which is the same/compatible at this command) + palSetLineMode(AUDIO_PIN, PAL_MODE_ALTERNATE(AUDIO_PWM_PAL_MODE)); +#endif + + gptStart(&AUDIO_STATE_TIMER, &gptCFG); +} + +void audio_driver_start(void) { + channel_1_stop(); + channel_1_start(); + + if (playing_note || playing_melody) { + gptStartContinuous(&AUDIO_STATE_TIMER, 64); + } +} + +void audio_driver_stop(void) { + channel_1_stop(); + gptStopTimer(&AUDIO_STATE_TIMER); +} + +/* a regular timer task, that checks the note to be currently played + * and updates the pwm to output that frequency + */ +static void gpt_callback(GPTDriver *gptp) { + float freq; // TODO: freq_alt + + if (audio_update_state()) { + freq = audio_get_processed_frequency(0); // freq_alt would be index=1 + channel_1_set_frequency(freq); + } +} diff --git a/quantum/audio/driver_chibios_pwm_software.c b/platforms/chibios/drivers/audio_pwm_software.c similarity index 100% rename from quantum/audio/driver_chibios_pwm_software.c rename to platforms/chibios/drivers/audio_pwm_software.c diff --git a/platforms/chibios/drivers/i2c_master.c b/platforms/chibios/drivers/i2c_master.c index fc4bb2ab370..43591d56f80 100644 --- a/platforms/chibios/drivers/i2c_master.c +++ b/platforms/chibios/drivers/i2c_master.c @@ -38,6 +38,9 @@ static const I2CConfig i2cconfig = { I2C1_OPMODE, I2C1_CLOCK_SPEED, I2C1_DUTY_CYCLE, +#elif defined(WB32F3G71xx) + I2C1_OPMODE, + I2C1_CLOCK_SPEED, #else // This configures the I2C clock to 400khz assuming a 72Mhz clock // For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html @@ -63,16 +66,16 @@ __attribute__((weak)) void i2c_init(void) { is_initialised = true; // Try releasing special pins for a short time - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_INPUT); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_INPUT); chThdSleepMilliseconds(10); #if defined(USE_GPIOV1) - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE); + palSetLineMode(I2C1_SCL_PIN, I2C1_SCL_PAL_MODE); + palSetLineMode(I2C1_SDA_PIN, I2C1_SDA_PAL_MODE); #else - palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(I2C1_SCL_PIN, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); + palSetLineMode(I2C1_SDA_PIN, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); #endif } } @@ -102,7 +105,7 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, i2cStart(&I2C_DRIVER, &i2cconfig); uint8_t complete_packet[length + 1]; - for (uint8_t i = 0; i < length; i++) { + for (uint16_t i = 0; i < length; i++) { complete_packet[i + 1] = data[i]; } complete_packet[0] = regaddr; @@ -111,6 +114,21 @@ i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, return chibios_to_qmk(&status); } +i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + + uint8_t complete_packet[length + 2]; + for (uint16_t i = 0; i < length; i++) { + complete_packet[i + 2] = data[i]; + } + complete_packet[0] = regaddr >> 8; + complete_packet[1] = regaddr & 0xFF; + + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 2, 0, 0, TIME_MS2I(timeout)); + return chibios_to_qmk(&status); +} + i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { i2c_address = devaddr; i2cStart(&I2C_DRIVER, &i2cconfig); @@ -118,4 +136,12 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16 return chibios_to_qmk(&status); } +i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) { + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + uint8_t register_packet[2] = {regaddr >> 8, regaddr & 0xFF}; + msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), register_packet, 2, data, length, TIME_MS2I(timeout)); + return chibios_to_qmk(&status); +} + void i2c_stop(void) { i2cStop(&I2C_DRIVER); } diff --git a/platforms/chibios/drivers/i2c_master.h b/platforms/chibios/drivers/i2c_master.h index c68109acbd3..5f082e9d1e2 100644 --- a/platforms/chibios/drivers/i2c_master.h +++ b/platforms/chibios/drivers/i2c_master.h @@ -27,24 +27,11 @@ #include <ch.h> #include <hal.h> -#ifdef I2C1_BANK -# define I2C1_SCL_BANK I2C1_BANK -# define I2C1_SDA_BANK I2C1_BANK +#ifndef I2C1_SCL_PIN +# define I2C1_SCL_PIN B6 #endif - -#ifndef I2C1_SCL_BANK -# define I2C1_SCL_BANK GPIOB -#endif - -#ifndef I2C1_SDA_BANK -# define I2C1_SDA_BANK GPIOB -#endif - -#ifndef I2C1_SCL -# define I2C1_SCL 6 -#endif -#ifndef I2C1_SDA -# define I2C1_SDA 7 +#ifndef I2C1_SDA_PIN +# define I2C1_SDA_PIN B7 #endif #ifdef USE_I2CV1 @@ -83,10 +70,10 @@ #ifdef USE_GPIOV1 # ifndef I2C1_SCL_PAL_MODE -# define I2C1_SCL_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN # endif # ifndef I2C1_SDA_PAL_MODE -# define I2C1_SDA_PAL_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATE_OPENDRAIN # endif #else // The default PAL alternate modes are used to signal that the pins are used for I2C @@ -109,5 +96,7 @@ i2c_status_t i2c_start(uint8_t address); i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_writeReg16(uint8_t devaddr, uint16_t regaddr, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); +i2c_status_t i2c_readReg16(uint8_t devaddr, uint16_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout); void i2c_stop(void); diff --git a/platforms/chibios/drivers/ps2/ps2_io.c b/platforms/chibios/drivers/ps2/ps2_io.c new file mode 100644 index 00000000000..906d85d8484 --- /dev/null +++ b/platforms/chibios/drivers/ps2/ps2_io.c @@ -0,0 +1,55 @@ +#include <stdbool.h> +#include "ps2_io.h" + +// chibiOS headers +#include "ch.h" +#include "hal.h" + +/* Check port settings for clock and data line */ +#if !(defined(PS2_CLOCK_PIN)) +# error "PS/2 clock setting is required in config.h" +#endif + +#if !(defined(PS2_DATA_PIN)) +# error "PS/2 data setting is required in config.h" +#endif + +/* + * Clock + */ +void clock_init(void) {} + +void clock_lo(void) { + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK_PIN, PAL_LOW); +} + +void clock_hi(void) { + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_CLOCK_PIN, PAL_HIGH); +} + +bool clock_in(void) { + palSetLineMode(PS2_CLOCK_PIN, PAL_MODE_INPUT); + return palReadLine(PS2_CLOCK_PIN); +} + +/* + * Data + */ +void data_init(void) {} + +void data_lo(void) { + palSetLineMode(PS2_DATA_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA_PIN, PAL_LOW); +} + +void data_hi(void) { + palSetLineMode(PS2_DATA_PIN, PAL_MODE_OUTPUT_OPENDRAIN); + palWriteLine(PS2_DATA_PIN, PAL_HIGH); +} + +bool data_in(void) { + palSetLineMode(PS2_DATA_PIN, PAL_MODE_INPUT); + return palReadLine(PS2_DATA_PIN); +} diff --git a/platforms/chibios/drivers/serial.c b/platforms/chibios/drivers/serial.c index f54fbcee4ec..ef6f0aa8d5f 100644 --- a/platforms/chibios/drivers/serial.c +++ b/platforms/chibios/drivers/serial.c @@ -19,7 +19,7 @@ # error "chSysPolledDelayX method not supported on this platform" #else # undef wait_us -# define wait_us(x) chSysPolledDelayX(US2RTC(STM32_SYSCLK, x)) +# define wait_us(x) chSysPolledDelayX(US2RTC(CPU_CLOCK, x)) #endif #ifndef SELECT_SOFT_SERIAL_SPEED diff --git a/platforms/chibios/drivers/serial_usart.c b/platforms/chibios/drivers/serial_usart.c index ea4473791cc..124e4be685e 100644 --- a/platforms/chibios/drivers/serial_usart.c +++ b/platforms/chibios/drivers/serial_usart.c @@ -104,9 +104,9 @@ static inline bool receive(uint8_t* destination, const size_t size) { __attribute__((weak)) void usart_init(void) { # if defined(MCU_STM32) # if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); # else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); # endif # if defined(USART_REMAP) @@ -125,11 +125,11 @@ __attribute__((weak)) void usart_init(void) { __attribute__((weak)) void usart_init(void) { # if defined(MCU_STM32) # if defined(USE_GPIOV1) - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE_PUSHPULL); palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_INPUT); # else - palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetLineMode(SERIAL_USART_TX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_TX_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetLineMode(SERIAL_USART_RX_PIN, PAL_MODE_ALTERNATE(SERIAL_USART_RX_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); # endif # if defined(USART_REMAP) diff --git a/platforms/chibios/drivers/spi_master.c b/platforms/chibios/drivers/spi_master.c index 28ddcbb2ba6..dde0bb05979 100644 --- a/platforms/chibios/drivers/spi_master.c +++ b/platforms/chibios/drivers/spi_master.c @@ -42,9 +42,9 @@ __attribute__((weak)) void spi_init(void) { palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), SPI_MOSI_PAL_MODE); palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), SPI_MISO_PAL_MODE); #else - palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); - palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); + palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST); #endif } } @@ -54,6 +54,7 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { return false; } +#ifndef WB32F3G71xx uint16_t roundedDivisor = 2; while (roundedDivisor < divisor) { roundedDivisor <<= 1; @@ -62,6 +63,7 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { if (roundedDivisor < 2 || roundedDivisor > 256) { return false; } +#endif #if defined(K20x) || defined(KL2x) spiConfig.tar0 = SPIx_CTARn_FMSZ(7) | SPIx_CTARn_ASC(1); @@ -110,6 +112,62 @@ bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) { spiConfig.tar0 |= SPIx_CTARn_BR(8); break; } + +#elif defined(HT32) + spiConfig.cr0 = SPI_CR0_SELOEN; + spiConfig.cr1 = SPI_CR1_MODE | 8; // 8 bits and in master mode + + if (lsbFirst) { + spiConfig.cr1 |= SPI_CR1_FIRSTBIT; + } + + switch (mode) { + case 0: + spiConfig.cr1 |= SPI_CR1_FORMAT_MODE0; + break; + case 1: + spiConfig.cr1 |= SPI_CR1_FORMAT_MODE1; + break; + case 2: + spiConfig.cr1 |= SPI_CR1_FORMAT_MODE2; + break; + case 3: + spiConfig.cr1 |= SPI_CR1_FORMAT_MODE3; + break; + } + + spiConfig.cpr = (roundedDivisor - 1) >> 1; + +#elif defined(WB32F3G71xx) + if (!lsbFirst) { + osalDbgAssert(lsbFirst != FALSE, "unsupported lsbFirst"); + } + + if (divisor < 1) { + return false; + } + + spiConfig.SPI_BaudRatePrescaler = (divisor << 2); + + switch (mode) { + case 0: + spiConfig.SPI_CPHA = SPI_CPHA_1Edge; + spiConfig.SPI_CPOL = SPI_CPOL_Low; + break; + case 1: + spiConfig.SPI_CPHA = SPI_CPHA_2Edge; + spiConfig.SPI_CPOL = SPI_CPOL_Low; + break; + case 2: + spiConfig.SPI_CPHA = SPI_CPHA_1Edge; + spiConfig.SPI_CPOL = SPI_CPOL_High; + break; + case 3: + spiConfig.SPI_CPHA = SPI_CPHA_2Edge; + spiConfig.SPI_CPOL = SPI_CPOL_High; + break; + } + #else spiConfig.cr1 = 0; diff --git a/platforms/chibios/drivers/spi_master.h b/platforms/chibios/drivers/spi_master.h index b5a6ef1437d..6a3ce481f1a 100644 --- a/platforms/chibios/drivers/spi_master.h +++ b/platforms/chibios/drivers/spi_master.h @@ -33,7 +33,7 @@ #ifndef SPI_SCK_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_SCK_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_SCK_PAL_MODE 5 # endif @@ -45,7 +45,7 @@ #ifndef SPI_MOSI_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_MOSI_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_MOSI_PAL_MODE 5 # endif @@ -57,7 +57,7 @@ #ifndef SPI_MISO_PAL_MODE # if defined(USE_GPIOV1) -# define SPI_MISO_PAL_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL # else # define SPI_MISO_PAL_MODE 5 # endif diff --git a/platforms/chibios/drivers/uart.c b/platforms/chibios/drivers/uart.c index 030335b342f..d2ea5d6415c 100644 --- a/platforms/chibios/drivers/uart.c +++ b/platforms/chibios/drivers/uart.c @@ -18,7 +18,11 @@ #include "quantum.h" +#if defined(WB32F3G71xx) +static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE, SD1_WRDLEN, SD1_STPBIT, SD1_PARITY, SD1_ATFLCT}; +#else static SerialConfig serialConfig = {SERIAL_DEFAULT_BITRATE, SD1_CR1, SD1_CR2, SD1_CR3}; +#endif void uart_init(uint32_t baud) { static bool is_initialised = false; @@ -29,22 +33,26 @@ void uart_init(uint32_t baud) { serialConfig.speed = baud; #if defined(USE_GPIOV1) - palSetLineMode(SD1_TX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); - palSetLineMode(SD1_RX_PIN, PAL_MODE_STM32_ALTERNATE_OPENDRAIN); + palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); + palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE_OPENDRAIN); #else - palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(SD1_TX_PIN, PAL_MODE_ALTERNATE(SD1_TX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); + palSetLineMode(SD1_RX_PIN, PAL_MODE_ALTERNATE(SD1_RX_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); #endif sdStart(&SERIAL_DRIVER, &serialConfig); } } -void uart_putchar(uint8_t c) { sdPut(&SERIAL_DRIVER, c); } +void uart_write(uint8_t data) { sdPut(&SERIAL_DRIVER, c); } -uint8_t uart_getchar(void) { +uint8_t uart_read(void) { msg_t res = sdGet(&SERIAL_DRIVER); return (uint8_t)res; } +void uart_transmit(const uint8_t *data, uint16_t length) { sdWrite(&SERIAL_DRIVER, data, length); } + +void uart_receive(uint8_t *data, uint16_t length) { sdRead(&SERIAL_DRIVER, data, length); } + bool uart_available(void) { return !sdGetWouldBlock(&SERIAL_DRIVER); } diff --git a/platforms/chibios/drivers/uart.h b/platforms/chibios/drivers/uart.h index b4e20e9fd3d..603d51037b1 100644 --- a/platforms/chibios/drivers/uart.h +++ b/platforms/chibios/drivers/uart.h @@ -68,10 +68,30 @@ # define SD1_CR3 0 #endif +#ifndef SD1_WRDLEN +# define SD1_WRDLEN 3 +#endif + +#ifndef SD1_STPBIT +# define SD1_STPBIT 0 +#endif + +#ifndef SD1_PARITY +# define SD1_PARITY 0 +#endif + +#ifndef SD1_ATFLCT +# define SD1_ATFLCT 0 +#endif + void uart_init(uint32_t baud); -void uart_putchar(uint8_t c); +void uart_write(uint8_t data); + +uint8_t uart_read(void); + +void uart_transmit(const uint8_t *data, uint16_t length); -uint8_t uart_getchar(void); +void uart_receive(uint8_t *data, uint16_t length); bool uart_available(void); diff --git a/platforms/chibios/drivers/ws2812.c b/platforms/chibios/drivers/ws2812.c index 0d12e2fb79a..7e870661dec 100644 --- a/platforms/chibios/drivers/ws2812.c +++ b/platforms/chibios/drivers/ws2812.c @@ -6,7 +6,7 @@ /* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */ #ifndef NOP_FUDGE -# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) +# if defined(STM32F0XX) || defined(STM32F1XX) || defined(GD32VF103) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) # define NOP_FUDGE 0.4 # else # error("NOP_FUDGE configuration required") @@ -22,8 +22,14 @@ # define WS2812_OUTPUT_MODE PAL_MODE_OUTPUT_OPENDRAIN #endif +// The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased +// to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. +#ifndef WS2812_RES +# define WS2812_RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch +#endif + #define NUMBER_NOPS 6 -#define CYCLES_PER_SEC (STM32_SYSCLK / NUMBER_NOPS * NOP_FUDGE) +#define CYCLES_PER_SEC (CPU_CLOCK / NUMBER_NOPS * NOP_FUDGE) #define NS_PER_SEC (1000000000L) // Note that this has to be SIGNED since we want to be able to check for negative values of derivatives #define NS_PER_CYCLE (NS_PER_SEC / CYCLES_PER_SEC) #define NS_TO_CYCLES(n) ((n) / NS_PER_CYCLE) @@ -40,19 +46,6 @@ } \ } while (0) -// These are the timing constraints taken mostly from the WS2812 datasheets -// These are chosen to be conservative and avoid problems rather than for maximum throughput - -#define T1H 900 // Width of a 1 bit in ns -#define T1L (1250 - T1H) // Width of a 1 bit in ns - -#define T0H 350 // Width of a 0 bit in ns -#define T0L (1250 - T0H) // Width of a 0 bit in ns - -// The reset gap can be 6000 ns, but depending on the LED strip it may have to be increased -// to values like 600000 ns. If it is too small, the pixels will show nothing most of the time. -#define RES (1000 * WS2812_TRST_US) // Width of the low gap between bits to cause a frame to latch - void sendByte(uint8_t byte) { // WS2812 protocol wants most significant bits first for (unsigned char bit = 0; bit < 8; bit++) { @@ -61,15 +54,15 @@ void sendByte(uint8_t byte) { if (is_one) { // 1 writePinHigh(RGB_DI_PIN); - wait_ns(T1H); + wait_ns(WS2812_T1H); writePinLow(RGB_DI_PIN); - wait_ns(T1L); + wait_ns(WS2812_T1L); } else { // 0 writePinHigh(RGB_DI_PIN); - wait_ns(T0H); + wait_ns(WS2812_T0H); writePinLow(RGB_DI_PIN); - wait_ns(T0L); + wait_ns(WS2812_T0L); } } } @@ -108,7 +101,7 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) { #endif } - wait_ns(RES); + wait_ns(WS2812_RES); chSysUnlock(); } diff --git a/platforms/chibios/drivers/ws2812_pwm.c b/platforms/chibios/drivers/ws2812_pwm.c index e6af55b6b36..19ea3cfe8ac 100644 --- a/platforms/chibios/drivers/ws2812_pwm.c +++ b/platforms/chibios/drivers/ws2812_pwm.c @@ -5,7 +5,9 @@ /* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */ #ifdef RGBW -# error "RGBW not supported" +# define WS2812_CHANNELS 4 +#else +# define WS2812_CHANNELS 3 #endif #ifndef WS2812_PWM_DRIVER @@ -40,15 +42,15 @@ // Default Push Pull #ifndef WS2812_EXTERNAL_PULLUP # if defined(USE_GPIOV1) -# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL # else -# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL | PAL_OUTPUT_SPEED_HIGHEST | PAL_PUPDR_FLOATING # endif #else # if defined(USE_GPIOV1) -# define WS2812_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE_OPENDRAIN # else -# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_OSPEED_HIGHEST | PAL_STM32_PUPDR_FLOATING +# define WS2812_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_PWM_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN | PAL_OUTPUT_SPEED_HIGHEST | PAL_PUPDR_FLOATING # endif #endif @@ -59,7 +61,7 @@ /* --- PRIVATE CONSTANTS ---------------------------------------------------- */ -#define WS2812_PWM_FREQUENCY (STM32_SYSCLK / 2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ +#define WS2812_PWM_FREQUENCY (CPU_CLOCK / 2) /**< Clock frequency of PWM, must be valid with respect to system clock! */ #define WS2812_PWM_PERIOD (WS2812_PWM_FREQUENCY / WS2812_PWM_TARGET_PERIOD) /**< Clock period in ticks. 1 / 800kHz = 1.25 uS (as per datasheet) */ /** @@ -68,8 +70,9 @@ * The reset period for each frame is defined in WS2812_TRST_US. * Calculate the number of zeroes to add at the end assuming 1.25 uS/bit: */ -#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / 1250) -#define WS2812_COLOR_BIT_N (RGBLED_NUM * 24) /**< Number of data bits */ +#define WS2812_COLOR_BITS (WS2812_CHANNELS * 8) +#define WS2812_RESET_BIT_N (1000 * WS2812_TRST_US / WS2812_TIMING) +#define WS2812_COLOR_BIT_N (RGBLED_NUM * WS2812_COLOR_BITS) /**< Number of data bits */ #define WS2812_BIT_N (WS2812_COLOR_BIT_N + WS2812_RESET_BIT_N) /**< Total number of bits in a frame */ /** @@ -114,7 +117,7 @@ * * @return The bit index */ -#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit))) +#define WS2812_BIT(led, byte, bit) (WS2812_COLOR_BITS * (led) + 8 * (byte) + (7 - (bit))) #if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB) /** @@ -228,6 +231,20 @@ # define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 0, (bit)) #endif +#ifdef RGBW +/** + * @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given white bit + * + * @note The white byte is the last byte in the color packet + * + * @param[in] led: The led index [0, @ref WS2812_LED_N) + * @param[in] bit: The bit index [0, 7] + * + * @return The bit index + */ +# define WS2812_WHITE_BIT(led, bit) WS2812_BIT((led), 3, (bit)) +#endif + /* --- PRIVATE VARIABLES ---------------------------------------------------- */ static uint32_t ws2812_frame_buffer[WS2812_BIT_N + 1]; /**< Buffer for a frame */ @@ -296,6 +313,17 @@ void ws2812_write_led(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b) { ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; } } +void ws2812_write_led_rgbw(uint16_t led_number, uint8_t r, uint8_t g, uint8_t b, uint8_t w) { + // Write color to frame buffer + for (uint8_t bit = 0; bit < 8; bit++) { + ws2812_frame_buffer[WS2812_RED_BIT(led_number, bit)] = ((r >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; + ws2812_frame_buffer[WS2812_GREEN_BIT(led_number, bit)] = ((g >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; + ws2812_frame_buffer[WS2812_BLUE_BIT(led_number, bit)] = ((b >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; +#ifdef RGBW + ws2812_frame_buffer[WS2812_WHITE_BIT(led_number, bit)] = ((w >> bit) & 0x01) ? WS2812_DUTYCYCLE_1 : WS2812_DUTYCYCLE_0; +#endif + } +} // Setleds for standard RGB void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) { @@ -306,6 +334,10 @@ void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) { } for (uint16_t i = 0; i < leds; i++) { +#ifdef RGBW + ws2812_write_led_rgbw(i, ledarray[i].r, ledarray[i].g, ledarray[i].b, ledarray[i].w); +#else ws2812_write_led(i, ledarray[i].r, ledarray[i].g, ledarray[i].b); +#endif } } diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index fe14b478ab6..ba471e0b8e5 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -3,10 +3,6 @@ /* Adapted from https://github.com/gamazeps/ws2812b-chibios-SPIDMA/ */ -#ifdef RGBW -# error "RGBW not supported" -#endif - // Define the spi your LEDs are plugged to here #ifndef WS2812_SPI # define WS2812_SPI SPID1 @@ -24,15 +20,15 @@ // Default Push Pull #ifndef WS2812_EXTERNAL_PULLUP # if defined(USE_GPIOV1) -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL # else -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL # endif #else # if defined(USE_GPIOV1) -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_OPENDRAIN +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE_OPENDRAIN # else -# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN +# define WS2812_MOSI_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_MOSI_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN # endif #endif @@ -68,16 +64,20 @@ #endif #if defined(USE_GPIOV1) -# define WS2812_SCK_OUTPUT_MODE PAL_MODE_STM32_ALTERNATE_PUSHPULL +# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE_PUSHPULL #else -# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL +# define WS2812_SCK_OUTPUT_MODE PAL_MODE_ALTERNATE(WS2812_SPI_SCK_PAL_MODE) | PAL_OUTPUT_TYPE_PUSHPULL #endif #define BYTES_FOR_LED_BYTE 4 -#define NB_COLORS 3 -#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * NB_COLORS) +#ifdef RGBW +# define WS2812_CHANNELS 4 +#else +# define WS2812_CHANNELS 3 +#endif +#define BYTES_FOR_LED (BYTES_FOR_LED_BYTE * WS2812_CHANNELS) #define DATA_SIZE (BYTES_FOR_LED * RGBLED_NUM) -#define RESET_SIZE (1000 * WS2812_TRST_US / (2 * 1250)) +#define RESET_SIZE (1000 * WS2812_TRST_US / (2 * WS2812_TIMING)) #define PREAMBLE_SIZE 4 static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE] = {0}; @@ -116,6 +116,9 @@ static void set_led_color_rgb(LED_TYPE color, int pos) { for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.g, j); for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.r, j); #endif +#ifdef RGBW + for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 4 + j] = get_protocol_eq(color.w, j); +#endif } void ws2812_init(void) { diff --git a/platforms/chibios/eeprom_stm32.c b/platforms/chibios/eeprom_stm32.c new file mode 100644 index 00000000000..acc6a48516c --- /dev/null +++ b/platforms/chibios/eeprom_stm32.c @@ -0,0 +1,687 @@ +/* + * This software is experimental and a work in progress. + * Under no circumstances should these files be used in relation to any critical system(s). + * Use of these files is at your own risk. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by + * Artur F. + * + * Modifications for QMK and STM32F303 by Yiancar + * Modifications to add flash wear leveling by Ilya Zhuravlev + * Modifications to increase flash density by Don Kjer + */ + +#include <stdio.h> +#include <stdbool.h> +#include "util.h" +#include "debug.h" +#include "eeprom_stm32.h" +#include "flash_stm32.h" + +/* + * We emulate eeprom by writing a snapshot compacted view of eeprom contents, + * followed by a write log of any change since that snapshot: + * + * === SIMULATED EEPROM CONTENTS === + * + * ┌─ Compacted ┬ Write Log ─┐ + * │............│[BYTE][BYTE]│ + * │FFFF....FFFF│[WRD0][WRD1]│ + * │FFFFFFFFFFFF│[WORD][NEXT]│ + * │....FFFFFFFF│[BYTE][WRD0]│ + * ├────────────┼────────────┤ + * └──PAGE_BASE │ │ + * PAGE_LAST─┴─WRITE_BASE │ + * WRITE_LAST ┘ + * + * Compacted contents are the 1's complement of the actual EEPROM contents. + * e.g. An 'FFFF' represents a '0000' value. + * + * The size of the 'compacted' area is equal to the size of the 'emulated' eeprom. + * The size of the compacted-area and write log are configurable, and the combined + * size of Compacted + WriteLog is a multiple FEE_PAGE_SIZE, which is MCU dependent. + * Simulated Eeprom contents are located at the end of available flash space. + * + * The following configuration defines can be set: + * + * FEE_PAGE_COUNT # Total number of pages to use for eeprom simulation (Compact + Write log) + * FEE_DENSITY_BYTES # Size of simulated eeprom. (Defaults to half the space allocated by FEE_PAGE_COUNT) + * NOTE: The current implementation does not include page swapping, + * and FEE_DENSITY_BYTES will consume that amount of RAM as a cached view of actual EEPROM contents. + * + * The maximum size of FEE_DENSITY_BYTES is currently 16384. The write log size equals + * FEE_PAGE_COUNT * FEE_PAGE_SIZE - FEE_DENSITY_BYTES. + * The larger the write log, the less frequently the compacted area needs to be rewritten. + * + * + * *** General Algorithm *** + * + * During initialization: + * The contents of the Compacted-flash area are loaded and the 1's complement value + * is cached into memory (e.g. 0xFFFF in Flash represents 0x0000 in cache). + * Write log entries are processed until a 0xFFFF is reached. + * Each log entry updates a byte or word in the cache. + * + * During reads: + * EEPROM contents are given back directly from the cache in memory. + * + * During writes: + * The contents of the cache is updated first. + * If the Compacted-flash area corresponding to the write address is unprogrammed, the 1's complement of the value is written directly into Compacted-flash + * Otherwise: + * If the write log is full, erase both the Compacted-flash area and the Write log, then write cached contents to the Compacted-flash area. + * Otherwise a Write log entry is constructed and appended to the next free position in the Write log. + * + * + * *** Write Log Structure *** + * + * Write log entries allow for optimized byte writes to addresses below 128. Writing 0 or 1 words are also optimized when word-aligned. + * + * === WRITE LOG ENTRY FORMATS === + * + * ╔═══ Byte-Entry ══╗ + * ║0XXXXXXX║YYYYYYYY║ + * ║ └──┬──┘║└──┬───┘║ + * ║ Address║ Value ║ + * ╚════════╩════════╝ + * 0 <= Address < 0x80 (128) + * + * ╔ Word-Encoded 0 ╗ + * ║100XXXXXXXXXXXXX║ + * ║ │└─────┬─────┘║ + * ║ │Address >> 1 ║ + * ║ └── Value: 0 ║ + * ╚════════════════╝ + * 0 <= Address <= 0x3FFE (16382) + * + * ╔ Word-Encoded 1 ╗ + * ║101XXXXXXXXXXXXX║ + * ║ │└─────┬─────┘║ + * ║ │Address >> 1 ║ + * ║ └── Value: 1 ║ + * ╚════════════════╝ + * 0 <= Address <= 0x3FFE (16382) + * + * ╔═══ Reserved ═══╗ + * ║110XXXXXXXXXXXXX║ + * ╚════════════════╝ + * + * ╔═══════════ Word-Next ═══════════╗ + * ║111XXXXXXXXXXXXX║YYYYYYYYYYYYYYYY║ + * ║ └─────┬─────┘║└───────┬──────┘║ + * ║(Address-128)>>1║ ~Value ║ + * ╚════════════════╩════════════════╝ + * ( 0 <= Address < 0x0080 (128): Reserved) + * 0x80 <= Address <= 0x3FFE (16382) + * + * Write Log entry ranges: + * 0x0000 ... 0x7FFF - Byte-Entry; address is (Entry & 0x7F00) >> 4; value is (Entry & 0xFF) + * 0x8000 ... 0x9FFF - Word-Encoded 0; address is (Entry & 0x1FFF) << 1; value is 0 + * 0xA000 ... 0xBFFF - Word-Encoded 1; address is (Entry & 0x1FFF) << 1; value is 1 + * 0xC000 ... 0xDFFF - Reserved + * 0xE000 ... 0xFFBF - Word-Next; address is (Entry & 0x1FFF) << 1 + 0x80; value is ~(Next_Entry) + * 0xFFC0 ... 0xFFFE - Reserved + * 0xFFFF - Unprogrammed + * + */ + +#include "eeprom_stm32_defs.h" +#if !defined(FEE_PAGE_SIZE) || !defined(FEE_PAGE_COUNT) || !defined(FEE_MCU_FLASH_SIZE) || !defined(FEE_PAGE_BASE_ADDRESS) +# error "not implemented." +#endif + +/* These bits are used for optimizing encoding of bytes, 0 and 1 */ +#define FEE_WORD_ENCODING 0x8000 +#define FEE_VALUE_NEXT 0x6000 +#define FEE_VALUE_RESERVED 0x4000 +#define FEE_VALUE_ENCODED 0x2000 +#define FEE_BYTE_RANGE 0x80 + +/* Addressable range 16KByte: 0 <-> (0x1FFF << 1) */ +#define FEE_ADDRESS_MAX_SIZE 0x4000 + +/* Flash word value after erase */ +#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) + +/* Size of combined compacted eeprom and write log pages */ +#define FEE_DENSITY_MAX_SIZE (FEE_PAGE_COUNT * FEE_PAGE_SIZE) + +#ifndef FEE_MCU_FLASH_SIZE_IGNORE_CHECK /* *TODO: Get rid of this check */ +# if FEE_DENSITY_MAX_SIZE > (FEE_MCU_FLASH_SIZE * 1024) +# pragma message STR(FEE_DENSITY_MAX_SIZE) " > " STR(FEE_MCU_FLASH_SIZE * 1024) +# error emulated eeprom: FEE_DENSITY_MAX_SIZE is greater than available flash size +# endif +#endif + +/* Size of emulated eeprom */ +#ifdef FEE_DENSITY_BYTES +# if (FEE_DENSITY_BYTES > FEE_DENSITY_MAX_SIZE) +# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE) +# error emulated eeprom: FEE_DENSITY_BYTES exceeds FEE_DENSITY_MAX_SIZE +# endif +# if (FEE_DENSITY_BYTES == FEE_DENSITY_MAX_SIZE) +# pragma message STR(FEE_DENSITY_BYTES) " == " STR(FEE_DENSITY_MAX_SIZE) +# warning emulated eeprom: FEE_DENSITY_BYTES leaves no room for a write log. This will greatly increase the flash wear rate! +# endif +# if FEE_DENSITY_BYTES > FEE_ADDRESS_MAX_SIZE +# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_ADDRESS_MAX_SIZE) +# error emulated eeprom: FEE_DENSITY_BYTES is greater than FEE_ADDRESS_MAX_SIZE allows +# endif +# if ((FEE_DENSITY_BYTES) % 2) == 1 +# error emulated eeprom: FEE_DENSITY_BYTES must be even +# endif +#else +/* Default to half of allocated space used for emulated eeprom, half for write log */ +# define FEE_DENSITY_BYTES (FEE_PAGE_COUNT * FEE_PAGE_SIZE / 2) +#endif + +/* Size of write log */ +#ifdef FEE_WRITE_LOG_BYTES +# if ((FEE_DENSITY_BYTES + FEE_WRITE_LOG_BYTES) > FEE_DENSITY_MAX_SIZE) +# pragma message STR(FEE_DENSITY_BYTES) " + " STR(FEE_WRITE_LOG_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE) +# error emulated eeprom: FEE_WRITE_LOG_BYTES exceeds remaining FEE_DENSITY_MAX_SIZE +# endif +# if ((FEE_WRITE_LOG_BYTES) % 2) == 1 +# error emulated eeprom: FEE_WRITE_LOG_BYTES must be even +# endif +#else +/* Default to use all remaining space */ +# define FEE_WRITE_LOG_BYTES (FEE_PAGE_COUNT * FEE_PAGE_SIZE - FEE_DENSITY_BYTES) +#endif + +/* Start of the emulated eeprom compacted flash area */ +#define FEE_COMPACTED_BASE_ADDRESS FEE_PAGE_BASE_ADDRESS +/* End of the emulated eeprom compacted flash area */ +#define FEE_COMPACTED_LAST_ADDRESS (FEE_COMPACTED_BASE_ADDRESS + FEE_DENSITY_BYTES) +/* Start of the emulated eeprom write log */ +#define FEE_WRITE_LOG_BASE_ADDRESS FEE_COMPACTED_LAST_ADDRESS +/* End of the emulated eeprom write log */ +#define FEE_WRITE_LOG_LAST_ADDRESS (FEE_WRITE_LOG_BASE_ADDRESS + FEE_WRITE_LOG_BYTES) + +#if defined(DYNAMIC_KEYMAP_EEPROM_MAX_ADDR) && (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR >= FEE_DENSITY_BYTES) +# error emulated eeprom: DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than the FEE_DENSITY_BYTES available +#endif + +/* In-memory contents of emulated eeprom for faster access */ +/* *TODO: Implement page swapping */ +static uint16_t WordBuf[FEE_DENSITY_BYTES / 2]; +static uint8_t *DataBuf = (uint8_t *)WordBuf; + +/* Pointer to the first available slot within the write log */ +static uint16_t *empty_slot; + +// #define DEBUG_EEPROM_OUTPUT + +/* + * Debug print utils + */ + +#if defined(DEBUG_EEPROM_OUTPUT) + +# define debug_eeprom debug_enable +# define eeprom_println(s) println(s) +# define eeprom_printf(fmt, ...) xprintf(fmt, ##__VA_ARGS__); + +#else /* NO_DEBUG */ + +# define debug_eeprom false +# define eeprom_println(s) +# define eeprom_printf(fmt, ...) + +#endif /* NO_DEBUG */ + +void print_eeprom(void) { +#ifndef NO_DEBUG + int empty_rows = 0; + for (uint16_t i = 0; i < FEE_DENSITY_BYTES; i++) { + if (i % 16 == 0) { + if (i >= FEE_DENSITY_BYTES - 16) { + /* Make sure we display the last row */ + empty_rows = 0; + } + /* Check if this row is uninitialized */ + ++empty_rows; + for (uint16_t j = 0; j < 16; j++) { + if (DataBuf[i + j]) { + empty_rows = 0; + break; + } + } + if (empty_rows > 1) { + /* Repeat empty row */ + if (empty_rows == 2) { + /* Only display the first repeat empty row */ + println("*"); + } + i += 15; + continue; + } + xprintf("%04x", i); + } + if (i % 8 == 0) print(" "); + + xprintf(" %02x", DataBuf[i]); + if ((i + 1) % 16 == 0) { + println(""); + } + } +#endif +} + +uint16_t EEPROM_Init(void) { + /* Load emulated eeprom contents from compacted flash into memory */ + uint16_t *src = (uint16_t *)FEE_COMPACTED_BASE_ADDRESS; + uint16_t *dest = (uint16_t *)DataBuf; + for (; src < (uint16_t *)FEE_COMPACTED_LAST_ADDRESS; ++src, ++dest) { + *dest = ~*src; + } + + if (debug_eeprom) { + println("EEPROM_Init Compacted Pages:"); + print_eeprom(); + println("EEPROM_Init Write Log:"); + } + + /* Replay write log */ + uint16_t *log_addr; + for (log_addr = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; log_addr < (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS; ++log_addr) { + uint16_t address = *log_addr; + if (address == FEE_EMPTY_WORD) { + break; + } + /* Check for lowest 128-bytes optimization */ + if (!(address & FEE_WORD_ENCODING)) { + uint8_t bvalue = (uint8_t)address; + address >>= 8; + DataBuf[address] = bvalue; + eeprom_printf("DataBuf[0x%02x] = 0x%02x;\n", address, bvalue); + } else { + uint16_t wvalue; + /* Check if value is in next word */ + if ((address & FEE_VALUE_NEXT) == FEE_VALUE_NEXT) { + /* Read value from next word */ + if (++log_addr >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { + break; + } + wvalue = ~*log_addr; + if (!wvalue) { + eeprom_printf("Incomplete write at log_addr: 0x%04x;\n", (uint32_t)log_addr); + /* Possibly incomplete write. Ignore and continue */ + continue; + } + address &= 0x1FFF; + address <<= 1; + /* Writes to addresses less than 128 are byte log entries */ + address += FEE_BYTE_RANGE; + } else { + /* Reserved for future use */ + if (address & FEE_VALUE_RESERVED) { + eeprom_printf("Reserved encoded value at log_addr: 0x%04x;\n", (uint32_t)log_addr); + continue; + } + /* Optimization for 0 or 1 values. */ + wvalue = (address & FEE_VALUE_ENCODED) >> 13; + address &= 0x1FFF; + address <<= 1; + } + if (address < FEE_DENSITY_BYTES) { + eeprom_printf("DataBuf[0x%04x] = 0x%04x;\n", address, wvalue); + *(uint16_t *)(&DataBuf[address]) = wvalue; + } else { + eeprom_printf("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n", address, wvalue); + } + } + } + + empty_slot = log_addr; + + if (debug_eeprom) { + println("EEPROM_Init Final DataBuf:"); + print_eeprom(); + } + + return FEE_DENSITY_BYTES; +} + +/* Clear flash contents (doesn't touch in-memory DataBuf) */ +static void eeprom_clear(void) { + FLASH_Unlock(); + + for (uint16_t page_num = 0; page_num < FEE_PAGE_COUNT; ++page_num) { + eeprom_printf("FLASH_ErasePage(0x%04x)\n", (uint32_t)(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE))); + FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); + } + + FLASH_Lock(); + + empty_slot = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; + eeprom_printf("eeprom_clear empty_slot: 0x%08x\n", (uint32_t)empty_slot); +} + +/* Erase emulated eeprom */ +void EEPROM_Erase(void) { + eeprom_println("EEPROM_Erase"); + /* Erase compacted pages and write log */ + eeprom_clear(); + /* re-initialize to reset DataBuf */ + EEPROM_Init(); +} + +/* Compact write log */ +static uint8_t eeprom_compact(void) { + /* Erase compacted pages and write log */ + eeprom_clear(); + + FLASH_Unlock(); + + FLASH_Status final_status = FLASH_COMPLETE; + + /* Write emulated eeprom contents from memory to compacted flash */ + uint16_t *src = (uint16_t *)DataBuf; + uintptr_t dest = FEE_COMPACTED_BASE_ADDRESS; + uint16_t value; + for (; dest < FEE_COMPACTED_LAST_ADDRESS; ++src, dest += 2) { + value = *src; + if (value) { + eeprom_printf("FLASH_ProgramHalfWord(0x%04x, 0x%04x)\n", (uint32_t)dest, ~value); + FLASH_Status status = FLASH_ProgramHalfWord(dest, ~value); + if (status != FLASH_COMPLETE) final_status = status; + } + } + + FLASH_Lock(); + + if (debug_eeprom) { + println("eeprom_compacted:"); + print_eeprom(); + } + + return final_status; +} + +static uint8_t eeprom_write_direct_entry(uint16_t Address) { + /* Check if we can just write this directly to the compacted flash area */ + uintptr_t directAddress = FEE_COMPACTED_BASE_ADDRESS + (Address & 0xFFFE); + if (*(uint16_t *)directAddress == FEE_EMPTY_WORD) { + /* Write the value directly to the compacted area without a log entry */ + uint16_t value = ~*(uint16_t *)(&DataBuf[Address & 0xFFFE]); + /* Early exit if a write isn't needed */ + if (value == FEE_EMPTY_WORD) return FLASH_COMPLETE; + + FLASH_Unlock(); + + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x) [DIRECT]\n", (uint32_t)directAddress, value); + FLASH_Status status = FLASH_ProgramHalfWord(directAddress, value); + + FLASH_Lock(); + return status; + } + return 0; +} + +static uint8_t eeprom_write_log_word_entry(uint16_t Address) { + FLASH_Status final_status = FLASH_COMPLETE; + + uint16_t value = *(uint16_t *)(&DataBuf[Address]); + eeprom_printf("eeprom_write_log_word_entry(0x%04x): 0x%04x\n", Address, value); + + /* MSB signifies the lowest 128-byte optimization is not in effect */ + uint16_t encoding = FEE_WORD_ENCODING; + uint8_t entry_size; + if (value <= 1) { + encoding |= value << 13; + entry_size = 2; + } else { + encoding |= FEE_VALUE_NEXT; + entry_size = 4; + /* Writes to addresses less than 128 are byte log entries */ + Address -= FEE_BYTE_RANGE; + } + + /* if we can't find an empty spot, we must compact emulated eeprom */ + if (empty_slot > (uint16_t *)(FEE_WRITE_LOG_LAST_ADDRESS - entry_size)) { + /* compact the write log into the compacted flash area */ + return eeprom_compact(); + } + + /* Word log writes should be word-aligned. Take back a bit */ + Address >>= 1; + Address |= encoding; + + /* ok we found a place let's write our data */ + FLASH_Unlock(); + + /* address */ + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, Address); + final_status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, Address); + + /* value */ + if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT)) { + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, ~value); + FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, ~value); + if (status != FLASH_COMPLETE) final_status = status; + } + + FLASH_Lock(); + + return final_status; +} + +static uint8_t eeprom_write_log_byte_entry(uint16_t Address) { + eeprom_printf("eeprom_write_log_byte_entry(0x%04x): 0x%02x\n", Address, DataBuf[Address]); + + /* if couldn't find an empty spot, we must compact emulated eeprom */ + if (empty_slot >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { + /* compact the write log into the compacted flash area */ + return eeprom_compact(); + } + + /* ok we found a place let's write our data */ + FLASH_Unlock(); + + /* Pack address and value into the same word */ + uint16_t value = (Address << 8) | DataBuf[Address]; + + /* write to flash */ + eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, value); + FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, value); + + FLASH_Lock(); + + return status; +} + +uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) { + /* if the address is out-of-bounds, do nothing */ + if (Address >= FEE_DENSITY_BYTES) { + eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [BAD ADDRESS]\n", Address, DataByte); + return FLASH_BAD_ADDRESS; + } + + /* if the value is the same, don't bother writing it */ + if (DataBuf[Address] == DataByte) { + eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [SKIP SAME]\n", Address, DataByte); + return 0; + } + + /* keep DataBuf cache in sync */ + DataBuf[Address] = DataByte; + eeprom_printf("EEPROM_WriteDataByte DataBuf[0x%04x] = 0x%02x\n", Address, DataBuf[Address]); + + /* perform the write into flash memory */ + /* First, attempt to write directly into the compacted flash area */ + FLASH_Status status = eeprom_write_direct_entry(Address); + if (!status) { + /* Otherwise append to the write log */ + if (Address < FEE_BYTE_RANGE) { + status = eeprom_write_log_byte_entry(Address); + } else { + status = eeprom_write_log_word_entry(Address & 0xFFFE); + } + } + if (status != 0 && status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataByte [STATUS == %d]\n", status); + } + return status; +} + +uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord) { + /* if the address is out-of-bounds, do nothing */ + if (Address >= FEE_DENSITY_BYTES) { + eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [BAD ADDRESS]\n", Address, DataWord); + return FLASH_BAD_ADDRESS; + } + + /* Check for word alignment */ + FLASH_Status final_status = FLASH_COMPLETE; + if (Address % 2) { + final_status = EEPROM_WriteDataByte(Address, DataWord); + FLASH_Status status = EEPROM_WriteDataByte(Address + 1, DataWord >> 8); + if (status != FLASH_COMPLETE) final_status = status; + if (final_status != 0 && final_status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); + } + return final_status; + } + + /* if the value is the same, don't bother writing it */ + uint16_t oldValue = *(uint16_t *)(&DataBuf[Address]); + if (oldValue == DataWord) { + eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [SKIP SAME]\n", Address, DataWord); + return 0; + } + + /* keep DataBuf cache in sync */ + *(uint16_t *)(&DataBuf[Address]) = DataWord; + eeprom_printf("EEPROM_WriteDataWord DataBuf[0x%04x] = 0x%04x\n", Address, *(uint16_t *)(&DataBuf[Address])); + + /* perform the write into flash memory */ + /* First, attempt to write directly into the compacted flash area */ + final_status = eeprom_write_direct_entry(Address); + if (!final_status) { + /* Otherwise append to the write log */ + /* Check if we need to fall back to byte write */ + if (Address < FEE_BYTE_RANGE) { + final_status = FLASH_COMPLETE; + /* Only write a byte if it has changed */ + if ((uint8_t)oldValue != (uint8_t)DataWord) { + final_status = eeprom_write_log_byte_entry(Address); + } + FLASH_Status status = FLASH_COMPLETE; + /* Only write a byte if it has changed */ + if ((oldValue >> 8) != (DataWord >> 8)) { + status = eeprom_write_log_byte_entry(Address + 1); + } + if (status != FLASH_COMPLETE) final_status = status; + } else { + final_status = eeprom_write_log_word_entry(Address); + } + } + if (final_status != 0 && final_status != FLASH_COMPLETE) { + eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); + } + return final_status; +} + +uint8_t EEPROM_ReadDataByte(uint16_t Address) { + uint8_t DataByte = 0xFF; + + if (Address < FEE_DENSITY_BYTES) { + DataByte = DataBuf[Address]; + } + + eeprom_printf("EEPROM_ReadDataByte(0x%04x): 0x%02x\n", Address, DataByte); + + return DataByte; +} + +uint16_t EEPROM_ReadDataWord(uint16_t Address) { + uint16_t DataWord = 0xFFFF; + + if (Address < FEE_DENSITY_BYTES - 1) { + /* Check word alignment */ + if (Address % 2) { + DataWord = DataBuf[Address] | (DataBuf[Address + 1] << 8); + } else { + DataWord = *(uint16_t *)(&DataBuf[Address]); + } + } + + eeprom_printf("EEPROM_ReadDataWord(0x%04x): 0x%04x\n", Address, DataWord); + + return DataWord; +} + +/***************************************************************************** + * Bind to eeprom_driver.c + *******************************************************************************/ +void eeprom_driver_init(void) { EEPROM_Init(); } + +void eeprom_driver_erase(void) { EEPROM_Erase(); } + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + const uint8_t *src = (const uint8_t *)addr; + uint8_t * dest = (uint8_t *)buf; + + /* Check word alignment */ + if (len && (uintptr_t)src % 2) { + /* Read the unaligned first byte */ + *dest++ = EEPROM_ReadDataByte((const uintptr_t)src++); + --len; + } + + uint16_t value; + bool aligned = ((uintptr_t)dest % 2 == 0); + while (len > 1) { + value = EEPROM_ReadDataWord((const uintptr_t)((uint16_t *)src)); + if (aligned) { + *(uint16_t *)dest = value; + dest += 2; + } else { + *dest++ = value; + *dest++ = value >> 8; + } + src += 2; + len -= 2; + } + if (len) { + *dest = EEPROM_ReadDataByte((const uintptr_t)src); + } +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + uint8_t * dest = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + + /* Check word alignment */ + if (len && (uintptr_t)dest % 2) { + /* Write the unaligned first byte */ + EEPROM_WriteDataByte((uintptr_t)dest++, *src++); + --len; + } + + uint16_t value; + bool aligned = ((uintptr_t)src % 2 == 0); + while (len > 1) { + if (aligned) { + value = *(uint16_t *)src; + } else { + value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8); + } + EEPROM_WriteDataWord((uintptr_t)((uint16_t *)dest), value); + dest += 2; + src += 2; + len -= 2; + } + + if (len) { + EEPROM_WriteDataByte((uintptr_t)dest, *src); + } +} diff --git a/tmk_core/common/chibios/eeprom_stm32.h b/platforms/chibios/eeprom_stm32.h similarity index 100% rename from tmk_core/common/chibios/eeprom_stm32.h rename to platforms/chibios/eeprom_stm32.h diff --git a/platforms/chibios/eeprom_stm32_defs.h b/platforms/chibios/eeprom_stm32_defs.h new file mode 100644 index 00000000000..66904f247f5 --- /dev/null +++ b/platforms/chibios/eeprom_stm32_defs.h @@ -0,0 +1,74 @@ +/* Copyright 2021 QMK + * + * 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 3 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/>. + */ +#pragma once + +#include <hal.h> + +#if !defined(FEE_PAGE_SIZE) || !defined(FEE_PAGE_COUNT) +# if defined(STM32F103xB) || defined(STM32F042x6) || defined(GD32VF103C8) || defined(GD32VF103CB) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x400 // Page size = 1KByte +# endif +# ifndef FEE_PAGE_COUNT +# define FEE_PAGE_COUNT 2 // How many pages are used +# endif +# elif defined(STM32F103xE) || defined(STM32F303xC) || defined(STM32F072xB) || defined(STM32F070xB) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x800 // Page size = 2KByte +# endif +# ifndef FEE_PAGE_COUNT +# define FEE_PAGE_COUNT 4 // How many pages are used +# endif +# elif defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F405xG) || defined(STM32F411xE) +# ifndef FEE_PAGE_SIZE +# define FEE_PAGE_SIZE 0x4000 // Page size = 16KByte +# endif +# ifndef FEE_PAGE_COUNT +# define FEE_PAGE_COUNT 1 // How many pages are used +# endif +# endif +#endif + +#if !defined(FEE_MCU_FLASH_SIZE) +# if defined(STM32F042x6) +# define FEE_MCU_FLASH_SIZE 32 // Size in Kb +# elif defined(GD32VF103C8) +# define FEE_MCU_FLASH_SIZE 64 // Size in Kb +# elif defined(STM32F103xB) || defined(STM32F072xB) || defined(STM32F070xB) || defined(GD32VF103CB) +# define FEE_MCU_FLASH_SIZE 128 // Size in Kb +# elif defined(STM32F303xC) || defined(STM32F401xC) +# define FEE_MCU_FLASH_SIZE 256 // Size in Kb +# elif defined(STM32F103xE) || defined(STM32F401xE) || defined(STM32F411xE) +# define FEE_MCU_FLASH_SIZE 512 // Size in Kb +# elif defined(STM32F405xG) +# define FEE_MCU_FLASH_SIZE 1024 // Size in Kb +# endif +#endif + +/* Start of the emulated eeprom */ +#if !defined(FEE_PAGE_BASE_ADDRESS) +# if defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F405xG) || defined(STM32F411xE) +# ifndef FEE_PAGE_BASE_ADDRESS +# define FEE_PAGE_BASE_ADDRESS 0x08004000 // bodge to force 2nd 16k page +# endif +# else +# ifndef FEE_FLASH_BASE +# define FEE_FLASH_BASE 0x8000000 +# endif +/* Default to end of flash */ +# define FEE_PAGE_BASE_ADDRESS ((uintptr_t)(FEE_FLASH_BASE) + FEE_MCU_FLASH_SIZE * 1024 - (FEE_PAGE_COUNT * FEE_PAGE_SIZE)) +# endif +#endif diff --git a/platforms/chibios/eeprom_teensy.c b/platforms/chibios/eeprom_teensy.c new file mode 100644 index 00000000000..97da6f9e148 --- /dev/null +++ b/platforms/chibios/eeprom_teensy.c @@ -0,0 +1,795 @@ +#include <ch.h> +#include <hal.h> + +#include "eeconfig.h" + +/*************************************/ +/* Hardware backend */ +/* */ +/* Code from PJRC/Teensyduino */ +/*************************************/ + +/* Teensyduino Core Library + * http://www.pjrc.com/teensy/ + * Copyright (c) 2013 PJRC.COM, LLC. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * 1. The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * 2. If the Software is incorporated into a build system that allows + * selection among a list of target devices, then similar target + * devices manufactured by PJRC.COM must be included in the list of + * target devices and selectable in the same manner. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#define SMC_PMSTAT_RUN ((uint8_t)0x01) +#define SMC_PMSTAT_HSRUN ((uint8_t)0x80) + +#define F_CPU KINETIS_SYSCLK_FREQUENCY + +static inline int kinetis_hsrun_disable(void) { +#if defined(MK66F18) + if (SMC->PMSTAT == SMC_PMSTAT_HSRUN) { +// First, reduce the CPU clock speed, but do not change +// the peripheral speed (F_BUS). Serial1 & Serial2 baud +// rates will be impacted, but most other peripherals +// will continue functioning at the same speed. +# if F_CPU == 256000000 && F_BUS == 64000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 3, 1, 7); // TODO: TEST +# elif F_CPU == 256000000 && F_BUS == 128000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 7); // TODO: TEST +# elif F_CPU == 240000000 && F_BUS == 60000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 3, 1, 7); // ok +# elif F_CPU == 240000000 && F_BUS == 80000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 8); // ok +# elif F_CPU == 240000000 && F_BUS == 120000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 7); // ok +# elif F_CPU == 216000000 && F_BUS == 54000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 3, 1, 7); // ok +# elif F_CPU == 216000000 && F_BUS == 72000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 8); // ok +# elif F_CPU == 216000000 && F_BUS == 108000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 7); // ok +# elif F_CPU == 192000000 && F_BUS == 48000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 3, 1, 7); // ok +# elif F_CPU == 192000000 && F_BUS == 64000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 8); // ok +# elif F_CPU == 192000000 && F_BUS == 96000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 7); // ok +# elif F_CPU == 180000000 && F_BUS == 60000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 8); // ok +# elif F_CPU == 180000000 && F_BUS == 90000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 7); // ok +# elif F_CPU == 168000000 && F_BUS == 56000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 5); // ok +# elif F_CPU == 144000000 && F_BUS == 48000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(2, 2, 2, 5); // ok +# elif F_CPU == 144000000 && F_BUS == 72000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(1, 1, 1, 5); // ok +# elif F_CPU == 120000000 && F_BUS == 60000000 + SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(KINETIS_CLKDIV1_OUTDIV1 - 1) | SIM_CLKDIV1_OUTDIV2(KINETIS_CLKDIV1_OUTDIV2 - 1) | +# if defined(MK66F18) + SIM_CLKDIV1_OUTDIV3(KINETIS_CLKDIV1_OUTDIV3 - 1) | +# endif + SIM_CLKDIV1_OUTDIV4(KINETIS_CLKDIV1_OUTDIV4 - 1); +# else + return 0; +# endif + // Then turn off HSRUN mode + SMC->PMCTRL = SMC_PMCTRL_RUNM_SET(0); + while (SMC->PMSTAT == SMC_PMSTAT_HSRUN) + ; // wait + return 1; + } +#endif + return 0; +} + +static inline int kinetis_hsrun_enable(void) { +#if defined(MK66F18) + if (SMC->PMSTAT == SMC_PMSTAT_RUN) { + // Turn HSRUN mode on + SMC->PMCTRL = SMC_PMCTRL_RUNM_SET(3); + while (SMC->PMSTAT != SMC_PMSTAT_HSRUN) { + ; + } // wait +// Then configure clock for full speed +# if F_CPU == 256000000 && F_BUS == 64000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 3, 0, 7); +# elif F_CPU == 256000000 && F_BUS == 128000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 7); +# elif F_CPU == 240000000 && F_BUS == 60000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 3, 0, 7); +# elif F_CPU == 240000000 && F_BUS == 80000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 7); +# elif F_CPU == 240000000 && F_BUS == 120000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 7); +# elif F_CPU == 216000000 && F_BUS == 54000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 3, 0, 7); +# elif F_CPU == 216000000 && F_BUS == 72000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 7); +# elif F_CPU == 216000000 && F_BUS == 108000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 7); +# elif F_CPU == 192000000 && F_BUS == 48000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 3, 0, 6); +# elif F_CPU == 192000000 && F_BUS == 64000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 6); +# elif F_CPU == 192000000 && F_BUS == 96000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 6); +# elif F_CPU == 180000000 && F_BUS == 60000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 6); +# elif F_CPU == 180000000 && F_BUS == 90000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 6); +# elif F_CPU == 168000000 && F_BUS == 56000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 5); +# elif F_CPU == 144000000 && F_BUS == 48000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 2, 0, 4); +# elif F_CPU == 144000000 && F_BUS == 72000000 + SIM_CLKDIV1 = SIM_CLKDIV1_OUTDIVS(0, 1, 0, 4); +# elif F_CPU == 120000000 && F_BUS == 60000000 + SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(KINETIS_CLKDIV1_OUTDIV1 - 1) | SIM_CLKDIV1_OUTDIV2(KINETIS_CLKDIV1_OUTDIV2 - 1) | +# if defined(MK66F18) + SIM_CLKDIV1_OUTDIV3(KINETIS_CLKDIV1_OUTDIV3 - 1) | +# endif + SIM_CLKDIV1_OUTDIV4(KINETIS_CLKDIV1_OUTDIV4 - 1); +# else + return 0; +# endif + return 1; + } +#endif + return 0; +} + +#if defined(K20x) || defined(MK66F18) /* chip selection */ +/* Teensy 3.0, 3.1, 3.2; mchck; infinity keyboard */ + +// The EEPROM is really RAM with a hardware-based backup system to +// flash memory. Selecting a smaller size EEPROM allows more wear +// leveling, for higher write endurance. If you edit this file, +// set this to the smallest size your application can use. Also, +// due to Freescale's implementation, writing 16 or 32 bit words +// (aligned to 2 or 4 byte boundaries) has twice the endurance +// compared to writing 8 bit bytes. +// +# ifndef EEPROM_SIZE +# define EEPROM_SIZE 32 +# endif + +/* + ^^^ Here be dragons: + NXP AppNote AN4282 section 3.1 states that partitioning must only be done once. + Once EEPROM partitioning is done, the size is locked to this initial configuration. + Attempts to modify the EEPROM_SIZE setting may brick your board. +*/ + +// Writing unaligned 16 or 32 bit data is handled automatically when +// this is defined, but at a cost of extra code size. Without this, +// any unaligned write will cause a hard fault exception! If you're +// absolutely sure all 16 and 32 bit writes will be aligned, you can +// remove the extra unnecessary code. +// +# define HANDLE_UNALIGNED_WRITES + +# if defined(K20x) +# define EEPROM_MAX 2048 +# define EEPARTITION 0x03 // all 32K dataflash for EEPROM, none for Data +# define EEESPLIT 0x30 // must be 0x30 on these chips +# elif defined(MK66F18) +# define EEPROM_MAX 4096 +# define EEPARTITION 0x05 // 128K dataflash for EEPROM, 128K for Data +# define EEESPLIT 0x10 // best endurance: 0x00 = first 12%, 0x10 = first 25%, 0x30 = all equal +# endif + +// Minimum EEPROM Endurance +// ------------------------ +# if (EEPROM_SIZE == 4096) +# define EEESIZE 0x02 +# elif (EEPROM_SIZE == 2048) // 35000 writes/byte or 70000 writes/word +# define EEESIZE 0x03 +# elif (EEPROM_SIZE == 1024) // 75000 writes/byte or 150000 writes/word +# define EEESIZE 0x04 +# elif (EEPROM_SIZE == 512) // 155000 writes/byte or 310000 writes/word +# define EEESIZE 0x05 +# elif (EEPROM_SIZE == 256) // 315000 writes/byte or 630000 writes/word +# define EEESIZE 0x06 +# elif (EEPROM_SIZE == 128) // 635000 writes/byte or 1270000 writes/word +# define EEESIZE 0x07 +# elif (EEPROM_SIZE == 64) // 1275000 writes/byte or 2550000 writes/word +# define EEESIZE 0x08 +# elif (EEPROM_SIZE == 32) // 2555000 writes/byte or 5110000 writes/word +# define EEESIZE 0x09 +# endif + +/** \brief eeprom initialization + * + * FIXME: needs doc + */ +void eeprom_initialize(void) { + uint32_t count = 0; + uint16_t do_flash_cmd[] = {0xf06f, 0x037f, 0x7003, 0x7803, 0xf013, 0x0f80, 0xd0fb, 0x4770}; + uint8_t status; + + if (FTFL->FCNFG & FTFL_FCNFG_RAMRDY) { + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + + // FlexRAM is configured as traditional RAM + // We need to reconfigure for EEPROM usage + kinetis_hsrun_disable(); + FTFL->FCCOB0 = 0x80; // PGMPART = Program Partition Command + FTFL->FCCOB3 = 0; + FTFL->FCCOB4 = EEESPLIT | EEESIZE; + FTFL->FCCOB5 = EEPARTITION; + __disable_irq(); + // do_flash_cmd() must execute from RAM. Luckily the C syntax is simple... + (*((void (*)(volatile uint8_t *))((uint32_t)do_flash_cmd | 1)))(&(FTFL->FSTAT)); + __enable_irq(); + kinetis_hsrun_enable(); + status = FTFL->FSTAT; + if (status & (FTFL_FSTAT_RDCOLERR | FTFL_FSTAT_ACCERR | FTFL_FSTAT_FPVIOL)) { + FTFL->FSTAT = (status & (FTFL_FSTAT_RDCOLERR | FTFL_FSTAT_ACCERR | FTFL_FSTAT_FPVIOL)); + return; // error + } + } + // wait for eeprom to become ready (is this really necessary?) + while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) { + if (++count > 200000) break; + } +} + +# define FlexRAM ((volatile uint8_t *)0x14000000) + +/** \brief eeprom read byte + * + * FIXME: needs doc + */ +uint8_t eeprom_read_byte(const uint8_t *addr) { + uint32_t offset = (uint32_t)addr; + if (offset >= EEPROM_SIZE) return 0; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + return FlexRAM[offset]; +} + +/** \brief eeprom read word + * + * FIXME: needs doc + */ +uint16_t eeprom_read_word(const uint16_t *addr) { + uint32_t offset = (uint32_t)addr; + if (offset >= EEPROM_SIZE - 1) return 0; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + return *(uint16_t *)(&FlexRAM[offset]); +} + +/** \brief eeprom read dword + * + * FIXME: needs doc + */ +uint32_t eeprom_read_dword(const uint32_t *addr) { + uint32_t offset = (uint32_t)addr; + if (offset >= EEPROM_SIZE - 3) return 0; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + return *(uint32_t *)(&FlexRAM[offset]); +} + +/** \brief eeprom read block + * + * FIXME: needs doc + */ +void eeprom_read_block(void *buf, const void *addr, uint32_t len) { + uint32_t offset = (uint32_t)addr; + uint8_t *dest = (uint8_t *)buf; + uint32_t end = offset + len; + + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + if (end > EEPROM_SIZE) end = EEPROM_SIZE; + while (offset < end) { + *dest++ = FlexRAM[offset++]; + } +} + +/** \brief eeprom is ready + * + * FIXME: needs doc + */ +int eeprom_is_ready(void) { return (FTFL->FCNFG & FTFL_FCNFG_EEERDY) ? 1 : 0; } + +/** \brief flexram wait + * + * FIXME: needs doc + */ +static void flexram_wait(void) { + while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) { + // TODO: timeout + } +} + +/** \brief eeprom_write_byte + * + * FIXME: needs doc + */ +void eeprom_write_byte(uint8_t *addr, uint8_t value) { + uint32_t offset = (uint32_t)addr; + + if (offset >= EEPROM_SIZE) return; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + if (FlexRAM[offset] != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset] = value; + flexram_wait(); + kinetis_hsrun_enable(); + } +} + +/** \brief eeprom write word + * + * FIXME: needs doc + */ +void eeprom_write_word(uint16_t *addr, uint16_t value) { + uint32_t offset = (uint32_t)addr; + + if (offset >= EEPROM_SIZE - 1) return; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); +# ifdef HANDLE_UNALIGNED_WRITES + if ((offset & 1) == 0) { +# endif + if (*(uint16_t *)(&FlexRAM[offset]) != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint16_t *)(&FlexRAM[offset]) = value; + flexram_wait(); + kinetis_hsrun_enable(); + } +# ifdef HANDLE_UNALIGNED_WRITES + } else { + if (FlexRAM[offset] != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset] = value; + flexram_wait(); + kinetis_hsrun_enable(); + } + if (FlexRAM[offset + 1] != (value >> 8)) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset + 1] = value >> 8; + flexram_wait(); + kinetis_hsrun_enable(); + } + } +# endif +} + +/** \brief eeprom write dword + * + * FIXME: needs doc + */ +void eeprom_write_dword(uint32_t *addr, uint32_t value) { + uint32_t offset = (uint32_t)addr; + + if (offset >= EEPROM_SIZE - 3) return; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); +# ifdef HANDLE_UNALIGNED_WRITES + switch (offset & 3) { + case 0: +# endif + if (*(uint32_t *)(&FlexRAM[offset]) != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint32_t *)(&FlexRAM[offset]) = value; + flexram_wait(); + kinetis_hsrun_enable(); + } + return; +# ifdef HANDLE_UNALIGNED_WRITES + case 2: + if (*(uint16_t *)(&FlexRAM[offset]) != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint16_t *)(&FlexRAM[offset]) = value; + flexram_wait(); + kinetis_hsrun_enable(); + } + if (*(uint16_t *)(&FlexRAM[offset + 2]) != (value >> 16)) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint16_t *)(&FlexRAM[offset + 2]) = value >> 16; + flexram_wait(); + kinetis_hsrun_enable(); + } + return; + default: + if (FlexRAM[offset] != value) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset] = value; + flexram_wait(); + kinetis_hsrun_enable(); + } + if (*(uint16_t *)(&FlexRAM[offset + 1]) != (value >> 8)) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint16_t *)(&FlexRAM[offset + 1]) = value >> 8; + flexram_wait(); + kinetis_hsrun_enable(); + } + if (FlexRAM[offset + 3] != (value >> 24)) { + kinetis_hsrun_disable(); + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset + 3] = value >> 24; + flexram_wait(); + kinetis_hsrun_enable(); + } + } +# endif +} + +/** \brief eeprom write block + * + * FIXME: needs doc + */ +void eeprom_write_block(const void *buf, void *addr, uint32_t len) { + uint32_t offset = (uint32_t)addr; + const uint8_t *src = (const uint8_t *)buf; + + if (offset >= EEPROM_SIZE) return; + if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); + if (len >= EEPROM_SIZE) len = EEPROM_SIZE; + if (offset + len >= EEPROM_SIZE) len = EEPROM_SIZE - offset; + kinetis_hsrun_disable(); + while (len > 0) { + uint32_t lsb = offset & 3; + if (lsb == 0 && len >= 4) { + // write aligned 32 bits + uint32_t val32; + val32 = *src++; + val32 |= (*src++ << 8); + val32 |= (*src++ << 16); + val32 |= (*src++ << 24); + if (*(uint32_t *)(&FlexRAM[offset]) != val32) { + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint32_t *)(&FlexRAM[offset]) = val32; + flexram_wait(); + } + offset += 4; + len -= 4; + } else if ((lsb == 0 || lsb == 2) && len >= 2) { + // write aligned 16 bits + uint16_t val16; + val16 = *src++; + val16 |= (*src++ << 8); + if (*(uint16_t *)(&FlexRAM[offset]) != val16) { + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + *(uint16_t *)(&FlexRAM[offset]) = val16; + flexram_wait(); + } + offset += 2; + len -= 2; + } else { + // write 8 bits + uint8_t val8 = *src++; + if (FlexRAM[offset] != val8) { + uint8_t stat = FTFL->FSTAT & 0x70; + if (stat) FTFL->FSTAT = stat; + FlexRAM[offset] = val8; + flexram_wait(); + } + offset++; + len--; + } + } + kinetis_hsrun_enable(); +} + +/* +void do_flash_cmd(volatile uint8_t *fstat) +{ + *fstat = 0x80; + while ((*fstat & 0x80) == 0) ; // wait +} +00000000 <do_flash_cmd>: + 0: f06f 037f mvn.w r3, #127 ; 0x7f + 4: 7003 strb r3, [r0, #0] + 6: 7803 ldrb r3, [r0, #0] + 8: f013 0f80 tst.w r3, #128 ; 0x80 + c: d0fb beq.n 6 <do_flash_cmd+0x6> + e: 4770 bx lr +*/ + +#elif defined(KL2x) /* chip selection */ +/* Teensy LC (emulated) */ + +# define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) + +extern uint32_t __eeprom_workarea_start__; +extern uint32_t __eeprom_workarea_end__; + +# define EEPROM_SIZE 128 + +static uint32_t flashend = 0; + +void eeprom_initialize(void) { + const uint16_t *p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); + + do { + if (*p++ == 0xFFFF) { + flashend = (uint32_t)(p - 2); + return; + } + } while (p < (uint16_t *)SYMVAL(__eeprom_workarea_end__)); + flashend = (uint32_t)(p - 1); +} + +uint8_t eeprom_read_byte(const uint8_t *addr) { + uint32_t offset = (uint32_t)addr; + const uint16_t *p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); + const uint16_t *end = (const uint16_t *)((uint32_t)flashend); + uint16_t val; + uint8_t data = 0xFF; + + if (!end) { + eeprom_initialize(); + end = (const uint16_t *)((uint32_t)flashend); + } + if (offset < EEPROM_SIZE) { + while (p <= end) { + val = *p++; + if ((val & 255) == offset) data = val >> 8; + } + } + return data; +} + +static void flash_write(const uint16_t *code, uint32_t addr, uint32_t data) { + // with great power comes great responsibility.... + uint32_t stat; + *(uint32_t *)&(FTFA->FCCOB3) = 0x06000000 | (addr & 0x00FFFFFC); + *(uint32_t *)&(FTFA->FCCOB7) = data; + __disable_irq(); + (*((void (*)(volatile uint8_t *))((uint32_t)code | 1)))(&(FTFA->FSTAT)); + __enable_irq(); + stat = FTFA->FSTAT & (FTFA_FSTAT_RDCOLERR | FTFA_FSTAT_ACCERR | FTFA_FSTAT_FPVIOL); + if (stat) { + FTFA->FSTAT = stat; + } + MCM->PLACR |= MCM_PLACR_CFCC; +} + +void eeprom_write_byte(uint8_t *addr, uint8_t data) { + uint32_t offset = (uint32_t)addr; + const uint16_t *p, *end = (const uint16_t *)((uint32_t)flashend); + uint32_t i, val, flashaddr; + uint16_t do_flash_cmd[] = {0x2380, 0x7003, 0x7803, 0xb25b, 0x2b00, 0xdafb, 0x4770}; + uint8_t buf[EEPROM_SIZE]; + + if (offset >= EEPROM_SIZE) return; + if (!end) { + eeprom_initialize(); + end = (const uint16_t *)((uint32_t)flashend); + } + if (++end < (uint16_t *)SYMVAL(__eeprom_workarea_end__)) { + val = (data << 8) | offset; + flashaddr = (uint32_t)end; + flashend = flashaddr; + if ((flashaddr & 2) == 0) { + val |= 0xFFFF0000; + } else { + val <<= 16; + val |= 0x0000FFFF; + } + flash_write(do_flash_cmd, flashaddr, val); + } else { + for (i = 0; i < EEPROM_SIZE; i++) { + buf[i] = 0xFF; + } + val = 0; + for (p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); p < (uint16_t *)SYMVAL(__eeprom_workarea_end__); p++) { + val = *p; + if ((val & 255) < EEPROM_SIZE) { + buf[val & 255] = val >> 8; + } + } + buf[offset] = data; + for (flashaddr = (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_start__); flashaddr < (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_end__); flashaddr += 1024) { + *(uint32_t *)&(FTFA->FCCOB3) = 0x09000000 | flashaddr; + __disable_irq(); + (*((void (*)(volatile uint8_t *))((uint32_t)do_flash_cmd | 1)))(&(FTFA->FSTAT)); + __enable_irq(); + val = FTFA->FSTAT & (FTFA_FSTAT_RDCOLERR | FTFA_FSTAT_ACCERR | FTFA_FSTAT_FPVIOL); + ; + if (val) FTFA->FSTAT = val; + MCM->PLACR |= MCM_PLACR_CFCC; + } + flashaddr = (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_start__); + for (i = 0; i < EEPROM_SIZE; i++) { + if (buf[i] == 0xFF) continue; + if ((flashaddr & 2) == 0) { + val = (buf[i] << 8) | i; + } else { + val = val | (buf[i] << 24) | (i << 16); + flash_write(do_flash_cmd, flashaddr, val); + } + flashaddr += 2; + } + flashend = flashaddr; + if ((flashaddr & 2)) { + val |= 0xFFFF0000; + flash_write(do_flash_cmd, flashaddr, val); + } + } +} + +/* +void do_flash_cmd(volatile uint8_t *fstat) +{ + *fstat = 0x80; + while ((*fstat & 0x80) == 0) ; // wait +} +00000000 <do_flash_cmd>: + 0: 2380 movs r3, #128 ; 0x80 + 2: 7003 strb r3, [r0, #0] + 4: 7803 ldrb r3, [r0, #0] + 6: b25b sxtb r3, r3 + 8: 2b00 cmp r3, #0 + a: dafb bge.n 4 <do_flash_cmd+0x4> + c: 4770 bx lr +*/ + +uint16_t eeprom_read_word(const uint16_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); +} + +uint32_t eeprom_read_dword(const uint32_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); +} + +void eeprom_read_block(void *buf, const void *addr, uint32_t len) { + const uint8_t *p = (const uint8_t *)addr; + uint8_t * dest = (uint8_t *)buf; + while (len--) { + *dest++ = eeprom_read_byte(p++); + } +} + +int eeprom_is_ready(void) { return 1; } + +void eeprom_write_word(uint16_t *addr, uint16_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p, value >> 8); +} + +void eeprom_write_dword(uint32_t *addr, uint32_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p++, value >> 8); + eeprom_write_byte(p++, value >> 16); + eeprom_write_byte(p, value >> 24); +} + +void eeprom_write_block(const void *buf, void *addr, uint32_t len) { + uint8_t * p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} + +#else +// No EEPROM supported, so emulate it + +# ifndef EEPROM_SIZE +# include "eeconfig.h" +# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO +# endif +__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; + +uint8_t eeprom_read_byte(const uint8_t *addr) { + uint32_t offset = (uint32_t)addr; + return buffer[offset]; +} + +void eeprom_write_byte(uint8_t *addr, uint8_t value) { + uint32_t offset = (uint32_t)addr; + buffer[offset] = value; +} + +uint16_t eeprom_read_word(const uint16_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); +} + +uint32_t eeprom_read_dword(const uint32_t *addr) { + const uint8_t *p = (const uint8_t *)addr; + return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); +} + +void eeprom_read_block(void *buf, const void *addr, size_t len) { + const uint8_t *p = (const uint8_t *)addr; + uint8_t * dest = (uint8_t *)buf; + while (len--) { + *dest++ = eeprom_read_byte(p++); + } +} + +void eeprom_write_word(uint16_t *addr, uint16_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p, value >> 8); +} + +void eeprom_write_dword(uint32_t *addr, uint32_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p++, value >> 8); + eeprom_write_byte(p++, value >> 16); + eeprom_write_byte(p, value >> 24); +} + +void eeprom_write_block(const void *buf, void *addr, size_t len) { + uint8_t * p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} + +#endif /* chip selection */ +// The update functions just calls write for now, but could probably be optimized + +void eeprom_update_byte(uint8_t *addr, uint8_t value) { eeprom_write_byte(addr, value); } + +void eeprom_update_word(uint16_t *addr, uint16_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p, value >> 8); +} + +void eeprom_update_dword(uint32_t *addr, uint32_t value) { + uint8_t *p = (uint8_t *)addr; + eeprom_write_byte(p++, value); + eeprom_write_byte(p++, value >> 8); + eeprom_write_byte(p++, value >> 16); + eeprom_write_byte(p, value >> 24); +} + +void eeprom_update_block(const void *buf, void *addr, size_t len) { + uint8_t * p = (uint8_t *)addr; + const uint8_t *src = (const uint8_t *)buf; + while (len--) { + eeprom_write_byte(p++, *src++); + } +} diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk index c0b32c2f2b1..6ee53172d26 100644 --- a/platforms/chibios/flash.mk +++ b/platforms/chibios/flash.mk @@ -23,6 +23,20 @@ define EXEC_DFU_UTIL $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin endef + +define EXEC_WB32_DFU_UPDATER + if ! wb32-dfu-updater_cli -l | grep -q "Found DFU"; then \ + printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + while ! wb32-dfu-updater_cli -l | grep -q "Found DFU"; do \ + printf "." ;\ + sleep $(BOOTLOADER_RETRY_TIME) ;\ + done ;\ + printf "\n" ;\ + fi + wb32-dfu-updater_cli -D $(BUILD_DIR)/$(TARGET).bin +endef + dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter $(call EXEC_DFU_UTIL) @@ -82,6 +96,10 @@ else ifeq ($(strip $(MCU_FAMILY)),MIMXRT1062) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY) else ifeq ($(strip $(MCU_FAMILY)),STM32) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU_UTIL) +else ifeq ($(strip $(MCU_FAMILY)),WB32) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_WB32_DFU_UPDATER) +else ifeq ($(strip $(MCU_FAMILY)),GD32V) + $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU_UTIL) else $(PRINT_OK); $(SILENT) || printf "$(MSG_FLASH_BOOTLOADER)" endif diff --git a/platforms/chibios/flash_stm32.c b/platforms/chibios/flash_stm32.c new file mode 100644 index 00000000000..72c41b8b784 --- /dev/null +++ b/platforms/chibios/flash_stm32.c @@ -0,0 +1,208 @@ +/* + * This software is experimental and a work in progress. + * Under no circumstances should these files be used in relation to any critical system(s). + * Use of these files is at your own risk. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, + * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and + * https://github.com/leaflabs/libmaple + * + * Modifications for QMK and STM32F303 by Yiancar + */ + +#include <hal.h> +#include "flash_stm32.h" + +#if defined(STM32F1XX) +# define FLASH_SR_WRPERR FLASH_SR_WRPRTERR +#endif + +#if defined(MCU_GD32V) +/* GigaDevice GD32VF103 is a STM32F103 clone at heart. */ +# include "gd32v_compatibility.h" +#endif + +#if defined(STM32F4XX) +# define FLASH_SR_PGERR (FLASH_SR_PGSERR | FLASH_SR_PGPERR | FLASH_SR_PGAERR) + +# define FLASH_KEY1 0x45670123U +# define FLASH_KEY2 0xCDEF89ABU + +static uint8_t ADDR2PAGE(uint32_t Page_Address) { + switch (Page_Address) { + case 0x08000000 ... 0x08003FFF: + return 0; + case 0x08004000 ... 0x08007FFF: + return 1; + case 0x08008000 ... 0x0800BFFF: + return 2; + case 0x0800C000 ... 0x0800FFFF: + return 3; + } + + // TODO: bad times... + return 7; +} +#endif + +/* Delay definition */ +#define EraseTimeout ((uint32_t)0x00000FFF) +#define ProgramTimeout ((uint32_t)0x0000001F) + +#define ASSERT(exp) (void)((0)) + +/** + * @brief Inserts a time delay. + * @param None + * @retval None + */ +static void delay(void) { + __IO uint32_t i = 0; + for (i = 0xFF; i != 0; i--) { + } +} + +/** + * @brief Returns the FLASH Status. + * @param None + * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PG, + * FLASH_ERROR_WRP or FLASH_COMPLETE + */ +FLASH_Status FLASH_GetStatus(void) { + if ((FLASH->SR & FLASH_SR_BSY) == FLASH_SR_BSY) return FLASH_BUSY; + + if ((FLASH->SR & FLASH_SR_PGERR) != 0) return FLASH_ERROR_PG; + + if ((FLASH->SR & FLASH_SR_WRPERR) != 0) return FLASH_ERROR_WRP; + +#if defined(FLASH_OBR_OPTERR) + if ((FLASH->SR & FLASH_OBR_OPTERR) != 0) return FLASH_ERROR_OPT; +#endif + + return FLASH_COMPLETE; +} + +/** + * @brief Waits for a Flash operation to complete or a TIMEOUT to occur. + * @param Timeout: FLASH progamming Timeout + * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG, + * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. + */ +FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout) { + FLASH_Status status; + + /* Check for the Flash Status */ + status = FLASH_GetStatus(); + /* Wait for a Flash operation to complete or a TIMEOUT to occur */ + while ((status == FLASH_BUSY) && (Timeout != 0x00)) { + delay(); + status = FLASH_GetStatus(); + Timeout--; + } + if (Timeout == 0) status = FLASH_TIMEOUT; + /* Return the operation status */ + return status; +} + +/** + * @brief Erases a specified FLASH page. + * @param Page_Address: The page address to be erased. + * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PG, + * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. + */ +FLASH_Status FLASH_ErasePage(uint32_t Page_Address) { + FLASH_Status status = FLASH_COMPLETE; + /* Check the parameters */ + ASSERT(IS_FLASH_ADDRESS(Page_Address)); + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(EraseTimeout); + + if (status == FLASH_COMPLETE) { + /* if the previous operation is completed, proceed to erase the page */ +#if defined(FLASH_CR_SNB) + FLASH->CR &= ~FLASH_CR_SNB; + FLASH->CR |= FLASH_CR_SER | (ADDR2PAGE(Page_Address) << FLASH_CR_SNB_Pos); +#else + FLASH->CR |= FLASH_CR_PER; + FLASH->AR = Page_Address; +#endif + FLASH->CR |= FLASH_CR_STRT; + + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(EraseTimeout); + if (status != FLASH_TIMEOUT) { + /* if the erase operation is completed, disable the configured Bits */ +#if defined(FLASH_CR_SNB) + FLASH->CR &= ~(FLASH_CR_SER | FLASH_CR_SNB); +#else + FLASH->CR &= ~FLASH_CR_PER; +#endif + } + FLASH->SR = (FLASH_SR_EOP | FLASH_SR_PGERR | FLASH_SR_WRPERR); + } + /* Return the Erase Status */ + return status; +} + +/** + * @brief Programs a half word at a specified address. + * @param Address: specifies the address to be programmed. + * @param Data: specifies the data to be programmed. + * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG, + * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. + */ +FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { + FLASH_Status status = FLASH_BAD_ADDRESS; + + if (IS_FLASH_ADDRESS(Address)) { + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(ProgramTimeout); + if (status == FLASH_COMPLETE) { + /* if the previous operation is completed, proceed to program the new data */ + +#if defined(FLASH_CR_PSIZE) + FLASH->CR &= ~FLASH_CR_PSIZE; + FLASH->CR |= FLASH_CR_PSIZE_0; +#endif + FLASH->CR |= FLASH_CR_PG; + *(__IO uint16_t*)Address = Data; + /* Wait for last operation to be completed */ + status = FLASH_WaitForLastOperation(ProgramTimeout); + if (status != FLASH_TIMEOUT) { + /* if the program operation is completed, disable the PG Bit */ + FLASH->CR &= ~FLASH_CR_PG; + } + FLASH->SR = (FLASH_SR_EOP | FLASH_SR_PGERR | FLASH_SR_WRPERR); + } + } + return status; +} + +/** + * @brief Unlocks the FLASH Program Erase Controller. + * @param None + * @retval None + */ +void FLASH_Unlock(void) { + if (FLASH->CR & FLASH_CR_LOCK) { + /* Authorize the FPEC Access */ + FLASH->KEYR = FLASH_KEY1; + FLASH->KEYR = FLASH_KEY2; + } +} + +/** + * @brief Locks the FLASH Program Erase Controller. + * @param None + * @retval None + */ +void FLASH_Lock(void) { + /* Set the Lock Bit to lock the FPEC and the FCR */ + FLASH->CR |= FLASH_CR_LOCK; +} diff --git a/tmk_core/common/chibios/flash_stm32.h b/platforms/chibios/flash_stm32.h similarity index 100% rename from tmk_core/common/chibios/flash_stm32.h rename to platforms/chibios/flash_stm32.h diff --git a/platforms/chibios/gd32v_compatibility.h b/platforms/chibios/gd32v_compatibility.h new file mode 100644 index 00000000000..f4dcfd8c55e --- /dev/null +++ b/platforms/chibios/gd32v_compatibility.h @@ -0,0 +1,120 @@ +/* Copyright 2021 QMK + * + * 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/>. + */ + +#pragma once + +/* GD32VF103 has the same API as STM32F103, but uses different names for literally the same thing. + * As of 23.7.2021 QMK is tailored to use STM32 defines/names, for compatibility sake + * we just redefine the GD32 names. */ + +/* Close your eyes kids. */ +#define MCU_STM32 + +/* AFIO redefines */ +#define MAPR PCF0 +#define AFIO_MAPR_USART1_REMAP AFIO_PCF0_USART0_REMAP +#define AFIO_MAPR_USART2_REMAP AFIO_PCF0_USART1_REMAP +#define AFIO_MAPR_USART3_REMAP_PARTIALREMAP AFIO_PCF0_USART2_REMAP_PARTIALREMAP +#define AFIO_MAPR_USART3_REMAP_FULLREMAP AFIO_PCF0_USART2_REMAP_FULLREMAP + +/* DMA redefines. */ +#define STM32_DMA_STREAM(stream) GD32_DMA_STREAM(stream) +#define STM32_DMA_STREAM_ID(peripheral, channel) GD32_DMA_STREAM_ID(peripheral - 1, channel - 1) +#define STM32_DMA_CR_DIR_M2P GD32_DMA_CTL_DIR_M2P +#define STM32_DMA_CR_PSIZE_WORD GD32_DMA_CTL_PWIDTH_WORD +#define STM32_DMA_CR_MSIZE_WORD GD32_DMA_CTL_MWIDTH_WORD +#define STM32_DMA_CR_MINC GD32_DMA_CTL_MNAGA +#define STM32_DMA_CR_CIRC GD32_DMA_CTL_CMEN +#define STM32_DMA_CR_PL GD32_DMA_CTL_PRIO +#define STM32_DMA_CR_CHSEL GD32_DMA_CTL_CHSEL +#define cr1 ctl0 +#define cr2 ctl1 +#define cr3 ctl2 +#define dier dmainten + +/* ADC redefines */ +#if HAL_USE_ADC +# define STM32_ADC_USE_ADC1 GD32_ADC_USE_ADC0 + +# define smpr1 sampt0 +# define smpr2 sampt1 +# define sqr1 rsq0 +# define sqr2 rsq1 +# define sqr3 rsq2 + +# define ADC_SMPR2_SMP_AN0 ADC_SAMPT1_SMP_SPT0 +# define ADC_SMPR2_SMP_AN1 ADC_SAMPT1_SMP_SPT1 +# define ADC_SMPR2_SMP_AN2 ADC_SAMPT1_SMP_SPT2 +# define ADC_SMPR2_SMP_AN3 ADC_SAMPT1_SMP_SPT3 +# define ADC_SMPR2_SMP_AN4 ADC_SAMPT1_SMP_SPT4 +# define ADC_SMPR2_SMP_AN5 ADC_SAMPT1_SMP_SPT5 +# define ADC_SMPR2_SMP_AN6 ADC_SAMPT1_SMP_SPT6 +# define ADC_SMPR2_SMP_AN7 ADC_SAMPT1_SMP_SPT7 +# define ADC_SMPR2_SMP_AN8 ADC_SAMPT1_SMP_SPT8 +# define ADC_SMPR2_SMP_AN9 ADC_SAMPT1_SMP_SPT9 + +# define ADC_SMPR1_SMP_AN10 ADC_SAMPT0_SMP_SPT10 +# define ADC_SMPR1_SMP_AN11 ADC_SAMPT0_SMP_SPT11 +# define ADC_SMPR1_SMP_AN12 ADC_SAMPT0_SMP_SPT12 +# define ADC_SMPR1_SMP_AN13 ADC_SAMPT0_SMP_SPT13 +# define ADC_SMPR1_SMP_AN14 ADC_SAMPT0_SMP_SPT14 +# define ADC_SMPR1_SMP_AN15 ADC_SAMPT0_SMP_SPT15 + +# define ADC_SQR3_SQ1_N ADC_RSQ2_RSQ1_N +#endif + +/* FLASH redefines */ +#if defined(EEPROM_ENABLE) +# define SR STAT +# define FLASH_SR_BSY FLASH_STAT_BUSY +# define FLASH_SR_PGERR FLASH_STAT_PGERR +# define FLASH_SR_EOP FLASH_STAT_ENDF +# define FLASH_SR_WRPRTERR FLASH_STAT_WPERR +# define FLASH_SR_WRPERR FLASH_SR_WRPRTERR +# define FLASH_OBR_OPTERR FLASH_OBSTAT_OBERR +# define AR ADDR +# define CR CTL +# define FLASH_CR_PER FLASH_CTL_PER +# define FLASH_CR_STRT FLASH_CTL_START +# define FLASH_CR_LOCK FLASH_CTL_LK +# define FLASH_CR_PG FLASH_CTL_PG +# define KEYR KEY +#endif + +/* Serial USART redefines. */ +#if HAL_USE_SERIAL +# if !defined(SERIAL_USART_CR1) +# define SERIAL_USART_CR1 (USART_CTL0_PCEN | USART_CTL0_PM | USART_CTL0_WL) // parity enable, odd parity, 9 bit length +# endif +# if !defined(SERIAL_USART_CR2) +# define SERIAL_USART_CR2 (USART_CTL1_STB_1) // 2 stop bits +# endif +# if !defined(SERIAL_USART_CR3) +# define SERIAL_USART_CR3 0x0 +# endif +# define USART_CR3_HDSEL USART_CTL2_HDEN +# define CCR CHCV +#endif + +/* SPI redefines. */ +#if HAL_USE_SPI +# define SPI_CR1_LSBFIRST SPI_CTL0_LF +# define SPI_CR1_CPHA SPI_CTL0_CKPH +# define SPI_CR1_CPOL SPI_CTL0_CKPL +# define SPI_CR1_BR_0 SPI_CTL0_PSC_0 +# define SPI_CR1_BR_1 SPI_CTL0_PSC_1 +# define SPI_CR1_BR_2 SPI_CTL0_PSC_2 +#endif diff --git a/tmk_core/common/chibios/gpio.h b/platforms/chibios/gpio.h similarity index 100% rename from tmk_core/common/chibios/gpio.h rename to platforms/chibios/gpio.h diff --git a/tmk_core/common/chibios/pin_defs.h b/platforms/chibios/pin_defs.h similarity index 100% rename from tmk_core/common/chibios/pin_defs.h rename to platforms/chibios/pin_defs.h diff --git a/tmk_core/common/chibios/platform.c b/platforms/chibios/platform.c similarity index 100% rename from tmk_core/common/chibios/platform.c rename to platforms/chibios/platform.c diff --git a/platforms/chibios/platform.mk b/platforms/chibios/platform.mk new file mode 100644 index 00000000000..45e33778822 --- /dev/null +++ b/platforms/chibios/platform.mk @@ -0,0 +1,443 @@ +# Hey Emacs, this is a -*- makefile -*- +############################################################################## +# Architecture or project specific options +# + +# Stack size to be allocated to the Cortex-M process stack. This stack is +# the stack used by the main() thread. +ifeq ($(USE_PROCESS_STACKSIZE),) + USE_PROCESS_STACKSIZE = 0x800 +endif + +# Stack size to the allocated to the Cortex-M main/exceptions stack. This +# stack is used for processing interrupts and exceptions. +ifeq ($(USE_EXCEPTIONS_STACKSIZE),) + USE_EXCEPTIONS_STACKSIZE = 0x400 +endif + +# +# Architecture or project specific options +############################################################################## + +############################################################################## +# Project, sources and paths +# + +# Imported source files and paths +OPT_OS = chibios +CHIBIOS = $(TOP_DIR)/lib/chibios +CHIBIOS_CONTRIB = $(TOP_DIR)/lib/chibios-contrib + +# +# Startup, Port and Platform support selection +############################################################################## + +ifeq ($(strip $(MCU)), risc-v) + # RISC-V Support + # As of 7.4.2021 there is only one supported RISC-V platform in Chibios-Contrib, + # therefore all required settings are hard-coded + STARTUP_MK = $(CHIBIOS_CONTRIB)/os/common/startup/RISCV-ECLIC/compilers/GCC/mk/startup_$(MCU_STARTUP).mk + PORT_V = $(CHIBIOS_CONTRIB)/os/common/ports/RISCV-ECLIC/compilers/GCC/mk/port.mk + RULESPATH = $(CHIBIOS_CONTRIB)/os/common/startup/RISCV-ECLIC/compilers/GCC + PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/GD/GD32VF103/platform.mk +else + # ARM Support + CHIBIOS_PORT ?= + ifeq ("$(CHIBIOS_PORT)","") + CHIBIOS_PORT = ARMv$(ARMV)-M + endif + + # Startup files. Try a few different locations, for compability with old versions and + # for things hardware in the contrib repository + STARTUP_MK = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk + ifeq ("$(wildcard $(STARTUP_MK))","") + STARTUP_MK = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk + ifeq ("$(wildcard $(STARTUP_MK))","") + STARTUP_MK = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk + endif + endif + + # Port files. Try a few different locations, for compability with old versions and + # for things hardware in the contrib repository + PORT_V = $(CHIBIOS)/os/common/ports/$(CHIBIOS_PORT)/compilers/GCC/mk/port.mk + ifeq ("$(wildcard $(PORT_V))","") + PORT_V = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v$(ARMV)m.mk + ifeq ("$(wildcard $(PORT_V))","") + PORT_V = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v$(ARMV)m.mk + endif + endif + + # Rules location. Try a few different locations, for compability with old versions and + # for things hardware in the contrib repository + RULESPATH = $(CHIBIOS)/os/common/ports/$(CHIBIOS_PORT)/compilers/GCC + ifeq ("$(wildcard $(RULESPATH)/rules.mk)","") + RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC + ifeq ("$(wildcard $(RULESPATH)/rules.mk)","") + RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC + endif + endif +endif + +ifeq ("$(PLATFORM_NAME)","") + PLATFORM_NAME = platform +endif + +ifeq ("$(wildcard $(PLATFORM_MK))","") + PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk + ifeq ("$(wildcard $(PLATFORM_MK))","") + PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk + endif +endif + +include $(STARTUP_MK) +include $(PORT_V) +include $(PLATFORM_MK) + +# +# Board support selection. +############################################################################## + +BOARD_MK := + +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_5) + BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_4) + BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_3) + BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_2) + BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") + BOARD_PATH = $(KEYBOARD_PATH_1) + BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk)","") + BOARD_PATH = $(TOP_DIR)/platforms/chibios/boards/$(BOARD) + BOARD_MK += $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk + KEYBOARD_PATHS += $(BOARD_PATH)/configs + ifneq ("$(wildcard $(BOARD_PATH)/rules.mk)","") + include $(BOARD_PATH)/rules.mk + endif +endif + +ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk + ifeq ("$(wildcard $(BOARD_MK))","") + BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk + endif +endif + +include $(BOARD_MK) + +# +# Bootloader selection. +############################################################################## + +# Set bootloader address if supplied. +ifdef STM32_BOOTLOADER_ADDRESS + OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) +endif + +ifdef WB32_BOOTLOADER_ADDRESS + OPT_DEFS += -DWB32_BOOTLOADER_ADDRESS=$(WB32_BOOTLOADER_ADDRESS) +endif + +# Work out if we need to set up the include for the bootloader definitions +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","") + OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h +else ifneq ("$(wildcard $(BOARD_PATH)/configs/bootloader_defs.h)","") + OPT_DEFS += -include $(BOARD_PATH)/configs/bootloader_defs.h +endif + +# +# ChibiOS config selection. +############################################################################## + +# Work out the config file directories +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/chconf.h)","") + CHCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/boards/chibios/common/configs/chconf.h)","") + CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs +endif + +# +# HAL config selection. +############################################################################## + +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_5) +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_4) +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_3) +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_2) +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf.h)","") + HALCONFDIR = $(KEYBOARD_PATH_1) +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/configs/halconf.h)","") + HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs +endif + +# +# Linker script selection. +############################################################################## + +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(KEYBOARD_PATH_5)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(KEYBOARD_PATH_4)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(KEYBOARD_PATH_3)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld)","") + LDFLAGS += -L$(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld + LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld +else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") + LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld + USE_CHIBIOS_CONTRIB = yes +else + LDSCRIPT = $(STARTUPLD)/$(MCU_LDSCRIPT).ld +endif + +# +# Include ChibiOS makefiles. +############################################################################## + +# HAL-OSAL files (optional). +include $(CHIBIOS)/os/hal/hal.mk +-include $(CHIBIOS)/os/hal/osal/rt/osal.mk # ChibiOS <= 19.x +-include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # ChibiOS >= 20.x +# RTOS files (optional). +include $(CHIBIOS)/os/rt/rt.mk +# Other files (optional). +include $(CHIBIOS)/os/hal/lib/streams/streams.mk + +PLATFORM_SRC = \ + $(STARTUPSRC) \ + $(KERNSRC) \ + $(PORTSRC) \ + $(OSALSRC) \ + $(HALSRC) \ + $(PLATFORMSRC) \ + $(BOARDSRC) \ + $(STREAMSSRC) \ + $(CHIBIOS)/os/various/syscalls.c \ + $(PLATFORM_COMMON_DIR)/syscall-fallbacks.c \ + $(PLATFORM_COMMON_DIR)/wait.c + +# Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise. +QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) $(PLATFORMASM) + +PLATFORM_SRC := $(patsubst $(TOP_DIR)/%,%,$(PLATFORM_SRC)) + +EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ + $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs \ + $(TOP_DIR)/platforms/chibios/boards/common/configs \ + $(HALCONFDIR) $(CHCONFDIR) \ + $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ + $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ + $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) + +# +# ChibiOS-Contrib +############################################################################## + +# Work out if we're using ChibiOS-Contrib by checking if halconf_community.h exists +ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf_community.h)","") + USE_CHIBIOS_CONTRIB = yes +endif + +ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes) + include $(CHIBIOS_CONTRIB)/os/hal/hal.mk + PLATFORM_SRC += $(PLATFORMSRC_CONTRIB) $(HALSRC_CONTRIB) + EXTRAINCDIRS += $(PLATFORMINC_CONTRIB) $(HALINC_CONTRIB) $(CHIBIOS_CONTRIB)/os/various +endif + +# +# Project, sources and paths +############################################################################## + +############################################################################## +# Injected configs +# +ifneq ("$(wildcard $(BOARD_PATH)/configs/config.h)","") + CONFIG_H += $(BOARD_PATH)/configs/config.h +endif +ifneq ("$(wildcard $(BOARD_PATH)/configs/post_config.h)","") + POST_CONFIG_H += $(BOARD_PATH)/configs/post_config.h +endif + +############################################################################## +# Compiler and Linker configuration +# + +# Use defined stack sizes of the main thread in linker scripts +SHARED_LDSYMBOLS = -Wl,--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE),--defsym=__main_stack_size__=$(USE_EXCEPTIONS_STACKSIZE) + +# Shared Compiler flags for all toolchains +SHARED_CFLAGS = -fomit-frame-pointer \ + -ffunction-sections \ + -fdata-sections \ + -fno-common \ + -fshort-wchar + +# Shared Linker flags for all toolchains +SHARED_LDFLAGS = -T $(LDSCRIPT) \ + -Wl,--gc-sections \ + -nostartfiles + +ifeq ($(strip $(MCU)), risc-v) + # RISC-V toolchain specific configuration + # Find suitable GCC compiler + ifeq ($(strip $(TOOLCHAIN)),) + ifneq ($(shell which riscv32-unknown-elf-gcc 2>/dev/null),) + TOOLCHAIN = riscv32-unknown-elf- + else + ifneq ($(shell which riscv64-unknown-elf-gcc 2>/dev/null),) + TOOLCHAIN = riscv64-unknown-elf- + else + $(error "No RISC-V toolchain found. Can't find riscv32-unknown-elf-gcc or riscv64-unknown-elf-gcc found in your systems PATH variable. Please install a valid toolchain and make it accessible!") + endif + endif + endif + + # Default to compiling with picolibc for RISC-V targets if available, which + # is available by default on distributions based on Debian 11+. + ifeq ($(shell $(TOOLCHAIN)gcc --specs=picolibc.specs -E - 2>/dev/null >/dev/null </dev/null ; echo $$?),0) + # Toolchain specific Compiler flags Note that we still link with our own + # linker script by providing it via the -T flag in SHARED_LDFLAGS. + TOOLCHAIN_CFLAGS = --specs=picolibc.specs + + # picolibc internally uses __heap_start and __heap_end instead of the + # defacto chibios linker script standard __heap_base__ and __heap_end__ + # therefore we introduce these symbols as an alias. + TOOLCHAIN_LDSYMBOLS = -Wl,--defsym=__heap_start=__heap_base__,--defsym=__heap_end=__heap_end__ + + # Tell QMK that we are compiling with picolibc. + OPT_DEFS += -DUSE_PICOLIBC + endif + + # MCU architecture flags + MCUFLAGS = -march=$(MCU_ARCH) \ + -mabi=$(MCU_ABI) \ + -mcmodel=$(MCU_CMODEL) \ + -mstrict-align +else + # ARM toolchain specific configuration + TOOLCHAIN ?= arm-none-eabi- + + # Toolchain specific Linker flags + TOOLCHAIN_LDFLAGS = -Wl,--no-wchar-size-warning \ + --specs=nano.specs + + # MCU architecture flags + MCUFLAGS = -mcpu=$(MCU) \ + -mthumb -DTHUMB_PRESENT \ + -mno-thumb-interwork -DTHUMB_NO_INTERWORKING \ + -mno-unaligned-access + + # Some ARM cores like the M4 and M7 have floating point units which can be enabled + USE_FPU ?= no + + ifneq ($(USE_FPU),no) + OPT_DEFS += -DCORTEX_USE_FPU=TRUE + + # Default is single precision floats + USE_FPU_OPT ?= -mfloat-abi=hard \ + -mfpu=fpv4-sp-d16 \ + -fsingle-precision-constant + + MCUFLAGS += $(USE_FPU_OPT) + else + OPT_DEFS += -DCORTEX_USE_FPU=FALSE + endif +endif + +# Assembler flags +ASFLAGS += $(SHARED_ASFLAGS) $(TOOLCHAIN_ASFLAGS) + +# C Compiler flags +CFLAGS += $(SHARED_CFLAGS) $(TOOLCHAIN_CFLAGS) + +# C++ Compiler flags +CXXFLAGS += $(CFLAGS) $(SHARED_CXXFLAGS) $(TOOLCHAIN_CXXFLAGS) -fno-rtti + +# Linker flags +LDFLAGS += $(SHARED_LDFLAGS) $(SHARED_LDSYMBOLS) $(TOOLCHAIN_LDFLAGS) $(TOOLCHAIN_LDSYMBOLS) $(MCUFLAGS) + +# Tell QMK that we are hosting it on ChibiOS. +OPT_DEFS += -DPROTOCOL_CHIBIOS + +# Workaround to stop ChibiOS from complaining about new GCC -- it's been fixed for 7/8/9 already +OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1 + +# Construct GCC toolchain +CC = $(CC_PREFIX) $(TOOLCHAIN)gcc +OBJCOPY = $(TOOLCHAIN)objcopy +OBJDUMP = $(TOOLCHAIN)objdump +SIZE = $(TOOLCHAIN)size +AR = $(TOOLCHAIN)ar +NM = $(TOOLCHAIN)nm +HEX = $(OBJCOPY) -O $(FORMAT) +EEP = +BIN = $(OBJCOPY) -O binary + +############################################################################## +# Make targets +# + +DEBUG = gdb + +# List any extra directories to look for libraries here. +EXTRALIBDIRS = $(RULESPATH)/ld + +bin: $(BUILD_DIR)/$(TARGET).bin sizeafter + $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/common/chibios/platform_deps.h b/platforms/chibios/platform_deps.h similarity index 100% rename from tmk_core/common/chibios/platform_deps.h rename to platforms/chibios/platform_deps.h diff --git a/tmk_core/common/chibios/sleep_led.c b/platforms/chibios/sleep_led.c similarity index 100% rename from tmk_core/common/chibios/sleep_led.c rename to platforms/chibios/sleep_led.c diff --git a/platforms/chibios/suspend.c b/platforms/chibios/suspend.c new file mode 100644 index 00000000000..9310a999209 --- /dev/null +++ b/platforms/chibios/suspend.c @@ -0,0 +1,92 @@ +/* TODO */ + +#include <ch.h> +#include <hal.h> + +#include "matrix.h" +#include "action.h" +#include "action_util.h" +#include "mousekey.h" +#include "programmable_button.h" +#include "host.h" +#include "suspend.h" +#include "led.h" +#include "wait.h" + +/** \brief suspend idle + * + * FIXME: needs doc + */ +void suspend_idle(uint8_t time) { + // TODO: this is not used anywhere - what units is 'time' in? + wait_ms(time); +} + +/** \brief suspend power down + * + * FIXME: needs doc + */ +void suspend_power_down(void) { + suspend_power_down_quantum(); + // on AVR, this enables the watchdog for 15ms (max), and goes to + // SLEEP_MODE_PWR_DOWN + + wait_ms(17); +} + +/** \brief suspend wakeup condition + * + * FIXME: needs doc + */ +__attribute__((weak)) void matrix_power_up(void) {} +__attribute__((weak)) void matrix_power_down(void) {} +bool suspend_wakeup_condition(void) { + matrix_power_up(); + matrix_scan(); + matrix_power_down(); + for (uint8_t r = 0; r < MATRIX_ROWS; r++) { + if (matrix_get_row(r)) return true; + } + return false; +} + +/** \brief run user level code immediately after wakeup + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_wakeup_init_user(void) {} + +/** \brief run keyboard level code immediately after wakeup + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } + +/** \brief suspend wakeup condition + * + * run immediately after wakeup + * FIXME: needs doc + */ +void suspend_wakeup_init(void) { + // clear keyboard state + // need to do it manually, because we're running from ISR + // and clear_keyboard() calls print + // so only clear the variables in memory + // the reports will be sent from main.c afterwards + // or if the PC asks for GET_REPORT + clear_mods(); + clear_weak_mods(); + clear_keys(); +#ifdef MOUSEKEY_ENABLE + mousekey_clear(); +#endif /* MOUSEKEY_ENABLE */ +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_clear(); +#endif /* PROGRAMMABLE_BUTTON_ENABLE */ +#ifdef EXTRAKEY_ENABLE + host_system_send(0); + host_consumer_send(0); +#endif /* EXTRAKEY_ENABLE */ + + suspend_wakeup_init_quantum(); +} diff --git a/platforms/chibios/syscall-fallbacks.c b/platforms/chibios/syscall-fallbacks.c new file mode 100644 index 00000000000..7150a463262 --- /dev/null +++ b/platforms/chibios/syscall-fallbacks.c @@ -0,0 +1,111 @@ +/* Copyright 2021 Nick Brassel, QMK + * + * 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 <errno.h> +#include <sys/stat.h> +#include <sys/types.h> + +/* To compile the ChibiOS syscall stubs with picolibc + * the _reent struct has to be defined. */ +#if defined(USE_PICOLIBC) +struct _reent; +struct timeval; +#endif + +#pragma GCC diagnostic ignored "-Wmissing-prototypes" + +__attribute__((weak, used)) int _open_r(struct _reent *r, const char *path, int flag, int m) { + __errno_r(r) = ENOENT; + return -1; +} + +__attribute__((weak, used)) int _lseek_r(struct _reent *r, int file, int ptr, int dir) { + __errno_r(r) = EBADF; + return -1; +} + +__attribute__((weak, used)) int _read_r(struct _reent *r, int file, char *ptr, int len) { + __errno_r(r) = EBADF; + return -1; +} + +__attribute__((weak, used)) int _write_r(struct _reent *r, int file, char *ptr, int len) { + __errno_r(r) = EBADF; + return -1; +} + +__attribute__((weak, used)) int _close_r(struct _reent *r, int file) { + __errno_r(r) = EBADF; + return -1; +} + +__attribute__((weak, used)) int _link_r(struct _reent *r, const char *oldpath, const char *newpath) { + __errno_r(r) = EPERM; + return -1; +} + +__attribute__((weak, used)) int _unlink_r(struct _reent *r, const char *path) { + __errno_r(r) = EPERM; + return -1; +} + +__attribute__((weak, used)) clock_t _times_r(struct _reent *r, void *t) { + __errno_r(r) = EFAULT; + return -1; +} + +__attribute__((weak, used)) int _fstat_r(struct _reent *r, int file, struct stat *st) { + __errno_r(r) = EBADF; + return -1; +} + +__attribute__((weak, used)) int _isatty_r(struct _reent *r, int fd) { + __errno_r(r) = EBADF; + return 0; +} + +__attribute__((weak, used)) caddr_t _sbrk_r(struct _reent *r, int incr) { + __errno_r(r) = ENOMEM; + return (caddr_t)-1; +} + +__attribute__((weak, used)) int _kill(int pid, int sig) { + errno = EPERM; + return -1; +} + +__attribute__((weak, used)) pid_t _getpid(void) { return 1; } + +__attribute__((weak, used)) void _fini(void) { return; } + +__attribute__((weak, used, noreturn)) void _exit(int i) { + while (1) + ; +} + +__attribute__((weak, used)) int _gettimeofday_r(struct _reent *r, struct timeval *t, void *tzp) { + __errno_r(r) = EPERM; + return -1; +} + +__attribute__((weak, used)) void *__dso_handle; + +__attribute__((weak, used)) void __cxa_pure_virtual(void) { + while (1) + ; +} + +#pragma GCC diagnostic pop diff --git a/tmk_core/common/chibios/timer.c b/platforms/chibios/timer.c similarity index 100% rename from tmk_core/common/chibios/timer.c rename to platforms/chibios/timer.c diff --git a/tmk_core/common/chibios/wait.c b/platforms/chibios/wait.c similarity index 100% rename from tmk_core/common/chibios/wait.c rename to platforms/chibios/wait.c diff --git a/platforms/common.mk b/platforms/common.mk new file mode 100644 index 00000000000..f7a0fc7028b --- /dev/null +++ b/platforms/common.mk @@ -0,0 +1,12 @@ +PLATFORM_COMMON_DIR = $(PLATFORM_PATH)/$(PLATFORM_KEY) + +TMK_COMMON_SRC += \ + $(PLATFORM_COMMON_DIR)/platform.c \ + $(PLATFORM_COMMON_DIR)/suspend.c \ + $(PLATFORM_COMMON_DIR)/timer.c \ + $(PLATFORM_COMMON_DIR)/bootloader.c \ + +# Search Path +VPATH += $(PLATFORM_PATH) +VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY) +VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR) diff --git a/tmk_core/common/eeprom.h b/platforms/eeprom.h similarity index 100% rename from tmk_core/common/eeprom.h rename to platforms/eeprom.h diff --git a/tmk_core/common/gpio.h b/platforms/gpio.h similarity index 100% rename from tmk_core/common/gpio.h rename to platforms/gpio.h diff --git a/tmk_core/common/pin_defs.h b/platforms/pin_defs.h similarity index 100% rename from tmk_core/common/pin_defs.h rename to platforms/pin_defs.h diff --git a/platforms/progmem.h b/platforms/progmem.h new file mode 100644 index 00000000000..3a7a169682c --- /dev/null +++ b/platforms/progmem.h @@ -0,0 +1,18 @@ +#pragma once + +#if defined(__AVR__) +# include <avr/pgmspace.h> +#else +# include <string.h> +# define PROGMEM +# define PSTR(x) x +# define PGM_P const char* +# define memcpy_P(dest, src, n) memcpy(dest, src, n) +# define pgm_read_byte(address_short) *((uint8_t*)(address_short)) +# define pgm_read_word(address_short) *((uint16_t*)(address_short)) +# define pgm_read_dword(address_short) *((uint32_t*)(address_short)) +# define pgm_read_ptr(address_short) *((void**)(address_short)) +# define strcmp_P(s1, s2) strcmp(s1, s2) +# define strcpy_P(dest, src) strcpy(dest, src) +# define strlen_P(src) strlen(src) +#endif diff --git a/tmk_core/common/sleep_led.h b/platforms/sleep_led.h similarity index 100% rename from tmk_core/common/sleep_led.h rename to platforms/sleep_led.h diff --git a/platforms/suspend.h b/platforms/suspend.h new file mode 100644 index 00000000000..081735f90e3 --- /dev/null +++ b/platforms/suspend.h @@ -0,0 +1,20 @@ +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +void suspend_idle(uint8_t timeout); +void suspend_power_down(void); +bool suspend_wakeup_condition(void); +void suspend_wakeup_init(void); + +void suspend_wakeup_init_user(void); +void suspend_wakeup_init_kb(void); +void suspend_wakeup_init_quantum(void); +void suspend_power_down_user(void); +void suspend_power_down_kb(void); +void suspend_power_down_quantum(void); + +#ifndef USB_SUSPEND_WAKEUP_DELAY +# define USB_SUSPEND_WAKEUP_DELAY 0 +#endif diff --git a/tmk_core/common/test/_wait.h b/platforms/test/_wait.h similarity index 100% rename from tmk_core/common/test/_wait.h rename to platforms/test/_wait.h diff --git a/tmk_core/common/test/bootloader.c b/platforms/test/bootloader.c similarity index 100% rename from tmk_core/common/test/bootloader.c rename to platforms/test/bootloader.c diff --git a/tmk_core/common/test/eeprom.c b/platforms/test/eeprom.c similarity index 100% rename from tmk_core/common/test/eeprom.c rename to platforms/test/eeprom.c diff --git a/tmk_core/common/test/eeprom_stm32_tests.cpp b/platforms/test/eeprom_stm32_tests.cpp similarity index 100% rename from tmk_core/common/test/eeprom_stm32_tests.cpp rename to platforms/test/eeprom_stm32_tests.cpp diff --git a/tmk_core/common/test/flash_stm32_mock.c b/platforms/test/flash_stm32_mock.c similarity index 100% rename from tmk_core/common/test/flash_stm32_mock.c rename to platforms/test/flash_stm32_mock.c diff --git a/tmk_core/common/test/hal.h b/platforms/test/hal.h similarity index 100% rename from tmk_core/common/test/hal.h rename to platforms/test/hal.h diff --git a/tmk_core/common/test/platform.c b/platforms/test/platform.c similarity index 100% rename from tmk_core/common/test/platform.c rename to platforms/test/platform.c diff --git a/tmk_core/common/test/platform.h b/platforms/test/platform.h similarity index 100% rename from tmk_core/common/test/platform.h rename to platforms/test/platform.h diff --git a/platforms/test/platform.mk b/platforms/test/platform.mk new file mode 100644 index 00000000000..eb2424ec5c8 --- /dev/null +++ b/platforms/test/platform.mk @@ -0,0 +1,34 @@ +SYSTEM_TYPE := $(shell gcc -dumpmachine) +GCC_VERSION := $(shell gcc --version 2>/dev/null) + +CC = $(CC_PREFIX) gcc +OBJCOPY = +OBJDUMP = +SIZE = +AR = +NM = +HEX = +EEP = +BIN = + + +COMPILEFLAGS += -funsigned-char +ifeq ($(findstring clang, ${GCC_VERSION}),) +COMPILEFLAGS += -funsigned-bitfields +endif +COMPILEFLAGS += -ffunction-sections +COMPILEFLAGS += -fdata-sections +COMPILEFLAGS += -fshort-enums +ifneq ($(findstring mingw, ${SYSTEM_TYPE}),) +COMPILEFLAGS += -mno-ms-bitfields +endif + +CFLAGS += $(COMPILEFLAGS) +ifeq ($(findstring clang, ${GCC_VERSION}),) +CFLAGS += -fno-inline-small-functions +endif +CFLAGS += -fno-strict-aliasing + +CXXFLAGS += $(COMPILEFLAGS) +CXXFLAGS += -fno-exceptions +CXXFLAGS += -std=gnu++11 diff --git a/tmk_core/common/test/platform_deps.h b/platforms/test/platform_deps.h similarity index 100% rename from tmk_core/common/test/platform_deps.h rename to platforms/test/platform_deps.h diff --git a/platforms/test/rules.mk b/platforms/test/rules.mk new file mode 100644 index 00000000000..66b853d8eeb --- /dev/null +++ b/platforms/test/rules.mk @@ -0,0 +1,24 @@ +eeprom_stm32_DEFS := -DFLASH_STM32_MOCKED -DNO_PRINT -DFEE_FLASH_BASE=FlashBuf +eeprom_stm32_tiny_DEFS := $(eeprom_stm32_DEFS) \ + -DFEE_MCU_FLASH_SIZE=1 \ + -DMOCK_FLASH_SIZE=1024 \ + -DFEE_PAGE_SIZE=512 \ + -DFEE_PAGE_COUNT=1 +eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \ + -DFEE_MCU_FLASH_SIZE=64 \ + -DMOCK_FLASH_SIZE=65536 \ + -DFEE_PAGE_SIZE=2048 \ + -DFEE_PAGE_COUNT=16 + +eeprom_stm32_INC := \ + $(PLATFORM_PATH)/chibios/ +eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) +eeprom_stm32_large_INC := $(eeprom_stm32_INC) + +eeprom_stm32_SRC := \ + $(TOP_DIR)/drivers/eeprom/eeprom_driver.c \ + $(PLATFORM_PATH)/$(PLATFORM_KEY)/eeprom_stm32_tests.cpp \ + $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash_stm32_mock.c \ + $(PLATFORM_PATH)/chibios/eeprom_stm32.c +eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) +eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) diff --git a/tmk_core/common/test/suspend.c b/platforms/test/suspend.c similarity index 100% rename from tmk_core/common/test/suspend.c rename to platforms/test/suspend.c diff --git a/tmk_core/common/test/testlist.mk b/platforms/test/testlist.mk similarity index 100% rename from tmk_core/common/test/testlist.mk rename to platforms/test/testlist.mk diff --git a/tmk_core/common/test/timer.c b/platforms/test/timer.c similarity index 100% rename from tmk_core/common/test/timer.c rename to platforms/test/timer.c diff --git a/tmk_core/common/timer.h b/platforms/timer.h similarity index 100% rename from tmk_core/common/timer.h rename to platforms/timer.h diff --git a/tmk_core/common/wait.h b/platforms/wait.h similarity index 100% rename from tmk_core/common/wait.h rename to platforms/wait.h diff --git a/quantum/action.c b/quantum/action.c index 208690f5e4c..5e81efb6712 100644 --- a/quantum/action.c +++ b/quantum/action.c @@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "keycode.h" #include "keyboard.h" #include "mousekey.h" +#include "programmable_button.h" #include "command.h" #include "led.h" #include "action_layer.h" @@ -26,6 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "action_util.h" #include "action.h" #include "wait.h" +#include "keycode_config.h" #ifdef BACKLIGHT_ENABLE # include "backlight.h" @@ -43,10 +45,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. int tp_buttons; -#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) +#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) int retro_tapping_counter = 0; #endif +#if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) +# include "process_auto_shift.h" +#endif + #ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY __attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { return false; } #endif @@ -67,7 +73,7 @@ void action_exec(keyevent_t event) { dprint("EVENT: "); debug_event(event); dprintln(); -#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) +#if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) retro_tapping_counter++; #endif } @@ -86,22 +92,29 @@ void action_exec(keyevent_t event) { keyrecord_t record = {.event = event}; #ifndef NO_ACTION_ONESHOT + if (!keymap_config.oneshot_disable) { # if (defined(ONESHOT_TIMEOUT) && (ONESHOT_TIMEOUT > 0)) - if (has_oneshot_layer_timed_out()) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - } - if (has_oneshot_mods_timed_out()) { - clear_oneshot_mods(); - } + if (has_oneshot_layer_timed_out()) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } + if (has_oneshot_mods_timed_out()) { + clear_oneshot_mods(); + } # ifdef SWAP_HANDS_ENABLE - if (has_oneshot_swaphands_timed_out()) { - clear_oneshot_swaphands(); - } + if (has_oneshot_swaphands_timed_out()) { + clear_oneshot_swaphands(); + } # endif # endif + } #endif #ifndef NO_ACTION_TAPPING +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + if (event.pressed) { + retroshift_poll_time(&event); + } +# endif if (IS_NOEVENT(record.event) || pre_process_record_quantum(&record)) { action_tapping_process(record); } @@ -194,7 +207,7 @@ void process_record(keyrecord_t *record) { if (!process_record_quantum(record)) { #ifndef NO_ACTION_ONESHOT - if (is_oneshot_layer_active() && record->event.pressed) { + if (is_oneshot_layer_active() && record->event.pressed && !keymap_config.oneshot_disable) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); } #endif @@ -259,7 +272,7 @@ void process_action(keyrecord_t *record, action_t action) { # ifdef SWAP_HANDS_ENABLE && !(action.kind.id == ACT_SWAP_HANDS && action.swap.code == OP_SH_ONESHOT) # endif - ) { + && !keymap_config.oneshot_disable) { clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); do_release_oneshot = !is_oneshot_layer_active(); } @@ -273,8 +286,8 @@ void process_action(keyrecord_t *record, action_t action) { if (event.pressed) { if (mods) { if (IS_MOD(action.key.code) || action.key.code == KC_NO) { - // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. - // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // e.g. LSFT(KC_LEFT_GUI): we don't want the LSFT to be weak as it would make it useless. + // This also makes LSFT(KC_LEFT_GUI) behave exactly the same as LGUI(KC_LEFT_SHIFT). // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). add_mods(mods); } else { @@ -303,41 +316,68 @@ void process_action(keyrecord_t *record, action_t action) { # ifndef NO_ACTION_ONESHOT case MODS_ONESHOT: // Oneshot modifier - if (event.pressed) { - if (tap_count == 0) { - dprint("MODS_TAP: Oneshot: 0\n"); - register_mods(mods | get_oneshot_mods()); - } else if (tap_count == 1) { - dprint("MODS_TAP: Oneshot: start\n"); - set_oneshot_mods(mods | get_oneshot_mods()); -# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - } else if (tap_count == ONESHOT_TAP_TOGGLE) { - dprint("MODS_TAP: Toggling oneshot"); - clear_oneshot_mods(); - set_oneshot_locked_mods(mods); - register_mods(mods); -# endif + if (keymap_config.oneshot_disable) { + if (event.pressed) { + if (mods) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + // e.g. LSFT(KC_LGUI): we don't want the LSFT to be weak as it would make it useless. + // This also makes LSFT(KC_LGUI) behave exactly the same as LGUI(KC_LSFT). + // Same applies for some keys like KC_MEH which are declared as MEH(KC_NO). + add_mods(mods); + } else { + add_weak_mods(mods); + } + send_keyboard_report(); + } + register_code(action.key.code); } else { - register_mods(mods | get_oneshot_mods()); + unregister_code(action.key.code); + if (mods) { + if (IS_MOD(action.key.code) || action.key.code == KC_NO) { + del_mods(mods); + } else { + del_weak_mods(mods); + } + send_keyboard_report(); + } } } else { - if (tap_count == 0) { - clear_oneshot_mods(); - unregister_mods(mods); - } else if (tap_count == 1) { - // Retain Oneshot mods + if (event.pressed) { + if (tap_count == 0) { + dprint("MODS_TAP: Oneshot: 0\n"); + register_mods(mods | get_oneshot_mods()); + } else if (tap_count == 1) { + dprint("MODS_TAP: Oneshot: start\n"); + set_oneshot_mods(mods | get_oneshot_mods()); # if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - if (mods & get_mods()) { - clear_oneshot_locked_mods(); + } else if (tap_count == ONESHOT_TAP_TOGGLE) { + dprint("MODS_TAP: Toggling oneshot"); clear_oneshot_mods(); - unregister_mods(mods); - } - } else if (tap_count == ONESHOT_TAP_TOGGLE) { - // Toggle Oneshot Layer + set_oneshot_locked_mods(mods); + register_mods(mods); # endif + } else { + register_mods(mods | get_oneshot_mods()); + } } else { - clear_oneshot_mods(); - unregister_mods(mods); + if (tap_count == 0) { + clear_oneshot_mods(); + unregister_mods(mods); + } else if (tap_count == 1) { + // Retain Oneshot mods +# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 + if (mods & get_mods()) { + clear_oneshot_locked_mods(); + clear_oneshot_mods(); + unregister_mods(mods); + } + } else if (tap_count == ONESHOT_TAP_TOGGLE) { + // Toggle Oneshot Layer +# endif + } else { + clear_oneshot_mods(); + unregister_mods(mods); + } } } break; @@ -379,7 +419,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { if (tap_count > 0) { dprint("MODS_TAP: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { + if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { wait_ms(TAP_CODE_DELAY); @@ -522,39 +562,47 @@ void process_action(keyrecord_t *record, action_t action) { # ifndef NO_ACTION_ONESHOT case OP_ONESHOT: // Oneshot modifier -# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 - do_release_oneshot = false; - if (event.pressed) { - del_mods(get_oneshot_locked_mods()); - if (get_oneshot_layer_state() == ONESHOT_TOGGLED) { - reset_oneshot_layer(); - layer_off(action.layer_tap.val); - break; - } else if (tap_count < ONESHOT_TAP_TOGGLE) { + if (keymap_config.oneshot_disable) { + if (event.pressed) { layer_on(action.layer_tap.val); - set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } else { + layer_off(action.layer_tap.val); } } else { - add_mods(get_oneshot_locked_mods()); - if (tap_count >= ONESHOT_TAP_TOGGLE) { - reset_oneshot_layer(); - clear_oneshot_locked_mods(); - set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED); +# if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1 + do_release_oneshot = false; + if (event.pressed) { + del_mods(get_oneshot_locked_mods()); + if (get_oneshot_layer_state() == ONESHOT_TOGGLED) { + reset_oneshot_layer(); + layer_off(action.layer_tap.val); + break; + } else if (tap_count < ONESHOT_TAP_TOGGLE) { + layer_on(action.layer_tap.val); + set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } } else { - clear_oneshot_layer_state(ONESHOT_PRESSED); + add_mods(get_oneshot_locked_mods()); + if (tap_count >= ONESHOT_TAP_TOGGLE) { + reset_oneshot_layer(); + clear_oneshot_locked_mods(); + set_oneshot_layer(action.layer_tap.val, ONESHOT_TOGGLED); + } else { + clear_oneshot_layer_state(ONESHOT_PRESSED); + } } - } # else - if (event.pressed) { - layer_on(action.layer_tap.val); - set_oneshot_layer(action.layer_tap.val, ONESHOT_START); - } else { - clear_oneshot_layer_state(ONESHOT_PRESSED); - if (tap_count > 1) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + if (event.pressed) { + layer_on(action.layer_tap.val); + set_oneshot_layer(action.layer_tap.val, ONESHOT_START); + } else { + clear_oneshot_layer_state(ONESHOT_PRESSED); + if (tap_count > 1) { + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); + } } - } # endif + } break; # endif default: @@ -570,7 +618,7 @@ void process_action(keyrecord_t *record, action_t action) { } else { if (tap_count > 0) { dprint("KEYMAP_TAP_KEY: Tap: unregister_code\n"); - if (action.layer_tap.code == KC_CAPS) { + if (action.layer_tap.code == KC_CAPS_LOCK) { wait_ms(TAP_HOLD_CAPS_DELAY); } else { wait_ms(TAP_CODE_DELAY); @@ -691,7 +739,7 @@ void process_action(keyrecord_t *record, action_t action) { #endif #ifndef NO_ACTION_TAPPING -# if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) +# if defined(RETRO_TAPPING) || defined(RETRO_TAPPING_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) if (!is_tap_action(action)) { retro_tapping_counter = 0; } else { @@ -708,7 +756,11 @@ void process_action(keyrecord_t *record, action_t action) { get_retro_tapping(get_event_keycode(record->event, false), record) && # endif retro_tapping_counter == 2) { +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + process_auto_shift(action.layer_tap.code, record); +# else tap_code(action.layer_tap.code); +# endif } retro_tapping_counter = 0; } @@ -747,37 +799,37 @@ void register_code(uint8_t code) { return; } #ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { + else if (KC_LOCKING_CAPS_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE // Resync: ignore if caps lock already is on if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) return; # endif - add_key(KC_CAPSLOCK); + add_key(KC_CAPS_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_CAPSLOCK); + del_key(KC_CAPS_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_NUM == code) { + else if (KC_LOCKING_NUM_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (host_keyboard_leds() & (1 << USB_LED_NUM_LOCK)) return; # endif - add_key(KC_NUMLOCK); + add_key(KC_NUM_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_NUMLOCK); + del_key(KC_NUM_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_SCROLL == code) { + else if (KC_LOCKING_SCROLL_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK)) return; # endif - add_key(KC_SCROLLLOCK); + add_key(KC_SCROLL_LOCK); send_keyboard_report(); wait_ms(100); - del_key(KC_SCROLLLOCK); + del_key(KC_SCROLL_LOCK); send_keyboard_report(); } #endif @@ -843,34 +895,34 @@ void unregister_code(uint8_t code) { return; } #ifdef LOCKING_SUPPORT_ENABLE - else if (KC_LOCKING_CAPS == code) { + else if (KC_LOCKING_CAPS_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE // Resync: ignore if caps lock already is off if (!(host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK))) return; # endif - add_key(KC_CAPSLOCK); + add_key(KC_CAPS_LOCK); send_keyboard_report(); - del_key(KC_CAPSLOCK); + del_key(KC_CAPS_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_NUM == code) { + else if (KC_LOCKING_NUM_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (!(host_keyboard_leds() & (1 << USB_LED_NUM_LOCK))) return; # endif - add_key(KC_NUMLOCK); + add_key(KC_NUM_LOCK); send_keyboard_report(); - del_key(KC_NUMLOCK); + del_key(KC_NUM_LOCK); send_keyboard_report(); } - else if (KC_LOCKING_SCROLL == code) { + else if (KC_LOCKING_SCROLL_LOCK == code) { # ifdef LOCKING_RESYNC_ENABLE if (!(host_keyboard_leds() & (1 << USB_LED_SCROLL_LOCK))) return; # endif - add_key(KC_SCROLLLOCK); + add_key(KC_SCROLL_LOCK); send_keyboard_report(); - del_key(KC_SCROLLLOCK); + del_key(KC_SCROLL_LOCK); send_keyboard_report(); } #endif @@ -913,9 +965,9 @@ void tap_code_delay(uint8_t code, uint16_t delay) { /** \brief Tap a keycode with the default delay. * - * \param code The basic keycode to tap. If `code` is `KC_CAPS`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. + * \param code The basic keycode to tap. If `code` is `KC_CAPS_LOCK`, the delay will be `TAP_HOLD_CAPS_DELAY`, otherwise `TAP_CODE_DELAY`, if defined. */ -void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } +void tap_code(uint8_t code) { tap_code_delay(code, code == KC_CAPS_LOCK ? TAP_HOLD_CAPS_DELAY : TAP_CODE_DELAY); } /** \brief Adds the given physically pressed modifiers and sends a keyboard report immediately. * @@ -995,6 +1047,10 @@ void clear_keyboard_but_mods_and_keys() { mousekey_clear(); mousekey_send(); #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_clear(); + programmable_button_send(); +#endif } /** \brief Utilities for actions. (FIXME: Needs better description) @@ -1035,7 +1091,7 @@ bool is_tap_action(action_t action) { case ACT_LAYER_TAP: case ACT_LAYER_TAP_EXT: switch (action.layer_tap.code) { - case KC_NO ... KC_RGUI: + case KC_NO ... KC_RIGHT_GUI: case OP_TAP_TOGGLE: case OP_ONESHOT: return true; @@ -1043,7 +1099,7 @@ bool is_tap_action(action_t action) { return false; case ACT_SWAP_HANDS: switch (action.swap.code) { - case KC_NO ... KC_RGUI: + case KC_NO ... KC_RIGHT_GUI: case OP_SH_TAP_TOGGLE: return true; } diff --git a/quantum/action_tapping.c b/quantum/action_tapping.c index 60e56fb811c..d2c93f85e3f 100644 --- a/quantum/action_tapping.c +++ b/quantum/action_tapping.c @@ -24,12 +24,14 @@ # define IS_TAPPING_RECORD(r) (IS_TAPPING() && KEYEQ(tapping_key.event.key, (r->event.key)) && tapping_key.keycode == r->keycode) # endif -__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return TAPPING_TERM; } +uint16_t g_tapping_term = TAPPING_TERM; + +__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) { return g_tapping_term; } # ifdef TAPPING_TERM_PER_KEY # define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < get_tapping_term(get_record_keycode(&tapping_key, false), &tapping_key)) # else -# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < TAPPING_TERM) +# define WITHIN_TAPPING_TERM(e) (TIMER_DIFF_16(e.time, tapping_key.event.time) < g_tapping_term) # endif # ifdef TAPPING_FORCE_HOLD_PER_KEY @@ -44,6 +46,10 @@ __attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *re __attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) { return false; } # endif +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) +# include "process_auto_shift.h" +# endif + static keyrecord_t tapping_key = {}; static keyrecord_t waiting_buffer[WAITING_BUFFER_SIZE] = {}; static uint8_t waiting_buffer_head = 0; @@ -107,12 +113,29 @@ void action_tapping_process(keyrecord_t record) { /* return true when key event is processed or consumed. */ bool process_tapping(keyrecord_t *keyp) { keyevent_t event = keyp->event; +# if (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) || defined(TAPPING_TERM_PER_KEY) || defined(PERMISSIVE_HOLD_PER_KEY) || defined(TAPPING_FORCE_HOLD_PER_KEY) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) + uint16_t tapping_keycode = get_record_keycode(&tapping_key, false); +# endif // if tapping if (IS_TAPPING_PRESSED()) { - if (WITHIN_TAPPING_TERM(event)) { + // clang-format off + if (WITHIN_TAPPING_TERM(event) +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + || ( +# ifdef RETRO_TAPPING_PER_KEY + get_retro_tapping(tapping_keycode, keyp) && +# endif + (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0) + ) +# endif + ) { + // clang-format on if (tapping_key.tap.count == 0) { if (IS_TAPPING_RECORD(keyp) && !event.pressed) { +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + retroshift_swap_times(); +# endif // first tap! debug("Tapping: First tap(0->1).\n"); tapping_key.tap.count = 1; @@ -128,22 +151,70 @@ bool process_tapping(keyrecord_t *keyp) { * This can register the key before settlement of tapping, * useful for long TAPPING_TERM but may prevent fast typing. */ -# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) - else if ((( + // clang-format off +# if defined(TAPPING_TERM_PER_KEY) || (TAPPING_TERM >= 500) || defined(PERMISSIVE_HOLD) || defined(PERMISSIVE_HOLD_PER_KEY) || (defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT)) + else if ( + ( + ( + ( # ifdef TAPPING_TERM_PER_KEY - get_tapping_term(get_record_keycode(&tapping_key, false), keyp) + get_tapping_term(tapping_keycode, keyp) # else - TAPPING_TERM + g_tapping_term # endif - >= 500) + >= 500 + ) # ifdef PERMISSIVE_HOLD_PER_KEY - || get_permissive_hold(get_record_keycode(&tapping_key, false), keyp) + || get_permissive_hold(tapping_keycode, keyp) # elif defined(PERMISSIVE_HOLD) - || true + || true +# endif + ) && IS_RELEASED(event) && waiting_buffer_typed(event) + ) + // Causes nested taps to not wait past TAPPING_TERM/RETRO_SHIFT + // unnecessarily and fixes them for Layer Taps. +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + || ( +# ifdef RETRO_TAPPING_PER_KEY + get_retro_tapping(tapping_keycode, keyp) && +# endif + ( + // Rolled over the two keys. + ( + ( + false +# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) + || ( + IS_LT(tapping_keycode) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + && get_hold_on_other_key_press(tapping_keycode, keyp) +# endif + ) +# endif +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) + || ( + IS_MT(tapping_keycode) +# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY + && !get_ignore_mod_tap_interrupt(tapping_keycode, keyp) +# endif + ) +# endif + ) && tapping_key.tap.interrupted == true + ) + // Makes Retro Shift ignore [IGNORE_MOD_TAP_INTERRUPT's + // effects on nested taps for MTs and the default + // behavior of LTs] below TAPPING_TERM or RETRO_SHIFT. + || ( + IS_RETRO(tapping_keycode) + && (event.key.col != tapping_key.event.key.col || event.key.row != tapping_key.event.key.row) + && IS_RELEASED(event) && waiting_buffer_typed(event) + ) + ) + ) # endif - ) && - IS_RELEASED(event) && waiting_buffer_typed(event)) { + ) { + // clang-format on debug("Tapping: End. No tap. Interfered by typing key\n"); process_record(&tapping_key); tapping_key = (keyrecord_t){}; @@ -181,7 +252,7 @@ bool process_tapping(keyrecord_t *keyp) { tapping_key.tap.interrupted = true; # if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) # if defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) - if (get_hold_on_other_key_press(get_record_keycode(&tapping_key, false), keyp)) + if (get_hold_on_other_key_press(tapping_keycode, keyp)) # endif { debug("Tapping: End. No tap. Interfered by pressed key\n"); @@ -284,14 +355,25 @@ bool process_tapping(keyrecord_t *keyp) { } } } else if (IS_TAPPING_RELEASED()) { - if (WITHIN_TAPPING_TERM(event)) { + // clang-format off + if (WITHIN_TAPPING_TERM(event) +# if defined(AUTO_SHIFT_ENABLE) && defined(RETRO_SHIFT) + || ( +# ifdef RETRO_TAPPING_PER_KEY + get_retro_tapping(tapping_keycode, keyp) && +# endif + (RETRO_SHIFT + 0) != 0 && TIMER_DIFF_16(event.time, tapping_key.event.time) < (RETRO_SHIFT + 0) + ) +# endif + ) { + // clang-format on if (event.pressed) { if (IS_TAPPING_RECORD(keyp)) { //# ifndef TAPPING_FORCE_HOLD # if !defined(TAPPING_FORCE_HOLD) || defined(TAPPING_FORCE_HOLD_PER_KEY) if ( # ifdef TAPPING_FORCE_HOLD_PER_KEY - !get_tapping_force_hold(get_record_keycode(&tapping_key, false), keyp) && + !get_tapping_force_hold(tapping_keycode, keyp) && # endif !tapping_key.tap.interrupted && tapping_key.tap.count > 0) { // sequential tap. diff --git a/quantum/action_tapping.h b/quantum/action_tapping.h index 7de8049c7f0..b2feb6850ce 100644 --- a/quantum/action_tapping.h +++ b/quantum/action_tapping.h @@ -33,10 +33,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. uint16_t get_record_keycode(keyrecord_t *record, bool update_layer_cache); uint16_t get_event_keycode(keyevent_t event, bool update_layer_cache); void action_tapping_process(keyrecord_t record); +#endif uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record); bool get_permissive_hold(uint16_t keycode, keyrecord_t *record); bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record); bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record); bool get_retro_tapping(uint16_t keycode, keyrecord_t *record); + +#ifdef DYNAMIC_TAPPING_TERM_ENABLE +extern uint16_t g_tapping_term; #endif diff --git a/quantum/action_util.c b/quantum/action_util.c index 9a85bd50406..78e02aec185 100644 --- a/quantum/action_util.c +++ b/quantum/action_util.c @@ -170,7 +170,7 @@ void reset_oneshot_layer(void) { void clear_oneshot_layer_state(oneshot_fullfillment_t state) { uint8_t start_state = oneshot_layer_data; oneshot_layer_data &= ~state; - if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) || keymap_config.oneshot_disable) { + if ((!get_oneshot_layer_state() && start_state != oneshot_layer_data) && !keymap_config.oneshot_disable) { layer_off(get_oneshot_layer()); reset_oneshot_layer(); } @@ -189,6 +189,7 @@ void oneshot_set(bool active) { if (keymap_config.oneshot_disable != active) { keymap_config.oneshot_disable = active; eeconfig_update_keymap(keymap_config.raw); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); dprintf("Oneshot: active: %d\n", active); } } diff --git a/quantum/api.c b/quantum/api.c deleted file mode 100644 index 16857445895..00000000000 --- a/quantum/api.c +++ /dev/null @@ -1,182 +0,0 @@ -/* Copyright 2016 Jack Humbert - * - * 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 "api.h" -#include "quantum.h" - -void dword_to_bytes(uint32_t dword, uint8_t* bytes) { - bytes[0] = (dword >> 24) & 0xFF; - bytes[1] = (dword >> 16) & 0xFF; - bytes[2] = (dword >> 8) & 0xFF; - bytes[3] = (dword >> 0) & 0xFF; -} - -uint32_t bytes_to_dword(uint8_t* bytes, uint8_t index) { return ((uint32_t)bytes[index + 0] << 24) | ((uint32_t)bytes[index + 1] << 16) | ((uint32_t)bytes[index + 2] << 8) | (uint32_t)bytes[index + 3]; } - -__attribute__((weak)) bool process_api_quantum(uint8_t length, uint8_t* data) { return process_api_keyboard(length, data); } - -__attribute__((weak)) bool process_api_keyboard(uint8_t length, uint8_t* data) { return process_api_user(length, data); } - -__attribute__((weak)) bool process_api_user(uint8_t length, uint8_t* data) { return true; } - -void process_api(uint16_t length, uint8_t* data) { - // SEND_STRING("\nRX: "); - // for (uint8_t i = 0; i < length; i++) { - // send_byte(data[i]); - // SEND_STRING(" "); - // } - if (!process_api_quantum(length, data)) return; - - switch (data[0]) { - case MT_SET_DATA: - switch (data[1]) { - case DT_DEFAULT_LAYER: { - eeconfig_update_default_layer(data[2]); - default_layer_set((uint32_t)(data[2])); - break; - } - case DT_KEYMAP_OPTIONS: { - eeconfig_update_keymap(data[2]); - break; - } - case DT_RGBLIGHT: { -#ifdef RGBLIGHT_ENABLE - uint32_t rgblight = bytes_to_dword(data, 2); - eeconfig_update_rgblight(rgblight); -#endif - break; - } - } - case MT_GET_DATA: - switch (data[1]) { - case DT_HANDSHAKE: { - MT_GET_DATA_ACK(DT_HANDSHAKE, NULL, 0); - break; - } - case DT_DEBUG: { - uint8_t debug_bytes[1] = {eeprom_read_byte(EECONFIG_DEBUG)}; - MT_GET_DATA_ACK(DT_DEBUG, debug_bytes, 1); - break; - } - case DT_DEFAULT_LAYER: { - uint8_t default_bytes[1] = {eeprom_read_byte(EECONFIG_DEFAULT_LAYER)}; - MT_GET_DATA_ACK(DT_DEFAULT_LAYER, default_bytes, 1); - break; - } - case DT_CURRENT_LAYER: { - uint8_t layer_state_bytes[4]; - dword_to_bytes(layer_state, layer_state_bytes); - MT_GET_DATA_ACK(DT_CURRENT_LAYER, layer_state_bytes, 4); - break; - } - case DT_AUDIO: { -#ifdef AUDIO_ENABLE - uint8_t audio_bytes[1] = {eeprom_read_byte(EECONFIG_AUDIO)}; - MT_GET_DATA_ACK(DT_AUDIO, audio_bytes, 1); -#else - MT_GET_DATA_ACK(DT_AUDIO, NULL, 0); -#endif - break; - } - case DT_BACKLIGHT: { -#ifdef BACKLIGHT_ENABLE - uint8_t backlight_bytes[1] = {eeprom_read_byte(EECONFIG_BACKLIGHT)}; - MT_GET_DATA_ACK(DT_BACKLIGHT, backlight_bytes, 1); -#else - MT_GET_DATA_ACK(DT_BACKLIGHT, NULL, 0); -#endif - break; - } - case DT_RGBLIGHT: { -#ifdef RGBLIGHT_ENABLE - uint8_t rgblight_bytes[4]; - dword_to_bytes(eeconfig_read_rgblight(), rgblight_bytes); - MT_GET_DATA_ACK(DT_RGBLIGHT, rgblight_bytes, 4); -#else - MT_GET_DATA_ACK(DT_RGBLIGHT, NULL, 0); -#endif - break; - } - case DT_KEYMAP_OPTIONS: { - uint8_t keymap_bytes[1] = {eeconfig_read_keymap()}; - MT_GET_DATA_ACK(DT_KEYMAP_OPTIONS, keymap_bytes, 1); - break; - } - case DT_KEYMAP_SIZE: { - uint8_t keymap_size[2] = {MATRIX_ROWS, MATRIX_COLS}; - MT_GET_DATA_ACK(DT_KEYMAP_SIZE, keymap_size, 2); - break; - } - // This may be too much - // case DT_KEYMAP: { - // uint8_t keymap_data[MATRIX_ROWS * MATRIX_COLS * 4 + 3]; - // keymap_data[0] = data[2]; - // keymap_data[1] = MATRIX_ROWS; - // keymap_data[2] = MATRIX_COLS; - // for (int i = 0; i < MATRIX_ROWS; i++) { - // for (int j = 0; j < MATRIX_COLS; j++) { - // keymap_data[3 + (i*MATRIX_COLS*2) + (j*2)] = pgm_read_word(&keymaps[data[2]][i][j]) >> 8; - // keymap_data[3 + (i*MATRIX_COLS*2) + (j*2) + 1] = pgm_read_word(&keymaps[data[2]][i][j]) & 0xFF; - // } - // } - // MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, MATRIX_ROWS * MATRIX_COLS * 4 + 3); - // // uint8_t keymap_data[5]; - // // keymap_data[0] = data[2]; - // // keymap_data[1] = data[3]; - // // keymap_data[2] = data[4]; - // // keymap_data[3] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) >> 8; - // // keymap_data[4] = pgm_read_word(&keymaps[data[2]][data[3]][data[4]]) & 0xFF; - - // // MT_GET_DATA_ACK(DT_KEYMAP, keymap_data, 5); - // break; - // } - default: - break; - } - break; - case MT_SET_DATA_ACK: - case MT_GET_DATA_ACK: - break; - case MT_SEND_DATA: - break; - case MT_SEND_DATA_ACK: - break; - case MT_EXE_ACTION: - break; - case MT_EXE_ACTION_ACK: - break; - case MT_TYPE_ERROR: - break; - default:; // command not recognised - SEND_BYTES(MT_TYPE_ERROR, DT_NONE, data, length); - break; - - // #ifdef RGBLIGHT_ENABLE - // case 0x27: ; // RGB LED functions - // switch (*data++) { - // case 0x00: ; // Update HSV - // rgblight_sethsv((data[0] << 8 | data[1]) % 360, data[2], data[3]); - // break; - // case 0x01: ; // Update RGB - // break; - // case 0x02: ; // Update mode - // rgblight_mode(data[0]); - // break; - // } - // break; - // #endif - } -} diff --git a/quantum/api.h b/quantum/api.h deleted file mode 100644 index 0a30e9d6cc8..00000000000 --- a/quantum/api.h +++ /dev/null @@ -1,55 +0,0 @@ -/* Copyright 2016 Jack Humbert - * - * 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/>. - */ - -#pragma once - -#ifdef __AVR__ -# include "lufa.h" -#endif - -enum MESSAGE_TYPE { - MT_GET_DATA = 0x10, // Get data from keyboard - MT_GET_DATA_ACK = 0x11, // returned data to process (ACK) - MT_SET_DATA = 0x20, // Set data on keyboard - MT_SET_DATA_ACK = 0x21, // returned data to confirm (ACK) - MT_SEND_DATA = 0x30, // Sending data/action from keyboard - MT_SEND_DATA_ACK = 0x31, // returned data/action confirmation (ACK) - MT_EXE_ACTION = 0x40, // executing actions on keyboard - MT_EXE_ACTION_ACK = 0x41, // return confirmation/value (ACK) - MT_TYPE_ERROR = 0x80 // type not recognised (ACK) -}; - -enum DATA_TYPE { DT_NONE = 0x00, DT_HANDSHAKE, DT_DEFAULT_LAYER, DT_CURRENT_LAYER, DT_KEYMAP_OPTIONS, DT_BACKLIGHT, DT_RGBLIGHT, DT_UNICODE, DT_DEBUG, DT_AUDIO, DT_QUANTUM_ACTION, DT_KEYBOARD_ACTION, DT_USER_ACTION, DT_KEYMAP_SIZE, DT_KEYMAP }; - -void dword_to_bytes(uint32_t dword, uint8_t* bytes); -uint32_t bytes_to_dword(uint8_t* bytes, uint8_t index); - -#define MT_GET_DATA(data_type, data, length) SEND_BYTES(MT_GET_DATA, data_type, data, length) -#define MT_GET_DATA_ACK(data_type, data, length) SEND_BYTES(MT_GET_DATA_ACK, data_type, data, length) -#define MT_SET_DATA(data_type, data, length) SEND_BYTES(MT_SET_DATA, data_type, data, length) -#define MT_SET_DATA_ACK(data_type, data, length) SEND_BYTES(MT_SET_DATA_ACK, data_type, data, length) -#define MT_SEND_DATA(data_type, data, length) SEND_BYTES(MT_SEND_DATA, data_type, data, length) -#define MT_SEND_DATA_ACK(data_type, data, length) SEND_BYTES(MT_SEND_DATA_ACK, data_type, data, length) -#define MT_EXE_ACTION(data_type, data, length) SEND_BYTES(MT_EXE_ACTION, data_type, data, length) -#define MT_EXE_ACTION_ACK(data_type, data, length) SEND_BYTES(MT_EXE_ACTION_ACK, data_type, data, length) - -void process_api(uint16_t length, uint8_t* data); - -__attribute__((weak)) bool process_api_quantum(uint8_t length, uint8_t* data); - -__attribute__((weak)) bool process_api_keyboard(uint8_t length, uint8_t* data); - -__attribute__((weak)) bool process_api_user(uint8_t length, uint8_t* data); diff --git a/quantum/api/api_sysex.c b/quantum/api/api_sysex.c deleted file mode 100644 index 07c90cf804b..00000000000 --- a/quantum/api/api_sysex.c +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright 2016 Jack Humbert, 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 "api_sysex.h" -#include "sysex_tools.h" -#include "print.h" -#include "qmk_midi.h" - -void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t* bytes, uint16_t length) { - // SEND_STRING("\nTX: "); - // for (uint8_t i = 0; i < length; i++) { - // send_byte(bytes[i]); - // SEND_STRING(" "); - // } - if (length > API_SYSEX_MAX_SIZE) { - xprintf("Sysex msg too big %d %d %d", message_type, data_type, length); - return; - } - - // The buffer size required is calculated as the following - // API_SYSEX_MAX_SIZE is the maximum length - // In addition to that we have a two byte message header consisting of the message_type and data_type - // This has to be encoded with an additional overhead of one byte for every starting 7 bytes - // We just add one extra byte in case it's not divisible by 7 - // Then we have an unencoded header consisting of 4 bytes - // Plus a one byte terminator - const unsigned message_header = 2; - const unsigned unencoded_message = API_SYSEX_MAX_SIZE + message_header; - const unsigned encoding_overhead = unencoded_message / 7 + 1; - const unsigned encoded_size = unencoded_message + encoding_overhead; - const unsigned unencoded_header = 4; - const unsigned terminator = 1; - const unsigned buffer_size = encoded_size + unencoded_header + terminator; - uint8_t buffer[encoded_size + unencoded_header + terminator]; - // The unencoded header - buffer[0] = 0xF0; - buffer[1] = 0x00; - buffer[2] = 0x00; - buffer[3] = 0x00; - - // We copy the message to the end of the array, this way we can do an inplace encoding, using the same - // buffer for both input and output - const unsigned message_size = length + message_header; - uint8_t* unencoded_start = buffer + buffer_size - message_size; - uint8_t* ptr = unencoded_start; - *(ptr++) = message_type; - *(ptr++) = data_type; - memcpy(ptr, bytes, length); - - unsigned encoded_length = sysex_encode(buffer + unencoded_header, unencoded_start, message_size); - unsigned final_size = unencoded_header + encoded_length + terminator; - buffer[final_size - 1] = 0xF7; - midi_send_array(&midi_device, final_size, buffer); - - // SEND_STRING("\nTD: "); - // for (uint8_t i = 0; i < encoded_length + 5; i++) { - // send_byte(buffer[i]); - // SEND_STRING(" "); - // } -} diff --git a/quantum/api/api_sysex.h b/quantum/api/api_sysex.h deleted file mode 100644 index eb0a18848db..00000000000 --- a/quantum/api/api_sysex.h +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright 2016 Jack Humbert - * - * 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/>. - */ - -#pragma once - -#include "api.h" - -#define API_SYSEX_MAX_SIZE 32 - -void send_bytes_sysex(uint8_t message_type, uint8_t data_type, uint8_t* bytes, uint16_t length); - -#define SEND_BYTES(mt, dt, b, l) send_bytes_sysex(mt, dt, b, l) diff --git a/quantum/audio/audio.h b/quantum/audio/audio.h index 56b9158a1a0..290d461f5a1 100644 --- a/quantum/audio/audio.h +++ b/quantum/audio/audio.h @@ -26,17 +26,12 @@ #if defined(__AVR__) # include <avr/io.h> -# if defined(AUDIO_DRIVER_PWM) -# include "driver_avr_pwm.h" -# endif #endif -#if defined(PROTOCOL_CHIBIOS) -# if defined(AUDIO_DRIVER_PWM) -# include "driver_chibios_pwm.h" -# elif defined(AUDIO_DRIVER_DAC) -# include "driver_chibios_dac.h" -# endif +#if defined(AUDIO_DRIVER_PWM) +# include "audio_pwm.h" +#elif defined(AUDIO_DRIVER_DAC) +# include "audio_dac.h" #endif typedef union { diff --git a/quantum/audio/driver_chibios_pwm_hardware.c b/quantum/audio/driver_chibios_pwm_hardware.c deleted file mode 100644 index 3c7d89b290b..00000000000 --- a/quantum/audio/driver_chibios_pwm_hardware.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright 2020 Jack Humbert - * Copyright 2020 JohSchneider - * - * 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/>. - */ - -/* -Audio Driver: PWM - -the duty-cycle is always kept at 50%, and the pwm-period is adjusted to match the frequency of a note to be played back. - -this driver uses the chibios-PWM system to produce a square-wave on specific output pins that are connected to the PWM hardware. -The hardware directly toggles the pin via its alternate function. see your MCUs data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function. - - */ - -#include "audio.h" -#include "ch.h" -#include "hal.h" - -#if !defined(AUDIO_PIN) -# error "Audio feature enabled, but no pin selected - see docs/feature_audio under the ARM PWM settings" -#endif - -extern bool playing_note; -extern bool playing_melody; -extern uint8_t note_timbre; - -static PWMConfig pwmCFG = { - .frequency = 100000, /* PWM clock frequency */ - // CHIBIOS-BUG? can't set the initial period to <2, or the pwm (hard or software) takes ~130ms with .frequency=500000 for a pwmChangePeriod to take effect; with no output=silence in the meantime - .period = 2, /* initial PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ - .callback = NULL, /* no callback, the hardware directly toggles the pin */ - .channels = - { -#if AUDIO_PWM_CHANNEL == 4 - {PWM_OUTPUT_DISABLED, NULL}, /* channel 0 -> TIMx_CH1 */ - {PWM_OUTPUT_DISABLED, NULL}, /* channel 1 -> TIMx_CH2 */ - {PWM_OUTPUT_DISABLED, NULL}, /* channel 2 -> TIMx_CH3 */ - {PWM_OUTPUT_ACTIVE_HIGH, NULL} /* channel 3 -> TIMx_CH4 */ -#elif AUDIO_PWM_CHANNEL == 3 - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH3 */ - {PWM_OUTPUT_DISABLED, NULL} -#elif AUDIO_PWM_CHANNEL == 2 - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH2 */ - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL} -#else /*fallback to CH1 */ - {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* TIMx_CH1 */ - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL}, - {PWM_OUTPUT_DISABLED, NULL} -#endif - }, -}; - -static float channel_1_frequency = 0.0f; -void channel_1_set_frequency(float freq) { - channel_1_frequency = freq; - - if (freq <= 0.0) // a pause/rest has freq=0 - return; - - pwmcnt_t period = (pwmCFG.frequency / freq); - pwmChangePeriod(&AUDIO_PWM_DRIVER, period); - pwmEnableChannel(&AUDIO_PWM_DRIVER, AUDIO_PWM_CHANNEL - 1, - // adjust the duty-cycle so that the output is for 'note_timbre' duration HIGH - PWM_PERCENTAGE_TO_WIDTH(&AUDIO_PWM_DRIVER, (100 - note_timbre) * 100)); -} - -float channel_1_get_frequency(void) { return channel_1_frequency; } - -void channel_1_start(void) { - pwmStop(&AUDIO_PWM_DRIVER); - pwmStart(&AUDIO_PWM_DRIVER, &pwmCFG); -} - -void channel_1_stop(void) { pwmStop(&AUDIO_PWM_DRIVER); } - -static void gpt_callback(GPTDriver *gptp); -GPTConfig gptCFG = { - /* a whole note is one beat, which is - per definition in musical_notes.h - set to 64 - the longest note is BREAVE_DOT=128+64=192, the shortest SIXTEENTH=4 - the tempo (which might vary!) is in bpm (beats per minute) - therefore: if the timer ticks away at .frequency = (60*64)Hz, - and the .interval counts from 64 downwards - audio_update_state is - called just often enough to not miss any notes - */ - .frequency = 60 * 64, - .callback = gpt_callback, -}; - -void audio_driver_initialize(void) { - pwmStart(&AUDIO_PWM_DRIVER, &pwmCFG); - - // connect the AUDIO_PIN to the PWM hardware -#if defined(USE_GPIOV1) // STM32F103C8 - palSetLineMode(AUDIO_PIN, PAL_MODE_STM32_ALTERNATE_PUSHPULL); -#else // GPIOv2 (or GPIOv3 for f4xx, which is the same/compatible at this command) - palSetLineMode(AUDIO_PIN, PAL_STM32_MODE_ALTERNATE | PAL_STM32_ALTERNATE(AUDIO_PWM_PAL_MODE)); -#endif - - gptStart(&AUDIO_STATE_TIMER, &gptCFG); -} - -void audio_driver_start(void) { - channel_1_stop(); - channel_1_start(); - - if (playing_note || playing_melody) { - gptStartContinuous(&AUDIO_STATE_TIMER, 64); - } -} - -void audio_driver_stop(void) { - channel_1_stop(); - gptStopTimer(&AUDIO_STATE_TIMER); -} - -/* a regular timer task, that checks the note to be currently played - * and updates the pwm to output that frequency - */ -static void gpt_callback(GPTDriver *gptp) { - float freq; // TODO: freq_alt - - if (audio_update_state()) { - freq = audio_get_processed_frequency(0); // freq_alt would be index=1 - channel_1_set_frequency(freq); - } -} diff --git a/quantum/audio/song_list.h b/quantum/audio/song_list.h index b54b397e1c4..8e80a016aa5 100644 --- a/quantum/audio/song_list.h +++ b/quantum/audio/song_list.h @@ -20,11 +20,9 @@ #include "musical_notes.h" -#if __GNUC__ > 5 // don't use for older gcc compilers since check isn't supported. -# if __has_include("user_song_list.h") -# include "user_song_list.h" -# endif // if file exists -#endif // __GNUC__ +#if __has_include("user_song_list.h") +# include "user_song_list.h" +#endif // if file exists #define NO_SOUND diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c index e47192de342..67b551dc3c7 100644 --- a/quantum/backlight/backlight_avr.c +++ b/quantum/backlight/backlight_avr.c @@ -199,13 +199,14 @@ static inline void disable_pwm(void) { // reaches the backlight level, where we turn off the LEDs, // but also an overflow interrupt when the counter rolls back to 0, // in which we're going to turn on the LEDs. -// The LED will then be on for OCRxx/0xFFFF time, adjusted every 244Hz. +// The LED will then be on for OCRxx/0xFFFF time, adjusted every 244Hz, +// or F_CPU/BACKLIGHT_CUSTOM_RESOLUTION if used. // Triggered when the counter reaches the OCRx value ISR(TIMERx_COMPA_vect) { backlight_pins_off(); } // Triggered when the counter reaches the TOP value -// this one triggers at F_CPU/65536 =~ 244 Hz +// this one triggers at F_CPU/ICRx = 16MHz/65536 =~ 244 Hz ISR(TIMERx_OVF_vect) { # ifdef BACKLIGHT_BREATHING if (is_breathing()) { @@ -220,7 +221,7 @@ ISR(TIMERx_OVF_vect) { // artifacts (especially while breathing, because breathing_task // takes many computation cycles). // so better not turn them on while the counter TOP is very low. - if (OCRxx > 256) { + if (OCRxx > ICRx / 250 + 5) { backlight_pins_on(); } } @@ -231,24 +232,26 @@ ISR(TIMERx_OVF_vect) { // See http://jared.geek.nz/2013/feb/linear-led-pwm static uint16_t cie_lightness(uint16_t v) { - if (v <= 5243) // if below 8% of max - return v / 9; // same as dividing by 900% - else { - uint32_t y = (((uint32_t)v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare - // to get a useful result with integer division, we shift left in the expression above - // and revert what we've done again after squaring. - y = y * y * y >> 8; - if (y > 0xFFFFUL) // prevent overflow - return 0xFFFFU; - else - return (uint16_t)y; + if (v <= ICRx / 12) // If the value is less than or equal to ~8% of max + { + return v / 9; // Same as dividing by 900% + } else { + // In the next two lines values are bit-shifted. This is to avoid loosing decimals in integer math. + uint32_t y = (((uint32_t)v + ICRx / 6) << 5) / (ICRx / 6 + ICRx); // If above 8%, add ~16% of max, and normalize with (max + ~16% max) + uint32_t out = (y * y * y * ICRx) >> 15; // Cube it and undo the bit-shifting. (which is now three times as much due to the cubing) + + if (out > ICRx) // Avoid overflows + { + out = ICRx; + } + return out; } } -// rescale the supplied backlight value to be in terms of the value limit +// rescale the supplied backlight value to be in terms of the value limit // range for val is [0..ICRx]. PWM pin is high while the timer count is below val. static uint32_t rescale_limit_val(uint32_t val) { return (val * (BACKLIGHT_LIMIT_VAL + 1)) / 256; } -// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val. +// range for val is [0..ICRx]. PWM pin is high while the timer count is below val. static inline void set_pwm(uint16_t val) { OCRxx = val; } void backlight_set(uint8_t level) { @@ -277,7 +280,7 @@ void backlight_set(uint8_t level) { #endif } // Set the brightness - set_pwm(cie_lightness(rescale_limit_val(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS))); + set_pwm(cie_lightness(rescale_limit_val(ICRx * (uint32_t)level / BACKLIGHT_LEVELS))); } void backlight_task(void) {} @@ -292,6 +295,11 @@ void backlight_task(void) {} static uint8_t breathing_halt = BREATHING_NO_HALT; static uint16_t breathing_counter = 0; +static uint8_t breath_scale_counter = 1; +/* Run the breathing loop at ~120Hz*/ +const uint8_t breathing_ISR_frequency = 120; +static uint16_t breathing_freq_scale_factor = 2; + # ifdef BACKLIGHT_PWM_TIMER static bool breathing = false; @@ -323,9 +331,9 @@ bool is_breathing(void) { return !!(TIMSKx & _BV(TOIEx)); } do { \ breathing_counter = 0; \ } while (0) -# define breathing_max() \ - do { \ - breathing_counter = get_breathing_period() * 244 / 2; \ +# define breathing_max() \ + do { \ + breathing_counter = get_breathing_period() * breathing_ISR_frequency / 2; \ } while (0) void breathing_enable(void) { @@ -369,21 +377,30 @@ void breathing_task(void) # else /* Assuming a 16MHz CPU clock and a timer that resets at 64k (ICR1), the following interrupt handler will run * about 244 times per second. + * + * The following ISR runs at F_CPU/ISRx. With a 16MHz clock and default pwm resolution, that means 244Hz */ ISR(TIMERx_OVF_vect) # endif { - uint8_t breathing_period = get_breathing_period(); - uint16_t interval = (uint16_t)breathing_period * 244 / BREATHING_STEPS; + + // Only run this ISR at ~120 Hz + if (breath_scale_counter++ == breathing_freq_scale_factor) { + breath_scale_counter = 1; + } else { + return; + } + uint16_t interval = (uint16_t)get_breathing_period() * breathing_ISR_frequency / BREATHING_STEPS; // resetting after one period to prevent ugly reset at overflow. - breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + breathing_counter = (breathing_counter + 1) % (get_breathing_period() * breathing_ISR_frequency); uint8_t index = breathing_counter / interval % BREATHING_STEPS; if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) { breathing_interrupt_disable(); } - set_pwm(cie_lightness(rescale_limit_val(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * 0x0101U)))); + // Set PWM to a brightnessvalue scaled to the configured resolution + set_pwm(cie_lightness(rescale_limit_val(scale_backlight((uint16_t)pgm_read_byte(&breathing_table[index]) * ICRx / 255)))); } #endif // BACKLIGHT_BREATHING @@ -413,16 +430,23 @@ void backlight_init_ports(void) { "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." */ -# if BACKLIGHT_ON_STATE == 1 - TCCRxA = _BV(COMxx1) | _BV(WGM11); -# else - TCCRxA = _BV(COMxx1) | _BV(COMxx0) | _BV(WGM11); -# endif - - TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); + TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; + TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; #endif - // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. + +#ifdef BACKLIGHT_CUSTOM_RESOLUTION +# if (BACKLIGHT_CUSTOM_RESOLUTION > 0xFFFF || BACKLIGHT_CUSTOM_RESOLUTION < 1) +# error "This out of range of the timer capabilities" +# elif (BACKLIGHT_CUSTOM_RESOLUTION < 0xFF) +# warning "Resolution lower than 0xFF isn't recommended" +# endif +# ifdef BACKLIGHT_BREATHING + breathing_freq_scale_factor = F_CPU / BACKLIGHT_CUSTOM_RESOLUTION / 120; +# endif + ICRx = BACKLIGHT_CUSTOM_RESOLUTION; +#else ICRx = TIMER_TOP; +#endif backlight_init(); #ifdef BACKLIGHT_BREATHING diff --git a/quantum/backlight/backlight_chibios.c b/quantum/backlight/backlight_chibios.c index 4d5a69e14e3..7c6edd10d6e 100644 --- a/quantum/backlight/backlight_chibios.c +++ b/quantum/backlight/backlight_chibios.c @@ -8,9 +8,13 @@ # define BACKLIGHT_LIMIT_VAL 255 #endif -// GPIOV2 && GPIOV3 #ifndef BACKLIGHT_PAL_MODE -# define BACKLIGHT_PAL_MODE 2 +# if defined(USE_GPIOV1) +# define BACKLIGHT_PAL_MODE PAL_MODE_ALTERNATE_PUSHPULL +# else +// GPIOV2 && GPIOV3 +# define BACKLIGHT_PAL_MODE 5 +# endif #endif // GENERIC @@ -70,7 +74,7 @@ static uint32_t rescale_limit_val(uint32_t val) { void backlight_init_ports(void) { #ifdef USE_GPIOV1 - palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL); + palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), BACKLIGHT_PAL_MODE); #else palSetPadMode(PAL_PORT(BACKLIGHT_PIN), PAL_PAD(BACKLIGHT_PIN), PAL_MODE_ALTERNATE(BACKLIGHT_PAL_MODE)); #endif diff --git a/quantum/config_common.h b/quantum/config_common.h index 661609ef2ae..d93477b27e0 100644 --- a/quantum/config_common.h +++ b/quantum/config_common.h @@ -24,7 +24,4 @@ #define COL2ROW 0 #define ROW2COL 1 -// Deprecated alias - avoid using -#define KEYMAP LAYOUT - #include "song_list.h" diff --git a/quantum/debounce/tests/rules.mk b/quantum/debounce/tests/rules.mk index 66928d7eb63..e908dd6f67e 100644 --- a/quantum/debounce/tests/rules.mk +++ b/quantum/debounce/tests/rules.mk @@ -16,7 +16,7 @@ DEBOUNCE_COMMON_DEFS := -DMATRIX_ROWS=4 -DMATRIX_COLS=10 -DDEBOUNCE=5 DEBOUNCE_COMMON_SRC := $(QUANTUM_PATH)/debounce/tests/debounce_test_common.cpp \ - $(TMK_PATH)/common/test/timer.c + $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c debounce_sym_defer_g_DEFS := $(DEBOUNCE_COMMON_DEFS) debounce_sym_defer_g_SRC := $(DEBOUNCE_COMMON_SRC) \ diff --git a/quantum/deferred_exec.c b/quantum/deferred_exec.c new file mode 100644 index 00000000000..5b0a5b14258 --- /dev/null +++ b/quantum/deferred_exec.c @@ -0,0 +1,152 @@ +// Copyright 2021 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include <stddef.h> +#include <timer.h> +#include <deferred_exec.h> + +#ifndef MAX_DEFERRED_EXECUTORS +# define MAX_DEFERRED_EXECUTORS 8 +#endif + +typedef struct deferred_executor_t { + deferred_token token; + uint32_t trigger_time; + deferred_exec_callback callback; + void * cb_arg; +} deferred_executor_t; + +static deferred_token current_token = 0; +static uint32_t last_deferred_exec_check = 0; +static deferred_executor_t executors[MAX_DEFERRED_EXECUTORS] = {0}; + +static inline bool token_can_be_used(deferred_token token) { + if (token == INVALID_DEFERRED_TOKEN) { + return false; + } + for (int i = 0; i < MAX_DEFERRED_EXECUTORS; ++i) { + if (executors[i].token == token) { + return false; + } + } + return true; +} + +static inline deferred_token allocate_token(void) { + deferred_token first = ++current_token; + while (!token_can_be_used(current_token)) { + ++current_token; + if (current_token == first) { + // If we've looped back around to the first, everything is already allocated (yikes!). Need to exit with a failure. + return INVALID_DEFERRED_TOKEN; + } + } + return current_token; +} + +deferred_token defer_exec(uint32_t delay_ms, deferred_exec_callback callback, void *cb_arg) { + // Ignore queueing if it's a zero-time delay, or invalid callback + if (delay_ms == 0 || !callback) { + return INVALID_DEFERRED_TOKEN; + } + + // Find an unused slot and claim it + for (int i = 0; i < MAX_DEFERRED_EXECUTORS; ++i) { + deferred_executor_t *entry = &executors[i]; + if (entry->token == INVALID_DEFERRED_TOKEN) { + // Work out the new token value, dropping out if none were available + deferred_token token = allocate_token(); + if (token == INVALID_DEFERRED_TOKEN) { + return false; + } + + // Set up the executor table entry + entry->token = current_token; + entry->trigger_time = timer_read32() + delay_ms; + entry->callback = callback; + entry->cb_arg = cb_arg; + return current_token; + } + } + + // None available + return INVALID_DEFERRED_TOKEN; +} + +bool extend_deferred_exec(deferred_token token, uint32_t delay_ms) { + // Ignore queueing if it's a zero-time delay, or the token is not valid + if (delay_ms == 0 || token == INVALID_DEFERRED_TOKEN) { + return false; + } + + // Find the entry corresponding to the token + for (int i = 0; i < MAX_DEFERRED_EXECUTORS; ++i) { + deferred_executor_t *entry = &executors[i]; + if (entry->token == token) { + // Found it, extend the delay + entry->trigger_time = timer_read32() + delay_ms; + return true; + } + } + + // Not found + return false; +} + +bool cancel_deferred_exec(deferred_token token) { + // Ignore request if the token is not valid + if (token == INVALID_DEFERRED_TOKEN) { + return false; + } + + // Find the entry corresponding to the token + for (int i = 0; i < MAX_DEFERRED_EXECUTORS; ++i) { + deferred_executor_t *entry = &executors[i]; + if (entry->token == token) { + // Found it, cancel and clear the table entry + entry->token = INVALID_DEFERRED_TOKEN; + entry->trigger_time = 0; + entry->callback = NULL; + entry->cb_arg = NULL; + return true; + } + } + + // Not found + return false; +} + +void deferred_exec_task(void) { + uint32_t now = timer_read32(); + + // Throttle only once per millisecond + if (((int32_t)TIMER_DIFF_32(now, last_deferred_exec_check)) > 0) { + last_deferred_exec_check = now; + + // Run through each of the executors + for (int i = 0; i < MAX_DEFERRED_EXECUTORS; ++i) { + deferred_executor_t *entry = &executors[i]; + + // Check if we're supposed to execute this entry + if (entry->token != INVALID_DEFERRED_TOKEN && ((int32_t)TIMER_DIFF_32(entry->trigger_time, now)) <= 0) { + // Invoke the callback and work work out if we should be requeued + uint32_t delay_ms = entry->callback(entry->trigger_time, entry->cb_arg); + + // Update the trigger time if we have to repeat, otherwise clear it out + if (delay_ms > 0) { + // Intentionally add just the delay to the existing trigger time -- this ensures the next + // invocation is with respect to the previous trigger, rather than when it got to execution. Under + // normal circumstances this won't cause issue, but if another executor is invoked that takes a + // considerable length of time, then this ensures best-effort timing between invocations. + entry->trigger_time += delay_ms; + } else { + // If it was zero, then the callback is cancelling repeated execution. Free up the slot. + entry->token = INVALID_DEFERRED_TOKEN; + entry->trigger_time = 0; + entry->callback = NULL; + entry->cb_arg = NULL; + } + } + } + } +} diff --git a/quantum/deferred_exec.h b/quantum/deferred_exec.h new file mode 100644 index 00000000000..f80d353169b --- /dev/null +++ b/quantum/deferred_exec.h @@ -0,0 +1,38 @@ +// Copyright 2021 Nick Brassel (@tzarc) +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +// A token that can be used to cancel an existing deferred execution. +typedef uint8_t deferred_token; +#define INVALID_DEFERRED_TOKEN 0 + +// Callback to execute. +// -- Parameter trigger_time: the intended trigger time to execute the callback -- equivalent time-space as timer_read32() +// cb_arg: the callback argument specified when enqueueing the deferred executor +// -- Return value: Non-zero re-queues the callback to execute after the returned number of milliseconds. Zero cancels repeated execution. +typedef uint32_t (*deferred_exec_callback)(uint32_t trigger_time, void *cb_arg); + +// Configures the supplied deferred executor to be executed after the required number of milliseconds. +// -- Parameter delay_ms: the number of milliseconds before executing the callback +// -- callback: the executor to invoke +// -- cb_arg: the argument to pass to the executor, may be NULL if unused by the executor +// -- Return value: a token usable for cancellation, or INVALID_DEFERRED_TOKEN if an error occurred +deferred_token defer_exec(uint32_t delay_ms, deferred_exec_callback callback, void *cb_arg); + +// Allows for extending the timeframe before an existing deferred execution is invoked. +// -- Parameter token: the returned value from defer_exec for the deferred execution you wish to extend. +// -- delay_ms: the new delay (with respect to the current time) +// -- Return value: if the token was found, and the delay was extended +bool extend_deferred_exec(deferred_token token, uint32_t delay_ms); + +// Allows for cancellation of an existing deferred execution. +// -- Parameter token: the returned value from defer_exec for the deferred execution you wish to cancel. +// -- Return value: if the token was found, and the executor was cancelled +bool cancel_deferred_exec(deferred_token token); + +// Forward declaration for the main loop in order to execute any deferred executors. Should not be invoked by keyboard/user code. +void deferred_exec_task(void); diff --git a/quantum/dynamic_keymap.c b/quantum/dynamic_keymap.c index b7a9f2662cc..f5525576d82 100644 --- a/quantum/dynamic_keymap.c +++ b/quantum/dynamic_keymap.c @@ -16,7 +16,7 @@ #include "config.h" #include "keymap.h" // to get keymaps[][][] -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "progmem.h" // to read default from flash #include "quantum.h" // for send_string() #include "dynamic_keymap.h" diff --git a/quantum/eeconfig.c b/quantum/eeconfig.c index 92f0ac44399..4c2ad2490ce 100644 --- a/quantum/eeconfig.c +++ b/quantum/eeconfig.c @@ -4,11 +4,6 @@ #include "eeconfig.h" #include "action_layer.h" -#ifdef STM32_EEPROM_ENABLE -# include <hal.h> -# include "eeprom_stm32.h" -#endif - #if defined(EEPROM_DRIVER) # include "eeprom_driver.h" #endif @@ -43,9 +38,6 @@ __attribute__((weak)) void eeconfig_init_kb(void) { * FIXME: needs doc */ void eeconfig_init_quantum(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif #if defined(EEPROM_DRIVER) eeprom_driver_erase(); #endif @@ -111,9 +103,6 @@ void eeconfig_enable(void) { eeprom_update_word(EECONFIG_MAGIC, EECONFIG_MAGIC_N * FIXME: needs doc */ void eeconfig_disable(void) { -#ifdef STM32_EEPROM_ENABLE - EEPROM_Erase(); -#endif #if defined(EEPROM_DRIVER) eeprom_driver_erase(); #endif diff --git a/quantum/eeconfig.h b/quantum/eeconfig.h index bd39971b2c5..22d874273c0 100644 --- a/quantum/eeconfig.h +++ b/quantum/eeconfig.h @@ -111,3 +111,29 @@ void eeconfig_update_haptic(uint32_t val); bool eeconfig_read_handedness(void); void eeconfig_update_handedness(bool val); + +#define EECONFIG_DEBOUNCE_HELPER(name, offset, config) \ + static uint8_t dirty_##name = false; \ + \ + static inline void eeconfig_init_##name(void) { \ + eeprom_read_block(&config, offset, sizeof(config)); \ + dirty_##name = false; \ + } \ + static inline void eeconfig_flush_##name(bool force) { \ + if (force || dirty_##name) { \ + eeprom_update_block(&config, offset, sizeof(config)); \ + dirty_##name = false; \ + } \ + } \ + static inline void eeconfig_flush_##name##_task(uint16_t timeout) { \ + static uint16_t flush_timer = 0; \ + if (timer_elapsed(flush_timer) > timeout) { \ + eeconfig_flush_##name(false); \ + flush_timer = timer_read(); \ + } \ + } \ + static inline void eeconfig_flag_##name(bool v) { dirty_##name |= v; } \ + static inline void eeconfig_write_##name(typeof(config) conf) { \ + memcpy(&config, &conf, sizeof(config)); \ + eeconfig_flag_##name(true); \ + } diff --git a/quantum/encoder/tests/encoder_tests.cpp b/quantum/encoder/tests/encoder_tests.cpp new file mode 100644 index 00000000000..1888fdab8d0 --- /dev/null +++ b/quantum/encoder/tests/encoder_tests.cpp @@ -0,0 +1,144 @@ +/* Copyright 2021 Balz Guenat + * + * 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 "gtest/gtest.h" +#include "gmock/gmock.h" +#include <vector> +#include <algorithm> +#include <stdio.h> + +extern "C" { +#include "encoder.h" +#include "encoder/tests/mock.h" +} + +struct update { + int8_t index; + bool clockwise; +}; + +uint8_t uidx = 0; +update updates[32]; + +bool encoder_update_kb(uint8_t index, bool clockwise) { + updates[uidx % 32] = {index, clockwise}; + uidx++; + return true; +} + +bool setAndRead(pin_t pin, bool val) { + setPin(pin, val); + return encoder_read(); +} + +class EncoderTest : public ::testing::Test {}; + +TEST_F(EncoderTest, TestInit) { + uidx = 0; + encoder_init(); + EXPECT_EQ(pinIsInputHigh[0], true); + EXPECT_EQ(pinIsInputHigh[1], true); + EXPECT_EQ(uidx, 0); +} + +TEST_F(EncoderTest, TestOneClockwise) { + uidx = 0; + encoder_init(); + // send 4 pulses. with resolution 4, that's one step and we should get 1 update. + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + setAndRead(1, true); + + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, true); +} + +TEST_F(EncoderTest, TestOneCounterClockwise) { + uidx = 0; + encoder_init(); + setAndRead(1, false); + setAndRead(0, false); + setAndRead(1, true); + setAndRead(0, true); + + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, false); +} + +TEST_F(EncoderTest, TestTwoClockwiseOneCC) { + uidx = 0; + encoder_init(); + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + setAndRead(1, true); + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + setAndRead(1, true); + setAndRead(1, false); + setAndRead(0, false); + setAndRead(1, true); + setAndRead(0, true); + + EXPECT_EQ(uidx, 3); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, true); + EXPECT_EQ(updates[1].index, 0); + EXPECT_EQ(updates[1].clockwise, true); + EXPECT_EQ(updates[2].index, 0); + EXPECT_EQ(updates[2].clockwise, false); +} + +TEST_F(EncoderTest, TestNoEarly) { + uidx = 0; + encoder_init(); + // send 3 pulses. with resolution 4, that's not enough for a step. + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + EXPECT_EQ(uidx, 0); + // now send last pulse + setAndRead(1, true); + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, true); +} + +TEST_F(EncoderTest, TestHalfway) { + uidx = 0; + encoder_init(); + // go halfway + setAndRead(0, false); + setAndRead(1, false); + EXPECT_EQ(uidx, 0); + // back off + setAndRead(1, true); + setAndRead(0, true); + EXPECT_EQ(uidx, 0); + // go all the way + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + setAndRead(1, true); + // should result in 1 update + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, true); +} diff --git a/quantum/encoder/tests/encoder_tests_split.cpp b/quantum/encoder/tests/encoder_tests_split.cpp new file mode 100644 index 00000000000..25e52c83f9d --- /dev/null +++ b/quantum/encoder/tests/encoder_tests_split.cpp @@ -0,0 +1,143 @@ +/* Copyright 2021 Balz Guenat + * + * 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 "gtest/gtest.h" +#include "gmock/gmock.h" +#include <vector> +#include <algorithm> +#include <stdio.h> + +extern "C" { +#include "encoder.h" +#include "encoder/tests/mock_split.h" +} + +struct update { + int8_t index; + bool clockwise; +}; + +uint8_t uidx = 0; +update updates[32]; + +bool isLeftHand; + +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!isLeftHand) { + // this method has no effect on slave half + printf("ignoring update on right hand (%d,%s)\n", index, clockwise ? "CW" : "CC"); + return true; + } + updates[uidx % 32] = {index, clockwise}; + uidx++; + return true; +} + +bool setAndRead(pin_t pin, bool val) { + setPin(pin, val); + return encoder_read(); +} + +class EncoderTest : public ::testing::Test { + protected: + void SetUp() override { + uidx = 0; + for (int i = 0; i < 32; i++) { + pinIsInputHigh[i] = 0; + pins[i] = 0; + } + } +}; + +TEST_F(EncoderTest, TestInitLeft) { + isLeftHand = true; + encoder_init(); + EXPECT_EQ(pinIsInputHigh[0], true); + EXPECT_EQ(pinIsInputHigh[1], true); + EXPECT_EQ(pinIsInputHigh[2], false); + EXPECT_EQ(pinIsInputHigh[3], false); + EXPECT_EQ(uidx, 0); +} + +TEST_F(EncoderTest, TestInitRight) { + isLeftHand = false; + encoder_init(); + EXPECT_EQ(pinIsInputHigh[0], false); + EXPECT_EQ(pinIsInputHigh[1], false); + EXPECT_EQ(pinIsInputHigh[2], true); + EXPECT_EQ(pinIsInputHigh[3], true); + EXPECT_EQ(uidx, 0); +} + +TEST_F(EncoderTest, TestOneClockwiseLeft) { + isLeftHand = true; + encoder_init(); + // send 4 pulses. with resolution 4, that's one step and we should get 1 update. + setAndRead(0, false); + setAndRead(1, false); + setAndRead(0, true); + setAndRead(1, true); + + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 0); + EXPECT_EQ(updates[0].clockwise, true); +} + +TEST_F(EncoderTest, TestOneClockwiseRightSent) { + isLeftHand = false; + encoder_init(); + // send 4 pulses. with resolution 4, that's one step and we should get 1 update. + setAndRead(2, false); + setAndRead(3, false); + setAndRead(2, true); + setAndRead(3, true); + + uint8_t slave_state[2] = {0}; + encoder_state_raw(slave_state); + + EXPECT_EQ((int8_t)slave_state[0], -1); +} + +/* this test will not work after the previous test. + * this is due to encoder_value[1] already being set to -1 when simulating the right half. + * When we now receive this update acting as the left half, there is no change. + * This is hard to mock, as the static values inside encoder.c normally exist twice, once on each half, + * but here, they only exist once. + */ + +// TEST_F(EncoderTest, TestOneClockwiseRightReceived) { +// isLeftHand = true; +// encoder_init(); + +// uint8_t slave_state[2] = {255, 0}; +// encoder_update_raw(slave_state); + +// EXPECT_EQ(uidx, 1); +// EXPECT_EQ(updates[0].index, 1); +// EXPECT_EQ(updates[0].clockwise, true); +// } + +TEST_F(EncoderTest, TestOneCounterClockwiseRightReceived) { + isLeftHand = true; + encoder_init(); + + uint8_t slave_state[2] = {0, 0}; + encoder_update_raw(slave_state); + + EXPECT_EQ(uidx, 1); + EXPECT_EQ(updates[0].index, 1); + EXPECT_EQ(updates[0].clockwise, false); +} diff --git a/quantum/encoder/tests/mock.c b/quantum/encoder/tests/mock.c new file mode 100644 index 00000000000..d0506a938f7 --- /dev/null +++ b/quantum/encoder/tests/mock.c @@ -0,0 +1,34 @@ +/* Copyright 2021 Balz Guenat + * + * 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 "mock.h" + +bool pins[32] = {0}; +bool pinIsInputHigh[32] = {0}; + +uint8_t mockSetPinInputHigh(pin_t pin) { + // dprintf("Setting pin %d input high.", pin); + pins[pin] = true; + pinIsInputHigh[pin] = true; + return 0; +} + +bool mockReadPin(pin_t pin) { return pins[pin]; } + +bool setPin(pin_t pin, bool val) { + pins[pin] = val; + return val; +} diff --git a/quantum/encoder/tests/mock.h b/quantum/encoder/tests/mock.h new file mode 100644 index 00000000000..dbc25a08461 --- /dev/null +++ b/quantum/encoder/tests/mock.h @@ -0,0 +1,40 @@ +/* Copyright 2021 Balz Guenat + * + * 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/>. + */ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +/* Here, "pins" from 0 to 31 are allowed. */ +#define ENCODERS_PAD_A \ + { 0 } +#define ENCODERS_PAD_B \ + { 1 } + +typedef uint8_t pin_t; + +extern bool pins[]; +extern bool pinIsInputHigh[]; + +#define setPinInputHigh(pin) (mockSetPinInputHigh(pin)) +#define readPin(pin) (mockReadPin(pin)) + +uint8_t mockSetPinInputHigh(pin_t pin); + +bool mockReadPin(pin_t pin); + +bool setPin(pin_t pin, bool val); diff --git a/quantum/encoder/tests/mock_split.c b/quantum/encoder/tests/mock_split.c new file mode 100644 index 00000000000..68bf3af5992 --- /dev/null +++ b/quantum/encoder/tests/mock_split.c @@ -0,0 +1,36 @@ +/* Copyright 2021 Balz Guenat + * + * 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 "mock_split.h" + +bool pins[32] = {0}; +bool pinIsInputHigh[32] = {0}; + +uint8_t mockSetPinInputHigh(pin_t pin) { + // dprintf("Setting pin %d input high.", pin); + pins[pin] = true; + pinIsInputHigh[pin] = true; + return 0; +} + +bool mockReadPin(pin_t pin) { return pins[pin]; } + +bool setPin(pin_t pin, bool val) { + pins[pin] = val; + return val; +} + +void last_encoder_activity_trigger(void) {} diff --git a/quantum/encoder/tests/mock_split.h b/quantum/encoder/tests/mock_split.h new file mode 100644 index 00000000000..0ae62652f97 --- /dev/null +++ b/quantum/encoder/tests/mock_split.h @@ -0,0 +1,48 @@ +/* Copyright 2021 Balz Guenat + * + * 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/>. + */ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> + +#define SPLIT_KEYBOARD +/* Here, "pins" from 0 to 31 are allowed. */ +#define ENCODERS_PAD_A \ + { 0 } +#define ENCODERS_PAD_B \ + { 1 } +#define ENCODERS_PAD_A_RIGHT \ + { 2 } +#define ENCODERS_PAD_B_RIGHT \ + { 3 } + +typedef uint8_t pin_t; +extern bool isLeftHand; +void encoder_state_raw(uint8_t* slave_state); +void encoder_update_raw(uint8_t* slave_state); + +extern bool pins[]; +extern bool pinIsInputHigh[]; + +#define setPinInputHigh(pin) (mockSetPinInputHigh(pin)) +#define readPin(pin) (mockReadPin(pin)) + +uint8_t mockSetPinInputHigh(pin_t pin); + +bool mockReadPin(pin_t pin); + +bool setPin(pin_t pin, bool val); diff --git a/quantum/encoder/tests/rules.mk b/quantum/encoder/tests/rules.mk new file mode 100644 index 00000000000..b826ce3aede --- /dev/null +++ b/quantum/encoder/tests/rules.mk @@ -0,0 +1,13 @@ +encoder_DEFS := -DENCODER_MOCK_SINGLE + +encoder_SRC := \ + $(QUANTUM_PATH)/encoder/tests/mock.c \ + $(QUANTUM_PATH)/encoder/tests/encoder_tests.cpp \ + $(QUANTUM_PATH)/encoder.c + +encoder_split_DEFS := -DENCODER_MOCK_SPLIT + +encoder_split_SRC := \ + $(QUANTUM_PATH)/encoder/tests/mock_split.c \ + $(QUANTUM_PATH)/encoder/tests/encoder_tests_split.cpp \ + $(QUANTUM_PATH)/encoder.c diff --git a/quantum/encoder/tests/testlist.mk b/quantum/encoder/tests/testlist.mk new file mode 100644 index 00000000000..1be9f4a0548 --- /dev/null +++ b/quantum/encoder/tests/testlist.mk @@ -0,0 +1,3 @@ +TEST_LIST += \ + encoder \ + encoder_split diff --git a/quantum/haptic.c b/quantum/haptic.c index 65abcc15fa0..f915acf9464 100644 --- a/quantum/haptic.c +++ b/quantum/haptic.c @@ -17,6 +17,8 @@ #include "haptic.h" #include "eeconfig.h" #include "debug.h" +#include "usb_device_state.h" +#include "gpio.h" #ifdef DRV2605L # include "DRV2605L.h" #endif @@ -26,6 +28,29 @@ haptic_config_t haptic_config; +static void update_haptic_enable_gpios(void) { + if (haptic_config.enable && ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED))) { +#if defined(HAPTIC_ENABLE_PIN) + HAPTIC_ENABLE_PIN_WRITE_ACTIVE(); +#endif +#if defined(HAPTIC_ENABLE_STATUS_LED) + HAPTIC_ENABLE_STATUS_LED_WRITE_ACTIVE(); +#endif + } else { +#if defined(HAPTIC_ENABLE_PIN) + HAPTIC_ENABLE_PIN_WRITE_INACTIVE(); +#endif +#if defined(HAPTIC_ENABLE_STATUS_LED) + HAPTIC_ENABLE_STATUS_LED_WRITE_INACTIVE(); +#endif + } +} + +static void set_haptic_config_enable(bool enabled) { + haptic_config.enable = enabled; + update_haptic_enable_gpios(); +} + void haptic_init(void) { if (!eeconfig_is_enabled()) { eeconfig_init(); @@ -44,6 +69,10 @@ void haptic_init(void) { // or the previous firmware didn't have solenoid enabled, // and the current one has solenoid enabled. haptic_reset(); + } else { + // Haptic configuration has been loaded through the "raw" union item. + // This is to execute any side effects of the configuration. + set_haptic_config_enable(haptic_config.enable); } #ifdef SOLENOID_ENABLE solenoid_setup(); @@ -54,6 +83,12 @@ void haptic_init(void) { dprintf("DRV2605 driver initialized\n"); #endif eeconfig_debug_haptic(); +#ifdef HAPTIC_ENABLE_PIN + setPinOutput(HAPTIC_ENABLE_PIN); +#endif +#ifdef HAPTIC_ENABLE_STATUS_LED + setPinOutput(HAPTIC_ENABLE_STATUS_LED); +#endif } void haptic_task(void) { @@ -69,13 +104,13 @@ void eeconfig_debug_haptic(void) { } void haptic_enable(void) { - haptic_config.enable = 1; + set_haptic_config_enable(true); xprintf("haptic_config.enable = %u\n", haptic_config.enable); eeconfig_update_haptic(haptic_config.raw); } void haptic_disable(void) { - haptic_config.enable = 0; + set_haptic_config_enable(false); xprintf("haptic_config.enable = %u\n", haptic_config.enable); eeconfig_update_haptic(haptic_config.raw); } @@ -157,7 +192,7 @@ void haptic_dwell_decrease(void) { } void haptic_reset(void) { - haptic_config.enable = true; + set_haptic_config_enable(true); uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT; haptic_config.feedback = feedback; #ifdef DRV2605L @@ -293,3 +328,13 @@ void haptic_shutdown(void) { solenoid_shutdown(); #endif } + +void haptic_notify_usb_device_state_change(void) { + update_haptic_enable_gpios(); +#if defined(HAPTIC_ENABLE_PIN) + setPinOutput(HAPTIC_ENABLE_PIN); +#endif +#if defined(HAPTIC_ENABLE_STATUS_LED) + setPinOutput(HAPTIC_ENABLE_STATUS_LED); +#endif +} diff --git a/quantum/haptic.h b/quantum/haptic.h index fc7ca2f3e63..7d70a013337 100644 --- a/quantum/haptic.h +++ b/quantum/haptic.h @@ -75,3 +75,30 @@ void haptic_cont_decrease(void); void haptic_play(void); void haptic_shutdown(void); +void haptic_notify_usb_device_state_change(void); + +#ifdef HAPTIC_ENABLE_PIN_ACTIVE_LOW +# ifndef HAPTIC_ENABLE_PIN +# error HAPTIC_ENABLE_PIN not defined +# endif +# define HAPTIC_ENABLE_PIN_WRITE_ACTIVE() writePinLow(HAPTIC_ENABLE_PIN) +# define HAPTIC_ENABLE_PIN_WRITE_INACTIVE() writePinHigh(HAPTIC_ENABLE_PIN) +#else +# define HAPTIC_ENABLE_PIN_WRITE_ACTIVE() writePinHigh(HAPTIC_ENABLE_PIN) +# define HAPTIC_ENABLE_PIN_WRITE_INACTIVE() writePinLow(HAPTIC_ENABLE_PIN) +#endif + +#ifdef HAPTIC_ENABLE_STATUS_LED_ACTIVE_LOW +# ifndef HAPTIC_ENABLE_STATUS_LED +# error HAPTIC_ENABLE_STATUS_LED not defined +# endif +# define HAPTIC_ENABLE_STATUS_LED_WRITE_ACTIVE() writePinLow(HAPTIC_ENABLE_STATUS_LED) +# define HAPTIC_ENABLE_STATUS_LED_WRITE_INACTIVE() writePinHigh(HAPTIC_ENABLE_STATUS_LED) +#else +# define HAPTIC_ENABLE_STATUS_LED_WRITE_ACTIVE() writePinHigh(HAPTIC_ENABLE_STATUS_LED) +# define HAPTIC_ENABLE_STATUS_LED_WRITE_INACTIVE() writePinLow(HAPTIC_ENABLE_STATUS_LED) +#endif + +#ifndef HAPTIC_OFF_IN_LOW_POWER +# define HAPTIC_OFF_IN_LOW_POWER 0 +#endif diff --git a/quantum/keyboard.c b/quantum/keyboard.c index b98fc64e453..3bca05aab7c 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -40,12 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef PS2_MOUSE_ENABLE # include "ps2_mouse.h" #endif -#ifdef SERIAL_MOUSE_ENABLE -# include "serial_mouse.h" -#endif -#ifdef ADB_MOUSE_ENABLE -# include "adb.h" -#endif #ifdef RGBLIGHT_ENABLE # include "rgblight.h" #endif @@ -61,12 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef STENO_ENABLE # include "process_steno.h" #endif -#ifdef SERIAL_LINK_ENABLE -# include "serial_link/system/serial_link.h" -#endif -#ifdef VISUALIZER_ENABLE -# include "visualizer/visualizer.h" -#endif #ifdef POINTING_DEVICE_ENABLE # include "pointing_device.h" #endif @@ -76,12 +64,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef JOYSTICK_ENABLE # include "process_joystick.h" #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE +# include "programmable_button.h" +#endif #ifdef HD44780_ENABLE # include "hd44780.h" #endif -#ifdef QWIIC_ENABLE -# include "qwiic.h" -#endif #ifdef OLED_ENABLE # include "oled_driver.h" #endif @@ -97,9 +85,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef DIP_SWITCH_ENABLE # include "dip_switch.h" #endif -#ifdef STM32_EEPROM_ENABLE -# include "eeprom_stm32.h" -#endif #ifdef EEPROM_DRIVER # include "eeprom_driver.h" #endif @@ -109,6 +94,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifdef DIGITIZER_ENABLE # include "digitizer.h" #endif +#ifdef VIRTSER_ENABLE +# include "virtser.h" +#endif +#ifdef SLEEP_LED_ENABLE +# include "sleep_led.h" +#endif static uint32_t last_input_modification_time = 0; uint32_t last_input_activity_time(void) { return last_input_modification_time; } @@ -246,9 +237,6 @@ void keyboard_setup(void) { disable_jtag(); #endif print_set_sendchar(sendchar); -#ifdef STM32_EEPROM_ENABLE - EEPROM_Init(); -#endif #ifdef EEPROM_DRIVER eeprom_driver_init(); #endif @@ -316,9 +304,6 @@ void keyboard_init(void) { #if defined(CRC_ENABLE) crc_init(); #endif -#ifdef QWIIC_ENABLE - qwiic_init(); -#endif #ifdef OLED_ENABLE oled_init(OLED_ROTATION_0); #endif @@ -328,12 +313,6 @@ void keyboard_init(void) { #ifdef PS2_MOUSE_ENABLE ps2_mouse_init(); #endif -#ifdef SERIAL_MOUSE_ENABLE - serial_mouse_init(); -#endif -#ifdef ADB_MOUSE_ENABLE - adb_mouse_init(); -#endif #ifdef BACKLIGHT_ENABLE backlight_init(); #endif @@ -356,6 +335,12 @@ void keyboard_init(void) { #ifdef DIP_SWITCH_ENABLE dip_switch_init(); #endif +#ifdef SLEEP_LED_ENABLE + sleep_led_init(); +#endif +#ifdef VIRTSER_ENABLE + virtser_init(); +#endif #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) debug_enable = true; @@ -384,7 +369,6 @@ void switch_events(uint8_t row, uint8_t col, bool pressed) { * * * scan matrix * * handle mouse movements - * * run visualizer code * * handle midi commands * * light LEDs * @@ -473,10 +457,6 @@ MATRIX_LOOP_END: if (encoders_changed) last_encoder_activity_trigger(); #endif -#ifdef QWIIC_ENABLE - qwiic_task(); -#endif - #ifdef OLED_ENABLE oled_task(); # if OLED_TIMEOUT > 0 @@ -510,22 +490,6 @@ MATRIX_LOOP_END: ps2_mouse_task(); #endif -#ifdef SERIAL_MOUSE_ENABLE - serial_mouse_task(); -#endif - -#ifdef ADB_MOUSE_ENABLE - adb_mouse_task(); -#endif - -#ifdef SERIAL_LINK_ENABLE - serial_link_update(); -#endif - -#ifdef VISUALIZER_ENABLE - visualizer_update(default_layer_state, layer_state, visualizer_get_mods(), host_keyboard_leds()); -#endif - #ifdef POINTING_DEVICE_ENABLE pointing_device_task(); #endif @@ -548,6 +512,10 @@ MATRIX_LOOP_END: digitizer_task(); #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + programmable_button_send(); +#endif + // update LED if (led_status != host_keyboard_leds()) { led_status = host_keyboard_leds(); diff --git a/quantum/keycode.h b/quantum/keycode.h index 8facabd8187..38a29b439ba 100644 --- a/quantum/keycode.h +++ b/quantum/keycode.h @@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define IS_ERROR(code) (KC_ROLL_OVER <= (code) && (code) <= KC_UNDEFINED) #define IS_ANY(code) (KC_A <= (code) && (code) <= 0xFF) #define IS_KEY(code) (KC_A <= (code) && (code) <= KC_EXSEL) -#define IS_MOD(code) (KC_LCTRL <= (code) && (code) <= KC_RGUI) +#define IS_MOD(code) (KC_LEFT_CTRL <= (code) && (code) <= KC_RIGHT_GUI) #define IS_SPECIAL(code) ((0xA5 <= (code) && (code) <= 0xDF) || (0xE8 <= (code) && (code) <= 0xFF)) #define IS_SYSTEM(code) (KC_PWR <= (code) && (code) <= KC_WAKE) @@ -46,10 +46,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOD_BIT(code) (1 << MOD_INDEX(code)) #define MOD_INDEX(code) ((code)&0x07) -#define MOD_MASK_CTRL (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) -#define MOD_MASK_SHIFT (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) -#define MOD_MASK_ALT (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) -#define MOD_MASK_GUI (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) +#define MOD_MASK_CTRL (MOD_BIT(KC_LEFT_CTRL) | MOD_BIT(KC_RIGHT_CTRL)) +#define MOD_MASK_SHIFT (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT)) +#define MOD_MASK_ALT (MOD_BIT(KC_LEFT_ALT) | MOD_BIT(KC_RIGHT_ALT)) +#define MOD_MASK_GUI (MOD_BIT(KC_LEFT_GUI) | MOD_BIT(KC_RIGHT_GUI)) #define MOD_MASK_CS (MOD_MASK_CTRL | MOD_MASK_SHIFT) #define MOD_MASK_CA (MOD_MASK_CTRL | MOD_MASK_ALT) #define MOD_MASK_CG (MOD_MASK_CTRL | MOD_MASK_GUI) @@ -67,6 +67,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define FN_MIN KC_FN0 #define FN_MAX KC_FN31 +// clang-format off + /* * Short names for ease of definition of keymap */ @@ -75,47 +77,55 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define KC_TRNS KC_TRANSPARENT /* Punctuation */ -#define KC_ENT KC_ENTER -#define KC_ESC KC_ESCAPE -#define KC_BSPC KC_BSPACE -#define KC_SPC KC_SPACE +#define KC_ENT KC_ENTER +#define KC_ESC KC_ESCAPE +#define KC_BSPC KC_BACKSPACE +#define KC_SPC KC_SPACE #define KC_MINS KC_MINUS -#define KC_EQL KC_EQUAL -#define KC_LBRC KC_LBRACKET -#define KC_RBRC KC_RBRACKET -#define KC_BSLS KC_BSLASH +#define KC_EQL KC_EQUAL +#define KC_LBRC KC_LEFT_BRACKET +#define KC_RBRC KC_RIGHT_BRACKET +#define KC_BSLS KC_BACKSLASH #define KC_NUHS KC_NONUS_HASH -#define KC_SCLN KC_SCOLON +#define KC_SCLN KC_SEMICOLON #define KC_QUOT KC_QUOTE -#define KC_GRV KC_GRAVE +#define KC_GRV KC_GRAVE #define KC_COMM KC_COMMA #define KC_SLSH KC_SLASH -#define KC_NUBS KC_NONUS_BSLASH +#define KC_NUBS KC_NONUS_BACKSLASH /* Lock Keys */ -#define KC_CLCK KC_CAPSLOCK -#define KC_CAPS KC_CAPSLOCK -#define KC_SLCK KC_SCROLLLOCK -#define KC_NLCK KC_NUMLOCK -#define KC_LCAP KC_LOCKING_CAPS -#define KC_LNUM KC_LOCKING_NUM -#define KC_LSCR KC_LOCKING_SCROLL +#define KC_CAPS KC_CAPS_LOCK +#define KC_SCRL KC_SCROLL_LOCK +#define KC_NUM KC_NUM_LOCK +#define KC_LCAP KC_LOCKING_CAPS_LOCK +#define KC_LNUM KC_LOCKING_NUM_LOCK +#define KC_LSCR KC_LOCKING_SCROLL_LOCK /* Commands */ -#define KC_PSCR KC_PSCREEN +#define KC_PSCR KC_PRINT_SCREEN #define KC_PAUS KC_PAUSE -#define KC_BRK KC_PAUSE -#define KC_INS KC_INSERT -#define KC_DEL KC_DELETE -#define KC_PGDN KC_PGDOWN +#define KC_BRK KC_PAUSE +#define KC_INS KC_INSERT +#define KC_PGUP KC_PAGE_UP +#define KC_DEL KC_DELETE +#define KC_PGDN KC_PAGE_DOWN #define KC_RGHT KC_RIGHT -#define KC_APP KC_APPLICATION +#define KC_APP KC_APPLICATION #define KC_EXEC KC_EXECUTE #define KC_SLCT KC_SELECT #define KC_AGIN KC_AGAIN #define KC_PSTE KC_PASTE -#define KC_ERAS KC_ALT_ERASE -#define KC_CLR KC_CLEAR +#define KC_ERAS KC_ALTERNATE_ERASE +#define KC_SYRQ KC_SYSTEM_REQUEST +#define KC_CNCL KC_CANCEL +#define KC_CLR KC_CLEAR +#define KC_PRIR KC_PRIOR +#define KC_RETN KC_RETURN +#define KC_SEPR KC_SEPARATOR +#define KC_CLAG KC_CLEAR_AGAIN +#define KC_CRSL KC_CRSEL +#define KC_EXSL KC_EXSEL /* Keypad */ #define KC_PSLS KC_KP_SLASH @@ -123,47 +133,59 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define KC_PMNS KC_KP_MINUS #define KC_PPLS KC_KP_PLUS #define KC_PENT KC_KP_ENTER -#define KC_P1 KC_KP_1 -#define KC_P2 KC_KP_2 -#define KC_P3 KC_KP_3 -#define KC_P4 KC_KP_4 -#define KC_P5 KC_KP_5 -#define KC_P6 KC_KP_6 -#define KC_P7 KC_KP_7 -#define KC_P8 KC_KP_8 -#define KC_P9 KC_KP_9 -#define KC_P0 KC_KP_0 +#define KC_P1 KC_KP_1 +#define KC_P2 KC_KP_2 +#define KC_P3 KC_KP_3 +#define KC_P4 KC_KP_4 +#define KC_P5 KC_KP_5 +#define KC_P6 KC_KP_6 +#define KC_P7 KC_KP_7 +#define KC_P8 KC_KP_8 +#define KC_P9 KC_KP_9 +#define KC_P0 KC_KP_0 #define KC_PDOT KC_KP_DOT #define KC_PEQL KC_KP_EQUAL #define KC_PCMM KC_KP_COMMA -/* Japanese specific */ -#define KC_ZKHK KC_GRAVE -#define KC_RO KC_INT1 -#define KC_KANA KC_INT2 -#define KC_JYEN KC_INT3 -#define KC_HENK KC_INT4 -#define KC_MHEN KC_INT5 - -/* Korean specific */ -#define KC_HAEN KC_LANG1 -#define KC_HANJ KC_LANG2 +/* Language Specific */ +#define KC_INT1 KC_INTERNATIONAL_1 +#define KC_INT2 KC_INTERNATIONAL_2 +#define KC_INT3 KC_INTERNATIONAL_3 +#define KC_INT4 KC_INTERNATIONAL_4 +#define KC_INT5 KC_INTERNATIONAL_5 +#define KC_INT6 KC_INTERNATIONAL_6 +#define KC_INT7 KC_INTERNATIONAL_7 +#define KC_INT8 KC_INTERNATIONAL_8 +#define KC_INT9 KC_INTERNATIONAL_9 +#define KC_LNG1 KC_LANGUAGE_1 +#define KC_LNG2 KC_LANGUAGE_2 +#define KC_LNG3 KC_LANGUAGE_3 +#define KC_LNG4 KC_LANGUAGE_4 +#define KC_LNG5 KC_LANGUAGE_5 +#define KC_LNG6 KC_LANGUAGE_6 +#define KC_LNG7 KC_LANGUAGE_7 +#define KC_LNG8 KC_LANGUAGE_8 +#define KC_LNG9 KC_LANGUAGE_9 /* Modifiers */ -#define KC_LCTL KC_LCTRL -#define KC_LSFT KC_LSHIFT -#define KC_LOPT KC_LALT -#define KC_LCMD KC_LGUI -#define KC_LWIN KC_LGUI -#define KC_RCTL KC_RCTRL -#define KC_RSFT KC_RSHIFT -#define KC_ALGR KC_RALT -#define KC_ROPT KC_RALT -#define KC_RCMD KC_RGUI -#define KC_RWIN KC_RGUI +#define KC_LCTL KC_LEFT_CTRL +#define KC_LSFT KC_LEFT_SHIFT +#define KC_LALT KC_LEFT_ALT +#define KC_LOPT KC_LEFT_ALT +#define KC_LGUI KC_LEFT_GUI +#define KC_LCMD KC_LEFT_GUI +#define KC_LWIN KC_LEFT_GUI +#define KC_RCTL KC_RIGHT_CTRL +#define KC_RSFT KC_RIGHT_SHIFT +#define KC_RALT KC_RIGHT_ALT +#define KC_ALGR KC_RIGHT_ALT +#define KC_ROPT KC_RIGHT_ALT +#define KC_RGUI KC_RIGHT_GUI +#define KC_RCMD KC_RIGHT_GUI +#define KC_RWIN KC_RIGHT_GUI /* Generic Desktop Page (0x01) */ -#define KC_PWR KC_SYSTEM_POWER +#define KC_PWR KC_SYSTEM_POWER #define KC_SLEP KC_SYSTEM_SLEEP #define KC_WAKE KC_SYSTEM_WAKE @@ -193,7 +215,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* System Specific */ #define KC_BRMU KC_PAUSE -#define KC_BRMD KC_SCROLLLOCK +#define KC_BRMD KC_SCROLL_LOCK /* Mouse Keys */ #define KC_MS_U KC_MS_UP @@ -216,6 +238,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define KC_ACL1 KC_MS_ACCEL1 #define KC_ACL2 KC_MS_ACCEL2 +// clang-format on + /* Keyboard/Keypad Page (0x07) */ enum hid_keyboard_keypad_usage { KC_NO = 0x00, @@ -260,22 +284,22 @@ enum hid_keyboard_keypad_usage { KC_0, KC_ENTER, KC_ESCAPE, - KC_BSPACE, + KC_BACKSPACE, KC_TAB, KC_SPACE, KC_MINUS, KC_EQUAL, - KC_LBRACKET, - KC_RBRACKET, // 0x30 - KC_BSLASH, + KC_LEFT_BRACKET, + KC_RIGHT_BRACKET, // 0x30 + KC_BACKSLASH, KC_NONUS_HASH, - KC_SCOLON, + KC_SEMICOLON, KC_QUOTE, KC_GRAVE, KC_COMMA, KC_DOT, KC_SLASH, - KC_CAPSLOCK, + KC_CAPS_LOCK, KC_F1, KC_F2, KC_F3, @@ -288,20 +312,20 @@ enum hid_keyboard_keypad_usage { KC_F10, KC_F11, KC_F12, - KC_PSCREEN, - KC_SCROLLLOCK, + KC_PRINT_SCREEN, + KC_SCROLL_LOCK, KC_PAUSE, KC_INSERT, KC_HOME, - KC_PGUP, + KC_PAGE_UP, KC_DELETE, KC_END, - KC_PGDOWN, + KC_PAGE_DOWN, KC_RIGHT, KC_LEFT, // 0x50 KC_DOWN, KC_UP, - KC_NUMLOCK, + KC_NUM_LOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, @@ -318,9 +342,9 @@ enum hid_keyboard_keypad_usage { KC_KP_9, KC_KP_0, KC_KP_DOT, - KC_NONUS_BSLASH, + KC_NONUS_BACKSLASH, KC_APPLICATION, - KC_POWER, + KC_KB_POWER, KC_KP_EQUAL, KC_F13, KC_F14, @@ -345,34 +369,34 @@ enum hid_keyboard_keypad_usage { KC_COPY, KC_PASTE, KC_FIND, - KC__MUTE, - KC__VOLUP, // 0x80 - KC__VOLDOWN, - KC_LOCKING_CAPS, - KC_LOCKING_NUM, - KC_LOCKING_SCROLL, + KC_KB_MUTE, + KC_KB_VOLUME_UP, // 0x80 + KC_KB_VOLUME_DOWN, + KC_LOCKING_CAPS_LOCK, + KC_LOCKING_NUM_LOCK, + KC_LOCKING_SCROLL_LOCK, KC_KP_COMMA, KC_KP_EQUAL_AS400, - KC_INT1, - KC_INT2, - KC_INT3, - KC_INT4, - KC_INT5, - KC_INT6, - KC_INT7, - KC_INT8, - KC_INT9, - KC_LANG1, // 0x90 - KC_LANG2, - KC_LANG3, - KC_LANG4, - KC_LANG5, - KC_LANG6, - KC_LANG7, - KC_LANG8, - KC_LANG9, - KC_ALT_ERASE, - KC_SYSREQ, + KC_INTERNATIONAL_1, + KC_INTERNATIONAL_2, + KC_INTERNATIONAL_3, + KC_INTERNATIONAL_4, + KC_INTERNATIONAL_5, + KC_INTERNATIONAL_6, + KC_INTERNATIONAL_7, + KC_INTERNATIONAL_8, + KC_INTERNATIONAL_9, + KC_LANGUAGE_1, // 0x90 + KC_LANGUAGE_2, + KC_LANGUAGE_3, + KC_LANGUAGE_4, + KC_LANGUAGE_5, + KC_LANGUAGE_6, + KC_LANGUAGE_7, + KC_LANGUAGE_8, + KC_LANGUAGE_9, + KC_ALTERNATE_ERASE, + KC_SYSTEM_REQUEST, KC_CANCEL, KC_CLEAR, KC_PRIOR, @@ -397,12 +421,12 @@ enum hid_keyboard_keypad_usage { KC_DECIMAL_SEPARATOR, KC_CURRENCY_UNIT, KC_CURRENCY_SUB_UNIT, - KC_KP_LPAREN, - KC_KP_RPAREN, - KC_KP_LCBRACKET, - KC_KP_RCBRACKET, + KC_KP_LEFT_PARENTHESIS, + KC_KP_RIGHT_PARENTHESIS, + KC_KP_LEFT_BRACE, + KC_KP_RIGHT_BRACE, KC_KP_TAB, - KC_KP_BSPACE, + KC_KP_BACKSPACE, KC_KP_A, KC_KP_B, KC_KP_C, @@ -411,17 +435,17 @@ enum hid_keyboard_keypad_usage { KC_KP_F, KC_KP_XOR, KC_KP_HAT, - KC_KP_PERC, - KC_KP_LT, - KC_KP_GT, + KC_KP_PERCENT, + KC_KP_LESS_THAN, + KC_KP_GREATER_THAN, KC_KP_AND, - KC_KP_LAZYAND, + KC_KP_LAZY_AND, KC_KP_OR, - KC_KP_LAZYOR, + KC_KP_LAZY_OR, KC_KP_COLON, KC_KP_HASH, KC_KP_SPACE, - KC_KP_ATMARK, + KC_KP_AT, KC_KP_EXCLAMATION, KC_KP_MEM_STORE, //0xD0 KC_KP_MEM_RECALL, @@ -440,14 +464,14 @@ enum hid_keyboard_keypad_usage { #endif /* Modifiers */ - KC_LCTRL = 0xE0, - KC_LSHIFT, - KC_LALT, - KC_LGUI, - KC_RCTRL, - KC_RSHIFT, - KC_RALT, - KC_RGUI + KC_LEFT_CTRL = 0xE0, + KC_LEFT_SHIFT, + KC_LEFT_ALT, + KC_LEFT_GUI, + KC_RIGHT_CTRL, + KC_RIGHT_SHIFT, + KC_RIGHT_ALT, + KC_RIGHT_GUI // ********************************************** // * 0xF0-0xFF are unallocated in the HID spec. * @@ -558,3 +582,5 @@ enum mouse_keys { KC_MS_ACCEL1, KC_MS_ACCEL2 // 0xFF }; + +#include "keycode_legacy.h" diff --git a/quantum/keycode_config.c b/quantum/keycode_config.c index f340905eab8..dd2a17e2421 100644 --- a/quantum/keycode_config.c +++ b/quantum/keycode_config.c @@ -25,89 +25,89 @@ extern keymap_config_t keymap_config; */ uint16_t keycode_config(uint16_t keycode) { switch (keycode) { - case KC_CAPSLOCK: - case KC_LOCKING_CAPS: + case KC_CAPS_LOCK: + case KC_LOCKING_CAPS_LOCK: if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { - return KC_LCTL; + return KC_LEFT_CTRL; } return keycode; - case KC_LCTL: + case KC_LEFT_CTRL: if (keymap_config.swap_control_capslock) { - return KC_CAPSLOCK; + return KC_CAPS_LOCK; } if (keymap_config.swap_lctl_lgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; + return KC_LEFT_GUI; } - return KC_LCTL; - case KC_LALT: + return KC_LEFT_CTRL; + case KC_LEFT_ALT: if (keymap_config.swap_lalt_lgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; + return KC_LEFT_GUI; } - return KC_LALT; - case KC_LGUI: + return KC_LEFT_ALT; + case KC_LEFT_GUI: if (keymap_config.swap_lalt_lgui) { - return KC_LALT; + return KC_LEFT_ALT; } if (keymap_config.swap_lctl_lgui) { - return KC_LCTRL; + return KC_LEFT_CTRL; } if (keymap_config.no_gui) { return KC_NO; } - return KC_LGUI; - case KC_RCTL: + return KC_LEFT_GUI; + case KC_RIGHT_CTRL: if (keymap_config.swap_rctl_rgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; } - return KC_RCTL; - case KC_RALT: + return KC_RIGHT_CTRL; + case KC_RIGHT_ALT: if (keymap_config.swap_ralt_rgui) { if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; } - return KC_RALT; - case KC_RGUI: + return KC_RIGHT_ALT; + case KC_RIGHT_GUI: if (keymap_config.swap_ralt_rgui) { - return KC_RALT; + return KC_RIGHT_ALT; } if (keymap_config.swap_rctl_rgui) { - return KC_RCTL; + return KC_RIGHT_CTRL; } if (keymap_config.no_gui) { return KC_NO; } - return KC_RGUI; + return KC_RIGHT_GUI; case KC_GRAVE: if (keymap_config.swap_grave_esc) { - return KC_ESC; + return KC_ESCAPE; } return KC_GRAVE; - case KC_ESC: + case KC_ESCAPE: if (keymap_config.swap_grave_esc) { return KC_GRAVE; } - return KC_ESC; - case KC_BSLASH: + return KC_ESCAPE; + case KC_BACKSLASH: if (keymap_config.swap_backslash_backspace) { - return KC_BSPACE; + return KC_BACKSPACE; } - return KC_BSLASH; - case KC_BSPACE: + return KC_BACKSLASH; + case KC_BACKSPACE: if (keymap_config.swap_backslash_backspace) { - return KC_BSLASH; + return KC_BACKSLASH; } - return KC_BSPACE; + return KC_BACKSPACE; default: return keycode; } diff --git a/quantum/keycode_legacy.h b/quantum/keycode_legacy.h new file mode 100644 index 00000000000..0317a05534d --- /dev/null +++ b/quantum/keycode_legacy.h @@ -0,0 +1,53 @@ +#pragma once + +// clang-format off + +// These keycode names have been deprecated + +#define KC_BSPACE KC_BACKSPACE +#define KC_LBRACKET KC_LEFT_BRACKET +#define KC_RBRACKET KC_RIGHT_BRACKET +#define KC_BSLASH KC_BACKSLASH +#define KC_SCOLON KC_SEMICOLON +#define KC_CAPSLOCK KC_CAPS_LOCK +#define KC_PSCREEN KC_PRINT_SCREEN +#define KC_SCROLLLOCK KC_SCROLL_LOCK +#define KC_PGDOWN KC_PAGE_DOWN +#define KC_NUMLOCK KC_NUM_LOCK +#define KC_NONUS_BSLASH KC_NONUS_BACKSLASH +#define KC_POWER KC_KB_POWER +#define KC__MUTE KC_KB_MUTE +#define KC__VOLUP KC_KB_VOLUME_UP +#define KC__VOLDOWN KC_KB_VOLUME_DOWN +#define KC_LOCKING_CAPS KC_LOCKING_CAPS_LOCK +#define KC_LOCKING_NUM KC_LOCKING_NUM_LOCK +#define KC_LOCKING_SCROLL KC_LOCKING_SCROLL_LOCK +#define KC_LANG1 KC_LANGUAGE_1 +#define KC_LANG2 KC_LANGUAGE_2 +#define KC_LANG3 KC_LANGUAGE_3 +#define KC_LANG4 KC_LANGUAGE_4 +#define KC_LANG5 KC_LANGUAGE_5 +#define KC_LANG6 KC_LANGUAGE_6 +#define KC_LANG7 KC_LANGUAGE_7 +#define KC_LANG8 KC_LANGUAGE_8 +#define KC_LANG9 KC_LANGUAGE_9 +#define KC_ALT_ERASE KC_ALTERNATE_ERASE +#define KC_SYSREQ KC_SYSTEM_REQUEST + +#define KC_LCTRL KC_LEFT_CTRL +#define KC_LSHIFT KC_LEFT_SHIFT +#define KC_RCTRL KC_RIGHT_CTRL +#define KC_RSHIFT KC_RIGHT_SHIFT + +#define KC_ZKHK KC_GRAVE +#define KC_RO KC_INTERNATIONAL_1 +#define KC_KANA KC_INTERNATIONAL_2 +#define KC_JYEN KC_INTERNATIONAL_3 +#define KC_HENK KC_INTERNATIONAL_4 +#define KC_MHEN KC_INTERNATIONAL_5 +#define KC_HAEN KC_LANGUAGE_1 +#define KC_HANJ KC_LANGUAGE_2 + +#define KC_CLCK KC_CAPS_LOCK +#define KC_SLCK KC_SCROLL_LOCK +#define KC_NLCK KC_NUM_LOCK diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 780c71ab9b5..5007f15f111 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -56,7 +56,7 @@ action_t action_for_keycode(uint16_t keycode) { switch (keycode) { case KC_A ... KC_EXSEL: - case KC_LCTRL ... KC_RGUI: + case KC_LEFT_CTRL ... KC_RIGHT_GUI: action.code = ACTION_KEY(keycode); break; #ifdef EXTRAKEY_ENABLE @@ -72,7 +72,7 @@ action_t action_for_keycode(uint16_t keycode) { action.code = ACTION_MOUSEKEY(keycode); break; #endif - case KC_TRNS: + case KC_TRANSPARENT: action.code = ACTION_TRANSPARENT; break; case QK_MODS ... QK_MODS_MAX:; diff --git a/quantum/keymap_extras/keymap_korean.h b/quantum/keymap_extras/keymap_korean.h index 23d235ef09c..74be122dade 100644 --- a/quantum/keymap_extras/keymap_korean.h +++ b/quantum/keymap_extras/keymap_korean.h @@ -85,8 +85,8 @@ #define KR_DOT KC_DOT // . #define KR_SLSH KC_SLSH // / // Row 5 -#define KR_HANJ KC_LANG2 // Hanja (한자) -#define KR_HAEN KC_LANG1 // Han ↔ Yeong (한 ↔ 영) +#define KR_HANJ KC_LNG2 // Hanja (한자) +#define KR_HAEN KC_LNG1 // Han ↔ Yeong (한 ↔ 영) /* Shifted symbols * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ diff --git a/quantum/keymap_extras/keymap_turkish_f.h b/quantum/keymap_extras/keymap_turkish_f.h index 226f8cbeb01..f86ef215468 100644 --- a/quantum/keymap_extras/keymap_turkish_f.h +++ b/quantum/keymap_extras/keymap_turkish_f.h @@ -111,7 +111,7 @@ #define TR_LPRN S(TR_8) // ( #define TR_RPRN S(TR_9) // ) #define TR_EQL S(TR_0) // = -#define TR_QUES S(TR_ASTR) // ? +#define TR_QUES S(TR_SLSH) // ? #define TR_UNDS S(TR_MINS) // _ // Row 4 #define TR_RABK S(TR_LABK) // > diff --git a/quantum/led_matrix/animations/alpha_mods_anim.h b/quantum/led_matrix/animations/alpha_mods_anim.h index 14038cd0822..4d017894a11 100644 --- a/quantum/led_matrix/animations/alpha_mods_anim.h +++ b/quantum/led_matrix/animations/alpha_mods_anim.h @@ -17,8 +17,8 @@ bool ALPHAS_MODS(effect_params_t* params) { led_matrix_set_value(i, val1); } } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_ALPHAS_MODS +#endif // ENABLE_LED_MATRIX_ALPHAS_MODS diff --git a/quantum/led_matrix/animations/band_anim.h b/quantum/led_matrix/animations/band_anim.h index 5548787b881..293be4f67ad 100644 --- a/quantum/led_matrix/animations/band_anim.h +++ b/quantum/led_matrix/animations/band_anim.h @@ -10,4 +10,4 @@ static uint8_t BAND_math(uint8_t val, uint8_t i, uint8_t time) { bool BAND(effect_params_t* params) { return effect_runner_i(params, &BAND_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND +#endif // ENABLE_LED_MATRIX_BAND diff --git a/quantum/led_matrix/animations/band_pinwheel_anim.h b/quantum/led_matrix/animations/band_pinwheel_anim.h index 89651582d51..f47a3869ce5 100644 --- a/quantum/led_matrix/animations/band_pinwheel_anim.h +++ b/quantum/led_matrix/animations/band_pinwheel_anim.h @@ -7,4 +7,4 @@ static uint8_t BAND_PINWHEEL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t t bool BAND_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND_PINWHEEL +#endif // ENABLE_LED_MATRIX_BAND_PINWHEEL diff --git a/quantum/led_matrix/animations/band_spiral_anim.h b/quantum/led_matrix/animations/band_spiral_anim.h index 70b0ffaea93..a4bd3821817 100644 --- a/quantum/led_matrix/animations/band_spiral_anim.h +++ b/quantum/led_matrix/animations/band_spiral_anim.h @@ -7,4 +7,4 @@ static uint8_t BAND_SPIRAL_math(uint8_t val, int16_t dx, int16_t dy, uint8_t dis bool BAND_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BAND_SPIRAL +#endif // ENABLE_LED_MATRIX_BAND_SPIRAL diff --git a/quantum/led_matrix/animations/breathing_anim.h b/quantum/led_matrix/animations/breathing_anim.h index e3f600c45c7..899925f516d 100644 --- a/quantum/led_matrix/animations/breathing_anim.h +++ b/quantum/led_matrix/animations/breathing_anim.h @@ -12,8 +12,8 @@ bool BREATHING(effect_params_t* params) { LED_MATRIX_TEST_LED_FLAGS(); led_matrix_set_value(i, val); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_BREATHING +#endif // ENABLE_LED_MATRIX_BREATHING diff --git a/quantum/led_matrix/animations/cycle_left_right_anim.h b/quantum/led_matrix/animations/cycle_left_right_anim.h index 769e6d79424..1a8999b8313 100644 --- a/quantum/led_matrix/animations/cycle_left_right_anim.h +++ b/quantum/led_matrix/animations/cycle_left_right_anim.h @@ -7,4 +7,4 @@ static uint8_t CYCLE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { ret bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +#endif // ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/led_matrix/animations/cycle_out_in_anim.h b/quantum/led_matrix/animations/cycle_out_in_anim.h index 6adf9c25ff5..77d3a14b6ff 100644 --- a/quantum/led_matrix/animations/cycle_out_in_anim.h +++ b/quantum/led_matrix/animations/cycle_out_in_anim.h @@ -7,4 +7,4 @@ static uint8_t CYCLE_OUT_IN_math(uint8_t val, int16_t dx, int16_t dy, uint8_t di bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_OUT_IN +#endif // ENABLE_LED_MATRIX_CYCLE_OUT_IN diff --git a/quantum/led_matrix/animations/cycle_up_down_anim.h b/quantum/led_matrix/animations/cycle_up_down_anim.h index 7a5868ac26b..b25947199c1 100644 --- a/quantum/led_matrix/animations/cycle_up_down_anim.h +++ b/quantum/led_matrix/animations/cycle_up_down_anim.h @@ -7,4 +7,4 @@ static uint8_t CYCLE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_CYCLE_UP_DOWN +#endif // ENABLE_LED_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/led_matrix/animations/dual_beacon_anim.h b/quantum/led_matrix/animations/dual_beacon_anim.h index 3552c9fc39d..81735e323cb 100644 --- a/quantum/led_matrix/animations/dual_beacon_anim.h +++ b/quantum/led_matrix/animations/dual_beacon_anim.h @@ -7,4 +7,4 @@ static uint8_t DUAL_BEACON_math(uint8_t val, int8_t sin, int8_t cos, uint8_t i, bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_DUAL_BEACON +#endif // ENABLE_LED_MATRIX_DUAL_BEACON diff --git a/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h index ef97631b908..fa9b7dbbfa5 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h +++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy.h @@ -12,5 +12,5 @@ bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { int16_t dy = g_led_config.point[i].y - k_led_matrix_center.y; led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, time)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } diff --git a/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h index 5ef5938be05..061a5f07feb 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h +++ b/quantum/led_matrix/animations/runners/effect_runner_dx_dy_dist.h @@ -13,5 +13,5 @@ bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) uint8_t dist = sqrt16(dx * dx + dy * dy); led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, dx, dy, dist, time)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } diff --git a/quantum/led_matrix/animations/runners/effect_runner_i.h b/quantum/led_matrix/animations/runners/effect_runner_i.h index b3015759be5..f6f8c0dee0c 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_i.h +++ b/quantum/led_matrix/animations/runners/effect_runner_i.h @@ -10,5 +10,5 @@ bool effect_runner_i(effect_params_t* params, i_f effect_func) { LED_MATRIX_TEST_LED_FLAGS(); led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, i, time)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } diff --git a/quantum/led_matrix/animations/runners/effect_runner_reactive.h b/quantum/led_matrix/animations/runners/effect_runner_reactive.h index 4369ea8c498..be3090aa532 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_reactive.h +++ b/quantum/led_matrix/animations/runners/effect_runner_reactive.h @@ -22,7 +22,7 @@ bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { uint16_t offset = scale16by8(tick, led_matrix_eeconfig.speed); led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, offset)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h index d6eb9731ee3..f6ffc825a1e 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h +++ b/quantum/led_matrix/animations/runners/effect_runner_reactive_splash.h @@ -20,7 +20,7 @@ bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, react } led_matrix_set_value(i, scale8(val, led_matrix_eeconfig.val)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h index 4a5219abd12..3145e27139d 100644 --- a/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h +++ b/quantum/led_matrix/animations/runners/effect_runner_sin_cos_i.h @@ -12,5 +12,5 @@ bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { LED_MATRIX_TEST_LED_FLAGS(); led_matrix_set_value(i, effect_func(led_matrix_eeconfig.val, cos_value, sin_value, i, time)); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } diff --git a/quantum/led_matrix/animations/solid_anim.h b/quantum/led_matrix/animations/solid_anim.h index 4c9e43c581a..c728dbcc98d 100644 --- a/quantum/led_matrix/animations/solid_anim.h +++ b/quantum/led_matrix/animations/solid_anim.h @@ -9,7 +9,7 @@ bool SOLID(effect_params_t* params) { LED_MATRIX_TEST_LED_FLAGS(); led_matrix_set_value(i, val); } - return led_max < DRIVER_LED_TOTAL; + return led_matrix_check_finished_leds(led_max); } #endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/led_matrix/animations/solid_reactive_cross.h b/quantum/led_matrix/animations/solid_reactive_cross.h index 3a3c46be13b..a149e9a9290 100644 --- a/quantum/led_matrix/animations/solid_reactive_cross.h +++ b/quantum/led_matrix/animations/solid_reactive_cross.h @@ -1,5 +1,5 @@ #ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) +# if defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) # ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS LED_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) @@ -31,5 +31,5 @@ bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_r # endif # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) +# endif // defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS) || defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS) #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_nexus.h b/quantum/led_matrix/animations/solid_reactive_nexus.h index 2520b8e1dfb..5a86e48c6c3 100644 --- a/quantum/led_matrix/animations/solid_reactive_nexus.h +++ b/quantum/led_matrix/animations/solid_reactive_nexus.h @@ -28,5 +28,5 @@ bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_r # endif # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) +# endif // defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS) || defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS) #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_simple_anim.h b/quantum/led_matrix/animations/solid_reactive_simple_anim.h index 43f6ad9ab4a..14f5e90730f 100644 --- a/quantum/led_matrix/animations/solid_reactive_simple_anim.h +++ b/quantum/led_matrix/animations/solid_reactive_simple_anim.h @@ -8,5 +8,5 @@ static uint8_t SOLID_REACTIVE_SIMPLE_math(uint8_t val, uint16_t offset) { return bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# endif // ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_reactive_wide.h b/quantum/led_matrix/animations/solid_reactive_wide.h index d683b02510e..3aa88063a71 100644 --- a/quantum/led_matrix/animations/solid_reactive_wide.h +++ b/quantum/led_matrix/animations/solid_reactive_wide.h @@ -1,5 +1,5 @@ #ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) +# if !defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) # ifdef ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE LED_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) @@ -26,5 +26,5 @@ bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_re # endif # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) +# endif // !defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE) || !defined(ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE) #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/solid_splash_anim.h b/quantum/led_matrix/animations/solid_splash_anim.h index cf599c8fe6c..17b692a09a2 100644 --- a/quantum/led_matrix/animations/solid_splash_anim.h +++ b/quantum/led_matrix/animations/solid_splash_anim.h @@ -1,5 +1,5 @@ #ifdef LED_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_LED_MATRIX_SOLID_SPLASH) || !defined(DISABLE_LED_MATRIX_SOLID_MULTISPLASH) +# if defined(ENABLE_LED_MATRIX_SOLID_SPLASH) || defined(ENABLE_LED_MATRIX_SOLID_MULTISPLASH) # ifdef ENABLE_LED_MATRIX_SOLID_SPLASH LED_MATRIX_EFFECT(SOLID_SPLASH) @@ -26,5 +26,5 @@ bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_ # endif # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_LED_MATRIX_SPLASH) && !defined(DISABLE_LED_MATRIX_MULTISPLASH) +# endif // defined(ENABLE_LED_MATRIX_SPLASH) || defined(ENABLE_LED_MATRIX_MULTISPLASH) #endif // LED_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/led_matrix/animations/wave_left_right_anim.h b/quantum/led_matrix/animations/wave_left_right_anim.h index c062cf968e8..76487f85155 100644 --- a/quantum/led_matrix/animations/wave_left_right_anim.h +++ b/quantum/led_matrix/animations/wave_left_right_anim.h @@ -7,4 +7,4 @@ static uint8_t WAVE_LEFT_RIGHT_math(uint8_t val, uint8_t i, uint8_t time) { retu bool WAVE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &WAVE_LEFT_RIGHT_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT +#endif // ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT diff --git a/quantum/led_matrix/animations/wave_up_down_anim.h b/quantum/led_matrix/animations/wave_up_down_anim.h index 5e612f6b6d2..94710f5c6e9 100644 --- a/quantum/led_matrix/animations/wave_up_down_anim.h +++ b/quantum/led_matrix/animations/wave_up_down_anim.h @@ -7,4 +7,4 @@ static uint8_t WAVE_UP_DOWN_math(uint8_t val, uint8_t i, uint8_t time) { return bool WAVE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &WAVE_UP_DOWN_math); } # endif // LED_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_LED_MATRIX_WAVE_UP_DOWN +#endif // ENABLE_LED_MATRIX_WAVE_UP_DOWN diff --git a/quantum/led_matrix/led_matrix.c b/quantum/led_matrix/led_matrix.c index 50510e49aab..be1494e8846 100644 --- a/quantum/led_matrix/led_matrix.c +++ b/quantum/led_matrix/led_matrix.c @@ -33,14 +33,6 @@ const led_point_t k_led_matrix_center = {112, 32}; const led_point_t k_led_matrix_center = LED_MATRIX_CENTER; #endif -// clang-format off -#ifndef LED_MATRIX_IMMEDIATE_EEPROM -# define led_eeconfig_update(v) led_update_eeprom |= v -#else -# define led_eeconfig_update(v) if (v) eeconfig_update_led_matrix() -#endif -// clang-format on - // Generic effect runners #include "led_matrix_runners.inc" @@ -107,7 +99,6 @@ last_hit_t g_last_hit_tracker; // internals static bool suspend_state = false; -static bool led_update_eeprom = false; static uint8_t led_last_enable = UINT8_MAX; static uint8_t led_last_effect = UINT8_MAX; static effect_params_t led_effect_params = {0, LED_FLAG_ALL, false}; @@ -127,9 +118,9 @@ static last_hit_t last_hit_buffer; const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; #endif -void eeconfig_read_led_matrix(void) { eeprom_read_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } +EECONFIG_DEBOUNCE_HELPER(led_matrix, EECONFIG_LED_MATRIX, led_matrix_eeconfig); -void eeconfig_update_led_matrix(void) { eeprom_update_block(&led_matrix_eeconfig, EECONFIG_LED_MATRIX, sizeof(led_matrix_eeconfig)); } +void eeconfig_update_led_matrix(void) { eeconfig_flush_led_matrix(true); } void eeconfig_update_led_matrix_default(void) { dprintf("eeconfig_update_led_matrix_default\n"); @@ -138,7 +129,7 @@ void eeconfig_update_led_matrix_default(void) { led_matrix_eeconfig.val = LED_MATRIX_STARTUP_VAL; led_matrix_eeconfig.speed = LED_MATRIX_STARTUP_SPD; led_matrix_eeconfig.flags = LED_FLAG_ALL; - eeconfig_update_led_matrix(); + eeconfig_flush_led_matrix(true); } void eeconfig_debug_led_matrix(void) { @@ -165,20 +156,10 @@ uint8_t led_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l void led_matrix_update_pwm_buffers(void) { led_matrix_driver.flush(); } void led_matrix_set_value(int index, uint8_t value) { -#if defined(LED_MATRIX_ENABLE) && defined(LED_MATRIX_SPLIT) - if (!is_keyboard_left() && index >= k_led_matrix_split[0]) -# ifdef USE_CIE1931_CURVE - led_matrix_driver.set_value(index - k_led_matrix_split[0], pgm_read_byte(&CIE1931_CURVE[value])); -# else - led_matrix_driver.set_value(index - k_led_matrix_split[0], value); -# endif - else if (is_keyboard_left() && index < k_led_matrix_split[0]) -#endif #ifdef USE_CIE1931_CURVE - led_matrix_driver.set_value(index, pgm_read_byte(&CIE1931_CURVE[value])); -#else - led_matrix_driver.set_value(index, value); + value = pgm_read_byte(&CIE1931_CURVE[value]); #endif + led_matrix_driver.set_value(index, value); } void led_matrix_set_value_all(uint8_t value) { @@ -232,11 +213,11 @@ void process_led_matrix(uint8_t row, uint8_t col, bool pressed) { } #endif // LED_MATRIX_KEYREACTIVE_ENABLED -#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) +#if defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_LED_MATRIX_TYPING_HEATMAP) if (led_matrix_eeconfig.mode == LED_MATRIX_TYPING_HEATMAP) { process_led_matrix_typing_heatmap(row, col); } -#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_LED_MATRIX_TYPING_HEATMAP) +#endif // defined(LED_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_LED_MATRIX_TYPING_HEATMAP) } static bool led_matrix_none(effect_params_t *params) { @@ -279,9 +260,8 @@ static void led_task_timers(void) { } static void led_task_sync(void) { + eeconfig_flush_led_matrix(false); // next task - if (led_update_eeprom) eeconfig_update_led_matrix(); - led_update_eeprom = false; if (sync_timer_elapsed32(g_led_timer) >= LED_MATRIX_LED_FLUSH_LIMIT) led_task_state = STARTING; } @@ -449,7 +429,7 @@ void led_matrix_init(void) { eeconfig_update_led_matrix_default(); } - eeconfig_read_led_matrix(); + eeconfig_init_led_matrix(); if (!led_matrix_eeconfig.mode) { dprintf("led_matrix_init_drivers led_matrix_eeconfig.mode = 0. Write default values to EEPROM.\n"); eeconfig_update_led_matrix_default(); @@ -472,7 +452,7 @@ bool led_matrix_get_suspend_state(void) { return suspend_state; } void led_matrix_toggle_eeprom_helper(bool write_to_eeprom) { led_matrix_eeconfig.enable ^= 1; led_task_state = STARTING; - led_eeconfig_update(write_to_eeprom); + eeconfig_flag_led_matrix(write_to_eeprom); dprintf("led matrix toggle [%s]: led_matrix_eeconfig.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.enable); } void led_matrix_toggle_noeeprom(void) { led_matrix_toggle_eeprom_helper(false); } @@ -480,7 +460,7 @@ void led_matrix_toggle(void) { led_matrix_toggle_eeprom_helper(true); } void led_matrix_enable(void) { led_matrix_enable_noeeprom(); - led_eeconfig_update(true); + eeconfig_flag_led_matrix(true); } void led_matrix_enable_noeeprom(void) { @@ -490,7 +470,7 @@ void led_matrix_enable_noeeprom(void) { void led_matrix_disable(void) { led_matrix_disable_noeeprom(); - led_eeconfig_update(true); + eeconfig_flag_led_matrix(true); } void led_matrix_disable_noeeprom(void) { @@ -512,7 +492,7 @@ void led_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { led_matrix_eeconfig.mode = mode; } led_task_state = STARTING; - led_eeconfig_update(write_to_eeprom); + eeconfig_flag_led_matrix(write_to_eeprom); dprintf("led matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.mode); } void led_matrix_mode_noeeprom(uint8_t mode) { led_matrix_mode_eeprom_helper(mode, false); } @@ -539,7 +519,7 @@ void led_matrix_set_val_eeprom_helper(uint8_t val, bool write_to_eeprom) { return; } led_matrix_eeconfig.val = (val > LED_MATRIX_MAXIMUM_BRIGHTNESS) ? LED_MATRIX_MAXIMUM_BRIGHTNESS : val; - led_eeconfig_update(write_to_eeprom); + eeconfig_flag_led_matrix(write_to_eeprom); dprintf("led matrix set val [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.val); } void led_matrix_set_val_noeeprom(uint8_t val) { led_matrix_set_val_eeprom_helper(val, false); } @@ -557,7 +537,7 @@ void led_matrix_decrease_val(void) { led_matrix_decrease_val_helper(true); } void led_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { led_matrix_eeconfig.speed = speed; - led_eeconfig_update(write_to_eeprom); + eeconfig_flag_led_matrix(write_to_eeprom); dprintf("led matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", led_matrix_eeconfig.speed); } void led_matrix_set_speed_noeeprom(uint8_t speed) { led_matrix_set_speed_eeprom_helper(speed, false); } diff --git a/quantum/led_matrix/led_matrix.h b/quantum/led_matrix/led_matrix.h index a7a1c983f78..e42be646618 100644 --- a/quantum/led_matrix/led_matrix.h +++ b/quantum/led_matrix/led_matrix.h @@ -23,7 +23,6 @@ #include <stdbool.h> #include "led_matrix_types.h" #include "quantum.h" -#include "led_matrix_legacy_enables.h" #ifdef IS31FL3731 # include "is31fl3731-simple.h" @@ -38,14 +37,33 @@ #endif #if defined(LED_MATRIX_LED_PROCESS_LIMIT) && LED_MATRIX_LED_PROCESS_LIMIT > 0 && LED_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +# if defined(LED_MATRIX_SPLIT) +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; \ + uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \ + if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \ + if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; +# else +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = LED_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + LED_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +# endif #else -# define LED_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = DRIVER_LED_TOTAL; +# if defined(LED_MATRIX_SPLIT) +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; \ + const uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; \ + if (is_keyboard_left() && (max > k_led_matrix_split[0])) max = k_led_matrix_split[0]; \ + if (!(is_keyboard_left()) && (min < k_led_matrix_split[0])) min = k_led_matrix_split[0]; +# else +# define LED_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +# endif #endif #define LED_MATRIX_TEST_LED_FLAGS() \ @@ -147,6 +165,18 @@ typedef struct { void (*flush)(void); } led_matrix_driver_t; +static inline bool led_matrix_check_finished_leds(uint8_t led_idx) { +#if defined(LED_MATRIX_SPLIT) + if (is_keyboard_left()) { + uint8_t k_led_matrix_split[2] = LED_MATRIX_SPLIT; + return led_idx < k_led_matrix_split[0]; + } else + return led_idx < DRIVER_LED_TOTAL; +#else + return led_idx < DRIVER_LED_TOTAL; +#endif +} + extern const led_matrix_driver_t led_matrix_driver; extern led_eeconfig_t led_matrix_eeconfig; diff --git a/quantum/led_matrix/led_matrix_drivers.c b/quantum/led_matrix/led_matrix_drivers.c index 1d46b2c5066..2157619a0be 100644 --- a/quantum/led_matrix/led_matrix_drivers.c +++ b/quantum/led_matrix/led_matrix_drivers.c @@ -26,128 +26,123 @@ */ #if defined(IS31FL3731) || defined(IS31FL3733) - # include "i2c_master.h" static void init(void) { i2c_init(); -# ifdef IS31FL3731 -# ifdef LED_DRIVER_ADDR_1 + +# if defined(IS31FL3731) IS31FL3731_init(LED_DRIVER_ADDR_1); -# endif -# ifdef LED_DRIVER_ADDR_2 +# if defined(LED_DRIVER_ADDR_2) IS31FL3731_init(LED_DRIVER_ADDR_2); -# endif -# ifdef LED_DRIVER_ADDR_3 +# if defined(LED_DRIVER_ADDR_3) IS31FL3731_init(LED_DRIVER_ADDR_3); -# endif -# ifdef LED_DRIVER_ADDR_4 +# if defined(LED_DRIVER_ADDR_4) IS31FL3731_init(LED_DRIVER_ADDR_4); -# endif -# else -# ifdef LED_DRIVER_ADDR_1 -# ifndef LED_DRIVER_SYNC_1 -# define LED_DRIVER_SYNC_1 0 +# endif # endif - IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1); # endif -# ifdef LED_DRIVER_ADDR_2 -# ifndef LED_DRIVER_SYNC_2 + +# elif defined(IS31FL3733) +# if !defined(LED_DRIVER_SYNC_1) +# define LED_DRIVER_SYNC_1 0 +# endif + IS31FL3733_init(LED_DRIVER_ADDR_1, LED_DRIVER_SYNC_1); +# if defined(LED_DRIVER_ADDR_2) +# if !defined(LED_DRIVER_SYNC_2) # define LED_DRIVER_SYNC_2 0 # endif IS31FL3733_init(LED_DRIVER_ADDR_2, LED_DRIVER_SYNC_2); -# endif -# ifdef LED_DRIVER_ADDR_3 -# ifndef LED_DRIVER_SYNC_3 -# define LED_DRIVER_SYNC_3 0 -# endif +# if defined(LED_DRIVER_ADDR_3) +# if !defined(LED_DRIVER_SYNC_3) +# define LED_DRIVER_SYNC_3 0 +# endif IS31FL3733_init(LED_DRIVER_ADDR_3, LED_DRIVER_SYNC_3); -# endif -# ifdef LED_DRIVER_ADDR_4 -# ifndef LED_DRIVER_SYNC_4 -# define LED_DRIVER_SYNC_4 0 -# endif +# if defined(LED_DRIVER_ADDR_4) +# if !defined(LED_DRIVER_SYNC_4) +# define LED_DRIVER_SYNC_4 0 +# endif IS31FL3733_init(LED_DRIVER_ADDR_4, LED_DRIVER_SYNC_4); +# endif +# endif # endif # endif for (int index = 0; index < DRIVER_LED_TOTAL; index++) { -# ifdef IS31FL3731 +# if defined(IS31FL3731) IS31FL3731_set_led_control_register(index, true); -# else +# elif defined(IS31FL3733) IS31FL3733_set_led_control_register(index, true); # endif } + // This actually updates the LED drivers -# ifdef IS31FL3731 -# ifdef LED_DRIVER_ADDR_1 +# if defined(IS31FL3731) IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_1, 0); -# endif -# ifdef LED_DRIVER_ADDR_2 +# if defined(LED_DRIVER_ADDR_2) IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_2, 1); -# endif -# ifdef LED_DRIVER_ADDR_3 +# if defined(LED_DRIVER_ADDR_3) IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_3, 2); -# endif -# ifdef LED_DRIVER_ADDR_4 +# if defined(LED_DRIVER_ADDR_4) IS31FL3731_update_led_control_registers(LED_DRIVER_ADDR_4, 3); +# endif +# endif # endif -# else -# ifdef LED_DRIVER_ADDR_1 + +# elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_1, 0); -# endif -# ifdef LED_DRIVER_ADDR_2 +# if defined(LED_DRIVER_ADDR_2) IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_2, 1); -# endif -# ifdef LED_DRIVER_ADDR_3 +# if defined(LED_DRIVER_ADDR_3) IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_3, 2); -# endif -# ifdef LED_DRIVER_ADDR_4 +# if defined(LED_DRIVER_ADDR_4) IS31FL3733_update_led_control_registers(LED_DRIVER_ADDR_4, 3); +# endif +# endif # endif # endif } +# if defined(IS31FL3731) static void flush(void) { -# ifdef IS31FL3731 -# ifdef LED_DRIVER_ADDR_1 IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); -# endif -# ifdef LED_DRIVER_ADDR_2 +# if defined(LED_DRIVER_ADDR_2) IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); -# endif -# ifdef LED_DRIVER_ADDR_3 +# if defined(LED_DRIVER_ADDR_3) IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); -# endif -# ifdef LED_DRIVER_ADDR_4 +# if defined(LED_DRIVER_ADDR_4) IS31FL3731_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); +# endif +# endif # endif -# else -# ifdef LED_DRIVER_ADDR_1 +} + +const led_matrix_driver_t led_matrix_driver = { + .init = init, + .flush = flush, + .set_value = IS31FL3731_set_value, + .set_value_all = IS31FL3731_set_value_all, +}; + +# elif defined(IS31FL3733) +static void flush(void) { IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_1, 0); -# endif -# ifdef LED_DRIVER_ADDR_2 +# if defined(LED_DRIVER_ADDR_2) IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_2, 1); -# endif -# ifdef LED_DRIVER_ADDR_3 +# if defined(LED_DRIVER_ADDR_3) IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_3, 2); -# endif -# ifdef LED_DRIVER_ADDR_4 +# if defined(LED_DRIVER_ADDR_4) IS31FL3733_update_pwm_buffers(LED_DRIVER_ADDR_4, 3); +# endif +# endif # endif -# endif } const led_matrix_driver_t led_matrix_driver = { - .init = init, + .init = init, .flush = flush, -# ifdef IS31FL3731 - .set_value = IS31FL3731_set_value, - .set_value_all = IS31FL3731_set_value_all, -# else .set_value = IS31FL3733_set_value, .set_value_all = IS31FL3733_set_value_all, -# endif }; - +# endif #endif diff --git a/quantum/led_matrix/led_matrix_legacy_enables.h b/quantum/led_matrix/led_matrix_legacy_enables.h deleted file mode 100644 index 7738d2f34ec..00000000000 --- a/quantum/led_matrix/led_matrix_legacy_enables.h +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright 2021 QMK - * - * 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/>. - */ - -// to-do: remove this - -#pragma once - -#ifndef DISABLE_LED_MATRIX_ALPHAS_MODS -# define ENABLE_LED_MATRIX_ALPHAS_MODS -#endif -#ifndef DISABLE_LED_MATRIX_BREATHING -# define ENABLE_LED_MATRIX_BREATHING -#endif -#ifndef DISABLE_LED_MATRIX_BAND -# define ENABLE_LED_MATRIX_BAND -#endif -#ifndef DISABLE_LED_MATRIX_BAND_PINWHEEL -# define ENABLE_LED_MATRIX_BAND_PINWHEEL -#endif -#ifndef DISABLE_LED_MATRIX_BAND_SPIRAL -# define ENABLE_LED_MATRIX_BAND_SPIRAL -#endif -#ifndef DISABLE_LED_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT -#endif -#ifndef DISABLE_LED_MATRIX_CYCLE_UP_DOWN -# define ENABLE_LED_MATRIX_CYCLE_UP_DOWN -#endif -#ifndef DISABLE_LED_MATRIX_CYCLE_OUT_IN -# define ENABLE_LED_MATRIX_CYCLE_OUT_IN -#endif -#ifndef DISABLE_LED_MATRIX_DUAL_BEACON -# define ENABLE_LED_MATRIX_DUAL_BEACON -#endif -#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS -# endif -# ifndef DISABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS -# endif -# ifndef DISABLE_LED_MATRIX_SPLASH -# define ENABLE_LED_MATRIX_SPLASH -# endif -# ifndef DISABLE_LED_MATRIX_MULTISPLASH -# define ENABLE_LED_MATRIX_MULTISPLASH -# endif -#endif -#ifndef DISABLE_LED_MATRIX_WAVE_LEFT_RIGHT -# define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT -#endif -#ifndef DISABLE_LED_MATRIX_WAVE_UP_DOWN -# define ENABLE_LED_MATRIX_WAVE_UP_DOWN -#endif diff --git a/quantum/main.c b/quantum/main.c index 2cbcd73d8ff..6ed6b95741d 100644 --- a/quantum/main.c +++ b/quantum/main.c @@ -19,8 +19,33 @@ void platform_setup(void); void protocol_setup(void); -void protocol_init(void); -void protocol_task(void); +void protocol_pre_init(void); +void protocol_post_init(void); +void protocol_pre_task(void); +void protocol_post_task(void); + +// Bodge as refactoring this area sucks.... +void protocol_init(void) __attribute__((weak)); +void protocol_init(void) { + protocol_pre_init(); + + keyboard_init(); + + protocol_post_init(); +} + +void protocol_task(void) __attribute__((weak)); +void protocol_task(void) { + protocol_pre_task(); + + keyboard_task(); + + protocol_post_task(); +} + +#ifdef DEFERRED_EXEC_ENABLE +void deferred_exec_task(void); +#endif // DEFERRED_EXEC_ENABLE /** \brief Main * @@ -30,12 +55,19 @@ int main(void) __attribute__((weak)); int main(void) { platform_setup(); protocol_setup(); + keyboard_setup(); protocol_init(); /* Main loop */ while (true) { protocol_task(); + +#ifdef DEFERRED_EXEC_ENABLE + // Run deferred executions + deferred_exec_task(); +#endif // DEFERRED_EXEC_ENABLE + housekeeping_task(); } } diff --git a/quantum/matrix.c b/quantum/matrix.c index 33586c431b3..483d518eccf 100644 --- a/quantum/matrix.c +++ b/quantum/matrix.c @@ -69,7 +69,7 @@ uint8_t thisHand, thatHand; // user-defined overridable functions __attribute__((weak)) void matrix_init_pins(void); __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); -__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); +__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter); #ifdef SPLIT_KEYBOARD __attribute__((weak)) void matrix_slave_scan_kb(void) { matrix_slave_scan_user(); } __attribute__((weak)) void matrix_slave_scan_user(void) {} @@ -113,10 +113,11 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[] // Start with a clear matrix row matrix_row_t current_row_value = 0; - for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + matrix_row_t row_shifter = MATRIX_ROW_SHIFTER; + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++, row_shifter <<= 1) { pin_t pin = direct_pins[current_row][col_index]; if (pin != NO_PIN) { - current_row_value |= readPin(pin) ? 0 : (MATRIX_ROW_SHIFTER << col_index); + current_row_value |= readPin(pin) ? 0 : row_shifter; } } @@ -169,11 +170,12 @@ __attribute__((weak)) void matrix_read_cols_on_row(matrix_row_t current_matrix[] matrix_output_select_delay(); // For each col... - for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + matrix_row_t row_shifter = MATRIX_ROW_SHIFTER; + for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++, row_shifter <<= 1) { uint8_t pin_state = readMatrixPin(col_pins[col_index]); // Populate the matrix row with the state of the col pin - current_row_value |= pin_state ? 0 : (MATRIX_ROW_SHIFTER << col_index); + current_row_value |= pin_state ? 0 : row_shifter; } // Unselect row @@ -217,7 +219,7 @@ __attribute__((weak)) void matrix_init_pins(void) { } } -__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { +__attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col, matrix_row_t row_shifter) { bool key_pressed = false; // Select col @@ -231,11 +233,11 @@ __attribute__((weak)) void matrix_read_rows_on_col(matrix_row_t current_matrix[] // Check row pin state if (readMatrixPin(row_pins[row_index]) == 0) { // Pin LO, set col bit - current_matrix[row_index] |= (MATRIX_ROW_SHIFTER << current_col); + current_matrix[row_index] |= row_shifter; key_pressed = true; } else { // Pin HI, clear col bit - current_matrix[row_index] &= ~(MATRIX_ROW_SHIFTER << current_col); + current_matrix[row_index] &= ~row_shifter; } } @@ -288,10 +290,8 @@ void matrix_init(void) { matrix_init_pins(); // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - raw_matrix[i] = 0; - matrix[i] = 0; - } + memset(matrix, 0, sizeof(matrix)); + memset(raw_matrix, 0, sizeof(raw_matrix)); debounce_init(ROWS_PER_HAND); @@ -312,24 +312,22 @@ __attribute__((weak)) bool transport_master_if_connected(matrix_row_t master_mat bool matrix_post_scan(void) { bool changed = false; if (is_keyboard_master()) { + static bool last_connected = false; matrix_row_t slave_matrix[ROWS_PER_HAND] = {0}; if (transport_master_if_connected(matrix + thisHand, slave_matrix)) { - for (int i = 0; i < ROWS_PER_HAND; ++i) { - if (matrix[thatHand + i] != slave_matrix[i]) { - matrix[thatHand + i] = slave_matrix[i]; - changed = true; - } - } - } else { - // reset other half if disconnected - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[thatHand + i] = 0; - slave_matrix[i] = 0; - } + changed = memcmp(matrix + thatHand, slave_matrix, sizeof(slave_matrix)) != 0; + last_connected = true; + } else if (last_connected) { + // reset other half when disconnected + memset(slave_matrix, 0, sizeof(slave_matrix)); changed = true; + + last_connected = false; } + if (changed) memcpy(matrix + thatHand, slave_matrix, sizeof(slave_matrix)); + matrix_scan_quantum(); } else { transport_slave(matrix + thatHand, matrix + thisHand); @@ -351,8 +349,9 @@ uint8_t matrix_scan(void) { } #elif (DIODE_DIRECTION == ROW2COL) // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { - matrix_read_rows_on_col(curr_matrix, current_col); + matrix_row_t row_shifter = MATRIX_ROW_SHIFTER; + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++, row_shifter <<= 1) { + matrix_read_rows_on_col(curr_matrix, current_col, row_shifter); } #endif diff --git a/quantum/mcu_selection.mk b/quantum/mcu_selection.mk deleted file mode 100644 index 3b86433a869..00000000000 --- a/quantum/mcu_selection.mk +++ /dev/null @@ -1,600 +0,0 @@ -MCU_ORIG := $(MCU) - -ifneq ($(findstring MKL26Z64, $(MCU)),) - # Cortex version - MCU = cortex-m0plus - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = KINETIS - MCU_SERIES = KL2x - - # Linker script to use - # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= MKL26Z64 - - # Startup code to use - # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= kl2x - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= PJRC_TEENSY_LC -endif - -ifneq ($(findstring MK20DX128, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = KINETIS - MCU_SERIES = K20x - - # Linker script to use - # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= MK20DX128 - - # Startup code to use - # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= k20x5 - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= PJRC_TEENSY_3 -endif - -ifneq ($(findstring MK20DX256, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = KINETIS - MCU_SERIES = K20x - - # Linker script to use - # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= MK20DX256 - - # Startup code to use - # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= k20x7 - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= PJRC_TEENSY_3_1 -endif - -ifneq ($(findstring MK66F18, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = KINETIS - MCU_SERIES = MK66F18 - - # Linker script to use - # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= MK66FX1M0 - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= MK66F18 - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= PJRC_TEENSY_3_6 -endif - -ifneq ($(findstring STM32F042, $(MCU)),) - # Cortex version - MCU = cortex-m0 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F0xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F042x6 - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f0xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F042X6 - - USE_FPU ?= no - - # UF2 settings - UF2_FAMILY ?= STM32F0 -endif - -ifneq ($(findstring STM32F072, $(MCU)),) - # Cortex version - MCU = cortex-m0 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F0xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F072xB - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f0xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F072XB - - USE_FPU ?= no - - # UF2 settings - UF2_FAMILY ?= STM32F0 -endif - -ifneq ($(findstring STM32F103, $(MCU)),) - # Cortex version - MCU = cortex-m3 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F1xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F103x8 - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f1xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F103 - - USE_FPU ?= no - - # UF2 settings - UF2_FAMILY ?= STM32F1 -endif - -ifneq ($(findstring STM32F303, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F3xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F303xC - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f3xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F303XC - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32F3 -endif - -ifneq ($(findstring STM32F401, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - ifeq ($(strip $(BOOTLOADER)), tinyuf2) - MCU_LDSCRIPT ?= STM32F401xC_tinyuf2 - FIRMWARE_FORMAT ?= uf2 - else - MCU_LDSCRIPT ?= STM32F401xC - endif - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= BLACKPILL_STM32_F401 - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32F4 -endif - -ifneq ($(findstring STM32F407, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F407xE - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F407XE - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32F4 -endif - -ifneq ($(findstring STM32F411, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - ifeq ($(strip $(BOOTLOADER)), tinyuf2) - MCU_LDSCRIPT ?= STM32F411xE_tinyuf2 - FIRMWARE_FORMAT ?= uf2 - else - MCU_LDSCRIPT ?= STM32F411xE - endif - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= BLACKPILL_STM32_F411 - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32F4 -endif - -ifneq ($(findstring STM32F446, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32F4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32F446xE - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32f4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_F446XE - - USE_FPU ?= yes -endif - -ifneq ($(findstring STM32G431, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32G4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32G431xB - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32g4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_G431XB - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32G4 -endif - -ifneq ($(findstring STM32G474, $(MCU)),) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32G4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32G474xE - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32g4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_G474XE - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32G4 -endif - -ifneq (,$(filter $(MCU),STM32L433 STM32L443)) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32L4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32L432xC - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32l4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_L433XC - - PLATFORM_NAME ?= platform_l432 - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32L4 -endif - -ifneq (,$(filter $(MCU),STM32L412 STM32L422)) - # Cortex version - MCU = cortex-m4 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 7 - - ## chip/board settings - # - the next two should match the directories in - # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = STM32 - MCU_SERIES = STM32L4xx - - # Linker script to use - # - it should exist either in <chibios>/os/common/startup/ARMCMx/compilers/GCC/ld/ - # or <keyboard_dir>/ld/ - MCU_LDSCRIPT ?= STM32L412xB - - # Startup code to use - # - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP ?= stm32l4xx - - # Board: it should exist either in <chibios>/os/hal/boards/, - # <keyboard_dir>/boards/, or drivers/boards/ - BOARD ?= GENERIC_STM32_L412XB - - PLATFORM_NAME ?= platform_l432 - - USE_FPU ?= yes - - # UF2 settings - UF2_FAMILY ?= STM32L4 -endif - -ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2 atmega16u4 atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287)) - PROTOCOL = LUFA - - # Processor frequency. - # This will define a symbol, F_CPU, in all source code files equal to the - # processor frequency in Hz. You can then use this symbol in your source code to - # calculate timings. Do NOT tack on a 'UL' at the end, this will be done - # automatically to create a 32-bit value in your source code. - # - # This will be an integer division of F_USB below, as it is sourced by - # F_USB after it has run through any CPU prescalers. Note that this value - # does not *change* the processor frequency - it should merely be updated to - # reflect the processor speed set externally so that the code can use accurate - # software delays. - F_CPU ?= 16000000 - - # LUFA specific - # - # Target architecture (see library "Board Types" documentation). - ARCH = AVR8 - - # Input clock frequency. - # This will define a symbol, F_USB, in all source code files equal to the - # input clock frequency (before any prescaling is performed) in Hz. This value may - # differ from F_CPU if prescaling is used on the latter, and is required as the - # raw input clock is fed directly to the PLL sections of the AVR for high speed - # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' - # at the end, this will be done automatically to create a 32-bit value in your - # source code. - # - # If no clock division is performed on the input clock inside the AVR (via the - # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. - F_USB ?= $(F_CPU) - - # Interrupt driven control endpoint task - ifeq (,$(filter $(NO_INTERRUPT_CONTROL_ENDPOINT),yes)) - OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - endif - ifneq (,$(filter $(MCU),at90usb162 atmega16u2 atmega32u2)) - NO_I2C = yes - endif -endif - -ifneq (,$(filter $(MCU),atmega32a)) - # MCU name for avrdude - AVRDUDE_MCU = m32 - - PROTOCOL = VUSB - - # Processor frequency. - # This will define a symbol, F_CPU, in all source code files equal to the - # processor frequency in Hz. You can then use this symbol in your source code to - # calculate timings. Do NOT tack on a 'UL' at the end, this will be done - # automatically to create a 32-bit value in your source code. - F_CPU ?= 12000000 -endif - -ifneq (,$(filter $(MCU),atmega328p)) - # MCU name for avrdude - AVRDUDE_MCU = m328p - - PROTOCOL = VUSB - - # Processor frequency. - # This will define a symbol, F_CPU, in all source code files equal to the - # processor frequency in Hz. You can then use this symbol in your source code to - # calculate timings. Do NOT tack on a 'UL' at the end, this will be done - # automatically to create a 32-bit value in your source code. - F_CPU ?= 16000000 -endif - -ifneq (,$(filter $(MCU),atmega328)) - # MCU name for avrdude - AVRDUDE_MCU = m328 - - PROTOCOL = VUSB - - # Processor frequency. - # This will define a symbol, F_CPU, in all source code files equal to the - # processor frequency in Hz. You can then use this symbol in your source code to - # calculate timings. Do NOT tack on a 'UL' at the end, this will be done - # automatically to create a 32-bit value in your source code. - F_CPU ?= 16000000 -endif - -ifneq (,$(filter $(MCU),attiny85)) - PROTOCOL = VUSB - - # Processor frequency. - # This will define a symbol, F_CPU, in all source code files equal to the - # processor frequency in Hz. You can then use this symbol in your source code to - # calculate timings. Do NOT tack on a 'UL' at the end, this will be done - # automatically to create a 32-bit value in your source code. - F_CPU ?= 16500000 -endif diff --git a/quantum/pointing_device.c b/quantum/pointing_device.c index 09d889f697c..2fefdb67b6a 100644 --- a/quantum/pointing_device.c +++ b/quantum/pointing_device.c @@ -1,34 +1,57 @@ -/* -Copyright 2017 Joshua Broekhuijsen <snipeye+qmk@gmail.com> - -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 <stdint.h> -#include "report.h" -#include "host.h" -#include "timer.h" -#include "print.h" -#include "debug.h" +/* Copyright 2017 Joshua Broekhuijsen <snipeye+qmk@gmail.com> + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * Copyright 2021 Dasky (@daskygit) + * + * 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 "pointing_device.h" +#include <string.h> +#ifdef MOUSEKEY_ENABLE +# include "mousekey.h" +#endif +#if (defined(POINTING_DEVICE_ROTATION_90) + defined(POINTING_DEVICE_ROTATION_180) + defined(POINTING_DEVICE_ROTATION_270)) > 1 +# error More than one rotation selected. This is not supported. +#endif static report_mouse_t mouseReport = {}; -__attribute__((weak)) bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) { return (new.buttons != old.buttons) || (new.x&& new.x != old.x) || (new.y&& new.y != old.y) || (new.h&& new.h != old.h) || (new.v&& new.v != old.v); } +extern const pointing_device_driver_t pointing_device_driver; + +__attribute__((weak)) bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) { return memcmp(&new, &old, sizeof(new)); } + +__attribute__((weak)) void pointing_device_init_kb(void) {} +__attribute__((weak)) void pointing_device_init_user(void) {} +__attribute__((weak)) report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report) { return pointing_device_task_user(mouse_report); } +__attribute__((weak)) report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { return mouse_report; } + +__attribute__((weak)) uint8_t pointing_device_handle_buttons(uint8_t buttons, bool pressed, pointing_device_buttons_t button) { + if (pressed) { + buttons |= 1 << (button); + } else { + buttons &= ~(1 << (button)); + } + return buttons; +} __attribute__((weak)) void pointing_device_init(void) { - // initialize device, if that needs to be done. + pointing_device_driver.init(); +#ifdef POINTING_DEVICE_MOTION_PIN + setPinInputHigh(POINTING_DEVICE_MOTION_PIN); +#endif + pointing_device_init_kb(); + pointing_device_init_user(); } __attribute__((weak)) void pointing_device_send(void) { @@ -43,20 +66,55 @@ __attribute__((weak)) void pointing_device_send(void) { mouseReport.y = 0; mouseReport.v = 0; mouseReport.h = 0; - old_report = mouseReport; + + memcpy(&old_report, &mouseReport, sizeof(mouseReport)); } __attribute__((weak)) void pointing_device_task(void) { - // gather info and put it in: - // mouseReport.x = 127 max -127 min - // mouseReport.y = 127 max -127 min - // mouseReport.v = 127 max -127 min (scroll vertical) - // mouseReport.h = 127 max -127 min (scroll horizontal) - // mouseReport.buttons = 0x1F (decimal 31, binary 00011111) max (bitmask for mouse buttons 1-5, 1 is rightmost, 5 is leftmost) 0x00 min - // send the report + // Gather report info +#ifdef POINTING_DEVICE_MOTION_PIN + if (!readPin(POINTING_DEVICE_MOTION_PIN)) +#endif + mouseReport = pointing_device_driver.get_report(mouseReport); + + // Support rotation of the sensor data +#if defined(POINTING_DEVICE_ROTATION_90) || defined(POINTING_DEVICE_ROTATION_180) || defined(POINTING_DEVICE_ROTATION_270) + int8_t x = mouseReport.x, y = mouseReport.y; +# if defined(POINTING_DEVICE_ROTATION_90) + mouseReport.x = y; + mouseReport.y = -x; +# elif defined(POINTING_DEVICE_ROTATION_180) + mouseReport.x = -x; + mouseReport.y = -y; +# elif defined(POINTING_DEVICE_ROTATION_270) + mouseReport.x = -y; + mouseReport.y = x; +# else +# error "How the heck did you get here?!" +# endif +#endif + // Support Inverting the X and Y Axises +#if defined(POINTING_DEVICE_INVERT_X) + mouseReport.x = -mouseReport.x; +#endif +#if defined(POINTING_DEVICE_INVERT_Y) + mouseReport.y = -mouseReport.y; +#endif + + // allow kb to intercept and modify report + mouseReport = pointing_device_task_kb(mouseReport); + // combine with mouse report to ensure that the combined is sent correctly +#ifdef MOUSEKEY_ENABLE + report_mouse_t mousekey_report = mousekey_get_report(); + mouseReport.buttons = mouseReport.buttons | mousekey_report.buttons; +#endif pointing_device_send(); } report_mouse_t pointing_device_get_report(void) { return mouseReport; } void pointing_device_set_report(report_mouse_t newMouseReport) { mouseReport = newMouseReport; } + +uint16_t pointing_device_get_cpi(void) { return pointing_device_driver.get_cpi(); } + +void pointing_device_set_cpi(uint16_t cpi) { pointing_device_driver.set_cpi(cpi); } diff --git a/quantum/pointing_device.h b/quantum/pointing_device.h index 56a542d5458..5106c26660e 100644 --- a/quantum/pointing_device.h +++ b/quantum/pointing_device.h @@ -21,9 +21,68 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "host.h" #include "report.h" +#if defined(POINTING_DEVICE_DRIVER_adns5050) +# include "drivers/sensors/adns5050.h" +#elif defined(POINTING_DEVICE_DRIVER_adns9800) +# include "spi_master.h" +# include "drivers/sensors/adns9800.h" +#elif defined(POINTING_DEVICE_DRIVER_analog_joystick) +# include "analog.h" +# include "drivers/sensors/analog_joystick.h" +#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) || defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi) +# include "drivers/sensors/cirque_pinnacle.h" +#elif defined(POINTING_DEVICE_DRIVER_pimoroni_trackball) +# include "i2c_master.h" +# include "drivers/sensors/pimoroni_trackball.h" +// support for legacy pimoroni defines +# ifdef PIMORONI_TRACKBALL_INVERT_X +# define POINTING_DEVICE_INVERT_X +# endif +# ifdef PIMORONI_TRACKBALL_INVERT_Y +# define POINTING_DEVICE_INVERT_Y +# endif +# ifdef PIMORONI_TRACKBALL_ROTATE +# define POINTING_DEVICE_ROTATION_90 +# endif +#elif defined(POINTING_DEVICE_DRIVER_pmw3360) +# include "spi_master.h" +# include "drivers/sensors/pmw3360.h" +#else +void pointing_device_driver_init(void); +report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report); +uint16_t pointing_device_driver_get_cpi(void); +void pointing_device_driver_set_cpi(uint16_t cpi); +#endif + +typedef struct { + void (*init)(void); + report_mouse_t (*get_report)(report_mouse_t mouse_report); + void (*set_cpi)(uint16_t); + uint16_t (*get_cpi)(void); +} pointing_device_driver_t; + +typedef enum { + POINTING_DEVICE_BUTTON1, + POINTING_DEVICE_BUTTON2, + POINTING_DEVICE_BUTTON3, + POINTING_DEVICE_BUTTON4, + POINTING_DEVICE_BUTTON5, + POINTING_DEVICE_BUTTON6, + POINTING_DEVICE_BUTTON7, + POINTING_DEVICE_BUTTON8, +} pointing_device_buttons_t; + void pointing_device_init(void); void pointing_device_task(void); void pointing_device_send(void); report_mouse_t pointing_device_get_report(void); void pointing_device_set_report(report_mouse_t newMouseReport); bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old); +uint16_t pointing_device_get_cpi(void); +void pointing_device_set_cpi(uint16_t cpi); + +void pointing_device_init_kb(void); +void pointing_device_init_user(void); +report_mouse_t pointing_device_task_kb(report_mouse_t mouse_report); +report_mouse_t pointing_device_task_user(report_mouse_t mouse_report); +uint8_t pointing_device_handle_buttons(uint8_t buttons, bool pressed, pointing_device_buttons_t button); diff --git a/quantum/pointing_device_drivers.c b/quantum/pointing_device_drivers.c new file mode 100644 index 00000000000..9ad5e76ba63 --- /dev/null +++ b/quantum/pointing_device_drivers.c @@ -0,0 +1,262 @@ +/* Copyright 2017 Joshua Broekhuijsen <snipeye+qmk@gmail.com> + * Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com> + * Copyright 2021 Dasky (@daskygit) + * + * 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 "pointing_device.h" +#include "debug.h" +#include "wait.h" +#include "timer.h" +#include <stddef.h> + +// hid mouse reports cannot exceed -127 to 127, so constrain to that value +#define constrain_hid(amt) ((amt) < -127 ? -127 : ((amt) > 127 ? 127 : (amt))) + +// get_report functions should probably be moved to their respective drivers. +#if defined(POINTING_DEVICE_DRIVER_adns5050) +report_mouse_t adns5050_get_report(report_mouse_t mouse_report) { + report_adns5050_t data = adns5050_read_burst(); + + if (data.dx != 0 || data.dy != 0) { +# ifdef CONSOLE_ENABLE + if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); +# endif + + mouse_report.x = data.dx; + mouse_report.y = data.dy; + } + + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = adns5050_init, + .get_report = adns5050_get_report, + .set_cpi = adns5050_set_cpi, + .get_cpi = adns5050_get_cpi, +}; +// clang-format on +#elif defined(POINTING_DEVICE_DRIVER_adns9800) + +report_mouse_t adns9800_get_report_driver(report_mouse_t mouse_report) { + report_adns9800_t sensor_report = adns9800_get_report(); + + int8_t clamped_x = constrain_hid(sensor_report.x); + int8_t clamped_y = constrain_hid(sensor_report.y); + + mouse_report.x = clamped_x; + mouse_report.y = clamped_y; + + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = adns9800_init, + .get_report = adns9800_get_report_driver, + .set_cpi = adns9800_set_cpi, + .get_cpi = adns9800_get_cpi +}; +// clang-format on +#elif defined(POINTING_DEVICE_DRIVER_analog_joystick) +report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) { + report_analog_joystick_t data = analog_joystick_read(); + +# ifdef CONSOLE_ENABLE + if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); +# endif + + mouse_report.x = data.x; + mouse_report.y = data.y; + + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, data.button, POINTING_DEVICE_BUTTON1); + + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = analog_joystick_init, + .get_report = analog_joystick_get_report, + .set_cpi = NULL, + .get_cpi = NULL +}; +// clang-format on +#elif defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_i2c) || defined(POINTING_DEVICE_DRIVER_cirque_pinnacle_spi) +# ifndef CIRQUE_PINNACLE_TAPPING_TERM +# ifdef TAPPING_TERM_PER_KEY +# include "action.h" +# include "action_tapping.h" +# define CIRQUE_PINNACLE_TAPPING_TERM get_tapping_term(KC_BTN1, NULL) +# else +# ifdef TAPPING_TERM +# define CIRQUE_PINNACLE_TAPPING_TERM TAPPING_TERM +# else +# define CIRQUE_PINNACLE_TAPPING_TERM 200 +# endif +# endif +# endif +# ifndef CIRQUE_PINNACLE_TOUCH_DEBOUNCE +# define CIRQUE_PINNACLE_TOUCH_DEBOUNCE (CIRQUE_PINNACLE_TAPPING_TERM * 8) +# endif + +report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) { + pinnacle_data_t touchData = cirque_pinnacle_read_data(); + static uint16_t x = 0, y = 0, mouse_timer = 0; + int8_t report_x = 0, report_y = 0; + static bool is_z_down = false; + + cirque_pinnacle_scale_data(&touchData, cirque_pinnacle_get_scale(), cirque_pinnacle_get_scale()); // Scale coordinates to arbitrary X, Y resolution + + if (x && y && touchData.xValue && touchData.yValue) { + report_x = (int8_t)(touchData.xValue - x); + report_y = (int8_t)(touchData.yValue - y); + } + x = touchData.xValue; + y = touchData.yValue; + + if ((bool)touchData.zValue != is_z_down) { + is_z_down = (bool)touchData.zValue; + if (!touchData.zValue) { + if (timer_elapsed(mouse_timer) < CIRQUE_PINNACLE_TAPPING_TERM && mouse_timer != 0) { + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, true, POINTING_DEVICE_BUTTON1); + pointing_device_set_report(mouse_report); + pointing_device_send(); +# if TAP_CODE_DELAY > 0 + wait_ms(TAP_CODE_DELAY); +# endif + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1); + pointing_device_set_report(mouse_report); + pointing_device_send(); + } + } + mouse_timer = timer_read(); + } + if (timer_elapsed(mouse_timer) > (CIRQUE_PINNACLE_TOUCH_DEBOUNCE)) { + mouse_timer = 0; + } + mouse_report.x = report_x; + mouse_report.y = report_y; + + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = cirque_pinnacle_init, + .get_report = cirque_pinnacle_get_report, + .set_cpi = cirque_pinnacle_set_scale, + .get_cpi = cirque_pinnacle_get_scale +}; +// clang-format on + +#elif defined(POINTING_DEVICE_DRIVER_pimoroni_trackball) +report_mouse_t pimorono_trackball_get_report(report_mouse_t mouse_report) { + static fast_timer_t throttle = 0; + static uint16_t debounce = 0; + static uint8_t error_count = 0; + pimoroni_data_t pimoroni_data = {0}; + static int16_t x_offset = 0, y_offset = 0; + + if (error_count < PIMORONI_TRACKBALL_ERROR_COUNT && timer_elapsed_fast(throttle) >= PIMORONI_TRACKBALL_INTERVAL_MS) { + i2c_status_t status = read_pimoroni_trackball(&pimoroni_data); + + if (status == I2C_STATUS_SUCCESS) { + error_count = 0; + + if (!(pimoroni_data.click & 128)) { + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, false, POINTING_DEVICE_BUTTON1); + if (!debounce) { + x_offset += pimoroni_trackball_get_offsets(pimoroni_data.right, pimoroni_data.left, PIMORONI_TRACKBALL_SCALE); + y_offset += pimoroni_trackball_get_offsets(pimoroni_data.down, pimoroni_data.up, PIMORONI_TRACKBALL_SCALE); + pimoroni_trackball_adapt_values(&mouse_report.x, &x_offset); + pimoroni_trackball_adapt_values(&mouse_report.y, &y_offset); + } else { + debounce--; + } + } else { + mouse_report.buttons = pointing_device_handle_buttons(mouse_report.buttons, true, POINTING_DEVICE_BUTTON1); + debounce = PIMORONI_TRACKBALL_DEBOUNCE_CYCLES; + } + } else { + error_count++; + } + throttle = timer_read_fast(); + } + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = pimironi_trackball_device_init, + .get_report = pimorono_trackball_get_report, + .set_cpi = NULL, + .get_cpi = NULL +}; +// clang-format on +#elif defined(POINTING_DEVICE_DRIVER_pmw3360) + +static void init(void) { pmw3360_init(); } + +report_mouse_t pmw3360_get_report(report_mouse_t mouse_report) { + report_pmw3360_t data = pmw3360_read_burst(); + static uint16_t MotionStart = 0; // Timer for accel, 0 is resting state + + if (data.isOnSurface && data.isMotion) { + // Reset timer if stopped moving + if (!data.isMotion) { + if (MotionStart != 0) MotionStart = 0; + return mouse_report; + } + + // Set timer if new motion + if ((MotionStart == 0) && data.isMotion) { +# ifdef CONSOLE_ENABLE + if (debug_mouse) dprintf("Starting motion.\n"); +# endif + MotionStart = timer_read(); + } + mouse_report.x = constrain_hid(data.dx); + mouse_report.y = constrain_hid(data.dy); + } + + return mouse_report; +} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = init, + .get_report = pmw3360_get_report, + .set_cpi = pmw3360_set_cpi, + .get_cpi = pmw3360_get_cpi +}; +// clang-format on +#else +__attribute__((weak)) void pointing_device_driver_init(void) {} +__attribute__((weak)) report_mouse_t pointing_device_driver_get_report(report_mouse_t mouse_report) { return mouse_report; } +__attribute__((weak)) uint16_t pointing_device_driver_get_cpi(void) { return 0; } +__attribute__((weak)) void pointing_device_driver_set_cpi(uint16_t cpi) {} + +// clang-format off +const pointing_device_driver_t pointing_device_driver = { + .init = pointing_device_driver_init, + .get_report = pointing_device_driver_get_report, + .get_cpi = pointing_device_driver_get_cpi, + .set_cpi = pointing_device_driver_set_cpi +}; +// clang-format on +#endif diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c index 51b0efdb47c..bbc6367ff18 100644 --- a/quantum/process_keycode/process_auto_shift.c +++ b/quantum/process_keycode/process_auto_shift.c @@ -18,14 +18,33 @@ # include <stdbool.h> # include <stdio.h> - # include "process_auto_shift.h" -static uint16_t autoshift_time = 0; -static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; -static uint16_t autoshift_lastkey = KC_NO; +# ifndef AUTO_SHIFT_DISABLED_AT_STARTUP +# define AUTO_SHIFT_STARTUP_STATE true /* enabled */ +# else +# define AUTO_SHIFT_STARTUP_STATE false /* disabled */ +# endif + +// Stores the last Auto Shift key's up or down time, for evaluation or keyrepeat. +static uint16_t autoshift_time = 0; +# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) +// Stores the last key's up or down time, to replace autoshift_time so that Tap Hold times are accurate. +static uint16_t retroshift_time = 0; +// Stores a possibly Retro Shift key's up or down time, as retroshift_time needs +// to be set before the Retro Shift key is evaluated if it is interrupted by an +// Auto Shifted key. +static uint16_t last_retroshift_time; +# endif +static uint16_t autoshift_timeout = AUTO_SHIFT_TIMEOUT; +static uint16_t autoshift_lastkey = KC_NO; +static keyrecord_t autoshift_lastrecord; +// Keys take 8 bits if modifiers are excluded. This records the shift state +// when pressed for each key, so that can be passed to the release function +// and it knows which key needs to be released (if shifted is different base). +static uint16_t autoshift_shift_states[((1 << 8) + 15) / 16]; static struct { - // Whether autoshift is enabled. + // Whether Auto Shift is enabled. bool enabled : 1; // Whether the last auto-shifted key was released after the timeout. This // is used to replicate the last key for a tap-then-hold. @@ -34,43 +53,157 @@ static struct { bool in_progress : 1; // Whether the auto-shifted keypress has been registered. bool holding_shift : 1; -} autoshift_flags = {true, false, false, false}; + // Whether the user is holding a shift and we removed it. + bool cancelling_lshift : 1; + bool cancelling_rshift : 1; + // clang-format wants to remove the true for some reason. + // clang-format off +} autoshift_flags = {AUTO_SHIFT_STARTUP_STATE, false, false, false, false, false}; +// clang-format on + +/** \brief Called on physical press, returns whether key should be added to Auto Shift */ +__attribute__((weak)) bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { return false; } + +/** \brief Called on physical press, returns whether is Auto Shift key */ +__attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { +# ifndef NO_AUTO_SHIFT_ALPHA + case AUTO_SHIFT_ALPHA: +# endif +# ifndef NO_AUTO_SHIFT_NUMERIC + case AUTO_SHIFT_NUMERIC: +# endif +# ifndef NO_AUTO_SHIFT_SPECIAL + case AUTO_SHIFT_SPECIAL: +# endif + return true; + } + return get_custom_auto_shifted_key(keycode, record); +} + +/** \brief Called to check whether defines should apply if PER_KEY is set for it */ +__attribute__((weak)) bool get_auto_shift_repeat(uint16_t keycode, keyrecord_t *record) { return true; } +__attribute__((weak)) bool get_auto_shift_no_auto_repeat(uint16_t keycode, keyrecord_t *record) { return true; } + +/** \brief Called when an Auto Shift key needs to be pressed */ +__attribute__((weak)) void autoshift_press_user(uint16_t keycode, bool shifted, keyrecord_t *record) { + if (shifted) { + add_weak_mods(MOD_BIT(KC_LSFT)); + } + register_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode); +} + +/** \brief Called when an Auto Shift key needs to be released */ +__attribute__((weak)) void autoshift_release_user(uint16_t keycode, bool shifted, keyrecord_t *record) { unregister_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode); } + +/** \brief Sets the shift state to use when keyrepeating, required by custom shifts */ +void set_autoshift_shift_state(uint16_t keycode, bool shifted) { + keycode = keycode & 0xFF; + if (shifted) { + autoshift_shift_states[keycode / 16] |= (uint16_t)1 << keycode % 16; + } else { + autoshift_shift_states[keycode / 16] &= ~((uint16_t)1 << keycode % 16); + } +} + +/** \brief Gets the shift state to use when keyrepeating, required by custom shifts */ +bool get_autoshift_shift_state(uint16_t keycode) { + keycode = keycode & 0xFF; + return (autoshift_shift_states[keycode / 16] & (uint16_t)1 << keycode % 16) != (uint16_t)0; +} + +/** \brief Restores the shift key if it was cancelled by Auto Shift */ +static void autoshift_flush_shift(void) { + autoshift_flags.holding_shift = false; + del_weak_mods(MOD_BIT(KC_LSFT)); + if (autoshift_flags.cancelling_lshift) { + autoshift_flags.cancelling_lshift = false; + add_mods(MOD_BIT(KC_LSFT)); + } + if (autoshift_flags.cancelling_rshift) { + autoshift_flags.cancelling_rshift = false; + add_mods(MOD_BIT(KC_RSFT)); + } + send_keyboard_report(); +} /** \brief Record the press of an autoshiftable key * * \return Whether the record should be further processed. */ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record) { - if (!autoshift_flags.enabled) { - return true; - } - + // clang-format off + if ((get_mods() +# if !defined(NO_ACTION_ONESHOT) && !defined(NO_ACTION_TAPPING) + | get_oneshot_mods() +# endif + ) & (~MOD_BIT(KC_LSFT)) + ) { + // clang-format on + // Prevents keyrepeating unshifted value of key after using it in a key combo. + autoshift_lastkey = KC_NO; # ifndef AUTO_SHIFT_MODIFIERS - if (get_mods()) { - return true; - } + // We can't return true here anymore because custom unshifted values are + // possible and there's no good way to tell whether the press returned + // true upon release. + set_autoshift_shift_state(keycode, false); + autoshift_press_user(keycode, false, record); +# if !defined(NO_ACTION_ONESHOT) && !defined(NO_ACTION_TAPPING) + set_oneshot_mods(get_oneshot_mods() & (~MOD_BIT(KC_LSFT))); + clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); +# endif + return false; # endif -# ifdef AUTO_SHIFT_REPEAT - const uint16_t elapsed = TIMER_DIFF_16(now, autoshift_time); -# ifndef AUTO_SHIFT_NO_AUTO_REPEAT - if (!autoshift_flags.lastshifted) { + } + + // Store record to be sent to user functions if there's no release record then. + autoshift_lastrecord = *record; + autoshift_lastrecord.event.pressed = false; + autoshift_lastrecord.event.time = 0; + // clang-format off +# if defined(AUTO_SHIFT_REPEAT) || defined(AUTO_SHIFT_REPEAT_PER_KEY) + if (keycode == autoshift_lastkey && +# ifdef AUTO_SHIFT_REPEAT_PER_KEY + get_auto_shift_repeat(autoshift_lastkey, record) && # endif - if (elapsed < TAPPING_TERM && keycode == autoshift_lastkey) { - // Allow a tap-then-hold for keyrepeat. - if (!autoshift_flags.lastshifted) { - register_code(autoshift_lastkey); - } else { - // Simulate pressing the shift key. - add_weak_mods(MOD_BIT(KC_LSFT)); - register_code(autoshift_lastkey); - } - return false; +# if !defined(AUTO_SHIFT_NO_AUTO_REPEAT) || defined(AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY) + ( + !autoshift_flags.lastshifted +# ifdef AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY + || get_auto_shift_no_auto_repeat(autoshift_lastkey, record) +# endif + ) && +# endif + TIMER_DIFF_16(now, autoshift_time) < +# ifdef TAPPING_TERM_PER_KEY + get_tapping_term(autoshift_lastkey, record) +# else + TAPPING_TERM +# endif + ) { + // clang-format on + // Allow a tap-then-hold for keyrepeat. + if (get_mods() & MOD_BIT(KC_LSFT)) { + autoshift_flags.cancelling_lshift = true; + del_mods(MOD_BIT(KC_LSFT)); } -# ifndef AUTO_SHIFT_NO_AUTO_REPEAT + if (get_mods() & MOD_BIT(KC_RSFT)) { + autoshift_flags.cancelling_rshift = true; + del_mods(MOD_BIT(KC_RSFT)); + } + // autoshift_shift_state doesn't need to be changed. + autoshift_press_user(autoshift_lastkey, autoshift_flags.lastshifted, record); + return false; } -# endif # endif + // Use physical shift state of press event to be more like normal typing. +# if !defined(NO_ACTION_ONESHOT) && !defined(NO_ACTION_TAPPING) + autoshift_flags.lastshifted = (get_mods() | get_oneshot_mods()) & MOD_BIT(KC_LSFT); + set_oneshot_mods(get_oneshot_mods() & (~MOD_BIT(KC_LSFT))); +# else + autoshift_flags.lastshifted = get_mods() & MOD_BIT(KC_LSFT); +# endif // Record the keycode so we can simulate it later. autoshift_lastkey = keycode; autoshift_time = now; @@ -84,51 +217,70 @@ static bool autoshift_press(uint16_t keycode, uint16_t now, keyrecord_t *record) /** \brief Registers an autoshiftable key under the right conditions * - * If the autoshift delay has elapsed, register a shift and the key. + * If autoshift_timeout has elapsed, register a shift and the key. * - * If the autoshift key is released before the delay has elapsed, register the + * If the Auto Shift key is released before the delay has elapsed, register the * key without a shift. + * + * Called on key down with keycode=KC_NO, auto-shifted key up, and timeout. */ -static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { - // Called on key down with KC_NO, auto-shifted key up, and timeout. - if (autoshift_flags.in_progress) { +static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger, keyrecord_t *record) { + if (autoshift_flags.in_progress && (keycode == autoshift_lastkey || keycode == KC_NO)) { // Process the auto-shiftable key. autoshift_flags.in_progress = false; - - // Time since the initial press was recorded. - const uint16_t elapsed = TIMER_DIFF_16(now, autoshift_time); - if (elapsed < autoshift_timeout) { - register_code(autoshift_lastkey); - autoshift_flags.lastshifted = false; - } else { - // Simulate pressing the shift key. - add_weak_mods(MOD_BIT(KC_LSFT)); - register_code(autoshift_lastkey); - autoshift_flags.lastshifted = true; -# if defined(AUTO_SHIFT_REPEAT) && !defined(AUTO_SHIFT_NO_AUTO_REPEAT) - if (matrix_trigger) { - // Prevents release. - return; - } + // clang-format off + autoshift_flags.lastshifted = + autoshift_flags.lastshifted + || TIMER_DIFF_16(now, autoshift_time) >= +# ifdef AUTO_SHIFT_TIMEOUT_PER_KEY + get_autoshift_timeout(autoshift_lastkey, record) +# else + autoshift_timeout # endif + ; + // clang-format on + set_autoshift_shift_state(autoshift_lastkey, autoshift_flags.lastshifted); + if (get_mods() & MOD_BIT(KC_LSFT)) { + autoshift_flags.cancelling_lshift = true; + del_mods(MOD_BIT(KC_LSFT)); + } + if (get_mods() & MOD_BIT(KC_RSFT)) { + autoshift_flags.cancelling_rshift = true; + del_mods(MOD_BIT(KC_RSFT)); } + autoshift_press_user(autoshift_lastkey, autoshift_flags.lastshifted, record); + // clang-format off +# if (defined(AUTO_SHIFT_REPEAT) || defined(AUTO_SHIFT_REPEAT_PER_KEY)) && (!defined(AUTO_SHIFT_NO_AUTO_REPEAT) || defined(AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY)) + if (matrix_trigger +# ifdef AUTO_SHIFT_REPEAT_PER_KEY + && get_auto_shift_repeat(autoshift_lastkey, record) +# endif +# ifdef AUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY + && !get_auto_shift_no_auto_repeat(autoshift_lastkey, record) +# endif + ) { + // Prevents release. + return; + } +# endif + // clang-format on # if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); # endif - unregister_code(autoshift_lastkey); - del_weak_mods(MOD_BIT(KC_LSFT)); + + autoshift_release_user(autoshift_lastkey, autoshift_flags.lastshifted, record); + autoshift_flush_shift(); } else { // Release after keyrepeat. - unregister_code(keycode); + autoshift_release_user(keycode, get_autoshift_shift_state(keycode), record); if (keycode == autoshift_lastkey) { // This will only fire when the key was the last auto-shiftable - // pressed. That prevents aaaaBBBB then releasing a from unshifting - // later Bs (if B wasn't auto-shiftable). - del_weak_mods(MOD_BIT(KC_LSFT)); + // pressed. That prevents 'aaaaBBBB' then releasing a from unshifting + // later 'B's (if 'B' wasn't auto-shiftable). + autoshift_flush_shift(); } } - send_keyboard_report(); // del_weak_mods doesn't send one. // Roll the autoshift_time forward for detecting tap-and-hold. autoshift_time = now; } @@ -141,24 +293,29 @@ static void autoshift_end(uint16_t keycode, uint16_t now, bool matrix_trigger) { */ void autoshift_matrix_scan(void) { if (autoshift_flags.in_progress) { - const uint16_t now = timer_read(); - const uint16_t elapsed = TIMER_DIFF_16(now, autoshift_time); - if (elapsed >= autoshift_timeout) { - autoshift_end(autoshift_lastkey, now, true); + const uint16_t now = timer_read(); + if (TIMER_DIFF_16(now, autoshift_time) >= +# ifdef AUTO_SHIFT_TIMEOUT_PER_KEY + get_autoshift_timeout(autoshift_lastkey, &autoshift_lastrecord) +# else + autoshift_timeout +# endif + ) { + autoshift_end(autoshift_lastkey, now, true, &autoshift_lastrecord); } } } void autoshift_toggle(void) { autoshift_flags.enabled = !autoshift_flags.enabled; - del_weak_mods(MOD_BIT(KC_LSFT)); + autoshift_flush_shift(); } void autoshift_enable(void) { autoshift_flags.enabled = true; } void autoshift_disable(void) { autoshift_flags.enabled = false; - del_weak_mods(MOD_BIT(KC_LSFT)); + autoshift_flush_shift(); } # ifndef AUTO_SHIFT_NO_SETUP @@ -173,76 +330,158 @@ void autoshift_timer_report(void) { bool get_autoshift_state(void) { return autoshift_flags.enabled; } -uint16_t get_autoshift_timeout(void) { return autoshift_timeout; } +uint16_t get_generic_autoshift_timeout() { return autoshift_timeout; } +__attribute__((weak)) uint16_t get_autoshift_timeout(uint16_t keycode, keyrecord_t *record) { return autoshift_timeout; } void set_autoshift_timeout(uint16_t timeout) { autoshift_timeout = timeout; } bool process_auto_shift(uint16_t keycode, keyrecord_t *record) { // Note that record->event.time isn't reliable, see: // https://github.com/qmk/qmk_firmware/pull/9826#issuecomment-733559550 - const uint16_t now = timer_read(); + // clang-format off + const uint16_t now = +# if !defined(RETRO_SHIFT) || defined(NO_ACTION_TAPPING) + timer_read() +# else + (record->event.pressed) ? retroshift_time : timer_read() +# endif + ; + // clang-format on if (record->event.pressed) { if (autoshift_flags.in_progress) { - // Evaluate previous key if there is one. Doing this elsewhere is - // more complicated and easier to break. - autoshift_end(KC_NO, now, false); + // Evaluate previous key if there is one. + autoshift_end(KC_NO, now, false, &autoshift_lastrecord); } - // For pressing another key while keyrepeating shifted autoshift. - del_weak_mods(MOD_BIT(KC_LSFT)); switch (keycode) { case KC_ASTG: autoshift_toggle(); - return true; + break; case KC_ASON: autoshift_enable(); - return true; + break; case KC_ASOFF: autoshift_disable(); - return true; + break; # ifndef AUTO_SHIFT_NO_SETUP case KC_ASUP: autoshift_timeout += 5; - return true; + break; case KC_ASDN: autoshift_timeout -= 5; - return true; - + break; case KC_ASRP: autoshift_timer_report(); - return true; + break; # endif } + // If Retro Shift is disabled, possible custom actions shouldn't happen. + // clang-format off + if (IS_RETRO(keycode) +# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) + // Not tapped or #defines mean that rolls should use hold action. + && ( + record->tap.count == 0 +# ifdef RETRO_TAPPING_PER_KEY + || !get_retro_tapping(keycode, record) +# endif + || (record->tap.interrupted && (IS_LT(keycode) +# if defined(HOLD_ON_OTHER_KEY_PRESS) || defined(HOLD_ON_OTHER_KEY_PRESS_PER_KEY) +# ifdef HOLD_ON_OTHER_KEY_PRESS_PER_KEY + ? get_hold_on_other_key_press(keycode, record) +# else + ? true +# endif +# else + ? false +# endif +# if defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) +# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY + : !get_ignore_mod_tap_interrupt(keycode, record) +# else + : false +# endif +# else + : true +# endif + )) + ) +# endif + ) { + // clang-format on + autoshift_lastkey = KC_NO; + return true; + } + } else { + if (keycode == KC_LSFT) { + autoshift_flags.cancelling_lshift = false; + } else if (keycode == KC_RSFT) { + autoshift_flags.cancelling_rshift = false; + } + // Same as above (for pressed), additional checks are not needed because + // tap.count gets set to 0 in process_action + // clang-format off + else if (IS_RETRO(keycode) +# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) + && ( + record->tap.count == 0 +# ifdef RETRO_TAPPING_PER_KEY + || !get_retro_tapping(keycode, record) +# endif + ) +# endif + ) { + // Fixes modifiers not being applied to rolls with AUTO_SHIFT_MODIFIERS set. +# if !defined(IGNORE_MOD_TAP_INTERRUPT) || defined(IGNORE_MOD_TAP_INTERRUPT_PER_KEY) + if (autoshift_flags.in_progress +# ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY + && !get_ignore_mod_tap_interrupt(keycode, record) +# endif + ) { + autoshift_end(KC_NO, now, false, &autoshift_lastrecord); + } +# endif + // clang-format on + return true; + } + } + + if (!autoshift_flags.enabled) { + return true; } if (get_auto_shifted_key(keycode, record)) { if (record->event.pressed) { return autoshift_press(keycode, now, record); } else { - autoshift_end(keycode, now, false); + autoshift_end(keycode, now, false, record); return false; } } + + // Prevent keyrepeating of older keys upon non-AS key event. + // Not commented at above returns but they serve the same function. + if (record->event.pressed) { + autoshift_lastkey = KC_NO; + } return true; } -__attribute__((weak)) bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { -# ifndef NO_AUTO_SHIFT_ALPHA - case KC_A ... KC_Z: -# endif -# ifndef NO_AUTO_SHIFT_NUMERIC - case KC_1 ... KC_0: -# endif -# ifndef NO_AUTO_SHIFT_SPECIAL - case KC_TAB: - case KC_MINUS ... KC_SLASH: - case KC_NONUS_BSLASH: -# endif - return true; +# if defined(RETRO_SHIFT) && !defined(NO_ACTION_TAPPING) +// Called to record time before possible delays by action_tapping_process. +void retroshift_poll_time(keyevent_t *event) { + last_retroshift_time = retroshift_time; + retroshift_time = timer_read(); +} +// Used to swap the times of Retro Shifted key and Auto Shift key that interrupted it. +void retroshift_swap_times() { + if (last_retroshift_time != 0 && autoshift_flags.in_progress) { + uint16_t temp = retroshift_time; + retroshift_time = last_retroshift_time; + last_retroshift_time = temp; } - return false; } +# endif #endif diff --git a/quantum/process_keycode/process_auto_shift.h b/quantum/process_keycode/process_auto_shift.h index 00a9ab036fe..ac6a143746e 100644 --- a/quantum/process_keycode/process_auto_shift.h +++ b/quantum/process_keycode/process_auto_shift.h @@ -22,13 +22,31 @@ # define AUTO_SHIFT_TIMEOUT 175 #endif +#define IS_LT(kc) ((kc) >= QK_LAYER_TAP && (kc) <= QK_LAYER_TAP_MAX) +#define IS_MT(kc) ((kc) >= QK_MOD_TAP && (kc) <= QK_MOD_TAP_MAX) +#define IS_RETRO(kc) (IS_MT(kc) || IS_LT(kc)) +#define DO_GET_AUTOSHIFT_TIMEOUT(keycode, record, ...) record +// clang-format off +#define AUTO_SHIFT_ALPHA KC_A ... KC_Z +#define AUTO_SHIFT_NUMERIC KC_1 ... KC_0 +#define AUTO_SHIFT_SPECIAL \ + KC_TAB: \ + case KC_MINUS ... KC_SLASH: \ + case KC_NONUS_BSLASH +// clang-format on + bool process_auto_shift(uint16_t keycode, keyrecord_t *record); +void retroshift_poll_time(keyevent_t *event); +void retroshift_swap_times(void); void autoshift_enable(void); void autoshift_disable(void); void autoshift_toggle(void); bool get_autoshift_state(void); -uint16_t get_autoshift_timeout(void); +uint16_t get_generic_autoshift_timeout(void); +// clang-format off +uint16_t (get_autoshift_timeout)(uint16_t keycode, keyrecord_t *record); void set_autoshift_timeout(uint16_t timeout); void autoshift_matrix_scan(void); -bool get_auto_shifted_key(uint16_t keycode, keyrecord_t *record); +bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record); +// clang-format on diff --git a/quantum/process_keycode/process_dynamic_tapping_term.c b/quantum/process_keycode/process_dynamic_tapping_term.c new file mode 100644 index 00000000000..bdc5529e338 --- /dev/null +++ b/quantum/process_keycode/process_dynamic_tapping_term.c @@ -0,0 +1,50 @@ +/* Copyright 2020 Vladislav Kucheriavykh + * + * 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 "quantum.h" +#include "process_dynamic_tapping_term.h" + +#ifndef DYNAMIC_TAPPING_TERM_INCREMENT +# define DYNAMIC_TAPPING_TERM_INCREMENT 5 +#endif + +static void tapping_term_report(void) { + const char *tapping_term_str = get_u16_str(g_tapping_term, ' '); + // Skip padding spaces + while (*tapping_term_str == ' ') { + tapping_term_str++; + } + send_string(tapping_term_str); +} + +bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch (keycode) { + case DT_PRNT: + tapping_term_report(); + return false; + + case DT_UP: + g_tapping_term += DYNAMIC_TAPPING_TERM_INCREMENT; + return false; + + case DT_DOWN: + g_tapping_term -= DYNAMIC_TAPPING_TERM_INCREMENT; + return false; + } + } + return true; +} diff --git a/quantum/process_keycode/process_dynamic_tapping_term.h b/quantum/process_keycode/process_dynamic_tapping_term.h new file mode 100644 index 00000000000..85e83ee73b0 --- /dev/null +++ b/quantum/process_keycode/process_dynamic_tapping_term.h @@ -0,0 +1,26 @@ +/* Copyright 2020 Vladislav Kucheriavykh + * + * 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/>. + */ + +#pragma once + +#include <stdbool.h> +#include "action.h" + +#ifndef DYNAMIC_TAPPING_TERM_INCREMENT +# define DYNAMIC_TAPPING_TERM_INCREMENT 5 +#endif + +bool process_dynamic_tapping_term(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_haptic.c b/quantum/process_keycode/process_haptic.c index 64d455d0094..85b2ffcddd5 100644 --- a/quantum/process_keycode/process_haptic.c +++ b/quantum/process_keycode/process_haptic.c @@ -17,6 +17,7 @@ #include "process_haptic.h" #include "quantum_keycodes.h" #include "action_tapping.h" +#include "usb_device_state.h" __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t *record) { switch (keycode) { @@ -30,8 +31,9 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: if (record->tap.count == 0) return false; break; - case KC_LCTRL ... KC_RGUI: + case KC_LEFT_CTRL ... KC_RIGHT_GUI: case QK_MOMENTARY ... QK_MOMENTARY_MAX: + case QK_LAYER_MOD ... QK_LAYER_MOD_MAX: #endif #ifdef NO_HAPTIC_FN case KC_FN0 ... KC_FN31: @@ -42,34 +44,34 @@ __attribute__((weak)) bool get_haptic_enabled_key(uint16_t keycode, keyrecord_t #ifdef NO_HAPTIC_PUNCTUATION case KC_ENTER: case KC_ESCAPE: - case KC_BSPACE: + case KC_BACKSPACE: case KC_SPACE: case KC_MINUS: case KC_EQUAL: - case KC_LBRACKET: - case KC_RBRACKET: - case KC_BSLASH: + case KC_LEFT_BRACKET: + case KC_RIGHT_BRACKET: + case KC_BACKSLASH: case KC_NONUS_HASH: - case KC_SCOLON: + case KC_SEMICOLON: case KC_QUOTE: case KC_GRAVE: case KC_COMMA: case KC_SLASH: case KC_DOT: - case KC_NONUS_BSLASH: + case KC_NONUS_BACKSLASH: #endif #ifdef NO_HAPTIC_LOCKKEYS - case KC_CAPSLOCK: - case KC_SCROLLLOCK: - case KC_NUMLOCK: + case KC_CAPS_LOCK: + case KC_SCROLL_LOCK: + case KC_NUM_LOCK: #endif #ifdef NO_HAPTIC_NAV - case KC_PSCREEN: + case KC_PRINT_SCREEN: case KC_PAUSE: case KC_INSERT: case KC_DELETE: - case KC_PGDOWN: - case KC_PGUP: + case KC_PAGE_DOWN: + case KC_PAGE_UP: case KC_LEFT: case KC_UP: case KC_RIGHT: @@ -130,7 +132,7 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) { } } - if (haptic_get_enable()) { + if (haptic_get_enable() && ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED))) { if (record->event.pressed) { // keypress if (haptic_get_feedback() < 2 && get_haptic_enabled_key(keycode, record)) { diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 2beccbd8f96..6822c5e2891 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c @@ -146,7 +146,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { if (music_activated || midi_activated) { if (record->event.pressed) { - if (keycode == KC_LCTL) { // Start recording + if (keycode == KC_LEFT_CTRL) { // Start recording music_all_notes_off(); music_sequence_recording = true; music_sequence_recorded = false; @@ -155,7 +155,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } - if (keycode == KC_LALT) { // Stop recording/playing + if (keycode == KC_LEFT_ALT) { // Stop recording/playing music_all_notes_off(); if (music_sequence_recording) { // was recording music_sequence_recorded = true; @@ -165,7 +165,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { return false; } - if (keycode == KC_LGUI && music_sequence_recorded) { // Start playing + if (keycode == KC_LEFT_GUI && music_sequence_recorded) { // Start playing music_all_notes_off(); music_sequence_recording = false; music_sequence_playing = true; diff --git a/quantum/process_keycode/process_printer.c b/quantum/process_keycode/process_printer.c index 7c5e4169a60..82528cc680d 100644 --- a/quantum/process_keycode/process_printer.c +++ b/quantum/process_keycode/process_printer.c @@ -31,7 +31,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0 // uint8_t keycode_to_ascii[0xFF][2]; -// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; +// keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F}; void print_char(char c) { USB_Disable(); @@ -90,8 +90,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { case KC_PIPE: case KC_TILD: keycode &= 0xFF; - case KC_LSFT: - case KC_RSFT: + case KC_LEFT_SHIFT: + case KC_RIGHT_SHIFT: if (record->event.pressed) { character_shift++; } else { @@ -107,13 +107,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { print_box_string("This is a line of text!"); } return false; - case KC_ESC: + case KC_ESCAPE: if (record->event.pressed) { print_char(0x1B); } return false; break; - case KC_SPC: + case KC_SPACE: if (record->event.pressed) { print_char(0x20); } @@ -139,7 +139,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_ENT: + case KC_ENTER: if (record->event.pressed) { if (character_shift) { print_char(0x0C); @@ -149,7 +149,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSPC: + case KC_BACKSPACE: if (record->event.pressed) { if (character_shift) { print_char(0x18); @@ -169,7 +169,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_COMM: + case KC_COMMA: if (record->event.pressed) { if (character_shift) { print_char(0x3C); @@ -179,7 +179,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_SLSH: + case KC_SLASH: if (record->event.pressed) { if (character_shift) { print_char(0x3F); @@ -189,7 +189,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_QUOT: + case KC_QUOTE: if (record->event.pressed) { if (character_shift) { print_char(0x22); @@ -199,7 +199,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_GRV: + case KC_GRAVE: if (record->event.pressed) { if (character_shift) { print_char(0x7E); @@ -209,7 +209,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_MINS: + case KC_MINUS: if (record->event.pressed) { if (character_shift) { print_char(0x5F); @@ -219,7 +219,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_EQL: + case KC_EQUAL: if (record->event.pressed) { if (character_shift) { print_char(0x2B); @@ -229,7 +229,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_LBRC: + case KC_LEFT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7B); @@ -239,7 +239,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_RBRC: + case KC_RIGHT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7D); @@ -249,7 +249,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSLS: + case KC_BACKSLASH: if (record->event.pressed) { if (character_shift) { print_char(0x7C); diff --git a/quantum/process_keycode/process_printer_bb.c b/quantum/process_keycode/process_printer_bb.c index e482d82591a..6c91bd27ef7 100644 --- a/quantum/process_keycode/process_printer_bb.c +++ b/quantum/process_keycode/process_printer_bb.c @@ -45,7 +45,7 @@ uint8_t shifted_numbers[10] = {0x21, 0x40, 0x23, 0x24, 0x25, 0x5E, 0x26, 0x2A, 0 // uint8_t keycode_to_ascii[0xFF][2]; -// keycode_to_ascii[KC_MINS] = {0x2D, 0x5F}; +// keycode_to_ascii[KC_MINUS] = {0x2D, 0x5F}; void print_char(char c) { uint8_t b = 8; @@ -84,8 +84,8 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { case KC_PIPE: case KC_TILD: keycode &= 0xFF; - case KC_LSFT: - case KC_RSFT: + case KC_LEFT_SHIFT: + case KC_RIGHT_SHIFT: if (record->event.pressed) { character_shift++; } else { @@ -101,13 +101,13 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { print_string("This is a line of text!\n\n\n"); } return false; - case KC_ESC: + case KC_ESCAPE: if (record->event.pressed) { print_char(0x1B); } return false; break; - case KC_SPC: + case KC_SPACE: if (record->event.pressed) { print_char(0x20); } @@ -133,7 +133,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_ENT: + case KC_ENTER: if (record->event.pressed) { if (character_shift) { print_char(0x0C); @@ -143,7 +143,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSPC: + case KC_BACKSPACE: if (record->event.pressed) { if (character_shift) { print_char(0x18); @@ -163,7 +163,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_COMM: + case KC_COMMA: if (record->event.pressed) { if (character_shift) { print_char(0x3C); @@ -173,7 +173,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_SLSH: + case KC_SLASH: if (record->event.pressed) { if (character_shift) { print_char(0x3F); @@ -183,7 +183,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_QUOT: + case KC_QUOTE: if (record->event.pressed) { if (character_shift) { print_char(0x22); @@ -193,7 +193,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_GRV: + case KC_GRAVE: if (record->event.pressed) { if (character_shift) { print_char(0x7E); @@ -203,7 +203,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_MINS: + case KC_MINUS: if (record->event.pressed) { if (character_shift) { print_char(0x5F); @@ -213,7 +213,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_EQL: + case KC_EQUAL: if (record->event.pressed) { if (character_shift) { print_char(0x2B); @@ -223,7 +223,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_LBRC: + case KC_LEFT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7B); @@ -233,7 +233,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_RBRC: + case KC_RIGHT_BRACKET: if (record->event.pressed) { if (character_shift) { print_char(0x7D); @@ -243,7 +243,7 @@ bool process_printer(uint16_t keycode, keyrecord_t *record) { } return false; break; - case KC_BSLS: + case KC_BACKSLASH: if (record->event.pressed) { if (character_shift) { print_char(0x7C); diff --git a/quantum/process_keycode/process_programmable_button.c b/quantum/process_keycode/process_programmable_button.c new file mode 100644 index 00000000000..c6e77faacc0 --- /dev/null +++ b/quantum/process_keycode/process_programmable_button.c @@ -0,0 +1,31 @@ +/* +Copyright 2021 Thomas Weißschuh <thomas@t-8ch.de> + +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 "process_programmable_button.h" +#include "programmable_button.h" + +bool process_programmable_button(uint16_t keycode, keyrecord_t *record) { + if (keycode >= PROGRAMMABLE_BUTTON_MIN && keycode <= PROGRAMMABLE_BUTTON_MAX) { + uint8_t button = keycode - PROGRAMMABLE_BUTTON_MIN + 1; + if (record->event.pressed) { + programmable_button_on(button); + } else { + programmable_button_off(button); + } + } + return true; +} diff --git a/quantum/process_keycode/process_programmable_button.h b/quantum/process_keycode/process_programmable_button.h new file mode 100644 index 00000000000..47c6ce56144 --- /dev/null +++ b/quantum/process_keycode/process_programmable_button.h @@ -0,0 +1,23 @@ +/* +Copyright 2021 Thomas Weißschuh <thomas@t-8ch.de> + +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/>. +*/ + +#pragma once + +#include <stdint.h> +#include "quantum.h" + +bool process_programmable_button(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_space_cadet.c b/quantum/process_keycode/process_space_cadet.c index f99db2a87b9..46b2648c35e 100644 --- a/quantum/process_keycode/process_space_cadet.c +++ b/quantum/process_keycode/process_space_cadet.c @@ -27,53 +27,53 @@ // Shift / Enter setup #ifndef SFTENT_KEY -# define SFTENT_KEY KC_ENT +# define SFTENT_KEY KC_ENTER #endif #ifdef DISABLE_SPACE_CADET_MODIFIER # ifndef LSPO_MOD -# define LSPO_MOD KC_TRNS +# define LSPO_MOD KC_TRANSPARENT # endif # ifndef RSPC_MOD -# define RSPC_MOD KC_TRNS +# define RSPC_MOD KC_TRANSPARENT # endif #else # ifndef LSPO_MOD -# define LSPO_MOD KC_LSFT +# define LSPO_MOD KC_LEFT_SHIFT # endif # ifndef RSPC_MOD -# define RSPC_MOD KC_RSFT +# define RSPC_MOD KC_RIGHT_SHIFT # endif #endif // ********************************************************** // Shift / paren setup #ifndef LSPO_KEYS -# define LSPO_KEYS KC_LSFT, LSPO_MOD, LSPO_KEY +# define LSPO_KEYS KC_LEFT_SHIFT, LSPO_MOD, LSPO_KEY #endif #ifndef RSPC_KEYS -# define RSPC_KEYS KC_RSFT, RSPC_MOD, RSPC_KEY +# define RSPC_KEYS KC_RIGHT_SHIFT, RSPC_MOD, RSPC_KEY #endif // Control / paren setup #ifndef LCPO_KEYS -# define LCPO_KEYS KC_LCTL, KC_LSFT, KC_9 +# define LCPO_KEYS KC_LEFT_CTRL, KC_LEFT_SHIFT, KC_9 #endif #ifndef RCPC_KEYS -# define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 +# define RCPC_KEYS KC_RIGHT_CTRL, KC_RIGHT_SHIFT, KC_0 #endif // Alt / paren setup #ifndef LAPO_KEYS -# define LAPO_KEYS KC_LALT, KC_LSFT, KC_9 +# define LAPO_KEYS KC_LEFT_ALT, KC_LEFT_SHIFT, KC_9 #endif #ifndef RAPC_KEYS -# define RAPC_KEYS KC_RALT, KC_RSFT, KC_0 +# define RAPC_KEYS KC_RIGHT_ALT, KC_RIGHT_SHIFT, KC_0 #endif // Shift / Enter setup #ifndef SFTENT_KEYS -# define SFTENT_KEYS KC_RSFT, KC_TRNS, SFTENT_KEY +# define SFTENT_KEYS KC_RIGHT_SHIFT, KC_TRANSPARENT, SFTENT_KEY #endif static uint8_t sc_last = 0; diff --git a/quantum/process_keycode/process_terminal.c b/quantum/process_keycode/process_terminal.c index 7d1eefa9edc..a059f3a521a 100644 --- a/quantum/process_keycode/process_terminal.c +++ b/quantum/process_keycode/process_terminal.c @@ -257,12 +257,12 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { process_terminal_command(); return false; break; - case KC_ESC: + case KC_ESCAPE: SEND_STRING("\n"); enable_terminal(); return false; break; - case KC_BSPC: + case KC_BACKSPACE: str_len = strlen(buffer); if (str_len > 0) { buffer[str_len - 1] = 0; @@ -284,7 +284,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { str_len = strlen(buffer); for (int i = 0; i < str_len; ++i) { send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already - // process_terminal(KC_BSPC,record); + // process_terminal(KC_BACKSPACE,record); } strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 80); @@ -299,7 +299,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { str_len = strlen(buffer); for (int i = 0; i < str_len; ++i) { send_string(SS_TAP(X_BSPACE)); // clear w/e is on the line already - // process_terminal(KC_BSPC,record); + // process_terminal(KC_BACKSPACE,record); } strncpy(buffer, cmd_buffer[current_cmd_buffer_pos], 79); @@ -311,7 +311,7 @@ bool process_terminal(uint16_t keycode, keyrecord_t *record) { default: if (keycode <= 58) { char_to_add = 0; - if (get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) { + if (get_mods() & (MOD_BIT(KC_LEFT_SHIFT) | MOD_BIT(KC_RIGHT_SHIFT))) { char_to_add = shifted_keycode_to_ascii_lut[keycode]; } else if (get_mods() == 0) { char_to_add = keycode_to_ascii_lut[keycode]; diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 12b0aba9bfe..d084d2b66c6 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -46,7 +46,7 @@ static bool is_uni_seq(char *seq) { return false; } } - return qk_ucis_state.codes[i] == KC_ENT || qk_ucis_state.codes[i] == KC_SPC; + return qk_ucis_state.codes[i] == KC_ENTER || qk_ucis_state.codes[i] == KC_SPACE; } __attribute__((weak)) void qk_ucis_symbol_fallback(void) { @@ -72,7 +72,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return true; } - bool special = keycode == KC_SPC || keycode == KC_ENT || keycode == KC_ESC || keycode == KC_BSPC; + bool special = keycode == KC_SPACE || keycode == KC_ENTER || keycode == KC_ESCAPE || keycode == KC_BACKSPACE; if (qk_ucis_state.count >= UCIS_MAX_SYMBOL_LENGTH && !special) { return false; } @@ -81,7 +81,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { qk_ucis_state.count++; switch (keycode) { - case KC_BSPC: + case KC_BACKSPACE: if (qk_ucis_state.count >= 2) { qk_ucis_state.count -= 2; return true; @@ -90,16 +90,16 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { return false; } - case KC_SPC: - case KC_ENT: - case KC_ESC: + case KC_SPACE: + case KC_ENTER: + case KC_ESCAPE: for (uint8_t i = 0; i < qk_ucis_state.count; i++) { - register_code(KC_BSPC); - unregister_code(KC_BSPC); + register_code(KC_BACKSPACE); + unregister_code(KC_BACKSPACE); wait_ms(UNICODE_TYPE_DELAY); } - if (keycode == KC_ESC) { + if (keycode == KC_ESCAPE) { qk_ucis_state.in_progress = false; qk_ucis_cancel(); return false; diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 889c768a85c..7685bb1c995 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -22,6 +22,7 @@ unicode_config_t unicode_config; uint8_t unicode_saved_mods; bool unicode_saved_caps_lock; +bool unicode_saved_num_lock; #if UNICODE_SELECTED_MODES != -1 static uint8_t selected[] = {UNICODE_SELECTED_MODES}; @@ -79,13 +80,14 @@ void persist_unicode_input_mode(void) { eeprom_update_byte(EECONFIG_UNICODEMODE, __attribute__((weak)) void unicode_input_start(void) { unicode_saved_caps_lock = host_keyboard_led_state().caps_lock; + unicode_saved_num_lock = host_keyboard_led_state().num_lock; // Note the order matters here! // Need to do this before we mess around with the mods, or else // UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work // correctly in the shifted case. if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) { - tap_code(KC_CAPS); + tap_code(KC_CAPS_LOCK); } unicode_saved_mods = get_mods(); // Save current mods @@ -99,9 +101,13 @@ __attribute__((weak)) void unicode_input_start(void) { tap_code16(UNICODE_KEY_LNX); break; case UC_WIN: - register_code(KC_LALT); + // For increased reliability, use numpad keys for inputting digits + if (!unicode_saved_num_lock) { + tap_code(KC_NUM_LOCK); + } + register_code(KC_LEFT_ALT); wait_ms(UNICODE_TYPE_DELAY); - tap_code(KC_PPLS); + tap_code(KC_KP_PLUS); break; case UC_WINC: tap_code(UNICODE_KEY_WINC); @@ -118,13 +124,16 @@ __attribute__((weak)) void unicode_input_finish(void) { unregister_code(UNICODE_KEY_MAC); break; case UC_LNX: - tap_code(KC_SPC); + tap_code(KC_SPACE); if (unicode_saved_caps_lock) { - tap_code(KC_CAPS); + tap_code(KC_CAPS_LOCK); } break; case UC_WIN: - unregister_code(KC_LALT); + unregister_code(KC_LEFT_ALT); + if (!unicode_saved_num_lock) { + tap_code(KC_NUM_LOCK); + } break; case UC_WINC: tap_code(KC_ENTER); @@ -140,26 +149,44 @@ __attribute__((weak)) void unicode_input_cancel(void) { unregister_code(UNICODE_KEY_MAC); break; case UC_LNX: - tap_code(KC_ESC); + tap_code(KC_ESCAPE); if (unicode_saved_caps_lock) { - tap_code(KC_CAPS); + tap_code(KC_CAPS_LOCK); } break; case UC_WINC: - tap_code(KC_ESC); + tap_code(KC_ESCAPE); break; case UC_WIN: - unregister_code(KC_LALT); + unregister_code(KC_LEFT_ALT); + if (!unicode_saved_num_lock) { + tap_code(KC_NUM_LOCK); + } break; } set_mods(unicode_saved_mods); // Reregister previously set mods } +// clang-format off + +static void send_nibble_wrapper(uint8_t digit) { + if (unicode_config.input_mode == UC_WIN) { + uint8_t kc = digit < 10 + ? KC_KP_1 + (10 + digit - 1) % 10 + : KC_A + (digit - 10); + tap_code(kc); + return; + } + send_nibble(digit); +} + +// clang-format on + void register_hex(uint16_t hex) { for (int i = 3; i >= 0; i--) { uint8_t digit = ((hex >> (i * 4)) & 0xF); - send_nibble(digit); + send_nibble_wrapper(digit); } } @@ -172,10 +199,10 @@ void register_hex32(uint32_t hex) { uint8_t digit = ((hex >> (i * 4)) & 0xF); if (digit == 0) { if (!onzerostart) { - send_nibble(digit); + send_nibble_wrapper(digit); } } else { - send_nibble(digit); + send_nibble_wrapper(digit); onzerostart = false; } } diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index c10e171ec3f..72defb445eb 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -24,13 +24,13 @@ // Keycodes used for starting Unicode input on different platforms #ifndef UNICODE_KEY_MAC -# define UNICODE_KEY_MAC KC_LALT +# define UNICODE_KEY_MAC KC_LEFT_ALT #endif #ifndef UNICODE_KEY_LNX # define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) #endif #ifndef UNICODE_KEY_WINC -# define UNICODE_KEY_WINC KC_RALT +# define UNICODE_KEY_WINC KC_RIGHT_ALT #endif // Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) diff --git a/quantum/programmable_button.c b/quantum/programmable_button.c new file mode 100644 index 00000000000..be828fd17cd --- /dev/null +++ b/quantum/programmable_button.c @@ -0,0 +1,37 @@ +/* +Copyright 2021 Thomas Weißschuh <thomas@t-8ch.de> + +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 "programmable_button.h" +#include "host.h" + +#define REPORT_BIT(index) (((uint32_t)1) << (index - 1)) + +static uint32_t programmable_button_report = 0; + +void programmable_button_clear(void) { programmable_button_report = 0; } + +void programmable_button_send(void) { host_programmable_button_send(programmable_button_report); } + +void programmable_button_on(uint8_t index) { programmable_button_report |= REPORT_BIT(index); } + +void programmable_button_off(uint8_t index) { programmable_button_report &= ~REPORT_BIT(index); } + +bool programmable_button_is_on(uint8_t index) { return !!(programmable_button_report & REPORT_BIT(index)); }; + +uint32_t programmable_button_get_report(void) { return programmable_button_report; }; + +void programmable_button_set_report(uint32_t report) { programmable_button_report = report; } diff --git a/quantum/programmable_button.h b/quantum/programmable_button.h new file mode 100644 index 00000000000..e89b8b9fd6a --- /dev/null +++ b/quantum/programmable_button.h @@ -0,0 +1,30 @@ +/* +Copyright 2021 Thomas Weißschuh <thomas@t-8ch.de> + +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/>. +*/ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include "report.h" + +void programmable_button_clear(void); +void programmable_button_send(void); +void programmable_button_on(uint8_t index); +void programmable_button_off(uint8_t index); +bool programmable_button_is_on(uint8_t index); +uint32_t programmable_button_get_report(void); +void programmable_button_set_report(uint32_t report); diff --git a/quantum/quantum.c b/quantum/quantum.c index 0ae12b5834b..35b6351e9d9 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -25,10 +25,6 @@ # include "backlight.h" #endif -#ifdef API_ENABLE -# include "api.h" -#endif - #ifdef MIDI_ENABLE # include "process_midi.h" #endif @@ -66,15 +62,15 @@ uint8_t extract_mod_bits(uint16_t code) { uint8_t mods_to_send = 0; if (code & QK_RMODS_MIN) { // Right mod flag is set - if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL); - if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT); - if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT); - if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RGUI); + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RIGHT_CTRL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RIGHT_SHIFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RIGHT_ALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RIGHT_GUI); } else { - if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LCTL); - if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LSFT); - if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LALT); - if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI); + if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LEFT_CTRL); + if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LEFT_SHIFT); + if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LEFT_ALT); + if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LEFT_GUI); } return mods_to_send; @@ -279,6 +275,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef AUTO_SHIFT_ENABLE process_auto_shift(keycode, record) && #endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE + process_dynamic_tapping_term(keycode, record) && +#endif #ifdef TERMINAL_ENABLE process_terminal(keycode, record) && #endif @@ -296,6 +295,9 @@ bool process_record_quantum(keyrecord_t *record) { #endif #ifdef JOYSTICK_ENABLE process_joystick(keycode, record) && +#endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + process_programmable_button(keycode, record) && #endif true)) { return false; @@ -466,14 +468,6 @@ void matrix_scan_quantum() { # include "hd44780.h" #endif -void api_send_unicode(uint32_t unicode) { -#ifdef API_ENABLE - uint8_t chunk[4]; - dword_to_bytes(unicode, chunk); - MT_SEND_DATA(DT_UNICODE, chunk, 5); -#endif -} - //------------------------------------------------------------------------------ // Override these functions in your keymap file to play different tunes on // different events such as startup and bootloader jump @@ -481,3 +475,159 @@ void api_send_unicode(uint32_t unicode) { __attribute__((weak)) void startup_user() {} __attribute__((weak)) void shutdown_user() {} + +/** \brief Run keyboard level Power down + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_power_down_user(void) {} +/** \brief Run keyboard level Power down + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user(); } + +void suspend_power_down_quantum(void) { +#ifndef NO_SUSPEND_POWER_DOWN +// Turn off backlight +# ifdef BACKLIGHT_ENABLE + backlight_set(0); +# endif + +# ifdef LED_MATRIX_ENABLE + led_matrix_task(); +# endif +# ifdef RGB_MATRIX_ENABLE + rgb_matrix_task(); +# endif + + // Turn off LED indicators + uint8_t leds_off = 0; +# if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) + if (is_backlight_enabled()) { + // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off + leds_off |= (1 << USB_LED_CAPS_LOCK); + } +# endif + led_set(leds_off); + +// Turn off audio +# ifdef AUDIO_ENABLE + stop_all_notes(); +# endif + +// Turn off underglow +# if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) + rgblight_suspend(); +# endif + +# if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(true); +# endif +# if defined(RGB_MATRIX_ENABLE) + rgb_matrix_set_suspend_state(true); +# endif + +# ifdef OLED_ENABLE + oled_off(); +# endif +# ifdef ST7565_ENABLE + st7565_off(); +# endif +# if defined(POINTING_DEVICE_ENABLE) + // run to ensure scanning occurs while suspended + pointing_device_task(); +# endif +#endif +} + +/** \brief run user level code immediately after wakeup + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_wakeup_init_user(void) {} + +/** \brief run keyboard level code immediately after wakeup + * + * FIXME: needs doc + */ +__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } + +__attribute__((weak)) void suspend_wakeup_init_quantum(void) { +// Turn on backlight +#ifdef BACKLIGHT_ENABLE + backlight_init(); +#endif + + // Restore LED indicators + led_set(host_keyboard_leds()); + +// Wake up underglow +#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) + rgblight_wakeup(); +#endif + +#if defined(LED_MATRIX_ENABLE) + led_matrix_set_suspend_state(false); +#endif +#if defined(RGB_MATRIX_ENABLE) + rgb_matrix_set_suspend_state(false); +#endif + suspend_wakeup_init_kb(); +} + +/** \brief converts unsigned integers into char arrays + * + * Takes an unsigned integer and converts that value into an equivalent char array + * A padding character may be specified, ' ' for leading spaces, '0' for leading zeros. + */ + +const char *get_numeric_str(char *buf, size_t buf_len, uint32_t curr_num, char curr_pad) { + buf[buf_len - 1] = '\0'; + for (size_t i = 0; i < buf_len - 1; ++i) { + char c = '0' + curr_num % 10; + buf[buf_len - 2 - i] = (c == '0' && i == 0) ? '0' : (curr_num > 0 ? c : curr_pad); + curr_num /= 10; + } + return buf; +} + +/** \brief converts uint8_t into char array + * + * Takes an uint8_t, and uses an internal static buffer to render that value into a char array + * A padding character may be specified, ' ' for leading spaces, '0' for leading zeros. + * + * NOTE: Subsequent invocations will reuse the same static buffer and overwrite the previous + * contents. Use the result immediately, instead of caching it. + */ +const char *get_u8_str(uint8_t curr_num, char curr_pad) { + static char buf[4] = {0}; + static uint8_t last_num = 0xFF; + static char last_pad = '\0'; + if (last_num == curr_num && last_pad == curr_pad) { + return buf; + } + last_num = curr_num; + last_pad = curr_pad; + return get_numeric_str(buf, sizeof(buf), curr_num, curr_pad); +} + +/** \brief converts uint16_t into char array + * + * Takes an uint16_t, and uses an internal static buffer to render that value into a char array + * A padding character may be specified, ' ' for leading spaces, '0' for leading zeros. + * + * NOTE: Subsequent invocations will reuse the same static buffer and overwrite the previous + * contents. Use the result immediately, instead of caching it. + */ +const char *get_u16_str(uint16_t curr_num, char curr_pad) { + static char buf[6] = {0}; + static uint16_t last_num = 0xFF; + static char last_pad = '\0'; + if (last_num == curr_num && last_pad == curr_pad) { + return buf; + } + last_num = curr_num; + last_pad = curr_pad; + return get_numeric_str(buf, sizeof(buf), curr_num, curr_pad); +} diff --git a/quantum/quantum.h b/quantum/quantum.h index 86b717e445c..6927884e2f4 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -54,6 +54,10 @@ #include <stddef.h> #include <stdlib.h> +#ifdef DEFERRED_EXEC_ENABLE +# include "deferred_exec.h" +#endif + extern layer_state_t default_layer_state; #ifndef NO_ACTION_LAYER @@ -121,6 +125,10 @@ extern layer_state_t layer_state; # include "process_auto_shift.h" #endif +#ifdef DYNAMIC_TAPPING_TERM_ENABLE +# include "process_dynamic_tapping_term.h" +#endif + #ifdef COMBO_ENABLE # include "process_combo.h" #endif @@ -147,6 +155,10 @@ extern layer_state_t layer_state; # include "process_joystick.h" #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE +# include "process_programmable_button.h" +#endif + #ifdef GRAVE_ESC_ENABLE # include "process_grave_esc.h" #endif @@ -200,6 +212,10 @@ extern layer_state_t layer_state; # include "encoder.h" #endif +#ifdef POINTING_DEVICE_ENABLE +# include "pointing_device.h" +#endif + // For tri-layer void update_tri_layer(uint8_t layer1, uint8_t layer2, uint8_t layer3); layer_state_t update_tri_layer_state(layer_state_t state, uint8_t layer1, uint8_t layer2, uint8_t layer3); @@ -234,4 +250,6 @@ void led_set_kb(uint8_t usb_led); bool led_update_user(led_t led_state); bool led_update_kb(led_t led_state); -void api_send_unicode(uint32_t unicode); +const char *get_numeric_str(char *buf, size_t buf_len, uint32_t curr_num, char curr_pad); +const char *get_u8_str(uint8_t curr_num, char curr_pad); +const char *get_u16_str(uint16_t curr_num, char curr_pad); diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h index 99eade0e036..e4d0167aac3 100644 --- a/quantum/quantum_keycodes.h +++ b/quantum/quantum_keycodes.h @@ -19,7 +19,7 @@ #include "sequencer.h" // Fillers to make layering more clear -#define _______ KC_TRNS +#define _______ KC_TRANSPARENT #define XXXXXXX KC_NO enum quantum_keycodes { @@ -524,6 +524,79 @@ enum quantum_keycodes { // Additional magic key MAGIC_TOGGLE_GUI, + // Adjust tapping term on the fly + DT_PRNT, + DT_UP, + DT_DOWN, + + // Programmable Button + PROGRAMMABLE_BUTTON_1, + PROGRAMMABLE_BUTTON_2, + PROGRAMMABLE_BUTTON_3, + PROGRAMMABLE_BUTTON_4, + PROGRAMMABLE_BUTTON_5, + PROGRAMMABLE_BUTTON_6, + PROGRAMMABLE_BUTTON_7, + PROGRAMMABLE_BUTTON_8, + PROGRAMMABLE_BUTTON_9, + PROGRAMMABLE_BUTTON_10, + PROGRAMMABLE_BUTTON_11, + PROGRAMMABLE_BUTTON_12, + PROGRAMMABLE_BUTTON_13, + PROGRAMMABLE_BUTTON_14, + PROGRAMMABLE_BUTTON_15, + PROGRAMMABLE_BUTTON_16, + PROGRAMMABLE_BUTTON_17, + PROGRAMMABLE_BUTTON_18, + PROGRAMMABLE_BUTTON_19, + PROGRAMMABLE_BUTTON_20, + PROGRAMMABLE_BUTTON_21, + PROGRAMMABLE_BUTTON_22, + PROGRAMMABLE_BUTTON_23, + PROGRAMMABLE_BUTTON_24, + PROGRAMMABLE_BUTTON_25, + PROGRAMMABLE_BUTTON_26, + PROGRAMMABLE_BUTTON_27, + PROGRAMMABLE_BUTTON_28, + PROGRAMMABLE_BUTTON_29, + PROGRAMMABLE_BUTTON_30, + PROGRAMMABLE_BUTTON_31, + PROGRAMMABLE_BUTTON_32, + + // Dedicated macro keys for Configurator and VIA + MACRO_0, + MACRO_1, + MACRO_2, + MACRO_3, + MACRO_4, + MACRO_5, + MACRO_6, + MACRO_7, + MACRO_8, + MACRO_9, + MACRO_10, + MACRO_11, + MACRO_12, + MACRO_13, + MACRO_14, + MACRO_15, + MACRO_16, + MACRO_17, + MACRO_18, + MACRO_19, + MACRO_20, + MACRO_21, + MACRO_22, + MACRO_23, + MACRO_24, + MACRO_25, + MACRO_26, + MACRO_27, + MACRO_28, + MACRO_29, + MACRO_30, + MACRO_31, + // Start of custom keycode range for keyboards and keymaps - always leave at the end SAFE_RANGE }; @@ -565,69 +638,67 @@ enum quantum_keycodes { #define MOD_MEH 0x7 // US ANSI shifted keycode aliases -#define KC_TILD LSFT(KC_GRV) // ~ -#define KC_TILDE KC_TILD +#define KC_TILDE LSFT(KC_GRAVE) // ~ +#define KC_TILD KC_TILDE -#define KC_EXLM LSFT(KC_1) // ! -#define KC_EXCLAIM KC_EXLM +#define KC_EXCLAIM LSFT(KC_1) // ! +#define KC_EXLM KC_EXCLAIM #define KC_AT LSFT(KC_2) // @ #define KC_HASH LSFT(KC_3) // # -#define KC_DLR LSFT(KC_4) // $ -#define KC_DOLLAR KC_DLR - -#define KC_PERC LSFT(KC_5) // % -#define KC_PERCENT KC_PERC +#define KC_DOLLAR LSFT(KC_4) // $ +#define KC_DLR KC_DOLLAR -#define KC_CIRC LSFT(KC_6) // ^ -#define KC_CIRCUMFLEX KC_CIRC +#define KC_PERCENT LSFT(KC_5) // % +#define KC_PERC KC_PERCENT -#define KC_AMPR LSFT(KC_7) // & -#define KC_AMPERSAND KC_AMPR +#define KC_CIRCUMFLEX LSFT(KC_6) // ^ +#define KC_CIRC KC_CIRCUMFLEX -#define KC_ASTR LSFT(KC_8) // * -#define KC_ASTERISK KC_ASTR +#define KC_AMPERSAND LSFT(KC_7) // & +#define KC_AMPR KC_AMPERSAND -#define KC_LPRN LSFT(KC_9) // ( -#define KC_LEFT_PAREN KC_LPRN +#define KC_ASTERISK LSFT(KC_8) // * +#define KC_ASTR KC_ASTERISK -#define KC_RPRN LSFT(KC_0) // ) -#define KC_RIGHT_PAREN KC_RPRN +#define KC_LEFT_PAREN LSFT(KC_9) // ( +#define KC_LPRN KC_LEFT_PAREN -#define KC_UNDS LSFT(KC_MINS) // _ -#define KC_UNDERSCORE KC_UNDS +#define KC_RIGHT_PAREN LSFT(KC_0) // ) +#define KC_RPRN KC_RIGHT_PAREN -#define KC_PLUS LSFT(KC_EQL) // + +#define KC_UNDERSCORE LSFT(KC_MINUS) // _ +#define KC_UNDS KC_UNDERSCORE -#define KC_LCBR LSFT(KC_LBRC) // { -#define KC_LEFT_CURLY_BRACE KC_LCBR +#define KC_PLUS LSFT(KC_EQUAL) // + -#define KC_RCBR LSFT(KC_RBRC) // } -#define KC_RIGHT_CURLY_BRACE KC_RCBR +#define KC_LEFT_CURLY_BRACE LSFT(KC_LEFT_BRACKET) // { +#define KC_LCBR KC_LEFT_CURLY_BRACE -#define KC_LABK LSFT(KC_COMM) // < -#define KC_LEFT_ANGLE_BRACKET KC_LABK +#define KC_RIGHT_CURLY_BRACE LSFT(KC_RIGHT_BRACKET) // } +#define KC_RCBR KC_RIGHT_CURLY_BRACE -#define KC_RABK LSFT(KC_DOT) // > -#define KC_RIGHT_ANGLE_BRACKET KC_RABK +#define KC_LEFT_ANGLE_BRACKET LSFT(KC_COMMA) // < +#define KC_LABK KC_LEFT_ANGLE_BRACKET +#define KC_LT KC_LEFT_ANGLE_BRACKET -#define KC_COLN LSFT(KC_SCLN) // : -#define KC_COLON KC_COLN +#define KC_RIGHT_ANGLE_BRACKET LSFT(KC_DOT) // > +#define KC_RABK KC_RIGHT_ANGLE_BRACKET +#define KC_GT KC_RIGHT_ANGLE_BRACKET -#define KC_PIPE LSFT(KC_BSLS) // | +#define KC_COLON LSFT(KC_SEMICOLON) // : +#define KC_COLN KC_COLON -#define KC_LT LSFT(KC_COMM) // < +#define KC_PIPE LSFT(KC_BACKSLASH) // | -#define KC_GT LSFT(KC_DOT) // > +#define KC_QUESTION LSFT(KC_SLASH) // ? +#define KC_QUES KC_QUESTION -#define KC_QUES LSFT(KC_SLSH) // ? -#define KC_QUESTION KC_QUES - -#define KC_DQT LSFT(KC_QUOT) // " -#define KC_DOUBLE_QUOTE KC_DQT -#define KC_DQUO KC_DQT +#define KC_DOUBLE_QUOTE LSFT(KC_QUOTE) // " +#define KC_DQUO KC_DOUBLE_QUOTE +#define KC_DQT KC_DOUBLE_QUOTE #define KC_DELT KC_DELETE // Del key (four letter code) @@ -854,3 +925,39 @@ enum quantum_keycodes { #define OS_TOGG ONESHOT_TOGGLE #define OS_ON ONESHOT_ENABLE #define OS_OFF ONESHOT_DISABLE + +// Programmable Button aliases +#define PB_1 PROGRAMMABLE_BUTTON_1 +#define PB_2 PROGRAMMABLE_BUTTON_2 +#define PB_3 PROGRAMMABLE_BUTTON_3 +#define PB_4 PROGRAMMABLE_BUTTON_4 +#define PB_5 PROGRAMMABLE_BUTTON_5 +#define PB_6 PROGRAMMABLE_BUTTON_6 +#define PB_7 PROGRAMMABLE_BUTTON_7 +#define PB_8 PROGRAMMABLE_BUTTON_8 +#define PB_9 PROGRAMMABLE_BUTTON_9 +#define PB_10 PROGRAMMABLE_BUTTON_10 +#define PB_11 PROGRAMMABLE_BUTTON_11 +#define PB_12 PROGRAMMABLE_BUTTON_12 +#define PB_13 PROGRAMMABLE_BUTTON_13 +#define PB_14 PROGRAMMABLE_BUTTON_14 +#define PB_15 PROGRAMMABLE_BUTTON_15 +#define PB_16 PROGRAMMABLE_BUTTON_16 +#define PB_17 PROGRAMMABLE_BUTTON_17 +#define PB_18 PROGRAMMABLE_BUTTON_18 +#define PB_19 PROGRAMMABLE_BUTTON_19 +#define PB_20 PROGRAMMABLE_BUTTON_20 +#define PB_21 PROGRAMMABLE_BUTTON_21 +#define PB_22 PROGRAMMABLE_BUTTON_22 +#define PB_23 PROGRAMMABLE_BUTTON_23 +#define PB_24 PROGRAMMABLE_BUTTON_24 +#define PB_25 PROGRAMMABLE_BUTTON_25 +#define PB_26 PROGRAMMABLE_BUTTON_26 +#define PB_27 PROGRAMMABLE_BUTTON_27 +#define PB_28 PROGRAMMABLE_BUTTON_28 +#define PB_29 PROGRAMMABLE_BUTTON_29 +#define PB_30 PROGRAMMABLE_BUTTON_30 +#define PB_31 PROGRAMMABLE_BUTTON_31 +#define PB_32 PROGRAMMABLE_BUTTON_32 +#define PROGRAMMABLE_BUTTON_MIN PROGRAMMABLE_BUTTON_1 +#define PROGRAMMABLE_BUTTON_MAX PROGRAMMABLE_BUTTON_32 diff --git a/tmk_core/common/raw_hid.h b/quantum/raw_hid.h similarity index 100% rename from tmk_core/common/raw_hid.h rename to quantum/raw_hid.h diff --git a/quantum/rgb_matrix/animations/alpha_mods_anim.h b/quantum/rgb_matrix/animations/alpha_mods_anim.h index 3f2c9b799a8..d6136f1ba47 100644 --- a/quantum/rgb_matrix/animations/alpha_mods_anim.h +++ b/quantum/rgb_matrix/animations/alpha_mods_anim.h @@ -19,8 +19,8 @@ bool ALPHAS_MODS(effect_params_t* params) { rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b); } } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_ALPHAS_MODS +#endif // ENABLE_RGB_MATRIX_ALPHAS_MODS diff --git a/quantum/rgb_matrix/animations/breathing_anim.h b/quantum/rgb_matrix/animations/breathing_anim.h index a00ccb83a25..29187e1543e 100644 --- a/quantum/rgb_matrix/animations/breathing_anim.h +++ b/quantum/rgb_matrix/animations/breathing_anim.h @@ -13,8 +13,8 @@ bool BREATHING(effect_params_t* params) { RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BREATHING +#endif // ENABLE_RGB_MATRIX_BREATHING diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h index ac95789228f..0375d4937de 100644 --- a/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h +++ b/quantum/rgb_matrix/animations/colorband_pinwheel_sat_anim.h @@ -10,4 +10,4 @@ static HSV BAND_PINWHEEL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) bool BAND_PINWHEEL_SAT(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_SAT_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#endif // ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT diff --git a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h index f7fe4b76e93..e40bf4cd1f2 100644 --- a/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h +++ b/quantum/rgb_matrix/animations/colorband_pinwheel_val_anim.h @@ -10,4 +10,4 @@ static HSV BAND_PINWHEEL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) bool BAND_PINWHEEL_VAL(effect_params_t* params) { return effect_runner_dx_dy(params, &BAND_PINWHEEL_VAL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#endif // ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL diff --git a/quantum/rgb_matrix/animations/colorband_sat_anim.h b/quantum/rgb_matrix/animations/colorband_sat_anim.h index 96a6cbf5cd2..1c4f7de575a 100644 --- a/quantum/rgb_matrix/animations/colorband_sat_anim.h +++ b/quantum/rgb_matrix/animations/colorband_sat_anim.h @@ -11,4 +11,4 @@ static HSV BAND_SAT_math(HSV hsv, uint8_t i, uint8_t time) { bool BAND_SAT(effect_params_t* params) { return effect_runner_i(params, &BAND_SAT_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SAT +#endif // ENABLE_RGB_MATRIX_BAND_SAT diff --git a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h index 52f6040d811..cdd02b37974 100644 --- a/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h +++ b/quantum/rgb_matrix/animations/colorband_spiral_sat_anim.h @@ -10,4 +10,4 @@ static HSV BAND_SPIRAL_SAT_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, u bool BAND_SPIRAL_SAT(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_SAT_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#endif // ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT diff --git a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h index d5752e27fbb..e1331eaebe8 100644 --- a/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h +++ b/quantum/rgb_matrix/animations/colorband_spiral_val_anim.h @@ -10,4 +10,4 @@ static HSV BAND_SPIRAL_VAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, u bool BAND_SPIRAL_VAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &BAND_SPIRAL_VAL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#endif // ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL diff --git a/quantum/rgb_matrix/animations/colorband_val_anim.h b/quantum/rgb_matrix/animations/colorband_val_anim.h index 32bc6f52a5f..02ee4add672 100644 --- a/quantum/rgb_matrix/animations/colorband_val_anim.h +++ b/quantum/rgb_matrix/animations/colorband_val_anim.h @@ -11,4 +11,4 @@ static HSV BAND_VAL_math(HSV hsv, uint8_t i, uint8_t time) { bool BAND_VAL(effect_params_t* params) { return effect_runner_i(params, &BAND_VAL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_BAND_VAL +#endif // ENABLE_RGB_MATRIX_BAND_VAL diff --git a/quantum/rgb_matrix/animations/cycle_all_anim.h b/quantum/rgb_matrix/animations/cycle_all_anim.h index 20af94b6ba3..3b73b9d385a 100644 --- a/quantum/rgb_matrix/animations/cycle_all_anim.h +++ b/quantum/rgb_matrix/animations/cycle_all_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_ALL_math(HSV hsv, uint8_t i, uint8_t time) { bool CYCLE_ALL(effect_params_t* params) { return effect_runner_i(params, &CYCLE_ALL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_ALL +#endif // ENABLE_RGB_MATRIX_CYCLE_ALL diff --git a/quantum/rgb_matrix/animations/cycle_left_right_anim.h b/quantum/rgb_matrix/animations/cycle_left_right_anim.h index 7f84f4bd59a..bf6a5740696 100644 --- a/quantum/rgb_matrix/animations/cycle_left_right_anim.h +++ b/quantum/rgb_matrix/animations/cycle_left_right_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_LEFT_RIGHT_math(HSV hsv, uint8_t i, uint8_t time) { bool CYCLE_LEFT_RIGHT(effect_params_t* params) { return effect_runner_i(params, &CYCLE_LEFT_RIGHT_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#endif // ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT diff --git a/quantum/rgb_matrix/animations/cycle_out_in_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_anim.h index 2277f16a2fd..2bdb9d9375a 100644 --- a/quantum/rgb_matrix/animations/cycle_out_in_anim.h +++ b/quantum/rgb_matrix/animations/cycle_out_in_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_OUT_IN_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint bool CYCLE_OUT_IN(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_OUT_IN_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN +#endif // ENABLE_RGB_MATRIX_CYCLE_OUT_IN diff --git a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h index 981c0afd056..51979c44fee 100644 --- a/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h +++ b/quantum/rgb_matrix/animations/cycle_out_in_dual_anim.h @@ -12,4 +12,4 @@ static HSV CYCLE_OUT_IN_DUAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) bool CYCLE_OUT_IN_DUAL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_OUT_IN_DUAL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#endif // ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL diff --git a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h index 1a7db4a4c7c..10ba2b7c2c7 100644 --- a/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h +++ b/quantum/rgb_matrix/animations/cycle_pinwheel_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_PINWHEEL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t time) { bool CYCLE_PINWHEEL(effect_params_t* params) { return effect_runner_dx_dy(params, &CYCLE_PINWHEEL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_PINWHEEL +#endif // ENABLE_RGB_MATRIX_CYCLE_PINWHEEL diff --git a/quantum/rgb_matrix/animations/cycle_spiral_anim.h b/quantum/rgb_matrix/animations/cycle_spiral_anim.h index 245cdc237ff..482c7e7da63 100644 --- a/quantum/rgb_matrix/animations/cycle_spiral_anim.h +++ b/quantum/rgb_matrix/animations/cycle_spiral_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_SPIRAL_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint bool CYCLE_SPIRAL(effect_params_t* params) { return effect_runner_dx_dy_dist(params, &CYCLE_SPIRAL_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_SPIRAL +#endif // ENABLE_RGB_MATRIX_CYCLE_SPIRAL diff --git a/quantum/rgb_matrix/animations/cycle_up_down_anim.h b/quantum/rgb_matrix/animations/cycle_up_down_anim.h index c9b5a54133b..277edccb2f1 100644 --- a/quantum/rgb_matrix/animations/cycle_up_down_anim.h +++ b/quantum/rgb_matrix/animations/cycle_up_down_anim.h @@ -10,4 +10,4 @@ static HSV CYCLE_UP_DOWN_math(HSV hsv, uint8_t i, uint8_t time) { bool CYCLE_UP_DOWN(effect_params_t* params) { return effect_runner_i(params, &CYCLE_UP_DOWN_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_CYCLE_UP_DOWN +#endif // ENABLE_RGB_MATRIX_CYCLE_UP_DOWN diff --git a/quantum/rgb_matrix/animations/digital_rain_anim.h b/quantum/rgb_matrix/animations/digital_rain_anim.h index 1de45f8e8db..8ce8fd7039b 100644 --- a/quantum/rgb_matrix/animations/digital_rain_anim.h +++ b/quantum/rgb_matrix/animations/digital_rain_anim.h @@ -1,4 +1,4 @@ -#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) +#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_RGB_MATRIX_DIGITAL_RAIN) RGB_MATRIX_EFFECT(DIGITAL_RAIN) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS @@ -72,4 +72,4 @@ bool DIGITAL_RAIN(effect_params_t* params) { } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN) +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(ENABLE_RGB_MATRIX_DIGITAL_RAIN) diff --git a/quantum/rgb_matrix/animations/dual_beacon_anim.h b/quantum/rgb_matrix/animations/dual_beacon_anim.h index 5c06080a26a..dbe9b3ecf16 100644 --- a/quantum/rgb_matrix/animations/dual_beacon_anim.h +++ b/quantum/rgb_matrix/animations/dual_beacon_anim.h @@ -10,4 +10,4 @@ static HSV DUAL_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8_t bool DUAL_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &DUAL_BEACON_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_DUAL_BEACON +#endif // ENABLE_RGB_MATRIX_DUAL_BEACON diff --git a/quantum/rgb_matrix/animations/gradient_left_right_anim.h b/quantum/rgb_matrix/animations/gradient_left_right_anim.h index b4f2752ff76..8bb5e570bd0 100644 --- a/quantum/rgb_matrix/animations/gradient_left_right_anim.h +++ b/quantum/rgb_matrix/animations/gradient_left_right_anim.h @@ -15,8 +15,8 @@ bool GRADIENT_LEFT_RIGHT(effect_params_t* params) { RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +#endif // ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT diff --git a/quantum/rgb_matrix/animations/gradient_up_down_anim.h b/quantum/rgb_matrix/animations/gradient_up_down_anim.h index 3fd45cf99bc..a5674583e39 100644 --- a/quantum/rgb_matrix/animations/gradient_up_down_anim.h +++ b/quantum/rgb_matrix/animations/gradient_up_down_anim.h @@ -15,8 +15,8 @@ bool GRADIENT_UP_DOWN(effect_params_t* params) { RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN +#endif // ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/quantum/rgb_matrix/animations/hue_breathing_anim.h b/quantum/rgb_matrix/animations/hue_breathing_anim.h index 6d974b8c396..82be1a44241 100644 --- a/quantum/rgb_matrix/animations/hue_breathing_anim.h +++ b/quantum/rgb_matrix/animations/hue_breathing_anim.h @@ -15,7 +15,7 @@ bool HUE_BREATHING(effect_params_t* params) { RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h index 7d8eafffb99..3ffb57eb359 100644 --- a/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h +++ b/quantum/rgb_matrix/animations/jellybean_raindrops_anim.h @@ -22,8 +22,8 @@ bool JELLYBEAN_RAINDROPS(effect_params_t* params) { for (int i = led_min; i < led_max; i++) { jellybean_raindrops_set_color(i, params); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#endif // ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS diff --git a/quantum/rgb_matrix/animations/pixel_fractal_anim.h b/quantum/rgb_matrix/animations/pixel_fractal_anim.h new file mode 100644 index 00000000000..8e25ec402c2 --- /dev/null +++ b/quantum/rgb_matrix/animations/pixel_fractal_anim.h @@ -0,0 +1,74 @@ +/* Copyright (C) 2021 @filterpaper + * + * 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/>. + */ + +// Inspired from 4x12 fractal created by @schwarzgrau + +#ifdef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +RGB_MATRIX_EFFECT(PIXEL_FRACTAL) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static bool PIXEL_FRACTAL(effect_params_t* params) { +# define MID_COL MATRIX_COLS / 2 + static bool led[MATRIX_ROWS][MATRIX_COLS]; + + static uint32_t wait_timer = 0; + if (wait_timer > g_rgb_timer) { + return false; + } + + inline uint32_t interval(void) { return 3000 / scale16by8(qadd8(rgb_matrix_config.speed, 16), 16); } + + RGB rgb = rgb_matrix_hsv_to_rgb(rgb_matrix_config.hsv); + for (uint8_t h = 0; h < MATRIX_ROWS; ++h) { + for (uint8_t l = 0; l < MID_COL - 1; ++l) { // Light and move left columns outwards + if (led[h][l]) { + rgb_matrix_set_color(g_led_config.matrix_co[h][l], rgb.r, rgb.g, rgb.b); + } else { + rgb_matrix_set_color(g_led_config.matrix_co[h][l], 0, 0, 0); + } + led[h][l] = led[h][l + 1]; + } + + for (uint8_t r = MATRIX_COLS - 1; r > MID_COL; --r) { // Light and move right columns outwards + if (led[h][r]) { + rgb_matrix_set_color(g_led_config.matrix_co[h][r], rgb.r, rgb.g, rgb.b); + } else { + rgb_matrix_set_color(g_led_config.matrix_co[h][r], 0, 0, 0); + } + led[h][r] = led[h][r - 1]; + } + + // Light both middle columns + if (led[h][MID_COL]) { + rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL], rgb.r, rgb.g, rgb.b); + } else { + rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL], 0, 0, 0); + } + if (led[h][MID_COL - 1]) { + rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], rgb.r, rgb.g, rgb.b); + } else { + rgb_matrix_set_color(g_led_config.matrix_co[h][MID_COL - 1], 0, 0, 0); + } + + // Generate new random fractal columns + led[h][MID_COL] = led[h][MID_COL - 1] = (random8() & 3) ? false : true; + } + + wait_timer = g_rgb_timer + interval(); + return false; +} +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // ENABLE_RGB_MATRIX_PIXEL_FRACTAL diff --git a/quantum/rgb_matrix/animations/pixel_rain_anim.h b/quantum/rgb_matrix/animations/pixel_rain_anim.h new file mode 100644 index 00000000000..001649aa6e0 --- /dev/null +++ b/quantum/rgb_matrix/animations/pixel_rain_anim.h @@ -0,0 +1,48 @@ +/* Copyright (C) 2021 @filterpaper + * + * 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/>. + */ + +#ifdef ENABLE_RGB_MATRIX_PIXEL_RAIN +RGB_MATRIX_EFFECT(PIXEL_RAIN) +# ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS + +static bool PIXEL_RAIN(effect_params_t* params) { + static uint32_t wait_timer = 0; + if (wait_timer > g_rgb_timer) { + return false; + } + + inline uint32_t interval(void) { return 500 / scale16by8(qadd8(rgb_matrix_config.speed, 16), 16); } + + bool rain_pixel(uint8_t i, effect_params_t * params, bool off) { + if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) { + return true; + } + if (off) { + rgb_matrix_set_color(i, 0, 0, 0); + } else { + HSV hsv = {random8(), qadd8(random8() >> 1, 127), rgb_matrix_config.hsv.v}; + RGB rgb = rgb_matrix_hsv_to_rgb(hsv); + rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); + } + wait_timer = g_rgb_timer + interval(); + return false; + } + + return rain_pixel(mod8(random8(), DRIVER_LED_TOTAL), params, random8() & 2); +} + +# endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS +#endif // ENABLE_RGB_MATRIX_PIXEL_RAIN diff --git a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h index b54d997f63d..cd529958dbf 100644 --- a/quantum/rgb_matrix/animations/rainbow_beacon_anim.h +++ b/quantum/rgb_matrix/animations/rainbow_beacon_anim.h @@ -10,4 +10,4 @@ static HSV RAINBOW_BEACON_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, uint8 bool RAINBOW_BEACON(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_BEACON_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_BEACON +#endif // ENABLE_RGB_MATRIX_RAINBOW_BEACON diff --git a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h index 50db922014a..2f3de64e9dc 100644 --- a/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h +++ b/quantum/rgb_matrix/animations/rainbow_moving_chevron_anim.h @@ -10,4 +10,4 @@ static HSV RAINBOW_MOVING_CHEVRON_math(HSV hsv, uint8_t i, uint8_t time) { bool RAINBOW_MOVING_CHEVRON(effect_params_t* params) { return effect_runner_i(params, &RAINBOW_MOVING_CHEVRON_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#endif // ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON diff --git a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h index 3299f15df15..dae2b5d1904 100644 --- a/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h +++ b/quantum/rgb_matrix/animations/rainbow_pinwheels_anim.h @@ -10,4 +10,4 @@ static HSV RAINBOW_PINWHEELS_math(HSV hsv, int8_t sin, int8_t cos, uint8_t i, ui bool RAINBOW_PINWHEELS(effect_params_t* params) { return effect_runner_sin_cos_i(params, &RAINBOW_PINWHEELS_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#endif // ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS diff --git a/quantum/rgb_matrix/animations/raindrops_anim.h b/quantum/rgb_matrix/animations/raindrops_anim.h index c01688e2c7f..4b1b9dd9ec4 100644 --- a/quantum/rgb_matrix/animations/raindrops_anim.h +++ b/quantum/rgb_matrix/animations/raindrops_anim.h @@ -32,8 +32,8 @@ bool RAINDROPS(effect_params_t* params) { for (int i = led_min; i < led_max; i++) { raindrops_set_color(i, params); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // DISABLE_RGB_MATRIX_RAINDROPS +#endif // ENABLE_RGB_MATRIX_RAINDROPS diff --git a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc index 302ad79c04a..27ce3472351 100644 --- a/quantum/rgb_matrix/animations/rgb_matrix_effects.inc +++ b/quantum/rgb_matrix/animations/rgb_matrix_effects.inc @@ -26,6 +26,8 @@ #include "hue_breathing_anim.h" #include "hue_pendulum_anim.h" #include "hue_wave_anim.h" +#include "pixel_rain_anim.h" +#include "pixel_fractal_anim.h" #include "typing_heatmap_anim.h" #include "digital_rain_anim.h" #include "solid_reactive_simple_anim.h" diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h index 4867609c81f..2ad0f22c287 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy.h @@ -13,5 +13,5 @@ bool effect_runner_dx_dy(effect_params_t* params, dx_dy_f effect_func) { RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h index 9545b418d93..bcae7c79b6b 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_dx_dy_dist.h @@ -14,5 +14,5 @@ bool effect_runner_dx_dy_dist(effect_params_t* params, dx_dy_dist_f effect_func) RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, dx, dy, dist, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_i.h index 1881cd6c601..b4de2992b64 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_i.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_i.h @@ -11,5 +11,5 @@ bool effect_runner_i(effect_params_t* params, i_f effect_func) { RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, i, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h index 75b7c0df4ea..d5c1a26cefe 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive.h @@ -23,7 +23,7 @@ bool effect_runner_reactive(effect_params_t* params, reactive_f effect_func) { RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, offset)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h index 2e46ffb350e..d3a6e4e72f0 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_reactive_splash.h @@ -23,7 +23,7 @@ bool effect_runner_reactive_splash(uint8_t start, effect_params_t* params, react RGB rgb = rgb_matrix_hsv_to_rgb(hsv); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h index 02351de51e2..7776491d512 100644 --- a/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h +++ b/quantum/rgb_matrix/animations/runners/effect_runner_sin_cos_i.h @@ -13,5 +13,5 @@ bool effect_runner_sin_cos_i(effect_params_t* params, sin_cos_i_f effect_func) { RGB rgb = rgb_matrix_hsv_to_rgb(effect_func(rgb_matrix_config.hsv, cos_value, sin_value, i, time)); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } diff --git a/quantum/rgb_matrix/animations/solid_color_anim.h b/quantum/rgb_matrix/animations/solid_color_anim.h index 79d63cf133b..4209959468a 100644 --- a/quantum/rgb_matrix/animations/solid_color_anim.h +++ b/quantum/rgb_matrix/animations/solid_color_anim.h @@ -9,7 +9,7 @@ bool SOLID_COLOR(effect_params_t* params) { RGB_MATRIX_TEST_LED_FLAGS(); rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b); } - return led_max < DRIVER_LED_TOTAL; + return rgb_matrix_check_finished_leds(led_max); } #endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS diff --git a/quantum/rgb_matrix/animations/solid_reactive_anim.h b/quantum/rgb_matrix/animations/solid_reactive_anim.h index d45bb961bc5..360d05a67af 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_anim.h +++ b/quantum/rgb_matrix/animations/solid_reactive_anim.h @@ -1,5 +1,5 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE RGB_MATRIX_EFFECT(SOLID_REACTIVE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS @@ -11,5 +11,5 @@ static HSV SOLID_REACTIVE_math(HSV hsv, uint16_t offset) { bool SOLID_REACTIVE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE +# endif // ENABLE_RGB_MATRIX_SOLID_REACTIVE #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/solid_reactive_cross.h b/quantum/rgb_matrix/animations/solid_reactive_cross.h index f76c68e8c74..496651f8a5f 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_cross.h +++ b/quantum/rgb_matrix/animations/solid_reactive_cross.h @@ -1,11 +1,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) +# if defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS RGB_MATRIX_EFFECT(SOLID_REACTIVE_CROSS) # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTICROSS) # endif @@ -23,14 +23,14 @@ static HSV SOLID_REACTIVE_CROSS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t di return hsv; } -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS bool SOLID_REACTIVE_CROSS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_CROSS_math); } # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS bool SOLID_REACTIVE_MULTICROSS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_CROSS_math); } # endif # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) +# endif // !defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/solid_reactive_nexus.h b/quantum/rgb_matrix/animations/solid_reactive_nexus.h index 17f94e3c180..3562e74a727 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_nexus.h +++ b/quantum/rgb_matrix/animations/solid_reactive_nexus.h @@ -1,11 +1,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) +# if defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS RGB_MATRIX_EFFECT(SOLID_REACTIVE_NEXUS) # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTINEXUS) # endif @@ -21,14 +21,14 @@ static HSV SOLID_REACTIVE_NEXUS_math(HSV hsv, int16_t dx, int16_t dy, uint8_t di return hsv; } -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS bool SOLID_REACTIVE_NEXUS(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_NEXUS_math); } # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS bool SOLID_REACTIVE_MULTINEXUS(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_NEXUS_math); } # endif # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) +# endif // !defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h index 12eb248cc0b..69189f636b2 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h +++ b/quantum/rgb_matrix/animations/solid_reactive_simple_anim.h @@ -1,5 +1,5 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE RGB_MATRIX_EFFECT(SOLID_REACTIVE_SIMPLE) # ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS @@ -11,5 +11,5 @@ static HSV SOLID_REACTIVE_SIMPLE_math(HSV hsv, uint16_t offset) { bool SOLID_REACTIVE_SIMPLE(effect_params_t* params) { return effect_runner_reactive(params, &SOLID_REACTIVE_SIMPLE_math); } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# endif // ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/solid_reactive_wide.h b/quantum/rgb_matrix/animations/solid_reactive_wide.h index 1cc4dca728e..a613c7ff5f7 100644 --- a/quantum/rgb_matrix/animations/solid_reactive_wide.h +++ b/quantum/rgb_matrix/animations/solid_reactive_wide.h @@ -1,11 +1,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) +# if defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE RGB_MATRIX_EFFECT(SOLID_REACTIVE_WIDE) # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE RGB_MATRIX_EFFECT(SOLID_REACTIVE_MULTIWIDE) # endif @@ -18,14 +18,14 @@ static HSV SOLID_REACTIVE_WIDE_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dis return hsv; } -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE bool SOLID_REACTIVE_WIDE(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_REACTIVE_WIDE_math); } # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# ifdef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE bool SOLID_REACTIVE_MULTIWIDE(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_REACTIVE_WIDE_math); } # endif # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) +# endif // !defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/solid_splash_anim.h b/quantum/rgb_matrix/animations/solid_splash_anim.h index 99efb4996aa..bd9c1cfe2b9 100644 --- a/quantum/rgb_matrix/animations/solid_splash_anim.h +++ b/quantum/rgb_matrix/animations/solid_splash_anim.h @@ -1,11 +1,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_RGB_MATRIX_SOLID_SPLASH) || !defined(DISABLE_RGB_MATRIX_SOLID_MULTISPLASH) +# if defined(ENABLE_RGB_MATRIX_SOLID_SPLASH) || defined(ENABLE_RGB_MATRIX_SOLID_MULTISPLASH) -# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +# ifdef ENABLE_RGB_MATRIX_SOLID_SPLASH RGB_MATRIX_EFFECT(SOLID_SPLASH) # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# ifdef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH RGB_MATRIX_EFFECT(SOLID_MULTISPLASH) # endif @@ -18,14 +18,14 @@ HSV SOLID_SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t ti return hsv; } -# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH +# ifdef ENABLE_RGB_MATRIX_SOLID_SPLASH bool SOLID_SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SOLID_SPLASH_math); } # endif -# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# ifdef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH bool SOLID_MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SOLID_SPLASH_math); } # endif # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) && !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +# endif // !defined(ENABLE_RGB_MATRIX_SPLASH) && !defined(ENABLE_RGB_MATRIX_MULTISPLASH) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/splash_anim.h b/quantum/rgb_matrix/animations/splash_anim.h index 1415bcc0fa4..382355e9ed6 100644 --- a/quantum/rgb_matrix/animations/splash_anim.h +++ b/quantum/rgb_matrix/animations/splash_anim.h @@ -1,11 +1,11 @@ #ifdef RGB_MATRIX_KEYREACTIVE_ENABLED -# if !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +# if defined(ENABLE_RGB_MATRIX_SPLASH) || defined(ENABLE_RGB_MATRIX_MULTISPLASH) -# ifndef DISABLE_RGB_MATRIX_SPLASH +# ifdef ENABLE_RGB_MATRIX_SPLASH RGB_MATRIX_EFFECT(SPLASH) # endif -# ifndef DISABLE_RGB_MATRIX_MULTISPLASH +# ifdef ENABLE_RGB_MATRIX_MULTISPLASH RGB_MATRIX_EFFECT(MULTISPLASH) # endif @@ -19,14 +19,14 @@ HSV SPLASH_math(HSV hsv, int16_t dx, int16_t dy, uint8_t dist, uint16_t tick) { return hsv; } -# ifndef DISABLE_RGB_MATRIX_SPLASH +# ifdef ENABLE_RGB_MATRIX_SPLASH bool SPLASH(effect_params_t* params) { return effect_runner_reactive_splash(qsub8(g_last_hit_tracker.count, 1), params, &SPLASH_math); } # endif -# ifndef DISABLE_RGB_MATRIX_MULTISPLASH +# ifdef ENABLE_RGB_MATRIX_MULTISPLASH bool MULTISPLASH(effect_params_t* params) { return effect_runner_reactive_splash(0, params, &SPLASH_math); } # endif # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -# endif // !defined(DISABLE_RGB_MATRIX_SPLASH) || !defined(DISABLE_RGB_MATRIX_MULTISPLASH) +# endif // !defined(ENABLE_RGB_MATRIX_SPLASH) || !defined(ENABLE_RGB_MATRIX_MULTISPLASH) #endif // RGB_MATRIX_KEYREACTIVE_ENABLED diff --git a/quantum/rgb_matrix/animations/typing_heatmap_anim.h b/quantum/rgb_matrix/animations/typing_heatmap_anim.h index 28f040109d8..b66667b9b8c 100644 --- a/quantum/rgb_matrix/animations/typing_heatmap_anim.h +++ b/quantum/rgb_matrix/animations/typing_heatmap_anim.h @@ -83,4 +83,4 @@ bool TYPING_HEATMAP(effect_params_t* params) { } # endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS -#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP) +#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && defined(ENABLE_RGB_MATRIX_TYPING_HEATMAP) diff --git a/quantum/rgb_matrix/rgb_matrix.c b/quantum/rgb_matrix/rgb_matrix.c index 8f00b408778..558c7bd41a3 100644 --- a/quantum/rgb_matrix/rgb_matrix.c +++ b/quantum/rgb_matrix/rgb_matrix.c @@ -31,14 +31,6 @@ const led_point_t k_rgb_matrix_center = {112, 32}; const led_point_t k_rgb_matrix_center = RGB_MATRIX_CENTER; #endif -// clang-format off -#ifndef RGB_MATRIX_IMMEDIATE_EEPROM -# define rgb_eeconfig_update(v) rgb_update_eeprom |= v -#else -# define rgb_eeconfig_update(v) if (v) eeconfig_update_rgb_matrix() -#endif -// clang-format on - __attribute__((weak)) RGB rgb_matrix_hsv_to_rgb(HSV hsv) { return hsv_to_rgb(hsv); } // Generic effect runners @@ -128,7 +120,6 @@ last_hit_t g_last_hit_tracker; // internals static bool suspend_state = false; -static bool rgb_update_eeprom = false; static uint8_t rgb_last_enable = UINT8_MAX; static uint8_t rgb_last_effect = UINT8_MAX; static effect_params_t rgb_effect_params = {0, LED_FLAG_ALL, false}; @@ -148,9 +139,9 @@ static last_hit_t last_hit_buffer; const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; #endif -void eeconfig_read_rgb_matrix(void) { eeprom_read_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } +EECONFIG_DEBOUNCE_HELPER(rgb_matrix, EECONFIG_RGB_MATRIX, rgb_matrix_config); -void eeconfig_update_rgb_matrix(void) { eeprom_update_block(&rgb_matrix_config, EECONFIG_RGB_MATRIX, sizeof(rgb_matrix_config)); } +void eeconfig_update_rgb_matrix(void) { eeconfig_flush_rgb_matrix(true); } void eeconfig_update_rgb_matrix_default(void) { dprintf("eeconfig_update_rgb_matrix_default\n"); @@ -159,7 +150,7 @@ void eeconfig_update_rgb_matrix_default(void) { rgb_matrix_config.hsv = (HSV){RGB_MATRIX_STARTUP_HUE, RGB_MATRIX_STARTUP_SAT, RGB_MATRIX_STARTUP_VAL}; rgb_matrix_config.speed = RGB_MATRIX_STARTUP_SPD; rgb_matrix_config.flags = LED_FLAG_ALL; - eeconfig_update_rgb_matrix(); + eeconfig_flush_rgb_matrix(true); } void eeconfig_debug_rgb_matrix(void) { @@ -187,14 +178,7 @@ uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *l void rgb_matrix_update_pwm_buffers(void) { rgb_matrix_driver.flush(); } -void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { -#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) - if (!is_keyboard_left() && index >= k_rgb_matrix_split[0]) - rgb_matrix_driver.set_color(index - k_rgb_matrix_split[0], red, green, blue); - else if (is_keyboard_left() && index < k_rgb_matrix_split[0]) -#endif - rgb_matrix_driver.set_color(index, red, green, blue); -} +void rgb_matrix_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) { rgb_matrix_driver.set_color(index, red, green, blue); } void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue) { #if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) @@ -314,9 +298,8 @@ static void rgb_task_timers(void) { } static void rgb_task_sync(void) { + eeconfig_flush_rgb_matrix(false); // next task - if (rgb_update_eeprom) eeconfig_update_rgb_matrix(); - rgb_update_eeprom = false; if (sync_timer_elapsed32(g_rgb_timer) >= RGB_MATRIX_LED_FLUSH_LIMIT) rgb_task_state = STARTING; } @@ -491,7 +474,7 @@ void rgb_matrix_init(void) { eeconfig_update_rgb_matrix_default(); } - eeconfig_read_rgb_matrix(); + eeconfig_init_rgb_matrix(); if (!rgb_matrix_config.mode) { dprintf("rgb_matrix_init_drivers rgb_matrix_config.mode = 0. Write default values to EEPROM.\n"); eeconfig_update_rgb_matrix_default(); @@ -514,7 +497,7 @@ bool rgb_matrix_get_suspend_state(void) { return suspend_state; } void rgb_matrix_toggle_eeprom_helper(bool write_to_eeprom) { rgb_matrix_config.enable ^= 1; rgb_task_state = STARTING; - rgb_eeconfig_update(write_to_eeprom); + eeconfig_flag_rgb_matrix(write_to_eeprom); dprintf("rgb matrix toggle [%s]: rgb_matrix_config.enable = %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.enable); } void rgb_matrix_toggle_noeeprom(void) { rgb_matrix_toggle_eeprom_helper(false); } @@ -522,7 +505,7 @@ void rgb_matrix_toggle(void) { rgb_matrix_toggle_eeprom_helper(true); } void rgb_matrix_enable(void) { rgb_matrix_enable_noeeprom(); - rgb_eeconfig_update(true); + eeconfig_flag_rgb_matrix(true); } void rgb_matrix_enable_noeeprom(void) { @@ -532,7 +515,7 @@ void rgb_matrix_enable_noeeprom(void) { void rgb_matrix_disable(void) { rgb_matrix_disable_noeeprom(); - rgb_eeconfig_update(true); + eeconfig_flag_rgb_matrix(true); } void rgb_matrix_disable_noeeprom(void) { @@ -554,7 +537,7 @@ void rgb_matrix_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { rgb_matrix_config.mode = mode; } rgb_task_state = STARTING; - rgb_eeconfig_update(write_to_eeprom); + eeconfig_flag_rgb_matrix(write_to_eeprom); dprintf("rgb matrix mode [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.mode); } void rgb_matrix_mode_noeeprom(uint8_t mode) { rgb_matrix_mode_eeprom_helper(mode, false); } @@ -583,7 +566,7 @@ void rgb_matrix_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, boo rgb_matrix_config.hsv.h = hue; rgb_matrix_config.hsv.s = sat; rgb_matrix_config.hsv.v = (val > RGB_MATRIX_MAXIMUM_BRIGHTNESS) ? RGB_MATRIX_MAXIMUM_BRIGHTNESS : val; - rgb_eeconfig_update(write_to_eeprom); + eeconfig_flag_rgb_matrix(write_to_eeprom); dprintf("rgb matrix set hsv [%s]: %u,%u,%u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v); } void rgb_matrix_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { rgb_matrix_sethsv_eeprom_helper(hue, sat, val, false); } @@ -620,7 +603,7 @@ void rgb_matrix_decrease_val(void) { rgb_matrix_decrease_val_helper(true); } void rgb_matrix_set_speed_eeprom_helper(uint8_t speed, bool write_to_eeprom) { rgb_matrix_config.speed = speed; - rgb_eeconfig_update(write_to_eeprom); + eeconfig_flag_rgb_matrix(write_to_eeprom); dprintf("rgb matrix set speed [%s]: %u\n", (write_to_eeprom) ? "EEPROM" : "NOEEPROM", rgb_matrix_config.speed); } void rgb_matrix_set_speed_noeeprom(uint8_t speed) { rgb_matrix_set_speed_eeprom_helper(speed, false); } diff --git a/quantum/rgb_matrix/rgb_matrix.h b/quantum/rgb_matrix/rgb_matrix.h index f53e011c1bd..a804d99abcc 100644 --- a/quantum/rgb_matrix/rgb_matrix.h +++ b/quantum/rgb_matrix/rgb_matrix.h @@ -23,7 +23,6 @@ #include "rgb_matrix_types.h" #include "color.h" #include "quantum.h" -#include "rgb_matrix_legacy_enables.h" #ifdef IS31FL3731 # include "is31fl3731.h" @@ -33,6 +32,8 @@ # include "is31fl3737.h" #elif defined(IS31FL3741) # include "is31fl3741.h" +#elif defined(CKLED2001) +# include "ckled2001.h" #elif defined(AW20216) # include "aw20216.h" #elif defined(WS2812) @@ -48,14 +49,33 @@ #endif #if defined(RGB_MATRIX_LED_PROCESS_LIMIT) && RGB_MATRIX_LED_PROCESS_LIMIT > 0 && RGB_MATRIX_LED_PROCESS_LIMIT < DRIVER_LED_TOTAL -# define RGB_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ - uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ - if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +# if defined(RGB_MATRIX_SPLIT) +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; \ + uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; \ + if (is_keyboard_left() && (max > k_rgb_matrix_split[0])) max = k_rgb_matrix_split[0]; \ + if (!(is_keyboard_left()) && (min < k_rgb_matrix_split[0])) min = k_rgb_matrix_split[0]; +# else +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = RGB_MATRIX_LED_PROCESS_LIMIT * params->iter; \ + uint8_t max = min + RGB_MATRIX_LED_PROCESS_LIMIT; \ + if (max > DRIVER_LED_TOTAL) max = DRIVER_LED_TOTAL; +# endif #else -# define RGB_MATRIX_USE_LIMITS(min, max) \ - uint8_t min = 0; \ - uint8_t max = DRIVER_LED_TOTAL; +# if defined(RGB_MATRIX_SPLIT) +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; \ + const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; \ + if (is_keyboard_left() && (max > k_rgb_matrix_split[0])) max = k_rgb_matrix_split[0]; \ + if (!(is_keyboard_left()) && (min < k_rgb_matrix_split[0])) min = k_rgb_matrix_split[0]; +# else +# define RGB_MATRIX_USE_LIMITS(min, max) \ + uint8_t min = 0; \ + uint8_t max = DRIVER_LED_TOTAL; +# endif #endif #define RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b) \ @@ -214,6 +234,18 @@ typedef struct { void (*flush)(void); } rgb_matrix_driver_t; +static inline bool rgb_matrix_check_finished_leds(uint8_t led_idx) { +#if defined(RGB_MATRIX_SPLIT) + if (is_keyboard_left()) { + uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; + return led_idx < k_rgb_matrix_split[0]; + } else + return led_idx < DRIVER_LED_TOTAL; +#else + return led_idx < DRIVER_LED_TOTAL; +#endif +} + extern const rgb_matrix_driver_t rgb_matrix_driver; extern rgb_config_t rgb_matrix_config; diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 2cec162e22c..130ca47a639 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -23,111 +23,153 @@ * be here if shared between boards. */ -#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) - +#if defined(IS31FL3731) || defined(IS31FL3733) || defined(IS31FL3737) || defined(IS31FL3741) || defined(CKLED2001) # include "i2c_master.h" +// TODO: Remove this at some later date +# if defined(DRIVER_ADDR_1) && defined(DRIVER_ADDR_2) +# if DRIVER_ADDR_1 == DRIVER_ADDR_2 +# error "Setting DRIVER_ADDR_2 == DRIVER_ADDR_1 is obsolete. If you are only using one ISSI driver, set DRIVER_COUNT to 1 and remove DRIVER_ADDR_2" +# endif +# endif + static void init(void) { i2c_init(); -# ifdef IS31FL3731 + +# if defined(IS31FL3731) IS31FL3731_init(DRIVER_ADDR_1); -# ifdef DRIVER_ADDR_2 +# if defined(DRIVER_ADDR_2) IS31FL3731_init(DRIVER_ADDR_2); -# endif -# ifdef DRIVER_ADDR_3 +# if defined(DRIVER_ADDR_3) IS31FL3731_init(DRIVER_ADDR_3); -# endif -# ifdef DRIVER_ADDR_4 +# if defined(DRIVER_ADDR_4) IS31FL3731_init(DRIVER_ADDR_4); +# endif +# endif # endif + # elif defined(IS31FL3733) -# ifndef DRIVER_SYNC_1 +# if !defined(DRIVER_SYNC_1) # define DRIVER_SYNC_1 0 # endif IS31FL3733_init(DRIVER_ADDR_1, DRIVER_SYNC_1); -# if defined DRIVER_ADDR_2 && (DRIVER_ADDR_1 != DRIVER_ADDR_2) -# ifndef DRIVER_SYNC_2 +# if defined(DRIVER_ADDR_2) +# if !defined(DRIVER_SYNC_2) # define DRIVER_SYNC_2 0 # endif IS31FL3733_init(DRIVER_ADDR_2, DRIVER_SYNC_2); -# endif -# ifdef DRIVER_ADDR_3 -# ifndef DRIVER_SYNC_3 -# define DRIVER_SYNC_3 0 -# endif +# if defined(DRIVER_ADDR_3) +# if !defined(DRIVER_SYNC_3) +# define DRIVER_SYNC_3 0 +# endif IS31FL3733_init(DRIVER_ADDR_3, DRIVER_SYNC_3); -# endif -# ifdef DRIVER_ADDR_4 -# ifndef DRIVER_SYNC_4 -# define DRIVER_SYNC_4 0 -# endif +# if defined(DRIVER_ADDR_4) +# if !defined(DRIVER_SYNC_4) +# define DRIVER_SYNC_4 0 +# endif IS31FL3733_init(DRIVER_ADDR_4, DRIVER_SYNC_4); +# endif +# endif # endif + # elif defined(IS31FL3737) IS31FL3737_init(DRIVER_ADDR_1); -# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility +# if defined(DRIVER_ADDR_2) IS31FL3737_init(DRIVER_ADDR_2); # endif -# else + +# elif defined(IS31FL3741) IS31FL3741_init(DRIVER_ADDR_1); + +# elif defined(CKLED2001) + CKLED2001_init(DRIVER_ADDR_1); +# if defined(DRIVER_ADDR_2) + CKLED2001_init(DRIVER_ADDR_2); +# if defined(DRIVER_ADDR_3) + CKLED2001_init(DRIVER_ADDR_3); +# if defined(DRIVER_ADDR_4) + CKLED2001_init(DRIVER_ADDR_4); +# endif +# endif +# endif # endif + for (int index = 0; index < DRIVER_LED_TOTAL; index++) { bool enabled = true; + // This only caches it for later -# ifdef IS31FL3731 +# if defined(IS31FL3731) IS31FL3731_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3733) IS31FL3733_set_led_control_register(index, enabled, enabled, enabled); # elif defined(IS31FL3737) IS31FL3737_set_led_control_register(index, enabled, enabled, enabled); -# else +# elif defined(IS31FL3741) IS31FL3741_set_led_control_register(index, enabled, enabled, enabled); +# elif defined(CKLED2001) + CKLED2001_set_led_control_register(index, enabled, enabled, enabled); # endif } + // This actually updates the LED drivers -# ifdef IS31FL3731 +# if defined(IS31FL3731) IS31FL3731_update_led_control_registers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# if defined(DRIVER_ADDR_2) IS31FL3731_update_led_control_registers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 +# if defined(DRIVER_ADDR_3) IS31FL3731_update_led_control_registers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 +# if defined(DRIVER_ADDR_4) IS31FL3731_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# endif # endif + # elif defined(IS31FL3733) IS31FL3733_update_led_control_registers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# if defined(DRIVER_ADDR_2) IS31FL3733_update_led_control_registers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 +# if defined(DRIVER_ADDR_3) IS31FL3733_update_led_control_registers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 +# if defined(DRIVER_ADDR_4) IS31FL3733_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# endif # endif + # elif defined(IS31FL3737) IS31FL3737_update_led_control_registers(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility +# if defined(DRIVER_ADDR_2) IS31FL3737_update_led_control_registers(DRIVER_ADDR_2, 1); # endif -# else + +# elif defined(IS31FL3741) IS31FL3741_update_led_control_registers(DRIVER_ADDR_1, 0); + +# elif defined(CKLED2001) + CKLED2001_update_led_control_registers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) + CKLED2001_update_led_control_registers(DRIVER_ADDR_2, 1); +# if defined(DRIVER_ADDR_3) + CKLED2001_update_led_control_registers(DRIVER_ADDR_3, 2); +# if defined(DRIVER_ADDR_4) + CKLED2001_update_led_control_registers(DRIVER_ADDR_4, 3); +# endif +# endif +# endif # endif } -# ifdef IS31FL3731 +# if defined(IS31FL3731) static void flush(void) { IS31FL3731_update_pwm_buffers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# if defined(DRIVER_ADDR_2) IS31FL3731_update_pwm_buffers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 +# if defined(DRIVER_ADDR_3) IS31FL3731_update_pwm_buffers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 +# if defined(DRIVER_ADDR_4) IS31FL3731_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +# endif # endif } @@ -137,17 +179,18 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3731_set_color, .set_color_all = IS31FL3731_set_color_all, }; + # elif defined(IS31FL3733) static void flush(void) { IS31FL3733_update_pwm_buffers(DRIVER_ADDR_1, 0); -# ifdef DRIVER_ADDR_2 +# if defined(DRIVER_ADDR_2) IS31FL3733_update_pwm_buffers(DRIVER_ADDR_2, 1); -# endif -# ifdef DRIVER_ADDR_3 +# if defined(DRIVER_ADDR_3) IS31FL3733_update_pwm_buffers(DRIVER_ADDR_3, 2); -# endif -# ifdef DRIVER_ADDR_4 +# if defined(DRIVER_ADDR_4) IS31FL3733_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +# endif # endif } @@ -157,10 +200,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3733_set_color, .set_color_all = IS31FL3733_set_color_all, }; + # elif defined(IS31FL3737) static void flush(void) { IS31FL3737_update_pwm_buffers(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility +# if defined(DRIVER_ADDR_2) IS31FL3737_update_pwm_buffers(DRIVER_ADDR_2, 1); # endif } @@ -171,10 +215,11 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3737_set_color, .set_color_all = IS31FL3737_set_color_all, }; -# else + +# elif defined(IS31FL3741) static void flush(void) { IS31FL3741_update_pwm_buffers(DRIVER_ADDR_1, 0); -# if defined(DRIVER_ADDR_2) && (DRIVER_ADDR_2 != DRIVER_ADDR_1) // provides backward compatibility +# if defined(DRIVER_ADDR_2) IS31FL3741_update_pwm_buffers(DRIVER_ADDR_2, 1); # endif } @@ -185,21 +230,44 @@ const rgb_matrix_driver_t rgb_matrix_driver = { .set_color = IS31FL3741_set_color, .set_color_all = IS31FL3741_set_color_all, }; + +# elif defined(CKLED2001) +static void flush(void) { + CKLED2001_update_pwm_buffers(DRIVER_ADDR_1, 0); +# if defined(DRIVER_ADDR_2) + CKLED2001_update_pwm_buffers(DRIVER_ADDR_2, 1); +# if defined(DRIVER_ADDR_3) + CKLED2001_update_pwm_buffers(DRIVER_ADDR_3, 2); +# if defined(DRIVER_ADDR_4) + CKLED2001_update_pwm_buffers(DRIVER_ADDR_4, 3); +# endif +# endif +# endif +} + +const rgb_matrix_driver_t rgb_matrix_driver = { + .init = init, + .flush = flush, + .set_color = CKLED2001_set_color, + .set_color_all = CKLED2001_set_color_all, +}; # endif #elif defined(AW20216) # include "spi_master.h" + static void init(void) { spi_init(); + AW20216_init(DRIVER_1_CS, DRIVER_1_EN); -# ifdef DRIVER_2_CS +# if defined(DRIVER_2_CS) AW20216_init(DRIVER_2_CS, DRIVER_2_EN); # endif } static void flush(void) { AW20216_update_pwm_buffers(DRIVER_1_CS, 0); -# ifdef DRIVER_2_CS +# if defined(DRIVER_2_CS) AW20216_update_pwm_buffers(DRIVER_2_CS, 1); # endif } @@ -229,6 +297,14 @@ static void flush(void) { // Set an led in the buffer to a color static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { +# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_SPLIT) + const uint8_t k_rgb_matrix_split[2] = RGB_MATRIX_SPLIT; + if (!is_keyboard_left() && (i >= k_rgb_matrix_split[0])) { + i -= k_rgb_matrix_split[0]; + } else if (is_keyboard_left() && (i >= k_rgb_matrix_split[0])) + return; +# endif + rgb_matrix_ws2812_array[i].r = r; rgb_matrix_ws2812_array[i].g = g; rgb_matrix_ws2812_array[i].b = b; diff --git a/quantum/rgb_matrix/rgb_matrix_legacy_enables.h b/quantum/rgb_matrix/rgb_matrix_legacy_enables.h deleted file mode 100644 index 398858ebc8c..00000000000 --- a/quantum/rgb_matrix/rgb_matrix_legacy_enables.h +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright 2021 QMK - * - * 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/>. - */ - -// to-do: remove this - -#pragma once - -#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS -# define ENABLE_RGB_MATRIX_ALPHAS_MODS -#endif -#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN -#endif -#ifndef DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -#endif -#ifndef DISABLE_RGB_MATRIX_BREATHING -# define ENABLE_RGB_MATRIX_BREATHING -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_SAT -# define ENABLE_RGB_MATRIX_BAND_SAT -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_VAL -# define ENABLE_RGB_MATRIX_BAND_VAL -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#endif -#ifndef DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL -# define ENABLE_RGB_MATRIX_CYCLE_ALL -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL -#endif -#ifndef DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL -#endif -#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON -# define ENABLE_RGB_MATRIX_DUAL_BEACON -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define ENABLE_RGB_MATRIX_RAINBOW_BEACON -#endif -#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#endif -#ifndef DISABLE_RGB_MATRIX_RAINDROPS -# define ENABLE_RGB_MATRIX_RAINDROPS -#endif -#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#endif -#ifndef DISABLE_RGB_MATRIX_HUE_BREATHING -# define ENABLE_RGB_MATRIX_HUE_BREATHING -#endif -#ifndef DISABLE_RGB_MATRIX_HUE_PENDULUM -# define ENABLE_RGB_MATRIX_HUE_PENDULUM -#endif -#ifndef DISABLE_RGB_MATRIX_HUE_WAVE -# define ENABLE_RGB_MATRIX_HUE_WAVE -#endif -#ifndef DISABLE_RGB_MATRIX_PIXEL_RAIN -# define ENABLE_RGB_MATRIX_PIXEL_RAIN -#endif -#ifndef DISABLE_RGB_MATRIX_PIXEL_FLOW -# define ENABLE_RGB_MATRIX_PIXEL_FLOW -#endif -#ifndef DISABLE_RGB_MATRIX_PIXEL_FRACTAL -# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL -#endif -#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) -# ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define ENABLE_RGB_MATRIX_TYPING_HEATMAP -# endif -# ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define ENABLE_RGB_MATRIX_DIGITAL_RAIN -# endif -#endif -#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED) -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# endif -# ifndef DISABLE_RGB_MATRIX_SPLASH -# define ENABLE_RGB_MATRIX_SPLASH -# endif -# ifndef DISABLE_RGB_MATRIX_MULTISPLASH -# define ENABLE_RGB_MATRIX_MULTISPLASH -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_SPLASH -# define ENABLE_RGB_MATRIX_SOLID_SPLASH -# endif -# ifndef DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -# endif -#endif diff --git a/quantum/sequencer/tests/rules.mk b/quantum/sequencer/tests/rules.mk index 76c221cf92a..a3bbd80513c 100644 --- a/quantum/sequencer/tests/rules.mk +++ b/quantum/sequencer/tests/rules.mk @@ -1,5 +1,5 @@ # The letter case of these variables might seem odd. However: -# - it is consistent with the serial_link example that is used as a reference in the Unit Testing article (https://docs.qmk.fm/#/unit_testing?id=adding-tests-for-new-or-existing-features) +# - it is consistent with the example that is used as a reference in the Unit Testing article (https://docs.qmk.fm/#/unit_testing?id=adding-tests-for-new-or-existing-features) # - Neither `make test:sequencer` or `make test:SEQUENCER` work when using SCREAMING_SNAKE_CASE sequencer_DEFS := -DNO_DEBUG -DMIDI_MOCKED @@ -8,4 +8,4 @@ sequencer_SRC := \ $(QUANTUM_PATH)/sequencer/tests/midi_mock.c \ $(QUANTUM_PATH)/sequencer/tests/sequencer_tests.cpp \ $(QUANTUM_PATH)/sequencer/sequencer.c \ - $(TMK_PATH)/common/test/timer.c + $(PLATFORM_PATH)/$(PLATFORM_KEY)/timer.c diff --git a/quantum/serial_link/LICENSE b/quantum/serial_link/LICENSE deleted file mode 100644 index d13cc4b26a5..00000000000 --- a/quantum/serial_link/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -The MIT License (MIT) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/quantum/serial_link/README.md b/quantum/serial_link/README.md deleted file mode 100644 index 05871dbdf7e..00000000000 --- a/quantum/serial_link/README.md +++ /dev/null @@ -1 +0,0 @@ -# qmk_serial_link diff --git a/quantum/serial_link/protocol/byte_stuffer.c b/quantum/serial_link/protocol/byte_stuffer.c deleted file mode 100644 index d3a91d8286d..00000000000 --- a/quantum/serial_link/protocol/byte_stuffer.c +++ /dev/null @@ -1,135 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "serial_link/protocol/byte_stuffer.h" -#include "serial_link/protocol/frame_validator.h" -#include "serial_link/protocol/physical.h" -#include <stdbool.h> - -// This implements the "Consistent overhead byte stuffing protocol" -// https://en.wikipedia.org/wiki/Consistent_Overhead_Byte_Stuffing -// http://www.stuartcheshire.org/papers/COBSforToN.pdf - -typedef struct byte_stuffer_state { - uint16_t next_zero; - uint16_t data_pos; - bool long_frame; - uint8_t data[MAX_FRAME_SIZE]; -} byte_stuffer_state_t; - -static byte_stuffer_state_t states[NUM_LINKS]; - -void init_byte_stuffer_state(byte_stuffer_state_t* state) { - state->next_zero = 0; - state->data_pos = 0; - state->long_frame = false; -} - -void init_byte_stuffer(void) { - int i; - for (i = 0; i < NUM_LINKS; i++) { - init_byte_stuffer_state(&states[i]); - } -} - -void byte_stuffer_recv_byte(uint8_t link, uint8_t data) { - byte_stuffer_state_t* state = &states[link]; - // Start of a new frame - if (state->next_zero == 0) { - state->next_zero = data; - state->long_frame = data == 0xFF; - state->data_pos = 0; - return; - } - - state->next_zero--; - if (data == 0) { - if (state->next_zero == 0) { - // The frame is completed - if (state->data_pos > 0) { - validator_recv_frame(link, state->data, state->data_pos); - } - } else { - // The frame is invalid, so reset - init_byte_stuffer_state(state); - } - } else { - if (state->data_pos == MAX_FRAME_SIZE) { - // We exceeded our maximum frame size - // therefore there's nothing else to do than reset to a new frame - state->next_zero = data; - state->long_frame = data == 0xFF; - state->data_pos = 0; - } else if (state->next_zero == 0) { - if (state->long_frame) { - // This is part of a long frame, so continue - state->next_zero = data; - state->long_frame = data == 0xFF; - } else { - // Special case for zeroes - state->next_zero = data; - state->data[state->data_pos++] = 0; - } - } else { - state->data[state->data_pos++] = data; - } - } -} - -static void send_block(uint8_t link, uint8_t* start, uint8_t* end, uint8_t num_non_zero) { - send_data(link, &num_non_zero, 1); - if (end > start) { - send_data(link, start, end - start); - } -} - -void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size) { - const uint8_t zero = 0; - if (size > 0) { - uint16_t num_non_zero = 1; - uint8_t* end = data + size; - uint8_t* start = data; - while (data < end) { - if (num_non_zero == 0xFF) { - // There's more data after big non-zero block - // So send it, and start a new block - send_block(link, start, data, num_non_zero); - start = data; - num_non_zero = 1; - } else { - if (*data == 0) { - // A zero encountered, so send the block - send_block(link, start, data, num_non_zero); - start = data + 1; - num_non_zero = 1; - } else { - num_non_zero++; - } - ++data; - } - } - send_block(link, start, data, num_non_zero); - send_data(link, &zero, 1); - } -} diff --git a/quantum/serial_link/protocol/byte_stuffer.h b/quantum/serial_link/protocol/byte_stuffer.h deleted file mode 100644 index 397ed3baae1..00000000000 --- a/quantum/serial_link/protocol/byte_stuffer.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> - -#define MAX_FRAME_SIZE 1024 -#define NUM_LINKS 2 - -void init_byte_stuffer(void); -void byte_stuffer_recv_byte(uint8_t link, uint8_t data); -void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size); diff --git a/quantum/serial_link/protocol/frame_router.c b/quantum/serial_link/protocol/frame_router.c deleted file mode 100644 index 5292673700c..00000000000 --- a/quantum/serial_link/protocol/frame_router.c +++ /dev/null @@ -1,64 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "serial_link/protocol/frame_router.h" -#include "serial_link/protocol/transport.h" -#include "serial_link/protocol/frame_validator.h" - -static bool is_master; - -void router_set_master(bool master) { is_master = master; } - -void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size) { - if (is_master) { - if (link == DOWN_LINK) { - transport_recv_frame(data[size - 1], data, size - 1); - } - } else { - if (link == UP_LINK) { - if (data[size - 1] & 1) { - transport_recv_frame(0, data, size - 1); - } - data[size - 1] >>= 1; - validator_send_frame(DOWN_LINK, data, size); - } else { - data[size - 1]++; - validator_send_frame(UP_LINK, data, size); - } - } -} - -void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size) { - if (destination == 0) { - if (!is_master) { - data[size] = 1; - validator_send_frame(UP_LINK, data, size + 1); - } - } else { - if (is_master) { - data[size] = destination; - validator_send_frame(DOWN_LINK, data, size + 1); - } - } -} diff --git a/quantum/serial_link/protocol/frame_router.h b/quantum/serial_link/protocol/frame_router.h deleted file mode 100644 index 9325fe4eed9..00000000000 --- a/quantum/serial_link/protocol/frame_router.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> -#include <stdbool.h> - -#define UP_LINK 0 -#define DOWN_LINK 1 - -void router_set_master(bool master); -void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size); -void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size); diff --git a/quantum/serial_link/protocol/frame_validator.c b/quantum/serial_link/protocol/frame_validator.c deleted file mode 100644 index bc9136f70be..00000000000 --- a/quantum/serial_link/protocol/frame_validator.c +++ /dev/null @@ -1,57 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "serial_link/protocol/frame_validator.h" -#include "serial_link/protocol/frame_router.h" -#include "serial_link/protocol/byte_stuffer.h" -#include <string.h> - -const uint32_t poly8_lookup[256] = {0, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE, 0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7, 0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC, 0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5, 0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172, 0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B, 0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940, 0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59, 0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116, 0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F, 0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924, 0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D, - 0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A, 0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433, 0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818, 0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01, 0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E, 0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457, 0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C, 0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65, 0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2, 0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB, 0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0, 0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9, 0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086, 0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F, 0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4, 0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD, - 0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A, 0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683, 0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8, 0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1, 0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE, 0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7, 0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC, 0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5, 0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252, 0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B, 0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60, 0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79, 0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236, 0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F, 0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04, 0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D, - 0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A, 0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713, 0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38, 0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21, 0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E, 0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777, 0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C, 0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45, 0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2, 0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB, 0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0, 0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9, 0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6, 0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF, 0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94, 0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D}; - -static uint32_t crc32_byte(uint8_t* p, uint32_t bytelength) { - uint32_t crc = 0xffffffff; - while (bytelength-- != 0) crc = poly8_lookup[((uint8_t)crc ^ *(p++))] ^ (crc >> 8); - // return (~crc); also works - return (crc ^ 0xffffffff); -} - -void validator_recv_frame(uint8_t link, uint8_t* data, uint16_t size) { - if (size > 4) { - uint32_t frame_crc; - memcpy(&frame_crc, data + size - 4, 4); - uint32_t expected_crc = crc32_byte(data, size - 4); - if (frame_crc == expected_crc) { - route_incoming_frame(link, data, size - 4); - } - } -} - -void validator_send_frame(uint8_t link, uint8_t* data, uint16_t size) { - uint32_t crc = crc32_byte(data, size); - memcpy(data + size, &crc, 4); - byte_stuffer_send_frame(link, data, size + 4); -} diff --git a/quantum/serial_link/protocol/frame_validator.h b/quantum/serial_link/protocol/frame_validator.h deleted file mode 100644 index 0f78768a00f..00000000000 --- a/quantum/serial_link/protocol/frame_validator.h +++ /dev/null @@ -1,31 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> - -void validator_recv_frame(uint8_t link, uint8_t* data, uint16_t size); -// The buffer pointed to by the data needs 4 additional bytes -void validator_send_frame(uint8_t link, uint8_t* data, uint16_t size); diff --git a/quantum/serial_link/protocol/physical.h b/quantum/serial_link/protocol/physical.h deleted file mode 100644 index 399c9d1f764..00000000000 --- a/quantum/serial_link/protocol/physical.h +++ /dev/null @@ -1,27 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -void send_data(uint8_t link, const uint8_t* data, uint16_t size); diff --git a/quantum/serial_link/protocol/transport.c b/quantum/serial_link/protocol/transport.c deleted file mode 100644 index 73b8dc62e9e..00000000000 --- a/quantum/serial_link/protocol/transport.c +++ /dev/null @@ -1,121 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "serial_link/protocol/transport.h" -#include "serial_link/protocol/frame_router.h" -#include "serial_link/protocol/triple_buffered_object.h" -#include <string.h> - -#define MAX_REMOTE_OBJECTS 16 -static remote_object_t* remote_objects[MAX_REMOTE_OBJECTS]; -static uint32_t num_remote_objects = 0; - -void reinitialize_serial_link_transport(void) { num_remote_objects = 0; } - -void add_remote_objects(remote_object_t** _remote_objects, uint32_t _num_remote_objects) { - unsigned int i; - for (i = 0; i < _num_remote_objects; i++) { - remote_object_t* obj = _remote_objects[i]; - remote_objects[num_remote_objects++] = obj; - if (obj->object_type == MASTER_TO_ALL_SLAVES) { - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; - triple_buffer_init(tb); - uint8_t* start = obj->buffer + LOCAL_OBJECT_SIZE(obj->object_size); - tb = (triple_buffer_object_t*)start; - triple_buffer_init(tb); - } else if (obj->object_type == MASTER_TO_SINGLE_SLAVE) { - uint8_t* start = obj->buffer; - unsigned int j; - for (j = 0; j < NUM_SLAVES; j++) { - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; - triple_buffer_init(tb); - start += LOCAL_OBJECT_SIZE(obj->object_size); - } - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; - triple_buffer_init(tb); - } else { - uint8_t* start = obj->buffer; - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; - triple_buffer_init(tb); - start += LOCAL_OBJECT_SIZE(obj->object_size); - unsigned int j; - for (j = 0; j < NUM_SLAVES; j++) { - tb = (triple_buffer_object_t*)start; - triple_buffer_init(tb); - start += REMOTE_OBJECT_SIZE(obj->object_size); - } - } - } -} - -void transport_recv_frame(uint8_t from, uint8_t* data, uint16_t size) { - uint8_t id = data[size - 1]; - if (id < num_remote_objects) { - remote_object_t* obj = remote_objects[id]; - if (obj->object_size == size - 1) { - uint8_t* start; - if (obj->object_type == MASTER_TO_ALL_SLAVES) { - start = obj->buffer + LOCAL_OBJECT_SIZE(obj->object_size); - } else if (obj->object_type == SLAVE_TO_MASTER) { - start = obj->buffer + LOCAL_OBJECT_SIZE(obj->object_size); - start += (from - 1) * REMOTE_OBJECT_SIZE(obj->object_size); - } else { - start = obj->buffer + NUM_SLAVES * LOCAL_OBJECT_SIZE(obj->object_size); - } - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; - void* ptr = triple_buffer_begin_write_internal(obj->object_size, tb); - memcpy(ptr, data, size - 1); - triple_buffer_end_write_internal(tb); - } - } -} - -void update_transport(void) { - unsigned int i; - for (i = 0; i < num_remote_objects; i++) { - remote_object_t* obj = remote_objects[i]; - if (obj->object_type == MASTER_TO_ALL_SLAVES || obj->object_type == SLAVE_TO_MASTER) { - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; - uint8_t* ptr = (uint8_t*)triple_buffer_read_internal(obj->object_size + LOCAL_OBJECT_EXTRA, tb); - if (ptr) { - ptr[obj->object_size] = i; - uint8_t dest = obj->object_type == MASTER_TO_ALL_SLAVES ? 0xFF : 0; - router_send_frame(dest, ptr, obj->object_size + 1); - } - } else { - uint8_t* start = obj->buffer; - unsigned int j; - for (j = 0; j < NUM_SLAVES; j++) { - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; - uint8_t* ptr = (uint8_t*)triple_buffer_read_internal(obj->object_size + LOCAL_OBJECT_EXTRA, tb); - if (ptr) { - ptr[obj->object_size] = i; - uint8_t dest = j + 1; - router_send_frame(dest, ptr, obj->object_size + 1); - } - start += LOCAL_OBJECT_SIZE(obj->object_size); - } - } - } -} diff --git a/quantum/serial_link/protocol/transport.h b/quantum/serial_link/protocol/transport.h deleted file mode 100644 index 3ce0c9fe4e6..00000000000 --- a/quantum/serial_link/protocol/transport.h +++ /dev/null @@ -1,139 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include "serial_link/protocol/triple_buffered_object.h" -#include "serial_link/system/serial_link.h" - -#define NUM_SLAVES 8 -#define LOCAL_OBJECT_EXTRA 16 - -// master -> slave = 1 local(target all), 1 remote object -// slave -> master = 1 local(target 0), multiple remote objects -// master -> single slave (multiple local, target id), 1 remote object -typedef enum { - MASTER_TO_ALL_SLAVES, - MASTER_TO_SINGLE_SLAVE, - SLAVE_TO_MASTER, -} remote_object_type; - -typedef struct { - remote_object_type object_type; - uint16_t object_size; - uint8_t buffer[] __attribute__((aligned(4))); -} remote_object_t; - -#define REMOTE_OBJECT_SIZE(objectsize) (sizeof(triple_buffer_object_t) + objectsize * 3) -#define LOCAL_OBJECT_SIZE(objectsize) (sizeof(triple_buffer_object_t) + (objectsize + LOCAL_OBJECT_EXTRA) * 3) - -#define REMOTE_OBJECT_HELPER(name, type, num_local, num_remote) \ - typedef struct { \ - remote_object_t object; \ - uint8_t buffer[num_remote * REMOTE_OBJECT_SIZE(sizeof(type)) + num_local * LOCAL_OBJECT_SIZE(sizeof(type))]; \ - } remote_object_##name##_t; - -#define MASTER_TO_ALL_SLAVES_OBJECT(name, type) \ - REMOTE_OBJECT_HELPER(name, type, 1, 1) \ - remote_object_##name##_t remote_object_##name = {.object = { \ - .object_type = MASTER_TO_ALL_SLAVES, \ - .object_size = sizeof(type), \ - }}; \ - type* begin_write_##name(void) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; \ - return (type*)triple_buffer_begin_write_internal(sizeof(type) + LOCAL_OBJECT_EXTRA, tb); \ - } \ - void end_write_##name(void) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; \ - triple_buffer_end_write_internal(tb); \ - signal_data_written(); \ - } \ - type* read_##name(void) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - uint8_t* start = obj->buffer + LOCAL_OBJECT_SIZE(obj->object_size); \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; \ - return (type*)triple_buffer_read_internal(obj->object_size, tb); \ - } - -#define MASTER_TO_SINGLE_SLAVE_OBJECT(name, type) \ - REMOTE_OBJECT_HELPER(name, type, NUM_SLAVES, 1) \ - remote_object_##name##_t remote_object_##name = {.object = { \ - .object_type = MASTER_TO_SINGLE_SLAVE, \ - .object_size = sizeof(type), \ - }}; \ - type* begin_write_##name(uint8_t slave) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - uint8_t* start = obj->buffer; \ - start += slave * LOCAL_OBJECT_SIZE(obj->object_size); \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; \ - return (type*)triple_buffer_begin_write_internal(sizeof(type) + LOCAL_OBJECT_EXTRA, tb); \ - } \ - void end_write_##name(uint8_t slave) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - uint8_t* start = obj->buffer; \ - start += slave * LOCAL_OBJECT_SIZE(obj->object_size); \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; \ - triple_buffer_end_write_internal(tb); \ - signal_data_written(); \ - } \ - type* read_##name() { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - uint8_t* start = obj->buffer + NUM_SLAVES * LOCAL_OBJECT_SIZE(obj->object_size); \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; \ - return (type*)triple_buffer_read_internal(obj->object_size, tb); \ - } - -#define SLAVE_TO_MASTER_OBJECT(name, type) \ - REMOTE_OBJECT_HELPER(name, type, 1, NUM_SLAVES) \ - remote_object_##name##_t remote_object_##name = {.object = { \ - .object_type = SLAVE_TO_MASTER, \ - .object_size = sizeof(type), \ - }}; \ - type* begin_write_##name(void) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; \ - return (type*)triple_buffer_begin_write_internal(sizeof(type) + LOCAL_OBJECT_EXTRA, tb); \ - } \ - void end_write_##name(void) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)obj->buffer; \ - triple_buffer_end_write_internal(tb); \ - signal_data_written(); \ - } \ - type* read_##name(uint8_t slave) { \ - remote_object_t* obj = (remote_object_t*)&remote_object_##name; \ - uint8_t* start = obj->buffer + LOCAL_OBJECT_SIZE(obj->object_size); \ - start += slave * REMOTE_OBJECT_SIZE(obj->object_size); \ - triple_buffer_object_t* tb = (triple_buffer_object_t*)start; \ - return (type*)triple_buffer_read_internal(obj->object_size, tb); \ - } - -#define REMOTE_OBJECT(name) (remote_object_t*)&remote_object_##name - -void add_remote_objects(remote_object_t** remote_objects, uint32_t num_remote_objects); -void reinitialize_serial_link_transport(void); -void transport_recv_frame(uint8_t from, uint8_t* data, uint16_t size); -void update_transport(void); diff --git a/quantum/serial_link/protocol/triple_buffered_object.c b/quantum/serial_link/protocol/triple_buffered_object.c deleted file mode 100644 index e0c6d702a54..00000000000 --- a/quantum/serial_link/protocol/triple_buffered_object.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "serial_link/protocol/triple_buffered_object.h" -#include "serial_link/system/serial_link.h" -#include <stdbool.h> -#include <stddef.h> - -#define GET_READ_INDEX() object->state & 3 -#define GET_WRITE_INDEX() (object->state >> 2) & 3 -#define GET_SHARED_INDEX() (object->state >> 4) & 3 -#define GET_DATA_AVAILABLE() (object->state >> 6) & 1 - -#define SET_READ_INDEX(i) object->state = ((object->state & ~3) | i) -#define SET_WRITE_INDEX(i) object->state = ((object->state & ~(3 << 2)) | (i << 2)) -#define SET_SHARED_INDEX(i) object->state = ((object->state & ~(3 << 4)) | (i << 4)) -#define SET_DATA_AVAILABLE(i) object->state = ((object->state & ~(1 << 6)) | (i << 6)) - -void triple_buffer_init(triple_buffer_object_t* object) { - object->state = 0; - SET_WRITE_INDEX(0); - SET_READ_INDEX(1); - SET_SHARED_INDEX(2); - SET_DATA_AVAILABLE(0); -} - -void* triple_buffer_read_internal(uint16_t object_size, triple_buffer_object_t* object) { - serial_link_lock(); - if (GET_DATA_AVAILABLE()) { - uint8_t shared_index = GET_SHARED_INDEX(); - uint8_t read_index = GET_READ_INDEX(); - SET_READ_INDEX(shared_index); - SET_SHARED_INDEX(read_index); - SET_DATA_AVAILABLE(false); - serial_link_unlock(); - return object->buffer + object_size * shared_index; - } else { - serial_link_unlock(); - return NULL; - } -} - -void* triple_buffer_begin_write_internal(uint16_t object_size, triple_buffer_object_t* object) { - uint8_t write_index = GET_WRITE_INDEX(); - return object->buffer + object_size * write_index; -} - -void triple_buffer_end_write_internal(triple_buffer_object_t* object) { - serial_link_lock(); - uint8_t shared_index = GET_SHARED_INDEX(); - uint8_t write_index = GET_WRITE_INDEX(); - SET_SHARED_INDEX(write_index); - SET_WRITE_INDEX(shared_index); - SET_DATA_AVAILABLE(true); - serial_link_unlock(); -} diff --git a/quantum/serial_link/protocol/triple_buffered_object.h b/quantum/serial_link/protocol/triple_buffered_object.h deleted file mode 100644 index 717d6d7b8be..00000000000 --- a/quantum/serial_link/protocol/triple_buffered_object.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> - -typedef struct { - uint8_t state; - uint8_t buffer[] __attribute__((aligned(4))); -} triple_buffer_object_t; - -void triple_buffer_init(triple_buffer_object_t* object); - -#define triple_buffer_begin_write(object) (typeof(*object.buffer[0])*)triple_buffer_begin_write_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) - -#define triple_buffer_end_write(object) triple_buffer_end_write_internal((triple_buffer_object_t*)object) - -#define triple_buffer_read(object) (typeof(*object.buffer[0])*)triple_buffer_read_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) - -void* triple_buffer_begin_write_internal(uint16_t object_size, triple_buffer_object_t* object); -void triple_buffer_end_write_internal(triple_buffer_object_t* object); -void* triple_buffer_read_internal(uint16_t object_size, triple_buffer_object_t* object); diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c deleted file mode 100644 index 6363f8ff3ba..00000000000 --- a/quantum/serial_link/system/serial_link.c +++ /dev/null @@ -1,250 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ -#include "report.h" -#include "host_driver.h" -#include "serial_link/system/serial_link.h" -#include <hal.h> -#include "serial_link/protocol/byte_stuffer.h" -#include "serial_link/protocol/transport.h" -#include "serial_link/protocol/frame_router.h" -#include "matrix.h" -#include "sync_timer.h" -#include <stdbool.h> -#include "print.h" -#include "config.h" - -#define SYNC_TIMER_OFFSET 2 - -static event_source_t new_data_event; -static bool serial_link_connected; -static bool is_master = false; - -static uint8_t keyboard_leds(void); -static void send_keyboard(report_keyboard_t* report); -static void send_mouse(report_mouse_t* report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); - -host_driver_t serial_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; - -// Define these in your Config.h file -#ifndef SERIAL_LINK_BAUD -# error "Serial link baud is not set" -#endif - -#ifndef SERIAL_LINK_THREAD_PRIORITY -# error "Serial link thread priority not set" -#endif - -static SerialConfig config = {.sc_speed = SERIAL_LINK_BAUD}; - -//#define DEBUG_LINK_ERRORS - -static uint32_t read_from_serial(SerialDriver* driver, uint8_t link) { - const uint32_t buffer_size = 16; - uint8_t buffer[buffer_size]; - uint32_t bytes_read = sdAsynchronousRead(driver, buffer, buffer_size); - uint8_t* current = buffer; - uint8_t* end = current + bytes_read; - while (current < end) { - byte_stuffer_recv_byte(link, *current); - current++; - } - return bytes_read; -} - -static void print_error(char* str, eventflags_t flags, SerialDriver* driver) { -#ifdef DEBUG_LINK_ERRORS - if (flags & SD_PARITY_ERROR) { - print(str); - print(" Parity error\n"); - } - if (flags & SD_FRAMING_ERROR) { - print(str); - print(" Framing error\n"); - } - if (flags & SD_OVERRUN_ERROR) { - print(str); - uint32_t size = qSpaceI(&(driver->iqueue)); - xprintf(" Overrun error, queue size %d\n", size); - } - if (flags & SD_NOISE_ERROR) { - print(str); - print(" Noise error\n"); - } - if (flags & SD_BREAK_DETECTED) { - print(str); - print(" Break detected\n"); - } -#else - (void)str; - (void)flags; - (void)driver; -#endif -} - -bool is_serial_link_master(void) { return is_master; } - -// TODO: Optimize the stack size, this is probably way too big -static THD_WORKING_AREA(serialThreadStack, 1024); -static THD_FUNCTION(serialThread, arg) { - (void)arg; - event_listener_t new_data_listener; - event_listener_t sd1_listener; - event_listener_t sd2_listener; - chEvtRegister(&new_data_event, &new_data_listener, 0); - eventflags_t events = CHN_INPUT_AVAILABLE | SD_PARITY_ERROR | SD_FRAMING_ERROR | SD_OVERRUN_ERROR | SD_NOISE_ERROR | SD_BREAK_DETECTED; - chEvtRegisterMaskWithFlags(chnGetEventSource(&SD1), &sd1_listener, EVENT_MASK(1), events); - chEvtRegisterMaskWithFlags(chnGetEventSource(&SD2), &sd2_listener, EVENT_MASK(2), events); - bool need_wait = false; - while (true) { - eventflags_t flags1 = 0; - eventflags_t flags2 = 0; - if (need_wait) { - eventmask_t mask = chEvtWaitAnyTimeout(ALL_EVENTS, TIME_MS2I(1000)); - if (mask & EVENT_MASK(1)) { - flags1 = chEvtGetAndClearFlags(&sd1_listener); - print_error("DOWNLINK", flags1, &SD1); - } - if (mask & EVENT_MASK(2)) { - flags2 = chEvtGetAndClearFlags(&sd2_listener); - print_error("UPLINK", flags2, &SD2); - } - } - - // Always stay as master, even if the USB goes into sleep mode - is_master |= usbGetDriverStateI(&USBD1) == USB_ACTIVE; - router_set_master(is_master); - - need_wait = true; - need_wait &= read_from_serial(&SD2, UP_LINK) == 0; - need_wait &= read_from_serial(&SD1, DOWN_LINK) == 0; - update_transport(); - } -} - -void send_data(uint8_t link, const uint8_t* data, uint16_t size) { - if (link == DOWN_LINK) { - sdWrite(&SD1, data, size); - } else { - sdWrite(&SD2, data, size); - } -} - -static systime_t last_update = 0; - -typedef struct { - matrix_row_t rows[MATRIX_ROWS]; -} matrix_object_t; - -static matrix_object_t last_matrix = {}; - -SLAVE_TO_MASTER_OBJECT(keyboard_matrix, matrix_object_t); -MASTER_TO_ALL_SLAVES_OBJECT(serial_link_connected, bool); -#ifndef DISABLE_SYNC_TIMER -MASTER_TO_ALL_SLAVES_OBJECT(sync_timer, uint32_t); -#endif - -static remote_object_t* remote_objects[] = { - REMOTE_OBJECT(serial_link_connected), - REMOTE_OBJECT(keyboard_matrix), -#ifndef DISABLE_SYNC_TIMER - REMOTE_OBJECT(sync_timer), -#endif -}; - -void init_serial_link(void) { - serial_link_connected = false; - init_serial_link_hal(); - add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); - init_byte_stuffer(); - sdStart(&SD1, &config); - sdStart(&SD2, &config); - chEvtObjectInit(&new_data_event); - (void)chThdCreateStatic(serialThreadStack, sizeof(serialThreadStack), SERIAL_LINK_THREAD_PRIORITY, serialThread, NULL); -} - -void matrix_set_remote(matrix_row_t* rows, uint8_t index); - -void serial_link_update(void) { - if (read_serial_link_connected()) { - serial_link_connected = true; - } - - matrix_object_t matrix; - bool changed = false; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix.rows[i] = matrix_get_row(i); - changed |= matrix.rows[i] != last_matrix.rows[i]; - } - - systime_t current_time = chVTGetSystemTimeX(); - systime_t delta = current_time - last_update; - if (changed || delta > TIME_US2I(5000)) { - last_update = current_time; - last_matrix = matrix; - matrix_object_t* m = begin_write_keyboard_matrix(); - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - m->rows[i] = matrix.rows[i]; - } - end_write_keyboard_matrix(); - - *begin_write_serial_link_connected() = true; - end_write_serial_link_connected(); - -#ifndef DISABLE_SYNC_TIMER - *begin_write_sync_timer() = sync_timer_read32() + SYNC_TIMER_OFFSET; - end_write_sync_timer(); -#endif - } - - matrix_object_t* m = read_keyboard_matrix(0); - if (m) { - matrix_set_remote(m->rows, 0); - } - -#ifndef DISABLE_SYNC_TIMER - uint32_t* t = read_sync_timer(); - if (t) { - sync_timer_update(*t); - } -#endif -} - -void signal_data_written(void) { chEvtBroadcast(&new_data_event); } - -bool is_serial_link_connected(void) { return serial_link_connected; } - -host_driver_t* get_serial_link_driver(void) { return &serial_driver; } - -// NOTE: The driver does nothing, because the master handles everything -uint8_t keyboard_leds(void) { return 0; } - -void send_keyboard(report_keyboard_t* report) { (void)report; } - -void send_mouse(report_mouse_t* report) { (void)report; } - -void send_system(uint16_t data) { (void)data; } - -void send_consumer(uint16_t data) { (void)data; } diff --git a/quantum/serial_link/system/serial_link.h b/quantum/serial_link/system/serial_link.h deleted file mode 100644 index adc1f6e93d0..00000000000 --- a/quantum/serial_link/system/serial_link.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include "host_driver.h" -#include <stdbool.h> - -void init_serial_link(void); -void init_serial_link_hal(void); -bool is_serial_link_connected(void); -bool is_serial_link_master(void); -host_driver_t* get_serial_link_driver(void); -void serial_link_update(void); - -#if defined(PROTOCOL_CHIBIOS) -# include <ch.h> - -static inline void serial_link_lock(void) { chSysLock(); } - -static inline void serial_link_unlock(void) { chSysUnlock(); } - -void signal_data_written(void); - -#else - -inline void serial_link_lock(void) {} - -inline void serial_link_unlock(void) {} - -void signal_data_written(void); - -#endif diff --git a/quantum/serial_link/tests/Makefile b/quantum/serial_link/tests/Makefile deleted file mode 100644 index 11dd355b227..00000000000 --- a/quantum/serial_link/tests/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016 Fred Sundvik -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -CC = gcc -CFLAGS = -INCLUDES = -I. -I../../ -LDFLAGS = -L$(BUILDDIR)/cgreen/build-c/src -shared -LDLIBS = -lcgreen -UNITOBJ = $(BUILDDIR)/serialtest/unitobj -DEPDIR = $(BUILDDIR)/serialtest/unit.d -UNITTESTS = $(BUILDDIR)/serialtest/unittests -DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Td -EXT = .so -UNAME := $(shell uname) -ifneq (, $(findstring MINGW, $(UNAME))) - EXT = .dll -endif -ifneq (, $(findstring CYGWIN, $(UNAME))) - EXT = .dll -endif - -SRC = $(wildcard *.c) -TESTFILES = $(patsubst %.c, $(UNITTESTS)/%$(EXT), $(SRC)) -$(shell mkdir -p $(DEPDIR) >/dev/null) - -test: $(TESTFILES) - @$(BUILDDIR)/cgreen/build-c/tools/cgreen-runner --color $(TESTFILES) - -$(UNITTESTS)/%$(EXT): $(UNITOBJ)/%.o - @mkdir -p $(UNITTESTS) - $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) - -$(UNITOBJ)/%.o : %.c -$(UNITOBJ)/%.o: %.c $(DEPDIR)/%.d - @mkdir -p $(UNITOBJ) - $(CC) $(CFLAGS) $(DEPFLAGS) $(INCLUDES) -c $< -o $@ - @mv -f $(DEPDIR)/$*.Td $(DEPDIR)/$*.d - -$(DEPDIR)/%.d: ; -.PRECIOUS: $(DEPDIR)/%.d - --include $(patsubst %,$(DEPDIR)/%.d,$(basename $(SRC))) diff --git a/quantum/serial_link/tests/byte_stuffer_tests.cpp b/quantum/serial_link/tests/byte_stuffer_tests.cpp deleted file mode 100644 index 9e4e1768f4f..00000000000 --- a/quantum/serial_link/tests/byte_stuffer_tests.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include <vector> -#include <algorithm> -extern "C" { -#include "serial_link/protocol/byte_stuffer.h" -#include "serial_link/protocol/frame_validator.h" -#include "serial_link/protocol/physical.h" -} - -using testing::_; -using testing::Args; -using testing::ElementsAreArray; - -class ByteStuffer : public ::testing::Test { - public: - ByteStuffer() { - Instance = this; - init_byte_stuffer(); - } - - ~ByteStuffer() { Instance = nullptr; } - - MOCK_METHOD3(validator_recv_frame, void(uint8_t link, uint8_t* data, uint16_t size)); - - void send_data(uint8_t link, const uint8_t* data, uint16_t size) { std::copy(data, data + size, std::back_inserter(sent_data)); } - std::vector<uint8_t> sent_data; - - static ByteStuffer* Instance; -}; - -ByteStuffer* ByteStuffer::Instance = nullptr; - -extern "C" { -void validator_recv_frame(uint8_t link, uint8_t* data, uint16_t size) { ByteStuffer::Instance->validator_recv_frame(link, data, size); } - -void send_data(uint8_t link, const uint8_t* data, uint16_t size) { ByteStuffer::Instance->send_data(link, data, size); } -} - -TEST_F(ByteStuffer, receives_no_frame_for_a_single_zero_byte) { - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).Times(0); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_no_frame_for_a_single_FF_byte) { - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).Times(0); - byte_stuffer_recv_byte(0, 0xFF); -} - -TEST_F(ByteStuffer, receives_no_frame_for_a_single_random_byte) { - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).Times(0); - byte_stuffer_recv_byte(0, 0x4A); -} - -TEST_F(ByteStuffer, receives_no_frame_for_a_zero_length_frame) { - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).Times(0); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_single_byte_valid_frame) { - uint8_t expected[] = {0x37}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 0x37); - byte_stuffer_recv_byte(0, 0); -} -TEST_F(ByteStuffer, receives_three_bytes_valid_frame) { - uint8_t expected[] = {0x37, 0x99, 0xFF}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 4); - byte_stuffer_recv_byte(0, 0x37); - byte_stuffer_recv_byte(0, 0x99); - byte_stuffer_recv_byte(0, 0xFF); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_single_zero_valid_frame) { - uint8_t expected[] = {0}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_valid_frame_with_zeroes) { - uint8_t expected[] = {5, 0, 3, 0}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 5); - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 3); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_two_valid_frames) { - uint8_t expected1[] = {5, 0}; - uint8_t expected2[] = {3}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected1))); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected2))); - byte_stuffer_recv_byte(1, 2); - byte_stuffer_recv_byte(1, 5); - byte_stuffer_recv_byte(1, 1); - byte_stuffer_recv_byte(1, 0); - byte_stuffer_recv_byte(1, 2); - byte_stuffer_recv_byte(1, 3); - byte_stuffer_recv_byte(1, 0); -} - -TEST_F(ByteStuffer, receives_valid_frame_after_unexpected_zero) { - uint8_t expected[] = {5, 7}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(1, 3); - byte_stuffer_recv_byte(1, 1); - byte_stuffer_recv_byte(1, 0); - byte_stuffer_recv_byte(1, 3); - byte_stuffer_recv_byte(1, 5); - byte_stuffer_recv_byte(1, 7); - byte_stuffer_recv_byte(1, 0); -} - -TEST_F(ByteStuffer, receives_valid_frame_after_unexpected_non_zero) { - uint8_t expected[] = {5, 7}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 9); - byte_stuffer_recv_byte(0, 4); // This should have been zero - byte_stuffer_recv_byte(0, 0); - byte_stuffer_recv_byte(0, 3); - byte_stuffer_recv_byte(0, 5); - byte_stuffer_recv_byte(0, 7); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_a_valid_frame_with_over254_non_zeroes_and_then_end_of_frame) { - uint8_t expected[254]; - int i; - for (i = 0; i < 254; i++) { - expected[i] = i + 1; - } - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 0xFF); - for (i = 0; i < 254; i++) { - byte_stuffer_recv_byte(0, i + 1); - } - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_a_valid_frame_with_over254_non_zeroes_next_byte_is_non_zero) { - uint8_t expected[255]; - int i; - for (i = 0; i < 254; i++) { - expected[i] = i + 1; - } - expected[254] = 7; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 0xFF); - for (i = 0; i < 254; i++) { - byte_stuffer_recv_byte(0, i + 1); - } - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 7); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_a_valid_frame_with_over254_non_zeroes_next_byte_is_zero) { - uint8_t expected[255]; - int i; - for (i = 0; i < 254; i++) { - expected[i] = i + 1; - } - expected[254] = 0; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 0xFF); - for (i = 0; i < 254; i++) { - byte_stuffer_recv_byte(0, i + 1); - } - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_two_long_frames_and_some_more) { - uint8_t expected[515]; - int i; - int j; - for (j = 0; j < 2; j++) { - for (i = 0; i < 254; i++) { - expected[i + 254 * j] = i + 1; - } - } - for (i = 0; i < 7; i++) { - expected[254 * 2 + i] = i + 1; - } - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - byte_stuffer_recv_byte(0, 0xFF); - for (i = 0; i < 254; i++) { - byte_stuffer_recv_byte(0, i + 1); - } - byte_stuffer_recv_byte(0, 0xFF); - for (i = 0; i < 254; i++) { - byte_stuffer_recv_byte(0, i + 1); - } - byte_stuffer_recv_byte(0, 8); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 3); - byte_stuffer_recv_byte(0, 4); - byte_stuffer_recv_byte(0, 5); - byte_stuffer_recv_byte(0, 6); - byte_stuffer_recv_byte(0, 7); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, receives_an_all_zeros_frame_that_is_maximum_size) { - uint8_t expected[MAX_FRAME_SIZE] = {}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - int i; - byte_stuffer_recv_byte(0, 1); - for (i = 0; i < MAX_FRAME_SIZE; i++) { - byte_stuffer_recv_byte(0, 1); - } - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, doesnt_recv_a_frame_thats_too_long_all_zeroes) { - uint8_t expected[1] = {0}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).Times(0); - int i; - byte_stuffer_recv_byte(0, 1); - for (i = 0; i < MAX_FRAME_SIZE; i++) { - byte_stuffer_recv_byte(0, 1); - } - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, received_frame_is_aborted_when_its_too_long) { - uint8_t expected[1] = {1}; - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - int i; - byte_stuffer_recv_byte(0, 1); - for (i = 0; i < MAX_FRAME_SIZE; i++) { - byte_stuffer_recv_byte(0, 1); - } - byte_stuffer_recv_byte(0, 2); - byte_stuffer_recv_byte(0, 1); - byte_stuffer_recv_byte(0, 0); -} - -TEST_F(ByteStuffer, does_nothing_when_sending_zero_size_frame) { - EXPECT_EQ(sent_data.size(), 0); - byte_stuffer_send_frame(0, NULL, 0); -} - -TEST_F(ByteStuffer, send_one_byte_frame) { - uint8_t data[] = {5}; - byte_stuffer_send_frame(1, data, 1); - uint8_t expected[] = {2, 5, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_two_byte_frame) { - uint8_t data[] = {5, 0x77}; - byte_stuffer_send_frame(0, data, 2); - uint8_t expected[] = {3, 5, 0x77, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_one_byte_frame_with_zero) { - uint8_t data[] = {0}; - byte_stuffer_send_frame(0, data, 1); - uint8_t expected[] = {1, 1, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_two_byte_frame_starting_with_zero) { - uint8_t data[] = {0, 9}; - byte_stuffer_send_frame(1, data, 2); - uint8_t expected[] = {1, 2, 9, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_two_byte_frame_starting_with_non_zero) { - uint8_t data[] = {9, 0}; - byte_stuffer_send_frame(1, data, 2); - uint8_t expected[] = {2, 9, 1, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_three_byte_frame_zero_in_the_middle) { - uint8_t data[] = {9, 0, 0x68}; - byte_stuffer_send_frame(0, data, 3); - uint8_t expected[] = {2, 9, 2, 0x68, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_three_byte_frame_data_in_the_middle) { - uint8_t data[] = {0, 0x55, 0}; - byte_stuffer_send_frame(0, data, 3); - uint8_t expected[] = {1, 2, 0x55, 1, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_three_byte_frame_with_all_zeroes) { - uint8_t data[] = {0, 0, 0}; - byte_stuffer_send_frame(0, data, 3); - uint8_t expected[] = {1, 1, 1, 1, 0}; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_frame_with_254_non_zeroes) { - uint8_t data[254]; - int i; - for (i = 0; i < 254; i++) { - data[i] = i + 1; - } - byte_stuffer_send_frame(0, data, 254); - uint8_t expected[256]; - expected[0] = 0xFF; - for (i = 1; i < 255; i++) { - expected[i] = i; - } - expected[255] = 0; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_frame_with_255_non_zeroes) { - uint8_t data[255]; - int i; - for (i = 0; i < 255; i++) { - data[i] = i + 1; - } - byte_stuffer_send_frame(0, data, 255); - uint8_t expected[258]; - expected[0] = 0xFF; - for (i = 1; i < 255; i++) { - expected[i] = i; - } - expected[255] = 2; - expected[256] = 255; - expected[257] = 0; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_frame_with_254_non_zeroes_followed_by_zero) { - uint8_t data[255]; - int i; - for (i = 0; i < 254; i++) { - data[i] = i + 1; - } - data[254] = 0; - byte_stuffer_send_frame(0, data, 255); - uint8_t expected[258]; - expected[0] = 0xFF; - for (i = 1; i < 255; i++) { - expected[i] = i; - } - expected[255] = 1; - expected[256] = 1; - expected[257] = 0; - EXPECT_THAT(sent_data, ElementsAreArray(expected)); -} - -TEST_F(ByteStuffer, sends_and_receives_full_roundtrip_small_packet) { - uint8_t original_data[] = {1, 2, 3}; - byte_stuffer_send_frame(0, original_data, sizeof(original_data)); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(original_data))); - int i; - for (auto& d : sent_data) { - byte_stuffer_recv_byte(1, d); - } -} - -TEST_F(ByteStuffer, sends_and_receives_full_roundtrip_small_packet_with_zeros) { - uint8_t original_data[] = {1, 0, 3, 0, 0, 9}; - byte_stuffer_send_frame(1, original_data, sizeof(original_data)); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(original_data))); - int i; - for (auto& d : sent_data) { - byte_stuffer_recv_byte(1, d); - } -} - -TEST_F(ByteStuffer, sends_and_receives_full_roundtrip_254_bytes) { - uint8_t original_data[254]; - int i; - for (i = 0; i < 254; i++) { - original_data[i] = i + 1; - } - byte_stuffer_send_frame(0, original_data, sizeof(original_data)); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(original_data))); - for (auto& d : sent_data) { - byte_stuffer_recv_byte(1, d); - } -} - -TEST_F(ByteStuffer, sends_and_receives_full_roundtrip_256_bytes) { - uint8_t original_data[256]; - int i; - for (i = 0; i < 254; i++) { - original_data[i] = i + 1; - } - original_data[254] = 22; - original_data[255] = 23; - byte_stuffer_send_frame(0, original_data, sizeof(original_data)); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(original_data))); - for (auto& d : sent_data) { - byte_stuffer_recv_byte(1, d); - } -} - -TEST_F(ByteStuffer, sends_and_receives_full_roundtrip_254_bytes_and_then_zero) { - uint8_t original_data[255]; - int i; - for (i = 0; i < 254; i++) { - original_data[i] = i + 1; - } - original_data[254] = 0; - byte_stuffer_send_frame(0, original_data, sizeof(original_data)); - EXPECT_CALL(*this, validator_recv_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(original_data))); - for (auto& d : sent_data) { - byte_stuffer_recv_byte(1, d); - } -} diff --git a/quantum/serial_link/tests/frame_router_tests.cpp b/quantum/serial_link/tests/frame_router_tests.cpp deleted file mode 100644 index f76dfb33d6e..00000000000 --- a/quantum/serial_link/tests/frame_router_tests.cpp +++ /dev/null @@ -1,204 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "gtest/gtest.h" -#include "gmock/gmock.h" -#include <array> -extern "C" { -#include "serial_link/protocol/transport.h" -#include "serial_link/protocol/byte_stuffer.h" -#include "serial_link/protocol/frame_router.h" -} - -using testing::_; -using testing::Args; -using testing::ElementsAreArray; - -class FrameRouter : public testing::Test { - public: - FrameRouter() : current_router_buffer(nullptr) { - Instance = this; - init_byte_stuffer(); - } - - ~FrameRouter() { Instance = nullptr; } - - void send_data(uint8_t link, const uint8_t* data, uint16_t size) { - auto& buffer = current_router_buffer->send_buffers[link]; - std::copy(data, data + size, std::back_inserter(buffer)); - } - - void receive_data(uint8_t link, uint8_t* data, uint16_t size) { - int i; - for (i = 0; i < size; i++) { - byte_stuffer_recv_byte(link, data[i]); - } - } - - void activate_router(uint8_t num) { - current_router_buffer = router_buffers + num; - router_set_master(num == 0); - } - - void simulate_transport(uint8_t from, uint8_t to) { - activate_router(to); - if (from > to) { - receive_data(DOWN_LINK, router_buffers[from].send_buffers[UP_LINK].data(), router_buffers[from].send_buffers[UP_LINK].size()); - } else if (to > from) { - receive_data(UP_LINK, router_buffers[from].send_buffers[DOWN_LINK].data(), router_buffers[from].send_buffers[DOWN_LINK].size()); - } - } - - MOCK_METHOD3(transport_recv_frame, void(uint8_t from, uint8_t* data, uint16_t size)); - - std::vector<uint8_t> received_data; - - struct router_buffer { - std::vector<uint8_t> send_buffers[2]; - }; - - router_buffer router_buffers[8]; - router_buffer* current_router_buffer; - - static FrameRouter* Instance; -}; - -FrameRouter* FrameRouter::Instance = nullptr; - -typedef struct { - std::array<uint8_t, 4> data; - uint8_t extra[16]; -} frame_buffer_t; - -extern "C" { -void send_data(uint8_t link, const uint8_t* data, uint16_t size) { FrameRouter::Instance->send_data(link, data, size); } - -void transport_recv_frame(uint8_t from, uint8_t* data, uint16_t size) { FrameRouter::Instance->transport_recv_frame(from, data, size); } -} - -TEST_F(FrameRouter, master_broadcast_is_received_by_everyone) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(0); - router_send_frame(0xFF, (uint8_t*)&data, 4); - EXPECT_GT(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); - EXPECT_CALL(*this, transport_recv_frame(0, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(0, 1); - EXPECT_GT(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[UP_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(0, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(1, 2); - EXPECT_GT(router_buffers[2].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[2].send_buffers[UP_LINK].size(), 0); -} - -TEST_F(FrameRouter, master_send_is_received_by_targets) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(0); - router_send_frame((1 << 1) | (1 << 2), (uint8_t*)&data, 4); - EXPECT_GT(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); - - simulate_transport(0, 1); - EXPECT_GT(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[UP_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(0, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(1, 2); - EXPECT_GT(router_buffers[2].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[2].send_buffers[UP_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(0, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(2, 3); - EXPECT_GT(router_buffers[3].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[3].send_buffers[UP_LINK].size(), 0); -} - -TEST_F(FrameRouter, first_link_sends_to_master) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(1); - router_send_frame(0, (uint8_t*)&data, 4); - EXPECT_GT(router_buffers[1].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(1, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(1, 0); - EXPECT_EQ(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); -} - -TEST_F(FrameRouter, second_link_sends_to_master) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(2); - router_send_frame(0, (uint8_t*)&data, 4); - EXPECT_GT(router_buffers[2].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[2].send_buffers[DOWN_LINK].size(), 0); - - simulate_transport(2, 1); - EXPECT_GT(router_buffers[1].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(2, _, _)).With(Args<1, 2>(ElementsAreArray(data.data))); - simulate_transport(1, 0); - EXPECT_EQ(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); -} - -TEST_F(FrameRouter, master_sends_to_master_does_nothing) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(0); - router_send_frame(0, (uint8_t*)&data, 4); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); -} - -TEST_F(FrameRouter, link_sends_to_other_link_does_nothing) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(1); - router_send_frame(2, (uint8_t*)&data, 4); - EXPECT_EQ(router_buffers[1].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); -} - -TEST_F(FrameRouter, master_receives_on_uplink_does_nothing) { - frame_buffer_t data; - data.data = {0xAB, 0x70, 0x55, 0xBB}; - activate_router(1); - router_send_frame(0, (uint8_t*)&data, 4); - EXPECT_GT(router_buffers[1].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[1].send_buffers[DOWN_LINK].size(), 0); - - EXPECT_CALL(*this, transport_recv_frame(_, _, _)).Times(0); - activate_router(0); - receive_data(UP_LINK, router_buffers[1].send_buffers[UP_LINK].data(), router_buffers[1].send_buffers[UP_LINK].size()); - EXPECT_EQ(router_buffers[0].send_buffers[UP_LINK].size(), 0); - EXPECT_EQ(router_buffers[0].send_buffers[DOWN_LINK].size(), 0); -} diff --git a/quantum/serial_link/tests/frame_validator_tests.cpp b/quantum/serial_link/tests/frame_validator_tests.cpp deleted file mode 100644 index 43dc57b6330..00000000000 --- a/quantum/serial_link/tests/frame_validator_tests.cpp +++ /dev/null @@ -1,100 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "gtest/gtest.h" -#include "gmock/gmock.h" -extern "C" { -#include "serial_link/protocol/frame_validator.h" -} - -using testing::_; -using testing::Args; -using testing::ElementsAreArray; - -class FrameValidator : public testing::Test { - public: - FrameValidator() { Instance = this; } - - ~FrameValidator() { Instance = nullptr; } - - MOCK_METHOD3(route_incoming_frame, void(uint8_t link, uint8_t* data, uint16_t size)); - MOCK_METHOD3(byte_stuffer_send_frame, void(uint8_t link, uint8_t* data, uint16_t size)); - - static FrameValidator* Instance; -}; - -FrameValidator* FrameValidator::Instance = nullptr; - -extern "C" { -void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size) { FrameValidator::Instance->route_incoming_frame(link, data, size); } - -void byte_stuffer_send_frame(uint8_t link, uint8_t* data, uint16_t size) { FrameValidator::Instance->byte_stuffer_send_frame(link, data, size); } -} - -TEST_F(FrameValidator, doesnt_validate_frames_under_5_bytes) { - EXPECT_CALL(*this, route_incoming_frame(_, _, _)).Times(0); - uint8_t data[] = {1, 2}; - validator_recv_frame(0, 0, 1); - validator_recv_frame(0, data, 2); - validator_recv_frame(0, data, 3); - validator_recv_frame(0, data, 4); -} - -TEST_F(FrameValidator, validates_one_byte_frame_with_correct_crc) { - uint8_t data[] = {0x44, 0x04, 0x6A, 0xB3, 0xA3}; - EXPECT_CALL(*this, route_incoming_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(data, 1))); - validator_recv_frame(0, data, 5); -} - -TEST_F(FrameValidator, does_not_validate_one_byte_frame_with_incorrect_crc) { - uint8_t data[] = {0x44, 0, 0, 0, 0}; - EXPECT_CALL(*this, route_incoming_frame(_, _, _)).Times(0); - validator_recv_frame(1, data, 5); -} - -TEST_F(FrameValidator, validates_four_byte_frame_with_correct_crc) { - uint8_t data[] = {0x44, 0x10, 0xFF, 0x00, 0x74, 0x4E, 0x30, 0xBA}; - EXPECT_CALL(*this, route_incoming_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(data, 4))); - validator_recv_frame(1, data, 8); -} - -TEST_F(FrameValidator, validates_five_byte_frame_with_correct_crc) { - uint8_t data[] = {1, 2, 3, 4, 5, 0xF4, 0x99, 0x0B, 0x47}; - EXPECT_CALL(*this, route_incoming_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(data, 5))); - validator_recv_frame(0, data, 9); -} - -TEST_F(FrameValidator, sends_one_byte_with_correct_crc) { - uint8_t original[] = {0x44, 0, 0, 0, 0}; - uint8_t expected[] = {0x44, 0x04, 0x6A, 0xB3, 0xA3}; - EXPECT_CALL(*this, byte_stuffer_send_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - validator_send_frame(0, original, 1); -} - -TEST_F(FrameValidator, sends_five_bytes_with_correct_crc) { - uint8_t original[] = {1, 2, 3, 4, 5, 0, 0, 0, 0}; - uint8_t expected[] = {1, 2, 3, 4, 5, 0xF4, 0x99, 0x0B, 0x47}; - EXPECT_CALL(*this, byte_stuffer_send_frame(_, _, _)).With(Args<1, 2>(ElementsAreArray(expected))); - validator_send_frame(0, original, 5); -} diff --git a/quantum/serial_link/tests/rules.mk b/quantum/serial_link/tests/rules.mk deleted file mode 100644 index b81515bc55e..00000000000 --- a/quantum/serial_link/tests/rules.mk +++ /dev/null @@ -1,22 +0,0 @@ -serial_link_byte_stuffer_SRC :=\ - $(SERIAL_PATH)/tests/byte_stuffer_tests.cpp \ - $(SERIAL_PATH)/protocol/byte_stuffer.c - -serial_link_frame_validator_SRC := \ - $(SERIAL_PATH)/tests/frame_validator_tests.cpp \ - $(SERIAL_PATH)/protocol/frame_validator.c - -serial_link_frame_router_SRC := \ - $(SERIAL_PATH)/tests/frame_router_tests.cpp \ - $(SERIAL_PATH)/protocol/byte_stuffer.c \ - $(SERIAL_PATH)/protocol/frame_validator.c \ - $(SERIAL_PATH)/protocol/frame_router.c - -serial_link_triple_buffered_object_SRC := \ - $(SERIAL_PATH)/tests/triple_buffered_object_tests.cpp \ - $(SERIAL_PATH)/protocol/triple_buffered_object.c - -serial_link_transport_SRC := \ - $(SERIAL_PATH)/tests/transport_tests.cpp \ - $(SERIAL_PATH)/protocol/transport.c \ - $(SERIAL_PATH)/protocol/triple_buffered_object.c diff --git a/quantum/serial_link/tests/testlist.mk b/quantum/serial_link/tests/testlist.mk deleted file mode 100644 index c5edaf478f5..00000000000 --- a/quantum/serial_link/tests/testlist.mk +++ /dev/null @@ -1,6 +0,0 @@ -TEST_LIST +=\ - serial_link_byte_stuffer\ - serial_link_frame_validator\ - serial_link_frame_router\ - serial_link_triple_buffered_object\ - serial_link_transport diff --git a/quantum/serial_link/tests/transport_tests.cpp b/quantum/serial_link/tests/transport_tests.cpp deleted file mode 100644 index cfd11104609..00000000000 --- a/quantum/serial_link/tests/transport_tests.cpp +++ /dev/null @@ -1,184 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "gtest/gtest.h" -#include "gmock/gmock.h" - -using testing::_; -using testing::Args; -using testing::ElementsAreArray; - -extern "C" { -#include "serial_link/protocol/transport.h" -} - -struct test_object1 { - uint32_t test; -}; - -struct test_object2 { - uint32_t test1; - uint32_t test2; -}; - -MASTER_TO_ALL_SLAVES_OBJECT(master_to_slave, test_object1); -MASTER_TO_SINGLE_SLAVE_OBJECT(master_to_single_slave, test_object1); -SLAVE_TO_MASTER_OBJECT(slave_to_master, test_object1); - -static remote_object_t* test_remote_objects[] = { - REMOTE_OBJECT(master_to_slave), - REMOTE_OBJECT(master_to_single_slave), - REMOTE_OBJECT(slave_to_master), -}; - -class Transport : public testing::Test { - public: - Transport() { - Instance = this; - add_remote_objects(test_remote_objects, sizeof(test_remote_objects) / sizeof(remote_object_t*)); - } - - ~Transport() { - Instance = nullptr; - reinitialize_serial_link_transport(); - } - - MOCK_METHOD0(signal_data_written, void()); - MOCK_METHOD1(router_send_frame, void(uint8_t destination)); - - void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size) { - router_send_frame(destination); - std::copy(data, data + size, std::back_inserter(sent_data)); - } - - static Transport* Instance; - - std::vector<uint8_t> sent_data; -}; - -Transport* Transport::Instance = nullptr; - -extern "C" { -void signal_data_written(void) { Transport::Instance->signal_data_written(); } - -void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size) { Transport::Instance->router_send_frame(destination, data, size); } -} - -TEST_F(Transport, write_to_local_signals_an_event) { - begin_write_master_to_slave(); - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_slave(); - begin_write_slave_to_master(); - EXPECT_CALL(*this, signal_data_written()); - end_write_slave_to_master(); - begin_write_master_to_single_slave(1); - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_single_slave(1); -} - -TEST_F(Transport, writes_from_master_to_all_slaves) { - update_transport(); - test_object1* obj = begin_write_master_to_slave(); - obj->test = 5; - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_slave(); - EXPECT_CALL(*this, router_send_frame(0xFF)); - update_transport(); - transport_recv_frame(0, sent_data.data(), sent_data.size()); - test_object1* obj2 = read_master_to_slave(); - EXPECT_NE(obj2, nullptr); - EXPECT_EQ(obj2->test, 5); -} - -TEST_F(Transport, writes_from_slave_to_master) { - update_transport(); - test_object1* obj = begin_write_slave_to_master(); - obj->test = 7; - EXPECT_CALL(*this, signal_data_written()); - end_write_slave_to_master(); - EXPECT_CALL(*this, router_send_frame(0)); - update_transport(); - transport_recv_frame(3, sent_data.data(), sent_data.size()); - test_object1* obj2 = read_slave_to_master(2); - EXPECT_EQ(read_slave_to_master(0), nullptr); - EXPECT_NE(obj2, nullptr); - EXPECT_EQ(obj2->test, 7); -} - -TEST_F(Transport, writes_from_master_to_single_slave) { - update_transport(); - test_object1* obj = begin_write_master_to_single_slave(3); - obj->test = 7; - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_single_slave(3); - EXPECT_CALL(*this, router_send_frame(4)); - update_transport(); - transport_recv_frame(0, sent_data.data(), sent_data.size()); - test_object1* obj2 = read_master_to_single_slave(); - EXPECT_NE(obj2, nullptr); - EXPECT_EQ(obj2->test, 7); -} - -TEST_F(Transport, ignores_object_with_invalid_id) { - update_transport(); - test_object1* obj = begin_write_master_to_single_slave(3); - obj->test = 7; - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_single_slave(3); - EXPECT_CALL(*this, router_send_frame(4)); - update_transport(); - sent_data[sent_data.size() - 1] = 44; - transport_recv_frame(0, sent_data.data(), sent_data.size()); - test_object1* obj2 = read_master_to_single_slave(); - EXPECT_EQ(obj2, nullptr); -} - -TEST_F(Transport, ignores_object_with_size_too_small) { - update_transport(); - test_object1* obj = begin_write_master_to_slave(); - obj->test = 7; - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_slave(); - EXPECT_CALL(*this, router_send_frame(_)); - update_transport(); - sent_data[sent_data.size() - 2] = 0; - transport_recv_frame(0, sent_data.data(), sent_data.size() - 1); - test_object1* obj2 = read_master_to_slave(); - EXPECT_EQ(obj2, nullptr); -} - -TEST_F(Transport, ignores_object_with_size_too_big) { - update_transport(); - test_object1* obj = begin_write_master_to_slave(); - obj->test = 7; - EXPECT_CALL(*this, signal_data_written()); - end_write_master_to_slave(); - EXPECT_CALL(*this, router_send_frame(_)); - update_transport(); - sent_data.resize(sent_data.size() + 22); - sent_data[sent_data.size() - 1] = 0; - transport_recv_frame(0, sent_data.data(), sent_data.size()); - test_object1* obj2 = read_master_to_slave(); - EXPECT_EQ(obj2, nullptr); -} diff --git a/quantum/serial_link/tests/triple_buffered_object_tests.cpp b/quantum/serial_link/tests/triple_buffered_object_tests.cpp deleted file mode 100644 index 8de9bfdebf3..00000000000 --- a/quantum/serial_link/tests/triple_buffered_object_tests.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "gtest/gtest.h" -extern "C" { -#include "serial_link/protocol/triple_buffered_object.h" -} - -struct test_object { - uint8_t state; - uint32_t buffer[3]; -}; - -test_object test_object; - -class TripleBufferedObject : public testing::Test { - public: - TripleBufferedObject() { triple_buffer_init((triple_buffer_object_t*)&test_object); } -}; - -TEST_F(TripleBufferedObject, writes_and_reads_object) { - *triple_buffer_begin_write(&test_object) = 0x3456ABCC; - triple_buffer_end_write(&test_object); - EXPECT_EQ(*triple_buffer_read(&test_object), 0x3456ABCC); -} - -TEST_F(TripleBufferedObject, does_not_read_empty) { EXPECT_EQ(triple_buffer_read(&test_object), nullptr); } - -TEST_F(TripleBufferedObject, writes_twice_and_reads_object) { - *triple_buffer_begin_write(&test_object) = 0x3456ABCC; - triple_buffer_end_write(&test_object); - *triple_buffer_begin_write(&test_object) = 0x44778899; - triple_buffer_end_write(&test_object); - EXPECT_EQ(*triple_buffer_read(&test_object), 0x44778899); -} - -TEST_F(TripleBufferedObject, performs_another_write_in_the_middle_of_read) { - *triple_buffer_begin_write(&test_object) = 1; - triple_buffer_end_write(&test_object); - uint32_t* read = triple_buffer_read(&test_object); - *triple_buffer_begin_write(&test_object) = 2; - triple_buffer_end_write(&test_object); - EXPECT_EQ(*read, 1); - EXPECT_EQ(*triple_buffer_read(&test_object), 2); - EXPECT_EQ(triple_buffer_read(&test_object), nullptr); -} - -TEST_F(TripleBufferedObject, performs_two_writes_in_the_middle_of_read) { - *triple_buffer_begin_write(&test_object) = 1; - triple_buffer_end_write(&test_object); - uint32_t* read = triple_buffer_read(&test_object); - *triple_buffer_begin_write(&test_object) = 2; - triple_buffer_end_write(&test_object); - *triple_buffer_begin_write(&test_object) = 3; - triple_buffer_end_write(&test_object); - EXPECT_EQ(*read, 1); - EXPECT_EQ(*triple_buffer_read(&test_object), 3); - EXPECT_EQ(triple_buffer_read(&test_object), nullptr); -} diff --git a/quantum/sync_timer.c b/quantum/sync_timer.c new file mode 100644 index 00000000000..de24b463b6b --- /dev/null +++ b/quantum/sync_timer.c @@ -0,0 +1,58 @@ +/* +Copyright (C) 2020 Ryan Caltabiano <https://github.com/XScorpion2> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +If you happen to meet one of the copyright holders in a bar you are obligated +to buy them one pint of beer. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#include "sync_timer.h" +#include "keyboard.h" + +#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER) +volatile int32_t sync_timer_ms; + +void sync_timer_init(void) { sync_timer_ms = 0; } + +void sync_timer_update(uint32_t time) { + if (is_keyboard_master()) return; + sync_timer_ms = time - timer_read32(); +} + +uint16_t sync_timer_read(void) { + if (is_keyboard_master()) return timer_read(); + return sync_timer_read32(); +} + +uint32_t sync_timer_read32(void) { + if (is_keyboard_master()) return timer_read32(); + return sync_timer_ms + timer_read32(); +} + +uint16_t sync_timer_elapsed(uint16_t last) { + if (is_keyboard_master()) return timer_elapsed(last); + return TIMER_DIFF_16(sync_timer_read(), last); +} + +uint32_t sync_timer_elapsed32(uint32_t last) { + if (is_keyboard_master()) return timer_elapsed32(last); + return TIMER_DIFF_32(sync_timer_read32(), last); +} +#endif diff --git a/quantum/sync_timer.h b/quantum/sync_timer.h new file mode 100644 index 00000000000..9ddef45bb26 --- /dev/null +++ b/quantum/sync_timer.h @@ -0,0 +1,54 @@ +/* +Copyright (C) 2020 Ryan Caltabiano <https://github.com/XScorpion2> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +If you happen to meet one of the copyright holders in a bar you are obligated +to buy them one pint of beer. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#pragma once + +#include <stdint.h> +#include "timer.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(SPLIT_KEYBOARD) && !defined(DISABLE_SYNC_TIMER) +void sync_timer_init(void); +void sync_timer_update(uint32_t time); +uint16_t sync_timer_read(void); +uint32_t sync_timer_read32(void); +uint16_t sync_timer_elapsed(uint16_t last); +uint32_t sync_timer_elapsed32(uint32_t last); +#else +# define sync_timer_init() +# define sync_timer_clear() +# define sync_timer_update(t) +# define sync_timer_read() timer_read() +# define sync_timer_read32() timer_read32() +# define sync_timer_elapsed(t) timer_elapsed(t) +# define sync_timer_elapsed32(t) timer_elapsed32(t) +#endif + +#ifdef __cplusplus +} +#endif diff --git a/quantum/via.c b/quantum/via.c index 1b2dbcf08d9..7c8aa753e76 100644 --- a/quantum/via.c +++ b/quantum/via.c @@ -44,7 +44,7 @@ #include "raw_hid.h" #include "dynamic_keymap.h" -#include "tmk_core/common/eeprom.h" +#include "eeprom.h" #include "version.h" // for QMK_BUILDDATE used in EEPROM magic #include "via_ensure_keycode.h" diff --git a/quantum/via_ensure_keycode.h b/quantum/via_ensure_keycode.h index a9c1b8ba5d1..1aba0cdd2a3 100644 --- a/quantum/via_ensure_keycode.h +++ b/quantum/via_ensure_keycode.h @@ -5,362 +5,338 @@ #ifndef VIA_HAS_BROKEN_KEYCODES -_Static_assert(KC_NO == 0, ""); -_Static_assert(KC_TRNS == 1, ""); +// clang-format off -_Static_assert(KC_A == 0x04, ""); -_Static_assert(KC_B == 0x05, ""); -_Static_assert(KC_C == 0x06, ""); -_Static_assert(KC_D == 0x07, ""); -_Static_assert(KC_E == 0x08, ""); -_Static_assert(KC_F == 0x09, ""); -_Static_assert(KC_G == 0x0A, ""); -_Static_assert(KC_H == 0x0B, ""); -_Static_assert(KC_I == 0x0C, ""); -_Static_assert(KC_J == 0x0D, ""); -_Static_assert(KC_K == 0x0E, ""); -_Static_assert(KC_L == 0x0F, ""); -_Static_assert(KC_M == 0x10, ""); -_Static_assert(KC_N == 0x11, ""); -_Static_assert(KC_O == 0x12, ""); -_Static_assert(KC_P == 0x13, ""); -_Static_assert(KC_Q == 0x14, ""); -_Static_assert(KC_R == 0x15, ""); -_Static_assert(KC_S == 0x16, ""); -_Static_assert(KC_T == 0x17, ""); -_Static_assert(KC_U == 0x18, ""); -_Static_assert(KC_V == 0x19, ""); -_Static_assert(KC_W == 0x1A, ""); -_Static_assert(KC_X == 0x1B, ""); -_Static_assert(KC_Y == 0x1C, ""); -_Static_assert(KC_Z == 0x1D, ""); -_Static_assert(KC_1 == 0x1E, ""); -_Static_assert(KC_2 == 0x1F, ""); -_Static_assert(KC_3 == 0x20, ""); -_Static_assert(KC_4 == 0x21, ""); -_Static_assert(KC_5 == 0x22, ""); -_Static_assert(KC_6 == 0x23, ""); -_Static_assert(KC_7 == 0x24, ""); -_Static_assert(KC_8 == 0x25, ""); -_Static_assert(KC_9 == 0x26, ""); -_Static_assert(KC_0 == 0x27, ""); -_Static_assert(KC_ENTER == 0x28, ""); -_Static_assert(KC_ESCAPE == 0x29, ""); -_Static_assert(KC_BSPACE == 0x2A, ""); -_Static_assert(KC_TAB == 0x2B, ""); -_Static_assert(KC_SPACE == 0x2C, ""); -_Static_assert(KC_MINUS == 0x2D, ""); -_Static_assert(KC_EQUAL == 0x2E, ""); -_Static_assert(KC_LBRACKET == 0x2F, ""); -_Static_assert(KC_RBRACKET == 0x30, ""); -_Static_assert(KC_BSLASH == 0x31, ""); -_Static_assert(KC_SCOLON == 0x33, ""); -_Static_assert(KC_QUOTE == 0x34, ""); -_Static_assert(KC_GRAVE == 0x35, ""); -_Static_assert(KC_COMMA == 0x36, ""); -_Static_assert(KC_DOT == 0x37, ""); -_Static_assert(KC_SLASH == 0x38, ""); -_Static_assert(KC_CAPSLOCK == 0x39, ""); -_Static_assert(KC_F1 == 0x3A, ""); -_Static_assert(KC_F2 == 0x3B, ""); -_Static_assert(KC_F3 == 0x3C, ""); -_Static_assert(KC_F4 == 0x3D, ""); -_Static_assert(KC_F5 == 0x3E, ""); -_Static_assert(KC_F6 == 0x3F, ""); -_Static_assert(KC_F7 == 0x40, ""); -_Static_assert(KC_F8 == 0x41, ""); -_Static_assert(KC_F9 == 0x42, ""); -_Static_assert(KC_F10 == 0x43, ""); -_Static_assert(KC_F11 == 0x44, ""); -_Static_assert(KC_F12 == 0x45, ""); -_Static_assert(KC_PSCREEN == 0x46, ""); -_Static_assert(KC_SCROLLLOCK == 0x47, ""); -_Static_assert(KC_PAUSE == 0x48, ""); -_Static_assert(KC_INSERT == 0x49, ""); -_Static_assert(KC_HOME == 0x4A, ""); -_Static_assert(KC_PGUP == 0x4B, ""); -_Static_assert(KC_DELETE == 0x4C, ""); -_Static_assert(KC_END == 0x4D, ""); -_Static_assert(KC_PGDOWN == 0x4E, ""); -_Static_assert(KC_RIGHT == 0x4F, ""); -_Static_assert(KC_LEFT == 0x50, ""); -_Static_assert(KC_DOWN == 0x51, ""); -_Static_assert(KC_UP == 0x52, ""); -_Static_assert(KC_NUMLOCK == 0x53, ""); -_Static_assert(KC_KP_SLASH == 0x54, ""); -_Static_assert(KC_KP_ASTERISK == 0x55, ""); -_Static_assert(KC_KP_MINUS == 0x56, ""); -_Static_assert(KC_KP_PLUS == 0x57, ""); -_Static_assert(KC_KP_ENTER == 0x58, ""); -_Static_assert(KC_KP_1 == 0x59, ""); -_Static_assert(KC_KP_2 == 0x5A, ""); -_Static_assert(KC_KP_3 == 0x5B, ""); -_Static_assert(KC_KP_4 == 0x5C, ""); -_Static_assert(KC_KP_5 == 0x5D, ""); -_Static_assert(KC_KP_6 == 0x5E, ""); -_Static_assert(KC_KP_7 == 0x5F, ""); -_Static_assert(KC_KP_8 == 0x60, ""); -_Static_assert(KC_KP_9 == 0x61, ""); -_Static_assert(KC_KP_0 == 0x62, ""); -_Static_assert(KC_KP_DOT == 0x63, ""); -_Static_assert(KC_APPLICATION == 0x65, ""); -_Static_assert(KC_KP_EQUAL == 0x67, ""); -_Static_assert(KC_KP_COMMA == 0x85, ""); -_Static_assert(KC_LCTRL == 0xE0, ""); -_Static_assert(KC_LSHIFT == 0xE1, ""); -_Static_assert(KC_LALT == 0xE2, ""); -_Static_assert(KC_LGUI == 0xE3, ""); -_Static_assert(KC_RCTRL == 0xE4, ""); -_Static_assert(KC_RSHIFT == 0xE5, ""); -_Static_assert(KC_RALT == 0xE6, ""); -_Static_assert(KC_RGUI == 0xE7, ""); +_Static_assert(KC_NO == 0x0000, ""); +_Static_assert(KC_TRANSPARENT == 0x0001, ""); -_Static_assert(KC_TILD == 0x235, ""); -_Static_assert(KC_EXLM == 0x21E, ""); -_Static_assert(KC_AT == 0x21F, ""); -_Static_assert(KC_HASH == 0x220, ""); -_Static_assert(KC_DLR == 0x221, ""); -_Static_assert(KC_PERC == 0x222, ""); -_Static_assert(KC_CIRC == 0x223, ""); -_Static_assert(KC_AMPR == 0x224, ""); -_Static_assert(KC_ASTR == 0x225, ""); -_Static_assert(KC_LPRN == 0x226, ""); -_Static_assert(KC_RPRN == 0x227, ""); -_Static_assert(KC_UNDS == 0x22D, ""); -_Static_assert(KC_PLUS == 0x22E, ""); -_Static_assert(KC_LCBR == 0x22F, ""); -_Static_assert(KC_RCBR == 0x230, ""); -_Static_assert(KC_LT == 0x236, ""); -_Static_assert(KC_GT == 0x237, ""); -_Static_assert(KC_COLN == 0x233, ""); -_Static_assert(KC_PIPE == 0x231, ""); -_Static_assert(KC_QUES == 0x238, ""); -_Static_assert(KC_DQUO == 0x234, ""); +_Static_assert(KC_A == 0x0004, ""); +_Static_assert(KC_B == 0x0005, ""); +_Static_assert(KC_C == 0x0006, ""); +_Static_assert(KC_D == 0x0007, ""); +_Static_assert(KC_E == 0x0008, ""); +_Static_assert(KC_F == 0x0009, ""); +_Static_assert(KC_G == 0x000A, ""); +_Static_assert(KC_H == 0x000B, ""); +_Static_assert(KC_I == 0x000C, ""); +_Static_assert(KC_J == 0x000D, ""); +_Static_assert(KC_K == 0x000E, ""); +_Static_assert(KC_L == 0x000F, ""); +_Static_assert(KC_M == 0x0010, ""); +_Static_assert(KC_N == 0x0011, ""); +_Static_assert(KC_O == 0x0012, ""); +_Static_assert(KC_P == 0x0013, ""); +_Static_assert(KC_Q == 0x0014, ""); +_Static_assert(KC_R == 0x0015, ""); +_Static_assert(KC_S == 0x0016, ""); +_Static_assert(KC_T == 0x0017, ""); +_Static_assert(KC_U == 0x0018, ""); +_Static_assert(KC_V == 0x0019, ""); +_Static_assert(KC_W == 0x001A, ""); +_Static_assert(KC_X == 0x001B, ""); +_Static_assert(KC_Y == 0x001C, ""); +_Static_assert(KC_Z == 0x001D, ""); +_Static_assert(KC_1 == 0x001E, ""); +_Static_assert(KC_2 == 0x001F, ""); +_Static_assert(KC_3 == 0x0020, ""); +_Static_assert(KC_4 == 0x0021, ""); +_Static_assert(KC_5 == 0x0022, ""); +_Static_assert(KC_6 == 0x0023, ""); +_Static_assert(KC_7 == 0x0024, ""); +_Static_assert(KC_8 == 0x0025, ""); +_Static_assert(KC_9 == 0x0026, ""); +_Static_assert(KC_0 == 0x0027, ""); +_Static_assert(KC_ENTER == 0x0028, ""); +_Static_assert(KC_ESCAPE == 0x0029, ""); +_Static_assert(KC_BACKSPACE == 0x002A, ""); +_Static_assert(KC_TAB == 0x002B, ""); +_Static_assert(KC_SPACE == 0x002C, ""); +_Static_assert(KC_MINUS == 0x002D, ""); +_Static_assert(KC_EQUAL == 0x002E, ""); +_Static_assert(KC_LEFT_BRACKET == 0x002F, ""); +_Static_assert(KC_RIGHT_BRACKET == 0x0030, ""); +_Static_assert(KC_BACKSLASH == 0x0031, ""); +_Static_assert(KC_NONUS_HASH == 0x0032, ""); +_Static_assert(KC_SEMICOLON == 0x0033, ""); +_Static_assert(KC_QUOTE == 0x0034, ""); +_Static_assert(KC_GRAVE == 0x0035, ""); +_Static_assert(KC_COMMA == 0x0036, ""); +_Static_assert(KC_DOT == 0x0037, ""); +_Static_assert(KC_SLASH == 0x0038, ""); +_Static_assert(KC_CAPS_LOCK == 0x0039, ""); +_Static_assert(KC_F1 == 0x003A, ""); +_Static_assert(KC_F2 == 0x003B, ""); +_Static_assert(KC_F3 == 0x003C, ""); +_Static_assert(KC_F4 == 0x003D, ""); +_Static_assert(KC_F5 == 0x003E, ""); +_Static_assert(KC_F6 == 0x003F, ""); +_Static_assert(KC_F7 == 0x0040, ""); +_Static_assert(KC_F8 == 0x0041, ""); +_Static_assert(KC_F9 == 0x0042, ""); +_Static_assert(KC_F10 == 0x0043, ""); +_Static_assert(KC_F11 == 0x0044, ""); +_Static_assert(KC_F12 == 0x0045, ""); +_Static_assert(KC_PRINT_SCREEN == 0x0046, ""); +_Static_assert(KC_SCROLL_LOCK == 0x0047, ""); +_Static_assert(KC_PAUSE == 0x0048, ""); +_Static_assert(KC_INSERT == 0x0049, ""); +_Static_assert(KC_HOME == 0x004A, ""); +_Static_assert(KC_PAGE_UP == 0x004B, ""); +_Static_assert(KC_DELETE == 0x004C, ""); +_Static_assert(KC_END == 0x004D, ""); +_Static_assert(KC_PAGE_DOWN == 0x004E, ""); +_Static_assert(KC_RIGHT == 0x004F, ""); +_Static_assert(KC_LEFT == 0x0050, ""); +_Static_assert(KC_DOWN == 0x0051, ""); +_Static_assert(KC_UP == 0x0052, ""); +_Static_assert(KC_NUM_LOCK == 0x0053, ""); +_Static_assert(KC_KP_SLASH == 0x0054, ""); +_Static_assert(KC_KP_ASTERISK == 0x0055, ""); +_Static_assert(KC_KP_MINUS == 0x0056, ""); +_Static_assert(KC_KP_PLUS == 0x0057, ""); +_Static_assert(KC_KP_ENTER == 0x0058, ""); +_Static_assert(KC_KP_1 == 0x0059, ""); +_Static_assert(KC_KP_2 == 0x005A, ""); +_Static_assert(KC_KP_3 == 0x005B, ""); +_Static_assert(KC_KP_4 == 0x005C, ""); +_Static_assert(KC_KP_5 == 0x005D, ""); +_Static_assert(KC_KP_6 == 0x005E, ""); +_Static_assert(KC_KP_7 == 0x005F, ""); +_Static_assert(KC_KP_8 == 0x0060, ""); +_Static_assert(KC_KP_9 == 0x0061, ""); +_Static_assert(KC_KP_0 == 0x0062, ""); +_Static_assert(KC_KP_DOT == 0x0063, ""); +_Static_assert(KC_NONUS_BACKSLASH == 0x0064, ""); +_Static_assert(KC_APPLICATION == 0x0065, ""); +_Static_assert(KC_KB_POWER == 0x0066, ""); +_Static_assert(KC_KP_EQUAL == 0x0067, ""); +_Static_assert(KC_F13 == 0x0068, ""); +_Static_assert(KC_F14 == 0x0069, ""); +_Static_assert(KC_F15 == 0x006A, ""); +_Static_assert(KC_F16 == 0x006B, ""); +_Static_assert(KC_F17 == 0x006C, ""); +_Static_assert(KC_F18 == 0x006D, ""); +_Static_assert(KC_F19 == 0x006E, ""); +_Static_assert(KC_F20 == 0x006F, ""); +_Static_assert(KC_F21 == 0x0070, ""); +_Static_assert(KC_F22 == 0x0071, ""); +_Static_assert(KC_F23 == 0x0072, ""); +_Static_assert(KC_F24 == 0x0073, ""); +_Static_assert(KC_EXECUTE == 0x0074, ""); +_Static_assert(KC_HELP == 0x0075, ""); +_Static_assert(KC_MENU == 0x0076, ""); +_Static_assert(KC_SELECT == 0x0077, ""); +_Static_assert(KC_STOP == 0x0078, ""); +_Static_assert(KC_AGAIN == 0x0079, ""); +_Static_assert(KC_UNDO == 0x007A, ""); +_Static_assert(KC_CUT == 0x007B, ""); +_Static_assert(KC_COPY == 0x007C, ""); +_Static_assert(KC_PASTE == 0x007D, ""); +_Static_assert(KC_FIND == 0x007E, ""); -_Static_assert(KC_NONUS_HASH == 0x32, ""); -_Static_assert(KC_NONUS_BSLASH == 0x64, ""); -_Static_assert(KC_RO == 0x87, ""); -_Static_assert(KC_KANA == 0x88, ""); -_Static_assert(KC_JYEN == 0x89, ""); -_Static_assert(KC_HENK == 0x8A, ""); -_Static_assert(KC_MHEN == 0x8B, ""); -_Static_assert(KC_LANG1 == 0x90, ""); -_Static_assert(KC_LANG2 == 0x91, ""); +_Static_assert(KC_LOCKING_CAPS_LOCK == 0x0082, ""); +_Static_assert(KC_LOCKING_NUM_LOCK == 0x0083, ""); +_Static_assert(KC_LOCKING_SCROLL_LOCK == 0x0084, ""); +_Static_assert(KC_KP_COMMA == 0x0085, ""); +_Static_assert(KC_KP_EQUAL_AS400 == 0x0086, ""); +_Static_assert(KC_INTERNATIONAL_1 == 0x0087, ""); +_Static_assert(KC_INTERNATIONAL_2 == 0x0088, ""); +_Static_assert(KC_INTERNATIONAL_3 == 0x0089, ""); +_Static_assert(KC_INTERNATIONAL_4 == 0x008A, ""); +_Static_assert(KC_INTERNATIONAL_5 == 0x008B, ""); +_Static_assert(KC_INTERNATIONAL_6 == 0x008C, ""); +_Static_assert(KC_INTERNATIONAL_7 == 0x008D, ""); +_Static_assert(KC_INTERNATIONAL_8 == 0x008E, ""); +_Static_assert(KC_INTERNATIONAL_9 == 0x008F, ""); +_Static_assert(KC_LANGUAGE_1 == 0x0090, ""); +_Static_assert(KC_LANGUAGE_2 == 0x0091, ""); +_Static_assert(KC_LANGUAGE_3 == 0x0092, ""); +_Static_assert(KC_LANGUAGE_4 == 0x0093, ""); +_Static_assert(KC_LANGUAGE_5 == 0x0094, ""); +_Static_assert(KC_LANGUAGE_6 == 0x0095, ""); +_Static_assert(KC_LANGUAGE_7 == 0x0096, ""); +_Static_assert(KC_LANGUAGE_8 == 0x0097, ""); +_Static_assert(KC_LANGUAGE_9 == 0x0098, ""); +_Static_assert(KC_ALTERNATE_ERASE == 0x0099, ""); +_Static_assert(KC_SYSTEM_REQUEST == 0x009A, ""); +_Static_assert(KC_CANCEL == 0x009B, ""); +_Static_assert(KC_CLEAR == 0x009C, ""); +_Static_assert(KC_PRIOR == 0x009D, ""); -_Static_assert(KC_GESC == 0x5C16, ""); -_Static_assert(KC_LSPO == 0x5CD7, ""); -_Static_assert(KC_RSPC == 0x5CD8, ""); -_Static_assert(KC_LCPO == 0x5CF3, ""); -_Static_assert(KC_RCPC == 0x5CF4, ""); -_Static_assert(KC_LAPO == 0x5CF5, ""); -_Static_assert(KC_RAPC == 0x5CF6, ""); -_Static_assert(KC_SFTENT == 0x5CD9, ""); +_Static_assert(KC_OUT == 0x00A0, ""); +_Static_assert(KC_OPER == 0x00A1, ""); +_Static_assert(KC_CLEAR_AGAIN == 0x00A2, ""); +_Static_assert(KC_CRSEL == 0x00A3, ""); +_Static_assert(KC_EXSEL == 0x00A4, ""); -_Static_assert(BL_TOGG == 23743, ""); -_Static_assert(BL_STEP == 23744, ""); -_Static_assert(BL_BRTG == 23745, ""); -_Static_assert(BL_ON == 23739, ""); -_Static_assert(BL_OFF == 23740, ""); -_Static_assert(BL_INC == 23742, ""); -_Static_assert(BL_DEC == 23741, ""); -_Static_assert(RGB_TOG == 23746, ""); -_Static_assert(RGB_MOD == 23747, ""); -_Static_assert(RGB_RMOD == 23748, ""); -_Static_assert(RGB_HUI == 23749, ""); -_Static_assert(RGB_HUD == 23750, ""); -_Static_assert(RGB_SAI == 23751, ""); -_Static_assert(RGB_SAD == 23752, ""); -_Static_assert(RGB_VAI == 23753, ""); -_Static_assert(RGB_VAD == 23754, ""); -_Static_assert(RGB_SPI == 23755, ""); -_Static_assert(RGB_SPD == 23756, ""); -_Static_assert(RGB_M_P == 23757, ""); -_Static_assert(RGB_M_B == 23758, ""); -_Static_assert(RGB_M_R == 23759, ""); -_Static_assert(RGB_M_SW == 23760, ""); -_Static_assert(RGB_M_SN == 23761, ""); -_Static_assert(RGB_M_K == 23762, ""); -_Static_assert(RGB_M_X == 23763, ""); -_Static_assert(RGB_M_G == 23764, ""); -_Static_assert(RGB_M_T == 23765, ""); +_Static_assert(KC_PWR == 0x00A5, ""); +_Static_assert(KC_SLEP == 0x00A6, ""); +_Static_assert(KC_WAKE == 0x00A7, ""); +_Static_assert(KC_MUTE == 0x00A8, ""); +_Static_assert(KC_VOLU == 0x00A9, ""); +_Static_assert(KC_VOLD == 0x00AA, ""); +_Static_assert(KC_MNXT == 0x00AB, ""); +_Static_assert(KC_MPRV == 0x00AC, ""); +_Static_assert(KC_MSTP == 0x00AD, ""); +_Static_assert(KC_MPLY == 0x00AE, ""); +_Static_assert(KC_MSEL == 0x00AF, ""); +_Static_assert(KC_EJCT == 0x00B0, ""); +_Static_assert(KC_MAIL == 0x00B1, ""); +_Static_assert(KC_CALC == 0x00B2, ""); +_Static_assert(KC_MYCM == 0x00B3, ""); +_Static_assert(KC_WSCH == 0x00B4, ""); +_Static_assert(KC_WHOM == 0x00B5, ""); +_Static_assert(KC_WBAK == 0x00B6, ""); +_Static_assert(KC_WFWD == 0x00B7, ""); +_Static_assert(KC_WSTP == 0x00B8, ""); +_Static_assert(KC_WREF == 0x00B9, ""); +_Static_assert(KC_WFAV == 0x00BA, ""); +_Static_assert(KC_MFFD == 0x00BB, ""); +_Static_assert(KC_MRWD == 0x00BC, ""); +_Static_assert(KC_BRIU == 0x00BD, ""); +_Static_assert(KC_BRID == 0x00BE, ""); -_Static_assert(KC_F13 == 104, ""); -_Static_assert(KC_F14 == 105, ""); -_Static_assert(KC_F15 == 106, ""); -_Static_assert(KC_F16 == 107, ""); -_Static_assert(KC_F17 == 108, ""); -_Static_assert(KC_F18 == 109, ""); -_Static_assert(KC_F19 == 110, ""); -_Static_assert(KC_F20 == 111, ""); -_Static_assert(KC_F21 == 112, ""); -_Static_assert(KC_F22 == 113, ""); -_Static_assert(KC_F23 == 114, ""); -_Static_assert(KC_F24 == 115, ""); -_Static_assert(KC_PWR == 165, ""); -_Static_assert(KC_SLEP == 166, ""); -_Static_assert(KC_WAKE == 167, ""); -_Static_assert(KC_EXEC == 116, ""); -_Static_assert(KC_HELP == 117, ""); -_Static_assert(KC_SLCT == 119, ""); -_Static_assert(KC_STOP == 120, ""); -_Static_assert(KC_AGIN == 121, ""); -_Static_assert(KC_UNDO == 122, ""); -_Static_assert(KC_CUT == 123, ""); -_Static_assert(KC_COPY == 124, ""); -_Static_assert(KC_PSTE == 125, ""); -_Static_assert(KC_FIND == 126, ""); -_Static_assert(KC_CALC == 178, ""); -_Static_assert(KC_MAIL == 177, ""); -_Static_assert(KC_MSEL == 175, ""); -_Static_assert(KC_MYCM == 179, ""); -_Static_assert(KC_WSCH == 180, ""); -_Static_assert(KC_WHOM == 181, ""); -_Static_assert(KC_WBAK == 182, ""); -_Static_assert(KC_WFWD == 183, ""); -_Static_assert(KC_WSTP == 184, ""); -_Static_assert(KC_WREF == 185, ""); -_Static_assert(KC_WFAV == 186, ""); -_Static_assert(KC_BRIU == 189, ""); -_Static_assert(KC_BRID == 190, ""); -_Static_assert(KC_MPRV == 172, ""); -_Static_assert(KC_MNXT == 171, ""); -_Static_assert(KC_MUTE == 168, ""); -_Static_assert(KC_VOLD == 170, ""); -_Static_assert(KC_VOLU == 169, ""); -_Static_assert(KC_MSTP == 173, ""); -_Static_assert(KC_MPLY == 174, ""); -_Static_assert(KC_MRWD == 188, ""); -_Static_assert(KC_MFFD == 187, ""); -_Static_assert(KC_EJCT == 176, ""); -_Static_assert(KC_MS_U == 240, ""); -_Static_assert(KC_MS_D == 241, ""); -_Static_assert(KC_MS_L == 242, ""); -_Static_assert(KC_MS_R == 243, ""); -_Static_assert(KC_BTN1 == 244, ""); -_Static_assert(KC_BTN2 == 245, ""); -_Static_assert(KC_BTN3 == 246, ""); -_Static_assert(KC_BTN4 == 247, ""); -_Static_assert(KC_BTN5 == 248, ""); -_Static_assert(KC_WH_U == 249, ""); -_Static_assert(KC_WH_D == 250, ""); -_Static_assert(KC_WH_L == 251, ""); -_Static_assert(KC_WH_R == 252, ""); -_Static_assert(KC_ACL0 == 253, ""); -_Static_assert(KC_ACL1 == 254, ""); -_Static_assert(KC_ACL2 == 255, ""); -_Static_assert(KC_LCAP == 130, ""); -_Static_assert(KC_LNUM == 131, ""); -_Static_assert(KC_LSCR == 132, ""); +_Static_assert(KC_LEFT_CTRL == 0x00E0, ""); +_Static_assert(KC_LEFT_SHIFT == 0x00E1, ""); +_Static_assert(KC_LEFT_ALT == 0x00E2, ""); +_Static_assert(KC_LEFT_GUI == 0x00E3, ""); +_Static_assert(KC_RIGHT_CTRL == 0x00E4, ""); +_Static_assert(KC_RIGHT_SHIFT == 0x00E5, ""); +_Static_assert(KC_RIGHT_ALT == 0x00E6, ""); +_Static_assert(KC_RIGHT_GUI == 0x00E7, ""); -_Static_assert(FN_MO13 == 0x5F10, ""); -_Static_assert(FN_MO23 == 0x5F11, ""); +_Static_assert(KC_MS_U == 0x00F0, ""); +_Static_assert(KC_MS_D == 0x00F1, ""); +_Static_assert(KC_MS_L == 0x00F2, ""); +_Static_assert(KC_MS_R == 0x00F3, ""); +_Static_assert(KC_BTN1 == 0x00F4, ""); +_Static_assert(KC_BTN2 == 0x00F5, ""); +_Static_assert(KC_BTN3 == 0x00F6, ""); +_Static_assert(KC_BTN4 == 0x00F7, ""); +_Static_assert(KC_BTN5 == 0x00F8, ""); +_Static_assert(KC_WH_U == 0x00F9, ""); +_Static_assert(KC_WH_D == 0x00FA, ""); +_Static_assert(KC_WH_L == 0x00FB, ""); +_Static_assert(KC_WH_R == 0x00FC, ""); +_Static_assert(KC_ACL0 == 0x00FD, ""); +_Static_assert(KC_ACL1 == 0x00FE, ""); +_Static_assert(KC_ACL2 == 0x00FF, ""); -_Static_assert(MACRO00 == 0x5F12, ""); -_Static_assert(MACRO01 == 0x5F13, ""); -_Static_assert(MACRO02 == 0x5F14, ""); -_Static_assert(MACRO03 == 0x5F15, ""); -_Static_assert(MACRO04 == 0x5F16, ""); -_Static_assert(MACRO05 == 0x5F17, ""); -_Static_assert(MACRO06 == 0x5F18, ""); -_Static_assert(MACRO07 == 0x5F19, ""); -_Static_assert(MACRO08 == 0x5F1A, ""); -_Static_assert(MACRO09 == 0x5F1B, ""); -_Static_assert(MACRO10 == 0x5F1C, ""); -_Static_assert(MACRO11 == 0x5F1D, ""); -_Static_assert(MACRO12 == 0x5F1E, ""); -_Static_assert(MACRO13 == 0x5F1F, ""); -_Static_assert(MACRO14 == 0x5F20, ""); -_Static_assert(MACRO15 == 0x5F21, ""); +_Static_assert(KC_EXLM == 0x021E, ""); +_Static_assert(KC_AT == 0x021F, ""); +_Static_assert(KC_HASH == 0x0220, ""); +_Static_assert(KC_DLR == 0x0221, ""); +_Static_assert(KC_PERC == 0x0222, ""); +_Static_assert(KC_CIRC == 0x0223, ""); +_Static_assert(KC_AMPR == 0x0224, ""); +_Static_assert(KC_ASTR == 0x0225, ""); +_Static_assert(KC_LPRN == 0x0226, ""); +_Static_assert(KC_RPRN == 0x0227, ""); +_Static_assert(KC_UNDS == 0x022D, ""); +_Static_assert(KC_PLUS == 0x022E, ""); +_Static_assert(KC_LCBR == 0x022F, ""); +_Static_assert(KC_RCBR == 0x0230, ""); +_Static_assert(KC_PIPE == 0x0231, ""); +_Static_assert(KC_COLN == 0x0233, ""); +_Static_assert(KC_DQUO == 0x0234, ""); +_Static_assert(KC_TILD == 0x0235, ""); +_Static_assert(KC_LT == 0x0236, ""); +_Static_assert(KC_GT == 0x0237, ""); +_Static_assert(KC_QUES == 0x0238, ""); -_Static_assert(USER00 == 0x5F80, ""); -_Static_assert(USER01 == 0x5F81, ""); -_Static_assert(USER02 == 0x5F82, ""); -_Static_assert(USER03 == 0x5F83, ""); -_Static_assert(USER04 == 0x5F84, ""); -_Static_assert(USER05 == 0x5F85, ""); -_Static_assert(USER06 == 0x5F86, ""); -_Static_assert(USER07 == 0x5F87, ""); -_Static_assert(USER08 == 0x5F88, ""); -_Static_assert(USER09 == 0x5F89, ""); -_Static_assert(USER10 == 0x5F8A, ""); -_Static_assert(USER11 == 0x5F8B, ""); -_Static_assert(USER12 == 0x5F8C, ""); -_Static_assert(USER13 == 0x5F8D, ""); -_Static_assert(USER14 == 0x5F8E, ""); -_Static_assert(USER15 == 0x5F8F, ""); +_Static_assert(RESET == 0x5C00, ""); +_Static_assert(DEBUG == 0x5C01, ""); -_Static_assert(KC_POWER == 102, ""); -_Static_assert(KC_MENU == 118, ""); -_Static_assert(KC_KP_EQUAL_AS400 == 134, ""); -_Static_assert(KC_INT6 == 140, ""); -_Static_assert(KC_INT7 == 141, ""); -_Static_assert(KC_INT8 == 142, ""); -_Static_assert(KC_INT9 == 143, ""); -_Static_assert(KC_LANG3 == 146, ""); -_Static_assert(KC_LANG4 == 147, ""); -_Static_assert(KC_LANG5 == 148, ""); -_Static_assert(KC_LANG6 == 149, ""); -_Static_assert(KC_LANG7 == 150, ""); -_Static_assert(KC_LANG8 == 151, ""); -_Static_assert(KC_LANG9 == 152, ""); -_Static_assert(KC_ERAS == 153, ""); -_Static_assert(KC_SYSREQ == 154, ""); -_Static_assert(KC_CANCEL == 155, ""); -_Static_assert(KC_CLEAR == 156, ""); -_Static_assert(KC_CLR == 156, ""); -_Static_assert(KC_PRIOR == 157, ""); -_Static_assert(KC_OUT == 160, ""); -_Static_assert(KC_OPER == 161, ""); -_Static_assert(KC_CLEAR_AGAIN == 162, ""); -_Static_assert(KC_CRSEL == 163, ""); -_Static_assert(KC_EXSEL == 164, ""); -_Static_assert(KC_FN0 == 192, ""); -_Static_assert(KC_FN1 == 193, ""); -_Static_assert(KC_FN2 == 194, ""); -_Static_assert(KC_FN3 == 195, ""); -_Static_assert(KC_FN4 == 196, ""); -_Static_assert(KC_FN5 == 197, ""); -_Static_assert(KC_FN6 == 198, ""); -_Static_assert(KC_FN7 == 199, ""); -_Static_assert(KC_FN8 == 200, ""); -_Static_assert(KC_FN9 == 201, ""); -_Static_assert(KC_FN10 == 202, ""); -_Static_assert(KC_FN11 == 203, ""); -_Static_assert(KC_FN12 == 204, ""); -_Static_assert(KC_FN13 == 205, ""); -_Static_assert(KC_FN14 == 206, ""); -_Static_assert(KC_FN15 == 207, ""); -_Static_assert(KC_FN16 == 208, ""); -_Static_assert(KC_FN17 == 209, ""); -_Static_assert(KC_FN18 == 210, ""); -_Static_assert(KC_FN19 == 211, ""); -_Static_assert(KC_FN20 == 212, ""); -_Static_assert(KC_FN21 == 213, ""); -_Static_assert(KC_FN22 == 214, ""); -_Static_assert(KC_FN23 == 215, ""); -_Static_assert(KC_FN24 == 216, ""); -_Static_assert(KC_FN25 == 217, ""); -_Static_assert(KC_FN26 == 218, ""); -_Static_assert(KC_FN27 == 219, ""); -_Static_assert(KC_FN28 == 220, ""); -_Static_assert(KC_FN29 == 221, ""); -_Static_assert(KC_FN30 == 222, ""); -_Static_assert(KC_FN31 == 223, ""); -_Static_assert(RESET == 23552, ""); -_Static_assert(DEBUG == 23553, ""); -_Static_assert(MAGIC_TOGGLE_NKRO == 23572, ""); -_Static_assert(AU_ON == 23581, ""); -_Static_assert(AU_OFF == 23582, ""); -_Static_assert(AU_TOG == 23583, ""); -_Static_assert(CLICKY_TOGGLE == 23584, ""); -_Static_assert(CLICKY_ENABLE == 23585, ""); -_Static_assert(CLICKY_DISABLE == 23586, ""); -_Static_assert(CLICKY_UP == 23587, ""); -_Static_assert(CLICKY_DOWN == 23588, ""); -_Static_assert(CLICKY_RESET == 23589, ""); -_Static_assert(MU_ON == 23590, ""); -_Static_assert(MU_OFF == 23591, ""); -_Static_assert(MU_TOG == 23592, ""); -_Static_assert(MU_MOD == 23593, ""); +_Static_assert(MAGIC_TOGGLE_NKRO == 0x5C14, ""); + +_Static_assert(KC_GESC == 0x5C16, ""); + +_Static_assert(AU_ON == 0x5C1D, ""); +_Static_assert(AU_OFF == 0x5C1E, ""); +_Static_assert(AU_TOG == 0x5C1F, ""); + +_Static_assert(CLICKY_TOGGLE == 0x5C20, ""); +_Static_assert(CLICKY_ENABLE == 0x5C21, ""); +_Static_assert(CLICKY_DISABLE == 0x5C22, ""); +_Static_assert(CLICKY_UP == 0x5C23, ""); +_Static_assert(CLICKY_DOWN == 0x5C24, ""); +_Static_assert(CLICKY_RESET == 0x5C25, ""); +_Static_assert(MU_ON == 0x5C26, ""); +_Static_assert(MU_OFF == 0x5C27, ""); +_Static_assert(MU_TOG == 0x5C28, ""); +_Static_assert(MU_MOD == 0x5C29, ""); + +_Static_assert(BL_ON == 0x5CBB, ""); +_Static_assert(BL_OFF == 0x5CBC, ""); +_Static_assert(BL_DEC == 0x5CBD, ""); +_Static_assert(BL_INC == 0x5CBE, ""); +_Static_assert(BL_TOGG == 0x5CBF, ""); +_Static_assert(BL_STEP == 0x5CC0, ""); +_Static_assert(BL_BRTG == 0x5CC1, ""); +_Static_assert(RGB_TOG == 0x5CC2, ""); +_Static_assert(RGB_MOD == 0x5CC3, ""); +_Static_assert(RGB_RMOD == 0x5CC4, ""); +_Static_assert(RGB_HUI == 0x5CC5, ""); +_Static_assert(RGB_HUD == 0x5CC6, ""); +_Static_assert(RGB_SAI == 0x5CC7, ""); +_Static_assert(RGB_SAD == 0x5CC8, ""); +_Static_assert(RGB_VAI == 0x5CC9, ""); +_Static_assert(RGB_VAD == 0x5CCA, ""); +_Static_assert(RGB_SPI == 0x5CCB, ""); +_Static_assert(RGB_SPD == 0x5CCC, ""); +_Static_assert(RGB_M_P == 0x5CCD, ""); +_Static_assert(RGB_M_B == 0x5CCE, ""); +_Static_assert(RGB_M_R == 0x5CCF, ""); +_Static_assert(RGB_M_SW == 0x5CD0, ""); +_Static_assert(RGB_M_SN == 0x5CD1, ""); +_Static_assert(RGB_M_K == 0x5CD2, ""); +_Static_assert(RGB_M_X == 0x5CD3, ""); +_Static_assert(RGB_M_G == 0x5CD4, ""); +_Static_assert(RGB_M_T == 0x5CD5, ""); + +_Static_assert(KC_LSPO == 0x5CD7, ""); +_Static_assert(KC_RSPC == 0x5CD8, ""); +_Static_assert(KC_SFTENT == 0x5CD9, ""); + +_Static_assert(KC_LCPO == 0x5CF3, ""); +_Static_assert(KC_RCPC == 0x5CF4, ""); +_Static_assert(KC_LAPO == 0x5CF5, ""); +_Static_assert(KC_RAPC == 0x5CF6, ""); + +_Static_assert(FN_MO13 == 0x5F10, ""); +_Static_assert(FN_MO23 == 0x5F11, ""); +_Static_assert(MACRO00 == 0x5F12, ""); +_Static_assert(MACRO01 == 0x5F13, ""); +_Static_assert(MACRO02 == 0x5F14, ""); +_Static_assert(MACRO03 == 0x5F15, ""); +_Static_assert(MACRO04 == 0x5F16, ""); +_Static_assert(MACRO05 == 0x5F17, ""); +_Static_assert(MACRO06 == 0x5F18, ""); +_Static_assert(MACRO07 == 0x5F19, ""); +_Static_assert(MACRO08 == 0x5F1A, ""); +_Static_assert(MACRO09 == 0x5F1B, ""); +_Static_assert(MACRO10 == 0x5F1C, ""); +_Static_assert(MACRO11 == 0x5F1D, ""); +_Static_assert(MACRO12 == 0x5F1E, ""); +_Static_assert(MACRO13 == 0x5F1F, ""); +_Static_assert(MACRO14 == 0x5F20, ""); +_Static_assert(MACRO15 == 0x5F21, ""); + +_Static_assert(USER00 == 0x5F80, ""); +_Static_assert(USER01 == 0x5F81, ""); +_Static_assert(USER02 == 0x5F82, ""); +_Static_assert(USER03 == 0x5F83, ""); +_Static_assert(USER04 == 0x5F84, ""); +_Static_assert(USER05 == 0x5F85, ""); +_Static_assert(USER06 == 0x5F86, ""); +_Static_assert(USER07 == 0x5F87, ""); +_Static_assert(USER08 == 0x5F88, ""); +_Static_assert(USER09 == 0x5F89, ""); +_Static_assert(USER10 == 0x5F8A, ""); +_Static_assert(USER11 == 0x5F8B, ""); +_Static_assert(USER12 == 0x5F8C, ""); +_Static_assert(USER13 == 0x5F8D, ""); +_Static_assert(USER14 == 0x5F8E, ""); +_Static_assert(USER15 == 0x5F8F, ""); #endif diff --git a/quantum/virtser.h b/quantum/virtser.h new file mode 100644 index 00000000000..df7e87984c8 --- /dev/null +++ b/quantum/virtser.h @@ -0,0 +1,9 @@ +#pragma once + +void virtser_init(void); + +/* Define this function in your code to process incoming bytes */ +void virtser_recv(const uint8_t ch); + +/* Call this to send a character over the Virtual Serial Device */ +void virtser_send(const uint8_t byte); diff --git a/quantum/visualizer/LICENSE.md b/quantum/visualizer/LICENSE.md deleted file mode 100644 index 22d4c3f08b4..00000000000 --- a/quantum/visualizer/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -The files in this project are licensed under the MIT license -It uses the following libraries -uGFX - with it's own license, see the license.html file in the uGFX subfolder for more information -tmk_core - is indirectly used and not included in the repository. It's licensed under the GPLv2 license -Chibios - which is used by tmk_core is licensed under GPLv3. - -Therefore the effective license for any project using the library is GPLv3 - -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/quantum/visualizer/common_gfxconf.h b/quantum/visualizer/common_gfxconf.h deleted file mode 100644 index e0735b37d04..00000000000 --- a/quantum/visualizer/common_gfxconf.h +++ /dev/null @@ -1,354 +0,0 @@ -/** - * This file has a different license to the rest of the uGFX system. - * You can copy, modify and distribute this file as you see fit. - * You do not need to publish your source modifications to this file. - * The only thing you are not permitted to do is to relicense it - * under a different license. - */ - -/** - * Copy this file into your project directory and rename it as gfxconf.h - * Edit your copy to turn on the uGFX features you want to use. - * The values below are the defaults. - * - * Only remove the comments from lines where you want to change the - * default value. This allows definitions to be included from - * driver makefiles when required and provides the best future - * compatibility for your project. - * - * Please use spaces instead of tabs in this file. - */ - -#pragma once - -/////////////////////////////////////////////////////////////////////////// -// GFX - Compatibility options // -/////////////////////////////////////////////////////////////////////////// -//#define GFX_COMPAT_V2 GFXON -//#define GFX_COMPAT_OLDCOLORS GFXON - -/////////////////////////////////////////////////////////////////////////// -// GOS - One of these must be defined, preferably in your Makefile // -/////////////////////////////////////////////////////////////////////////// -//#define GFX_USE_OS_CHIBIOS GFXOFF -//#define GFX_USE_OS_FREERTOS GFXOFF -// #define GFX_FREERTOS_USE_TRACE GFXOFF -//#define GFX_USE_OS_WIN32 GFXOFF -//#define GFX_USE_OS_LINUX GFXOFF -//#define GFX_USE_OS_OSX GFXOFF -//#define GFX_USE_OS_ECOS GFXOFF -//#define GFX_USE_OS_RAWRTOS GFXOFF -//#define GFX_USE_OS_ARDUINO GFXOFF -//#define GFX_USE_OS_KEIL GFXOFF -//#define GFX_USE_OS_RTX5 GFXOFF -//#define GFX_USE_OS_CMSIS GFXOFF -//#define GFX_USE_OS_CMSIS2 GFXOFF -//#define GFX_USE_OS_RAW32 GFXOFF -//#define GFX_USE_OS_ZEPHYR GFXOFF -//#define GFX_USE_OS_NIOS GFXOFF -//#define GFX_USE_OS_QT GFXOFF -// #define INTERRUPTS_OFF() optional_code -// #define INTERRUPTS_ON() optional_code - -// Options that (should where relevant) apply to all operating systems -#define GFX_NO_INLINE GFXON -// #define GFX_COMPILER GFX_COMPILER_UNKNOWN -// #define GFX_SHOW_COMPILER GFXOFF -// #define GFX_CPU GFX_CPU_UNKNOWN -// #define GFX_CPU_NO_ALIGNMENT_FAULTS GFXOFF -// #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN -// #define GFX_OS_HEAP_SIZE 0 -// #define GFX_OS_NO_INIT GFXOFF -// #define GFX_OS_INIT_NO_WARNING GFXOFF -// #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine -// #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine -// #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine -// #define GFX_OS_CALL_UGFXMAIN GFXOFF -// #define GFX_OS_UGFXMAIN_STACKSIZE 0 -// #define GFX_EMULATE_MALLOC GFXOFF -// #define GFX_MEM_LT64K GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GDISP // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GDISP GFXON - -//#define GDISP_NEED_AUTOFLUSH GFXOFF -//#define GDISP_NEED_TIMERFLUSH GFXOFF -//#define GDISP_NEED_VALIDATION GFXON -//#define GDISP_NEED_CLIP GFXON -#define GDISP_NEED_CIRCLE GFXON -//#define GDISP_NEED_DUALCIRCLE GFXOFF -#define GDISP_NEED_ELLIPSE GFXON -#define GDISP_NEED_ARC GFXON -#define GDISP_NEED_ARCSECTORS GFXON -#define GDISP_NEED_CONVEX_POLYGON GFXON -//#define GDISP_NEED_SCROLL GFXOFF -#define GDISP_NEED_PIXELREAD GFXON -#define GDISP_NEED_CONTROL GFXON -//#define GDISP_NEED_QUERY GFXOFF -//#define GDISP_NEED_MULTITHREAD GFXOFF -//#define GDISP_NEED_STREAMING GFXOFF -#define GDISP_NEED_TEXT GFXON -// #define GDISP_NEED_TEXT_WORDWRAP GFXOFF -// #define GDISP_NEED_TEXT_BOXPADLR 1 -// #define GDISP_NEED_TEXT_BOXPADTB 1 -// #define GDISP_NEED_ANTIALIAS GFXOFF -// #define GDISP_NEED_UTF8 GFXOFF -#define GDISP_NEED_TEXT_KERNING GFXON -// #define GDISP_INCLUDE_FONT_UI1 GFXOFF -// #define GDISP_INCLUDE_FONT_UI2 GFXOFF // The smallest preferred font. -// #define GDISP_INCLUDE_FONT_LARGENUMBERS GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 GFXOFF -#define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 GFXON -// #define GDISP_INCLUDE_FONT_FIXED_10X20 GFXOFF -// #define GDISP_INCLUDE_FONT_FIXED_7X14 GFXOFF -#define GDISP_INCLUDE_FONT_FIXED_5X8 GFXON -// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA GFXOFF -// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA GFXOFF -// #define GDISP_INCLUDE_USER_FONTS GFXOFF - -//#define GDISP_NEED_IMAGE GFXOFF -// #define GDISP_NEED_IMAGE_NATIVE GFXOFF -// #define GDISP_NEED_IMAGE_GIF GFXOFF -// #define GDISP_IMAGE_GIF_BLIT_BUFFER_SIZE 32 -// #define GDISP_NEED_IMAGE_BMP GFXOFF -// #define GDISP_NEED_IMAGE_BMP_1 GFXON -// #define GDISP_NEED_IMAGE_BMP_4 GFXON -// #define GDISP_NEED_IMAGE_BMP_4_RLE GFXON -// #define GDISP_NEED_IMAGE_BMP_8 GFXON -// #define GDISP_NEED_IMAGE_BMP_8_RLE GFXON -// #define GDISP_NEED_IMAGE_BMP_16 GFXON -// #define GDISP_NEED_IMAGE_BMP_24 GFXON -// #define GDISP_NEED_IMAGE_BMP_32 GFXON -// #define GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE 32 -// #define GDISP_NEED_IMAGE_JPG GFXOFF -// #define GDISP_NEED_IMAGE_PNG GFXOFF -// #define GDISP_NEED_IMAGE_PNG_INTERLACED GFXOFF -// #define GDISP_NEED_IMAGE_PNG_TRANSPARENCY GFXON -// #define GDISP_NEED_IMAGE_PNG_BACKGROUND GFXON -// #define GDISP_NEED_IMAGE_PNG_ALPHACLIFF 32 -// #define GDISP_NEED_IMAGE_PNG_PALETTE_124 GFXON -// #define GDISP_NEED_IMAGE_PNG_PALETTE_8 GFXON -// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_124 GFXON -// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_8 GFXON -// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_16 GFXON -// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_8 GFXON -// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_16 GFXON -// #define GDISP_NEED_IMAGE_PNG_RGB_8 GFXON -// #define GDISP_NEED_IMAGE_PNG_RGB_16 GFXON -// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_8 GFXON -// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_16 GFXON -// #define GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE 32 -// #define GDISP_IMAGE_PNG_FILE_BUFFER_SIZE 8 -// #define GDISP_IMAGE_PNG_Z_BUFFER_SIZE 32768 -// #define GDISP_NEED_IMAGE_ACCOUNTING GFXOFF - -//#define GDISP_NEED_PIXMAP GFXOFF -// #define GDISP_NEED_PIXMAP_IMAGE GFXOFF - -//#define GDISP_DEFAULT_ORIENTATION gOrientationLandscape // If not defined the native hardware orientation is used. -//#define GDISP_LINEBUF_SIZE 128 -//#define GDISP_STARTUP_COLOR GFX_BLACK -#define GDISP_NEED_STARTUP_LOGO GFXOFF - -//#define GDISP_TOTAL_DISPLAYS 1 - -//#define GDISP_DRIVER_LIST GDISPVMT_Win32, GDISPVMT_Win32 -#ifdef GDISP_DRIVER_LIST -// // For code and speed optimization define as GFXON or GFXOFF if all controllers have the same capability -# define GDISP_HARDWARE_STREAM_WRITE GFXOFF -# define GDISP_HARDWARE_STREAM_READ GFXOFF -# define GDISP_HARDWARE_STREAM_POS GFXOFF -# define GDISP_HARDWARE_DRAWPIXEL GFXON -# define GDISP_HARDWARE_CLEARS GFXOFF -# define GDISP_HARDWARE_FILLS GFXOFF -//#define GDISP_HARDWARE_BITFILLS GFXOFF -# define GDISP_HARDWARE_SCROLL GFXOFF -# define GDISP_HARDWARE_PIXELREAD GFXON -# define GDISP_HARDWARE_CONTROL GFXON -# define GDISP_HARDWARE_QUERY GFXOFF -# define GDISP_HARDWARE_CLIP GFXOFF - -# define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 -#endif - -#define GDISP_USE_GFXNET GFXOFF -// #define GDISP_GFXNET_PORT 13001 -// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP GFXOFF -// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY GFXOFF -// #define GDISP_GFXNET_UNSAFE_SOCKETS GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GWIN // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GWIN GFXOFF - -//#define GWIN_NEED_WINDOWMANAGER GFXOFF -// #define GWIN_REDRAW_IMMEDIATE GFXOFF -// #define GWIN_REDRAW_SINGLEOP GFXOFF -// #define GWIN_NEED_FLASHING GFXOFF -// #define GWIN_FLASHING_PERIOD 250 - -//#define GWIN_NEED_CONSOLE GFXOFF -// #define GWIN_CONSOLE_USE_HISTORY GFXOFF -// #define GWIN_CONSOLE_HISTORY_AVERAGING GFXOFF -// #define GWIN_CONSOLE_HISTORY_ATCREATE GFXOFF -// #define GWIN_CONSOLE_ESCSEQ GFXOFF -// #define GWIN_CONSOLE_USE_BASESTREAM GFXOFF -// #define GWIN_CONSOLE_USE_FLOAT GFXOFF -//#define GWIN_NEED_GRAPH GFXOFF -//#define GWIN_NEED_GL3D GFXOFF - -//#define GWIN_NEED_WIDGET GFXOFF -//#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1 -// #define GWIN_NEED_LABEL GFXOFF -// #define GWIN_LABEL_ATTRIBUTE GFXOFF -// #define GWIN_NEED_BUTTON GFXOFF -// #define GWIN_BUTTON_LAZY_RELEASE GFXOFF -// #define GWIN_NEED_SLIDER GFXOFF -// #define GWIN_SLIDER_NOSNAP GFXOFF -// #define GWIN_SLIDER_DEAD_BAND 5 -// #define GWIN_SLIDER_TOGGLE_INC 20 -// #define GWIN_NEED_CHECKBOX GFXOFF -// #define GWIN_NEED_IMAGE GFXOFF -// #define GWIN_NEED_IMAGE_ANIMATION GFXOFF -// #define GWIN_NEED_RADIO GFXOFF -// #define GWIN_NEED_LIST GFXOFF -// #define GWIN_NEED_LIST_IMAGES GFXOFF -// #define GWIN_NEED_PROGRESSBAR GFXOFF -// #define GWIN_PROGRESSBAR_AUTO GFXOFF -// #define GWIN_NEED_KEYBOARD GFXOFF -// #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1 -// #define GWIN_NEED_KEYBOARD_ENGLISH1 GFXON -// #define GWIN_NEED_TEXTEDIT GFXOFF -// #define GWIN_FLAT_STYLING GFXOFF -// #define GWIN_WIDGET_TAGS GFXOFF - -//#define GWIN_NEED_CONTAINERS GFXOFF -// #define GWIN_NEED_CONTAINER GFXOFF -// #define GWIN_NEED_FRAME GFXOFF -// #define GWIN_NEED_TABSET GFXOFF -// #define GWIN_TABSET_TABHEIGHT 18 - -/////////////////////////////////////////////////////////////////////////// -// GTRANS // -/////////////////////////////////////////////////////////////////////////// -//#define GFX_USE_GTRANS GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GEVENT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GEVENT GFXON - -//#define GEVENT_ASSERT_NO_RESOURCE GFXOFF -//#define GEVENT_MAXIMUM_SIZE 32 -//#define GEVENT_MAX_SOURCE_LISTENERS 32 - -/////////////////////////////////////////////////////////////////////////// -// GTIMER // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GTIMER GFXOFF - -//#define GTIMER_THREAD_PRIORITY gThreadpriorityHigh -//#define GTIMER_THREAD_WORKAREA_SIZE 2048 - -/////////////////////////////////////////////////////////////////////////// -// GQUEUE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GQUEUE GFXOFF - -//#define GQUEUE_NEED_ASYNC GFXOFF -//#define GQUEUE_NEED_GSYNC GFXOFF -//#define GQUEUE_NEED_FSYNC GFXOFF -//#define GQUEUE_NEED_BUFFERS GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GINPUT // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GINPUT GFXOFF - -//#define GINPUT_NEED_MOUSE GFXOFF -// #define GINPUT_TOUCH_STARTRAW GFXOFF -// #define GINPUT_TOUCH_NOTOUCH GFXOFF -// #define GINPUT_TOUCH_NOCALIBRATE GFXOFF -// #define GINPUT_TOUCH_NOCALIBRATE_GUI GFXOFF -// #define GINPUT_MOUSE_POLL_PERIOD 25 -// #define GINPUT_MOUSE_CLICK_TIME 300 -// #define GINPUT_TOUCH_CXTCLICK_TIME 700 -// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD GFXOFF -// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE GFXOFF -// #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32 -// #define GINPUT_TOUCH_CALIBRATION_FONT1 "* Double" -// #define GINPUT_TOUCH_CALIBRATION_FONT2 "* Narrow" -// #define GINPUT_TOUCH_CALIBRATION_TITLE "Calibration" -// #define GINPUT_TOUCH_CALIBRATION_ERROR "Calibration Failed!" -//#define GINPUT_NEED_KEYBOARD GFXOFF -// #define GINPUT_KEYBOARD_POLL_PERIOD 200 -// #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32 -// #define GKEYBOARD_LAYOUT_OFF GFXOFF -// #define GKEYBOARD_LAYOUT_SCANCODE2_US GFXOFF -//#define GINPUT_NEED_TOGGLE GFXOFF -//#define GINPUT_NEED_DIAL GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GFILE // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GFILE GFXOFF - -//#define GFILE_NEED_PRINTG GFXOFF -//#define GFILE_NEED_SCANG GFXOFF -//#define GFILE_NEED_STRINGS GFXOFF -//#define GFILE_NEED_FILELISTS GFXOFF -//#define GFILE_NEED_STDIO GFXOFF -//#define GFILE_NEED_NOAUTOMOUNT GFXOFF -//#define GFILE_NEED_NOAUTOSYNC GFXOFF - -//#define GFILE_NEED_MEMFS GFXOFF -//#define GFILE_NEED_ROMFS GFXOFF -//#define GFILE_NEED_RAMFS GFXOFF -//#define GFILE_NEED_FATFS GFXOFF -//#define GFILE_NEED_NATIVEFS GFXOFF -//#define GFILE_NEED_CHBIOSFS GFXOFF -//#define GFILE_NEED_USERFS GFXOFF - -//#define GFILE_ALLOW_FLOATS GFXOFF -//#define GFILE_ALLOW_DEVICESPECIFIC GFXOFF -//#define GFILE_MAX_GFILES 3 - -/////////////////////////////////////////////////////////////////////////// -// GADC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GADC GFXOFF -// #define GADC_MAX_LOWSPEED_DEVICES 4 - -/////////////////////////////////////////////////////////////////////////// -// GAUDIO // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GAUDIO GFXOFF -// #define GAUDIO_NEED_PLAY GFXOFF -// #define GAUDIO_NEED_RECORD GFXOFF - -/////////////////////////////////////////////////////////////////////////// -// GMISC // -/////////////////////////////////////////////////////////////////////////// -#define GFX_USE_GMISC GFXON - -//#define GMISC_NEED_ARRAYOPS GFXOFF -//#define GMISC_NEED_FASTTRIG GFXOFF -//#define GMISC_NEED_FIXEDTRIG GFXOFF -//#define GMISC_NEED_INVSQRT GFXOFF -// #define GMISC_INVSQRT_MIXED_ENDIAN GFXOFF -// #define GMISC_INVSQRT_REAL_SLOW GFXOFF -#define GMISC_NEED_MATRIXFLOAT2D GFXON -#define GMISC_NEED_MATRIXFIXED2D GFXOFF -//#define GMISC_NEED_HITTEST_POLY GFXOFF diff --git a/quantum/visualizer/default_animations.c b/quantum/visualizer/default_animations.c deleted file mode 100644 index 2f43c67cc87..00000000000 --- a/quantum/visualizer/default_animations.c +++ /dev/null @@ -1,177 +0,0 @@ -/* 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/>. - */ - -#if defined(VISUALIZER_ENABLE) - -# include "default_animations.h" -# include "visualizer.h" -# ifdef LCD_ENABLE -# include "lcd_keyframes.h" -# endif -# ifdef LCD_BACKLIGHT_ENABLE -# include "lcd_backlight_keyframes.h" -# endif - -# ifdef BACKLIGHT_ENABLE -# include "led_backlight_keyframes.h" -# endif - -# include "visualizer_keyframes.h" - -# if defined(LCD_ENABLE) || defined(LCD_BACKLIGHT_ENABLE) || defined(BACKLIGHT_ENABLE) - -static bool keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { -# ifdef LCD_ENABLE - lcd_keyframe_enable(animation, state); -# endif -# ifdef LCD_BACKLIGHT_ENABLE - lcd_backlight_keyframe_enable(animation, state); -# endif -# ifdef BACKLIGHT_ENABLE - led_backlight_keyframe_enable(animation, state); -# endif - return false; -} - -static bool keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { -# ifdef LCD_ENABLE - lcd_keyframe_disable(animation, state); -# endif -# ifdef LCD_BACKLIGHT_ENABLE - lcd_backlight_keyframe_disable(animation, state); -# endif -# ifdef BACKLIGHT_ENABLE - led_backlight_keyframe_disable(animation, state); -# endif - return false; -} - -static bool keyframe_fade_in(keyframe_animation_t* animation, visualizer_state_t* state) { - bool ret = false; -# ifdef LCD_BACKLIGHT_ENABLE - ret |= lcd_backlight_keyframe_animate_color(animation, state); -# endif -# ifdef BACKLIGHT_ENABLE - ret |= led_backlight_keyframe_fade_in_all(animation, state); -# endif - return ret; -} - -static bool keyframe_fade_out(keyframe_animation_t* animation, visualizer_state_t* state) { - bool ret = false; -# ifdef LCD_BACKLIGHT_ENABLE - ret |= lcd_backlight_keyframe_animate_color(animation, state); -# endif -# ifdef BACKLIGHT_ENABLE - ret |= led_backlight_keyframe_fade_out_all(animation, state); -# endif - return ret; -} - -// Don't worry, if the startup animation is long, you can use the keyboard like normal -// during that time -keyframe_animation_t default_startup_animation = { -# if LCD_ENABLE - .num_frames = 3, -# else - .num_frames = 2, -# endif - .loop = false, - .frame_lengths = {0, -# if LCD_ENABLE - 0, -# endif - gfxMillisecondsToTicks(5000)}, - .frame_functions = - { - keyframe_enable, -# if LCD_ENABLE - lcd_keyframe_draw_logo, -# endif - keyframe_fade_in, - }, -}; - -keyframe_animation_t default_suspend_animation = { -# if LCD_ENABLE - .num_frames = 3, -# else - .num_frames = 2, -# endif - .loop = false, - .frame_lengths = - { -# if LCD_ENABLE - 0, -# endif - gfxMillisecondsToTicks(1000), 0}, - .frame_functions = - { -# if LCD_ENABLE - lcd_keyframe_display_layer_text, -# endif - keyframe_fade_out, - keyframe_disable, - }, -}; -# endif - -# if defined(BACKLIGHT_ENABLE) -# define CROSSFADE_TIME 1000 -# define GRADIENT_TIME 3000 - -keyframe_animation_t led_test_animation = { - .num_frames = 14, - .loop = true, - .frame_lengths = - { - gfxMillisecondsToTicks(1000), // fade in - gfxMillisecondsToTicks(1000), // no op (leds on) - gfxMillisecondsToTicks(1000), // fade out - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom - 0, // mirror leds - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - gfxMillisecondsToTicks(GRADIENT_TIME), // top_to_bottom - 0, // normal leds - gfxMillisecondsToTicks(CROSSFADE_TIME), // crossfade - - }, - .frame_functions = - { - led_backlight_keyframe_fade_in_all, - keyframe_no_operation, - led_backlight_keyframe_fade_out_all, - led_backlight_keyframe_crossfade, - led_backlight_keyframe_left_to_right_gradient, - led_backlight_keyframe_crossfade, - led_backlight_keyframe_top_to_bottom_gradient, - led_backlight_keyframe_mirror_orientation, - led_backlight_keyframe_crossfade, - led_backlight_keyframe_left_to_right_gradient, - led_backlight_keyframe_crossfade, - led_backlight_keyframe_top_to_bottom_gradient, - led_backlight_keyframe_normal_orientation, - led_backlight_keyframe_crossfade, - }, -}; -# endif - -#endif diff --git a/quantum/visualizer/default_animations.h b/quantum/visualizer/default_animations.h deleted file mode 100644 index 9accd897745..00000000000 --- a/quantum/visualizer/default_animations.h +++ /dev/null @@ -1,27 +0,0 @@ -/* 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/>. - */ - -#pragma once - -#include "visualizer.h" - -// You can use these default animations, but of course you can also write your own custom ones instead -extern keyframe_animation_t default_startup_animation; -extern keyframe_animation_t default_suspend_animation; - -// An animation for testing and demonstrating the led support, should probably not be used for real world -// cases -extern keyframe_animation_t led_test_animation; diff --git a/quantum/visualizer/lcd_backlight.c b/quantum/visualizer/lcd_backlight.c deleted file mode 100644 index 23978974e3e..00000000000 --- a/quantum/visualizer/lcd_backlight.c +++ /dev/null @@ -1,87 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "lcd_backlight.h" -#include <math.h> - -static uint8_t current_hue = 0; -static uint8_t current_saturation = 0; -static uint8_t current_intensity = 0; -static uint8_t current_brightness = 0; - -void lcd_backlight_init(void) { - lcd_backlight_hal_init(); - lcd_backlight_color(current_hue, current_saturation, current_intensity); -} - -// This code is based on Brian Neltner's blogpost and example code -// "Why every LED light should be using HSI colorspace". -// http://blog.saikoled.com/post/43693602826/why-every-led-light-should-be-using-hsi -static void hsi_to_rgb(float h, float s, float i, uint16_t* r_out, uint16_t* g_out, uint16_t* b_out) { - unsigned int r, g, b; - h = fmodf(h, 360.0f); // cycle h around to 0-360 degrees - h = 3.14159f * h / 180.0f; // Convert to radians. - s = s > 0.0f ? (s < 1.0f ? s : 1.0f) : 0.0f; // clamp s and i to interval [0,1] - i = i > 0.0f ? (i < 1.0f ? i : 1.0f) : 0.0f; - - // Math! Thanks in part to Kyle Miller. - if (h < 2.09439f) { - r = 65535.0f * i / 3.0f * (1.0f + s * cos(h) / cosf(1.047196667f - h)); - g = 65535.0f * i / 3.0f * (1.0f + s * (1.0f - cosf(h) / cos(1.047196667f - h))); - b = 65535.0f * i / 3.0f * (1.0f - s); - } else if (h < 4.188787) { - h = h - 2.09439; - g = 65535.0f * i / 3.0f * (1.0f + s * cosf(h) / cosf(1.047196667f - h)); - b = 65535.0f * i / 3.0f * (1.0f + s * (1.0f - cosf(h) / cosf(1.047196667f - h))); - r = 65535.0f * i / 3.0f * (1.0f - s); - } else { - h = h - 4.188787; - b = 65535.0f * i / 3.0f * (1.0f + s * cosf(h) / cosf(1.047196667f - h)); - r = 65535.0f * i / 3.0f * (1.0f + s * (1.0f - cosf(h) / cosf(1.047196667f - h))); - g = 65535.0f * i / 3.0f * (1.0f - s); - } - *r_out = r > 65535 ? 65535 : r; - *g_out = g > 65535 ? 65535 : g; - *b_out = b > 65535 ? 65535 : b; -} - -void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity) { - uint16_t r, g, b; - float hue_f = 360.0f * (float)hue / 255.0f; - float saturation_f = (float)saturation / 255.0f; - float intensity_f = (float)intensity / 255.0f; - intensity_f *= (float)current_brightness / 255.0f; - hsi_to_rgb(hue_f, saturation_f, intensity_f, &r, &g, &b); - current_hue = hue; - current_saturation = saturation; - current_intensity = intensity; - lcd_backlight_hal_color(r, g, b); -} - -void lcd_backlight_brightness(uint8_t b) { - current_brightness = b; - lcd_backlight_color(current_hue, current_saturation, current_intensity); -} - -uint8_t lcd_get_backlight_brightness(void) { return current_brightness; } diff --git a/quantum/visualizer/lcd_backlight.h b/quantum/visualizer/lcd_backlight.h deleted file mode 100644 index 4ea5b146390..00000000000 --- a/quantum/visualizer/lcd_backlight.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> - -// Helper macros for storing hue, staturation and intensity as unsigned integers -#define LCD_COLOR(hue, saturation, intensity) (hue << 16 | saturation << 8 | intensity) -#define LCD_HUE(color) ((color >> 16) & 0xFF) -#define LCD_SAT(color) ((color >> 8) & 0xFF) -#define LCD_INT(color) (color & 0xFF) - -static inline uint32_t change_lcd_color_intensity(uint32_t color, uint8_t new_intensity) { return (color & 0xFFFFFF00) | new_intensity; } - -void lcd_backlight_init(void); -void lcd_backlight_color(uint8_t hue, uint8_t saturation, uint8_t intensity); -void lcd_backlight_brightness(uint8_t b); -uint8_t lcd_get_backlight_brightness(void); - -void lcd_backlight_hal_init(void); -void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b); diff --git a/quantum/visualizer/lcd_backlight_keyframes.c b/quantum/visualizer/lcd_backlight_keyframes.c deleted file mode 100644 index c13cce311d5..00000000000 --- a/quantum/visualizer/lcd_backlight_keyframes.c +++ /dev/null @@ -1,69 +0,0 @@ -/* 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 "lcd_backlight_keyframes.h" - -bool lcd_backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state) { - int frame_length = animation->frame_lengths[animation->current_frame]; - int current_pos = frame_length - animation->time_left_in_frame; - uint8_t t_h = LCD_HUE(state->target_lcd_color); - uint8_t t_s = LCD_SAT(state->target_lcd_color); - uint8_t t_i = LCD_INT(state->target_lcd_color); - uint8_t p_h = LCD_HUE(state->prev_lcd_color); - uint8_t p_s = LCD_SAT(state->prev_lcd_color); - uint8_t p_i = LCD_INT(state->prev_lcd_color); - - uint8_t d_h1 = t_h - p_h; // Modulo arithmetic since we want to wrap around - int d_h2 = t_h - p_h; - // Chose the shortest way around - int d_h = abs(d_h2) < d_h1 ? d_h2 : d_h1; - int d_s = t_s - p_s; - int d_i = t_i - p_i; - - int hue = (d_h * current_pos) / frame_length; - int sat = (d_s * current_pos) / frame_length; - int intensity = (d_i * current_pos) / frame_length; - // dprintf("%X -> %X = %X\n", p_h, t_h, hue); - hue += p_h; - sat += p_s; - intensity += p_i; - state->current_lcd_color = LCD_COLOR(hue, sat, intensity); - lcd_backlight_color(LCD_HUE(state->current_lcd_color), LCD_SAT(state->current_lcd_color), LCD_INT(state->current_lcd_color)); - - return true; -} - -bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - state->prev_lcd_color = state->target_lcd_color; - state->current_lcd_color = state->target_lcd_color; - lcd_backlight_color(LCD_HUE(state->current_lcd_color), LCD_SAT(state->current_lcd_color), LCD_INT(state->current_lcd_color)); - return false; -} - -bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - (void)state; - lcd_backlight_hal_color(0, 0, 0); - return false; -} - -bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - (void)state; - lcd_backlight_color(LCD_HUE(state->current_lcd_color), LCD_SAT(state->current_lcd_color), LCD_INT(state->current_lcd_color)); - return false; -} diff --git a/quantum/visualizer/lcd_backlight_keyframes.h b/quantum/visualizer/lcd_backlight_keyframes.h deleted file mode 100644 index 88768dd4a50..00000000000 --- a/quantum/visualizer/lcd_backlight_keyframes.h +++ /dev/null @@ -1,27 +0,0 @@ -/* 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/>. - */ - -#pragma once - -#include "visualizer.h" - -// Animates the LCD backlight color between the current color and the target color (of the state) -bool lcd_backlight_keyframe_animate_color(keyframe_animation_t* animation, visualizer_state_t* state); -// Sets the backlight color to the target color -bool lcd_backlight_keyframe_set_color(keyframe_animation_t* animation, visualizer_state_t* state); - -bool lcd_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); -bool lcd_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); diff --git a/quantum/visualizer/lcd_keyframes.c b/quantum/visualizer/lcd_keyframes.c deleted file mode 100644 index 1d6f3dca18a..00000000000 --- a/quantum/visualizer/lcd_keyframes.c +++ /dev/null @@ -1,184 +0,0 @@ -/* 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 "lcd_keyframes.h" -#include <string.h> -#include "action_util.h" -#include "led.h" -#include "resources/resources.h" - -bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - gdispClear(White); - gdispDrawString(0, 10, state->layer_text, state->font_dejavusansbold12, Black); - return false; -} - -static void format_layer_bitmap_string(uint16_t default_layer, uint16_t layer, char* buffer) { - for (int i = 0; i < 16; i++) { - uint32_t mask = (1u << i); - if (default_layer & mask) { - if (layer & mask) { - *buffer = 'B'; - } else { - *buffer = 'D'; - } - } else if (layer & mask) { - *buffer = '1'; - } else { - *buffer = '0'; - } - ++buffer; - - if (i == 3 || i == 7 || i == 11) { - *buffer = ' '; - ++buffer; - } - } - *buffer = 0; -} - -bool lcd_keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - const char* layer_help = "1=On D=Default B=Both"; - char layer_buffer[16 + 4]; // 3 spaces and one null terminator - gdispClear(White); - gdispDrawString(0, 0, layer_help, state->font_fixed5x8, Black); - format_layer_bitmap_string(state->status.default_layer, state->status.layer, layer_buffer); - gdispDrawString(0, 10, layer_buffer, state->font_fixed5x8, Black); - format_layer_bitmap_string(state->status.default_layer >> 16, state->status.layer >> 16, layer_buffer); - gdispDrawString(0, 20, layer_buffer, state->font_fixed5x8, Black); - return false; -} - -static void format_mods_bitmap_string(uint8_t mods, char* buffer) { - *buffer = ' '; - ++buffer; - - for (int i = 0; i < 8; i++) { - uint32_t mask = (1u << i); - if (mods & mask) { - *buffer = '1'; - } else { - *buffer = '0'; - } - ++buffer; - - if (i == 3) { - *buffer = ' '; - ++buffer; - } - } - *buffer = 0; -} - -bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - - const char* title = "Modifier states"; - const char* mods_header = " CSAG CSAG "; - char status_buffer[12]; - - gdispClear(White); - gdispDrawString(0, 0, title, state->font_fixed5x8, Black); - gdispDrawString(0, 10, mods_header, state->font_fixed5x8, Black); - format_mods_bitmap_string(state->status.mods, status_buffer); - gdispDrawString(0, 20, status_buffer, state->font_fixed5x8, Black); - - return false; -} - -#define LED_STATE_STRING_SIZE sizeof("NUM CAPS SCRL COMP KANA") - -static void get_led_state_string(char* output, visualizer_state_t* state) { - uint8_t pos = 0; - - if (state->status.leds & (1u << USB_LED_NUM_LOCK)) { - memcpy(output + pos, "NUM ", 4); - pos += 4; - } - if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { - memcpy(output + pos, "CAPS ", 5); - pos += 5; - } - if (state->status.leds & (1u << USB_LED_SCROLL_LOCK)) { - memcpy(output + pos, "SCRL ", 5); - pos += 5; - } - if (state->status.leds & (1u << USB_LED_COMPOSE)) { - memcpy(output + pos, "COMP ", 5); - pos += 5; - } - if (state->status.leds & (1u << USB_LED_KANA)) { - memcpy(output + pos, "KANA", 4); - pos += 4; - } - output[pos] = 0; -} - -bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - char output[LED_STATE_STRING_SIZE]; - get_led_state_string(output, state); - gdispClear(White); - gdispDrawString(0, 10, output, state->font_dejavusansbold12, Black); - return false; -} - -bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - gdispClear(White); - uint8_t y = 10; - if (state->status.leds) { - char output[LED_STATE_STRING_SIZE]; - get_led_state_string(output, state); - gdispDrawString(0, 1, output, state->font_dejavusansbold12, Black); - y = 17; - } - gdispDrawString(0, y, state->layer_text, state->font_dejavusansbold12, Black); - return false; -} - -bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - (void)animation; - // Read the uGFX documentation for information how to use the displays - // http://wiki.ugfx.org/index.php/Main_Page - gdispClear(Black); - - // You can use static variables for things that can't be found in the animation - // or state structs, here we use the image - - // gdispGBlitArea is a tricky function to use since it supports blitting part of the image - // if you have full screen image, then just use LCD_WIDTH and LCD_HEIGHT for both source and target dimensions - gdispGBlitArea(GDISP, 0, 0, 128, 32, 0, 0, LCD_WIDTH, (pixel_t*)resource_lcd_logo); - - return false; -} - -bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - (void)state; - gdispSetPowerMode(powerOff); - return false; -} - -bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - (void)state; - gdispSetPowerMode(powerOn); - return false; -} diff --git a/quantum/visualizer/lcd_keyframes.h b/quantum/visualizer/lcd_keyframes.h deleted file mode 100644 index b7125e83233..00000000000 --- a/quantum/visualizer/lcd_keyframes.h +++ /dev/null @@ -1,35 +0,0 @@ -/* 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/>. - */ - -#pragma once - -#include "visualizer.h" - -// Displays the layer text centered vertically on the screen -bool lcd_keyframe_display_layer_text(keyframe_animation_t* animation, visualizer_state_t* state); -// Displays a bitmap (0/1) of all the currently active layers -bool lcd_keyframe_display_layer_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); -// Displays a bitmap (0/1) of all the currently active mods -bool lcd_keyframe_display_mods_bitmap(keyframe_animation_t* animation, visualizer_state_t* state); -// Displays the keyboard led states (CAPS (Caps lock), NUM (Num lock), SCRL (Scroll lock), COMP (Compose), KANA) -bool lcd_keyframe_display_led_states(keyframe_animation_t* animation, visualizer_state_t* state); -// Displays both the layer text and the led states -bool lcd_keyframe_display_layer_and_led_states(keyframe_animation_t* animation, visualizer_state_t* state); -// Displays the QMK logo on the LCD screen -bool lcd_keyframe_draw_logo(keyframe_animation_t* animation, visualizer_state_t* state); - -bool lcd_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); -bool lcd_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); diff --git a/quantum/visualizer/led_backlight_keyframes.c b/quantum/visualizer/led_backlight_keyframes.c deleted file mode 100644 index 338ada52271..00000000000 --- a/quantum/visualizer/led_backlight_keyframes.c +++ /dev/null @@ -1,143 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ -#include "gfx.h" -#include <math.h> -#include "led_backlight_keyframes.h" - -static uint8_t fade_led_color(keyframe_animation_t* animation, int from, int to) { - int frame_length = animation->frame_lengths[animation->current_frame]; - int current_pos = frame_length - animation->time_left_in_frame; - int delta = to - from; - int luma = (delta * current_pos) / frame_length; - luma += from; - return luma; -} - -static void keyframe_fade_all_leds_from_to(keyframe_animation_t* animation, uint8_t from, uint8_t to) { - uint8_t luma = fade_led_color(animation, from, to); - color_t color = LUMA2COLOR(luma); - gdispGClear(LED_DISPLAY, color); -} - -// TODO: Should be customizable per keyboard -#define NUM_ROWS LED_HEIGHT -#define NUM_COLS LED_WIDTH - -static uint8_t crossfade_start_frame[NUM_ROWS][NUM_COLS]; -static uint8_t crossfade_end_frame[NUM_ROWS][NUM_COLS]; - -static uint8_t compute_gradient_color(float t, float index, float num) { - const float two_pi = M_PI * 2.0f; - float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; - float x = t * two_pi + normalized_index; - float v = 0.5 * (cosf(x) + 1.0f); - return (uint8_t)(255.0f * v); -} - -bool led_backlight_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - keyframe_fade_all_leds_from_to(animation, 0, 255); - return true; -} - -bool led_backlight_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - keyframe_fade_all_leds_from_to(animation, 255, 0); - return true; -} - -bool led_backlight_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i = 0; i < NUM_COLS; i++) { - uint8_t color = compute_gradient_color(t, i, NUM_COLS); - gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); - } - return true; -} - -bool led_backlight_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - float t = current_pos / frame_length; - for (int i = 0; i < NUM_ROWS; i++) { - uint8_t color = compute_gradient_color(t, i, NUM_ROWS); - gdispGDrawLine(LED_DISPLAY, 0, i, NUM_COLS - 1, i, LUMA2COLOR(color)); - } - return true; -} - -static void copy_current_led_state(uint8_t* dest) { - for (int i = 0; i < NUM_ROWS; i++) { - for (int j = 0; j < NUM_COLS; j++) { - dest[i * NUM_COLS + j] = gdispGGetPixelColor(LED_DISPLAY, j, i); - } - } -} -bool led_backlight_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - if (animation->first_update_of_frame) { - copy_current_led_state(&crossfade_start_frame[0][0]); - run_next_keyframe(animation, state); - copy_current_led_state(&crossfade_end_frame[0][0]); - } - for (int i = 0; i < NUM_ROWS; i++) { - for (int j = 0; j < NUM_COLS; j++) { - color_t color = LUMA2COLOR(fade_led_color(animation, crossfade_start_frame[i][j], crossfade_end_frame[i][j])); - gdispGDrawPixel(LED_DISPLAY, j, i, color); - } - } - return true; -} - -bool led_backlight_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - (void)animation; - gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_180); - return false; -} - -bool led_backlight_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - (void)animation; - gdispGSetOrientation(LED_DISPLAY, GDISP_ROTATE_0); - return false; -} - -bool led_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - (void)animation; - gdispGSetPowerMode(LED_DISPLAY, powerOff); - return false; -} - -bool led_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - (void)animation; - gdispGSetPowerMode(LED_DISPLAY, powerOn); - return false; -} diff --git a/quantum/visualizer/led_backlight_keyframes.h b/quantum/visualizer/led_backlight_keyframes.h deleted file mode 100644 index 90153be5eb6..00000000000 --- a/quantum/visualizer/led_backlight_keyframes.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include "visualizer.h" - -bool led_backlight_keyframe_fade_in_all(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_fade_out_all(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_left_to_right_gradient(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_top_to_bottom_gradient(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_crossfade(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_mirror_orientation(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_normal_orientation(keyframe_animation_t* animation, visualizer_state_t* state); - -bool led_backlight_keyframe_disable(keyframe_animation_t* animation, visualizer_state_t* state); -bool led_backlight_keyframe_enable(keyframe_animation_t* animation, visualizer_state_t* state); - -extern keyframe_animation_t led_test_animation; diff --git a/quantum/visualizer/readme.md b/quantum/visualizer/readme.md deleted file mode 100644 index 298efb742f2..00000000000 --- a/quantum/visualizer/readme.md +++ /dev/null @@ -1,18 +0,0 @@ -# A visualization library for the TMK keyboard firmware - -This library is designed to work together with the [TMK keyboard firmware](https://github.com/tmk/tmk_keyboard). Currently it only works for [Chibios](http://www.chibios.org/) - flavors, but it would be possible to add support for other configurations as well. The LCD display functionality is provided by the [uGFX library](https://ugfx.io/). - -## To use this library as a user -You can and should modify the visualizer\_user.c file. Check the comments in the file for more information. - -## To add this library to custom keyboard projects - -1. Add tmk_visualizer as a submodule to your project -1. Set VISUALIZER_DIR in the main keyboard project makefile to point to the submodule -1. Define LCD\_ENABLE and/or LCD\_BACKLIGHT\_ENABLE, to enable support -1. Include the visualizer.mk make file -1. Copy the files in the example\_integration folder to your keyboard project -1. All other files than the callback.c file are included automatically, so you will need to add callback.c to your makefile manually. If you already have a similar file in your project, you can just copy the functions instead of the whole file. -1. Edit the files to match your hardware. You might might want to read the Chibios and UGfx documentation, for more information. -1. If you enable LCD support you might also have to write a custom uGFX display driver, check the uGFX documentation for that. You probably also want to enable SPI support in your Chibios configuration. diff --git a/quantum/visualizer/resources/lcd_logo.c b/quantum/visualizer/resources/lcd_logo.c deleted file mode 100644 index 13bf734cb39..00000000000 --- a/quantum/visualizer/resources/lcd_logo.c +++ /dev/null @@ -1,45 +0,0 @@ -/* 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 "resources.h" - -// clang-format off - -// To generate an image array like this -// Ensure the image is 128 x 32 or smaller -// Convert the bitmap to a C array using a program like http://www.riuson.com/lcd-image-converter/ -// Ensure the the conversion process produces a monochrome format array - 1 bit/pixel, left to right, top to bottom -// Update array in the source code with the C array produced by the conversion program - -// The image below is generated from lcd_logo.png -__attribute__((weak)) const uint8_t resource_lcd_logo[512] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFE, 0xEE, 0xFE, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xEE, 0xF0, 0x01, 0xC6, 0x0D, 0x8C, 0x1F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xFE, 0xEE, 0xFE, 0x03, 0xE7, 0x1D, 0x9C, 0x1F, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1E, 0xEE, 0xF0, 0x06, 0x37, 0x1D, 0xB8, 0x18, 0x0B, 0x59, 0xC8, 0x09, 0xE5, 0x9E, 0x00, - 0x00, 0x1E, 0xEE, 0xF0, 0x06, 0x37, 0xBD, 0xF0, 0x18, 0x6F, 0x7F, 0xEC, 0x9B, 0x37, 0xB3, 0x00, 0x00, 0xFE, 0xEE, 0xFE, 0x06, 0x37, 0xBD, 0xE0, 0x1F, 0x6C, 0x66, 0x6D, 0xD8, 0x36, 0x33, 0x00, - 0x00, 0x1E, 0xEE, 0xF0, 0x06, 0x36, 0xED, 0xF0, 0x1F, 0x6C, 0x66, 0x6D, 0x59, 0xF6, 0x3E, 0x00, 0x00, 0x1F, 0x6D, 0xF0, 0x06, 0x36, 0xED, 0xB8, 0x18, 0x6C, 0x66, 0x67, 0x73, 0x36, 0x30, 0x00, - 0x00, 0xFF, 0x83, 0xFE, 0x03, 0xE6, 0x4D, 0x9C, 0x18, 0x6C, 0x66, 0x67, 0x73, 0x36, 0x1F, 0x00, 0x00, 0x1F, 0xEF, 0xF0, 0x01, 0xC6, 0x0D, 0x8C, 0x18, 0x6C, 0x66, 0x62, 0x21, 0xD6, 0x0E, 0x00, - 0x00, 0xFF, 0xEF, 0xFE, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x1F, 0xFF, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0xFF, 0xE0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x02, 0x92, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; diff --git a/quantum/visualizer/resources/lcd_logo.png b/quantum/visualizer/resources/lcd_logo.png deleted file mode 100644 index 178ef65f157..00000000000 Binary files a/quantum/visualizer/resources/lcd_logo.png and /dev/null differ diff --git a/quantum/visualizer/resources/resources.h b/quantum/visualizer/resources/resources.h deleted file mode 100644 index 5178fbe55a6..00000000000 --- a/quantum/visualizer/resources/resources.h +++ /dev/null @@ -1,23 +0,0 @@ -/* 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/>. - */ - -#pragma once - -#include <stdint.h> - -#ifdef LCD_ENABLE -extern const uint8_t resource_lcd_logo[]; -#endif diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c deleted file mode 100644 index 709affbb777..00000000000 --- a/quantum/visualizer/visualizer.c +++ /dev/null @@ -1,483 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "config.h" -#include "visualizer.h" -#include <string.h> -#ifdef PROTOCOL_CHIBIOS -# include <ch.h> -#endif - -#include "gfx.h" - -#ifdef LCD_BACKLIGHT_ENABLE -# include "lcd_backlight.h" -#endif - -//#define DEBUG_VISUALIZER - -#ifdef DEBUG_VISUALIZER -# include "debug.h" -#else -# include "nodebug.h" -#endif - -#ifdef SERIAL_LINK_ENABLE -# include "serial_link/protocol/transport.h" -# include "serial_link/system/serial_link.h" -#endif - -#include "action_util.h" - -// Define this in config.h -#ifndef VISUALIZER_THREAD_PRIORITY -// The visualizer needs gfx thread priorities -# define VISUALIZER_THREAD_PRIORITY (NORMAL_PRIORITY - 2) -#endif - -static visualizer_keyboard_status_t current_status = {.layer = 0xFFFFFFFF, - .default_layer = 0xFFFFFFFF, - .leds = 0xFFFFFFFF, -#ifdef BACKLIGHT_ENABLE - .backlight_level = 0, -#endif - .mods = 0xFF, - .suspended = false, -#ifdef VISUALIZER_USER_DATA_SIZE - .user_data = {0} -#endif -}; - -static bool same_status(visualizer_keyboard_status_t* status1, visualizer_keyboard_status_t* status2) { - return status1->layer == status2->layer && status1->default_layer == status2->default_layer && status1->mods == status2->mods && status1->leds == status2->leds && status1->suspended == status2->suspended -#ifdef BACKLIGHT_ENABLE - && status1->backlight_level == status2->backlight_level -#endif -#ifdef VISUALIZER_USER_DATA_SIZE - && memcmp(status1->user_data, status2->user_data, VISUALIZER_USER_DATA_SIZE) == 0 -#endif - ; -} - -static bool visualizer_enabled = false; - -#ifdef VISUALIZER_USER_DATA_SIZE -static uint8_t user_data[VISUALIZER_USER_DATA_SIZE]; -#endif - -#define MAX_SIMULTANEOUS_ANIMATIONS 4 -static keyframe_animation_t* animations[MAX_SIMULTANEOUS_ANIMATIONS] = {}; - -#ifdef SERIAL_LINK_ENABLE -MASTER_TO_ALL_SLAVES_OBJECT(current_status, visualizer_keyboard_status_t); - -static remote_object_t* remote_objects[] = { - REMOTE_OBJECT(current_status), -}; - -#endif - -GDisplay* LCD_DISPLAY = 0; -GDisplay* LED_DISPLAY = 0; - -#ifdef LCD_DISPLAY_NUMBER -__attribute__((weak)) GDisplay* get_lcd_display(void) { return gdispGetDisplay(LCD_DISPLAY_NUMBER); } -#endif - -#ifdef LED_DISPLAY_NUMBER -__attribute__((weak)) GDisplay* get_led_display(void) { return gdispGetDisplay(LED_DISPLAY_NUMBER); } -#endif - -void start_keyframe_animation(keyframe_animation_t* animation) { - animation->current_frame = -1; - animation->time_left_in_frame = 0; - animation->need_update = true; - int free_index = -1; - for (int i = 0; i < MAX_SIMULTANEOUS_ANIMATIONS; i++) { - if (animations[i] == animation) { - return; - } - if (free_index == -1 && animations[i] == NULL) { - free_index = i; - } - } - if (free_index != -1) { - animations[free_index] = animation; - } -} - -void stop_keyframe_animation(keyframe_animation_t* animation) { - animation->current_frame = animation->num_frames; - animation->time_left_in_frame = 0; - animation->need_update = true; - animation->first_update_of_frame = false; - animation->last_update_of_frame = false; - for (int i = 0; i < MAX_SIMULTANEOUS_ANIMATIONS; i++) { - if (animations[i] == animation) { - animations[i] = NULL; - return; - } - } -} - -void stop_all_keyframe_animations(void) { - for (int i = 0; i < MAX_SIMULTANEOUS_ANIMATIONS; i++) { - if (animations[i]) { - animations[i]->current_frame = animations[i]->num_frames; - animations[i]->time_left_in_frame = 0; - animations[i]->need_update = true; - animations[i]->first_update_of_frame = false; - animations[i]->last_update_of_frame = false; - animations[i] = NULL; - } - } -} - -static uint8_t get_num_running_animations(void) { - uint8_t count = 0; - for (int i = 0; i < MAX_SIMULTANEOUS_ANIMATIONS; i++) { - count += animations[i] ? 1 : 0; - } - return count; -} - -static bool update_keyframe_animation(keyframe_animation_t* animation, visualizer_state_t* state, systemticks_t delta, systemticks_t* sleep_time) { - // TODO: Clean up this messy code - dprintf("Animation frame%d, left %d, delta %d\n", animation->current_frame, animation->time_left_in_frame, delta); - if (animation->current_frame == animation->num_frames) { - animation->need_update = false; - return false; - } - if (animation->current_frame == -1) { - animation->current_frame = 0; - animation->time_left_in_frame = animation->frame_lengths[0]; - animation->need_update = true; - animation->first_update_of_frame = true; - } else { - animation->time_left_in_frame -= delta; - while (animation->time_left_in_frame <= 0) { - int left = animation->time_left_in_frame; - if (animation->need_update) { - animation->time_left_in_frame = 0; - animation->last_update_of_frame = true; - (*animation->frame_functions[animation->current_frame])(animation, state); - animation->last_update_of_frame = false; - } - animation->current_frame++; - animation->need_update = true; - animation->first_update_of_frame = true; - if (animation->current_frame == animation->num_frames) { - if (animation->loop) { - animation->current_frame = 0; - } else { - stop_keyframe_animation(animation); - return false; - } - } - delta = -left; - animation->time_left_in_frame = animation->frame_lengths[animation->current_frame]; - animation->time_left_in_frame -= delta; - } - } - if (animation->need_update) { - animation->need_update = (*animation->frame_functions[animation->current_frame])(animation, state); - animation->first_update_of_frame = false; - } - - systemticks_t wanted_sleep = animation->need_update ? gfxMillisecondsToTicks(10) : (unsigned)animation->time_left_in_frame; - if (wanted_sleep < *sleep_time) { - *sleep_time = wanted_sleep; - } - - return true; -} - -void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* state) { - int next_frame = animation->current_frame + 1; - if (next_frame == animation->num_frames) { - next_frame = 0; - } - keyframe_animation_t temp_animation = *animation; - temp_animation.current_frame = next_frame; - temp_animation.time_left_in_frame = animation->frame_lengths[next_frame]; - temp_animation.first_update_of_frame = true; - temp_animation.last_update_of_frame = false; - temp_animation.need_update = false; - visualizer_state_t temp_state = *state; - (*temp_animation.frame_functions[next_frame])(&temp_animation, &temp_state); -} - -// TODO: Optimize the stack size, this is probably way too big -static DECLARE_THREAD_STACK(visualizerThreadStack, 1024); -static DECLARE_THREAD_FUNCTION(visualizerThread, arg) { - (void)arg; - - GListener event_listener; - geventListenerInit(&event_listener); - geventAttachSource(&event_listener, (GSourceHandle)¤t_status, 0); - - visualizer_keyboard_status_t initial_status = { - .default_layer = 0xFFFFFFFF, - .layer = 0xFFFFFFFF, - .mods = 0xFF, - .leds = 0xFFFFFFFF, - .suspended = false, -#ifdef BACKLIGHT_ENABLE - .backlight_level = 0, -#endif -#ifdef VISUALIZER_USER_DATA_SIZE - .user_data = {0}, -#endif - }; - - visualizer_state_t state = {.status = initial_status, - .current_lcd_color = 0, -#ifdef LCD_ENABLE - .font_fixed5x8 = gdispOpenFont("fixed_5x8"), - .font_dejavusansbold12 = gdispOpenFont("DejaVuSansBold12") -#endif - }; - initialize_user_visualizer(&state); - state.prev_lcd_color = state.current_lcd_color; - -#ifdef LCD_BACKLIGHT_ENABLE - lcd_backlight_color(LCD_HUE(state.current_lcd_color), LCD_SAT(state.current_lcd_color), LCD_INT(state.current_lcd_color)); -#endif - - systemticks_t sleep_time = TIME_INFINITE; - systemticks_t current_time = gfxSystemTicks(); - bool force_update = true; - - while (true) { - systemticks_t new_time = gfxSystemTicks(); - systemticks_t delta = new_time - current_time; - current_time = new_time; - bool enabled = visualizer_enabled; - if (force_update || !same_status(&state.status, ¤t_status)) { - force_update = false; -#if BACKLIGHT_ENABLE - if (current_status.backlight_level != state.status.backlight_level) { - if (current_status.backlight_level != 0) { - gdispGSetPowerMode(LED_DISPLAY, powerOn); - uint16_t percent = (uint16_t)current_status.backlight_level * 100 / BACKLIGHT_LEVELS; - gdispGSetBacklight(LED_DISPLAY, percent); - } else { - gdispGSetPowerMode(LED_DISPLAY, powerOff); - } - state.status.backlight_level = current_status.backlight_level; - } -#endif - if (visualizer_enabled) { - if (current_status.suspended) { - stop_all_keyframe_animations(); - visualizer_enabled = false; - state.status = current_status; - user_visualizer_suspend(&state); - } else { - visualizer_keyboard_status_t prev_status = state.status; - state.status = current_status; - update_user_visualizer_state(&state, &prev_status); - } - state.prev_lcd_color = state.current_lcd_color; - } - } - if (!enabled && state.status.suspended && current_status.suspended == false) { - // Setting the status to the initial status will force an update - // when the visualizer is enabled again - state.status = initial_status; - state.status.suspended = false; - stop_all_keyframe_animations(); - user_visualizer_resume(&state); - state.prev_lcd_color = state.current_lcd_color; - } - sleep_time = TIME_INFINITE; - for (int i = 0; i < MAX_SIMULTANEOUS_ANIMATIONS; i++) { - if (animations[i]) { - update_keyframe_animation(animations[i], &state, delta, &sleep_time); - } - } -#ifdef BACKLIGHT_ENABLE - gdispGFlush(LED_DISPLAY); -#endif - -#ifdef LCD_ENABLE - gdispGFlush(LCD_DISPLAY); -#endif - -#ifdef EMULATOR - draw_emulator(); -#endif - // Enable the visualizer when the startup or the suspend animation has finished - if (!visualizer_enabled && state.status.suspended == false && get_num_running_animations() == 0) { - visualizer_enabled = true; - force_update = true; - sleep_time = 0; - } - - systemticks_t after_update = gfxSystemTicks(); - unsigned update_delta = after_update - current_time; - if (sleep_time != TIME_INFINITE) { - if (sleep_time > update_delta) { - sleep_time -= update_delta; - } else { - sleep_time = 0; - } - } - dprintf("Update took %d, last delta %d, sleep_time %d\n", update_delta, delta, sleep_time); -#ifdef PROTOCOL_CHIBIOS - // The gEventWait function really takes milliseconds, even if the documentation says ticks. - // Unfortunately there's no generic ugfx conversion from system time to milliseconds, - // so let's do it in a platform dependent way. - - // On windows the system ticks is the same as milliseconds anyway - if (sleep_time != TIME_INFINITE) { - sleep_time = TIME_I2MS(sleep_time); - } -#endif - geventEventWait(&event_listener, sleep_time); - } -#ifdef LCD_ENABLE - gdispCloseFont(state.font_fixed5x8); - gdispCloseFont(state.font_dejavusansbold12); -#endif - - return 0; -} - -void visualizer_init(void) { - gfxInit(); - -#ifdef LCD_BACKLIGHT_ENABLE - lcd_backlight_init(); -#endif - -#ifdef SERIAL_LINK_ENABLE - add_remote_objects(remote_objects, sizeof(remote_objects) / sizeof(remote_object_t*)); -#endif - -#ifdef LCD_ENABLE - LCD_DISPLAY = get_lcd_display(); -#endif - -#ifdef BACKLIGHT_ENABLE - LED_DISPLAY = get_led_display(); -#endif - - // We are using a low priority thread, the idea is to have it run only - // when the main thread is sleeping during the matrix scanning - gfxThreadCreate(visualizerThreadStack, sizeof(visualizerThreadStack), VISUALIZER_THREAD_PRIORITY, visualizerThread, NULL); -} - -void update_status(bool changed) { - if (changed) { - GSourceListener* listener = geventGetSourceListener((GSourceHandle)¤t_status, NULL); - if (listener) { - geventSendEvent(listener); - } - } -#ifdef SERIAL_LINK_ENABLE - static systime_t last_update = 0; - systime_t current_update = chVTGetSystemTimeX(); - systime_t delta = current_update - last_update; - if (changed || delta > TIME_MS2I(10)) { - last_update = current_update; - visualizer_keyboard_status_t* r = begin_write_current_status(); - *r = current_status; - end_write_current_status(); - } -#endif -} - -uint8_t visualizer_get_mods() { - uint8_t mods = get_mods(); - -#ifndef NO_ACTION_ONESHOT - if (!has_oneshot_mods_timed_out()) { - mods |= get_oneshot_mods(); - } -#endif - return mods; -} - -#ifdef VISUALIZER_USER_DATA_SIZE -void visualizer_set_user_data(void* u) { memcpy(user_data, u, VISUALIZER_USER_DATA_SIZE); } -#endif - -void visualizer_update(layer_state_t default_state, layer_state_t state, uint8_t mods, uint32_t leds) { - // Note that there's a small race condition here, the thread could read - // a state where one of these are set but not the other. But this should - // not really matter as it will be fixed during the next loop step. - // Alternatively a mutex could be used instead of the volatile variables - - bool changed = false; -#ifdef SERIAL_LINK_ENABLE - if (is_serial_link_connected()) { - visualizer_keyboard_status_t* new_status = read_current_status(); - if (new_status) { - if (!same_status(¤t_status, new_status)) { - changed = true; - current_status = *new_status; - } - } - } else { -#else - { -#endif - visualizer_keyboard_status_t new_status = { - .layer = state, - .default_layer = default_state, - .mods = mods, - .leds = leds, -#ifdef BACKLIGHT_ENABLE - .backlight_level = current_status.backlight_level, -#endif - .suspended = current_status.suspended, - }; -#ifdef VISUALIZER_USER_DATA_SIZE - memcpy(new_status.user_data, user_data, VISUALIZER_USER_DATA_SIZE); -#endif - if (!same_status(¤t_status, &new_status)) { - changed = true; - current_status = new_status; - } - } - update_status(changed); -} - -void visualizer_suspend(void) { - current_status.suspended = true; - update_status(true); -} - -void visualizer_resume(void) { - current_status.suspended = false; - update_status(true); -} - -#ifdef BACKLIGHT_ENABLE -void backlight_set(uint8_t level) { - current_status.backlight_level = level; - update_status(true); -} -#endif diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h deleted file mode 100644 index 627c80a305a..00000000000 --- a/quantum/visualizer/visualizer.h +++ /dev/null @@ -1,154 +0,0 @@ -/* -The MIT License (MIT) - -Copyright (c) 2016 Fred Sundvik - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdlib.h> -#include <stdint.h> -#include <stdbool.h> - -#include "config.h" -#include "gfx.h" -#include "action_layer.h" - -#ifdef LCD_BACKLIGHT_ENABLE -# include "lcd_backlight.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -// use this function to merge both real_mods and oneshot_mods in a uint16_t -uint8_t visualizer_get_mods(void); - -// This need to be called once at the start -void visualizer_init(void); -// This should be called at every matrix scan -void visualizer_update(layer_state_t default_state, layer_state_t state, uint8_t mods, uint32_t leds); - -// This should be called when the keyboard goes to suspend state -void visualizer_suspend(void); -// This should be called when the keyboard wakes up from suspend state -void visualizer_resume(void); - -// These functions are week, so they can be overridden by the keyboard -// if needed -GDisplay* get_lcd_display(void); -GDisplay* get_led_display(void); - -// For emulator builds, this function need to be implemented -#ifdef EMULATOR -void draw_emulator(void); -#endif - -// If you need support for more than 16 keyframes per animation, you can change this -#define MAX_VISUALIZER_KEY_FRAMES 16 - -struct keyframe_animation_t; - -typedef struct { - layer_state_t layer; - layer_state_t default_layer; - uint32_t leds; // See led.h for available statuses - uint8_t mods; - bool suspended; -#ifdef BACKLIGHT_ENABLE - uint8_t backlight_level; -#endif -#ifdef VISUALIZER_USER_DATA_SIZE - uint8_t user_data[VISUALIZER_USER_DATA_SIZE]; -#endif -} visualizer_keyboard_status_t; - -// The state struct is used by the various keyframe functions -// It's also used for setting the LCD color and layer text -// from the user customized code -typedef struct visualizer_state_t { - // The user code should primarily be modifying these - uint32_t target_lcd_color; - const char* layer_text; - - // The user visualizer(and animation functions) can read these - visualizer_keyboard_status_t status; - - // These are used by the animation functions - uint32_t current_lcd_color; - uint32_t prev_lcd_color; -#ifdef LCD_ENABLE - gFont font_fixed5x8; - gFont font_dejavusansbold12; -#endif -} visualizer_state_t; - -// Any custom keyframe function should have this signature -// return true to get continuous updates, otherwise you will only get one -// update per frame -typedef bool (*frame_func)(struct keyframe_animation_t*, visualizer_state_t*); - -// Represents a keyframe animation, so fields are internal to the system -// while others are meant to be initialized by the user code -typedef struct keyframe_animation_t { - // These should be initialized - int num_frames; - bool loop; - int frame_lengths[MAX_VISUALIZER_KEY_FRAMES]; - frame_func frame_functions[MAX_VISUALIZER_KEY_FRAMES]; - - // Used internally by the system, and can also be read by - // keyframe update functions - int current_frame; - int time_left_in_frame; - bool first_update_of_frame; - bool last_update_of_frame; - bool need_update; - -} keyframe_animation_t; - -extern GDisplay* LCD_DISPLAY; -extern GDisplay* LED_DISPLAY; - -void start_keyframe_animation(keyframe_animation_t* animation); -void stop_keyframe_animation(keyframe_animation_t* animation); -// This runs the next keyframe, but does not update the animation state -// Useful for crossfades for example -void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* state); - -// The master can set userdata which will be transferred to the slave -#ifdef VISUALIZER_USER_DATA_SIZE -void visualizer_set_user_data(void* user_data); -#endif - -// These functions have to be implemented by the user -// Called regularly each time the state has changed (but not every scan loop) -void update_user_visualizer_state(visualizer_state_t* state, visualizer_keyboard_status_t* prev_status); -// Called when the computer goes to suspend, will also stop calling update_user_visualizer_state -void user_visualizer_suspend(visualizer_state_t* state); -// You have to start at least one animation as a response to the following two functions -// When the animation has finished the visualizer will resume normal operation and start calling the -// update_user_visualizer_state again -// Called when the keyboard boots up -void initialize_user_visualizer(visualizer_state_t* state); -// Called when the computer resumes from a suspend -void user_visualizer_resume(visualizer_state_t* state); diff --git a/quantum/visualizer/visualizer.mk b/quantum/visualizer/visualizer.mk deleted file mode 100644 index 4c961ac59df..00000000000 --- a/quantum/visualizer/visualizer.mk +++ /dev/null @@ -1,123 +0,0 @@ -# The MIT License (MIT) -# -# Copyright (c) 2016 Fred Sundvik -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. - -define ADD_DRIVER - $(1)_DRIVER:=$(strip $($(1)_DRIVER)) - $(1)_WIDTH:=$(strip $($(1)_WIDTH)) - $(1)_HEIGHT:=$(strip $($(1)_HEIGHT)) - ifeq ($($(1)_DRIVER),) - $$(error $(1)_DRIVER is not defined) - endif - ifeq ($($(1)_WIDTH),) - $$(error $(1)_WIDTH is not defined) - endif - ifeq ($($(1)_HEIGHT),) - $$(error $(1)_HEIGHT is not defined) - endif - OPT_DEFS+=-D$(1)_WIDTH=$($(1)_WIDTH) - OPT_DEFS+=-D$(1)_HEIGHT=$($(1)_HEIGHT) - GFXDEFS+=-D$(1)_WIDTH=$($(1)_WIDTH) - GFXDEFS+=-D$(1)_HEIGHT=$($(1)_HEIGHT) - $(1)_DISPLAY_NUMBER:=$$(words $$(GDISP_DRIVER_LIST)) - OPT_DEFS+=-D$(1)_DISPLAY_NUMBER=$$($(1)_DISPLAY_NUMBER) - include $(TOP_DIR)/drivers/ugfx/gdisp/$($(1)_DRIVER)/driver.mk -endef - -GDISP_DRIVER_LIST:= - -SRC += $(VISUALIZER_DIR)/visualizer.c \ - $(VISUALIZER_DIR)/visualizer_keyframes.c -EXTRAINCDIRS += $(GFXINC) $(VISUALIZER_DIR) -GFXLIB = $(LIB_PATH)/ugfx -VPATH += $(VISUALIZER_PATH) - -OPT_DEFS += -DVISUALIZER_ENABLE - -ifdef LCD_ENABLE -OPT_DEFS += -DLCD_ENABLE -ULIBS += -lm -endif - -ifeq ($(strip $(LCD_ENABLE)), yes) - SRC += $(VISUALIZER_DIR)/lcd_keyframes.c - ifeq ($(strip $(LCD_BACKLIGHT_ENABLE)), yes) - OPT_DEFS += -DLCD_BACKLIGHT_ENABLE - SRC += $(VISUALIZER_DIR)/lcd_backlight.c - SRC += $(VISUALIZER_DIR)/lcd_backlight_keyframes.c - endif -# Note, that the linker will strip out any resources that are not actually in use -SRC += $(VISUALIZER_DIR)/resources/lcd_logo.c -$(eval $(call ADD_DRIVER,LCD)) -endif - -ifeq ($(strip $(BACKLIGHT_ENABLE)), yes) -SRC += $(VISUALIZER_DIR)/led_backlight_keyframes.c -$(eval $(call ADD_DRIVER,LED)) -endif - -SRC += $(VISUALIZER_DIR)/default_animations.c - -include $(GFXLIB)/gfx.mk -# For the common_gfxconf.h -GFXINC += quantum/visualizer - -GFXSRC := $(patsubst $(TOP_DIR)/%,%,$(GFXSRC)) -GFXDEFS := $(patsubst %,-D%,$(patsubst -D%,%,$(GFXDEFS))) - -GDISP_LIST_COMMA=, -GDISP_LIST_EMPTY= -GDISP_LIST_SPACE=$(GDISP_LIST_EMPTY) $(GDISP_LIST_EMPTY) - -GDISP_DRIVER_LIST := $(strip $(GDISP_DRIVER_LIST)) -GDISP_DRIVER_LIST := $(subst $(GDISP_LIST_SPACE),$(GDISP_LIST_COMMA),$(GDISP_DRIVER_LIST)) - -GFXDEFS +=-DGDISP_DRIVER_LIST="$(GDISP_DRIVER_LIST)" - -ifneq ("$(wildcard $(KEYMAP_PATH)/visualizer.c)","") - SRC += $(KEYMAP_PATH)/visualizer.c -else - VISUALIZER_1 := $(KEYBOARD_PATH_1)/visualizer.c - VISUALIZER_2 := $(KEYBOARD_PATH_2)/visualizer.c - VISUALIZER_3 := $(KEYBOARD_PATH_3)/visualizer.c - VISUALIZER_4 := $(KEYBOARD_PATH_4)/visualizer.c - VISUALIZER_5 := $(KEYBOARD_PATH_5)/visualizer.c - - ifneq ("$(wildcard $(VISUALIZER_5))","") - SRC += $(VISUALIZER_5) - endif - ifneq ("$(wildcard $(VISUALIZER_4))","") - SRC += $(VISUALIZER_4) - endif - ifneq ("$(wildcard $(VISUALIZER_3))","") - SRC += $(VISUALIZER_3) - endif - ifneq ("$(wildcard $(VISUALIZER_2))","") - SRC += $(VISUALIZER_2) - endif - ifneq ("$(wildcard $(VISUALIZER_1))","") - SRC += $(VISUALIZER_1) - endif -endif - -ifdef EMULATOR -UINCDIR += $(TMK_DIR)/common -endif diff --git a/quantum/visualizer/visualizer_keyframes.c b/quantum/visualizer/visualizer_keyframes.c deleted file mode 100644 index 8f6a7e15a45..00000000000 --- a/quantum/visualizer/visualizer_keyframes.c +++ /dev/null @@ -1,23 +0,0 @@ -/* 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 "visualizer_keyframes.h" - -bool keyframe_no_operation(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)animation; - (void)state; - return false; -} diff --git a/quantum/visualizer/visualizer_keyframes.h b/quantum/visualizer/visualizer_keyframes.h deleted file mode 100644 index c92ff161136..00000000000 --- a/quantum/visualizer/visualizer_keyframes.h +++ /dev/null @@ -1,23 +0,0 @@ -/* 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/>. - */ - -#pragma once - -#include "visualizer.h" - -// Some predefined keyframe functions that can be used by the user code -// Does nothing, useful for adding delays -bool keyframe_no_operation(keyframe_animation_t* animation, visualizer_state_t* state); diff --git a/quantum/wpm.c b/quantum/wpm.c index e711e9fe73e..925e2c416e7 100644 --- a/quantum/wpm.c +++ b/quantum/wpm.c @@ -21,13 +21,37 @@ // WPM Stuff static uint8_t current_wpm = 0; -static uint16_t wpm_timer = 0; +static uint32_t wpm_timer = 0; +#ifndef WPM_UNFILTERED +static uint32_t smoothing_timer = 0; +#endif -// This smoothing is 40 keystrokes -static const float wpm_smoothing = WPM_SMOOTHING; +/* The WPM calculation works by specifying a certain number of 'periods' inside + * a ring buffer, and we count the number of keypresses which occur in each of + * those periods. Then to calculate WPM, we add up all of the keypresses in + * the whole ring buffer, divide by the number of keypresses in a 'word', and + * then adjust for how much time is captured by our ring buffer. Right now + * the ring buffer is hardcoded below to be six half-second periods, accounting + * for a total WPM sampling period of up to three seconds of typing. + * + * Whenever our WPM drops to absolute zero due to no typing occurring within + * any contiguous three seconds, we reset and start measuring fresh, + * which lets our WPM immediately reach the correct value even before a full + * three second sampling buffer has been filled. + */ +#define MAX_PERIODS (WPM_SAMPLE_PERIODS) +#define PERIOD_DURATION (1000 * WPM_SAMPLE_SECONDS / MAX_PERIODS) +#define LATENCY (100) +static int8_t period_presses[MAX_PERIODS] = {0}; +static uint8_t current_period = 0; +static uint8_t periods = 1; -void set_current_wpm(uint8_t new_wpm) { current_wpm = new_wpm; } +#if !defined(WPM_UNFILTERED) +static uint8_t prev_wpm = 0; +static uint8_t next_wpm = 0; +#endif +void set_current_wpm(uint8_t new_wpm) { current_wpm = new_wpm; } uint8_t get_current_wpm(void) { return current_wpm; } bool wpm_keycode(uint16_t keycode) { return wpm_keycode_kb(keycode); } @@ -56,7 +80,7 @@ __attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) { } else if (keycode > 0xFF) { keycode = 0; } - if (keycode == KC_DEL || keycode == KC_BSPC) { + if (keycode == KC_DELETE || keycode == KC_BACKSPACE) { if (((get_mods() | get_oneshot_mods()) & MOD_MASK_CTRL) || weak_modded) { return WPM_ESTIMATED_WORD_SIZE; } else { @@ -68,33 +92,65 @@ __attribute__((weak)) uint8_t wpm_regress_count(uint16_t keycode) { } #endif +// Outside 'raw' mode we smooth results over time. + void update_wpm(uint16_t keycode) { if (wpm_keycode(keycode)) { - if (wpm_timer > 0) { - uint16_t latest_wpm = 60000 / timer_elapsed(wpm_timer) / WPM_ESTIMATED_WORD_SIZE; - if (latest_wpm > UINT8_MAX) { - latest_wpm = UINT8_MAX; - } - current_wpm += ceilf((latest_wpm - current_wpm) * wpm_smoothing); - } - wpm_timer = timer_read(); + period_presses[current_period]++; } #ifdef WPM_ALLOW_COUNT_REGRESSION uint8_t regress = wpm_regress_count(keycode); if (regress) { - if (current_wpm < regress) { - current_wpm = 0; - } else { - current_wpm -= regress; - } - wpm_timer = timer_read(); + period_presses[current_period]--; } #endif } void decay_wpm(void) { - if (timer_elapsed(wpm_timer) > 1000) { - current_wpm += (-current_wpm) * wpm_smoothing; - wpm_timer = timer_read(); + int32_t presses = period_presses[0]; + for (int i = 1; i <= periods; i++) { + presses += period_presses[i]; + } + if (presses < 0) { + presses = 0; } + int32_t elapsed = timer_elapsed32(wpm_timer); + uint32_t duration = (((periods)*PERIOD_DURATION) + elapsed); + uint32_t wpm_now = (60000 * presses) / (duration * WPM_ESTIMATED_WORD_SIZE); + wpm_now = (wpm_now > 240) ? 240 : wpm_now; + + if (elapsed > PERIOD_DURATION) { + current_period = (current_period + 1) % MAX_PERIODS; + period_presses[current_period] = 0; + periods = (periods < MAX_PERIODS - 1) ? periods + 1 : MAX_PERIODS - 1; + elapsed = 0; + /* if (wpm_timer == 0) { */ + wpm_timer = timer_read32(); + /* } else { */ + /* wpm_timer += PERIOD_DURATION; */ + /* } */ + } + if (presses < 2) // don't guess high WPM based on a single keypress. + wpm_now = 0; + +#if defined WPM_LAUNCH_CONTROL + if (presses == 0) { + current_period = 0; + periods = 0; + wpm_now = 0; + } +#endif // WPM_LAUNCH_CONTROL + +#ifndef WPM_UNFILTERED + int32_t latency = timer_elapsed32(smoothing_timer); + if (latency > LATENCY) { + smoothing_timer = timer_read32(); + prev_wpm = current_wpm; + next_wpm = wpm_now; + } + + current_wpm = prev_wpm + (latency * ((int)next_wpm - (int)prev_wpm) / LATENCY); +#else + current_wpm = wpm_now; +#endif } diff --git a/quantum/wpm.h b/quantum/wpm.h index 4af52d2b989..c8e7d266841 100644 --- a/quantum/wpm.h +++ b/quantum/wpm.h @@ -22,8 +22,11 @@ #ifndef WPM_ESTIMATED_WORD_SIZE # define WPM_ESTIMATED_WORD_SIZE 5 #endif -#ifndef WPM_SMOOTHING -# define WPM_SMOOTHING 0.0487 +#ifndef WPM_SAMPLE_SECONDS +# define WPM_SAMPLE_SECONDS 5 +#endif +#ifndef WPM_SAMPLE_PERIODS +# define WPM_SAMPLE_PERIODS 50 #endif bool wpm_keycode(uint16_t keycode); diff --git a/requirements-dev.txt b/requirements-dev.txt index 1db3b6d7331..72137073381 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,4 +5,5 @@ nose2 flake8 pep8-naming +pyflakes yapf diff --git a/shell.nix b/shell.nix index c36df032de4..5023a3b0f71 100644 --- a/shell.nix +++ b/shell.nix @@ -14,7 +14,7 @@ let projectDir = ./util/nix; overrides = poetry2nix.overrides.withDefaults (self: super: { qmk = super.qmk.overridePythonAttrs(old: { - # Allow QMK CLI to run "bin/qmk" as a subprocess (the wrapper changes + # Allow QMK CLI to run "qmk" as a subprocess (the wrapper changes # $PATH and breaks these invocations). dontWrapPythonPrograms = true; }); diff --git a/show_options.mk b/show_options.mk deleted file mode 100644 index 60ae850cf85..00000000000 --- a/show_options.mk +++ /dev/null @@ -1,151 +0,0 @@ -BUILD_OPTION_NAMES = \ - BOOTMAGIC_ENABLE \ - MOUSEKEY_ENABLE \ - EXTRAKEY_ENABLE \ - CONSOLE_ENABLE \ - COMMAND_ENABLE \ - NKRO_ENABLE \ - TERMINAL_ENABLE \ - CUSTOM_MATRIX \ - DEBOUNCE_TYPE \ - SPLIT_KEYBOARD \ - DYNAMIC_KEYMAP_ENABLE \ - USB_HID_ENABLE \ - VIA_ENABLE - -HARDWARE_OPTION_NAMES = \ - SLEEP_LED_ENABLE \ - BACKLIGHT_ENABLE \ - BACKLIGHT_DRIVER \ - RGBLIGHT_ENABLE \ - RGBLIGHT_CUSTOM_DRIVER \ - RGB_MATRIX_ENABLE \ - RGB_MATRIX_DRIVER \ - SERIAL_LINK_ENABLE \ - CIE1931_CURVE \ - MIDI_ENABLE \ - BLUETOOTH_ENABLE \ - AUDIO_ENABLE \ - HD44780_ENABLE \ - ENCODER_ENABLE \ - LCD_ENABLE \ - LED_TABLES \ - POINTING_DEVICE_ENABLE \ - VISUALIZER_ENABLE \ - DIP_SWITCH_ENABLE - -OTHER_OPTION_NAMES = \ - UNICODE_ENABLE \ - UCIS_ENABLE \ - UNICODEMAP_ENABLE \ - UNICODE_COMMON \ - API_SYSEX_ENABLE \ - AUTO_SHIFT_ENABLE \ - AUTO_SHIFT_MODIFIERS \ - COMBO_ENABLE \ - KEY_LOCK_ENABLE \ - KEY_OVERRIDE_ENABLE \ - LEADER_ENABLE \ - PRINTING_ENABLE \ - STENO_ENABLE \ - TAP_DANCE_ENABLE \ - VIRTSER_ENABLE \ - OLED_ENABLE \ - OLED_DRIVER \ - LED_BACK_ENABLE \ - LED_UNDERGLOW_ENABLE \ - LED_ANIMATIONS \ - IOS_DEVICE_ENABLE \ - HELIX ZINC \ - ADAFRUIT_BLE_ENABLE \ - AUTOLOG_ENABLE \ - DEBUG_ENABLE \ - ENCODER_ENABLE_CUSTOM \ - GERMAN_ENABLE \ - HAPTIC_ENABLE \ - HHKB_RN42_ENABLE \ - ISSI_ENABLE \ - KEYLOGGER_ENABLE \ - LCD_BACKLIGHT_ENABLE \ - MACROS_ENABLED \ - PS2_MOUSE_ENABLE \ - RAW_ENABLE \ - SWAP_HANDS_ENABLE \ - RING_BUFFERED_6KRO_REPORT_ENABLE \ - WATCHDOG_ENABLE \ - XT_ENABLE \ - ERGOINU \ - NO_USB_STARTUP_CHECK \ - DISABLE_PROMICRO_LEDs \ - MITOSIS_DATAGROK_BOTTOMSPACE \ - MITOSIS_DATAGROK_SLOWUART \ - RGB_MATRIX_KEYPRESSES \ - LED_MIRRORED \ - RGBLIGHT_FULL_POWER \ - LTO_ENABLE - -define NAME_ECHO - @printf " %-30s = %-16s # %s\\n" "$1" "$($1)" "$(origin $1)" - -endef - -define YAML_NAME_ECHO - @echo ' $1 : "$(strip $($1))"' - -endef - -.PHONY: show_build_options0 show_build_options -show_build_options0: - @echo " KEYBOARD = $(KEYBOARD)" - @echo " KEYMAP = $(KEYMAP)" - @echo " MCU = $(MCU)" - @echo " MCU_SERIES = $(MCU_SERIES)" - @echo " PLATFORM = $(PLATFORM)" - @echo " BOOTLOADER = $(BOOTLOADER)" - @echo " FIRMWARE_FORMAT = $(FIRMWARE_FORMAT)" - @echo - @echo "Build Options:" - $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ - $(call NAME_ECHO,$(A_OPTION_NAME))) - -show_build_options: show_build_options0 - @echo - @echo "If you want to know more, please try 'show_all_features' or 'show_full_features'" - @echo - -.PHONY: show_all_features -show_all_features: show_build_options0 - @echo - @echo "Hardware Options:" - $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ - $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) - @echo - @echo "Other Options:" - $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ - $(if $($(A_OPTION_NAME)),$(call NAME_ECHO,$(A_OPTION_NAME)))) - -.PHONY: show_full_features -show_full_features: show_build_options0 - @echo - @echo "Hardware Options:" - $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ - $(call NAME_ECHO,$(A_OPTION_NAME))) - @echo - @echo "Other Options:" - $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ - $(call NAME_ECHO,$(A_OPTION_NAME))) - -.PHONY: yaml_build_options -yaml_build_options: - @echo '- KEYBOARD : "$(KEYBOARD)"' - @echo ' KEYMAP : "$(KEYMAP)"' - @echo ' MCU : "$(MCU)"' - @echo ' MCU_SERIES : "$(MCU_SERIES)"' - @echo ' PLATFORM : "$(PLATFORM)"' - @echo ' FIRMWARE_FORMAT : "$(FIRMWARE_FORMAT)"' - $(foreach A_OPTION_NAME,$(sort $(BUILD_OPTION_NAMES)),\ - $(call YAML_NAME_ECHO,$(A_OPTION_NAME))) - $(foreach A_OPTION_NAME,$(sort $(HARDWARE_OPTION_NAMES)),\ - $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) - $(foreach A_OPTION_NAME,$(sort $(OTHER_OPTION_NAMES)),\ - $(if $($(A_OPTION_NAME)),$(call YAML_NAME_ECHO,$(A_OPTION_NAME)))) diff --git a/testlist.mk b/testlist.mk index b66b93d2956..904485c15ce 100644 --- a/testlist.mk +++ b/testlist.mk @@ -1,10 +1,9 @@ -TEST_LIST = $(notdir $(patsubst %/rules.mk,%,$(wildcard $(ROOT_DIR)/tests/*/rules.mk))) -FULL_TESTS := $(TEST_LIST) +TEST_LIST = $(sort $(patsubst %/test.mk,%, $(shell find $(ROOT_DIR)tests -type f -name test.mk))) +FULL_TESTS := $(notdir $(TEST_LIST)) -include $(ROOT_DIR)/quantum/debounce/tests/testlist.mk -include $(ROOT_DIR)/quantum/sequencer/tests/testlist.mk -include $(ROOT_DIR)/quantum/serial_link/tests/testlist.mk -include $(ROOT_DIR)/tmk_core/common/test/testlist.mk +include $(QUANTUM_PATH)/debounce/tests/testlist.mk +include $(QUANTUM_PATH)/sequencer/tests/testlist.mk +include $(PLATFORM_PATH)/test/testlist.mk define VALIDATE_TEST_LIST ifneq ($1,) diff --git a/tests/auto_shift/config.h b/tests/auto_shift/config.h new file mode 100644 index 00000000000..4f343b45299 --- /dev/null +++ b/tests/auto_shift/config.h @@ -0,0 +1,19 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" \ No newline at end of file diff --git a/tests/auto_shift/test.mk b/tests/auto_shift/test.mk new file mode 100644 index 00000000000..4259c606e47 --- /dev/null +++ b/tests/auto_shift/test.mk @@ -0,0 +1,20 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- + +AUTO_SHIFT_ENABLE = yes \ No newline at end of file diff --git a/tests/auto_shift/test_auto_shift.cpp b/tests/auto_shift/test_auto_shift.cpp new file mode 100644 index 00000000000..9c5ed9a8326 --- /dev/null +++ b/tests/auto_shift/test_auto_shift.cpp @@ -0,0 +1,73 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class AutoShift : public TestFixture {}; + +TEST_F(AutoShift, key_release_before_timeout) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({regular_key}); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(AutoShift, key_release_after_timeout) { + TestDriver driver; + InSequence s; + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({regular_key}); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + idle_for(AUTO_SHIFT_TIMEOUT); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/basic/config.h b/tests/basic/config.h index 99bd62d991c..85fa9d691d0 100644 --- a/tests/basic/config.h +++ b/tests/basic/config.h @@ -16,5 +16,4 @@ #pragma once -#define MATRIX_ROWS 4 -#define MATRIX_COLS 10 +#include "test_common.h" \ No newline at end of file diff --git a/tests/basic/keymap.c b/tests/basic/keymap.c deleted file mode 100644 index 2b5747abb7c..00000000000 --- a/tests/basic/keymap.c +++ /dev/null @@ -1,45 +0,0 @@ -/* 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 "quantum.h" - -// Don't rearrange keys as existing tests might rely on the order -// Col2, Row 0 has to be KC_NO, because tests rely on it - -#define COMBO1 RSFT(LCTL(KC_O)) - -const uint16_t PROGMEM - keymaps[][MATRIX_ROWS][MATRIX_COLS] = - { - [0] = - { - // 0 1 2 3 4 5 6 7 8 9 - {KC_A, KC_B, KC_NO, KC_LSFT, KC_RSFT, KC_LCTL, COMBO1, SFT_T(KC_P), M(0), KC_NO}, - {KC_EQL, KC_PLUS, 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_C, KC_D, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO}, - }, -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch (id) { - case 0: - return MACRO(D(LSFT), T(H), U(LSFT), T(E), T(L), T(L), T(O), T(SPACE), W(100), D(LSFT), T(W), U(LSFT), I(10), T(O), T(R), T(L), T(D), D(LSFT), T(1), U(LSFT), END); - } - } - return MACRO_NONE; -}; diff --git a/tests/basic/rules.mk b/tests/basic/rules.mk deleted file mode 100644 index 9fb5d436109..00000000000 --- a/tests/basic/rules.mk +++ /dev/null @@ -1,16 +0,0 @@ -# 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/>. - -CUSTOM_MATRIX=yes diff --git a/tests/basic/test.mk b/tests/basic/test.mk new file mode 100644 index 00000000000..29690d1adf7 --- /dev/null +++ b/tests/basic/test.mk @@ -0,0 +1,18 @@ +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- \ No newline at end of file diff --git a/tests/basic/test_action_layer.cpp b/tests/basic/test_action_layer.cpp index d00a0859b9c..1b12d13642f 100644 --- a/tests/basic/test_action_layer.cpp +++ b/tests/basic/test_action_layer.cpp @@ -14,39 +14,54 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "gtest/gtest.h" +#include "keyboard_report_util.hpp" #include "test_common.hpp" using testing::_; -using testing::Return; +using testing::InSequence; class ActionLayer : public TestFixture {}; -// TEST_F(ActionLayer, LayerStateDBG) { -// layer_state_set(0); -// } - -// TEST_F(ActionLayer, LayerStateSet) { -// layer_state_set(0); -// EXPECT_EQ(layer_state, 0); -// layer_state_set(0b001100); -// EXPECT_EQ(layer_state, 0b001100); -// } - -// TEST_F(ActionLayer, LayerStateIs) { -// layer_state_set(0); -// EXPECT_EQ(layer_state_is(0), true); -// EXPECT_EQ(layer_state_is(1), true); -// layer_state_set(1); -// EXPECT_EQ(layer_state_is(0), true); -// EXPECT_EQ(layer_state_is(1), true); -// layer_state_set(2); -// EXPECT_EQ(layer_state_is(0), false); -// EXPECT_EQ(layer_state_is(1), false); -// EXPECT_EQ(layer_state_is(2), true); -// } +TEST_F(ActionLayer, LayerStateDBG) { + TestDriver driver; + + layer_state_set(0); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerStateSet) { + TestDriver driver; + + layer_state_set(0); + EXPECT_EQ(layer_state, 0); + layer_state_set(0b001100); + EXPECT_EQ(layer_state, 0b001100); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerStateIs) { + TestDriver driver; + + layer_state_set(0); + EXPECT_EQ(layer_state_is(0), true); + EXPECT_EQ(layer_state_is(1), false); + layer_state_set(1); + EXPECT_EQ(layer_state_is(0), true); + EXPECT_EQ(layer_state_is(1), false); + layer_state_set(2); + EXPECT_EQ(layer_state_is(0), false); + EXPECT_EQ(layer_state_is(1), true); + EXPECT_EQ(layer_state_is(2), false); + + testing::Mock::VerifyAndClearExpectations(&driver); +} TEST_F(ActionLayer, LayerStateCmp) { - uint32_t prev_layer; + TestDriver driver; + uint32_t prev_layer; prev_layer = 0; EXPECT_EQ(layer_state_cmp(prev_layer, 0), true); @@ -60,33 +75,339 @@ TEST_F(ActionLayer, LayerStateCmp) { EXPECT_EQ(layer_state_cmp(prev_layer, 0), false); EXPECT_EQ(layer_state_cmp(prev_layer, 1), true); EXPECT_EQ(layer_state_cmp(prev_layer, 2), false); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerClear) { + TestDriver driver; + + layer_clear(); + EXPECT_EQ(layer_state, 0); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerMove) { + TestDriver driver; + + layer_move(0); + EXPECT_EQ(layer_state, 1); + layer_move(3); + EXPECT_EQ(layer_state, 0b1000); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerOn) { + TestDriver driver; + + layer_clear(); + layer_on(1); + layer_on(3); + layer_on(3); + EXPECT_EQ(layer_state, 0b1010); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerOff) { + TestDriver driver; + + layer_clear(); + layer_on(1); + layer_on(3); + layer_off(3); + layer_off(2); + EXPECT_EQ(layer_state, 0b0010); + + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, MomentaryLayerDoesNothing) { + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, MO(1)}; + + set_keymap({layer_key}); + + /* Press and release MO, nothing should happen. */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, MomentaryLayerWithKeypress) { + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, MO(1)}; + + /* These keys must have the same position in the matrix, only the layer is different. */ + KeymapKey regular_key = KeymapKey{0, 1, 0, KC_A}; + set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}}); + + /* Press MO. */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press key on layer 1 */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))).Times(1); + regular_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release key on layer 1 */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + regular_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release MO */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, ToggleLayerDoesNothing) { + GTEST_SKIP() << "TODO: Toggle layer does not activate the expected layer on key press but on release."; + + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, TG(1)}; + + set_keymap({layer_key}); + + /* Press TG. Layer state should not change as it's applied on release. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release TG. */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, ToggleLayerUpAndDown) { + GTEST_SKIP() << "TODO: Toggle layer does not activate the expected layer on key press but on release."; + + TestDriver driver; + KeymapKey toggle_layer_1_on_layer_0 = KeymapKey{0, 0, 0, TG(1)}; + KeymapKey toggle_layer_0_on_layer_1 = KeymapKey{1, 1, 0, TG(0)}; + + set_keymap({toggle_layer_1_on_layer_0, toggle_layer_0_on_layer_1}); + + /* Toggle Layer 1. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + toggle_layer_1_on_layer_0.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + toggle_layer_1_on_layer_0.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Toggle Layer 0. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + toggle_layer_0_on_layer_1.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + toggle_layer_0_on_layer_1.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerTapToggleDoesNothing) { + GTEST_SKIP() << "TODO: Tap toggle layer does not activate the expected layer on key press."; + + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, TT(1)}; + + set_keymap({layer_key}); + + /* Press and release TT. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(0); + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerTapToggleWithKeypress) { + GTEST_SKIP() << "TODO: Tap toggle layer does not activate the expected layer on key press."; + + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, TT(1)}; + + /* These keys must have the same position in the matrix, only the layer is different. */ + KeymapKey regular_key = KeymapKey{0, 1, 0, KC_A}; + set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}}); + + /* Press TT. */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(0); + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))).Times(1); + regular_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + regular_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(ActionLayer, LayerTapToggleWithToggleWithKeypress) { + GTEST_SKIP() << "TODO: Tap toggle layer does not activate the expected layer on key press."; + + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, TT(1)}; + + /* These keys must have the same position in the matrix, only the layer is different. */ + KeymapKey regular_key = KeymapKey{0, 1, 0, KC_A}; + set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}}); + + /* Tap TT five times . */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(9); + + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + + layer_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + layer_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))).Times(1); + regular_key.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + regular_key.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); } -// TEST_F(ActionLayer, LayerClear) { -// layer_clear(); -// EXPECT_EQ(layer_state, 0); -// } - -// TEST_F(ActionLayer, LayerMove) { -// layer_move(0); -// EXPECT_EQ(layer_state, 1); -// layer_move(3); -// EXPECT_EQ(layer_state, 0b1000); -// } - -// TEST_F(ActionLayer, LayerOn) { -// layer_clear(); -// layer_on(1); -// layer_on(3); -// layer_on(3); -// EXPECT_EQ(layer_state, 0b1010); -// } - -// TEST_F(ActionLayer, LayerOff) { -// layer_clear(); -// layer_on(1); -// layer_on(3); -// layer_off(3); -// layer_off(2); -// EXPECT_EQ(layer_state, 0b1000); -// } +TEST_F(ActionLayer, LayerTapReleasedBeforeKeypressReleaseWithModifiers) { + GTEST_SKIP() << "TODO: Modifiers are erroneously discarded on layer changes, although a key that introduced the modifier is still held."; + TestDriver driver; + InSequence s; + + KeymapKey layer_0_key_0 = KeymapKey{0, 0, 0, LT(1, KC_T)}; + KeymapKey layer_1_key_1 = KeymapKey{1, 1, 0, RALT(KC_9)}; + + set_keymap({layer_0_key_0, layer_1_key_1}); + + /* Press layer tap and wait for tapping term to switch to layer 1 */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(0); + layer_0_key_0.press(); + idle_for(TAPPING_TERM); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press key with layer 1 mapping, result basically expected + * altough more reports are send then necessary. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RALT))).Times(1); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RALT, KC_9))).Times(1); + layer_1_key_1.press(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(1)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer tap key, no report is send because key is still held. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_0_key_0.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Unregister keycode and modifier. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RALT))).Times(1); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + layer_1_key_1.release(); + run_one_scan_loop(); + EXPECT_TRUE(layer_state_is(0)); + testing::Mock::VerifyAndClearExpectations(&driver); +} diff --git a/tests/basic/test_keypress.cpp b/tests/basic/test_keypress.cpp index ecd6e98e442..1c175c9d56a 100644 --- a/tests/basic/test_keypress.cpp +++ b/tests/basic/test_keypress.cpp @@ -14,11 +14,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "keycode.h" #include "test_common.hpp" using testing::_; using testing::InSequence; -using testing::Return; class KeyPress : public TestFixture {}; @@ -30,95 +30,156 @@ TEST_F(KeyPress, SendKeyboardIsNotCalledWhenNoKeyIsPressed) { TEST_F(KeyPress, CorrectKeyIsReportedWhenPressed) { TestDriver driver; - press_key(0, 0); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); + auto key = KeymapKey(0, 0, 0, KC_A); + + set_keymap({key}); + + key.press(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key.report_code))); keyboard_task(); - release_key(0, 0); + + key.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); } +TEST_F(KeyPress, ANonMappedKeyDoesNothing) { + TestDriver driver; + auto key = KeymapKey(0, 0, 0, KC_NO); + + set_keymap({key}); + + key.press(); + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + keyboard_task(); + keyboard_task(); +} + TEST_F(KeyPress, CorrectKeysAreReportedWhenTwoKeysArePressed) { TestDriver driver; - press_key(1, 0); - press_key(0, 3); + auto key_b = KeymapKey(0, 0, 0, KC_B); + auto key_c = KeymapKey(0, 1, 1, KC_C); + + set_keymap({key_b, key_c}); + + key_b.press(); + key_c.press(); // Note that QMK only processes one key at a time // See issue #1476 for more information - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_b.report_code))); keyboard_task(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B, KC_C))); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_b.report_code, key_c.report_code))); keyboard_task(); - release_key(1, 0); - release_key(0, 3); + + key_b.release(); + key_c.release(); // Note that the first key released is the first one in the matrix order - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_C))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_c.report_code))); keyboard_task(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - keyboard_task(); -} -TEST_F(KeyPress, ANonMappedKeyDoesNothing) { - TestDriver driver; - press_key(2, 0); - EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); - keyboard_task(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); } TEST_F(KeyPress, LeftShiftIsReportedCorrectly) { TestDriver driver; - press_key(3, 0); - press_key(0, 0); + auto key_a = KeymapKey(0, 0, 0, KC_A); + auto key_lsft = KeymapKey(0, 3, 0, KC_LSFT); + + set_keymap({key_a, key_lsft}); + + key_lsft.press(); + key_a.press(); + // Unfortunately modifiers are also processed in the wrong order // See issue #1476 for more information - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_a.report_code))); keyboard_task(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_a.report_code, key_lsft.report_code))); keyboard_task(); - release_key(0, 0); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + + key_a.release(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lsft.report_code))); keyboard_task(); - release_key(3, 0); + + key_lsft.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); } TEST_F(KeyPress, PressLeftShiftAndControl) { TestDriver driver; - press_key(3, 0); - press_key(5, 0); + auto key_lsft = KeymapKey(0, 3, 0, KC_LSFT); + auto key_lctrl = KeymapKey(0, 5, 0, KC_LCTRL); + + set_keymap({key_lctrl, key_lsft}); + + key_lsft.press(); + key_lctrl.press(); + // Unfortunately modifiers are also processed in the wrong order // See issue #1476 for more information - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lsft.report_code))); + keyboard_task(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lsft.report_code, key_lctrl.report_code))); keyboard_task(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_LCTRL))); + + key_lsft.release(); + key_lctrl.release(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lctrl.report_code))); + keyboard_task(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); } TEST_F(KeyPress, LeftAndRightShiftCanBePressedAtTheSameTime) { TestDriver driver; - press_key(3, 0); - press_key(4, 0); + auto key_lsft = KeymapKey(0, 3, 0, KC_LSFT); + auto key_rsft = KeymapKey(0, 4, 0, KC_RSFT); + + set_keymap({key_rsft, key_lsft}); + + key_lsft.press(); + key_rsft.press(); // Unfortunately modifiers are also processed in the wrong order // See issue #1476 for more information - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lsft.report_code))); + keyboard_task(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_lsft.report_code, key_rsft.report_code))); keyboard_task(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_RSFT))); + + key_lsft.release(); + key_rsft.release(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_rsft.report_code))); + keyboard_task(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); } TEST_F(KeyPress, RightShiftLeftControlAndCharWithTheSameKey) { TestDriver driver; - press_key(6, 0); + auto combo_key = KeymapKey(0, 0, 0, RSFT(LCTL(KC_O))); + + set_keymap({combo_key}); + // BUG: The press is split into two reports // BUG: It reports RSFT instead of LSFT // See issue #524 for more information // The underlying cause is that we use only one bit to represent the right hand // modifiers. + combo_key.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL, KC_O))); keyboard_task(); - release_key(6, 0); + + combo_key.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_RSFT, KC_RCTRL))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); keyboard_task(); @@ -127,25 +188,29 @@ TEST_F(KeyPress, RightShiftLeftControlAndCharWithTheSameKey) { TEST_F(KeyPress, PressPlusEqualReleaseBeforePress) { TestDriver driver; InSequence s; + auto key_plus = KeymapKey(0, 1, 1, KC_PLUS); + auto key_eql = KeymapKey(0, 0, 1, KC_EQL); - press_key(1, 1); // KC_PLUS + set_keymap({key_plus, key_eql}); + + key_plus.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(1, 1); // KC_PLUS + key_plus.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - press_key(0, 1); // KC_EQL - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); + key_eql.press(); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(key_eql.report_code))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(0, 1); // KC_EQL + key_eql.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -154,27 +219,31 @@ TEST_F(KeyPress, PressPlusEqualReleaseBeforePress) { TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) { TestDriver driver; InSequence s; + auto key_plus = KeymapKey(0, 1, 1, KC_PLUS); + auto key_eql = KeymapKey(0, 0, 1, KC_EQL); - press_key(1, 1); // KC_PLUS + set_keymap({key_plus, key_eql}); + + key_plus.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - press_key(0, 1); // KC_EQL + key_eql.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQUAL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(1, 1); // KC_PLS + key_plus.release(); // BUG: Should really still return KC_EQL, but this is fine too // It's also called twice for some reason EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(0, 1); // KC_EQL + key_eql.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); @@ -183,24 +252,28 @@ TEST_F(KeyPress, PressPlusEqualDontReleaseBeforePress) { TEST_F(KeyPress, PressEqualPlusReleaseBeforePress) { TestDriver driver; InSequence s; + auto key_plus = KeymapKey(0, 1, 1, KC_PLUS); + auto key_eql = KeymapKey(0, 0, 1, KC_EQL); - press_key(0, 1); // KC_EQL + set_keymap({key_plus, key_eql}); + + key_eql.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(0, 1); // KQ_EQL + key_eql.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - press_key(1, 1); // KC_PLUS + key_plus.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(1, 1); // KC_PLUS + key_plus.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); @@ -210,31 +283,35 @@ TEST_F(KeyPress, PressEqualPlusReleaseBeforePress) { TEST_F(KeyPress, PressEqualPlusDontReleaseBeforePress) { TestDriver driver; InSequence s; + auto key_plus = KeymapKey(0, 1, 1, KC_PLUS); + auto key_eql = KeymapKey(0, 0, 1, KC_EQL); + + set_keymap({key_plus, key_eql}); - press_key(0, 1); // KC_EQL + key_eql.press(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_EQL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - press_key(1, 1); // KC_PLUS + key_plus.press(); // BUG: The sequence is a bit strange, but it works, the end result is that // KC_PLUS is sent - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_EQL))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_EQUAL))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(0, 1); // KC_EQL + key_eql.release(); // I guess it's fine to still report shift here - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); - release_key(1, 1); // KC_PLUS + key_plus.release(); // This report is not needed - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); testing::Mock::VerifyAndClearExpectations(&driver); -} +} \ No newline at end of file diff --git a/tests/basic/test_macro.cpp b/tests/basic/test_macro.cpp index dc4a77796a7..ae2f3b32e3f 100644 --- a/tests/basic/test_macro.cpp +++ b/tests/basic/test_macro.cpp @@ -24,14 +24,29 @@ class Macro : public TestFixture {}; #define AT_TIME(t) WillOnce(InvokeWithoutArgs([current_time]() { EXPECT_EQ(timer_elapsed32(current_time), t); })) +extern "C" const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch (id) { + case 0: + return MACRO(D(LSFT), T(H), U(LSFT), T(E), T(L), T(L), T(O), T(SPACE), W(100), D(LSFT), T(W), U(LSFT), I(10), T(O), T(R), T(L), T(D), D(LSFT), T(1), U(LSFT), END); + } + } + return MACRO_NONE; +}; + TEST_F(Macro, PlayASimpleMacro) { TestDriver driver; InSequence s; - press_key(8, 0); + auto key_macro = KeymapKey(0, 8, 0, M(0)); + + set_keymap({key_macro}); + + key_macro.press(); + uint32_t current_time = timer_read32(); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(0); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_H))).AT_TIME(0); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_H))).AT_TIME(0); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_E))).AT_TIME(0); // The macro system could actually skip these empty keyboard reports @@ -45,9 +60,9 @@ TEST_F(Macro, PlayASimpleMacro) { EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_SPACE))).AT_TIME(0); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(0); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(100); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_W))).AT_TIME(100); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(100); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(100); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_W))).AT_TIME(100); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(100); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_O))) // BUG: The timer should not really have advanced 10 ms here @@ -63,9 +78,11 @@ TEST_F(Macro, PlayASimpleMacro) { EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(160); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_D))).AT_TIME(170); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(180); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(190); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_1))).AT_TIME(200); - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).AT_TIME(210); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(190); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT, KC_1))).AT_TIME(200); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).AT_TIME(210); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).AT_TIME(220); run_one_scan_loop(); + + key_macro.release(); } diff --git a/tests/basic/test_one_shot_keys.cpp b/tests/basic/test_one_shot_keys.cpp new file mode 100644 index 00000000000..98178912e4c --- /dev/null +++ b/tests/basic/test_one_shot_keys.cpp @@ -0,0 +1,197 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "action_util.h" +#include "keyboard_report_util.hpp" +#include "test_common.hpp" + +using testing::_; +using testing::InSequence; + +class OneShot : public TestFixture {}; +class OneShotParametrizedTestFixture : public ::testing::WithParamInterface<std::pair<KeymapKey, KeymapKey>>, public OneShot {}; + +TEST_F(OneShot, OSMWithoutAdditionalKeypressDoesNothing) { + TestDriver driver; + auto osm_key = KeymapKey(0, 0, 0, OSM(MOD_LSFT), KC_LSFT); + + set_keymap({osm_key}); + + /* Press and release OSM key*/ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osm_key.press(); + run_one_scan_loop(); + osm_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* OSM are added when an actual report is send */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(osm_key.report_code))); + send_keyboard_report(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Make unit-test pass */ + clear_oneshot_mods(); +} + +#if defined(ONESHOT_TIMEOUT) + +TEST_P(OneShotParametrizedTestFixture, OSMExpiredDoesNothing) { + TestDriver driver; + KeymapKey osm_key = GetParam().first; + KeymapKey regular_key = GetParam().second; + + set_keymap({osm_key, regular_key}); + + /* Press and release OSM */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osm_key.press(); + run_one_scan_loop(); + osm_key.release(); + idle_for(ONESHOT_TIMEOUT); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code))).Times(1); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +#endif + +TEST_P(OneShotParametrizedTestFixture, OSMWithAdditionalKeypress) { + TestDriver driver; + KeymapKey osm_key = GetParam().first; + KeymapKey regular_key = GetParam().second; + + set_keymap({osm_key, regular_key}); + + /* Press and release OSM */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osm_key.press(); + run_one_scan_loop(); + osm_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(osm_key.report_code, regular_key.report_code))).Times(1); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_P(OneShotParametrizedTestFixture, OSMAsRegularModifierWithAdditionalKeypress) { + TestDriver driver; + testing::InSequence s; + + KeymapKey osm_key = GetParam().first; + KeymapKey regular_key = GetParam().second; + + set_keymap({osm_key, regular_key}); + + /* Press OSM */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osm_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release OSM */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code, osm_key.report_code))).Times(1); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + osm_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// clang-format off + +INSTANTIATE_TEST_CASE_P( + OneShotModifierTests, + OneShotParametrizedTestFixture, + ::testing::Values( + /* first is osm key, second is regular key. */ + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LSFT), KC_LSFT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LCTL), KC_LCTL}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LALT), KC_LALT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LGUI), KC_LGUI}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RCTL), KC_RCTL}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RSFT), KC_RSFT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RALT), KC_RALT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RGUI), KC_RGUI}, KeymapKey{0, 1, 1, KC_A}) + )); +// clang-format on + +TEST_F(OneShot, OSLWithAdditionalKeypress) { + TestDriver driver; + InSequence s; + KeymapKey osl_key = KeymapKey{0, 0, 0, OSL(1)}; + KeymapKey regular_key = KeymapKey{1, 1, 0, KC_A}; + + set_keymap({osl_key, regular_key}); + + /* Press OSL key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osl_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release OSL key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); + osl_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code))).Times(2); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} diff --git a/tests/basic/test_tapping.cpp b/tests/basic/test_tapping.cpp index 30d032e9fdb..e4a7e4a9f3f 100644 --- a/tests/basic/test_tapping.cpp +++ b/tests/basic/test_tapping.cpp @@ -14,8 +14,11 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "keyboard_report_util.hpp" +#include "keycode.h" #include "test_common.hpp" #include "action_tapping.h" +#include "test_keymap_key.hpp" using testing::_; using testing::InSequence; @@ -25,14 +28,19 @@ class Tapping : public TestFixture {}; TEST_F(Tapping, TapA_SHFT_T_KeyReportsKey) { TestDriver driver; InSequence s; + auto key_shift_hold_p_tap = KeymapKey(0, 7, 0, SFT_T(KC_P)); + + set_keymap({key_shift_hold_p_tap}); - press_key(7, 0); // Tapping keys does nothing on press + key_shift_hold_p_tap.press(); EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); run_one_scan_loop(); - release_key(7, 0); + // First we get the key press + key_shift_hold_p_tap.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + // Then the release EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); run_one_scan_loop(); @@ -41,25 +49,38 @@ TEST_F(Tapping, TapA_SHFT_T_KeyReportsKey) { TEST_F(Tapping, HoldA_SHFT_T_KeyReportsShift) { TestDriver driver; InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 7, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + mod_tap_hold_key.press(); - press_key(7, 0); // Tapping keys does nothing on press EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); idle_for(TAPPING_TERM); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); run_one_scan_loop(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); } TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { // See issue #1478 for more information TestDriver driver; InSequence s; + auto key_shift_hold_p_tap = KeymapKey(0, 7, 0, SFT_T(KC_P)); + + set_keymap({key_shift_hold_p_tap}); - press_key(7, 0); // Tapping keys does nothing on press + key_shift_hold_p_tap.press(); EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); run_one_scan_loop(); - release_key(7, 0); + key_shift_hold_p_tap.release(); + // First we get the key press EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); // Then the release @@ -67,19 +88,20 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { run_one_scan_loop(); // This sends KC_P, even if it should do nothing - press_key(7, 0); + key_shift_hold_p_tap.press(); // This test should not succed if everything works correctly EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); run_one_scan_loop(); - release_key(7, 0); + + key_shift_hold_p_tap.release(); EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); idle_for(TAPPING_TERM + 1); // On the other hand, nothing is sent if we are outside the tapping term - press_key(7, 0); + key_shift_hold_p_tap.press(); EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); run_one_scan_loop(); - release_key(7, 0); + key_shift_hold_p_tap.release(); // First we get the key press EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); @@ -90,8 +112,12 @@ TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { // Now we are geting into strange territory, as the hold registers too early here // But the stranges part is: // If TAPPING_TERM + 1 above is changed to TAPPING_TERM or TAPPING_TERM + 2 it doesn't - press_key(7, 0); + key_shift_hold_p_tap.press(); // Shouldn't be called here really - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))).Times(1); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LEFT_SHIFT))).Times(1); idle_for(TAPPING_TERM); -} + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + key_shift_hold_p_tap.release(); + run_one_scan_loop(); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/default_mod_tap/config.h b/tests/tap_hold_configurations/default_mod_tap/config.h new file mode 100644 index 00000000000..5955b8600a8 --- /dev/null +++ b/tests/tap_hold_configurations/default_mod_tap/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/tests/tap_hold_configurations/default_mod_tap/test.mk b/tests/tap_hold_configurations/default_mod_tap/test.mk new file mode 100644 index 00000000000..cfab996e0ef --- /dev/null +++ b/tests/tap_hold_configurations/default_mod_tap/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- \ No newline at end of file diff --git a/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp b/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp new file mode 100644 index 00000000000..90befcdffd1 --- /dev/null +++ b/tests/tap_hold_configurations/default_mod_tap/test_tap_hold.cpp @@ -0,0 +1,230 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class DefaultTapHold : public TestFixture {}; + +TEST_F(DefaultTapHold, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_hold_key, regular_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Idle for tapping term of mod tap hold key. */ + idle_for(TAPPING_TERM - 3); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(DefaultTapHold, tap_mod_tap_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_hold_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_hold_key, second_mod_tap_hold_key}); + + /* Press first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + first_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + first_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(DefaultTapHold, tap_regular_key_while_layer_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + auto layer_key = KeymapKey(1, 2, 0, KC_B); + + set_keymap({layer_tap_hold_key, regular_key, layer_key}); + + /* Press layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(_)); + layer_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(DefaultTapHold, tap_mod_tap_hold_key_two_times) { + GTEST_SKIP() << "TODO:Holding a modtap key results in out of bounds access to the keymap, this is a bug in QMK."; + + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod-tap-hold key again. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(DefaultTapHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) { + GTEST_SKIP() << "TODO:Holding a modtap key results in out of bounds access to the keymap, this is a bug in QMK."; + + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod-tap-hold key again. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(DefaultTapHold, tap_and_hold_mod_tap_hold_key) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM + 1); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/ignore_mod_tap_interrupt/config.h b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/config.h new file mode 100644 index 00000000000..5955b8600a8 --- /dev/null +++ b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define IGNORE_MOD_TAP_INTERRUPT \ No newline at end of file diff --git a/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test.mk b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test.mk new file mode 100644 index 00000000000..efecca2c22f --- /dev/null +++ b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- diff --git a/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp new file mode 100644 index 00000000000..1702d604d31 --- /dev/null +++ b/tests/tap_hold_configurations/ignore_mod_tap_interrupt/test_tap_hold.cpp @@ -0,0 +1,136 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class IgnoreModTapInterrupt : public TestFixture {}; + +TEST_F(IgnoreModTapInterrupt, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_hold_key, regular_key}); + + /* Press mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(IgnoreModTapInterrupt, tap_mod_tap_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_hold_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_hold_key, second_mod_tap_hold_key}); + + /* Press first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + first_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + first_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + auto layer_key = KeymapKey(1, 2, 0, KC_B); + + set_keymap({layer_tap_hold_key, regular_key, layer_key}); + + /* Press layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P, regular_key.report_code))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + layer_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} diff --git a/tests/tap_hold_configurations/permissive_hold/config.h b/tests/tap_hold_configurations/permissive_hold/config.h new file mode 100644 index 00000000000..2d5a9849e7d --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/tests/tap_hold_configurations/permissive_hold/test.mk b/tests/tap_hold_configurations/permissive_hold/test.mk new file mode 100644 index 00000000000..efecca2c22f --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- diff --git a/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp b/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp new file mode 100644 index 00000000000..aa71ec397f8 --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold/test_one_shot_keys.cpp @@ -0,0 +1,76 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "action_util.h" +#include "keyboard_report_util.hpp" +#include "test_common.hpp" + +using testing::_; +using testing::InSequence; + +class OneShot : public TestFixture {}; +class OneShotParametrizedTestFixture : public ::testing::WithParamInterface<std::pair<KeymapKey, KeymapKey>>, public OneShot {}; + +TEST_P(OneShotParametrizedTestFixture, OSMAsRegularModifierWithAdditionalKeypress) { + TestDriver driver; + KeymapKey osm_key = GetParam().first; + KeymapKey regular_key = GetParam().second; + + set_keymap({osm_key, regular_key}); + + /* Press OSM */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + osm_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(osm_key.report_code))).Times(2); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(regular_key.report_code, osm_key.report_code))).Times(1); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release OSM */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + osm_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +// clang-format off + +INSTANTIATE_TEST_CASE_P( + OneShotModifierTests, + OneShotParametrizedTestFixture, + ::testing::Values( + /* first is osm key, second is regular key. */ + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LSFT), KC_LSFT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LCTL), KC_LCTL}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LALT), KC_LALT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_LGUI), KC_LGUI}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RCTL), KC_RCTL}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RSFT), KC_RSFT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RALT), KC_RALT}, KeymapKey{0, 1, 1, KC_A}), + std::make_pair(KeymapKey{0, 0, 0, OSM(MOD_RGUI), KC_RGUI}, KeymapKey{0, 1, 1, KC_A}) + )); +// clang-format on \ No newline at end of file diff --git a/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp b/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp new file mode 100644 index 00000000000..ab9dd1518bb --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold/test_tap_hold.cpp @@ -0,0 +1,132 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; +class PermissiveHold : public TestFixture {}; + +TEST_F(PermissiveHold, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_hold_key, regular_key}); + + /* Press mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, regular_key.report_code))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(PermissiveHold, tap_mod_tap_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_hold_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_hold_key, second_mod_tap_hold_key}); + + /* Press first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + first_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press second mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release second mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT, second_mod_tap_hold_key.report_code))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + second_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + first_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(PermissiveHold, tap_regular_key_while_layer_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + auto layer_key = KeymapKey(1, 2, 0, KC_B); + + set_keymap({layer_tap_hold_key, regular_key, layer_key}); + + /* Press layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(layer_key.report_code))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + layer_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/config.h b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/config.h new file mode 100644 index 00000000000..a6abd50bbee --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD \ No newline at end of file diff --git a/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test.mk b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test.mk new file mode 100644 index 00000000000..efecca2c22f --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- diff --git a/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp new file mode 100644 index 00000000000..67f394653f3 --- /dev/null +++ b/tests/tap_hold_configurations/permissive_hold_ignore_mod_tap_interrupt/test_tap_hold.cpp @@ -0,0 +1,134 @@ + +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class PermissiveHold_IgnoreModTapInterrupt : public TestFixture {}; + +TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_hold_key, regular_key}); + + /* Press mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_mod_tap_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_hold_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_hold_key, second_mod_tap_hold_key}); + + /* Press first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + first_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + second_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + first_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(PermissiveHold_IgnoreModTapInterrupt, tap_regular_key_while_layer_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + auto layer_key = KeymapKey(1, 2, 0, KC_B); + + set_keymap({layer_tap_hold_key, regular_key, layer_key}); + + /* Press layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_B))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + layer_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/retro_tapping/config.h b/tests/tap_hold_configurations/retro_tapping/config.h new file mode 100644 index 00000000000..4b38f2644b8 --- /dev/null +++ b/tests/tap_hold_configurations/retro_tapping/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define RETRO_TAPPING \ No newline at end of file diff --git a/tests/tap_hold_configurations/retro_tapping/test.mk b/tests/tap_hold_configurations/retro_tapping/test.mk new file mode 100644 index 00000000000..efecca2c22f --- /dev/null +++ b/tests/tap_hold_configurations/retro_tapping/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- diff --git a/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp b/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp new file mode 100644 index 00000000000..59ae77f7811 --- /dev/null +++ b/tests/tap_hold_configurations/retro_tapping/test_tap_hold.cpp @@ -0,0 +1,52 @@ + +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class RetroTapping : public TestFixture {}; + +TEST_F(RetroTapping, tap_and_hold_mod_tap_hold_key) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + /* TODO: Why is LSHIFT send at all? */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp b/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp new file mode 100644 index 00000000000..cf23df83171 --- /dev/null +++ b/tests/tap_hold_configurations/retro_tapping/test_tapping.cpp @@ -0,0 +1,112 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class Tapping : public TestFixture {}; + +TEST_F(Tapping, HoldA_SHFT_T_KeyReportsShift) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 7, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(Tapping, ANewTapWithinTappingTermIsBuggy) { + TestDriver driver; + InSequence s; + auto key_shift_hold_p_tap = KeymapKey(0, 7, 0, SFT_T(KC_P)); + + set_keymap({key_shift_hold_p_tap}); + + /* Press mod_tap_hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + key_shift_hold_p_tap.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod_tap_hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + key_shift_hold_p_tap.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod_tap_hold key again */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + key_shift_hold_p_tap.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod_tap_hold key again */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + key_shift_hold_p_tap.release(); + idle_for(TAPPING_TERM + 1); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod_tap_hold key again */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + key_shift_hold_p_tap.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod_tap_hold key again */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + key_shift_hold_p_tap.release(); + idle_for(TAPPING_TERM + 1); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod_tap_hold key again */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + key_shift_hold_p_tap.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod_tap_hold key again */ + /* TODO: Why is KC_LSFT send? */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + key_shift_hold_p_tap.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/tapping_force_hold/config.h b/tests/tap_hold_configurations/tapping_force_hold/config.h new file mode 100644 index 00000000000..3b4646338a3 --- /dev/null +++ b/tests/tap_hold_configurations/tapping_force_hold/config.h @@ -0,0 +1,21 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include "test_common.h" + +#define TAPPING_FORCE_HOLD \ No newline at end of file diff --git a/tests/tap_hold_configurations/tapping_force_hold/test.mk b/tests/tap_hold_configurations/tapping_force_hold/test.mk new file mode 100644 index 00000000000..efecca2c22f --- /dev/null +++ b/tests/tap_hold_configurations/tapping_force_hold/test.mk @@ -0,0 +1,18 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +# -------------------------------------------------------------------------------- +# Keep this file, even if it is empty, as a marker that this folder contains tests +# -------------------------------------------------------------------------------- diff --git a/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp b/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp new file mode 100644 index 00000000000..02416eed736 --- /dev/null +++ b/tests/tap_hold_configurations/tapping_force_hold/test_action_layer.cpp @@ -0,0 +1,81 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "test_common.hpp" + +using testing::_; +using testing::InSequence; + +class ActionLayer : public TestFixture {}; + +TEST_F(ActionLayer, LayerTapToggleWithToggleWithKeypress) { + TestDriver driver; + KeymapKey layer_key = KeymapKey{0, 0, 0, TT(1)}; + + /* These keys must have the same position in the matrix, only the layer is different. */ + KeymapKey regular_key = KeymapKey{0, 1, 0, KC_A}; + set_keymap({layer_key, regular_key, KeymapKey{1, 1, 0, KC_B}}); + + /* Tap TT five times . */ + /* TODO: QMK currently sends an empty report even if nothing needs to be reported to the host! */ + /* TODO: Tapping Force Hold breaks TT */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(10); + + layer_key.press(); + run_one_scan_loop(); + layer_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + + layer_key.press(); + run_one_scan_loop(); + layer_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + + layer_key.press(); + run_one_scan_loop(); + layer_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + + layer_key.press(); + run_one_scan_loop(); + layer_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + + layer_key.press(); + run_one_scan_loop(); + layer_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A))).Times(1); + regular_key.press(); + run_one_scan_loop(); + expect_layer_state(0); + testing::Mock::VerifyAndClearExpectations(&driver); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(1); + regular_key.release(); + run_one_scan_loop(); + expect_layer_state(0); + testing::Mock::VerifyAndClearExpectations(&driver); +} \ No newline at end of file diff --git a/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp b/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp new file mode 100644 index 00000000000..cb684296172 --- /dev/null +++ b/tests/tap_hold_configurations/tapping_force_hold/test_tap_hold.cpp @@ -0,0 +1,215 @@ + +/* Copyright 2021 Stefan Kerkmann + * + * 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 "keyboard_report_util.hpp" +#include "keycode.h" +#include "test_common.hpp" +#include "action_tapping.h" +#include "test_fixture.hpp" +#include "test_keymap_key.hpp" + +using testing::_; +using testing::InSequence; + +class TappingForceHold : public TestFixture {}; + +TEST_F(TappingForceHold, tap_regular_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + + set_keymap({mod_tap_hold_key, regular_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Idle for tapping term of mod tap hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + idle_for(TAPPING_TERM - 3); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(TappingForceHold, tap_mod_tap_key_while_mod_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto first_mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + auto second_mod_tap_hold_key = KeymapKey(0, 2, 0, RSFT_T(KC_A)); + + set_keymap({first_mod_tap_hold_key, second_mod_tap_hold_key}); + + /* Press first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + first_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release second tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + second_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release first mod-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + first_mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Idle for tapping term of first mod tap hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT, KC_A))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + idle_for(TAPPING_TERM - 3); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(TappingForceHold, tap_regular_key_while_layer_tap_key_is_held) { + TestDriver driver; + InSequence s; + auto layer_tap_hold_key = KeymapKey(0, 1, 0, LT(1, KC_P)); + auto regular_key = KeymapKey(0, 2, 0, KC_A); + auto layer_key = KeymapKey(1, 2, 0, KC_B); + + set_keymap({layer_tap_hold_key, regular_key, layer_key}); + + /* Press layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + layer_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release regular key */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + regular_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release layer-tap-hold key */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_A, KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(_)); + layer_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(TappingForceHold, tap_mod_tap_hold_key_two_times) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod-tap-hold key again. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} + +TEST_F(TappingForceHold, tap_mod_tap_hold_key_twice_and_hold_on_second_time) { + TestDriver driver; + InSequence s; + auto mod_tap_hold_key = KeymapKey(0, 1, 0, SFT_T(KC_P)); + + set_keymap({mod_tap_hold_key}); + + /* Press mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_P))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Press mod-tap-hold key again. */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + mod_tap_hold_key.press(); + idle_for(TAPPING_TERM); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Release mod-tap-hold key. */ + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport(KC_LSHIFT))); + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())); + mod_tap_hold_key.release(); + run_one_scan_loop(); + testing::Mock::VerifyAndClearExpectations(&driver); +} diff --git a/tests/test_common/build.mk b/tests/test_common/build.mk new file mode 100644 index 00000000000..aeb30578549 --- /dev/null +++ b/tests/test_common/build.mk @@ -0,0 +1,16 @@ +# Copyright 2021 Stefan Kerkmann +# +# 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/>. + +CUSTOM_MATRIX=yes \ No newline at end of file diff --git a/tests/test_common/keyboard_report_util.cpp b/tests/test_common/keyboard_report_util.cpp index f73cf239e05..e148c76beb7 100644 --- a/tests/test_common/keyboard_report_util.cpp +++ b/tests/test_common/keyboard_report_util.cpp @@ -44,16 +44,21 @@ bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs) { return lhs.mods == rhs.mods && lhskeys == rhskeys; } -std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value) { - stream << "Keyboard report:" << std::endl; - stream << "Mods: " << (uint32_t)value.mods << std::endl; - stream << "Keys: "; +std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& report) { + auto keys = get_keys(report); + // TODO: This should probably print friendly names for the keys - for (uint32_t k : get_keys(value)) { - stream << k << " "; + stream << "Keyboard Report: Mods (" << (uint32_t)report.mods << ") Keys ("; + + for (auto key = keys.cbegin(); key != keys.cend();) { + stream << +(*key); + key++; + if (key != keys.cend()) { + stream << ","; + } } - stream << std::endl; - return stream; + + return stream << ")" << std::endl; } KeyboardReportMatcher::KeyboardReportMatcher(const std::vector<uint8_t>& keys) { diff --git a/tests/test_common/keymap.c b/tests/test_common/keymap.c new file mode 100644 index 00000000000..fc3a56a0073 --- /dev/null +++ b/tests/test_common/keymap.c @@ -0,0 +1,33 @@ +/* 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 "quantum.h" + +// clang-format off + +const uint16_t PROGMEM + keymaps[][MATRIX_ROWS][MATRIX_COLS] = + { + [0] = + { + {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}, + }, +}; + +// clang-format on diff --git a/tests/test_common/test_common.h b/tests/test_common/test_common.h new file mode 100644 index 00000000000..19ffcddceae --- /dev/null +++ b/tests/test_common/test_common.h @@ -0,0 +1,4 @@ +#pragma once + +#define MATRIX_ROWS 4 +#define MATRIX_COLS 10 \ No newline at end of file diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp index 84e249d838e..2fa2b6a2e79 100644 --- a/tests/test_common/test_driver.cpp +++ b/tests/test_common/test_driver.cpp @@ -27,7 +27,10 @@ TestDriver::~TestDriver() { m_this = nullptr; } uint8_t TestDriver::keyboard_leds(void) { return m_this->m_leds; } -void TestDriver::send_keyboard(report_keyboard_t* report) { m_this->send_keyboard_mock(*report); } +void TestDriver::send_keyboard(report_keyboard_t* report) { + test_logger.trace() << *report; + m_this->send_keyboard_mock(*report); +} void TestDriver::send_mouse(report_mouse_t* report) { m_this->send_mouse_mock(*report); } diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp index f86308df95e..f9197b3634b 100644 --- a/tests/test_common/test_driver.hpp +++ b/tests/test_common/test_driver.hpp @@ -20,25 +20,26 @@ #include <stdint.h> #include "host.h" #include "keyboard_report_util.hpp" - +#include "test_logger.hpp" class TestDriver { -public: + public: TestDriver(); ~TestDriver(); void set_leds(uint8_t leds) { m_leds = leds; } - MOCK_METHOD1(send_keyboard_mock, void (report_keyboard_t&)); - MOCK_METHOD1(send_mouse_mock, void (report_mouse_t&)); - MOCK_METHOD1(send_system_mock, void (uint16_t)); - MOCK_METHOD1(send_consumer_mock, void (uint16_t)); -private: - static uint8_t keyboard_leds(void); - static void send_keyboard(report_keyboard_t *report); - static void send_mouse(report_mouse_t* report); - static void send_system(uint16_t data); - static void send_consumer(uint16_t data); - host_driver_t m_driver; - uint8_t m_leds = 0; + MOCK_METHOD1(send_keyboard_mock, void(report_keyboard_t&)); + MOCK_METHOD1(send_mouse_mock, void(report_mouse_t&)); + MOCK_METHOD1(send_system_mock, void(uint16_t)); + MOCK_METHOD1(send_consumer_mock, void(uint16_t)); + + private: + static uint8_t keyboard_leds(void); + static void send_keyboard(report_keyboard_t* report); + static void send_mouse(report_mouse_t* report); + static void send_system(uint16_t data); + static void send_consumer(uint16_t data); + host_driver_t m_driver; + uint8_t m_leds = 0; static TestDriver* m_this; }; diff --git a/tests/test_common/test_fixture.cpp b/tests/test_common/test_fixture.cpp index e041df7128d..0601b171913 100644 --- a/tests/test_common/test_fixture.cpp +++ b/tests/test_common/test_fixture.cpp @@ -1,26 +1,48 @@ #include "test_fixture.hpp" +#include <algorithm> +#include <cstdint> +#include <cstdio> +#include <cstdlib> +#include "gmock/gmock-cardinalities.h" #include "gmock/gmock.h" +#include "gtest/gtest.h" +#include "keyboard_report_util.hpp" +#include "keycode.h" #include "test_driver.hpp" +#include "test_logger.hpp" #include "test_matrix.h" -#include "keyboard.h" -#include "action.h" -#include "action_tapping.h" +#include "test_keymap_key.hpp" extern "C" { +#include "action.h" +#include "action_tapping.h" +#include "action_util.h" +#include "action_layer.h" #include "debug.h" #include "eeconfig.h" -#include "action_layer.h" +#include "keyboard.h" +#include "keymap.h" void set_time(uint32_t t); void advance_time(uint32_t ms); } using testing::_; -using testing::AnyNumber; -using testing::Between; -using testing::Return; + +/* This is used for dynamic dispatching keymap_key_to_keycode calls to the current active test_fixture. */ +TestFixture* TestFixture::m_this = nullptr; + +/* Override weak QMK function to allow the usage of isolated per-test keymaps in unit-tests. + * The actual call is dynamicaly dispatched to the current active test fixture, which in turn has it's own keymap. */ +extern "C" uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t position) { + uint16_t keycode; + TestFixture::m_this->get_keycode(layer, position, &keycode); + return keycode; +} void TestFixture::SetUpTestCase() { + test_logger.info() << "TestFixture setup-up start." << std::endl; + // The following is enough to bootstrap the values set in main eeconfig_init_quantum(); eeconfig_update_debug(debug_config.raw); @@ -28,23 +50,99 @@ void TestFixture::SetUpTestCase() { TestDriver driver; EXPECT_CALL(driver, send_keyboard_mock(_)); keyboard_init(); + + test_logger.info() << "TestFixture setup-up end." << std::endl; } void TestFixture::TearDownTestCase() {} -TestFixture::TestFixture() {} +TestFixture::TestFixture() { m_this = this; } TestFixture::~TestFixture() { + test_logger.info() << "TestFixture clean-up start." << std::endl; TestDriver driver; - // Run for a while to make sure all keys are completely released - EXPECT_CALL(driver, send_keyboard_mock(_)).Times(AnyNumber()); - layer_clear(); + + EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(2); + + /* Reset keyboard state. */ clear_all_keys(); - idle_for(TAPPING_TERM + 10); + + clear_keyboard(); + + clear_oneshot_mods(); + clear_oneshot_locked_mods(); + reset_oneshot_layer(); + + layer_clear(); + +#if defined(SWAP_HANDS_ENABLE) + clear_oneshot_swaphands(); +#endif + + idle_for(TAPPING_TERM * 10); + testing::Mock::VerifyAndClearExpectations(&driver); + + /* Verify that the matrix really is cleared */ + EXPECT_CALL(driver, send_keyboard_mock(_)).Times(0); + idle_for(TAPPING_TERM * 10); testing::Mock::VerifyAndClearExpectations(&driver); - // Verify that the matrix really is cleared - EXPECT_CALL(driver, send_keyboard_mock(KeyboardReport())).Times(0); - idle_for(TAPPING_TERM + 10); + + m_this = nullptr; + + test_logger.info() << "TestFixture clean-up end." << std::endl; + + print_test_log(); +} + +void TestFixture::add_key(KeymapKey key) { + if (this->find_key(key.layer, key.position)) { + FAIL() << "Key is already mapped for layer " << +key.layer << " and (column,row) (" << +key.position.col << "," << +key.position.row << ")"; + } + + this->keymap.push_back(key); +} + +void TestFixture::set_keymap(std::initializer_list<KeymapKey> keys) { + this->keymap.clear(); + for (auto& key : keys) { + add_key(key); + } +} + +const KeymapKey* TestFixture::find_key(layer_t layer, keypos_t position) const { + auto keymap_key_predicate = [&](KeymapKey candidate) { return candidate.layer == layer && candidate.position.col == position.col && candidate.position.row == position.row; }; + + auto result = std::find_if(this->keymap.begin(), this->keymap.end(), keymap_key_predicate); + + if (result != std::end(this->keymap)) { + return &(*result); + } + return nullptr; +} + +void TestFixture::get_keycode(const layer_t layer, const keypos_t position, uint16_t* result) const { + bool key_is_out_of_bounds = position.col >= MATRIX_COLS && position.row >= MATRIX_ROWS; + + if (key_is_out_of_bounds) { + /* See if this is done in hardware as well, because this is 100% out of bounds reads on all QMK keebs out there. */ + auto msg = [&]() { + std::stringstream msg; + msg << "Keycode for position (" << +position.col << "," << +position.row << ") requested! This is out of bounds." << std::endl; + return msg.str(); + }(); + + *result = KC_NO; + test_logger.error() << msg; + EXPECT_FALSE(key_is_out_of_bounds) << msg; + return; + } + + if (auto key = this->find_key(layer, position)) { + *result = key->code; + return; + } + + FAIL() << "No key is mapped for layer " << +layer << " and (column,row) " << +position.col << "," << +position.row << ")"; } void TestFixture::run_one_scan_loop() { @@ -57,3 +155,17 @@ void TestFixture::idle_for(unsigned time) { run_one_scan_loop(); } } + +void TestFixture::print_test_log() const { + const ::testing::TestInfo* const test_info = ::testing::UnitTest::GetInstance()->current_test_info(); + if (HasFailure()) { + std::cerr << test_info->test_case_name() << "." << test_info->name() << " failed!" << std::endl; + test_logger.print_log(); + } + test_logger.reset(); +} + +void TestFixture::expect_layer_state(layer_t layer_state) const { + test_logger.trace() << "Layer state: (" << +layer_state << ") Highest layer bit: (" << +get_highest_layer(layer_state) << ")" << std::endl; + EXPECT_TRUE(layer_state_is(layer_state)); +} diff --git a/tests/test_common/test_fixture.hpp b/tests/test_common/test_fixture.hpp index 340503665b6..73b5d8d3e8e 100644 --- a/tests/test_common/test_fixture.hpp +++ b/tests/test_common/test_fixture.hpp @@ -16,15 +16,34 @@ #pragma once +#include <cstdint> +#include <unordered_map> +#include <optional> #include "gtest/gtest.h" +#include "keyboard.h" +#include "test_keymap_key.hpp" class TestFixture : public testing::Test { -public: + public: + static TestFixture* m_this; + TestFixture(); ~TestFixture(); static void SetUpTestCase(); static void TearDownTestCase(); + void set_keymap(std::initializer_list<KeymapKey> keycodes); + void add_key(const KeymapKey key); + + const KeymapKey* find_key(const layer_t layer_t, const keypos_t position) const; + void get_keycode(const layer_t layer, const keypos_t position, uint16_t* result) const; + void run_one_scan_loop(); void idle_for(unsigned ms); + + void expect_layer_state(layer_t layer) const; + + protected: + void print_test_log() const; + std::vector<KeymapKey> keymap; }; diff --git a/tests/test_common/test_keymap_key.cpp b/tests/test_common/test_keymap_key.cpp new file mode 100644 index 00000000000..878ae097bfa --- /dev/null +++ b/tests/test_common/test_keymap_key.cpp @@ -0,0 +1,30 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 "test_keymap_key.hpp" +#include "test_logger.hpp" +#include "gtest/gtest-message.h" +#include "gtest/gtest.h" + +void KeymapKey::press() { + test_logger.trace() << "Key pressed: (" << +this->position.col << "," << +this->position.row << ")" << std::endl; + press_key(this->position.col, this->position.row); +} + +void KeymapKey::release() { + test_logger.trace() << "Key released: (" << +this->position.col << "," << +this->position.row << ")" << std::endl; + release_key(this->position.col, this->position.row); +} \ No newline at end of file diff --git a/tests/test_common/test_keymap_key.hpp b/tests/test_common/test_keymap_key.hpp new file mode 100644 index 00000000000..7861cb4a324 --- /dev/null +++ b/tests/test_common/test_keymap_key.hpp @@ -0,0 +1,46 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +extern "C" { +#include "keyboard.h" +#include "test_matrix.h" +} + +#include <cassert> + +typedef uint8_t layer_t; + +struct KeymapKey { + KeymapKey(layer_t layer, uint8_t col, uint8_t row, uint16_t keycode) : layer(layer), position({.col = col, .row = row}), code(keycode), report_code(keycode) { validate(); } + KeymapKey(layer_t layer, uint8_t col, uint8_t row, uint16_t keycode, uint16_t report_code) : layer(layer), position({.col = col, .row = row}), code(keycode), report_code(report_code) { validate(); } + + void press(); + void release(); + + const layer_t layer; + const keypos_t position; + const uint16_t code; + /* Sometimes the keycode does not match the code that is send in the usb report, so we provide it here. */ + const uint16_t report_code; + + private: + void validate() { + assert(position.col <= MATRIX_COLS); + assert(position.row <= MATRIX_ROWS); + } +}; \ No newline at end of file diff --git a/tests/test_common/test_logger.cpp b/tests/test_common/test_logger.cpp new file mode 100644 index 00000000000..959fdde5ec5 --- /dev/null +++ b/tests/test_common/test_logger.cpp @@ -0,0 +1,39 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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 <iostream> +#include "test_logger.hpp" + +TestLogger test_logger; + +TestLogger& TestLogger::info() { + *this << "[ INFO ] "; + return *this; +} + +TestLogger& TestLogger::trace() { + *this << "[ TRACE ] "; + return *this; +} + +TestLogger& TestLogger::error() { + *this << "[ ERROR ] "; + return *this; +} + +void TestLogger::reset() { this->m_log.str(""); }; + +void TestLogger::print_log() { std::cerr << this->m_log.str(); } diff --git a/tests/test_common/test_logger.hpp b/tests/test_common/test_logger.hpp new file mode 100644 index 00000000000..348af7fab86 --- /dev/null +++ b/tests/test_common/test_logger.hpp @@ -0,0 +1,35 @@ +/* Copyright 2021 Stefan Kerkmann + * + * 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/>. + */ + +#pragma once + +#include <ostream> +#include <sstream> + +class TestLogger : public std::ostream { + public: + TestLogger() : std::ostream(&m_log){}; + TestLogger& info(); + TestLogger& trace(); + TestLogger& error(); + void print_log(); + void reset(); + + private: + std::stringbuf m_log; +}; + +extern TestLogger test_logger; \ No newline at end of file diff --git a/tmk_core/arm_atsam.mk b/tmk_core/arm_atsam.mk deleted file mode 100644 index b29de9132b8..00000000000 --- a/tmk_core/arm_atsam.mk +++ /dev/null @@ -1,67 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- -############################################################################## -# Compiler settings -# -CC = arm-none-eabi-gcc -OBJCOPY = arm-none-eabi-objcopy -OBJDUMP = arm-none-eabi-objdump -SIZE = arm-none-eabi-size -AR = arm-none-eabi-ar -NM = arm-none-eabi-nm -HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature -EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) -BIN = - -COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/include -COMMON_VPATH += $(LIB_PATH)/arm_atsam/packs/arm/cmsis/5.0.1/CMSIS/Include - -COMPILEFLAGS += -funsigned-char -COMPILEFLAGS += -funsigned-bitfields -COMPILEFLAGS += -ffunction-sections -COMPILEFLAGS += -fshort-enums -COMPILEFLAGS += -fno-inline-small-functions -COMPILEFLAGS += -fno-strict-aliasing -COMPILEFLAGS += -mfloat-abi=hard -COMPILEFLAGS += -mfpu=fpv4-sp-d16 -COMPILEFLAGS += -mthumb - -#ALLOW_WARNINGS = yes - -CFLAGS += $(COMPILEFLAGS) - -CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-exceptions -std=c++11 - -LDFLAGS +=-Wl,--gc-sections -LDFLAGS += -Wl,-Map="%OUT%%PROJ_NAME%.map" -LDFLAGS += -Wl,--start-group -LDFLAGS += -Wl,--end-group -LDFLAGS += --specs=rdimon.specs -LDFLAGS += -T$(LIB_PATH)/arm_atsam/packs/atmel/SAMD51_DFP/1.0.70/gcc/gcc/samd51j18a_flash.ld - -OPT_DEFS += -DPROTOCOL_ARM_ATSAM - -MCUFLAGS = -mcpu=$(MCU) -MCUFLAGS += -D__$(ARM_ATSAM)__ - -# List any extra directories to look for libraries here. -# Each directory must be seperated by a space. -# Use forward slashes for directory separators. -# For a directory that has spaces, enclose it in quotes. -EXTRALIBDIRS = - -cpfirmware: warn-arm_atsam -.INTERMEDIATE: warn-arm_atsam -warn-arm_atsam: $(FIRMWARE_FORMAT) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) - $(info This MCU support package has a lack of support from the upstream provider (Massdrop).) - $(info There are currently questions about valid licensing, and at this stage it's likely) - $(info their boards and supporting code will be removed from QMK in the near future. Please) - $(info contact Massdrop for support, and encourage them to align their future board design) - $(info choices to gain proper license compatibility with QMK.) - $(info @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@) - -# Convert hex to bin. -bin: $(BUILD_DIR)/$(TARGET).hex - $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin - $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk deleted file mode 100644 index 940e95397bf..00000000000 --- a/tmk_core/avr.mk +++ /dev/null @@ -1,179 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- -############################################################################## -# Compiler settings -# -CC = avr-gcc -OBJCOPY = avr-objcopy -OBJDUMP = avr-objdump -SIZE = avr-size -AR = avr-ar -NM = avr-nm -HEX = $(OBJCOPY) -O $(FORMAT) -R .eeprom -R .fuse -R .lock -R .signature -EEP = $(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) -BIN = - -COMPILEFLAGS += -funsigned-char -COMPILEFLAGS += -funsigned-bitfields -COMPILEFLAGS += -ffunction-sections -COMPILEFLAGS += -fdata-sections -COMPILEFLAGS += -fpack-struct -COMPILEFLAGS += -fshort-enums - -ASFLAGS += $(AVR_ASFLAGS) - -CFLAGS += $(COMPILEFLAGS) $(AVR_CFLAGS) -CFLAGS += -fno-inline-small-functions -CFLAGS += -fno-strict-aliasing - -CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-exceptions -std=c++11 - -LDFLAGS +=-Wl,--gc-sections - -OPT_DEFS += -DF_CPU=$(F_CPU)UL - -MCUFLAGS = -mmcu=$(MCU) - -# List any extra directories to look for libraries here. -# Each directory must be seperated by a space. -# Use forward slashes for directory separators. -# For a directory that has spaces, enclose it in quotes. -EXTRALIBDIRS = - - -#---------------- External Memory Options ---------------- - -# 64 KB of external RAM, starting after internal RAM (ATmega128!), -# used for variables (.data/.bss) and heap (malloc()). -#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff - -# 64 KB of external RAM, starting after internal RAM (ATmega128!), -# only used for heap (malloc()). -#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff - -EXTMEMOPTS = - -#---------------- Debugging Options ---------------- - -# Debugging format. -# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs. -# AVR Studio 4.10 requires dwarf-2. -# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run. -DEBUG = dwarf-2 - -# For simulavr only - target MCU frequency. -DEBUG_MFREQ = $(F_CPU) - -# Set the DEBUG_UI to either gdb or insight. -# DEBUG_UI = gdb -DEBUG_UI = insight - -# Set the debugging back-end to either avarice, simulavr. -DEBUG_BACKEND = avarice -#DEBUG_BACKEND = simulavr - -# GDB Init Filename. -GDBINIT_FILE = __avr_gdbinit - -# When using avarice settings for the JTAG -JTAG_DEV = /dev/com1 - -# Debugging port used to communicate between GDB / avarice / simulavr. -DEBUG_PORT = 4242 - -# Debugging host used to communicate between GDB / avarice / simulavr, normally -# just set to localhost unless doing some sort of crazy debugging when -# avarice is running on a different computer. -DEBUG_HOST = localhost - -#============================================================================ - -# Convert hex to bin. -bin: $(BUILD_DIR)/$(TARGET).hex -ifeq ($(BOOTLOADER),lufa-ms) - $(eval BIN_PADDING=$(shell n=`expr 32768 - $(BOOTLOADER_SIZE)` && echo $$(($$n)) || echo 0)) - $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin --pad-to $(BIN_PADDING) -else - $(OBJCOPY) -Iihex -Obinary $(BUILD_DIR)/$(TARGET).hex $(BUILD_DIR)/$(TARGET).bin -endif - $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; - -# copy bin to FLASH.bin -flashbin: bin - $(COPY) $(BUILD_DIR)/$(TARGET).bin FLASH.bin; - -# Generate avr-gdb config/init file which does the following: -# define the reset signal, load the target file, connect to target, and set -# a breakpoint at main(). -gdb-config: - @$(REMOVE) $(GDBINIT_FILE) - @echo define reset >> $(GDBINIT_FILE) - @echo SIGNAL SIGHUP >> $(GDBINIT_FILE) - @echo end >> $(GDBINIT_FILE) - @echo file $(BUILD_DIR)/$(TARGET).elf >> $(GDBINIT_FILE) - @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE) -ifeq ($(DEBUG_BACKEND),simulavr) - @echo load >> $(GDBINIT_FILE) -endif - @echo break main >> $(GDBINIT_FILE) - -debug: gdb-config $(BUILD_DIR)/$(TARGET).elf -ifeq ($(DEBUG_BACKEND), avarice) - @echo Starting AVaRICE - Press enter when "waiting to connect" message displays. - @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \ - $(BUILD_DIR)/$(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT) - @$(WINSHELL) /c pause - -else - @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \ - $(DEBUG_MFREQ) --port $(DEBUG_PORT) -endif - @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE) - - - - -# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB. -COFFCONVERT = $(OBJCOPY) --debugging -COFFCONVERT += --change-section-address .data-0x800000 -COFFCONVERT += --change-section-address .bss-0x800000 -COFFCONVERT += --change-section-address .noinit-0x800000 -COFFCONVERT += --change-section-address .eeprom-0x810000 - - - -coff: $(BUILD_DIR)/$(TARGET).elf - @$(SECHO) $(MSG_COFF) $(BUILD_DIR)/$(TARGET).cof - $(COFFCONVERT) -O coff-avr $< $(BUILD_DIR)/$(TARGET).cof - - -extcoff: $(BUILD_DIR)/$(TARGET).elf - @$(SECHO) $(MSG_EXTENDED_COFF) $(BUILD_DIR)/$(TARGET).cof - $(COFFCONVERT) -O coff-ext-avr $< $(BUILD_DIR)/$(TARGET).cof - -ifeq ($(strip $(BOOTLOADER)), qmk-dfu) -QMK_BOOTLOADER_TYPE = DFU -else ifeq ($(strip $(BOOTLOADER)), qmk-hid) -QMK_BOOTLOADER_TYPE = HID -endif - -bootloader: -ifeq ($(strip $(QMK_BOOTLOADER_TYPE)),) - $(error Please set BOOTLOADER to "qmk-dfu" or "qmk-hid" first!) -else - make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ clean - $(QMK_BIN) generate-dfu-header --quiet --keyboard $(KEYBOARD) --output lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Keyboard.h - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) - $(eval PROGRAM_SIZE_KB=$(shell n=`expr $(MAX_SIZE) / 1024` && echo $$(($$n)) || echo 0)) - $(eval BOOT_SECTION_SIZE_KB=$(shell n=`expr $(BOOTLOADER_SIZE) / 1024` && echo $$(($$n)) || echo 0)) - $(eval FLASH_SIZE_KB=$(shell n=`expr $(PROGRAM_SIZE_KB) + $(BOOT_SECTION_SIZE_KB)` && echo $$(($$n)) || echo 0)) - make -C lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/ MCU=$(MCU) ARCH=$(ARCH) F_CPU=$(F_CPU) FLASH_SIZE_KB=$(FLASH_SIZE_KB) BOOT_SECTION_SIZE_KB=$(BOOT_SECTION_SIZE_KB) - printf "Bootloader$(QMK_BOOTLOADER_TYPE).hex copied to $(TARGET)_bootloader.hex\n" - cp lib/lufa/Bootloaders/$(QMK_BOOTLOADER_TYPE)/Bootloader$(QMK_BOOTLOADER_TYPE).hex $(TARGET)_bootloader.hex -endif - -production: $(BUILD_DIR)/$(TARGET).hex bootloader cpfirmware - @cat $(BUILD_DIR)/$(TARGET).hex | awk '/^:00000001FF/ == 0' > $(TARGET)_production.hex - @cat $(TARGET)_bootloader.hex >> $(TARGET)_production.hex - echo "File sizes:" - $(SIZE) $(TARGET).hex $(TARGET)_bootloader.hex $(TARGET)_production.hex diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk deleted file mode 100644 index 18839710be0..00000000000 --- a/tmk_core/chibios.mk +++ /dev/null @@ -1,332 +0,0 @@ -# Hey Emacs, this is a -*- makefile -*- -############################################################################## -# Architecture or project specific options -# - -# Stack size to be allocated to the Cortex-M process stack. This stack is -# the stack used by the main() thread. -ifeq ($(USE_PROCESS_STACKSIZE),) - USE_PROCESS_STACKSIZE = 0x800 -endif - -# Stack size to the allocated to the Cortex-M main/exceptions stack. This -# stack is used for processing interrupts and exceptions. -ifeq ($(USE_EXCEPTIONS_STACKSIZE),) - USE_EXCEPTIONS_STACKSIZE = 0x400 -endif - -# -# Architecture or project specific options -############################################################################## - -############################################################################## -# Project, sources and paths -# - -# Imported source files and paths -OPT_OS = chibios -CHIBIOS = $(TOP_DIR)/lib/chibios -CHIBIOS_CONTRIB = $(TOP_DIR)/lib/chibios-contrib -# Startup files. Try a few different locations, for compability with old versions and -# for things hardware in the contrib repository -STARTUP_MK = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk -ifeq ("$(wildcard $(STARTUP_MK))","") - STARTUP_MK = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk - ifeq ("$(wildcard $(STARTUP_MK))","") - STARTUP_MK = $(CHIBIOS_CONTRIB)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_$(MCU_STARTUP).mk - endif -endif -include $(STARTUP_MK) -# HAL-OSAL files (optional). -include $(CHIBIOS)/os/hal/hal.mk - -ifeq ("$(PLATFORM_NAME)","") - PLATFORM_NAME = platform -endif - -PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk -ifeq ("$(wildcard $(PLATFORM_MK))","") -PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk -endif -include $(PLATFORM_MK) - -BOARD_MK := - -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_5) - BOARD_MK += $(KEYBOARD_PATH_5)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_4) - BOARD_MK += $(KEYBOARD_PATH_4)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_3) - BOARD_MK += $(KEYBOARD_PATH_3)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_2) - BOARD_MK += $(KEYBOARD_PATH_2)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk)","") - BOARD_PATH = $(KEYBOARD_PATH_1) - BOARD_MK += $(KEYBOARD_PATH_1)/boards/$(BOARD)/board.mk -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk)","") - BOARD_PATH = $(TOP_DIR)/platforms/chibios/boards/$(BOARD) - BOARD_MK += $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/board/board.mk - KEYBOARD_PATHS += $(BOARD_PATH)/configs - ifneq ("$(wildcard $(BOARD_PATH)/rules.mk)","") - include $(BOARD_PATH)/rules.mk - endif -endif - -ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS)/os/hal/boards/$(BOARD)/board.mk - ifeq ("$(wildcard $(BOARD_MK))","") - BOARD_MK = $(CHIBIOS_CONTRIB)/os/hal/boards/$(BOARD)/board.mk - endif -endif - -# Bootloader address -ifdef STM32_BOOTLOADER_ADDRESS - OPT_DEFS += -DSTM32_BOOTLOADER_ADDRESS=$(STM32_BOOTLOADER_ADDRESS) -endif - -# Work out if we need to set up the include for the bootloader definitions -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_5)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_5)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_4)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_4)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_3)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_3)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_2)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_2)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_1)/bootloader_defs.h -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h)","") - OPT_DEFS += -include $(KEYBOARD_PATH_1)/boards/$(BOARD)/bootloader_defs.h -else ifneq ("$(wildcard $(BOARD_PATH)/configs/bootloader_defs.h)","") - OPT_DEFS += -include $(BOARD_PATH)/configs/bootloader_defs.h -endif - -# Work out the config file directories -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/chconf.h)","") - CHCONFDIR = $(KEYBOARD_PATH_5) -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/chconf.h)","") - CHCONFDIR = $(KEYBOARD_PATH_4) -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/chconf.h)","") - CHCONFDIR = $(KEYBOARD_PATH_3) -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/chconf.h)","") - CHCONFDIR = $(KEYBOARD_PATH_2) -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/chconf.h)","") - CHCONFDIR = $(KEYBOARD_PATH_1) -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/chconf.h)","") - CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs -else ifneq ("$(wildcard $(TOP_DIR)/platforms/boards/chibios/common/configs/chconf.h)","") - CHCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs -endif - -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf.h)","") - HALCONFDIR = $(KEYBOARD_PATH_5) -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf.h)","") - HALCONFDIR = $(KEYBOARD_PATH_4) -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf.h)","") - HALCONFDIR = $(KEYBOARD_PATH_3) -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf.h)","") - HALCONFDIR = $(KEYBOARD_PATH_2) -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf.h)","") - HALCONFDIR = $(KEYBOARD_PATH_1) -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf.h)","") - HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/configs/halconf.h)","") - HALCONFDIR = $(TOP_DIR)/platforms/chibios/boards/common/configs -endif - -# HAL-OSAL files (optional). -include $(CHIBIOS)/os/hal/hal.mk - -ifeq ("$(PLATFORM_NAME)","") - PLATFORM_NAME = platform -endif - -PLATFORM_MK = $(CHIBIOS)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk -ifeq ("$(wildcard $(PLATFORM_MK))","") -PLATFORM_MK = $(CHIBIOS_CONTRIB)/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES)/$(PLATFORM_NAME).mk -endif -include $(PLATFORM_MK) - - -include $(BOARD_MK) --include $(CHIBIOS)/os/hal/osal/rt/osal.mk # ChibiOS <= 19.x --include $(CHIBIOS)/os/hal/osal/rt-nil/osal.mk # ChibiOS >= 20.x -# RTOS files (optional). -include $(CHIBIOS)/os/rt/rt.mk -# Compability with old version -PORT_V = $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v$(ARMV)m.mk -ifeq ("$(wildcard $(PORT_V))","") -PORT_V = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/port_v$(ARMV)m.mk -endif -include $(PORT_V) -# Other files (optional). -include $(CHIBIOS)/os/hal/lib/streams/streams.mk - -RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC -ifeq ("$(wildcard $(RULESPATH)/rules.mk)","") -RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC -endif - -# Define linker script file here -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(KEYBOARD_PATH_5)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(KEYBOARD_PATH_4)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(KEYBOARD_PATH_3)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(KEYBOARD_PATH_2)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(KEYBOARD_PATH_1)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld)","") - LDFLAGS += -L$(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld - LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(TOP_DIR)/platforms/chibios/boards/common/ld/$(MCU_LDSCRIPT).ld -else ifneq ("$(wildcard $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld)","") - LDSCRIPT = $(STARTUPLD_CONTRIB)/$(MCU_LDSCRIPT).ld - USE_CHIBIOS_CONTRIB = yes -else - LDSCRIPT = $(STARTUPLD)/$(MCU_LDSCRIPT).ld -endif - -CHIBISRC = $(STARTUPSRC) \ - $(KERNSRC) \ - $(PORTSRC) \ - $(OSALSRC) \ - $(HALSRC) \ - $(PLATFORMSRC) \ - $(BOARDSRC) \ - $(STREAMSSRC) \ - $(CHIBIOS)/os/various/syscalls.c \ - $(PLATFORM_COMMON_DIR)/syscall-fallbacks.c \ - $(PLATFORM_COMMON_DIR)/wait.c - -# Ensure the ASM files are not subjected to LTO -- it'll strip out interrupt handlers otherwise. -QUANTUM_LIB_SRC += $(STARTUPASM) $(PORTASM) $(OSALASM) $(PLATFORMASM) - -CHIBISRC := $(patsubst $(TOP_DIR)/%,%,$(CHIBISRC)) - -EXTRAINCDIRS += $(CHIBIOS)/os/license $(CHIBIOS)/os/oslib/include \ - $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs \ - $(TOP_DIR)/platforms/chibios/boards/common/configs \ - $(HALCONFDIR) $(CHCONFDIR) \ - $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \ - $(STREAMSINC) $(CHIBIOS)/os/various $(COMMON_VPATH) - -# -# ChibiOS-Contrib -############################################################################## - -# Work out if we're using ChibiOS-Contrib by checking if halconf_community.h exists -ifneq ("$(wildcard $(KEYBOARD_PATH_5)/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(KEYBOARD_PATH_4)/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(KEYBOARD_PATH_3)/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(KEYBOARD_PATH_2)/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(KEYBOARD_PATH_1)/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -else ifneq ("$(wildcard $(TOP_DIR)/platforms/chibios/boards/$(BOARD)/configs/halconf_community.h)","") - USE_CHIBIOS_CONTRIB = yes -endif - -ifeq ($(strip $(USE_CHIBIOS_CONTRIB)),yes) - include $(CHIBIOS_CONTRIB)/os/hal/hal.mk - CHIBISRC += $(PLATFORMSRC_CONTRIB) $(HALSRC_CONTRIB) - EXTRAINCDIRS += $(PLATFORMINC_CONTRIB) $(HALINC_CONTRIB) $(CHIBIOS_CONTRIB)/os/various -endif - -# -# Project, sources and paths -############################################################################## - -############################################################################## -# Injected configs -# -ifneq ("$(wildcard $(BOARD_PATH)/configs/config.h)","") - CONFIG_H += $(BOARD_PATH)/configs/config.h -endif -ifneq ("$(wildcard $(BOARD_PATH)/configs/post_config.h)","") - POST_CONFIG_H += $(BOARD_PATH)/configs/post_config.h -endif - -############################################################################## -# Compiler settings -# -CC = arm-none-eabi-gcc -OBJCOPY = arm-none-eabi-objcopy -OBJDUMP = arm-none-eabi-objdump -SIZE = arm-none-eabi-size -AR = arm-none-eabi-ar -NM = arm-none-eabi-nm -HEX = $(OBJCOPY) -O $(FORMAT) -EEP = -BIN = $(OBJCOPY) -O binary - -THUMBFLAGS = -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -mthumb -DTHUMB - -COMPILEFLAGS += -fomit-frame-pointer -COMPILEFLAGS += -falign-functions=16 -COMPILEFLAGS += -ffunction-sections -COMPILEFLAGS += -fdata-sections -COMPILEFLAGS += -fno-common -COMPILEFLAGS += -fshort-wchar -COMPILEFLAGS += $(THUMBFLAGS) - -# FPU options default (Cortex-M4 and Cortex-M7 single precision). -USE_FPU_OPT ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant - -# FPU-related options -USE_FPU ?= no -ifneq ($(USE_FPU),no) - COMPILEFLAGS += $(USE_FPU_OPT) - OPT_DEFS += -DCORTEX_USE_FPU=TRUE -else - OPT_DEFS += -DCORTEX_USE_FPU=FALSE -endif - -CFLAGS += $(COMPILEFLAGS) - -ASFLAGS += $(THUMBFLAGS) - -CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-rtti - -LDFLAGS +=-Wl,--gc-sections -LDFLAGS +=-Wl,--no-wchar-size-warning -LDFLAGS += -mno-thumb-interwork -mthumb -LDSYMBOLS =,--defsym=__process_stack_size__=$(USE_PROCESS_STACKSIZE) -LDSYMBOLS :=$(LDSYMBOLS),--defsym=__main_stack_size__=$(USE_EXCEPTIONS_STACKSIZE) -LDFLAGS += -Wl,--script=$(LDSCRIPT)$(LDSYMBOLS) -LDFLAGS += --specs=nano.specs - -OPT_DEFS += -DPROTOCOL_CHIBIOS - -# Workaround to stop ChibiOS from complaining about new GCC -- it's been fixed for 7/8/9 already -OPT_DEFS += -DPORT_IGNORE_GCC_VERSION_CHECK=1 - -MCUFLAGS = -mcpu=$(MCU) - -DEBUG = gdb - -# List any extra directories to look for libraries here. -EXTRALIBDIRS = $(RULESPATH)/ld - -bin: $(BUILD_DIR)/$(TARGET).bin sizeafter - $(COPY) $(BUILD_DIR)/$(TARGET).bin $(TARGET).bin; diff --git a/tmk_core/common.mk b/tmk_core/common.mk deleted file mode 100644 index e44ff2f0ab5..00000000000 --- a/tmk_core/common.mk +++ /dev/null @@ -1,137 +0,0 @@ -COMMON_DIR = common -PLATFORM_COMMON_DIR = $(COMMON_DIR)/$(PLATFORM_KEY) - -TMK_COMMON_SRC += \ - $(COMMON_DIR)/host.c \ - $(COMMON_DIR)/report.c \ - $(COMMON_DIR)/sync_timer.c \ - $(COMMON_DIR)/usb_util.c \ - $(PLATFORM_COMMON_DIR)/platform.c \ - $(PLATFORM_COMMON_DIR)/suspend.c \ - $(PLATFORM_COMMON_DIR)/timer.c \ - $(PLATFORM_COMMON_DIR)/bootloader.c \ - -# Use platform provided print if it exists --include $(TMK_PATH)/$(PLATFORM_COMMON_DIR)/printf.mk - -SHARED_EP_ENABLE = no -MOUSE_SHARED_EP ?= yes -ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes) - TMK_COMMON_DEFS += -DKEYBOARD_SHARED_EP - SHARED_EP_ENABLE = yes - # With the current usb_descriptor.c code, - # you can't share kbd without sharing mouse; - # that would be a very unexpected use case anyway - MOUSE_SHARED_EP = yes -endif - -ifeq ($(strip $(MOUSE_ENABLE)), yes) - OPT_DEFS += -DMOUSE_ENABLE - ifeq ($(strip $(MOUSE_SHARED_EP)), yes) - TMK_COMMON_DEFS += -DMOUSE_SHARED_EP - SHARED_EP_ENABLE = yes - endif -endif - -ifeq ($(strip $(EXTRAKEY_ENABLE)), yes) - TMK_COMMON_DEFS += -DEXTRAKEY_ENABLE - SHARED_EP_ENABLE = yes -endif - -ifeq ($(strip $(RAW_ENABLE)), yes) - TMK_COMMON_DEFS += -DRAW_ENABLE -endif - -ifeq ($(strip $(CONSOLE_ENABLE)), yes) - TMK_COMMON_DEFS += -DCONSOLE_ENABLE -else - # TODO: decouple this so other print backends can exist - TMK_COMMON_DEFS += -DNO_PRINT - TMK_COMMON_DEFS += -DNO_DEBUG -endif - -ifeq ($(strip $(NKRO_ENABLE)), yes) - ifeq ($(PROTOCOL), VUSB) - $(info NKRO is not currently supported on V-USB, and has been disabled.) - else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - $(info NKRO is not currently supported with Bluetooth, and has been disabled.) - else ifneq ($(BLUETOOTH),) - $(info NKRO is not currently supported with Bluetooth, and has been disabled.) - else - TMK_COMMON_DEFS += -DNKRO_ENABLE - SHARED_EP_ENABLE = yes - endif -endif - -ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes) - TMK_COMMON_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE -endif - -ifeq ($(strip $(SLEEP_LED_ENABLE)), yes) - TMK_COMMON_SRC += $(PLATFORM_COMMON_DIR)/sleep_led.c - TMK_COMMON_DEFS += -DSLEEP_LED_ENABLE - TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN -endif - -ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) - TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN -endif - -ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_ADAFRUIT_BLE - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(BLUETOOTH)), RN42) - TMK_COMMON_DEFS += -DBLUETOOTH_ENABLE - TMK_COMMON_DEFS += -DMODULE_RN42 - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(SWAP_HANDS_ENABLE)), yes) - TMK_COMMON_DEFS += -DSWAP_HANDS_ENABLE -endif - -ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) - TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK -endif - -ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes) - TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP - SHARED_EP_ENABLE = yes -endif - -ifeq ($(strip $(DIGITIZER_ENABLE)), yes) - TMK_COMMON_DEFS += -DDIGITIZER_ENABLE - ifeq ($(strip $(SHARED_EP_ENABLE)), yes) - TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP - SHARED_EP_ENABLE = yes - endif -endif - -ifeq ($(strip $(SHARED_EP_ENABLE)), yes) - TMK_COMMON_DEFS += -DSHARED_EP_ENABLE -endif - -ifeq ($(strip $(LTO_ENABLE)), yes) - ifeq ($(PLATFORM),CHIBIOS) - $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) - $(info If unsure, set LTO_ENABLE = no.) - endif - EXTRAFLAGS += -flto - TMK_COMMON_DEFS += -DLTO_ENABLE - TMK_COMMON_DEFS += -DLINK_TIME_OPTIMIZATON_ENABLE -else ifdef LINK_TIME_OPTIMIZATION_ENABLE - $(error The LINK_TIME_OPTIMIZATION_ENABLE flag has been renamed to LTO_ENABLE.) -endif - -# Search Path -VPATH += $(TMK_PATH)/$(COMMON_DIR) -VPATH += $(TMK_PATH)/$(PLATFORM_COMMON_DIR) -VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR) diff --git a/tmk_core/common/arm_atsam/eeprom.c b/tmk_core/common/arm_atsam/eeprom.c deleted file mode 100644 index ccd5d15a547..00000000000 --- a/tmk_core/common/arm_atsam/eeprom.c +++ /dev/null @@ -1,98 +0,0 @@ -/* 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 "eeprom.h" - -#ifndef EEPROM_SIZE -# include "eeconfig.h" -# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO -#endif - -__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; - -uint8_t eeprom_read_byte(const uint8_t *addr) { - uintptr_t offset = (uintptr_t)addr; - return buffer[offset]; -} - -void eeprom_write_byte(uint8_t *addr, uint8_t value) { - uintptr_t offset = (uintptr_t)addr; - buffer[offset] = value; -} - -uint16_t eeprom_read_word(const uint16_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); -} - -uint32_t eeprom_read_dword(const uint32_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); -} - -void eeprom_read_block(void *buf, const void *addr, size_t len) { - const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; - while (len--) { - *dest++ = eeprom_read_byte(p++); - } -} - -void eeprom_write_word(uint16_t *addr, uint16_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p, value >> 8); -} - -void eeprom_write_dword(uint32_t *addr, uint32_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p++, value >> 8); - eeprom_write_byte(p++, value >> 16); - eeprom_write_byte(p, value >> 24); -} - -void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} - -void eeprom_update_byte(uint8_t *addr, uint8_t value) { eeprom_write_byte(addr, value); } - -void eeprom_update_word(uint16_t *addr, uint16_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p, value >> 8); -} - -void eeprom_update_dword(uint32_t *addr, uint32_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p++, value >> 8); - eeprom_write_byte(p++, value >> 16); - eeprom_write_byte(p, value >> 24); -} - -void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} diff --git a/tmk_core/common/arm_atsam/gpio.h b/tmk_core/common/arm_atsam/gpio.h deleted file mode 100644 index c2d5a30889b..00000000000 --- a/tmk_core/common/arm_atsam/gpio.h +++ /dev/null @@ -1,71 +0,0 @@ -/* Copyright 2021 QMK - * - * 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 3 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/>. - */ -#pragma once - -#include "stdint.h" -#include "samd51j18a.h" - -#include "pin_defs.h" - -typedef uint8_t pin_t; - -#define SAMD_PORT(pin) ((pin & 0x20) >> 5) -#define SAMD_PIN(pin) (pin & 0x1f) -#define SAMD_PIN_MASK(pin) (1 << (pin & 0x1f)) - -#define setPinInput(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ - PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ - } while (0) - -#define setPinInputHigh(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ - PORT->Group[SAMD_PORT(pin)].OUTSET.reg = SAMD_PIN_MASK(pin); \ - PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ - PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.PULLEN = 1; \ - } while (0) - -#define setPinInputLow(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].DIRCLR.reg = SAMD_PIN_MASK(pin); \ - PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ - PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.INEN = 1; \ - PORT->Group[SAMD_PORT(pin)].PINCFG[SAMD_PIN(pin)].bit.PULLEN = 1; \ - } while (0) - -#define setPinOutput(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].DIRSET.reg = SAMD_PIN_MASK(pin); \ - PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ - } while (0) - -#define writePinHigh(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].OUTSET.reg = SAMD_PIN_MASK(pin); \ - } while (0) - -#define writePinLow(pin) \ - do { \ - PORT->Group[SAMD_PORT(pin)].OUTCLR.reg = SAMD_PIN_MASK(pin); \ - } while (0) - -#define writePin(pin, level) ((level) ? (writePinHigh(pin)) : (writePinLow(pin))) - -#define readPin(pin) ((PORT->Group[SAMD_PORT(pin)].IN.reg & SAMD_PIN_MASK(pin)) != 0) - -#define togglePin(pin) (PORT->Group[SAMD_PORT(pin)].OUTTGL.reg = SAMD_PIN_MASK(pin)) diff --git a/tmk_core/common/avr/suspend.c b/tmk_core/common/avr/suspend.c deleted file mode 100644 index 690d7f38caa..00000000000 --- a/tmk_core/common/avr/suspend.c +++ /dev/null @@ -1,246 +0,0 @@ -#include <stdbool.h> -#include <avr/sleep.h> -#include <avr/wdt.h> -#include <avr/interrupt.h> -#include "matrix.h" -#include "action.h" -#include "suspend.h" -#include "timer.h" -#include "led.h" -#include "host.h" - -#ifdef PROTOCOL_LUFA -# include "lufa.h" -#endif -#ifdef PROTOCOL_VUSB -# include "vusb.h" -#endif - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#ifdef AUDIO_ENABLE -# include "audio.h" -#endif /* AUDIO_ENABLE */ - -#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) -# include "rgblight.h" -#endif - -#ifdef LED_MATRIX_ENABLE -# include "led_matrix.h" -#endif -#ifdef RGB_MATRIX_ENABLE -# include "rgb_matrix.h" -#endif - -/** \brief Suspend idle - * - * FIXME: needs doc - */ -void suspend_idle(uint8_t time) { - cli(); - set_sleep_mode(SLEEP_MODE_IDLE); - sleep_enable(); - sei(); - sleep_cpu(); - sleep_disable(); -} - -// TODO: This needs some cleanup - -/** \brief Run keyboard level Power down - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_power_down_user(void) {} -/** \brief Run keyboard level Power down - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user(); } - -#if !defined(NO_SUSPEND_POWER_DOWN) && defined(WDT_vect) - -// clang-format off -#define wdt_intr_enable(value) \ -__asm__ __volatile__ ( \ - "in __tmp_reg__,__SREG__" "\n\t" \ - "cli" "\n\t" \ - "wdr" "\n\t" \ - "sts %0,%1" "\n\t" \ - "out __SREG__,__tmp_reg__" "\n\t" \ - "sts %0,%2" "\n\t" \ - : /* no outputs */ \ - : "M" (_SFR_MEM_ADDR(_WD_CONTROL_REG)), \ - "r" (_BV(_WD_CHANGE_BIT) | _BV(WDE)), \ - "r" ((uint8_t) ((value & 0x08 ? _WD_PS3_MASK : 0x00) | _BV(WDIE) | (value & 0x07))) \ - : "r0" \ -) -// clang-format on - -/** \brief Power down MCU with watchdog timer - * - * wdto: watchdog timer timeout defined in <avr/wdt.h> - * WDTO_15MS - * WDTO_30MS - * WDTO_60MS - * WDTO_120MS - * WDTO_250MS - * WDTO_500MS - * WDTO_1S - * WDTO_2S - * WDTO_4S - * WDTO_8S - */ -static uint8_t wdt_timeout = 0; - -/** \brief Power down - * - * FIXME: needs doc - */ -static void power_down(uint8_t wdto) { - wdt_timeout = wdto; - - // Watchdog Interrupt Mode - wdt_intr_enable(wdto); - - // TODO: more power saving - // See PicoPower application note - // - I/O port input with pullup - // - prescale clock - // - BOD disable - // - Power Reduction Register PRR - set_sleep_mode(SLEEP_MODE_PWR_DOWN); - sleep_enable(); - sei(); - sleep_cpu(); - sleep_disable(); - - // Disable watchdog after sleep - wdt_disable(); -} -#endif - -/** \brief Suspend power down - * - * FIXME: needs doc - */ -void suspend_power_down(void) { -#ifdef PROTOCOL_LUFA - if (USB_DeviceState == DEVICE_STATE_Configured) return; -#endif -#ifdef PROTOCOL_VUSB - if (!vusb_suspended) return; -#endif - - suspend_power_down_kb(); - -#ifndef NO_SUSPEND_POWER_DOWN - // Turn off backlight -# ifdef BACKLIGHT_ENABLE - backlight_set(0); -# endif - - // Turn off LED indicators - uint8_t leds_off = 0; -# if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) - if (is_backlight_enabled()) { - // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off - leds_off |= (1 << USB_LED_CAPS_LOCK); - } -# endif - led_set(leds_off); - - // Turn off audio -# ifdef AUDIO_ENABLE - stop_all_notes(); -# endif - - // Turn off underglow -# if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) - rgblight_suspend(); -# endif - -# if defined(LED_MATRIX_ENABLE) - led_matrix_set_suspend_state(true); -# endif -# if defined(RGB_MATRIX_ENABLE) - rgb_matrix_set_suspend_state(true); -# endif - - // Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt) -# if defined(WDT_vect) - power_down(WDTO_15MS); -# endif -#endif -} - -__attribute__((weak)) void matrix_power_up(void) {} -__attribute__((weak)) void matrix_power_down(void) {} -bool suspend_wakeup_condition(void) { - matrix_power_up(); - matrix_scan(); - matrix_power_down(); - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - if (matrix_get_row(r)) return true; - } - return false; -} - -/** \brief run user level code immediately after wakeup - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_wakeup_init_user(void) {} - -/** \brief run keyboard level code immediately after wakeup - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } - -/** \brief run immediately after wakeup - * - * FIXME: needs doc - */ -void suspend_wakeup_init(void) { - // clear keyboard state - clear_keyboard(); - - // Turn on backlight -#ifdef BACKLIGHT_ENABLE - backlight_init(); -#endif - - // Restore LED indicators - led_set(host_keyboard_leds()); - - // Wake up underglow -#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) - rgblight_wakeup(); -#endif - -#if defined(LED_MATRIX_ENABLE) - led_matrix_set_suspend_state(false); -#endif -#if defined(RGB_MATRIX_ENABLE) - rgb_matrix_set_suspend_state(false); -#endif - - suspend_wakeup_init_kb(); -} - -#if !defined(NO_SUSPEND_POWER_DOWN) && defined(WDT_vect) -/* watchdog timeout */ -ISR(WDT_vect) { - // compensate timer for sleep - switch (wdt_timeout) { - case WDTO_15MS: - timer_count += 15 + 2; // WDTO_15MS + 2(from observation) - break; - default:; - } -} -#endif diff --git a/tmk_core/common/chibios/_wait.h b/tmk_core/common/chibios/_wait.h deleted file mode 100644 index b740afbd242..00000000000 --- a/tmk_core/common/chibios/_wait.h +++ /dev/null @@ -1,62 +0,0 @@ -/* Copyright 2021 QMK - * - * 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 3 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/>. - */ -#pragma once - -#include <ch.h> -#include <hal.h> - -/* chThdSleepX of zero maps to infinite - so we map to a tiny delay to still yield */ -#define wait_ms(ms) \ - do { \ - if (ms != 0) { \ - chThdSleepMilliseconds(ms); \ - } else { \ - chThdSleepMicroseconds(1); \ - } \ - } while (0) - -#ifdef WAIT_US_TIMER -void wait_us(uint16_t duration); -#else -# define wait_us(us) \ - do { \ - if (us != 0) { \ - chThdSleepMicroseconds(us); \ - } else { \ - chThdSleepMicroseconds(1); \ - } \ - } while (0) -#endif - -#include "_wait.c" - -#define CPU_CLOCK STM32_SYSCLK - -/* For GPIOs on ARM-based MCUs, the input pins are sampled by the clock of the bus - * to which the GPIO is connected. - * The connected buses differ depending on the various series of MCUs. - * And since the instruction execution clock of the CPU and the bus clock of GPIO are different, - * there is a delay of several clocks to read the change of the input signal. - * - * Define this delay with the GPIO_INPUT_PIN_DELAY macro. - * If the GPIO_INPUT_PIN_DELAY macro is not defined, the following default values will be used. - * (A fairly large value of 0.25 microseconds is set.) - */ -#ifndef GPIO_INPUT_PIN_DELAY -# define GPIO_INPUT_PIN_DELAY (CPU_CLOCK / 1000000L / 4) -#endif - -#define waitInputPinDelay() wait_cpuclock(GPIO_INPUT_PIN_DELAY) diff --git a/tmk_core/common/chibios/bootloader.c b/tmk_core/common/chibios/bootloader.c deleted file mode 100644 index f9514ee5f3f..00000000000 --- a/tmk_core/common/chibios/bootloader.c +++ /dev/null @@ -1,123 +0,0 @@ -#include "bootloader.h" - -#include <ch.h> -#include <hal.h> -#include "wait.h" - -/* This code should be checked whether it runs correctly on platforms */ -#define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) -#define BOOTLOADER_MAGIC 0xDEADBEEF -#define MAGIC_ADDR (unsigned long *)(SYMVAL(__ram0_end__) - 4) - -#ifndef STM32_BOOTLOADER_DUAL_BANK -# define STM32_BOOTLOADER_DUAL_BANK FALSE -#endif - -#ifdef BOOTLOADER_TINYUF2 - -# define DBL_TAP_MAGIC 0xf01669ef // From tinyuf2's board_api.h - -// defined by linker script -extern uint32_t _board_dfu_dbl_tap[]; -# define DBL_TAP_REG _board_dfu_dbl_tap[0] - -void bootloader_jump(void) { - DBL_TAP_REG = DBL_TAP_MAGIC; - NVIC_SystemReset(); -} - -void enter_bootloader_mode_if_requested(void) { /* not needed, no two-stage reset */ -} - -#elif STM32_BOOTLOADER_DUAL_BANK - -// Need pin definitions -# include "config_common.h" - -# ifndef STM32_BOOTLOADER_DUAL_BANK_GPIO -# error "No STM32_BOOTLOADER_DUAL_BANK_GPIO defined, don't know which pin to toggle" -# endif - -# ifndef STM32_BOOTLOADER_DUAL_BANK_POLARITY -# define STM32_BOOTLOADER_DUAL_BANK_POLARITY 0 -# endif - -# ifndef STM32_BOOTLOADER_DUAL_BANK_DELAY -# define STM32_BOOTLOADER_DUAL_BANK_DELAY 100000 -# endif - -extern uint32_t __ram0_end__; - -__attribute__((weak)) void bootloader_jump(void) { - // For STM32 MCUs with dual-bank flash, and we're incapable of jumping to the bootloader. The first valid flash - // bank is executed unconditionally after a reset, so it doesn't enter DFU unless BOOT0 is high. Instead, we do - // it with hardware...in this case, we pull a GPIO high/low depending on the configuration, connects 3.3V to - // BOOT0's RC charging circuit, lets it charge the capacitor, and issue a system reset. See the QMK discord - // #hardware channel pins for an example circuit. - palSetPadMode(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_MODE_OUTPUT_PUSHPULL); -# if STM32_BOOTLOADER_DUAL_BANK_POLARITY - palSetPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); -# else - palClearPad(PAL_PORT(STM32_BOOTLOADER_DUAL_BANK_GPIO), PAL_PAD(STM32_BOOTLOADER_DUAL_BANK_GPIO)); -# endif - - // Wait for a while for the capacitor to charge - wait_ms(100); - - // Issue a system reset to get the ROM bootloader to execute, with BOOT0 high - NVIC_SystemReset(); -} - -void enter_bootloader_mode_if_requested(void) {} // not needed at all, but if anybody attempts to invoke it.... - -#elif defined(STM32_BOOTLOADER_ADDRESS) // STM32_BOOTLOADER_DUAL_BANK - -extern uint32_t __ram0_end__; - -__attribute__((weak)) void bootloader_jump(void) { - *MAGIC_ADDR = BOOTLOADER_MAGIC; // set magic flag => reset handler will jump into boot loader - NVIC_SystemReset(); -} - -void enter_bootloader_mode_if_requested(void) { - unsigned long *check = MAGIC_ADDR; - if (*check == BOOTLOADER_MAGIC) { - *check = 0; - __set_CONTROL(0); - __set_MSP(*(__IO uint32_t *)STM32_BOOTLOADER_ADDRESS); - __enable_irq(); - - typedef void (*BootJump_t)(void); - BootJump_t boot_jump = *(BootJump_t *)(STM32_BOOTLOADER_ADDRESS + 4); - boot_jump(); - while (1) - ; - } -} - -#elif defined(KL2x) || defined(K20x) || defined(MK66F18) || defined(MIMXRT1062) // STM32_BOOTLOADER_DUAL_BANK // STM32_BOOTLOADER_ADDRESS -/* Kinetis */ - -# if defined(BOOTLOADER_KIIBOHD) -/* Kiibohd Bootloader (MCHCK and Infinity KB) */ -# define SCB_AIRCR_VECTKEY_WRITEMAGIC 0x05FA0000 -const uint8_t sys_reset_to_loader_magic[] = "\xff\x00\x7fRESET TO LOADER\x7f\x00\xff"; -__attribute__((weak)) void bootloader_jump(void) { - void *volatile vbat = (void *)VBAT; - __builtin_memcpy(vbat, (const void *)sys_reset_to_loader_magic, sizeof(sys_reset_to_loader_magic)); - // request reset - SCB->AIRCR = SCB_AIRCR_VECTKEY_WRITEMAGIC | SCB_AIRCR_SYSRESETREQ_Msk; -} - -# else /* defined(BOOTLOADER_KIIBOHD) */ -/* Default for Kinetis - expecting an ARM Teensy */ -# include "wait.h" -__attribute__((weak)) void bootloader_jump(void) { - wait_ms(100); - __BKPT(0); -} -# endif /* defined(BOOTLOADER_KIIBOHD) */ - -#else /* neither STM32 nor KINETIS */ -__attribute__((weak)) void bootloader_jump(void) {} -#endif diff --git a/tmk_core/common/chibios/chibios_config.h b/tmk_core/common/chibios/chibios_config.h deleted file mode 100644 index 23c65f94284..00000000000 --- a/tmk_core/common/chibios/chibios_config.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2019 - * - * 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/>. - */ -#pragma once - -#ifndef USB_VBUS_PIN -# define SPLIT_USB_DETECT // Force this on when dedicated pin is not used -#endif - -#if defined(STM32F1XX) -# define USE_GPIOV1 -#endif - -#if defined(STM32F1XX) || defined(STM32F2XX) || defined(STM32F4XX) || defined(STM32L1XX) -# define USE_I2CV1 -#endif - -// teensy -#if defined(K20x) || defined(KL2x) -# define USE_I2CV1 -# define USE_I2CV1_CONTRIB // for some reason a bunch of ChibiOS-Contrib boards only have clock_speed -# define USE_GPIOV1 -# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY -#endif - -#if defined(MK66F18) -# define STM32_SYSCLK KINETIS_SYSCLK_FREQUENCY -#endif diff --git a/tmk_core/common/chibios/eeprom_stm32.c b/tmk_core/common/chibios/eeprom_stm32.c deleted file mode 100644 index 1fdf8c1e29b..00000000000 --- a/tmk_core/common/chibios/eeprom_stm32.c +++ /dev/null @@ -1,726 +0,0 @@ -/* - * This software is experimental and a work in progress. - * Under no circumstances should these files be used in relation to any critical system(s). - * Use of these files is at your own risk. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * This files are free to use from http://engsta.com/stm32-flash-memory-eeprom-emulator/ by - * Artur F. - * - * Modifications for QMK and STM32F303 by Yiancar - * Modifications to add flash wear leveling by Ilya Zhuravlev - * Modifications to increase flash density by Don Kjer - */ - -#include <stdio.h> -#include <stdbool.h> -#include "util.h" -#include "debug.h" -#include "eeprom_stm32.h" -#include "flash_stm32.h" - -/* - * We emulate eeprom by writing a snapshot compacted view of eeprom contents, - * followed by a write log of any change since that snapshot: - * - * === SIMULATED EEPROM CONTENTS === - * - * ┌─ Compacted ┬ Write Log ─┐ - * │............│[BYTE][BYTE]│ - * │FFFF....FFFF│[WRD0][WRD1]│ - * │FFFFFFFFFFFF│[WORD][NEXT]│ - * │....FFFFFFFF│[BYTE][WRD0]│ - * ├────────────┼────────────┤ - * └──PAGE_BASE │ │ - * PAGE_LAST─┴─WRITE_BASE │ - * WRITE_LAST ┘ - * - * Compacted contents are the 1's complement of the actual EEPROM contents. - * e.g. An 'FFFF' represents a '0000' value. - * - * The size of the 'compacted' area is equal to the size of the 'emulated' eeprom. - * The size of the compacted-area and write log are configurable, and the combined - * size of Compacted + WriteLog is a multiple FEE_PAGE_SIZE, which is MCU dependent. - * Simulated Eeprom contents are located at the end of available flash space. - * - * The following configuration defines can be set: - * - * FEE_PAGE_COUNT # Total number of pages to use for eeprom simulation (Compact + Write log) - * FEE_DENSITY_BYTES # Size of simulated eeprom. (Defaults to half the space allocated by FEE_PAGE_COUNT) - * NOTE: The current implementation does not include page swapping, - * and FEE_DENSITY_BYTES will consume that amount of RAM as a cached view of actual EEPROM contents. - * - * The maximum size of FEE_DENSITY_BYTES is currently 16384. The write log size equals - * FEE_PAGE_COUNT * FEE_PAGE_SIZE - FEE_DENSITY_BYTES. - * The larger the write log, the less frequently the compacted area needs to be rewritten. - * - * - * *** General Algorithm *** - * - * During initialization: - * The contents of the Compacted-flash area are loaded and the 1's complement value - * is cached into memory (e.g. 0xFFFF in Flash represents 0x0000 in cache). - * Write log entries are processed until a 0xFFFF is reached. - * Each log entry updates a byte or word in the cache. - * - * During reads: - * EEPROM contents are given back directly from the cache in memory. - * - * During writes: - * The contents of the cache is updated first. - * If the Compacted-flash area corresponding to the write address is unprogrammed, the 1's complement of the value is written directly into Compacted-flash - * Otherwise: - * If the write log is full, erase both the Compacted-flash area and the Write log, then write cached contents to the Compacted-flash area. - * Otherwise a Write log entry is constructed and appended to the next free position in the Write log. - * - * - * *** Write Log Structure *** - * - * Write log entries allow for optimized byte writes to addresses below 128. Writing 0 or 1 words are also optimized when word-aligned. - * - * === WRITE LOG ENTRY FORMATS === - * - * ╔═══ Byte-Entry ══╗ - * ║0XXXXXXX║YYYYYYYY║ - * ║ └──┬──┘║└──┬───┘║ - * ║ Address║ Value ║ - * ╚════════╩════════╝ - * 0 <= Address < 0x80 (128) - * - * ╔ Word-Encoded 0 ╗ - * ║100XXXXXXXXXXXXX║ - * ║ │└─────┬─────┘║ - * ║ │Address >> 1 ║ - * ║ └── Value: 0 ║ - * ╚════════════════╝ - * 0 <= Address <= 0x3FFE (16382) - * - * ╔ Word-Encoded 1 ╗ - * ║101XXXXXXXXXXXXX║ - * ║ │└─────┬─────┘║ - * ║ │Address >> 1 ║ - * ║ └── Value: 1 ║ - * ╚════════════════╝ - * 0 <= Address <= 0x3FFE (16382) - * - * ╔═══ Reserved ═══╗ - * ║110XXXXXXXXXXXXX║ - * ╚════════════════╝ - * - * ╔═══════════ Word-Next ═══════════╗ - * ║111XXXXXXXXXXXXX║YYYYYYYYYYYYYYYY║ - * ║ └─────┬─────┘║└───────┬──────┘║ - * ║(Address-128)>>1║ ~Value ║ - * ╚════════════════╩════════════════╝ - * ( 0 <= Address < 0x0080 (128): Reserved) - * 0x80 <= Address <= 0x3FFE (16382) - * - * Write Log entry ranges: - * 0x0000 ... 0x7FFF - Byte-Entry; address is (Entry & 0x7F00) >> 4; value is (Entry & 0xFF) - * 0x8000 ... 0x9FFF - Word-Encoded 0; address is (Entry & 0x1FFF) << 1; value is 0 - * 0xA000 ... 0xBFFF - Word-Encoded 1; address is (Entry & 0x1FFF) << 1; value is 1 - * 0xC000 ... 0xDFFF - Reserved - * 0xE000 ... 0xFFBF - Word-Next; address is (Entry & 0x1FFF) << 1 + 0x80; value is ~(Next_Entry) - * 0xFFC0 ... 0xFFFE - Reserved - * 0xFFFF - Unprogrammed - * - */ - -#include "eeprom_stm32_defs.h" -#if !defined(FEE_PAGE_SIZE) || !defined(FEE_PAGE_COUNT) || !defined(FEE_MCU_FLASH_SIZE) || !defined(FEE_PAGE_BASE_ADDRESS) -# error "not implemented." -#endif - -/* These bits are used for optimizing encoding of bytes, 0 and 1 */ -#define FEE_WORD_ENCODING 0x8000 -#define FEE_VALUE_NEXT 0x6000 -#define FEE_VALUE_RESERVED 0x4000 -#define FEE_VALUE_ENCODED 0x2000 -#define FEE_BYTE_RANGE 0x80 - -/* Addressable range 16KByte: 0 <-> (0x1FFF << 1) */ -#define FEE_ADDRESS_MAX_SIZE 0x4000 - -/* Flash word value after erase */ -#define FEE_EMPTY_WORD ((uint16_t)0xFFFF) - -/* Size of combined compacted eeprom and write log pages */ -#define FEE_DENSITY_MAX_SIZE (FEE_PAGE_COUNT * FEE_PAGE_SIZE) - -#ifndef FEE_MCU_FLASH_SIZE_IGNORE_CHECK /* *TODO: Get rid of this check */ -# if FEE_DENSITY_MAX_SIZE > (FEE_MCU_FLASH_SIZE * 1024) -# pragma message STR(FEE_DENSITY_MAX_SIZE) " > " STR(FEE_MCU_FLASH_SIZE * 1024) -# error emulated eeprom: FEE_DENSITY_MAX_SIZE is greater than available flash size -# endif -#endif - -/* Size of emulated eeprom */ -#ifdef FEE_DENSITY_BYTES -# if (FEE_DENSITY_BYTES > FEE_DENSITY_MAX_SIZE) -# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE) -# error emulated eeprom: FEE_DENSITY_BYTES exceeds FEE_DENSITY_MAX_SIZE -# endif -# if (FEE_DENSITY_BYTES == FEE_DENSITY_MAX_SIZE) -# pragma message STR(FEE_DENSITY_BYTES) " == " STR(FEE_DENSITY_MAX_SIZE) -# warning emulated eeprom: FEE_DENSITY_BYTES leaves no room for a write log. This will greatly increase the flash wear rate! -# endif -# if FEE_DENSITY_BYTES > FEE_ADDRESS_MAX_SIZE -# pragma message STR(FEE_DENSITY_BYTES) " > " STR(FEE_ADDRESS_MAX_SIZE) -# error emulated eeprom: FEE_DENSITY_BYTES is greater than FEE_ADDRESS_MAX_SIZE allows -# endif -# if ((FEE_DENSITY_BYTES) % 2) == 1 -# error emulated eeprom: FEE_DENSITY_BYTES must be even -# endif -#else -/* Default to half of allocated space used for emulated eeprom, half for write log */ -# define FEE_DENSITY_BYTES (FEE_PAGE_COUNT * FEE_PAGE_SIZE / 2) -#endif - -/* Size of write log */ -#ifdef FEE_WRITE_LOG_BYTES -# if ((FEE_DENSITY_BYTES + FEE_WRITE_LOG_BYTES) > FEE_DENSITY_MAX_SIZE) -# pragma message STR(FEE_DENSITY_BYTES) " + " STR(FEE_WRITE_LOG_BYTES) " > " STR(FEE_DENSITY_MAX_SIZE) -# error emulated eeprom: FEE_WRITE_LOG_BYTES exceeds remaining FEE_DENSITY_MAX_SIZE -# endif -# if ((FEE_WRITE_LOG_BYTES) % 2) == 1 -# error emulated eeprom: FEE_WRITE_LOG_BYTES must be even -# endif -#else -/* Default to use all remaining space */ -# define FEE_WRITE_LOG_BYTES (FEE_PAGE_COUNT * FEE_PAGE_SIZE - FEE_DENSITY_BYTES) -#endif - -/* Start of the emulated eeprom compacted flash area */ -#define FEE_COMPACTED_BASE_ADDRESS FEE_PAGE_BASE_ADDRESS -/* End of the emulated eeprom compacted flash area */ -#define FEE_COMPACTED_LAST_ADDRESS (FEE_COMPACTED_BASE_ADDRESS + FEE_DENSITY_BYTES) -/* Start of the emulated eeprom write log */ -#define FEE_WRITE_LOG_BASE_ADDRESS FEE_COMPACTED_LAST_ADDRESS -/* End of the emulated eeprom write log */ -#define FEE_WRITE_LOG_LAST_ADDRESS (FEE_WRITE_LOG_BASE_ADDRESS + FEE_WRITE_LOG_BYTES) - -#if defined(DYNAMIC_KEYMAP_EEPROM_MAX_ADDR) && (DYNAMIC_KEYMAP_EEPROM_MAX_ADDR >= FEE_DENSITY_BYTES) -# error emulated eeprom: DYNAMIC_KEYMAP_EEPROM_MAX_ADDR is greater than the FEE_DENSITY_BYTES available -#endif - -/* In-memory contents of emulated eeprom for faster access */ -/* *TODO: Implement page swapping */ -static uint16_t WordBuf[FEE_DENSITY_BYTES / 2]; -static uint8_t *DataBuf = (uint8_t *)WordBuf; - -/* Pointer to the first available slot within the write log */ -static uint16_t *empty_slot; - -// #define DEBUG_EEPROM_OUTPUT - -/* - * Debug print utils - */ - -#if defined(DEBUG_EEPROM_OUTPUT) - -# define debug_eeprom debug_enable -# define eeprom_println(s) println(s) -# define eeprom_printf(fmt, ...) xprintf(fmt, ##__VA_ARGS__); - -#else /* NO_DEBUG */ - -# define debug_eeprom false -# define eeprom_println(s) -# define eeprom_printf(fmt, ...) - -#endif /* NO_DEBUG */ - -void print_eeprom(void) { -#ifndef NO_DEBUG - int empty_rows = 0; - for (uint16_t i = 0; i < FEE_DENSITY_BYTES; i++) { - if (i % 16 == 0) { - if (i >= FEE_DENSITY_BYTES - 16) { - /* Make sure we display the last row */ - empty_rows = 0; - } - /* Check if this row is uninitialized */ - ++empty_rows; - for (uint16_t j = 0; j < 16; j++) { - if (DataBuf[i + j]) { - empty_rows = 0; - break; - } - } - if (empty_rows > 1) { - /* Repeat empty row */ - if (empty_rows == 2) { - /* Only display the first repeat empty row */ - println("*"); - } - i += 15; - continue; - } - xprintf("%04x", i); - } - if (i % 8 == 0) print(" "); - - xprintf(" %02x", DataBuf[i]); - if ((i + 1) % 16 == 0) { - println(""); - } - } -#endif -} - -uint16_t EEPROM_Init(void) { - /* Load emulated eeprom contents from compacted flash into memory */ - uint16_t *src = (uint16_t *)FEE_COMPACTED_BASE_ADDRESS; - uint16_t *dest = (uint16_t *)DataBuf; - for (; src < (uint16_t *)FEE_COMPACTED_LAST_ADDRESS; ++src, ++dest) { - *dest = ~*src; - } - - if (debug_eeprom) { - println("EEPROM_Init Compacted Pages:"); - print_eeprom(); - println("EEPROM_Init Write Log:"); - } - - /* Replay write log */ - uint16_t *log_addr; - for (log_addr = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; log_addr < (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS; ++log_addr) { - uint16_t address = *log_addr; - if (address == FEE_EMPTY_WORD) { - break; - } - /* Check for lowest 128-bytes optimization */ - if (!(address & FEE_WORD_ENCODING)) { - uint8_t bvalue = (uint8_t)address; - address >>= 8; - DataBuf[address] = bvalue; - eeprom_printf("DataBuf[0x%02x] = 0x%02x;\n", address, bvalue); - } else { - uint16_t wvalue; - /* Check if value is in next word */ - if ((address & FEE_VALUE_NEXT) == FEE_VALUE_NEXT) { - /* Read value from next word */ - if (++log_addr >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { - break; - } - wvalue = ~*log_addr; - if (!wvalue) { - eeprom_printf("Incomplete write at log_addr: 0x%04x;\n", (uint32_t)log_addr); - /* Possibly incomplete write. Ignore and continue */ - continue; - } - address &= 0x1FFF; - address <<= 1; - /* Writes to addresses less than 128 are byte log entries */ - address += FEE_BYTE_RANGE; - } else { - /* Reserved for future use */ - if (address & FEE_VALUE_RESERVED) { - eeprom_printf("Reserved encoded value at log_addr: 0x%04x;\n", (uint32_t)log_addr); - continue; - } - /* Optimization for 0 or 1 values. */ - wvalue = (address & FEE_VALUE_ENCODED) >> 13; - address &= 0x1FFF; - address <<= 1; - } - if (address < FEE_DENSITY_BYTES) { - eeprom_printf("DataBuf[0x%04x] = 0x%04x;\n", address, wvalue); - *(uint16_t *)(&DataBuf[address]) = wvalue; - } else { - eeprom_printf("DataBuf[0x%04x] cannot be set to 0x%04x [BAD ADDRESS]\n", address, wvalue); - } - } - } - - empty_slot = log_addr; - - if (debug_eeprom) { - println("EEPROM_Init Final DataBuf:"); - print_eeprom(); - } - - return FEE_DENSITY_BYTES; -} - -/* Clear flash contents (doesn't touch in-memory DataBuf) */ -static void eeprom_clear(void) { - FLASH_Unlock(); - - for (uint16_t page_num = 0; page_num < FEE_PAGE_COUNT; ++page_num) { - eeprom_printf("FLASH_ErasePage(0x%04x)\n", (uint32_t)(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE))); - FLASH_ErasePage(FEE_PAGE_BASE_ADDRESS + (page_num * FEE_PAGE_SIZE)); - } - - FLASH_Lock(); - - empty_slot = (uint16_t *)FEE_WRITE_LOG_BASE_ADDRESS; - eeprom_printf("eeprom_clear empty_slot: 0x%08x\n", (uint32_t)empty_slot); -} - -/* Erase emulated eeprom */ -void EEPROM_Erase(void) { - eeprom_println("EEPROM_Erase"); - /* Erase compacted pages and write log */ - eeprom_clear(); - /* re-initialize to reset DataBuf */ - EEPROM_Init(); -} - -/* Compact write log */ -static uint8_t eeprom_compact(void) { - /* Erase compacted pages and write log */ - eeprom_clear(); - - FLASH_Unlock(); - - FLASH_Status final_status = FLASH_COMPLETE; - - /* Write emulated eeprom contents from memory to compacted flash */ - uint16_t *src = (uint16_t *)DataBuf; - uintptr_t dest = FEE_COMPACTED_BASE_ADDRESS; - uint16_t value; - for (; dest < FEE_COMPACTED_LAST_ADDRESS; ++src, dest += 2) { - value = *src; - if (value) { - eeprom_printf("FLASH_ProgramHalfWord(0x%04x, 0x%04x)\n", (uint32_t)dest, ~value); - FLASH_Status status = FLASH_ProgramHalfWord(dest, ~value); - if (status != FLASH_COMPLETE) final_status = status; - } - } - - FLASH_Lock(); - - if (debug_eeprom) { - println("eeprom_compacted:"); - print_eeprom(); - } - - return final_status; -} - -static uint8_t eeprom_write_direct_entry(uint16_t Address) { - /* Check if we can just write this directly to the compacted flash area */ - uintptr_t directAddress = FEE_COMPACTED_BASE_ADDRESS + (Address & 0xFFFE); - if (*(uint16_t *)directAddress == FEE_EMPTY_WORD) { - /* Write the value directly to the compacted area without a log entry */ - uint16_t value = ~*(uint16_t *)(&DataBuf[Address & 0xFFFE]); - /* Early exit if a write isn't needed */ - if (value == FEE_EMPTY_WORD) return FLASH_COMPLETE; - - FLASH_Unlock(); - - eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x) [DIRECT]\n", (uint32_t)directAddress, value); - FLASH_Status status = FLASH_ProgramHalfWord(directAddress, value); - - FLASH_Lock(); - return status; - } - return 0; -} - -static uint8_t eeprom_write_log_word_entry(uint16_t Address) { - FLASH_Status final_status = FLASH_COMPLETE; - - uint16_t value = *(uint16_t *)(&DataBuf[Address]); - eeprom_printf("eeprom_write_log_word_entry(0x%04x): 0x%04x\n", Address, value); - - /* MSB signifies the lowest 128-byte optimization is not in effect */ - uint16_t encoding = FEE_WORD_ENCODING; - uint8_t entry_size; - if (value <= 1) { - encoding |= value << 13; - entry_size = 2; - } else { - encoding |= FEE_VALUE_NEXT; - entry_size = 4; - /* Writes to addresses less than 128 are byte log entries */ - Address -= FEE_BYTE_RANGE; - } - - /* if we can't find an empty spot, we must compact emulated eeprom */ - if (empty_slot > (uint16_t *)(FEE_WRITE_LOG_LAST_ADDRESS - entry_size)) { - /* compact the write log into the compacted flash area */ - return eeprom_compact(); - } - - /* Word log writes should be word-aligned. Take back a bit */ - Address >>= 1; - Address |= encoding; - - /* ok we found a place let's write our data */ - FLASH_Unlock(); - - /* address */ - eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, Address); - final_status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, Address); - - /* value */ - if (encoding == (FEE_WORD_ENCODING | FEE_VALUE_NEXT)) { - eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, ~value); - FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, ~value); - if (status != FLASH_COMPLETE) final_status = status; - } - - FLASH_Lock(); - - return final_status; -} - -static uint8_t eeprom_write_log_byte_entry(uint16_t Address) { - eeprom_printf("eeprom_write_log_byte_entry(0x%04x): 0x%02x\n", Address, DataBuf[Address]); - - /* if couldn't find an empty spot, we must compact emulated eeprom */ - if (empty_slot >= (uint16_t *)FEE_WRITE_LOG_LAST_ADDRESS) { - /* compact the write log into the compacted flash area */ - return eeprom_compact(); - } - - /* ok we found a place let's write our data */ - FLASH_Unlock(); - - /* Pack address and value into the same word */ - uint16_t value = (Address << 8) | DataBuf[Address]; - - /* write to flash */ - eeprom_printf("FLASH_ProgramHalfWord(0x%08x, 0x%04x)\n", (uint32_t)empty_slot, value); - FLASH_Status status = FLASH_ProgramHalfWord((uintptr_t)empty_slot++, value); - - FLASH_Lock(); - - return status; -} - -uint8_t EEPROM_WriteDataByte(uint16_t Address, uint8_t DataByte) { - /* if the address is out-of-bounds, do nothing */ - if (Address >= FEE_DENSITY_BYTES) { - eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [BAD ADDRESS]\n", Address, DataByte); - return FLASH_BAD_ADDRESS; - } - - /* if the value is the same, don't bother writing it */ - if (DataBuf[Address] == DataByte) { - eeprom_printf("EEPROM_WriteDataByte(0x%04x, 0x%02x) [SKIP SAME]\n", Address, DataByte); - return 0; - } - - /* keep DataBuf cache in sync */ - DataBuf[Address] = DataByte; - eeprom_printf("EEPROM_WriteDataByte DataBuf[0x%04x] = 0x%02x\n", Address, DataBuf[Address]); - - /* perform the write into flash memory */ - /* First, attempt to write directly into the compacted flash area */ - FLASH_Status status = eeprom_write_direct_entry(Address); - if (!status) { - /* Otherwise append to the write log */ - if (Address < FEE_BYTE_RANGE) { - status = eeprom_write_log_byte_entry(Address); - } else { - status = eeprom_write_log_word_entry(Address & 0xFFFE); - } - } - if (status != 0 && status != FLASH_COMPLETE) { - eeprom_printf("EEPROM_WriteDataByte [STATUS == %d]\n", status); - } - return status; -} - -uint8_t EEPROM_WriteDataWord(uint16_t Address, uint16_t DataWord) { - /* if the address is out-of-bounds, do nothing */ - if (Address >= FEE_DENSITY_BYTES) { - eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [BAD ADDRESS]\n", Address, DataWord); - return FLASH_BAD_ADDRESS; - } - - /* Check for word alignment */ - FLASH_Status final_status = FLASH_COMPLETE; - if (Address % 2) { - final_status = EEPROM_WriteDataByte(Address, DataWord); - FLASH_Status status = EEPROM_WriteDataByte(Address + 1, DataWord >> 8); - if (status != FLASH_COMPLETE) final_status = status; - if (final_status != 0 && final_status != FLASH_COMPLETE) { - eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); - } - return final_status; - } - - /* if the value is the same, don't bother writing it */ - uint16_t oldValue = *(uint16_t *)(&DataBuf[Address]); - if (oldValue == DataWord) { - eeprom_printf("EEPROM_WriteDataWord(0x%04x, 0x%04x) [SKIP SAME]\n", Address, DataWord); - return 0; - } - - /* keep DataBuf cache in sync */ - *(uint16_t *)(&DataBuf[Address]) = DataWord; - eeprom_printf("EEPROM_WriteDataWord DataBuf[0x%04x] = 0x%04x\n", Address, *(uint16_t *)(&DataBuf[Address])); - - /* perform the write into flash memory */ - /* First, attempt to write directly into the compacted flash area */ - final_status = eeprom_write_direct_entry(Address); - if (!final_status) { - /* Otherwise append to the write log */ - /* Check if we need to fall back to byte write */ - if (Address < FEE_BYTE_RANGE) { - final_status = FLASH_COMPLETE; - /* Only write a byte if it has changed */ - if ((uint8_t)oldValue != (uint8_t)DataWord) { - final_status = eeprom_write_log_byte_entry(Address); - } - FLASH_Status status = FLASH_COMPLETE; - /* Only write a byte if it has changed */ - if ((oldValue >> 8) != (DataWord >> 8)) { - status = eeprom_write_log_byte_entry(Address + 1); - } - if (status != FLASH_COMPLETE) final_status = status; - } else { - final_status = eeprom_write_log_word_entry(Address); - } - } - if (final_status != 0 && final_status != FLASH_COMPLETE) { - eeprom_printf("EEPROM_WriteDataWord [STATUS == %d]\n", final_status); - } - return final_status; -} - -uint8_t EEPROM_ReadDataByte(uint16_t Address) { - uint8_t DataByte = 0xFF; - - if (Address < FEE_DENSITY_BYTES) { - DataByte = DataBuf[Address]; - } - - eeprom_printf("EEPROM_ReadDataByte(0x%04x): 0x%02x\n", Address, DataByte); - - return DataByte; -} - -uint16_t EEPROM_ReadDataWord(uint16_t Address) { - uint16_t DataWord = 0xFFFF; - - if (Address < FEE_DENSITY_BYTES - 1) { - /* Check word alignment */ - if (Address % 2) { - DataWord = DataBuf[Address] | (DataBuf[Address + 1] << 8); - } else { - DataWord = *(uint16_t *)(&DataBuf[Address]); - } - } - - eeprom_printf("EEPROM_ReadDataWord(0x%04x): 0x%04x\n", Address, DataWord); - - return DataWord; -} - -/***************************************************************************** - * Wrap library in AVR style functions. - *******************************************************************************/ -uint8_t eeprom_read_byte(const uint8_t *Address) { return EEPROM_ReadDataByte((const uintptr_t)Address); } - -void eeprom_write_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } - -void eeprom_update_byte(uint8_t *Address, uint8_t Value) { EEPROM_WriteDataByte((uintptr_t)Address, Value); } - -uint16_t eeprom_read_word(const uint16_t *Address) { return EEPROM_ReadDataWord((const uintptr_t)Address); } - -void eeprom_write_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } - -void eeprom_update_word(uint16_t *Address, uint16_t Value) { EEPROM_WriteDataWord((uintptr_t)Address, Value); } - -uint32_t eeprom_read_dword(const uint32_t *Address) { - const uint16_t p = (const uintptr_t)Address; - /* Check word alignment */ - if (p % 2) { - /* Not aligned */ - return (uint32_t)EEPROM_ReadDataByte(p) | (uint32_t)(EEPROM_ReadDataWord(p + 1) << 8) | (uint32_t)(EEPROM_ReadDataByte(p + 3) << 24); - } else { - /* Aligned */ - return EEPROM_ReadDataWord(p) | (EEPROM_ReadDataWord(p + 2) << 16); - } -} - -void eeprom_write_dword(uint32_t *Address, uint32_t Value) { - uint16_t p = (const uintptr_t)Address; - /* Check word alignment */ - if (p % 2) { - /* Not aligned */ - EEPROM_WriteDataByte(p, (uint8_t)Value); - EEPROM_WriteDataWord(p + 1, (uint16_t)(Value >> 8)); - EEPROM_WriteDataByte(p + 3, (uint8_t)(Value >> 24)); - } else { - /* Aligned */ - EEPROM_WriteDataWord(p, (uint16_t)Value); - EEPROM_WriteDataWord(p + 2, (uint16_t)(Value >> 16)); - } -} - -void eeprom_update_dword(uint32_t *Address, uint32_t Value) { eeprom_write_dword(Address, Value); } - -void eeprom_read_block(void *buf, const void *addr, size_t len) { - const uint8_t *src = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; - - /* Check word alignment */ - if (len && (uintptr_t)src % 2) { - /* Read the unaligned first byte */ - *dest++ = eeprom_read_byte(src++); - --len; - } - - uint16_t value; - bool aligned = ((uintptr_t)dest % 2 == 0); - while (len > 1) { - value = eeprom_read_word((uint16_t *)src); - if (aligned) { - *(uint16_t *)dest = value; - dest += 2; - } else { - *dest++ = value; - *dest++ = value >> 8; - } - src += 2; - len -= 2; - } - if (len) { - *dest = eeprom_read_byte(src); - } -} - -void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * dest = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - - /* Check word alignment */ - if (len && (uintptr_t)dest % 2) { - /* Write the unaligned first byte */ - eeprom_write_byte(dest++, *src++); - --len; - } - - uint16_t value; - bool aligned = ((uintptr_t)src % 2 == 0); - while (len > 1) { - if (aligned) { - value = *(uint16_t *)src; - } else { - value = *(uint8_t *)src | (*(uint8_t *)(src + 1) << 8); - } - eeprom_write_word((uint16_t *)dest, value); - dest += 2; - src += 2; - len -= 2; - } - - if (len) { - eeprom_write_byte(dest, *src); - } -} - -void eeprom_update_block(const void *buf, void *addr, size_t len) { eeprom_write_block(buf, addr, len); } diff --git a/tmk_core/common/chibios/eeprom_stm32_defs.h b/tmk_core/common/chibios/eeprom_stm32_defs.h deleted file mode 100644 index 22b4ab858ee..00000000000 --- a/tmk_core/common/chibios/eeprom_stm32_defs.h +++ /dev/null @@ -1,61 +0,0 @@ -/* Copyright 2021 QMK - * - * 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 3 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/>. - */ -#pragma once - -#include <hal.h> - -#if !defined(FEE_PAGE_SIZE) || !defined(FEE_PAGE_COUNT) -# if defined(STM32F103xB) || defined(STM32F042x6) -# ifndef FEE_PAGE_SIZE -# define FEE_PAGE_SIZE 0x400 // Page size = 1KByte -# endif -# ifndef FEE_PAGE_COUNT -# define FEE_PAGE_COUNT 2 // How many pages are used -# endif -# elif defined(STM32F103xE) || defined(STM32F303xC) || defined(STM32F072xB) || defined(STM32F070xB) -# ifndef FEE_PAGE_SIZE -# define FEE_PAGE_SIZE 0x800 // Page size = 2KByte -# endif -# ifndef FEE_PAGE_COUNT -# define FEE_PAGE_COUNT 4 // How many pages are used -# endif -# endif -#endif - -#if !defined(FEE_MCU_FLASH_SIZE) -# if defined(STM32F042x6) -# define FEE_MCU_FLASH_SIZE 32 // Size in Kb -# elif defined(STM32F103xB) || defined(STM32F072xB) || defined(STM32F070xB) -# define FEE_MCU_FLASH_SIZE 128 // Size in Kb -# elif defined(STM32F303xC) -# define FEE_MCU_FLASH_SIZE 256 // Size in Kb -# elif defined(STM32F103xE) -# define FEE_MCU_FLASH_SIZE 512 // Size in Kb -# endif -#endif - -/* Start of the emulated eeprom */ -#if !defined(FEE_PAGE_BASE_ADDRESS) -# if 0 -/* TODO: Add support for F4 */ -# else -# ifndef FEE_FLASH_BASE -# define FEE_FLASH_BASE 0x8000000 -# endif -/* Default to end of flash */ -# define FEE_PAGE_BASE_ADDRESS ((uintptr_t)(FEE_FLASH_BASE) + FEE_MCU_FLASH_SIZE * 1024 - (FEE_PAGE_COUNT * FEE_PAGE_SIZE)) -# endif -#endif diff --git a/tmk_core/common/chibios/eeprom_teensy.c b/tmk_core/common/chibios/eeprom_teensy.c deleted file mode 100644 index 4aaf6652690..00000000000 --- a/tmk_core/common/chibios/eeprom_teensy.c +++ /dev/null @@ -1,610 +0,0 @@ -#include <ch.h> -#include <hal.h> - -#include "eeconfig.h" - -/*************************************/ -/* Hardware backend */ -/* */ -/* Code from PJRC/Teensyduino */ -/*************************************/ - -/* Teensyduino Core Library - * http://www.pjrc.com/teensy/ - * Copyright (c) 2013 PJRC.COM, LLC. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sublicense, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * 1. The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * 2. If the Software is incorporated into a build system that allows - * selection among a list of target devices, then similar target - * devices manufactured by PJRC.COM must be included in the list of - * target devices and selectable in the same manner. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS - * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN - * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if defined(K20x) /* chip selection */ -/* Teensy 3.0, 3.1, 3.2; mchck; infinity keyboard */ - -// The EEPROM is really RAM with a hardware-based backup system to -// flash memory. Selecting a smaller size EEPROM allows more wear -// leveling, for higher write endurance. If you edit this file, -// set this to the smallest size your application can use. Also, -// due to Freescale's implementation, writing 16 or 32 bit words -// (aligned to 2 or 4 byte boundaries) has twice the endurance -// compared to writing 8 bit bytes. -// -# ifndef EEPROM_SIZE -# define EEPROM_SIZE 32 -# endif - -/* - ^^^ Here be dragons: - NXP AppNote AN4282 section 3.1 states that partitioning must only be done once. - Once EEPROM partitioning is done, the size is locked to this initial configuration. - Attempts to modify the EEPROM_SIZE setting may brick your board. -*/ - -// Writing unaligned 16 or 32 bit data is handled automatically when -// this is defined, but at a cost of extra code size. Without this, -// any unaligned write will cause a hard fault exception! If you're -// absolutely sure all 16 and 32 bit writes will be aligned, you can -// remove the extra unnecessary code. -// -# define HANDLE_UNALIGNED_WRITES - -// Minimum EEPROM Endurance -// ------------------------ -# if (EEPROM_SIZE == 2048) // 35000 writes/byte or 70000 writes/word -# define EEESIZE 0x33 -# elif (EEPROM_SIZE == 1024) // 75000 writes/byte or 150000 writes/word -# define EEESIZE 0x34 -# elif (EEPROM_SIZE == 512) // 155000 writes/byte or 310000 writes/word -# define EEESIZE 0x35 -# elif (EEPROM_SIZE == 256) // 315000 writes/byte or 630000 writes/word -# define EEESIZE 0x36 -# elif (EEPROM_SIZE == 128) // 635000 writes/byte or 1270000 writes/word -# define EEESIZE 0x37 -# elif (EEPROM_SIZE == 64) // 1275000 writes/byte or 2550000 writes/word -# define EEESIZE 0x38 -# elif (EEPROM_SIZE == 32) // 2555000 writes/byte or 5110000 writes/word -# define EEESIZE 0x39 -# endif - -/** \brief eeprom initialization - * - * FIXME: needs doc - */ -void eeprom_initialize(void) { - uint32_t count = 0; - uint16_t do_flash_cmd[] = {0xf06f, 0x037f, 0x7003, 0x7803, 0xf013, 0x0f80, 0xd0fb, 0x4770}; - uint8_t status; - - if (FTFL->FCNFG & FTFL_FCNFG_RAMRDY) { - // FlexRAM is configured as traditional RAM - // We need to reconfigure for EEPROM usage - FTFL->FCCOB0 = 0x80; // PGMPART = Program Partition Command - FTFL->FCCOB4 = EEESIZE; // EEPROM Size - FTFL->FCCOB5 = 0x03; // 0K for Dataflash, 32K for EEPROM backup - __disable_irq(); - // do_flash_cmd() must execute from RAM. Luckily the C syntax is simple... - (*((void (*)(volatile uint8_t *))((uint32_t)do_flash_cmd | 1)))(&(FTFL->FSTAT)); - __enable_irq(); - status = FTFL->FSTAT; - if (status & (FTFL_FSTAT_RDCOLERR | FTFL_FSTAT_ACCERR | FTFL_FSTAT_FPVIOL)) { - FTFL->FSTAT = (status & (FTFL_FSTAT_RDCOLERR | FTFL_FSTAT_ACCERR | FTFL_FSTAT_FPVIOL)); - return; // error - } - } - // wait for eeprom to become ready (is this really necessary?) - while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) { - if (++count > 20000) break; - } -} - -# define FlexRAM ((uint8_t *)0x14000000) - -/** \brief eeprom read byte - * - * FIXME: needs doc - */ -uint8_t eeprom_read_byte(const uint8_t *addr) { - uint32_t offset = (uint32_t)addr; - if (offset >= EEPROM_SIZE) return 0; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - return FlexRAM[offset]; -} - -/** \brief eeprom read word - * - * FIXME: needs doc - */ -uint16_t eeprom_read_word(const uint16_t *addr) { - uint32_t offset = (uint32_t)addr; - if (offset >= EEPROM_SIZE - 1) return 0; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - return *(uint16_t *)(&FlexRAM[offset]); -} - -/** \brief eeprom read dword - * - * FIXME: needs doc - */ -uint32_t eeprom_read_dword(const uint32_t *addr) { - uint32_t offset = (uint32_t)addr; - if (offset >= EEPROM_SIZE - 3) return 0; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - return *(uint32_t *)(&FlexRAM[offset]); -} - -/** \brief eeprom read block - * - * FIXME: needs doc - */ -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { - uint32_t offset = (uint32_t)addr; - uint8_t *dest = (uint8_t *)buf; - uint32_t end = offset + len; - - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - if (end > EEPROM_SIZE) end = EEPROM_SIZE; - while (offset < end) { - *dest++ = FlexRAM[offset++]; - } -} - -/** \brief eeprom is ready - * - * FIXME: needs doc - */ -int eeprom_is_ready(void) { return (FTFL->FCNFG & FTFL_FCNFG_EEERDY) ? 1 : 0; } - -/** \brief flexram wait - * - * FIXME: needs doc - */ -static void flexram_wait(void) { - while (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) { - // TODO: timeout - } -} - -/** \brief eeprom_write_byte - * - * FIXME: needs doc - */ -void eeprom_write_byte(uint8_t *addr, uint8_t value) { - uint32_t offset = (uint32_t)addr; - - if (offset >= EEPROM_SIZE) return; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - if (FlexRAM[offset] != value) { - FlexRAM[offset] = value; - flexram_wait(); - } -} - -/** \brief eeprom write word - * - * FIXME: needs doc - */ -void eeprom_write_word(uint16_t *addr, uint16_t value) { - uint32_t offset = (uint32_t)addr; - - if (offset >= EEPROM_SIZE - 1) return; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); -# ifdef HANDLE_UNALIGNED_WRITES - if ((offset & 1) == 0) { -# endif - if (*(uint16_t *)(&FlexRAM[offset]) != value) { - *(uint16_t *)(&FlexRAM[offset]) = value; - flexram_wait(); - } -# ifdef HANDLE_UNALIGNED_WRITES - } else { - if (FlexRAM[offset] != value) { - FlexRAM[offset] = value; - flexram_wait(); - } - if (FlexRAM[offset + 1] != (value >> 8)) { - FlexRAM[offset + 1] = value >> 8; - flexram_wait(); - } - } -# endif -} - -/** \brief eeprom write dword - * - * FIXME: needs doc - */ -void eeprom_write_dword(uint32_t *addr, uint32_t value) { - uint32_t offset = (uint32_t)addr; - - if (offset >= EEPROM_SIZE - 3) return; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); -# ifdef HANDLE_UNALIGNED_WRITES - switch (offset & 3) { - case 0: -# endif - if (*(uint32_t *)(&FlexRAM[offset]) != value) { - *(uint32_t *)(&FlexRAM[offset]) = value; - flexram_wait(); - } - return; -# ifdef HANDLE_UNALIGNED_WRITES - case 2: - if (*(uint16_t *)(&FlexRAM[offset]) != value) { - *(uint16_t *)(&FlexRAM[offset]) = value; - flexram_wait(); - } - if (*(uint16_t *)(&FlexRAM[offset + 2]) != (value >> 16)) { - *(uint16_t *)(&FlexRAM[offset + 2]) = value >> 16; - flexram_wait(); - } - return; - default: - if (FlexRAM[offset] != value) { - FlexRAM[offset] = value; - flexram_wait(); - } - if (*(uint16_t *)(&FlexRAM[offset + 1]) != (value >> 8)) { - *(uint16_t *)(&FlexRAM[offset + 1]) = value >> 8; - flexram_wait(); - } - if (FlexRAM[offset + 3] != (value >> 24)) { - FlexRAM[offset + 3] = value >> 24; - flexram_wait(); - } - } -# endif -} - -/** \brief eeprom write block - * - * FIXME: needs doc - */ -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { - uint32_t offset = (uint32_t)addr; - const uint8_t *src = (const uint8_t *)buf; - - if (offset >= EEPROM_SIZE) return; - if (!(FTFL->FCNFG & FTFL_FCNFG_EEERDY)) eeprom_initialize(); - if (len >= EEPROM_SIZE) len = EEPROM_SIZE; - if (offset + len >= EEPROM_SIZE) len = EEPROM_SIZE - offset; - while (len > 0) { - uint32_t lsb = offset & 3; - if (lsb == 0 && len >= 4) { - // write aligned 32 bits - uint32_t val32; - val32 = *src++; - val32 |= (*src++ << 8); - val32 |= (*src++ << 16); - val32 |= (*src++ << 24); - if (*(uint32_t *)(&FlexRAM[offset]) != val32) { - *(uint32_t *)(&FlexRAM[offset]) = val32; - flexram_wait(); - } - offset += 4; - len -= 4; - } else if ((lsb == 0 || lsb == 2) && len >= 2) { - // write aligned 16 bits - uint16_t val16; - val16 = *src++; - val16 |= (*src++ << 8); - if (*(uint16_t *)(&FlexRAM[offset]) != val16) { - *(uint16_t *)(&FlexRAM[offset]) = val16; - flexram_wait(); - } - offset += 2; - len -= 2; - } else { - // write 8 bits - uint8_t val8 = *src++; - if (FlexRAM[offset] != val8) { - FlexRAM[offset] = val8; - flexram_wait(); - } - offset++; - len--; - } - } -} - -/* -void do_flash_cmd(volatile uint8_t *fstat) -{ - *fstat = 0x80; - while ((*fstat & 0x80) == 0) ; // wait -} -00000000 <do_flash_cmd>: - 0: f06f 037f mvn.w r3, #127 ; 0x7f - 4: 7003 strb r3, [r0, #0] - 6: 7803 ldrb r3, [r0, #0] - 8: f013 0f80 tst.w r3, #128 ; 0x80 - c: d0fb beq.n 6 <do_flash_cmd+0x6> - e: 4770 bx lr -*/ - -#elif defined(KL2x) /* chip selection */ -/* Teensy LC (emulated) */ - -# define SYMVAL(sym) (uint32_t)(((uint8_t *)&(sym)) - ((uint8_t *)0)) - -extern uint32_t __eeprom_workarea_start__; -extern uint32_t __eeprom_workarea_end__; - -# define EEPROM_SIZE 128 - -static uint32_t flashend = 0; - -void eeprom_initialize(void) { - const uint16_t *p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); - - do { - if (*p++ == 0xFFFF) { - flashend = (uint32_t)(p - 2); - return; - } - } while (p < (uint16_t *)SYMVAL(__eeprom_workarea_end__)); - flashend = (uint32_t)(p - 1); -} - -uint8_t eeprom_read_byte(const uint8_t *addr) { - uint32_t offset = (uint32_t)addr; - const uint16_t *p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); - const uint16_t *end = (const uint16_t *)((uint32_t)flashend); - uint16_t val; - uint8_t data = 0xFF; - - if (!end) { - eeprom_initialize(); - end = (const uint16_t *)((uint32_t)flashend); - } - if (offset < EEPROM_SIZE) { - while (p <= end) { - val = *p++; - if ((val & 255) == offset) data = val >> 8; - } - } - return data; -} - -static void flash_write(const uint16_t *code, uint32_t addr, uint32_t data) { - // with great power comes great responsibility.... - uint32_t stat; - *(uint32_t *)&(FTFA->FCCOB3) = 0x06000000 | (addr & 0x00FFFFFC); - *(uint32_t *)&(FTFA->FCCOB7) = data; - __disable_irq(); - (*((void (*)(volatile uint8_t *))((uint32_t)code | 1)))(&(FTFA->FSTAT)); - __enable_irq(); - stat = FTFA->FSTAT & (FTFA_FSTAT_RDCOLERR | FTFA_FSTAT_ACCERR | FTFA_FSTAT_FPVIOL); - if (stat) { - FTFA->FSTAT = stat; - } - MCM->PLACR |= MCM_PLACR_CFCC; -} - -void eeprom_write_byte(uint8_t *addr, uint8_t data) { - uint32_t offset = (uint32_t)addr; - const uint16_t *p, *end = (const uint16_t *)((uint32_t)flashend); - uint32_t i, val, flashaddr; - uint16_t do_flash_cmd[] = {0x2380, 0x7003, 0x7803, 0xb25b, 0x2b00, 0xdafb, 0x4770}; - uint8_t buf[EEPROM_SIZE]; - - if (offset >= EEPROM_SIZE) return; - if (!end) { - eeprom_initialize(); - end = (const uint16_t *)((uint32_t)flashend); - } - if (++end < (uint16_t *)SYMVAL(__eeprom_workarea_end__)) { - val = (data << 8) | offset; - flashaddr = (uint32_t)end; - flashend = flashaddr; - if ((flashaddr & 2) == 0) { - val |= 0xFFFF0000; - } else { - val <<= 16; - val |= 0x0000FFFF; - } - flash_write(do_flash_cmd, flashaddr, val); - } else { - for (i = 0; i < EEPROM_SIZE; i++) { - buf[i] = 0xFF; - } - val = 0; - for (p = (uint16_t *)SYMVAL(__eeprom_workarea_start__); p < (uint16_t *)SYMVAL(__eeprom_workarea_end__); p++) { - val = *p; - if ((val & 255) < EEPROM_SIZE) { - buf[val & 255] = val >> 8; - } - } - buf[offset] = data; - for (flashaddr = (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_start__); flashaddr < (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_end__); flashaddr += 1024) { - *(uint32_t *)&(FTFA->FCCOB3) = 0x09000000 | flashaddr; - __disable_irq(); - (*((void (*)(volatile uint8_t *))((uint32_t)do_flash_cmd | 1)))(&(FTFA->FSTAT)); - __enable_irq(); - val = FTFA->FSTAT & (FTFA_FSTAT_RDCOLERR | FTFA_FSTAT_ACCERR | FTFA_FSTAT_FPVIOL); - ; - if (val) FTFA->FSTAT = val; - MCM->PLACR |= MCM_PLACR_CFCC; - } - flashaddr = (uint32_t)(uint16_t *)SYMVAL(__eeprom_workarea_start__); - for (i = 0; i < EEPROM_SIZE; i++) { - if (buf[i] == 0xFF) continue; - if ((flashaddr & 2) == 0) { - val = (buf[i] << 8) | i; - } else { - val = val | (buf[i] << 24) | (i << 16); - flash_write(do_flash_cmd, flashaddr, val); - } - flashaddr += 2; - } - flashend = flashaddr; - if ((flashaddr & 2)) { - val |= 0xFFFF0000; - flash_write(do_flash_cmd, flashaddr, val); - } - } -} - -/* -void do_flash_cmd(volatile uint8_t *fstat) -{ - *fstat = 0x80; - while ((*fstat & 0x80) == 0) ; // wait -} -00000000 <do_flash_cmd>: - 0: 2380 movs r3, #128 ; 0x80 - 2: 7003 strb r3, [r0, #0] - 4: 7803 ldrb r3, [r0, #0] - 6: b25b sxtb r3, r3 - 8: 2b00 cmp r3, #0 - a: dafb bge.n 4 <do_flash_cmd+0x4> - c: 4770 bx lr -*/ - -uint16_t eeprom_read_word(const uint16_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); -} - -uint32_t eeprom_read_dword(const uint32_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); -} - -void eeprom_read_block(void *buf, const void *addr, uint32_t len) { - const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; - while (len--) { - *dest++ = eeprom_read_byte(p++); - } -} - -int eeprom_is_ready(void) { return 1; } - -void eeprom_write_word(uint16_t *addr, uint16_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p, value >> 8); -} - -void eeprom_write_dword(uint32_t *addr, uint32_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p++, value >> 8); - eeprom_write_byte(p++, value >> 16); - eeprom_write_byte(p, value >> 24); -} - -void eeprom_write_block(const void *buf, void *addr, uint32_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} - -#else -// No EEPROM supported, so emulate it - -# ifndef EEPROM_SIZE -# include "eeconfig.h" -# define EEPROM_SIZE (((EECONFIG_SIZE + 3) / 4) * 4) // based off eeconfig's current usage, aligned to 4-byte sizes, to deal with LTO -# endif -__attribute__((aligned(4))) static uint8_t buffer[EEPROM_SIZE]; - -uint8_t eeprom_read_byte(const uint8_t *addr) { - uint32_t offset = (uint32_t)addr; - return buffer[offset]; -} - -void eeprom_write_byte(uint8_t *addr, uint8_t value) { - uint32_t offset = (uint32_t)addr; - buffer[offset] = value; -} - -uint16_t eeprom_read_word(const uint16_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8); -} - -uint32_t eeprom_read_dword(const uint32_t *addr) { - const uint8_t *p = (const uint8_t *)addr; - return eeprom_read_byte(p) | (eeprom_read_byte(p + 1) << 8) | (eeprom_read_byte(p + 2) << 16) | (eeprom_read_byte(p + 3) << 24); -} - -void eeprom_read_block(void *buf, const void *addr, size_t len) { - const uint8_t *p = (const uint8_t *)addr; - uint8_t * dest = (uint8_t *)buf; - while (len--) { - *dest++ = eeprom_read_byte(p++); - } -} - -void eeprom_write_word(uint16_t *addr, uint16_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p, value >> 8); -} - -void eeprom_write_dword(uint32_t *addr, uint32_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p++, value >> 8); - eeprom_write_byte(p++, value >> 16); - eeprom_write_byte(p, value >> 24); -} - -void eeprom_write_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} - -#endif /* chip selection */ -// The update functions just calls write for now, but could probably be optimized - -void eeprom_update_byte(uint8_t *addr, uint8_t value) { eeprom_write_byte(addr, value); } - -void eeprom_update_word(uint16_t *addr, uint16_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p, value >> 8); -} - -void eeprom_update_dword(uint32_t *addr, uint32_t value) { - uint8_t *p = (uint8_t *)addr; - eeprom_write_byte(p++, value); - eeprom_write_byte(p++, value >> 8); - eeprom_write_byte(p++, value >> 16); - eeprom_write_byte(p, value >> 24); -} - -void eeprom_update_block(const void *buf, void *addr, size_t len) { - uint8_t * p = (uint8_t *)addr; - const uint8_t *src = (const uint8_t *)buf; - while (len--) { - eeprom_write_byte(p++, *src++); - } -} diff --git a/tmk_core/common/chibios/flash_stm32.c b/tmk_core/common/chibios/flash_stm32.c deleted file mode 100644 index 6b80ff71c36..00000000000 --- a/tmk_core/common/chibios/flash_stm32.c +++ /dev/null @@ -1,164 +0,0 @@ -/* - * This software is experimental and a work in progress. - * Under no circumstances should these files be used in relation to any critical system(s). - * Use of these files is at your own risk. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR - * PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - * DEALINGS IN THE SOFTWARE. - * - * This files are free to use from https://github.com/rogerclarkmelbourne/Arduino_STM32 and - * https://github.com/leaflabs/libmaple - * - * Modifications for QMK and STM32F303 by Yiancar - */ - -#include <hal.h> -#include "flash_stm32.h" - -#if defined(EEPROM_EMU_STM32F103xB) -# define FLASH_SR_WRPERR FLASH_SR_WRPRTERR -#endif - -/* Delay definition */ -#define EraseTimeout ((uint32_t)0x00000FFF) -#define ProgramTimeout ((uint32_t)0x0000001F) - -#define ASSERT(exp) (void)((0)) - -/** - * @brief Inserts a time delay. - * @param None - * @retval None - */ -static void delay(void) { - __IO uint32_t i = 0; - for (i = 0xFF; i != 0; i--) { - } -} - -/** - * @brief Returns the FLASH Status. - * @param None - * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PG, - * FLASH_ERROR_WRP or FLASH_COMPLETE - */ -FLASH_Status FLASH_GetStatus(void) { - if ((FLASH->SR & FLASH_SR_BSY) == FLASH_SR_BSY) return FLASH_BUSY; - - if ((FLASH->SR & FLASH_SR_PGERR) != 0) return FLASH_ERROR_PG; - - if ((FLASH->SR & FLASH_SR_WRPERR) != 0) return FLASH_ERROR_WRP; - - if ((FLASH->SR & FLASH_OBR_OPTERR) != 0) return FLASH_ERROR_OPT; - - return FLASH_COMPLETE; -} - -/** - * @brief Waits for a Flash operation to complete or a TIMEOUT to occur. - * @param Timeout: FLASH progamming Timeout - * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG, - * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. - */ -FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout) { - FLASH_Status status; - - /* Check for the Flash Status */ - status = FLASH_GetStatus(); - /* Wait for a Flash operation to complete or a TIMEOUT to occur */ - while ((status == FLASH_BUSY) && (Timeout != 0x00)) { - delay(); - status = FLASH_GetStatus(); - Timeout--; - } - if (Timeout == 0) status = FLASH_TIMEOUT; - /* Return the operation status */ - return status; -} - -/** - * @brief Erases a specified FLASH page. - * @param Page_Address: The page address to be erased. - * @retval FLASH Status: The returned value can be: FLASH_BUSY, FLASH_ERROR_PG, - * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. - */ -FLASH_Status FLASH_ErasePage(uint32_t Page_Address) { - FLASH_Status status = FLASH_COMPLETE; - /* Check the parameters */ - ASSERT(IS_FLASH_ADDRESS(Page_Address)); - /* Wait for last operation to be completed */ - status = FLASH_WaitForLastOperation(EraseTimeout); - - if (status == FLASH_COMPLETE) { - /* if the previous operation is completed, proceed to erase the page */ - FLASH->CR |= FLASH_CR_PER; - FLASH->AR = Page_Address; - FLASH->CR |= FLASH_CR_STRT; - - /* Wait for last operation to be completed */ - status = FLASH_WaitForLastOperation(EraseTimeout); - if (status != FLASH_TIMEOUT) { - /* if the erase operation is completed, disable the PER Bit */ - FLASH->CR &= ~FLASH_CR_PER; - } - FLASH->SR = (FLASH_SR_EOP | FLASH_SR_PGERR | FLASH_SR_WRPERR); - } - /* Return the Erase Status */ - return status; -} - -/** - * @brief Programs a half word at a specified address. - * @param Address: specifies the address to be programmed. - * @param Data: specifies the data to be programmed. - * @retval FLASH Status: The returned value can be: FLASH_ERROR_PG, - * FLASH_ERROR_WRP, FLASH_COMPLETE or FLASH_TIMEOUT. - */ -FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data) { - FLASH_Status status = FLASH_BAD_ADDRESS; - - if (IS_FLASH_ADDRESS(Address)) { - /* Wait for last operation to be completed */ - status = FLASH_WaitForLastOperation(ProgramTimeout); - if (status == FLASH_COMPLETE) { - /* if the previous operation is completed, proceed to program the new data */ - FLASH->CR |= FLASH_CR_PG; - *(__IO uint16_t*)Address = Data; - /* Wait for last operation to be completed */ - status = FLASH_WaitForLastOperation(ProgramTimeout); - if (status != FLASH_TIMEOUT) { - /* if the program operation is completed, disable the PG Bit */ - FLASH->CR &= ~FLASH_CR_PG; - } - FLASH->SR = (FLASH_SR_EOP | FLASH_SR_PGERR | FLASH_SR_WRPERR); - } - } - return status; -} - -/** - * @brief Unlocks the FLASH Program Erase Controller. - * @param None - * @retval None - */ -void FLASH_Unlock(void) { - if (FLASH->CR & FLASH_CR_LOCK) { - /* Authorize the FPEC Access */ - FLASH->KEYR = FLASH_KEY1; - FLASH->KEYR = FLASH_KEY2; - } -} - -/** - * @brief Locks the FLASH Program Erase Controller. - * @param None - * @retval None - */ -void FLASH_Lock(void) { - /* Set the Lock Bit to lock the FPEC and the FCR */ - FLASH->CR |= FLASH_CR_LOCK; -} diff --git a/tmk_core/common/chibios/suspend.c b/tmk_core/common/chibios/suspend.c deleted file mode 100644 index 38517e06f0b..00000000000 --- a/tmk_core/common/chibios/suspend.c +++ /dev/null @@ -1,169 +0,0 @@ -/* TODO */ - -#include <ch.h> -#include <hal.h> - -#include "matrix.h" -#include "action.h" -#include "action_util.h" -#include "mousekey.h" -#include "host.h" -#include "suspend.h" -#include "led.h" -#include "wait.h" - -#ifdef AUDIO_ENABLE -# include "audio.h" -#endif /* AUDIO_ENABLE */ - -#ifdef BACKLIGHT_ENABLE -# include "backlight.h" -#endif - -#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) -# include "rgblight.h" -#endif - -#ifdef LED_MATRIX_ENABLE -# include "led_matrix.h" -#endif -#ifdef RGB_MATRIX_ENABLE -# include "rgb_matrix.h" -#endif - -/** \brief suspend idle - * - * FIXME: needs doc - */ -void suspend_idle(uint8_t time) { - // TODO: this is not used anywhere - what units is 'time' in? - wait_ms(time); -} - -/** \brief Run keyboard level Power down - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_power_down_user(void) {} -/** \brief Run keyboard level Power down - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_power_down_kb(void) { suspend_power_down_user(); } - -/** \brief suspend power down - * - * FIXME: needs doc - */ -void suspend_power_down(void) { -#ifdef BACKLIGHT_ENABLE - backlight_set(0); -#endif - -#ifdef LED_MATRIX_ENABLE - led_matrix_task(); -#endif -#ifdef RGB_MATRIX_ENABLE - rgb_matrix_task(); -#endif - - // Turn off LED indicators - uint8_t leds_off = 0; -#if defined(BACKLIGHT_CAPS_LOCK) && defined(BACKLIGHT_ENABLE) - if (is_backlight_enabled()) { - // Don't try to turn off Caps Lock indicator as it is backlight and backlight is already off - leds_off |= (1 << USB_LED_CAPS_LOCK); - } -#endif - led_set(leds_off); - - // TODO: figure out what to power down and how - // shouldn't power down TPM/FTM if we want a breathing LED - // also shouldn't power down USB -#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) - rgblight_suspend(); -#endif - -#if defined(LED_MATRIX_ENABLE) - led_matrix_set_suspend_state(true); -#endif -#if defined(RGB_MATRIX_ENABLE) - rgb_matrix_set_suspend_state(true); -#endif -#ifdef AUDIO_ENABLE - stop_all_notes(); -#endif /* AUDIO_ENABLE */ - - suspend_power_down_kb(); - // on AVR, this enables the watchdog for 15ms (max), and goes to - // SLEEP_MODE_PWR_DOWN - - wait_ms(17); -} - -/** \brief suspend wakeup condition - * - * FIXME: needs doc - */ -__attribute__((weak)) void matrix_power_up(void) {} -__attribute__((weak)) void matrix_power_down(void) {} -bool suspend_wakeup_condition(void) { - matrix_power_up(); - matrix_scan(); - matrix_power_down(); - for (uint8_t r = 0; r < MATRIX_ROWS; r++) { - if (matrix_get_row(r)) return true; - } - return false; -} - -/** \brief run user level code immediately after wakeup - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_wakeup_init_user(void) {} - -/** \brief run keyboard level code immediately after wakeup - * - * FIXME: needs doc - */ -__attribute__((weak)) void suspend_wakeup_init_kb(void) { suspend_wakeup_init_user(); } - -/** \brief suspend wakeup condition - * - * run immediately after wakeup - * FIXME: needs doc - */ -void suspend_wakeup_init(void) { - // clear keyboard state - // need to do it manually, because we're running from ISR - // and clear_keyboard() calls print - // so only clear the variables in memory - // the reports will be sent from main.c afterwards - // or if the PC asks for GET_REPORT - clear_mods(); - clear_weak_mods(); - clear_keys(); -#ifdef MOUSEKEY_ENABLE - mousekey_clear(); -#endif /* MOUSEKEY_ENABLE */ -#ifdef EXTRAKEY_ENABLE - host_system_send(0); - host_consumer_send(0); -#endif /* EXTRAKEY_ENABLE */ -#ifdef BACKLIGHT_ENABLE - backlight_init(); -#endif /* BACKLIGHT_ENABLE */ - led_set(host_keyboard_leds()); -#if defined(RGBLIGHT_SLEEP) && defined(RGBLIGHT_ENABLE) - rgblight_wakeup(); -#endif - -#if defined(LED_MATRIX_ENABLE) - led_matrix_set_suspend_state(false); -#endif -#if defined(RGB_MATRIX_ENABLE) - rgb_matrix_set_suspend_state(false); -#endif - suspend_wakeup_init_kb(); -} diff --git a/tmk_core/common/chibios/syscall-fallbacks.c b/tmk_core/common/chibios/syscall-fallbacks.c deleted file mode 100644 index 739017ae1df..00000000000 --- a/tmk_core/common/chibios/syscall-fallbacks.c +++ /dev/null @@ -1,104 +0,0 @@ -/* Copyright 2021 Nick Brassel, QMK - * - * 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 <errno.h> -#include <sys/stat.h> -#include <sys/types.h> - -#pragma GCC diagnostic ignored "-Wmissing-prototypes" - -__attribute__((weak, used)) int _open_r(struct _reent *r, const char *path, int flag, int m) { - __errno_r(r) = ENOENT; - return -1; -} - -__attribute__((weak, used)) int _lseek_r(struct _reent *r, int file, int ptr, int dir) { - __errno_r(r) = EBADF; - return -1; -} - -__attribute__((weak, used)) int _read_r(struct _reent *r, int file, char *ptr, int len) { - __errno_r(r) = EBADF; - return -1; -} - -__attribute__((weak, used)) int _write_r(struct _reent *r, int file, char *ptr, int len) { - __errno_r(r) = EBADF; - return -1; -} - -__attribute__((weak, used)) int _close_r(struct _reent *r, int file) { - __errno_r(r) = EBADF; - return -1; -} - -__attribute__((weak, used)) int _link_r(struct _reent *r, const char *oldpath, const char *newpath) { - __errno_r(r) = EPERM; - return -1; -} - -__attribute__((weak, used)) int _unlink_r(struct _reent *r, const char *path) { - __errno_r(r) = EPERM; - return -1; -} - -__attribute__((weak, used)) clock_t _times_r(struct _reent *r, void *t) { - __errno_r(r) = EFAULT; - return -1; -} - -__attribute__((weak, used)) int _fstat_r(struct _reent *r, int file, struct stat *st) { - __errno_r(r) = EBADF; - return -1; -} - -__attribute__((weak, used)) int _isatty_r(struct _reent *r, int fd) { - __errno_r(r) = EBADF; - return 0; -} - -__attribute__((weak, used)) caddr_t _sbrk_r(struct _reent *r, int incr) { - __errno_r(r) = ENOMEM; - return (caddr_t)-1; -} - -__attribute__((weak, used)) int _kill(int pid, int sig) { - errno = EPERM; - return -1; -} - -__attribute__((weak, used)) pid_t _getpid(void) { return 1; } - -__attribute__((weak, used)) void _fini(void) { return; } - -__attribute__((weak, used, noreturn)) void _exit(int i) { - while (1) - ; -} - -__attribute__((weak, used)) int _gettimeofday_r(struct _reent *r, struct timeval *t, void *tzp) { - __errno_r(r) = EPERM; - return -1; -} - -__attribute__((weak, used)) void *__dso_handle; - -__attribute__((weak, used)) void __cxa_pure_virtual(void) { - while (1) - ; -} - -#pragma GCC diagnostic pop diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c deleted file mode 100644 index f0c396b189a..00000000000 --- a/tmk_core/common/host.c +++ /dev/null @@ -1,127 +0,0 @@ -/* -Copyright 2011,2012 Jun Wako <wakojun@gmail.com> - -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 <stdint.h> -//#include <avr/interrupt.h> -#include "keyboard.h" -#include "keycode.h" -#include "host.h" -#include "util.h" -#include "debug.h" -#include "digitizer.h" - -#ifdef NKRO_ENABLE -# include "keycode_config.h" -extern keymap_config_t keymap_config; -#endif - -static host_driver_t *driver; -static uint16_t last_system_report = 0; -static uint16_t last_consumer_report = 0; - -void host_set_driver(host_driver_t *d) { driver = d; } - -host_driver_t *host_get_driver(void) { return driver; } - -#ifdef SPLIT_KEYBOARD -uint8_t split_led_state = 0; -void set_split_host_keyboard_leds(uint8_t led_state) { split_led_state = led_state; } -#endif - -uint8_t host_keyboard_leds(void) { -#ifdef SPLIT_KEYBOARD - if (!is_keyboard_master()) return split_led_state; -#endif - if (!driver) return 0; - return (*driver->keyboard_leds)(); -} - -led_t host_keyboard_led_state(void) { return (led_t)host_keyboard_leds(); } - -/* send report */ -void host_keyboard_send(report_keyboard_t *report) { - if (!driver) return; -#if defined(NKRO_ENABLE) && defined(NKRO_SHARED_EP) - if (keyboard_protocol && keymap_config.nkro) { - /* The callers of this function assume that report->mods is where mods go in. - * But report->nkro.mods can be at a different offset if core keyboard does not have a report ID. - */ - report->nkro.mods = report->mods; - report->nkro.report_id = REPORT_ID_NKRO; - } else -#endif - { -#ifdef KEYBOARD_SHARED_EP - report->report_id = REPORT_ID_KEYBOARD; -#endif - } - (*driver->send_keyboard)(report); - - if (debug_keyboard) { - dprint("keyboard_report: "); - for (uint8_t i = 0; i < KEYBOARD_REPORT_SIZE; i++) { - dprintf("%02X ", report->raw[i]); - } - dprint("\n"); - } -} - -void host_mouse_send(report_mouse_t *report) { - if (!driver) return; -#ifdef MOUSE_SHARED_EP - report->report_id = REPORT_ID_MOUSE; -#endif - (*driver->send_mouse)(report); -} - -void host_system_send(uint16_t report) { - if (report == last_system_report) return; - last_system_report = report; - - if (!driver) return; - (*driver->send_system)(report); -} - -void host_consumer_send(uint16_t report) { - if (report == last_consumer_report) return; - last_consumer_report = report; - - if (!driver) return; - (*driver->send_consumer)(report); -} - -void host_digitizer_send(digitizer_t *digitizer) { - if (!driver) return; - - report_digitizer_t report = { -#ifdef DIGITIZER_SHARED_EP - .report_id = REPORT_ID_DIGITIZER, -#endif - .tip = digitizer->tipswitch & 0x1, - .inrange = digitizer->inrange & 0x1, - .x = (uint16_t)(digitizer->x * 0x7FFF), - .y = (uint16_t)(digitizer->y * 0x7FFF), - }; - - send_digitizer(&report); -} - -__attribute__((weak)) void send_digitizer(report_digitizer_t *report) {} - -uint16_t host_last_system_report(void) { return last_system_report; } - -uint16_t host_last_consumer_report(void) { return last_consumer_report; } diff --git a/tmk_core/common/host.h b/tmk_core/common/host.h deleted file mode 100644 index 2cffef6e15a..00000000000 --- a/tmk_core/common/host.h +++ /dev/null @@ -1,56 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#pragma once - -#include <stdint.h> -#include <stdbool.h> -#include "report.h" -#include "host_driver.h" -#include "led.h" - -#define IS_LED_ON(leds, led_name) ((leds) & (1 << (led_name))) -#define IS_LED_OFF(leds, led_name) (~(leds) & (1 << (led_name))) - -#define IS_HOST_LED_ON(led_name) IS_LED_ON(host_keyboard_leds(), led_name) -#define IS_HOST_LED_OFF(led_name) IS_LED_OFF(host_keyboard_leds(), led_name) - -#ifdef __cplusplus -extern "C" { -#endif - -extern uint8_t keyboard_idle; -extern uint8_t keyboard_protocol; - -/* host driver */ -void host_set_driver(host_driver_t *driver); -host_driver_t *host_get_driver(void); - -/* host driver interface */ -uint8_t host_keyboard_leds(void); -led_t host_keyboard_led_state(void); -void host_keyboard_send(report_keyboard_t *report); -void host_mouse_send(report_mouse_t *report); -void host_system_send(uint16_t data); -void host_consumer_send(uint16_t data); - -uint16_t host_last_system_report(void); -uint16_t host_last_consumer_report(void); - -#ifdef __cplusplus -} -#endif diff --git a/tmk_core/common/host_driver.h b/tmk_core/common/host_driver.h deleted file mode 100644 index 2aebca043d9..00000000000 --- a/tmk_core/common/host_driver.h +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#pragma once - -#include <stdint.h> -#include "report.h" -#ifdef MIDI_ENABLE -# include "midi.h" -#endif - -typedef struct { - uint8_t (*keyboard_leds)(void); - void (*send_keyboard)(report_keyboard_t *); - void (*send_mouse)(report_mouse_t *); - void (*send_system)(uint16_t); - void (*send_consumer)(uint16_t); -} host_driver_t; - -void send_digitizer(report_digitizer_t *report); \ No newline at end of file diff --git a/tmk_core/common/progmem.h b/tmk_core/common/progmem.h deleted file mode 100644 index a70d8e299ff..00000000000 --- a/tmk_core/common/progmem.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once - -#if defined(__AVR__) -# include <avr/pgmspace.h> -#else -# include <string.h> -# define PROGMEM -# define __flash -# define PSTR(x) x -# define PGM_P const char* -# define memcpy_P(dest, src, n) memcpy(dest, src, n) -# define pgm_read_byte(address_short) *((uint8_t*)(address_short)) -# define pgm_read_word(address_short) *((uint16_t*)(address_short)) -# define pgm_read_dword(address_short) *((uint32_t*)(address_short)) -# define pgm_read_ptr(address_short) *((void**)(address_short)) -# define strcmp_P(s1, s2) strcmp(s1, s2) -# define strcpy_P(dest, src) strcpy(dest, src) -# define strlen_P(src) strlen(src) -#endif diff --git a/tmk_core/common/report.h b/tmk_core/common/report.h deleted file mode 100644 index f2223e80639..00000000000 --- a/tmk_core/common/report.h +++ /dev/null @@ -1,319 +0,0 @@ -/* -Copyright 2011,2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#pragma once - -#include <stdint.h> -#include <stdbool.h> -#include "keycode.h" - -// clang-format off - -/* HID report IDs */ -enum hid_report_ids { - REPORT_ID_KEYBOARD = 1, - REPORT_ID_MOUSE, - REPORT_ID_SYSTEM, - REPORT_ID_CONSUMER, - REPORT_ID_NKRO, - REPORT_ID_JOYSTICK, - REPORT_ID_DIGITIZER -}; - -/* Mouse buttons */ -#define MOUSE_BTN_MASK(n) (1 << (n)) -enum mouse_buttons { - MOUSE_BTN1 = MOUSE_BTN_MASK(0), - MOUSE_BTN2 = MOUSE_BTN_MASK(1), - MOUSE_BTN3 = MOUSE_BTN_MASK(2), - MOUSE_BTN4 = MOUSE_BTN_MASK(3), - MOUSE_BTN5 = MOUSE_BTN_MASK(4), - MOUSE_BTN6 = MOUSE_BTN_MASK(5), - MOUSE_BTN7 = MOUSE_BTN_MASK(6), - MOUSE_BTN8 = MOUSE_BTN_MASK(7) -}; - -/* Consumer Page (0x0C) - * - * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75 - */ -enum consumer_usages { - // 15.5 Display Controls - SNAPSHOT = 0x065, - BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf - BRIGHTNESS_DOWN = 0x070, - // 15.7 Transport Controls - TRANSPORT_RECORD = 0x0B2, - TRANSPORT_FAST_FORWARD = 0x0B3, - TRANSPORT_REWIND = 0x0B4, - TRANSPORT_NEXT_TRACK = 0x0B5, - TRANSPORT_PREV_TRACK = 0x0B6, - TRANSPORT_STOP = 0x0B7, - TRANSPORT_EJECT = 0x0B8, - TRANSPORT_RANDOM_PLAY = 0x0B9, - TRANSPORT_STOP_EJECT = 0x0CC, - TRANSPORT_PLAY_PAUSE = 0x0CD, - // 15.9.1 Audio Controls - Volume - AUDIO_MUTE = 0x0E2, - AUDIO_VOL_UP = 0x0E9, - AUDIO_VOL_DOWN = 0x0EA, - // 15.15 Application Launch Buttons - AL_CC_CONFIG = 0x183, - AL_EMAIL = 0x18A, - AL_CALCULATOR = 0x192, - AL_LOCAL_BROWSER = 0x194, - AL_LOCK = 0x19E, - AL_CONTROL_PANEL = 0x19F, - AL_ASSISTANT = 0x1CB, - AL_KEYBOARD_LAYOUT = 0x1AE, - // 15.16 Generic GUI Application Controls - AC_NEW = 0x201, - AC_OPEN = 0x202, - AC_CLOSE = 0x203, - AC_EXIT = 0x204, - AC_MAXIMIZE = 0x205, - AC_MINIMIZE = 0x206, - AC_SAVE = 0x207, - AC_PRINT = 0x208, - AC_PROPERTIES = 0x209, - AC_UNDO = 0x21A, - AC_COPY = 0x21B, - AC_CUT = 0x21C, - AC_PASTE = 0x21D, - AC_SELECT_ALL = 0x21E, - AC_FIND = 0x21F, - AC_SEARCH = 0x221, - AC_HOME = 0x223, - AC_BACK = 0x224, - AC_FORWARD = 0x225, - AC_STOP = 0x226, - AC_REFRESH = 0x227, - AC_BOOKMARKS = 0x22A -}; - -/* Generic Desktop Page (0x01) - * - * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=26 - */ -enum desktop_usages { - // 4.5.1 System Controls - Power Controls - SYSTEM_POWER_DOWN = 0x81, - SYSTEM_SLEEP = 0x82, - SYSTEM_WAKE_UP = 0x83, - SYSTEM_RESTART = 0x8F, - // 4.10 System Display Controls - SYSTEM_DISPLAY_TOGGLE_INT_EXT = 0xB5 -}; - -// clang-format on - -#define NKRO_SHARED_EP -/* key report size(NKRO or boot mode) */ -#if defined(NKRO_ENABLE) -# if defined(PROTOCOL_LUFA) || defined(PROTOCOL_CHIBIOS) -# include "protocol/usb_descriptor.h" -# define KEYBOARD_REPORT_BITS (SHARED_EPSIZE - 2) -# elif defined(PROTOCOL_ARM_ATSAM) -# include "protocol/arm_atsam/usb/udi_device_epsize.h" -# define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1) -# undef NKRO_SHARED_EP -# undef MOUSE_SHARED_EP -# else -# error "NKRO not supported with this protocol" -# endif -#endif - -#ifdef KEYBOARD_SHARED_EP -# define KEYBOARD_REPORT_SIZE 9 -#else -# define KEYBOARD_REPORT_SIZE 8 -#endif - -#define KEYBOARD_REPORT_KEYS 6 - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * keyboard report is 8-byte array retains state of 8 modifiers and 6 keys. - * - * byte |0 |1 |2 |3 |4 |5 |6 |7 - * -----+--------+--------+--------+--------+--------+--------+--------+-------- - * desc |mods |reserved|keys[0] |keys[1] |keys[2] |keys[3] |keys[4] |keys[5] - * - * It is exended to 16 bytes to retain 120keys+8mods when NKRO mode. - * - * byte |0 |1 |2 |3 |4 |5 |6 |7 ... |15 - * -----+--------+--------+--------+--------+--------+--------+--------+-------- +-------- - * desc |mods |bits[0] |bits[1] |bits[2] |bits[3] |bits[4] |bits[5] |bits[6] ... |bit[14] - * - * mods retains state of 8 modifiers. - * - * bit |0 |1 |2 |3 |4 |5 |6 |7 - * -----+--------+--------+--------+--------+--------+--------+--------+-------- - * desc |Lcontrol|Lshift |Lalt |Lgui |Rcontrol|Rshift |Ralt |Rgui - * - */ -typedef union { - uint8_t raw[KEYBOARD_REPORT_SIZE]; - struct { -#ifdef KEYBOARD_SHARED_EP - uint8_t report_id; -#endif - uint8_t mods; - uint8_t reserved; - uint8_t keys[KEYBOARD_REPORT_KEYS]; - }; -#ifdef NKRO_ENABLE - struct nkro_report { -# ifdef NKRO_SHARED_EP - uint8_t report_id; -# endif - uint8_t mods; - uint8_t bits[KEYBOARD_REPORT_BITS]; - } nkro; -#endif -} __attribute__((packed)) report_keyboard_t; - -typedef struct { - uint8_t report_id; - uint16_t usage; -} __attribute__((packed)) report_extra_t; - -typedef struct { -#ifdef MOUSE_SHARED_EP - uint8_t report_id; -#endif - uint8_t buttons; - int8_t x; - int8_t y; - int8_t v; - int8_t h; -} __attribute__((packed)) report_mouse_t; - -typedef struct { -#ifdef DIGITIZER_SHARED_EP - uint8_t report_id; -#endif - uint8_t tip : 1; - uint8_t inrange : 1; - uint8_t pad2 : 6; - uint16_t x; - uint16_t y; -} __attribute__((packed)) report_digitizer_t; - -typedef struct { -#if JOYSTICK_AXES_COUNT > 0 -# if JOYSTICK_AXES_RESOLUTION > 8 - int16_t axes[JOYSTICK_AXES_COUNT]; -# else - int8_t axes[JOYSTICK_AXES_COUNT]; -# endif -#endif - -#if JOYSTICK_BUTTON_COUNT > 0 - uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1]; -#endif -} __attribute__((packed)) joystick_report_t; - -/* keycode to system usage */ -static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { - switch (key) { - case KC_SYSTEM_POWER: - return SYSTEM_POWER_DOWN; - case KC_SYSTEM_SLEEP: - return SYSTEM_SLEEP; - case KC_SYSTEM_WAKE: - return SYSTEM_WAKE_UP; - default: - return 0; - } -} - -/* keycode to consumer usage */ -static inline uint16_t KEYCODE2CONSUMER(uint8_t key) { - switch (key) { - case KC_AUDIO_MUTE: - return AUDIO_MUTE; - case KC_AUDIO_VOL_UP: - return AUDIO_VOL_UP; - case KC_AUDIO_VOL_DOWN: - return AUDIO_VOL_DOWN; - case KC_MEDIA_NEXT_TRACK: - return TRANSPORT_NEXT_TRACK; - case KC_MEDIA_PREV_TRACK: - return TRANSPORT_PREV_TRACK; - case KC_MEDIA_FAST_FORWARD: - return TRANSPORT_FAST_FORWARD; - case KC_MEDIA_REWIND: - return TRANSPORT_REWIND; - case KC_MEDIA_STOP: - return TRANSPORT_STOP; - case KC_MEDIA_EJECT: - return TRANSPORT_STOP_EJECT; - case KC_MEDIA_PLAY_PAUSE: - return TRANSPORT_PLAY_PAUSE; - case KC_MEDIA_SELECT: - return AL_CC_CONFIG; - case KC_MAIL: - return AL_EMAIL; - case KC_CALCULATOR: - return AL_CALCULATOR; - case KC_MY_COMPUTER: - return AL_LOCAL_BROWSER; - case KC_WWW_SEARCH: - return AC_SEARCH; - case KC_WWW_HOME: - return AC_HOME; - case KC_WWW_BACK: - return AC_BACK; - case KC_WWW_FORWARD: - return AC_FORWARD; - case KC_WWW_STOP: - return AC_STOP; - case KC_WWW_REFRESH: - return AC_REFRESH; - case KC_BRIGHTNESS_UP: - return BRIGHTNESS_UP; - case KC_BRIGHTNESS_DOWN: - return BRIGHTNESS_DOWN; - case KC_WWW_FAVORITES: - return AC_BOOKMARKS; - default: - return 0; - } -} - -uint8_t has_anykey(report_keyboard_t* keyboard_report); -uint8_t get_first_key(report_keyboard_t* keyboard_report); -bool is_key_pressed(report_keyboard_t* keyboard_report, uint8_t key); - -void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code); -void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code); -#ifdef NKRO_ENABLE -void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code); -void del_key_bit(report_keyboard_t* keyboard_report, uint8_t code); -#endif - -void add_key_to_report(report_keyboard_t* keyboard_report, uint8_t key); -void del_key_from_report(report_keyboard_t* keyboard_report, uint8_t key); -void clear_keys_from_report(report_keyboard_t* keyboard_report); - -#ifdef __cplusplus -} -#endif diff --git a/tmk_core/common/suspend.h b/tmk_core/common/suspend.h deleted file mode 100644 index 95845e4b634..00000000000 --- a/tmk_core/common/suspend.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include <stdint.h> -#include <stdbool.h> - -void suspend_idle(uint8_t timeout); -void suspend_power_down(void); -bool suspend_wakeup_condition(void); -void suspend_wakeup_init(void); - -void suspend_wakeup_init_user(void); -void suspend_wakeup_init_kb(void); -void suspend_power_down_user(void); -void suspend_power_down_kb(void); - -#ifndef USB_SUSPEND_WAKEUP_DELAY -# define USB_SUSPEND_WAKEUP_DELAY 0 -#endif diff --git a/tmk_core/common/sync_timer.c b/tmk_core/common/sync_timer.c deleted file mode 100644 index 68b92d8b439..00000000000 --- a/tmk_core/common/sync_timer.c +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright (C) 2020 Ryan Caltabiano <https://github.com/XScorpion2> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -If you happen to meet one of the copyright holders in a bar you are obligated -to buy them one pint of beer. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#include "sync_timer.h" -#include "keyboard.h" - -#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER) -volatile int32_t sync_timer_ms; - -void sync_timer_init(void) { sync_timer_ms = 0; } - -void sync_timer_update(uint32_t time) { - if (is_keyboard_master()) return; - sync_timer_ms = time - timer_read32(); -} - -uint16_t sync_timer_read(void) { - if (is_keyboard_master()) return timer_read(); - return sync_timer_read32(); -} - -uint32_t sync_timer_read32(void) { - if (is_keyboard_master()) return timer_read32(); - return sync_timer_ms + timer_read32(); -} - -uint16_t sync_timer_elapsed(uint16_t last) { - if (is_keyboard_master()) return timer_elapsed(last); - return TIMER_DIFF_16(sync_timer_read(), last); -} - -uint32_t sync_timer_elapsed32(uint32_t last) { - if (is_keyboard_master()) return timer_elapsed32(last); - return TIMER_DIFF_32(sync_timer_read32(), last); -} -#endif diff --git a/tmk_core/common/sync_timer.h b/tmk_core/common/sync_timer.h deleted file mode 100644 index 744e2b50d54..00000000000 --- a/tmk_core/common/sync_timer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright (C) 2020 Ryan Caltabiano <https://github.com/XScorpion2> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -If you happen to meet one of the copyright holders in a bar you are obligated -to buy them one pint of beer. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - -#pragma once - -#include <stdint.h> -#include "timer.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#if (defined(SPLIT_KEYBOARD) || defined(SERIAL_LINK_ENABLE)) && !defined(DISABLE_SYNC_TIMER) -void sync_timer_init(void); -void sync_timer_update(uint32_t time); -uint16_t sync_timer_read(void); -uint32_t sync_timer_read32(void); -uint16_t sync_timer_elapsed(uint16_t last); -uint32_t sync_timer_elapsed32(uint32_t last); -#else -# define sync_timer_init() -# define sync_timer_clear() -# define sync_timer_update(t) -# define sync_timer_read() timer_read() -# define sync_timer_read32() timer_read32() -# define sync_timer_elapsed(t) timer_elapsed(t) -# define sync_timer_elapsed32(t) timer_elapsed32(t) -#endif - -#ifdef __cplusplus -} -#endif diff --git a/tmk_core/common/test/rules.mk b/tmk_core/common/test/rules.mk deleted file mode 100644 index 48632a095b5..00000000000 --- a/tmk_core/common/test/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -eeprom_stm32_DEFS := -DFLASH_STM32_MOCKED -DNO_PRINT -DFEE_FLASH_BASE=FlashBuf -eeprom_stm32_tiny_DEFS := $(eeprom_stm32_DEFS) \ - -DFEE_MCU_FLASH_SIZE=1 \ - -DMOCK_FLASH_SIZE=1024 \ - -DFEE_PAGE_SIZE=512 \ - -DFEE_PAGE_COUNT=1 -eeprom_stm32_large_DEFS := $(eeprom_stm32_DEFS) \ - -DFEE_MCU_FLASH_SIZE=64 \ - -DMOCK_FLASH_SIZE=65536 \ - -DFEE_PAGE_SIZE=2048 \ - -DFEE_PAGE_COUNT=16 - -eeprom_stm32_INC := \ - $(TMK_PATH)/common/chibios/ -eeprom_stm32_tiny_INC := $(eeprom_stm32_INC) -eeprom_stm32_large_INC := $(eeprom_stm32_INC) - -eeprom_stm32_SRC := \ - $(TMK_PATH)/common/test/eeprom_stm32_tests.cpp \ - $(TMK_PATH)/common/test/flash_stm32_mock.c \ - $(TMK_PATH)/common/chibios/eeprom_stm32.c -eeprom_stm32_tiny_SRC := $(eeprom_stm32_SRC) -eeprom_stm32_large_SRC := $(eeprom_stm32_SRC) diff --git a/tmk_core/common/virtser.h b/tmk_core/common/virtser.h deleted file mode 100644 index a0645f9e03e..00000000000 --- a/tmk_core/common/virtser.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -/* Define this function in your code to process incoming bytes */ -void virtser_recv(const uint8_t ch); - -/* Call this to send a character over the Virtual Serial Device */ -void virtser_send(const uint8_t byte); diff --git a/tmk_core/native.mk b/tmk_core/native.mk deleted file mode 100644 index f609fd0e6fa..00000000000 --- a/tmk_core/native.mk +++ /dev/null @@ -1,34 +0,0 @@ -SYSTEM_TYPE := $(shell gcc -dumpmachine) -GCC_VERSION := $(shell gcc --version 2>/dev/null) - -CC = gcc -OBJCOPY = -OBJDUMP = -SIZE = -AR = -NM = -HEX = -EEP = -BIN = - - -COMPILEFLAGS += -funsigned-char -ifeq ($(findstring clang, ${GCC_VERSION}),) -COMPILEFLAGS += -funsigned-bitfields -endif -COMPILEFLAGS += -ffunction-sections -COMPILEFLAGS += -fdata-sections -COMPILEFLAGS += -fshort-enums -ifneq ($(findstring mingw, ${SYSTEM_TYPE}),) -COMPILEFLAGS += -mno-ms-bitfields -endif - -CFLAGS += $(COMPILEFLAGS) -ifeq ($(findstring clang, ${GCC_VERSION}),) -CFLAGS += -fno-inline-small-functions -endif -CFLAGS += -fno-strict-aliasing - -CXXFLAGS += $(COMPILEFLAGS) -CXXFLAGS += -fno-exceptions -CXXFLAGS += -std=gnu++11 diff --git a/tmk_core/protocol.mk b/tmk_core/protocol.mk index b61f2f5463a..31a6de76f10 100644 --- a/tmk_core/protocol.mk +++ b/tmk_core/protocol.mk @@ -1,57 +1,83 @@ -PROTOCOL_DIR = protocol +TMK_COMMON_SRC += \ + $(PROTOCOL_DIR)/host.c \ + $(PROTOCOL_DIR)/report.c \ + $(PROTOCOL_DIR)/usb_device_state.c \ + $(PROTOCOL_DIR)/usb_util.c \ -ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) - SRC += $(PROTOCOL_DIR)/ps2_mouse.c - OPT_DEFS += -DPS2_MOUSE_ENABLE +SHARED_EP_ENABLE = no +MOUSE_SHARED_EP ?= yes +ifeq ($(strip $(KEYBOARD_SHARED_EP)), yes) + TMK_COMMON_DEFS += -DKEYBOARD_SHARED_EP + SHARED_EP_ENABLE = yes + # With the current usb_descriptor.c code, + # you can't share kbd without sharing mouse; + # that would be a very unexpected use case anyway + MOUSE_SHARED_EP = yes +endif + +ifeq ($(strip $(MOUSE_ENABLE)), yes) OPT_DEFS += -DMOUSE_ENABLE + ifeq ($(strip $(MOUSE_SHARED_EP)), yes) + TMK_COMMON_DEFS += -DMOUSE_SHARED_EP + SHARED_EP_ENABLE = yes + endif endif -ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) - SRC += protocol/ps2_busywait.c - SRC += protocol/ps2_io_avr.c - OPT_DEFS += -DPS2_USE_BUSYWAIT +ifeq ($(strip $(EXTRAKEY_ENABLE)), yes) + TMK_COMMON_DEFS += -DEXTRAKEY_ENABLE + SHARED_EP_ENABLE = yes endif -ifeq ($(strip $(PS2_USE_INT)), yes) - SRC += protocol/ps2_interrupt.c - SRC += protocol/ps2_io_$(PLATFORM_KEY).c - OPT_DEFS += -DPS2_USE_INT +ifeq ($(strip $(RAW_ENABLE)), yes) + TMK_COMMON_DEFS += -DRAW_ENABLE endif -ifeq ($(strip $(PS2_USE_USART)), yes) - SRC += protocol/ps2_usart.c - SRC += protocol/ps2_io_$(PLATFORM_KEY).c - OPT_DEFS += -DPS2_USE_USART +ifeq ($(strip $(CONSOLE_ENABLE)), yes) + TMK_COMMON_DEFS += -DCONSOLE_ENABLE +else + # TODO: decouple this so other print backends can exist + TMK_COMMON_DEFS += -DNO_PRINT + TMK_COMMON_DEFS += -DNO_DEBUG endif +ifeq ($(strip $(NKRO_ENABLE)), yes) + ifeq ($(PROTOCOL), VUSB) + $(info NKRO is not currently supported on V-USB, and has been disabled.) + else ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) + $(info NKRO is not currently supported with Bluetooth, and has been disabled.) + else + TMK_COMMON_DEFS += -DNKRO_ENABLE + SHARED_EP_ENABLE = yes + endif +endif -ifeq ($(strip $(SERIAL_MOUSE_MICROSOFT_ENABLE)), yes) - SRC += $(PROTOCOL_DIR)/serial_mouse_microsoft.c - OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MICROSOFT \ - -DMOUSE_ENABLE +ifeq ($(strip $(RING_BUFFERED_6KRO_REPORT_ENABLE)), yes) + TMK_COMMON_DEFS += -DRING_BUFFERED_6KRO_REPORT_ENABLE endif -ifeq ($(strip $(SERIAL_MOUSE_MOUSESYSTEMS_ENABLE)), yes) - SRC += $(PROTOCOL_DIR)/serial_mouse_mousesystems.c - OPT_DEFS += -DSERIAL_MOUSE_ENABLE -DSERIAL_MOUSE_MOUSESYSTEMS \ - -DMOUSE_ENABLE +ifeq ($(strip $(NO_SUSPEND_POWER_DOWN)), yes) + TMK_COMMON_DEFS += -DNO_SUSPEND_POWER_DOWN endif -ifeq ($(strip $(SERIAL_MOUSE_USE_SOFT)), yes) - SRC += $(PROTOCOL_DIR)/serial_soft.c +ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes) + TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK endif -ifeq ($(strip $(SERIAL_MOUSE_USE_UART)), yes) - SRC += $(PROTOCOL_DIR)/serial_uart.c +ifeq ($(strip $(DIGITIZER_SHARED_EP)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP + SHARED_EP_ENABLE = yes endif -ifeq ($(strip $(ADB_MOUSE_ENABLE)), yes) - OPT_DEFS += -DADB_MOUSE_ENABLE -DMOUSE_ENABLE +ifeq ($(strip $(DIGITIZER_ENABLE)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_ENABLE + ifeq ($(strip $(SHARED_EP_ENABLE)), yes) + TMK_COMMON_DEFS += -DDIGITIZER_SHARED_EP + SHARED_EP_ENABLE = yes + endif endif -ifeq ($(strip $(XT_ENABLE)), yes) - SRC += $(PROTOCOL_DIR)/xt_interrupt.c - OPT_DEFS += -DXT_ENABLE +ifeq ($(strip $(SHARED_EP_ENABLE)), yes) + TMK_COMMON_DEFS += -DSHARED_EP_ENABLE endif ifeq ($(strip $(USB_HID_ENABLE)), yes) diff --git a/tmk_core/protocol/adb.c b/tmk_core/protocol/adb.c deleted file mode 100644 index 367f1b09fa1..00000000000 --- a/tmk_core/protocol/adb.c +++ /dev/null @@ -1,535 +0,0 @@ -/* -Copyright 2011-19 Jun WAKO <wakojun@gmail.com> -Copyright 2013 Shay Green <gblargg@gmail.com> - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdbool.h> -#include <util/delay.h> -#include <avr/io.h> -#include <avr/interrupt.h> -#include "adb.h" -#include "print.h" - -// GCC doesn't inline functions normally -#define data_lo() (ADB_DDR |= (1 << ADB_DATA_BIT)) -#define data_hi() (ADB_DDR &= ~(1 << ADB_DATA_BIT)) -#define data_in() (ADB_PIN & (1 << ADB_DATA_BIT)) - -#ifdef ADB_PSW_BIT -static inline void psw_lo(void); -static inline void psw_hi(void); -static inline bool psw_in(void); -#endif - -static inline void attention(void); -static inline void place_bit0(void); -static inline void place_bit1(void); -static inline void send_byte(uint8_t data); -static inline uint16_t wait_data_lo(uint16_t us); -static inline uint16_t wait_data_hi(uint16_t us); - -void adb_host_init(void) { - ADB_PORT &= ~(1 << ADB_DATA_BIT); - data_hi(); -#ifdef ADB_PSW_BIT - psw_hi(); -#endif -} - -#ifdef ADB_PSW_BIT -bool adb_host_psw(void) { return psw_in(); } -#endif - -/* - * Don't call this in a row without the delay, otherwise it makes some of poor controllers - * overloaded and misses strokes. Recommended interval is 12ms. - * - * Thanks a lot, blargg! - * <http://geekhack.org/index.php?topic=14290.msg1068919#msg1068919> - * <http://geekhack.org/index.php?topic=14290.msg1070139#msg1070139> - */ -uint16_t adb_host_kbd_recv(void) { return adb_host_talk(ADB_ADDR_KEYBOARD, ADB_REG_0); } - -#ifdef ADB_MOUSE_ENABLE -__attribute__((weak)) void adb_mouse_init(void) { return; } - -__attribute__((weak)) void adb_mouse_task(void) { return; } - -uint16_t adb_host_mouse_recv(void) { return adb_host_talk(ADB_ADDR_MOUSE, ADB_REG_0); } -#endif - -// This sends Talk command to read data from register and returns length of the data. -uint8_t adb_host_talk_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { - for (int8_t i = 0; i < len; i++) buf[i] = 0; - - cli(); - attention(); - send_byte((addr << 4) | ADB_CMD_TALK | reg); - place_bit0(); // Stopbit(0) - // TODO: Service Request(Srq): - // Device holds low part of comannd stopbit for 140-260us - // - // Command: - // ......._ ______________________ ___ ............_ ------- - // | | | | | | | - // Command | | | | | Data bytes | | - // ........|___| | 140-260 |__| |_............|___| - // |stop0 | Tlt Stop-to-Start |start1| |stop0 | - // - // Command without data: - // ......._ __________________________ - // | | - // Command | | - // ........|___| | 140-260 | - // |stop0 | Tlt Stop-to-Start | - // - // Service Request: - // ......._ ______ ___ ............_ ------- - // | 140-260 | | | | | | - // Command | Service Request | | | | Data bytes | | - // ........|___________________| |__| |_............|___| - // |stop0 | |start1| |stop0 | - // ......._ __________ - // | 140-260 | - // Command | Service Request | - // ........|___________________| - // |stop0 | - // This can be happened? - // ......._ ______________________ ___ ............_ ----- - // | | | | | | 140-260 | - // Command | | | | | Data bytes | Service Request | - // ........|___| | 140-260 |__| |_............|_________________| - // |stop0 | Tlt Stop-to-Start |start1| |stop0 | - // - // "Service requests are issued by the devices during a very specific time at the - // end of the reception of the command packet. - // If a device in need of service issues a service request, it must do so within - // the 65 µs of the Stop Bit’s low time and maintain the line low for a total of 300 µs." - // - // "A device sends a Service Request signal by holding the bus low during the low - // portion of the stop bit of any command or data transaction. The device must lengthen - // the stop by a minimum of 140 J.lS beyond its normal duration, as shown in Figure 8-15." - // http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf - if (!wait_data_hi(500)) { // Service Request(310us Adjustable Keyboard): just ignored - xprintf("R"); - sei(); - return 0; - } - if (!wait_data_lo(500)) { // Tlt/Stop to Start(140-260us) - sei(); - return 0; // No data from device(not error); - } - - // start bit(1) - if (!wait_data_hi(40)) { - xprintf("S"); - sei(); - return 0; - } - if (!wait_data_lo(100)) { - xprintf("s"); - sei(); - return 0; - } - - uint8_t n = 0; // bit count - do { - // - // |<- bit_cell_max(130) ->| - // | |<- lo ->| - // | | |<-hi->| - // _______ - // | | | - // | 130-lo | lo-hi | - // |________| | - // - uint8_t lo = (uint8_t)wait_data_hi(130); - if (!lo) goto error; // no more bit or after stop bit - - uint8_t hi = (uint8_t)wait_data_lo(lo); - if (!hi) goto error; // stop bit extedned by Srq? - - if (n / 8 >= len) continue; // can't store in buf - - buf[n / 8] <<= 1; - if ((130 - lo) < (lo - hi)) { - buf[n / 8] |= 1; - } - } while (++n); - -error: - sei(); - return n / 8; -} - -uint16_t adb_host_talk(uint8_t addr, uint8_t reg) { - uint8_t len; - uint8_t buf[8]; - len = adb_host_talk_buf(addr, reg, buf, 8); - if (len != 2) return 0; - return (buf[0] << 8 | buf[1]); -} - -void adb_host_listen_buf(uint8_t addr, uint8_t reg, uint8_t *buf, uint8_t len) { - cli(); - attention(); - send_byte((addr << 4) | ADB_CMD_LISTEN | reg); - place_bit0(); // Stopbit(0) - // TODO: Service Request - _delay_us(200); // Tlt/Stop to Start - place_bit1(); // Startbit(1) - for (int8_t i = 0; i < len; i++) { - send_byte(buf[i]); - // xprintf("%02X ", buf[i]); - } - place_bit0(); // Stopbit(0); - sei(); -} - -void adb_host_listen(uint8_t addr, uint8_t reg, uint8_t data_h, uint8_t data_l) { - uint8_t buf[2] = {data_h, data_l}; - adb_host_listen_buf(addr, reg, buf, 2); -} - -void adb_host_flush(uint8_t addr) { - cli(); - attention(); - send_byte((addr << 4) | ADB_CMD_FLUSH); - place_bit0(); // Stopbit(0) - _delay_us(200); // Tlt/Stop to Start - sei(); -} - -// send state of LEDs -void adb_host_kbd_led(uint8_t led) { - // Listen Register2 - // upper byte: not used - // lower byte: bit2=ScrollLock, bit1=CapsLock, bit0=NumLock - adb_host_listen(ADB_ADDR_KEYBOARD, ADB_REG_2, 0, led & 0x07); -} - -#ifdef ADB_PSW_BIT -static inline void psw_lo() { - ADB_DDR |= (1 << ADB_PSW_BIT); - ADB_PORT &= ~(1 << ADB_PSW_BIT); -} -static inline void psw_hi() { - ADB_PORT |= (1 << ADB_PSW_BIT); - ADB_DDR &= ~(1 << ADB_PSW_BIT); -} -static inline bool psw_in() { - ADB_PORT |= (1 << ADB_PSW_BIT); - ADB_DDR &= ~(1 << ADB_PSW_BIT); - return ADB_PIN & (1 << ADB_PSW_BIT); -} -#endif - -static inline void attention(void) { - data_lo(); - _delay_us(800 - 35); // bit1 holds lo for 35 more - place_bit1(); -} - -static inline void place_bit0(void) { - data_lo(); - _delay_us(65); - data_hi(); - _delay_us(35); -} - -static inline void place_bit1(void) { - data_lo(); - _delay_us(35); - data_hi(); - _delay_us(65); -} - -static inline void send_byte(uint8_t data) { - for (int i = 0; i < 8; i++) { - if (data & (0x80 >> i)) - place_bit1(); - else - place_bit0(); - } -} - -// These are carefully coded to take 6 cycles of overhead. -// inline asm approach became too convoluted -static inline uint16_t wait_data_lo(uint16_t us) { - do { - if (!data_in()) break; - _delay_us(1 - (6 * 1000000.0 / F_CPU)); - } while (--us); - return us; -} - -static inline uint16_t wait_data_hi(uint16_t us) { - do { - if (data_in()) break; - _delay_us(1 - (6 * 1000000.0 / F_CPU)); - } while (--us); - return us; -} - -/* -ADB Protocol -============ - -Resources ---------- -ADB - The Untold Story: Space Aliens Ate My Mouse - http://developer.apple.com/legacy/mac/library/#technotes/hw/hw_01.html -ADB Manager - http://developer.apple.com/legacy/mac/library/documentation/mac/pdf/Devices/ADB_Manager.pdf - Service request(5-17) -Apple IIgs Hardware Reference Second Edition [Chapter6 p121] - ftp://ftp.apple.asimov.net/pub/apple_II/documentation/Apple%20IIgs%20Hardware%20Reference.pdf -ADB Keycode - http://72.0.193.250/Documentation/macppc/adbkeycodes/ - http://m0115.web.fc2.com/m0115.jpg - [Inside Macintosh volume V, pages 191-192] - http://www.opensource.apple.com/source/IOHIDFamily/IOHIDFamily-421.18.3/IOHIDFamily/Cosmo_USB2ADB.c -ADB Signaling - http://kbdbabel.sourceforge.net/doc/kbd_signaling_pcxt_ps2_adb.pdf -ADB Overview & History - http://en.wikipedia.org/wiki/Apple_Desktop_Bus -Microchip Application Note: ADB device(with code for PIC16C) - http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en011062 -AVR ATtiny2131 ADB to PS/2 converter(Japanese) - http://hp.vector.co.jp/authors/VA000177/html/KeyBoardA5DEA5CBA5A2II.html - - -Pinouts -------- - ADB female socket from the front: - __________ - | | <--- top - | 4o o3 | - |2o o1| - | == | - |________| <--- bottom - | | <--- 4pins - - - ADB female socket from bottom: - - ========== <--- front - | | - | | - |2o o1| - |4o o3| - ---------- <--- back - - 1: Data - 2: Power SW(low when press Power key) - 3: Vcc(5V) - 4: GND - - -Commands --------- - ADB command is 1byte and consists of 4bit-address, 2bit-command - type and 2bit-register. The commands are always sent by Host. - - Command format: - 7 6 5 4 3 2 1 0 - | | | |------------ address - | |-------- command type - | |---- register - - bits commands - ------------------------------------------------------ - - - - - 0 0 0 0 Send Reset(reset all devices) - A A A A 0 0 0 1 Flush(reset a device) - - - - - 0 0 1 0 Reserved - - - - - 0 0 1 1 Reserved - - - - - 0 1 - - Reserved - A A A A 1 0 R R Listen(write to a device) - A A A A 1 1 R R Talk(read from a device) - - The command to read keycodes from keyboard is 0x2C which - consist of keyboard address 2 and Talk against register 0. - - Address: - 2: keyboard - 3: mice - - Registers: - 0: application(keyboard uses this to store its data.) - 1: application - 2: application(keyboard uses this for LEDs and state of modifiers) - 3: status and command - - -Communication -------------- - This is a minimum information for keyboard communication. - See "Resources" for detail. - - Signaling: - - ~~~~____________~~||||||||||||__~~~~~_~~|||||||||||||||__~~~~ - - |800us | |7 Command 0| | | |15-64 Data 0|Stopbit(0) - +Attention | | | +Startbit(1) - +Startbit(1) | +Tlt(140-260us) - +stopbit(0) - - Bit cells: - - bit0: ______~~~ - 65 :35us - - bit1: ___~~~~~~ - 35 :65us - - bit0 low time: 60-70% of bit cell(42-91us) - bit1 low time: 30-40% of bit cell(21-52us) - bit cell time: 70-130us - [from Apple IIgs Hardware Reference Second Edition] - - Criterion for bit0/1: - After 55us if line is low/high then bit is 0/1. - - Attention & start bit: - Host asserts low in 560-1040us then places start bit(1). - - Tlt(Stop to Start): - Bus stays high in 140-260us then device places start bit(1). - - Global reset: - Host asserts low in 2.8-5.2ms. All devices are forced to reset. - - Service request from device(Srq): - Device can request to send at commad(Global only?) stop bit. - Requesting device keeps low for 140-260us at stop bit of command. - - -Keyboard Data(Register0) - This 16bit data can contains two keycodes and two released flags. - First keycode is palced in upper byte. When one keyocode is sent, - lower byte is 0xFF. - Release flag is 1 when key is released. - - 1514 . . . . . 8 7 6 . . . . . 0 - | | | | | | | | | +-+-+-+-+-+-+- Keycode2 - | | | | | | | | +--------------- Released2(1 when the key is released) - | +-+-+-+-+-+-+----------------- Keycode1 - +------------------------------- Released1(1 when the key is released) - - Keycodes: - Scancode consists of 7bit keycode and 1bit release flag. - Device can send two keycodes at once. If just one keycode is sent - keycode1 contains it and keyocode2 is 0xFF. - - Power switch: - You can read the state from PSW line(active low) however - the switch has a special scancode 0x7F7F, so you can - also read from Data line. It uses 0xFFFF for release scancode. - -Keyboard LEDs & state of keys(Register2) - This register hold current state of three LEDs and nine keys. - The state of LEDs can be changed by sending Listen command. - - 1514 . . . . . . 7 6 5 . 3 2 1 0 - | | | | | | | | | | | | | | | +- LED1(NumLock) - | | | | | | | | | | | | | | +--- LED2(CapsLock) - | | | | | | | | | | | | | +----- LED3(ScrollLock) - | | | | | | | | | | +-+-+------- Reserved - | | | | | | | | | +------------- ScrollLock - | | | | | | | | +--------------- NumLock - | | | | | | | +----------------- Apple/Command - | | | | | | +------------------- Option - | | | | | +--------------------- Shift - | | | | +----------------------- Control - | | | +------------------------- Reset/Power - | | +--------------------------- CapsLock - | +----------------------------- Delete - +------------------------------- Reserved - -Address, Handler ID and bits(Register3) - 1514131211 . . 8 7 . . . . . . 0 - | | | | | | | | | | | | | | | | - | | | | | | | | +-+-+-+-+-+-+-+- Handler ID - | | | | +-+-+-+----------------- Address - | | | +------------------------- 0 - | | +--------------------------- Service request enable(1 = enabled) - | +----------------------------- Exceptional event(alwyas 1 if not used) - +------------------------------- 0 - -ADB Bit Cells - bit cell time: 70-130us - low part of bit0: 60-70% of bit cell - low part of bit1: 30-40% of bit cell - - bit cell time 70us 130us - -------------------------------------------- - low part of bit0 42-49 78-91 - high part of bit0 21-28 39-52 - low part of bit1 21-28 39-52 - high part of bit1 42-49 78-91 - - - bit0: - 70us bit cell: - ____________~~~~~~ - 42-49 21-28 - - 130us bit cell: - ____________~~~~~~ - 78-91 39-52 - - bit1: - 70us bit cell: - ______~~~~~~~~~~~~ - 21-28 42-49 - - 130us bit cell: - ______~~~~~~~~~~~~ - 39-52 78-91 - - [from Apple IIgs Hardware Reference Second Edition] - -Keyboard Handle ID - Apple Standard Keyboard M0116: 0x01 - Apple Extended Keyboard M0115: 0x02 - Apple Extended Keyboard II M3501: 0x02 - Apple Adjustable Keybaord: 0x10 - - http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c?v=4.4#L802 - -END_OF_ADB -*/ diff --git a/tmk_core/protocol/arm_atsam.mk b/tmk_core/protocol/arm_atsam.mk index 5bb45d658e5..ffd1fa9f502 100644 --- a/tmk_core/protocol/arm_atsam.mk +++ b/tmk_core/protocol/arm_atsam.mk @@ -9,7 +9,8 @@ ifeq ($(RGB_MATRIX_DRIVER),custom) SRC += $(ARM_ATSAM_DIR)/md_rgb_matrix.c endif SRC += $(ARM_ATSAM_DIR)/main_arm_atsam.c -SRC += $(ARM_ATSAM_DIR)/spi.c +SRC += $(ARM_ATSAM_DIR)/shift_register.c +SRC += $(ARM_ATSAM_DIR)/spi_master.c SRC += $(ARM_ATSAM_DIR)/startup.c SRC += $(ARM_ATSAM_DIR)/usb/main_usb.c @@ -19,10 +20,12 @@ SRC += $(ARM_ATSAM_DIR)/usb/udi_hid.c SRC += $(ARM_ATSAM_DIR)/usb/udi_hid_kbd.c SRC += $(ARM_ATSAM_DIR)/usb/udi_hid_kbd_desc.c SRC += $(ARM_ATSAM_DIR)/usb/ui.c -SRC += $(ARM_ATSAM_DIR)/usb/usb2422.c SRC += $(ARM_ATSAM_DIR)/usb/usb.c SRC += $(ARM_ATSAM_DIR)/usb/usb_device_udd.c +SRC += $(ARM_ATSAM_DIR)/usb/usb_hub.c SRC += $(ARM_ATSAM_DIR)/usb/usb_util.c +SRC += $(DRIVER_PATH)/usb2422.c + # Search Path VPATH += $(TMK_DIR)/$(ARM_ATSAM_DIR) diff --git a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h index d126c66e7d1..e1749f872da 100644 --- a/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h +++ b/tmk_core/protocol/arm_atsam/arm_atsam_protocol.h @@ -27,9 +27,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "wait.h" #include "adc.h" #include "i2c_master.h" -#include "spi.h" +#include "shift_register.h" -#include "./usb/usb2422.h" +#include "./usb/usb_hub.h" #ifndef MD_BOOTLOADER diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c index dda2f85b001..af046625f43 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.c +++ b/tmk_core/protocol/arm_atsam/i2c_master.c @@ -564,4 +564,23 @@ uint8_t i2c_led_q_run(void) { return 1; } + +__attribute__((weak)) void i2c_init(void) { + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; + + i2c0_init(); + } +} + +i2c_status_t i2c_transmit(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout) { + uint8_t ret = i2c0_transmit(address, (uint8_t *)data, length, timeout); + SERCOM0->I2CM.CTRLB.bit.CMD = 0x03; + while (SERCOM0->I2CM.SYNCBUSY.bit.SYSOP) { + DBGC(DC_USB_WRITE2422_BLOCK_SYNC_SYSOP); + } + return ret ? I2C_STATUS_SUCCESS : I2C_STATUS_ERROR; +} + #endif // !defined(MD_BOOTLOADER) && defined(RGB_MATRIX_ENABLE) diff --git a/tmk_core/protocol/arm_atsam/i2c_master.h b/tmk_core/protocol/arm_atsam/i2c_master.h index 68773f213fb..e11235d4476 100644 --- a/tmk_core/protocol/arm_atsam/i2c_master.h +++ b/tmk_core/protocol/arm_atsam/i2c_master.h @@ -101,4 +101,13 @@ void i2c0_init(void); uint8_t i2c0_transmit(uint8_t address, uint8_t *data, uint16_t length, uint16_t timeout); void i2c0_stop(void); +// Terrible interface compatiblity... +#define I2C_STATUS_SUCCESS (0) +#define I2C_STATUS_ERROR (-1) + +typedef int16_t i2c_status_t; + +void i2c_init(void); +i2c_status_t i2c_transmit(uint8_t address, const uint8_t *data, uint16_t length, uint16_t timeout); + #endif // _I2C_MASTER_H_ diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 858b4cd9fc0..de12821a747 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -40,6 +40,10 @@ void send_mouse(report_mouse_t *report); void send_system(uint16_t data); void send_consumer(uint16_t data); +#ifdef DEFERRED_EXEC_ENABLE +void deferred_exec_task(void); +#endif // DEFERRED_EXEC_ENABLE + host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; uint8_t led_states; @@ -296,7 +300,7 @@ int main(void) { matrix_init(); - USB2422_init(); + USB_Hub_init(); DBGC(DC_MAIN_UDC_START_BEGIN); udc_start(); @@ -306,7 +310,7 @@ int main(void) { CDC_init(); DBGC(DC_MAIN_CDC_INIT_COMPLETE); - while (USB2422_Port_Detect_Init() == 0) { + while (USB_Hub_Port_Detect_Init() == 0) { } DBG_LED_OFF; @@ -360,6 +364,11 @@ int main(void) { } #endif // CONSOLE_ENABLE +#ifdef DEFERRED_EXEC_ENABLE + // Run deferred executions + deferred_exec_task(); +#endif // DEFERRED_EXEC_ENABLE + // Run housekeeping housekeeping_task(); } diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c index 98967aac886..0741584439f 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.c @@ -15,6 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#define FLUSH_TIMEOUT 5000 +#define EECONFIG_MD_LED ((uint8_t*)(EECONFIG_SIZE + 64)) +#define MD_LED_CONFIG_VERSION 1 + #ifdef RGB_MATRIX_ENABLE # include "arm_atsam_protocol.h" # include "led.h" @@ -23,8 +27,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # include <math.h> # ifdef USE_MASSDROP_CONFIGURATOR +// TODO?: wire these up to keymap.c +md_led_config_t md_led_config = {0}; + +EECONFIG_DEBOUNCE_HELPER(md_led, EECONFIG_MD_LED, md_led_config); + +void eeconfig_update_md_led_default(void) { + md_led_config.ver = MD_LED_CONFIG_VERSION; + + gcr_desired = LED_GCR_MAX; + led_animation_orientation = 0; + led_animation_direction = 0; + led_animation_breathing = 0; + led_animation_id = 0; + led_animation_speed = 4.0f; + led_lighting_mode = LED_MODE_NORMAL; + led_enabled = 1; + led_animation_breathe_cur = BREATHE_MIN_STEP; + breathe_dir = 1; + led_animation_circular = 0; + led_edge_brightness = 1.0f; + led_ratio_brightness = 1.0f; + led_edge_mode = LED_EDGE_MODE_ALL; + + eeconfig_flush_md_led(true); +} + +void md_led_changed(void) { eeconfig_flag_md_led(true); } + +// todo: use real task rather than this bodge +void housekeeping_task_kb(void) { eeconfig_flush_md_led_task(FLUSH_TIMEOUT); } + __attribute__((weak)) led_instruction_t led_instructions[] = {{.end = 1}}; static void md_rgb_matrix_config_override(int i); +# else +uint8_t gcr_desired; # endif // USE_MASSDROP_CONFIGURATOR void SERCOM1_0_Handler(void) { @@ -56,7 +93,6 @@ issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; issi3733_led_t led_map[ISSI3733_LED_COUNT] = ISSI3733_LED_MAP; RGB led_buffer[ISSI3733_LED_COUNT]; -uint8_t gcr_desired; uint8_t gcr_actual; uint8_t gcr_actual_last; # ifdef USE_MASSDROP_CONFIGURATOR @@ -218,6 +254,13 @@ static void led_set_all(uint8_t r, uint8_t g, uint8_t b) { static void init(void) { DBGC(DC_LED_MATRIX_INIT_BEGIN); +# ifdef USE_MASSDROP_CONFIGURATOR + eeconfig_init_md_led(); + if (md_led_config.ver != MD_LED_CONFIG_VERSION) { + eeconfig_update_md_led_default(); + } +# endif + issi3733_prepare_arrays(); md_rgb_matrix_prepare(); @@ -331,17 +374,6 @@ const rgb_matrix_driver_t rgb_matrix_driver = {.init = init, .flush = flush, .se # ifdef USE_MASSDROP_CONFIGURATOR // Ported from Massdrop QMK GitHub Repo -// TODO?: wire these up to keymap.c -uint8_t led_animation_orientation = 0; -uint8_t led_animation_direction = 0; -uint8_t led_animation_breathing = 0; -uint8_t led_animation_id = 0; -float led_animation_speed = 4.0f; -uint8_t led_lighting_mode = LED_MODE_NORMAL; -uint8_t led_enabled = 1; -uint8_t led_animation_breathe_cur = BREATHE_MIN_STEP; -uint8_t breathe_dir = 1; - static void led_run_pattern(led_setup_t* f, float* ro, float* go, float* bo, float pos) { float po; @@ -398,16 +430,32 @@ static void led_run_pattern(led_setup_t* f, float* ro, float* go, float* bo, flo } } +# define RGB_MAX_DISTANCE 232.9635f + static void md_rgb_matrix_config_override(int i) { float ro = 0; float go = 0; float bo = 0; - - float po = (led_animation_orientation) ? (float)g_led_config.point[i].y / 64.f * 100 : (float)g_led_config.point[i].x / 224.f * 100; + float po; uint8_t highest_active_layer = biton32(layer_state); - if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { + if (led_animation_circular) { + // TODO: should use min/max values from LED configuration instead of + // hard-coded 224, 64 + // po = sqrtf((powf(fabsf((disp.width / 2) - (led_cur->x - disp.left)), 2) + powf(fabsf((disp.height / 2) - (led_cur->y - disp.bottom)), 2))) / disp.max_distance * 100; + po = sqrtf((powf(fabsf((224 / 2) - (float)g_led_config.point[i].x), 2) + powf(fabsf((64 / 2) - (float)g_led_config.point[i].y), 2))) / RGB_MAX_DISTANCE * 100; + } else { + if (led_animation_orientation) { + po = (float)g_led_config.point[i].y / 64.f * 100; + } else { + po = (float)g_led_config.point[i].x / 224.f * 100; + } + } + + if (led_edge_mode == LED_EDGE_MODE_ALTERNATE && LED_IS_EDGE_ALT(led_map[i].scan)) { + // Do not act on this LED (Edge alternate lighting mode) + } else if (led_lighting_mode == LED_MODE_KEYS_ONLY && HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { // Do not act on this LED } else if (led_lighting_mode == LED_MODE_NON_KEYS_ONLY && !HAS_FLAGS(g_led_config.flags[i], LED_FLAG_UNDERGLOW)) { // Do not act on this LED @@ -465,10 +513,30 @@ static void md_rgb_matrix_config_override(int i) { } } + // Adjust edge LED brightness + if (led_edge_brightness != 1 && LED_IS_EDGE(led_map[i].scan)) { + ro *= led_edge_brightness; + go *= led_edge_brightness; + bo *= led_edge_brightness; + } + + // Adjust ratio of key vs. underglow (edge) LED brightness + if (LED_IS_EDGE(led_map[i].scan) && led_ratio_brightness > 1.0) { + // Decrease edge (underglow) LEDs + ro *= (2.0 - led_ratio_brightness); + go *= (2.0 - led_ratio_brightness); + bo *= (2.0 - led_ratio_brightness); + } else if (LED_IS_KEY(led_map[i].scan) && led_ratio_brightness < 1.0) { + // Decrease KEY LEDs + ro *= led_ratio_brightness; + go *= led_ratio_brightness; + bo *= led_ratio_brightness; + } + led_buffer[i].r = (uint8_t)ro; led_buffer[i].g = (uint8_t)go; led_buffer[i].b = (uint8_t)bo; } # endif // USE_MASSDROP_CONFIGURATOR -#endif // RGB_MATRIX_ENABLE \ No newline at end of file +#endif // RGB_MATRIX_ENABLE diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h index 76ccaa678b5..deea12b888e 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix.h +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix.h @@ -19,6 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define _LED_MATRIX_H_ #include "quantum.h" +#include "eeprom.h" // From keyboard #include "config_led.h" @@ -79,7 +80,6 @@ typedef struct issi3733_led_s { extern issi3733_driver_t issidrv[ISSI3733_DRIVER_COUNT]; -extern uint8_t gcr_desired; extern uint8_t gcr_breathe; extern uint8_t gcr_actual; extern uint8_t gcr_actual_last; @@ -128,6 +128,8 @@ typedef struct led_instruction_s { uint32_t id1; // Bitwise id, IDs 32-63 uint32_t id2; // Bitwise id, IDs 64-95 uint32_t id3; // Bitwise id, IDs 96-127 + uint32_t id4; // Bitwise id, IDs 128-159 + uint32_t id5; // Bitwise id, IDs 160-191 uint8_t layer; uint8_t r; uint8_t g; @@ -138,14 +140,43 @@ typedef struct led_instruction_s { extern led_instruction_t led_instructions[]; -extern uint8_t led_animation_breathing; -extern uint8_t led_animation_id; -extern float led_animation_speed; -extern uint8_t led_lighting_mode; -extern uint8_t led_enabled; -extern uint8_t led_animation_breathe_cur; -extern uint8_t led_animation_direction; -extern uint8_t breathe_dir; +typedef struct led_config_s { + uint8_t ver; // assumed to be zero on eeprom reset + + uint8_t desired_gcr; + uint8_t animation_breathing; + uint8_t animation_id; + float animation_speed; + uint8_t lighting_mode; + uint8_t enabled; + uint8_t animation_breathe_cur; + uint8_t animation_direction; + uint8_t animation_breathe_dir; + uint8_t animation_orientation; + uint8_t animation_circular; + float edge_brightness; + float ratio_brightness; + uint8_t edge_mode; +} md_led_config_t; + +extern md_led_config_t md_led_config; + +void md_led_changed(void); + +# define gcr_desired md_led_config.desired_gcr +# define led_animation_breathing md_led_config.animation_breathing +# define led_animation_id md_led_config.animation_id +# define led_animation_speed md_led_config.animation_speed +# define led_lighting_mode md_led_config.lighting_mode +# define led_enabled md_led_config.enabled +# define led_animation_breathe_cur md_led_config.animation_breathe_cur +# define led_animation_direction md_led_config.animation_direction +# define breathe_dir md_led_config.animation_breathe_dir +# define led_animation_orientation md_led_config.animation_orientation +# define led_animation_circular md_led_config.animation_circular +# define led_edge_brightness md_led_config.edge_brightness +# define led_ratio_brightness md_led_config.ratio_brightness +# define led_edge_mode md_led_config.edge_mode # define LED_MODE_NORMAL 0 // Must be 0 # define LED_MODE_KEYS_ONLY 1 @@ -153,6 +184,21 @@ extern uint8_t breathe_dir; # define LED_MODE_INDICATORS_ONLY 3 # define LED_MODE_MAX_INDEX LED_MODE_INDICATORS_ONLY // Must be highest value +# define LED_EDGE_MODE_ALL 0 // All edge LEDs are active (Must be 0) +# define LED_EDGE_MODE_ALTERNATE 1 // Alternate mode of edge LEDs are active (Intention is for 'only every other edge LED' to be active) +# define LED_EDGE_MODE_MAX LED_EDGE_MODE_ALTERNATE // Must be the highest valued LED edge mode + +# define LED_EDGE_FULL_MODE 255 // LEDs configured with this scan code will always be on for edge lighting modes +# define LED_EDGE_ALT_MODE 254 // LEDs configured with this scan code will turn off in edge alternating mode +# define LED_EDGE_MIN_SCAN 254 // LEDs configured with scan code >= to this are assigned as edge LEDs +# define LED_INDICATOR_SCAN 253 // LEDs configured as dedicated indicators + +# define LED_IS_KEY(scan) (scan < LED_INDICATOR_SCAN) // Return true if an LED's scan value indicates it is a key LED +# define LED_IS_EDGE(scan) (scan >= LED_EDGE_MIN_SCAN) // Return true if an LED's scan value indicates an edge LED +# define LED_IS_EDGE_ALT(scan) (scan == LED_EDGE_ALT_MODE) // Return true if an LED's scan value indicates an alternate edge mode LED +# define LED_IS_INDICATOR(scan) (scan == LED_INDICATOR_SCAN) // Return true if an LED's scan value indicates it is a dedicated Indicator +#else +extern uint8_t gcr_desired; #endif // USE_MASSDROP_CONFIGURATOR #endif //_LED_MATRIX_H_ diff --git a/tmk_core/protocol/arm_atsam/shift_register.c b/tmk_core/protocol/arm_atsam/shift_register.c new file mode 100644 index 00000000000..8d63af1b59d --- /dev/null +++ b/tmk_core/protocol/arm_atsam/shift_register.c @@ -0,0 +1,118 @@ +/* +Copyright 2018 Massdrop Inc. + +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 "arm_atsam_protocol.h" + +#include "spi_master.h" +#include "wait.h" +#include "gpio.h" + +// #define SR_USE_BITBANG + +// Bodge for when spi_master is not available +#ifdef SR_USE_BITBANG +# define CLOCK_DELAY 10 + +void shift_init_impl(void) { + setPinOutput(SR_EXP_RCLK_PIN); + setPinOutput(SPI_DATAOUT_PIN); + setPinOutput(SPI_SCLK_PIN); +} + +void shift_out_impl(const uint8_t *data, uint16_t length) { + writePinLow(SR_EXP_RCLK_PIN); + for (uint16_t i = 0; i < length; i++) { + uint8_t val = data[i]; + + // shift out lsb first + for (uint8_t bit = 0; bit < 8; bit++) { + writePin(SPI_DATAOUT_PIN, !!(val & (1 << bit))); + writePin(SPI_SCLK_PIN, true); + wait_us(CLOCK_DELAY); + + writePin(SPI_SCLK_PIN, false); + wait_us(CLOCK_DELAY); + } + } + writePinHigh(SR_EXP_RCLK_PIN); + return SPI_STATUS_SUCCESS; +} + +#else + +void shift_init_impl(void) { spi_init(); } + +void shift_out_impl(const uint8_t *data, uint16_t length) { + spi_start(SR_EXP_RCLK_PIN, true, 0, 0); + + spi_transmit(data, length); + + spi_stop(); +} +#endif + +// *************************************************************** + +void shift_out(const uint8_t *data, uint16_t length) { shift_out_impl(data, length); } + +void shift_enable(void) { + setPinOutput(SR_EXP_OE_PIN); + writePinLow(SR_EXP_OE_PIN); +} + +void shift_disable(void) { + setPinOutput(SR_EXP_OE_PIN); + writePinHigh(SR_EXP_OE_PIN); +} + +void shift_init(void) { + shift_disable(); + shift_init_impl(); +} + +// *************************************************************** + +sr_exp_t sr_exp_data; + +void SR_EXP_WriteData(void) { + uint8_t data[2] = { + sr_exp_data.reg & 0xFF, // Shift in bits 7-0 + (sr_exp_data.reg >> 8) & 0xFF, // Shift in bits 15-8 + }; + shift_out(data, 2); +} + +void SR_EXP_Init(void) { + shift_init(); + + sr_exp_data.reg = 0; + sr_exp_data.bit.HUB_CONNECT = 0; + sr_exp_data.bit.HUB_RESET_N = 0; + sr_exp_data.bit.S_UP = 0; + sr_exp_data.bit.E_UP_N = 1; + sr_exp_data.bit.S_DN1 = 1; + sr_exp_data.bit.E_DN1_N = 1; + sr_exp_data.bit.E_VBUS_1 = 0; + sr_exp_data.bit.E_VBUS_2 = 0; + sr_exp_data.bit.SRC_1 = 1; + sr_exp_data.bit.SRC_2 = 1; + sr_exp_data.bit.IRST = 1; + sr_exp_data.bit.SDB_N = 0; + SR_EXP_WriteData(); + + shift_enable(); +} diff --git a/tmk_core/protocol/arm_atsam/shift_register.h b/tmk_core/protocol/arm_atsam/shift_register.h new file mode 100644 index 00000000000..56a8c7f7177 --- /dev/null +++ b/tmk_core/protocol/arm_atsam/shift_register.h @@ -0,0 +1,49 @@ +/* +Copyright 2018 Massdrop Inc. + +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/>. +*/ + +#pragma once + +#include <stdint.h> + +/* Data structure to define Shift Register output expander hardware */ +/* This structure gets shifted into registers LSB first */ +typedef union { + struct { + uint16_t RSVD4 : 1; /*!< bit: 0 */ + uint16_t RSVD3 : 1; /*!< bit: 1 */ + uint16_t RSVD2 : 1; /*!< bit: 2 */ + uint16_t RSVD1 : 1; /*!< bit: 3 */ + uint16_t SDB_N : 1; /*!< bit: 4 SHUTDOWN THE CHIP WHEN 0, RUN WHEN 1 */ + uint16_t IRST : 1; /*!< bit: 5 RESET THE IS3733 I2C WHEN 1, RUN WHEN 0 */ + uint16_t SRC_2 : 1; /*!< bit: 6 ADVERTISE A SOURCE TO USBC-2 CC */ + uint16_t SRC_1 : 1; /*!< bit: 7 ADVERTISE A SOURCE TO USBC-1 CC */ + uint16_t E_VBUS_2 : 1; /*!< bit: 8 ENABLE 5V OUT TO USBC-2 WHEN 1 */ + uint16_t E_VBUS_1 : 1; /*!< bit: 9 ENABLE 5V OUT TO USBC-1 WHEN 1 */ + uint16_t E_DN1_N : 1; /*!< bit: 10 ENABLE DN1 1:2 MUX WHEN 0 */ + uint16_t S_DN1 : 1; /*!< bit: 11 SELECT DN1 PATH 0:USBC-1, 1:USBC-2 */ + uint16_t E_UP_N : 1; /*!< bit: 12 ENABLE SUP 1:2 MUX WHEN 0 */ + uint16_t S_UP : 1; /*!< bit: 13 SELECT UP PATH 0:USBC-1, 1:USBC-2 */ + uint16_t HUB_RESET_N : 1; /*!< bit: 14 RESET USB HUB WHEN 0, RUN WHEN 1 */ + uint16_t HUB_CONNECT : 1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */ + } bit; /*!< Structure used for bit access */ + uint16_t reg; /*!< Type used for register access */ +} sr_exp_t; + +extern sr_exp_t sr_exp_data; + +void SR_EXP_WriteData(void); +void SR_EXP_Init(void); diff --git a/tmk_core/protocol/arm_atsam/spi.c b/tmk_core/protocol/arm_atsam/spi.c deleted file mode 100644 index 3b118bc1f13..00000000000 --- a/tmk_core/protocol/arm_atsam/spi.c +++ /dev/null @@ -1,92 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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 "arm_atsam_protocol.h" - -sr_exp_t sr_exp_data; - -void SR_EXP_WriteData(void) { - SR_EXP_RCLK_LO; - - while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.DRE)) { - DBGC(DC_SPI_WRITE_DRE); - } - - SR_EXP_SERCOM->SPI.DATA.bit.DATA = sr_exp_data.reg & 0xFF; // Shift in bits 7-0 - while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { - DBGC(DC_SPI_WRITE_TXC_1); - } - - SR_EXP_SERCOM->SPI.DATA.bit.DATA = (sr_exp_data.reg >> 8) & 0xFF; // Shift in bits 15-8 - while (!(SR_EXP_SERCOM->SPI.INTFLAG.bit.TXC)) { - DBGC(DC_SPI_WRITE_TXC_2); - } - - SR_EXP_RCLK_HI; -} - -void SR_EXP_Init(void) { - DBGC(DC_SPI_INIT_BEGIN); - - CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT); - - // Set up MCU Shift Register pins - PORT->Group[SR_EXP_RCLK_PORT].DIRSET.reg = (1 << SR_EXP_RCLK_PIN); - PORT->Group[SR_EXP_OE_N_PORT].DIRSET.reg = (1 << SR_EXP_OE_N_PIN); - - // Set up MCU SPI pins - PORT->Group[SR_EXP_DATAOUT_PORT].PMUX[SR_EXP_DATAOUT_PIN / 2].bit.SR_EXP_DATAOUT_MUX_SEL = SR_EXP_DATAOUT_MUX; // MUX select for sercom - PORT->Group[SR_EXP_SCLK_PORT].PMUX[SR_EXP_SCLK_PIN / 2].bit.SR_EXP_SCLK_MUX_SEL = SR_EXP_SCLK_MUX; // MUX select for sercom - PORT->Group[SR_EXP_DATAOUT_PORT].PINCFG[SR_EXP_DATAOUT_PIN].bit.PMUXEN = 1; // MUX Enable - PORT->Group[SR_EXP_SCLK_PORT].PINCFG[SR_EXP_SCLK_PIN].bit.PMUXEN = 1; // MUX Enable - - // Initialize Shift Register - SR_EXP_OE_N_DIS; - SR_EXP_RCLK_HI; - - SR_EXP_SERCOM->SPI.CTRLA.bit.DORD = 1; // Data Order - LSB is transferred first - SR_EXP_SERCOM->SPI.CTRLA.bit.CPOL = 1; // Clock Polarity - SCK high when idle. Leading edge of cycle is falling. Trailing rising. - SR_EXP_SERCOM->SPI.CTRLA.bit.CPHA = 1; // Clock Phase - Leading Edge Falling, change, Trailing Edge - Rising, sample - SR_EXP_SERCOM->SPI.CTRLA.bit.DIPO = 3; // Data In Pinout - SERCOM PAD[3] is used as data input (Configure away from DOPO. Not using input.) - SR_EXP_SERCOM->SPI.CTRLA.bit.DOPO = 0; // Data Output PAD[0], Serial Clock PAD[1] - SR_EXP_SERCOM->SPI.CTRLA.bit.MODE = 3; // Operating Mode - Master operation - - SR_EXP_SERCOM->SPI.CTRLA.bit.ENABLE = 1; // Enable - Peripheral is enabled or being enabled - while (SR_EXP_SERCOM->SPI.SYNCBUSY.bit.ENABLE) { - DBGC(DC_SPI_SYNC_ENABLING); - } - - sr_exp_data.reg = 0; - sr_exp_data.bit.HUB_CONNECT = 0; - sr_exp_data.bit.HUB_RESET_N = 0; - sr_exp_data.bit.S_UP = 0; - sr_exp_data.bit.E_UP_N = 1; - sr_exp_data.bit.S_DN1 = 1; - sr_exp_data.bit.E_DN1_N = 1; - sr_exp_data.bit.E_VBUS_1 = 0; - sr_exp_data.bit.E_VBUS_2 = 0; - sr_exp_data.bit.SRC_1 = 1; - sr_exp_data.bit.SRC_2 = 1; - sr_exp_data.bit.IRST = 1; - sr_exp_data.bit.SDB_N = 0; - SR_EXP_WriteData(); - - // Enable Shift Register output - SR_EXP_OE_N_ENA; - - DBGC(DC_SPI_INIT_COMPLETE); -} diff --git a/tmk_core/protocol/arm_atsam/spi.h b/tmk_core/protocol/arm_atsam/spi.h deleted file mode 100644 index dcd45f31afe..00000000000 --- a/tmk_core/protocol/arm_atsam/spi.h +++ /dev/null @@ -1,70 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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/>. -*/ - -#ifndef _SPI_H_ -#define _SPI_H_ - -/* Macros for Shift Register control */ -#define SR_EXP_RCLK_LO PORT->Group[SR_EXP_RCLK_PORT].OUTCLR.reg = (1 << SR_EXP_RCLK_PIN) -#define SR_EXP_RCLK_HI PORT->Group[SR_EXP_RCLK_PORT].OUTSET.reg = (1 << SR_EXP_RCLK_PIN) -#define SR_EXP_OE_N_ENA PORT->Group[SR_EXP_OE_N_PORT].OUTCLR.reg = (1 << SR_EXP_OE_N_PIN) -#define SR_EXP_OE_N_DIS PORT->Group[SR_EXP_OE_N_PORT].OUTSET.reg = (1 << SR_EXP_OE_N_PIN) - -/* Determine bits to set for mux selection */ -#if SR_EXP_DATAOUT_PIN % 2 == 0 -# define SR_EXP_DATAOUT_MUX_SEL PMUXE -#else -# define SR_EXP_DATAOUT_MUX_SEL PMUXO -#endif - -/* Determine bits to set for mux selection */ -#if SR_EXP_SCLK_PIN % 2 == 0 -# define SR_EXP_SCLK_MUX_SEL PMUXE -#else -# define SR_EXP_SCLK_MUX_SEL PMUXO -#endif - -/* Data structure to define Shift Register output expander hardware */ -/* This structure gets shifted into registers LSB first */ -typedef union { - struct { - uint16_t RSVD4 : 1; /*!< bit: 0 */ - uint16_t RSVD3 : 1; /*!< bit: 1 */ - uint16_t RSVD2 : 1; /*!< bit: 2 */ - uint16_t RSVD1 : 1; /*!< bit: 3 */ - uint16_t SDB_N : 1; /*!< bit: 4 SHUTDOWN THE CHIP WHEN 0, RUN WHEN 1 */ - uint16_t IRST : 1; /*!< bit: 5 RESET THE IS3733 I2C WHEN 1, RUN WHEN 0 */ - uint16_t SRC_2 : 1; /*!< bit: 6 ADVERTISE A SOURCE TO USBC-2 CC */ - uint16_t SRC_1 : 1; /*!< bit: 7 ADVERTISE A SOURCE TO USBC-1 CC */ - uint16_t E_VBUS_2 : 1; /*!< bit: 8 ENABLE 5V OUT TO USBC-2 WHEN 1 */ - uint16_t E_VBUS_1 : 1; /*!< bit: 9 ENABLE 5V OUT TO USBC-1 WHEN 1 */ - uint16_t E_DN1_N : 1; /*!< bit: 10 ENABLE DN1 1:2 MUX WHEN 0 */ - uint16_t S_DN1 : 1; /*!< bit: 11 SELECT DN1 PATH 0:USBC-1, 1:USBC-2 */ - uint16_t E_UP_N : 1; /*!< bit: 12 ENABLE SUP 1:2 MUX WHEN 0 */ - uint16_t S_UP : 1; /*!< bit: 13 SELECT UP PATH 0:USBC-1, 1:USBC-2 */ - uint16_t HUB_RESET_N : 1; /*!< bit: 14 RESET USB HUB WHEN 0, RUN WHEN 1 */ - uint16_t HUB_CONNECT : 1; /*!< bit: 15 SIGNAL VBUS CONNECT TO USB HUB WHEN 1 */ - } bit; /*!< Structure used for bit access */ - uint16_t reg; /*!< Type used for register access */ -} sr_exp_t; - -extern sr_exp_t sr_exp_data; - -void SR_EXP_WriteData(void); -void SR_EXP_Init(void); - -#endif //_SPI_H_ diff --git a/tmk_core/protocol/arm_atsam/spi_master.c b/tmk_core/protocol/arm_atsam/spi_master.c new file mode 100644 index 00000000000..9781d45b1e0 --- /dev/null +++ b/tmk_core/protocol/arm_atsam/spi_master.c @@ -0,0 +1,109 @@ +/* +Copyright 2018 Massdrop Inc. + +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 "arm_atsam_protocol.h" +#include "spi_master.h" +#include "gpio.h" + +/* Determine bits to set for mux selection */ +#if SPI_DATAOUT_PIN % 2 == 0 +# define SPI_DATAOUT_MUX_SEL PMUXE +#else +# define SPI_DATAOUT_MUX_SEL PMUXO +#endif + +/* Determine bits to set for mux selection */ +#if SPI_SCLK_PIN % 2 == 0 +# define SPI_SCLK_MUX_SEL PMUXE +#else +# define SPI_SCLK_MUX_SEL PMUXO +#endif + +static pin_t currentSelectPin = NO_PIN; + +__attribute__((weak)) void spi_init(void) { + static bool is_initialised = false; + if (!is_initialised) { + is_initialised = true; + + DBGC(DC_SPI_INIT_BEGIN); + + CLK_set_spi_freq(CHAN_SERCOM_SPI, FREQ_SPI_DEFAULT); + + // Set up MCU SPI pins + PORT->Group[SAMD_PORT(SPI_DATAOUT_PIN)].PMUX[SAMD_PIN(SPI_DATAOUT_PIN) / 2].bit.SPI_DATAOUT_MUX_SEL = SPI_DATAOUT_MUX; // MUX select for sercom + PORT->Group[SAMD_PORT(SPI_SCLK_PIN)].PMUX[SAMD_PIN(SPI_SCLK_PIN) / 2].bit.SPI_SCLK_MUX_SEL = SPI_SCLK_MUX; // MUX select for sercom + PORT->Group[SAMD_PORT(SPI_DATAOUT_PIN)].PINCFG[SAMD_PIN(SPI_DATAOUT_PIN)].bit.PMUXEN = 1; // MUX Enable + PORT->Group[SAMD_PORT(SPI_SCLK_PIN)].PINCFG[SAMD_PIN(SPI_SCLK_PIN)].bit.PMUXEN = 1; // MUX Enable + + DBGC(DC_SPI_INIT_COMPLETE); + } +} + +bool spi_start(pin_t csPin, bool lsbFirst, uint8_t mode, uint16_t divisor) { + if (currentSelectPin != NO_PIN || csPin == NO_PIN) { + return false; + } + + currentSelectPin = csPin; + setPinOutput(currentSelectPin); + writePinLow(currentSelectPin); + + SPI_SERCOM->SPI.CTRLA.bit.DORD = lsbFirst; // Data Order - LSB is transferred first + SPI_SERCOM->SPI.CTRLA.bit.CPOL = 1; // Clock Polarity - SCK high when idle. Leading edge of cycle is falling. Trailing rising. + SPI_SERCOM->SPI.CTRLA.bit.CPHA = 1; // Clock Phase - Leading Edge Falling, change, Trailing Edge - Rising, sample + SPI_SERCOM->SPI.CTRLA.bit.DIPO = 3; // Data In Pinout - SERCOM PAD[3] is used as data input (Configure away from DOPO. Not using input.) + SPI_SERCOM->SPI.CTRLA.bit.DOPO = 0; // Data Output PAD[0], Serial Clock PAD[1] + SPI_SERCOM->SPI.CTRLA.bit.MODE = 3; // Operating Mode - Master operation + + SPI_SERCOM->SPI.CTRLA.bit.ENABLE = 1; // Enable - Peripheral is enabled or being enabled + while (SPI_SERCOM->SPI.SYNCBUSY.bit.ENABLE) { + DBGC(DC_SPI_SYNC_ENABLING); + } + return true; +} + +spi_status_t spi_transmit(const uint8_t *data, uint16_t length) { + while (!(SPI_SERCOM->SPI.INTFLAG.bit.DRE)) { + DBGC(DC_SPI_WRITE_DRE); + } + + for (uint16_t i = 0; i < length; i++) { + SPI_SERCOM->SPI.DATA.bit.DATA = data[i]; + while (!(SPI_SERCOM->SPI.INTFLAG.bit.TXC)) { + DBGC(DC_SPI_WRITE_TXC_1); + } + } + + return SPI_STATUS_SUCCESS; +} + +void spi_stop(void) { + if (currentSelectPin != NO_PIN) { + setPinOutput(currentSelectPin); + writePinHigh(currentSelectPin); + currentSelectPin = NO_PIN; + } +} + +// Not implemented yet.... + +spi_status_t spi_write(uint8_t data); + +spi_status_t spi_read(void); + +spi_status_t spi_receive(uint8_t *data, uint16_t length); diff --git a/tmk_core/protocol/arm_atsam/spi_master.h b/tmk_core/protocol/arm_atsam/spi_master.h new file mode 100644 index 00000000000..26c55128be1 --- /dev/null +++ b/tmk_core/protocol/arm_atsam/spi_master.h @@ -0,0 +1,48 @@ +/* Copyright 2021 QMK + * + * 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 3 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 <https://www.gnu.org/licenses/>. + */ + +#pragma once + +#include <stdbool.h> + +typedef int16_t spi_status_t; + +#define SPI_STATUS_SUCCESS (0) +#define SPI_STATUS_ERROR (-1) +#define SPI_STATUS_TIMEOUT (-2) + +#define SPI_TIMEOUT_IMMEDIATE (0) +#define SPI_TIMEOUT_INFINITE (0xFFFF) + +#ifdef __cplusplus +extern "C" { +#endif +void spi_init(void); + +bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor); + +spi_status_t spi_write(uint8_t data); + +spi_status_t spi_read(void); + +spi_status_t spi_transmit(const uint8_t *data, uint16_t length); + +spi_status_t spi_receive(uint8_t *data, uint16_t length); + +void spi_stop(void); +#ifdef __cplusplus +} +#endif diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.c b/tmk_core/protocol/arm_atsam/usb/usb2422.c deleted file mode 100644 index a878cb6b7ca..00000000000 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.c +++ /dev/null @@ -1,426 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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 "arm_atsam_protocol.h" -#include <string.h> - -Usb2422 USB2422_shadow; -unsigned char i2c0_buf[34]; - -const uint16_t MFRNAME[] = {'M', 'a', 's', 's', 'd', 'r', 'o', 'p', ' ', 'I', 'n', 'c', '.'}; // Massdrop Inc. -const uint16_t PRDNAME[] = {'M', 'a', 's', 's', 'd', 'r', 'o', 'p', ' ', 'H', 'u', 'b'}; // Massdrop Hub -#ifndef MD_BOOTLOADER -// Serial number reported stops before first found space character or at last found character -const uint16_t SERNAME[] = {'U', 'n', 'a', 'v', 'a', 'i', 'l', 'a', 'b', 'l', 'e'}; // Unavailable -#else -// In production, this field is found, modified, and offset noted as the last 32-bit word in the bootloader space -// The offset allows the application to use the factory programmed serial (which may differ from the physical serial label) -// Serial number reported stops before first found space character or when max size is reached -__attribute__((__aligned__(4))) const uint16_t SERNAME[BOOTLOADER_SERIAL_MAX_SIZE] = {'M', 'D', 'H', 'U', 'B', 'B', 'O', 'O', 'T', 'L', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0'}; -// NOTE: Serial replacer will not write a string longer than given here as a precaution, so give enough -// space as needed and adjust BOOTLOADER_SERIAL_MAX_SIZE to match amount given -#endif // MD_BOOTLOADER - -uint8_t usb_host_port; - -#ifndef MD_BOOTLOADER - -uint8_t usb_extra_state; -uint8_t usb_extra_manual; -uint8_t usb_gcr_auto; - -#endif // MD_BOOTLOADER - -uint16_t adc_extra; - -void USB_write2422_block(void) { - unsigned char *dest = i2c0_buf; - unsigned char *src; - unsigned char *base = (unsigned char *)&USB2422_shadow; - - DBGC(DC_USB_WRITE2422_BLOCK_BEGIN); - - for (src = base; src < base + 256; src += 32) { - dest[0] = src - base; - dest[1] = 32; - memcpy(&dest[2], src, 32); - i2c0_transmit(USB2422_ADDR, dest, 34, 50000); - SERCOM0->I2CM.CTRLB.bit.CMD = 0x03; - while (SERCOM0->I2CM.SYNCBUSY.bit.SYSOP) { - DBGC(DC_USB_WRITE2422_BLOCK_SYNC_SYSOP); - } - wait_us(100); - } - - DBGC(DC_USB_WRITE2422_BLOCK_COMPLETE); -} - -void USB2422_init(void) { - Gclk * pgclk = GCLK; - Mclk * pmclk = MCLK; - Port * pport = PORT; - Oscctrl *posc = OSCCTRL; - Usb * pusb = USB; - - DBGC(DC_USB2422_INIT_BEGIN); - - while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { - DBGC(DC_USB2422_INIT_WAIT_5V_LOW); - } - - // setup peripheral and synchronous bus clocks to USB - pgclk->PCHCTRL[10].bit.GEN = 0; - pgclk->PCHCTRL[10].bit.CHEN = 1; - pmclk->AHBMASK.bit.USB_ = 1; - pmclk->APBBMASK.bit.USB_ = 1; - - // setup port pins for D-, D+, and SOF_1KHZ - pport->Group[0].PMUX[12].reg = 0x77; // PA24, PA25, function column H for USB D-, D+ - pport->Group[0].PINCFG[24].bit.PMUXEN = 1; - pport->Group[0].PINCFG[25].bit.PMUXEN = 1; - pport->Group[1].PMUX[11].bit.PMUXE = 7; // PB22, function column H for USB SOF_1KHz output - pport->Group[1].PINCFG[22].bit.PMUXEN = 1; - - // configure and enable DFLL for USB clock recovery mode at 48MHz - posc->DFLLCTRLA.bit.ENABLE = 0; - while (posc->DFLLSYNC.bit.ENABLE) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DISABLING); - } - while (posc->DFLLSYNC.bit.DFLLCTRLB) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_1); - } - posc->DFLLCTRLB.bit.USBCRM = 1; - while (posc->DFLLSYNC.bit.DFLLCTRLB) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_2); - } - posc->DFLLCTRLB.bit.MODE = 1; - while (posc->DFLLSYNC.bit.DFLLCTRLB) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_3); - } - posc->DFLLCTRLB.bit.QLDIS = 0; - while (posc->DFLLSYNC.bit.DFLLCTRLB) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_4); - } - posc->DFLLCTRLB.bit.CCDIS = 1; - posc->DFLLMUL.bit.MUL = 0xBB80; // 4800 x 1KHz - while (posc->DFLLSYNC.bit.DFLLMUL) { - DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLMUL); - } - posc->DFLLCTRLA.bit.ENABLE = 1; - while (posc->DFLLSYNC.bit.ENABLE) { - DBGC(DC_USB2422_INIT_OSC_SYNC_ENABLING); - } - - pusb->DEVICE.CTRLA.bit.SWRST = 1; - while (pusb->DEVICE.SYNCBUSY.bit.SWRST) { - DBGC(DC_USB2422_INIT_USB_SYNC_SWRST); - } - while (pusb->DEVICE.CTRLA.bit.SWRST) { - DBGC(DC_USB2422_INIT_USB_WAIT_SWRST); - } - // calibration from factory presets - pusb->DEVICE.PADCAL.bit.TRANSN = (USB_FUSES_TRANSN_ADDR >> USB_FUSES_TRANSN_Pos) & USB_FUSES_TRANSN_Msk; - pusb->DEVICE.PADCAL.bit.TRANSP = (USB_FUSES_TRANSP_ADDR >> USB_FUSES_TRANSP_Pos) & USB_FUSES_TRANSP_Msk; - pusb->DEVICE.PADCAL.bit.TRIM = (USB_FUSES_TRIM_ADDR >> USB_FUSES_TRIM_Pos) & USB_FUSES_TRIM_Msk; - // device mode, enabled - pusb->DEVICE.CTRLB.bit.SPDCONF = 0; // full speed - pusb->DEVICE.CTRLA.bit.MODE = 0; - pusb->DEVICE.CTRLA.bit.ENABLE = 1; - while (pusb->DEVICE.SYNCBUSY.bit.ENABLE) { - DBGC(DC_USB2422_INIT_USB_SYNC_ENABLING); - } - - pusb->DEVICE.QOSCTRL.bit.DQOS = 2; - pusb->DEVICE.QOSCTRL.bit.CQOS = 2; - - pport->Group[USB2422_HUB_ACTIVE_GROUP].PINCFG[USB2422_HUB_ACTIVE_PIN].bit.INEN = 1; - - i2c0_init(); // IC2 clk must be high at USB2422 reset release time to signal SMB configuration - - sr_exp_data.bit.HUB_CONNECT = 1; // connect signal - sr_exp_data.bit.HUB_RESET_N = 1; // reset high - SR_EXP_WriteData(); - - wait_us(100); - -#ifndef MD_BOOTLOADER - - usb_extra_manual = 0; - usb_gcr_auto = 1; - -#endif // MD_BOOTLOADER - - DBGC(DC_USB2422_INIT_COMPLETE); -} - -void USB_reset(void) { - DBGC(DC_USB_RESET_BEGIN); - - // pulse reset for at least 1 usec - sr_exp_data.bit.HUB_RESET_N = 0; // reset low - SR_EXP_WriteData(); - wait_us(2); - sr_exp_data.bit.HUB_RESET_N = 1; // reset high to run - SR_EXP_WriteData(); - - DBGC(DC_USB_RESET_COMPLETE); -} - -void USB_configure(void) { - Usb2422 *pusb2422 = &USB2422_shadow; - memset(pusb2422, 0, sizeof(Usb2422)); - - uint16_t *serial_use = (uint16_t *)SERNAME; // Default to use SERNAME from this file - uint8_t serial_length = sizeof(SERNAME) / sizeof(uint16_t); // Default to use SERNAME from this file -#ifndef MD_BOOTLOADER - uint32_t serial_ptrloc = (uint32_t)&_srom - 4; -#else // MD_BOOTLOADER - uint32_t serial_ptrloc = (uint32_t)&_erom - 4; -#endif // MD_BOOTLOADER - uint32_t serial_address = *(uint32_t *)serial_ptrloc; // Address of bootloader's serial number if available - - DBGC(DC_USB_CONFIGURE_BEGIN); - - if (serial_address != 0xFFFFFFFF && serial_address < serial_ptrloc) // Check for factory programmed serial address - { - if ((serial_address & 0xFF) % 4 == 0) // Check alignment - { - serial_use = (uint16_t *)(serial_address); - serial_length = 0; - while ((*(serial_use + serial_length) > 32 && *(serial_use + serial_length) < 127) && serial_length < BOOTLOADER_SERIAL_MAX_SIZE) { - serial_length++; - DBGC(DC_USB_CONFIGURE_GET_SERIAL); - } - } - } - - // configure Usb2422 registers - pusb2422->VID.reg = 0x04D8; // from Microchip 4/19/2018 - pusb2422->PID.reg = 0xEEC5; // from Microchip 4/19/2018 = Massdrop, Inc. USB Hub - pusb2422->DID.reg = 0x0101; // BCD 01.01 - pusb2422->CFG1.bit.SELF_BUS_PWR = 1; // self powered for now - pusb2422->CFG1.bit.HS_DISABLE = 1; // full or high speed - // pusb2422->CFG2.bit.COMPOUND = 0; // compound device - pusb2422->CFG3.bit.STRING_EN = 1; // strings enabled - // pusb2422->NRD.bit.PORT2_NR = 0; // MCU is non-removable - pusb2422->MAXPB.reg = 20; // 0mA - pusb2422->HCMCB.reg = 20; // 0mA - pusb2422->MFRSL.reg = sizeof(MFRNAME) / sizeof(uint16_t); - pusb2422->PRDSL.reg = sizeof(PRDNAME) / sizeof(uint16_t); - pusb2422->SERSL.reg = serial_length; - memcpy(pusb2422->MFRSTR, MFRNAME, sizeof(MFRNAME)); - memcpy(pusb2422->PRDSTR, PRDNAME, sizeof(PRDNAME)); - memcpy(pusb2422->SERSTR, serial_use, serial_length * sizeof(uint16_t)); - // pusb2422->BOOSTUP.bit.BOOST=3; //upstream port - // pusb2422->BOOSTDOWN.bit.BOOST1=0; // extra port - // pusb2422->BOOSTDOWN.bit.BOOST2=2; //MCU is close - pusb2422->STCD.bit.USB_ATTACH = 1; - USB_write2422_block(); - - adc_extra = 0; - - DBGC(DC_USB_CONFIGURE_COMPLETE); -} - -uint16_t USB_active(void) { return (PORT->Group[USB2422_HUB_ACTIVE_GROUP].IN.reg & (1 << USB2422_HUB_ACTIVE_PIN)) != 0; } - -void USB_set_host_by_voltage(void) { - // UP is upstream device (HOST) - // DN1 is downstream device (EXTRA) - // DN2 is keyboard (KEYB) - - DBGC(DC_USB_SET_HOST_BY_VOLTAGE_BEGIN); - - usb_host_port = USB_HOST_PORT_UNKNOWN; -#ifndef MD_BOOTLOADER - usb_extra_state = USB_EXTRA_STATE_UNKNOWN; -#endif // MD_BOOTLOADER - sr_exp_data.bit.SRC_1 = 1; // USBC-1 available for test - sr_exp_data.bit.SRC_2 = 1; // USBC-2 available for test - sr_exp_data.bit.E_UP_N = 1; // HOST disable - sr_exp_data.bit.E_DN1_N = 1; // EXTRA disable - sr_exp_data.bit.E_VBUS_1 = 0; // USBC-1 disable full power I/O - sr_exp_data.bit.E_VBUS_2 = 0; // USBC-2 disable full power I/O - - SR_EXP_WriteData(); - - wait_ms(250); - - while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { - DBGC(DC_USB_SET_HOST_5V_LOW_WAITING); - } - - v_con_1 = adc_get(ADC_CON1); - v_con_2 = adc_get(ADC_CON2); - - v_con_1_boot = v_con_1; - v_con_2_boot = v_con_2; - - if (v_con_1 > v_con_2) { - sr_exp_data.bit.S_UP = 0; // HOST to USBC-1 - sr_exp_data.bit.S_DN1 = 1; // EXTRA to USBC-2 - sr_exp_data.bit.SRC_1 = 1; // HOST on USBC-1 - sr_exp_data.bit.SRC_2 = 0; // EXTRA available on USBC-2 - - sr_exp_data.bit.E_VBUS_1 = 1; // USBC-1 enable full power I/O - sr_exp_data.bit.E_VBUS_2 = 0; // USBC-2 disable full power I/O - - SR_EXP_WriteData(); - - sr_exp_data.bit.E_UP_N = 0; // HOST enable - - SR_EXP_WriteData(); - - usb_host_port = USB_HOST_PORT_1; - } else { - sr_exp_data.bit.S_UP = 1; // EXTRA to USBC-1 - sr_exp_data.bit.S_DN1 = 0; // HOST to USBC-2 - sr_exp_data.bit.SRC_1 = 0; // EXTRA available on USBC-1 - sr_exp_data.bit.SRC_2 = 1; // HOST on USBC-2 - - sr_exp_data.bit.E_VBUS_1 = 0; // USBC-1 disable full power I/O - sr_exp_data.bit.E_VBUS_2 = 1; // USBC-2 enable full power I/O - - SR_EXP_WriteData(); - - sr_exp_data.bit.E_UP_N = 0; // HOST enable - - SR_EXP_WriteData(); - - usb_host_port = USB_HOST_PORT_2; - } - -#ifndef MD_BOOTLOADER - usb_extra_state = USB_EXTRA_STATE_DISABLED; -#endif // MD_BOOTLOADER - - USB_reset(); - USB_configure(); - - DBGC(DC_USB_SET_HOST_BY_VOLTAGE_COMPLETE); -} - -uint8_t USB2422_Port_Detect_Init(void) { - uint32_t port_detect_retry_ms; - uint32_t tmod; - - DBGC(DC_PORT_DETECT_INIT_BEGIN); - - USB_set_host_by_voltage(); - - port_detect_retry_ms = timer_read64() + PORT_DETECT_RETRY_INTERVAL; - - while (!USB_active()) { - tmod = timer_read64() % PORT_DETECT_RETRY_INTERVAL; - - if (v_con_1 > v_con_2) // Values updated from USB_set_host_by_voltage(); - { - // 1 flash for port 1 detected - if (tmod > 500 && tmod < 600) { - DBG_LED_ON; - } else { - DBG_LED_OFF; - } - } else if (v_con_2 > v_con_1) // Values updated from USB_set_host_by_voltage(); - { - // 2 flash for port 2 detected - if (tmod > 500 && tmod < 600) { - DBG_LED_ON; - } else if (tmod > 700 && tmod < 800) { - DBG_LED_ON; - } else { - DBG_LED_OFF; - } - } - - if (timer_read64() > port_detect_retry_ms) { - DBGC(DC_PORT_DETECT_INIT_FAILED); - return 0; - } - } - - DBGC(DC_PORT_DETECT_INIT_COMPLETE); - - return 1; -} - -#ifndef MD_BOOTLOADER - -void USB_ExtraSetState(uint8_t state) { - uint8_t state_save = state; - - if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) state = USB_EXTRA_STATE_DISABLED; - - if (usb_host_port == USB_HOST_PORT_1) - sr_exp_data.bit.E_VBUS_2 = state; - else if (usb_host_port == USB_HOST_PORT_2) - sr_exp_data.bit.E_VBUS_1 = state; - else - return; - - sr_exp_data.bit.E_DN1_N = !state; - SR_EXP_WriteData(); - - usb_extra_state = state_save; - - if (usb_extra_state == USB_EXTRA_STATE_ENABLED) - CDC_print("USB: Extra enabled\r\n"); - else if (usb_extra_state == USB_EXTRA_STATE_DISABLED) { - CDC_print("USB: Extra disabled\r\n"); -# ifdef USE_MASSDROP_CONFIGURATOR - if (led_animation_breathing) gcr_breathe = gcr_desired; -# endif - } else if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) - CDC_print("USB: Extra disabled until replug\r\n"); - else - CDC_print("USB: Extra state unknown\r\n"); -} - -void USB_HandleExtraDevice(void) { - uint16_t adcval; - - if (usb_host_port == USB_HOST_PORT_1) - adcval = adc_get(ADC_CON2); - else if (usb_host_port == USB_HOST_PORT_2) - adcval = adc_get(ADC_CON1); - else - return; - - adc_extra = adc_extra * 0.9 + adcval * 0.1; - - // Check for a forced disable state (such as overload prevention) - if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) { - // Detect unplug and reset state to disabled - if (adc_extra > USB_EXTRA_ADC_THRESHOLD) usb_extra_state = USB_EXTRA_STATE_DISABLED; - - return; // Return even if unplug detected - } - - if (usb_extra_manual) { - if (usb_extra_state == USB_EXTRA_STATE_DISABLED) USB_ExtraSetState(USB_EXTRA_STATE_ENABLED); - - return; - } - - // dpf("a %i %i\r\n",adcval, adc_extra); - if (usb_extra_state == USB_EXTRA_STATE_DISABLED && adc_extra < USB_EXTRA_ADC_THRESHOLD) - USB_ExtraSetState(USB_EXTRA_STATE_ENABLED); - else if (usb_extra_state == USB_EXTRA_STATE_ENABLED && adc_extra > USB_EXTRA_ADC_THRESHOLD) - USB_ExtraSetState(USB_EXTRA_STATE_DISABLED); -} - -#endif // MD_BOOTLOADER diff --git a/tmk_core/protocol/arm_atsam/usb/usb2422.h b/tmk_core/protocol/arm_atsam/usb/usb2422.h deleted file mode 100644 index b4830b5bc8f..00000000000 --- a/tmk_core/protocol/arm_atsam/usb/usb2422.h +++ /dev/null @@ -1,402 +0,0 @@ -/* -Copyright 2018 Massdrop Inc. - -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/>. -*/ - -#ifndef _USB2422_H_ -#define _USB2422_H_ - -#define REV_USB2422 0x100 - -#define USB2422_ADDR 0x58 // I2C device address, one instance - -#define USB2422_HUB_ACTIVE_GROUP 0 // PA -#define USB2422_HUB_ACTIVE_PIN 18 // 18 - -/* -------- USB2422_VID : (USB2422L Offset: 0x00) (R/W 16) Vendor ID -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint16_t VID_LSB : 8; - uint16_t VID_MSB : 8; - } bit; /*!< Structure used for bit access */ - uint16_t reg; /*!< Type used for register access */ -} USB2422_VID_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PID : (USB2422L Offset: 0x02) (R/W 16) Product ID -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint16_t PID_LSB : 8; - uint16_t PID_MSB : 8; - } bit; /*!< Structure used for bit access */ - uint16_t reg; /*!< Type used for register access */ -} USB2422_PID_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_DID : (USB2422L Offset: 0x04) (R/W 16) Device ID -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint16_t DID_LSB : 8; - uint16_t DID_MSB : 8; - } bit; /*!< Structure used for bit access */ - uint16_t reg; /*!< Type used for register access */ -} USB2422_DID_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_CFG1 : (USB2422L Offset: 0x06) (R/W 8) Configuration Data Byte 1-------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t PORT_PWR : 1; - uint8_t CURRENT_SNS : 2; - uint8_t EOP_DISABLE : 1; - uint8_t MTT_ENABLE : 1; - uint8_t HS_DISABLE : 1; - uint8_t : 1; - uint8_t SELF_BUS_PWR : 1; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_CFG1_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_CFG2 : (USB2422L Offset: 0x07) (R/W 8) Configuration Data Byte 2-------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 3; - uint8_t COMPOUND : 1; - uint8_t OC_TIMER : 2; - uint8_t : 1; - uint8_t DYNAMIC : 1; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_CFG2_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_CFG3 : (USB2422L Offset: 0x08) (R/W 16) Configuration Data Byte 3-------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t STRING_EN : 1; - uint8_t : 2; - uint8_t PRTMAP_EN : 1; - uint8_t : 4; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_CFG3_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_NRD : (USB2422L Offset: 0x09) (R/W 8) Non Removable Device -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 5; - uint8_t PORT2_NR : 1; - uint8_t PORT1_NR : 1; - uint8_t : 1; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_NRD_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PDS : (USB2422L Offset: 0x0A) (R/W 8) Port Diable for Self-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 1; - uint8_t PORT1_DIS : 1; - uint8_t PORT2_DIS : 1; - uint8_t : 5; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PDS_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PDB : (USB2422L Offset: 0x0B) (R/W 8) Port Diable for Bus-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 1; - uint8_t PORT1_DIS : 1; - uint8_t PORT2_DIS : 1; - uint8_t : 5; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PDB_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_MAXPS : (USB2422L Offset: 0x0C) (R/W 8) Max Power for Self-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t MAX_PWR_SP : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_MAXPS_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_MAXPB : (USB2422L Offset: 0x0D) (R/W 8) Max Power for Bus-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t MAX_PWR_BP : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_MAXPB_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_HCMCS : (USB2422L Offset: 0x0E) (R/W 8) Hub Controller Max Current for Self-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t HC_MAX_C_SP : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_HCMCS_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_HCMCB : (USB2422L Offset: 0x0F) (R/W 8) Hub Controller Max Current for Bus-Powered Operation -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t HC_MAX_C_BP : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_HCMCB_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PWRT : (USB2422L Offset: 0x10) (R/W 8) Power On Time -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t POWER_ON_TIME : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PWRT_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_LANGID LSB : (USB2422L Offset: 0x11) (R/W 16) Language ID -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t LANGID_LSB : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_LANGID_LSB_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_LANGID MSB : (USB2422L Offset: 0x12) (R/W 16) Language ID -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t LANGID_MSB : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_LANGID_MSB_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_MFRSL : (USB2422L Offset: 0x13) (R/W 8) Manufacturer String Length -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t MFR_STR_LEN : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_MFRSL_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PRDSL : (USB2422L Offset: 0x14) (R/W 8) Product String Length -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t PRD_STR_LEN : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PRDSL_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_SERSL : (USB2422L Offset: 0x15) (R/W 8) Serial String Length -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t SER_STR_LEN : 8; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_SERSL_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_MFRSTR : (USB2422L Offset: 0x16-53) (R/W 8) Maufacturer String -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef uint16_t USB2422_MFRSTR_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PRDSTR : (USB2422L Offset: 0x54-91) (R/W 8) Product String -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef uint16_t USB2422_PRDSTR_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_SERSTR : (USB2422L Offset: 0x92-CF) (R/W 8) Serial String -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef uint16_t USB2422_SERSTR_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_BCEN : (USB2422L Offset: 0xD0) (R/W 8) Battery Charging Enable -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 1; - uint8_t PORT1_BCE : 1; - uint8_t PORT2_BCE : 1; - uint8_t : 5; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_BCEN_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_BOOSTUP : (USB2422L Offset: 0xF6) (R/W 8) Boost Upstream -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t BOOST : 2; - uint8_t : 6; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_BOOSTUP_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_BOOSTDOWN : (USB2422L Offset: 0xF8) (R/W 8) Boost Downstream -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t BOOST1 : 2; - uint8_t BOOST2 : 2; - uint8_t : 4; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_BOOSTDOWN_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PRTSP : (USB2422L Offset: 0xFA) (R/W 8) Port Swap -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t : 1; - uint8_t PORT1_SP : 1; - uint8_t PORT2_SP : 1; - uint8_t : 5; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PRTSP_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/* -------- USB2422_PRTR12 : (USB2422L Offset: 0xFB) (R/W 8) Port 1/2 Remap -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t PORT1_REMAP : 4; - uint8_t PORT2_REMAP : 4; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_PRTR12_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ -#define USB2422_PRTR12_DISABLE 0 -#define USB2422_PRT12_P2TOL1 1 -#define USB2422_PRT12_P2XTOL2 2 -#define USB2422_PRT12_P1TOL1 1 -#define USB2422_PRT12_P1XTOL2 2 - -/* -------- USB2422_STCD : (USB2422L Offset: 0xFF) (R/W 8) Status Command -------- */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef union { - struct { - uint8_t USB_ATTACH : 1; - uint8_t RESET : 1; - uint8_t INTF_PWRDN : 1; - uint8_t : 5; - } bit; /*!< Structure used for bit access */ - uint8_t reg; /*!< Type used for register access */ -} USB2422_STCD_Type; -#endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */ - -/** \brief USB2422 device hardware registers */ -#if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) -typedef struct { - USB2422_VID_Type VID; /**< \brief Offset: 0x00*/ - USB2422_PID_Type PID; /**< \brief Offset: 0x02*/ - USB2422_DID_Type DID; /**< \brief Offset: 0x04*/ - USB2422_CFG1_Type CFG1; /**< \brief Offset: 0x06*/ - USB2422_CFG2_Type CFG2; /**< \brief Offset: 0x07*/ - USB2422_CFG3_Type CFG3; /**< \brief Offset: 0x08*/ - USB2422_NRD_Type NRD; /**< \brief Offset: 0x09*/ - USB2422_PDS_Type PDS; /**< \brief Offset: 0x0A*/ - USB2422_PDB_Type PDB; /**< \brief Offset: 0x0B*/ - USB2422_MAXPS_Type MAXPS; /**< \brief Offset: 0x0C*/ - USB2422_MAXPB_Type MAXPB; /**< \brief Offset: 0x0D*/ - USB2422_HCMCS_Type HCMCS; /**< \brief Offset: 0x0E*/ - USB2422_HCMCB_Type HCMCB; /**< \brief Offset: 0x0F*/ - USB2422_PWRT_Type PWRT; /**< \brief Offset: 0x10*/ - USB2422_LANGID_LSB_Type LANGID_LSB; /**< \brief Offset: 0x11*/ - USB2422_LANGID_MSB_Type LANGID_MSB; /**< \brief Offset: 0x12*/ - USB2422_MFRSL_Type MFRSL; /**< \brief Offset: 0x13*/ - USB2422_PRDSL_Type PRDSL; /**< \brief Offset: 0x14*/ - USB2422_SERSL_Type SERSL; /**< \brief Offset: 0x15*/ - USB2422_MFRSTR_Type MFRSTR[31]; /**< \brief Offset: 0x16*/ - USB2422_PRDSTR_Type PRDSTR[31]; /**< \brief Offset: 0x54*/ - USB2422_SERSTR_Type SERSTR[31]; /**< \brief Offset: 0x92*/ - USB2422_BCEN_Type BCEN; /**< \brief Offset: 0xD0*/ - uint8_t Reserved1[0x25]; - USB2422_BOOSTUP_Type BOOSTUP; /**< \brief Offset: 0xF6*/ - uint8_t Reserved2[0x1]; - USB2422_BOOSTDOWN_Type BOOSTDOWN; /**< \brief Offset: 0xF8*/ - uint8_t Reserved3[0x1]; - USB2422_PRTSP_Type PRTSP; /**< \brief Offset: 0xFA*/ - USB2422_PRTR12_Type PRTR12; /**< \brief Offset: 0xFB*/ - uint8_t Reserved4[0x3]; - USB2422_STCD_Type STCD; /**< \brief Offset: 0xFF*/ -} Usb2422; -#endif - -#define PORT_DETECT_RETRY_INTERVAL 2000 - -#define USB_EXTRA_ADC_THRESHOLD 900 - -#define USB_EXTRA_STATE_DISABLED 0 -#define USB_EXTRA_STATE_ENABLED 1 -#define USB_EXTRA_STATE_UNKNOWN 2 -#define USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG 3 - -#define USB_HOST_PORT_1 0 -#define USB_HOST_PORT_2 1 -#define USB_HOST_PORT_UNKNOWN 2 - -extern uint8_t usb_host_port; -extern uint8_t usb_extra_state; -extern uint8_t usb_extra_manual; -extern uint8_t usb_gcr_auto; - -void USB2422_init(void); -void USB_reset(void); -void USB_configure(void); -uint16_t USB_active(void); -void USB_set_host_by_voltage(void); -uint16_t adc_get(uint8_t muxpos); -uint8_t USB2422_Port_Detect_Init(void); -void USB_HandleExtraDevice(void); -void USB_ExtraSetState(uint8_t state); - -#endif //_USB2422_H_ diff --git a/tmk_core/protocol/arm_atsam/usb/usb_hub.c b/tmk_core/protocol/arm_atsam/usb/usb_hub.c new file mode 100644 index 00000000000..c5fd284aab7 --- /dev/null +++ b/tmk_core/protocol/arm_atsam/usb/usb_hub.c @@ -0,0 +1,340 @@ +/* +Copyright 2018 Massdrop Inc. + +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 "arm_atsam_protocol.h" +#include "drivers/usb2422.h" +#include <string.h> + +uint8_t usb_host_port; + +#ifndef MD_BOOTLOADER + +uint8_t usb_extra_state; +uint8_t usb_extra_manual; +uint8_t usb_gcr_auto; + +#endif // MD_BOOTLOADER + +uint16_t adc_extra; + +void USB_Hub_init(void) { + Gclk * pgclk = GCLK; + Mclk * pmclk = MCLK; + Port * pport = PORT; + Oscctrl *posc = OSCCTRL; + Usb * pusb = USB; + + DBGC(DC_USB2422_INIT_BEGIN); + + while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { + DBGC(DC_USB2422_INIT_WAIT_5V_LOW); + } + + // setup peripheral and synchronous bus clocks to USB + pgclk->PCHCTRL[10].bit.GEN = 0; + pgclk->PCHCTRL[10].bit.CHEN = 1; + pmclk->AHBMASK.bit.USB_ = 1; + pmclk->APBBMASK.bit.USB_ = 1; + + // setup port pins for D-, D+, and SOF_1KHZ + pport->Group[0].PMUX[12].reg = 0x77; // PA24, PA25, function column H for USB D-, D+ + pport->Group[0].PINCFG[24].bit.PMUXEN = 1; + pport->Group[0].PINCFG[25].bit.PMUXEN = 1; + pport->Group[1].PMUX[11].bit.PMUXE = 7; // PB22, function column H for USB SOF_1KHz output + pport->Group[1].PINCFG[22].bit.PMUXEN = 1; + + // configure and enable DFLL for USB clock recovery mode at 48MHz + posc->DFLLCTRLA.bit.ENABLE = 0; + while (posc->DFLLSYNC.bit.ENABLE) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DISABLING); + } + while (posc->DFLLSYNC.bit.DFLLCTRLB) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_1); + } + posc->DFLLCTRLB.bit.USBCRM = 1; + while (posc->DFLLSYNC.bit.DFLLCTRLB) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_2); + } + posc->DFLLCTRLB.bit.MODE = 1; + while (posc->DFLLSYNC.bit.DFLLCTRLB) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_3); + } + posc->DFLLCTRLB.bit.QLDIS = 0; + while (posc->DFLLSYNC.bit.DFLLCTRLB) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLCTRLB_4); + } + posc->DFLLCTRLB.bit.CCDIS = 1; + posc->DFLLMUL.bit.MUL = 0xBB80; // 4800 x 1KHz + while (posc->DFLLSYNC.bit.DFLLMUL) { + DBGC(DC_USB2422_INIT_OSC_SYNC_DFLLMUL); + } + posc->DFLLCTRLA.bit.ENABLE = 1; + while (posc->DFLLSYNC.bit.ENABLE) { + DBGC(DC_USB2422_INIT_OSC_SYNC_ENABLING); + } + + pusb->DEVICE.CTRLA.bit.SWRST = 1; + while (pusb->DEVICE.SYNCBUSY.bit.SWRST) { + DBGC(DC_USB2422_INIT_USB_SYNC_SWRST); + } + while (pusb->DEVICE.CTRLA.bit.SWRST) { + DBGC(DC_USB2422_INIT_USB_WAIT_SWRST); + } + // calibration from factory presets + pusb->DEVICE.PADCAL.bit.TRANSN = (USB_FUSES_TRANSN_ADDR >> USB_FUSES_TRANSN_Pos) & USB_FUSES_TRANSN_Msk; + pusb->DEVICE.PADCAL.bit.TRANSP = (USB_FUSES_TRANSP_ADDR >> USB_FUSES_TRANSP_Pos) & USB_FUSES_TRANSP_Msk; + pusb->DEVICE.PADCAL.bit.TRIM = (USB_FUSES_TRIM_ADDR >> USB_FUSES_TRIM_Pos) & USB_FUSES_TRIM_Msk; + // device mode, enabled + pusb->DEVICE.CTRLB.bit.SPDCONF = 0; // full speed + pusb->DEVICE.CTRLA.bit.MODE = 0; + pusb->DEVICE.CTRLA.bit.ENABLE = 1; + while (pusb->DEVICE.SYNCBUSY.bit.ENABLE) { + DBGC(DC_USB2422_INIT_USB_SYNC_ENABLING); + } + + pusb->DEVICE.QOSCTRL.bit.DQOS = 2; + pusb->DEVICE.QOSCTRL.bit.CQOS = 2; + + USB2422_init(); + + sr_exp_data.bit.HUB_CONNECT = 1; // connect signal + sr_exp_data.bit.HUB_RESET_N = 1; // reset high + SR_EXP_WriteData(); + + wait_us(100); + +#ifndef MD_BOOTLOADER + + usb_extra_manual = 0; + usb_gcr_auto = 1; + +#endif // MD_BOOTLOADER + + DBGC(DC_USB2422_INIT_COMPLETE); +} + +void USB_reset(void) { + DBGC(DC_USB_RESET_BEGIN); + + // pulse reset for at least 1 usec + sr_exp_data.bit.HUB_RESET_N = 0; // reset low + SR_EXP_WriteData(); + wait_us(2); + sr_exp_data.bit.HUB_RESET_N = 1; // reset high to run + SR_EXP_WriteData(); + + DBGC(DC_USB_RESET_COMPLETE); +} + +void USB_configure(void) { + DBGC(DC_USB_CONFIGURE_BEGIN); + + USB2422_configure(); + + adc_extra = 0; + + DBGC(DC_USB_CONFIGURE_COMPLETE); +} + +uint16_t USB_active(void) { return USB2422_active(); } + +void USB_set_host_by_voltage(void) { + // UP is upstream device (HOST) + // DN1 is downstream device (EXTRA) + // DN2 is keyboard (KEYB) + + DBGC(DC_USB_SET_HOST_BY_VOLTAGE_BEGIN); + + usb_host_port = USB_HOST_PORT_UNKNOWN; +#ifndef MD_BOOTLOADER + usb_extra_state = USB_EXTRA_STATE_UNKNOWN; +#endif // MD_BOOTLOADER + sr_exp_data.bit.SRC_1 = 1; // USBC-1 available for test + sr_exp_data.bit.SRC_2 = 1; // USBC-2 available for test + sr_exp_data.bit.E_UP_N = 1; // HOST disable + sr_exp_data.bit.E_DN1_N = 1; // EXTRA disable + sr_exp_data.bit.E_VBUS_1 = 0; // USBC-1 disable full power I/O + sr_exp_data.bit.E_VBUS_2 = 0; // USBC-2 disable full power I/O + + SR_EXP_WriteData(); + + wait_ms(250); + + while ((v_5v = adc_get(ADC_5V)) < ADC_5V_START_LEVEL) { + DBGC(DC_USB_SET_HOST_5V_LOW_WAITING); + } + + v_con_1 = adc_get(ADC_CON1); + v_con_2 = adc_get(ADC_CON2); + + v_con_1_boot = v_con_1; + v_con_2_boot = v_con_2; + + if (v_con_1 > v_con_2) { + sr_exp_data.bit.S_UP = 0; // HOST to USBC-1 + sr_exp_data.bit.S_DN1 = 1; // EXTRA to USBC-2 + sr_exp_data.bit.SRC_1 = 1; // HOST on USBC-1 + sr_exp_data.bit.SRC_2 = 0; // EXTRA available on USBC-2 + + sr_exp_data.bit.E_VBUS_1 = 1; // USBC-1 enable full power I/O + sr_exp_data.bit.E_VBUS_2 = 0; // USBC-2 disable full power I/O + + SR_EXP_WriteData(); + + sr_exp_data.bit.E_UP_N = 0; // HOST enable + + SR_EXP_WriteData(); + + usb_host_port = USB_HOST_PORT_1; + } else { + sr_exp_data.bit.S_UP = 1; // EXTRA to USBC-1 + sr_exp_data.bit.S_DN1 = 0; // HOST to USBC-2 + sr_exp_data.bit.SRC_1 = 0; // EXTRA available on USBC-1 + sr_exp_data.bit.SRC_2 = 1; // HOST on USBC-2 + + sr_exp_data.bit.E_VBUS_1 = 0; // USBC-1 disable full power I/O + sr_exp_data.bit.E_VBUS_2 = 1; // USBC-2 enable full power I/O + + SR_EXP_WriteData(); + + sr_exp_data.bit.E_UP_N = 0; // HOST enable + + SR_EXP_WriteData(); + + usb_host_port = USB_HOST_PORT_2; + } + +#ifndef MD_BOOTLOADER + usb_extra_state = USB_EXTRA_STATE_DISABLED; +#endif // MD_BOOTLOADER + + USB_reset(); + USB_configure(); + + DBGC(DC_USB_SET_HOST_BY_VOLTAGE_COMPLETE); +} + +uint8_t USB_Hub_Port_Detect_Init(void) { + uint32_t port_detect_retry_ms; + uint32_t tmod; + + DBGC(DC_PORT_DETECT_INIT_BEGIN); + + USB_set_host_by_voltage(); + + port_detect_retry_ms = timer_read64() + PORT_DETECT_RETRY_INTERVAL; + + while (!USB_active()) { + tmod = timer_read64() % PORT_DETECT_RETRY_INTERVAL; + + if (v_con_1 > v_con_2) // Values updated from USB_set_host_by_voltage(); + { + // 1 flash for port 1 detected + if (tmod > 500 && tmod < 600) { + DBG_LED_ON; + } else { + DBG_LED_OFF; + } + } else if (v_con_2 > v_con_1) // Values updated from USB_set_host_by_voltage(); + { + // 2 flash for port 2 detected + if (tmod > 500 && tmod < 600) { + DBG_LED_ON; + } else if (tmod > 700 && tmod < 800) { + DBG_LED_ON; + } else { + DBG_LED_OFF; + } + } + + if (timer_read64() > port_detect_retry_ms) { + DBGC(DC_PORT_DETECT_INIT_FAILED); + return 0; + } + } + + DBGC(DC_PORT_DETECT_INIT_COMPLETE); + + return 1; +} + +#ifndef MD_BOOTLOADER + +void USB_ExtraSetState(uint8_t state) { + uint8_t state_save = state; + + if (state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) state = USB_EXTRA_STATE_DISABLED; + + if (usb_host_port == USB_HOST_PORT_1) + sr_exp_data.bit.E_VBUS_2 = state; + else if (usb_host_port == USB_HOST_PORT_2) + sr_exp_data.bit.E_VBUS_1 = state; + else + return; + + sr_exp_data.bit.E_DN1_N = !state; + SR_EXP_WriteData(); + + usb_extra_state = state_save; + + if (usb_extra_state == USB_EXTRA_STATE_ENABLED) + CDC_print("USB: Extra enabled\r\n"); + else if (usb_extra_state == USB_EXTRA_STATE_DISABLED) { + CDC_print("USB: Extra disabled\r\n"); +# ifdef USE_MASSDROP_CONFIGURATOR + if (led_animation_breathing) gcr_breathe = gcr_desired; +# endif + } else if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) + CDC_print("USB: Extra disabled until replug\r\n"); + else + CDC_print("USB: Extra state unknown\r\n"); +} + +void USB_HandleExtraDevice(void) { + uint16_t adcval; + + if (usb_host_port == USB_HOST_PORT_1) + adcval = adc_get(ADC_CON2); + else if (usb_host_port == USB_HOST_PORT_2) + adcval = adc_get(ADC_CON1); + else + return; + + adc_extra = adc_extra * 0.9 + adcval * 0.1; + + // Check for a forced disable state (such as overload prevention) + if (usb_extra_state == USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG) { + // Detect unplug and reset state to disabled + if (adc_extra > USB_EXTRA_ADC_THRESHOLD) usb_extra_state = USB_EXTRA_STATE_DISABLED; + + return; // Return even if unplug detected + } + + if (usb_extra_manual) { + if (usb_extra_state == USB_EXTRA_STATE_DISABLED) USB_ExtraSetState(USB_EXTRA_STATE_ENABLED); + + return; + } + + // dpf("a %i %i\r\n",adcval, adc_extra); + if (usb_extra_state == USB_EXTRA_STATE_DISABLED && adc_extra < USB_EXTRA_ADC_THRESHOLD) + USB_ExtraSetState(USB_EXTRA_STATE_ENABLED); + else if (usb_extra_state == USB_EXTRA_STATE_ENABLED && adc_extra > USB_EXTRA_ADC_THRESHOLD) + USB_ExtraSetState(USB_EXTRA_STATE_DISABLED); +} + +#endif // MD_BOOTLOADER diff --git a/tmk_core/protocol/arm_atsam/usb/usb_hub.h b/tmk_core/protocol/arm_atsam/usb/usb_hub.h new file mode 100644 index 00000000000..76b1e0a3263 --- /dev/null +++ b/tmk_core/protocol/arm_atsam/usb/usb_hub.h @@ -0,0 +1,51 @@ +/* +Copyright 2018 Massdrop Inc. + +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/>. +*/ + +#ifndef _USB2422_H_ +#define _USB2422_H_ + +#define REV_USB2422 0x100 + +#define PORT_DETECT_RETRY_INTERVAL 2000 + +#define USB_EXTRA_ADC_THRESHOLD 900 + +#define USB_EXTRA_STATE_DISABLED 0 +#define USB_EXTRA_STATE_ENABLED 1 +#define USB_EXTRA_STATE_UNKNOWN 2 +#define USB_EXTRA_STATE_DISABLED_UNTIL_REPLUG 3 + +#define USB_HOST_PORT_1 0 +#define USB_HOST_PORT_2 1 +#define USB_HOST_PORT_UNKNOWN 2 + +extern uint8_t usb_host_port; +extern uint8_t usb_extra_state; +extern uint8_t usb_extra_manual; +extern uint8_t usb_gcr_auto; + +void USB_Hub_init(void); +uint8_t USB_Hub_Port_Detect_Init(void); +void USB_reset(void); +void USB_configure(void); +uint16_t USB_active(void); +void USB_set_host_by_voltage(void); +uint16_t adc_get(uint8_t muxpos); +void USB_HandleExtraDevice(void); +void USB_ExtraSetState(uint8_t state); + +#endif //_USB2422_H_ diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index 78a2e3fcbbc..41752b21304 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -27,6 +27,7 @@ #include "keyboard.h" #include "action.h" #include "action_util.h" +#include "usb_device_state.h" #include "mousekey.h" #include "led.h" #include "sendchar.h" @@ -42,12 +43,6 @@ #ifdef SLEEP_LED_ENABLE # include "sleep_led.h" #endif -#ifdef SERIAL_LINK_ENABLE -# include "serial_link/system/serial_link.h" -#endif -#ifdef VISUALIZER_ENABLE -# include "visualizer/visualizer.h" -#endif #ifdef MIDI_ENABLE # include "qmk_midi.h" #endif @@ -139,13 +134,15 @@ void boardInit(void) { } void protocol_setup(void) { + usb_device_state_init(); + // TESTING // chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL); - - keyboard_setup(); } -void protocol_init(void) { +static host_driver_t *driver = NULL; + +void protocol_pre_init(void) { /* Init USB */ usb_event_queue_init(); init_usb_driver(&USB_DRIVER); @@ -154,19 +151,9 @@ void protocol_init(void) { setup_midi(); #endif -#ifdef SERIAL_LINK_ENABLE - init_serial_link(); -#endif - -#ifdef VISUALIZER_ENABLE - visualizer_init(); -#endif - - host_driver_t *driver = NULL; - - /* Wait until the USB or serial link is active */ + /* Wait until USB is active */ while (true) { -#if defined(WAIT_FOR_USB) || defined(SERIAL_LINK_ENABLE) +#if defined(WAIT_FOR_USB) if (USB_DRIVER.state == USB_ACTIVE) { driver = &chibios_driver; break; @@ -174,13 +161,6 @@ void protocol_init(void) { #else driver = &chibios_driver; break; -#endif -#ifdef SERIAL_LINK_ENABLE - if (is_serial_link_connected()) { - driver = get_serial_link_driver(); - break; - } - serial_link_update(); #endif wait_ms(50); } @@ -193,32 +173,18 @@ void protocol_init(void) { wait_ms(50); print("USB configured.\n"); - - /* init TMK modules */ - keyboard_init(); - host_set_driver(driver); - -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - - print("Keyboard start.\n"); } -void protocol_task(void) { +void protocol_post_init(void) { host_set_driver(driver); } + +void protocol_pre_task(void) { usb_event_queue_task(); #if !defined(NO_USB_STARTUP_CHECK) if (USB_DRIVER.state == USB_SUSPENDED) { print("[s]"); -# ifdef VISUALIZER_ENABLE - visualizer_suspend(); -# endif while (USB_DRIVER.state == USB_SUSPENDED) { /* Do this in the suspended state */ -# ifdef SERIAL_LINK_ENABLE - serial_link_update(); -# endif suspend_power_down(); // on AVR this deep sleeps for 15ms /* Remote wakeup */ if (suspend_wakeup_condition()) { @@ -232,14 +198,11 @@ void protocol_task(void) { # ifdef MOUSEKEY_ENABLE mousekey_send(); # endif /* MOUSEKEY_ENABLE */ - -# ifdef VISUALIZER_ENABLE - visualizer_resume(); -# endif } #endif +} - keyboard_task(); +void protocol_post_task(void) { #ifdef CONSOLE_ENABLE console_task(); #endif diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index 04049c1a9a3..a7db3e3ab12 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -39,6 +39,7 @@ # include "led.h" #endif #include "wait.h" +#include "usb_device_state.h" #include "usb_descriptor.h" #include "usb_driver.h" @@ -70,7 +71,12 @@ uint8_t keyboard_protocol __attribute__((aligned(2))) = 1; uint8_t keyboard_led_state = 0; volatile uint16_t keyboard_idle_count = 0; static virtual_timer_t keyboard_idle_timer; -static void keyboard_idle_timer_cb(void *arg); + +#if CH_KERNEL_MAJOR >= 7 +static void keyboard_idle_timer_cb(struct ch_virtual_timer *, void *arg); +#elif CH_KERNEL_MAJOR <= 6 +static void keyboard_idle_timer_cb(void *arg); +#endif report_keyboard_t keyboard_report_sent = {{0}}; #ifdef MOUSE_ENABLE @@ -412,6 +418,7 @@ static inline bool usb_event_queue_dequeue(usbevent_t *event) { } static inline void usb_event_suspend_handler(void) { + usb_device_state_set_suspend(USB_DRIVER.configuration != 0, USB_DRIVER.configuration); #ifdef SLEEP_LED_ENABLE sleep_led_enable(); #endif /* SLEEP_LED_ENABLE */ @@ -419,6 +426,7 @@ static inline void usb_event_suspend_handler(void) { static inline void usb_event_wakeup_handler(void) { suspend_wakeup_init(); + usb_device_state_set_resume(USB_DRIVER.configuration != 0, USB_DRIVER.configuration); #ifdef SLEEP_LED_ENABLE sleep_led_disable(); // NOTE: converters may not accept this @@ -440,6 +448,15 @@ void usb_event_queue_task(void) { last_suspend_state = false; usb_event_wakeup_handler(); break; + case USB_EVENT_CONFIGURED: + usb_device_state_set_configuration(USB_DRIVER.configuration != 0, USB_DRIVER.configuration); + break; + case USB_EVENT_UNCONFIGURED: + usb_device_state_set_configuration(false, 0); + break; + case USB_EVENT_RESET: + usb_device_state_set_reset(); + break; default: // Nothing to do, we don't handle it. break; @@ -482,13 +499,14 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) { if (last_suspend_state) { usb_event_queue_enqueue(USB_EVENT_WAKEUP); } + usb_event_queue_enqueue(USB_EVENT_CONFIGURED); return; case USB_EVENT_SUSPEND: - usb_event_queue_enqueue(USB_EVENT_SUSPEND); /* Falls into.*/ case USB_EVENT_UNCONFIGURED: /* Falls into.*/ case USB_EVENT_RESET: + usb_event_queue_enqueue(event); for (int i = 0; i < NUM_USB_DRIVERS; i++) { chSysLockFromISR(); /* Disconnection event on suspend.*/ @@ -761,7 +779,12 @@ void kbd_sof_cb(USBDriver *usbp) { (void)usbp; } /* Idle requests timer code * callback (called from ISR, unlocked state) */ +#if CH_KERNEL_MAJOR >= 7 +static void keyboard_idle_timer_cb(struct ch_virtual_timer *timer, void *arg) { + (void)timer; +#elif CH_KERNEL_MAJOR <= 6 static void keyboard_idle_timer_cb(void *arg) { +#endif USBDriver *usbp = (USBDriver *)arg; osalSysLockFromISR(); diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c new file mode 100644 index 00000000000..56d4bb08471 --- /dev/null +++ b/tmk_core/protocol/host.c @@ -0,0 +1,138 @@ +/* +Copyright 2011,2012 Jun Wako <wakojun@gmail.com> + +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 <stdint.h> +//#include <avr/interrupt.h> +#include "keyboard.h" +#include "keycode.h" +#include "host.h" +#include "util.h" +#include "debug.h" +#include "digitizer.h" + +#ifdef NKRO_ENABLE +# include "keycode_config.h" +extern keymap_config_t keymap_config; +#endif + +static host_driver_t *driver; +static uint16_t last_system_report = 0; +static uint16_t last_consumer_report = 0; +static uint32_t last_programmable_button_report = 0; + +void host_set_driver(host_driver_t *d) { driver = d; } + +host_driver_t *host_get_driver(void) { return driver; } + +#ifdef SPLIT_KEYBOARD +uint8_t split_led_state = 0; +void set_split_host_keyboard_leds(uint8_t led_state) { split_led_state = led_state; } +#endif + +uint8_t host_keyboard_leds(void) { +#ifdef SPLIT_KEYBOARD + if (!is_keyboard_master()) return split_led_state; +#endif + if (!driver) return 0; + return (*driver->keyboard_leds)(); +} + +led_t host_keyboard_led_state(void) { return (led_t)host_keyboard_leds(); } + +/* send report */ +void host_keyboard_send(report_keyboard_t *report) { + if (!driver) return; +#if defined(NKRO_ENABLE) && defined(NKRO_SHARED_EP) + if (keyboard_protocol && keymap_config.nkro) { + /* The callers of this function assume that report->mods is where mods go in. + * But report->nkro.mods can be at a different offset if core keyboard does not have a report ID. + */ + report->nkro.mods = report->mods; + report->nkro.report_id = REPORT_ID_NKRO; + } else +#endif + { +#ifdef KEYBOARD_SHARED_EP + report->report_id = REPORT_ID_KEYBOARD; +#endif + } + (*driver->send_keyboard)(report); + + if (debug_keyboard) { + dprint("keyboard_report: "); + for (uint8_t i = 0; i < KEYBOARD_REPORT_SIZE; i++) { + dprintf("%02X ", report->raw[i]); + } + dprint("\n"); + } +} + +void host_mouse_send(report_mouse_t *report) { + if (!driver) return; +#ifdef MOUSE_SHARED_EP + report->report_id = REPORT_ID_MOUSE; +#endif + (*driver->send_mouse)(report); +} + +void host_system_send(uint16_t report) { + if (report == last_system_report) return; + last_system_report = report; + + if (!driver) return; + (*driver->send_system)(report); +} + +void host_consumer_send(uint16_t report) { + if (report == last_consumer_report) return; + last_consumer_report = report; + + if (!driver) return; + (*driver->send_consumer)(report); +} + +void host_digitizer_send(digitizer_t *digitizer) { + if (!driver) return; + + report_digitizer_t report = { +#ifdef DIGITIZER_SHARED_EP + .report_id = REPORT_ID_DIGITIZER, +#endif + .tip = digitizer->tipswitch & 0x1, + .inrange = digitizer->inrange & 0x1, + .x = (uint16_t)(digitizer->x * 0x7FFF), + .y = (uint16_t)(digitizer->y * 0x7FFF), + }; + + send_digitizer(&report); +} + +__attribute__((weak)) void send_digitizer(report_digitizer_t *report) {} + +void host_programmable_button_send(uint32_t report) { + if (report == last_programmable_button_report) return; + last_programmable_button_report = report; + + if (!driver) return; + (*driver->send_programmable_button)(report); +} + +uint16_t host_last_system_report(void) { return last_system_report; } + +uint16_t host_last_consumer_report(void) { return last_consumer_report; } + +uint32_t host_last_programmable_button_report(void) { return last_programmable_button_report; } diff --git a/tmk_core/protocol/host.h b/tmk_core/protocol/host.h new file mode 100644 index 00000000000..6b15f0d0c10 --- /dev/null +++ b/tmk_core/protocol/host.h @@ -0,0 +1,58 @@ +/* +Copyright 2011 Jun Wako <wakojun@gmail.com> + +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/>. +*/ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include "report.h" +#include "host_driver.h" +#include "led.h" + +#define IS_LED_ON(leds, led_name) ((leds) & (1 << (led_name))) +#define IS_LED_OFF(leds, led_name) (~(leds) & (1 << (led_name))) + +#define IS_HOST_LED_ON(led_name) IS_LED_ON(host_keyboard_leds(), led_name) +#define IS_HOST_LED_OFF(led_name) IS_LED_OFF(host_keyboard_leds(), led_name) + +#ifdef __cplusplus +extern "C" { +#endif + +extern uint8_t keyboard_idle; +extern uint8_t keyboard_protocol; + +/* host driver */ +void host_set_driver(host_driver_t *driver); +host_driver_t *host_get_driver(void); + +/* host driver interface */ +uint8_t host_keyboard_leds(void); +led_t host_keyboard_led_state(void); +void host_keyboard_send(report_keyboard_t *report); +void host_mouse_send(report_mouse_t *report); +void host_system_send(uint16_t data); +void host_consumer_send(uint16_t data); +void host_programmable_button_send(uint32_t data); + +uint16_t host_last_system_report(void); +uint16_t host_last_consumer_report(void); +uint32_t host_last_programmable_button_report(void); + +#ifdef __cplusplus +} +#endif diff --git a/tmk_core/protocol/host_driver.h b/tmk_core/protocol/host_driver.h new file mode 100644 index 00000000000..affd0dcb348 --- /dev/null +++ b/tmk_core/protocol/host_driver.h @@ -0,0 +1,35 @@ +/* +Copyright 2011 Jun Wako <wakojun@gmail.com> + +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/>. +*/ + +#pragma once + +#include <stdint.h> +#include "report.h" +#ifdef MIDI_ENABLE +# include "midi.h" +#endif + +typedef struct { + uint8_t (*keyboard_leds)(void); + void (*send_keyboard)(report_keyboard_t *); + void (*send_mouse)(report_mouse_t *); + void (*send_system)(uint16_t); + void (*send_consumer)(uint16_t); + void (*send_programmable_button)(uint32_t); +} host_driver_t; + +void send_digitizer(report_digitizer_t *report); \ No newline at end of file diff --git a/tmk_core/protocol/ibm4704.c b/tmk_core/protocol/ibm4704.c deleted file mode 100644 index a19443976e3..00000000000 --- a/tmk_core/protocol/ibm4704.c +++ /dev/null @@ -1,185 +0,0 @@ -/* -Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com> -*/ -#include <stdbool.h> -#include <util/delay.h> -#include "debug.h" -#include "ring_buffer.h" -#include "ibm4704.h" - -#define WAIT(stat, us, err) \ - do { \ - if (!wait_##stat(us)) { \ - ibm4704_error = err; \ - goto ERROR; \ - } \ - } while (0) - -uint8_t ibm4704_error = 0; - -void ibm4704_init(void) { - inhibit(); // keep keyboard from sending - IBM4704_INT_INIT(); - IBM4704_INT_ON(); - idle(); // allow keyboard sending -} - -/* -Host to Keyboard ----------------- -Data bits are LSB first and Parity is odd. Clock has around 60us high and 30us low part. - - ____ __ __ __ __ __ __ __ __ __ ________ -Clock \______/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ - ^ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ___ -Data ____|__/ X____X____X____X____X____X____X____X____X____X \___ - | Start 0 1 2 3 4 5 6 7 P Stop - Request by host - -Start bit: can be long as 300-350us. -Request: Host pulls Clock line down to request to send a command. -Timing: After Request keyboard pull up Data and down Clock line to low for start bit. - After request host release Clock line once Data line becomes hi. - Host writes a bit while Clock is hi and Keyboard reads while low. -Stop bit: Host releases or pulls up Data line to hi after 9th clock and waits for keyboard pull down the line to lo. -*/ -uint8_t ibm4704_send(uint8_t data) { - bool parity = true; // odd parity - ibm4704_error = 0; - - IBM4704_INT_OFF(); - - /* Request to send */ - idle(); - clock_lo(); - - /* wait for Start bit(Clock:lo/Data:hi) */ - WAIT(data_hi, 300, 0x30); - - /* Data bit */ - for (uint8_t i = 0; i < 8; i++) { - WAIT(clock_hi, 100, 0x40 + i); - if (data & (1 << i)) { - parity = !parity; - data_hi(); - } else { - data_lo(); - } - WAIT(clock_lo, 100, 0x48 + i); - } - - /* Parity bit */ - WAIT(clock_hi, 100, 0x34); - if (parity) { - data_hi(); - } else { - data_lo(); - } - WAIT(clock_lo, 100, 0x35); - - /* Stop bit */ - WAIT(clock_hi, 100, 0x34); - data_hi(); - - /* End */ - WAIT(data_lo, 100, 0x36); - - idle(); - IBM4704_INT_ON(); - return 0; -ERROR: - idle(); - if (ibm4704_error > 0x30) { - xprintf("S:%02X ", ibm4704_error); - } - IBM4704_INT_ON(); - return -1; -} - -/* wait forever to receive data */ -uint8_t ibm4704_recv_response(void) { - while (!rbuf_has_data()) { - _delay_ms(1); - } - return rbuf_dequeue(); -} - -uint8_t ibm4704_recv(void) { - if (rbuf_has_data()) { - return rbuf_dequeue(); - } else { - return -1; - } -} - -/* -Keyboard to Host ----------------- -Data bits are LSB first and Parity is odd. Clock has around 60us high and 30us low part. - - ____ __ __ __ __ __ __ __ __ __ _______ -Clock \_____/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ - ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ -Data ____/ X____X____X____X____X____X____X____X____X____X________ - Start 0 1 2 3 4 5 6 7 P Stop - -Start bit: can be long as 300-350us. -Inhibit: Pull Data line down to inhibit keyboard to send. -Timing: Host reads bit while Clock is hi.(rising edge) -Stop bit: Keyboard pulls down Data line to lo after 9th clock. -*/ -ISR(IBM4704_INT_VECT) { - static enum { BIT0, BIT1, BIT2, BIT3, BIT4, BIT5, BIT6, BIT7, PARITY, STOP } state = BIT0; - // LSB first - static uint8_t data = 0; - // Odd parity - static uint8_t parity = false; - - ibm4704_error = 0; - - switch (state) { - case BIT0: - case BIT1: - case BIT2: - case BIT3: - case BIT4: - case BIT5: - case BIT6: - case BIT7: - data >>= 1; - if (data_in()) { - data |= 0x80; - parity = !parity; - } - break; - case PARITY: - if (data_in()) { - parity = !parity; - } - if (!parity) goto ERROR; - break; - case STOP: - // Data:Low - WAIT(data_lo, 100, state); - if (!rbuf_enqueue(data)) { - print("rbuf: full\n"); - } - ibm4704_error = IBM4704_ERR_NONE; - goto DONE; - break; - default: - goto ERROR; - } - state++; - goto RETURN; -ERROR: - ibm4704_error = state; - while (ibm4704_send(0xFE)) _delay_ms(1); // resend - xprintf("R:%02X%02X\n", state, data); -DONE: - state = BIT0; - data = 0; - parity = false; -RETURN: - return; -} diff --git a/tmk_core/protocol/ibm4704.h b/tmk_core/protocol/ibm4704.h deleted file mode 100644 index 4f88d148b3e..00000000000 --- a/tmk_core/protocol/ibm4704.h +++ /dev/null @@ -1,103 +0,0 @@ -/* -Copyright 2014 Jun WAKO <wakojun@gmail.com> -*/ - -#pragma once - -#define IBM4704_ERR_NONE 0 -#define IBM4704_ERR_PARITY 0x70 - -void ibm4704_init(void); -uint8_t ibm4704_send(uint8_t data); -uint8_t ibm4704_recv_response(void); -uint8_t ibm4704_recv(void); - -/* Check pin configuration */ -#if !(defined(IBM4704_CLOCK_PORT) && defined(IBM4704_CLOCK_PIN) && defined(IBM4704_CLOCK_DDR) && defined(IBM4704_CLOCK_BIT)) -# error "ibm4704 clock pin configuration is required in config.h" -#endif - -#if !(defined(IBM4704_DATA_PORT) && defined(IBM4704_DATA_PIN) && defined(IBM4704_DATA_DDR) && defined(IBM4704_DATA_BIT)) -# error "ibm4704 data pin configuration is required in config.h" -#endif - -/*-------------------------------------------------------------------- - * static functions - *------------------------------------------------------------------*/ -static inline void clock_lo(void) { - IBM4704_CLOCK_PORT &= ~(1 << IBM4704_CLOCK_BIT); - IBM4704_CLOCK_DDR |= (1 << IBM4704_CLOCK_BIT); -} -static inline void clock_hi(void) { - /* input with pull up */ - IBM4704_CLOCK_DDR &= ~(1 << IBM4704_CLOCK_BIT); - IBM4704_CLOCK_PORT |= (1 << IBM4704_CLOCK_BIT); -} -static inline bool clock_in(void) { - IBM4704_CLOCK_DDR &= ~(1 << IBM4704_CLOCK_BIT); - IBM4704_CLOCK_PORT |= (1 << IBM4704_CLOCK_BIT); - _delay_us(1); - return IBM4704_CLOCK_PIN & (1 << IBM4704_CLOCK_BIT); -} -static inline void data_lo(void) { - IBM4704_DATA_PORT &= ~(1 << IBM4704_DATA_BIT); - IBM4704_DATA_DDR |= (1 << IBM4704_DATA_BIT); -} -static inline void data_hi(void) { - /* input with pull up */ - IBM4704_DATA_DDR &= ~(1 << IBM4704_DATA_BIT); - IBM4704_DATA_PORT |= (1 << IBM4704_DATA_BIT); -} -static inline bool data_in(void) { - IBM4704_DATA_DDR &= ~(1 << IBM4704_DATA_BIT); - IBM4704_DATA_PORT |= (1 << IBM4704_DATA_BIT); - _delay_us(1); - return IBM4704_DATA_PIN & (1 << IBM4704_DATA_BIT); -} - -static inline uint16_t wait_clock_lo(uint16_t us) { - while (clock_in() && us) { - asm(""); - _delay_us(1); - us--; - } - return us; -} -static inline uint16_t wait_clock_hi(uint16_t us) { - while (!clock_in() && us) { - asm(""); - _delay_us(1); - us--; - } - return us; -} -static inline uint16_t wait_data_lo(uint16_t us) { - while (data_in() && us) { - asm(""); - _delay_us(1); - us--; - } - return us; -} -static inline uint16_t wait_data_hi(uint16_t us) { - while (!data_in() && us) { - asm(""); - _delay_us(1); - us--; - } - return us; -} - -/* idle state that device can send */ -static inline void idle(void) { - clock_hi(); - data_hi(); -} - -/* inhibit device to send - * keyboard checks Data line on start bit(Data:hi) and it stops sending if Data line is low. - */ -static inline void inhibit(void) { - clock_hi(); - data_lo(); -} diff --git a/tmk_core/protocol/lufa.mk b/tmk_core/protocol/lufa.mk index c8935dacb76..00fec478acf 100644 --- a/tmk_core/protocol/lufa.mk +++ b/tmk_core/protocol/lufa.mk @@ -3,7 +3,6 @@ LUFA_DIR = protocol/lufa # Path to the LUFA library LUFA_PATH = $(LIB_PATH)/lufa - # Create the LUFA source path variables by including the LUFA makefile ifneq (, $(wildcard $(LUFA_PATH)/LUFA/Build/lufa_sources.mk)) # New build system from 20120730 @@ -22,23 +21,6 @@ ifeq ($(strip $(MIDI_ENABLE)), yes) include $(TMK_PATH)/protocol/midi.mk endif -ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) - LUFA_SRC += outputselect.c \ - $(TMK_DIR)/protocol/serial_uart.c -endif - -ifeq ($(strip $(BLUETOOTH)), AdafruitBLE) - LUFA_SRC += spi_master.c \ - analog.c \ - outputselect.c \ - $(LUFA_DIR)/adafruit_ble.cpp -endif - -ifeq ($(strip $(BLUETOOTH)), RN42) - LUFA_SRC += outputselect.c \ - $(TMK_DIR)/protocol/serial_uart.c -endif - ifeq ($(strip $(VIRTSER_ENABLE)), yes) LUFA_SRC += $(LUFA_ROOT_PATH)/Drivers/USB/Class/Device/CDCClassDevice.c endif @@ -50,19 +32,10 @@ SRC += $(LUFA_DIR)/usb_util.c VPATH += $(TMK_PATH)/$(LUFA_DIR) VPATH += $(LUFA_PATH) -# Option modules -#ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) -#endif - -#ifdef EXTRAKEY_ENABLE -#endif - # LUFA library compile-time options and predefined tokens LUFA_OPTS = -DUSB_DEVICE_ONLY LUFA_OPTS += -DUSE_FLASH_DESCRIPTORS LUFA_OPTS += -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -#LUFA_OPTS += -DINTERRUPT_CONTROL_ENDPOINT -LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 LUFA_OPTS += -DFIXED_CONTROL_ENDPOINT_SIZE=8 LUFA_OPTS += -DFIXED_NUM_CONFIGURATIONS=1 diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp deleted file mode 100644 index 3f2cc35734a..00000000000 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ /dev/null @@ -1,701 +0,0 @@ -#include "adafruit_ble.h" - -#include <stdio.h> -#include <stdlib.h> -#include <alloca.h> -#include "debug.h" -#include "timer.h" -#include "action_util.h" -#include "ringbuffer.hpp" -#include <string.h> -#include "spi_master.h" -#include "wait.h" -#include "analog.h" -#include "progmem.h" - -// These are the pin assignments for the 32u4 boards. -// You may define them to something else in your config.h -// if yours is wired up differently. -#ifndef AdafruitBleResetPin -# define AdafruitBleResetPin D4 -#endif - -#ifndef AdafruitBleCSPin -# define AdafruitBleCSPin B4 -#endif - -#ifndef AdafruitBleIRQPin -# define AdafruitBleIRQPin E6 -#endif - -#ifndef AdafruitBleSpiClockSpeed -# define AdafruitBleSpiClockSpeed 4000000UL // SCK frequency -#endif - -#define SCK_DIVISOR (F_CPU / AdafruitBleSpiClockSpeed) - -#define SAMPLE_BATTERY -#define ConnectionUpdateInterval 1000 /* milliseconds */ - -#ifndef BATTERY_LEVEL_PIN -# define BATTERY_LEVEL_PIN B5 -#endif - -static struct { - bool is_connected; - bool initialized; - bool configured; - -#define ProbedEvents 1 -#define UsingEvents 2 - bool event_flags; - -#ifdef SAMPLE_BATTERY - uint16_t last_battery_update; - uint32_t vbat; -#endif - uint16_t last_connection_update; -} state; - -// Commands are encoded using SDEP and sent via SPI -// https://github.com/adafruit/Adafruit_BluefruitLE_nRF51/blob/master/SDEP.md - -#define SdepMaxPayload 16 -struct sdep_msg { - uint8_t type; - uint8_t cmd_low; - uint8_t cmd_high; - struct __attribute__((packed)) { - uint8_t len : 7; - uint8_t more : 1; - }; - uint8_t payload[SdepMaxPayload]; -} __attribute__((packed)); - -// The recv latency is relatively high, so when we're hammering keys quickly, -// we want to avoid waiting for the responses in the matrix loop. We maintain -// a short queue for that. Since there is quite a lot of space overhead for -// the AT command representation wrapped up in SDEP, we queue the minimal -// information here. - -enum queue_type { - QTKeyReport, // 1-byte modifier + 6-byte key report - QTConsumer, // 16-bit key code -#ifdef MOUSE_ENABLE - QTMouseMove, // 4-byte mouse report -#endif -}; - -struct queue_item { - enum queue_type queue_type; - uint16_t added; - union __attribute__((packed)) { - struct __attribute__((packed)) { - uint8_t modifier; - uint8_t keys[6]; - } key; - - uint16_t consumer; - struct __attribute__((packed)) { - int8_t x, y, scroll, pan; - uint8_t buttons; - } mousemove; - }; -}; - -// Items that we wish to send -static RingBuffer<queue_item, 40> send_buf; -// Pending response; while pending, we can't send any more requests. -// This records the time at which we sent the command for which we -// are expecting a response. -static RingBuffer<uint16_t, 2> resp_buf; - -static bool process_queue_item(struct queue_item *item, uint16_t timeout); - -enum sdep_type { - SdepCommand = 0x10, - SdepResponse = 0x20, - SdepAlert = 0x40, - SdepError = 0x80, - SdepSlaveNotReady = 0xFE, // Try again later - SdepSlaveOverflow = 0xFF, // You read more data than is available -}; - -enum ble_cmd { - BleInitialize = 0xBEEF, - BleAtWrapper = 0x0A00, - BleUartTx = 0x0A01, - BleUartRx = 0x0A02, -}; - -enum ble_system_event_bits { - BleSystemConnected = 0, - BleSystemDisconnected = 1, - BleSystemUartRx = 8, - BleSystemMidiRx = 10, -}; - -#define SdepTimeout 150 /* milliseconds */ -#define SdepShortTimeout 10 /* milliseconds */ -#define SdepBackOff 25 /* microseconds */ -#define BatteryUpdateInterval 10000 /* milliseconds */ - -static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout = SdepTimeout); -static bool at_command_P(const char *cmd, char *resp, uint16_t resplen, bool verbose = false); - -// Send a single SDEP packet -static bool sdep_send_pkt(const struct sdep_msg *msg, uint16_t timeout) { - spi_start(AdafruitBleCSPin, false, 0, SCK_DIVISOR); - uint16_t timerStart = timer_read(); - bool success = false; - bool ready = false; - - do { - ready = spi_write(msg->type) != SdepSlaveNotReady; - if (ready) { - break; - } - - // Release it and let it initialize - spi_stop(); - wait_us(SdepBackOff); - spi_start(AdafruitBleCSPin, false, 0, SCK_DIVISOR); - } while (timer_elapsed(timerStart) < timeout); - - if (ready) { - // Slave is ready; send the rest of the packet - spi_transmit(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload)) + msg->len); - success = true; - } - - spi_stop(); - - return success; -} - -static inline void sdep_build_pkt(struct sdep_msg *msg, uint16_t command, const uint8_t *payload, uint8_t len, bool moredata) { - msg->type = SdepCommand; - msg->cmd_low = command & 0xFF; - msg->cmd_high = command >> 8; - msg->len = len; - msg->more = (moredata && len == SdepMaxPayload) ? 1 : 0; - - static_assert(sizeof(*msg) == 20, "msg is correctly packed"); - - memcpy(msg->payload, payload, len); -} - -// Read a single SDEP packet -static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) { - bool success = false; - uint16_t timerStart = timer_read(); - bool ready = false; - - do { - ready = readPin(AdafruitBleIRQPin); - if (ready) { - break; - } - wait_us(1); - } while (timer_elapsed(timerStart) < timeout); - - if (ready) { - spi_start(AdafruitBleCSPin, false, 0, SCK_DIVISOR); - - do { - // Read the command type, waiting for the data to be ready - msg->type = spi_read(); - if (msg->type == SdepSlaveNotReady || msg->type == SdepSlaveOverflow) { - // Release it and let it initialize - spi_stop(); - wait_us(SdepBackOff); - spi_start(AdafruitBleCSPin, false, 0, SCK_DIVISOR); - continue; - } - - // Read the rest of the header - spi_receive(&msg->cmd_low, sizeof(*msg) - (1 + sizeof(msg->payload))); - - // and get the payload if there is any - if (msg->len <= SdepMaxPayload) { - spi_receive(msg->payload, msg->len); - } - success = true; - break; - } while (timer_elapsed(timerStart) < timeout); - - spi_stop(); - } - return success; -} - -static void resp_buf_read_one(bool greedy) { - uint16_t last_send; - if (!resp_buf.peek(last_send)) { - return; - } - - if (readPin(AdafruitBleIRQPin)) { - struct sdep_msg msg; - - again: - if (sdep_recv_pkt(&msg, SdepTimeout)) { - if (!msg.more) { - // We got it; consume this entry - resp_buf.get(last_send); - dprintf("recv latency %dms\n", TIMER_DIFF_16(timer_read(), last_send)); - } - - if (greedy && resp_buf.peek(last_send) && readPin(AdafruitBleIRQPin)) { - goto again; - } - } - - } else if (timer_elapsed(last_send) > SdepTimeout * 2) { - dprintf("waiting_for_result: timeout, resp_buf size %d\n", (int)resp_buf.size()); - - // Timed out: consume this entry - resp_buf.get(last_send); - } -} - -static void send_buf_send_one(uint16_t timeout = SdepTimeout) { - struct queue_item item; - - // Don't send anything more until we get an ACK - if (!resp_buf.empty()) { - return; - } - - if (!send_buf.peek(item)) { - return; - } - if (process_queue_item(&item, timeout)) { - // commit that peek - send_buf.get(item); - dprintf("send_buf_send_one: have %d remaining\n", (int)send_buf.size()); - } else { - dprint("failed to send, will retry\n"); - wait_ms(SdepTimeout); - resp_buf_read_one(true); - } -} - -static void resp_buf_wait(const char *cmd) { - bool didPrint = false; - while (!resp_buf.empty()) { - if (!didPrint) { - dprintf("wait on buf for %s\n", cmd); - didPrint = true; - } - resp_buf_read_one(true); - } -} - -static bool ble_init(void) { - state.initialized = false; - state.configured = false; - state.is_connected = false; - - setPinInput(AdafruitBleIRQPin); - - spi_init(); - - // Perform a hardware reset - setPinOutput(AdafruitBleResetPin); - writePinHigh(AdafruitBleResetPin); - writePinLow(AdafruitBleResetPin); - wait_ms(10); - writePinHigh(AdafruitBleResetPin); - - wait_ms(1000); // Give it a second to initialize - - state.initialized = true; - return state.initialized; -} - -static inline uint8_t min(uint8_t a, uint8_t b) { return a < b ? a : b; } - -static bool read_response(char *resp, uint16_t resplen, bool verbose) { - char *dest = resp; - char *end = dest + resplen; - - while (true) { - struct sdep_msg msg; - - if (!sdep_recv_pkt(&msg, 2 * SdepTimeout)) { - dprint("sdep_recv_pkt failed\n"); - return false; - } - - if (msg.type != SdepResponse) { - *resp = 0; - return false; - } - - uint8_t len = min(msg.len, end - dest); - if (len > 0) { - memcpy(dest, msg.payload, len); - dest += len; - } - - if (!msg.more) { - // No more data is expected! - break; - } - } - - // Ensure the response is NUL terminated - *dest = 0; - - // "Parse" the result text; we want to snip off the trailing OK or ERROR line - // Rewind past the possible trailing CRLF so that we can strip it - --dest; - while (dest > resp && (dest[0] == '\n' || dest[0] == '\r')) { - *dest = 0; - --dest; - } - - // Look back for start of preceeding line - char *last_line = strrchr(resp, '\n'); - if (last_line) { - ++last_line; - } else { - last_line = resp; - } - - bool success = false; - static const char kOK[] PROGMEM = "OK"; - - success = !strcmp_P(last_line, kOK); - - if (verbose || !success) { - dprintf("result: %s\n", resp); - } - return success; -} - -static bool at_command(const char *cmd, char *resp, uint16_t resplen, bool verbose, uint16_t timeout) { - const char * end = cmd + strlen(cmd); - struct sdep_msg msg; - - if (verbose) { - dprintf("ble send: %s\n", cmd); - } - - if (resp) { - // They want to decode the response, so we need to flush and wait - // for all pending I/O to finish before we start this one, so - // that we don't confuse the results - resp_buf_wait(cmd); - *resp = 0; - } - - // Fragment the command into a series of SDEP packets - while (end - cmd > SdepMaxPayload) { - sdep_build_pkt(&msg, BleAtWrapper, (uint8_t *)cmd, SdepMaxPayload, true); - if (!sdep_send_pkt(&msg, timeout)) { - return false; - } - cmd += SdepMaxPayload; - } - - sdep_build_pkt(&msg, BleAtWrapper, (uint8_t *)cmd, end - cmd, false); - if (!sdep_send_pkt(&msg, timeout)) { - return false; - } - - if (resp == NULL) { - uint16_t now = timer_read(); - while (!resp_buf.enqueue(now)) { - resp_buf_read_one(false); - } - uint16_t later = timer_read(); - if (TIMER_DIFF_16(later, now) > 0) { - dprintf("waited %dms for resp_buf\n", TIMER_DIFF_16(later, now)); - } - return true; - } - - return read_response(resp, resplen, verbose); -} - -bool at_command_P(const char *cmd, char *resp, uint16_t resplen, bool verbose) { - char *cmdbuf = (char *)alloca(strlen_P(cmd) + 1); - strcpy_P(cmdbuf, cmd); - return at_command(cmdbuf, resp, resplen, verbose); -} - -bool adafruit_ble_is_connected(void) { return state.is_connected; } - -bool adafruit_ble_enable_keyboard(void) { - char resbuf[128]; - - if (!state.initialized && !ble_init()) { - return false; - } - - state.configured = false; - - // Disable command echo - static const char kEcho[] PROGMEM = "ATE=0"; - // Make the advertised name match the keyboard - static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT); - // Turn on keyboard support - static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1"; - - // Adjust intervals to improve latency. This causes the "central" - // system (computer/tablet) to poll us every 10-30 ms. We can't - // set a smaller value than 10ms, and 30ms seems to be the natural - // processing time on my macbook. Keeping it constrained to that - // feels reasonable to type to. - static const char kGapIntervals[] PROGMEM = "AT+GAPINTERVALS=10,30,,"; - - // Reset the device so that it picks up the above changes - static const char kATZ[] PROGMEM = "ATZ"; - - // Turn down the power level a bit - static const char kPower[] PROGMEM = "AT+BLEPOWERLEVEL=-12"; - static PGM_P const configure_commands[] PROGMEM = { - kEcho, kGapIntervals, kGapDevName, kHidEnOn, kPower, kATZ, - }; - - uint8_t i; - for (i = 0; i < sizeof(configure_commands) / sizeof(configure_commands[0]); ++i) { - PGM_P cmd; - memcpy_P(&cmd, configure_commands + i, sizeof(cmd)); - - if (!at_command_P(cmd, resbuf, sizeof(resbuf))) { - dprintf("failed BLE command: %S: %s\n", cmd, resbuf); - goto fail; - } - } - - state.configured = true; - - // Check connection status in a little while; allow the ATZ time - // to kick in. - state.last_connection_update = timer_read(); -fail: - return state.configured; -} - -static void set_connected(bool connected) { - if (connected != state.is_connected) { - if (connected) { - dprint("BLE connected\n"); - } else { - dprint("BLE disconnected\n"); - } - state.is_connected = connected; - - // TODO: if modifiers are down on the USB interface and - // we cut over to BLE or vice versa, they will remain stuck. - // This feels like a good point to do something like clearing - // the keyboard and/or generating a fake all keys up message. - // However, I've noticed that it takes a couple of seconds - // for macOS to to start recognizing key presses after BLE - // is in the connected state, so I worry that doing that - // here may not be good enough. - } -} - -void adafruit_ble_task(void) { - char resbuf[48]; - - if (!state.configured && !adafruit_ble_enable_keyboard()) { - return; - } - resp_buf_read_one(true); - send_buf_send_one(SdepShortTimeout); - - if (resp_buf.empty() && (state.event_flags & UsingEvents) && readPin(AdafruitBleIRQPin)) { - // Must be an event update - if (at_command_P(PSTR("AT+EVENTSTATUS"), resbuf, sizeof(resbuf))) { - uint32_t mask = strtoul(resbuf, NULL, 16); - - if (mask & BleSystemConnected) { - set_connected(true); - } else if (mask & BleSystemDisconnected) { - set_connected(false); - } - } - } - - if (timer_elapsed(state.last_connection_update) > ConnectionUpdateInterval) { - bool shouldPoll = true; - if (!(state.event_flags & ProbedEvents)) { - // Request notifications about connection status changes. - // This only works in SPIFRIEND firmware > 0.6.7, which is why - // we check for this conditionally here. - // Note that at the time of writing, HID reports only work correctly - // with Apple products on firmware version 0.6.7! - // https://forums.adafruit.com/viewtopic.php?f=8&t=104052 - if (at_command_P(PSTR("AT+EVENTENABLE=0x1"), resbuf, sizeof(resbuf))) { - at_command_P(PSTR("AT+EVENTENABLE=0x2"), resbuf, sizeof(resbuf)); - state.event_flags |= UsingEvents; - } - state.event_flags |= ProbedEvents; - - // leave shouldPoll == true so that we check at least once - // before relying solely on events - } else { - shouldPoll = false; - } - - static const char kGetConn[] PROGMEM = "AT+GAPGETCONN"; - state.last_connection_update = timer_read(); - - if (at_command_P(kGetConn, resbuf, sizeof(resbuf))) { - set_connected(atoi(resbuf)); - } - } - -#ifdef SAMPLE_BATTERY - if (timer_elapsed(state.last_battery_update) > BatteryUpdateInterval && resp_buf.empty()) { - state.last_battery_update = timer_read(); - - state.vbat = analogReadPin(BATTERY_LEVEL_PIN); - } -#endif -} - -static bool process_queue_item(struct queue_item *item, uint16_t timeout) { - char cmdbuf[48]; - char fmtbuf[64]; - - // Arrange to re-check connection after keys have settled - state.last_connection_update = timer_read(); - -#if 1 - if (TIMER_DIFF_16(state.last_connection_update, item->added) > 0) { - dprintf("send latency %dms\n", TIMER_DIFF_16(state.last_connection_update, item->added)); - } -#endif - - switch (item->queue_type) { - case QTKeyReport: - strcpy_P(fmtbuf, PSTR("AT+BLEKEYBOARDCODE=%02x-00-%02x-%02x-%02x-%02x-%02x-%02x")); - snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->key.modifier, item->key.keys[0], item->key.keys[1], item->key.keys[2], item->key.keys[3], item->key.keys[4], item->key.keys[5]); - return at_command(cmdbuf, NULL, 0, true, timeout); - - case QTConsumer: - strcpy_P(fmtbuf, PSTR("AT+BLEHIDCONTROLKEY=0x%04x")); - snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->consumer); - return at_command(cmdbuf, NULL, 0, true, timeout); - -#ifdef MOUSE_ENABLE - case QTMouseMove: - strcpy_P(fmtbuf, PSTR("AT+BLEHIDMOUSEMOVE=%d,%d,%d,%d")); - snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->mousemove.x, item->mousemove.y, item->mousemove.scroll, item->mousemove.pan); - if (!at_command(cmdbuf, NULL, 0, true, timeout)) { - return false; - } - strcpy_P(cmdbuf, PSTR("AT+BLEHIDMOUSEBUTTON=")); - if (item->mousemove.buttons & MOUSE_BTN1) { - strcat(cmdbuf, "L"); - } - if (item->mousemove.buttons & MOUSE_BTN2) { - strcat(cmdbuf, "R"); - } - if (item->mousemove.buttons & MOUSE_BTN3) { - strcat(cmdbuf, "M"); - } - if (item->mousemove.buttons == 0) { - strcat(cmdbuf, "0"); - } - return at_command(cmdbuf, NULL, 0, true, timeout); -#endif - default: - return true; - } -} - -void adafruit_ble_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uint8_t nkeys) { - struct queue_item item; - bool didWait = false; - - item.queue_type = QTKeyReport; - item.key.modifier = hid_modifier_mask; - item.added = timer_read(); - - while (nkeys >= 0) { - item.key.keys[0] = keys[0]; - item.key.keys[1] = nkeys >= 1 ? keys[1] : 0; - item.key.keys[2] = nkeys >= 2 ? keys[2] : 0; - item.key.keys[3] = nkeys >= 3 ? keys[3] : 0; - item.key.keys[4] = nkeys >= 4 ? keys[4] : 0; - item.key.keys[5] = nkeys >= 5 ? keys[5] : 0; - - if (!send_buf.enqueue(item)) { - if (!didWait) { - dprint("wait for buf space\n"); - didWait = true; - } - send_buf_send_one(); - continue; - } - - if (nkeys <= 6) { - return; - } - - nkeys -= 6; - keys += 6; - } -} - -void adafruit_ble_send_consumer_key(uint16_t usage) { - struct queue_item item; - - item.queue_type = QTConsumer; - item.consumer = usage; - - while (!send_buf.enqueue(item)) { - send_buf_send_one(); - } -} - -#ifdef MOUSE_ENABLE -void adafruit_ble_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons) { - struct queue_item item; - - item.queue_type = QTMouseMove; - item.mousemove.x = x; - item.mousemove.y = y; - item.mousemove.scroll = scroll; - item.mousemove.pan = pan; - item.mousemove.buttons = buttons; - - while (!send_buf.enqueue(item)) { - send_buf_send_one(); - } -} -#endif - -uint32_t adafruit_ble_read_battery_voltage(void) { return state.vbat; } - -bool adafruit_ble_set_mode_leds(bool on) { - if (!state.configured) { - return false; - } - - // The "mode" led is the red blinky one - at_command_P(on ? PSTR("AT+HWMODELED=1") : PSTR("AT+HWMODELED=0"), NULL, 0); - - // Pin 19 is the blue "connected" LED; turn that off too. - // When turning LEDs back on, don't turn that LED on if we're - // not connected, as that would be confusing. - at_command_P(on && state.is_connected ? PSTR("AT+HWGPIO=19,1") : PSTR("AT+HWGPIO=19,0"), NULL, 0); - return true; -} - -// https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/ble-generic#at-plus-blepowerlevel -bool adafruit_ble_set_power_level(int8_t level) { - char cmd[46]; - if (!state.configured) { - return false; - } - snprintf(cmd, sizeof(cmd), "AT+BLEPOWERLEVEL=%d", level); - return at_command(cmd, NULL, 0, false); -} diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index 5b56e8a03ce..e3be96d93da 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -52,6 +52,7 @@ #include "usb_descriptor.h" #include "lufa.h" #include "quantum.h" +#include "usb_device_state.h" #include <util/atomic.h> #ifdef NKRO_ENABLE @@ -142,7 +143,8 @@ static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); static void send_system(uint16_t data); static void send_consumer(uint16_t data); -host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +static void send_programmable_button(uint32_t data); +host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; #ifdef VIRTSER_ENABLE // clang-format off @@ -413,7 +415,10 @@ void EVENT_USB_Device_Disconnect(void) { * * FIXME: Needs doc */ -void EVENT_USB_Device_Reset(void) { print("[R]"); } +void EVENT_USB_Device_Reset(void) { + print("[R]"); + usb_device_state_set_reset(); +} /** \brief Event USB Device Connect * @@ -421,6 +426,8 @@ void EVENT_USB_Device_Reset(void) { print("[R]"); } */ void EVENT_USB_Device_Suspend() { print("[S]"); + usb_device_state_set_suspend(USB_Device_ConfigurationNumber != 0, USB_Device_ConfigurationNumber); + #ifdef SLEEP_LED_ENABLE sleep_led_enable(); #endif @@ -436,6 +443,8 @@ void EVENT_USB_Device_WakeUp() { suspend_wakeup_init(); #endif + usb_device_state_set_resume(USB_DeviceState == DEVICE_STATE_Configured, USB_Device_ConfigurationNumber); + #ifdef SLEEP_LED_ENABLE sleep_led_disable(); // NOTE: converters may not accept this @@ -528,6 +537,8 @@ void EVENT_USB_Device_ConfigurationChanged(void) { /* Setup digitizer endpoint */ ConfigSuccess &= Endpoint_ConfigureEndpoint((DIGITIZER_IN_EPNUM | ENDPOINT_DIR_IN), EP_TYPE_INTERRUPT, DIGITIZER_EPSIZE, 1); #endif + + usb_device_state_set_configuration(USB_DeviceState == DEVICE_STATE_Configured, USB_Device_ConfigurationNumber); } /* FIXME: Expose this table in the docs somehow @@ -760,29 +771,35 @@ static void send_mouse(report_mouse_t *report) { #endif } -/** \brief Send Extra - * - * FIXME: Needs doc - */ -#ifdef EXTRAKEY_ENABLE -static void send_extra(uint8_t report_id, uint16_t data) { +#if defined(EXTRAKEY_ENABLE) || defined(PROGRAMMABLE_BUTTON_ENABLE) +static void send_report(void *report, size_t size) { uint8_t timeout = 255; if (USB_DeviceState != DEVICE_STATE_Configured) return; - static report_extra_t r; - r = (report_extra_t){.report_id = report_id, .usage = data}; Endpoint_SelectEndpoint(SHARED_IN_EPNUM); /* Check if write ready for a polling interval around 10ms */ while (timeout-- && !Endpoint_IsReadWriteAllowed()) _delay_us(40); if (!Endpoint_IsReadWriteAllowed()) return; - Endpoint_Write_Stream_LE(&r, sizeof(report_extra_t), NULL); + Endpoint_Write_Stream_LE(report, size, NULL); Endpoint_ClearIN(); } #endif +/** \brief Send Extra + * + * FIXME: Needs doc + */ +#ifdef EXTRAKEY_ENABLE +static void send_extra(uint8_t report_id, uint16_t data) { + static report_extra_t r; + r = (report_extra_t){.report_id = report_id, .usage = data}; + send_report(&r, sizeof(r)); +} +#endif + /** \brief Send System * * FIXME: Needs doc @@ -822,6 +839,14 @@ static void send_consumer(uint16_t data) { #endif } +static void send_programmable_button(uint32_t data) { +#ifdef PROGRAMMABLE_BUTTON_ENABLE + static report_programmable_button_t r; + r = (report_programmable_button_t){.report_id = REPORT_ID_PROGRAMMABLE_BUTTON, .usage = data}; + send_report(&r, sizeof(r)); +#endif +} + /******************************************************************************* * sendchar ******************************************************************************/ @@ -1044,10 +1069,10 @@ void protocol_setup(void) { #endif setup_mcu(); - keyboard_setup(); + usb_device_state_init(); } -void protocol_init(void) { +void protocol_pre_init(void) { setup_usb(); sei(); @@ -1069,21 +1094,11 @@ void protocol_init(void) { #else USB_USBTask(); #endif - /* init modules */ - keyboard_init(); - host_set_driver(&lufa_driver); -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - -#ifdef VIRTSER_ENABLE - virtser_init(); -#endif - - print("Keyboard start.\n"); } -void protocol_task(void) { +void protocol_post_init(void) { host_set_driver(&lufa_driver); } + +void protocol_pre_task(void) { #if !defined(NO_USB_STARTUP_CHECK) if (USB_DeviceState == DEVICE_STATE_Suspended) { print("[s]"); @@ -1107,9 +1122,9 @@ void protocol_task(void) { suspend_wakeup_init(); } #endif +} - keyboard_task(); - +void protocol_post_task(void) { #ifdef MIDI_ENABLE MIDI_Device_USBTask(&USB_MIDI_Interface); #endif diff --git a/tmk_core/protocol/lufa/lufa.h b/tmk_core/protocol/lufa/lufa.h index 348a84c031a..6a5205609e3 100644 --- a/tmk_core/protocol/lufa/lufa.h +++ b/tmk_core/protocol/lufa/lufa.h @@ -56,14 +56,3 @@ extern host_driver_t lufa_driver; #ifdef __cplusplus } #endif - -#ifdef API_ENABLE -# include "api.h" -#endif - -#ifdef API_SYSEX_ENABLE -# include "api_sysex.h" -// Allocate space for encoding overhead. -// The header and terminator are not stored to save a few bytes of precious ram -# define MIDI_SYSEX_BUFFER (API_SYSEX_MAX_SIZE + API_SYSEX_MAX_SIZE / 7 + (API_SYSEX_MAX_SIZE % 7 ? 1 : 0)) -#endif diff --git a/tmk_core/protocol/midi/qmk_midi.c b/tmk_core/protocol/midi/qmk_midi.c index c18dbf99309..3a454d61ae8 100644 --- a/tmk_core/protocol/midi/qmk_midi.c +++ b/tmk_core/protocol/midi/qmk_midi.c @@ -4,9 +4,6 @@ #include "midi.h" #include "usb_descriptor.h" #include "process_midi.h" -#if API_SYSEX_ENABLE -# include "api_sysex.h" -#endif /******************************************************************************* * MIDI @@ -124,41 +121,6 @@ static void cc_callback(MidiDevice* device, uint8_t chan, uint8_t num, uint8_t v // midi_send_cc(device, (chan + 1) % 16, num, val); } -#ifdef API_SYSEX_ENABLE -uint8_t midi_buffer[MIDI_SYSEX_BUFFER] = {0}; - -static void sysex_callback(MidiDevice* device, uint16_t start, uint8_t length, uint8_t* data) { - // SEND_STRING("\n"); - // send_word(start); - // SEND_STRING(": "); - // Don't store the header - int16_t pos = start - 4; - for (uint8_t place = 0; place < length; place++) { - // send_byte(*data); - if (pos >= 0) { - if (*data == 0xF7) { - // SEND_STRING("\nRD: "); - // for (uint8_t i = 0; i < start + place + 1; i++){ - // send_byte(midi_buffer[i]); - // SEND_STRING(" "); - // } - const unsigned decoded_length = sysex_decoded_length(pos); - uint8_t decoded[API_SYSEX_MAX_SIZE]; - sysex_decode(decoded, midi_buffer, pos); - process_api(decoded_length, decoded); - return; - } else if (pos >= MIDI_SYSEX_BUFFER) { - return; - } - midi_buffer[pos] = *data; - } - // SEND_STRING(" "); - data++; - pos++; - } -} -#endif - void midi_init(void); void setup_midi(void) { @@ -170,7 +132,4 @@ void setup_midi(void) { midi_device_set_pre_input_process_func(&midi_device, usb_get_midi); midi_register_fallthrough_callback(&midi_device, fallthrough_callback); midi_register_cc_callback(&midi_device, cc_callback); -#ifdef API_SYSEX_ENABLE - midi_register_sysex_callback(&midi_device, sysex_callback); -#endif } diff --git a/tmk_core/protocol/news.c b/tmk_core/protocol/news.c deleted file mode 100644 index 4463e8dd425..00000000000 --- a/tmk_core/protocol/news.c +++ /dev/null @@ -1,161 +0,0 @@ -/* -Copyright 2012 Jun WAKO <wakojun@gmail.com> - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -#include <stdbool.h> -#include <avr/io.h> -#include <avr/interrupt.h> -#include "news.h" - -void news_init(void) { NEWS_KBD_RX_INIT(); } - -// RX ring buffer -#define RBUF_SIZE 8 -static uint8_t rbuf[RBUF_SIZE]; -static uint8_t rbuf_head = 0; -static uint8_t rbuf_tail = 0; - -uint8_t news_recv(void) { - uint8_t data = 0; - if (rbuf_head == rbuf_tail) { - return 0; - } - - data = rbuf[rbuf_tail]; - rbuf_tail = (rbuf_tail + 1) % RBUF_SIZE; - return data; -} - -// USART RX complete interrupt -ISR(NEWS_KBD_RX_VECT) { - uint8_t next = (rbuf_head + 1) % RBUF_SIZE; - if (next != rbuf_tail) { - rbuf[rbuf_head] = NEWS_KBD_RX_DATA; - rbuf_head = next; - } -} - -/* -SONY NEWS Keyboard Protocol -=========================== - -Resources ---------- - Mouse protocol of NWA-5461(Japanese) - http://groups.google.com/group/fj.sys.news/browse_thread/thread/a01b3e3ac6ae5b2d - - SONY NEWS Info(Japanese) - http://katsu.watanabe.name/doc/sonynews/ - - -Pinouts -------- - EIA 232 male connector from NWP-5461 - ------------- - \ 1 2 3 4 5 / - \ 6 7 8 9 / - --------- - 1 VCC - 2 BZ(Speaker) - 3 Keyboard Data(from keyboard MCU TxD) - 4 NC - 5 GND - 6 Unknown Input(to keyboard MCU RxD via schmitt trigger) - 7 Mouse Data(from Mouse Ext connector) - 8 Unknown Input(to Keyboard MCU Input via diode and buffer) - 9 FG - NOTE: Two LED on keyboard are controlled by pin 6,8? - - EIA 232 male connector from NWP-411A - ------------- - \ 1 2 3 4 5 / - \ 6 7 8 9 / - --------- - 1 VCC - 2 BZ(Speaker) - 3 Keyboard Data(from keyboard MCU TxD) - 4 NC - 5 GND - 6 NC - 7 Mouse Data(from Mouse Ext connector) - 8 NC - 9 FG - NOTE: These are just from my guess and not confirmed. - - -Signaling ---------- - ~~~~~~~~~~ ____XOO0X111X222X333X444X555X666X777~~~~ ~~~~~~~ - Idle Start LSB MSB Stop Idle - - Idle: High - Start bit: Low - Stop bit: High - Bit order: LSB first - - Baud rate: 9600 - Interface: TTL level(5V) UART - - NOTE: This is observed on NWP-5461 with its DIP switch all OFF. - - -Format ------- - MSB LSB - 7 6 5 4 3 2 1 0 bit - | | | | | | | | - | +-+-+-+-+-+-+-- scan code(00-7F) - +---------------- break flag: sets when released - - -Scan Codes ----------- - SONY NEWS NWP-5461 - ,---. ,------------------------, ,------------------------. ,---------. - | 7A| | 01 | 02 | 03 | 04 | 05 | | 06 | 07 | 08 | 09 | 0A | | 68 | 69 | ,-----------. - `---' `------------------------' `------------------------' `---------' | 64| 65| 52| - ,-------------------------------------------------------------. ,---. ,---------------| - | 0B| 0C| 0D| 0E| 0F| 10| 11| 12| 13| 14| 15| 16| 17| 18| 19 | | 6A| | 4B| 4C| 4D| 4E| - |-------------------------------------------------------------| |---| |---------------| - | 1A | 1B| 1C| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| | | 6B| | 4F| 50| 51| 56| - |---------------------------------------------------------' | |---| |---------------| - | 28 | 29| 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34| 35 | | 6C| | 53| 54| 55| | - |-------------------------------------------------------------| |---| |-----------| 5A| - | 36 | 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42 | | 6D| | 57| 59| 58| | - |-------------------------------------------------------------| |---| |---------------| - | 43 | 44 | 45 | 46 | 47 | 48| 49| 4A | | 6E| | 66| 5B| 5C| 5D| - `-------------------------------------------------------------' `---' `---------------' -*/ diff --git a/tmk_core/protocol/news.h b/tmk_core/protocol/news.h deleted file mode 100644 index 327a13856d4..00000000000 --- a/tmk_core/protocol/news.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -Copyright 2012 Jun WAKO <wakojun@gmail.com> - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -#pragma once - -/* - * Primitive PS/2 Library for AVR - */ - -/* host role */ -void news_init(void); -uint8_t news_recv(void); - -/* device role */ diff --git a/tmk_core/protocol/next_kbd.c b/tmk_core/protocol/next_kbd.c deleted file mode 100644 index 6f118e61729..00000000000 --- a/tmk_core/protocol/next_kbd.c +++ /dev/null @@ -1,219 +0,0 @@ -/* - -NeXT non-ADB Keyboard Protocol - -Copyright 2013, Benjamin Gould (bgould@github.com) - -Based on: -TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com> -Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license - -Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB -Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html -Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/ - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <util/atomic.h> -#include <util/delay.h> -#include "next_kbd.h" -#include "debug.h" - -static inline void out_lo(void); -static inline void out_hi(void); -static inline void query(void); -static inline void reset(void); -static inline uint32_t response(void); - -/* The keyboard sends signal with 50us pulse width on OUT line - * while it seems to miss the 50us pulse on In line. - * next_kbd_set_leds() often fails to sync LED status with 50us - * but it works well with 51us(+1us) on TMK converter(ATMeaga32u2) at least. - * TODO: test on Teensy and Pro Micro configuration - */ -#define out_hi_delay(intervals) \ - do { \ - out_hi(); \ - _delay_us((NEXT_KBD_TIMING + 1) * intervals); \ - } while (0); -#define out_lo_delay(intervals) \ - do { \ - out_lo(); \ - _delay_us((NEXT_KBD_TIMING + 1) * intervals); \ - } while (0); -#define query_delay(intervals) \ - do { \ - query(); \ - _delay_us((NEXT_KBD_TIMING + 1) * intervals); \ - } while (0); -#define reset_delay(intervals) \ - do { \ - reset(); \ - _delay_us((NEXT_KBD_TIMING + 1) * intervals); \ - } while (0); - -void next_kbd_init(void) { - out_hi(); - NEXT_KBD_IN_DDR &= ~(1 << NEXT_KBD_IN_BIT); // KBD_IN to input - NEXT_KBD_IN_PORT |= (1 << NEXT_KBD_IN_BIT); // KBD_IN pull up - - query_delay(5); - reset_delay(8); - - query_delay(5); - reset_delay(8); -} - -void next_kbd_set_leds(bool left, bool right) { - cli(); - out_lo_delay(9); - - out_hi_delay(3); - out_lo_delay(1); - - if (left) { - out_hi_delay(1); - } else { - out_lo_delay(1); - } - - if (right) { - out_hi_delay(1); - } else { - out_lo_delay(1); - } - - out_lo_delay(7); - out_hi(); - sei(); -} - -#define NEXT_KBD_READ (NEXT_KBD_IN_PIN & (1 << NEXT_KBD_IN_BIT)) -uint32_t next_kbd_recv(void) { - // First check to make sure that the keyboard is actually connected; - // if not, just return - // TODO: reflect the status of the keyboard in a return code - if (!NEXT_KBD_READ) { - sei(); - return 0; - } - - query(); - uint32_t resp = response(); - - return resp; -} - -static inline uint32_t response(void) { - cli(); - - // try a 5ms read; this should be called after the query method has - // been run so if a key is pressed we should get a response within - // 5ms; if not then send a reset and exit - uint8_t i = 0; - uint32_t data = 0; - uint16_t reset_timeout = 50000; - while (NEXT_KBD_READ && reset_timeout) { - asm(""); - _delay_us(1); - reset_timeout--; - } - if (!reset_timeout) { - reset(); - sei(); - return 0; - } - _delay_us(NEXT_KBD_TIMING / 2); - for (; i < 22; i++) { - if (NEXT_KBD_READ) { - data |= ((uint32_t)1 << i); - /* Note: - * My testing with the ATmega32u4 showed that there might - * something wrong with the timing here; by the end of the - * second data byte some of the modifiers can get bumped out - * to the next bit over if we just cycle through the data - * based on the expected interval. There is a bit (i = 10) - * in the middle of the data that is always on followed by - * one that is always off - so we'll use that to reset our - * timing in case we've gotten ahead of the keyboard; - */ - if (i == 10) { - i++; - while (NEXT_KBD_READ) - ; - _delay_us(NEXT_KBD_TIMING / 2); - } - } else { - /* redundant - but I don't want to remove if it might screw - * up the timing - */ - data |= ((uint32_t)0 << i); - } - _delay_us(NEXT_KBD_TIMING); - } - - sei(); - - return data; -} - -static inline void out_lo(void) { - NEXT_KBD_OUT_PORT &= ~(1 << NEXT_KBD_OUT_BIT); - NEXT_KBD_OUT_DDR |= (1 << NEXT_KBD_OUT_BIT); -} - -static inline void out_hi(void) { - /* input with pull up */ - NEXT_KBD_OUT_DDR &= ~(1 << NEXT_KBD_OUT_BIT); - NEXT_KBD_OUT_PORT |= (1 << NEXT_KBD_OUT_BIT); -} - -static inline void query(void) { - out_lo_delay(5); - out_hi_delay(1); - out_lo_delay(3); - out_hi(); -} - -static inline void reset(void) { - out_lo_delay(1); - out_hi_delay(4); - out_lo_delay(1); - out_hi_delay(6); - out_lo_delay(10); - out_hi(); -} diff --git a/tmk_core/protocol/next_kbd.h b/tmk_core/protocol/next_kbd.h deleted file mode 100644 index 1249ebf392d..00000000000 --- a/tmk_core/protocol/next_kbd.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -NeXT non-ADB Keyboard Protocol - -Copyright 2013, Benjamin Gould (bgould@github.com) - -Based on: -TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com> -Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license - -Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB -Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html -Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/ - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -*/ - -#pragma once - -#include <stdbool.h> - -#define NEXT_KBD_KMBUS_IDLE 0x300600 -#define NEXT_KBD_TIMING 50 - -extern uint8_t next_kbd_error; - -/* host role */ -void next_kbd_init(void); -void next_kbd_set_leds(bool left, bool right); -uint32_t next_kbd_recv(void); diff --git a/tmk_core/protocol/ps2_interrupt.c b/tmk_core/protocol/ps2_interrupt.c deleted file mode 100644 index 780040d1526..00000000000 --- a/tmk_core/protocol/ps2_interrupt.c +++ /dev/null @@ -1,340 +0,0 @@ -/* -Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com> - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * PS/2 protocol Pin interrupt version - */ - -#include <stdbool.h> - -#if defined(__AVR__) -# include <avr/interrupt.h> -#elif defined(PROTOCOL_CHIBIOS) // TODO: or STM32 ? -// chibiOS headers -# include "ch.h" -# include "hal.h" -#endif - -#include "ps2.h" -#include "ps2_io.h" -#include "print.h" -#include "wait.h" - -#define WAIT(stat, us, err) \ - do { \ - if (!wait_##stat(us)) { \ - ps2_error = err; \ - goto ERROR; \ - } \ - } while (0) - -uint8_t ps2_error = PS2_ERR_NONE; - -static inline uint8_t pbuf_dequeue(void); -static inline void pbuf_enqueue(uint8_t data); -static inline bool pbuf_has_data(void); -static inline void pbuf_clear(void); - -#if defined(PROTOCOL_CHIBIOS) -void ps2_interrupt_service_routine(void); -void palCallback(void *arg) { ps2_interrupt_service_routine(); } - -# define PS2_INT_INIT() \ - { palSetLineMode(PS2_CLOCK, PAL_MODE_INPUT); } \ - while (0) -# define PS2_INT_ON() \ - { \ - palEnableLineEvent(PS2_CLOCK, PAL_EVENT_MODE_FALLING_EDGE); \ - palSetLineCallback(PS2_CLOCK, palCallback, NULL); \ - } \ - while (0) -# define PS2_INT_OFF() \ - { palDisableLineEvent(PS2_CLOCK); } \ - while (0) -#endif // PROTOCOL_CHIBIOS - -void ps2_host_init(void) { - idle(); - PS2_INT_INIT(); - PS2_INT_ON(); - // POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20) - // wait_ms(2500); -} - -uint8_t ps2_host_send(uint8_t data) { - bool parity = true; - ps2_error = PS2_ERR_NONE; - - PS2_INT_OFF(); - - /* terminate a transmission if we have */ - inhibit(); - wait_us(100); // 100us [4]p.13, [5]p.50 - - /* 'Request to Send' and Start bit */ - data_lo(); - clock_hi(); - WAIT(clock_lo, 10000, 10); // 10ms [5]p.50 - - /* Data bit[2-9] */ - for (uint8_t i = 0; i < 8; i++) { - if (data & (1 << i)) { - parity = !parity; - data_hi(); - } else { - data_lo(); - } - WAIT(clock_hi, 50, 2); - WAIT(clock_lo, 50, 3); - } - - /* Parity bit */ - wait_us(15); - if (parity) { - data_hi(); - } else { - data_lo(); - } - WAIT(clock_hi, 50, 4); - WAIT(clock_lo, 50, 5); - - /* Stop bit */ - wait_us(15); - data_hi(); - - /* Ack */ - WAIT(data_lo, 50, 6); - WAIT(clock_lo, 50, 7); - - /* wait for idle state */ - WAIT(clock_hi, 50, 8); - WAIT(data_hi, 50, 9); - - idle(); - PS2_INT_ON(); - return ps2_host_recv_response(); -ERROR: - idle(); - PS2_INT_ON(); - return 0; -} - -uint8_t ps2_host_recv_response(void) { - // Command may take 25ms/20ms at most([5]p.46, [3]p.21) - uint8_t retry = 25; - while (retry-- && !pbuf_has_data()) { - wait_ms(1); - } - return pbuf_dequeue(); -} - -/* get data received by interrupt */ -uint8_t ps2_host_recv(void) { - if (pbuf_has_data()) { - ps2_error = PS2_ERR_NONE; - return pbuf_dequeue(); - } else { - ps2_error = PS2_ERR_NODATA; - return 0; - } -} - -void ps2_interrupt_service_routine(void) { - static enum { - INIT, - START, - BIT0, - BIT1, - BIT2, - BIT3, - BIT4, - BIT5, - BIT6, - BIT7, - PARITY, - STOP, - } state = INIT; - static uint8_t data = 0; - static uint8_t parity = 1; - - // TODO: abort if elapse 100us from previous interrupt - - // return unless falling edge - if (clock_in()) { - goto RETURN; - } - - state++; - switch (state) { - case START: - if (data_in()) goto ERROR; - break; - case BIT0: - case BIT1: - case BIT2: - case BIT3: - case BIT4: - case BIT5: - case BIT6: - case BIT7: - data >>= 1; - if (data_in()) { - data |= 0x80; - parity++; - } - break; - case PARITY: - if (data_in()) { - if (!(parity & 0x01)) goto ERROR; - } else { - if (parity & 0x01) goto ERROR; - } - break; - case STOP: - if (!data_in()) goto ERROR; - pbuf_enqueue(data); - goto DONE; - break; - default: - goto ERROR; - } - goto RETURN; -ERROR: - ps2_error = state; -DONE: - state = INIT; - data = 0; - parity = 1; -RETURN: - return; -} - -#if defined(__AVR__) -ISR(PS2_INT_VECT) { ps2_interrupt_service_routine(); } -#endif - -/* send LED state to keyboard */ -void ps2_host_set_led(uint8_t led) { - ps2_host_send(0xED); - ps2_host_send(led); -} - -/*-------------------------------------------------------------------- - * Ring buffer to store scan codes from keyboard - *------------------------------------------------------------------*/ -#define PBUF_SIZE 32 -static uint8_t pbuf[PBUF_SIZE]; -static uint8_t pbuf_head = 0; -static uint8_t pbuf_tail = 0; -static inline void pbuf_enqueue(uint8_t data) { -#if defined(__AVR__) - uint8_t sreg = SREG; - cli(); -#elif defined(PROTOCOL_CHIBIOS) - chSysLockFromISR(); -#endif - - uint8_t next = (pbuf_head + 1) % PBUF_SIZE; - if (next != pbuf_tail) { - pbuf[pbuf_head] = data; - pbuf_head = next; - } else { - print("pbuf: full\n"); - } - -#if defined(__AVR__) - SREG = sreg; -#elif defined(PROTOCOL_CHIBIOS) - chSysUnlockFromISR(); -#endif -} -static inline uint8_t pbuf_dequeue(void) { - uint8_t val = 0; - -#if defined(__AVR__) - uint8_t sreg = SREG; - cli(); -#elif defined(PROTOCOL_CHIBIOS) - chSysLock(); -#endif - - if (pbuf_head != pbuf_tail) { - val = pbuf[pbuf_tail]; - pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; - } - -#if defined(__AVR__) - SREG = sreg; -#elif defined(PROTOCOL_CHIBIOS) - chSysUnlock(); -#endif - - return val; -} -static inline bool pbuf_has_data(void) { -#if defined(__AVR__) - uint8_t sreg = SREG; - cli(); -#elif defined(PROTOCOL_CHIBIOS) - chSysLock(); -#endif - - bool has_data = (pbuf_head != pbuf_tail); - -#if defined(__AVR__) - SREG = sreg; -#elif defined(PROTOCOL_CHIBIOS) - chSysUnlock(); -#endif - return has_data; -} -static inline void pbuf_clear(void) { -#if defined(__AVR__) - uint8_t sreg = SREG; - cli(); -#elif defined(PROTOCOL_CHIBIOS) - chSysLock(); -#endif - - pbuf_head = pbuf_tail = 0; - -#if defined(__AVR__) - SREG = sreg; -#elif defined(PROTOCOL_CHIBIOS) - chSysUnlock(); -#endif -} diff --git a/tmk_core/protocol/ps2_io_avr.c b/tmk_core/protocol/ps2_io_avr.c deleted file mode 100644 index a9ac5d338d9..00000000000 --- a/tmk_core/protocol/ps2_io_avr.c +++ /dev/null @@ -1,58 +0,0 @@ -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> - -/* Check port settings for clock and data line */ -#if !(defined(PS2_CLOCK_PORT) && defined(PS2_CLOCK_PIN) && defined(PS2_CLOCK_DDR) && defined(PS2_CLOCK_BIT)) -# error "PS/2 clock port setting is required in config.h" -#endif - -#if !(defined(PS2_DATA_PORT) && defined(PS2_DATA_PIN) && defined(PS2_DATA_DDR) && defined(PS2_DATA_BIT)) -# error "PS/2 data port setting is required in config.h" -#endif - -/* - * Clock - */ -void clock_init(void) {} - -void clock_lo(void) { - PS2_CLOCK_PORT &= ~(1 << PS2_CLOCK_BIT); - PS2_CLOCK_DDR |= (1 << PS2_CLOCK_BIT); -} - -void clock_hi(void) { - /* input with pull up */ - PS2_CLOCK_DDR &= ~(1 << PS2_CLOCK_BIT); - PS2_CLOCK_PORT |= (1 << PS2_CLOCK_BIT); -} - -bool clock_in(void) { - PS2_CLOCK_DDR &= ~(1 << PS2_CLOCK_BIT); - PS2_CLOCK_PORT |= (1 << PS2_CLOCK_BIT); - _delay_us(1); - return PS2_CLOCK_PIN & (1 << PS2_CLOCK_BIT); -} - -/* - * Data - */ -void data_init(void) {} - -void data_lo(void) { - PS2_DATA_PORT &= ~(1 << PS2_DATA_BIT); - PS2_DATA_DDR |= (1 << PS2_DATA_BIT); -} - -void data_hi(void) { - /* input with pull up */ - PS2_DATA_DDR &= ~(1 << PS2_DATA_BIT); - PS2_DATA_PORT |= (1 << PS2_DATA_BIT); -} - -bool data_in(void) { - PS2_DATA_DDR &= ~(1 << PS2_DATA_BIT); - PS2_DATA_PORT |= (1 << PS2_DATA_BIT); - _delay_us(1); - return PS2_DATA_PIN & (1 << PS2_DATA_BIT); -} diff --git a/tmk_core/protocol/ps2_io_chibios.c b/tmk_core/protocol/ps2_io_chibios.c deleted file mode 100644 index b672bd1f47f..00000000000 --- a/tmk_core/protocol/ps2_io_chibios.c +++ /dev/null @@ -1,55 +0,0 @@ -#include <stdbool.h> -#include "ps2_io.h" - -// chibiOS headers -#include "ch.h" -#include "hal.h" - -/* Check port settings for clock and data line */ -#if !(defined(PS2_CLOCK)) -# error "PS/2 clock setting is required in config.h" -#endif - -#if !(defined(PS2_DATA)) -# error "PS/2 data setting is required in config.h" -#endif - -/* - * Clock - */ -void clock_init(void) {} - -void clock_lo(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_CLOCK, PAL_LOW); -} - -void clock_hi(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_CLOCK, PAL_HIGH); -} - -bool clock_in(void) { - palSetLineMode(PS2_CLOCK, PAL_MODE_INPUT); - return palReadLine(PS2_CLOCK); -} - -/* - * Data - */ -void data_init(void) {} - -void data_lo(void) { - palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_DATA, PAL_LOW); -} - -void data_hi(void) { - palSetLineMode(PS2_DATA, PAL_MODE_OUTPUT_OPENDRAIN); - palWriteLine(PS2_DATA, PAL_HIGH); -} - -bool data_in(void) { - palSetLineMode(PS2_DATA, PAL_MODE_INPUT); - return palReadLine(PS2_DATA); -} diff --git a/tmk_core/protocol/ps2_mouse.c b/tmk_core/protocol/ps2_mouse.c deleted file mode 100644 index 43c88084d2d..00000000000 --- a/tmk_core/protocol/ps2_mouse.c +++ /dev/null @@ -1,274 +0,0 @@ -/* -Copyright 2011,2013 Jun Wako <wakojun@gmail.com> - -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 <stdbool.h> - -#if defined(__AVR__) -# include <avr/io.h> -#endif - -#include "ps2_mouse.h" -#include "wait.h" -#include "host.h" -#include "timer.h" -#include "print.h" -#include "report.h" -#include "debug.h" -#include "ps2.h" - -/* ============================= MACROS ============================ */ - -static report_mouse_t mouse_report = {}; - -static inline void ps2_mouse_print_report(report_mouse_t *mouse_report); -static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report); -static inline void ps2_mouse_clear_report(report_mouse_t *mouse_report); -static inline void ps2_mouse_enable_scrolling(void); -static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report); - -/* ============================= IMPLEMENTATION ============================ */ - -/* supports only 3 button mouse at this time */ -void ps2_mouse_init(void) { - ps2_host_init(); - - wait_ms(PS2_MOUSE_INIT_DELAY); // wait for powering up - - PS2_MOUSE_SEND(PS2_MOUSE_RESET, "ps2_mouse_init: sending reset"); - - PS2_MOUSE_RECEIVE("ps2_mouse_init: read BAT"); - PS2_MOUSE_RECEIVE("ps2_mouse_init: read DevID"); - -#ifdef PS2_MOUSE_USE_REMOTE_MODE - ps2_mouse_set_remote_mode(); -#else - ps2_mouse_enable_data_reporting(); -#endif - -#ifdef PS2_MOUSE_ENABLE_SCROLLING - ps2_mouse_enable_scrolling(); -#endif - -#ifdef PS2_MOUSE_USE_2_1_SCALING - ps2_mouse_set_scaling_2_1(); -#endif - - ps2_mouse_init_user(); -} - -__attribute__((weak)) void ps2_mouse_init_user(void) {} - -__attribute__((weak)) void ps2_mouse_moved_user(report_mouse_t *mouse_report) {} - -void ps2_mouse_task(void) { - static uint8_t buttons_prev = 0; - extern int tp_buttons; - - /* receives packet from mouse */ - uint8_t rcv; - rcv = ps2_host_send(PS2_MOUSE_READ_DATA); - if (rcv == PS2_ACK) { - mouse_report.buttons = ps2_host_recv_response() | tp_buttons; - mouse_report.x = ps2_host_recv_response() * PS2_MOUSE_X_MULTIPLIER; - mouse_report.y = ps2_host_recv_response() * PS2_MOUSE_Y_MULTIPLIER; -#ifdef PS2_MOUSE_ENABLE_SCROLLING - mouse_report.v = -(ps2_host_recv_response() & PS2_MOUSE_SCROLL_MASK) * PS2_MOUSE_V_MULTIPLIER; -#endif - } else { - if (debug_mouse) print("ps2_mouse: fail to get mouse packet\n"); - return; - } - - /* if mouse moves or buttons state changes */ - if (mouse_report.x || mouse_report.y || mouse_report.v || ((mouse_report.buttons ^ buttons_prev) & PS2_MOUSE_BTN_MASK)) { -#ifdef PS2_MOUSE_DEBUG_RAW - // Used to debug raw ps2 bytes from mouse - ps2_mouse_print_report(&mouse_report); -#endif - buttons_prev = mouse_report.buttons; - ps2_mouse_convert_report_to_hid(&mouse_report); -#if PS2_MOUSE_SCROLL_BTN_MASK - ps2_mouse_scroll_button_task(&mouse_report); -#endif - if (mouse_report.x || mouse_report.y || mouse_report.v) { - ps2_mouse_moved_user(&mouse_report); - } -#ifdef PS2_MOUSE_DEBUG_HID - // Used to debug the bytes sent to the host - ps2_mouse_print_report(&mouse_report); -#endif - host_mouse_send(&mouse_report); - } - - ps2_mouse_clear_report(&mouse_report); -} - -void ps2_mouse_disable_data_reporting(void) { PS2_MOUSE_SEND(PS2_MOUSE_DISABLE_DATA_REPORTING, "ps2 mouse disable data reporting"); } - -void ps2_mouse_enable_data_reporting(void) { PS2_MOUSE_SEND(PS2_MOUSE_ENABLE_DATA_REPORTING, "ps2 mouse enable data reporting"); } - -void ps2_mouse_set_remote_mode(void) { - PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_REMOTE_MODE, "ps2 mouse set remote mode"); - ps2_mouse_mode = PS2_MOUSE_REMOTE_MODE; -} - -void ps2_mouse_set_stream_mode(void) { - PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_STREAM_MODE, "ps2 mouse set stream mode"); - ps2_mouse_mode = PS2_MOUSE_STREAM_MODE; -} - -void ps2_mouse_set_scaling_2_1(void) { PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_2_1, "ps2 mouse set scaling 2:1"); } - -void ps2_mouse_set_scaling_1_1(void) { PS2_MOUSE_SEND_SAFE(PS2_MOUSE_SET_SCALING_1_1, "ps2 mouse set scaling 1:1"); } - -void ps2_mouse_set_resolution(ps2_mouse_resolution_t resolution) { PS2_MOUSE_SET_SAFE(PS2_MOUSE_SET_RESOLUTION, resolution, "ps2 mouse set resolution"); } - -void ps2_mouse_set_sample_rate(ps2_mouse_sample_rate_t sample_rate) { PS2_MOUSE_SET_SAFE(PS2_MOUSE_SET_SAMPLE_RATE, sample_rate, "ps2 mouse set sample rate"); } - -/* ============================= HELPERS ============================ */ - -#define X_IS_NEG (mouse_report->buttons & (1 << PS2_MOUSE_X_SIGN)) -#define Y_IS_NEG (mouse_report->buttons & (1 << PS2_MOUSE_Y_SIGN)) -#define X_IS_OVF (mouse_report->buttons & (1 << PS2_MOUSE_X_OVFLW)) -#define Y_IS_OVF (mouse_report->buttons & (1 << PS2_MOUSE_Y_OVFLW)) -static inline void ps2_mouse_convert_report_to_hid(report_mouse_t *mouse_report) { - // PS/2 mouse data is '9-bit integer'(-256 to 255) which is comprised of sign-bit and 8-bit value. - // bit: 8 7 ... 0 - // sign \8-bit/ - // - // Meanwhile USB HID mouse indicates 8bit data(-127 to 127), note that -128 is not used. - // - // This converts PS/2 data into HID value. Use only -127-127 out of PS/2 9-bit. - mouse_report->x = X_IS_NEG ? ((!X_IS_OVF && -127 <= mouse_report->x && mouse_report->x <= -1) ? mouse_report->x : -127) : ((!X_IS_OVF && 0 <= mouse_report->x && mouse_report->x <= 127) ? mouse_report->x : 127); - mouse_report->y = Y_IS_NEG ? ((!Y_IS_OVF && -127 <= mouse_report->y && mouse_report->y <= -1) ? mouse_report->y : -127) : ((!Y_IS_OVF && 0 <= mouse_report->y && mouse_report->y <= 127) ? mouse_report->y : 127); - -#ifdef PS2_MOUSE_INVERT_BUTTONS - // swap left & right buttons - uint8_t needs_left = mouse_report->buttons & PS2_MOUSE_BTN_RIGHT; - uint8_t needs_right = mouse_report->buttons & PS2_MOUSE_BTN_LEFT; - mouse_report->buttons = (mouse_report->buttons & ~(PS2_MOUSE_BTN_MASK)) | (needs_left ? PS2_MOUSE_BTN_LEFT : 0) | (needs_right ? PS2_MOUSE_BTN_RIGHT : 0); -#else - // remove sign and overflow flags - mouse_report->buttons &= PS2_MOUSE_BTN_MASK; -#endif - -#ifdef PS2_MOUSE_INVERT_X - mouse_report->x = -mouse_report->x; -#endif -#ifndef PS2_MOUSE_INVERT_Y // NOTE if not! - // invert coordinate of y to conform to USB HID mouse - mouse_report->y = -mouse_report->y; -#endif - -#ifdef PS2_MOUSE_ROTATE - int8_t x = mouse_report->x; - int8_t y = mouse_report->y; -# if PS2_MOUSE_ROTATE == 90 - mouse_report->x = y; - mouse_report->y = -x; -# elif PS2_MOUSE_ROTATE == 180 - mouse_report->x = -x; - mouse_report->y = -y; -# elif PS2_MOUSE_ROTATE == 270 - mouse_report->x = -y; - mouse_report->y = x; -# endif -#endif -} - -static inline void ps2_mouse_clear_report(report_mouse_t *mouse_report) { - mouse_report->x = 0; - mouse_report->y = 0; - mouse_report->v = 0; - mouse_report->h = 0; - mouse_report->buttons = 0; -} - -static inline void ps2_mouse_print_report(report_mouse_t *mouse_report) { - if (!debug_mouse) return; - print("ps2_mouse: ["); - print_hex8(mouse_report->buttons); - print("|"); - print_hex8((uint8_t)mouse_report->x); - print(" "); - print_hex8((uint8_t)mouse_report->y); - print(" "); - print_hex8((uint8_t)mouse_report->v); - print(" "); - print_hex8((uint8_t)mouse_report->h); - print("]\n"); -} - -static inline void ps2_mouse_enable_scrolling(void) { - PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Initiaing scroll wheel enable: Set sample rate"); - PS2_MOUSE_SEND(200, "200"); - PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Set sample rate"); - PS2_MOUSE_SEND(100, "100"); - PS2_MOUSE_SEND(PS2_MOUSE_SET_SAMPLE_RATE, "Set sample rate"); - PS2_MOUSE_SEND(80, "80"); - PS2_MOUSE_SEND(PS2_MOUSE_GET_DEVICE_ID, "Finished enabling scroll wheel"); - wait_ms(20); -} - -#define PRESS_SCROLL_BUTTONS mouse_report->buttons |= (PS2_MOUSE_SCROLL_BTN_MASK) -#define RELEASE_SCROLL_BUTTONS mouse_report->buttons &= ~(PS2_MOUSE_SCROLL_BTN_MASK) -static inline void ps2_mouse_scroll_button_task(report_mouse_t *mouse_report) { - static enum { - SCROLL_NONE, - SCROLL_BTN, - SCROLL_SENT, - } scroll_state = SCROLL_NONE; - static uint16_t scroll_button_time = 0; - - if (PS2_MOUSE_SCROLL_BTN_MASK == (mouse_report->buttons & (PS2_MOUSE_SCROLL_BTN_MASK))) { - // All scroll buttons are pressed - - if (scroll_state == SCROLL_NONE) { - scroll_button_time = timer_read(); - scroll_state = SCROLL_BTN; - } - - // If the mouse has moved, update the report to scroll instead of move the mouse - if (mouse_report->x || mouse_report->y) { - scroll_state = SCROLL_SENT; - mouse_report->v = -mouse_report->y / (PS2_MOUSE_SCROLL_DIVISOR_V); - mouse_report->h = mouse_report->x / (PS2_MOUSE_SCROLL_DIVISOR_H); - mouse_report->x = 0; - mouse_report->y = 0; -#ifdef PS2_MOUSE_INVERT_H - mouse_report->h = -mouse_report->h; -#endif -#ifdef PS2_MOUSE_INVERT_V - mouse_report->v = -mouse_report->v; -#endif - } - } else if (0 == (PS2_MOUSE_SCROLL_BTN_MASK & mouse_report->buttons)) { - // None of the scroll buttons are pressed - -#if PS2_MOUSE_SCROLL_BTN_SEND - if (scroll_state == SCROLL_BTN && timer_elapsed(scroll_button_time) < PS2_MOUSE_SCROLL_BTN_SEND) { - PRESS_SCROLL_BUTTONS; - host_mouse_send(mouse_report); - wait_ms(100); - RELEASE_SCROLL_BUTTONS; - } -#endif - scroll_state = SCROLL_NONE; - } - - RELEASE_SCROLL_BUTTONS; -} diff --git a/tmk_core/protocol/ps2_usart.c b/tmk_core/protocol/ps2_usart.c deleted file mode 100644 index 6a66dc4a1e7..00000000000 --- a/tmk_core/protocol/ps2_usart.c +++ /dev/null @@ -1,213 +0,0 @@ -/* -Copyright 2010,2011,2012,2013 Jun WAKO <wakojun@gmail.com> - -This software is licensed with a Modified BSD License. -All of this is supposed to be Free Software, Open Source, DFSG-free, -GPL-compatible, and OK to use in both free and proprietary applications. -Additions and corrections to this file are welcome. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in - the documentation and/or other materials provided with the - distribution. - -* Neither the name of the copyright holders nor the names of - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. -*/ - -/* - * PS/2 protocol USART version - */ - -#include <stdbool.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include "ps2.h" -#include "ps2_io.h" -#include "print.h" - -#define WAIT(stat, us, err) \ - do { \ - if (!wait_##stat(us)) { \ - ps2_error = err; \ - goto ERROR; \ - } \ - } while (0) - -uint8_t ps2_error = PS2_ERR_NONE; - -static inline uint8_t pbuf_dequeue(void); -static inline void pbuf_enqueue(uint8_t data); -static inline bool pbuf_has_data(void); -static inline void pbuf_clear(void); - -void ps2_host_init(void) { - idle(); // without this many USART errors occur when cable is disconnected - PS2_USART_INIT(); - PS2_USART_RX_INT_ON(); - // POR(150-2000ms) plus BAT(300-500ms) may take 2.5sec([3]p.20) - //_delay_ms(2500); -} - -uint8_t ps2_host_send(uint8_t data) { - bool parity = true; - ps2_error = PS2_ERR_NONE; - - PS2_USART_OFF(); - - /* terminate a transmission if we have */ - inhibit(); - _delay_us(100); // [4]p.13 - - /* 'Request to Send' and Start bit */ - data_lo(); - clock_hi(); - WAIT(clock_lo, 10000, 10); // 10ms [5]p.50 - - /* Data bit[2-9] */ - for (uint8_t i = 0; i < 8; i++) { - _delay_us(15); - if (data & (1 << i)) { - parity = !parity; - data_hi(); - } else { - data_lo(); - } - WAIT(clock_hi, 50, 2); - WAIT(clock_lo, 50, 3); - } - - /* Parity bit */ - _delay_us(15); - if (parity) { - data_hi(); - } else { - data_lo(); - } - WAIT(clock_hi, 50, 4); - WAIT(clock_lo, 50, 5); - - /* Stop bit */ - _delay_us(15); - data_hi(); - - /* Ack */ - WAIT(data_lo, 50, 6); - WAIT(clock_lo, 50, 7); - - /* wait for idle state */ - WAIT(clock_hi, 50, 8); - WAIT(data_hi, 50, 9); - - idle(); - PS2_USART_INIT(); - PS2_USART_RX_INT_ON(); - return ps2_host_recv_response(); -ERROR: - idle(); - PS2_USART_INIT(); - PS2_USART_RX_INT_ON(); - return 0; -} - -uint8_t ps2_host_recv_response(void) { - // Command may take 25ms/20ms at most([5]p.46, [3]p.21) - uint8_t retry = 25; - while (retry-- && !pbuf_has_data()) { - _delay_ms(1); - } - return pbuf_dequeue(); -} - -uint8_t ps2_host_recv(void) { - if (pbuf_has_data()) { - ps2_error = PS2_ERR_NONE; - return pbuf_dequeue(); - } else { - ps2_error = PS2_ERR_NODATA; - return 0; - } -} - -ISR(PS2_USART_RX_VECT) { - // TODO: request RESEND when error occurs? - uint8_t error = PS2_USART_ERROR; // USART error should be read before data - uint8_t data = PS2_USART_RX_DATA; - if (!error) { - pbuf_enqueue(data); - } else { - xprintf("PS2 USART error: %02X data: %02X\n", error, data); - } -} - -/* send LED state to keyboard */ -void ps2_host_set_led(uint8_t led) { - ps2_host_send(0xED); - ps2_host_send(led); -} - -/*-------------------------------------------------------------------- - * Ring buffer to store scan codes from keyboard - *------------------------------------------------------------------*/ -#define PBUF_SIZE 32 -static uint8_t pbuf[PBUF_SIZE]; -static uint8_t pbuf_head = 0; -static uint8_t pbuf_tail = 0; -static inline void pbuf_enqueue(uint8_t data) { - uint8_t sreg = SREG; - cli(); - uint8_t next = (pbuf_head + 1) % PBUF_SIZE; - if (next != pbuf_tail) { - pbuf[pbuf_head] = data; - pbuf_head = next; - } else { - print("pbuf: full\n"); - } - SREG = sreg; -} -static inline uint8_t pbuf_dequeue(void) { - uint8_t val = 0; - - uint8_t sreg = SREG; - cli(); - if (pbuf_head != pbuf_tail) { - val = pbuf[pbuf_tail]; - pbuf_tail = (pbuf_tail + 1) % PBUF_SIZE; - } - SREG = sreg; - - return val; -} -static inline bool pbuf_has_data(void) { - uint8_t sreg = SREG; - cli(); - bool has_data = (pbuf_head != pbuf_tail); - SREG = sreg; - return has_data; -} -static inline void pbuf_clear(void) { - uint8_t sreg = SREG; - cli(); - pbuf_head = pbuf_tail = 0; - SREG = sreg; -} diff --git a/tmk_core/common/report.c b/tmk_core/protocol/report.c similarity index 100% rename from tmk_core/common/report.c rename to tmk_core/protocol/report.c diff --git a/tmk_core/protocol/report.h b/tmk_core/protocol/report.h new file mode 100644 index 00000000000..1adc892f3b7 --- /dev/null +++ b/tmk_core/protocol/report.h @@ -0,0 +1,325 @@ +/* +Copyright 2011,2012 Jun Wako <wakojun@gmail.com> + +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/>. +*/ + +#pragma once + +#include <stdint.h> +#include <stdbool.h> +#include "keycode.h" + +// clang-format off + +/* HID report IDs */ +enum hid_report_ids { + REPORT_ID_KEYBOARD = 1, + REPORT_ID_MOUSE, + REPORT_ID_SYSTEM, + REPORT_ID_CONSUMER, + REPORT_ID_PROGRAMMABLE_BUTTON, + REPORT_ID_NKRO, + REPORT_ID_JOYSTICK, + REPORT_ID_DIGITIZER +}; + +/* Mouse buttons */ +#define MOUSE_BTN_MASK(n) (1 << (n)) +enum mouse_buttons { + MOUSE_BTN1 = MOUSE_BTN_MASK(0), + MOUSE_BTN2 = MOUSE_BTN_MASK(1), + MOUSE_BTN3 = MOUSE_BTN_MASK(2), + MOUSE_BTN4 = MOUSE_BTN_MASK(3), + MOUSE_BTN5 = MOUSE_BTN_MASK(4), + MOUSE_BTN6 = MOUSE_BTN_MASK(5), + MOUSE_BTN7 = MOUSE_BTN_MASK(6), + MOUSE_BTN8 = MOUSE_BTN_MASK(7) +}; + +/* Consumer Page (0x0C) + * + * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=75 + */ +enum consumer_usages { + // 15.5 Display Controls + SNAPSHOT = 0x065, + BRIGHTNESS_UP = 0x06F, // https://www.usb.org/sites/default/files/hutrr41_0.pdf + BRIGHTNESS_DOWN = 0x070, + // 15.7 Transport Controls + TRANSPORT_RECORD = 0x0B2, + TRANSPORT_FAST_FORWARD = 0x0B3, + TRANSPORT_REWIND = 0x0B4, + TRANSPORT_NEXT_TRACK = 0x0B5, + TRANSPORT_PREV_TRACK = 0x0B6, + TRANSPORT_STOP = 0x0B7, + TRANSPORT_EJECT = 0x0B8, + TRANSPORT_RANDOM_PLAY = 0x0B9, + TRANSPORT_STOP_EJECT = 0x0CC, + TRANSPORT_PLAY_PAUSE = 0x0CD, + // 15.9.1 Audio Controls - Volume + AUDIO_MUTE = 0x0E2, + AUDIO_VOL_UP = 0x0E9, + AUDIO_VOL_DOWN = 0x0EA, + // 15.15 Application Launch Buttons + AL_CC_CONFIG = 0x183, + AL_EMAIL = 0x18A, + AL_CALCULATOR = 0x192, + AL_LOCAL_BROWSER = 0x194, + AL_LOCK = 0x19E, + AL_CONTROL_PANEL = 0x19F, + AL_ASSISTANT = 0x1CB, + AL_KEYBOARD_LAYOUT = 0x1AE, + // 15.16 Generic GUI Application Controls + AC_NEW = 0x201, + AC_OPEN = 0x202, + AC_CLOSE = 0x203, + AC_EXIT = 0x204, + AC_MAXIMIZE = 0x205, + AC_MINIMIZE = 0x206, + AC_SAVE = 0x207, + AC_PRINT = 0x208, + AC_PROPERTIES = 0x209, + AC_UNDO = 0x21A, + AC_COPY = 0x21B, + AC_CUT = 0x21C, + AC_PASTE = 0x21D, + AC_SELECT_ALL = 0x21E, + AC_FIND = 0x21F, + AC_SEARCH = 0x221, + AC_HOME = 0x223, + AC_BACK = 0x224, + AC_FORWARD = 0x225, + AC_STOP = 0x226, + AC_REFRESH = 0x227, + AC_BOOKMARKS = 0x22A +}; + +/* Generic Desktop Page (0x01) + * + * See https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf#page=26 + */ +enum desktop_usages { + // 4.5.1 System Controls - Power Controls + SYSTEM_POWER_DOWN = 0x81, + SYSTEM_SLEEP = 0x82, + SYSTEM_WAKE_UP = 0x83, + SYSTEM_RESTART = 0x8F, + // 4.10 System Display Controls + SYSTEM_DISPLAY_TOGGLE_INT_EXT = 0xB5 +}; + +// clang-format on + +#define NKRO_SHARED_EP +/* key report size(NKRO or boot mode) */ +#if defined(NKRO_ENABLE) +# if defined(PROTOCOL_LUFA) || defined(PROTOCOL_CHIBIOS) +# include "protocol/usb_descriptor.h" +# define KEYBOARD_REPORT_BITS (SHARED_EPSIZE - 2) +# elif defined(PROTOCOL_ARM_ATSAM) +# include "protocol/arm_atsam/usb/udi_device_epsize.h" +# define KEYBOARD_REPORT_BITS (NKRO_EPSIZE - 1) +# undef NKRO_SHARED_EP +# undef MOUSE_SHARED_EP +# else +# error "NKRO not supported with this protocol" +# endif +#endif + +#ifdef KEYBOARD_SHARED_EP +# define KEYBOARD_REPORT_SIZE 9 +#else +# define KEYBOARD_REPORT_SIZE 8 +#endif + +#define KEYBOARD_REPORT_KEYS 6 + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * keyboard report is 8-byte array retains state of 8 modifiers and 6 keys. + * + * byte |0 |1 |2 |3 |4 |5 |6 |7 + * -----+--------+--------+--------+--------+--------+--------+--------+-------- + * desc |mods |reserved|keys[0] |keys[1] |keys[2] |keys[3] |keys[4] |keys[5] + * + * It is exended to 16 bytes to retain 120keys+8mods when NKRO mode. + * + * byte |0 |1 |2 |3 |4 |5 |6 |7 ... |15 + * -----+--------+--------+--------+--------+--------+--------+--------+-------- +-------- + * desc |mods |bits[0] |bits[1] |bits[2] |bits[3] |bits[4] |bits[5] |bits[6] ... |bit[14] + * + * mods retains state of 8 modifiers. + * + * bit |0 |1 |2 |3 |4 |5 |6 |7 + * -----+--------+--------+--------+--------+--------+--------+--------+-------- + * desc |Lcontrol|Lshift |Lalt |Lgui |Rcontrol|Rshift |Ralt |Rgui + * + */ +typedef union { + uint8_t raw[KEYBOARD_REPORT_SIZE]; + struct { +#ifdef KEYBOARD_SHARED_EP + uint8_t report_id; +#endif + uint8_t mods; + uint8_t reserved; + uint8_t keys[KEYBOARD_REPORT_KEYS]; + }; +#ifdef NKRO_ENABLE + struct nkro_report { +# ifdef NKRO_SHARED_EP + uint8_t report_id; +# endif + uint8_t mods; + uint8_t bits[KEYBOARD_REPORT_BITS]; + } nkro; +#endif +} __attribute__((packed)) report_keyboard_t; + +typedef struct { + uint8_t report_id; + uint16_t usage; +} __attribute__((packed)) report_extra_t; + +typedef struct { + uint8_t report_id; + uint32_t usage; +} __attribute__((packed)) report_programmable_button_t; + +typedef struct { +#ifdef MOUSE_SHARED_EP + uint8_t report_id; +#endif + uint8_t buttons; + int8_t x; + int8_t y; + int8_t v; + int8_t h; +} __attribute__((packed)) report_mouse_t; + +typedef struct { +#ifdef DIGITIZER_SHARED_EP + uint8_t report_id; +#endif + uint8_t tip : 1; + uint8_t inrange : 1; + uint8_t pad2 : 6; + uint16_t x; + uint16_t y; +} __attribute__((packed)) report_digitizer_t; + +typedef struct { +#if JOYSTICK_AXES_COUNT > 0 +# if JOYSTICK_AXES_RESOLUTION > 8 + int16_t axes[JOYSTICK_AXES_COUNT]; +# else + int8_t axes[JOYSTICK_AXES_COUNT]; +# endif +#endif + +#if JOYSTICK_BUTTON_COUNT > 0 + uint8_t buttons[(JOYSTICK_BUTTON_COUNT - 1) / 8 + 1]; +#endif +} __attribute__((packed)) joystick_report_t; + +/* keycode to system usage */ +static inline uint16_t KEYCODE2SYSTEM(uint8_t key) { + switch (key) { + case KC_SYSTEM_POWER: + return SYSTEM_POWER_DOWN; + case KC_SYSTEM_SLEEP: + return SYSTEM_SLEEP; + case KC_SYSTEM_WAKE: + return SYSTEM_WAKE_UP; + default: + return 0; + } +} + +/* keycode to consumer usage */ +static inline uint16_t KEYCODE2CONSUMER(uint8_t key) { + switch (key) { + case KC_AUDIO_MUTE: + return AUDIO_MUTE; + case KC_AUDIO_VOL_UP: + return AUDIO_VOL_UP; + case KC_AUDIO_VOL_DOWN: + return AUDIO_VOL_DOWN; + case KC_MEDIA_NEXT_TRACK: + return TRANSPORT_NEXT_TRACK; + case KC_MEDIA_PREV_TRACK: + return TRANSPORT_PREV_TRACK; + case KC_MEDIA_FAST_FORWARD: + return TRANSPORT_FAST_FORWARD; + case KC_MEDIA_REWIND: + return TRANSPORT_REWIND; + case KC_MEDIA_STOP: + return TRANSPORT_STOP; + case KC_MEDIA_EJECT: + return TRANSPORT_STOP_EJECT; + case KC_MEDIA_PLAY_PAUSE: + return TRANSPORT_PLAY_PAUSE; + case KC_MEDIA_SELECT: + return AL_CC_CONFIG; + case KC_MAIL: + return AL_EMAIL; + case KC_CALCULATOR: + return AL_CALCULATOR; + case KC_MY_COMPUTER: + return AL_LOCAL_BROWSER; + case KC_WWW_SEARCH: + return AC_SEARCH; + case KC_WWW_HOME: + return AC_HOME; + case KC_WWW_BACK: + return AC_BACK; + case KC_WWW_FORWARD: + return AC_FORWARD; + case KC_WWW_STOP: + return AC_STOP; + case KC_WWW_REFRESH: + return AC_REFRESH; + case KC_BRIGHTNESS_UP: + return BRIGHTNESS_UP; + case KC_BRIGHTNESS_DOWN: + return BRIGHTNESS_DOWN; + case KC_WWW_FAVORITES: + return AC_BOOKMARKS; + default: + return 0; + } +} + +uint8_t has_anykey(report_keyboard_t* keyboard_report); +uint8_t get_first_key(report_keyboard_t* keyboard_report); +bool is_key_pressed(report_keyboard_t* keyboard_report, uint8_t key); + +void add_key_byte(report_keyboard_t* keyboard_report, uint8_t code); +void del_key_byte(report_keyboard_t* keyboard_report, uint8_t code); +#ifdef NKRO_ENABLE +void add_key_bit(report_keyboard_t* keyboard_report, uint8_t code); +void del_key_bit(report_keyboard_t* keyboard_report, uint8_t code); +#endif + +void add_key_to_report(report_keyboard_t* keyboard_report, uint8_t key); +void del_key_from_report(report_keyboard_t* keyboard_report, uint8_t key); +void clear_keys_from_report(report_keyboard_t* keyboard_report); + +#ifdef __cplusplus +} +#endif diff --git a/tmk_core/protocol/serial_mouse.h b/tmk_core/protocol/serial_mouse.h deleted file mode 100644 index cb83cf4f622..00000000000 --- a/tmk_core/protocol/serial_mouse.h +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2014 Robin Haberkorn <robin.haberkorn@googlemail.com> - -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/>. -*/ - -#pragma once - -#include <stdint.h> - -#include "serial.h" - -static inline uint8_t serial_mouse_init(void) { - serial_init(); - return 0; -} - -void serial_mouse_task(void); diff --git a/tmk_core/protocol/serial_mouse_microsoft.c b/tmk_core/protocol/serial_mouse_microsoft.c deleted file mode 100644 index eff0bf6e45f..00000000000 --- a/tmk_core/protocol/serial_mouse_microsoft.c +++ /dev/null @@ -1,113 +0,0 @@ -/* -Copyright 2014 Robin Haberkorn <robin.haberkorn@googlemail.com> - -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 <stdint.h> -#include <avr/io.h> -#include <util/delay.h> - -#include "serial.h" -#include "serial_mouse.h" -#include "report.h" -#include "host.h" -#include "timer.h" -#include "print.h" -#include "debug.h" - -#ifdef MAX -# undef MAX -#endif -#define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) - -static void print_usb_data(const report_mouse_t *report); - -void serial_mouse_task(void) { - /* 3 byte ring buffer */ - static uint8_t buffer[3]; - static int buffer_cur = 0; - - static report_mouse_t report = {}; - - int16_t rcv; - - rcv = serial_recv2(); - if (rcv < 0) /* no new data */ - return; - - if (debug_mouse) xprintf("serial_mouse: byte: %04X\n", rcv); - - /* - * If bit 6 is one, this signals the beginning - * of a 3 byte sequence/packet. - */ - if (rcv & (1 << 6)) buffer_cur = 0; - - buffer[buffer_cur] = (uint8_t)rcv; - - if (buffer_cur == 0 && buffer[buffer_cur] == 0x20) { - /* - * Logitech extension: This must be a follow-up on - * the last 3-byte packet signaling a middle button click - */ - report.buttons |= MOUSE_BTN3; - report.x = report.y = 0; - - print_usb_data(&report); - host_mouse_send(&report); - return; - } - - buffer_cur++; - - if (buffer_cur < 3) return; - buffer_cur = 0; - - /* - * parse 3 byte packet. - * NOTE: We only get a complete packet - * if the mouse moved or the button states - * change. - */ - report.buttons = 0; - if (buffer[0] & (1 << 5)) report.buttons |= MOUSE_BTN1; - if (buffer[0] & (1 << 4)) report.buttons |= MOUSE_BTN2; - - report.x = (buffer[0] << 6) | buffer[1]; - report.y = ((buffer[0] << 4) & 0xC0) | buffer[2]; - - /* USB HID uses values from -127 to 127 only */ - report.x = MAX(report.x, -127); - report.y = MAX(report.y, -127); - -#if 0 - if (!report.buttons && !report.x && !report.y) { - /* - * Microsoft extension: Middle mouse button pressed - * FIXME: I don't know how exactly this extension works. - */ - report.buttons |= MOUSE_BTN3; - } -#endif - - print_usb_data(&report); - host_mouse_send(&report); -} - -static void print_usb_data(const report_mouse_t *report) { - if (!debug_mouse) return; - - xprintf("serial_mouse usb: [%02X|%d %d %d %d]\n", report->buttons, report->x, report->y, report->v, report->h); -} diff --git a/tmk_core/protocol/serial_mouse_mousesystems.c b/tmk_core/protocol/serial_mouse_mousesystems.c deleted file mode 100644 index 0ec2b0399aa..00000000000 --- a/tmk_core/protocol/serial_mouse_mousesystems.c +++ /dev/null @@ -1,119 +0,0 @@ -/* -Copyright 2014 Robin Haberkorn <robin.haberkorn@googlemail.com> - -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 <stdint.h> -#include <avr/io.h> -#include <util/delay.h> - -#include "serial.h" -#include "serial_mouse.h" -#include "report.h" -#include "host.h" -#include "timer.h" -#include "print.h" -#include "debug.h" - -#ifdef MAX -# undef MAX -#endif -#define MAX(X, Y) ((X) > (Y) ? (X) : (Y)) - -//#define SERIAL_MOUSE_CENTER_SCROLL - -static void print_usb_data(const report_mouse_t *report); - -void serial_mouse_task(void) { - /* 5 byte ring buffer */ - static uint8_t buffer[5]; - static int buffer_cur = 0; - - int16_t rcv; - - report_mouse_t report = {0, 0, 0, 0, 0}; - - rcv = serial_recv2(); - if (rcv < 0) /* no new data */ - return; - - if (debug_mouse) xprintf("serial_mouse: byte: %04X\n", rcv); - - /* - * Synchronization: mouse(4) says that all - * bytes but the first one in the packet have - * bit 7 == 0, but this is untrue. - * Therefore we discard all bytes up to the - * first one with the characteristic bit pattern. - */ - if (buffer_cur == 0 && (rcv >> 3) != 0x10) return; - - buffer[buffer_cur++] = (uint8_t)rcv; - - if (buffer_cur < 5) return; - buffer_cur = 0; - -#ifdef SERIAL_MOUSE_CENTER_SCROLL - if ((buffer[0] & 0x7) == 0x5 && (buffer[1] || buffer[2])) { - /* USB HID uses only values from -127 to 127 */ - report.h = MAX((int8_t)buffer[1], -127); - report.v = MAX((int8_t)buffer[2], -127); - - print_usb_data(&report); - host_mouse_send(&report); - - if (buffer[3] || buffer[4]) { - report.h = MAX((int8_t)buffer[3], -127); - report.v = MAX((int8_t)buffer[4], -127); - - print_usb_data(&report); - host_mouse_send(&report); - } - - return; - } -#endif - - /* - * parse 5 byte packet. - * NOTE: We only get a complete packet - * if the mouse moved or the button states - * change. - */ - if (!(buffer[0] & (1 << 2))) report.buttons |= MOUSE_BTN1; - if (!(buffer[0] & (1 << 1))) report.buttons |= MOUSE_BTN3; - if (!(buffer[0] & (1 << 0))) report.buttons |= MOUSE_BTN2; - - /* USB HID uses only values from -127 to 127 */ - report.x = MAX((int8_t)buffer[1], -127); - report.y = MAX(-(int8_t)buffer[2], -127); - - print_usb_data(&report); - host_mouse_send(&report); - - if (buffer[3] || buffer[4]) { - report.x = MAX((int8_t)buffer[3], -127); - report.y = MAX(-(int8_t)buffer[4], -127); - - print_usb_data(&report); - host_mouse_send(&report); - } -} - -static void print_usb_data(const report_mouse_t *report) { - if (!debug_mouse) return; - - xprintf("serial_mouse usb: [%02X|%d %d %d %d]\n", report->buttons, report->x, report->y, report->v, report->h); -} diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 099964ae56f..a43755f8991 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -237,6 +237,25 @@ const USB_Descriptor_HIDReport_Datatype_t PROGMEM SharedReport[] = { HID_RI_END_COLLECTION(0), #endif +#ifdef PROGRAMMABLE_BUTTON_ENABLE + HID_RI_USAGE_PAGE(8, 0x0C), // Consumer + HID_RI_USAGE(8, 0x01), // Consumer Control + HID_RI_COLLECTION(8, 0x01), // Application + HID_RI_REPORT_ID(8, REPORT_ID_PROGRAMMABLE_BUTTON), + HID_RI_USAGE(8, 0x03), // Programmable Buttons + HID_RI_COLLECTION(8, 0x04), // Named Array + HID_RI_USAGE_PAGE(8, 0x09), // Button + HID_RI_USAGE_MINIMUM(8, 0x01), // Button 1 + HID_RI_USAGE_MAXIMUM(8, 0x20), // Button 32 + HID_RI_LOGICAL_MINIMUM(8, 0x00), + HID_RI_LOGICAL_MAXIMUM(8, 0x01), + HID_RI_REPORT_COUNT(8, 32), + HID_RI_REPORT_SIZE(8, 1), + HID_RI_INPUT(8, HID_IOF_DATA | HID_IOF_VARIABLE | HID_IOF_ABSOLUTE), + HID_RI_END_COLLECTION(0), + HID_RI_END_COLLECTION(0), +#endif + #ifdef NKRO_ENABLE HID_RI_USAGE_PAGE(8, 0x01), // Generic Desktop HID_RI_USAGE(8, 0x06), // Keyboard diff --git a/tmk_core/protocol/usb_device_state.c b/tmk_core/protocol/usb_device_state.c new file mode 100644 index 00000000000..84f01943be4 --- /dev/null +++ b/tmk_core/protocol/usb_device_state.c @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Andrei Purdea <andrei@purdea.ro> + * + * 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 "usb_device_state.h" +#if defined(HAPTIC_ENABLE) +# include "haptic.h" +#endif + +enum usb_device_state usb_device_state = USB_DEVICE_STATE_NO_INIT; + +__attribute__((weak)) void notify_usb_device_state_change_kb(enum usb_device_state usb_device_state) { notify_usb_device_state_change_user(usb_device_state); } + +__attribute__((weak)) void notify_usb_device_state_change_user(enum usb_device_state usb_device_state) {} + +static void notify_usb_device_state_change(enum usb_device_state usb_device_state) { +#if defined(HAPTIC_ENABLE) && HAPTIC_OFF_IN_LOW_POWER + haptic_notify_usb_device_state_change(); +#endif + notify_usb_device_state_change_kb(usb_device_state); +} + +void usb_device_state_set_configuration(bool isConfigured, uint8_t configurationNumber) { + usb_device_state = isConfigured ? USB_DEVICE_STATE_CONFIGURED : USB_DEVICE_STATE_INIT; + notify_usb_device_state_change(usb_device_state); +} + +void usb_device_state_set_suspend(bool isConfigured, uint8_t configurationNumber) { + usb_device_state = USB_DEVICE_STATE_SUSPEND; + notify_usb_device_state_change(usb_device_state); +} + +void usb_device_state_set_resume(bool isConfigured, uint8_t configurationNumber) { + usb_device_state = isConfigured ? USB_DEVICE_STATE_CONFIGURED : USB_DEVICE_STATE_INIT; + notify_usb_device_state_change(usb_device_state); +} + +void usb_device_state_set_reset(void) { + usb_device_state = USB_DEVICE_STATE_INIT; + notify_usb_device_state_change(usb_device_state); +} + +void usb_device_state_init(void) { + usb_device_state = USB_DEVICE_STATE_INIT; + notify_usb_device_state_change(usb_device_state); +} diff --git a/tmk_core/protocol/usb_device_state.h b/tmk_core/protocol/usb_device_state.h new file mode 100644 index 00000000000..c229311d467 --- /dev/null +++ b/tmk_core/protocol/usb_device_state.h @@ -0,0 +1,39 @@ +/* + * Copyright 2021 Andrei Purdea <andrei@purdea.ro> + * + * 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/>. + */ + +#pragma once + +#include <stdbool.h> +#include <stdint.h> + +void usb_device_state_set_configuration(bool isConfigured, uint8_t configurationNumber); +void usb_device_state_set_suspend(bool isConfigured, uint8_t configurationNumber); +void usb_device_state_set_resume(bool isConfigured, uint8_t configurationNumber); +void usb_device_state_set_reset(void); +void usb_device_state_init(void); + +enum usb_device_state { + USB_DEVICE_STATE_NO_INIT = 0, // We're in this state before calling usb_device_state_init() + USB_DEVICE_STATE_INIT = 1, // Can consume up to 100mA + USB_DEVICE_STATE_CONFIGURED = 2, // Can consume up to what is specified in configuration descriptor, typically 500mA + USB_DEVICE_STATE_SUSPEND = 3 // Can consume only suspend current +}; + +extern enum usb_device_state usb_device_state; + +void notify_usb_device_state_change_kb(enum usb_device_state usb_device_state); +void notify_usb_device_state_change_user(enum usb_device_state usb_device_state); diff --git a/tmk_core/protocol/usb_hid/override_wiring.c b/tmk_core/protocol/usb_hid/override_wiring.c index 52f03c300fb..adc6645f8eb 100644 --- a/tmk_core/protocol/usb_hid/override_wiring.c +++ b/tmk_core/protocol/usb_hid/override_wiring.c @@ -3,7 +3,7 @@ */ #define __DELAY_BACKWARD_COMPATIBLE__ #include <util/delay.h> -#include "common/timer.h" +#include "platforms/timer.h" unsigned long millis(void) diff --git a/tmk_core/protocol/usb_hid/parser.h b/tmk_core/protocol/usb_hid/parser.h index 036281fa661..ba35b7af5a7 100644 --- a/tmk_core/protocol/usb_hid/parser.h +++ b/tmk_core/protocol/usb_hid/parser.h @@ -1,5 +1,4 @@ -#ifndef PARSER_H -#define PARSER_H +#pragma once #include "hid.h" #include "report.h" @@ -11,5 +10,3 @@ public: uint16_t time_stamp; virtual void Parse(HID *hid, bool is_rpt_id, uint8_t len, uint8_t *buf); }; - -#endif diff --git a/tmk_core/protocol/usb_hid/usb_hid.h b/tmk_core/protocol/usb_hid/usb_hid.h index 083b68d1f5c..5cb5f5d0356 100644 --- a/tmk_core/protocol/usb_hid/usb_hid.h +++ b/tmk_core/protocol/usb_hid/usb_hid.h @@ -1,10 +1,6 @@ -#ifndef USB_HID_H -#define USB_HID_H +#pragma once #include "report.h" - extern report_keyboard_t usb_hid_keyboard_report; extern uint16_t usb_hid_time_stamp; - -#endif diff --git a/tmk_core/common/usb_util.c b/tmk_core/protocol/usb_util.c similarity index 100% rename from tmk_core/common/usb_util.c rename to tmk_core/protocol/usb_util.c diff --git a/tmk_core/common/usb_util.h b/tmk_core/protocol/usb_util.h similarity index 100% rename from tmk_core/common/usb_util.h rename to tmk_core/protocol/usb_util.h diff --git a/tmk_core/protocol/vusb/protocol.c b/tmk_core/protocol/vusb/protocol.c index 89dc795b216..644e77e021a 100644 --- a/tmk_core/protocol/vusb/protocol.c +++ b/tmk_core/protocol/vusb/protocol.c @@ -111,22 +111,16 @@ void protocol_setup(void) { // clock prescaler clock_prescale_set(clock_div_1); #endif - keyboard_setup(); } -void protocol_init(void) { +void protocol_pre_init(void) { setup_usb(); sei(); +} - keyboard_init(); - +void protocol_post_init(void) { host_set_driver(vusb_driver()); - wait_ms(50); - -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif } void protocol_task(void) { diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index 485b20c900e..bd0f1c21aa9 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -226,8 +226,9 @@ static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); static void send_system(uint16_t data); static void send_consumer(uint16_t data); +static void send_programmable_button(uint32_t data); -static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; host_driver_t *vusb_driver(void) { return &driver; } @@ -300,6 +301,20 @@ void send_digitizer(report_digitizer_t *report) { #endif } +static void send_programmable_button(uint32_t data) { +#ifdef PROGRAMMABLE_BUTTON_ENABLE + static report_programmable_button_t report = { + .report_id = REPORT_ID_PROGRAMMABLE_BUTTON, + }; + + report.usage = data; + + if (usbInterruptIsReadyShared()) { + usbSetInterruptShared((void *)&report, sizeof(report)); + } +#endif +} + /*------------------------------------------------------------------* * Request from host * *------------------------------------------------------------------*/ @@ -555,7 +570,27 @@ const PROGMEM uchar shared_hid_report[] = { 0x09, 0x31, // Usage (Y) 0x81, 0x02, // Input (Data, Variable, Absolute) 0xC0, // End Collection - 0xC0 // End Collection + 0xC0, // End Collection +#endif + +#ifdef PROGRAMMABLE_BUTTON_ENABLE + // Programmable buttons report descriptor + 0x05, 0x0C, // Usage Page (Consumer) + 0x09, 0x01, // Usage (Consumer Control) + 0xA1, 0x01, // Collection (Application) + 0x85, REPORT_ID_PROGRAMMABLE_BUTTON, // Report ID + 0x09, 0x03, // Usage (Programmable Buttons) + 0xA1, 0x04, // Collection (Named Array) + 0x05, 0x09, // Usage Page (Button) + 0x19, 0x01, // Usage Minimum (Button 1) + 0x29, 0x20, // Usage Maximum (Button 32) + 0x15, 0x00, // Logical Minimum (0) + 0x25, 0x01, // Logical Maximum (1) + 0x95, 0x20, // Report Count (32) + 0x75, 0x01, // Report Size (1) + 0x81, 0x02, // Input (Data, Variable, Absolute) + 0xC0, // End Collection + 0xC0, // End Collection #endif #ifdef SHARED_EP_ENABLE diff --git a/tmk_core/readme.md b/tmk_core/readme.md index a754cfee42d..a47dc881859 100644 --- a/tmk_core/readme.md +++ b/tmk_core/readme.md @@ -25,7 +25,6 @@ These features can be used in your keyboard. * Media Control Key - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc * USB NKRO - 248 keys(+ 8 modifiers) simultaneously * PS/2 mouse support - PS/2 mouse(TrackPoint) as composite device -* Keyboard protocols - PS/2, ADB, M0110, Sun and other old keyboard protocols * User Function - Customizable function of key with writing code * Macro - Very primitive at this time * Keyboard Tricks - Oneshot modifier and modifier with tapping feature @@ -84,9 +83,9 @@ Architecture / /| Keys/Mouse | Protocol |d| | Action | | | Protocol | /__________/ |<-----------| LUFA |r| | Layer, Tap | | | Matrix | |.--------.| | LED | V-USB |i| |-------------| | | PS/2,IBM | __________________ - || || |----------->| UART |v| | Keymap | | | ADB,M0110| Keys / /_/_/_/_/_/_/_/ /| - || Host || | Console | |e| | Mousekey | | | SUN/NEWS |<----------/ /_/_/_/_/_/_/_/ / / - ||________||/.<-----------| |r| | Report | | | X68K/PC98| Control / /_/_/_/_/_/_/_/ / / + || || |----------->| UART |v| | Keymap | | | | Keys / /_/_/_/_/_/_/_/ /| + || Host || | Console | |e| | Mousekey | | | |<----------/ /_/_/_/_/_/_/_/ / / + ||________||/.<-----------| |r| | Report | | | | Control / /_/_/_/_/_/_/_/ / / `_========_'/| |---------------------------------------------|-------->/___ /_______/ ___/ / |_o______o_|/ | Sendchar, Print, Debug, Command, ... | |_________________|/ +---------------------------------------------+ Keyboard @@ -134,10 +133,6 @@ Files and Directories * lufa/ - LUFA USB stack * vusb/ - Objective Development V-USB * ps2.c - PS/2 protocol -* adb.c - Apple Desktop Bus protocol -* m0110.c - Macintosh 128K/512K/Plus keyboard protocol -* news.c - Sony NEWS keyboard protocol -* x68k.c - Sharp X68000 keyboard protocol * serial_soft.c - Asynchronous Serial protocol implemented by software diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk index 5a629d1eb09..6767a8e4af8 100644 --- a/tmk_core/rules.mk +++ b/tmk_core/rules.mk @@ -69,8 +69,11 @@ CSTANDARD = -std=gnu99 #CXXDEFS += -D__STDC_CONSTANT_MACROS #CXXDEFS += - - +# Speed up recompilations by opt-in usage of ccache +USE_CCACHE ?= no +ifneq ($(USE_CCACHE),no) + CC_PREFIX ?= ccache +endif #---------------- Compiler Options C ---------------- # -g*: generate debugging information @@ -78,7 +81,15 @@ CSTANDARD = -std=gnu99 # -f...: tuning, see GCC manual and avr-libc documentation # -Wall...: warning level # -Wa,...: tell GCC to pass this to the assembler. -# -adhlns...: create assembler listing +ifeq ($(strip $(LTO_ENABLE)), yes) + ifeq ($(PLATFORM),CHIBIOS) + $(info Enabling LTO on ChibiOS-targeting boards is known to have a high likelihood of failure.) + $(info If unsure, set LTO_ENABLE = no.) + endif + CDEFS += -flto + CDEFS += -DLTO_ENABLE +endif + DEBUG_ENABLE ?= yes ifeq ($(strip $(SKIP_DEBUG_INFO)),yes) DEBUG_ENABLE=no @@ -105,10 +116,6 @@ endif #CFLAGS += -Wundef #CFLAGS += -Wunreachable-code #CFLAGS += -Wsign-compare -GCC_VERSION := $(shell gcc --version 2>/dev/null) -ifeq ($(findstring clang, ${GCC_VERSION}),) -CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) -endif CFLAGS += $(CSTANDARD) # This fixes lots of keyboards linking errors but SHOULDN'T BE A FINAL SOLUTION @@ -121,7 +128,6 @@ CFLAGS += -fcommon # -f...: tuning, see GCC manual and avr-libc documentation # -Wall...: warning level # -Wa,...: tell GCC to pass this to the assembler. -# -adhlns...: create assembler listing ifeq ($(strip $(DEBUG_ENABLE)),yes) CXXFLAGS += -g$(DEBUG) endif @@ -140,28 +146,10 @@ endif #CXXFLAGS += -Wstrict-prototypes #CXXFLAGS += -Wunreachable-code #CXXFLAGS += -Wsign-compare -ifeq ($(findstring clang, ${GCC_VERSION}),) -CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) -endif #CXXFLAGS += $(CSTANDARD) #---------------- Assembler Options ---------------- -# -Wa,...: tell GCC to pass this to the assembler. -# -adhlns: create listing -# -gstabs: have the assembler create line number information; note that -# for use in COFF files, additional information about filenames -# and function names needs to be present in the assembler source -# files -- see avr-libc docs [FIXME: not yet described there] -# -listing-cont-lines: Sets the maximum number of continuation lines of hex -# dump that will be displayed for a given single line of source input. ASFLAGS += $(ADEFS) -ifeq ($(findstring clang, ${GCC_VERSION}),) -ifeq ($(strip $(DEBUG_ENABLE)),yes) - ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 -else - ASFLAGS += -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 -endif -endif ifeq ($(VERBOSE_AS_CMD),yes) ASFLAGS += -v endif @@ -218,6 +206,32 @@ LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB) # You can give EXTRALDFLAGS at 'make' command line. LDFLAGS += $(EXTRALDFLAGS) +#---------------- Assembler Listings ---------------- +# -Wa,...: tell GCC to pass this to the assembler. +# -adhlns: create listing +# -gstabs: have the assembler create line number information; note that +# for use in COFF files, additional information about filenames +# and function names needs to be present in the assembler source +# files -- see avr-libc docs [FIXME: not yet described there] +# -listing-cont-lines: Sets the maximum number of continuation lines of hex +# dump that will be displayed for a given single line of source input. + +ADHLNS_ENABLE ?= no +ifeq ($(ADHLNS_ENABLE),yes) + # Avoid "Options to '-Xassembler' do not match" - only specify assembler options at LTO link time + ifeq ($(strip $(LTO_ENABLE)), yes) + LDFLAGS += -Wa,-adhlns=$(BUILD_DIR)/$(TARGET).lst + else + CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) + CXXFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) + ifeq ($(strip $(DEBUG_ENABLE)),yes) + ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 + else + ASFLAGS = -Wa,-adhlns=$(@:%.o=%.lst),--listing-cont-lines=100 + endif + endif +endif + # Define programs and commands. SHELL = sh REMOVE = rm -f @@ -347,7 +361,7 @@ BEGIN = gccversion sizebefore # Note the obj.txt depeendency is there to force linking if a source file is deleted %.elf: $(OBJ) $(MASTER_OUTPUT)/cflags.txt $(MASTER_OUTPUT)/ldflags.txt $(MASTER_OUTPUT)/obj.txt | $(BEGIN) @$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD) - $(eval CMD=$(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) + $(eval CMD=MAKE=$(MAKE) $(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS)) @$(BUILD_CMD) @@ -465,7 +479,7 @@ ifeq ($(findstring avr-gcc,$(CC)),avr-gcc) SIZE_MARGIN = 1024 check-size: - $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) tmk_core/common/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) + $(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | sed -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0)) $(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi)) $(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE))) $(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE))) diff --git a/users/bcat/rules.mk b/users/bcat/rules.mk index 651ee96fe07..12c9a89bf4a 100644 --- a/users/bcat/rules.mk +++ b/users/bcat/rules.mk @@ -1,7 +1,7 @@ SRC += bcat.c # Enable Bootmagic Lite to consistently reset to bootloader and clear EEPROM. -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite # Enable media keys on all keyboards. EXTRAKEY_ENABLE = yes diff --git a/users/curry/config.h b/users/curry/config.h index e3c0a103ef8..31baea62570 100644 --- a/users/curry/config.h +++ b/users/curry/config.h @@ -19,42 +19,42 @@ # define RGB_MATRIX_FRAMEBUFFER_EFFECTS # define RGB_DISABLE_WHEN_USB_SUSPENDED -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// # undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +// # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif // RGB_MATRIX_ENABLE #if !defined(ONESHOT_TAP_TOGGLE) diff --git a/users/curry/oled.c b/users/curry/oled.c index fc87a46e50f..27f6072ff17 100644 --- a/users/curry/oled.c +++ b/users/curry/oled.c @@ -137,7 +137,7 @@ void render_status_secondary(void) { render_keylogger_status(); } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > 30000) { oled_off(); return; @@ -152,6 +152,7 @@ void oled_task_user(void) { } else { render_status_secondary(); } + return false; } bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { diff --git a/users/drashna/config.h b/users/drashna/config.h index a7c99ed0d6b..ebb8d7b7ac5 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -83,54 +83,103 @@ // # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects // # define RGB_DISABLE_WHEN_USB_SUSPENDED // turn off effects when suspended -# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad) -# define DISABLE_RGB_MATRIX_ALPHAS_MODS -# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN -# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_BREATHING -# define DISABLE_RGB_MATRIX_BAND_SAT -# define DISABLE_RGB_MATRIX_BAND_VAL -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -# define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -# define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -# define DISABLE_RGB_MATRIX_CYCLE_ALL -# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_moonlander) -# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -# endif -# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -# define DISABLE_RGB_MATRIX_DUAL_BEACON -# define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -# define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -# define DISABLE_RGB_MATRIX_RAINBOW_BEACON -# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -# define DISABLE_RGB_MATRIX_RAINDROPS -# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -# define DISABLE_RGB_MATRIX_HUE_BREATHING -# define DISABLE_RGB_MATRIX_HUE_PENDULUM -# define DISABLE_RGB_MATRIX_HUE_WAVE -# define DISABLE_RGB_MATRIX_PIXEL_RAIN -# define DISABLE_RGB_MATRIX_PIXEL_FLOW -# define DISABLE_RGB_MATRIX_PIXEL_FRACTAL -// # define DISABLE_RGB_MATRIX_TYPING_HEATMAP -# define DISABLE_RGB_MATRIX_DIGITAL_RAIN -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -# define DISABLE_RGB_MATRIX_SPLASH -# define DISABLE_RGB_MATRIX_MULTISPLASH -# define DISABLE_RGB_MATRIX_SOLID_SPLASH -# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +# undef ENABLE_RGB_MATRIX_ALPHAS_MODS +# undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_BREATHING +# undef ENABLE_RGB_MATRIX_BAND_SAT +# undef ENABLE_RGB_MATRIX_BAND_VAL +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# undef ENABLE_RGB_MATRIX_CYCLE_ALL +# undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# undef ENABLE_RGB_MATRIX_HUE_BREATHING +# undef ENABLE_RGB_MATRIX_HUE_PENDULUM +# undef ENABLE_RGB_MATRIX_HUE_WAVE +# undef ENABLE_RGB_MATRIX_PIXEL_RAIN +# undef ENABLE_RGB_MATRIX_PIXEL_FLOW +# undef ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only of RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# if !defined(SPLIT_KEYBOARD) && !defined(KEYBOARD_ergodox_ez) && !defined(KEYBOARD_moonlander) +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# endif +# if defined(__arm__) || defined(__AVR_AT90USB1286__) || defined(KEYBOARD_launchpad) +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH # endif // AVR -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE #ifdef OLED_ENABLE # ifdef SPLIT_KEYBOARD diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c index 6413f5e1c75..396e5e05b76 100644 --- a/users/drashna/oled_stuff.c +++ b/users/drashna/oled_stuff.c @@ -421,13 +421,13 @@ oled_rotation_t oled_init_user(oled_rotation_t rotation) { return oled_init_keymap(rotation); } -void oled_task_user(void) { +bool oled_task_user(void) { update_log(); if (is_keyboard_master()) { if (timer_elapsed32(oled_timer) > 30000) { oled_off(); - return; + return false; } else { oled_on(); } @@ -442,4 +442,5 @@ void oled_task_user(void) { } else { render_keylock_status(host_keyboard_leds()); } + return false; } diff --git a/users/dshields/config.h b/users/dshields/config.h index aa108147631..9a722b89e66 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -14,44 +14,44 @@ #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 -#define DISABLE_RGB_MATRIX_ALPHAS_MODS -#define DISABLE_RGB_MATRIX_BREATHING -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT -#define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL -#define DISABLE_RGB_MATRIX_BAND_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT -#define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL -#define DISABLE_RGB_MATRIX_BAND_VAL -#define DISABLE_RGB_MATRIX_CYCLE_ALL -#define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN -#define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL -#define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL -#define DISABLE_RGB_MATRIX_CYCLE_SPIRAL -#define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN -#define DISABLE_RGB_MATRIX_DUAL_BEACON -#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS -#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON -#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_ALPHAS_MODS +#undef ENABLE_RGB_MATRIX_BREATHING +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +#undef ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +#undef ENABLE_RGB_MATRIX_BAND_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +#undef ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +#undef ENABLE_RGB_MATRIX_BAND_VAL +#undef ENABLE_RGB_MATRIX_CYCLE_ALL +#undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +#undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +#undef ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +#undef ENABLE_RGB_MATRIX_CYCLE_SPIRAL +#undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +#undef ENABLE_RGB_MATRIX_DUAL_BEACON +#undef ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +#undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +#undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_MULTISPLASH diff --git a/users/ninjonas/oled.c b/users/ninjonas/oled.c index 1d88c305793..55eaf88ccbe 100644 --- a/users/ninjonas/oled.c +++ b/users/ninjonas/oled.c @@ -90,7 +90,7 @@ static void render_logo(void) { oled_write_P(qmk_logo, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed32(oled_timer) > 15000) { oled_off(); return; @@ -106,6 +106,7 @@ void oled_task_user(void) { oled_write_P(PSTR("\n"), false); oled_scroll_left(); } + return false; } #endif diff --git a/users/nstickney/rules.mk b/users/nstickney/rules.mk index 0f189e8a4fe..cad245cc244 100644 --- a/users/nstickney/rules.mk +++ b/users/nstickney/rules.mk @@ -25,9 +25,8 @@ UCIS_ENABLE = no LTO_ENABLE = yes # https://beta.docs.qmk.fm/developing-qmk/qmk-reference/getting_started_make_guide#rules-mk-options -API_SYSEX_ENABLE = no AUDIO_ENABLE = no -BOOTMAGIC_ENABLE = no +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite COMMAND_ENABLE = no CONSOLE_ENABLE = no MOUSEKEY_ENABLE = no diff --git a/users/riblee/riblee.c b/users/riblee/riblee.c index 04e37b2428a..307c6972049 100644 --- a/users/riblee/riblee.c +++ b/users/riblee/riblee.c @@ -245,10 +245,9 @@ static void render_info(void) { } // Print string received via HID RAW - oled_write_ln(receive_buffer, false); -} + oled_write_ln(receive_buffer, false);} -void oled_task_user(void) { +bool oled_task_user(void) { static bool finished_timer = false; if (!finished_timer && (timer_elapsed(startup_timer) < 1000)) { render_logo(); @@ -259,6 +258,8 @@ void oled_task_user(void) { } render_info(); } + return false; + } #ifdef RAW_ENABLE diff --git a/users/ridingqwerty/rules.mk b/users/ridingqwerty/rules.mk index 93b88068eda..cc53f3f53e2 100644 --- a/users/ridingqwerty/rules.mk +++ b/users/ridingqwerty/rules.mk @@ -1,7 +1,7 @@ SRC += ridingqwerty.c \ process_records.c -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite CONSOLE_ENABLE = no COMMAND_ENABLE = no UNICODE_ENABLE = no # "yes" in Atreus default keymap, blocking UNICODEMAP_ENABLE diff --git a/users/snowe/oled_setup.c b/users/snowe/oled_setup.c index 3d21ea9f0a1..dfc4b085e30 100644 --- a/users/snowe/oled_setup.c +++ b/users/snowe/oled_setup.c @@ -121,7 +121,7 @@ void render_bootmagic_status(void) { oled_write_ln(wpm, false); } -void oled_task_user(void) { +bool oled_task_user(void) { if (is_master) { oled_render_layer_state(); oled_render_keylog(); @@ -136,6 +136,7 @@ void oled_task_user(void) { render_stars(); # endif } + return false; } #endif // OLED_ENABLE diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index 69327038b7f..de8ed113e77 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite CONSOLE_ENABLE = yes # Console for debug BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality LTO_ENABLE = yes diff --git a/users/stanrc85/config.h b/users/stanrc85/config.h index 60592c3c6b1..b883a21dd26 100644 --- a/users/stanrc85/config.h +++ b/users/stanrc85/config.h @@ -12,9 +12,15 @@ #ifdef KEYBOARD_sneakbox_aliceclone #define INDICATOR_PIN_0 D7 #define INDICATOR_PIN_1 D6 - #define INDICATOR_PIN_2 D4 + #define INDICATOR_PIN_2 D4 #endif #ifdef KEYBOARD_boardsource_the_mark #define RGB_MATRIX_KEYPRESSES -#endif \ No newline at end of file +#endif + +#ifdef KEYBOARD_jacky_studio_bear_65 + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_TYPING_HEATMAP +#endif diff --git a/users/talljoe/rules.mk b/users/talljoe/rules.mk index 632e725b710..9338568b97b 100644 --- a/users/talljoe/rules.mk +++ b/users/talljoe/rules.mk @@ -13,4 +13,4 @@ TAP_DANCE_ENABLE=yes CONSOLE_ENABLE=no COMMAND_ENABLE=no DYNAMIC_KEYMAP_ENABLE=no -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite diff --git a/users/talljoe/visualizer.c b/users/talljoe/visualizer.c deleted file mode 100644 index c17b56706bf..00000000000 --- a/users/talljoe/visualizer.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright 2020 Joseph Wasson - * - * 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 "talljoe.h" - -static void get_visualizer_layer_and_color(visualizer_state_t* state) { - state->status_text = layer_names[biton32(state->status.layer)]; -} diff --git a/users/tominabox1/config.h b/users/tominabox1/config.h index 004f58ab532..4a2433eb0bd 100644 --- a/users/tominabox1/config.h +++ b/users/tominabox1/config.h @@ -41,33 +41,33 @@ #define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT /* Disable the animations you don't want/need. You will need to disable a good number of these because they take up a lot of space. Disable until you can successfully compile your firmware. */ - // #define DISABLE_RGB_MATRIX_ALPHAS_MODS - // #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN - #define DISABLE_RGB_MATRIX_BREATHING - // #define DISABLE_RGB_MATRIX_CYCLE_ALL - // #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT - // #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN - // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN - // #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL - #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON - #define DISABLE_RGB_MATRIX_DUAL_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_BEACON - #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS - // #define DISABLE_RGB_MATRIX_RAINDROPS - #define DISABLE_RGB_MATRIX_JELLYBEN_RAINDROPS - // # define DISABLE_RGB_MATRIX_TYPING_HEATMAP - #define DISABLE_RGB_MATRIX_DIGITAL_RAIN - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS - // #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS - #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS - #define DISABLE_RGB_MATRIX_SPLASH - #define DISABLE_RGB_MATRIX_MULTISPLASH - #define DISABLE_RGB_MATRIX_SOLID_SPLASH - #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +// #undef ENABLE_RGB_MATRIX_ALPHAS_MODS +// #undef ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# undef ENABLE_RGB_MATRIX_BREATHING +// #undef ENABLE_RGB_MATRIX_CYCLE_ALL +// #undef ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +// #undef ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN +// #undef ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# undef ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# undef ENABLE_RGB_MATRIX_DUAL_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_BEACON +# undef ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +// #undef ENABLE_RGB_MATRIX_RAINDROPS +# undef ENABLE_RGB_MATRIX_JELLYBEN_RAINDROPS +// # undef ENABLE_RGB_MATRIX_TYPING_HEATMAP +# undef ENABLE_RGB_MATRIX_DIGITAL_RAIN +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +// #undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# undef ENABLE_RGB_MATRIX_SPLASH +# undef ENABLE_RGB_MATRIX_MULTISPLASH +# undef ENABLE_RGB_MATRIX_SOLID_SPLASH +# undef ENABLE_RGB_MATRIX_SOLID_MULTISPLASH #endif //RGB_MATRIX_ENABLE // Hex size reduction options diff --git a/users/tominabox1/rules.mk b/users/tominabox1/rules.mk index 160dcce7b92..1df56346404 100644 --- a/users/tominabox1/rules.mk +++ b/users/tominabox1/rules.mk @@ -5,7 +5,7 @@ CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes NKRO_ENABLE = yes -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite ifeq ($(strip $(KEYBOARD)), crkbd/rev1) RGB_MATRIX_ENABLE = yes diff --git a/users/tominabox1/tominabox1.c b/users/tominabox1/tominabox1.c index e48959be9d8..7322ead0dc3 100644 --- a/users/tominabox1/tominabox1.c +++ b/users/tominabox1/tominabox1.c @@ -262,7 +262,7 @@ void render_status_main(void) { __attribute__ ((weak)) void oled_task_keymap(void) {} -void oled_task_user(void) { +bool oled_task_user(void) { if (timer_elapsed(oled_timer) > 20000) { oled_off(); @@ -275,6 +275,7 @@ void oled_task_user(void) { oled_scroll_left(); } oled_task_keymap(); + return false; } #endif // OLED_Driver diff --git a/users/wanleg/rules.mk b/users/wanleg/rules.mk index eb66a49e6fa..410803512d7 100644 --- a/users/wanleg/rules.mk +++ b/users/wanleg/rules.mk @@ -21,8 +21,8 @@ ifeq ($(strip $(BT)), yes) #opt_defs for alternate pin usage OPT_DEFS += -DBLUEFRUIT #Adafruit Bluefruit controller settings - BLUETOOTH = AdafruitBLE BLUETOOTH_ENABLE = yes + BLUETOOTH_DRIVER = AdafruitBLE F_CPU = 8000000 CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -42,4 +42,4 @@ endif #example usage: make gherkin:wanleg flip=yes ifeq ($(strip $(flip)), yes) OPT_DEFS += -DFLIP -endif \ No newline at end of file +endif diff --git a/users/xulkal/config.h b/users/xulkal/config.h index e000b97acdb..88e3efbe72d 100644 --- a/users/xulkal/config.h +++ b/users/xulkal/config.h @@ -24,11 +24,11 @@ #endif // No need for the single versions when multi performance isn't a problem =D -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS -#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS -#define DISABLE_RGB_MATRIX_SPLASH -#define DISABLE_RGB_MATRIX_SOLID_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +#undef ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +#undef ENABLE_RGB_MATRIX_SPLASH +#undef ENABLE_RGB_MATRIX_SOLID_SPLASH // 20m timeout (20m * 60s * 1000mil) #define RGB_DISABLE_TIMEOUT 1200000 diff --git a/users/xulkal/custom_oled.c b/users/xulkal/custom_oled.c index 4ed2b9a0b09..7fe80409277 100644 --- a/users/xulkal/custom_oled.c +++ b/users/xulkal/custom_oled.c @@ -176,7 +176,7 @@ static void render_status(void) #endif // OLED_90ROTATION -void oled_task_user(void) +bool oled_task_user(void) { if (is_keyboard_master()) render_status(); @@ -185,4 +185,5 @@ void oled_task_user(void) render_logo(); oled_scroll_left(); } + return false; } diff --git a/users/yanfali/rules.mk b/users/yanfali/rules.mk index 631dda4fb30..6c0c48c7643 100644 --- a/users/yanfali/rules.mk +++ b/users/yanfali/rules.mk @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = lite # Enable Bootmagic Lite +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite DYNAMIC_KEYMAP_ENABLE = no LTO_ENABLE = yes AUDIO_ENABLE = no diff --git a/util/chibios_conf_updater.sh b/util/chibios_conf_updater.sh index 5ba8aa677b6..a5699ca3cb2 100755 --- a/util/chibios_conf_updater.sh +++ b/util/chibios_conf_updater.sh @@ -3,6 +3,17 @@ set -eEuo pipefail umask 022 +##################### +# You will need to get an older JDK -- JDK 8 +# +# !!!!!!!! DO NOT INSTALL THIS IF YOU HAVE AN EXISTING JDK OR JRE INSTALLED !!!!!!!! +# +# For Debian 10-ish distro's: +# wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add - +# sudo add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/ +# sudo apt-get update && sudo apt-get install adoptopenjdk-8-hotspot + + sinfo() { echo "$@" >&2 ; } shead() { sinfo "" ; sinfo "---------------------------------" ; sinfo "-- $@" ; sinfo "---------------------------------" ; } havecmd() { command command type "${1}" >/dev/null 2>&1 || return 1 ; } @@ -11,8 +22,6 @@ this_script="$(realpath "${BASH_SOURCE[0]}")" script_dir="$(realpath "$(dirname "$this_script")")" qmk_firmware_dir="$(realpath "$script_dir/../")" -declare -A file_hashes - export PATH="$PATH:$script_dir/fmpp/bin" build_fmpp() { @@ -38,74 +47,13 @@ find_chibi_files() { local search_path="$1" shift local conditions=( "$@" ) - for file in $(find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/lib/ugfx*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort) ; do + for file in $(find -L "$search_path" -not -path '*/lib/chibios*' -and -not -path '*/util/*' -and \( "${conditions[@]}" \) | sort) ; do if [ -z "$(grep 'include_next' "$file")" ] ; then echo $file fi done } -revert_chibi_files() { - local search_path="$1" - shead "Reverting ChibiOS config/board files..." - for file in $(find_chibi_files "$search_path" -name chconf.h -or -name halconf.h -or -name mcuconf.h -or -name board.c -or -name board.h -or -name board.mk -or -name board.chcfg) ; do - pushd "$search_path" >/dev/null 2>&1 - local relpath=$(realpath --relative-to="$search_path" "$file") - git checkout upstream/develop -- "$relpath" || git checkout origin/develop -- "$relpath" || true - popd >/dev/null 2>&1 - done -} - -populate_file_hashes() { - local search_path="$1" - shead "Determining duplicate config/board files..." - for file in $(find_chibi_files "$search_path" -name chconf.h -or -name halconf.h -or -name mcuconf.h -or -name board.c -or -name board.h) ; do - local key="file_$(clang-format "$file" | sha1sum | cut -d' ' -f1)" - local relpath=$(realpath --relative-to="$search_path" "$file") - file_hashes[$key]="${file_hashes[$key]:-} $relpath" - done - for file in $(find_chibi_files "$search_path" -name board.mk -or -name board.chcfg) ; do - local key="file_$(cat "$file" | sha1sum | cut -d' ' -f1)" - local relpath=$(realpath --relative-to="$search_path" "$file") - file_hashes[$key]="${file_hashes[$key]:-} $relpath" - done -} - -determine_equivalent_files() { - local search_file="$1" - for K in "${!file_hashes[@]}"; do - for V in ${file_hashes[$K]}; do - if [[ "$V" == "$search_file" ]] ; then - for V in ${file_hashes[$K]}; do - echo "$V" - done - return 0 - fi - done - done - return 1 -} - -deploy_staged_files() { - shead "Deploying staged files..." - for file in $(find "$qmk_firmware_dir/util/chibios-upgrade-staging" -type f) ; do - local relpath=$(realpath --relative-to="$qmk_firmware_dir/util/chibios-upgrade-staging" "$file") - sinfo "Deploying staged file: $relpath" - for other in $(determine_equivalent_files "$relpath") ; do - sinfo " => $other" - cp "$qmk_firmware_dir/util/chibios-upgrade-staging/$relpath" "$qmk_firmware_dir/$other" - done - done -} - -swap_mcuconf_f3xx_f303() { - shead "Swapping STM32F3xx_MCUCONF -> STM32F303_MCUCONF..." - for file in $(find_chibi_files "$qmk_firmware_dir" -name mcuconf.h) ; do - sed -i 's#STM32F3xx_MCUCONF#STM32F303_MCUCONF#g' "$file" - dos2unix "$file" >/dev/null 2>&1 - done -} - upgrade_conf_files_generic() { local search_filename="$1" local update_script="$2" @@ -150,35 +98,8 @@ upgrade_mcuconf_files() { popd >/dev/null 2>&1 } -update_staged_files() { - shead "Updating staged files with ChibiOS upgraded versions..." - for file in $(find "$qmk_firmware_dir/util/chibios-upgrade-staging" -type f) ; do - local relpath=$(realpath --relative-to="$qmk_firmware_dir/util/chibios-upgrade-staging" "$file") - sinfo "Updating staged file: $relpath" - cp "$qmk_firmware_dir/$relpath" "$qmk_firmware_dir/util/chibios-upgrade-staging/$relpath" - done -} - havecmd fmpp || build_fmpp -revert_chibi_files "$qmk_firmware_dir" -populate_file_hashes "$qmk_firmware_dir" - -shead "Showing duplicate ChibiOS files..." -for K in "${!file_hashes[@]}"; do - sinfo ${K#file_}: - for V in ${file_hashes[$K]}; do - sinfo " $V" - done -done - -if [ "${1:-}" == "-r" ] ; then - exit 0 -fi - -swap_mcuconf_f3xx_f303 -deploy_staged_files upgrade_mcuconf_files upgrade_chconf_files upgrade_halconf_files -update_staged_files diff --git a/util/install/arch.sh b/util/install/arch.sh index bef98ac37f6..33c39212d3d 100755 --- a/util/install/arch.sh +++ b/util/install/arch.sh @@ -6,7 +6,8 @@ _qmk_install() { sudo pacman --needed --noconfirm -S \ base-devel clang diffutils gcc git unzip wget zip python-pip \ avr-binutils arm-none-eabi-binutils arm-none-eabi-gcc \ - arm-none-eabi-newlib avrdude dfu-programmer dfu-util + arm-none-eabi-newlib avrdude dfu-programmer dfu-util \ + riscv64-elf-binutils riscv64-elf-gcc riscv64-elf-newlib sudo pacman --needed --noconfirm -U https://archive.archlinux.org/packages/a/avr-gcc/avr-gcc-8.3.0-1-x86_64.pkg.tar.xz sudo pacman --needed --noconfirm -S avr-libc # Must be installed after the above, or it will bring in the latest avr-gcc instead diff --git a/util/install/debian.sh b/util/install/debian.sh index 57588e371ab..3e02919bdd7 100755 --- a/util/install/debian.sh +++ b/util/install/debian.sh @@ -11,11 +11,18 @@ _qmk_install_prepare() { _qmk_install() { echo "Installing dependencies" - sudo apt-get -yq install \ + sudo apt-get --quiet --yes install \ build-essential clang-format diffutils gcc git unzip wget zip \ python3-pip binutils-avr gcc-avr avr-libc binutils-arm-none-eabi \ gcc-arm-none-eabi libnewlib-arm-none-eabi avrdude dfu-programmer \ dfu-util teensy-loader-cli libhidapi-hidraw0 libusb-dev - python3 -m pip install --user -r $QMK_FIRMWARE_DIR/requirements.txt + # RISC-V toolchains with picolibc support are only available for distributions based on Debian 11+. + if sudo apt-get install --simulate --quiet --yes picolibc-riscv64-unknown-elf gcc-riscv64-unknown-elf binutils-riscv64-unknown-elf > /dev/null 2>&1; then + sudo apt-get --quiet --yes install picolibc-riscv64-unknown-elf \ + gcc-riscv64-unknown-elf \ + binutils-riscv64-unknown-elf + fi + + python3 -m pip install --user -r "$QMK_FIRMWARE_DIR"/requirements.txt } diff --git a/util/size_regression.sh b/util/size_regression.sh new file mode 100755 index 00000000000..988d1d9b5be --- /dev/null +++ b/util/size_regression.sh @@ -0,0 +1,79 @@ +#!/bin/bash + +# Copyright 2021 Nick Brassel (@tzarc) +# SPDX-License-Identifier: GPL-2.0-or-later + +set -eEuo pipefail + +job_count=$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 2) +source_ref="0.11.0" +dest_ref="develop" +ignore_ref="master" +unset skip_zero + +function usage() { + echo "Usage: $(basename "$0") [-h] [-j <jobs>] [-s <source>] [-d <dest>] [-n] planck/rev6:default" + echo " -h : Shows this usage page." + echo " -j <threads> : Change the number of threads to execute with. Defaults to \`$job_count\`." + echo " -s <source> : Use source commit, branch, tag, or sha1 to start the search. Defaults to \`$source_ref\`." + echo " -d <dest> : Use destination commit, branch, tag, or sha1 to end the search. Defaults to \`$dest_ref\`." + echo " -i <ignore> : The branch to ignore refs from. Defaults to \`$ignore_ref\`." + echo " -n : Skips printing changes if the delta is zero." + exit 1 +} + +if [[ ${#} -eq 0 ]]; then + usage +fi + +while getopts "hj:s:d:i:n" opt "$@" ; do + case "$opt" in + h) usage; exit 0;; + j) job_count="${OPTARG:-}";; + s) source_ref="${OPTARG:-}";; + d) dest_ref="${OPTARG:-}";; + i) ignore_ref="${OPTARG:-}";; + n) skip_zero=1;; + \?) usage >&2; exit 1;; + esac +done + +# Work out the target board +shift $((OPTIND-1)) +keyboard_target=$1 + +last_size=0 +last_line="" +function build_executor() { + git rev-list --oneline --no-merges ${source_ref}...${dest_ref} ^${ignore_ref} | while IFS= read -r line ; do + revision=$(echo $line | cut -d' ' -f1) + + make distclean >/dev/null 2>&1 + git checkout $revision >/dev/null 2>&1 || { echo "Failed to check out revision ${revision}" >&2 ; exit 1 ; } + make -j${job_count} $keyboard_target >/dev/null 2>&1 || true + file_size=$(arm-none-eabi-size .build/*.elf 2>/dev/null | awk '/elf/ {print $1}' 2>/dev/null || true) + + if [[ "$last_size" == 0 ]] ; then last_size=$file_size ; fi + if [[ -z "$file_size" ]] ; then file_size=0 ; fi + + if [[ -n "$last_line" ]] ; then + size_delta=$(( $last_size - $file_size )) + if { [[ -n "${skip_zero:-}" ]] && [[ $size_delta -ne 0 ]] ; } || [[ $file_size -eq 0 ]] ; then + printf "Size: %8d, delta: %+6d -- %s\n" "$last_size" "$size_delta" "$last_line" + fi + fi + + last_size=$file_size + last_line=$line + done + + if [ -n "$last_line" ] ; then + size_delta=0 + printf "Size: %8d, delta: %+6d -- %s\n" "$last_size" "$size_delta" "$last_line" + fi +} + +# The actual execution of all the builds needs to be the last command in the entire script +# - During builds, this script file will disappear, so we need the entire script to be +# loaded into the script interpreter at the time of execution. Do not refactor. +build_executor diff --git a/util/udev/50-qmk.rules b/util/udev/50-qmk.rules index db27d4dc810..57806f9df0a 100644 --- a/util/udev/50-qmk.rules +++ b/util/udev/50-qmk.rules @@ -33,6 +33,9 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", TAG+="uacc SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6124", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" # Caterina (Pro Micro) +## pid.codes shared PID +### Keyboardio Atreus 2 Bootloader +SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2302", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" ## Spark Fun Electronics ### Pro Micro 3V3/8MHz SUBSYSTEMS=="usb", ATTRS{idVendor}=="1b4f", ATTRS{idProduct}=="9203", TAG+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1" diff --git a/util/update_chibios_mirror.sh b/util/update_chibios_mirror.sh index 83aee228179..0bf648ebfd2 100755 --- a/util/update_chibios_mirror.sh +++ b/util/update_chibios_mirror.sh @@ -7,10 +7,10 @@ chibios_branches="trunk stable_20.3.x stable_21.6.x" # The ChibiOS tags to mirror -chibios_tags="ver20.3.1 ver20.3.2 ver20.3.3 ver21.6.0" +chibios_tags="ver20.3.1 ver20.3.2 ver20.3.3 ver20.3.4 ver21.6.0" # The ChibiOS-Contrib branches to mirror -contrib_branches="chibios-20.3.x" +contrib_branches="chibios-20.3.x chibios-21.6.x" ################################ # Actions