diff --git a/.clang-format b/.clang-format
new file mode 100644
index 000000000000..96c48625900a
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,26 @@
+---
+BasedOnStyle: Google
+AlignAfterOpenBracket: Align
+AlignConsecutiveAssignments: 'true'
+AlignConsecutiveDeclarations: 'true'
+AlignOperands: 'true'
+AllowAllParametersOfDeclarationOnNextLine: 'false'
+AlwaysBreakAfterDefinitionReturnType: None
+AlwaysBreakAfterReturnType: None
+AlwaysBreakBeforeMultilineStrings: 'false'
+BinPackArguments: 'true'
+BinPackParameters: 'true'
+ColumnLimit: '1000'
+IndentCaseLabels: 'true'
+IndentPPDirectives: AfterHash
+IndentWidth: '2'
+MaxEmptyLinesToKeep: '1'
+PointerAlignment: Right
+SortIncludes: 'false'
+SpaceBeforeAssignmentOperators: 'true'
+SpaceBeforeParens: ControlStatements
+SpaceInEmptyParentheses: 'false'
+TabWidth: '4'
+UseTab: Never
+
+...
diff --git a/.editorconfig b/.editorconfig
index 4cd051ce9522..c8cb35b861f4 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -5,7 +5,7 @@ root = true
[*]
indent_style = space
-indent_size = 2
+indent_size = 4
# We recommend you to keep these unchanged
charset = utf-8
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index a4f90389b0f0..3c35416e043f 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -2,30 +2,31 @@
name: Bug report
about: Create a report to help us improve the QMK Firmware
---
-
+
-
-
+
+
-**Describe the bug**
+## Describe the Bug
-**System Information**
+## System Information
+
- Keyboard:
- Revision (if applicable):
- - Operating System:
- - avr-gcc version:
-
- - arm gcc version:
-
+ - Operating system:
+ - AVR GCC version:
+
+ - ARM GCC version:
+
- QMK Firmware version:
-
+
- Any keyboard related software installed?
- - [ ] Auto Hot Key
+ - [ ] AutoHotKey
- [ ] Karabiner
- - [ ] Other
+ - [ ] Other:
-**Additional context**
+## Additional Context
-
+
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
index c9198adff2fc..01aeb26cec30 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -2,18 +2,18 @@
name: Feature request
about: Suggest a new feature or changes to existing features
---
-
+
-
-
+
+
## Feature Request Type
-- [ ] Core Functionality
-- [ ] Add-on hardware support (e.g. audio, RGB, OLED screen, etc.)
-- [ ] Alteration (enhancement/optimization) of existing Feature(s)
+- [ ] Core functionality
+- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
+- [ ] Alteration (enhancement/optimization) of existing feature(s)
- [ ] New behavior
-## Description
+## Description
-
+
diff --git a/.github/ISSUE_TEMPLATE/other_issues.md b/.github/ISSUE_TEMPLATE/other_issues.md
index 5f3e986cc413..7c4891ac31d7 100644
--- a/.github/ISSUE_TEMPLATE/other_issues.md
+++ b/.github/ISSUE_TEMPLATE/other_issues.md
@@ -2,8 +2,8 @@
name: Other issues
about: Anything else that doesn't fall into the above categories.
---
-
+
-
+
-
+
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 05223aa4f6b3..cbc018ea057f 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,32 +1,34 @@
-
+
-
-
+
+
## Description
-
-## Types of changes
-
+
+
+## Types of Changes
+
+
- [ ] Core
- [ ] Bugfix
-- [ ] New Feature
-- [ ] Enhancement/Optimization
+- [ ] New feature
+- [ ] Enhancement/optimization
- [ ] Keyboard (addition or update)
-- [ ] Keymap/Layout/Userspace (addition or update)
+- [ ] Keymap/layout/userspace (addition or update)
- [ ] Documentation
-
-## Issues Fixed or Closed by this PR
+## Issues Fixed or Closed by This PR
*
-## Checklist:
+## Checklist
+
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
-- [ ] I have read the **CONTRIBUTING** document. (https://docs.qmk.fm/#/contributing)
+- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing).
- [ ] I have added tests to cover my changes.
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
diff --git a/.gitignore b/.gitignore
index 799fb54def9b..7cd7fa8015e6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+.history/
.dep
*.o
*.bin
@@ -53,6 +54,7 @@ util/Win_Check_Output.txt
.vscode/tasks.json
.vscode/last.sql
.vscode/temp.sql
+.vscode/ipch/
.stfolder
.tags
diff --git a/.travis.yml b/.travis.yml
index 6cfc9e067ec8..796be6c045bc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,17 +10,22 @@ branches:
env:
global:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
+ - MAKEFLAGS="-j3 --output-sync"
before_install:
- wget http://ww1.microchip.com/downloads/en/DeviceDoc/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz || wget http://qmk.fm/avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
+ # Need DFU > .5 for dfu-suffix
+ - sudo add-apt-repository --yes ppa:tormodvolden/ppa
+ - sudo apt-get update -qq
install:
- tar -zxf avr8-gnu-toolchain-3.5.4.1709-linux.any.x86_64.tar.gz
- export PATH="$PATH:$TRAVIS_BUILD_DIR/avr8-gnu-toolchain-linux_x86_64/bin"
- npm install -g moxygen
+ - sudo apt-get -y --force-yes install dfu-util
before_script:
- avr-gcc --version
script:
- git rev-parse --short HEAD
-- make test:all AUTOGEN=false
+- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
addons:
diff --git a/Dockerfile b/Dockerfile
index 8f78dc2bfe8a..6bd5acb33573 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian
+FROM debian:9
RUN apt-get update && apt-get install --no-install-recommends -y \
avr-libc \
diff --git a/Makefile b/Makefile
index 610f53b4d42d..a6c3ee35b7a7 100644
--- a/Makefile
+++ b/Makefile
@@ -534,11 +534,13 @@ endef
%:
# Check if we have the CMP tool installed
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
+ # Ensure that python3 is installed. This check can be removed after python is used in more places.
+ if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
# Check if the submodules are dirty, and display a warning if they are
ifndef SKIP_GIT
- if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --init lib/chibios; fi
- if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --init lib/chibios-contrib; fi
- if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --init lib/ugfx; fi
+ if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
+ if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
+ if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
diff --git a/Vagrantfile b/Vagrantfile
index 5aa56bf2a723..552711d632f1 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -6,7 +6,9 @@ Vagrant.configure(2) do |config|
config.vm.define "qmk_firmware"
# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
- config.vm.box = "bento/ubuntu-16.04"
+ config.vm.box = "generic/debian9"
+
+ config.vm.synced_folder '.', '/vagrant'
# This section allows you to customize the Virtualbox VM
# settings, ie showing the GUI or upping the memory
@@ -55,7 +57,7 @@ Vagrant.configure(2) do |config|
# image, you'll need to: chmod -R a+rw .
config.vm.provider "docker" do |docker, override|
override.vm.box = nil
- docker.image = "jesselang/debian-vagrant:jessie"
+ docker.image = "jesselang/debian-vagrant:stretch"
docker.has_ssh = true
end
@@ -64,7 +66,7 @@ Vagrant.configure(2) do |config|
# If this causes issues you can run a 'vagrant destroy' and then
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
# non-updated box and then attempt to troubleshoot or open a Github issue
- config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"
+ config.vm.provision "shell", inline: "/vagrant/util/qmk_install.sh", run: "always"
config.vm.post_up_message = <<-EOT
diff --git a/build_keyboard.mk b/build_keyboard.mk
index 0239a58b79b4..213cb44456e0 100644
--- a/build_keyboard.mk
+++ b/build_keyboard.mk
@@ -135,6 +135,10 @@ ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
OPT_DEFS += -DCONVERT_TO_PROTON_C
endif
+ifneq ($(FORCE_LAYOUT),)
+ TARGET := $(TARGET)_$(FORCE_LAYOUT)
+endif
+
include quantum/mcu_selection.mk
ifdef MCU_FAMILY
@@ -276,6 +280,23 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/config.h)","")
CONFIG_H += $(KEYBOARD_PATH_1)/config.h
endif
+POST_CONFIG_H :=
+ifneq ("$(wildcard $(KEYBOARD_PATH_1)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_1)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_2)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_2)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_3)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_3)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_4)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_4)/post_config.h
+endif
+ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
+ POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
+endif
+
# Save the defines and includes here, so we don't include any keymap specific ones
PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
@@ -303,7 +324,6 @@ ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
endif
# # project specific files
-SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
SRC += $(KEYBOARD_SRC) \
$(KEYMAP_C) \
$(QUANTUM_SRC)
@@ -313,15 +333,16 @@ SRC += $(KEYBOARD_SRC) \
# Search Path
VPATH += $(KEYMAP_PATH)
+VPATH += $(USER_PATH)
VPATH += $(KEYBOARD_PATHS)
VPATH += $(COMMON_VPATH)
-VPATH += $(USER_PATH)
include common_features.mk
include $(TMK_PATH)/protocol.mk
include $(TMK_PATH)/common.mk
include bootloader.mk
+SRC += $(patsubst %.c,%.clib,$(LIB_SRC))
SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC))
SRC += $(TMK_COMMON_SRC)
OPT_DEFS += $(TMK_COMMON_DEFS)
@@ -351,6 +372,7 @@ ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
include $(VISUALIZER_PATH)/visualizer.mk
endif
+CONFIG_H += $(POST_CONFIG_H)
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
OUTPUTS := $(KEYMAP_OUTPUT) $(KEYBOARD_OUTPUT)
@@ -371,4 +393,5 @@ all: build check-size
build: elf cpfirmware
check-size: build
+include show_options.mk
include $(TMK_PATH)/rules.mk
diff --git a/build_layout.mk b/build_layout.mk
index beb1cb66278a..6e9f97dae211 100644
--- a/build_layout.mk
+++ b/build_layout.mk
@@ -15,4 +15,13 @@ define SEARCH_LAYOUTS
$$(foreach LAYOUTS_REPO,$$(LAYOUTS_REPOS),$$(eval $$(call SEARCH_LAYOUTS_REPO)))
endef
+ifneq ($(FORCE_LAYOUT),)
+ ifneq (,$(findstring $(FORCE_LAYOUT),$(LAYOUTS)))
+ $(info Forcing layout: $(FORCE_LAYOUT))
+ LAYOUTS := $(FORCE_LAYOUT)
+ else
+ $(error Forced layout does not exist)
+ endif
+endif
+
$(foreach LAYOUT,$(LAYOUTS),$(eval $(call SEARCH_LAYOUTS)))
\ No newline at end of file
diff --git a/common_features.mk b/common_features.mk
index 8c3361732cd0..7c35f07d52c9 100644
--- a/common_features.mk
+++ b/common_features.mk
@@ -103,7 +103,9 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
+ POST_CONFIG_H += $(QUANTUM_DIR)/rgblight_post_config.h
OPT_DEFS += -DRGBLIGHT_ENABLE
+ SRC += $(QUANTUM_DIR)/color.c
SRC += $(QUANTUM_DIR)/rgblight.c
CIE1931_CURVE = yes
LED_BREATHING_TABLE = yes
@@ -114,8 +116,28 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
endif
endif
+VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 WS2812 custom
+
+LED_MATRIX_ENABLE ?= no
+ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
+ ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
+ $(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
+ else
+ OPT_DEFS += -DLED_MATRIX_ENABLE -DBACKLIGHT_ENABLE -DBACKLIGHT_CUSTOM_DRIVER
+ SRC += $(QUANTUM_DIR)/led_matrix.c
+ SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
+ endif
+endif
+
+ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
+ OPT_DEFS += -DIS31FL3731
+ COMMON_VPATH += $(DRIVER_PATH)/issi
+ SRC += is31fl3731-simple.c
+ SRC += i2c_master.c
+endif
+
RGB_MATRIX_ENABLE ?= no
-VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 custom
+
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
@@ -132,19 +154,39 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
- OPT_DEFS += -DIS31FL3731
+ OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3731.c
SRC += i2c_master.c
endif
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
- OPT_DEFS += -DIS31FL3733
+ OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
COMMON_VPATH += $(DRIVER_PATH)/issi
SRC += is31fl3733.c
SRC += i2c_master.c
endif
+ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
+ OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
+ COMMON_VPATH += $(DRIVER_PATH)/issi
+ SRC += is31fl3737.c
+ SRC += i2c_master.c
+endif
+
+ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
+ OPT_DEFS += -DWS2812
+ SRC += ws2812.c
+endif
+
+ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
+ OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
+endif
+
+ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
+ OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
+endif
+
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
@@ -191,7 +233,7 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE = yes
endif
- ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
+ ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
endif
endif
@@ -227,16 +269,31 @@ endif
ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
COMMON_VPATH += $(DRIVER_PATH)/haptic
+ SRC += haptic.c
SRC += DRV2605L.c
SRC += i2c_master.c
+ OPT_DEFS += -DHAPTIC_ENABLE
OPT_DEFS += -DDRV2605L
endif
+ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
+ COMMON_VPATH += $(DRIVER_PATH)/haptic
+ SRC += haptic.c
+ SRC += solenoid.c
+ OPT_DEFS += -DHAPTIC_ENABLE
+ OPT_DEFS += -DSOLENOID_ENABLE
+endif
+
ifeq ($(strip $(HD44780_ENABLE)), yes)
SRC += drivers/avr/hd44780.c
OPT_DEFS += -DHD44780_ENABLE
endif
+ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
+ OPT_DEFS += -DVELOCIKEY_ENABLE
+ SRC += $(QUANTUM_DIR)/velocikey.c
+endif
+
ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE
SRC += $(QUANTUM_DIR)/dynamic_keymap.c
@@ -263,25 +320,41 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
endif
endif
-# Include the standard debounce code if needed
-ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes)
- QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c
+DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
+# Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
+DEBOUNCE_TYPE?= sym_g
+ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
+ QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
endif
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
+ POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
OPT_DEFS += -DSPLIT_KEYBOARD
# Include files used by all split keyboards
- QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
- $(QUANTUM_DIR)/split_common/split_util.c
+ QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
- # Unused functions are pruned away, which is why we can add both drivers here without bloat.
- QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \
- $(QUANTUM_DIR)/split_common/serial.c
+ # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
+ QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c \
+ i2c_master.c \
+ i2c_slave.c
endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
+
+ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
+ OPT_DEFS += -DOLED_DRIVER_ENABLE
+ COMMON_VPATH += $(DRIVER_PATH)/oled
+ QUANTUM_LIB_SRC += i2c_master.c
+ SRC += oled_driver.c
+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
diff --git a/docs/_summary.md b/docs/_summary.md
index 6bc747189663..043943f1d832 100644
--- a/docs/_summary.md
+++ b/docs/_summary.md
@@ -3,7 +3,7 @@
* [Building Your First Firmware](newbs_building_firmware.md)
* [Flashing Firmware](newbs_flashing.md)
* [Testing and Debugging](newbs_testing_debugging.md)
- * [Best Practices](newbs_best_practices.md)
+ * [Git Best Practices](newbs_best_practices.md)
* [Learning Resources](newbs_learn_more_resources.md)
* [QMK Basics](README.md)
@@ -60,15 +60,16 @@
* [Key Lock](feature_key_lock.md)
* [Layouts](feature_layouts.md)
* [Leader Key](feature_leader_key.md)
+ * [LED Matrix](feature_led_matrix.md)
* [Macros](feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md)
+ * [OLED Driver](feature_oled_driver)
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys)
* [Pointing Device](feature_pointing_device.md)
* [PS/2 Mouse](feature_ps2_mouse.md)
* [RGB Lighting](feature_rgblight.md)
* [RGB Matrix](feature_rgb_matrix.md)
- * [Space Cadet Shift](feature_space_cadet_shift.md)
- * [Space Cadet Shift Enter](feature_space_cadet_shift_enter.md)
+ * [Space Cadet](feature_space_cadet.md)
* [Stenography](feature_stenography.md)
* [Swap Hands](feature_swap_hands.md)
* [Tap Dance](feature_tap_dance.md)
@@ -76,6 +77,7 @@
* [Thermal Printer](feature_thermal_printer.md)
* [Unicode](feature_unicode.md)
* [Userspace](feature_userspace.md)
+ * [Velocikey](feature_velocikey.md)
* For Makers and Modders
* [Hand Wiring Guide](hand_wire.md)
@@ -90,7 +92,8 @@
* [Understanding QMK](understanding_qmk.md)
* Other Topics
- * [Using Eclipse with QMK](eclipse.md)
+ * [Using Eclipse with QMK](other_eclipse.md)
+ * [Using VSCode with QMK](other_vscode.md)
* [Support](support.md)
* QMK Internals (In Progress)
diff --git a/docs/config_options.md b/docs/config_options.md
index 5e2de6d04861..cab3c0747a5b 100644
--- a/docs/config_options.md
+++ b/docs/config_options.md
@@ -59,6 +59,8 @@ This is a C header file that is one of the first things included, and will persi
* define is matrix has ghost (unlikely)
* `#define DIODE_DIRECTION COL2ROW`
* COL2ROW or ROW2COL - how your matrix is configured. COL2ROW means the black mark on your diode is facing to the rows, and between the switch and the rows.
+* `#define DIRECT_PINS { { F1, F0, B0, C7 }, { F4, F5, F6, F7 } }`
+ * pins mapped to rows and columns, from left to right. Defines a matrix where each switch is connected to a separate pin and ground.
* `#define AUDIO_VOICES`
* turns on the alternate audio voices (to cycle through)
* `#define C4_AUDIO`
@@ -68,11 +70,11 @@ This is a C header file that is one of the first things included, and will persi
* `#define C6_AUDIO`
* enables audio on pin C6
* `#define B5_AUDIO`
- * enables audio on pin B5 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
+ * enables audio on pin B5 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
* `#define B6_AUDIO`
- * enables audio on pin B6 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
+ * enables audio on pin B6 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
* `#define B7_AUDIO`
- * enables audio on pin B7 (duophony is enables if one of B[5-7]_AUDIO is enabled along with one of C[4-6]_AUDIO)
+ * enables audio on pin B7 (duophony is enables if one of B[5-7]\_AUDIO is enabled along with one of C[4-6]\_AUDIO)
* `#define BACKLIGHT_PIN B7`
* pin of the backlight - B5, B6, B7 use PWM, others use softPWM
* `#define BACKLIGHT_LEVELS 3`
@@ -126,6 +128,8 @@ If you define these options you will enable the associated feature, which may in
* `#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
* See [Retro Tapping](feature_advanced_keycodes.md#retro-tapping) for details
@@ -167,15 +171,23 @@ If you define these options you will enable the associated feature, which may in
* 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 200`
+ * 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 200ms if not defined.
## RGB Light Configuration
* `#define RGB_DI_PIN D7`
- * pin the DI on the ws2812 is hooked-up to
+ * pin the DI on the WS2812 is hooked-up to
* `#define RGBLIGHT_ANIMATIONS`
* run RGB animations
-* `#define RGBLED_NUM 15`
+* `#define RGBLED_NUM 12`
* number of LEDs
+* `#define RGBLIGHT_SPLIT`
+ * Needed if both halves of the board have RGB LEDs wired directly to the RGB output pin on the controllers instead of passing the output of the left half to the input of the right half
+* `#define RGBLED_SPLIT { 6, 6 }`
+ * number of LEDs connected that are directly wired to `RGB_DI_PIN` on each half of a split keyboard
+ * First value indicates number of LEDs for left half, second value is for the right half
+ * When RGBLED_SPLIT is defined, RGBLIGHT_SPLIT is implicitly defined.
* `#define RGBLIGHT_HUE_STEP 12`
* units to step when in/decreasing hue
* `#define RGBLIGHT_SAT_STEP 25`
@@ -208,9 +220,13 @@ There are a few different ways to set handedness for split keyboards (listed in
1. Set `SPLIT_HAND_PIN`: Reads a pin to determine handedness. If pin is high, it's the left side, if low, the half is determined to be the right side
2. Set `EE_HANDS` and flash `eeprom-lefthand.eep`/`eeprom-righthand.eep` to each half
+ * For boards with DFU bootloader you can use `:dfu-split-left`/`:dfu-split-right` to flash these EEPROM files
+ * For boards with Caterina bootloader (like stock Pro Micros), use `:avrdude-split-left`/`:avrdude-split-right`
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half
+#### Defines for handedness
+
* `#define SPLIT_HAND_PIN B7`
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.
@@ -232,6 +248,9 @@ There are a few different ways to set handedness for split keyboards (listed in
* `#define MATRIX_COL_PINS_RIGHT {
}`
* If you want to specify a different pinout for the right half than the left half, you can define `MATRIX_ROW_PINS_RIGHT`/`MATRIX_COL_PINS_RIGHT`. Currently, the size of `MATRIX_ROW_PINS` must be the same as `MATRIX_ROW_PINS_RIGHT` and likewise for the definition of columns.
+* `#define RGBLED_SPLIT { 6, 6 }`
+ * See [RGB Light Configuration](#rgb-light-configuration)
+
* `#define SELECT_SOFT_SERIAL_SPEED ` (default speed is 1)
* Sets the protocol speed when using serial communication
* Speeds:
@@ -307,12 +326,14 @@ Use these to enable or disable building certain features. The more you have enab
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
* `CUSTOM_MATRIX`
* Allows replacing the standard matrix scanning routine with a custom one.
-* `CUSTOM_DEBOUNCE`
- * Allows replacing the standard key debouncing routine with a custom one.
+* `DEBOUNCE_TYPE`
+ * Allows replacing the standard key debouncing routine with an alternative or custom one.
* `WAIT_FOR_USB`
* 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.
+* `LINK_TIME_OPTIMIZATION_ENABLE`
+ = Enables Link Time Optimization (`LTO`) when compiling the keyboard. This makes the process take longer, but can significantly reduce the compiled size (and since the firmware is small, the added time is not noticable). However, this will automatically disable the old Macros and Functions features automatically, as these break when `LTO` is enabled. It does this by automatically defining `NO_ACTION_MACRO` and `NO_ACTION_FUNCTION`
## USB Endpoint Limitations
diff --git a/docs/contributing.md b/docs/contributing.md
index bcedcaf974e5..7d1a9691cf5c 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -56,7 +56,7 @@ Never made an open source contribution before? Wondering how contributions work
Most of our style is pretty easy to pick up on, but right now it's not entirely consistent. You should match the style of the code surrounding your change, but if that code is inconsistent or unclear use the following guidelines:
-* We indent using two spaces (soft tabs)
+* We indent using four (4) spaces (soft tabs)
* We use a modified One True Brace Style
* Opening Brace: At the end of the same line as the statement that opens the block
* Closing Brace: Lined up with the first character of the statement that opens the block
@@ -71,6 +71,14 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
* If you not sure if a comment is obvious, go ahead and include it.
* In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
+* We accept both forms of preprocessor if's: `#ifdef DEFINED` and `#if defined(DEFINED)`
+ * If you are not sure which to prefer use the `#if defined(DEFINED)` form.
+ * Do not change existing code from one style to the other, except when moving to a multiple condition `#if`.
+ * Do not put whitespace between `#` and `if`.
+ * When deciding how (or if) to indent directives keep these points in mind:
+ * Readability is more important than consistency.
+ * Follow the file's existing style. If the file is mixed follow the style that makes sense for the section you are modifying.
+ * When choosing to indent you can follow the indention level of the surrounding C code, or preprocessor directives can have their own indent level. Choose the style that best communicates the intent of your code.
Here is an example for easy reference:
@@ -91,6 +99,18 @@ int foo(void) {
}
```
+# Auto-formatting with clang-format
+
+[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) is part of LLVM and can automatically format your code for you, because ain't nobody got time to do it manually. We supply a configuration file for it that applies most of the coding conventions listed above. It will only change whitespace and newlines, so you will still have to remember to include optional braces yourself.
+
+Use the [full LLVM installer](http://llvm.org/builds/) to get clang-format on Windows, or use `sudo apt install clang-format` on Ubuntu.
+
+If you run it from the command-line, pass `-style=file` as an option and it will automatically find the .clang-format configuration file in the QMK root directory.
+
+If you use VSCode, the standard C/C++ plugin supports clang-format, alternatively there is a [separate extension](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat) for it.
+
+Some things (like LAYOUT macros) are destroyed by clang-format, so either don't run it on those files, or wrap the sensitive code in `// clang-format off` and `// clang-format on`.
+
# General Guidelines
We have a few different types of changes in QMK, each requiring a different level of rigor. We'd like you to keep the following guidelines in mind no matter what type of change you're making.
@@ -117,6 +137,20 @@ Documentation is one of the easiest ways to get started contributing to QMK. Fin
You'll find all our documentation in the `qmk_firmware/docs` directory, or if you'd rather use a web based workflow you can click "Suggest An Edit" at the top of each page on http://docs.qmk.fm/.
+When providing code examples in your documentation, try to observe naming conventions used elsewhere in the docs. For example, standardizing enums as `my_layers` or `my_keycodes` for consistency:
+
+```c
+enum my_layers {
+ _FIRST_LAYER,
+ _SECOND_LAYER
+};
+
+enum my_keycodes {
+ FIRST_LAYER = SAFE_RANGE,
+ SECOND_LAYER
+};
+```
+
## Keymaps
Most first-time QMK contributors start with their personal keymaps. We try to keep keymap standards pretty casual (keymaps, after all, reflect the personality of their creators) but we do ask that you follow these guidelines to make it easier for others to discover and learn from your keymap.
@@ -125,7 +159,7 @@ Most first-time QMK contributors start with their personal keymaps. We try to ke
* All Keymap PR's are squashed, so if you care about how your commits are squashed you should do it yourself
* Do not lump features in with keymap PR's. Submit the feature first and then a second PR for the keymap.
* Do not include `Makefile`s in your keymap folder (they're no longer used)
-* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
+* Update copyrights in file headers (look for `%YOUR_NAME%`)
## Keyboards
@@ -138,7 +172,7 @@ We also ask that you follow these guidelines:
* Do not lump core features in with new keyboards. Submit the feature first and then submit a separate PR for the keyboard.
* Name `.c`/`.h` file after the immediate parent folder, eg `/keyboards///.[ch]`
* Do not include `Makefile`s in your keyboard folder (they're no longer used)
-* Update copyrights in file headers (look for `REPLACE_WITH_YOUR_NAME `)
+* Update copyrights in file headers (look for `%YOUR_NAME%`)
## Quantum/TMK Core
diff --git a/docs/custom_quantum_functions.md b/docs/custom_quantum_functions.md
index d44786e2d512..6287b9530909 100644
--- a/docs/custom_quantum_functions.md
+++ b/docs/custom_quantum_functions.md
@@ -116,29 +116,29 @@ Use the `IS_LED_ON(usb_led, led_name)` and `IS_LED_OFF(usb_led, led_name)` macro
```c
void led_set_user(uint8_t usb_led) {
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
- PORTB |= (1<<0);
+ writePinLow(B0);
} else {
- PORTB &= ~(1<<0);
+ writePinHigh(B0);
}
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
- PORTB |= (1<<1);
+ writePinLow(B1);
} else {
- PORTB &= ~(1<<1);
+ writePinHigh(B1);
}
if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
- PORTB |= (1<<2);
+ writePinLow(B2);
} else {
- PORTB &= ~(1<<2);
+ writePinHigh(B2);
}
if (IS_LED_ON(usb_led, USB_LED_COMPOSE)) {
- PORTB |= (1<<3);
+ writePinLow(B3);
} else {
- PORTB &= ~(1<<3);
+ writePinHigh(B3);
}
if (IS_LED_ON(usb_led, USB_LED_KANA)) {
- PORTB |= (1<<4);
+ writePinLow(B4);
} else {
- PORTB &= ~(1<<4);
+ writePinHigh(B4);
}
}
```
@@ -165,31 +165,86 @@ In addition, it is possible to specify the brightness level of all LEDs with `er
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
-# Matrix Initialization Code
+# Keyboard Initialization Code
-Before a keyboard can be used the hardware must be initialized. QMK handles initialization of the keyboard matrix itself, but if you have other hardware like LEDs or i²c controllers you will need to set up that hardware before it can be used.
+There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use.
+These are the three main initialization functions, listed in the order that they're called.
-### Example `matrix_init_user()` Implementation
+* `keyboard_pre_init_*` - Happens before most anything is started. Good for hardware setup that you want running very early.
+* `matrix_init_*` - Happens midway through the firmware's startup process. Hardware is initialized, but features may not be yet.
+* `keyboard_post_init_*` - Happens at the end of the firmware's startup process. This is where you'd want to put "customization" code, for the most part.
-This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
+!> For most people, the `keyboard_post_init_user` function is what you want to call. For instance, this is where you want to set up things for RGB Underglow.
+
+## Keyboard Pre Initialization code
+
+This runs very early during startup, even before the USB has been started.
+
+Shortly after this, the matrix is initialized.
+
+For most users, this shouldn't be used, as it's primarily for hardware oriented initialization.
+
+However, if you have hardware stuff that you need initialized, this is the best place for it (such as initializing LED pins).
+
+### Example `keyboard_pre_init_user()` Implementation
+
+This example, at the keyboard level, sets up B0, B1, B2, B3, and B4 as LED pins.
```c
-void matrix_init_user(void) {
- // Call the keymap level matrix init.
+void keyboard_pre_init_user(void) {
+ // Call the keyboard pre init code.
// Set our LED pins as output
- DDRB |= (1<<1);
- DDRB |= (1<<2);
- DDRB |= (1<<3);
+ setPinOutput(B0);
+ setPinOutput(B1);
+ setPinOutput(B2);
+ setPinOutput(B3);
+ setPinOutput(B4);
}
```
+### `keyboard_pre_init_*` Function Documentation
+
+* Keyboard/Revision: `void keyboard_pre_init_kb(void)`
+* Keymap: `void keyboard_pre_init_user(void)`
+
+## Matrix Initialization Code
+
+This is called when the matrix is initialized, and after some of the hardware has been set up, but before many of the features have been initialized.
+
+This is useful for setting up stuff that you may need elsewhere, but isn't hardware related nor is dependant on where it's started.
+
+
### `matrix_init_*` Function Documentation
* Keyboard/Revision: `void matrix_init_kb(void)`
* Keymap: `void matrix_init_user(void)`
+
+## Keyboard Post Initialization code
+
+This is ran as the very last task in the keyboard initialization process. This is useful if you want to make changes to certain features, as they should be initialized by this point.
+
+
+### Example `keyboard_post_init_user()` Implementation
+
+This example, running after everything else has initialized, sets up the rgb underglow configuration.
+
+```c
+void keyboard_post_init_user(void) {
+ // Call the post init code.
+ rgblight_enable_noeeprom(); // enables Rgb, without saving settings
+ rgblight_sethsv_noeeprom(180, 255, 255); // sets the color to teal/cyan without saving
+ rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 3); // sets mode to Fast breathing without saving
+}
+```
+
+### `keyboard_post_init_*` Function Documentation
+
+* Keyboard/Revision: `void keyboard_post_init_kb(void)`
+* Keymap: `void keyboard_post_init_user(void)`
+
# Matrix Scanning Code
Whenever possible you should customize your keyboard by using `process_record_*()` and hooking into events that way, to ensure that your code does not have a negative performance impact on your keyboard. However, in rare cases it is necessary to hook into the matrix scanning. Be extremely careful with the performance of code in these functions, as it will be called at least 10 times per second.
@@ -217,22 +272,18 @@ This is controlled by two functions: `suspend_power_down_*` and `suspend_wakeup_
### Example suspend_power_down_user() and suspend_wakeup_init_user() Implementation
-This example, at the keyboard level, sets up B1, B2, and B3 as LED pins.
```c
-void suspend_power_down_user(void)
-{
+void suspend_power_down_user(void) {
rgb_matrix_set_suspend_state(true);
}
-void suspend_wakeup_init_user(void)
-{
+void suspend_wakeup_init_user(void) {
rgb_matrix_set_suspend_state(false);
}
-
```
-### `keyboard_init_*` Function Documentation
+### Keyboard suspend/wake Function Documentation
* Keyboard/Revision: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)`
* Keymap: `void suspend_power_down_kb(void)` and `void suspend_wakeup_init_user(void)`
@@ -269,9 +320,10 @@ uint32_t layer_state_set_user(uint32_t state) {
```
### `layer_state_set_*` Function Documentation
-* Keyboard/Revision: `void uint32_t layer_state_set_kb(uint32_t state)`
+* Keyboard/Revision: `uint32_t layer_state_set_kb(uint32_t state)`
* Keymap: `uint32_t layer_state_set_user(uint32_t state)`
+
The `state` is the bitmask of the active layers, as explained in the [Keymap Overview](keymap.md#keymap-layer-status)
@@ -285,13 +337,13 @@ Keep in mind that EEPROM has a limited number of writes. While this is very high
* If you don't understand the example, then you may want to avoid using this feature, as it is rather complicated.
-### Example Implementation
+### Example Implementation
This is an example of how to add settings, and read and write it. We're using the user keymap for the example here. This is a complex function, and has a lot going on. In fact, it uses a lot of the above functions to work!
In your keymap.c file, add this to the top:
-```
+```c
typedef union {
uint32_t raw;
struct {
@@ -304,11 +356,11 @@ user_config_t user_config;
This sets up a 32 bit structure that we can store settings with in memory, and write to the EEPROM. Using this removes the need to define variables, since they're defined in this structure. Remember that `bool` (boolean) values use 1 bit, `uint8_t` uses 8 bits, `uint16_t` uses up 16 bits. You can mix and match, but changing the order can cause issues, as it will change the values that are read and written.
-We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `matrix_init_user` and `process_record_user` to configure everything.
+We're using `rgb_layer_change`, for the `layer_state_set_*` function, and use `keyboard_post_init_user` and `process_record_user` to configure everything.
-Now, using the `matrix_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like:
-```
-void matrix_init_user(void) {
+Now, using the `keyboard_post_init_user` code above, you want to add `eeconfig_read_user()` to it, to populate the structure you've just created. And you can then immediately use this structure to control functionality in your keymap. And It should look like:
+```c
+void keyboard_post_init_user(void) {
// Call the keymap level matrix init.
// Read the user config from EEPROM
@@ -324,7 +376,7 @@ void matrix_init_user(void) {
```
The above function will use the EEPROM config immediately after reading it, to set the default layer's RGB color. The "raw" value of it is converted in a usable structure based on the "union" that you created above.
-```
+```c
uint32_t layer_state_set_user(uint32_t state) {
switch (biton32(state)) {
case _RAISE:
@@ -346,8 +398,8 @@ uint32_t layer_state_set_user(uint32_t state) {
return state;
}
```
-This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR` and `EPRM`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this:
-```
+This will cause the RGB underglow to be changed ONLY if the value was enabled. Now to configure this value, create a new keycode for `process_record_user` called `RGB_LYR`. Additionally, we want to make sure that if you use the normal RGB codes, that it turns off Using the example above, make it look this:
+```c
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
@@ -364,11 +416,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
PLAY_NOTE_ARRAY(tone_qwerty);
}
return true; // Let QMK send the enter press/release events
- case EPRM:
- if (record->event.pressed) {
- eeconfig_init(); // resets the EEPROM to default
- }
- return false;
case RGB_LYR: // This allows me to use underglow as layer indication, or as normal
if (record->event.pressed) {
user_config.rgb_layer_change ^= 1; // Toggles the status
@@ -391,10 +438,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
```
-And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. For example, if you want to set rgb layer indication by default, and save the default valued.
+And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EEP_RST` keycode or [Bootmagic](feature_bootmagic.md) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
-```
+```c
void eeconfig_init_user(void) { // EEPROM is getting reset!
+ user_config.raw = 0;
user_config.rgb_layer_change = true; // We want this enabled by default
eeconfig_update_user(user_config.raw); // Write default value to EEPROM now
@@ -413,3 +461,31 @@ 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.
+
+# Custom Tapping Term
+
+By default, the tapping term is defined globally, and is not configurable by key. For most users, this is perfectly fine. But in come cases, dual function keys would be greatly improved by different timeouts than `LT` keys, or because some keys may be easier to hold than others. Instead of using custom key codes for each, this allows for per key configurable `TAPPING_TERM`.
+
+To enable this functionality, you need to add `#define TAPPING_TERM_PER_KEY` to your `config.h`, first.
+
+
+## Example `get_tapping_term` Implementation
+
+To change the `TAPPING TERM` based on the keycode, you'd want to add something like the following to your `keymap.c` file:
+
+```c
+uint16_t get_tapping_term(uint16_t keycode) {
+ switch (keycode) {
+ case SFT_T(KC_SPC):
+ return TAPPING_TERM + 1250;
+ case LT(1, KC_GRV):
+ return 130;
+ default:
+ return TAPPING_TERM;
+ }
+}
+```
+
+### `get_tapping_term` Function Documentation
+
+Unlike many of the other functions here, there isn't a need (or even reason) to have a quantum or keyboard level function. Only a user level function is useful here, so no need to mark it as such.
diff --git a/docs/faq_build.md b/docs/faq_build.md
index d920d27e2a45..0c1bedd7155a 100644
--- a/docs/faq_build.md
+++ b/docs/faq_build.md
@@ -15,7 +15,7 @@ or just:
$ sudo make ::dfu
-Note that running `make` with `sudo` is generally *not* a good idea, and you should use one of the former methods, if possible.
+Note that running `make` with `sudo` is generally ***not*** a good idea, and you should use one of the former methods, if possible.
### Linux `udev` Rules
On Linux, you'll need proper privileges to access the MCU. You can either use
@@ -36,18 +36,29 @@ SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="066
# tmk keyboard products https://github.com/tmk/tmk_keyboard
SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
```
+**/etc/udev/rules.d/54-input-club-keyboard.rules:**
+
+```
+# Input Club keyboard bootloader
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
+```
### Serial device is not detected in bootloader mode on Linux
-Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
+Make sure your kernel has appropriate support for your device. If your device uses USB ACM, such as
Pro Micro (Atmega32u4), make sure to include `CONFIG_USB_ACM=y`. Other devices may require `USB_SERIAL` and any of its sub options.
## Unknown Device for DFU Bootloader
-If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue.
+If you're using Windows to flash your keyboard, and you are running into issues, check the Device Manager. If you see an "Unknown Device" when the keyboard is in "bootloader mode", then you may have a driver issue.
+
+Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue.
+
+If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUSB` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again. If that doesn't work, try all of the options, until one works.
-Re-running the installation script for MSYS2 may help (eg run `./util/qmk_install.sh` from MSYS2/WSL) or reinstalling the QMK Toolbox may fix the issue.
+?> There isn't a best option for which driver should be used here. Some options work better on some systems than others. libUSB and WinUSB seem to be the best options here.
+
+If the bootloader doesn't show up in the list for devices, you may need to enable the "List all devices" option in the `Options` menu, and then find the bootloader in question.
-If that doesn't work, then you may need to grab the [Zadig Utility](https://zadig.akeo.ie/). Download this, find the device in question, and select the `WinUS(libusb-1.0)` option, and hit "Reinstall driver". Once you've done that, try flashing your board, again.
## WINAVR is Obsolete
It is no longer recommended and may cause some problem.
@@ -102,9 +113,9 @@ OPT_DEFS += -DBOOTLOADER_SIZE=2048
```
## `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)` on MacOS
-This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
+This is an issue with updating on brew, causing symlinks that avr-gcc depend on getting mangled.
-The solution is to remove and reinstall all affected modules.
+The solution is to remove and reinstall all affected modules.
```
brew rm avr-gcc
@@ -132,3 +143,11 @@ brew uninstall --force avr-gcc
brew install avr-gcc@7
brew link --force avr-gcc@7
```
+
+### I just flashed my keyboard and it does nothing/keypresses don't register - it's also ARM (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
+Due to how EEPROM works on ARM based chips, saved settings may no longer be valid. This affects the default layers, and *may*, under certain circumstances we are still figuring out, make the keyboard unusable. Resetting the EEPROM will correct this.
+
+[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order.
+[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
+
+If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic.md) and keyboard info for specifics on how to do this).
diff --git a/docs/faq_keymap.md b/docs/faq_keymap.md
index ae01e938780a..0a627469e75d 100644
--- a/docs/faq_keymap.md
+++ b/docs/faq_keymap.md
@@ -151,13 +151,13 @@ This turns right modifier keys into arrow keys when the keys are tapped while st
*/
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
- [0] = KEYMAP( \
+ [0] = LAYOUT( \
ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
- [1] = KEYMAP( \
+ [1] = LAYOUT( \
GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
diff --git a/docs/feature_advanced_keycodes.md b/docs/feature_advanced_keycodes.md
index 95c47355ceb6..a6ddf458cc9f 100644
--- a/docs/feature_advanced_keycodes.md
+++ b/docs/feature_advanced_keycodes.md
@@ -11,11 +11,11 @@ People often define custom names using `#define`. For example:
#define ALT_TAB LALT(KC_TAB)
```
-This will allow you to use `FN_CAPS` and `ALT_TAB` in your `KEYMAP()`, keeping it more readable.
+This will allow you to use `FN_CAPS` and `ALT_TAB` in your keymap, keeping it more readable.
## Caveats
-Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored.
+Currently, `LT()` and `MT()` are limited to the [Basic Keycode set](keycodes_basic.md), meaning you can't use keycodes like `LCTL()`, `KC_TILD`, or anything greater than `0xFF`. Modifiers specified as part of a Layer Tap or Mod Tap's keycode will be ignored. If you need to apply modifiers to your tapped keycode, [Tap Dance](https://github.com/qmk/qmk_firmware/blob/master/docs/feature_tap_dance.md#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
Additionally, if at least one right-handed modifier is specified in a Mod Tap or Layer Tap, it will cause all modifiers specified to become right-handed, so it is not possible to mix and match the two.
@@ -146,7 +146,7 @@ Additionally, hitting keys five times in a short period will lock that key. This
You can control the behavior of one shot keys by defining these in `config.h`:
```c
-#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */
+#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped once again. */
#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */
```
diff --git a/docs/feature_audio.md b/docs/feature_audio.md
index 38861e8c14df..7511598bcfb3 100644
--- a/docs/feature_audio.md
+++ b/docs/feature_audio.md
@@ -100,6 +100,16 @@ In music mode, the following keycodes work differently, and don't pass through:
* `KC_UP` - speed-up playback
* `KC_DOWN` - slow-down playback
+The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
+
+ #define PITCH_STANDARD_A 432.0f
+
+You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
+
+ #define NO_MUSIC_MODE
+
+### Music Mask
+
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
#define MUSIC_MASK keycode != KC_NO
@@ -120,13 +130,26 @@ For a more advanced way to control which keycodes should still be processed, you
Things that return false are not part of the mask, and are always processed.
-The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
+### Music Map
- #define PITCH_STANDARD_A 432.0f
+By default, the Music Mode uses the columns and row to determine the scale for the keys. For a board that uses a rectangular matrix that matches the keyboard layout, this is just fine. However, for boards that use a more complicated matrix (such as the Planck Rev6, or many split keyboards) this would result in a very skewed experience.
-You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
+However, the Music Map option allows you to remap the scaling for the music mode, so it fits the layout, and is more natural.
- #define NO_MUSIC_MODE
+To enable this feature, add `#define MUSIC_MAP` to your `config.h` file, and then you will want to add a `uint8_t music_map` to your keyboard's `c` file, or your `keymap.c`.
+
+```c
+const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_4x12(
+ 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11
+);
+```
+
+You will want to use whichever `LAYOUT` macro that your keyboard uses here. This maps it to the correct key location. Start in the bottom left of the keyboard layout, and move to the right, and then upwards. Fill in all the entries until you have a complete matrix.
+
+You can look at the [Planck Keyboard](https://github.com/qmk/qmk_firmware/blob/e9ace1487887c1f8b4a7e8e6d87c322988bec9ce/keyboards/planck/planck.c#L24-L29) as an example of how to implement this.
## Audio Click
@@ -152,8 +175,9 @@ You can configure the default, min and max frequencies, the stepping and built i
| `AUDIO_CLICKY_FREQ_DEFAULT` | 440.0f | Sets the default/starting audio frequency for the clicky sounds. |
| `AUDIO_CLICKY_FREQ_MIN` | 65.0f | Sets the lowest frequency (under 60f are a bit buggy). |
| `AUDIO_CLICKY_FREQ_MAX` | 1500.0f | Sets the the highest frequency. Too high may result in coworkers attacking you. |
-| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. |
+| `AUDIO_CLICKY_FREQ_FACTOR` | 1.18921f| Sets the stepping of UP/DOWN key codes. This is a multiplicative factor. The default steps the frequency up/down by a musical minor third. |
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
+| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
diff --git a/docs/feature_backlight.md b/docs/feature_backlight.md
index c7a1f131ed71..048d75390df6 100644
--- a/docs/feature_backlight.md
+++ b/docs/feature_backlight.md
@@ -30,7 +30,31 @@ You should then be able to use the keycodes below to change the backlight level.
This feature is distinct from both the [RGB underglow](feature_rgblight.md) and [RGB matrix](feature_rgb_matrix.md) features as it usually allows for only a single colour per switch, though you can obviously use multiple different coloured LEDs on a keyboard.
-Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software implementation will be used, and backlight breathing will not be available. Currently the supported pins are `B5`, `B6`, `B7`, and `C6`.
+Hardware PWM is only supported on certain pins of the MCU, so if the backlighting is not connected to one of them, a software PWM implementation triggered by hardware timer interrupts will be used.
+
+Hardware PWM is supported according to the following table:
+
+| Backlight Pin | Hardware timer |
+|---------------|----------------|
+|`B5` | Timer 1 |
+|`B6` | Timer 1 |
+|`B7` | Timer 1 |
+|`C6` | Timer 3 |
+| other | Software PWM |
+
+The [audio feature](feature_audio.md) also uses hardware timers. Please refer to the following table to know what hardware timer the software PWM will use depending on the audio configuration:
+
+| Audio Pin(s) | Audio Timer | Software PWM Timer |
+|--------------|-------------|--------------------|
+| `C4` | Timer 3 | Timer 1 |
+| `C5` | Timer 3 | Timer 1 |
+| `C6` | Timer 3 | Timer 1 |
+| `B5` | Timer 1 | Timer 3 |
+| `B6` | Timer 1 | Timer 3 |
+| `B7` | Timer 1 | Timer 3 |
+| `Bx` & `Cx` | Timer 1 & 3 | None |
+
+When all timers are in use for [audio](feature_audio.md), the backlight software PWM will not use a hardware timer, but instead will be triggered during the matrix scan. In this case the backlight doesn't support breathing and might show lighting artifacts (for instance flickering), because the PWM computation might not be called with enough timing precision.
## Configuration
@@ -39,11 +63,26 @@ To change the behaviour of the backlighting, `#define` these in your `config.h`:
|Define |Default |Description |
|---------------------|-------------|-------------------------------------------------------------------------------------------------------------|
|`BACKLIGHT_PIN` |`B7` |The pin that controls the LEDs. Unless you are designing your own keyboard, you shouldn't need to change this|
+|`BACKLIGHT_PINS` |*Not defined*|experimental: see below for more information|
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 15 excluding off) |
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
-|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if hardware PWM is used |
+|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
+## Multiple backlight pins
+
+Most keyboards have only one backlight pin which control all backlight LEDs (especially if the backlight is connected to an hardware PWM pin).
+In software PWM, it is possible to define multiple backlight pins. All those pins will be turned on and off at the same time during the PWM duty cycle.
+This feature allows to set for instance the Caps Lock LED (or any other controllable LED) brightness at the same level as the other LEDs of the backlight. This is useful if you have mapped LCTRL in place of Caps Lock and you need the Caps Lock LED to be part of the backlight instead of being activated when Caps Lock is on.
+
+To activate multiple backlight pins, you need to add something like this to your user `config.h`:
+
+~~~c
+#define BACKLIGHT_LED_COUNT 2
+#undef BACKLIGHT_PIN
+#define BACKLIGHT_PINS { F5, B2 }
+~~~
+
## Hardware PWM Implementation
When using the supported pins for backlighting, QMK will use a hardware timer configured to output a PWM signal. This timer will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
@@ -53,6 +92,15 @@ In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus th
The breathing effect is achieved by registering an interrupt handler for `TIMER1_OVF_vect` that is called whenever the counter resets, roughly 244 times per second.
In this handler, the value of an incrementing counter is mapped onto a precomputed brightness curve. To turn off breathing, the interrupt handler is simply disabled, and the brightness reset to the level stored in EEPROM.
+## Software PWM Implementation
+
+When `BACKLIGHT_PIN` is not set to a hardware backlight pin, QMK will use a hardware timer configured to trigger software interrupts. This time will count up to `ICRx` (by default `0xFFFF`) before resetting to 0.
+When resetting to 0, the CPU will fire an OVF (overflow) interrupt that will turn the LEDs on, starting the duty cycle.
+The desired brightness is calculated and stored in the `OCRxx` register. When the counter reaches this value, the CPU will fire a Compare Output match interrupt, which will turn the LEDs off.
+In this way `OCRxx` essentially controls the duty cycle of the LEDs, and thus the brightness, where `0x0000` is completely off and `0xFFFF` is completely on.
+
+The breathing effect is the same as in the hardware PWM implementation.
+
## Backlight Functions
|Function |Description |
diff --git a/docs/feature_combo.md b/docs/feature_combo.md
index 05ffc0d72577..680adce2dc27 100644
--- a/docs/feature_combo.md
+++ b/docs/feature_combo.md
@@ -19,7 +19,6 @@ combo_t key_combos[COMBO_COUNT] = {COMBO(test_combo, KC_ESC)};
This will send "Escape" if you hit the A and B keys.
!> This method only supports [basic keycodes](keycodes_basic.md). See the examples for more control.
-!> You cannot reuse (share) keys in combos. Each key should only belong to a single combo.
## Examples
@@ -29,7 +28,7 @@ If you want to add a list, then you'd use something like this:
enum combos {
AB_ESC,
JK_TAB
-}
+};
const uint16_t PROGMEM ab_combo[] = {KC_A, KC_B, COMBO_END};
const uint16_t PROGMEM jk_combo[] = {KC_J, KC_K, COMBO_END};
diff --git a/docs/feature_command.md b/docs/feature_command.md
index 53a140a11682..deabedc1c3f6 100644
--- a/docs/feature_command.md
+++ b/docs/feature_command.md
@@ -29,9 +29,10 @@ If you would like to change the key assignments for Command, `#define` these in
|`MAGIC_KEY_CONSOLE` |`C` |Enable the Command console |
|`MAGIC_KEY_VERSION` |`V` |Print the running QMK version to the console |
|`MAGIC_KEY_STATUS` |`S` |Print the current keyboard status to the console|
-|`MAGIC_KEY_HELP1` |`H` |Print Command help to the console |
-|`MAGIC_KEY_HELP2` |`SLASH` |Print Command help to the console (alternate) |
+|`MAGIC_KEY_HELP` |`H` |Print Command help to the console |
+|`MAGIC_KEY_HELP_ALT` |`SLASH` |Print Command help to the console (alternate) |
|`MAGIC_KEY_LAYER0` |`0` |Make layer 0 the default layer |
+|`MAGIC_KEY_LAYER0_ALT` |`GRAVE` |Make layer 0 the default layer (alternate) |
|`MAGIC_KEY_LAYER1` |`1` |Make layer 1 the default layer |
|`MAGIC_KEY_LAYER2` |`2` |Make layer 2 the default layer |
|`MAGIC_KEY_LAYER3` |`3` |Make layer 3 the default layer |
@@ -41,10 +42,10 @@ If you would like to change the key assignments for Command, `#define` these in
|`MAGIC_KEY_LAYER7` |`7` |Make layer 7 the default layer |
|`MAGIC_KEY_LAYER8` |`8` |Make layer 8 the default layer |
|`MAGIC_KEY_LAYER9` |`9` |Make layer 9 the default layer |
-|`MAGIC_KEY_LAYER0_ALT1` |`ESC` |Make layer 0 the default layer (alternate) |
-|`MAGIC_KEY_LAYER0_ALT2` |`GRAVE` |Make layer 0 the default layer (alternate) |
-|`MAGIC_KEY_BOOTLOADER` |`PAUSE` |Enter the bootloader |
+|`MAGIC_KEY_BOOTLOADER` |`B` |Jump to bootloader |
+|`MAGIC_KEY_BOOTLOADER_ALT` |`ESC` |Jump to bootloader (alternate) |
|`MAGIC_KEY_LOCK` |`CAPS` |Lock the keyboard so nothing can be typed |
-|`MAGIC_KEY_EEPROM` |`E` |Clear the EEPROM |
+|`MAGIC_KEY_EEPROM` |`E` |Print stored EEPROM config to the console |
+|`MAGIC_KEY_EEPROM_CLEAR` |`BSPACE` |Clear the EEPROM |
|`MAGIC_KEY_NKRO` |`N` |Toggle N-Key Rollover (NKRO) |
|`MAGIC_KEY_SLEEP_LED` |`Z` |Toggle LED when computer is sleeping |
diff --git a/docs/feature_debounce_type.md b/docs/feature_debounce_type.md
new file mode 100644
index 000000000000..38eca3f37c8c
--- /dev/null
+++ b/docs/feature_debounce_type.md
@@ -0,0 +1,42 @@
+# Debounce algorithm
+
+QMK supports multiple debounce algorithms through its debounce API.
+
+The logic for which debounce method called is below. It checks various defines that you have set in rules.mk
+
+```
+DEBOUNCE_DIR:= $(QUANTUM_DIR)/debounce
+DEBOUNCE_TYPE?= sym_g
+ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
+ QUANTUM_SRC += $(DEBOUNCE_DIR)/$(strip $(DEBOUNCE_TYPE)).c
+endif
+```
+
+# Debounce selection
+
+| DEBOUNCE_TYPE | Description | What else is needed |
+| ------------- | --------------------------------------------------- | ----------------------------- |
+| Not defined | Use the default algorithm, currently sym_g | Nothing |
+| custom | Use your own debounce.c | ```SRC += debounce.c``` add your own debounce.c and implement necessary functions |
+| anything_else | Use another algorithm from quantum/debounce/* | Nothing |
+
+**Regarding split keyboards**:
+The debounce code is compatible with split keyboards.
+
+# Use your own debouncing code
+* Set ```DEBOUNCE_TYPE = custom ```.
+* Add ```SRC += debounce.c```
+* Add your own ```debounce.c```. Look at current implementations in ```quantum/debounce``` for examples.
+* Debouncing occurs after every raw matrix scan.
+* Use num_rows rather than MATRIX_ROWS, so that split keyboards are supported correctly.
+
+# Changing between included debouncing methods
+You can either use your own code, by including your own debounce.c, or switch to another included one.
+Included debounce methods are:
+* eager_pr - debouncing per row. On any state change, response is immediate, followed by locking the row ```DEBOUNCE_DELAY``` milliseconds of no further input for that row.
+For use in keyboards where refreshing ```NUM_KEYS``` 8-bit counters is computationally expensive / low scan rate, and fingers usually only hit one row at a time. This could be
+appropriate for the ErgoDox models; the matrix is rotated 90°, and hence its "rows" are really columns, and each finger only hits a single "row" at a time in normal use.
+* eager_pk - debouncing per key. On any state change, response is immediate, followed by ```DEBOUNCE_DELAY``` milliseconds of no further input for that key
+* sym_g - debouncing per keyboard. On any state change, a global timer is set. When ```DEBOUNCE_DELAY``` milliseconds of no changes has occured, all input changes are pushed.
+
+
diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md
index 6eab402ef94f..dd12c91ce34e 100644
--- a/docs/feature_encoders.md
+++ b/docs/feature_encoders.md
@@ -38,7 +38,7 @@ or `keymap.c`:
} else {
tap_code(KC_PGUP);
}
- } else if (index == 2) {
+ } else if (index == 1) { /* Second encoder
if (clockwise) {
tap_code(KC_UP);
} else {
diff --git a/docs/feature_grave_esc.md b/docs/feature_grave_esc.md
index c6fa1602210c..f57c6042ca5a 100644
--- a/docs/feature_grave_esc.md
+++ b/docs/feature_grave_esc.md
@@ -4,7 +4,11 @@ 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`. When pressed it will behave like `KC_ESC`, but with Shift or GUI held it will send `KC_GRAVE`.
+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.
+
+## What Your OS Sees
+
+If Mary presses GESC on her keyboard, the OS will see an KC_ESC character. Now if Mary holds Shift down and presses GESC it will output `~`, or a shifted backtick. Now if she holds GUI/CMD/WIN, it will output a simple `
character.
## Keycodes
@@ -12,6 +16,10 @@ Replace the `KC_GRAVE` key in your keymap (usually to the left of the `1` key) w
|---------|-----------|------------------------------------------------------------------|
|`KC_GESC`|`GRAVE_ESC`|Escape when pressed, `
when Shift or GUI are held|
+### Caveats
+
+On macOS, Command+`
is by default mapped to "Move focus to next window" so it will not output a backtick. Additionally, Terminal always recognises this shortcut to cycle between windows, even if the shortcut is changed in the Keyboard preferences.
+
## Configuration
There are several possible key combinations this will break, among them Control+Shift+Escape on Windows and Command+Option+Escape on macOS. To work around this, you can `#define` these options in your `config.h`:
diff --git a/docs/feature_haptic_feedback.md b/docs/feature_haptic_feedback.md
new file mode 100644
index 000000000000..85fd4396402a
--- /dev/null
+++ b/docs/feature_haptic_feedback.md
@@ -0,0 +1,147 @@
+# Haptic Feedback
+
+## Haptic feedback rules.mk options
+
+The following options are currently available for haptic feedback in `rule.mk`:
+
+`HAPTIC_ENABLE += DRV2605L`
+
+`HAPTIC_ENABLE += SOLENOID`
+
+## Known Supported Hardware
+
+| Name | Description |
+|--------------------|-------------------------------------------------|
+| [LV061228B-L65-A](https://www.digikey.com/product-detail/en/jinlong-machinery-electronics-inc/LV061228B-L65-A/1670-1050-ND/7732325) | z-axis 2v LRA |
+| [Mini Motor Disc](https://www.adafruit.com/product/1201) | small 2-5v ERM |
+
+## Haptic Keycodes
+
+Not all keycodes below will work depending on which haptic mechanism you have chosen.
+
+| Name | Description |
+|-----------|-------------------------------------------------------|
+|`HPT_ON` | Turn haptic feedback on |
+|`HPT_OFF` | Turn haptic feedback on |
+|`HPT_TOG` | Toggle haptic feedback on/off |
+|`HPT_RST` | Reset haptic feedback config to default |
+|`HPT_FBK` | Toggle feedback to occur on keypress, release or both |
+|`HPT_BUZ` | Toggle solenoid buzz on/off |
+|`HPT_MODI` | Go to next DRV2605L waveform |
+|`HPT_MODD` | Go to previous DRV2605L waveform |
+|`HPT_DWLI` | Increase Solenoid dwell time |
+|`HPT_DWLD` | Decrease Solenoid dwell time |
+
+### Solenoids
+
+First you will need a build a circuit to drive the solenoid through a mosfet as most MCU will not be able to provide the current needed to drive the coil in the solenoid.
+
+[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
+
+Select a pin that has PWM for the signal pin
+
+```
+#define SOLENOID_PIN *pin*
+```
+
+Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin.
+
+### DRV2605L
+
+DRV2605L is controlled over i2c protocol, and has to be connected to the SDA and SCL pins, these varies depending on the MCU in use.
+
+#### Feedback motor setup
+
+This driver supports 2 different feedback motors. Set the following in your `config.h` based on which motor you have selected.
+
+##### ERM
+
+Eccentric Rotating Mass vibration motors (ERM) is motor with a off-set weight attached so when drive signal is attached, the off-set weight spins and causes a sinusoidal wave that translate into vibrations.
+
+```
+#define FB_ERM_LRA 0
+#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
+#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
+
+/* Please refer to your datasheet for the optimal setting for your specific motor. */
+#define RATED_VOLTAGE 3
+#define V_PEAK 5
+```
+##### LRA
+
+Linear resonant actuators (LRA, also know as a linear vibrator) works different from a ERM. A LRA has a weight and magnet suspended by springs and a voice coil. When the drive signal is applied, the weight would be vibrate on a single axis (side to side or up and down). Since the weight is attached to a spring, there is a resonance effect at a specific frequency. This frequency is where the LRA will operate the most efficiently. Refer to the motor's datasheet for the recommanded range for this frequency.
+
+```
+#define FB_ERM_LRA 1
+#define FB_BRAKEFACTOR 3 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
+#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
+
+/* Please refer to your datasheet for the optimal setting for your specific motor. */
+#define RATED_VOLTAGE 2
+#define V_PEAK 2.8
+#define V_RMS 2.0
+#define V_PEAK 2.1
+#define F_LRA 205 /* resonance freq */
+```
+
+#### DRV2605L waveform library
+
+DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)`
+
+List of waveform sequences from the datasheet:
+
+|seq# | Sequence name |seq# | Sequence name |seq# |Sequence name |
+|-----|---------------------|-----|-----------------------------------|-----|--------------------------------------|
+| 1 | strong_click | 43 | lg_dblclick_med_60 | 85 | transition_rampup_med_smooth2 |
+| 2 | strong_click_60 | 44 | lg_dblsharp_tick | 86 | transition_rampup_short_smooth1 |
+| 3 | strong_click_30 | 45 | lg_dblsharp_tick_80 | 87 | transition_rampup_short_smooth2 |
+| 4 | sharp_click | 46 | lg_dblsharp_tick_60 | 88 | transition_rampup_long_sharp1 |
+| 5 | sharp_click_60 | 47 | buzz | 89 | transition_rampup_long_sharp2 |
+| 6 | sharp_click_30 | 48 | buzz_80 | 90 | transition_rampup_med_sharp1 |
+| 7 | soft_bump | 49 | buzz_60 | 91 | transition_rampup_med_sharp2 |
+| 8 | soft_bump_60 | 50 | buzz_40 | 92 | transition_rampup_short_sharp1 |
+| 9 | soft_bump_30 | 51 | buzz_20 | 93 | transition_rampup_short_sharp2 |
+| 10 | dbl_click | 52 | pulsing_strong | 94 | transition_rampdown_long_smooth1_50 |
+| 11 | dbl_click_60 | 53 | pulsing_strong_80 | 95 | transition_rampdown_long_smooth2_50 |
+| 12 | trp_click | 54 | pulsing_medium | 96 | transition_rampdown_med_smooth1_50 |
+| 13 | soft_fuzz | 55 | pulsing_medium_80 | 97 | transition_rampdown_med_smooth2_50 |
+| 14 | strong_buzz | 56 | pulsing_sharp | 98 | transition_rampdown_short_smooth1_50 |
+| 15 | alert_750ms | 57 | pulsing_sharp_80 | 99 | transition_rampdown_short_smooth2_50 |
+| 16 | alert_1000ms | 58 | transition_click | 100 | transition_rampdown_long_sharp1_50 |
+| 17 | strong_click1 | 59 | transition_click_80 | 101 | transition_rampdown_long_sharp2_50 |
+| 18 | strong_click2_80 | 60 | transition_click_60 | 102 | transition_rampdown_med_sharp1_50 |
+| 19 | strong_click3_60 | 61 | transition_click_40 | 103 | transition_rampdown_med_sharp2_50 |
+| 20 | strong_click4_30 | 62 | transition_click_20 | 104 | transition_rampdown_short_sharp1_50 |
+| 21 | medium_click1 | 63 | transition_click_10 | 105 | transition_rampdown_short_sharp2_50 |
+| 22 | medium_click2_80 | 64 | transition_hum | 106 | transition_rampup_long_smooth1_50 |
+| 23 | medium_click3_60 | 65 | transition_hum_80 | 107 | transition_rampup_long_smooth2_50 |
+| 24 | sharp_tick1 | 66 | transition_hum_60 | 108 | transition_rampup_med_smooth1_50 |
+| 25 | sharp_tick2_80 | 67 | transition_hum_40 | 109 | transition_rampup_med_smooth2_50 |
+| 26 | sharp_tick3_60 | 68 | transition_hum_20 | 110 | transition_rampup_short_smooth1_50 |
+| 27 | sh_dblclick_str | 69 | transition_hum_10 | 111 | transition_rampup_short_smooth2_50 |
+| 28 | sh_dblclick_str_80 | 70 | transition_rampdown_long_smooth1 | 112 | transition_rampup_long_sharp1_50 |
+| 29 | sh_dblclick_str_60 | 71 | transition_rampdown_long_smooth2 | 113 | transition_rampup_long_sharp2_50 |
+| 30 | sh_dblclick_str_30 | 72 | transition_rampdown_med_smooth1 | 114 | transition_rampup_med_sharp1_50 |
+| 31 | sh_dblclick_med | 73 | transition_rampdown_med_smooth2 | 115 | transition_rampup_med_sharp2_50 |
+| 32 | sh_dblclick_med_80 | 74 | transition_rampdown_short_smooth1 | 116 | transition_rampup_short_sharp1_50 |
+| 33 | sh_dblclick_med_60 | 75 | transition_rampdown_short_smooth2 | 117 | transition_rampup_short_sharp2_50 |
+| 34 | sh_dblsharp_tick | 76 | transition_rampdown_long_sharp1 | 118 | long_buzz_for_programmatic_stopping |
+| 35 | sh_dblsharp_tick_80 | 77 | transition_rampdown_long_sharp2 | 119 | smooth_hum1_50 |
+| 36 | sh_dblsharp_tick_60 | 78 | transition_rampdown_med_sharp1 | 120 | smooth_hum2_40 |
+| 37 | lg_dblclick_str | 79 | transition_rampdown_med_sharp2 | 121 | smooth_hum3_30 |
+| 38 | lg_dblclick_str_80 | 80 | transition_rampdown_short_sharp1 | 122 | smooth_hum4_20 |
+| 39 | lg_dblclick_str_60 | 81 | transition_rampdown_short_sharp2 | 123 | smooth_hum5_10 |
+| 40 | lg_dblclick_str_30 | 82 | transition_rampup_long_smooth1 | | |
+| 41 | lg_dblclick_med | 83 | transition_rampup_long_smooth2 | | |
+| 42 | lg_dblclick_med_80 | 84 | transition_rampup_med_smooth1 | | |
+### Optional DRV2605L defines
+
+```
+#define DRV_GREETING *sequence name or number*
+```
+If haptic feedback is enabled, the keyboard will vibrate to a specific sqeuence during startup. That can be selected using the following define:
+
+```
+#define DRV_MODE_DEFAULT *sequence name or number*
+```
+This will set what sequence HPT_RST will set as the active mode. If not defined, mode will be set to 1 when HPT_RST is pressed.
diff --git a/docs/feature_layouts.md b/docs/feature_layouts.md
index 1ee8b5e35c6e..b34fd442d5c2 100644
--- a/docs/feature_layouts.md
+++ b/docs/feature_layouts.md
@@ -51,6 +51,35 @@ The folder name must be added to the keyboard's `rules.mk`:
but the `LAYOUT_` variable must be defined in `.h` as well.
+## Building a Keymap
+
+You should be able to build the keyboard keymap with a command in this format:
+
+ make :
+
+### Conflicting layouts
+When a keyboard supports multiple layout options,
+
+ LAYOUTS = ortho_4x4 ortho_4x12
+
+And a layout exists for both options,
+```
+layouts/
++ community/
+| + ortho_4x4/
+| | + /
+| | | + ...
+| + ortho_4x12/
+| | + /
+| | | + ...
+| + ...
+```
+
+The FORCE_LAYOUT argument can be used to specify which layout to build
+
+ make : FORCE_LAYOUT=ortho_4x4
+ make : FORCE_LAYOUT=ortho_4x12
+
## Tips for Making Layouts Keyboard-Agnostic
### Includes
diff --git a/docs/feature_led_matrix.md b/docs/feature_led_matrix.md
new file mode 100644
index 000000000000..372407b90c2a
--- /dev/null
+++ b/docs/feature_led_matrix.md
@@ -0,0 +1,90 @@
+# LED Matrix Lighting
+
+This feature allows you to use LED matrices driven by external drivers. It hooks into the backlight system so you can use the same keycodes as backlighting to control it.
+
+If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_rgb_matrix.md) instead.
+
+## Driver configuration
+
+### IS31FL3731
+
+There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
+
+ LED_MATRIX_ENABLE = IS31FL3731
+
+You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
+
+| Variable | Description | Default |
+|----------|-------------|---------|
+| `ISSI_TIMEOUT` | (Optional) How long to wait for i2c messages | 100 |
+| `ISSI_PERSISTENCE` | (Optional) Retry failed messages this many times | 0 |
+| `LED_DRIVER_COUNT` | (Required) How many LED driver IC's are present | |
+| `LED_DRIVER_LED_COUNT` | (Required) How many LED lights are present across all drivers | |
+| `LED_DRIVER_ADDR_1` | (Required) Address for the first LED driver | |
+| `LED_DRIVER_ADDR_2` | (Optional) Address for the second LED driver | |
+| `LED_DRIVER_ADDR_3` | (Optional) Address for the third LED driver | |
+| `LED_DRIVER_ADDR_4` | (Optional) Address for the fourth LED driver | |
+
+Here is an example using 2 drivers.
+
+ // 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 LED_DRIVER_ADDR_1 0b1110100
+ #define LED_DRIVER_ADDR_2 0b1110110
+
+ #define LED_DRIVER_COUNT 2
+ #define LED_DRIVER_1_LED_COUNT 25
+ #define LED_DRIVER_2_LED_COUNT 24
+ #define LED_DRIVER_LED_COUNT LED_DRIVER_1_LED_TOTAL + LED_DRIVER_2_LED_TOTAL
+
+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`:
+
+ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+ /* Refer to IS31 manual for these locations
+ * driver
+ * | LED address
+ * | | */
+ {0, C3_3},
+ ....
+ }
+
+Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731-simple.h`. The `driver` is the index of the driver you defined in your `config.h` (`0`, `1`, `2`, or `3` ).
+
+## Keycodes
+
+All LED matrix keycodes are currently shared with the [backlight system](feature_backlight.md).
+
+## LED Matrix Effects
+
+Currently no LED matrix effects have been created.
+
+## Custom layer effects
+
+Custom layer effects can be done by defining this in your `.c`:
+
+ void led_matrix_indicators_kb(void) {
+ led_matrix_set_index_value(index, value);
+ }
+
+A similar function works in the keymap as `led_matrix_indicators_user`.
+
+## Suspended state
+
+To use the suspend feature, add this to your `.c`:
+
+ void suspend_power_down_kb(void)
+ {
+ led_matrix_set_suspend_state(true);
+ }
+
+ void suspend_wakeup_init_kb(void)
+ {
+ led_matrix_set_suspend_state(false);
+ }
diff --git a/docs/feature_macros.md b/docs/feature_macros.md
index aa13fb97f4f8..d81c3c655978 100644
--- a/docs/feature_macros.md
+++ b/docs/feature_macros.md
@@ -146,9 +146,102 @@ send_string(my_str);
SEND_STRING(".."SS_TAP(X_END));
```
-## The Old Way: `MACRO()` & `action_get_macro`
-?> This is inherited from TMK, and hasn't been updated - it's recommend that you use `SEND_STRING` and `process_record_user` instead.
+## 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.
+
+### `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
+
+```c
+ if (record->event.pressed) {
+ // on keydown
+ } else {
+ // on keyup
+ }
+```
+
+### `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();`
+
+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();`
+
+This will send `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).
+
+If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
+
+### `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();`
+
+This will clear all mods and keys currently pressed.
+
+### `clear_mods();`
+
+This will clear all mods currently pressed.
+
+### `clear_keyboard_but_mods();`
+
+This will clear all keys besides the mods currently pressed.
+
+## Advanced Example:
+
+### 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.
+
+```c
+bool is_alt_tab_active = false; # ADD this near the begining of keymap.c
+uint16_t alt_tab_timer = 0; # we will be using them soon.
+
+enum custom_keycodes { # Make sure have the awesome keycode ready
+ ALT_TAB = SAFE_RANGE,
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) { # This will do most of the grunt work with the keycodes.
+ case ALT_TAB:
+ if (record->event.pressed) {
+ if (!is_alt_tab_active) {
+ is_alt_tab_active = true;
+ register_code(KC_LALT);
+ }
+ alt_tab_timer = timer_read();
+ register_code(KC_TAB);
+ } else {
+ unregister_code(KC_TAB);
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_scan_user(void) { # The very important timer.
+ if (is_alt_tab_active) {
+ if (timer_elapsed(alt_tab_timer) > 1000) {
+ unregister_code(KC_LALT);
+ is_alt_tab_active = false;
+ }
+ }
+}
+```
+
+---
+
+## **(DEPRECATED)** The Old Way: `MACRO()` & `action_get_macro`
+
+!> This is inherited from TMK, and hasn't been updated - it's recommended that you use `SEND_STRING` and `process_record_user` instead.
By default QMK assumes you don't have any macros. To define your macros you create an `action_get_macro()` function. For example:
@@ -183,11 +276,11 @@ A macro can include the following commands:
### Mapping a Macro to a Key
-Use the `M()` function within your `KEYMAP()` to call a macro. For example, here is the keymap for a 2-key keyboard:
+Use the `M()` function within your keymap to call a macro. For example, here is the keymap for a 2-key keyboard:
```c
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = KEYMAP(
+ [0] = LAYOUT(
M(0), M(1)
),
};
@@ -216,55 +309,16 @@ If you have a bunch of macros you want to refer to from your keymap while keepin
#define M_BYE M(1)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = KEYMAP(
+ [0] = LAYOUT(
M_HI, M_BYE
),
};
```
-## 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.
-
-### `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
-
-```c
- if (record->event.pressed) {
- // on keydown
- } else {
- // on keyup
- }
-```
-
-### `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();`
-
-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();`
-
-This will send `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).
-
-If you're having issues with taps (un)registering, you can add a delay between the register and unregister events by setting `#define TAP_CODE_DELAY 100` in your `config.h` file. The value is in milliseconds.
-
-### `clear_keyboard();`
-This will clear all mods and keys currently pressed.
-
-### `clear_mods();`
-
-This will clear all mods currently pressed.
-
-### `clear_keyboard_but_mods();`
-
-This will clear all keys besides the mods currently pressed.
+## Advanced Example:
-## Advanced Example: Single-Key Copy/Paste
+### Single-Key Copy/Paste
This example defines a macro which sends `Ctrl-C` when pressed down, and `Ctrl-V` when released.
diff --git a/docs/feature_mouse_keys.md b/docs/feature_mouse_keys.md
index 673eafaef5e0..363662f633b7 100644
--- a/docs/feature_mouse_keys.md
+++ b/docs/feature_mouse_keys.md
@@ -1,81 +1,119 @@
-# Mousekeys
+# Mouse keys
+Mouse keys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer at different speeds, press 5 buttons and scroll in 8 directions.
-Mousekeys is a feature that allows you to emulate a mouse using your keyboard. You can move the pointer around, click up to 5 buttons, and even scroll in all 4 directions. QMK uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
+## Adding mouse keys to your keyboard
-## Adding Mousekeys to a Keymap
+To use mouse keys, you must at least enable mouse keys support and map mouse actions to keys on your keyboard.
-There are two steps to adding Mousekeys support to your keyboard. You must enable support in the `rules.mk` file and you must map mouse actions to keys on your keyboard.
+### Enabling mouse keys
-### Adding Mousekeys Support in the `rules.mk`
+To enable mouse keys, add the following line to your keymap’s `rules.mk`:
-To add support for Mousekeys you simply need to add a single line to your keymap's `rules.mk`:
-
-```
+```c
MOUSEKEY_ENABLE = yes
```
-You can see an example here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/rules.mk
+### Mapping mouse actions
-### Mapping Mouse Actions to Keyboard Keys
+In your keymap you can use the following keycodes to map key presses to mouse actions:
-You can use these keycodes within your keymap to map button presses to mouse actions:
+|Key |Aliases |Description |
+|----------------|---------|-----------------|
+|`KC_MS_UP` |`KC_MS_U`|Move cursor up |
+|`KC_MS_DOWN` |`KC_MS_D`|Move cursor down |
+|`KC_MS_LEFT` |`KC_MS_L`|Move cursor left |
+|`KC_MS_RIGHT` |`KC_MS_R`|Move cursor right|
+|`KC_MS_BTN1` |`KC_BTN1`|Press button 1 |
+|`KC_MS_BTN2` |`KC_BTN2`|Press button 2 |
+|`KC_MS_BTN3` |`KC_BTN3`|Press button 3 |
+|`KC_MS_BTN4` |`KC_BTN4`|Press button 4 |
+|`KC_MS_BTN5` |`KC_BTN5`|Press button 5 |
+|`KC_MS_WH_UP` |`KC_WH_U`|Move wheel up |
+|`KC_MS_WH_DOWN` |`KC_WH_D`|Move wheel down |
+|`KC_MS_WH_LEFT` |`KC_WH_L`|Move wheel left |
+|`KC_MS_WH_RIGHT`|`KC_WH_R`|Move wheel right |
+|`KC_MS_ACCEL0` |`KC_ACL0`|Set speed to 0 |
+|`KC_MS_ACCEL1` |`KC_ACL1`|Set speed to 1 |
+|`KC_MS_ACCEL2` |`KC_ACL2`|Set speed to 2 |
-|Key |Aliases |Description |
-|----------------|---------|---------------------------|
-|`KC_MS_UP` |`KC_MS_U`|Mouse Cursor Up |
-|`KC_MS_DOWN` |`KC_MS_D`|Mouse Cursor Down |
-|`KC_MS_LEFT` |`KC_MS_L`|Mouse Cursor Left |
-|`KC_MS_RIGHT` |`KC_MS_R`|Mouse Cursor Right |
-|`KC_MS_BTN1` |`KC_BTN1`|Mouse Button 1 |
-|`KC_MS_BTN2` |`KC_BTN2`|Mouse Button 2 |
-|`KC_MS_BTN3` |`KC_BTN3`|Mouse Button 3 |
-|`KC_MS_BTN4` |`KC_BTN4`|Mouse Button 4 |
-|`KC_MS_BTN5` |`KC_BTN5`|Mouse Button 5 |
-|`KC_MS_WH_UP` |`KC_WH_U`|Mouse Wheel Up |
-|`KC_MS_WH_DOWN` |`KC_WH_D`|Mouse Wheel Down |
-|`KC_MS_WH_LEFT` |`KC_WH_L`|Mouse Wheel Left |
-|`KC_MS_WH_RIGHT`|`KC_WH_R`|Mouse Wheel Right |
-|`KC_MS_ACCEL0` |`KC_ACL0`|Set mouse acceleration to 0|
-|`KC_MS_ACCEL1` |`KC_ACL1`|Set mouse acceleration to 1|
-|`KC_MS_ACCEL2` |`KC_ACL2`|Set mouse acceleration to 2|
+## Configuring mouse keys
-You can see an example in the `_ML` here: https://github.com/qmk/qmk_firmware/blob/master/keyboards/clueboard/66/keymaps/mouse_keys/keymap.c#L46
+Mouse keys supports two different modes to move the cursor:
-## Configuring the Behavior of Mousekeys
+* **Accelerated (default):** Holding movement keys accelerates the cursor until it reaches its maximum speed.
+* **Constant:** Holding movement keys moves the cursor at constant speeds.
-The default speed for controlling the mouse with the keyboard is intentionally slow. You can adjust these parameters by adding these settings to your keymap's `config.h` file. All times are specified in milliseconds (ms).
+The same principle applies to scrolling.
-```
-#define MOUSEKEY_DELAY 300
-#define MOUSEKEY_INTERVAL 50
-#define MOUSEKEY_MAX_SPEED 10
-#define MOUSEKEY_TIME_TO_MAX 20
-#define MOUSEKEY_WHEEL_MAX_SPEED 8
-#define MOUSEKEY_WHEEL_TIME_TO_MAX 40
-```
+Configuration options that are times, intervals or delays are given in milliseconds. Scroll speed is given as multiples of the default scroll step. For example, a scroll speed of 8 means that each scroll action covers 8 times the length of the default scroll step as defined by your operating system or application.
+
+### Accelerated mode
+This is the default mode. You can adjust the cursor and scrolling acceleration using the following settings in your keymap’s `config.h` file:
-### `MOUSEKEY_DELAY`
+|Define |Default|Description |
+|----------------------------|-------|---------------------------------------------------------|
+|`MOUSEKEY_DELAY` |300 |Delay between pressing a movement key and cursor movement|
+|`MOUSEKEY_INTERVAL` |50 |Time between cursor movements |
+|`MOUSEKEY_MAX_SPEED` |10 |Maximum cursor speed at which acceleration stops |
+|`MOUSEKEY_TIME_TO_MAX` |20 |Time until maximum cursor speed is reached |
+|`MOUSEKEY_WHEEL_MAX_SPEED` |8 |Maximum number of scroll steps per scroll action |
+|`MOUSEKEY_WHEEL_TIME_TO_MAX`|40 |Time until maximum scroll speed is reached |
-When one of the mouse movement buttons is pressed this setting is used to define the delay between that button press and the mouse cursor moving. Some people find that small movements are impossible if this setting is too low, while settings that are too high feel sluggish.
+Tips:
-### `MOUSEKEY_INTERVAL`
+* Setting `MOUSEKEY_DELAY` too low makes the cursor unresponsive. Setting it too high makes small movements difficult.
+* For smoother cursor movements, lower the value of `MOUSEKEY_INTERVAL`. If the refresh rate of your display is 60Hz, you could set it to `16` (1/60). As this raises the cursor speed significantly, you may want to lower `MOUSEKEY_MAX_SPEED`.
+* Setting `MOUSEKEY_TIME_TO_MAX` or `MOUSEKEY_WHEEL_TIME_TO_MAX` to `0` will disable acceleration for the cursor or scrolling respectively. This way you can make one of them constant while keeping the other accelerated, which is not possible in constant speed mode.
-When a movement key is held down this specifies how long to wait between each movement report. Lower settings will translate into an effectively higher mouse speed.
+Cursor acceleration uses the same algorithm as the X Window System MouseKeysAccel feature. You can read more about it [on Wikipedia](https://en.wikipedia.org/wiki/Mouse_keys).
-### `MOUSEKEY_MAX_SPEED`
+### Constant mode
-As a movement key is held down the speed of the mouse cursor will increase until it reaches `MOUSEKEY_MAX_SPEED`.
+In this mode you can define multiple different speeds for both the cursor and the mouse wheel. There is no acceleration. `KC_ACL0`, `KC_ACL1` and `KC_ACL2` change the cursor and scroll speed to their respective setting.
-### `MOUSEKEY_TIME_TO_MAX`
+You can choose whether speed selection is momentary or tap-to-select:
-How long you want to hold down a movement key for until `MOUSEKEY_MAX_SPEED` is reached. This controls how quickly your cursor will accelerate.
+* **Momentary:** The chosen speed is only active while you hold the respective key. When the key is raised, mouse keys returns to the unmodified speed.
+* **Tap-to-select:** The chosen speed is activated when you press the respective key and remains active even after the key has been raised. The default speed is that of `KC_ACL1`. There is no unmodified speed.
-### `MOUSEKEY_WHEEL_MAX_SPEED`
+The default speeds from slowest to fastest are as follows:
-The top speed for scrolling movements.
+* **Momentary:** `KC_ACL0` < `KC_ACL1` < *unmodified* < `KC_ACL2`
+* **Tap-to-select:** `KC_ACL0` < `KC_ACL1` < `KC_ACL2`
-### `MOUSEKEY_WHEEL_TIME_TO_MAX`
+To use constant speed mode, you must at least define `MK_3_SPEED` in your keymap’s `config.h` file:
+
+```c
+#define MK_3_SPEED
+```
+
+To enable momentary mode, also define `MK_MOMENTARY_ACCEL`:
+
+```c
+#define MK_MOMENTARY_ACCEL
+```
-How long you want to hold down a scroll key for until `MOUSEKEY_WHEEL_MAX_SPEED` is reached. This controls how quickly your scrolling will accelerate.
+Use the following settings if you want to adjust cursor movement or scrolling:
+
+|Define |Default |Description |
+|---------------------|-------------|-------------------------------------------|
+|`MK_3_SPEED` |*Not defined*|Enable constant cursor speeds |
+|`MK_MOMENTARY_ACCEL` |*Not defined*|Enable momentary speed selection |
+|`MK_C_OFFSET_UNMOD` |16 |Cursor offset per movement (unmodified) |
+|`MK_C_INTERVAL_UNMOD`|16 |Time between cursor movements (unmodified) |
+|`MK_C_OFFSET_0` |1 |Cursor offset per movement (`KC_ACL0`) |
+|`MK_C_INTERVAL_0` |32 |Time between cursor movements (`KC_ACL0`) |
+|`MK_C_OFFSET_1` |4 |Cursor offset per movement (`KC_ACL1`) |
+|`MK_C_INTERVAL_1` |16 |Time between cursor movements (`KC_ACL1`) |
+|`MK_C_OFFSET_2` |32 |Cursor offset per movement (`KC_ACL2`) |
+|`MK_C_INTERVAL_2` |16 |Time between cursor movements (`KC_ACL2`) |
+|`MK_W_OFFSET_UNMOD` |1 |Scroll steps per scroll action (unmodified)|
+|`MK_W_INTERVAL_UNMOD`|40 |Time between scroll steps (unmodified) |
+|`MK_W_OFFSET_0` |1 |Scroll steps per scroll action (`KC_ACL0`) |
+|`MK_W_INTERVAL_0` |360 |Time between scroll steps (`KC_ACL0`) |
+|`MK_W_OFFSET_1` |1 |Scroll steps per scroll action (`KC_ACL1`) |
+|`MK_W_INTERVAL_1` |120 |Time between scroll steps (`KC_ACL1`) |
+|`MK_W_OFFSET_2` |1 |Scroll steps per scroll action (`KC_ACL2`) |
+|`MK_W_INTERVAL_2` |20 |Time between scroll steps (`KC_ACL2`) |
diff --git a/docs/feature_oled_driver.md b/docs/feature_oled_driver.md
new file mode 100644
index 000000000000..fcc19515a945
--- /dev/null
+++ b/docs/feature_oled_driver.md
@@ -0,0 +1,274 @@
+# OLED Driver
+
+## OLED Supported Hardware
+
+128x32 OLED modules using SSD1306 driver IC over I2C. Supported on AVR based keyboards. Possible but untested hardware includes ARM based keyboards and other sized OLED modules using SSD1306 over I2C, such as 128x64.
+
+!> Warning: This OLED Driver currently uses the new i2c_master driver from split common code. If your split keyboard uses i2c to communication between sides this driver could cause an address conflict (serial is fine). Please contact your keyboard vendor and ask them to migrate to the latest split common code to fix this.
+
+## Usage
+
+To enable the OLED feature, there are three steps. First, when compiling your keyboard, you'll need to set `OLED_DRIVER_ENABLE=yes` in `rules.mk`, e.g.:
+
+```
+OLED_DRIVER_ENABLE = yes
+```
+
+This enables the feature and the `OLED_DRIVER_ENABLE` define. Then in your `keymap.c` file, you will need to implement the user task call, e.g:
+
+```C++
+#ifdef OLED_DRIVER_ENABLE
+void oled_task_user(void) {
+ // Host Keyboard Layer Status
+ oled_write_P(PSTR("Layer: "), false);
+ switch (biton32(layer_state)) {
+ case _QWERTY:
+ oled_write_P(PSTR("Default\n"), false);
+ break;
+ case _FN:
+ oled_write_P(PSTR("FN\n"), false);
+ break;
+ case _ADJ:
+ oled_write_P(PSTR("ADJ\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);
+ }
+
+ // Host Keyboard LED Status
+ uint8_t led_usb_state = host_keyboard_leds();
+ oled_write_P(led_usb_state & (1<Requires user to implement the below defines. |
+|`OLED_DISPLAY_WIDTH` |`128` |The width of the OLED display. |
+|`OLED_DISPLAY_HEIGHT` |`32` |The height of the OLED display. |
+|`OLED_MATRIX_SIZE` |`512` |The local buffer size to allocate.
`(OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH)`|
+|`OLED_BLOCK_TYPE` |`uint16_t` |The unsigned integer type to use for dirty rendering.|
+|`OLED_BLOCK_COUNT` |`16` |The number of blocks the display is divided into for dirty rendering.
`(sizeof(OLED_BLOCK_TYPE) * 8)`|
+|`OLED_BLOCK_SIZE` |`32` |The size of each block for dirty rendering
`(OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)`|
+|`OLED_SOURCE_MAP` |`{ 0, ... N }` |Precalculated source array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
+|`OLED_TARGET_MAP` |`{ 24, ... N }`|Precalculated target array to use for mapping source buffer to target OLED memory in 90 degree rendering. |
+
+
+### 90 Degree Rotation - Technical Mumbo Jumbo
+
+```C
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+```
+
+ OLED displays driven by SSD1306 drivers only natively support in hard ware 0 degree and 180 degree rendering. This feature is done in software and not free. Using this feature will increase the time to calculate what data to send over i2c to the OLED. If you are strapped for cycles, this can cause keycodes to not register. In testing however, the rendering time on an `atmega32u4` board only went from 2ms to 5ms and keycodes not registering was only noticed once we hit 15ms.
+
+ 90 Degree Rotated Rendering is achieved by using bitwise operations to rotate each 8 block of memory and uses two precalculated arrays to remap buffer memory to OLED memory. The memory map defines are precalculated for remap performance and are calculated based on the OLED Height, Width, and Block Size. For example, in the 128x32 implementation with a `uint8_t` block type, we have a 64 byte block size. This gives us eight 8 byte blocks that need to be rotated and rendered. The OLED renders horizontally two 8 byte blocks before moving down a page, e.g:
+
+| | | | | | |
+|---|---|---|---|---|---|
+| 0 | 1 | | | | |
+| 2 | 3 | | | | |
+| 4 | 5 | | | | |
+| 6 | 7 | | | | |
+
+However the local buffer is stored as if it was Height x Width display instead of Width x Height, e.g:
+
+| | | | | | |
+|---|---|---|---|---|---|
+| 3 | 7 | | | | |
+| 2 | 6 | | | | |
+| 1 | 5 | | | | |
+| 0 | 4 | | | | |
+
+So those precalculated arrays just index the memory offsets in the order in which each one iterates its data.
+
+## OLED API
+
+```C++
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+
+// Initialize the OLED display, rotating the rendered output based on the define passed in.
+// Returns true if the OLED was initialized successfully
+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_user(oled_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void oled_clear(void);
+
+// Renders the dirty chunks of the buffer to OLED display
+void oled_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
+void oled_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void oled_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void oled_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void oled_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void oled_write_ln(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
+void oled_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
+void oled_write_ln_P(const char *data, bool invert);
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool oled_on(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool oled_off(void);
+
+// Basically it's oled_render, but with timeout management and oled_task_user calling!
+void oled_task(void);
+
+// Called at the start of oled_task, weak function overridable by the user
+void oled_task_user(void);
+
+// Scrolls the entire display right
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_right(void);
+
+// Scrolls the entire display left
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_left(void);
+
+// Turns off display scrolling
+// Returns true if the screen was not scrolling or stops scrolling
+bool oled_scroll_off(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t oled_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the OLED
+uint8_t oled_max_lines(void);
+```
+
+## SSD1306.h driver conversion guide
+
+|Old API |Recommended New API |
+|---------------------------|-----------------------------------|
+|`struct CharacterMatrix` |*removed - delete all references* |
+|`iota_gfx_init` |`oled_init` |
+|`iota_gfx_on` |`oled_on` |
+|`iota_gfx_off` |`oled_off` |
+|`iota_gfx_flush` |`oled_render` |
+|`iota_gfx_write_char` |`oled_write_char` |
+|`iota_gfx_write` |`oled_write` |
+|`iota_gfx_write_P` |`oled_write_P` |
+|`iota_gfx_clear_screen` |`oled_clear` |
+|`matrix_clear` |*removed - delete all references* |
+|`matrix_write_char_inner` |`oled_write_char` |
+|`matrix_write_char` |`oled_write_char` |
+|`matrix_write` |`oled_write` |
+|`matrix_write_ln` |`oled_write_ln` |
+|`matrix_write_P` |`oled_write_P` |
+|`matrix_write_ln_P` |`oled_write_ln_P` |
+|`matrix_render` |`oled_render` |
+|`iota_gfx_task` |`oled_task` |
+|`iota_gfx_task_user` |`oled_task_user` |
diff --git a/docs/feature_rgb_matrix.md b/docs/feature_rgb_matrix.md
index 0af1e4947960..8f0cd12b3caa 100644
--- a/docs/feature_rgb_matrix.md
+++ b/docs/feature_rgb_matrix.md
@@ -1,217 +1,403 @@
# RGB Matrix Lighting
-## Driver configuration
+This feature allows you to use RGB LED matrices driven by external drivers. It hooks into the RGBLIGHT system so you can use the same keycodes as RGBLIGHT to control it.
+
+If you want to use single color LED's you should use the [LED Matrix Subsystem](feature_led_matrix.md) instead.
+## Driver configuration
+---
### IS31FL3731
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3731
+```C
+RGB_MATRIX_ENABLE = IS31FL3731
+```
Configure the hardware via your `config.h`:
- // 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
+```C
+// 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)
+```
+
+!> 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.
Define these arrays listing all the LEDs in your `.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, C1_3, C2_3, C3_3},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, C1_3, C2_3, C3_3},
+ ....
+}
+```
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf) and the header file `drivers/issi/is31fl3731.h`. The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now).
-### IS31FL3733
+---
+### IS31FL3733/IS31FL3737
+
+!> For the IS31FL3737, replace all instances of `IS31FL3733` below with `IS31FL3737`.
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
- RGB_MATRIX_ENABLE = IS31FL3733
+```C
+RGB_MATRIX_ENABLE = IS31FL3733
+```
Configure the hardware via your `config.h`:
- // 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:
- // 00 <-> GND
- // 01 <-> SCL
- // 10 <-> SDA
- // 11 <-> VCC
- // ADDR1 represents A1:A0 of the 7-bit address.
- // 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 1
- #define DRIVER_1_LED_TOTAL 64
- #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
+```C
+// 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:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// 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
+```
Currently only a single drivers is supported, but it would be trivial to support all 4 combinations. For now define `DRIVER_ADDR_2` as `DRIVER_ADDR_1`
Define these arrays listing all the LEDs in your `.c`:
- const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
- /* Refer to IS31 manual for these locations
- * driver
- * | R location
- * | | G location
- * | | | B location
- * | | | | */
- {0, B_1, A_1, C_1},
- ....
- }
+```C
+const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
+/* Refer to IS31 manual for these locations
+ * driver
+ * | R location
+ * | | G location
+ * | | | B location
+ * | | | | */
+ {0, B_1, A_1, C_1},
+ ....
+}
+```
Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3733.pdf) and the header file `drivers/issi/is31fl3733.h`. The `driver` is the index of the driver you defined in your `config.h` (Only `0` right now).
-From this point forward the configuration is the same for all the drivers.
+---
- const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
- /* {row | col << 4}
- * | {x=0..224, y=0..64}
- * | | modifier
- * | | | */
- {{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
- {{0|(1<<4)}, {20.36*1, 21.33*0}, 1},
- ....
- }
+### WS2812 (AVR only)
-The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is:
+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`:
- x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION
- y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION
+```C
+RGB_MATRIX_ENABLE = WS2812
+```
-Where all variables are decimels/floats.
+Configure the hardware via your `config.h`:
-`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects).
+```C
+// The pin connected to the data pin of the LEDs
+#define RGB_DI_PIN D7
+// The number of LEDs connected
+#define DRIVER_LED_TOTAL 70
+```
+
+---
+
+From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
+
+```C
+const led_config_t g_led_config = { {
+ // Key Matrix to LED Index
+ { 5, NO_LED, NO_LED, 0 },
+ { NO_LED, NO_LED, NO_LED, NO_LED },
+ { 4, NO_LED, NO_LED, 1 },
+ { 3, NO_LED, NO_LED, 2 }
+}, {
+ // LED Index to Physical Position
+ { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
+}, {
+ // LED Index to Flag
+ 1, 4, 4, 4, 4, 1
+} };
+```
+
+The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical `{ x, y }` position on the keyboard. The default expected range of values for `{ x, y }` is the inclusive range `{ 0..224, 0..64 }`. This default expected range is due to effects that calculate the center of the keyboard for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents `{ x, y }` coordinate `{ 0, 0 }` and the bottom right of your keyboard represents `{ 224, 64 }`. Using this as a basis, you can use the following formula to calculate the physical position:
+
+```C
+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.
+
+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.
+
+`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
+
+## Flags
+
+|Define |Description |
+|------------------------------------|-------------------------------------------|
+|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
+|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
+|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. |
+|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. |
+|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
+|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
+|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
## Keycodes
All RGB keycodes are currently shared with the RGBLIGHT system:
- * `RGB_TOG` - toggle
- * `RGB_MOD` - cycle through modes
- * `RGB_HUI` - increase hue
- * `RGB_HUD` - decrease hue
- * `RGB_SAI` - increase saturation
- * `RGB_SAD` - decrease saturation
- * `RGB_VAI` - increase value
- * `RGB_VAD` - decrease value
- * `RGB_SPI` - increase speed effect (no EEPROM support)
- * `RGB_SPD` - decrease speed effect (no EEPROM support)
-
-
- * `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
+* `RGB_TOG` - toggle
+* `RGB_MOD` - cycle through modes
+* `RGB_HUI` - increase hue
+* `RGB_HUD` - decrease hue
+* `RGB_SAI` - increase saturation
+* `RGB_SAD` - decrease saturation
+* `RGB_VAI` - increase value
+* `RGB_VAD` - decrease value
+* `RGB_SPI` - increase speed effect (no EEPROM support)
+* `RGB_SPD` - decrease speed effect (no EEPROM support)
+* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system
## RGB Matrix Effects
-These are the effects that are currently available:
-
- enum rgb_matrix_effects {
- RGB_MATRIX_SOLID_COLOR = 1,
- RGB_MATRIX_ALPHAS_MODS,
- RGB_MATRIX_DUAL_BEACON,
- RGB_MATRIX_GRADIENT_UP_DOWN,
- RGB_MATRIX_RAINDROPS,
- RGB_MATRIX_CYCLE_ALL,
- RGB_MATRIX_CYCLE_LEFT_RIGHT,
- RGB_MATRIX_CYCLE_UP_DOWN,
- RGB_MATRIX_RAINBOW_BEACON,
- RGB_MATRIX_RAINBOW_PINWHEELS,
- RGB_MATRIX_RAINBOW_MOVING_CHEVRON,
- RGB_MATRIX_JELLYBEAN_RAINDROPS,
- RGB_MATRIX_DIGITAL_RAIN,
- #ifdef RGB_MATRIX_KEYPRESSES
- RGB_MATRIX_SOLID_REACTIVE,
- RGB_MATRIX_SPLASH,
- RGB_MATRIX_MULTISPLASH,
- RGB_MATRIX_SOLID_SPLASH,
- RGB_MATRIX_SOLID_MULTISPLASH,
- #endif
- RGB_MATRIX_EFFECT_MAX
- };
-
-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_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
-|`#define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN` |Disables `RGB_MATRIX_GRADIENT_UP_DOWN` |
-|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
-|`#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_BEACON` |Disables `RGB_MATRIX_RAINBOW_BEACON` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
-|`#define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON`|
-|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
-|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
-|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
-|`#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` |
+All effects have been configured to support current configuration values (Hue, Saturation, Value, & Speed) unless otherwise noted below. These are the effects that are currently available:
+
+```C
+enum rgb_matrix_effects {
+ RGB_MATRIX_NONE = 0,
+ RGB_MATRIX_SOLID_COLOR = 1, // Static single hue, no speed support
+ RGB_MATRIX_ALPHAS_MODS, // Static dual hue, speed is hue for secondary hue
+ RGB_MATRIX_GRADIENT_UP_DOWN, // Static gradient top to bottom, speed controls how much gradient changes
+ RGB_MATRIX_BREATHING, // Single hue brightness cycling animation
+ RGB_MATRIX_BAND_SAT, // Single hue band fading saturation scrolling left to right
+ RGB_MATRIX_BAND_VAL, // Single hue band fading brightness scrolling left to right
+ RGB_MATRIX_BAND_PINWHEEL_SAT, // Single hue 3 blade spinning pinwheel fades saturation
+ RGB_MATRIX_BAND_PINWHEEL_VAL, // Single hue 3 blade spinning pinwheel fades brightness
+ RGB_MATRIX_BAND_SPIRAL_SAT, // Single hue spinning spiral fades saturation
+ RGB_MATRIX_BAND_SPIRAL_VAL, // Single hue spinning spiral fades brightness
+ RGB_MATRIX_CYCLE_ALL, // Full keyboard solid hue cycling through full gradient
+ RGB_MATRIX_CYCLE_LEFT_RIGHT, // Full gradient scrolling left to right
+ RGB_MATRIX_CYCLE_UP_DOWN, // Full gradient scrolling top to bottom
+ RGB_MATRIX_CYCLE_OUT_IN, // Full gradient scrolling out to in
+ RGB_MATRIX_CYCLE_OUT_IN_DUAL, // Full dual gradients scrolling out to in
+ RGB_MATRIX_RAINBOW_MOVING_CHEVRON, // Full gradent Chevron shapped scrolling left to right
+ RGB_MATRIX_CYCLE_PINWHEEL, // Full gradient spinning pinwheel around center of keyboard
+ RGB_MATRIX_CYCLE_SPIRAL, // Full gradient spinning spiral around center of keyboard
+ RGB_MATRIX_DUAL_BEACON, // Full gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_BEACON, // Full tighter gradient spinning around center of keyboard
+ RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
+ RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
+ RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
+#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
+ RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
+ RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
+#endif
+#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
+ RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
+ RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
+ RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
+ RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
+ RGB_MATRIX_SPLASH, // Full gradient & value pulse away from a single key hit then fades value out
+ RGB_MATRIX_MULTISPLASH, // Full gradient & value pulse away from multiple key hits then fades value out
+ RGB_MATRIX_SOLID_SPLASH, // Hue & value pulse away from a single key hit then fades value out
+ RGB_MATRIX_SOLID_MULTISPLASH, // Hue & value pulse away from multiple key hits then fades value out
+#endif
+ RGB_MATRIX_EFFECT_MAX
+};
+```
+You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `config.h`:
-## Custom layer effects
-
-Custom layer effects can be done by defining this in your `.c`:
- void rgb_matrix_indicators_kb(void) {
- rgb_matrix_set_color(index, red, green, blue);
- }
+|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_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_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_RAINBOW_MOVING_CHEVRON` |Disables `RGB_MATRIX_RAINBOW_MOVING_CHEVRON` |
+|`#define DISABLE_RGB_MATRIX_DUAL_BEACON` |Disables `RGB_MATRIX_DUAL_BEACON` |
+|`#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_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_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
+|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
+|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
+|`#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` |
+
+
+## Custom RGB Matrix Effects
+
+By setting `RGB_MATRIX_CUSTOM_USER` (and/or `RGB_MATRIX_CUSTOM_KB`) in `rule.mk`, new effects can be defined directly from userspace, without having to edit any QMK core files.
+
+To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks something like this:
+
+`rgb_matrix_user.inc` should go in the root of the keymap directory.
+`rgb_matrix_kb.inc` should go in the root of the keyboard directory.
+
+```C
+// !!! DO NOT ADD #pragma once !!! //
+
+// Step 1.
+// Declare custom effects using the RGB_MATRIX_EFFECT macro
+// (note the lack of semicolon after the macro!)
+RGB_MATRIX_EFFECT(my_cool_effect)
+RGB_MATRIX_EFFECT(my_cool_effect2)
+
+// Step 2.
+// Define effects inside the `RGB_MATRIX_CUSTOM_EFFECT_IMPLS` ifdef block
+#ifdef RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+
+// e.g: A simple effect, self-contained within a single method
+static bool my_cool_effect(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ for (uint8_t i = led_min; i < led_max; i++) {
+ rgb_matrix_set_color(i, 0xff, 0xff, 0x00);
+ }
+ return led_max < DRIVER_LED_TOTAL;
+}
+
+// e.g: A more complex effect, relying on external methods and state, with
+// dedicated init and run methods
+static uint8_t some_global_state;
+static void my_cool_effect2_complex_init(effect_params_t* params) {
+ some_global_state = 1;
+}
+static bool my_cool_effect2_complex_run(effect_params_t* params) {
+ RGB_MATRIX_USE_LIMITS(led_min, led_max);
+ 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;
+}
+static bool my_cool_effect2(effect_params_t* params) {
+ if (params->init) my_cool_effect2_complex_init(params);
+ return my_cool_effect2_complex_run(params);
+}
+
+#endif // RGB_MATRIX_CUSTOM_EFFECT_IMPLS
+```
+
+For inspiration and examples, check out the built-in effects under `quantum/rgb_matrix_animation/`
+
+
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
-A similar function works in the keymap as `rgb_matrix_indicators_user`.
## Additional `config.h` Options
- #define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
- #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
- #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
- #define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended
- #define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1
- #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
+```C
+#define RGB_MATRIX_KEYPRESSES // reacts to keypresses
+#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
+#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
+#define RGB_DISABLE_WHEN_USB_SUSPENDED false // 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 RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
+```
## EEPROM storage
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with:
- #define EECONFIG_RGB_MATRIX (uint32_t *)16
+```C
+#define EECONFIG_RGB_MATRIX (uint32_t *)28
+```
-Where `16` is an unused index from `eeconfig.h`.
+Where `28` is an unused index from `eeconfig.h`.
## Suspended state
To use the suspend feature, add this to your `.c`:
- void suspend_power_down_kb(void)
- {
- rgb_matrix_set_suspend_state(true);
- }
-
- void suspend_wakeup_init_kb(void)
- {
- rgb_matrix_set_suspend_state(false);
- }
+```C
+void suspend_power_down_kb(void)
+{
+ rgb_matrix_set_suspend_state(true);
+}
+
+void suspend_wakeup_init_kb(void)
+{
+ rgb_matrix_set_suspend_state(false);
+}
+```
diff --git a/docs/feature_rgblight.md b/docs/feature_rgblight.md
index 52d5c5fe8a20..be4ddfa72956 100644
--- a/docs/feature_rgblight.md
+++ b/docs/feature_rgblight.md
@@ -23,10 +23,11 @@ RGBLIGHT_ENABLE = yes
At minimum you must define the data pin your LED strip is connected to, and the number of LEDs in the strip, in your `config.h`. If your keyboard has onboard RGB LEDs, and you are simply creating a keymap, you usually won't need to modify these.
-|Define |Description |
-|------------|---------------------------------------------|
-|`RGB_DI_PIN`|The pin connected to the data pin of the LEDs|
-|`RGBLED_NUM`|The number of LEDs connected |
+|Define |Description |
+|---------------|---------------------------------------------------------------------------------------------------------|
+|`RGB_DI_PIN` |The pin connected to the data pin of the LEDs |
+|`RGBLED_NUM` |The number of LEDs connected |
+|`RGBLED_SPLIT` |(Optional) For split keyboards, the number of LEDs connected on each half directly wired to `RGB_DI_PIN` |
Then you should be able to use the keycodes below to change the RGB lighting to your liking.
@@ -36,9 +37,9 @@ QMK uses [Hue, Saturation, and Value](https://en.wikipedia.org/wiki/HSL_and_HSV)
-Changing the **Hue** cycles around the circle.
-Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
-Changing the **Value** sets the overall brightness.
+Changing the **Hue** cycles around the circle.
+Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.
+Changing the **Value** sets the overall brightness.
## Keycodes
@@ -74,9 +75,9 @@ Your RGB lighting can be configured by placing these `#define`s in your `config.
|`RGBLIGHT_VAL_STEP` |`17` |The number of steps to increment the brightness by |
|`RGBLIGHT_LIMIT_VAL` |`255` |The maximum brightness level |
|`RGBLIGHT_SLEEP` |*Not defined*|If defined, the RGB lighting will be switched off when the host goes to sleep|
+|`RGBLIGHT_SPLIT` |*Not defined*|If defined, synchronization functionality for split keyboards is added|
-## Animations
-
+## Effects and Animations
Not only can this lighting be whatever color you want,
if `RGBLIGHT_EFFECT_xxxx` or `RGBLIGHT_ANIMATIONS` is defined, you also have a number of animation modes at your disposal:
@@ -98,32 +99,59 @@ Check out [this video](https://youtube.com/watch?v=VKrpPAHlisY) for a demonstrat
Note: For versions older than 0.6.117, The mode numbers were written directly. In `quantum/rgblight.h` there is a contrast table between the old mode number and the current symbol.
-The following options can be used to tweak the various animations:
+### Effect and Animation Toggles
+
+Use these defines to add or remove animations from the firmware. When you are running low on flash space, it can be helpful to disable animations you are not using.
+
+|Define |Default |Description |
+|------------------------------------|-------------|-------------------------------------------------------------------------------------|
+|`RGBLIGHT_ANIMATIONS` |*Not defined*|Enable all additional animation modes. |
+|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|Enable alternating animation mode. |
+|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|Enable breathing animation mode. |
+|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|Enable christmas animation mode. |
+|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|Enable knight animation mode. |
+|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|Enable rainbow mood animation mode. |
+|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|Enable rainbow swirl animation mode. |
+|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|Enable RGB test animation mode. |
+|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|Enable snake animation mode. |
+|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|Enable static gradient mode. |
+
+### Effect and Animation Settings
+
+The following options are used to tweak the various animations:
|Define |Default |Description |
|------------------------------------|-------------|-------------------------------------------------------------------------------------|
-|`RGBLIGHT_EFFECT_BREATHING` |*Not defined*|If defined, enable breathing animation mode. |
-|`RGBLIGHT_EFFECT_RAINBOW_MOOD` |*Not defined*|If defined, enable rainbow mood animation mode. |
-|`RGBLIGHT_EFFECT_RAINBOW_SWIRL` |*Not defined*|If defined, enable rainbow swirl animation mode. |
-|`RGBLIGHT_EFFECT_SNAKE` |*Not defined*|If defined, enable snake animation mode. |
-|`RGBLIGHT_EFFECT_KNIGHT` |*Not defined*|If defined, enable knight animation mode. |
-|`RGBLIGHT_EFFECT_CHRISTMAS` |*Not defined*|If defined, enable christmas animation mode. |
-|`RGBLIGHT_EFFECT_STATIC_GRADIENT` |*Not defined*|If defined, enable static gradient mode. |
-|`RGBLIGHT_EFFECT_RGB_TEST` |*Not defined*|If defined, enable RGB test animation mode. |
-|`RGBLIGHT_EFFECT_ALTERNATING` |*Not defined*|If defined, enable alternating animation mode. |
-|`RGBLIGHT_ANIMATIONS` |*Not defined*|If defined, enables all additional animation modes |
-|`RGBLIGHT_EFFECT_BREATHE_CENTER` |`1.85` |Used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
+|`RGBLIGHT_EFFECT_BREATHE_CENTER` |*Not defined*|If defined, used to calculate the curve for the breathing animation. Valid values are 1.0 to 2.7 |
|`RGBLIGHT_EFFECT_BREATHE_MAX` |`255` |The maximum brightness for the breathing mode. Valid values are 1 to 255 |
-|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
-|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
-|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
-|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
-|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
+|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
+|`RGBLIGHT_EFFECT_KNIGHT_LENGTH` |`3` |The number of LEDs to light up for the "Knight" animation |
+|`RGBLIGHT_EFFECT_KNIGHT_OFFSET` |`0` |The number of LEDs to start the "Knight" animation from the start of the strip by |
+|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`255` |Range adjustment for the rainbow swirl effect to get different swirls |
+|`RGBLIGHT_EFFECT_SNAKE_LENGTH` |`4` |The number of LEDs to light up for the "Snake" animation |
+
+### Example Usage to Reduce Memory Footprint
+ 1. Remove `RGBLIGHT_ANIMATIONS` from `config.h`.
+ 1. Selectively add the animations you want to enable. The following would enable two animations and save about 4KiB:
+
+```diff
+ #undef RGBLED_NUM
+-#define RGBLIGHT_ANIMATIONS
++#define RGBLIGHT_EFFECT_STATIC_GRADIENT
++#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+ #define RGBLED_NUM 12
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+```
+
+### Animation Speed
You can also modify the speeds that the different modes animate at:
+Here is a quick demo on Youtube (with NPKC KC60) (https://www.youtube.com/watch?v=VKrpPAHlisY).
+
```c
// How long (in milliseconds) to wait between animation steps for each of the "Solid color breathing" animations
const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5};
@@ -141,46 +169,216 @@ const uint8_t RGBLED_SNAKE_INTERVALS[] PROGMEM = {100, 50, 20};
const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31};
// These control which hues are selected for each of the "Static gradient" modes
-const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90};
+const uint8_t RGBLED_GRADIENT_RANGES[] PROGMEM = {255, 170, 127, 85, 64};
```
## Functions
If you need to change your RGB lighting in code, for example in a macro to change the color whenever you switch layers, QMK provides a set of functions to assist you. See [`rgblight.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight.h) for the full list, but the most commonly used functions include:
-|Function |Description |
-|-----------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-|`rgblight_enable()` |Turn LEDs on, based on their previous state |
-|`rgblight_enable_noeeprom()` |Turn LEDs on, based on their previous state (not written to EEPROM) |
-|`rgblight_disable()` |Turn LEDs off |
-|`rgblight_disable_noeeprom()` |Turn LEDs off (not written to EEPROM) |
-|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
-|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
-|`rgblight_setrgb(r, g, b)` |Set all LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
-|`rgblight_setrgb_at(r, g, b, led)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
-|`rgblight_sethsv(h, s, v)` |Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 |
-|`rgblight_sethsv_noeeprom(h, s, v)`|Set all LEDs to the given HSV value where `h` is between 0 and 360 and `s`/`v` are between 0 and 255 (not written to EEPROM) |
-|`rgblight_sethsv_at(h, s, v, led)` |Set a single LED to the given HSV value, where `h` is between 0 and 360, `s`/`v` are between 0 and 255, and `led` is between 0 and `RGBLED_NUM` (not written to EEPROM)|
-|`rgblight_toggle()` |Toggle all LEDs between on and off |
-|`rgblight_toggle_noeeprom()` |Toggle all LEDs between on and off (not written to EEPROM) |
-|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
-|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
-|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
-|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
-|`rgblight_increase_hue()` |Increase the hue for all LEDs. This wraps around at maximum hue |
-|`rgblight_increase_hue_noeeprom()` |Increase the hue for all LEDs. This wraps around at maximum hue (not written to EEPROM) |
-|`rgblight_decrease_hue()` |Decrease the hue for all LEDs. This wraps around at minimum hue |
-|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for all LEDs. This wraps around at minimum hue (not written to EEPROM) |
-|`rgblight_increase_sat()` |Increase the saturation for all LEDs. This wraps around at maximum saturation |
-|`rgblight_increase_sat_noeeprom()` |Increase the saturation for all LEDs. This wraps around at maximum saturation (not written to EEPROM) |
-|`rgblight_decrease_sat()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation |
-|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for all LEDs. This wraps around at minimum saturation (not written to EEPROM) |
-|`rgblight_increase_val()` |Increase the value for all LEDs. This wraps around at maximum value |
-|`rgblight_increase_val_noeeprom()` |Increase the value for all LEDs. This wraps around at maximum value (not written to EEPROM) |
-|`rgblight_decrease_val()` |Decrease the value for all LEDs. This wraps around at minimum value |
-|`rgblight_decrease_val_noeeprom()` |Decrease the value for all LEDs. This wraps around at minimum value (not written to EEPROM) |
-
-Additionally, [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h) defines several predefined shortcuts for various colors. Feel free to add to this list!
+### Utility Functions
+|Function |Description |
+|--------------------------------------------|-------------------------------------------------------------------|
+|`sethsv(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value |
+|`sethsv_raw(hue, sat, val, ledbuf)` |Set ledbuf to the given HSV value without RGBLIGHT_LIMIT_VAL check |
+|`setrgb(r, g, b, ledbuf)` |Set ledbuf to the given RGB value where `r`/`g`/`b` |
+
+### Low level Functions
+|Function |Description |
+|--------------------------------------------|-------------------------------------------|
+|`rgblight_set()` |Flash out led buffers to LEDs |
+|`rgblight_set_clipping_range(pos, num)` |Set clipping Range. see [Clipping Range](#clipping-range) |
+
+Example:
+```c
+sethsv(HSV_WHITE, (LED_TYPE *)&led[0]); // led 0
+sethsv(HSV_RED, (LED_TYPE *)&led[1]); // led 1
+sethsv(HSV_GREEN, (LED_TYPE *)&led[2]); // led 2
+rgblight_set(); // Utility functions do not call rgblight_set() automatically, so they need to be called explicitly.
+```
+
+### Effects and Animations Functions
+#### effect range setting
+|Function |Description |
+|--------------------------------------------|------------------|
+|`rgblight_set_effect_range(pos, num)` |Set Effects Range |
+
+#### direct operation
+|Function |Description |
+|--------------------------------------------|-------------|
+|`rgblight_setrgb_at(r, g, b, index)` |Set a single LED to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
+|`rgblight_sethsv_at(h, s, v, index)` |Set a single LED to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `index` is between 0 and `RGBLED_NUM` (not written to EEPROM) |
+|`rgblight_setrgb_range(r, g, b, start, end)`|Set a continuous range of LEDs to the given RGB value, where `r`/`g`/`b` are between 0 and 255 and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
+|`rgblight_sethsv_range(h, s, v, start, end)`|Set a continuous range of LEDs to the given HSV value, where `h`/`s`/`v` are between 0 and 255, and `start`(included) and `stop`(excluded) are between 0 and `RGBLED_NUM` (not written to EEPROM)|
+|`rgblight_setrgb(r, g, b)` |Set effect range LEDs to the given RGB value where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
+|`rgblight_setrgb_master(r, g, b)` |Set the LEDs on the master side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
+|`rgblight_setrgb_slave(r, g, b)` |Set the LEDs on the slave side to the given RGB value, where `r`/`g`/`b` are between 0 and 255 (not written to EEPROM) |
+|`rgblight_sethsv_master(h, s, v)` |Set the LEDs on the master side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
+|`rgblight_sethsv_slave(h, s, v)` |Set the LEDs on the slave side to the given HSV value, where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
+
+Example:
+```c
+rgblight_sethsv(HSV_WHITE, 0); // led 0
+rgblight_sethsv(HSV_RED, 1); // led 1
+rgblight_sethsv(HSV_GREEN, 2); // led 2
+// The above functions automatically calls rgblight_set(), so there is no need to call it explicitly.
+// Note that it is inefficient to call repeatedly.
+```
+
+#### effect mode change
+|Function |Description |
+|--------------------------------------------|-------------|
+|`rgblight_mode(x)` |Set the mode, if RGB animations are enabled |
+|`rgblight_mode_noeeprom(x)` |Set the mode, if RGB animations are enabled (not written to EEPROM) |
+|`rgblight_step()` |Change the mode to the next RGB animation in the list of enabled RGB animations |
+|`rgblight_step_noeeprom()` |Change the mode to the next RGB animation in the list of enabled RGB animations (not written to EEPROM) |
+|`rgblight_step_reverse()` |Change the mode to the previous RGB animation in the list of enabled RGB animations |
+|`rgblight_step_reverse_noeeprom()` |Change the mode to the previous RGB animation in the list of enabled RGB animations (not written to EEPROM) |
+
+#### effects mode disable/enable
+|Function |Description |
+|--------------------------------------------|-------------|
+|`rgblight_toggle()` |Toggle effect range LEDs between on and off |
+|`rgblight_toggle_noeeprom()` |Toggle effect range LEDs between on and off (not written to EEPROM) |
+|`rgblight_enable()` |Turn effect range LEDs on, based on their previous state |
+|`rgblight_enable_noeeprom()` |Turn effect range LEDs on, based on their previous state (not written to EEPROM) |
+|`rgblight_disable()` |Turn effect range LEDs off |
+|`rgblight_disable_noeeprom()` |Turn effect range LEDs off (not written to EEPROM) |
+
+#### hue, sat, val change
+|Function |Description |
+|--------------------------------------------|-------------|
+|`rgblight_increase_hue()` |Increase the hue for effect range LEDs. This wraps around at maximum hue |
+|`rgblight_increase_hue_noeeprom()` |Increase the hue for effect range LEDs. This wraps around at maximum hue (not written to EEPROM) |
+|`rgblight_decrease_hue()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue |
+|`rgblight_decrease_hue_noeeprom()` |Decrease the hue for effect range LEDs. This wraps around at minimum hue (not written to EEPROM) |
+|`rgblight_increase_sat()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation |
+|`rgblight_increase_sat_noeeprom()` |Increase the saturation for effect range LEDs. This wraps around at maximum saturation (not written to EEPROM) |
+|`rgblight_decrease_sat()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation |
+|`rgblight_decrease_sat_noeeprom()` |Decrease the saturation for effect range LEDs. This wraps around at minimum saturation (not written to EEPROM) |
+|`rgblight_increase_val()` |Increase the value for effect range LEDs. This wraps around at maximum value |
+|`rgblight_increase_val_noeeprom()` |Increase the value for effect range LEDs. This wraps around at maximum value (not written to EEPROM) |
+|`rgblight_decrease_val()` |Decrease the value for effect range LEDs. This wraps around at minimum value |
+|`rgblight_decrease_val_noeeprom()` |Decrease the value for effect range LEDs. This wraps around at minimum value (not written to EEPROM) |
+|`rgblight_sethsv(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 |
+|`rgblight_sethsv_noeeprom(h, s, v)` |Set effect range LEDs to the given HSV value where `h`/`s`/`v` are between 0 and 255 (not written to EEPROM) |
+
+#### query
+|Function |Description |
+|-----------------------|-----------------|
+|`rgblight_get_mode()` |Get current mode |
+|`rgblight_get_hue()` |Get current hue |
+|`rgblight_get_sat()` |Get current sat |
+|`rgblight_get_val()` |Get current val |
+
+## Colors
+
+These are shorthands to popular colors. The `RGB` ones can be passed to the `setrgb` functions, while the `HSV` ones to the `sethsv` functions.
+
+|RGB |HSV |
+|-------------------|-------------------|
+|`RGB_WHITE` |`HSV_WHITE` |
+|`RGB_RED` |`HSV_RED` |
+|`RGB_CORAL` |`HSV_CORAL` |
+|`RGB_ORANGE` |`HSV_ORANGE` |
+|`RGB_GOLDENROD` |`HSV_GOLDENROD` |
+|`RGB_GOLD` |`HSV_GOLD` |
+|`RGB_YELLOW` |`HSV_YELLOW` |
+|`RGB_CHARTREUSE` |`HSV_CHARTREUSE` |
+|`RGB_GREEN` |`HSV_GREEN` |
+|`RGB_SPRINGGREEN` |`HSV_SPRINGGREEN` |
+|`RGB_TURQUOISE` |`HSV_TURQUOISE` |
+|`RGB_TEAL` |`HSV_TEAL` |
+|`RGB_CYAN` |`HSV_CYAN` |
+|`RGB_AZURE` |`HSV_AZURE` |
+|`RGB_BLUE` |`HSV_BLUE` |
+|`RGB_PURPLE` |`HSV_PURPLE` |
+|`RGB_MAGENTA` |`HSV_MAGENTA` |
+|`RGB_PINK` |`HSV_PINK` |
+
+```c
+rgblight_setrgb(RGB_ORANGE);
+rgblight_sethsv_noeeprom(HSV_GREEN);
+rgblight_setrgb_at(RGB_GOLD, 3);
+rgblight_sethsv_range(HSV_WHITE, 0, 6);
+```
+
+These are defined in [`rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h). Feel free to add to this list!
+
+
+## Changing the order of the LEDs
+
+If you want to make the logical order of LEDs different from the electrical connection order, you can do this by defining the `RGBLIGHT_LED_MAP` macro in your `config.h`.
+
+Normally, the contents of the LED buffer are output to the LEDs in the same order.
+
+
+By defining `RGBLIGHT_LED_MAP` as in the example below, you can specify the LED with addressing in reverse order of the electrical connection order.
+
+```c
+// config.h
+
+#define RGBLED_NUM 4
+#define RGBLIGHT_LED_MAP { 3, 2, 1, 0 }
+
+```
+
+
+For keyboards that use the RGB LEDs as a backlight for each key, you can also define it as in the example below.
+
+```c
+// config.h
+
+#define RGBLED_NUM 30
+
+/* RGB LED Conversion macro from physical array to electric array */
+#define LED_LAYOUT( \
+ L00, L01, L02, L03, L04, L05, \
+ L10, L11, L12, L13, L14, L15, \
+ L20, L21, L22, L23, L24, L25, \
+ L30, L31, L32, L33, L34, L35, \
+ L40, L41, L42, L43, L44, L45 ) \
+ { \
+ L05, L04, L03, L02, L01, L00, \
+ L10, L11, L12, L13, L14, L15, \
+ L25, L24, L23, L22, L21, L20, \
+ L30, L31, L32, L33, L34, L35, \
+ L46, L45, L44, L43, L42, L41 \
+ }
+
+/* RGB LED logical order map */
+/* Top->Bottom, Right->Left */
+#define RGBLIGHT_LED_MAP LED_LAYOUT( \
+ 25, 20, 15, 10, 5, 0, \
+ 26, 21, 16, 11, 6, 1, \
+ 27, 22, 17, 12, 7, 2, \
+ 28, 23, 18, 13, 8, 3, \
+ 29, 24, 19, 14, 9, 4 )
+
+```
+## Clipping Range
+
+Using the `rgblight_set_clipping_range()` function, you can prepare more buffers than the actual number of LEDs, and output some of the buffers to the LEDs. This is useful if you want the split keyboard to treat left and right LEDs as logically contiguous.
+
+You can set the Clipping Range by executing the following code.
+
+```c
+// some soruce
+ rgblight_set_clipping_range(3, 4);
+```
+
+
+In addition to setting the Clipping Range, you can use `RGBLIGHT_LED_MAP` together.
+
+```c
+// config.h
+#define RGBLED_NUM 8
+#define RGBLIGHT_LED_MAP { 7, 6, 5, 4, 3, 2, 1, 0 }
+
+// some soruce
+ rgblight_set_clipping_range(3, 4);
+```
+
## Hardware Modification
diff --git a/docs/feature_space_cadet.md b/docs/feature_space_cadet.md
new file mode 100644
index 000000000000..075578522e6e
--- /dev/null
+++ b/docs/feature_space_cadet.md
@@ -0,0 +1,59 @@
+# Space Cadet: The Future, Built In
+
+Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds, and now even cooler supporting Control and Alt as well!
+
+## Usage
+
+Firstly, in your keymap, do one of the following:
+- Replace the Left Shift key with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
+- Replace the Left Control key with `KC_LCPO` (Left Control, Parenthesis Open), and Right Control with `KC_RCPC` (Right Control, Parenthesis Close).
+- Replace the Left Alt key with `KC_LAPO` (Left Alt, Parenthesis Open), and Right Alt with `KC_RAPC` (Right Alt, Parenthesis Close).
+- Replace any Shift key in your keymap with `KC_SFTENT` (Right Shift, Enter).
+
+## Keycodes
+
+|Keycode |Description |
+|-----------|-------------------------------------------|
+|`KC_LSPO` |Left Shift when held, `(` when tapped |
+|`KC_RSPC` |Right Shift when held, `)` when tapped |
+|`KC_LCPO` |Left Control when held, `(` when tapped |
+|`KC_RCPC` |Right Control when held, `)` when tapped |
+|`KC_LAPO` |Left Alt when held, `(` when tapped |
+|`KC_RAPC` |Right Alt when held, `)` when tapped |
+|`KC_SFTENT`|Right Shift when held, Enter when tapped |
+
+## Caveats
+
+Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. See the [Command feature](feature_command.md) for info on how to change it, or make sure that Command is disabled in your `rules.mk` with:
+
+```make
+COMMAND_ENABLE = no
+```
+
+## Configuration
+
+By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`. In addition, you can redefine the modifier to send on tap, or even send no modifier at all. The new configuration defines bundle all options up into a single define of 3 key codes in this order: the `Modifier` when held or when used with other keys, the `Tap Modifer` sent when tapped (no modifier if `KC_TRNS`), finally the `Keycode` sent when tapped. Now keep in mind, mods from other keys will still apply to the `Keycode` if say `KC_RSFT` is held while tapping `KC_LSPO` key with `KC_TRNS` as the `Tap Modifer`.
+
+|Define |Default |Description |
+|----------------|-------------------------------|---------------------------------------------------------------------------------|
+|`LSPO_KEYS` |`KC_LSFT, LSPO_MOD, LSPO_KEY` |Send `KC_LSFT` when held, the mod and key defined by `LSPO_MOD` and `LSPO_KEY`. |
+|`RSPC_KEYS` |`KC_RSFT, RSPC_MOD, RSPC_KEY` |Send `KC_RSFT` when held, the mod and key defined by `RSPC_MOD` and `RSPC_KEY`. |
+|`LCPO_KEYS` |`KC_LCTL, KC_LSFT, KC_9` |Send `KC_LCTL` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
+|`RCPC_KEYS` |`KC_RCTL, KC_RSFT, KC_0` |Send `KC_RCTL` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
+|`LAPO_KEYS` |`KC_LALT, KC_LSFT, KC_9` |Send `KC_LALT` when held, the mod `KC_LSFT` with the key `KC_9` when tapped. |
+|`RAPC_KEYS` |`KC_RALT, KC_RSFT, KC_0` |Send `KC_RALT` when held, the mod `KC_RSFT` with the key `KC_0` when tapped. |
+|`SFTENT_KEYS` |`KC_RSFT, KC_TRNS, SFTENT_KEY` |Send `KC_RSFT` when held, no mod with the key `SFTENT_KEY` when tapped. |
+
+
+## Obsolete Configuration
+
+These defines are used in the above defines internally to support backwards compatibility, so you may continue to use them, however the above defines open up a larger range of flexibility than before. As an example, say you want to not send any modifier when you tap just `KC_LSPO`, with the old defines you had an all or nothing choice of using the `DISABLE_SPACE_CADET_MODIFIER` define. Now you can define that key as: `#define LSPO_KEYS KC_LSFT, KC_TRNS, KC_9`. This tells the system to set Left Shift if held or used with other keys, then on tap send no modifier (transparent) with the `KC_9`.
+
+|Define |Default |Description |
+|------------------------------|-------------|------------------------------------------------------------------|
+|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
+|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
+|`LSPO_MOD` |`KC_LSFT` |The modifier to apply to `LSPO_KEY` |
+|`RSPC_MOD` |`KC_RSFT` |The modifier to apply to `RSPC_KEY` |
+|`SFTENT_KEY` |`KC_ENT` |The keycode to send when the Shift key is tapped |
+|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet from applying a modifier |
diff --git a/docs/feature_space_cadet_shift.md b/docs/feature_space_cadet_shift.md
deleted file mode 100644
index 427d2a58127c..000000000000
--- a/docs/feature_space_cadet_shift.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# Space Cadet Shift: The Future, Built In
-
-Steve Losh described the [Space Cadet Shift](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) quite well. Essentially, when you tap Left Shift on its own, you get an opening parenthesis; tap Right Shift on its own and you get the closing one. When held, the Shift keys function as normal. Yes, it's as cool as it sounds.
-
-## Usage
-
-Replace the Left Shift key in your keymap with `KC_LSPO` (Left Shift, Parenthesis Open), and Right Shift with `KC_RSPC` (Right Shift, Parenthesis Close).
-
-## Keycodes
-
-|Keycode |Description |
-|---------|--------------------------------------|
-|`KC_LSPO`|Left Shift when held, `(` when tapped |
-|`KC_RSPC`|Right Shift when held, `)` when tapped|
-
-## Caveats
-
-Space Cadet's functionality can conflict with the default Command functionality when both Shift keys are held at the same time. Make sure that Command is disabled in your `rules.mk` with:
-
-```make
-COMMAND_ENABLE = no
-```
-
-## Configuration
-
-By default Space Cadet assumes a US ANSI layout, but if your layout uses different keys for parentheses, you can redefine them in your `config.h`.
-You can also disable the rollover, allowing you to use the opposite Shift key to cancel the Space Cadet state in the event of an erroneous press, instead of emitting a pair of parentheses when the keys are released.
-Also, by default, the Space Cadet applies modifiers LSPO_MOD and RSPC_MOD to keys defined by LSPO_KEY and RSPC_KEY. You can override this behavior by redefining those variables in your `config.h`. You can also prevent the Space Cadet to apply a modifier by defining DISABLE_SPACE_CADET_MODIFIER in your `config.h`.
-
-|Define |Default |Description |
-|------------------------------|-------------|--------------------------------------------------------------------------------|
-|`LSPO_KEY` |`KC_9` |The keycode to send when Left Shift is tapped |
-|`RSPC_KEY` |`KC_0` |The keycode to send when Right Shift is tapped |
-|`LSPO_MOD` |`KC_LSFT` |The keycode to send when Left Shift is tapped |
-|`RSPC_MOD` |`KC_RSFT` |The keycode to send when Right Shift is tapped |
-|`DISABLE_SPACE_CADET_ROLLOVER`|*Not defined*|If defined, use the opposite Shift key to cancel Space Cadet |
-|`DISABLE_SPACE_CADET_MODIFIER`|*Not defined*|If defined, prevent the Space Cadet to apply a modifier to LSPO_KEY and RSPC_KEY|
diff --git a/docs/feature_space_cadet_shift_enter.md b/docs/feature_space_cadet_shift_enter.md
deleted file mode 100644
index 56a569b13924..000000000000
--- a/docs/feature_space_cadet_shift_enter.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# Space Cadet Shift Enter
-
-Based on the [Space Cadet Shift](feature_space_cadet_shift.md) feature. Tap the Shift key on its own, and it behaves like Enter. When held, the Shift functions as normal.
-
-## Usage
-
-Replace any Shift key in your keymap with `KC_SFTENT` (Shift, Enter), and you're done.
-
-## Keycodes
-
-|Keycode |Description |
-|-----------|----------------------------------------|
-|`KC_SFTENT`|Right Shift when held, Enter when tapped|
-
-## Caveats
-
-As with Space Cadet Shift, this feature may conflict with Command, so it should be disabled in your `rules.mk` with:
-
-```make
-COMMAND_ENABLE = no
-```
-
-This feature also uses the same timers as Space Cadet Shift, so using them in tandem may produce strange results.
-
-## Configuration
-
-By default Space Cadet assumes a US ANSI layout, but if you'd like to use a different key for Enter, you can redefine it in your `config.h`:
-
-|Define |Default |Description |
-|------------|--------|------------------------------------------------|
-|`SFTENT_KEY`|`KC_ENT`|The keycode to send when the Shift key is tapped|
diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md
index f2f2749440a2..b5e5218b093d 100644
--- a/docs/feature_tap_dance.md
+++ b/docs/feature_tap_dance.md
@@ -314,3 +314,86 @@ qk_tap_dance_action_t tap_dance_actions[] = {
And then simply use `TD(X_CTL)` anywhere in your keymap.
If you want to implement this in your userspace, then you may want to check out how [DanielGGordon](https://github.com/qmk/qmk_firmware/tree/master/users/gordon) has implemented this in their userspace.
+
+### Example 5: Using tap dance for advanced mod-tap and layer-tap keys
+
+Tap dance can be used to emulate `MT()` and `LT()` behavior when the tapped code is not a basic keycode. This is useful to send tapped keycodes that normally require `Shift`, such as parentheses or curly braces—or other modified keycodes, such as `Control + X`.
+
+Below your layers and custom keycodes, add the following:
+
+```c
+// tapdance keycodes
+enum td_keycodes {
+ ALT_LP // Our example key: `LALT` when held, `(` when tapped. Add additional keycodes for each tapdance.
+};
+
+// define a type containing as many tapdance states as you need
+typedef enum {
+ SINGLE_TAP,
+ SINGLE_HOLD,
+ DOUBLE_SINGLE_TAP
+} td_state_t;
+
+// create a global instance of the tapdance state type
+static td_state_t td_state;
+
+// declare your tapdance functions:
+
+// function to determine the current tapdance state
+int cur_dance (qk_tap_dance_state_t *state);
+
+// `finished` and `reset` functions for each tapdance keycode
+void altlp_finished (qk_tap_dance_state_t *state, void *user_data);
+void altlp_reset (qk_tap_dance_state_t *state, void *user_data);
+```
+
+Below your `LAYOUT`, define each of the tapdance functions:
+
+```c
+// determine the tapdance state to return
+int cur_dance (qk_tap_dance_state_t *state) {
+ if (state->count == 1) {
+ if (state->interrupted || !state->pressed) { return SINGLE_TAP; }
+ else { return SINGLE_HOLD; }
+ }
+ if (state->count == 2) { return DOUBLE_SINGLE_TAP; }
+ else { return 3; } // any number higher than the maximum state value you return above
+}
+
+// handle the possible states for each tapdance keycode you define:
+
+void altlp_finished (qk_tap_dance_state_t *state, void *user_data) {
+ td_state = cur_dance(state);
+ switch (td_state) {
+ case SINGLE_TAP:
+ register_code16(KC_LPRN);
+ break;
+ case SINGLE_HOLD:
+ register_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_on(_MY_LAYER)` here
+ break;
+ case DOUBLE_SINGLE_TAP: // allow nesting of 2 parens `((` within tapping term
+ tap_code16(KC_LPRN);
+ register_code16(KC_LPRN);
+ }
+}
+
+void altlp_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (td_state) {
+ case SINGLE_TAP:
+ unregister_code16(KC_LPRN);
+ break;
+ case SINGLE_HOLD:
+ unregister_mods(MOD_BIT(KC_LALT)); // for a layer-tap key, use `layer_off(_MY_LAYER)` here
+ break;
+ case DOUBLE_SINGLE_TAP:
+ unregister_code16(KC_LPRN);
+ }
+}
+
+// define `ACTION_TAP_DANCE_FN_ADVANCED()` for each tapdance keycode, passing in `finished` and `reset` functions
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [ALT_LP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altlp_finished, altlp_reset)
+};
+```
+
+Wrap each tapdance keycode in `TD()` when including it in your keymap, e.g. `TD(ALT_LP)`.
diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md
index 7dd85c5c2e78..778cdc69cb0c 100644
--- a/docs/feature_unicode.md
+++ b/docs/feature_unicode.md
@@ -4,11 +4,11 @@ There are three Unicode keymap definition methods available in QMK:
## `UNICODE_ENABLE`
-Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap file, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
+Supports Unicode up to `0x7FFF`. This covers characters for most modern languages, as well as symbols, but it doesn't cover emoji. The keycode function is `UC(c)` in the keymap, where _c_ is the code point's number (preferably hexadecimal, up to 4 digits long). For example: `UC(0x45B)`, `UC(0x30C4)`.
## `UNICODEMAP_ENABLE`
-Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 1024 entries.
+Supports Unicode up to `0x10FFFF` (all possible code points). You need to maintain a separate mapping table `const uint32_t PROGMEM unicode_map[] = {...}` in your keymap file. The keycode function is `X(i)`, where _i_ is an array index into the mapping table. The table may contain at most 16384 entries.
You may want to have an enum to make referencing easier. So, you could add something like this to your keymap file:
@@ -26,13 +26,21 @@ const uint32_t PROGMEM unicode_map[] = {
};
```
-Then you can use `X(BANG)` etc. in your keymap.
+Then you can use `X(BANG)`, `X(SNEK)` etc. in your keymap.
+
+### Lower and Upper Case
+
+Characters often come in lower and upper case pairs, for example: å, Å. To make inputting these characters easier, you can use `XP(i, j)` in your keymap, where _i_ and _j_ are the mapping table indices of the lower and upper case character, respectively. If you're holding down Shift or have Caps Lock turned on when you press the key, the second (upper case) character will be inserted; otherwise, the first (lower case) version will appear.
+
+This is most useful when creating a keymap for an international layout with special characters. Instead of having to put the lower and upper case versions of a character on separate keys, you can have them both on the same key by using `XP`. This blends Unicode keys in with regular alphas.
+
+Due to keycode size constraints, _i_ and _j_ can each only refer to one of the first 128 characters in your `unicode_map`. In other words, 0 ≤ _i_ ≤ 127 and 0 ≤ _j_ ≤ 127. This is enough for most use cases, but if you'd like to customize the index calculation, you can override the [`unicodemap_index()`](https://github.com/qmk/qmk_firmware/blob/71f640d47ee12c862c798e1f56392853c7b1c1a8/quantum/process_keycode/process_unicodemap.c#L40) function. This also allows you to, say, check Ctrl instead of Shift/Caps.
## `UCIS_ENABLE`
-Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you will have to add a keycode or function that calls `qk_ucis_start()`. Once this function's been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
+Supports Unicode up to `0x10FFFF` (all possible code points). As with `UNICODEMAP`, you need to maintain a mapping table in your keymap file. However, there are no built-in keycodes for this feature — you have to add a keycode or function that calls `qk_ucis_start()`. Once this function has been called, you can type the corresponding mnemonic for your character, then hit Space or Enter to complete it, or Esc to cancel. If the mnemonic matches an entry in your table, the typed text will automatically be erased and the corresponding Unicode character inserted.
-For instance, you would define a table like this in your keymap file:
+For instance, you could define a table like this in your keymap file:
```c
const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
@@ -42,7 +50,7 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
);
```
-You call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and input the laughing emoji.
+To use it, call `qk_ucis_start()`, then type "rofl" and hit Enter. QMK should erase the "rofl" text and insert the laughing emoji.
### Customization
@@ -60,26 +68,29 @@ Unicode input in QMK works by inputting a sequence of characters to the OS, sort
The following input modes are available:
-* **`UC_OSX`**: Mac OS X built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
+* **`UC_OSX`**: macOS built-in Unicode hex input. Supports code points up to `0xFFFF` (`0x10FFFF` with `UNICODEMAP`).
To enable, go to _System Preferences > Keyboard > Input Sources_, add _Unicode Hex Input_ to the list (it's under _Other_), then activate it from the input dropdown in the Menu Bar.
- By default, this mode uses the left Option key (`KC_LALT`), but this can be changed by defining [`UNICODE_OSX_KEY`](#input-key-configuration) with another keycode.
+ By default, this mode uses the left Option key (`KC_LALT`) for Unicode input, but this can be changed by defining [`UNICODE_KEY_OSX`](#input-key-configuration) with another keycode.
+
+ !> Using the _Unicode Hex Input_ input source may disable some Option based shortcuts, such as Option + Left Arrow and Option + Right Arrow.
* **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points).
Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else.
+ By default, this mode uses Ctrl+Shift+U (`LCTL(LSFT(KC_U))`) to start Unicode input, but this can be changed by defining [`UNICODE_KEY_LNX`](#input-key-configuration) with another keycode. This might be required for IBus versions ≥1.5.15, where Ctrl+Shift+U behavior is consolidated into Ctrl+Shift+E.
* **`UC_WIN`**: _(not recommended)_ Windows built-in hex numpad Unicode input. Supports code points up to `0xFFFF`.
- To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Afterwards, reboot.
+ To enable, create a registry key under `HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad` of type `REG_SZ` called `EnableHexNumpad` and set its value to `1`. This can be done from the Command Prompt by running `reg add "HKCU\Control Panel\Input Method" -v EnableHexNumpad -t REG_SZ -d 1` with administrator privileges. Reboot afterwards.
This mode is not recommended because of reliability and compatibility issues; use the `UC_WINC` mode instead.
* **`UC_BSD`**: _(non implemented)_ Unicode input under BSD. Not implemented at this time. If you're a BSD user and want to help add support for it, please [open an issue on GitHub](https://github.com/qmk/qmk_firmware/issues).
-* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.8.2, supports code points up to `0xFFFFF` (all currently assigned code points).
+* **`UC_WINC`**: Windows Unicode input using [WinCompose](https://github.com/samhocevar/wincompose). As of v0.9.0, supports code points up to `0x10FFFF` (all possible code points).
To enable, install the [latest release](https://github.com/samhocevar/wincompose/releases/latest). Once installed, WinCompose will automatically run on startup. Works reliably under all version of Windows supported by the app.
- By default, this mode uses the right Alt key (`KC_RALT`), but this can be changed in the WinCompose settings and by defining [`UNICODE_WINC_KEY`](#input-key-configuration) with another keycode.
+ By default, this mode uses right Alt (`KC_RALT`) as the Compose key, but this can be changed in the WinCompose settings and by defining [`UNICODE_KEY_WINC`](#input-key-configuration) with another keycode.
### Switching Input Modes
@@ -87,17 +98,17 @@ There are two ways to set the input mode for Unicode: by keycode or by function.
You can switch the input mode at any time by using one of the following keycodes. The easiest way is to add the ones you use to your keymap.
-|Keycode |Alias |Input mode |Description |
-|-----------------------|---------|-------------|-----------------------------------------|
-|`UNICODE_MODE_FORWARD` |`UC_MOD` | |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
-|`UNICODE_MODE_REVERSE` |`UC_RMOD`| |Cycles forwards through the available modes. [(Disabled by default)](#input-method-cycling)|
-|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to Mac OS X input. |
-|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input. |
-|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input. |
-|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented). |
-|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose.|
+|Keycode |Alias |Input Mode |Description |
+|----------------------|---------|------------|--------------------------------------------------------------|
+|`UNICODE_MODE_FORWARD`|`UC_MOD` |Next in list|[Cycle](#input-mode-cycling) through selected modes |
+|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Prev in list|[Cycle](#input-mode-cycling) through selected modes in reverse|
+|`UNICODE_MODE_OSX` |`UC_M_OS`|`UC_OSX` |Switch to macOS input |
+|`UNICODE_MODE_LNX` |`UC_M_LN`|`UC_LNX` |Switch to Linux input |
+|`UNICODE_MODE_WIN` |`UC_M_WI`|`UC_WIN` |Switch to Windows input |
+|`UNICODE_MODE_BSD` |`UC_M_BS`|`UC_BSD` |Switch to BSD input (not implemented) |
+|`UNICODE_MODE_WINC` |`UC_M_WC`|`UC_WINC` |Switch to Windows input using WinCompose |
-You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user` (or a similar function). For example:
+You can also switch the input mode by calling `set_unicode_input_mode(x)` in your code, where _x_ is one of the above input mode constants (e.g. `UC_LNX`). Since the function only needs to be called once, it's recommended that you do it in `eeconfig_init_user()` (or a similar function). For example:
```c
void eeconfig_init_user(void) {
@@ -121,35 +132,45 @@ For instance, you can add these definitions to your `config.h` file:
### Additional Customization
-Because Unicode is such a large and variable feature, there are a number of options that you can customize to work better on your system.
+Because Unicode is a large and versatile feature, there are a number of options you can customize to make it work better on your system.
-#### Start and Finish input functions
+#### Start and Finish Input Functions
The functions for starting and finishing Unicode input on your platform can be overridden locally. Possible uses include customizing input mode behavior if you don't use the default keys, or adding extra visual/audio feedback to Unicode input.
-* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on Mac.
+* `void unicode_input_start(void)` – This sends the initial sequence that tells your platform to enter Unicode input mode. For example, it presses Ctrl+Shift+U on Linux and holds the Option key on macOS.
* `void unicode_input_finish(void)` – This is called to exit Unicode input mode, for example by pressing Space or releasing the Option key.
You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c).
-
#### Input Key Configuration
-Additionally, you can customize the keys used to trigger the unicode input for macOS and WinCompose by adding defines to your `config.h`
+You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt).
+
+|Define |Type |Default |Example |
+|------------------|----------|------------------|-------------------------------------------|
+|`UNICODE_KEY_OSX` |`uint8_t` |`KC_LALT` |`#define UNICODE_KEY_OSX KC_RALT` |
+|`UNICODE_KEY_LNX` |`uint16_t`|`LCTL(LSFT(KC_U))`|`#define UNICODE_KEY_LNX LCTL(LSFT(KC_E))`|
+|`UNICODE_KEY_WINC`|`uint8_t` |`KC_RALT` |`#define UNICODE_KEY_WINC KC_RGUI` |
+
+#### Input Mode Cycling
+
+You can choose which input modes are available for cycling through. By default, this is disabled. If you want to enable it, limiting it to just the modes you use makes sense. Note that the values in the list are comma-delimited.
```c
-#define UNICODE_OSX_KEY KC_LALT
-#define UNICODE_WINC_KEY KC_RALT
+#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_WINC
```
-#### Input Method Cycling
+You can cycle through the selected modes by using the `UC_MOD`/`UC_RMOD` keycodes, or by calling `cycle_unicode_input_mode(offset)` in your code (`offset` is how many modes to move forward by, so +1 corresponds to `UC_MOD`).
-Also, you can choose which input methods are availble for cycling through. By default, this is disabled. But if you want to enabled it, then limiting it to just those modes makes sense. Note that `UNICODE_SELECTED_MODES` define is comma delimited.
+By default, when the keyboard boots, it will initialize the input mode to the last one you used. You can disable this and make it start with the first mode in the list every time by adding the following to your `config.h`:
```c
-#define UNICODE_SELECTED_MODES UC_OSX, UC_LNX, UC_WIN, UC_BSD, UC_WINC
+#define UNICODE_CYCLE_PERSIST false
```
+!> Using `UNICODE_SELECTED_MODES` means you don't have to initially set the input mode in `matrix_init_user()` (or a similar function); the Unicode system will do that for you on startup. This has the added benefit of avoiding unnecessary writes to EEPROM.
+
## `send_unicode_hex_string`
To type multiple characters for things like (ノಠ痊ಠ)ノ彡┻━┻, you can use `send_unicode_hex_string()` much like `SEND_STRING()` except you would use hex values separate by spaces.
@@ -183,7 +204,7 @@ AutoHotkey inserts the Text right of `Send, ` when this combination is pressed.
### US International
-If you enable the US International layout on the system, it will use punctuation to accent the characters.
+If you enable the US International layout on the system, it will use punctuation to accent the characters.
For instance, typing "`a" will result in à.
diff --git a/docs/feature_userspace.md b/docs/feature_userspace.md
index 5a9fc287b3e1..2f119c8bde5d 100644
--- a/docs/feature_userspace.md
+++ b/docs/feature_userspace.md
@@ -110,7 +110,7 @@ QMK has a bunch of [functions](custom_quantum_functions.md) that have [`_quantum
However, you can actually add support for keymap version, so that you can use it in both your userspace and your keymap!
-For instance, lets looks at the `layer_state_set_user` function. Lets enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionalitly to all of our boards, and then still have your `keymap.c` still able to use this functionality.
+For instance, let's look at the `layer_state_set_user()` function. You can enable the [Tri Layer State](ref_functions.md#olkb-tri-layers) functionality on all of your boards, while also retaining the Tri Layer functionality in your `keymap.c` files.
In your `` file, you'd want to add this:
```c
@@ -201,27 +201,51 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
- case KC_MAKE:
- if (!record->event.pressed) {
- SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
-#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
- ":dfu "
-#elif defined(BOOTLOADER_HALFKAY)
- ":teensy "
-#elif defined(BOOTLOADER_CATERINA)
- ":avrdude "
-#endif
- SS_TAP(X_ENTER));
- }
- return false;
- break;
+ case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
+ if (!record->event.pressed) {
+ uint8_t temp_mod = get_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ clear_mods(); clear_oneshot_mods();
+ SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP);
+ #ifndef FLASH_BOOTLOADER
+ if ( (temp_mod | temp_osm) & MOD_MASK_SHIFT )
+ #endif
+ { //
+ #if defined(__arm__) // only run for ARM boards
+ SEND_STRING(":dfu-util");
+ #elif defined(BOOTLOADER_DFU) // only run for DFU boards
+ SEND_STRING(":dfu");
+ #elif defined(BOOTLOADER_HALFKAY) // only run for teensy boards
+ SEND_STRING(":teensy");
+ #elif defined(BOOTLOADER_CATERINA) // only run for Pro Micros
+ SEND_STRING(":avrdude");
+ #endif // bootloader options
+ }
+ if ( (temp_mod | temp_osm) & MOD_MASK_CTRL) {
+ SEND_STRING(" -j8 --output-sync");
+ }
+ SEND_STRING(SS_TAP(X_ENTER));
+ set_mods(temp_mod);
+ }
+ break;
+
}
return process_record_keymap(keycode, 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
+ifeq ($(strip $(FLASH_BOOTLOADER)), yes)
+ OPT_DEFS += -DFLASH_BOOTLOADER
+endif
+```
+
This will add a new `KC_MAKE` keycode that can be used in any of your keymaps. And this keycode will output `make :`, making frequent compiling easier. And this will work with any keyboard and any keymap as it will output the current boards info, so that you don't have to type this out every time.
-Additionally, 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 will dump the HEX in the ".build" folder instead).
+Also, holding `shift` will add the appropriate flashing command (`:dfu`, `:teensy`, `:avrdude`, `:dfu-util`) for a majority of keyboards. Holding `control` will add some commands that will speed up compiling time by processing multiple files at once.
+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.
diff --git a/docs/feature_velocikey.md b/docs/feature_velocikey.md
new file mode 100644
index 000000000000..5d98410735bc
--- /dev/null
+++ b/docs/feature_velocikey.md
@@ -0,0 +1,30 @@
+# Velocikey
+
+Velocikey is a feature that lets you control the speed of lighting effects (like the Rainbow Swirl effect) with the speed of your typing. The faster you type, the faster the lights will go!
+
+## Usage
+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
+VELOCIKEY_ENABLE = yes
+```
+
+Then, while using your keyboard, you need to also turn it on with the VLK_TOG keycode, which toggles the feature on and off.
+
+The following light effects will all be controlled by Velocikey when it is enabled:
+ - RGB Breathing
+ - RGB Rainbow Mood
+ - RGB Rainbow Swirl
+ - RGB Snake
+ - RGB Knight
+
+Support for LED breathing effects is planned but not available yet.
+
+ As long as Velocikey is enabled, it will control the speed regardless of any other speed setting that your RGB lights are currently on.
+
+ ## Configuration
+ Velocikey doesn't currently support any configuration via keyboard settings. If you want to adjust something like the speed increase or decay rate, you would need to edit `velocikey.c` and adjust the values there to achieve the kinds of speeds that you like.
diff --git a/docs/features.md b/docs/features.md
index 9030500a2bb1..cb69df35d709 100644
--- a/docs/features.md
+++ b/docs/features.md
@@ -17,6 +17,7 @@ QMK has a staggering number of features for building your keyboard. It can take
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
+* [LED Matrix](feature_led_matrix.md) - LED Matrix single color lights for per key lighting (Single Color, not RGB).
* [Macros](feature_macros.md) - Send multiple key presses when pressing only one physical key.
* [Mouse keys](feature_mouse_keys.md) - Control your mouse pointer from your keyboard.
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) - Sticky Keys, lets hit a key rather than holding it.
@@ -24,7 +25,7 @@ QMK has a staggering number of features for building your keyboard. It can take
* [PS2 Mouse](feature_ps2_mouse.md) - Driver for connecting a PS/2 mouse directly to your keyboard.
* [RGB Light](feature_rgblight.md) - RGB lighting for your keyboard.
* [RGB Matrix](feature_rgb_matrix.md) - RGB Matrix lights for per key lighting.
-* [Space Cadet](feature_space_cadet_shift.md) - Use your left/right shift keys to type parenthesis and brackets.
+* [Space Cadet](feature_space_cadet.md) - Use your left/right shift keys to type parenthesis and brackets.
* [Stenography](feature_stenography.md) - Put your keyboard into Plover mode for stenography use.
* [Swap Hands](feature_swap_hands.md) - Mirror your keyboard for one handed usage.
* [Tap Dance](feature_tap_dance.md) - Make a single key do as many things as you want.
diff --git a/docs/flashing.md b/docs/flashing.md
index bc418c415060..3b4582f0057e 100644
--- a/docs/flashing.md
+++ b/docs/flashing.md
@@ -49,9 +49,18 @@ To generate this bootloader, use the `bootloader` target, eg `make planck/rev4:d
To generate a production-ready .hex file (containing the application and the bootloader), use the `production` target, eg `make planck/rev4:default:production`.
+### DFU commands
+
+There are a number of DFU commands that you can use to flash firmware to a DFU device:
+
+* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared.
+* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon.
+* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+
## Caterina
-Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
+Arduino boards and their clones use the [Caterina bootloader](https://github.com/arduino/ArduinoCore-avr/tree/master/bootloaders/caterina) (any keyboard built with a Pro Micro, or clone), and uses the avr109 protocol to communicate through virtual serial. Bootloaders like [A-Star](https://www.pololu.com/docs/0J61/9) are based on Caterina.
To ensure compatibility with the Caterina bootloader, make sure this block is present your `rules.mk`:
@@ -84,6 +93,7 @@ or if you want to flash multiple boards, use the following command
When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
+
## Halfkay
Halfkay is a super-slim protocol developed by PJRC that uses HID, and come on all Teensys (namely the 2.0).
@@ -131,3 +141,12 @@ Flashing sequence:
* You will receive a warning about the DFU signature; Just ignore it
4. Reset the device into application mode (may be done automatically)
* If you are building from command line (e.g. `make planck/rev6:default:dfu-util`), make sure that `:leave` is passed to the `DFU_ARGS` variable inside your `rules.mk` (e.g. `DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave`) so that your device resets after flashing
+
+### STM32 Commands
+
+There are a number of DFU commands that you can use to flash firmware to a STM32 device:
+
+* `:dfu-util` - The default command for flashing to STM32 devices.
+* `:dfu-util-wait` - This works like the default command, but it gives you a (configurable) 10 second timeout before it attempts to flash the firmware. You can use `TIME_DELAY=20` from the command line to change the timeout.
+ * Eg: `make ::dfu-util TIME_DELAY=5`
+* `:st-link-cli` - This allows you to flash the firmware via ST-LINK's CLI utility, rather than dfu-util.
diff --git a/docs/getting_started_build_tools.md b/docs/getting_started_build_tools.md
index dbed200d1bdf..0e1acca66a8d 100644
--- a/docs/getting_started_build_tools.md
+++ b/docs/getting_started_build_tools.md
@@ -4,7 +4,9 @@ This page describes setting up the build environment for QMK. These instructions
-Note: If it is your first time here, Check out the "Complete Newbs guide" instead
+**Note:** If this is your first time here, check out the [Complete Newbs Guide](newbs.md) page.
+
+Before continuing, double check that your submodules (third-party libraries) are up to date by running `make git-submodule`.
## Linux
@@ -44,9 +46,7 @@ Fedora / Red Hat example:
Arch / Manjaro example:
- pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git
-
-(the `dfu-programmer` package is availble on AUR only so you should download from there or use an AUR helper)
+ pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util
## Nix
@@ -129,12 +129,12 @@ If you have trouble and want to ask for help, it is useful to generate a *Win_Ch
## Docker
-If this is a bit complex for you, Docker might be the turn-key solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap:
+If this is a bit complex for you, Docker might be the turnkey solution you need. After installing [Docker CE](https://docs.docker.com/install/#supported-platforms), run the following command from the `qmk_firmware` directory to build a keyboard/keymap:
```bash
-util/docker_build.sh keyboard:keymap
+util/docker_build.sh keyboard:keymap
# For example: util/docker_build.sh ergodox_ez:steno
```
-This will compile the targeted keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
+This will compile the desired keyboard/keymap and leave the resulting `.hex` or `.bin` file in the QMK directory for you to flash. If `:keymap` is omitted, the `default` keymap is used. Note that the parameter format is the same as when building with `make`.
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
@@ -147,7 +147,7 @@ There is also support for building _and_ flashing the keyboard straight from Doc
util/docker_build.sh keyboard:keymap:target
# For example: util/docker_build.sh planck/rev6:default:dfu-util
```
-If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use QMK Toolbox instead.
+If you're on Linux, this should work out of the box. On Windows and macOS, it requires [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/) to be running. This is tedious to set up, so it's not recommended; use [QMK Toolbox](https://github.com/qmk/qmk_toolbox) instead.
!> Docker for Windows requires [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v) to be enabled. This means that it cannot work on versions of Windows which don't have Hyper-V, such as Windows 7, Windows 8 and **Windows 10 Home**.
diff --git a/docs/getting_started_make_guide.md b/docs/getting_started_make_guide.md
index bb7e1e7e3b6f..75eafd42ccca 100644
--- a/docs/getting_started_make_guide.md
+++ b/docs/getting_started_make_guide.md
@@ -143,9 +143,9 @@ As there is no standard split communication driver for ARM-based split keyboards
Lets you replace the default matrix scanning routine with your own code. You will need to provide your own implementations of matrix_init() and matrix_scan().
-`CUSTOM_DEBOUNCE`
+`DEBOUNCE_TYPE`
-Lets you replace the default key debouncing routine with your own code. You will need to provide your own implementation of debounce().
+Lets you replace the default key debouncing routine with an alternative one. If `custom` you will need to provide your own implementation.
## Customizing Makefile Options on a Per-Keymap Basis
diff --git a/docs/hand_wire.md b/docs/hand_wire.md
index 1cbc16dfea82..25db9341b886 100644
--- a/docs/hand_wire.md
+++ b/docs/hand_wire.md
@@ -185,21 +185,30 @@ When you're done with the columns, start with the rows in the same process, from
As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
+## Additional guides
+
+If you're more of a visual learner, or want some additional tips and something more to follow along, these two visual step by step guides may be helpful:
+
+- [BrownFox's step by step guide](https://deskthority.net/viewtopic.php?f=7&t=6050)
+- [Cribbit's modern hand wiring guide](https://geekhack.org/index.php?topic=87689.0)
+
# Getting Some Basic Firmware Set Up
From here, you should have a working keyboard once you program a firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
-To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
+To start out, download [the firmware](https://github.com/qmk/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/) (paid) or [Visual Studio Code](https://code.visualstudio.com) (free).
-The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `` replaced by the name of your project - it'll need to be different from any other project in the `keyboards/` folder:
+The first thing we're going to do is create a new keyboard. In your terminal, run this command, which will ask you some questions and generate a basic keyboard project:
```
- util/new_project.sh
+./util/new_keyboard.sh
```
You'll want to navigate to the `keyboards//` folder by typing, like the print-out from the script specifies:
- cd keyboards/
+```
+cd keyboards/
+```
### `config.h`
@@ -209,7 +218,7 @@ Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitio
### `.h`
-The next file you'll want to look at is `.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
+The next file you'll want to look at is `.h`. You're going to want to rewrite the `LAYOUT` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
We'll dive into how this will work with the following example. Say we have a keyboard like this:
@@ -231,10 +240,10 @@ This can be described by saying the top row is 3 1u keys, and the bottom row is
└─────┴─────┘
```
-The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
+The middle column is unused on the bottom row in this example. Our `LAYOUT` definition would look like this:
```
- #define KEYMAP( \
+ #define LAYOUT( \
k00, k01, k02, \
k10, k11, \
) \
@@ -256,10 +265,10 @@ Let's say that instead, we wired our keyboard like this (a fair thing to do):
└─────┴─────┘
```
-This would require our `KEYMAP` definition to look like this:
+This would require our `LAYOUT` definition to look like this:
```
- #define KEYMAP( \
+ #define LAYOUT( \
k00, k01, k02, \
k10, k11, \
) \
@@ -269,7 +278,7 @@ This would require our `KEYMAP` definition to look like this:
}
```
-Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
+Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `LAYOUT` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
### `keymaps//default.c`
@@ -291,7 +300,7 @@ This can be accomplished by using the following `keymaps` definition:
```
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = KEYMAP( /* Base */
+ [0] = LAYOUT( /* Base */
KC_A, KC_1, KC_H, \
KC_TAB, KC_SPC \
),
@@ -300,7 +309,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [Keycodes](keycodes.md) - there are also a lot of aliases to condense your keymap file.
-It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
+It's also important to use the `LAYOUT` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
## Compiling Your Firmware
@@ -319,7 +328,7 @@ Carefully flip your keyboard over, open up a new text document, and try typing -
2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
-5. Check the .h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
+5. Check the `.h` file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
@@ -328,4 +337,4 @@ If you've done all of these things, keep in mind that sometimes you might have h
Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
-There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different project (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+There are a lot of possibilities inside the firmware - explore [docs.qmk.fm](http://docs.qmk.fm) for a full feature list, and dive into the different keyboards (Planck, Clueboard, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
diff --git a/docs/hardware_avr.md b/docs/hardware_avr.md
index 2c3652a02dbf..7c28ab6dbcc5 100644
--- a/docs/hardware_avr.md
+++ b/docs/hardware_avr.md
@@ -6,14 +6,26 @@ If you have not yet you should read the [Keyboard Guidelines](hardware_keyboard_
## Adding Your AVR Keyboard to QMK
-QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started run the `util/new_project.sh` script:
-
-```bash
-$ util/new_project.sh my_awesome_keyboard
-######################################################
-# /keyboards/my_awesome_keyboard project created. To start
-# working on things, cd into keyboards/my_awesome_keyboard
-######################################################
+QMK has a number of features to simplify working with AVR keyboards. For most keyboards you don't have to write a single line of code. To get started, run the `util/new_keyboard.sh` script:
+
+```
+$ ./util/new_keyboard.sh
+Generating a new QMK keyboard directory
+
+Keyboard Name: mycoolkb
+Keyboard Type [avr]:
+Your Name [John Smith]:
+
+Copying base template files... done
+Copying avr template files... done
+Renaming keyboard files... done
+Replacing %KEYBOARD% with mycoolkb... done
+Replacing %YOUR_NAME% with John Smith... done
+
+Created a new keyboard called mycoolkb.
+
+To start working on things, cd into keyboards/mycoolkb,
+or open the directory in your favourite text editor.
```
This will create all the files needed to support your new keyboard, and populate the settings with default values. Now you just need to customize it for your keyboard.
@@ -87,12 +99,30 @@ Once you've defined the size of your matrix you need to define which pins on you
The number of `MATRIX_ROW_PINS` entries must be the same as the number you assigned to `MATRIX_ROWS`, and likewise for `MATRIX_COL_PINS` and `MATRIX_COLS`. You do not have to specify `UNUSED_PINS`, but you can if you want to document what pins are open.
-Finally, you can specify the direction your diodes point. This can be `COL2ROW`, `ROW2COL`, or `CUSTOM_MATRIX`.
+Finally, you can specify the direction your diodes point. This can be `COL2ROW` or `ROW2COL`.
```c
#define DIODE_DIRECTION COL2ROW
```
+#### Direct Pin Matrix
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
+```c
+// #define MATRIX_ROW_PINS { D0, D5 }
+// #define MATRIX_COL_PINS { F1, F0, B0 }
+#define DIRECT_PINS { \
+ { F1, E6, B0, B2, B3 }, \
+ { F5, F0, B1, B7, D2 }, \
+ { F6, F7, C7, D5, D3 }, \
+ { B5, C6, B6, NO_PIN, NO_PIN } \
+}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL */
+//#define DIODE_DIRECTION
+```
+
### Backlight Configuration
By default QMK supports backlighting on pins `B5`, `B6`, and `B7`. If you are using one of those you can simply enable it here. For more details see the [Backlight Documentation](feature_backlight.md).
diff --git a/docs/hardware_drivers.md b/docs/hardware_drivers.md
index 4c1266f2241e..023e92982cbd 100644
--- a/docs/hardware_drivers.md
+++ b/docs/hardware_drivers.md
@@ -14,9 +14,9 @@ QMK is used on a lot of different hardware. While support for the most common MC
Support for addressing pins on the ProMicro by their Arduino name rather than their AVR name. 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.
-## SSD1306 (AVR Only)
+## SSD1306 OLED Driver
-Support for SSD1306 based OLED displays. 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.
+Support for SSD1306 based OLED displays. For more information see the [OLED Driver Feature](feature_oled_driver.md) page.
## uGFX
@@ -32,4 +32,4 @@ Support for up to 2 drivers. Each driver impliments 2 charlieplex matrices to in
## IS31FL3733
-Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
\ No newline at end of file
+Support for up to a single driver with room for expansion. Each driver can control 192 individual LEDs or 64 RGB LEDs. For more information on how to setup the driver see the [RGB Matrix](feature_rgb_matrix.md) page.
diff --git a/docs/how_keyboards_work.md b/docs/how_keyboards_work.md
index cc54e566a1f1..0772f055d685 100644
--- a/docs/how_keyboards_work.md
+++ b/docs/how_keyboards_work.md
@@ -12,7 +12,7 @@ place:
``` text
+------+ +-----+ +----------+ +----------+ +----+
| User |-------->| Key |------>| Firmware |----->| USB wire |---->| OS |
-+------+ +-----+ +----------+ +----------+ |----+
++------+ +-----+ +----------+ +----------+ +----+
```
This scheme is a very simple view of what's going on, and more details follow
diff --git a/docs/i2c_driver.md b/docs/i2c_driver.md
index ea24dc64f392..bb1a2d74ffd2 100644
--- a/docs/i2c_driver.md
+++ b/docs/i2c_driver.md
@@ -12,7 +12,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. |
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. |
|`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. |
-|`uint8_t i2c_stop(uint16_t timeout);` |Stops the I2C driver. |
+|`uint8_t i2c_stop(void);` |Ends an I2C transaction. |
### Function Return
@@ -33,8 +33,8 @@ The following defines can be used to configure the I2C master driver.
|Variable |Description |Default|
|------------------|---------------------------------------------------|-------|
-|`#F_SCL` |Clock frequency in Hz |400KHz |
-|`#Prescaler` |Divides master clock to aid in I2C clock selection |1 |
+|`F_SCL` |Clock frequency in Hz |400KHz |
+|`Prescaler` |Divides master clock to aid in I2C clock selection |1 |
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required.
@@ -63,20 +63,24 @@ Lastly, we need to assign the correct GPIO pins depending on the I2C hardware dr
By default the I2C1 hardware driver is assumed to be used. If another hardware driver is used, `#define I2C_DRIVER I2CDX` should be added to the `config.h` file with X being the number of hardware driver used. For example is I2C3 is enabled, the `config.h` file should contain `#define I2C_DRIVER I2CD3`. This aligns the QMK I2C driver with the Chibios I2C driver.
-STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C.
+STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. You can use these defines to set your i2c pins:
-This can be changed by declaring the `i2c_init` function which intentionally has a weak attribute. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
+| Variable | Description | Default |
+|-------------|----------------------------------------------|---------|
+| `I2C1_BANK` | The bank of pins (`GPIOA`, `GPIOB`, `GPIOC`) | `GPIOB` |
+| `I2C1_SCL` | The pin number for the SCL pin (0-9) | `6` |
+| `I2C1_SDA` | The pin number for the SDA pin (0-9) | `7` |
+
+You can also overload the `void i2c_init(void)` function, which has a weak attribute. If you do this the configuration variables above will not be used. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function:
```C
void i2c_init(void)
{
setPinInput(B6); // Try releasing special pins for a short time
setPinInput(B7);
- chThdSleepMilliseconds(10); // Wait for the release to happen
+ wait_ms(10); // Wait for the release to happen
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B6 to I2C function
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B7 to I2C function
}
```
-
-
diff --git a/docs/isp_flashing_guide.md b/docs/isp_flashing_guide.md
index 18f2147846b9..0f786c5141bf 100644
--- a/docs/isp_flashing_guide.md
+++ b/docs/isp_flashing_guide.md
@@ -63,6 +63,7 @@ If you just want to get things back to normal, you can flash only a bootloader f
* [`atmega32u4`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32u4_1_0_0.hex) - Most keyboards, Planck Rev 1-5, Preonic Rev 1-2
* [`at90usb1286`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_at90usb128x_1_0_1.hex) - Planck Light Rev 1
+* [`atmega32a`](https://github.com/qmk/qmk_firmware/blob/master/util/bootloader_atmega32a_1_0_0.hex) - jj40
If you're not sure what your board uses, look in the `rules.mk` file for the keyboard in QMK. The `MCU =` line will have the value you need. It may differ between different versions of the board.
@@ -113,6 +114,10 @@ Since our keyboard uses an `atmega32u4` (common), that is the chip we'll specify
avrdude -c avrisp -P COM3 -p atmega32u4 -U flash:w:main.hex:i
+If your board uses an `atmega32a` (e.g. on a jj40), the command is this (the extra code at the end sets the fuses correctly):
+
+ avrdude -c avrisp -P COM3 -p atmega32 -U flash:w:main.hex:i -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m
+
You should see a couple of progress bars, then you should see:
avrdude: verifying ...
diff --git a/docs/keycodes.md b/docs/keycodes.md
index 91578414d199..e9cfd3425201 100644
--- a/docs/keycodes.md
+++ b/docs/keycodes.md
@@ -216,6 +216,11 @@ This is a reference only. Each group of keys links to the page documenting their
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, `
when pressed with Shift or GUI|
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
+|`KC_LCPO` | |Left Control when held, `(` when tapped |
+|`KC_RCPC` | |Right Control when held, `)` when tapped |
+|`KC_LAPO` | |Left Alt when held, `(` when tapped |
+|`KC_RAPC` | |Right Alt when held, `)` when tapped |
+|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
@@ -450,7 +455,15 @@ This is a reference only. Each group of keys links to the page documenting their
## [Unicode Support](feature_unicode.md)
-|Key |Description |
-|-------|---------------------------------------------------------------------------|
-|`UC(c)`|Send Unicode code point `c` (`UNICODE_ENABLE`) |
-|`X(i)` |Send Unicode code point at index `i` in `unicode_map` (`UNICODEMAP_ENABLE`)|
+|Key |Aliases |Description |
+|----------------------|---------|----------------------------------------------------------------|
+|`UC(c)` | |Send Unicode code point `c` |
+|`X(i)` | |Send Unicode code point at index `i` in `unicode_map` |
+|`XP(i, j)` | |Send Unicode code point at index `i`, or `j` if Shift/Caps is on|
+|`UNICODE_MODE_FORWARD`|`UC_MOD` |Cycle through selected input modes |
+|`UNICODE_MODE_REVERSE`|`UC_RMOD`|Cycle through selected input modes in reverse |
+|`UNICODE_MODE_OSX` |`UC_M_OS`|Switch to macOS input |
+|`UNICODE_MODE_LNX` |`UC_M_LN`|Switch to Linux input |
+|`UNICODE_MODE_WIN` |`UC_M_WI`|Switch to Windows input |
+|`UNICODE_MODE_BSD` |`UC_M_BS`|Switch to BSD input (not implemented) |
+|`UNICODE_MODE_WINC` |`UC_M_WC`|Switch to Windows input using WinCompose |
diff --git a/docs/keymap.md b/docs/keymap.md
index 382a0e911bae..457dbf67e1cd 100644
--- a/docs/keymap.md
+++ b/docs/keymap.md
@@ -1,6 +1,6 @@
# Keymap Overview
-QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `KEYMAP()` macro to help you create this array of arrays.
+QMK keymaps are defined inside a C source file. The data structure is an array of arrays. The outer array is a list of layer arrays while the inner layer array is a list of keys. Most keyboards define a `LAYOUT()` macro to help you create this array of arrays.
## Keymap and Layers
@@ -119,7 +119,7 @@ The main part of this file is the `keymaps[]` definition. This is where you list
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-After this you'll find a list of KEYMAP() macros. A KEYMAP() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
+After this you'll find a list of LAYOUT() macros. A LAYOUT() is simply a list of keys to define a single layer. Typically you'll have one or more "base layers" (such as QWERTY, Dvorak, or Colemak) and then you'll layer on top of that one or more "function" layers. Due to the way layers are processed you can't overlay a "lower" layer on top of a "higher" layer.
`keymaps[][MATRIX_ROWS][MATRIX_COLS]` in QMK holds the 16 bit action code (sometimes referred as the quantum keycode) in it. For the keycode representing typical keys, its high byte is 0 and its low byte is the USB HID usage ID for keyboard.
@@ -131,7 +131,7 @@ Here is an example of the Clueboard's base layer:
/* Keymap _BL: Base Layer (Default Layer)
*/
- [_BL] = KEYMAP(
+ [_BL] = LAYOUT(
F(0), 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_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_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, \
@@ -149,7 +149,7 @@ Some interesting things to note about this:
Our function layer is, from a code point of view, no different from the base layer. Conceptually, however, you will build that layer as an overlay, not a replacement. For many people this distinction does not matter, but as you build more complicated layering setups it matters more and more.
- [_FL] = KEYMAP(
+ [_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, _______, _______, _______, _______, \
_______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \
@@ -161,62 +161,6 @@ Some interesting things to note:
* We have used our `_______` definition to turn `KC_TRNS` into `_______`. This makes it easier to spot the keys that have changed on this layer.
* While in this layer if you press one of the `_______` keys it will activate the key in the next lowest active layer.
-### Custom Functions
-
-At the bottom of the file we've defined a single custom function. This function defines a key that sends `KC_ESC` when pressed without modifiers and `KC_GRAVE` when modifiers are held. There are a couple pieces that need to be in place for this to work, and we will go over both of them.
-
-#### `fn_actions[]`
-
-We define the `fn_actions[]` array to point to custom functions. `F(N)` in a keymap will call element N of that array. For the Clueboard's that looks like this:
-
- const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(0), // Calls action_function()
- };
-
-In this case we've instructed QMK to call the `ACTION_FUNCTION` callback, which we will define in the next section.
-
-> This `fn_actions[]` interface is mostly for backward compatibility. In QMK, you don't need to use `fn_actions[]`. You can directly use `ACTION_FUNCTION(N)` or any other action code value itself normally generated by the macro in `keymaps[][MATRIX_ROWS][MATRIX_COLS]`. N in `F(N)` can only be 0 to 31. Use of the action code directly in `keymaps` unlocks this limitation.
-
-You can get a full list of Action Functions in [action_code.h](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/common/action_code.h).
-
-#### `action_function()`
-
-To actually handle the keypress event we define an `action_function()`. This function will be called when the key is pressed, and then again when the key is released. We have to handle both situations within our code, as well as determining whether to send/release `KC_ESC` or `KC_GRAVE`.
-
- void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t mods_pressed;
-
- switch (id) {
- case 0:
- /* Handle the combined Grave/Esc key
- */
- mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed
-
- if (record->event.pressed) {
- /* The key is being pressed.
- */
- if (mods_pressed) {
- add_key(KC_GRV);
- send_keyboard_report();
- } else {
- add_key(KC_ESC);
- send_keyboard_report();
- }
- } else {
- /* The key is being released.
- */
- if (mods_pressed) {
- del_key(KC_GRV);
- send_keyboard_report();
- } else {
- del_key(KC_ESC);
- send_keyboard_report();
- }
- }
- break;
- }
- }
-
# Nitty Gritty Details
This should have given you a basic overview for creating your own keymap. For more details see the following resources:
diff --git a/docs/newbs_flashing.md b/docs/newbs_flashing.md
index 0b0ede37c4e0..a985e5d2b2f3 100644
--- a/docs/newbs_flashing.md
+++ b/docs/newbs_flashing.md
@@ -86,7 +86,7 @@ If you know what bootloader that you're using, then when compiling the firmware,
### DFU
-For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
+For the DFU bootloader, when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
make ::dfu
@@ -131,9 +131,19 @@ If you have any issues with this, you may need to this:
sudo make ::dfu
+#### DFU commands
+
+There are a number of DFU commands that you can use to flash firmware to a DFU device:
+
+* `:dfu` - This is the normal option and waits until a DFU device is available, and then flashes the firmware. This will check every 5 seconds, to see if a DFU device has appeared.
+* `:dfu-ee` - This flashes an `eep` file instead of the normal hex. This is uncommon.
+* `:dfu-split-left` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Left Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+* `:dfu-split-right` - This flashes the normal firmware, just like the default option (`:dfu`). However, this also flashes the "Right Side" EEPROM file for split keyboards. _This is ideal for Elite C based split keyboards._
+
+
### Caterina
-For Arduino boards and their close (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
+For Arduino boards and their clones (such as the SparkFun ProMicro), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
make ::avrdude
@@ -199,9 +209,17 @@ If you have any issues with this, you may need to this:
sudo make ::avrdude
+
+Additionally, if you want to flash multiple boards, use the following command:
+
+ make ::avrdude-loop
+
+When you're done flashing boards, you'll need to hit Ctrl + C or whatever the correct keystroke is for your operating system to break the loop.
+
+
## HalfKay
-For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the built command:
+For the PJRC devices (Teensy's), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
make ::teensy
@@ -226,12 +244,61 @@ Waiting for Teensy device...
```
Found HalfKay Bootloader
-Read "./.build/ergodox_ez_drashna.hex": 28532 bytes, 88.5% usage
+Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
Programming............................................................................................................................................................................
...................................................
Booting
```
+## STM32 (ARM)
+
+For a majority of ARM boards (including the Proton C, Planck Rev 6, and Preonic Rev 3), when you're ready to compile and flash your firmware, open up your terminal window and run the build command:
+
+ make ::dfu-util
+
+For example, if your keymap is named "xyverz" and you're building a keymap for the Planck Revision 6 keyboard, you'll use this command and then reboot the keyboard to the bootloader (before it finishes compiling):
+
+ make planck/rev6:xyverz:dfu-util
+
+Once the firmware finishes compiling, it will output something like this:
+
+```
+Linking: .build/planck_rev6_xyverz.elf [OK]
+Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
+Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
+
+Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
+dfu-util 0.9
+
+Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
+Copyright 2010-2016 Tormod Volden and Stefan Schmidt
+This program is Free Software and has ABSOLUTELY NO WARRANTY
+Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
+
+Invalid DFU suffix signature
+A valid DFU suffix will be required in a future dfu-util release!!!
+Opening DFU capable USB device...
+ID 0483:df11
+Run-time device DFU version 011a
+Claiming USB DFU Interface...
+Setting Alternate Setting #0 ...
+Determining device status: state = dfuERROR, status = 10
+dfuERROR, clearing status
+Determining device status: state = dfuIDLE, status = 0
+dfuIDLE, continuing
+DFU mode device DFU version 011a
+Device returned transfer size 2048
+DfuSe interface name: "Internal Flash "
+Downloading to address = 0x08000000, size = 41824
+Download [=========================] 100% 41824 bytes
+Download done.
+File downloaded successfully
+Transitioning to dfuMANIFEST state
+```
## Test It Out!
diff --git a/docs/newbs_getting_started.md b/docs/newbs_getting_started.md
index aefa1b73850c..ae4b799a9c53 100644
--- a/docs/newbs_getting_started.md
+++ b/docs/newbs_getting_started.md
@@ -66,8 +66,10 @@ You will need to install Git. It's very likely that you already have it, but if
Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands:
- git clone https://github.com/qmk/qmk_firmware.git
- cd qmk_firmware
+```shell
+git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
+cd qmk_firmware
+```
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message.
diff --git a/docs/newbs_testing_debugging.md b/docs/newbs_testing_debugging.md
index 45509110a557..771846b40991 100644
--- a/docs/newbs_testing_debugging.md
+++ b/docs/newbs_testing_debugging.md
@@ -13,9 +13,27 @@ Note: These programs are not provided by or endorsed by QMK.
* [Keyboard Tester](http://www.keyboardtester.com) (Web Based)
* [Keyboard Checker](http://keyboardchecker.com) (Web Based)
-## Debugging With QMK Toolbox
+## Debugging
-[QMK Toolbox](https://github.com/qmk/qmk_toolbox) will show messages from your keyboard if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, or use the [Command](feature_command.md) feature to enable debug mode.
+Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DEBUG` keycode in your keymap, use the [Command](feature_command.md) feature to enable debug mode, or add the following code to your keymap.
+
+```c
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
+```
+
+### Debugging With QMK Toolbox
+
+For compatible platforms, [QMK Toolbox](https://github.com/qmk/qmk_toolbox) can be used to display debug messages from your keyboard.
+
+### Debugging With hid_listen
+
+Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_listen.html), provided by PJRC, can also be used to display debug messages. Prebuilt binaries for Windows,Linux,and MacOS are available.
@@ -31,3 +49,51 @@ After that you can use a few different print functions:
* `uprintf("%s string", var)`: Print a formatted string
* `dprint("string")` Print a simple string, but only when debug mode is enabled
* `dprintf("%s string", var)`: Print a formatted string, but only when debug mode is enabled
+
+## Debug Examples
+
+Below is a collection of real world debugging examples. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md).
+
+### Which matrix position is this keypress?
+
+When porting, or when attempting to diagnose pcb issues, it can be useful to know if a keypress is scanned correctly. To enable logging for this scenario, add the following code to your keymaps `keymap.c`
+
+```c
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ // If console is enabled, it will print the matrix position and status of each key pressed
+#ifdef CONSOLE_ENABLE
+ uprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
+#endif
+ return true;
+}
+```
+
+Example output
+```text
+Waiting for device:.......
+Listening:
+KL: kc: 169, col: 0, row: 0, pressed: 1
+KL: kc: 169, col: 0, row: 0, pressed: 0
+KL: kc: 174, col: 1, row: 0, pressed: 1
+KL: kc: 174, col: 1, row: 0, pressed: 0
+KL: kc: 172, col: 2, row: 0, pressed: 1
+KL: kc: 172, col: 2, row: 0, pressed: 0
+```
+
+### How long did it take to scan for a keypress?
+
+When testing performance issues, it can be useful to know the frequency at which the switch matrix is being scanned. To enable logging for this scenario, add the following code to your keymaps `config.h`
+
+```c
+#define DEBUG_MATRIX_SCAN_RATE
+```
+
+Example output
+```text
+ > matrix scan frequency: 315
+ > matrix scan frequency: 313
+ > matrix scan frequency: 316
+ > matrix scan frequency: 316
+ > matrix scan frequency: 316
+ > matrix scan frequency: 316
+```
diff --git a/docs/eclipse.md b/docs/other_eclipse.md
similarity index 100%
rename from docs/eclipse.md
rename to docs/other_eclipse.md
diff --git a/docs/other_vscode.md b/docs/other_vscode.md
new file mode 100644
index 000000000000..7427f758e5be
--- /dev/null
+++ b/docs/other_vscode.md
@@ -0,0 +1,117 @@
+# Setting up Visual Studio Code for QMK Development
+
+[Visual Studio Code](https://code.visualstudio.com/) (VS Code) is an open-source code editor that supports many different programming languages.
+
+Using a full-featured editor such as VS Code provides many advantages over a plain text editor, such as:
+* intelligent code completion
+* convenient navigation in the code
+* refactoring tools
+* build automation (no need for the command-line)
+* a graphical front end for GIT
+* many other tools such as debugging, code formatting, showing call hierarchies etc.
+
+The purpose of this page is to document how to set up VS Code for developing QMK Firmware.
+
+This guide covers how to configure everything needed on Windows and Ubuntu 18.04
+
+# Set up VS Code
+Before starting, you will want to make sure that you have all of the build tools set up, and QMK Firmware cloned. Head to the the [Newbs Getting Started Guide](newbs_getting_started.md) to get things set up, if you haven't already.
+
+## Windows
+
+### Prerequisites
+
+* [Git for Windows](https://git-scm.com/download/win) (This link will prompt to save/run the installer)
+
+ 1. Disable all of the options but `Git LFS (Large File Support)` and `Check daily for Git for Windows updates`.
+ 2. Set the default editor to `Use Visual Studio Code as Git's default editor`
+ 3. Select the `Use Git from Git Bash only` option, since that's the option that you should use here.
+ 4. For the `Choosing HTTPS transport backend`, either option should be fine.
+ 5. Select the `Checkout as-is, commit Unix-style line endings` option. QMK Firmware uses Unix style commits.
+ 6. For the extra options, leave the default options as is.
+
+ This software is needed for Git support in VS Code. It may be possible to not include this, but it is much simpler to just use this.
+
+* [Git Credential Manager for Windows](https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases) (Optional)
+
+ This software provides better support for Git by providing secure storage for git credentials, MFA and personal access token generation.
+
+ This isn't strictly needed, but we would recommend it.
+
+
+### Installing VS Code
+
+1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
+2. Run the installer
+
+This part is super simple. However, there is some configuration that we need to do to ensure things are configured correctly.
+
+### Configuring VS Code
+
+First, we need to set up IntelliSense. This isn't strictly required, but it will make your life a LOT easier. To do this, we need to create the `.vscode/c_cpp_properies.json` file in the QMK Firmware folder, You can do this all manually, but I've done most of the work already.
+
+Grab [this file](https://gist.github.com/drashna/48e2c49ce877be592a1650f91f8473e8) and save it. You may need to edit this file, if you didn't install MSYS2 to the default location, or are using WSL/LxSS.
+
+Once you have saved this file, you will need to reload VS Code, if it was already running.
+
+?> You should see an `extensions.json` and `settings.json` file in the `.vscode` folder, as well.
+
+
+Now, we will set up the MSYS2 window to show up in VSCode as the integrated terminal. This has a number of advantages. Mostly, you can control+click on errors and jump to those files. This makes debugging much easier. It's also nice, in that you don't have to jump to another window.
+
+1. Click File > Preferences > > Settings
+2. Click on the {} button, in the top right to open the `settings.json` file.
+3. Set the file's content to:
+
+ ```json
+ {
+ "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe",
+ "terminal.integrated.env.windows": {
+ "MSYSTEM": "MINGW64",
+ "CHERE_INVOKING": "1"
+ },
+ "terminal.integrated.shellArgs.windows": [
+ "--login"
+ ],
+ "terminal.integrated.cursorStyle": "line"
+ }
+ ```
+
+ If there are settings here already, then just add everything between the first and last curly brackets.
+
+?> If you installed MSYS2 to a different folder, then you'll need to change the path for `terminal.integrated.shell.windows` to the correct path for your system.
+
+4. Hit Ctrl-` (grave) to bring up the terminal.
+
+ This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard.
+
+
+## Every other Operating System
+
+1. Head to [VS Code](https://code.visualstudio.com/) and download the installer
+2. Run the installer
+3. That's it
+
+No, really, that's it. The paths needed are already included when installing the packages, and it is much better about detecting the current workspace files and parsing them for IntelliSense.
+
+## Plugins
+
+There are a number of extensions that you may want to install:
+
+* [Git Extension Pack](https://marketplace.visualstudio.com/items?itemName=donjayamanne.git-extension-pack) -
+This installs a bunch of Git related tools that may make using Git with QMK Firmware easier.
+* [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - _[Optional]_ - Helps to keep the code to the QMK Coding Conventions.
+* [Bracket Pair Colorizer 2](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer-2) - _[Optional]_ - This color codes the brackets in your code, to make it easier to reference nested code.
+* [Github Markdown Preview](https://marketplace.visualstudio.com/items?itemName=bierner.github-markdown-preview) - _[Optional]_ - Makes the markdown preview in VS Code more like GitHub's.
+* [VS Live Share Extension Pack](https://marketplace.visualstudio.com/items?itemName=MS-vsliveshare.vsliveshare-pack) - _[Optional]_ - This extension allows somebody else to access your workspace (or you to access somebody else's workspace) and help out. This is great if you're having issues and need some help from somebody.
+* [VIM Keymap](https://marketplace.visualstudio.com/items?itemName=GiuseppeCesarano.vim-keymap) - _[Optional]_ - For those that prefer VIM style keybindings. There are other options for this, too.
+* [Travis CI Status](https://marketplace.visualstudio.com/items?itemName=felixrieseberg.vsc-travis-ci-status) - _[Optional]_ - This shows the current Travis CI status, if you have it set up.
+
+Restart once you've installed any extensions
+
+# Configure VS Code for QMK
+1. Click File > Open Folder
+2. Open the QMK Firmware folder that you cloned from GitHub.
+3. Click File > Save Workspace As...
+
+And now you're ready to code QMK Firmware in VS Code
diff --git a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
index 50d291a2300f..979eafbc80f7 100644
--- a/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
+++ b/docs/porting_your_keyboard_to_qmk_(arm_and_other_chibios_cpus).md
@@ -1,14 +1,24 @@
-Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by using `util/new_project.sh ` to create a new project:
+Setting up your ARM based PCB is a little more involved than an Atmel MCU, but is easy enough. Start by running `util/new_keyboard.sh`:
```
-$ util/new_project.sh simontester
-######################################################
-# /keyboards/simontester project created. To start
-# working on things, cd into keyboards/simontester
-######################################################
-```
+$ ./util/new_keyboard.sh
+Generating a new QMK keyboard directory
+
+Keyboard Name: mycoolkb
+Keyboard Type [avr]:
+Your Name [John Smith]:
+Copying base template files... done
+Copying avr template files... done
+Renaming keyboard files... done
+Replacing %KEYBOARD% with mycoolkb... done
+Replacing %YOUR_NAME% with John Smith... done
+Created a new keyboard called mycoolkb.
+
+To start working on things, cd into keyboards/mycoolkb,
+or open the directory in your favourite text editor.
+```
# END OF NEW ARM DOC, OLD ATMEL DOC FOLLOWS
@@ -22,6 +32,8 @@ The `MATRIX_ROW_PINS` and `MATRIX_COL_PINS` are the pins your MCU uses on each r
For the `DIODE_DIRECTION`, most hand-wiring guides will instruct you to wire the diodes in the `COL2ROW` position, but it's possible that they are in the other - people coming from EasyAVR often use `ROW2COL`. Nothing will function if this is incorrect.
+To configure a keyboard where each switch is connected to a separate pin and ground instead of sharing row and column pins, use `DIRECT_PINS`. The mapping defines the pins of each switch in rows and columns, from left to right. Must conform to the sizes within `MATRIX_ROWS` and `MATRIX_COLS`, use `NO_PIN` to fill in blank spaces. Overrides the behaviour of `DIODE_DIRECTION`, `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`.
+
`BACKLIGHT_PIN` is the pin that your PWM-controlled backlight (if one exists) is hooked-up to. Currently only B5, B6, and B7 are supported.
`BACKLIGHT_BREATHING` is a fancier backlight feature that adds breathing/pulsing/fading effects to the backlight. It uses the same timer as the normal backlight. These breathing effects must be called by code in your keymap.
@@ -54,10 +66,10 @@ This is where all of the custom logic for your keyboard goes - you may not need
## `/keyboards//.h`
-Here is where you can (optionally) define your `KEYMAP` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
+Here is where you can (optionally) define your `LAYOUT` function to remap your matrix into a more readable format. With ortholinear boards, this isn't always necessary, but it can help to accommodate the dead spots on your matrix, where there are keys that take up more than one space (2u, staggering, 6.25u, etc). The example shows the difference between the physical keys, and the matrix design:
```
-#define KEYMAP( \
+#define LAYOUT( \
k00, k01, k02, \
k10, k11 \
) \
diff --git a/docs/quantum_keycodes.md b/docs/quantum_keycodes.md
index 90192e632410..a2ba34c32dd0 100644
--- a/docs/quantum_keycodes.md
+++ b/docs/quantum_keycodes.md
@@ -1,6 +1,6 @@
# Quantum Keycodes
-Quantum keycodes allow for easier customisation of your keymap than the basic ones provide, without having to define custom actions.
+Quantum keycodes allow for easier customization of your keymap than the basic ones provide, without having to define custom actions.
All keycodes within quantum are numbers between `0x0000` and `0xFFFF`. Within your `keymap.c` it may look like you have functions and other special cases, but ultimately the C preprocessor will translate those into a single 4 byte integer. QMK has reserved `0x0000` through `0x00FF` for standard keycodes. These are keycodes such as `KC_A`, `KC_1`, and `KC_LCTL`, which are basic keys defined in the USB HID specification.
@@ -16,6 +16,11 @@ On this page we have documented keycodes between `0x00FF` and `0xFFFF` which are
|`KC_GESC` |`GRAVE_ESC`|Escape when tapped, `
when pressed with Shift or GUI|
|`KC_LSPO` | |Left Shift when held, `(` when tapped |
|`KC_RSPC` | |Right Shift when held, `)` when tapped |
+|`KC_LCPO` | |Left Control when held, `(` when tapped |
+|`KC_RCPC` | |Right Control when held, `)` when tapped |
+|`KC_LAPO` | |Left Alt when held, `(` when tapped |
+|`KC_RAPC` | |Right Alt when held, `)` when tapped |
+|`KC_SFTENT` | |Right Shift when held, Enter when tapped |
|`KC_LEAD` | |The [Leader key](feature_leader_key.md) |
|`KC_LOCK` | |The [Lock key](feature_key_lock.md) |
|`FUNC(n)` |`F(n)` |Call `fn_action(n)` (deprecated) |
diff --git a/docs/understanding_qmk.md b/docs/understanding_qmk.md
index 20ead2b3f54f..a94c9c3191e7 100644
--- a/docs/understanding_qmk.md
+++ b/docs/understanding_qmk.md
@@ -57,10 +57,10 @@ Matrix Scanning runs many times per second. The exact rate varies but typically
Once we know the state of every switch on our keyboard we have to map that to a keycode. In QMK this is done by making use of C macros to allow us to separate the definition of the physical layout from the definition of keycodes.
-At the keyboard level we define a C macro (typically named `KEYMAP()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `KEYMAP()` macro for a numpad:
+At the keyboard level we define a C macro (typically named `LAYOUT()`) which maps our keyboard's matrix to physical keys. Sometimes the matrix does not have a switch in every location, and we can use this macro to pre-populate those with KC_NO, making the keymap definition easier to work with. Here's an example `LAYOUT()` macro for a numpad:
```c
-#define KEYMAP( \
+#define LAYOUT( \
k00, k01, k02, k03, \
k10, k11, k12, k13, \
k20, k21, k22, \
@@ -75,17 +75,17 @@ At the keyboard level we define a C macro (typically named `KEYMAP()`) which map
}
```
-Notice how the second block of our `KEYMAP()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
+Notice how the second block of our `LAYOUT()` macro matches the Matrix Scanning array above? This macro is what will map the matrix scanning array to keycodes. However, if you look at a 17 key numpad you'll notice that it has 3 places where the matrix could have a switch but doesn't, due to larger keys. We have populated those spaces with `KC_NO` so that our keymap definition doesn't have to.
You can also use this macro to handle unusual matrix layouts, for example the [Clueboard rev 2](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/66/rev2/rev2.h). Explaining that is outside the scope of this document.
##### Keycode Assignment
-At the keymap level we make use of our `KEYMAP()` macro above to map keycodes to physical locations to matrix locations. It looks like this:
+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:
```
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[0] = KEYMAP(
+[0] = LAYOUT(
KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
KC_P7, KC_P8, KC_P9, KC_PPLS, \
KC_P4, KC_P5, KC_P6, \
@@ -94,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}
```
-Notice how all of these arguments match up with the first half of the `KEYMAP()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier.
+Notice how all of these arguments match up with the first half of the `LAYOUT()` macro from the last section? This is how we take a keycode and map it to our Matrix Scan from earlier.
##### State Change Detection
@@ -135,9 +135,11 @@ The `process_record()` function itself is deceptively simple, but hidden within
* [`void process_record(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/tmk_core/common/action.c#L172)
* [`bool process_record_quantum(keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L206)
* [Map this record to a keycode](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/quantum.c#L226)
+ * [`void velocikey_accelerate(void)`](https://github.com/qmk/qmk_firmware/blob/c1c5922aae7b60b7c7d13d3769350eed9dda17ab/quantum/velocikey.c#L27)
* [`void preprocess_tap_dance(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_tap_dance.c#L119)
* [`bool process_key_lock(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_key_lock.c#L62)
* [`bool process_clicky(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/process_keycode/process_clicky.c#L79)
+ * [`bool process_haptic(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/2cee371bf125a6ec541dd7c5a809573facc7c456/drivers/haptic/haptic.c#L216)
* [`bool process_record_kb(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/card.c#L20)
* [`bool process_record_user(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/keyboards/clueboard/card/keymaps/default/keymap.c#L58)
* [`bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record)`](https://github.com/qmk/qmk_firmware/blob/e1203a222bb12ab9733916164a000ef3ac48da93/quantum/rgb_matrix.c#L139)
diff --git a/docs/zh-cn/README.md b/docs/zh-cn/README.md
new file mode 100644
index 000000000000..9eb4ea777ae3
--- /dev/null
+++ b/docs/zh-cn/README.md
@@ -0,0 +1,32 @@
+# QMK机械键盘固件
+
+[![当前版本](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags)
+[![开发状态](https://travis-ci.org/qmk/qmk_firmware.svg?branch=master)](https://travis-ci.org/qmk/qmk_firmware)
+[![异议](https://img.shields.io/discord/440868230475677696.svg)](https://discord.gg/Uq7gcHh)
+[![文档状态](https://img.shields.io/badge/docs-ready-orange.svg)](https://docs.qmk.fm)
+[![GitHub贡献者](https://img.shields.io/github/contributors/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/pulse/monthly)
+[![GitHub分支](https://img.shields.io/github/forks/qmk/qmk_firmware.svg?style=social&label=Fork)](https://github.com/qmk/qmk_firmware/)
+
+## 什么是 QMK 固件?
+
+QMK (*Quantum Mechanical Keyboard*) 是一个社区维护的开源软件,包括 QMK 固件, QMK 工具箱, qmk.fm网站, 和这些文档。QMK 固件是一个基于[tmk\_keyboard](http://github.com/tmk/tmk_keyboard)的键盘固件,它在爱特梅尔AVR微控制器实现一些有用的功能,确切地说, 是在 [OLKB product line](http://olkb.com), 在 [ErgoDox EZ](http://www.ergodox-ez.com) 键盘, 和 [Clueboard product line](http://clueboard.co/). 上。它被移植到使用ChibiOS的ARM芯片上. 它可以在飞线键盘或定制PCB键盘中发挥功能.
+
+## 如何得到它
+
+如果你打算贡献布局, 键盘, 或者其他QMK特性, 一下是最简单的方法:[从Github获得repo分支](https://github.com/qmk/qmk_firmware#fork-destination-box), 并克隆你的repo到本地进行编辑,推送,然后从你的分支打开 [Pull Request](https://github.com/qmk/qmk_firmware/pulls).
+
+此外, 你也可以直接下载 ([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), 或者从git克隆 (`git@github.com:qmk/qmk_firmware.git`), 或 https (`https://github.com/qmk/qmk_firmware.git`).
+
+## 如何编译
+
+在你能编译之前, 你需要[部署环境](getting_started_build_tools.md) 用于 AVR or/and ARM 开发。完成后, 你可以使用 `make` 命令来编译一个键盘和布局使用以下命令:
+
+ make planck/rev4:default
+
+这将建立 `planck`的`rev4` 修订版本并使用 `default`布局。并非所有键盘都有修订版本 (也叫做子项目或文件夹),在此情况下,修订版本可以省略,如下:
+
+ make preonic:default
+
+## 如何定制
+
+QMK 有许多 [特性](features.md)来探索,也有很多 [参考文档](http://docs.qmk.fm) 供您发掘。你可以通过修改 [布局](keymap.md)和[键码](keycodes.md)来利用许多特性。
diff --git a/docs/zh-cn/_summary.md b/docs/zh-cn/_summary.md
new file mode 100644
index 000000000000..df25a3ccd14e
--- /dev/null
+++ b/docs/zh-cn/_summary.md
@@ -0,0 +1,106 @@
+* [完全菜鸟指南](newbs.md)
+ * [入门](newbs_getting_started.md)
+ * [构建你的第一个固件](newbs_building_firmware.md)
+ * [刷新固件](newbs_flashing.md)
+ * [测试和调试](newbs_testing_debugging.md)
+ * [Git最佳实践](newbs_best_practices.md)
+ * [学习资源](newbs_learn_more_resources.md)
+
+* [QMK基础](README.md)
+ * [QMK 简介](getting_started_introduction.md)
+ * [贡献 QMK](contributing.md)
+ * [如何使用Github](getting_started_github.md)
+ * [获得帮助](getting_started_getting_help.md)
+
+* [问题解答](faq.md)
+ * [一般问题](faq_general.md)
+ * [构建/编译QMK](faq_build.md)
+ * [调试/故障排除 QMK](faq_debug.md)
+ * [键盘布局](faq_keymap.md)
+
+* 详细指南
+ * [安装构建工具](getting_started_build_tools.md)
+ * [流浪者指南](getting_started_vagrant.md)
+ * [构建/编译指令](getting_started_make_guide.md)
+ * [刷新固件](flashing.md)
+ * [定制功能](custom_quantum_functions.md)
+ * [布局概述](keymap.md)
+
+* [硬件](hardware.md)
+ * [AVR 处理器](hardware_avr.md)
+ * [驱动](hardware_drivers.md)
+
+* 参考
+ * [键盘指南](hardware_keyboard_guidelines.md)
+ * [配置选项](config_options.md)
+ * [键码](keycodes.md)
+ * [记录最佳实践](documentation_best_practices.md)
+ * [文档指南](documentation_templates.md)
+ * [词汇表](reference_glossary.md)
+ * [单元测试](unit_testing.md)
+ * [有用的功能](ref_functions.md)
+ * [配置器支持](reference_configurator_support.md)
+ * [info.json 格式](reference_info_json.md)
+
+* [特性](features.md)
+ * [基本键码](keycodes_basic.md)
+ * [US ANSI 控制键](keycodes_us_ansi_shifted.md)
+ * [量子键码](quantum_keycodes.md)
+ * [高级键码](feature_advanced_keycodes.md)
+ * [音频](feature_audio.md)
+ * [自动控制](feature_auto_shift.md)
+ * [背光](feature_backlight.md)
+ * [蓝牙](feature_bluetooth.md)
+ * [Bootmagic](feature_bootmagic.md)
+ * [组合](feature_combo)
+ * [命令](feature_command.md)
+ * [动态宏指令](feature_dynamic_macros.md)
+ * [编码器](feature_encoders.md)
+ * [Grave Escape](feature_grave_esc.md)
+ * [键锁](feature_key_lock.md)
+ * [层](feature_layouts.md)
+ * [引导键](feature_leader_key.md)
+ * [LED 阵列](feature_led_matrix.md)
+ * [宏指令](feature_macros.md)
+ * [鼠标键](feature_mouse_keys.md)
+ * [一键功能](feature_advanced_keycodes.md#one-shot-keys)
+ * [指针设备](feature_pointing_device.md)
+ * [PS/2 鼠标](feature_ps2_mouse.md)
+ * [RGB 光](feature_rgblight.md)
+ * [RGB 矩阵](feature_rgb_matrix.md)
+ * [空格候补换挡](feature_space_cadet_shift.md)
+ * [空格候补换挡回车](feature_space_cadet_shift_enter.md)
+ * [速录机](feature_stenography.md)
+ * [换手](feature_swap_hands.md)
+ * [踢踏舞](feature_tap_dance.md)
+ * [终端](feature_terminal.md)
+ * [热敏打印机](feature_thermal_printer.md)
+ * [Unicode](feature_unicode.md)
+ * [用户空间](feature_userspace.md)
+ * [速度键](feature_velocikey.md)
+
+* 针对制造者和定制者
+ * [飞线指南](hand_wire.md)
+ * [ISP 刷新指南](isp_flashing_guide.md)
+ * [ARM 调试指南](arm_debugging.md)
+ * [I2C 驱动](i2c_driver.md)
+ * [GPIO 控制器](internals_gpio_control.md)
+ * [Proton C 转换](proton_c_conversion.md)
+
+* 深入了解
+ * [键盘如何工作](how_keyboards_work.md)
+ * [理解 QMK](understanding_qmk.md)
+
+* 其他话题
+ * [使用Eclipse开发QMK](other_eclipse.md)
+ * [使用VSCode开发QMK](other_vscode.md)
+ * [支持](support.md)
+
+* QMK 内构 (正在编写)
+ * [定义](internals_defines.md)
+ * [输入回调寄存器](internals_input_callback_reg.md)
+ * [Midi 设备](internals_midi_device.md)
+ * [Midi 设备设置过程](internals_midi_device_setup_process.md)
+ * [Midi 工具库](internals_midi_util.md)
+ * [发送函数](internals_send_functions.md)
+ * [Sysex 工具](internals_sysex_tools.md)
diff --git a/docs/zh-cn/contributing.md b/docs/zh-cn/contributing.md
new file mode 100644
index 000000000000..62b956b619f7
--- /dev/null
+++ b/docs/zh-cn/contributing.md
@@ -0,0 +1,205 @@
+# 如何做贡献
+
+👍🎉 首先感谢各位百忙之中抽空阅读本文档,并为我们无私奉献。给您点赞啦! 🎉👍
+
+第三方的帮助让Q酱成长了许多呢,Q酱也从你们那学到了不少新东西。Q酱希望每一个想帮助我的人都能很方便的做出有用的贡献。在这里我给摩拳擦掌的你们写了一点引导,让你们的代码在不对我做重大改动的情况下都能成功的被采纳哦。
+
+* [项目概况](#项目概况)
+* [代码规范](#代码规范)
+* [一般教程](#一般教程)
+* [行为守则对于我来说有何意义?](#行为守则对于我来说有何意义?)
+
+## 这文章巨长无比不想读啊! 我就想问个问题而已!
+
+您要是想问关于Q酱的问题的话可以在[OLKB Subreddit](https://reddit.com/r/olkb)或者是[Discord](https://discord.gg/Uq7gcHh)随意问。
+
+请记住:
+
+* 维护Q酱的小可爱有的时候可能会有点忙,不能及时回答您的问题,耐心等等,他们都是很nice的人呀。
+* 维护Q酱的人都是很无私的善良的人。无论是贡献代码还是回答问题,都是义务的。有时见到他们努力回答各种问题,解决各种BUG,Q酱也是很心疼的。
+* 您可以看看下面的教程,可以让您的问题浅显易懂,更容易回答:
+ * https://opensource.com/life/16/10/how-ask-technical-questions
+ * http://www.catb.org/esr/faqs/smart-questions.html
+
+# 项目概况
+
+Q酱很大一部分是用C语言组成的,不过有一小部分特性是C++的。怎么说呢,都是我的一部分,两个我都爱。Q酱一般是在键盘上的嵌入式处理器那里工作的,尤其与AVR([LUFA](http://www.fourwalledcubicle.com/LUFA.php))和ARM ([ChibiOS](http://www.chibios.com))两小哥哥搭配,干活不累,嘻嘻。如果您精通Arduino的话您会发现很多熟悉的概念,但也有点不爽,因为您以前的经验可能没法用来帮助Q酱。
+
+
+
+# Q酱,我在哪能帮助你嘞?
+
+您要是有问题的话可以 [提出一个issue](https://github.com/qmk/qmk_firmware/issues) 或 [在Discord上交流一下](https://discord.gg/Uq7gcHh).
+
+# Q酱,我如何帮助你?
+
+您以前是否没为开源贡献过代码,而又想知道帮助Q酱是怎么一回事? 稍安勿躁,咱给您总结一下!
+
+0. 先注册一个 [GitHub](https://github.com) 账户。
+1. 做好一个你要贡献的布局,那就要 [找一个你想解决的问题](https://github.com/qmk/qmk_firmware/issues),或者 [找一个你想添加的特性](https://github.com/qmk/qmk_firmware/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)。
+2. 把关联着问题的仓库分叉(fork)到你的仓库。这样你在`你的GitHub用户名/qmk_firmware`就有一个仓库备份啦。
+3. 使用 `git clone https://github.com/此处添GitHub用户名/此处添仓库名.git`这个命令把仓库同步到你的电脑中。
+4. 您要是想开发一个新特性的话可以先创建一个issue和Q酱的维护者讨论一下您要做什么。
+5. 使用`git checkout -b 此处写分支名字(别用汉字)`命令来创建一个分支(branch)用于开发。
+6. 对要解决的问题或要添加的特性进行适当的更改。
+7. 使用 `git add 把改变的文件的目录写这里` 可以添加改变的文件内容到git用于管理工程状态的索引(快照)里。
+8. 使用 `git commit -m "这里写修改的相关信息"` 来描述你做出了什么修改。
+9. 使用 `git push origin 此处写分支名字`来把你的更改同步到GitHub库里(反正不是打篮球那个库里)。
+10. 提交一个[QMK 固件的pull request](https://github.com/qmk/qmk_firmware/pull/new/master)。
+11. 给你的pull request拟一个标题,包括简短的描述和问题或错误代码。比如, 你可以起一个这样的"Added more log outputting to resolve #4352"(最好用英语,毕竟Q酱的中文也不是那么的溜,有可能会看不懂中文)。
+12. 在描述(description)里面写你做了哪些更改,你的代码里还存在什么问题, 或者你想问维护的小可爱们的问题。你的your pull request有点小问题无伤大雅(本来也没有完美的代码嘛), 维护的小可爱们会竭尽全力帮您改进的!
+13. 维护人员审查代码可能需要一些时间。
+14. 维护人员会通知您要更改什么地方,然后您就按照建议改一改。
+15. 预祝您合并成功!
+
+# 代码规范
+
+其实也没有什么特别严格的规范啦,但是俗话说的好:没有规矩,不成方圆。您可以看一下您的要改动的代码周围的画风,然后保持队形。如果你感觉周围都不知道是什么牛鬼蛇神的话就看看下面的建议:
+
+* 我们用肆(4)个空格来缩进(软件中也可以设置到Tab键)
+* 我们使用改良的1TBS(允许单行样式)
+ * 左大括号: 在开放性语句块那行的末尾
+ * 右大括号: 和开放性语句块第一个字母对齐
+ * Else If: 将右大括号放在行的开头,下一个左大括号放在同一行的结尾
+ * 可选大括号: 可选大括号是必选的
+ * 应该这样: if (condition) { return false; }
+ * 不应该这样: if (condition) return false;
+* 建议使用C语言风格的注释: `/* */`
+ * 把注释想象成一个描述特征的故事
+ * 充分使用注释来描述你为何这样修改
+ * 有些公认的东西就不要写到注释里面了
+ * 如果你不知道注释是否多余,看下面
+* 一般不要主动换行,主动换行的话每行不要超过76列
+* 要把 `#pragma once` 放到头文件的开始哦,抛弃老土的(`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)吧
+* 下面两种预处理命令都可以用: `#ifdef DEFINED` 还有 `#if defined(DEFINED)`
+ * 以上那句对处女座不是很友好哈,处女座的朋友们就别纠结了,直接 `#if defined(DEFINED)` 。
+ * 还有就是选好一种风格就一直用,一直用一直爽,不要朝三暮四, 除非你要变化到多重条件的 `#if`。
+ * `#` 和 `if`要挨在一起哦,再让本空格在中间冒充电灯泡本空格会生气的。
+ * 以下是缩进规则:
+ * 首先考虑可读性,强迫症的朋友们总想要保持代码的高一致性,这样可不好。
+ * 保证文件已有风格不变。如果代码本来就是杂糅风格,那就见机行事,让你的修改更有意义些。
+ * 其实你也可以在缩进的时候看看周围其他代码,然后范水模山,预处理命令可以有自己的缩进风格。
+
+可以参照下面:
+
+```c
+/* foo 的 Enums*/
+enum foo_state {
+ FOO_BAR,
+ FOO_BAZ,
+};
+
+/* 有返回值的情况 */
+int foo(void) {
+ if (some_condition) {
+ return FOO_BAR;
+ } else {
+ return -1;
+ }
+}
+```
+
+# Clang-format的自动格式化
+[Clang-format](https://clang.llvm.org/docs/ClangFormat.html) 是LLVM的一部分,可以帮你自动格式化代码。我们给你准备好了一个适用于以上规范的配置文件,会帮你调整缩进和换行,你只需要写好括号就好。有了它,你再也不用担心调整代码格式太耗时,没有时间陪伴自己(虚构)的另一半了。
+
+使用[LLVM 完整安装](http://llvm.org/builds/)可以在Windows上安装clang-format, Ubuntu用户要用`sudo apt install clang-format`。
+
+命令行的朋友们, 加上 `-style=file`选项就会自动在QMK的根目录寻找.clang-format配置文件了。
+
+VSCode用户, 标准的 C/C++ 插件就支持clang-format, 或者可以用[独立扩展](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.ClangFormat)也行。
+
+有些东西(比如LAYOUT宏) 会被clang-format打乱,所以那些文件就别用clang-format了,这里就教您一个小窍门,在`// clang-format off` 和 `//clang-format on`之间装上会被搞乱的代码就好了。
+
+# 一般教程
+
+你可以给Q酱的不同部分添砖加瓦,但也要用不同的方法严谨检查。不论你修改哪里最好还是看看下边。
+
+* 将PR(pull request)分成一个个的逻辑单元。 比如,不要一次将两个新特性PR出去。要添加的特性排好队,一个一个来。
+* 提交之前看一眼,`git diff --check`的空格一定要写对了
+* 确定你的代码能通过编译
+ * 布局: 确定`make keyboard:your_new_keymap` 不返回错误
+ * 键盘: 确定 `make keyboard:all` 不返回错误
+ * 核心代码: 确定 `make all` 不返回错误
+* 提交的信息尽量明确。第一行写点简短介绍(每行不多于70个英文字母), 第二行空着,第三行和后面就要写些必要的细节了。最好用英文写,比如:
+
+```
+Adjust the fronzlebop for the kerpleplork
+
+The kerpleplork was intermittently failing with error code 23. The root cause was the fronzlebop setting, which causes the kerpleplork to activate every N iterations.
+
+Limited experimentation on the devices I have available shows that 7 is high enough to avoid confusing the kerpleplork, but I'd like to get some feedback from people with ARM devices to be sure.
+```
+
+## 文档
+
+想帮助Q酱当然是先看文档最简单了。找到这个文档哪里错了然后改正它对于你来说超级简单! 我们也对有写文档能力的人求贤若渴,如果你是对的人[点这个](#Q酱,我在哪能帮助你嘞?)!
+
+文档呢,都静静的放在`qmk_firmware/docs` 目录里, 也或者您想为网页做贡献的话也是可以的哦。
+
+在文档中附代码案例时, 先观察文档其他地方的命名规范。比如, 把enums的名字都改成像`my_layers`或者`my_keycodes`来防止名字不一致的enums被当作特务枪毙:
+
+```c
+enum my_layers {
+ _FIRST_LAYER,
+ _SECOND_LAYER
+};
+
+enum my_keycodes {
+ FIRST_LAYER = SAFE_RANGE,
+ SECOND_LAYER
+};
+```
+
+## 布局
+
+大多数QMK新手都从创建一个自己的布局开始。我们尽力保证布局规范宽松 (毕竟布局是个性的体现) 不过建议遵守以下准则,这样可以让别人更好理解你的代码
+
+* 用 [模板](documentation_templates.md)写个`readme.md`。
+* 所有的布局PR都会被squash, 如果你想知道你的提交是怎么被squash的那你就自己来吧
+* 不要把新特性和布局一起PR。可以分别PR他们
+* 布局文件夹就不要放`Makefile`了,这个操作都过时啦
+* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
+
+## 键盘
+
+QMK的最终归宿是键盘。有些键盘是社区维护的,有一些是制作这些键盘的人维护的。`readme.md`会告诉你是谁维护了这个键盘,如果你对某个键盘有疑问,可以 [创建一个Issue](https://github.com/qmk/qmk_firmware/issues) 来问一问维护者。
+
+我们建议你按下面的来操作:
+
+* 用[模板](documentation_templates.md)写`readme.md`。
+* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
+* 不要把新特性和新键盘一起PR。可以分别PR他们
+* 用父文件夹的名字命名 `.c`/`.h`文件, 比如`/keyboards///.[ch]`
+* 键盘文件夹就不要放`Makefile`了,这个操作都过时啦
+* 更新文件头部的copyrights(看`%YOUR_NAME%`那)
+
+## Quantum/TMK 核心
+
+在您废寝忘食地开发Q酱新特性或者帮Q酱驱虫之前,一定要确保你的工作是有意义的。看看[了解QMK](understanding_qmk.md)你会对Q酱有更深的了解,这个文档将带你领略QMK的程序流程。现在你应该和维护团对谈谈来了解实现你想法的最佳方法了。一下渠道都可以:
+
+* [在Discord交流](https://discord.gg/Uq7gcHh)
+* [建立一个Issue](https://github.com/qmk/qmk_firmware/issues/new)
+
+新特性和BUG的修复影响所有键盘。开发组也在翻修QMK。所以,在实施重大返修之前一定要讨论一下。如果你在没有事先与维护团队沟通的情况下提交了一个PR,而且你的选择与维护团队的计划方向不符,那你可能要面临大改了。
+
+修复BUG或者开发新特性之前看看这个:
+
+* **默认不启用** - QMK运行的芯片多数内存有限,所以首要考虑的还应该是布局不要被破坏,于是特性默认是不启用的。你喜欢什么特性的话就打开它,如果你觉得有些特性应该默认开启或者你能帮助缩减代码,那就联系维护组吧。
+* **提交之前在本地编译** - 这个简直就是家喻户晓了,但是也确实需要编译啊! 我们的Travis系统会发现一切问题,但是自己编译一下可要比在线等快多了。
+* **注意版本和芯片平台** - 有那么几个键盘有支持不同配置甚至是不同芯片的版本。试着写一个能AVR和ARM两个平台运行的特性,或者在不支持的平台自动禁用。
+* **解释你的新特性** - 在`docs/`写个文档, 你可以创建新文档或者写到现有文档中。如果你不把它记录下来,其他人就无法从你的努力中获益。
+
+也可以看看以下建议:
+
+* 提交数量尽量合理,不然我们可就要把你的PR给squash了。
+* 不要把新特性、布局和键盘一起PR。可以分别PR他们。
+* 给你的特性写[单元测试](unit_testing.md)。
+* 你编辑的文件风格要一致,如果风格不明确或者是混搭风的,你就要先看看[代码规范](#代码规范)确认情况。
+
+## 重构
+
+为了保持QMK脉络清晰,Q酱打算深入规划重构一下自己,然后让合作者进行修改。如果你有重构的思路或建议[创建一个issue](https://github.com/qmk/qmk_firmware/issues), Q酱很乐意讨论一下怎么改进一下。
+
+# 行为守则对于我来说有何意义?
+
+我们的[行为守则](https://github.com/qmk/qmk_firmware/blob/master/CODE_OF_CONDUCT.md) 是说明您有责任尊重和礼貌地对待项目中的每个人,无论他们的身份如何。 如果你是我们行为准则所描述的不当行为的受害者,我们将站在你这边,并按照行为准则对施暴者进行适当谴责。
diff --git a/docs/zh-cn/faq.md b/docs/zh-cn/faq.md
new file mode 100644
index 000000000000..3d0b65c6fd21
--- /dev/null
+++ b/docs/zh-cn/faq.md
@@ -0,0 +1,6 @@
+# 常见问题
+
+* [一般问题](faq_general.md)
+* [构建和编译QMK](faq_build.md)
+* [QMK调试和故障排除](faq_debug.md)
+* [布局问题](faq_keymap.md)
diff --git a/docs/zh-cn/faq_build.md b/docs/zh-cn/faq_build.md
new file mode 100644
index 000000000000..60d902007ca6
--- /dev/null
+++ b/docs/zh-cn/faq_build.md
@@ -0,0 +1,150 @@
+# 关于构建的常见问题
+
+本页所写是QMK构建的常见问题.如果你还没有进行过编译,就看一下[构建环境搭建](getting_started_build_tools.md) 和 [make的说明](getting_started_make_guide.md).
+
+## 如果您不能在Linux上编程
+您需要适当的权限才能操作设备。对于Linux用户, 请参阅下方有关`udev`规则的说明。如果您对`udev`有问题,解决方法是用`sudo`命令。如果您不熟悉此命令,使用`man sudo`查看其手册或[看这个网页](https://linux.die.net/man/8/sudo).
+
+在你的主控是ATMega32u4时,以下是使用`sudo`命令的样例:
+
+ $ sudo dfu-programmer atmega32u4 erase --force
+ $ sudo dfu-programmer atmega32u4 flash your.hex
+ $ sudo dfu-programmer atmega32u4 reset
+
+或只用;
+
+ $ sudo make ::dfu
+
+使用`sudo`运行`make`一般来说**不**推荐,如果可能,尽量使用前一种方法之一。
+
+### Linux `udev` 规则
+在Linux上,您需要适当的权限才能访问MCU。你也可以在刷新固件时使用 `sudo`,或把这些文件放到`/etc/udev/rules.d/`。
+
+**/etc/udev/rules.d/50-atmel-dfu.rules:**
+```
+# Atmel ATMega32U4
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff4", MODE:="0666"
+# Atmel USBKEY AT90USB1287
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ffb", MODE:="0666"
+# Atmel ATMega32U2
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2ff0", MODE:="0666"
+```
+
+**/etc/udev/rules.d/52-tmk-keyboard.rules:**
+```
+# tmk键盘产品 https://github.com/tmk/tmk_keyboard
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
+```
+**/etc/udev/rules.d/54-input-club-keyboard.rules:**
+
+```
+# Input Club keyboard bootloader
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="1c11", MODE:="0666"
+```
+
+### 串行设备在Linux上检测不到bootloader模式
+确保您的内核对您的设备有相应的支持。 如果你的设备是 USB ACM, 比如Pro Micro (Atmega32u4),就要加上`CONFIG_USB_ACM=y`. 其他设备可能需要`USB_SERIAL` 及其任何子选项。
+
+## DFU Bootloader的未知设备
+
+如果您在使用Windows来刷新键盘的时候碰到了问题,检查设备管理器。如果在键盘处于 "bootloader模式"时你看到 "未知设备",说明你可能面临设备问题。
+
+重新运行MSYS2上的安装脚本或许会凑效(比如在MSYS2/WSL运行 `./util/qmk_install.sh`) 或者重新安装QMK工具箱也可能会解决你的问题。
+
+如果以上方法还是短针攻疽,那您可能需要使用[Zadig Utility](https://zadig.akeo.ie/)。下载此程序, 找到设备问题, 然后选择 `WinUSB`选项, 然后点击"Reinstall driver"。完成后再试试刷新你的键盘。倘若依然徒劳无功,那就尝试所有选项直到好用为止。
+
+?> 事实上没有一个驱动的最佳选择,有些选项就是和某些系统相辅相成。但libUSB和WinUSB似乎也算是这里的最佳选择了。
+如果bootloader在设备列表中没有显示,你可能要使能 "List all devices"选项在选项菜单中`Options`,然后找到有问题的bootloader设备。(译者注:在win10中可能为 查看-显示隐藏的设备)
+
+
+## WINAVR已淘汰
+不再推荐使用WINAVR,使用可能会导致问题
+详情请见[TMK Issue #99](https://github.com/tmk/tmk_keyboard/issues/99).
+
+## USB VID 和 PID
+你可以在编辑`config.h`时使用任何你想用的ID值。实际上,使用任何可能未使用的ID都没有问题,除了有极低的与其他产品发生冲突的可能性。
+
+大多数QMK主板使用`0xFEED`作为vendor ID。您应该查看其他键盘,以确保选择了唯一的Product ID。
+
+也要看看这个。
+https://github.com/tmk/tmk_keyboard/issues/150
+
+一也可以在下方链接购买一个唯一的VID:PID。不过个人使用似乎用不着这个。
+- http://www.obdev.at/products/vusb/license.html
+- http://www.mcselec.com/index.php?page=shop.product_details&flypage=shop.flypage&product_id=92&option=com_phpshop&Itemid=1
+
+## Cortex: `cstddef: No such file or directory`
+在Ubuntu 14.04上的GCC 4.8 会出现这种问题需要用这个PPA升级到4.9。
+https://launchpad.net/~terry.guo/+archive/ubuntu/gcc-arm-embedded
+
+https://github.com/tmk/tmk_keyboard/issues/212
+https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting#compile-error-cstddef
+https://developer.mbed.org/forum/mbed/topic/5205/
+
+## `clock_prescale_set` and `clock_div_1` Not Available
+你的工具链太旧了不支持MCU。比如WinAVR 20100110就不支持ATMega32u2.
+
+```
+Compiling C: ../../tmk_core/protocol/lufa/lufa.c
+avr-gcc -c -mmcu=atmega32u2 -gdwarf-2 -DF_CPU=16000000UL -DINTERRUPT_CONTROL_ENDPOINT -DBOOTLOADER_SIZE=4096 -DF_USB=16000000UL -DARCH=ARCH_AVR8 -DUSB_DEVICE_ONLY -DUSE_FLASH_DESCRIPTORS -DUSE_STATIC_OPTIONS="(USB_DEVICE_OPT_FULLSPEED | USB_OPT_REG_ENABLED | USB_OPT_AUTO_PLL)" -DFIXED_CONTROL_ENDPOINT_SIZE=8 -DFIXED_NUM_CONFIGURATIONS=1 -DPROTOCOL_LUFA -DEXTRAKEY_ENABLE -DCONSOLE_ENABLE -DCOMMAND_ENABLE -DVERSION=unknown -Os -funsigned-char -funsigned-bitfields -ffunction-sections -fdata-sections -fno-inline-small-functions -fpack-struct -fshort-enums -fno-strict-aliasing -Wall -Wstrict-prototypes -Wa,-adhlns=obj_alps64/protocol/lufa/lufa.lst -I. -I../../tmk_core -I../../tmk_core/protocol/lufa -I../../tmk_core/protocol/lufa/LUFA-git -I../../tmk_core/common -std=gnu99 -include config.h -MMD -MP -MF .dep/obj_alps64_protocol_lufa_lufa.o.d ../../tmk_core/protocol/lufa/lufa.c -o obj_alps64/protocol/lufa/lufa.o
+../../tmk_core/protocol/lufa/lufa.c: In function 'setup_mcu':
+../../tmk_core/protocol/lufa/lufa.c:575: warning: implicit declaration of function 'clock_prescale_set'
+../../tmk_core/protocol/lufa/lufa.c:575: error: 'clock_div_1' undeclared (first use in this function)
+../../tmk_core/protocol/lufa/lufa.c:575: error: (Each undeclared identifier is reported only once
+../../tmk_core/protocol/lufa/lufa.c:575: error: for each function it appears in.)
+make: *** [obj_alps64/protocol/lufa/lufa.o] Error 1
+```
+
+
+## AVR的BOOTLOADER_SIZE
+注意Teensy2.0++ bootloader的大小是2048字节。有些Makefile注释错了。
+
+```
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 2048
+# Atmel DFU loader 4096 (TMK Alt Controller)
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=2048
+```
+
+## 在MacOS上 `avr-gcc: internal compiler error: Abort trap: 6 (program cc1)`
+这是brew更新的问题,导致AVR GCC依赖的符号链接被损坏。
+
+解决方案是移除并重新安装所有受影响的模块。
+
+```
+brew rm avr-gcc
+brew rm dfu-programmer
+brew rm dfu-util
+brew rm gcc-arm-none-eabi
+brew rm avrdude
+brew install avr-gcc
+brew install dfu-programmer
+brew install dfu-util
+brew install gcc-arm-none-eabi
+brew install avrdude
+```
+
+### avr-gcc 8.1 和 LUFA
+
+如果你把avr-gcc升级到7以上你可能会遇到关于LUFA的问题。比如:
+
+`lib/lufa/LUFA/Drivers/USB/Class/Device/AudioClassDevice.h:380:5: error: 'const' attribute on function returning 'void'`
+
+那你就需要在brew中把avr-gcc回退到7。
+
+```
+brew uninstall --force avr-gcc
+brew install avr-gcc@7
+brew link --force avr-gcc@7
+```
+
+### 我刷新了我的键盘但是键盘不工作/按键没有注册 - 而且还是ARM的 (rev6 planck, clueboard 60, hs60v2, etc...) (Feb 2019)
+由于EEPROM在基于ARM的芯片上的工作原理,保存的设置可能不再有效。这会影响默认层,而且*或许*在某些情况下,会使键盘不好用,我们仍在调查这些情况。重置EEPROM将解决此问题。
+
+[Planck rev6键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) 是用于强制重置EEPROM的。刷入这个文件后,再次刷入正常固件,这会将键盘恢复到_正常_工作状态。
+[Preonic rev3键盘重置EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
+
+如果以任何形式启用了bootmagic, 那么您还需要(看[Bootmagic文档](feature_bootmagic.md) 以及键盘信息,以了解如何执行此操作的详细信息).
diff --git a/docs/zh-cn/faq_debug.md b/docs/zh-cn/faq_debug.md
new file mode 100644
index 000000000000..ca8b3fd25dc2
--- /dev/null
+++ b/docs/zh-cn/faq_debug.md
@@ -0,0 +1,233 @@
+# 调试的常见问题
+
+本篇详细介绍了人们在键盘故障排除时的各种常见问题。
+
+# 调试控制台
+
+## `hid_listen` 无法识别设备
+当设备的调试控制台未就绪时,您将看到如下内容:
+
+```
+Waiting for device:.........
+```
+
+插入设备后,*hid_listen*找到该设备,您将收到以下消息:
+
+```
+Waiting for new device:.........................
+Listening:
+```
+
+如果您无法获得这条“Listening:”消息,请尝试在[Makefile]中使用 `CONSOLE_ENABLE=yes`
+
+在Linux这样的操作系统上,你可能需要一些权限。
+- 使用`sudo hid_listen`
+
+## 控制台没有返回消息
+检查:
+- *hid_listen* 找到了你的设备。看前面。
+- 输入**Magic**+d打开调试。详见[Magic Commands](https://github.com/tmk/tmk_keyboard#magic-commands)。
+- 设置`debug_enable=true` ,一般存在于**matrix.c**的`matrix_init()`中。
+- 尝试使用'print'函数而不要用调试输出。详见**common/print.h**。
+- 断开其他有控制台功能的设备。 详见[Issue #97](https://github.com/tmk/tmk_keyboard/issues/97)。
+
+## Linux或UNIX这样的系统如何请求超级用户权限
+用'sudo'来执行*hid_listen*就有权限了。
+```
+$ sudo hid_listen
+```
+
+或者把一个文件放到规则文件夹来为TMK设备添加*udev规则*,不同系统的目录可能有所不同。
+
+文件: /etc/udev/rules.d/52-tmk-keyboard.rules(在Ubuntu系统的情况下)
+```
+# tmk keyboard products https://github.com/tmk/tmk_keyboard
+SUBSYSTEMS=="usb", ATTRS{idVendor}=="feed", MODE:="0666"
+```
+
+***
+
+# 其他
+## 安全注意事项
+
+你应该不想要把你的键盘变成"砖头"吧,就是变成没法重写固件的那种。
+下面讲解一些参数来告诉你什么风险很大(其实也不是很大)。
+
+- 假如你键盘表面没有设计重置键"RESET", 那你要进入bootloader的话就要按PCB上的RESET了。
+ 按PCB上的RESET要拧开键盘底部。
+- 如果 tmk_core / common 里面的文件丢失键盘可能失灵。
+- .hex太大可能不太好; `make dfu` 会删除块,检验大小(咦?好像反了...)。
+ 一但出错,刷新键盘失败的话就困在DFU出不去了。
+ - 所以, 要知道大小限制。 Planck键盘上.hex文件最大大小是 is 7000h (十进制是28672)
+
+```
+Linking: .build/planck_rev4_cbbrowne.elf [OK]
+Creating load file for Flash: .build/planck_rev4_cbbrowne.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 22396 0 22396 577c planck_rev4_cbbrowne.hex
+```
+
+ - 上面那个文件大小是 22396/577ch,比28672/7000h小
+ - 当你有一个合适的.hex文件时,你就要重试加载那个了
+ - 您在键盘Makefile中的某些选项可能消耗额外内存;注意以下这几个
+ BOOTMAGIC_ENABLE, MOUSEKEY_ENABLE, EXTRAKEY_ENABLE, CONSOLE_ENABLE, API_SYSEX_ENABLE
+- DFU 工具/不/可以写入bootloader (unless you throw in extra fruit salad of options),
+ 所以还是有点危险的
+- EEPROM大概有100000次循环寿命。不要总是频繁重写固件;EEPROM会玩坏的。
+## 全键无冲不好用
+首先你要在**Makefile**用如下命令编译固件`NKRO_ENABLE`。
+
+全键无冲还不好用的话试着用`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复位电路。
+
+- http://geekhack.org/index.php?topic=50176.msg1127447#msg1127447
+- http://www.mikrocontroller.net/attachment/52583/tpm754.pdf
+
+
+## 矩阵不可读16以上的列
+当列超过16时[matrix.h]的`read_cols()`中,用`1UL<<16`而不要用`1<<16`。
+
+在C语言中`1` 是一个[int] 类型的[16 bit]值,在AVR中你不能左移大于15次。如果你使用`1<<16`的话会得到意外的零。你要用 [unsigned long]类型,比如`1UL`。
+
+http://deskthority.net/workshop-f7/rebuilding-and-redesigning-a-classic-thinkpad-keyboard-t6181-60.html#p146279
+
+
+## Bootloader跳转不好用
+在**Makefile**中正确配置**Makefile**大小。如果分区大小不正确,引导加载程序可能无法从**Magic command**和**Boot Magic**加载。
+```
+# bootloader字节数:
+# Atmel DFU loader(ATmega32U4) 4096
+# Atmel DFU loader(AT90USB128) 8192
+# LUFA bootloader(ATmega32U4) 4096
+# Arduino Caterina(ATmega32U4) 4096
+# USBaspLoader(ATmega***) 2048
+# Teensy halfKay(ATmega32U4) 512
+# Teensy++ halfKay(AT90USB128) 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+```
+AVR引导大小是通过**BOOTSZ**熔丝位来设置的。查阅你单片机的datasheet。
+记住,datasheet用的是**Word**(2字节)表示大小和地址,TMK用的是**Byte**。
+
+AVR引导部分位于闪存的末尾,如下所示(Application是应用区,Bootloader是引导区)。
+```
+byte Atmel/LUFA(ATMega32u4) byte Atmel(AT90SUB1286)
+0x0000 +---------------+ 0x00000 +---------------+
+ | | | |
+ | | | |
+ | Application | | Application |
+ | | | |
+ = = = =
+ | | 32KB-4KB | | 128KB-8KB
+0x6000 +---------------+ 0x1E000 +---------------+
+ | Bootloader | 4KB | Bootloader | 8KB
+0x7FFF +---------------+ 0x1FFFF +---------------+
+
+
+byte Teensy(ATMega32u4) byte Teensy++(AT90SUB1286)
+0x0000 +---------------+ 0x00000 +---------------+
+ | | | |
+ | | | |
+ | Application | | Application |
+ | | | |
+ = = = =
+ | | 32KB-512B | | 128KB-2KB
+0x7E00 +---------------+ 0x1FC00 +---------------+
+ | Bootloader | 512B | Bootloader | 2KB
+0x7FFF +---------------+ 0x1FFFF +---------------+
+```
+
+详情请见下方issue。
+https://github.com/tmk/tmk_keyboard/issues/179
+
+如果你使用TeensyUSB, 有一个[已知bug](https://github.com/qmk/qmk_firmware/issues/164)硬件重置按钮阻止软件定义重置键工作。重新插拔键盘就好了。
+
+## 特殊额外键不起作用(系统,音频控制键)
+你要在`rules.mk`定义`EXTRAKEY_ENABLE`在QMK中使用它们。
+
+```
+EXTRAKEY_ENABLE = yes # 音频控制和系统控制
+```
+
+## 睡眠唤醒不好用
+
+在Windows查看设备管理器中该键盘设备属性中电源管理选项卡中的`允许此设备唤醒计算机(O)`是否勾选。同时看一眼BIOS设置。
+
+在主机睡眠时按下任何键都可以唤醒了。
+
+## 使用Arduino?
+
+**注意Arduino的针脚名字和主控芯片的不一样。** 比如, Arduino的`D0`并不是`PD0`。自己用原理图捋一下电路。
+
+- http://arduino.cc/en/uploads/Main/arduino-leonardo-schematic_3b.pdf
+- http://arduino.cc/en/uploads/Main/arduino-micro-schematic.pdf
+
+Arduino Leonardo和micro使用**ATMega32U4**,该芯片TMK可用,但Arduino的bootloader会导致问题。
+
+
+## 在USB AVR使用PF4-7针脚?
+你要置位MCUCR寄存器JTD位来将PF4-7设置为GPIO。这些针脚默认是JTAG功能。 像ATMega*U* or AT90USB*这样的MCU会受影响。
+
+如果是用Teensy的话就不需要了。Tennsy自带JTAGEN位未编程来失能该功能。
+
+代码如下。
+```
+ // F接口JTAG失能。在四个周期内写入两次JTD位。
+ MCUCR |= (1<
+![键盘设计图](https://i.imgur.com/5wsh5wM.png)
+
+## 我有一些键变成了其他功能或者不工作了
+
+QMK有两个功能,Bootmagic和命令行,它允许您在运行中更改键盘的行为。该功能包括但不仅限于, 交换Ctrl/Caps,关闭界面,交换Alt/Gui,交换 Backspace/Backslash,禁用所有键,以及其他的行为改变。
+
+快速解决方法是插入键盘时按住`Space`+`Backspace`。该操作将重置已保存设置,让这些键回复初始功能。这招不好用的话参阅下方:
+
+* [Bootmagic](feature_bootmagic.md)
+* [命令](feature_command.md)
+
+## 菜单键不好用
+
+现在大多数键盘 `KC_RGUI`和`KC_RCTL`中间的键子叫做`KC_APP`。这是因为在这个键子发明之前相关标准里就已经有键叫做`MENU(菜单)`了,所以微软叫他`APP(应用)`键。
+
+## `KC_SYSREQ` 不工作
+使用抓屏的键码(`KC_PSCREEN`或`KC_PSCR`)而不用`KC_SYSREQ`。组合键'Alt + Print Screen'会被当作'System request'。
+
+见[issue #168](https://github.com/tmk/tmk_keyboard/issues/168)和
+* http://en.wikipedia.org/wiki/Magic_SysRq_key
+* http://en.wikipedia.org/wiki/System_request
+
+## 电源键不工作
+
+这有点让人困惑,QMK有两个"Power(电源)"键码: `KC_POWER` 在键盘/小键盘的HID使用页面中,`KC_SYSTEM_POWER` (或者叫`KC_PWR`)在用户页。
+
+前者只能被macOS识别,但是后者,即`KC_SLEP`和`KC_WAKE`三大主要操作系统全都支持,所以推荐使用这两个。Windows下这些键立即生效,macOS要长按直到弹出对话框。
+
+## 自动大小写锁定
+可以解决'the'问题(正常应为The)。我经常在输入'The'时不慎输入了'the'或者'THe'。自动大小写锁定可以修正此类问题。详见下方链接。
+https://github.com/tmk/tmk_keyboard/issues/67
+
+## 修改 键/层 卡住
+除非正确配置层切换,否则修改键或层可能会卡住。
+对于修改键和图层操作,必须把`KC_TRANS`放到目标层的相同位置,用于注销修改键或在释放事件时返回到上一层。
+* https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#31-momentary-switching
+* http://geekhack.org/index.php?topic=57008.msg1492604#msg1492604
+* https://github.com/tmk/tmk_keyboard/issues/248
+
+
+## 机械自锁开关支持Mechanical Lock Switch Support
+
+本功能用于*机械自锁开关*比如[this Alps one](http://deskthority.net/wiki/Alps_SKCL_Lock)。你可以通过向`config.h`添加以下宏来使能该功能:
+
+```
+#define LOCKING_SUPPORT_ENABLE
+#define LOCKING_RESYNC_ENABLE
+```
+
+在使能该功能后,要在键盘中使用`KC_LCAP`, `KC_LNUM` 和 `KC_LSCR`这三个键码。
+
+远古机械键盘偶尔会有自锁机械开关,现在几乎没有了。***大多数情况下你不需要使用该功能,且要使用`KC_CAPS`, `KC_NLCK`和`KC_SLCK`这三个键码。***
+
+## 输入ASCII之外的特殊字符比如Cédille 'Ç'
+没有在所有系统中输入这个的通用方法。你要定义针对你的特定操作系统或布局的**宏**。
+
+比如看这个**宏**代码的文章。
+
+http://deskthority.net/workshop-f7/tmk-keyboard-firmware-collection-t4478-120.html#p195620
+
+在**Windows**上,可以用`AltGr`键或**Alt码**。
+* http://en.wikipedia.org/wiki/AltGr_key
+* https://zh.wikipedia.org/wiki/Alt%E7%A0%81
+
+在**Mac OS**定义`Option`键组合。
+* https://zh.wikipedia.org/wiki/Option%E9%94%AE#%E6%9B%BF%E4%BB%A3%E9%94%AE%E7%9B%98%E8%BE%93%E5%85%A5
+
+在**Xorg**可以改用`compose`键。
+* http://en.wikipedia.org/wiki/Compose_key
+
+下方链接查看**Unicode**输入。
+* http://en.wikipedia.org/wiki/Unicode_input
+
+## macOS上的`Fn`
+
+不像大多数FN键,苹果上那个有自己的键码...呃,基本上算吧。 他取缔了基本6键无冲HID报告的第六个键码 -- 所以苹果键盘其实是5键无冲的。
+
+技术上说QMK可以发送这个键。但是,这样做需要修改报告格式以添加FN键的状态。这还不是最糟糕的,你的键盘的VID和PID和真的苹果键盘不一样的话还不会被识别。
+QMK官方支持这个会被律师函的,所以就当我没说过。
+
+详见[issue#2179](https://github.com/qmk/qmk_firmware/issues/2179)。
+
+
+## Mac OSX的媒体控制键
+#### KC_MNXT 和 KC_MPRV 在Mac上不好用
+使用 `KC_MFFD`(`KC_MEDIA_FAST_FORWARD`) 和 `KC_MRWD`(`KC_MEDIA_REWIND`),不要用 `KC_MNXT` 和 `KC_MPRV`.
+详见 https://github.com/tmk/tmk_keyboard/issues/195
+
+
+## Mac OSX中支持那些键?
+你可以从此源码中获知在OSX中支持哪些键码
+
+`usb_2_adb_keymap` 阵列映射 键盘/小键盘 页用于ADB扫描码(OSX内部键码).
+
+https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/Cosmo_USB2ADB.c
+
+`IOHIDConsumer::dispatchConsumerEvent`会处理用户页面用法。
+
+https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-606.1.7/IOHIDFamily/IOHIDConsumer.cpp
+
+
+## Mac OSX中的JIS键
+岛国特别键比如`無変換(Muhenkan)`, `変換(Henkan)`, `ひらがな(hiragana)`OSX是不是别的。You can use **Seil** to enable those keys, try following options.
+
+* 在电脑键盘上使能NFER键
+* 在电脑键盘上使能XFER键
+* 在电脑键盘上使能KATAKAN键
+
+https://pqrs.org/osx/karabiner/seil.html
+
+
+## RN-42蓝牙模块与Karabiner不能有效协同工作
+Karabiner - Mac OSX的改键软件 - 默认RN-42模块是不会被响应的。想要Karabiner和你的键盘协同工作你要使能此选项:
+https://github.com/tekezo/Karabiner/issues/403#issuecomment-102559237
+
+此问题详见下方链接。
+https://github.com/tmk/tmk_keyboard/issues/213
+https://github.com/tekezo/Karabiner/issues/403
+
+
+## Esc 和 `
双功能键
+
+请见[Grave Escape](feature_grave_esc.md)功能。
+
+## 右侧双角色修改键(诸如Shift、Alt等有修改其他键作用的键)变箭头键
+右侧修改键单击时会变为箭头键,长按就还是修改键。在TMK中双角色键称之为**TAP**.
+```
+
+#include "keymap_common.h"
+
+
+/* 用TMK双角色键功能实现右侧修改键改箭头键
+ *
+ * https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-modifier-with-tap-keydual-role
+ * https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+ */
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* 0: qwerty */
+ [0] = LAYOUT( \
+ ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS,BSPC, \
+ TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \
+ LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \
+ LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,FN0, ESC, \
+ FN4, LGUI,LALT, SPC, APP, FN2, FN1, FN3),
+ [1] = LAYOUT( \
+ GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,\
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
+ TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN5, TRNS, \
+ TRNS,TRNS,TRNS, TRNS, TRNS,FN7, FN6, FN8),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_UP),
+ [1] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_DOWN),
+ [2] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_LEFT),
+ [3] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_RIGHT),
+ [4] = ACTION_LAYER_MOMENTARY(1),
+ [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_PGUP),
+ [6] = ACTION_MODS_TAP_KEY(MOD_RGUI, KC_PGDN),
+ [7] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_HOME),
+ [8] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_END),
+};
+
+```
+
+双角色键说明: https://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+
+
+## Mac OSX的弹出键
+`KC_EJCT` 键码在OSX可以使用 https://github.com/tmk/tmk_keyboard/issues/250
+似乎Windows10会忽略该键码,Linux/Xorg可以识别该键码但默认不映射。
+
+目前尚不清楚如何在真正的苹果键盘按出弹出键。HHKB使用`F20`用于弹出键(`Fn+f`),该功能在MAC模式有效但不保证与苹果弹出键码相符。
+
+
+## `action_util.c`中的 `weak_mods`和`real_mods`是什么
+___待改善___
+
+real_mods 用于保存实际(物理)修改键的实际状态。
+weak_mods 用于保存虚拟或临时修改键,它将不会影响实际修改键。
+
+以按下左侧Shift键然后输入ACTION_MODS_KEY(LSHIFT, KC_A)为例,
+
+在weak_mods时,
+* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT)
+* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods |= MOD_BIT(LSHIFT)
+* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): weak_mods &= ~MOD_BIT(LSHIFT)
+real_mods 还是保持在修改状态。
+
+在没有weak_mods时,
+* (1) 按下不抬起左Shift: real_mods |= MOD_BIT(LSHIFT)
+* (2) 按 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods |= MOD_BIT(LSHIFT)
+* (3) 抬起 ACTION_MODS_KEY(LSHIFT, KC_A): real_mods &= ~MOD_BIT(LSHIFT)
+此时real_mods失去‘实际左Shift’的状态。
+
+weak_mods和real_mods现已全部加入键盘数据包发送豪华套餐。
+https://github.com/tmk/tmk_core/blob/master/common/action_util.c#L57
diff --git a/docs/zh-cn/getting_started_getting_help.md b/docs/zh-cn/getting_started_getting_help.md
new file mode 100644
index 000000000000..cf770a77081c
--- /dev/null
+++ b/docs/zh-cn/getting_started_getting_help.md
@@ -0,0 +1,15 @@
+# 获得帮助
+
+有很多方法来获得关于QMK的帮助.
+
+## 实时聊天
+
+你可以在我们的主要[Discord服务器](https://discord.gg/Uq7gcHh)找到QMK的开发者和用户。有很多讨论固件的不同频道, 工具箱(Toolbox), 硬件,配置工具(configurator).
+
+## OLKB Subreddit
+
+QMK的官方论坛是[/r/olkb](https://reddit.com/r/olkb) 在[reddit.com](https://reddit.com)上.
+
+## Github的Issue
+
+你可以在GitHub上 [提出issue](https://github.com/qmk/qmk_firmware/issues).当您的问题需要长期讨论或调试时,这尤其方便。
diff --git a/docs/zh-cn/getting_started_github.md b/docs/zh-cn/getting_started_github.md
new file mode 100644
index 000000000000..0400eea6435b
--- /dev/null
+++ b/docs/zh-cn/getting_started_github.md
@@ -0,0 +1,59 @@
+# 如何在QMK中使用Github
+
+Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
+
+?> 本教程假设您已安装GitHub,并且您喜欢使用命令行工作。
+
+首先 [Github上的QMK页面](https://github.com/qmk/qmk_firmware), 您能看到右上方有个按钮写着"Fork":
+
+![从Github上分叉](http://i.imgur.com/8Toomz4.jpg)
+
+如果你是某组织成员,你将需要选择分叉到哪个账户。一般情况下, 你是想要分叉到你的私人账户下。当你完成分叉 (有时需要等一会), 点击"Clone or Download" 按钮:
+
+!从Github下载](http://i.imgur.com/N1NYcSz.jpg)
+
+你要选择 "HTTPS", 然后选择链接复制:
+
+![HTTPS链接](http://i.imgur.com/eGO0ohO.jpg)
+
+然后,在命令行输入`git clone `,然后粘贴你的链接:
+
+```
+user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
+Cloning into 'qmk_firmware'...
+remote: Counting objects: 46625, done.
+remote: Compressing objects: 100% (2/2), done.
+remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
+Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
+Resolving deltas: 100% (29362/29362), done.
+Checking out files: 100% (2799/2799), done.
+```
+
+现在你本地计算机有QMK的分叉了,你可以添加你的布局了, 为你的键盘编译并刷新固件吧。如果你觉得你的修改很不错, 你可以添加,提交,然后想你的分叉推出(pull)你的改变,像这样:
+
+```
+user@computer:~$ git add .
+user@computer:~$ git commit -m "adding my keymap"
+[master cccb1608] adding my keymap
+ 1 file changed, 1 insertion(+)
+ create mode 100644 keyboards/planck/keymaps/mine/keymap.c
+user@computer:~$ git push
+Counting objects: 1, done.
+Delta compression using up to 4 threads.
+Compressing objects: 100% (1/1), done.
+Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
+Total 1 (delta 1), reused 0 (delta 0)
+remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
+To https://github.com/whoeveryouare/qmk_firmware.git
+ + 20043e64...7da94ac5 master -> master
+```
+
+现在你的改动已经在你Github上的分支中了 - 如果你回到这 (`https://github.com/你的GitHub账户名/qmk_firmware`) ,你可以点击下方所示按钮创建 "New Pull Request":
+
+![新的 Pull Request](http://i.imgur.com/DxMHpJ8.jpg)
+
+现在你可以看到你所做的一切 - 如果看起来不错, 就可以点击 "Create Pull Request"定稿了:
+
+![创建Pull Request](http://i.imgur.com/Ojydlaj.jpg)
+
+提交后,我们会开跟你说你的改动,要求您进行更改, 并最终接受您的更改!感谢您为QMK做的贡献 :)
diff --git a/docs/zh-cn/getting_started_introduction.md b/docs/zh-cn/getting_started_introduction.md
new file mode 100644
index 000000000000..dcd0b72a5641
--- /dev/null
+++ b/docs/zh-cn/getting_started_introduction.md
@@ -0,0 +1,54 @@
+# 介绍
+
+本页解释了使用QMK项目所需的基本信息。它假定您能熟练使用Unix shell,但您不熟悉C语言也不熟悉使用make编译。
+
+## 基本QMK结构
+
+QMK是[Jun Wako](https://github.com/tmk)的[tmk_keyboard](https://github.com/tmk/tmk_keyboard)工程的一个分叉。经过更改的TMK原始代码放在`tmk` 文件夹中。 QMK增加的新东西可以在 `quantum` 文件夹中找到。 键盘项目可以在 `handwired`(手动飞线) 和 `keyboard`(PCB键盘)这两个文件夹找到。
+
+### 用户空间结构
+
+在`users`文件夹里面的目录是每个用户的目录。这个文件夹里面放的是用户们在不同键盘都能用到的代码。详见[用户空间特性](feature_userspace.md)
+
+### 键盘项目结构
+
+在`keyboards`文件夹和他的子文件夹`handwired`中就是各个键盘的项目了,比如`qmk_firmware/keyboards/clueboard`。内部结构与如下:
+
+* `keymaps/`: 可以构建的不同布局
+* `rules.mk`: 用来设置 "make" 命令默认选项的文件。别直接编辑这个文件,你应该使用具体某个布局的 `rules.mk`.
+* `config.h`: 用于设置默认编译选项的文件。别直接编辑这个文件, 你应该使用具体某个布局的 `config.h`.
+
+### 布局结构
+
+在各个布局的文件夹,你能找到以下文件。只有 `keymap.c` 是必要的, 如果其他文件找不到就会直接选择默认选项。
+
+* `config.h`: 配置布局的选项
+* `keymap.c`: 布局的全部代码, 必要文件
+* `rules.mk`: 使能的QMK特性
+* `readme.md`:介绍你的布局,告诉别人怎么使用,附上功能说明。请将图片上传到imgur等图床(译者注:imgur可能已被墙,为了方便国人访问,建议使用国内可以直接访问的图床)。
+
+# `config.h` 文件
+
+有三个重要的`config.h` 位置:
+
+* 键盘 (`/keyboards//config.h`)
+* 用户空间 (`/users//config.h`)
+* 布局 (`/keyboards//keymaps//config.h`)
+
+构建系统按照上述顺序自动获取配置文件。如果要覆盖由上一个 `config.h` 所做的设置,您需要首先为要更改的设置包含一些样板代码。
+
+```
+#pragma once
+```
+
+要覆盖上一个 `config.h` 所做的设置,你要先 `#undef` 然后再 `#define` 这个设置.
+
+样板代码和设置看起来像这样:
+
+```
+#pragma once
+
+// 像下面那样覆盖设置(MY_SETTING指的是你要覆盖的设置项)!
+#undef MY_SETTING
+#define MY_SETTING 4
+```
diff --git a/docs/zh-cn/newbs.md b/docs/zh-cn/newbs.md
new file mode 100644
index 000000000000..8c36b0d24b07
--- /dev/null
+++ b/docs/zh-cn/newbs.md
@@ -0,0 +1,23 @@
+# QMK菜鸟教程
+
+QMK是为你机械硬盘设计的的一个强大的开源固件。使用QMK可以很简单的让你的定制键盘变得强大。看完这篇文章,无论你是菜鸟还是大佬,都可以顺利的使用QMK来定制键盘。
+
+你是否为不知道你的键盘能不能运行QMK而苦恼? 如果你的机械键盘是你自己做的,那么这把键盘一般可以运行QMK。我们提供了[一大堆自制键盘](http://qmk.fm/keyboards/), 所以即便你的键盘不能运行QMK你也很容易能找到满足你需求的键盘。
+
+## 概览
+
+这个教程有7个主要部分:
+
+* [新手上路](newbs_getting_started.md)
+* [用命令行构建你的第一个固件](newbs_building_firmware.md)
+* [用在线界面构建你的第一个固件](newbs_building_firmware_configurator.md)
+* [刷新固件](newbs_flashing.md)
+* [测试和调试](newbs_testing_debugging.md)
+* [Git最佳实践](newbs_best_practices.md)
+* [其他学习资源](newbs_learn_more_resources.md)
+
+这份教程旨在帮助没有固件构建经验的人,也是根据该目的做出选择和建议。这些程序有很多替代方法,大部分替代我们都支持。如果你对完成一个任务有疑问,可以[向我们寻求帮助](getting_started_getting_help.md).
+
+## 其他资源
+
+* [Thomas Baart的 QMK基础博客](https://thomasbaart.nl/category/mechanical-keyboards/firmware/qmk/qmk-basics/) – 这是一个用户创建的博客,涵盖了为新手准备的使用QMK的基础知识。
diff --git a/docs/zh-cn/newbs_best_practices.md b/docs/zh-cn/newbs_best_practices.md
new file mode 100644
index 000000000000..fa58dc75e870
--- /dev/null
+++ b/docs/zh-cn/newbs_best_practices.md
@@ -0,0 +1,163 @@
+# 最佳实践
+
+## 或者说, "我应如何学会不再担心并开始爱上Git。"
+
+本文档旨在指导新手以最佳方式获得为QMK做出贡献的丝滑体验。我们将介绍为QMK做出贡献的过程,详细介绍使这项任务更容易的一些方法,然后我们将制造一些问题,来教你如何解决它们。
+
+本文假设了一些内容:
+
+1. 一有个GitHub账户, 并[创建qmk_firmware仓库分叉](getting_started_github.md)到你的帐户.
+2. 你已经[建立你的构建环境](newbs_getting_started.md?id=environment-setup).
+
+
+## 你分叉的主分支: 一直在上传,但不要提交
+
+十分推荐您在QMK开发过程中无论开发是否完成都要保持你的 `master` 分支更新,但是 ***一定不要*** 提交。相反,你应该在一个开发分叉中做出你所有修改并在开发时提交pull request。
+
+减少合并冲突的可能性 — 两个或多个用户同时编辑文件的同一部分的实例 — 保持 `master` 分支最新,并创建一个新的分支来开始新的开发。
+
+### 更新你的主分支
+
+保持你的 `master` 更新, 推荐你添加QMK Firmware仓库作为Git的远程仓库,想这么做的话, 你可以打开你的Git命令行接口然后输入:
+
+```
+git remote add upstream https://github.com/qmk/qmk_firmware.git
+```
+
+运行 `git remote -v`, 来确定这个仓库已经添加,以下是回显:
+
+```
+$ git remote -v
+origin https://github.com//qmk_firmware.git (fetch)
+origin https://github.com//qmk_firmware.git (push)
+upstream https://github.com/qmk/qmk_firmware.git (fetch)
+upstream https://github.com/qmk/qmk_firmware.git (push)
+```
+
+现在添加已完成,你可以用`git fetch upstream`来检查仓库的更新. 这会检索branches 和 tags — 统称为"refs" — 从QMK仓库, 也就是 `upstream`。我们可以比较我们的分叉和QMK的 `origin` 数据的不同。
+
+要更新你的分叉的主分支,请运行以下命令,在每行之后按Enter键:
+
+```
+git checkout master
+git fetch upstream
+git pull upstream master
+git push origin master
+```
+
+这回切换到你的`master` 分支, 检索你QMK仓库的refs, 下载当前QMK `master` 分支到你的电脑, 并上传到你的分叉.
+
+### 做改动
+
+你可以输入以下命令来创建一个新的分支来做改动:
+
+```
+git checkout -b dev_branch
+git push --set-upstream origin dev_branch
+```
+
+这回建立一个叫做 `dev_branch`的新分支, 检查一下, 然后想你的分叉保存分支. 使用 `--set-upstream` 参数来告诉git使用你的分叉并且当每次你对你的分支用`git push` 或 `git pull`时要使用`dev_branch`。 它仅需要在第一次push的时候使用;然后你就可以很安全的用 `git push` 或 `git pull`, 并不需要其他参数了。
+
+!> 使用 `git push`, 你可以用 `-u` 来代替 `--set-upstream` — `-u`是`--set-upstream`的简写。
+
+您可以将您的分支命名为您想要的任何名称,但建议将其命名为与您要进行的更改相关的内容。
+
+默认情况下 `git checkout -b` 在已经检出的分支上建立新的分支。您可以将新的分支建立在未检出的现有分支的基础上,方法是将现有分支的名称添加到命令:
+
+```
+git checkout -b dev_branch master
+```
+
+现在您已经有了一个开发分支,那么就打开您的文本编辑器并进行您需要做的任何更改。建议对您的分支进行许多小的提交;这样,任何引起问题的更改都可以在需要时更容易地跟踪和撤消。要进行更改,编辑并保存任何需要更新的文件,请将它们添加到Git的 *staging area* ,然后将它们提交到您的分支:
+
+```
+git add path/to/updated_file
+git commit -m "My commit message."
+```
+
+` git add`添加已更改到Git的*临时区域*也就是Git的“加载区域”的文件。其中包含使用 `git commit` 命令 *提交* 的并已经保存到仓库的更改。建议您使用描述性的提交消息,这样您就可以一目了然地知道更改了什么。
+
+!> 如果你修改了很多文件,但所有的文件都是同一个更改的一部分,你可以用 `git add .` 来添加当前目录中所有已更改的文件而不是单独添加每个文件.
+
+### 发布更改
+
+最后一步是将更改推送到您的分叉。 输入 `git push`来推送. 现在Git将`dev_branch`的当前状态发布到您的分叉。
+
+
+## 解决合并冲突
+
+有时,当您在某个分支中的工作需要很长时间才能完成时,其他人所做的更改与您在打开pull request时对该分支所做的更改相冲突。这称为*rebase* 即合并冲突,当多个人编辑同一文件的同一部分时会发生这种情况。
+
+### 重新调整您的更改
+
+*rebase*是Git的一种方法,它获取在某一点上应用的更改,撤销它们,然后将相同的更改应用到另一点。在合并冲突的情况下,您可以重新设置您的分支以获取在创建分支时和当前时间之间的那段时间所做的更改。
+
+运行以下命令来开始:
+
+```
+git fetch upstream
+git rev-list --left-right --count HEAD...upstream/master
+```
+
+ 这里的`git rev-list` 命令返回当前分支和qmk的主分支之间不同的提交数。我们首先运行`git fetch`,以确保我们有代表upstream仓库的refs。 `git rev-list` 命令的回显有两个数字:
+
+```
+$ git rev-list --left-right --count HEAD...upstream/master
+7 35
+```
+
+第一个数字表示自创建以来当前分支的提交数, 第二个数字是自创建当前分支以来对 `upstream/master` 进行的提交数, 因此, 当前分支中未记录变动。
+
+既然知道当前分支和upstream仓库的当前状态,我们可以开始一个rebase操作:
+
+```
+git rebase upstream/master
+```
+
+这就是让Git撤销当前分支上的提交,然后根据QMK的主分支重新应用它们。
+
+```
+$ git rebase upstream/master
+First, rewinding head to replay your work on top of it...
+Applying: Commit #1
+Using index info to reconstruct a base tree...
+M conflicting_file_1.txt
+Falling back to patching base and 3-way merge...
+Auto-merging conflicting_file_1.txt
+CONFLICT (content): Merge conflict in conflicting_file_1.txt
+error: Failed to merge in the changes.
+hint: Use 'git am --show-current-patch' to see the failed patch
+Patch failed at 0001 Commit #1
+
+Resolve all conflicts manually, mark them as resolved with
+"git add/rm ", then run "git rebase --continue".
+You can instead skip this commit: run "git rebase --skip".
+To abort and get back to the state before "git rebase", run "git rebase --abort".
+```
+
+这告诉我们有一个合并冲突,并给出带有冲突的文件的名称。在文本编辑器中打开冲突的文件,在该文件的某个位置,您会发现如下内容:
+
+```
+<<<<<<< HEAD
+For help with any issues, email us at support@webhost.us.
+=======
+Need help? Email support@webhost.us.
+>>>>>>> Commit #1
+```
+
+ `<<<<<<< HEAD`行标记合并冲突的开始, `>>>>>>> Commit #1` 行标记结束, 冲突选项被 `=======`分隔。`HEAD`那端的部分来自文件的qmk master版本,标记有commit消息的部分来自当前的分支持和提交。
+
+因为Git跟踪 *对文件的更改* 而不是直接跟踪文件的内容,所以如果Git在提交之前找不到文件中的文本,它将不知道如何编辑该文件。重新编辑文件将解决冲突。进行更改,然后保存文件。
+
+```
+Need help? Email support@webhost.us.
+```
+
+现在运行:
+
+```
+git add conflicting_file_1.txt
+git rebase --continue
+```
+
+Git记录对冲突文件的更改,并继续应用来自我们的分支的提交,直到它到达末尾。
diff --git a/docs/zh-cn/newbs_building_firmware.md b/docs/zh-cn/newbs_building_firmware.md
new file mode 100644
index 000000000000..31093f2543be
--- /dev/null
+++ b/docs/zh-cn/newbs_building_firmware.md
@@ -0,0 +1,81 @@
+# 构建第一个固件
+
+现在您已经建立了构建环境,就可以开始构建自定义固件了。对于本指南的这一部分,我们将在3个程序之间切换——文件管理器、文本编辑器和终端窗口。请保持所有3个程序打开,直到您完成并对键盘固件满意。
+
+如果您在按照指南第一部分的操作之后关闭并重新打开了终端窗口,请不要忘记输入“cd qmk_firmware”,来使您的终端位于正确的目录。
+
+## 导航到您的keymaps文件夹
+
+首先导航到键盘的 `keymaps` 文件夹.
+
+?> 如果您使用的是MacOS或Windows,可以使用以下命令轻松地打开keymaps文件夹。
+
+?> macOS:
+
+ open keyboards//keymaps
+
+?> Windows:
+
+ start .\\keyboards\\\\keymaps
+
+## 创建`default` 布局副本
+
+打开`keymaps`文件夹后,您将需要创建`default`文件夹的副本。我们强烈建议您将文件夹命名为与Github用户名相同的名称,但您也可以使用任何您想使用的名称,只要它只包含小写字母、数字和下划线字符。
+
+要自动执行此过程,您还可以选择运行`new_keymap.sh`脚本。
+
+导航到`qmk_firmware/util` 目录然后输入以下命令:
+
+```
+./new_keymap.sh
+```
+
+例如,一个名字叫ymzcdg的用户要创建1up60hse的布局,他需要输入
+
+```
+./new_keymap.sh 1upkeyboards/1up60hse ymzcdg
+```
+
+## 在你最钟爱的文本编辑器中打开`keymap.c`
+
+打开你的`keymap.c`. 在这个文件中,您可以找到控制键盘行为的结构。 在你的`keymap.c` 的顶部有一些让布局更易读的define和enum。在靠下的位置你会找到一行和下面这句很像的:
+
+ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+从这一行开始便是层列表。这行下面你会看到包括 `LAYOUT` 或 `KEYMAP`这两个词的几行, 从这些行开始就是层。在这一行下面是组成该特定层的键的列表。
+
+!> 编辑您的keymap文件时,注意不要添加或删除任何逗号。如果这样做,您将阻止您的固件编译,并且您可能不容易找出多余的或缺少的逗号在哪里。
+
+## 根据您的喜好自定义布局
+
+如何完成这一步骤完全取决于您。改变一直困扰着你的问题,或者完全重做所有的事情。如果您不需要全部图层,可以删除图层,或者将图层总数增加到32个。查看以下文档,了解可以在此处定义的内容:
+
+* [键码](keycodes.md)
+* [特性](features.md)
+* [问题与解答](faq.md)
+
+?> 当你明白布局是怎么工作时,您也要让每次改变尽可能小。一次改变很大在调试时找出问题会十分困难。
+
+## 构建你的固件
+
+完成对布局的更改后,您就要构建固件了。为此,请返回终端窗口并运行build命令:
+
+ make :
+
+例如,如果您的keymap名为“xyverz”,并且您正在为rev5 planck构建一个keymap,那么您将使用此命令:
+
+ make planck/rev5:xyverz
+
+在编译过程中,你将看到屏幕上有很多输出,通知您正在编译哪些文件他应该以与下文类似的输出结束:
+
+```
+Linking: .build/planck_rev5_xyverz.elf [OK]
+Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
+Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
+Checking file size of planck_rev5_xyverz.hex [OK]
+ * File size is fine - 18392/28672
+```
+
+## 刷新你的固件
+
+请移步 [Flashing Firmware](newbs_flashing.md) 来继续。
diff --git a/docs/zh-cn/newbs_flashing.md b/docs/zh-cn/newbs_flashing.md
new file mode 100644
index 000000000000..05a9eb55eef7
--- /dev/null
+++ b/docs/zh-cn/newbs_flashing.md
@@ -0,0 +1,307 @@
+# 刷新你的键盘
+
+现在您已经构建了一个自定义固件文件,那么您就需要刷新键盘了。
+
+## 用QMK工具箱刷新键盘
+
+刷新键盘的最简单方法是使用[QMK 工具箱](https://github.com/qmk/qmk_toolbox/releases).
+
+但是,QMK工具箱目前仅适用于Windows和MacOS。如果您使用的是Linux(或者只是希望从命令行刷新固件),则必须使用 [方法概述](newbs_flashing.md#flash-your-keyboard-from-the-command-line).
+
+### 将文件加载到QMK工具箱中
+
+首先打开QMK工具箱应用程序。您将要在访达或资源管理器中找到固件文件。您的键盘固件可能是两种格式之一`.hex`或`.bin`。qmk会尝试将键盘的相应文件复制到“qmk_firmware”根目录中。
+
+?> 如果您在Windows或MacOS上,可以使用以下命令轻松地在资源管理器或访达中打开当前固件文件夹。
+
+?> Windows:
+
+ start .
+
+?> macOS:
+
+ open .
+
+固件文件始终遵循此命名格式:
+
+ _.{bin,hex}
+
+例如,使用 `default` 布局的 `plank/rev5` 将使用以下名字:
+
+ planck_rev5_default.hex
+
+找到固件文件后,将其拖到QMK工具箱中的“Local file”框中,或单击“Open”并导航到固件文件的存储位置。
+
+### 将键盘置于DFU(Bootloader)模式
+
+要刷新自定义固件,您必须将键盘置于特殊的刷新模式。在此模式下,您将无法键入或使用键盘。在写入固件时,不要拔下键盘插头或以其他方式中断刷新过程,这一点非常重要。
+
+不同的键盘有不同的方式进入这种特殊模式。如果您的键盘当前运行的是QMK或TMK,而您没有得到特定的指示,请按顺序尝试以下操作:
+
+* 按住两个shift键并按 `Pause`
+* 按住两个shift键并按 `B`
+* 拔下键盘插头, 同时按住空格键和 `B` , 插上键盘然后等一会再放开按键
+* 按下PCB底部的 `RESET` 物理键
+* 找到PCB上标记有 `BOOT0` 或 `RESET`的金属点, 在插入PCB的同时短接它们
+
+成功后,您将在QMK工具箱中看到类似以下内容的消息:
+
+```
+*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
+*** DFU device connected
+```
+
+### 刷新你的键盘
+
+单击QMK工具箱中的 `Flash` 按钮。您将看到类似以下内容的输出:
+
+```
+*** Clueboard - Clueboard 66% HotSwap disconnected -- 0xC1ED:0x2390
+*** DFU device connected
+*** Attempting to flash, please don't remove device
+>>> dfu-programmer atmega32u4 erase --force
+ Erasing flash... Success
+ Checking memory from 0x0 to 0x6FFF... Empty.
+>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
+ Checking memory from 0x0 to 0x55FF... Empty.
+ 0% 100% Programming 0x5600 bytes...
+ [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+ 0% 100% Reading 0x7000 bytes...
+ [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+ Validating... Success
+ 0x5600 bytes written into 0x7000 bytes memory (76.79%).
+>>> dfu-programmer atmega32u4 reset
+
+*** DFU device disconnected
+*** Clueboard - Clueboard 66% HotSwap connected -- 0xC1ED:0x2390
+```
+
+## 使用命令行刷新键盘
+
+首先,您需要知道您的键盘使用的是哪个bootloader。通常是以下四个常见的bootloader。Pro-Micro 和 clones 使用 CATERINA, Teensy 使用 Halfkay, OLKB 键盘使用 QMK-DFU, 其他的atmega32u4芯片使用DFU。
+
+您可以在以下文章中了解更多关于bootloader[刷新指令和Bootloader信息](flashing.md)。
+
+如果您知道正在使用的bootloader是哪种,那么在编译固件时,可以向“make”命令里添加一些额外参数,以自动执行刷新过程。
+
+### DFU
+
+对于DFU引导加载程序,当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
+
+ make ::dfu
+
+例如,如果您的布局名为“xyverz”,并且您正在为rev5 planck构建一个布局,那么您可以使用此命令:
+
+ make planck/rev5:xyverz:dfu
+
+编译完成后,应输出以下内容:
+
+```
+Linking: .build/planck_rev5_xyverz.elf [OK]
+Creating load file for flashing: .build/planck_rev5_xyverz.hex [OK]
+Copying planck_rev5_xyverz.hex to qmk_firmware folder [OK]
+Checking file size of planck_rev5_xyverz.hex
+ * File size is fine - 18574/28672
+ ```
+
+到了这个时候, 构建脚本将每隔5秒查找一次DFU。它将重复以下操作,直到找到设备或将其取消。
+
+ dfu-programmer: no device present.
+ Error: Bootloader not found. Trying again in 5s.
+
+一旦出现以上回显,您将需要重置控制器。然后,它应该显示与以下类似的输出:
+
+```
+*** Attempting to flash, please don't remove device
+>>> dfu-programmer atmega32u4 erase --force
+ Erasing flash... Success
+ Checking memory from 0x0 to 0x6FFF... Empty.
+>>> dfu-programmer atmega32u4 flash /Users/skully/qmk_firmware/clueboard_66_hotswap_gen1_skully.hex
+ Checking memory from 0x0 to 0x55FF... Empty.
+ 0% 100% Programming 0x5600 bytes...
+ [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+ 0% 100% Reading 0x7000 bytes...
+ [>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] Success
+ Validating... Success
+ 0x5600 bytes written into 0x7000 bytes memory (76.79%).
+>>> dfu-programmer atmega32u4 reset
+```
+
+如果您对此有任何问题,您可能需要这样做:
+
+ sudo make ::dfu
+
+#### DFU命令
+
+有许多DFU命令可用于将固件下载到DFU设备:
+
+* `:dfu` - 这是正常选项,等待DFU设备可用,然后刷新固件。这将每隔5秒检查一次,以查看是否出现了DFU设备。
+* `:dfu-ee` - 这将刷新一个`eep`文件,而不是普通的十六进制文件。这很不常见。
+* `:dfu-split-left` - 这将刷新正常固件,就像默认选项 (`:dfu`)一样. 但是,这也会刷新“左侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_
+* `:dfu-split-right` - 这将刷新正常固件,就像默认选项(`:dfu`). 但是,这也会刷新“右侧”EEPROM文件,用于分割键盘。 _这是基于Elite C的键盘的推荐选择。_
+
+
+### Caterina
+
+对于Arduino板以及其克隆版来说(比如SparkFun和ProMicro), 准备好编译和刷新固件后,打开终端窗口并运行构建命令:
+
+ make ::avrdude
+
+比如, 你的布局叫"xyverz"你要创建一个rev2 Lets Split的布局,你要用以下命令:
+
+ make lets_split/rev2:xyverz:avrdude
+
+固件完成编译后,它将输出类似以下的内容:
+
+```
+Linking: .build/lets_split_rev2_xyverz.elf [OK]
+Creating load file for flashing: .build/lets_split_rev2_xyverz.hex [OK]
+Checking file size of lets_split_rev2_xyverz.hex [OK]
+ * File size is fine - 27938/28672
+Detecting USB port, reset your controller now..............
+```
+
+此时,复位,然后脚本将检测bootloader,然后刷新固件。输出应该像这样:
+
+```
+Detected controller on USB port at /dev/ttyS15
+
+Connecting to programmer: .
+Found programmer: Id = "CATERIN"; type = S
+ Software Version = 1.0; No Hardware Version given.
+Programmer supports auto addr increment.
+Programmer supports buffered memory access with buffersize=128 bytes.
+
+Programmer supports the following devices:
+ Device code: 0x44
+
+avrdude.exe: AVR device initialized and ready to accept instructions
+
+Reading | ################################################## | 100% 0.00s
+
+avrdude.exe: Device signature = 0x1e9587 (probably m32u4)
+avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
+ To disable this feature, specify the -D option.
+avrdude.exe: erasing chip
+avrdude.exe: reading input file "./.build/lets_split_rev2_xyverz.hex"
+avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
+avrdude.exe: writing flash (27938 bytes):
+
+Writing | ################################################## | 100% 2.40s
+
+avrdude.exe: 27938 bytes of flash written
+avrdude.exe: verifying flash memory against ./.build/lets_split_rev2_xyverz.hex:
+avrdude.exe: load data flash data from input file ./.build/lets_split_rev2_xyverz.hex:
+avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex auto detected as Intel Hex
+avrdude.exe: input file ./.build/lets_split_rev2_xyverz.hex contains 27938 bytes
+avrdude.exe: reading on-chip flash data:
+
+Reading | ################################################## | 100% 0.43s
+
+avrdude.exe: verifying ...
+avrdude.exe: 27938 bytes of flash verified
+
+avrdude.exe: safemode: Fuses OK (E:CB, H:D8, L:FF)
+
+avrdude.exe done. Thank you.
+```
+如果您对此有任何问题,您可能需要这样做:
+
+ sudo make ::avrdude
+
+
+此外,如果要刷新多个板,请使用以下命令:
+
+ make ::avrdude-loop
+
+当你完成了刷新后,你需要按下ctrl+c或者其他正确的按键来让你的操作系统终止循环。
+
+
+## HalfKay
+
+对于PJRC设备(Teensy),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
+
+ make ::teensy
+
+比如, 如果你的布局叫做"xyverz"你想创建Ergodox or Ergodox EZ的布局,你要使用以下命令:
+
+ make erdogox_ez:xyverz:teensy
+
+固件完成编译后,它将输出如下内容:
+
+```
+Linking: .build/ergodox_ez_xyverz.elf [OK]
+Creating load file for flashing: .build/ergodox_ez_xyverz.hex [OK]
+Checking file size of ergodox_ez_xyverz.hex [OK]
+ * File size is fine - 25584/32256
+ Teensy Loader, Command Line, Version 2.1
+Read "./.build/ergodox_ez_xyverz.hex": 25584 bytes, 79.3% usage
+Waiting for Teensy device...
+ (hint: press the reset button)
+ ```
+
+此时,复位键盘。完成后,您将看到如下输出:
+
+ ```
+ Found HalfKay Bootloader
+Read "./.build/ergodox_ez_xyverz.hex": 28532 bytes, 88.5% usage
+Programming............................................................................................................................................................................
+...................................................
+Booting
+```
+
+## STM32 (ARM)
+
+对于大多数ARM板(包括Proton C、Planck Rev 6和Preonic Rev 3),当您准备好编译和刷新固件时,打开终端窗口并运行构建命令:
+
+ make ::dfu-util
+
+例如,如果您的keymap被命名为“xyverz”,并且您正在为Planck Revision 6键盘构建一个布局,那么您需要使用以下命令,然后将键盘重新启动到bootloader(在完成编译之前):
+
+ make planck/rev6:xyverz:dfu-util
+
+固件完成编译后,它将输出如下内容:
+
+```
+Linking: .build/planck_rev6_xyverz.elf [OK]
+Creating binary load file for flashing: .build/planck_rev6_xyverz.bin [OK]
+Creating load file for flashing: .build/planck_rev6_xyverz.hex [OK]
+
+Size after:
+ text data bss dec hex filename
+ 0 41820 0 41820 a35c .build/planck_rev6_xyverz.hex
+
+Copying planck_rev6_xyverz.bin to qmk_firmware folder [OK]
+dfu-util 0.9
+
+Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
+Copyright 2010-2016 Tormod Volden and Stefan Schmidt
+This program is Free Software and has ABSOLUTELY NO WARRANTY
+Please report bugs to http://sourceforge.net/p/dfu-util/tickets/
+
+Invalid DFU suffix signature
+A valid DFU suffix will be required in a future dfu-util release!!!
+Opening DFU capable USB device...
+ID 0483:df11
+Run-time device DFU version 011a
+Claiming USB DFU Interface...
+Setting Alternate Setting #0 ...
+Determining device status: state = dfuERROR, status = 10
+dfuERROR, clearing status
+Determining device status: state = dfuIDLE, status = 0
+dfuIDLE, continuing
+DFU mode device DFU version 011a
+Device returned transfer size 2048
+DfuSe interface name: "Internal Flash "
+Downloading to address = 0x08000000, size = 41824
+Download [=========================] 100% 41824 bytes
+Download done.
+File downloaded successfully
+Transitioning to dfuMANIFEST state
+```
+
+## 试一试吧!
+
+恭喜您! 您的自定义固件已经刷写到您的键盘
+
+试一试,确保一切按你想的方式进行。我们写了[测试和调试](newbs_testing_debugging.md)来完善新手引导。 因此,请前往那里了解如何排除自定义功能的故障。
diff --git a/docs/zh-cn/newbs_getting_started.md b/docs/zh-cn/newbs_getting_started.md
new file mode 100644
index 000000000000..4e7850201d1f
--- /dev/null
+++ b/docs/zh-cn/newbs_getting_started.md
@@ -0,0 +1,102 @@
+# 介绍
+
+你的电脑键盘里面包含一个处理器, 这个处理器和你电脑里面的不太一样。这个处理器负责运行一些特殊的软件,这些软件可以监测按钮按下并将按钮处于按下还是释放状态的数据发送出去。QMK就是这样一种软件,即监测按钮被按下并发送这样的信息到作为主机的计算机上。当你创建了你的布局, 你也就创建了你的键盘运行的的可执行程序。
+
+QMK试图通过使简单的事情变得更简单,使使不可能成为可能来把大量的权力交给你。你不需要懂如何通过程序创建强大的布局——你只需要遵循简单的语法规则。
+
+# 新手上路
+
+在你能创建布局前,你要安装一些软件来建立你的开发环境。无论你想编译多少固件,这个操作都只需要进行一次。
+
+如果您更喜欢图形化界面, 请考虑使用在线工具[QMK配置器](https://config.qmk.fm)。 请参考 [使用在线GUI构建您的第一个固件](newbs_building_firmware_configurator.md)。
+
+
+## 下载软件
+
+### 文本编辑器
+
+你需要一个可以编辑 **纯文本** 文件的程序。在Windows上你可以用Notepad, 在Linux上使用gedit,这两个都是简单又实用的文本编辑工具。 在macOS上, 请小心使用 “文本编辑” 这个默认软件: 如果你不明确的选择_格式_菜单中的 _制作纯文本_ 的话文本将不会被保存为纯文本。
+
+你也可以下载并安装一个专用编辑器 [Sublime Text](https://www.sublimetext.com/) 或 [VS Code](https://code.visualstudio.com/)。 这大概是跨平台的最好方法了, 这些编辑器是专门为了编辑代码设计的。
+
+?>搞不清用哪种编辑器? Laurence Bradford 写了篇关于编辑器选择的文章 [a great introduction](https://learntocodewith.me/programming/basics/text-editors/)。
+
+### QMK 工具箱
+
+QMK 工具箱 是一种可选的Windows和macOS下的图形化工具,它可以对你的定制键盘进行编程和调试。你可能会发现它就是你能简单的刷新你的键盘固件并查看调试信息的稀世珍宝。
+
+[在这里下载最新发布版本](https://github.com/qmk/qmk_toolbox/releases/latest)
+
+* Windows用户: `qmk_toolbox.exe` (绿色版) 或 `qmk_toolbox_install.exe` (安装版)
+* macOS用户: `QMK.Toolbox.app.zip` (绿色版) or `QMK.Toolbox.pkg` (安装版)
+
+## 建立你的环境
+
+我们为了使QMK环境变得更容易建立已竭尽所能。你只需要准备Linux 或 Unix 环境, 然后让QMK安装剩余部分。
+
+?> 如果你从未使用过Linux/Unix的命令行,有一些你需要学习的基础概念和命令,以下资料将教会您使用QMK环境的必要能力:
+[必会Linux命令](https://www.guru99.com/must-know-linux-commands.html)
+[一些基本的Unix命令](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
+
+### Windows
+
+你需要安装MSYS2和Git.
+
+* 按照以下安装说明进行操作[MSYS2 主页](http://www.msys2.org)。
+* 关闭所有打开的MSYS2终端并打开新的MSYS2 MinGW 64-bit终端。
+* 使用以下命令安装Git: `pacman -S git`。
+
+### macOS
+
+你需要安装Homebrew。按照以下说明进行操作 [Homebrew 主页](https://brew.sh)。
+
+在Homebrew安装完成后, 继续 _同步QMK工程_. 这一步你将会通过运行一个脚本安装其他包。
+
+### Linux
+
+你将需要安装Git.你很有可能已经安装,但若你尚未安装,可以使用以下命令进行安装:
+
+* Debian / Ubuntu / Devuan: `apt-get install git`
+* Fedora / Red Hat / CentOS: `yum install git`
+* Arch: `pacman -S git`
+
+?> 无论你使用哪种平台,Docker都可以是你的选择[点这里进一步了解](getting_started_build_tools.md#docker)
+
+## 同步QMK工程
+
+当你建立Linux/Unix环境后,你就已经可以下载QMK了.下载时我们可以用Git来 "clone" QMK仓库. 打开一个终端或MSYS2 MinGW 窗口,在阅读剩余的指南时请保持窗口打开。在窗口里面运行以下两句命令:
+
+```shell
+git clone --recurse-submodules https://github.com/qmk/qmk_firmware.git
+cd qmk_firmware
+```
+
+?> 如果您已经知道[如何使用GitHub](getting_started_github.md), 我们推荐您创建您自己的分支并克隆。 如果您不知道这是什么, 您完全可以忽略这句无关紧要的话。
+
+QMK附带一个脚本,可帮助您设置剩余的所需内容.您可以通过输入此命令来运行它:
+
+ util/qmk_install.sh
+
+## 测试你的开发环境
+
+现在你的QMK环境已经建立完毕, 你可以为你的键盘创建固件了。开始试着创建键盘的默认固件吧。 你需要使用以下格式的命令创建固件:
+
+ make :default
+
+比如, 制作一个Clueboard 66%的固件,需要用:
+
+ make clueboard/66/rev3:default
+
+当完成后你要看到一些回显,尾部如下:
+
+```
+Linking: .build/clueboard_66_rev3_default.elf [OK]
+Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK]
+Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK]
+Checking file size of clueboard_66_rev3_default.hex [OK]
+ * The firmware size is fine - 26356/28672 (2316 bytes free)
+```
+
+# 创建你的布局
+
+现在你可以创建属于你自己的布局了! 请移步 [构建你的第一个固件](newbs_building_firmware.md)来继续。
diff --git a/docs/zh-cn/newbs_learn_more_resources.md b/docs/zh-cn/newbs_learn_more_resources.md
new file mode 100644
index 000000000000..ccb4fa326c45
--- /dev/null
+++ b/docs/zh-cn/newbs_learn_more_resources.md
@@ -0,0 +1,15 @@
+# 学习资源
+
+这些资源旨在让QMK社区的新成员更了解新成员文档中提供的信息。
+
+Git 资源:
+
+* [很好的通用教程](https://www.codecademy.com/learn/learn-git)
+* [从例子中学习Git游戏](https://learngitbranching.js.org/)
+* [了解有关GitHub的更多信息的Git资源](getting_started_github.md)
+* [专门针对QMK的Git资源](contributing.md)
+
+
+命令行资源:
+
+* [超棒的命令行通用教程](https://www.codecademy.com/learn/learn-the-command-line)
diff --git a/docs/zh-cn/newbs_testing_debugging.md b/docs/zh-cn/newbs_testing_debugging.md
new file mode 100644
index 000000000000..824f94b906f7
--- /dev/null
+++ b/docs/zh-cn/newbs_testing_debugging.md
@@ -0,0 +1,43 @@
+# 测试和调试
+
+使用自定义固件刷新键盘后,您就可以测试它了。如果您幸运,一切都会完美运行,但如果没有,这份文件将帮助您找出问题所在。
+
+## 测试
+
+测试键盘通常非常简单。按下每一个键并确保它发送的是您期望的键。甚至有一些程序可以帮助您确保没有任何键失效。
+
+注意:这些程序不是由QMK提供或认可的。
+
+* [Switch Hitter](https://elitekeyboards.com/switchhitter.php) (仅Windows)
+* [Keyboard Viewer](https://www.imore.com/how-use-keyboard-viewer-your-mac) (仅Mac)
+* [Keyboard Tester](http://www.keyboardtester.com) (网页版)
+* [Keyboard Checker](http://keyboardchecker.com) (网页版)
+
+## 使用QMK工具箱进行调试
+
+[QMK工具箱](https://github.com/qmk/qmk_toolbox) 将会在你的`rules.mk`中有`CONSOLE_ENABLE = yes`的时候显示你键盘发来的消息。 默认情况下,输出极为有限,不过您可以打开调试模式来增加输出信息量。使用你键盘布局中的`DEBUG`键码,使用 [命令](feature_command.md) 特性来使能调试模式, 或者向你的布局中添加以下代码。
+
+```c
+void keyboard_post_init_user(void) {
+ // Customise these values to desired behaviour
+ debug_enable=true;
+ debug_matrix=true;
+ //debug_keyboard=true;
+ //debug_mouse=true;
+}
+```
+
+
+
+## 发送您自己的调试消息
+
+有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`:
+
+ #include
+
+之后,您可以使用一些不同的打印功能:
+
+* `print("string")`: 打印简单字符串.
+* `uprintf("%s string", var)`: 打印格式化字符串
+* `dprint("string")`: 仅在调试模式使能时打印简单字符串
+* `dprintf("%s string", var)`: 仅在调试模式使能时打印格式化字符串
diff --git a/drivers/arm/i2c_master.c b/drivers/arm/i2c_master.c
index 385bd97cb889..7369398cc4b9 100644
--- a/drivers/arm/i2c_master.c
+++ b/drivers/arm/i2c_master.c
@@ -42,44 +42,57 @@ static const I2CConfig i2cconfig = {
0
};
+static i2c_status_t chibios_to_qmk(const msg_t* status) {
+ switch (*status) {
+ case I2C_NO_ERROR:
+ return I2C_STATUS_SUCCESS;
+ case I2C_TIMEOUT:
+ return I2C_STATUS_TIMEOUT;
+ // I2C_BUS_ERROR, I2C_ARBITRATION_LOST, I2C_ACK_FAILURE, I2C_OVERRUN, I2C_PEC_ERROR, I2C_SMB_ALERT
+ default:
+ return I2C_STATUS_ERROR;
+ }
+}
+
__attribute__ ((weak))
void i2c_init(void)
{
// Try releasing special pins for a short time
- palSetPadMode(GPIOB, 6, PAL_MODE_INPUT);
- palSetPadMode(GPIOB, 7, PAL_MODE_INPUT);
+ palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_INPUT);
+ palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_INPUT);
chThdSleepMilliseconds(10);
-
- palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
- palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
+
+ palSetPadMode(I2C1_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
+ palSetPadMode(I2C1_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN);
//i2cInit(); //This is invoked by halInit() so no need to redo it.
}
-// This is usually not needed
-uint8_t i2c_start(uint8_t address)
+i2c_status_t i2c_start(uint8_t address)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return 0;
+ return I2C_STATUS_SUCCESS;
}
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout)
{
i2c_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_receive(uint8_t address, 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_address = address;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ msg_t status = i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, 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_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
@@ -91,19 +104,19 @@ uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t l
}
complete_packet[0] = regaddr;
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, 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_address = devaddr;
i2cStart(&I2C_DRIVER, &i2cconfig);
- return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ msg_t status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout));
+ return chibios_to_qmk(&status);
}
-// This is usually not needed. It releases the driver to allow pins to become GPIO again.
-uint8_t i2c_stop(uint16_t timeout)
+void i2c_stop(void)
{
i2cStop(&I2C_DRIVER);
- return 0;
}
diff --git a/drivers/arm/i2c_master.h b/drivers/arm/i2c_master.h
index 392760328f78..a15f1702dd30 100644
--- a/drivers/arm/i2c_master.h
+++ b/drivers/arm/i2c_master.h
@@ -26,15 +26,31 @@
#include "ch.h"
#include
+#ifndef I2C1_BANK
+ #define I2C1_BANK GPIOB
+#endif
+#ifndef I2C1_SCL
+ #define I2C1_SCL 6
+#endif
+#ifndef I2C1_SDA
+ #define I2C1_SDA 7
+#endif
+
#ifndef I2C_DRIVER
#define I2C_DRIVER I2CD1
#endif
+typedef int16_t i2c_status_t;
+
+#define I2C_STATUS_SUCCESS (0)
+#define I2C_STATUS_ERROR (-1)
+#define I2C_STATUS_TIMEOUT (-2)
+
void i2c_init(void);
-uint8_t i2c_start(uint8_t address);
-uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
-uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-uint8_t i2c_stop(uint16_t timeout);
+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_transmit_receive(uint8_t address, uint8_t * tx_body, uint16_t tx_length, uint8_t * rx_body, uint16_t rx_length);
+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_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
+void i2c_stop(void);
diff --git a/drivers/avr/apa102.c b/drivers/avr/apa102.c
new file mode 100755
index 000000000000..55a0d5777885
--- /dev/null
+++ b/drivers/avr/apa102.c
@@ -0,0 +1,101 @@
+/*
+* APA102 lib V1.0a
+*
+* Controls APA102 RGB-LEDs
+* Author: Mikkel (Duckle29 on github)
+*
+* Dec 22th, 2017 v1.0a Initial Version
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 2 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General 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 "apa102.h"
+#include
+#include
+#include
+#include "debug.h"
+
+// Setleds for standard RGB
+void inline apa102_setleds(LED_TYPE *ledarray, uint16_t leds){
+ apa102_setleds_pin(ledarray,leds, _BV(RGB_DI_PIN & 0xF), _BV(RGB_CLK_PIN & 0xF));
+}
+
+void static inline apa102_setleds_pin(LED_TYPE *ledarray, uint16_t leds, uint8_t pinmask_DI, uint8_t pinmask_CLK){
+ pinMode(RGB_DI_PIN, PinDirectionOutput);
+ pinMode(RGB_CLK_PIN, PinDirectionOutput);
+
+ apa102_send_array((uint8_t*)ledarray,leds)
+}
+
+void apa102_send_array(uint8_t *data, uint16_t leds){ // Data is struct of 3 bytes. RGB - leds is number of leds in data
+ apa102_start_frame();
+ while(leds--){
+ apa102_send_frame(0xFF000000 | (data->b << 16) | (data->g << 8) | data->r);
+ data++;
+ }
+ apa102_end_frame(leds);
+}
+
+void apa102_send_frame(uint32_t frame){
+ for(uint32_t i=0xFF; i>0;){
+ apa102_send_byte(frame & i);
+ i = i << 8;
+ }
+}
+
+void apa102_start_frame(){
+ apa102_send_frame(0);
+}
+
+void apa102_end_frame(uint16_t leds)
+{
+ // This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
+ // and adapted. The code is MIT licensed. I think thats compatible?
+
+ // We need to send some more bytes to ensure that all the LEDs in the
+ // chain see their new color and start displaying it.
+ //
+ // The data stream seen by the last LED in the chain will be delayed by
+ // (count - 1) clock edges, because each LED before it inverts the clock
+ // line and delays the data by one clock edge. Therefore, to make sure
+ // the last LED actually receives the data we wrote, the number of extra
+ // edges we send at the end of the frame must be at least (count - 1).
+ // For the APA102C, that is sufficient.
+ //
+ // The SK9822 only updates after it sees 32 zero bits followed by one more
+ // rising edge. To avoid having the update time depend on the color of
+ // the last LED, we send a dummy 0xFF byte. (Unfortunately, this means
+ // that partial updates of the beginning of an LED strip are not possible;
+ // the LED after the last one you are trying to update will be black.)
+ // After that, to ensure that the last LED in the chain sees 32 zero bits
+ // and a rising edge, we need to send at least 65 + (count - 1) edges. It
+ // is sufficent and simpler to just send (5 + count/16) bytes of zeros.
+ //
+ // We are ignoring the specification for the end frame in the APA102/SK9822
+ // datasheets because it does not actually ensure that all the LEDs will
+ // start displaying their new colors right away.
+
+ apa102_send_byte(0xFF);
+ for (uint16_t i = 0; i < 5 + leds / 16; i++){
+ apa102_send_byte(0);
+ }
+}
+
+void apa102_send_byte(uint8_t byte){
+ uint8_t i;
+ for (i = 0; i < 8; i++){
+ digitalWrite(RGB_DI_PIN, !!(byte & (1 << (7-i)));
+ digitalWrite(RGB_CLK_PIN, PinLevelHigh);
+ }
+}
diff --git a/drivers/avr/apa102.h b/drivers/avr/apa102.h
new file mode 100755
index 000000000000..e7d7c3684f40
--- /dev/null
+++ b/drivers/avr/apa102.h
@@ -0,0 +1,46 @@
+/*
+ * light weight WS2812 lib include
+ *
+ * Version 2.3 - Nev 29th 2015
+ * Author: Tim (cpldcpu@gmail.com)
+ *
+ * Please do not change this file! All configuration is handled in "ws2812_config.h"
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "rgblight_types.h"
+
+
+/* User Interface
+ *
+ * Input:
+ * ledarray: An array of GRB data describing the LED colors
+ * number_of_leds: The number of LEDs to write
+ * pinmask (optional): Bitmask describing the output bin. e.g. _BV(PB0)
+ *
+ * The functions will perform the following actions:
+ * - Set the data-out pin as output
+ * - Send out the LED data
+ * - Wait 50�s to reset the LEDs
+ */
+
+void apa102_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
+void apa102_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
+void apa102_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds);
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index 19bae33e9f17..a7364bae08f7 100755
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -7,43 +7,56 @@
#include "i2c_master.h"
#include "timer.h"
+#include "wait.h"
#ifndef F_SCL
-#define F_SCL 400000UL // SCL frequency
+# define F_SCL 400000UL // SCL frequency
#endif
#define Prescaler 1
-#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16 ) / 2)
+#define TWBR_val ((((F_CPU / F_SCL) / Prescaler) - 16) / 2)
-void i2c_init(void)
-{
- TWSR = 0; /* no prescaler */
+void i2c_init(void) {
+ TWSR = 0; /* no prescaler */
TWBR = (uint8_t)TWBR_val;
+
+ #ifdef __AVR_ATmega32A__
+ // set pull-up resistors on I2C bus pins
+ PORTC |= 0b11;
+
+ // enable TWI (two-wire interface)
+ TWCR |= (1 << TWEN);
+
+ // enable TWI interrupt and slave address ACK
+ TWCR |= (1 << TWIE);
+ TWCR |= (1 << TWEA);
+ #endif
}
-i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
-{
+i2c_status_t i2c_start(uint8_t address, uint16_t timeout) {
// reset TWI control register
TWCR = 0;
// transmit START condition
- TWCR = (1<= timeout)) {
return I2C_STATUS_TIMEOUT;
}
}
// check if the start condition was successfully transmitted
- if(((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)){ return I2C_STATUS_ERROR; }
+ if (((TW_STATUS & 0xF8) != TW_START) && ((TW_STATUS & 0xF8) != TW_REP_START)) {
+ return I2C_STATUS_ERROR;
+ }
// load slave address into data register
TWDR = address;
// start transmission of address
- TWCR = (1<= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -51,38 +64,39 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout)
// check if the device has acknowledged the READ / WRITE mode
uint8_t twst = TW_STATUS & 0xF8;
- if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return I2C_STATUS_ERROR;
+ if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) {
+ return I2C_STATUS_ERROR;
+ }
return I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_write(uint8_t data, uint16_t timeout)
-{
+i2c_status_t i2c_write(uint8_t data, uint16_t timeout) {
// load data into data register
TWDR = data;
// start transmission of data
- TWCR = (1<= timeout)) {
return I2C_STATUS_TIMEOUT;
}
}
- if( (TW_STATUS & 0xF8) != TW_MT_DATA_ACK ){ return I2C_STATUS_ERROR; }
+ if ((TW_STATUS & 0xF8) != TW_MT_DATA_ACK) {
+ return I2C_STATUS_ERROR;
+ }
return I2C_STATUS_SUCCESS;
}
-int16_t i2c_read_ack(uint16_t timeout)
-{
-
+int16_t i2c_read_ack(uint16_t timeout) {
// start TWI module and acknowledge data after reception
- TWCR = (1<= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -92,14 +106,12 @@ int16_t i2c_read_ack(uint16_t timeout)
return TWDR;
}
-int16_t i2c_read_nack(uint16_t timeout)
-{
-
+int16_t i2c_read_nack(uint16_t timeout) {
// start receiving without acknowledging reception
- TWCR = (1<= timeout)) {
return I2C_STATUS_TIMEOUT;
}
@@ -109,115 +121,89 @@ int16_t i2c_read_nack(uint16_t timeout)
return TWDR;
}
-i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout)
-{
+i2c_status_t i2c_transmit(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < length; i++) {
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
status = i2c_write(data[i], timeout);
- if (status) return status;
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return status;
}
-i2c_status_t i2c_receive(uint8_t address, 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 status = i2c_start(address | I2C_READ, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < (length-1); i++) {
+ for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) {
status = i2c_read_ack(timeout);
if (status >= 0) {
data[i] = status;
- } else {
- return status;
}
}
- status = i2c_read_nack(timeout);
- if (status >= 0 ) {
- data[(length-1)] = status;
- } else {
- return status;
+ if (status >= 0) {
+ status = i2c_read_nack(timeout);
+ if (status >= 0) {
+ data[(length - 1)] = status;
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return (status < 0) ? status : I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, 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 status = i2c_start(devaddr | 0x00, timeout);
- if (status) return status;
+ if (status >= 0) {
+ status = i2c_write(regaddr, timeout);
- status = i2c_write(regaddr, timeout);
- if (status) return status;
-
- for (uint16_t i = 0; i < length; i++) {
- status = i2c_write(data[i], timeout);
- if (status) return status;
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
+ status = i2c_write(data[i], timeout);
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ 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 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) return status;
+ if (status < 0) {
+ goto error;
+ }
status = i2c_write(regaddr, timeout);
- if (status) return status;
-
- status = i2c_stop(timeout);
- if (status) return status;
+ if (status < 0) {
+ goto error;
+ }
status = i2c_start(devaddr | 0x01, timeout);
- if (status) return status;
- for (uint16_t i = 0; i < (length-1); i++) {
+ for (uint16_t i = 0; i < (length - 1) && status >= 0; i++) {
status = i2c_read_ack(timeout);
if (status >= 0) {
data[i] = status;
- } else {
- return status;
}
}
- status = i2c_read_nack(timeout);
- if (status >= 0 ) {
- data[(length-1)] = status;
- } else {
- return status;
+ if (status >= 0) {
+ status = i2c_read_nack(timeout);
+ if (status >= 0) {
+ data[(length - 1)] = status;
+ }
}
- status = i2c_stop(timeout);
- if (status) return status;
+error:
+ i2c_stop();
- return I2C_STATUS_SUCCESS;
+ return (status < 0) ? status : I2C_STATUS_SUCCESS;
}
-i2c_status_t i2c_stop(uint16_t timeout)
-{
+void i2c_stop(void) {
// transmit STOP condition
- TWCR = (1<= timeout)) {
- return I2C_STATUS_TIMEOUT;
- }
- }
-
- return I2C_STATUS_SUCCESS;
+ TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO);
}
diff --git a/drivers/avr/i2c_master.h b/drivers/avr/i2c_master.h
index 89c64599c51a..b4613115d9a1 100755
--- a/drivers/avr/i2c_master.h
+++ b/drivers/avr/i2c_master.h
@@ -22,10 +22,10 @@ i2c_status_t i2c_start(uint8_t address, uint16_t timeout);
i2c_status_t i2c_write(uint8_t data, uint16_t timeout);
int16_t i2c_read_ack(uint16_t timeout);
int16_t i2c_read_nack(uint16_t timeout);
-i2c_status_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, 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, 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_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
-i2c_status_t i2c_stop(uint16_t timeout);
+void i2c_stop(void);
-#endif // I2C_MASTER_H
\ No newline at end of file
+#endif // I2C_MASTER_H
diff --git a/drivers/avr/i2c_slave.c b/drivers/avr/i2c_slave.c
index 18a29a45a5a4..dbb9fb0df349 100755
--- a/drivers/avr/i2c_slave.c
+++ b/drivers/avr/i2c_slave.c
@@ -16,7 +16,7 @@ static volatile bool slave_has_register_set = false;
void i2c_slave_init(uint8_t address){
// load address into TWI address register
- TWAR = (address << 1);
+ TWAR = address;
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
TWCR = (1 << TWIE) | (1 << TWEA) | (1 << TWINT) | (1 << TWEN);
}
diff --git a/drivers/avr/ws2812.c b/drivers/avr/ws2812.c
index 5bd837ec7542..7c3cb5174df0 100644
--- a/drivers/avr/ws2812.c
+++ b/drivers/avr/ws2812.c
@@ -27,6 +27,12 @@
#include
#include "debug.h"
+#if !defined(LED_ARRAY) && defined(RGB_MATRIX_ENABLE)
+// LED color buffer
+LED_TYPE led[DRIVER_LED_TOTAL];
+ #define LED_ARRAY led
+#endif
+
#ifdef RGBW_BB_TWI
// Port for the I2C
@@ -141,6 +147,25 @@ unsigned char I2C_Write(unsigned char c)
#endif
+#ifdef RGB_MATRIX_ENABLE
+// Set an led in the buffer to a color
+void inline ws2812_setled(int i, uint8_t r, uint8_t g, uint8_t b)
+{
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+}
+
+void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b)
+{
+ for (int i = 0; i < sizeof(led)/sizeof(led[0]); i++) {
+ led[i].r = r;
+ led[i].g = g;
+ led[i].b = b;
+ }
+}
+#endif
+
// Setleds for standard RGB
void inline ws2812_setleds(LED_TYPE *ledarray, uint16_t leds)
{
diff --git a/drivers/avr/ws2812.h b/drivers/avr/ws2812.h
index 1f9299ffb539..ecb1dc4d18c8 100644
--- a/drivers/avr/ws2812.h
+++ b/drivers/avr/ws2812.h
@@ -30,7 +30,6 @@
#include "rgblight_types.h"
-
/* User Interface
*
* Input:
@@ -43,6 +42,10 @@
* - Send out the LED data
* - Wait 50�s to reset the LEDs
*/
+#ifdef RGB_MATRIX_ENABLE
+void ws2812_setled (int index, uint8_t r, uint8_t g, uint8_t b);
+void ws2812_setled_all (uint8_t r, uint8_t g, uint8_t b);
+#endif
void ws2812_setleds (LED_TYPE *ledarray, uint16_t number_of_leds);
void ws2812_setleds_pin (LED_TYPE *ledarray, uint16_t number_of_leds,uint8_t pinmask);
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c
index 97ca292b9b1a..215e6be3e7cb 100644
--- a/drivers/haptic/DRV2605L.c
+++ b/drivers/haptic/DRV2605L.c
@@ -21,7 +21,7 @@
#include
-uint8_t DRV2605L_transfer_buffer[20];
+uint8_t DRV2605L_transfer_buffer[2];
uint8_t DRV2605L_tx_register[0];
uint8_t DRV2605L_read_buffer[0];
uint8_t DRV2605L_read_register;
@@ -34,6 +34,11 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
}
uint8_t DRV_read(uint8_t regaddress) {
+#ifdef __AVR__
+ i2c_readReg(DRV2605L_BASE_ADDRESS << 1,
+ regaddress, DRV2605L_read_buffer, 1, 100);
+ DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
+#else
DRV2605L_tx_register[0] = regaddress;
if (MSG_OK != i2c_transmit_receive(DRV2605L_BASE_ADDRESS << 1,
DRV2605L_tx_register, 1,
@@ -42,14 +47,13 @@ uint8_t DRV_read(uint8_t regaddress) {
printf("err reading reg \n");
}
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
+#endif
return DRV2605L_read_register;
}
void DRV_init(void)
{
i2c_init();
- i2c_start(DRV2605L_BASE_ADDRESS);
-
/* 0x07 sets DRV2605 into calibration mode */
DRV_write(DRV_MODE,0x07);
@@ -104,21 +108,17 @@ void DRV_init(void)
C4_SET.Bits.C4_AUTO_CAL_TIME = AUTO_CAL_TIME;
DRV_write(DRV_CTRL_4, (uint8_t) C4_SET.Byte);
DRV_write(DRV_LIB_SELECTION,LIB_SELECTION);
- //start autocalibration
+
DRV_write(DRV_GO, 0x01);
/* 0x00 sets DRV2605 out of standby and to use internal trigger
* 0x01 sets DRV2605 out of standby and to use external trigger */
DRV_write(DRV_MODE,0x00);
-
- /* 0x06: LRA library */
- DRV_write(DRV_WAVEFORM_SEQ_1, 0x01);
-
- /* 0xB9: LRA, 4x brake factor, medium gain, 7.5x back EMF
- * 0x39: ERM, 4x brake factor, medium gain, 1.365x back EMF */
-
- /* TODO: setup auto-calibration as part of initiation */
+//Play greeting sequence
+ DRV_write(DRV_GO, 0x00);
+ DRV_write(DRV_WAVEFORM_SEQ_1, DRV_GREETING);
+ DRV_write(DRV_GO, 0x01);
}
void DRV_pulse(uint8_t sequence)
diff --git a/drivers/haptic/DRV2605L.h b/drivers/haptic/DRV2605L.h
index de9d294e9d13..836e9cbcd281 100644
--- a/drivers/haptic/DRV2605L.h
+++ b/drivers/haptic/DRV2605L.h
@@ -31,13 +31,6 @@
#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
#endif
-#ifndef RATED_VOLTAGE
-#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
-#ifndef V_PEAK
-#define V_PEAK 2.8
-#endif
-#endif
-
/* LRA specific settings */
#if FB_ERM_LRA == 1
#ifndef V_RMS
@@ -49,6 +42,16 @@
#ifndef F_LRA
#define F_LRA 205
#endif
+#ifndef RATED_VOLTAGE
+#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
+#endif
+#endif
+
+#ifndef RATED_VOLTAGE
+#define RATED_VOLTAGE 2 /* 2v as safe range in case device voltage is not set */
+#endif
+#ifndef V_PEAK
+#define V_PEAK 2.8
#endif
/* Library Selection */
@@ -60,6 +63,13 @@
#endif
#endif
+#ifndef DRV_GREETING
+#define DRV_GREETING alert_750ms
+#endif
+#ifndef DRV_MODE_DEFAULT
+#define DRV_MODE_DEFAULT strong_click1
+#endif
+
/* Control 1 register settings */
#ifndef DRIVE_TIME
#define DRIVE_TIME 25
@@ -162,7 +172,6 @@ void DRV_write(const uint8_t drv_register, const uint8_t settings);
uint8_t DRV_read(const uint8_t regaddress);
void DRV_pulse(const uint8_t sequence);
-
typedef enum DRV_EFFECT{
clear_sequence = 0,
strong_click = 1,
@@ -288,6 +297,7 @@ typedef enum DRV_EFFECT{
smooth_hum3_30 = 121,
smooth_hum4_20 = 122,
smooth_hum5_10 = 123,
+ drv_effect_max = 124,
} DRV_EFFECT;
/* Register bit array unions */
diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c
new file mode 100644
index 000000000000..a94f05565c22
--- /dev/null
+++ b/drivers/haptic/haptic.c
@@ -0,0 +1,248 @@
+/* Copyright 2019 ishtob
+ * Driver for haptic feedback written for 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 .
+ */
+#include "haptic.h"
+#include "eeconfig.h"
+#include "progmem.h"
+#include "debug.h"
+#ifdef DRV2605L
+#include "DRV2605L.h"
+#endif
+#ifdef SOLENOID_ENABLE
+#include "solenoid.h"
+#endif
+
+haptic_config_t haptic_config;
+
+void haptic_init(void) {
+ debug_enable = 1; //Debug is ON!
+ if (!eeconfig_is_enabled()) {
+ eeconfig_init();
+ }
+ haptic_config.raw = eeconfig_read_haptic();
+ if (haptic_config.mode < 1){
+ haptic_config.mode = 1;
+ }
+ if (!haptic_config.mode){
+ dprintf("No haptic config found in eeprom, setting default configs\n");
+ haptic_reset();
+ }
+ #ifdef SOLENOID_ENABLE
+ solenoid_setup();
+ dprintf("Solenoid driver initialized\n");
+ #endif
+ #ifdef DRV2605L
+ DRV_init();
+ dprintf("DRV2605 driver initialized\n");
+ #endif
+ eeconfig_debug_haptic();
+}
+
+void haptic_task(void) {
+ #ifdef SOLENOID_ENABLE
+ solenoid_check();
+ #endif
+}
+
+void eeconfig_debug_haptic(void) {
+ dprintf("haptic_config eprom\n");
+ dprintf("haptic_config.enable = %d\n", haptic_config.enable);
+ dprintf("haptic_config.mode = %d\n", haptic_config.mode);
+}
+
+void haptic_enable(void) {
+ haptic_config.enable = 1;
+ xprintf("haptic_config.enable = %u\n", haptic_config.enable);
+ eeconfig_update_haptic(haptic_config.raw);
+}
+
+void haptic_disable(void) {
+ haptic_config.enable = 0;
+ xprintf("haptic_config.enable = %u\n", haptic_config.enable);
+ eeconfig_update_haptic(haptic_config.raw);
+}
+
+void haptic_toggle(void) {
+if (haptic_config.enable) {
+ haptic_disable();
+ } else {
+ haptic_enable();
+ }
+ eeconfig_update_haptic(haptic_config.raw);
+}
+
+void haptic_feedback_toggle(void){
+ haptic_config.feedback++;
+ if (haptic_config.feedback >= HAPTIC_FEEDBACK_MAX)
+ haptic_config.feedback = KEY_PRESS;
+ xprintf("haptic_config.feedback = %u\n", !haptic_config.feedback);
+ eeconfig_update_haptic(haptic_config.raw);
+}
+
+void haptic_buzz_toggle(void) {
+ bool buzz_stat = !haptic_config.buzz;
+ haptic_config.buzz = buzz_stat;
+ haptic_set_buzz(buzz_stat);
+}
+
+void haptic_mode_increase(void) {
+ uint8_t mode = haptic_config.mode + 1;
+ #ifdef DRV2605L
+ if (haptic_config.mode >= drv_effect_max) {
+ mode = 1;
+ }
+ #endif
+ haptic_set_mode(mode);
+}
+
+void haptic_mode_decrease(void) {
+ uint8_t mode = haptic_config.mode -1;
+ #ifdef DRV2605L
+ if (haptic_config.mode < 1) {
+ mode = (drv_effect_max - 1);
+ }
+ #endif
+ haptic_set_mode(mode);
+}
+
+void haptic_dwell_increase(void) {
+ uint8_t dwell = haptic_config.dwell + 1;
+ #ifdef SOLENOID_ENABLE
+ if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
+ dwell = 1;
+ }
+ solenoid_set_dwell(dwell);
+ #endif
+ haptic_set_dwell(dwell);
+}
+
+void haptic_dwell_decrease(void) {
+ uint8_t dwell = haptic_config.dwell -1;
+ #ifdef SOLENOID_ENABLE
+ if (haptic_config.dwell < SOLENOID_MIN_DWELL) {
+ dwell = SOLENOID_MAX_DWELL;
+ }
+ solenoid_set_dwell(dwell);
+ #endif
+ haptic_set_dwell(dwell);
+}
+
+void haptic_reset(void){
+ haptic_config.enable = true;
+ uint8_t feedback = HAPTIC_FEEDBACK_DEFAULT;
+ haptic_config.feedback = feedback;
+ #ifdef DRV2605L
+ uint8_t mode = HAPTIC_MODE_DEFAULT;
+ haptic_config.mode = mode;
+ #endif
+ #ifdef SOLENOID_ENABLE
+ uint8_t dwell = SOLENOID_DEFAULT_DWELL;
+ haptic_config.dwell = dwell;
+ #endif
+ eeconfig_update_haptic(haptic_config.raw);
+ xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
+ xprintf("haptic_config.mode = %u\n", haptic_config.mode);
+}
+
+void haptic_set_feedback(uint8_t feedback) {
+ haptic_config.feedback = feedback;
+ eeconfig_update_haptic(haptic_config.raw);
+ xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
+}
+
+void haptic_set_mode(uint8_t mode) {
+ haptic_config.mode = mode;
+ eeconfig_update_haptic(haptic_config.raw);
+ xprintf("haptic_config.mode = %u\n", haptic_config.mode);
+}
+
+void haptic_set_buzz(uint8_t buzz) {
+ haptic_config.buzz = buzz;
+ eeconfig_update_haptic(haptic_config.raw);
+ xprintf("haptic_config.buzz = %u\n", haptic_config.buzz);
+}
+
+void haptic_set_dwell(uint8_t dwell) {
+ haptic_config.dwell = dwell;
+ eeconfig_update_haptic(haptic_config.raw);
+ xprintf("haptic_config.dwell = %u\n", haptic_config.dwell);
+}
+
+uint8_t haptic_get_mode(void) {
+ if (!haptic_config.enable){
+ return false;
+ }
+ return haptic_config.mode;
+}
+
+uint8_t haptic_get_feedback(void) {
+ if (!haptic_config.enable){
+ return false;
+ }
+ return haptic_config.feedback;
+}
+
+uint8_t haptic_get_dwell(void) {
+ if (!haptic_config.enable){
+ return false;
+ }
+ return haptic_config.dwell;
+}
+
+void haptic_play(void) {
+ #ifdef DRV2605L
+ uint8_t play_eff = 0;
+ play_eff = haptic_config.mode;
+ DRV_pulse(play_eff);
+ #endif
+ #ifdef SOLENOID_ENABLE
+ solenoid_fire();
+ #endif
+}
+
+bool process_haptic(uint16_t keycode, keyrecord_t *record) {
+ if (keycode == HPT_ON && record->event.pressed) { haptic_enable(); }
+ if (keycode == HPT_OFF && record->event.pressed) { haptic_disable(); }
+ if (keycode == HPT_TOG && record->event.pressed) { haptic_toggle(); }
+ if (keycode == HPT_RST && record->event.pressed) { haptic_reset(); }
+ if (keycode == HPT_FBK && record->event.pressed) { haptic_feedback_toggle(); }
+ if (keycode == HPT_BUZ && record->event.pressed) { haptic_buzz_toggle(); }
+ if (keycode == HPT_MODI && record->event.pressed) { haptic_mode_increase(); }
+ if (keycode == HPT_MODD && record->event.pressed) { haptic_mode_decrease(); }
+ if (keycode == HPT_DWLI && record->event.pressed) { haptic_dwell_increase(); }
+ if (keycode == HPT_DWLD && record->event.pressed) { haptic_dwell_decrease(); }
+ if (haptic_config.enable) {
+ if ( record->event.pressed ) {
+ // keypress
+ if (haptic_config.feedback < 2) {
+ haptic_play();
+ }
+ } else {
+ //keyrelease
+ if (haptic_config.feedback > 0) {
+ haptic_play();
+ }
+ }
+ }
+ return true;
+}
+
+void haptic_shutdown(void) {
+ #ifdef SOLENOID_ENABLE
+ solenoid_shutdown();
+ #endif
+
+}
diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h
new file mode 100644
index 000000000000..d39dc5c3b9d6
--- /dev/null
+++ b/drivers/haptic/haptic.h
@@ -0,0 +1,82 @@
+/* Copyright 2019 ishtob
+ * Driver for haptic feedback written for 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
+#include
+#include "quantum.h"
+#ifdef DRV2605L
+#include "DRV2605L.h"
+#endif
+
+
+#ifndef HAPTIC_FEEDBACK_DEFAULT
+#define HAPTIC_FEEDBACK_DEFAULT 0
+#endif
+#ifndef HAPTIC_MODE_DEFAULT
+#define HAPTIC_MODE_DEFAULT DRV_MODE_DEFAULT
+#endif
+
+/* EEPROM config settings */
+typedef union {
+ uint32_t raw;
+ struct {
+ bool enable :1;
+ uint8_t feedback :2;
+ uint8_t mode :7;
+ bool buzz :1;
+ uint8_t dwell :7;
+ uint16_t reserved :16;
+ };
+} haptic_config_t;
+
+typedef enum HAPTIC_FEEDBACK{
+ KEY_PRESS,
+ KEY_PRESS_RELEASE,
+ KEY_RELEASE,
+ HAPTIC_FEEDBACK_MAX,
+} HAPTIC_FEEDBACK;
+
+bool process_haptic(uint16_t keycode, keyrecord_t *record);
+void haptic_init(void);
+void haptic_task(void);
+void eeconfig_debug_haptic(void);
+void haptic_enable(void);
+void haptic_disable(void);
+void haptic_toggle(void);
+void haptic_feedback_toggle(void);
+void haptic_mode_increase(void);
+void haptic_mode_decrease(void);
+void haptic_mode(uint8_t mode);
+void haptic_reset(void);
+void haptic_set_feedback(uint8_t feedback);
+void haptic_set_mode(uint8_t mode);
+void haptic_set_dwell(uint8_t dwell);
+void haptic_set_buzz(uint8_t buzz);
+void haptic_buzz_toggle(void);
+uint8_t haptic_get_mode(void);
+uint8_t haptic_get_feedback(void);
+void haptic_dwell_increase(void);
+void haptic_dwell_decrease(void);
+
+void haptic_play(void);
+void haptic_shutdown(void);
+
+
+
+
+
diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c
new file mode 100644
index 000000000000..2d39dbc1794c
--- /dev/null
+++ b/drivers/haptic/solenoid.c
@@ -0,0 +1,109 @@
+/* Copyright 2018 mtdjr - modified by ishtob
+ * Driver for solenoid written for 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 .
+ */
+
+#include
+#include "solenoid.h"
+#include "haptic.h"
+
+bool solenoid_on = false;
+bool solenoid_buzzing = false;
+uint16_t solenoid_start = 0;
+uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
+
+extern haptic_config_t haptic_config;
+
+
+void solenoid_buzz_on(void) {
+ haptic_set_buzz(1);
+}
+
+void solenoid_buzz_off(void) {
+ haptic_set_buzz(0);
+}
+
+void solenoid_set_buzz(int buzz) {
+ haptic_set_buzz(buzz);
+}
+
+
+void solenoid_dwell_minus(uint8_t solenoid_dwell) {
+ if (solenoid_dwell > 0) solenoid_dwell--;
+}
+
+void solenoid_dwell_plus(uint8_t solenoid_dwell) {
+ if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
+}
+
+void solenoid_set_dwell(uint8_t dwell) {
+ solenoid_dwell = dwell;
+}
+
+void solenoid_stop(void) {
+ writePinLow(SOLENOID_PIN);
+ solenoid_on = false;
+ solenoid_buzzing = false;
+}
+
+void solenoid_fire(void) {
+ if (!haptic_config.buzz && solenoid_on) return;
+ if (haptic_config.buzz && solenoid_buzzing) return;
+
+ solenoid_on = true;
+ solenoid_buzzing = true;
+ solenoid_start = timer_read();
+ writePinHigh(SOLENOID_PIN);
+}
+
+void solenoid_check(void) {
+ uint16_t elapsed = 0;
+
+ if (!solenoid_on) return;
+
+ elapsed = timer_elapsed(solenoid_start);
+
+ //Check if it's time to finish this solenoid click cycle
+ if (elapsed > solenoid_dwell) {
+ solenoid_stop();
+ return;
+ }
+
+ //Check whether to buzz the solenoid on and off
+ if (haptic_config.buzz) {
+ if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){
+ if (!solenoid_buzzing) {
+ solenoid_buzzing = true;
+ writePinHigh(SOLENOID_PIN);
+ }
+ }
+ else {
+ if (solenoid_buzzing) {
+ solenoid_buzzing = false;
+ writePinLow(SOLENOID_PIN);
+ }
+ }
+ }
+}
+
+void solenoid_setup(void) {
+ setPinOutput(SOLENOID_PIN);
+ solenoid_fire();
+}
+
+void solenoid_shutdown(void) {
+ writePinLow(SOLENOID_PIN);
+
+}
diff --git a/drivers/haptic/solenoid.h b/drivers/haptic/solenoid.h
new file mode 100644
index 000000000000..a08f62a11ee0
--- /dev/null
+++ b/drivers/haptic/solenoid.h
@@ -0,0 +1,54 @@
+/* Copyright 2018 mtdjr - modified by ishtob
+ * Driver for solenoid written for 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
+
+#ifndef SOLENOID_DEFAULT_DWELL
+#define SOLENOID_DEFAULT_DWELL 12
+#endif
+
+#ifndef SOLENOID_MAX_DWELL
+#define SOLENOID_MAX_DWELL 100
+#endif
+
+#ifndef SOLENOID_MIN_DWELL
+#define SOLENOID_MIN_DWELL 4
+#endif
+
+#ifndef SOLENOID_ACTIVE
+#define SOLENOID_ACTIVE false
+#endif
+
+#ifndef SOLENOID_PIN
+#define SOLENOID_PIN F6
+#endif
+
+void solenoid_buzz_on(void);
+void solenoid_buzz_off(void);
+void solenoid_set_buzz(int buzz);
+
+void solenoid_dwell_minus(uint8_t solenoid_dwell);
+void solenoid_dwell_plus(uint8_t solenoid_dwell);
+void solenoid_set_dwell(uint8_t dwell);
+
+void solenoid_stop(void);
+void solenoid_fire(void);
+
+void solenoid_check(void);
+
+void solenoid_setup(void);
+void solenoid_shutdown(void);
diff --git a/drivers/issi/is31fl3731-simple.c b/drivers/issi/is31fl3731-simple.c
new file mode 100644
index 000000000000..a7faa9c38c0b
--- /dev/null
+++ b/drivers/issi/is31fl3731-simple.c
@@ -0,0 +1,246 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2019 Clueboard
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifdef __AVR__
+#include
+#include
+#include
+#else
+#include "wait.h"
+#endif
+
+#include
+#include
+#include
+#include "is31fl3731-simple.h"
+#include "i2c_master.h"
+#include "progmem.h"
+#include "print.h"
+
+// 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 ISSI_ADDR_DEFAULT 0x74
+
+#define ISSI_REG_CONFIG 0x00
+#define ISSI_REG_CONFIG_PICTUREMODE 0x00
+#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
+#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18
+
+#define ISSI_CONF_PICTUREMODE 0x00
+#define ISSI_CONF_AUTOFRAMEMODE 0x04
+#define ISSI_CONF_AUDIOMODE 0x08
+
+#define ISSI_REG_PICTUREFRAME 0x01
+
+#define ISSI_REG_SHUTDOWN 0x0A
+#define ISSI_REG_AUDIOSYNC 0x06
+
+#define ISSI_COMMANDREGISTER 0xFD
+#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
+
+#ifndef ISSI_TIMEOUT
+ #define ISSI_TIMEOUT 100
+#endif
+
+#ifndef ISSI_PERSISTENCE
+ #define ISSI_PERSISTENCE 0
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
+// 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 IS31FL3731_write_pwm_buffer() but it's
+// probably not worth the extra complexity.
+uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
+bool g_pwm_buffer_update_required = false;
+
+/* There's probably a better way to init this... */
+#if LED_DRIVER_COUNT == 1
+ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}};
+#elif LED_DRIVER_COUNT == 2
+ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}};
+#elif LED_DRIVER_COUNT == 3
+ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
+#elif LED_DRIVER_COUNT == 4
+ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
+#endif
+bool g_led_control_registers_update_required = false;
+
+// This is the bit pattern in the LED control registers
+// (for matrix A, add one to register for matrix B)
+//
+// reg - b7 b6 b5 b4 b3 b2 b1 b0
+// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01
+// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00
+// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00
+// 0x06 - - , - , - , - , - ,B02,B01,B00
+// 0x08 - - , - , - , - , - , - , - , -
+// 0x0A - B17,B16,B15, - , - , - , - , -
+// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09
+// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
+// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
+
+
+void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+ #if ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) {
+ break;
+ }
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ #endif
+}
+
+void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
+ // assumes bank is already selected
+
+ // transmit PWM registers in 9 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 < 144; i += 16) {
+ // set the first register, e.g. 0x24, 0x34, 0x44, etc.
+ g_twi_transfer_buffer[0] = 0x24 + i;
+ // copy the data from i to i+15
+ // device will auto-increment register for data after the first byte
+ // thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
+ for (int j = 0; j < 16; j++) {
+ g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
+ }
+
+ #if ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
+ break;
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ #endif
+ }
+}
+
+void IS31FL3731_init(uint8_t addr) {
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, first enable software shutdown,
+ // then set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+
+ // select "function register" bank
+ IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+
+ // enable software shutdown
+ IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
+ // this delay was copied from other drivers, might not be needed
+ wait_ms(10);
+
+ // picture mode
+ IS31FL3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
+ // display frame 0
+ IS31FL3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00);
+ // audio sync off
+ IS31FL3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00);
+
+ // select bank 0
+ IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+
+ // turn off all LEDs in the LED control register
+ for (int i = 0x00; i <= 0x11; i++) {
+ IS31FL3731_write_register(addr, i, 0x00);
+ }
+
+ // turn off all LEDs in the blink control register (not really needed)
+ for (int i = 0x12; i <= 0x23; i++) {
+ IS31FL3731_write_register(addr, i, 0x00);
+ }
+
+ // set PWM on all LEDs to 0
+ for (int i = 0x24; i <= 0xB3; i++) {
+ IS31FL3731_write_register(addr, i, 0x00);
+ }
+
+ // select "function register" bank
+ IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
+
+ // disable software shutdown
+ IS31FL3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01);
+
+ // select bank 0 and leave it selected.
+ // most usage after initialization is just writing PWM buffers in bank 0
+ // as there's not much point in double-buffering
+ IS31FL3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
+
+}
+
+void IS31FL3731_set_value(int index, uint8_t value) {
+ if (index >= 0 && index < LED_DRIVER_LED_COUNT) {
+ is31_led led = g_is31_leds[index];
+
+ // Subtract 0x24 to get the second index of g_pwm_buffer
+ g_pwm_buffer[led.driver][led.v - 0x24] = value;
+ g_pwm_buffer_update_required = true;
+ }
+}
+
+void IS31FL3731_set_value_all(uint8_t value) {
+ for (int i = 0; i < LED_DRIVER_LED_COUNT; i++) {
+ IS31FL3731_set_value(i, value);
+ }
+}
+
+void IS31FL3731_set_led_control_register(uint8_t index, bool value) {
+ is31_led led = g_is31_leds[index];
+
+ uint8_t control_register = (led.v - 0x24) / 8;
+ uint8_t bit_value = (led.v - 0x24) % 8;
+
+ if (value) {
+ g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
+ } else {
+ g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
+ }
+
+ g_led_control_registers_update_required = true;
+}
+
+void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
+ if (g_pwm_buffer_update_required) {
+ IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
+ g_pwm_buffer_update_required = false;
+ }
+}
+
+void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
+ if (g_led_control_registers_update_required) {
+ for (int i=0; i<18; i++) {
+ IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
+ }
+ }
+}
diff --git a/drivers/issi/is31fl3731-simple.h b/drivers/issi/is31fl3731-simple.h
new file mode 100644
index 000000000000..dbe498281791
--- /dev/null
+++ b/drivers/issi/is31fl3731-simple.h
@@ -0,0 +1,210 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2019 Clueboard
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 IS31FL3731_DRIVER_H
+#define IS31FL3731_DRIVER_H
+
+
+typedef struct is31_led {
+ uint8_t driver:2;
+ uint8_t v;
+} __attribute__((packed)) is31_led;
+
+extern const is31_led g_is31_leds[LED_DRIVER_LED_COUNT];
+
+void IS31FL3731_init(uint8_t addr);
+void IS31FL3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
+void IS31FL3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
+
+void IS31FL3731_set_value(int index, uint8_t value);
+void IS31FL3731_set_value_all(uint8_t value);
+
+void IS31FL3731_set_led_control_register(uint8_t index, bool value);
+
+// 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 IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index);
+void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index);
+
+#define C1_1 0x24
+#define C1_2 0x25
+#define C1_3 0x26
+#define C1_4 0x27
+#define C1_5 0x28
+#define C1_6 0x29
+#define C1_7 0x2A
+#define C1_8 0x2B
+
+#define C1_9 0x2C
+#define C1_10 0x2D
+#define C1_11 0x2E
+#define C1_12 0x2F
+#define C1_13 0x30
+#define C1_14 0x31
+#define C1_15 0x32
+#define C1_16 0x33
+
+#define C2_1 0x34
+#define C2_2 0x35
+#define C2_3 0x36
+#define C2_4 0x37
+#define C2_5 0x38
+#define C2_6 0x39
+#define C2_7 0x3A
+#define C2_8 0x3B
+
+#define C2_9 0x3C
+#define C2_10 0x3D
+#define C2_11 0x3E
+#define C2_12 0x3F
+#define C2_13 0x40
+#define C2_14 0x41
+#define C2_15 0x42
+#define C2_16 0x43
+
+#define C3_1 0x44
+#define C3_2 0x45
+#define C3_3 0x46
+#define C3_4 0x47
+#define C3_5 0x48
+#define C3_6 0x49
+#define C3_7 0x4A
+#define C3_8 0x4B
+
+#define C3_9 0x4C
+#define C3_10 0x4D
+#define C3_11 0x4E
+#define C3_12 0x4F
+#define C3_13 0x50
+#define C3_14 0x51
+#define C3_15 0x52
+#define C3_16 0x53
+
+#define C4_1 0x54
+#define C4_2 0x55
+#define C4_3 0x56
+#define C4_4 0x57
+#define C4_5 0x58
+#define C4_6 0x59
+#define C4_7 0x5A
+#define C4_8 0x5B
+
+#define C4_9 0x5C
+#define C4_10 0x5D
+#define C4_11 0x5E
+#define C4_12 0x5F
+#define C4_13 0x60
+#define C4_14 0x61
+#define C4_15 0x62
+#define C4_16 0x63
+
+#define C5_1 0x64
+#define C5_2 0x65
+#define C5_3 0x66
+#define C5_4 0x67
+#define C5_5 0x68
+#define C5_6 0x69
+#define C5_7 0x6A
+#define C5_8 0x6B
+
+#define C5_9 0x6C
+#define C5_10 0x6D
+#define C5_11 0x6E
+#define C5_12 0x6F
+#define C5_13 0x70
+#define C5_14 0x71
+#define C5_15 0x72
+#define C5_16 0x73
+
+#define C6_1 0x74
+#define C6_2 0x75
+#define C6_3 0x76
+#define C6_4 0x77
+#define C6_5 0x78
+#define C6_6 0x79
+#define C6_7 0x7A
+#define C6_8 0x7B
+
+#define C6_9 0x7C
+#define C6_10 0x7D
+#define C6_11 0x7E
+#define C6_12 0x7F
+#define C6_13 0x80
+#define C6_14 0x81
+#define C6_15 0x82
+#define C6_16 0x83
+
+#define C7_1 0x84
+#define C7_2 0x85
+#define C7_3 0x86
+#define C7_4 0x87
+#define C7_5 0x88
+#define C7_6 0x89
+#define C7_7 0x8A
+#define C7_8 0x8B
+
+#define C7_9 0x8C
+#define C7_10 0x8D
+#define C7_11 0x8E
+#define C7_12 0x8F
+#define C7_13 0x90
+#define C7_14 0x91
+#define C7_15 0x92
+#define C7_16 0x93
+
+#define C8_1 0x94
+#define C8_2 0x95
+#define C8_3 0x96
+#define C8_4 0x97
+#define C8_5 0x98
+#define C8_6 0x99
+#define C8_7 0x9A
+#define C8_8 0x9B
+
+#define C8_9 0x9C
+#define C8_10 0x9D
+#define C8_11 0x9E
+#define C8_12 0x9F
+#define C8_13 0xA0
+#define C8_14 0xA1
+#define C8_15 0xA2
+#define C8_16 0xA3
+
+#define C9_1 0xA4
+#define C9_2 0xA5
+#define C9_3 0xA6
+#define C9_4 0xA7
+#define C9_5 0xA8
+#define C9_6 0xA9
+#define C9_7 0xAA
+#define C9_8 0xAB
+
+#define C9_9 0xAC
+#define C9_10 0xAD
+#define C9_11 0xAE
+#define C9_12 0xAF
+#define C9_13 0xB0
+#define C9_14 0xB1
+#define C9_15 0xB2
+#define C9_16 0xB3
+
+
+#endif // IS31FL3731_DRIVER_H
diff --git a/drivers/issi/is31fl3733.c b/drivers/issi/is31fl3733.c
index c18ed7ca30b3..aa247f4e8a2a 100644
--- a/drivers/issi/is31fl3733.c
+++ b/drivers/issi/is31fl3733.c
@@ -75,10 +75,10 @@ uint8_t g_twi_transfer_buffer[20];
// buffers and the transfers in IS31FL3733_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 = false;
+bool g_pwm_buffer_update_required[DRIVER_COUNT] = { false };
uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 }, { 0 } };
-bool g_led_control_registers_update_required = false;
+bool g_led_control_registers_update_required[DRIVER_COUNT] = { false };
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data )
{
@@ -123,12 +123,13 @@ void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
}
}
-void IS31FL3733_init( uint8_t addr )
+void IS31FL3733_init( uint8_t addr, uint8_t sync)
{
// In order to avoid the LEDs being driven with garbage data
// in the LED driver's PWM registers, shutdown is enabled last.
// Set up the mode and other settings, clear the PWM registers,
// then disable software shutdown.
+ // Sync is passed so set it according to the datasheet.
// Unlock the command register.
IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
@@ -161,7 +162,7 @@ void IS31FL3733_init( uint8_t addr )
// Set global current to maximum.
IS31FL3733_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
// Disable software shutdown.
- IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 );
+ IS31FL3733_write_register( addr, ISSI_REG_CONFIGURATION, (sync << 6) | 0x01 );
// Wait 10ms to ensure the device has woken up.
#ifdef __AVR__
@@ -179,7 +180,7 @@ void IS31FL3733_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
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 = true;
+ g_pwm_buffer_update_required[led.driver] = true;
}
}
@@ -218,35 +219,34 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
}
- g_led_control_registers_update_required = true;
+ g_led_control_registers_update_required[led.driver] = true;
}
-void IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
+void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index )
{
- if ( g_pwm_buffer_update_required )
+ if ( g_pwm_buffer_update_required[index] )
{
// Firstly we need to unlock the command register and select PG1
- IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
- IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
+ IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
- IS31FL3733_write_pwm_buffer( addr1, g_pwm_buffer[0] );
- //IS31FL3733_write_pwm_buffer( addr2, g_pwm_buffer[1] );
+ IS31FL3733_write_pwm_buffer( addr, g_pwm_buffer[index] );
}
- g_pwm_buffer_update_required = false;
+ g_pwm_buffer_update_required[index] = false;
}
-void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
+void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index )
{
- if ( g_led_control_registers_update_required )
+ if ( g_led_control_registers_update_required[index] )
{
// Firstly we need to unlock the command register and select PG0
- IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
- IS31FL3733_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
+ IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3733_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
for ( int i=0; i<24; i++ )
{
- IS31FL3733_write_register(addr1, i, g_led_control_registers[0][i] );
- //IS31FL3733_write_register(addr2, i, g_led_control_registers[1][i] );
+ IS31FL3733_write_register(addr, i, g_led_control_registers[index][i] );
}
}
+ g_led_control_registers_update_required[index] = false;
}
diff --git a/drivers/issi/is31fl3733.h b/drivers/issi/is31fl3733.h
index 3d23b188aac7..e117b2546009 100644
--- a/drivers/issi/is31fl3733.h
+++ b/drivers/issi/is31fl3733.h
@@ -32,7 +32,7 @@ typedef struct is31_led {
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL];
-void IS31FL3733_init( uint8_t addr );
+void IS31FL3733_init( uint8_t addr, uint8_t sync );
void IS31FL3733_write_register( uint8_t addr, uint8_t reg, uint8_t data );
void IS31FL3733_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
@@ -45,8 +45,8 @@ void IS31FL3733_set_led_control_register( uint8_t index, bool red, bool green, b
// (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 IS31FL3733_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
-void IS31FL3733_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
+void IS31FL3733_update_pwm_buffers( uint8_t addr, uint8_t index );
+void IS31FL3733_update_led_control_registers( uint8_t addr, uint8_t index );
#define A_1 0x00
#define A_2 0x01
diff --git a/drivers/issi/is31fl3737.c b/drivers/issi/is31fl3737.c
new file mode 100644
index 000000000000..6491049274b5
--- /dev/null
+++ b/drivers/issi/is31fl3737.c
@@ -0,0 +1,252 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#ifdef __AVR__
+#include
+#include
+#include
+#else
+#include "wait.h"
+#endif
+
+#include
+#include "i2c_master.h"
+#include "progmem.h"
+#include "rgb_matrix.h"
+
+// 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:
+// 00 <-> GND
+// 01 <-> SCL
+// 10 <-> SDA
+// 11 <-> VCC
+// ADDR1 represents A1:A0 of the 7-bit address.
+// ADDR2 represents A3:A2 of the 7-bit address.
+// The result is: 0b101(ADDR2)(ADDR1)
+#define ISSI_ADDR_DEFAULT 0x50
+
+#define ISSI_COMMANDREGISTER 0xFD
+#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
+#define ISSI_INTERRUPTMASKREGISTER 0xF0
+#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
+
+#define ISSI_PAGE_LEDCONTROL 0x00 //PG0
+#define ISSI_PAGE_PWM 0x01 //PG1
+#define ISSI_PAGE_AUTOBREATH 0x02 //PG2
+#define ISSI_PAGE_FUNCTION 0x03 //PG3
+
+#define ISSI_REG_CONFIGURATION 0x00 //PG3
+#define ISSI_REG_GLOBALCURRENT 0x01 //PG3
+#define ISSI_REG_RESET 0x11// PG3
+#define ISSI_REG_SWPULLUP 0x0F //PG3
+#define ISSI_REG_CSPULLUP 0x10 //PG3
+
+#ifndef ISSI_TIMEOUT
+ #define ISSI_TIMEOUT 100
+#endif
+
+#ifndef ISSI_PERSISTENCE
+ #define ISSI_PERSISTENCE 0
+#endif
+
+// Transfer buffer for TWITransmitData()
+uint8_t g_twi_transfer_buffer[20];
+
+// These buffers match the IS31FL3737 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 IS31FL3737_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 = false;
+
+uint8_t g_led_control_registers[DRIVER_COUNT][24] = { { 0 } };
+bool g_led_control_registers_update_required = false;
+
+void IS31FL3737_write_register( uint8_t addr, uint8_t reg, uint8_t data )
+{
+ g_twi_transfer_buffer[0] = reg;
+ g_twi_transfer_buffer[1] = data;
+
+ #if ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0)
+ break;
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
+ #endif
+}
+
+void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer )
+{
+ // assumes PG1 is already selected
+
+ // 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 ISSI_PERSISTENCE > 0
+ for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
+ if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0)
+ break;
+ }
+ #else
+ i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
+ #endif
+ }
+}
+
+void IS31FL3737_init( uint8_t addr )
+{
+ // In order to avoid the LEDs being driven with garbage data
+ // in the LED driver's PWM registers, shutdown is enabled last.
+ // Set up the mode and other settings, clear the PWM registers,
+ // then disable software shutdown.
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG0
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
+ // Turn off all LEDs.
+ for ( int i = 0x00; i <= 0x17; i++ )
+ {
+ IS31FL3737_write_register( addr, i, 0x00 );
+ }
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG1
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
+ // Set PWM on all LEDs to 0
+ // No need to setup Breath registers to PWM as that is the default.
+ for ( int i = 0x00; i <= 0xBF; i++ )
+ {
+ IS31FL3737_write_register( addr, i, 0x00 );
+ }
+
+ // Unlock the command register.
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+
+ // Select PG3
+ IS31FL3737_write_register( addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION );
+ // Set global current to maximum.
+ IS31FL3737_write_register( addr, ISSI_REG_GLOBALCURRENT, 0xFF );
+ // Disable software shutdown.
+ IS31FL3737_write_register( addr, ISSI_REG_CONFIGURATION, 0x01 );
+
+ // Wait 10ms to ensure the device has woken up.
+ #ifdef __AVR__
+ _delay_ms( 10 );
+ #else
+ wait_ms(10);
+ #endif
+}
+
+void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue )
+{
+ if ( index >= 0 && index < DRIVER_LED_TOTAL ) {
+ is31_led led = g_is31_leds[index];
+
+ 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 = true;
+ }
+}
+
+void IS31FL3737_set_color_all( uint8_t red, uint8_t green, uint8_t blue )
+{
+ for ( int i = 0; i < DRIVER_LED_TOTAL; i++ )
+ {
+ IS31FL3737_set_color( i, red, green, blue );
+ }
+}
+
+void IS31FL3737_set_led_control_register( uint8_t index, bool red, bool green, bool blue )
+{
+ is31_led led = g_is31_leds[index];
+
+ 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 = true;
+
+}
+
+void IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 )
+{
+ if ( g_pwm_buffer_update_required )
+ {
+ // Firstly we need to unlock the command register and select PG1
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM );
+
+ IS31FL3737_write_pwm_buffer( addr1, g_pwm_buffer[0] );
+ //IS31FL3737_write_pwm_buffer( addr2, g_pwm_buffer[1] );
+ }
+ g_pwm_buffer_update_required = false;
+}
+
+void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 )
+{
+ if ( g_led_control_registers_update_required )
+ {
+ // Firstly we need to unlock the command register and select PG0
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5 );
+ IS31FL3737_write_register( addr1, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL );
+ for ( int i=0; i<24; i++ )
+ {
+ IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i] );
+ //IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i] );
+ }
+ }
+}
diff --git a/drivers/issi/is31fl3737.h b/drivers/issi/is31fl3737.h
new file mode 100644
index 000000000000..69c4b9b538f8
--- /dev/null
+++ b/drivers/issi/is31fl3737.h
@@ -0,0 +1,207 @@
+/* Copyright 2017 Jason Williams
+ * Copyright 2018 Jack Humbert
+ * Copyright 2018 Yiancar
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 IS31FL3737_DRIVER_H
+#define IS31FL3737_DRIVER_H
+
+#include
+#include
+
+typedef struct is31_led {
+ uint8_t driver:2;
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+} __attribute__((packed)) is31_led;
+
+extern const is31_led 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 );
+void IS31FL3737_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer );
+
+void IS31FL3737_set_color( int index, uint8_t red, uint8_t green, uint8_t blue );
+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 );
+
+// 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 IS31FL3737_update_pwm_buffers( uint8_t addr1, uint8_t addr2 );
+void IS31FL3737_update_led_control_registers( uint8_t addr1, uint8_t addr2 );
+
+#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 0x08
+#define A_8 0x09
+#define A_9 0x0A
+#define A_10 0x0B
+#define A_11 0x0C
+#define A_12 0x0D
+
+#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 0x18
+#define B_8 0x19
+#define B_9 0x1A
+#define B_10 0x1B
+#define B_11 0x1C
+#define B_12 0x1D
+
+#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 0x28
+#define C_8 0x29
+#define C_9 0x2A
+#define C_10 0x2B
+#define C_11 0x2C
+#define C_12 0x2D
+
+#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 0x38
+#define D_8 0x39
+#define D_9 0x3A
+#define D_10 0x3B
+#define D_11 0x3C
+#define D_12 0x3D
+
+#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 0x48
+#define E_8 0x49
+#define E_9 0x4A
+#define E_10 0x4B
+#define E_11 0x4C
+#define E_12 0x4D
+
+#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 0x58
+#define F_8 0x59
+#define F_9 0x5A
+#define F_10 0x5B
+#define F_11 0x5C
+#define F_12 0x5D
+
+#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 0x68
+#define G_8 0x69
+#define G_9 0x6A
+#define G_10 0x6B
+#define G_11 0x6C
+#define G_12 0x6D
+
+#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 0x78
+#define H_8 0x79
+#define H_9 0x7A
+#define H_10 0x7B
+#define H_11 0x7C
+#define H_12 0x7D
+
+#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 0x88
+#define I_8 0x89
+#define I_9 0x8A
+#define I_10 0x8B
+#define I_11 0x8C
+#define I_12 0x8D
+
+#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 0x98
+#define J_8 0x99
+#define J_9 0x9A
+#define J_10 0x9B
+#define J_11 0x9C
+#define J_12 0x9D
+
+#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 0xA8
+#define K_8 0xA9
+#define K_9 0xAA
+#define K_10 0xAB
+#define K_11 0xAC
+#define K_12 0xAD
+
+#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 0xB8
+#define L_8 0xB9
+#define L_9 0xBA
+#define L_10 0xBB
+#define L_11 0xBC
+#define L_12 0xBD
+
+#endif // IS31FL3737_DRIVER_H
diff --git a/drivers/oled/glcdfont.c b/drivers/oled/glcdfont.c
new file mode 100644
index 000000000000..8b969057e531
--- /dev/null
+++ b/drivers/oled/glcdfont.c
@@ -0,0 +1,240 @@
+#pragma once
+
+#ifdef __AVR__
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else
+ #define PROGMEM
+#endif
+
+// Helidox 8x6 font with QMK Firmware Logo
+// Online editor: http://teripom.x0.com/
+
+static const unsigned char font[] PROGMEM = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
+ 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
+ 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
+ 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
+ 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
+ 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
+ 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
+ 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
+ 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
+ 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
+ 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
+ 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
+ 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
+ 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
+ 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
+ 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
+ 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
+ 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
+ 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
+ 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
+ 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
+ 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
+ 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
+ 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
+ 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
+ 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
+ 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
+ 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
+ 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
+ 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
+ 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
+ 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
+ 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
+ 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
+ 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
+ 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
+ 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
+ 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
+ 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
+ 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
+ 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+ 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
+ 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
+ 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
+ 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
+ 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
+ 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
+ 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
+ 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
+ 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
+ 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
+ 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
+ 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
+ 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
+ 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
+ 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
+ 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
+ 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
+ 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
+ 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
+ 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
+ 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
+ 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
+ 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
+ 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
+ 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
+ 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
+ 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
+ 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
+ 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
+ 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
+ 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
+ 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
+ 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
+ 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
+ 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
+ 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
+ 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
+ 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
+ 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
+ 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
+ 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
+ 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
+ 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
+ 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
+ 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
+ 0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00,
+ 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
+ 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
+ 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
+ 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
+ 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
+ 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
+ 0xFC, 0x18, 0x24, 0x24, 0x18, 0x00,
+ 0x18, 0x24, 0x24, 0x18, 0xFC, 0x00,
+ 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
+ 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
+ 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
+ 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
+ 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
+ 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
+ 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
+ 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
+ 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
+ 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
+ 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
+ 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
+ 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
+ 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x40, 0x40, 0x40, 0xF0, 0xF8, 0xF8,
+ 0xFF, 0x38, 0xFF, 0xF8, 0xF8, 0x3F,
+ 0xF8, 0xF8, 0xFF, 0x38, 0xFF, 0xF8,
+ 0xF8, 0xF0, 0x40, 0x40, 0x40, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
+ 0xC0, 0xC0, 0xC0, 0x80, 0x00, 0x00,
+ 0xC0, 0xC0, 0x80, 0x00, 0x00, 0x00,
+ 0x80, 0xC0, 0xC0, 0x00, 0xC0, 0xC0,
+ 0x00, 0x00, 0x80, 0xC0, 0xC0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0,
+ 0xC0, 0xC0, 0xC0, 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, 0xC0, 0xF0, 0xF8, 0xFC, 0x3E,
+ 0x1E, 0x06, 0x01, 0x00, 0x00, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
+ 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
+ 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
+ 0xDE, 0xD7, 0xDC, 0x00, 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,
+ 0x49, 0x49, 0x49, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xE0, 0xDF, 0xBF, 0xBF, 0x00,
+ 0xBF, 0xBF, 0xDF, 0xE0, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0x49, 0x49, 0x49, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x1F, 0x3F,
+ 0x60, 0x60, 0xE0, 0xBF, 0x1F, 0x00,
+ 0x7F, 0x7F, 0x07, 0x1E, 0x38, 0x1E,
+ 0x07, 0x7F, 0x7F, 0x00, 0x7F, 0x7F,
+ 0x0E, 0x1F, 0x3B, 0x71, 0x60, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x7F, 0x7F,
+ 0x0C, 0x0C, 0x0C, 0x00, 0x7E, 0x7E,
+ 0x00, 0x7F, 0x7E, 0x03, 0x03, 0x00,
+ 0x7F, 0x7E, 0x03, 0x03, 0x7E, 0x7E,
+ 0x03, 0x03, 0x7F, 0x7E, 0x00, 0x0F,
+ 0x3E, 0x70, 0x3C, 0x06, 0x3C, 0x70,
+ 0x3E, 0x0F, 0x00, 0x32, 0x7B, 0x49,
+ 0x49, 0x3F, 0x7E, 0x00, 0x7F, 0x7E,
+ 0x03, 0x03, 0x00, 0x1E, 0x3F, 0x69,
+ 0x69, 0x6F, 0x26, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x03, 0x0F, 0x1F, 0x3F, 0x3C,
+ 0x78, 0x70, 0x60, 0x00, 0x00, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x7F, 0x41, 0x41, 0x41, 0x7F, 0x00,
+ 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
+ 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
+ 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
+ 0x0F, 0x7F, 0x0F, 0x00, 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,
+ 0x01, 0x01, 0x01, 0x07, 0x0F, 0x0F,
+ 0x7F, 0x0F, 0x7F, 0x0F, 0x0F, 0x7E,
+ 0x0F, 0x0F, 0x7F, 0x0F, 0x7F, 0x0F,
+ 0x0F, 0x07, 0x01, 0x01, 0x01, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 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, 0x00, 0x00, 0x00,
+ 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/drivers/oled/licenses.txt b/drivers/oled/licenses.txt
new file mode 100644
index 000000000000..111603ebf3c7
--- /dev/null
+++ b/drivers/oled/licenses.txt
@@ -0,0 +1,45 @@
+The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
+
+
+This is the Linux-penguin again...
+
+Originally drewn by Larry Ewing (http://www.isc.tamu.edu/~lewing/)
+(with the GIMP) the Linux Logo has been vectorized by me (Simon Budig,
+http://www.home.unix-ag.org/simon/).
+
+This happened quite some time ago with Corel Draw 4. But luckily
+meanwhile there are tools available to handle vector graphics with
+Linux. Bernhard Herzog (bernhard@users.sourceforge.net) deserves kudos
+for creating Sketch (http://sketch.sourceforge.net), a powerful free
+tool for creating vector graphics. He converted the Corel Draw file to
+the Sketch native format. Since I am unable to maintain the Corel Draw
+file any longer, the Sketch version now is the "official" one.
+
+Anja Gerwinski (anja@gerwinski.de) has created an alternate version of
+the penguin (penguin-variant.sk) with a thinner mouth line and slightly
+altered gradients. It also features a nifty drop shadow.
+
+The third bird (penguin-flat.sk) is a version reduced to three colors
+(black/white/yellow) for e.g. silk screen printing. I made this version
+for a mug, available at the friendly folks at
+http://www.kernelconcepts.de/ - they do good stuff, mail Petra
+(pinguin@kernelconcepts.de) if you need something special or don't
+understand the german :-)
+
+These drawings are copyrighted by Larry Ewing and Simon Budig
+(penguin-variant.sk also by Anja Gerwinski), redistribution is free but
+has to include this README/Copyright notice.
+
+The use of these drawings is free. However I am happy about a sample of
+your mug/t-shirt/whatever with this penguin on it...
+
+Have fun
+ Simon Budig
+
+
+Simon.Budig@unix-ag.org
+http://www.home.unix-ag.org/simon/
+
+Simon Budig
+Am Hardtkoeppel 2
+D-61279 Graevenwiesbach
diff --git a/drivers/oled/oled_driver.c b/drivers/oled/oled_driver.c
new file mode 100644
index 000000000000..96ea58ccb2c8
--- /dev/null
+++ b/drivers/oled/oled_driver.c
@@ -0,0 +1,531 @@
+/*
+Copyright 2019 Ryan Caltabiano
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 "i2c_master.h"
+#include "oled_driver.h"
+#include OLED_FONT_H
+#include "timer.h"
+#include "print.h"
+
+#include
+
+#if defined(__AVR__)
+ #include
+ #include
+#elif defined(ESP8266)
+ #include
+#else // defined(ESP8266)
+ #define PROGMEM
+ #define memcpy_P(des, src, len) memcpy(des, src, len)
+#endif // defined(__AVR__)
+
+// Used commands from spec sheet: https://cdn-shop.adafruit.com/datasheets/SSD1306.pdf
+// Fundamental Commands
+#define CONTRAST 0x81
+#define DISPLAY_ALL_ON 0xA5
+#define DISPLAY_ALL_ON_RESUME 0xA4
+#define NORMAL_DISPLAY 0xA6
+#define DISPLAY_ON 0xAF
+#define DISPLAY_OFF 0xAE
+
+// Scrolling Commands
+#define ACTIVATE_SCROLL 0x2F
+#define DEACTIVATE_SCROLL 0x2E
+#define SCROLL_RIGHT 0x26
+#define SCROLL_LEFT 0x27
+#define SCROLL_RIGHT_UP 0x29
+#define SCROLL_LEFT_UP 0x2A
+
+// Addressing Setting Commands
+#define MEMORY_MODE 0x20
+#define COLUMN_ADDR 0x21
+#define PAGE_ADDR 0x22
+
+// Hardware Configuration Commands
+#define DISPLAY_START_LINE 0x40
+#define SEGMENT_REMAP 0xA0
+#define SEGMENT_REMAP_INV 0xA1
+#define MULTIPLEX_RATIO 0xA8
+#define COM_SCAN_INC 0xC0
+#define COM_SCAN_DEC 0xC8
+#define DISPLAY_OFFSET 0xD3
+#define COM_PINS 0xDA
+
+// Timing & Driving Commands
+#define DISPLAY_CLOCK 0xD5
+#define PRE_CHARGE_PERIOD 0xD9
+#define VCOM_DETECT 0xDB
+
+// Charge Pump Commands
+#define CHARGE_PUMP 0x8D
+
+// Misc defines
+#define OLED_TIMEOUT 60000
+#define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8)
+#define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT)
+
+// i2c defines
+#define I2C_CMD 0x00
+#define I2C_DATA 0x40
+#if defined(__AVR__)
+ // already defined on ARM
+ #define I2C_TIMEOUT 100
+ #define I2C_TRANSMIT_P(data) i2c_transmit_P((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#else // defined(__AVR__)
+ #define I2C_TRANSMIT_P(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#endif // defined(__AVR__)
+#define I2C_TRANSMIT(data) i2c_transmit((OLED_DISPLAY_ADDRESS << 1), &data[0], sizeof(data), I2C_TIMEOUT)
+#define I2C_WRITE_REG(mode, data, size) i2c_writeReg((OLED_DISPLAY_ADDRESS << 1), mode, data, size, I2C_TIMEOUT)
+
+#define HAS_FLAGS(bits, flags) ((bits & flags) == flags)
+
+// Display buffer's is the same as the OLED memory layout
+// this is so we don't end up with rounding errors with
+// parts of the display unusable or don't get cleared correctly
+// and also allows for drawing & inverting
+uint8_t oled_buffer[OLED_MATRIX_SIZE];
+uint8_t* oled_cursor;
+OLED_BLOCK_TYPE oled_dirty = 0;
+bool oled_initialized = false;
+bool oled_active = false;
+bool oled_scrolling = false;
+uint8_t oled_rotation = 0;
+uint8_t oled_rotation_width = 0;
+#if !defined(OLED_DISABLE_TIMEOUT)
+ uint16_t oled_last_activity;
+#endif
+
+// Internal variables to reduce math instructions
+
+#if defined(__AVR__)
+// identical to i2c_transmit, but for PROGMEM since all initialization is in PROGMEM arrays currently
+// probably should move this into i2c_master...
+static i2c_status_t i2c_transmit_P(uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout) {
+ i2c_status_t status = i2c_start(address | I2C_WRITE, timeout);
+
+ for (uint16_t i = 0; i < length && status >= 0; i++) {
+ status = i2c_write(pgm_read_byte((const char*)data++), timeout);
+ if (status) break;
+ }
+
+ i2c_stop();
+
+ return status;
+}
+#endif
+
+// Flips the rendering bits for a character at the current cursor position
+static void InvertCharacter(uint8_t *cursor)
+{
+ const uint8_t *end = cursor + OLED_FONT_WIDTH;
+ while (cursor < end) {
+ *cursor = ~(*cursor);
+ cursor++;
+ }
+}
+
+bool oled_init(uint8_t rotation) {
+ oled_rotation = oled_init_user(rotation);
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ oled_rotation_width = OLED_DISPLAY_WIDTH;
+ } else {
+ oled_rotation_width = OLED_DISPLAY_HEIGHT;
+ }
+ i2c_init();
+
+ static const uint8_t PROGMEM display_setup1[] = {
+ I2C_CMD,
+ DISPLAY_OFF,
+ DISPLAY_CLOCK, 0x80,
+ MULTIPLEX_RATIO, OLED_DISPLAY_HEIGHT - 1,
+ DISPLAY_OFFSET, 0x00,
+ DISPLAY_START_LINE | 0x00,
+ CHARGE_PUMP, 0x14,
+ MEMORY_MODE, 0x00, }; // Horizontal addressing mode
+ if (I2C_TRANSMIT_P(display_setup1) != I2C_STATUS_SUCCESS) {
+ print("oled_init cmd set 1 failed\n");
+ return false;
+ }
+
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_180)) {
+ static const uint8_t PROGMEM display_normal[] = {
+ I2C_CMD,
+ SEGMENT_REMAP_INV,
+ COM_SCAN_DEC };
+ if (I2C_TRANSMIT_P(display_normal) != I2C_STATUS_SUCCESS) {
+ print("oled_init cmd normal rotation failed\n");
+ return false;
+ }
+ } else {
+ static const uint8_t PROGMEM display_flipped[] = {
+ I2C_CMD,
+ SEGMENT_REMAP,
+ COM_SCAN_INC };
+ if (I2C_TRANSMIT_P(display_flipped) != I2C_STATUS_SUCCESS) {
+ print("display_flipped failed\n");
+ return false;
+ }
+ }
+
+ static const uint8_t PROGMEM display_setup2[] = {
+ I2C_CMD,
+ COM_PINS, 0x02,
+ CONTRAST, 0x8F,
+ PRE_CHARGE_PERIOD, 0xF1,
+ VCOM_DETECT, 0x40,
+ DISPLAY_ALL_ON_RESUME,
+ NORMAL_DISPLAY,
+ DEACTIVATE_SCROLL,
+ DISPLAY_ON };
+ if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
+ print("display_setup2 failed\n");
+ return false;
+ }
+
+ oled_clear();
+ oled_initialized = true;
+ oled_active = true;
+ oled_scrolling = false;
+ return true;
+}
+
+__attribute__((weak))
+oled_rotation_t oled_init_user(oled_rotation_t rotation) {
+ return rotation;
+}
+
+void oled_clear(void) {
+ memset(oled_buffer, 0, sizeof(oled_buffer));
+ oled_cursor = &oled_buffer[0];
+ oled_dirty = -1; // -1 will be max value as long as display_dirty is unsigned type
+}
+
+static void calc_bounds(uint8_t update_start, uint8_t* cmd_array)
+{
+ cmd_array[1] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_WIDTH;
+ cmd_array[4] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_WIDTH;
+ cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) % OLED_DISPLAY_WIDTH + cmd_array[1];
+ cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_WIDTH - 1) / OLED_DISPLAY_WIDTH - 1;
+}
+
+static void calc_bounds_90(uint8_t update_start, uint8_t* cmd_array)
+{
+ cmd_array[1] = OLED_BLOCK_SIZE * update_start / OLED_DISPLAY_HEIGHT * 8;
+ cmd_array[4] = OLED_BLOCK_SIZE * update_start % OLED_DISPLAY_HEIGHT;
+ cmd_array[2] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) / OLED_DISPLAY_HEIGHT * 8 - 1 + cmd_array[1];;
+ cmd_array[5] = (OLED_BLOCK_SIZE + OLED_DISPLAY_HEIGHT - 1) % OLED_DISPLAY_HEIGHT / 8;
+}
+
+uint8_t crot(uint8_t a, int8_t n)
+{
+ const uint8_t mask = 0x7;
+ n &= mask;
+ return a << n | a >> (-n & mask);
+}
+
+static void rotate_90(const uint8_t* src, uint8_t* dest)
+{
+ for (uint8_t i = 0, shift = 7; i < 8; ++i, --shift) {
+ uint8_t selector = (1 << i);
+ for (uint8_t j = 0; j < 8; ++j) {
+ dest[i] |= crot(src[j] & selector, shift - (int8_t)j);
+ }
+ }
+}
+
+void oled_render(void) {
+ // Do we have work to do?
+ if (!oled_dirty || oled_scrolling) {
+ return;
+ }
+
+ // Find first dirty block
+ uint8_t update_start = 0;
+ while (!(oled_dirty & (1 << update_start))) { ++update_start; }
+
+ // Set column & page position
+ static uint8_t display_start[] = {
+ I2C_CMD,
+ COLUMN_ADDR, 0, OLED_DISPLAY_WIDTH - 1,
+ PAGE_ADDR, 0, OLED_DISPLAY_HEIGHT / 8 - 1 };
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ calc_bounds(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
+ } else {
+ calc_bounds_90(update_start, &display_start[1]); // Offset from I2C_CMD byte at the start
+ }
+
+ // Send column & page position
+ if (I2C_TRANSMIT(display_start) != I2C_STATUS_SUCCESS) {
+ print("oled_render offset command failed\n");
+ return;
+ }
+
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ // Send render data chunk as is
+ if (I2C_WRITE_REG(I2C_DATA, &oled_buffer[OLED_BLOCK_SIZE * update_start], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
+ print("oled_render data failed\n");
+ return;
+ }
+ } else {
+ // Rotate the render chunks
+ const static uint8_t source_map[] = OLED_SOURCE_MAP;
+ const static uint8_t target_map[] = OLED_TARGET_MAP;
+
+ static uint8_t temp_buffer[OLED_BLOCK_SIZE];
+ memset(temp_buffer, 0, sizeof(temp_buffer));
+ for(uint8_t i = 0; i < sizeof(source_map); ++i) {
+ rotate_90(&oled_buffer[OLED_BLOCK_SIZE * update_start + source_map[i]], &temp_buffer[target_map[i]]);
+ }
+
+ // Send render data chunk after rotating
+ if (I2C_WRITE_REG(I2C_DATA, &temp_buffer[0], OLED_BLOCK_SIZE) != I2C_STATUS_SUCCESS) {
+ print("oled_render data failed\n");
+ return;
+ }
+ }
+
+ // Turn on display if it is off
+ oled_on();
+
+ // Clear dirty flag
+ oled_dirty &= ~(1 << update_start);
+}
+
+void oled_set_cursor(uint8_t col, uint8_t line) {
+ uint16_t index = line * oled_rotation_width + col * OLED_FONT_WIDTH;
+
+ // Out of bounds?
+ if (index >= OLED_MATRIX_SIZE) {
+ index = 0;
+ }
+
+ oled_cursor = &oled_buffer[index];
+}
+
+void oled_advance_page(bool clearPageRemainder) {
+ uint16_t index = oled_cursor - &oled_buffer[0];
+ uint8_t remaining = oled_rotation_width - (index % oled_rotation_width);
+
+ if (clearPageRemainder) {
+ // Remaining Char count
+ remaining = remaining / OLED_FONT_WIDTH;
+
+ // Write empty character until next line
+ while (remaining--)
+ oled_write_char(' ', false);
+ } else {
+ // Next page index out of bounds?
+ if (index + remaining >= OLED_MATRIX_SIZE) {
+ index = 0;
+ remaining = 0;
+ }
+
+ oled_cursor = &oled_buffer[index + remaining];
+ }
+}
+
+void oled_advance_char(void) {
+ uint16_t nextIndex = oled_cursor - &oled_buffer[0] + OLED_FONT_WIDTH;
+ uint8_t remainingSpace = oled_rotation_width - (nextIndex % oled_rotation_width);
+
+ // Do we have enough space on the current line for the next character
+ if (remainingSpace < OLED_FONT_WIDTH) {
+ nextIndex += remainingSpace;
+ }
+
+ // Did we go out of bounds
+ if (nextIndex >= OLED_MATRIX_SIZE) {
+ nextIndex = 0;
+ }
+
+ // Update cursor position
+ oled_cursor = &oled_buffer[nextIndex];
+}
+
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert) {
+ // Advance to the next line if newline
+ if (data == '\n') {
+ // Old source wrote ' ' until end of line...
+ oled_advance_page(true);
+ return;
+ }
+
+ // copy the current render buffer to check for dirty after
+ static uint8_t oled_temp_buffer[OLED_FONT_WIDTH];
+ memcpy(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH);
+
+ // set the reder buffer data
+ uint8_t cast_data = (uint8_t)data; // font based on unsigned type for index
+ if (cast_data < OLED_FONT_START || cast_data > OLED_FONT_END) {
+ memset(oled_cursor, 0x00, OLED_FONT_WIDTH);
+ } else {
+ const uint8_t *glyph = &font[(cast_data - OLED_FONT_START) * OLED_FONT_WIDTH];
+ memcpy_P(oled_cursor, glyph, OLED_FONT_WIDTH);
+ }
+
+ // Invert if needed
+ if (invert) {
+ InvertCharacter(oled_cursor);
+ }
+
+ // Dirty check
+ if (memcmp(&oled_temp_buffer, oled_cursor, OLED_FONT_WIDTH)) {
+ uint16_t index = oled_cursor - &oled_buffer[0];
+ oled_dirty |= (1 << (index / OLED_BLOCK_SIZE));
+ // Edgecase check if the written data spans the 2 chunks
+ oled_dirty |= (1 << ((index + OLED_FONT_WIDTH) / OLED_BLOCK_SIZE));
+ }
+
+ // Finally move to the next char
+ oled_advance_char();
+}
+
+void oled_write(const char *data, bool invert) {
+ const char *end = data + strlen(data);
+ while (data < end) {
+ oled_write_char(*data, invert);
+ data++;
+ }
+}
+
+void oled_write_ln(const char *data, bool invert) {
+ oled_write(data, invert);
+ oled_advance_page(true);
+}
+
+#if defined(__AVR__)
+void oled_write_P(const char *data, bool invert) {
+ uint8_t c = pgm_read_byte(data);
+ while (c != 0) {
+ oled_write_char(c, invert);
+ c = pgm_read_byte(++data);
+ }
+}
+
+void oled_write_ln_P(const char *data, bool invert) {
+ oled_write_P(data, invert);
+ oled_advance_page(true);
+}
+#endif // defined(__AVR__)
+
+bool oled_on(void) {
+#if !defined(OLED_DISABLE_TIMEOUT)
+ oled_last_activity = timer_read();
+#endif
+
+ static const uint8_t PROGMEM display_on[] = { I2C_CMD, DISPLAY_ON };
+ if (!oled_active) {
+ if (I2C_TRANSMIT_P(display_on) != I2C_STATUS_SUCCESS) {
+ print("oled_on cmd failed\n");
+ return oled_active;
+ }
+ oled_active = true;
+ }
+ return oled_active;
+}
+
+bool oled_off(void) {
+ static const uint8_t PROGMEM display_off[] = { I2C_CMD, DISPLAY_OFF };
+ if (oled_active) {
+ if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
+ print("oled_off cmd failed\n");
+ return oled_active;
+ }
+ oled_active = false;
+ }
+ return !oled_active;
+}
+
+bool oled_scroll_right(void) {
+ // Dont enable scrolling if we need to update the display
+ // This prevents scrolling of bad data from starting the scroll too early after init
+ if (!oled_dirty && !oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_right[] = {
+ I2C_CMD, SCROLL_RIGHT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_right) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_right cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = true;
+ }
+ return oled_scrolling;
+}
+
+bool oled_scroll_left(void) {
+ // Dont enable scrolling if we need to update the display
+ // This prevents scrolling of bad data from starting the scroll too early after init
+ if (!oled_dirty && !oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_left[] = {
+ I2C_CMD, SCROLL_LEFT, 0x00, 0x00, 0x00, 0x0F, 0x00, 0xFF, ACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_left) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_left cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = true;
+ }
+ return oled_scrolling;
+}
+
+bool oled_scroll_off(void) {
+ if (oled_scrolling) {
+ static const uint8_t PROGMEM display_scroll_off[] = { I2C_CMD, DEACTIVATE_SCROLL };
+ if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
+ print("oled_scroll_off cmd failed\n");
+ return oled_scrolling;
+ }
+ oled_scrolling = false;
+ }
+ return !oled_scrolling;
+}
+
+uint8_t oled_max_chars(void) {
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ return OLED_DISPLAY_WIDTH / OLED_FONT_WIDTH;
+ }
+ return OLED_DISPLAY_HEIGHT / OLED_FONT_WIDTH;
+}
+
+uint8_t oled_max_lines(void) {
+ if (!HAS_FLAGS(oled_rotation, OLED_ROTATION_90)) {
+ return OLED_DISPLAY_HEIGHT / OLED_FONT_HEIGHT;
+ }
+ return OLED_DISPLAY_WIDTH / OLED_FONT_HEIGHT;
+}
+
+void oled_task(void) {
+ if (!oled_initialized) {
+ return;
+ }
+
+ oled_set_cursor(0, 0);
+
+ oled_task_user();
+
+ // Smart render system, no need to check for dirty
+ oled_render();
+
+ // Display timeout check
+#if !defined(OLED_DISABLE_TIMEOUT)
+ if (oled_active && timer_elapsed(oled_last_activity) > OLED_TIMEOUT) {
+ oled_off();
+ }
+#endif
+}
+
+__attribute__((weak))
+void oled_task_user(void) {
+}
diff --git a/drivers/oled/oled_driver.h b/drivers/oled/oled_driver.h
new file mode 100644
index 000000000000..ec07f1d9b844
--- /dev/null
+++ b/drivers/oled/oled_driver.h
@@ -0,0 +1,192 @@
+/*
+Copyright 2019 Ryan Caltabiano
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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
+
+
+#if defined(OLED_DISPLAY_CUSTOM)
+ // Expected user to implement the necessary defines
+#elif defined(OLED_DISPLAY_128X64)
+ // Double height 128x64
+ #define OLED_DISPLAY_WIDTH 128
+ #define OLED_DISPLAY_HEIGHT 64
+ #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 1024 (compile time mathed)
+ #define OLED_BLOCK_TYPE uint32_t
+ #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 32 (compile time mathed)
+ #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
+
+ // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
+ // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
+ #define OLED_SOURCE_MAP { 32, 40, 48, 56 }
+ #define OLED_TARGET_MAP { 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint16_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
+ // #define OLED_TARGET_MAP { 56, 48, 40, 32, 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120 }
+ // #define OLED_TARGET_MAP { 56, 120, 48, 112, 40, 104, 32, 96, 24, 88, 16, 80, 8, 72, 0, 64 }
+#else // defined(OLED_DISPLAY_128X64)
+ // Default 128x32
+ #define OLED_DISPLAY_WIDTH 128
+ #define OLED_DISPLAY_HEIGHT 32
+ #define OLED_MATRIX_SIZE (OLED_DISPLAY_HEIGHT / 8 * OLED_DISPLAY_WIDTH) // 512 (compile time mathed)
+ #define OLED_BLOCK_TYPE uint16_t // Type to use for segmenting the oled display for smart rendering, use unsigned types only
+ #define OLED_BLOCK_COUNT (sizeof(OLED_BLOCK_TYPE) * 8) // 16 (compile time mathed)
+ #define OLED_BLOCK_SIZE (OLED_MATRIX_SIZE / OLED_BLOCK_COUNT) // 32 (compile time mathed)
+
+ // For 90 degree rotation, we map our internal matrix to oled matrix using fixed arrays
+ // The OLED writes to it's memory horizontally, starting top left, but our memory starts bottom left in this mode
+ #define OLED_SOURCE_MAP { 0, 8, 16, 24 }
+ #define OLED_TARGET_MAP { 24, 16, 8, 0 }
+ // If OLED_BLOCK_TYPE is uint8_t, these tables would look like:
+ // #define OLED_SOURCE_MAP { 0, 8, 16, 24, 32, 40, 48, 56 }
+ // #define OLED_TARGET_MAP { 48, 32, 16, 0, 56, 40, 24, 8 }
+#endif // defined(OLED_DISPLAY_CUSTOM)
+
+// Address to use for tthe i2d oled communication
+#if !defined(OLED_DISPLAY_ADDRESS)
+ #define OLED_DISPLAY_ADDRESS 0x3C
+#endif
+
+// Custom font file to use
+#if !defined(OLED_FONT_H)
+ #define OLED_FONT_H "glcdfont.c"
+#endif
+// unsigned char value of the first character in the font file
+#if !defined(OLED_FONT_START)
+ #define OLED_FONT_START 0
+#endif
+// unsigned char value of the last character in the font file
+#if !defined(OLED_FONT_END)
+ #define OLED_FONT_END 224
+#endif
+// Font render width
+#if !defined(OLED_FONT_WIDTH)
+ #define OLED_FONT_WIDTH 6
+#endif
+// Font render height
+#if !defined(OLED_FONT_HEIGHT)
+ #define OLED_FONT_HEIGHT 8
+#endif
+
+// OLED Rotation enum values are flags
+typedef enum {
+ OLED_ROTATION_0 = 0,
+ OLED_ROTATION_90 = 1,
+ OLED_ROTATION_180 = 2,
+ OLED_ROTATION_270 = 3, // OLED_ROTATION_90 | OLED_ROTATION_180
+} oled_rotation_t;
+
+// Initialize the oled display, rotating the rendered output based on the define passed in.
+// Returns true if the OLED was initialized successfully
+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_user(oled_rotation_t rotation);
+
+// Clears the display buffer, resets cursor position to 0, and sets the buffer to dirty for rendering
+void oled_clear(void);
+
+// Renders the dirty chunks of the buffer to oled display
+void oled_render(void);
+
+// Moves cursor to character position indicated by column and line, wraps if out of bounds
+// Max column denoted by 'oled_max_chars()' and max lines by 'oled_max_lines()' functions
+void oled_set_cursor(uint8_t col, uint8_t line);
+
+// Advances the cursor to the next page, writing ' ' if true
+// Wraps to the begining when out of bounds
+void oled_advance_page(bool clearPageRemainder);
+
+// Moves the cursor forward 1 character length
+// Advance page if there is not enough room for the next character
+// Wraps to the begining when out of bounds
+void oled_advance_char(void);
+
+// Writes a single character to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Main handler that writes character data to the display buffer
+void oled_write_char(const char data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+void oled_write(const char *data, bool invert);
+
+// Writes a string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+void oled_write_ln(const char *data, bool invert);
+
+#if defined(__AVR__)
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Remapped to call 'void oled_write(const char *data, bool invert);' on ARM
+void oled_write_P(const char *data, bool invert);
+
+// Writes a PROGMEM string to the buffer at current cursor position
+// Advances the cursor while writing, inverts the pixels if true
+// Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+// Remapped to call 'void oled_write_ln(const char *data, bool invert);' on ARM
+void oled_write_ln_P(const char *data, bool invert);
+#else
+ // Writes a string to the buffer at current cursor position
+ // Advances the cursor while writing, inverts the pixels if true
+ #define oled_write_P(data, invert) oled_write(data, invert)
+
+ // Writes a string to the buffer at current cursor position
+ // Advances the cursor while writing, inverts the pixels if true
+ // Advances the cursor to the next page, wiring ' ' to the remainder of the current page
+ #define oled_write_ln_P(data, invert) oled_write(data, invert)
+#endif // defined(__AVR__)
+
+// Can be used to manually turn on the screen if it is off
+// Returns true if the screen was on or turns on
+bool oled_on(void);
+
+// Can be used to manually turn off the screen if it is on
+// Returns true if the screen was off or turns off
+bool oled_off(void);
+
+// Basically it's oled_render, but with timeout management and oled_task_user calling!
+void oled_task(void);
+
+// Called at the start of oled_task, weak function overridable by the user
+void oled_task_user(void);
+
+// Scrolls the entire display right
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_right(void);
+
+// Scrolls the entire display left
+// Returns true if the screen was scrolling or starts scrolling
+// NOTE: display contents cannot be changed while scrolling
+bool oled_scroll_left(void);
+
+// Turns off display scrolling
+// Returns true if the screen was not scrolling or stops scrolling
+bool oled_scroll_off(void);
+
+// Returns the maximum number of characters that will fit on a line
+uint8_t oled_max_chars(void);
+
+// Returns the maximum number of lines that will fit on the oled
+uint8_t oled_max_lines(void);
diff --git a/drivers/qwiic/micro_oled.c b/drivers/qwiic/micro_oled.c
index 35c5d6ee1d93..092dd551e386 100644
--- a/drivers/qwiic/micro_oled.c
+++ b/drivers/qwiic/micro_oled.c
@@ -28,6 +28,7 @@
* along with this program. If not, see .
*/
#include "micro_oled.h"
+#include
#include
#include "util/font5x7.h"
#include "util/font8x16.h"
@@ -309,12 +310,11 @@ static uint8_t micro_oled_screen_buffer[] = {
#else
//catchall for custom screen szies
static uint8_t micro_oled_screen_buffer[LCDWIDTH*LCDWIDTH/8] = {0};
-#endif
+#endif
void micro_oled_init(void) {
-
i2c_init();
i2c_start(I2C_ADDRESS_SA0_1);
diff --git a/keyboards/1upkeyboards/1up60hse/1up60hse.h b/keyboards/1upkeyboards/1up60hse/1up60hse.h
index d24bbaabf604..f1b4f5e43e96 100644
--- a/keyboards/1upkeyboards/1up60hse/1up60hse.h
+++ b/keyboards/1upkeyboards/1up60hse/1up60hse.h
@@ -13,8 +13,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef KB_H
-#define KB_H
+#pragma once
#include "quantum.h"
@@ -36,4 +35,3 @@
{ 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, K49, K4A, K4B, KC_NO, K4D } \
}
-#endif
diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h
index 420d0a025897..188603622526 100644
--- a/keyboards/1upkeyboards/1up60hse/config.h
+++ b/keyboards/1upkeyboards/1up60hse/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, E6, D1, D0, D2, D3, D5, D6, D7 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B7
diff --git a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
index 48350a53e0c7..39473f606732 100644
--- a/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60hse/keymaps/default/keymap.c
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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(1), KC_LCTL
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL
),
[1] = LAYOUT_60_ansi(
diff --git a/keyboards/1upkeyboards/1up60hse/rules.mk b/keyboards/1upkeyboards/1up60hse/rules.mk
index f33e33fd9e47..72e6849e04f1 100644
--- a/keyboards/1upkeyboards/1up60hse/rules.mk
+++ b/keyboards/1upkeyboards/1up60hse/rules.mk
@@ -68,5 +68,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+EXTRAFLAGS += -flto
LAYOUTS = 60_ansi
diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h
index eb4082f1ae75..b6d3c8e0d15d 100644
--- a/keyboards/1upkeyboards/1up60hte/1up60hte.h
+++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h
@@ -19,12 +19,12 @@ along with this program. If not, see .
#include "quantum.h"
-#define LAYOUT_all( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+#define LAYOUT_tsangan( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \
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, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
- K400, K401, K402, K406, K410, K411, K412, K413 \
+ K400, K401, K402, K406, K410, K411, K412 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
@@ -35,11 +35,11 @@ along with this program. If not, see .
/* HHKB Variant */
#define LAYOUT_60_hhkb( \
- K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K413, \
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, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \
- K401, K402, K406, K410, K411, K413 \
+ K401, K402, K406, K410, K411 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \
@@ -47,4 +47,3 @@ along with this program. If not, see .
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \
{ KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413 } \
}
-
diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h
index c7e023a5edcb..892a8b9fe82c 100644
--- a/keyboards/1upkeyboards/1up60hte/config.h
+++ b/keyboards/1upkeyboards/1up60hte/config.h
@@ -62,4 +62,4 @@ along with this program. If not, see .
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
-#endif
+#endif
\ No newline at end of file
diff --git a/keyboards/1upkeyboards/1up60hte/info.json b/keyboards/1upkeyboards/1up60hte/info.json
new file mode 100644
index 000000000000..86521d36bd33
--- /dev/null
+++ b/keyboards/1upkeyboards/1up60hte/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "1up60hte",
+ "url": "https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/",
+ "maintainer": "1upkeyboards",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_tsangan": {
+ "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":"|", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}]
+ },
+ "LAYOUT_60_hhkb": {
+ "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":"|", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "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}, {"label":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"label":"Meta", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Meta", "x":11, "y":4, "w":1.5}, {"label":"Alt", "x":12.5, "y":4}]
+ }
+ }
+}
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
index 396b660803a2..359ac7540637 100644
--- a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c
@@ -17,21 +17,19 @@ along with this program. If not, see .
#include QMK_KEYBOARD_H
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_GRV,
- 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_LSFT, KC_NO,
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC),
-
- [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)
-
+ [0] = LAYOUT_tsangan(
+ 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_BSLS, KC_GRV,
+ 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL),
+
+ [1] = LAYOUT_tsangan(
+ 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, KC_INS, KC_DEL,
+ KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
void matrix_init_user(void) {
@@ -46,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(B6);
} else {
writePinHigh(B6);
}
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
}
diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
index 1b06739b68f4..5312e3b6752a 100644
--- a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
+++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c
@@ -17,20 +17,19 @@ along with this program. If not, see .
#include QMK_KEYBOARD_H
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_GRV,
- 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1),
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC),
-
- [1] = LAYOUT_all(
- 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, KC_INS,
- KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
- KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL)
+ [0] = LAYOUT_tsangan(
+ 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_BSLS, KC_GRV,
+ 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
+ KC_NO, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_NO),
+
+ [1] = LAYOUT_tsangan(
+ 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, KC_INS, KC_DEL,
+ KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_CLR,
+ KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS,
+ KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
void matrix_init_user(void) {
@@ -45,35 +44,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
void led_set_user(uint8_t usb_led) {
-
- if (usb_led & (1 << USB_LED_NUM_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
writePinLow(B6);
} else {
writePinHigh(B6);
}
-
- if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_COMPOSE)) {
-
- } else {
-
- }
-
- if (usb_led & (1 << USB_LED_KANA)) {
-
- } else {
-
- }
-
}
diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk
index b8b5582991ba..860a754a643d 100644
--- a/keyboards/1upkeyboards/1up60hte/rules.mk
+++ b/keyboards/1upkeyboards/1up60hte/rules.mk
@@ -54,5 +54,6 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
+EXTRAFLAGS += -flto
LAYOUTS = 60_hhkb
diff --git a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h
index 6905fd220508..0f6818a6d861 100644
--- a/keyboards/1upkeyboards/1up60rgb/1up60rgb.h
+++ b/keyboards/1upkeyboards/1up60rgb/1up60rgb.h
@@ -1,5 +1,4 @@
-#ifndef KB_H
-#define KB_H
+#pragma once
#include "quantum.h"
@@ -77,5 +76,3 @@
K300, KC_NO,K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \
KC_NO,K401, K403, K406, KC_NO,K411, K413, KC_NO \
)
-
-#endif
diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h
index 86696dab8457..fbafe0c44bc1 100644
--- a/keyboards/1upkeyboards/1up60rgb/config.h
+++ b/keyboards/1upkeyboards/1up60rgb/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/1upkeyboards/1up60rgb/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
index cb372e15d733..8567b780a75d 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "1up60rgb.h"
+#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
diff --git a/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c
new file mode 100644
index 000000000000..bb0d10405cd2
--- /dev/null
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/mdyevimnav/keymap.c
@@ -0,0 +1,48 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/*
+ * Layer 0
+ * ,-----------------------------------------------------------------------------------------.
+ * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | q | w | e | r | t | y | u | i | o | p | [ | ] | \ |
+ * |-----------------------------------------------------------------------------------------+
+ * | Esc | a | s | d | f | g | h | j | k | l | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | z | x | c | v | b | n | m | , | . | / | Shift |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | L1 | Alt | space | Alt | Sup | L1 | Ctrl |
+ * \-----------------------------------------------------------------------------------------/
+ *
+ */
+ LAYOUT_all(
+ 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_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_ESC, 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_ENT,
+ KC_LSHIFT, KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT, KC_RSHIFT,
+ KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL),
+
+/*
+ * Layer 1
+ * ,-----------------------------------------------------------------------------------------.
+ * | | f1 | f2 | f3 | f4 | f5 | f6 | f7 | f8 | f9 | f10 | f11 | f12 | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | Ins | | Paus| | | Prnt |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | L | D | U | R | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | Hom | PDn | PUp | End | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | |
+ * \-----------------------------------------------------------------------------------------/
+ *
+ */
+ LAYOUT_all(
+ KC_TRNS, 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_DEL,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PAUS, KC_TRNS, KC_TRNS, KC_PSCR,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, 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/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
index c166cd0b18c3..f4dd36d6dc5a 100644
--- a/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
+++ b/keyboards/1upkeyboards/1up60rgb/keymaps/raffle/keymap.c
@@ -37,11 +37,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
RAISE, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, RGB, KC_RCTL
),
// raise layer to handle function & nav keys
- [_raise] = LAYOUT_all
+ [_raise] = 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_DEL, KC_DEL,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_LSCR, KC_PAUSE, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, KC_DEL, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_APP, KC_TRNS, KC_TRNS, KC_TRNS, 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, KC_TRNS, KC_TRNS, KC_TRNS
),
diff --git a/keyboards/1upkeyboards/1up60rgb/readme.md b/keyboards/1upkeyboards/1up60rgb/readme.md
index de3ad98b7388..ad733f6b5e55 100644
--- a/keyboards/1upkeyboards/1up60rgb/readme.md
+++ b/keyboards/1upkeyboards/1up60rgb/readme.md
@@ -1,4 +1,4 @@
-# 1upkeyboards 60% RGB
+# 1up60rgb 60% RGB
Firmware for custom keyboard PCB with 60% key layout.
diff --git a/keyboards/1upkeyboards/1up60rgb/rules.mk b/keyboards/1upkeyboards/1up60rgb/rules.mk
index 540e4ea96c27..8b1cf6667fa1 100644
--- a/keyboards/1upkeyboards/1up60rgb/rules.mk
+++ b/keyboards/1upkeyboards/1up60rgb/rules.mk
@@ -44,15 +44,15 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
# comment out to disable the options.
#
-BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
-CONSOLE_ENABLE ?= no # Console for debug(+400)
-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 ?= yes # Enable keyboard backlight functionality
-AUDIO_ENABLE ?= no
-RGBLIGHT_ENABLE ?= yes
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
LAYOUTS = 60_ansi 60_iso 60_ansi_split_bs_rshift 60_hhkb
diff --git a/keyboards/1upkeyboards/readme.md b/keyboards/1upkeyboards/readme.md
index 4f075d827922..de8ae36acb6c 100644
--- a/keyboards/1upkeyboards/readme.md
+++ b/keyboards/1upkeyboards/readme.md
@@ -1,5 +1,7 @@
# 1UP Keyboards
+1UP Keyboards is an online mechanical keyboard retailer located in New York, USA.
+
Website: [1UP Keyboards](https://www.1upkeyboards.com/)
Discord: [Server Invite](https://discordapp.com/invite/c6SYn8)
YouTube: [skiwithpete](https://www.youtube.com/user/skiwithpete)
\ No newline at end of file
diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h
index 1f97c6fea90b..4af4dda63ae3 100644
--- a/keyboards/1upkeyboards/super16/config.h
+++ b/keyboards/1upkeyboards/super16/config.h
@@ -21,7 +21,7 @@ along with this program. If not, see .
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x0000
+#define PRODUCT_ID 0x2010
#define DEVICE_VER 0x0001
#define MANUFACTURER 1upkeyboards
#define PRODUCT super16
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D4, C6, F6, F7 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
@@ -65,9 +65,9 @@ along with this program. If not, see .
#define RGBLIGHT_VAL_STEP 8
#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 ==*/
+ /*== all animations enable ==*/
+ #define RGBLIGHT_ANIMATIONS
+ /*== or choose animations ==*/
// #define RGBLIGHT_EFFECT_BREATHING
// #define RGBLIGHT_EFFECT_RAINBOW_MOOD
// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@@ -85,10 +85,9 @@ along with this program. If not, see .
/* 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
@@ -242,3 +241,5 @@ along with this program. If not, see .
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0
+
+/* prevent stuck modifiers */
diff --git a/keyboards/1upkeyboards/super16/info.json b/keyboards/1upkeyboards/super16/info.json
index e8f4faa23d4a..10f81f4d08b5 100644
--- a/keyboards/1upkeyboards/super16/info.json
+++ b/keyboards/1upkeyboards/super16/info.json
@@ -1,12 +1,15 @@
{
- "keyboard_name": "super16",
- "url": "",
- "maintainer": "qmk",
- "width": 4,
- "height": 4,
- "layouts": {
- "LAYOUT_ortho_4x4": {
- "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}]
- }
+ "keyboard_name": "super16",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "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}]
+ },
+ "LAYOUT_numpad_4x4": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0, "h":2}, {"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":2, "h":2}, {"x":0, "y":3, "w":2}, {"x":2, "y":3}]
}
-}
\ No newline at end of file
+ }
+}
diff --git a/keyboards/1upkeyboards/super16/keymaps/default/config.h b/keyboards/1upkeyboards/super16/keymaps/default/config.h
index 16fc8b974680..26c6d6ade101 100644
--- a/keyboards/1upkeyboards/super16/keymaps/default/config.h
+++ b/keyboards/1upkeyboards/super16/keymaps/default/config.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 'mechmerlin'
+/* 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
diff --git a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
index 36ad3f2839af..47889abae574 100644
--- a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c
@@ -15,40 +15,16 @@
*/
#include QMK_KEYBOARD_H
-// Defines the keycodes used by our macros in process_record_user
-enum custom_keycodes {
- QMKBEST = SAFE_RANGE,
- QMKURL
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x4( /* Base */
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4, \
- KC_A, KC_1, KC_2, KC_4 \
+ RGB_TOG, KC_1, KC_U, KC_P,
+ RGB_MOD, KC_1, KC_U, KC_P,
+ RGB_TOG, KC_1, KC_U, KC_P,
+ RGB_MOD, KC_1, KC_U, KC_P
),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- switch (keycode) {
- case QMKBEST:
- if (record->event.pressed) {
- // when keycode QMKBEST is pressed
- SEND_STRING("QMK is the best thing ever!");
- } else {
- // when keycode QMKBEST is released
- }
- break;
- case QMKURL:
- if (record->event.pressed) {
- // when keycode QMKURL is pressed
- SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
- } else {
- // when keycode QMKURL is released
- }
- break;
- }
return true;
}
diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk
index efcde883428f..31042dfb8119 100644
--- a/keyboards/1upkeyboards/super16/rules.mk
+++ b/keyboards/1upkeyboards/super16/rules.mk
@@ -1,5 +1,4 @@
# MCU name
-#MCU = at90usb1286
MCU = atmega32u4
# Processor frequency.
@@ -15,7 +14,6 @@ MCU = atmega32u4
# software delays.
F_CPU = 16000000
-
#
# LUFA specific
#
@@ -48,7 +46,6 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# atmega32a bootloadHID
BOOTLOADER = caterina
-
# If you don't know the bootloader type, then you can specify the
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
# Teensy halfKay 512
@@ -58,26 +55,27 @@ BOOTLOADER = caterina
# USBaspLoader 2048
# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+#EXTRAFLAGS += -flto
# Build Options
# change yes to no to disable
#
-BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
-HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
-LAYOUTS = ortho_4x4
\ No newline at end of file
+LAYOUTS = ortho_4x4 numpad_4x4
diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c
index cf33cab92698..72e47f447b12 100644
--- a/keyboards/1upkeyboards/super16/super16.c
+++ b/keyboards/1upkeyboards/super16/super16.c
@@ -16,28 +16,28 @@
#include "super16.h"
void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
- matrix_init_user();
+ matrix_init_user();
}
void matrix_scan_kb(void) {
- // put your looping keyboard code here
- // runs every cycle (a lot)
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
- matrix_scan_user();
+ matrix_scan_user();
}
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- // put your per-action keyboard code here
- // runs for every action, just before processing by the firmware
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
- return process_record_user(keycode, record);
+ return process_record_user(keycode, record);
}
void led_set_kb(uint8_t usb_led) {
- // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
- led_set_user(usb_led);
+ led_set_user(usb_led);
}
diff --git a/keyboards/1upkeyboards/super16/super16.h b/keyboards/1upkeyboards/super16/super16.h
index a95f687b164a..0595af8dcd6e 100644
--- a/keyboards/1upkeyboards/super16/super16.h
+++ b/keyboards/1upkeyboards/super16/super16.h
@@ -25,15 +25,27 @@
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
+
#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 } \
+}
+
+#define LAYOUT_numpad_4x4( \
+ K00, K01, K02, K03, \
+ K10, K11, K12, \
+ K20, K21, K22, K23, \
+ K31, K32 \
+) { \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, KC_NO }, \
+ { K20, K21, K22, K23 }, \
+ { KC_NO, K31, K32, KC_NO } \
}
diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h
index eedd3708f219..b05b5774006e 100644
--- a/keyboards/1upkeyboards/sweet16/config.h
+++ b/keyboards/1upkeyboards/sweet16/config.h
@@ -1,5 +1,4 @@
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
@@ -47,4 +46,3 @@
#define RGBLIGHT_VAL_STEP 8
#endif
-#endif
diff --git a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
index 899afaba1742..4cc754dc164d 100644
--- a/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
+++ b/keyboards/1upkeyboards/sweet16/keymaps/default/keymap.c
@@ -1,4 +1,4 @@
-#include "sweet16.h"
+#include QMK_KEYBOARD_H
enum custom_keycodes {
UP_URL = SAFE_RANGE
diff --git a/keyboards/1upkeyboards/sweet16/readme.md b/keyboards/1upkeyboards/sweet16/readme.md
index 3b7b1d6f0b09..f096a5fc992a 100644
--- a/keyboards/1upkeyboards/sweet16/readme.md
+++ b/keyboards/1upkeyboards/sweet16/readme.md
@@ -1,5 +1,4 @@
-Sweet16
-===
+# Sweet 16 Macropad
A 4x4 numpad/macro pad sold by 1up Keyboards - designed by Bishop Keyboards
diff --git a/keyboards/1upkeyboards/sweet16/rules.mk b/keyboards/1upkeyboards/sweet16/rules.mk
index 212e74059e4b..e3436dc3387f 100644
--- a/keyboards/1upkeyboards/sweet16/rules.mk
+++ b/keyboards/1upkeyboards/sweet16/rules.mk
@@ -53,4 +53,5 @@ 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
\ No newline at end of file
+RGBLIGHT_ENABLE = yes
+EXTRAFLAGS += -flto
diff --git a/keyboards/1upkeyboards/sweet16/sweet16.h b/keyboards/1upkeyboards/sweet16/sweet16.h
index 879f51fae66a..7320ccd9e074 100644
--- a/keyboards/1upkeyboards/sweet16/sweet16.h
+++ b/keyboards/1upkeyboards/sweet16/sweet16.h
@@ -1,5 +1,4 @@
-#ifndef KB_H
-#define KB_H
+#pragma once
#include "quantum.h"
@@ -29,4 +28,3 @@
{ KC_NO, K31, K32, KC_NO } \
}
-#endif
diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h
index 338683ee7e7b..7381a76d92e5 100644
--- a/keyboards/40percentclub/25/config.h
+++ b/keyboards/40percentclub/25/config.h
@@ -54,7 +54,7 @@
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h
index 5dc780f0e7b3..3b41e501d473 100644
--- a/keyboards/40percentclub/4x4/config.h
+++ b/keyboards/40percentclub/4x4/config.h
@@ -30,7 +30,7 @@
#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN C7
diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h
index bf521e71e91e..f1c348a48ff5 100644
--- a/keyboards/40percentclub/5x5/config.h
+++ b/keyboards/40percentclub/5x5/config.h
@@ -30,7 +30,7 @@
#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h
index 6a96c4757dd5..c6beafa41221 100644
--- a/keyboards/40percentclub/6lit/config.h
+++ b/keyboards/40percentclub/6lit/config.h
@@ -55,7 +55,7 @@
#define MATRIX_COL_PINS { F6, F7, B1 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h
index aba9f09ae478..1443c1ca1ddf 100644
--- a/keyboards/40percentclub/foobar/config.h
+++ b/keyboards/40percentclub/foobar/config.h
@@ -55,7 +55,7 @@
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/40percentclub/foobar/info.json b/keyboards/40percentclub/foobar/info.json
index cb7f29b25613..6d722ae6ee86 100644
--- a/keyboards/40percentclub/foobar/info.json
+++ b/keyboards/40percentclub/foobar/info.json
@@ -2,10 +2,12 @@
"keyboard_name": "foobar",
"url": "",
"maintainer": "qmk",
- "width": 6,
- "height": 2,
+ "width": 10,
+ "height": 3,
"layouts": {
"LAYOUT_macro": {
+ "width": 5,
+ "height": 3,
"key_count": 15,
"layout": [
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0},
diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h
index 1c4298bc3894..c74fcacbb951 100644
--- a/keyboards/40percentclub/half_n_half/config.h
+++ b/keyboards/40percentclub/half_n_half/config.h
@@ -45,13 +45,14 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
-#define DIODE_DIRECTION ROW2COL
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
/*
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
*/
#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+#define USE_SERIAL
// #define BACKLIGHT_PIN B7
// #define BACKLIGHT_BREATHING
diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h
index 6cec5992908c..bc330c9cb7b8 100644
--- a/keyboards/40percentclub/half_n_half/half_n_half.h
+++ b/keyboards/40percentclub/half_n_half/half_n_half.h
@@ -16,6 +16,7 @@
#pragma once
#include "quantum.h"
+#define ___ KC_NO
/* This a shortcut to help you visually see your layout.
*
@@ -26,18 +27,22 @@
* represents the switch matrix.
*/
#define LAYOUT( \
- 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, K76, \
- K34, K82 \
+ 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, \
+ L34, R32 \
) { \
- { K00, K01, K02, K03, K04, K05, K06 }, \
- { K10, K11, K12, K13, K14, K15, K16 }, \
- { K20, K21, K22, K23, K24, K25, K26 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \
+ { L00, L01, L02, L03, L04, L05, L06 }, \
+ { L10, L11, L12, L13, L14, L15, L16 }, \
+ { L20, L21, L22, L23, L24, L25, L26 }, \
+ { ___, ___, ___, ___, L34, ___, ___ }, \
\
- { K56, K55, K54, K53, K52, K51, K50 }, \
- { K66, K65, K64, K63, K62, K61, K60 }, \
- { K76, K75, K74, K73, K72, K71, K70 }, \
- { KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \
+ { R06, R05, R04, R03, R02, R01, R00 }, \
+ { R16, R15, R14, R13, R12, R11, R10 }, \
+ { R26, R25, R24, R23, R22, R21, R20 }, \
+ { ___, ___, ___, ___, R32, ___, ___ } \
}
+
+#ifdef USE_I2C
+ #error "I2C not Supported"
+#endif
diff --git a/keyboards/40percentclub/half_n_half/info.json b/keyboards/40percentclub/half_n_half/info.json
index e69de29bb2d1..e791e36c68a8 100644
--- a/keyboards/40percentclub/half_n_half/info.json
+++ b/keyboards/40percentclub/half_n_half/info.json
@@ -0,0 +1,62 @@
+{
+ "keyboard_name": "half_n_half",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 14,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 44,
+ "layout": [
+ {"label":"L00", "x":0, "y":0},
+ {"label":"L01", "x":1, "y":0},
+ {"label":"L02", "x":2, "y":0},
+ {"label":"L03", "x":3, "y":0},
+ {"label":"L04", "x":4, "y":0},
+ {"label":"L05", "x":5, "y":0},
+ {"label":"L06", "x":6, "y":0},
+ {"label":"R00", "x":7, "y":0},
+ {"label":"R01", "x":8, "y":0},
+ {"label":"R02", "x":9, "y":0},
+ {"label":"R03", "x":10, "y":0},
+ {"label":"R04", "x":11, "y":0},
+ {"label":"R05", "x":12, "y":0},
+ {"label":"R06", "x":13, "y":0},
+
+ {"label":"L10", "x":0, "y":1},
+ {"label":"L11", "x":1, "y":1},
+ {"label":"L12", "x":2, "y":1},
+ {"label":"L13", "x":3, "y":1},
+ {"label":"L14", "x":4, "y":1},
+ {"label":"L15", "x":5, "y":1},
+ {"label":"L16", "x":6, "y":1},
+ {"label":"R10", "x":7, "y":1},
+ {"label":"R11", "x":8, "y":1},
+ {"label":"R12", "x":9, "y":1},
+ {"label":"R13", "x":10, "y":1},
+ {"label":"R14", "x":11, "y":1},
+ {"label":"R15", "x":12, "y":1},
+ {"label":"R16", "x":13, "y":1},
+
+ {"label":"L20", "x":0, "y":2},
+ {"label":"L21", "x":1, "y":2},
+ {"label":"L22", "x":2, "y":2},
+ {"label":"L23", "x":3, "y":2},
+ {"label":"L24", "x":4, "y":2},
+ {"label":"L25", "x":5, "y":2},
+ {"label":"L26", "x":6, "y":2},
+ {"label":"R20", "x":7, "y":2},
+ {"label":"R21", "x":8, "y":2},
+ {"label":"R22", "x":9, "y":2},
+ {"label":"R23", "x":10, "y":2},
+ {"label":"R24", "x":11, "y":2},
+ {"label":"R25", "x":12, "y":2},
+ {"label":"R26", "x":13, "y":2},
+
+ {"label":"L34", "x":4, "y":3, "w":2},
+ {"label":"R32", "x":8, "y":3, "w":2}
+ ]
+ }
+ }
+}
+
\ No newline at end of file
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h
new file mode 100644
index 000000000000..f73fd055cc27
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/config.h
@@ -0,0 +1,22 @@
+/* Copyright 2019 Boy_314
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// place overrides here
+#define IGNORE_MOD_TAP_INTERRUPT
+#define PERMISSIVE_HOLD
+#define TAPPING_TERM 200
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c
new file mode 100644
index 000000000000..2eef3dc48b86
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/keymap.c
@@ -0,0 +1,173 @@
+/* Copyright 2019 Boy_314
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// Tap Dance Declarations
+enum {
+ TD_SWAP_LAYERS = 0
+};
+
+enum layers {
+ _DVORAK,
+ _QWERTY,
+ _LOWER,
+ _RAISE,
+};
+
+enum halfnhalf_keycodes {
+ NEWTAB = SAFE_RANGE,
+ ALTF4,
+ CLSTAB,
+ PRVWIN,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* DVORAK
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Tab |' |, |. |P |Y |Brght+|= |F |G |C |R |L |Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |CtlCps|A |O |E |U |I |Brght-|Ctrl+F|D |H |T |N |S |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LShift|; |Q |J |K |X |LAlt |- |B |M |W |V |Z |RShift|
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |TD Swap Layer| |Space |
+ * `-------------' `-------------'
+ */
+ [_DVORAK] = LAYOUT(/* Base Dvorak */
+ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_BRIU, KC_EQL, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
+ LCTL_T(KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_BRID, LCTL(KC_F), KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT,
+ KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_LALT, KC_MINS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC,
+ TD(TD_SWAP_LAYERS), KC_SPC
+ ),
+
+ /* QWERTY
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Tab |Q |W |E |R |T |Brght+|' |Y |U |I |O |P |Bksp |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |CtlCps|A |S |D |F |G |Brght-|Ctrl+F|H |J |K |L |; |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |LShift|Z |X |C |V |B |LAlt |- |N |M |, |. |/ |RShift|
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |TD Swap Layer| |Space |
+ * `-------------' `-------------'
+ */
+ [_QWERTY] = LAYOUT(/* Base Qwerty */
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BRIU, KC_QUOT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LCTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BRID, LCTL(KC_F), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
+ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_MINS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC,
+ TD(TD_SWAP_LAYERS), KC_SPC
+ ),
+
+ /* LOWER
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Esc |1 |2 |3 |4 |5 | | |6 |7 |8 |9 |0 |/ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |Caps |F1 |F2 |F3 |F4 |F5 |F6 |Vol Up|Play |_ |+ |{ |} || |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |F7 |F8 |F9 |F10 |F11 |F12 |Vol Dn|Next |Home |PgDn |PgUp |End | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | |
+ * `-------------' `-------------'
+ */
+ [_LOWER] = LAYOUT(/* Numbers, Function Row, Media Control, Shifted Symbols, Dvorak Slash Key */
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH,
+ KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_VOLU, KC_MPLY, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_VOLD, KC_MNXT, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ ),
+
+ /* RAISE
+ * ,-------------------------------------------------------------------------------------------------.
+ * |Reset | | |Up | | | |PRVWIN|CLSTAB| | | | |Del |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * |` | |Left |Down |Right | | |NEWTAB|ALTF4 |- |= |[ |] |\ |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | |! |@ |# |$ |% | | |^ |& |* |( |) | |
+ * |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
+ * | | | |
+ * `-------------' `-------------'
+ */
+ [_RAISE] = LAYOUT(/* Arrows, Shifted Numbers, Symbols, Delete, Macros */
+ RESET, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, PRVWIN, CLSTAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL,
+ KC_GRV, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, NEWTAB, ALTF4, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TRNS, KC_TRNS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
+ KC_TRNS, KC_TRNS
+ )
+};
+
+void tap_dance_choose_layer (qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ layer_on(_LOWER);
+ break;
+ case 2:
+ layer_on(_RAISE);
+ break;
+ }
+}
+
+void tap_dance_choose_layer_reset (qk_tap_dance_state_t *state, void *user_data) {
+ switch (state->count) {
+ case 1:
+ layer_off(_LOWER);
+ break;
+ case 2:
+ layer_off(_RAISE);
+ break;
+ case 3:
+ if (biton32(default_layer_state) == _DVORAK) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ else if (biton32(default_layer_state) == _QWERTY) {
+ set_single_persistent_default_layer(_DVORAK);
+ }
+ break;
+ }
+}
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [TD_SWAP_LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tap_dance_choose_layer, tap_dance_choose_layer_reset)
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ // Control + T
+ case NEWTAB:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL("t"));
+ }
+ break;
+ // Alt + F4
+ case ALTF4:
+ if (record->event.pressed) {
+ SEND_STRING(SS_DOWN(X_LALT)SS_TAP(X_F4)SS_UP(X_LALT));
+ }
+ break;
+ // Control + W
+ case CLSTAB:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL("w"));
+ }
+ break;
+ // Control + Shift + N
+ case PRVWIN:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL(SS_LSFT("n")));
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md
new file mode 100644
index 000000000000..9eff08b5ea43
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/readme.md
@@ -0,0 +1,2 @@
+# Boy_314's keymap for half_n_half
+# Currently only supports DVORAK. QWERTY Support is on the TODO list.
\ No newline at end of file
diff --git a/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk
new file mode 100644
index 000000000000..59c7ccf82752
--- /dev/null
+++ b/keyboards/40percentclub/half_n_half/keymaps/Boy_314/rules.mk
@@ -0,0 +1,5 @@
+TAP_DANCE_ENABLE = yes # Enable Tap Dance
+NKRO_ENABLE = yes # USB Nkey Rollover
+
+# Enable generic behavior for split boards
+SPLIT_KEYBOARD = yes
\ No newline at end of file
diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk
index bd0d8f808cd4..cc5fccee9844 100644
--- a/keyboards/40percentclub/half_n_half/rules.mk
+++ b/keyboards/40percentclub/half_n_half/rules.mk
@@ -79,3 +79,6 @@ BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+# Enable generic behavior for split boards
+SPLIT_KEYBOARD = yes
diff --git a/keyboards/40percentclub/i75/promicro/config.h b/keyboards/40percentclub/i75/promicro/config.h
index bc9146328ed7..d4cd99773622 100644
--- a/keyboards/40percentclub/i75/promicro/config.h
+++ b/keyboards/40percentclub/i75/promicro/config.h
@@ -36,5 +36,5 @@
#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/40percentclub/i75/teensy2/config.h b/keyboards/40percentclub/i75/teensy2/config.h
index fdbde8d6437d..bcf9b1b888bd 100644
--- a/keyboards/40percentclub/i75/teensy2/config.h
+++ b/keyboards/40percentclub/i75/teensy2/config.h
@@ -36,5 +36,5 @@
#define MATRIX_COL_PINS { C6, C7, D6, D7, B5, B6, F7, F6, F5 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h
index 857205c37d8f..25252d160326 100644
--- a/keyboards/40percentclub/mf68/config.h
+++ b/keyboards/40percentclub/mf68/config.h
@@ -52,6 +52,28 @@ along with this program. If not, see .
#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
+// #define RGB_DI_PIN E2
+// #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 /* 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
+
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCING_DELAY 5
diff --git a/keyboards/40percentclub/mf68/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/default/keymap.c
index ae7e7297cb89..c91b9b908aba 100644
--- a/keyboards/40percentclub/mf68/keymaps/default/keymap.c
+++ b/keyboards/40percentclub/mf68/keymaps/default/keymap.c
@@ -3,51 +3,29 @@
#define _QWERTY 0
#define _FN1 1
#define _FN2 2
-#define KC_ KC_TRNS
-#define KC_X0 LT(_FN2, KC_GRV)
-#define KC_X1 MO(_FN1)
-#define KC_X2 BL_STEP
+
+#define FN2_GRV LT(_FN2, KC_GRV)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [_QWERTY] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , BSPC , INS ,PGUP,
- /*|----`----`----`----`----`----`----`----`----`----`----`----`----`--------| |----`----| */
- TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, BSLS , DEL ,PGDN,
- /*|------`----`----`----`----`----`----`----`----`----`----`----`----`------| `----`----' */
- X0 , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, ENTER ,
- /*|-------`----`----`----`----`----`----`----`----`----`----`----`----------| ,----. */
- LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , UP ,
- /*|---------`----`----`----`----`----`----`----`----`----`----`-------------.--|----|----. */
- LCTL ,LGUI ,LALT , SPACE , X1 ,RALT ,RCTL , LEFT,DOWN,RGHT
- /*`-----+-----+-----+------------------------------+------+-----+-----' `----+----+----' */
+ [_QWERTY] = LAYOUT_68_ansi(
+ 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_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,
+ FN2_GRV, 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, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
),
-
- [_FN1] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , , , , , , X2 , , VOLD,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , , , , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , ,MUTE, , , , , MUTE,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ [_FN1] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME,
+ _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, _______, KC_VOLD, KC_END,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, _______, _______, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
),
-
- [_FN2] = LAYOUT_kc(
- /*,----+----+----+----+----+----+----+----+----+----+----+----+----+--------. ,----+----. */
- GRV , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , BSPC , VOLU,HOME,
- /*|esc-`-1--`-2--`-3--`-4--`-5--`-6--`-7--`-8--`-9--`-0--`mnus`plus`--bksp--| |ins-`pgup| */
- , , , UP , , , , 7 , 8 , 9 , , , , , VOLD,END,
- /*|tab---`-q--`-w--`-e--`-r--`-t--`-y--`-u--`-i--`-o--`-p--`-{--`-}--`--|---| `del-`pgdn' */
- , ,LEFT,DOWN,RGHT, , , 4 , 5 , 6 , , , ,
- /*|caps---`-a--`-s--`-d--`-f--`-g--`-h--`-j--`-k--`-l--`-;--`-'--`----enter-| ,----. */
- , , , , , , 0 , 1 , 2 , 3 , , , MUTE,
- /*|shift----`-z--`-x--`-c--`-v--`-b--`-n--`-m--`-,--`-.--`-/--`-------shift-.--|-up-|----. */
- , , , , , , , MPRV,MPLY,MNXT
- /*`ctrl-+-gui-+-alt-+----------space---------------+-fn---+-alt-+ctrl-' `left+down+rght' */
+ [_FN2] = LAYOUT_68_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_BSPC, KC_VOLU, KC_HOME,
+ _______, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_VOLD, KC_END,
+ _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, _______, _______, KC_MUTE,
+ _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT
)
};
diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h
new file mode 100644
index 000000000000..7d96ab9e249c
--- /dev/null
+++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/config.h
@@ -0,0 +1,43 @@
+/*
+Copyright 2012 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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* Overrides for Feather 32u4 Bluefruit */
+
+/* USB Device descriptor parameter */
+#undef DESCRIPTION
+#define DESCRIPTION Magicforce 68 BLE
+
+/*
+ * 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)
+ *
+*/
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+#undef UNUSED_PINS
+#define MATRIX_ROW_PINS { D1, D0, C6, D7, B5, B6, B7, D6 }
+#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 }
+#define UNUSED_PINS {B5}
diff --git a/keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c b/keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c
similarity index 100%
rename from keyboards/40percentclub/mf68_ble/keymaps/default/keymap.c
rename to keyboards/40percentclub/mf68/keymaps/mf68_ble/keymap.c
diff --git a/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md
new file mode 100644
index 000000000000..e590ae3e6db4
--- /dev/null
+++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/readme.md
@@ -0,0 +1,29 @@
+# mf68_ble
+
+![mf68_ble](https://i.imgur.com/zuTyy7k.jpg)
+===
+
+Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/)
+Please note: This is 32u4 and not M0
+Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb)
+[MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc)
+Story
+-----
+
+The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/)
+
+Wiring
+------
+
+Below is how you wire the Feather to PCB
+
+![wire map](https://i.imgur.com/zYOjlTA.png)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make 40percentclub/mf68:mf68_ble
+
+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/mf68/keymaps/mf68_ble/rules.mk b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk
new file mode 100644
index 000000000000..2509d0bf4eb1
--- /dev/null
+++ b/keyboards/40percentclub/mf68/keymaps/mf68_ble/rules.mk
@@ -0,0 +1,66 @@
+# Overrides for Feather 32u4 Bluefruit
+# MCU name
+MCU = atmega32u4
+
+# 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 = 8000000
+
+
+#
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BLUETOOTH = AdafruitBLE
+BACKLIGHT_ENABLE = no
diff --git a/keyboards/40percentclub/mf68/rules.mk b/keyboards/40percentclub/mf68/rules.mk
index 38c9f517b9d4..27642d8604fe 100644
--- a/keyboards/40percentclub/mf68/rules.mk
+++ b/keyboards/40percentclub/mf68/rules.mk
@@ -63,13 +63,14 @@ BOOTLOADER = caterina
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
MIDI_ENABLE = no # MIDI controls
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h
deleted file mode 100644
index 3d9bb360bf5e..000000000000
--- a/keyboards/40percentclub/mf68_ble/config.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
-Copyright 2012 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 .
-*/
-
-#pragma once
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0xCEEB
-#define PRODUCT_ID 0x0510
-#define DEVICE_VER 0x0101
-#define MANUFACTURER di0ib
-#define PRODUCT MF68
-#define DESCRIPTION Magicforce 68 BLE
-
-/* key matrix size */
-#define MATRIX_ROWS 8
-#define MATRIX_COLS 9
-
-/*
- * 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 { D1, D0, C6, D7, B5, B6, B7, D6 }
-#define MATRIX_COL_PINS { C7, F7, F6, F5, F4, F1, F0, D2, D3 }
-#define UNUSED_PINS {B5}
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-/*
-#define BACKLIGHT_PIN B5
-#define BACKLIGHT_BREATHING
-#define BACKLIGHT_LEVELS 3
-*/
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 5
-
-/* 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
-
-/*
- * 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
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1 H
-//#define MAGIC_KEY_HELP2 SLASH
-//#define MAGIC_KEY_DEBUG D
-//#define MAGIC_KEY_DEBUG_MATRIX X
-//#define MAGIC_KEY_DEBUG_KBD K
-//#define MAGIC_KEY_DEBUG_MOUSE M
-//#define MAGIC_KEY_VERSION V
-//#define MAGIC_KEY_STATUS S
-//#define MAGIC_KEY_CONSOLE C
-//#define MAGIC_KEY_LAYER0_ALT1 ESC
-//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
-//#define MAGIC_KEY_LAYER0 0
-//#define MAGIC_KEY_LAYER1 1
-//#define MAGIC_KEY_LAYER2 2
-//#define MAGIC_KEY_LAYER3 3
-//#define MAGIC_KEY_LAYER4 4
-//#define MAGIC_KEY_LAYER5 5
-//#define MAGIC_KEY_LAYER6 6
-//#define MAGIC_KEY_LAYER7 7
-//#define MAGIC_KEY_LAYER8 8
-//#define MAGIC_KEY_LAYER9 9
-//#define MAGIC_KEY_BOOTLOADER PAUSE
-//#define MAGIC_KEY_LOCK CAPS
-//#define MAGIC_KEY_EEPROM E
-//#define MAGIC_KEY_NKRO N
-//#define MAGIC_KEY_SLEEP_LED Z
-
-/*
- * 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/40percentclub/mf68_ble/info.json b/keyboards/40percentclub/mf68_ble/info.json
deleted file mode 100644
index 4cd9b2c83c83..000000000000
--- a/keyboards/40percentclub/mf68_ble/info.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "keyboard_name": "MF68 BLE",
- "url": "",
- "maintainer": "qmk",
- "width": 17.25,
- "height": 5,
- "layouts": {
- "LAYOUT_68_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}, {"x":15.25, "y":0}, {"x":16.25, "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}, {"x":15.25, "y":1}, {"x":16.25, "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":"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}, {"x":15.25, "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}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
- }
- }
-}
diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.c b/keyboards/40percentclub/mf68_ble/mf68_ble.c
deleted file mode 100644
index 95f8592f8f15..000000000000
--- a/keyboards/40percentclub/mf68_ble/mf68_ble.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include "mf68_ble.h"
-
-void matrix_init_kb(void) {
- // put your keyboard start-up code here
- // runs once when the firmware starts up
-
- matrix_init_user();
-}
diff --git a/keyboards/40percentclub/mf68_ble/mf68_ble.h b/keyboards/40percentclub/mf68_ble/mf68_ble.h
deleted file mode 100644
index a34f9cde8deb..000000000000
--- a/keyboards/40percentclub/mf68_ble/mf68_ble.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#pragma once
-
-#include "quantum.h"
-
-#define LAYOUT_68_ansi( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, 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 \
-) { \
- { K00, K01, K02, K03, K04, K05, K06, K07, K08 }, \
- { 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 } \
-}
-
-#define LAYOUT_kc( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, 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 \
-) LAYOUT_68_ansi( \
- KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, \
- KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, \
- KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, \
- KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, \
- KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, \
- KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, \
- KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, \
- KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74 \
-)
diff --git a/keyboards/40percentclub/mf68_ble/readme.md b/keyboards/40percentclub/mf68_ble/readme.md
deleted file mode 100644
index 0e0f4b90d831..000000000000
--- a/keyboards/40percentclub/mf68_ble/readme.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# mf68_ble
-
-![mf68_ble](https://3.bp.blogspot.com/-0YCA3Hx2Rq0/WD3U3GWhyvI/AAAAAAAB_Uo/RWTeyCPblGcxDrDwT9WL9ck2ZRuR26DgACLcB/s640/IMG_20161129_063741.jpg)
-===
-
-Magicforce 68 with [replacement PCB](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68) designed by [di0ib](https://github.com/di0ib).
-
-Keyboard Maintainer: QMK Community
-Hardware Supported: [Feather 32u4 Bluefruit](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/)
-Please note: This is 32u4 and not M0
-Hardware Availability: [PCB files](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/mf68/pcb)
-[MF68 thicc case files](https://github.com/harshitgoel96/mf68-case-thicc)
-Story
------
-
-The story and the idea behind this mod is available on [my reddit post](https://www.reddit.com/r/MechanicalKeyboards/comments/7eiiht/guide_i_built_a_bluetooth_enabled_magicforce68_no/)
-
-Wiring
-------
-
-Below is how you wire the Feather to PCB
-
-![wire map](https://i.imgur.com/zYOjlTA.png)
-
-Make example for this keyboard (after setting up your build environment):
-
- make 40percentclub/mf68_ble: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/40percentclub/mf68_ble/rules.mk b/keyboards/40percentclub/mf68_ble/rules.mk
deleted file mode 100644
index 2ca811833c7e..000000000000
--- a/keyboards/40percentclub/mf68_ble/rules.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-# MCU name
-MCU = atmega32u4
-
-# 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 = 8000000
-
-
-#
-# 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(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-
-# Bootloader selection
-# Teensy halfkay
-# Pro Micro caterina
-# Atmel DFU atmel-dfu
-# LUFA DFU lufa-dfu
-# QMK DFU qmk-dfu
-# atmega32a bootloadHID
-BOOTLOADER = caterina
-
-
-# If you don't know the bootloader type, then you can specify the
-# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
-# Teensy halfKay 512
-# Teensy++ halfKay 1024
-# Atmel DFU loader 4096
-# LUFA bootloader 4096
-# USBaspLoader 2048
-# OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-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 on B7 by default
-MIDI_ENABLE = no # MIDI controls
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-AUDIO_ENABLE = no # Audio output on port C6
-
-BLUETOOTH = AdafruitBLE
diff --git a/keyboards/40percentclub/nano/config.h b/keyboards/40percentclub/nano/config.h
index 36840d2f6c1f..5eb65c74ad81 100644
--- a/keyboards/40percentclub/nano/config.h
+++ b/keyboards/40percentclub/nano/config.h
@@ -31,12 +31,29 @@ along with this program. If not, see .
#define MATRIX_ROWS 2
#define MATRIX_COLS 4
+/*
+ * 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)
+ * NO_DIODE = switches are directly connected to AVR pins
+ *
+*/
+// #define MATRIX_ROW_PINS { D0, D5 }
+// #define MATRIX_COL_PINS { F1, F0, B0 }
+#define DIRECT_PINS { \
+ { F4, F5, F6, F7 }, \
+ { D1, D0, D4, C6 }, \
+}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+//#define DIODE_DIRECTION CUSTOM_MATRIX
+
/* ws2812 RGB LED */
#define RGB_DI_PIN D3
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 6 // Number of LEDs
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-#define TAPPING_TERM 200
diff --git a/keyboards/40percentclub/nano/matrix.c b/keyboards/40percentclub/nano/matrix.c
deleted file mode 100644
index fa2461af5fe0..000000000000
--- a/keyboards/40percentclub/nano/matrix.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
-
-Note for ErgoDox EZ customizers: Here be dragons!
-This is not a file you want to be messing with.
-All of the interesting stuff for you is under keymaps/ :)
-Love, Erez
-
-Copyright 2013 Oleg Kostyuk
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see .
-*/
-
-/*
- * scan matrix
- */
-#include
-#include
-#include
-#include
-#include "action_layer.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "nano.h"
-#include
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_stage[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-static uint16_t debouncing_time;
-static bool debouncing = false;
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-
- DDRF &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
- PORTF |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
- DDRC &= ~(1<<6);
- PORTC |= (1<<6);
- DDRD &= ~(1<<0 | 1<<1 | 1<<4);
- PORTD |= (1<<0 | 1<<1 | 1<<4);
-
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- matrix_stage[i] = 0;
- }
-
- matrix_init_quantum();
-
-}
-
-uint8_t matrix_scan(void)
-{
- matrix_stage[0] =
- (PINF&(1<<4) ? 0 : (1<<0)) |
- (PINF&(1<<5) ? 0 : (1<<1)) |
- (PINF&(1<<6) ? 0 : (1<<2)) |
- (PINF&(1<<7) ? 0 : (1<<3));
- matrix_stage[1] =
- (PIND&(1<<1) ? 0 : (1<<0)) |
- (PIND&(1<<0) ? 0 : (1<<1)) |
- (PIND&(1<<4) ? 0 : (1<<2)) |
- (PINC&(1<<6) ? 0 : (1<<3));
-
- if (memcmp(matrix_debouncing, matrix_stage, sizeof(matrix)) != 0) {
- debouncing = true;
- debouncing_time = timer_read();
- }
-
- matrix_debouncing[0] = matrix_stage[0];
- matrix_debouncing[1] = matrix_stage[1];
-
- if (debouncing && (timer_elapsed(debouncing_time) > 20)) {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- debouncing = false;
- }
-
- matrix_scan_quantum();
-
- return 1;
-}
-
-bool matrix_is_modified(void)
-{
- return true;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<.
+ */
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0A0C
+#define DEVICE_VER 0x9999
+#define MANUFACTURER di0ib
+#define PRODUCT The nein Keyboard
+#define DESCRIPTION 9 key macropad
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 3
+
+/* Keyboard Matrix Assignments */
+#define DIRECT_PINS { \
+ { F4, F5, F6 }, \
+ { F7, B1, B3 }, \
+ { B2, B6, B5 } \
+}
+#define UNUSED_PINS
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+// #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+// #define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+// #define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #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 /* 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
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/40percentclub/nein/info.json b/keyboards/40percentclub/nein/info.json
new file mode 100644
index 000000000000..aaadc7186160
--- /dev/null
+++ b/keyboards/40percentclub/nein/info.json
@@ -0,0 +1,22 @@
+{
+ "keyboard_name": "nein",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 3,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0},
+ {"x":1, "y":0},
+ {"x":2, "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}
+ ]
+ }
+ }
+}
diff --git a/keyboards/40percentclub/nein/keymaps/default/keymap.c b/keyboards/40percentclub/nein/keymaps/default/keymap.c
new file mode 100644
index 000000000000..674a8bb7fc4c
--- /dev/null
+++ b/keyboards/40percentclub/nein/keymaps/default/keymap.c
@@ -0,0 +1,29 @@
+/* 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 .
+ */
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_3x3(
+ KC_MUTE, KC_HOME, KC_MPLY, \
+ MO(1), KC_UP, KC_END, \
+ KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [1] = LAYOUT_ortho_3x3(
+ RESET, _______, KC_STOP, \
+ _______, _______, RGB_MOD, \
+ KC_MPRV, _______, KC_MNXT \
+ ),
+};
diff --git a/keyboards/40percentclub/nein/nein.c b/keyboards/40percentclub/nein/nein.c
new file mode 100644
index 000000000000..0b4d05d9412e
--- /dev/null
+++ b/keyboards/40percentclub/nein/nein.c
@@ -0,0 +1,16 @@
+/* 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 .
+ */
+#include "nein.h"
diff --git a/keyboards/40percentclub/nein/nein.h b/keyboards/40percentclub/nein/nein.h
new file mode 100644
index 000000000000..fd0118f75b4a
--- /dev/null
+++ b/keyboards/40percentclub/nein/nein.h
@@ -0,0 +1,37 @@
+/* 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 "quantum.h"
+
+/* This 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_ortho_3x3( \
+ k00, k01, k02, \
+ k10, k11, k12, \
+ k20, k21, k22 \
+) \
+{ \
+ { k00, k01, k02 }, \
+ { k10, k11, k12 }, \
+ { k20, k21, k22 } \
+}
diff --git a/keyboards/40percentclub/nein/readme.md b/keyboards/40percentclub/nein/readme.md
new file mode 100644
index 000000000000..49ce04f13bd2
--- /dev/null
+++ b/keyboards/40percentclub/nein/readme.md
@@ -0,0 +1,18 @@
+# nein
+
+![nein](https://2.bp.blogspot.com/-avYV4grcAPQ/XL9a67SxgKI/AAAAAAACVCE/GSGVYRThaEEDd14M3LG34gQTv5ZabRI0QCEwYBhgL/s640/a.jpg)
+===
+
+A 9 key macropad.
+
+Powered by a Pro Micro and can fit any of the various different sized variations of Pro Micro.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: nein PCB
+Hardware Availability: [nein project on 40% Keyboards](https://www.40percent.club/2019/04/nein.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make 40percentclub/nein: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/40percentclub/nein/rules.mk b/keyboards/40percentclub/nein/rules.mk
new file mode 100644
index 000000000000..1e3748287ce2
--- /dev/null
+++ b/keyboards/40percentclub/nein/rules.mk
@@ -0,0 +1,80 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = caterina
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h
index f46ca4264457..a3366de6211c 100644
--- a/keyboards/40percentclub/nori/config.h
+++ b/keyboards/40percentclub/nori/config.h
@@ -44,7 +44,7 @@
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D4, C6, D7, E6 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B5
diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h
index 4a221ca52726..87f2bedd7371 100644
--- a/keyboards/40percentclub/ut47/config.h
+++ b/keyboards/40percentclub/ut47/config.h
@@ -35,7 +35,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/40percentclub/ut47/keymaps/default/config.h b/keyboards/40percentclub/ut47/keymaps/default/config.h
index f88ebf7e8037..023c753c27a5 100644
--- a/keyboards/40percentclub/ut47/keymaps/default/config.h
+++ b/keyboards/40percentclub/ut47/keymaps/default/config.h
@@ -16,6 +16,4 @@
#pragma once
-#include "config_common.h"
-
// place overrides here
diff --git a/keyboards/412_64/config.h b/keyboards/412_64/config.h
deleted file mode 100644
index 948ae743abfe..000000000000
--- a/keyboards/412_64/config.h
+++ /dev/null
@@ -1,194 +0,0 @@
-
-
-#pragma once
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0xF7E0
-#define PRODUCT_ID 0x0412
-#define DEVICE_VER 0x0000
-#define MANUFACTURER EDI/SCI
-#define PRODUCT 412 64 Model 00
-#define DESCRIPTION A compact 60% keyboard inspired by the 4x4x4x4x4
-
-/* key matrix size */
-#define MATRIX_ROWS 8
-#define MATRIX_COLS 8
-
-/*
- * 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 { D3, F4, F5, F6, F7, B1, B3, B2 }
-#define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 }
-#define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 }
-
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
-#define DIODE_DIRECTION COL2ROW
-
-// #define BACKLIGHT_PIN C7
-// #define BACKLIGHT_BREATHING
-// #define BACKLIGHT_LEVELS 3
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 5
-
-/* 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
-
-/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1 H
-//#define MAGIC_KEY_HELP2 SLASH
-//#define MAGIC_KEY_DEBUG D
-//#define MAGIC_KEY_DEBUG_MATRIX X
-//#define MAGIC_KEY_DEBUG_KBD K
-//#define MAGIC_KEY_DEBUG_MOUSE M
-//#define MAGIC_KEY_VERSION V
-//#define MAGIC_KEY_STATUS S
-//#define MAGIC_KEY_CONSOLE C
-//#define MAGIC_KEY_LAYER0_ALT1 ESC
-//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
-//#define MAGIC_KEY_LAYER0 0
-//#define MAGIC_KEY_LAYER1 1
-//#define MAGIC_KEY_LAYER2 2
-//#define MAGIC_KEY_LAYER3 3
-//#define MAGIC_KEY_LAYER4 4
-//#define MAGIC_KEY_LAYER5 5
-//#define MAGIC_KEY_LAYER6 6
-//#define MAGIC_KEY_LAYER7 7
-//#define MAGIC_KEY_LAYER8 8
-//#define MAGIC_KEY_LAYER9 9
-//#define MAGIC_KEY_BOOTLOADER PAUSE
-//#define MAGIC_KEY_LOCK CAPS
-//#define MAGIC_KEY_EEPROM E
-//#define MAGIC_KEY_NKRO N
-//#define MAGIC_KEY_SLEEP_LED Z
-
-/*
- * 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
-
-/*
- * MIDI options
- */
-
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
-/* 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
-
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
-//#define MIDI_TONE_KEYCODE_OCTAVES 1
-
-/*
- * HD44780 LCD Display Configuration
- */
-/*
-#define LCD_LINES 2 //< number of visible lines of the display
-#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
-
-#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
-
-#if LCD_IO_MODE
-#define LCD_PORT PORTB //< port for the LCD lines
-#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
-#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
-#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
-#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
-#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
-#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
-#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
-#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
-#define LCD_RS_PORT LCD_PORT //< port for RS line
-#define LCD_RS_PIN 3 //< pin for RS line
-#define LCD_RW_PORT LCD_PORT //< port for RW line
-#define LCD_RW_PIN 2 //< pin for RW line
-#define LCD_E_PORT LCD_PORT //< port for Enable line
-#define LCD_E_PIN 1 //< pin for Enable line
-#endif
-*/
diff --git a/keyboards/412_64/readme.md b/keyboards/412_64/readme.md
deleted file mode 100644
index 08110310750b..000000000000
--- a/keyboards/412_64/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# 412-64
-
-![412-64](image_here)
-
-A compact 60% keyboard designed by Fate Everywhere and sold on a limited basis. Born out of the desire for a Planck with a numpad for technical work.
-
-Keyboard Maintainer: [Fate Everywhere](https://github.com/fateeverywhere)
-Hardware Supported: 4x16 T&E Prototype, 412-64 Mk. 0, Mk. 1.
-Hardware Availability: Highly limited, contact /u/FateEverywhere on reddit for availability.
-
-Make example for this keyboard (after setting up your build environment):
-
- make 412-64: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).
\ No newline at end of file
diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c
index 9f639716955d..acc0350739e0 100644
--- a/keyboards/9key/keymaps/default/keymap.c
+++ b/keyboards/9key/keymaps/default/keymap.c
@@ -1,16 +1,5 @@
#include QMK_KEYBOARD_H
-// Tap Dance Declarations
-enum {
- ENT_5 = 0,
- ZERO_7
-};
-
-// Macro Declarations
-enum {
- DBL_0 = 0
-};
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* LAYER 0
@@ -24,8 +13,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[0] = LAYOUT( \
KC_1, KC_2, KC_3, \
- KC_4, TD(ENT_5), KC_6, \
- TD(ZERO_7), KC_8, LT(1, KC_9) \
+ KC_4, KC_5, KC_6, \
+ KC_7, KC_8, LT(1, KC_9) \
),
/* LAYER 1
@@ -39,27 +28,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[1] = LAYOUT( \
KC_ESC, KC_PLUS, KC_MINS, \
- KC_BSPC, KC_ASTR, KC_SLSH, \
- M(DBL_0), KC_DOT, KC_TRNS \
+ KC_ENTER, KC_ASTR, KC_SLSH, \
+ KC_0, KC_DOT, KC_TRNS \
)
};
-
-qk_tap_dance_action_t tap_dance_actions[] = {
- [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
- [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0)
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
- if (record->event.pressed) {
- switch(id) {
- case DBL_0:
- SEND_STRING("00");
- return false;
- }
- }
- return MACRO_NONE;
-};
-
-void matrix_init_user(void) {
-}
\ No newline at end of file
diff --git a/keyboards/9key/keymaps/tap_dance/keymap.c b/keyboards/9key/keymaps/tap_dance/keymap.c
new file mode 100644
index 000000000000..a96880aa529e
--- /dev/null
+++ b/keyboards/9key/keymaps/tap_dance/keymap.c
@@ -0,0 +1,69 @@
+#include QMK_KEYBOARD_H
+
+// Tap Dance Declarations
+enum tap_dances {
+ ENT_5 = 0,
+ ZERO_7,
+};
+
+// Macro Declarations
+enum custom_keycodes {
+ DBL_0 = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* LAYER 0
+ * ,-----------------------.
+ * | 1 | 2 | 3 |
+ * |-------+-------+-------|
+ * | 4 | 5/ENT | 6 | Dbl Tap 5 for Enter
+ * |-------+-------+-------|
+ * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN
+ * `-----------------------'
+ */
+[0] = LAYOUT( \
+ KC_1, KC_2, KC_3, \
+ KC_4, TD(ENT_5), KC_6, \
+ TD(ZERO_7), KC_8, LT(1, KC_9) \
+),
+
+/* LAYER 1
+ * ,-----------------------.
+ * | ESC | + | - |
+ * |-------+-------+-------|
+ * | BSPC | * | / |
+ * |-------+-------+-------|
+ * | 00 | . | |
+ * `-----------------------'
+ */
+[1] = LAYOUT( \
+ KC_ESC, KC_PLUS, KC_MINS, \
+ KC_BSPC, KC_ASTR, KC_SLSH, \
+ DBL_0, KC_DOT, KC_TRNS \
+)
+
+};
+
+qk_tap_dance_action_t tap_dance_actions[] = {
+ [ENT_5] = ACTION_TAP_DANCE_DOUBLE(KC_5, KC_ENT),
+ [ZERO_7] = ACTION_TAP_DANCE_DOUBLE(KC_7, KC_0)
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case DBL_0:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ tap_code(KC_P0);
+ tap_code(KC_P0);
+ }
+ break;
+
+ }
+ return true;
+};
+
+
+void matrix_init_user(void) {
+}
diff --git a/keyboards/tetris/keymaps/default/rules.mk b/keyboards/9key/keymaps/tap_dance/rules.mk
similarity index 100%
rename from keyboards/tetris/keymaps/default/rules.mk
rename to keyboards/9key/keymaps/tap_dance/rules.mk
diff --git a/keyboards/9key/rules.mk b/keyboards/9key/rules.mk
index e252640f7e6e..9fae54fa910a 100644
--- a/keyboards/9key/rules.mk
+++ b/keyboards/9key/rules.mk
@@ -47,7 +47,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
-# change to "no" to disable the options, or define them in the Makefile in
+# 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)
@@ -63,7 +63,7 @@ UNICODE_ENABLE = yes # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
API_SYSEX_ENABLE = yes
-TAP_DANCE_ENABLE = yes
+TAP_DANCE_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
diff --git a/keyboards/abstract/ellipse/info.json b/keyboards/abstract/ellipse/info.json
new file mode 100644
index 000000000000..8ad50e6cae87
--- /dev/null
+++ b/keyboards/abstract/ellipse/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Ellipse",
+ "url": "https://abstractkb.tk/product/ellipse-rev1",
+ "maintainer": "AbstractKB",
+ "width": 3,
+ "height": 2.25,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":0, "y":1.25}, {"x":1, "y":1.25}, {"x":2, "y":1.25}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/config.h b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h
new file mode 100644
index 000000000000..3bc66cd9bdf0
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/abstractkb/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 2
+#define RGBLIGHT_ANIMATIONS
+
+// place overrides here
diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c
new file mode 100644
index 000000000000..8d649419d112
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/abstractkb/keymap.c
@@ -0,0 +1,66 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 the keycodes used by our macros in process_record_user
+/*enum custom_keycodes {
+ MYKEY = SAFE_RANGE
+};*/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ KC_MUTE, RGB_TOG, BL_TOGG,
+ RGB_M_SW, RGB_M_P, BL_BRTG
+ )
+};
+
+/*bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}*/
+
+/*void matrix_init_user(void) {
+
+}*/
+
+/*void matrix_scan_user(void) {
+
+}*/
+
+/*void led_set_user(uint8_t usb_led) {
+
+}*/
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_VOLU);
+ } else {
+ tap_code(KC_VOLD);
+ }
+ } else if (index == 1) { /* Second encoder */
+ if (clockwise) {
+ rgblight_increase_hue_noeeprom();
+ } else {
+ rgblight_decrease_hue_noeeprom();
+ }
+ } else if (index == 2) { /* Third encoder */
+ if (clockwise) {
+ backlight_increase();
+ } else {
+ backlight_decrease();
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md
new file mode 100644
index 000000000000..5db2eb647f72
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/abstractkb/readme.md
@@ -0,0 +1,3 @@
+# My keymap
+
+This was used for testing lights but will become my personal keymap
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk
new file mode 100644
index 000000000000..54a2685bf634
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/abstractkb/rules.mk
@@ -0,0 +1 @@
+BACKLIGHT_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/keymaps/default/config.h b/keyboards/abstract/ellipse/keymaps/default/config.h
new file mode 100644
index 000000000000..e406c488b5a5
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// place overrides here
diff --git a/keyboards/abstract/ellipse/keymaps/default/keymap.c b/keyboards/abstract/ellipse/keymaps/default/keymap.c
new file mode 100644
index 000000000000..ac1ec986b029
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/default/keymap.c
@@ -0,0 +1,66 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 the keycodes used by our macros in process_record_user
+/*enum custom_keycodes {
+ MYKEY = SAFE_RANGE
+};*/
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ KC_A, RGB_TOG, KC_C,
+ KC_X, KC_Y, KC_Z
+ )
+};
+
+/*bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}*/
+
+/*void matrix_init_user(void) {
+
+}*/
+
+/*void matrix_scan_user(void) {
+
+}*/
+
+/*void led_set_user(uint8_t usb_led) {
+
+}*/
+
+void encoder_update_user(uint8_t index, bool clockwise) {
+ if (index == 0) { /* First encoder */
+ if (clockwise) {
+ tap_code(KC_O);
+ } else {
+ tap_code(KC_P);
+ }
+ } else if (index == 1) { /* Second encoder */
+ if (clockwise) {
+ rgblight_increase_hue_noeeprom();
+ } else {
+ rgblight_decrease_hue_noeeprom();
+ }
+ } else if (index == 2) {
+ if (clockwise) {
+ tap_code(KC_M);
+ } else {
+ tap_code(KC_R);
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/keymaps/default/readme.md b/keyboards/abstract/ellipse/keymaps/default/readme.md
new file mode 100644
index 000000000000..e14c0c8bd56b
--- /dev/null
+++ b/keyboards/abstract/ellipse/keymaps/default/readme.md
@@ -0,0 +1,6 @@
+# The default keymap for Ellipse
+
+This keymap allows for basic testing of the keypad once assembled.
+Each knob and key outputs a different standard letter keycode,
+except for the middle knob which changes the hue of the RGB LEDs and when
+pressed down turns off the RGB LEDs
\ No newline at end of file
diff --git a/keyboards/9key/keymaps/default/rules.mk b/keyboards/abstract/ellipse/keymaps/default/rules.mk
similarity index 100%
rename from keyboards/9key/keymaps/default/rules.mk
rename to keyboards/abstract/ellipse/keymaps/default/rules.mk
diff --git a/keyboards/abstract/ellipse/readme.md b/keyboards/abstract/ellipse/readme.md
new file mode 100644
index 000000000000..973d36f44b78
--- /dev/null
+++ b/keyboards/abstract/ellipse/readme.md
@@ -0,0 +1,19 @@
+# EllipseRev1
+
+![EllipseRev1](http://abstractkb.tk/wp-content/uploads/2019/03/ellipsetop.jpg)
+
+A small keypad with more knobs than ever before! 3 Knobs and 3 MX-style switches on one little board.
+
+At this time there are 2 small known issues with the Rev 1. One of which is that backlight breathing does not work,
+and the other issue that has been encountered is that the post_init_user function does not seem to be called.
+Hopefully these issues can be resolved soon; this QMK file is being released as orders have started to ship and they need to be configurable.
+
+Keyboard Maintainer: [AbstractKB](https://github.com/abstractkb)
+Hardware Supported: The Abstract Ellipse Rev1
+Hardware Availability: https://abstractkb.tk
+
+Make example for this keyboard (after setting up your build environment):
+
+ make abstract/ellipse/rev1: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/abstract/ellipse/rev1/config.h b/keyboards/abstract/ellipse/rev1/config.h
new file mode 100644
index 000000000000..4fcf96eb30e3
--- /dev/null
+++ b/keyboards/abstract/ellipse/rev1/config.h
@@ -0,0 +1,245 @@
+/*
+Copyright 2019 AbstractKB
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 AbstractKB
+#define PRODUCT EllipseRev1
+#define DESCRIPTION The Ellipse Macropad
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 3
+
+/*
+ * 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 { D3, C7 }
+#define MATRIX_COL_PINS { F0, B6, B5 }
+#define UNUSED_PINS { B0, D0, D1, D2, D4, D6, D7, F1, F4, F5, F6, F7 }
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_PIN C6
+//#define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 15
+
+#define RGB_DI_PIN E6
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 3
+ #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 /* 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
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/*#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)*/
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
+
+#define NUMBER_OF_ENCODERS 3
+#define ENCODERS_PAD_A { B2, B3, D5 }
+#define ENCODERS_PAD_B { B1, B7, B4 }
+#define ENCODER_RESOLUTION 2
diff --git a/keyboards/abstract/ellipse/rev1/rev1.c b/keyboards/abstract/ellipse/rev1/rev1.c
new file mode 100644
index 000000000000..ae7aa640e4ad
--- /dev/null
+++ b/keyboards/abstract/ellipse/rev1/rev1.c
@@ -0,0 +1,43 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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"
+
+/*void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}*/
\ No newline at end of file
diff --git a/keyboards/abstract/ellipse/rev1/rev1.h b/keyboards/abstract/ellipse/rev1/rev1.h
new file mode 100644
index 000000000000..de8b9bacb6c5
--- /dev/null
+++ b/keyboards/abstract/ellipse/rev1/rev1.h
@@ -0,0 +1,36 @@
+/* Copyright 2019 AbstractKB
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 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, \
+ K10, K11, K12 \
+) \
+{ \
+ { K00, K01, K02 }, \
+ { K10, K11, K12 }, \
+}
+
diff --git a/keyboards/abstract/ellipse/rev1/rules.mk b/keyboards/abstract/ellipse/rev1/rules.mk
new file mode 100644
index 000000000000..880d40e49be1
--- /dev/null
+++ b/keyboards/abstract/ellipse/rev1/rules.mk
@@ -0,0 +1,81 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+ENCODER_ENABLE = yes # Enable support for rotary encoders
diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c
index a07e0ddc5920..aafc1dfe68fc 100644
--- a/keyboards/acr60/keymaps/default/keymap.c
+++ b/keyboards/acr60/keymaps/default/keymap.c
@@ -1,6 +1,10 @@
#include QMK_KEYBOARD_H
-#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
+
+enum custom_keycodes {
+ SFT_ESC = SAFE_RANGE
+};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -13,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* via the function actions code at the bottom.
*/
LAYOUT(
- F(0), 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_NO, KC_BSPC,
+ SFT_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_NO, 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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
@@ -34,21 +38,11 @@ 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),
};
-enum function_id {
- SHIFT_ESC,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(SHIFT_ESC),
-};
-
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- static uint8_t shift_esc_shift_mask;
- switch (id) {
- case SHIFT_ESC:
- shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK;
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case SFT_ESC:
if (record->event.pressed) {
- if (shift_esc_shift_mask) {
+ if (get_mods() & MODS_SHIFT_MASK) {
add_key(KC_GRV);
send_keyboard_report();
} else {
@@ -56,7 +50,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
send_keyboard_report();
}
} else {
- if (shift_esc_shift_mask) {
+ if (get_mods() & MODS_SHIFT_MASK) {
del_key(KC_GRV);
send_keyboard_report();
} else {
@@ -64,6 +58,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
send_keyboard_report();
}
}
- break;
+
+ return false;
+
+ default:
+ return true;
}
}
diff --git a/keyboards/adkb96/adkb96.c b/keyboards/adkb96/adkb96.c
new file mode 100644
index 000000000000..9a1c85a2ce47
--- /dev/null
+++ b/keyboards/adkb96/adkb96.c
@@ -0,0 +1,19 @@
+#include "adkb96.h"
+
+#ifdef SWAP_HANDS_ENABLE
+__attribute__ ((weak))
+const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
+ {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6}, {6, 6}, {7, 6}},
+ {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7}, {6, 7}, {7, 7}},
+ {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8}, {6, 8}, {7, 8}},
+ {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9}, {6, 9}, {7, 9}},
+ {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}, {6,10}, {7,10}},
+ {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}, {6,11}, {7,11}},
+ {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}},
+ {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1}, {6, 1}, {7, 1}},
+ {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2}, {6, 2}, {7, 2}},
+ {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3}, {6, 3}, {7, 3}},
+ {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4}, {6, 4}, {7, 4}},
+ {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5}, {6, 5}, {7, 5}}
+};
+#endif
diff --git a/keyboards/adkb96/adkb96.h b/keyboards/adkb96/adkb96.h
new file mode 100644
index 000000000000..4b28775006d9
--- /dev/null
+++ b/keyboards/adkb96/adkb96.h
@@ -0,0 +1,28 @@
+#pragma once
+
+#include "quantum.h"
+
+#ifdef KEYBOARD_adkb96_rev1
+ #include "rev1.h"
+#endif
+
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_kc_ortho_6x16( \
+ L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \
+ L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \
+ L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \
+ L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \
+ L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
+ L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \
+ ) \
+ LAYOUT( \
+ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##L07, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, KC_##R07, \
+ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##L17, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, KC_##R17, \
+ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##L27, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, KC_##R27, \
+ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##L37, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, KC_##R37, \
+ KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##L47, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, KC_##R46, KC_##R47, \
+ KC_##L50, KC_##L51, KC_##L52, KC_##L53, KC_##L54, KC_##L55, KC_##L56, KC_##L57, KC_##R50, KC_##R51, KC_##R52, KC_##R53, KC_##R54, KC_##R55, KC_##R56 ,KC_##R57 \
+ )
+
+#define LAYOUT_kc LAYOUT_kc_ortho_6x16
diff --git a/keyboards/sol/config.h b/keyboards/adkb96/config.h
similarity index 100%
rename from keyboards/sol/config.h
rename to keyboards/adkb96/config.h
diff --git a/keyboards/adkb96/info.json b/keyboards/adkb96/info.json
new file mode 100644
index 000000000000..3b914d56b171
--- /dev/null
+++ b/keyboards/adkb96/info.json
@@ -0,0 +1,494 @@
+{
+ "keyboard_name": "adkb96",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 16,
+ "height": 6,
+ "layouts": {
+ "LAYOUT_ortho_6x16": {
+ "key_count": 96,
+ "layout": [
+ {
+ "label": "L00",
+ "x": 0,
+ "y": 0
+ },
+ {
+ "label": "L01",
+ "x": 1,
+ "y": 0
+ },
+ {
+ "label": "L02",
+ "x": 2,
+ "y": 0
+ },
+ {
+ "label": "L03",
+ "x": 3,
+ "y": 0
+ },
+ {
+ "label": "L04",
+ "x": 4,
+ "y": 0
+ },
+ {
+ "label": "L05",
+ "x": 5,
+ "y": 0
+ },
+ {
+ "label": "L06",
+ "x": 6,
+ "y": 0
+ },
+ {
+ "label": "L07",
+ "x": 7,
+ "y": 0
+ },
+ {
+ "label": "R00",
+ "x": 8,
+ "y": 0
+ },
+ {
+ "label": "R01",
+ "x": 9,
+ "y": 0
+ },
+ {
+ "label": "R02",
+ "x": 10,
+ "y": 0
+ },
+ {
+ "label": "R03",
+ "x": 11,
+ "y": 0
+ },
+ {
+ "label": "R04",
+ "x": 12,
+ "y": 0
+ },
+ {
+ "label": "R05",
+ "x": 13,
+ "y": 0
+ },
+ {
+ "label": "R06",
+ "x": 14,
+ "y": 0
+ },
+ {
+ "label": "R07",
+ "x": 15,
+ "y": 0
+ },
+ {
+ "label": "L10",
+ "x": 0,
+ "y": 1
+ },
+ {
+ "label": "L11",
+ "x": 1,
+ "y": 1
+ },
+ {
+ "label": "L12",
+ "x": 2,
+ "y": 1
+ },
+ {
+ "label": "L13",
+ "x": 3,
+ "y": 1
+ },
+ {
+ "label": "L14",
+ "x": 4,
+ "y": 1
+ },
+ {
+ "label": "L15",
+ "x": 5,
+ "y": 1
+ },
+ {
+ "label": "L16",
+ "x": 6,
+ "y": 1
+ },
+ {
+ "label": "L17",
+ "x": 7,
+ "y": 1
+ },
+ {
+ "label": "R10",
+ "x": 8,
+ "y": 1
+ },
+ {
+ "label": "R11",
+ "x": 9,
+ "y": 1
+ },
+ {
+ "label": "R12",
+ "x": 10,
+ "y": 1
+ },
+ {
+ "label": "R13",
+ "x": 11,
+ "y": 1
+ },
+ {
+ "label": "R14",
+ "x": 12,
+ "y": 1
+ },
+ {
+ "label": "R15",
+ "x": 13,
+ "y": 1
+ },
+ {
+ "label": "R16",
+ "x": 14,
+ "y": 1
+ },
+ {
+ "label": "R17",
+ "x": 15,
+ "y": 1
+ },
+ {
+ "label": "L20",
+ "x": 0,
+ "y": 2
+ },
+ {
+ "label": "L21",
+ "x": 1,
+ "y": 2
+ },
+ {
+ "label": "L22",
+ "x": 2,
+ "y": 2
+ },
+ {
+ "label": "L23",
+ "x": 3,
+ "y": 2
+ },
+ {
+ "label": "L24",
+ "x": 4,
+ "y": 2
+ },
+ {
+ "label": "L25",
+ "x": 5,
+ "y": 2
+ },
+ {
+ "label": "L26",
+ "x": 6,
+ "y": 2
+ },
+ {
+ "label": "L27",
+ "x": 7,
+ "y": 2
+ },
+ {
+ "label": "R20",
+ "x": 8,
+ "y": 2
+ },
+ {
+ "label": "R21",
+ "x": 9,
+ "y": 2
+ },
+ {
+ "label": "R22",
+ "x": 10,
+ "y": 2
+ },
+ {
+ "label": "R23",
+ "x": 11,
+ "y": 2
+ },
+ {
+ "label": "R24",
+ "x": 12,
+ "y": 2
+ },
+ {
+ "label": "R25",
+ "x": 13,
+ "y": 2
+ },
+ {
+ "label": "R26",
+ "x": 14,
+ "y": 2
+ },
+ {
+ "label": "R27",
+ "x": 15,
+ "y": 2
+ },
+ {
+ "label": "L30",
+ "x": 0,
+ "y": 3
+ },
+ {
+ "label": "L31",
+ "x": 1,
+ "y": 3
+ },
+ {
+ "label": "L32",
+ "x": 2,
+ "y": 3
+ },
+ {
+ "label": "L33",
+ "x": 3,
+ "y": 3
+ },
+ {
+ "label": "L34",
+ "x": 4,
+ "y": 3
+ },
+ {
+ "label": "L35",
+ "x": 5,
+ "y": 3
+ },
+ {
+ "label": "L36",
+ "x": 6,
+ "y": 3
+ },
+ {
+ "label": "L37",
+ "x": 7,
+ "y": 3
+ },
+ {
+ "label": "R30",
+ "x": 8,
+ "y": 3
+ },
+ {
+ "label": "R31",
+ "x": 9,
+ "y": 3
+ },
+ {
+ "label": "R32",
+ "x": 10,
+ "y": 3
+ },
+ {
+ "label": "R33",
+ "x": 11,
+ "y": 3
+ },
+ {
+ "label": "R34",
+ "x": 12,
+ "y": 3
+ },
+ {
+ "label": "R35",
+ "x": 13,
+ "y": 3
+ },
+ {
+ "label": "R36",
+ "x": 14,
+ "y": 3
+ },
+ {
+ "label": "R37",
+ "x": 15,
+ "y": 3
+ },
+ {
+ "label": "L40",
+ "x": 0,
+ "y": 4
+ },
+ {
+ "label": "L41",
+ "x": 1,
+ "y": 4
+ },
+ {
+ "label": "L42",
+ "x": 2,
+ "y": 4
+ },
+ {
+ "label": "L43",
+ "x": 3,
+ "y": 4
+ },
+ {
+ "label": "L44",
+ "x": 4,
+ "y": 4
+ },
+ {
+ "label": "L45",
+ "x": 5,
+ "y": 4
+ },
+ {
+ "label": "L46",
+ "x": 6,
+ "y": 4
+ },
+ {
+ "label": "L47",
+ "x": 7,
+ "y": 4
+ },
+ {
+ "label": "R40",
+ "x": 8,
+ "y": 4
+ },
+ {
+ "label": "R41",
+ "x": 9,
+ "y": 4
+ },
+ {
+ "label": "R42",
+ "x": 10,
+ "y": 4
+ },
+ {
+ "label": "R43",
+ "x": 11,
+ "y": 4
+ },
+ {
+ "label": "R44",
+ "x": 12,
+ "y": 4
+ },
+ {
+ "label": "R45",
+ "x": 13,
+ "y": 4
+ },
+ {
+ "label": "R46",
+ "x": 14,
+ "y": 4
+ },
+ {
+ "label": "R47",
+ "x": 15,
+ "y": 4
+ },
+ {
+ "label": "L50",
+ "x": 0,
+ "y": 5
+ },
+ {
+ "label": "L51",
+ "x": 1,
+ "y": 5
+ },
+ {
+ "label": "L52",
+ "x": 2,
+ "y": 5
+ },
+ {
+ "label": "L53",
+ "x": 3,
+ "y": 5
+ },
+ {
+ "label": "L54",
+ "x": 4,
+ "y": 5
+ },
+ {
+ "label": "L55",
+ "x": 5,
+ "y": 5
+ },
+ {
+ "label": "L56",
+ "x": 6,
+ "y": 5
+ },
+ {
+ "label": "L57",
+ "x": 7,
+ "y": 5
+ },
+ {
+ "label": "R50",
+ "x": 8,
+ "y": 5
+ },
+ {
+ "label": "R51",
+ "x": 9,
+ "y": 5
+ },
+ {
+ "label": "R52",
+ "x": 10,
+ "y": 5
+ },
+ {
+ "label": "R53",
+ "x": 11,
+ "y": 5
+ },
+ {
+ "label": "R54",
+ "x": 12,
+ "y": 5
+ },
+ {
+ "label": "R55",
+ "x": 13,
+ "y": 5
+ },
+ {
+ "label": "R56",
+ "x": 14,
+ "y": 5
+ },
+ {
+ "label": "R57",
+ "x": 15,
+ "y": 5
+ }
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/adkb96/keymaps/default/config.h b/keyboards/adkb96/keymaps/default/config.h
new file mode 100644
index 000000000000..bef279a6d032
--- /dev/null
+++ b/keyboards/adkb96/keymaps/default/config.h
@@ -0,0 +1,34 @@
+/*
+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
+
+#define FORCE_NKRO
diff --git a/keyboards/adkb96/keymaps/default/keymap.c b/keyboards/adkb96/keymaps/default/keymap.c
new file mode 100644
index 000000000000..c8198ab33594
--- /dev/null
+++ b/keyboards/adkb96/keymaps/default/keymap.c
@@ -0,0 +1,15 @@
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT(
+ KC_ESC, XXXXXXX,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_DELT,
+ KC_ZKHK,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_JYEN,KC_BSPC,KC_BSPC,
+ KC_TAB, 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_ENT,
+ KC_CAPS,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_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_RO, KC_UP, KC_RSFT,KC_RSFT,
+ KC_LCTL,KC_LALT,KC_LGUI,KC_MHEN,KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_HENK,KC_KANA,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT,XXXXXXX
+ )
+};
diff --git a/keyboards/adkb96/readme.md b/keyboards/adkb96/readme.md
new file mode 100644
index 000000000000..fa5187966bb6
--- /dev/null
+++ b/keyboards/adkb96/readme.md
@@ -0,0 +1,17 @@
+# ADKB96
+
+![ADKB96](http://btoshop.jp/wp-content/uploads/sites/3/2019/04/ADKB96_ALL.png)
+
+A 16x6 ortholinear keyboard kit made and sold by Bit Trade One Ltd. [More info on Web](http://bit-trade-one.co.jp/selfmadekb/adkb96/)
+
+Keyboard Maintainer: [Bit Trade One Ltd.](http://bit-trade-one.co.jp/)
+Hardware Supported: ADKB96 PCB, Pro Micro
+Hardware Availability: [PCB & case Data](https://github.com/bit-trade-one/ADKB96-hardware), [BTOS Shop](http://btoshop.jp/2019/04/11/4562469772424/)
+
+Make example for this keyboard (after setting up your build environment):
+
+```sh
+ make adkb96/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/adkb96/rev1/config.h b/keyboards/adkb96/rev1/config.h
new file mode 100644
index 000000000000..8bdacb4cb30e
--- /dev/null
+++ b/keyboards/adkb96/rev1/config.h
@@ -0,0 +1,78 @@
+/*
+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 .
+*/
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x00a5
+#define PRODUCT_ID 0xad96
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Bit Trade One
+#define PRODUCT ADKB96
+#define DESCRIPTION
+
+/* key matrix size */
+// Rows are doubled-up
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 8
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
+#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, F5, F4 }
+
+#define SOFT_SERIAL_PIN D0
+
+/* define tapping term */
+#define TAPPING_TERM 100
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+// #define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 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
+
+/* ws2812 RGB LED */
+/*
+#define RGB_DI_PIN D3
+
+#define RGBLED_NUM 12 // Number of LEDs
+*/
+/*
+ * 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/adkb96/rev1/rev1.c b/keyboards/adkb96/rev1/rev1.c
new file mode 100644
index 000000000000..872a7e08ff08
--- /dev/null
+++ b/keyboards/adkb96/rev1/rev1.c
@@ -0,0 +1,15 @@
+#include "adkb96.h"
+
+void matrix_init_kb(void) {
+
+ // // green led on
+ // DDRD |= (1<<5);
+ // PORTD &= ~(1<<5);
+
+ // // orange led on
+ // DDRB |= (1<<0);
+ // PORTB &= ~(1<<0);
+
+ matrix_init_user();
+};
+
diff --git a/keyboards/adkb96/rev1/rev1.h b/keyboards/adkb96/rev1/rev1.h
new file mode 100644
index 000000000000..0ec70c5d5c9f
--- /dev/null
+++ b/keyboards/adkb96/rev1/rev1.h
@@ -0,0 +1,44 @@
+#pragma once
+
+#include "adkb96.h"
+
+//void promicro_bootloader_jmp(bool program);
+
+#ifdef USE_I2C
+#include
+#ifdef __AVR__
+ #include
+ #include
+#endif
+#endif
+
+//void promicro_bootloader_jmp(bool program);
+
+
+// Keymap with right side flipped
+// (TRRS jack on both halves are to the right)
+#define LAYOUT_ortho_6x16( \
+ L00, L01, L02, L03, L04, L05, L06, L07, R00, R01, R02, R03, R04, R05, R06, R07, \
+ L10, L11, L12, L13, L14, L15, L16, L17, R10, R11, R12, R13, R14, R15, R16, R17, \
+ L20, L21, L22, L23, L24, L25, L26, L27, R20, R21, R22, R23, R24, R25, R26, R27, \
+ L30, L31, L32, L33, L34, L35, L36, L37, R30, R31, R32, R33, R34, R35, R36, R37, \
+ L40, L41, L42, L43, L44, L45, L46, L47, R40, R41, R42, R43, R44, R45, R46, R47, \
+ L50, L51, L52, L53, L54, L55, L56, L57, R50, R51, R52, R53, R54, R55, R56, R57 \
+ ) \
+ { \
+ { L00, L01, L02, L03, L04, L05, L06, L07 }, \
+ { L10, L11, L12, L13, L14, L15, L16, L17 }, \
+ { L20, L21, L22, L23, L24, L25, L26, L27 }, \
+ { L30, L31, L32, L33, L34, L35, L36, L37 }, \
+ { L40, L41, L42, L43, L44, L45, L46, L47 }, \
+ { L50, L51, L52, L53, L54, L55, L56, L57 }, \
+ { R00, R01, R02, R03, R04, R05, R06, R07 }, \
+ { R10, R11, R12, R13, R14, R15, R16, R17 }, \
+ { R20, R21, R22, R23, R24, R25, R26, R27 }, \
+ { R30, R31, R32, R33, R34, R35, R36, R37 }, \
+ { R40, R41, R42, R43, R44, R45, R46, R47 }, \
+ { R50, R51, R52, R53, R54, R55, R56, R57 } \
+ }
+
+#define LAYOUT LAYOUT_ortho_6x16
+
diff --git a/keyboards/adkb96/rules.mk b/keyboards/adkb96/rules.mk
new file mode 100644
index 000000000000..04986eb6788b
--- /dev/null
+++ b/keyboards/adkb96/rules.mk
@@ -0,0 +1,78 @@
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+ # Bootloader selection
+ # Teensy halfkay
+ # Pro Micro caterina
+ # Atmel DFU atmel-dfu
+ # LUFA DFU lufa-dfu
+ # QMK DFU qmk-dfu
+ # atmega32a bootloadHID
+BOOTLOADER = caterina
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# 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)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # 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
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+SPLIT_KEYBOARD = yes
+
+DEFAULT_FOLDER = adkb96/rev1
diff --git a/keyboards/aeboards/aegis/aegis.c b/keyboards/aeboards/aegis/aegis.c
new file mode 100644
index 000000000000..ccff6d62c94b
--- /dev/null
+++ b/keyboards/aeboards/aegis/aegis.c
@@ -0,0 +1,17 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+// Nothing to see here, move along... ;-)
diff --git a/keyboards/aeboards/aegis/aegis.h b/keyboards/aeboards/aegis/aegis.h
new file mode 100644
index 000000000000..95ffb73dde00
--- /dev/null
+++ b/keyboards/aeboards/aegis/aegis.h
@@ -0,0 +1,43 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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_aegis( \
+ K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \
+ K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0108, \
+ K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, \
+ K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0706, K0607, K0707, K0608, \
+ K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0906, K0807, K0907, K0808, K0908, \
+ K1000, K1100, K1001, K1101, K1002, K1102, K1003, K1103, K1105, K1107, K1008, K1108 \
+) { \
+ { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \
+ { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108 }, \
+ { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \
+ { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308 }, \
+ { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \
+ { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508 }, \
+ { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608 }, \
+ { K0700, K0701, K0702, K0703, K0704, K0705, K0706, K0707, _____ }, \
+ { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808 }, \
+ { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908 }, \
+ { K1000, K1001, K1002, K1003, _____, _____, _____, _____, K1008 }, \
+ { K1100, K1101, K1102, K1103, _____, K1105, _____, K1107, K1108 } \
+}
diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h
new file mode 100644
index 000000000000..787c0f485063
--- /dev/null
+++ b/keyboards/aeboards/aegis/config.h
@@ -0,0 +1,71 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 0x4145 // "AE"
+#define PRODUCT_ID 0x0807 // 1800 -> 0x0708 -> 0x0807 ;-)
+#define DEVICE_VER 0x0001
+#define MANUFACTURER AEboards
+#define PRODUCT Aegis
+#define DESCRIPTION 1800 Left Handed Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_COLS 9
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { F5, F6, E6, F7, D1, D0, D6, D4, B4, D7, B6, B5 }
+#define MATRIX_COL_PINS { C7, C6, B7, D2, D3, B3, B2, B1, B0 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 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 WT_MONO_BACKLIGHT
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+
+// EEPROM usage
+
+// TODO: refactor with new user EEPROM code (coming soon)
+#define EEPROM_MAGIC 0x451F
+#define EEPROM_MAGIC_ADDR 32
+// Bump this every time we change what we store
+// This will automatically reset the EEPROM with defaults
+// and avoid loading invalid data from the EEPROM
+#define EEPROM_VERSION 0x08
+#define EEPROM_VERSION_ADDR 34
+
+// Dynamic keymap starts after EEPROM version
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
+// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864)
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125
+#define DYNAMIC_KEYMAP_MACRO_COUNT 16
+
diff --git a/keyboards/aeboards/aegis/keymaps/default/keymap.c b/keyboards/aeboards/aegis/keymaps/default/keymap.c
new file mode 100644
index 000000000000..8437ffeb4ed5
--- /dev/null
+++ b/keyboards/aeboards/aegis/keymaps/default/keymap.c
@@ -0,0 +1,72 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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] = {
+ /* Keymap BASE: (Base Layer) Default Layer
+ * ,-------------------. ,-------------------------------------------------------------.
+ * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12|
+ * `-------------------' `-------------------------------------------------------------'
+ *
+ * |-------------------| ,-------------------------------------------------------------.
+ * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del|
+ * |-------------------| |-------------------------------------------------------------|
+ * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC |
+ * | + |--------------| |-------------------------------------------------------------|
+ * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |
+ * |-------------------| |-------------------------------------------------------------|
+ * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN |
+ * | ENT|-------------------------------------------------------------------------------|
+ * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| |
+ * `------------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_aegis(
+ KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, 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_DEL,
+ KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, 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_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [1] = LAYOUT_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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/aeboards/aegis/keymaps/default/readme.md b/keyboards/aeboards/aegis/keymaps/default/readme.md
new file mode 100644
index 000000000000..e6b24245634a
--- /dev/null
+++ b/keyboards/aeboards/aegis/keymaps/default/readme.md
@@ -0,0 +1,2 @@
+# The Default Aegis Layout
+
diff --git a/keyboards/aeboards/aegis/keymaps/via/keymap.c b/keyboards/aeboards/aegis/keymaps/via/keymap.c
new file mode 100644
index 000000000000..8437ffeb4ed5
--- /dev/null
+++ b/keyboards/aeboards/aegis/keymaps/via/keymap.c
@@ -0,0 +1,72 @@
+/* Copyright 2018 Jason Williams (Wilba)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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] = {
+ /* Keymap BASE: (Base Layer) Default Layer
+ * ,-------------------. ,-------------------------------------------------------------.
+ * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12|
+ * `-------------------' `-------------------------------------------------------------'
+ *
+ * |-------------------| ,-------------------------------------------------------------.
+ * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del|
+ * |-------------------| |-------------------------------------------------------------|
+ * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC |
+ * | + |--------------| |-------------------------------------------------------------|
+ * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return |
+ * |-------------------| |-------------------------------------------------------------|
+ * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN |
+ * | ENT|-------------------------------------------------------------------------------|
+ * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| |
+ * `------------------------------------------------------------------------------------'
+ */
+ [0] = LAYOUT_aegis(
+ KC_END , KC_HOME, KC_PGDN, KC_PGUP, 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, 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_DEL,
+ KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, 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_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [1] = LAYOUT_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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_aegis(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ 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/aeboards/aegis/keymaps/via/readme.md b/keyboards/aeboards/aegis/keymaps/via/readme.md
new file mode 100644
index 000000000000..a80671bd9435
--- /dev/null
+++ b/keyboards/aeboards/aegis/keymaps/via/readme.md
@@ -0,0 +1,2 @@
+# The VIA Aegis Layout
+
diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk
new file mode 100644
index 000000000000..f072c67198c2
--- /dev/null
+++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk
@@ -0,0 +1,68 @@
+# project specific files
+SRC = keyboards/wilba_tech/wt_main.c
+
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section
+BOOTLOADER = atmel-dfu
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file
diff --git a/keyboards/aeboards/aegis/readme.md b/keyboards/aeboards/aegis/readme.md
new file mode 100644
index 000000000000..1b8fc124e5b4
--- /dev/null
+++ b/keyboards/aeboards/aegis/readme.md
@@ -0,0 +1,14 @@
+AEGIS
+===
+
+A left handed g80-1800-esque keyboard by [aeboards](https://aeboards.com/)
+
+Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
+Hardware Supported: AEGIS
+Hardware Availability: Custom keyboard group buys
+
+Make example for this keyboard (after setting up your build environment):
+
+ make aeboards/aegis: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).
\ No newline at end of file
diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk
new file mode 100644
index 000000000000..f1c632289cca
--- /dev/null
+++ b/keyboards/aeboards/aegis/rules.mk
@@ -0,0 +1,65 @@
+# project specific files
+SRC = keyboards/wilba_tech/wt_main.c
+
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section
+BOOTLOADER = atmel-dfu
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h
index 4b30ca3094fb..2fe66d4bce9d 100644
--- a/keyboards/ai03/lunar/config.h
+++ b/keyboards/ai03/lunar/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/*
diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json
index c7f6454f0ee3..e18a10bde0ed 100644
--- a/keyboards/ai03/lunar/info.json
+++ b/keyboards/ai03/lunar/info.json
@@ -7,7 +7,78 @@
"height": 5,
"layouts": {
"LAYOUT": {
- "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":"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":"|", "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":"Home", "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.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":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}]
+ "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":"BackspaceL", "x":13, "y":0},
+ {"label":"BackspaceR", "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":"Home", "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.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":2.25},
+ {"x":6.5, "y":4, "w":1.5},
+ {"x":8, "y":4, "w":2.75},
+ {"label":"Alt", "x":10.75, "y":4, "w":1.25},
+ {"label":"Win", "x":12, "y":4},
+ {"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/ai03/orbit/config.h b/keyboards/ai03/orbit/config.h
new file mode 100644
index 000000000000..f4dc4fd636c5
--- /dev/null
+++ b/keyboards/ai03/orbit/config.h
@@ -0,0 +1,249 @@
+/*
+Copyright 2018 Ryota Goto
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 0xA103
+#define PRODUCT_ID 0x0003
+#define DEVICE_VER 0x0003
+#define MANUFACTURER ai03 Keyboard Designs
+#define PRODUCT Orbit
+#define DESCRIPTION Split ergonomic keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 10 // Double rows for split keyboards. Orbit has 5, so define 10
+#define MATRIX_COLS 7
+
+/*
+ * 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 { F7, F6, F5, F4, D3 }
+#define MATRIX_COL_PINS { C7, B4, D7, D6, D4, F1, F0 }
+#define MATRIX_ROW_PINS_RIGHT { B6, B5, B4, D7, E6 }
+#define MATRIX_COL_PINS_RIGHT { D4, D6, F1, F0, F4, F5, C6 }
+
+#define SPLIT_HAND_PIN D5
+
+//#define USE_I2C
+
+#define SELECT_SOFT_SERIAL_SPEED 1
+
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B7
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+// #define RGB_DI_PIN E2
+// #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 /* 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
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/ai03/orbit/info.json b/keyboards/ai03/orbit/info.json
new file mode 100644
index 000000000000..ca838811301e
--- /dev/null
+++ b/keyboards/ai03/orbit/info.json
@@ -0,0 +1,88 @@
+{
+ "keyboard_name": "orbit",
+ "url": "https://github.com/ai03-2725/Orbit",
+ "maintainer": "ai03",
+ "width": 16,
+ "height": 6,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x":0, "y":0.63},
+ {"x":1, "y":0.38},
+ {"x":2, "y":0.38},
+ {"x":3, "y":0.13},
+ {"x":4, "y":0},
+ {"x":5, "y":0.13},
+ {"x":6, "y":0.25},
+ {"x":9, "y":0.25},
+ {"x":10, "y":0.13},
+ {"x":11, "y":0},
+ {"x":12, "y":0.13},
+ {"x":13, "y":0.38},
+ {"x":14, "y":0.38},
+ {"x":15, "y":0.63},
+
+ {"x":0, "y":1.63},
+ {"x":1, "y":1.38},
+ {"x":2, "y":1.38},
+ {"x":3, "y":1.13},
+ {"x":4, "y":1},
+ {"x":5, "y":1.13},
+ {"x":6, "y":1.25},
+ {"x":9, "y":1.25},
+ {"x":10, "y":1.13},
+ {"x":11, "y":1},
+ {"x":12, "y":1.13},
+ {"x":13, "y":1.38},
+ {"x":14, "y":1.38},
+ {"x":15, "y":1.63},
+
+ {"x":0, "y":2.63},
+ {"x":1, "y":2.38},
+ {"x":2, "y":2.38},
+ {"x":3, "y":2.13},
+ {"x":4, "y":2},
+ {"x":5, "y":2.13},
+ {"x":6, "y":2.25},
+ {"x":9, "y":2.25},
+ {"x":10, "y":2.13},
+ {"x":11, "y":2},
+ {"x":12, "y":2.13},
+ {"x":13, "y":2.38},
+ {"x":14, "y":2.38},
+ {"x":15, "y":2.63},
+
+ {"x":0, "y":3.63},
+ {"x":1, "y":3.38},
+ {"x":2, "y":3.38},
+ {"x":3, "y":3.13},
+ {"x":4, "y":3},
+ {"x":5, "y":3.13},
+ {"x":6, "y":3.25},
+ {"x":9, "y":3.25},
+ {"x":10, "y":3.13},
+ {"x":11, "y":3},
+ {"x":12, "y":3.13},
+ {"x":13, "y":3.38},
+ {"x":14, "y":3.38},
+ {"x":15, "y":3.63},
+
+ {"x":1, "y":4.38},
+ {"x":2, "y":4.38},
+ {"x":3, "y":4.13},
+ {"x":4, "y":4},
+
+ {"x":5.5, "y":4.25},
+ {"x":6.5, "y":4.5, "h":1.5},
+
+ {"x":8.5, "y":4.5, "h":1.5},
+ {"x":9.5, "y":4.25},
+
+ {"x":11, "y":4},
+ {"x":12, "y":4.13},
+ {"x":13, "y":4.38},
+ {"x":14, "y":4.38}
+ ]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/ai03/orbit/keymaps/default/keymap.c b/keyboards/ai03/orbit/keymaps/default/keymap.c
new file mode 100644
index 000000000000..4c8c39fb0f22
--- /dev/null
+++ b/keyboards/ai03/orbit/keymaps/default/keymap.c
@@ -0,0 +1,91 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ MANUAL = SAFE_RANGE,
+ DBLZERO
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT( /* Base */
+ TO(1), 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_BSPC, \
+ TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \
+ KC_NO, 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_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \
+ KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL
+ ),
+ [1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */
+ TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \
+ TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \
+ TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \
+ TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+ [2] = LAYOUT( /* Mousekeys and Numpad */
+ KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \
+ KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \
+ TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \
+ TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case MANUAL:
+ if (record->event.pressed)
+ {
+ // Keypress
+ SEND_STRING("https://kb.ai03.me/redir/orbit");
+ }
+ else
+ {
+ // Key release
+ }
+ break;
+ case DBLZERO:
+ if (record->event.pressed)
+ {
+ // Keypress
+ SEND_STRING("00");
+ }
+ else
+ {
+ // Key release
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
+
+uint32_t layer_state_set_user(uint32_t state) {
+
+ return state;
+}
diff --git a/keyboards/ai03/orbit/keymaps/default/readme.md b/keyboards/ai03/orbit/keymaps/default/readme.md
new file mode 100644
index 000000000000..63c528abfa58
--- /dev/null
+++ b/keyboards/ai03/orbit/keymaps/default/readme.md
@@ -0,0 +1,3 @@
+# The default keymap for Orbit
+
+[KLE of layout](http://www.keyboard-layout-editor.com/#/gists/53ebf59524de12515cb7e2e6de94f0d6)
\ No newline at end of file
diff --git a/keyboards/ai03/orbit/matrix.c b/keyboards/ai03/orbit/matrix.c
new file mode 100644
index 000000000000..a1509666cd5b
--- /dev/null
+++ b/keyboards/ai03/orbit/matrix.c
@@ -0,0 +1,328 @@
+/*
+Copyright 2012 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 .
+*/
+
+/*
+ * scan matrix
+ */
+#include
+#include
+#include "wait.h"
+#include "util.h"
+#include "matrix.h"
+#include "split_util.h"
+#include "config.h"
+#include "split_flags.h"
+#include "quantum.h"
+#include "debounce.h"
+#include "transport.h"
+
+#if (MATRIX_COLS <= 8)
+# define print_matrix_header() print("\nr/c 01234567\n")
+# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop(matrix[i])
+# define ROW_SHIFTER ((uint8_t)1)
+#elif (MATRIX_COLS <= 16)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop16(matrix[i])
+# define ROW_SHIFTER ((uint16_t)1)
+#elif (MATRIX_COLS <= 32)
+# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n")
+# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row))
+# define matrix_bitpop(i) bitpop32(matrix[i])
+# define ROW_SHIFTER ((uint32_t)1)
+#endif
+
+#define ERROR_DISCONNECT_COUNT 5
+
+//#define ROWS_PER_HAND (MATRIX_ROWS / 2)
+
+#ifdef DIRECT_PINS
+static pin_t direct_pins[MATRIX_ROWS][MATRIX_COLS] = DIRECT_PINS;
+#else
+static pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
+static pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
+#endif
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t raw_matrix[ROWS_PER_HAND];
+
+// row offsets for each hand
+uint8_t thisHand, thatHand;
+
+// user-defined overridable functions
+
+__attribute__((weak)) void matrix_init_kb(void) { matrix_init_user(); }
+
+__attribute__((weak)) void matrix_scan_kb(void) { matrix_scan_user(); }
+
+__attribute__((weak)) void matrix_init_user(void) {}
+
+__attribute__((weak)) void matrix_scan_user(void) {}
+
+__attribute__((weak)) void matrix_slave_scan_user(void) {}
+
+// helper functions
+
+inline uint8_t matrix_rows(void) { return MATRIX_ROWS; }
+
+inline uint8_t matrix_cols(void) { return MATRIX_COLS; }
+
+bool matrix_is_modified(void) {
+ if (debounce_active()) return false;
+ return true;
+}
+
+inline bool matrix_is_on(uint8_t row, uint8_t col) { return (matrix[row] & ((matrix_row_t)1 << col)); }
+
+inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; }
+
+void matrix_print(void) {
+ print_matrix_header();
+
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ phex(row);
+ print(": ");
+ print_matrix_row(row);
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void) {
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += matrix_bitpop(i);
+ }
+ return count;
+}
+
+// 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 : (ROW_SHIFTER << col_index);
+ }
+ }
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+#elif (DIODE_DIRECTION == COL2ROW)
+
+static void select_row(uint8_t row) {
+ setPinOutput(row_pins[row]);
+ writePinLow(row_pins[row]);
+}
+
+static void unselect_row(uint8_t row) { setPinInputHigh(row_pins[row]); }
+
+static void unselect_rows(void) {
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
+}
+
+static void init_pins(void) {
+ unselect_rows();
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinInputHigh(col_pins[x]);
+ }
+}
+
+static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) {
+ // Store last value of row prior to reading
+ matrix_row_t last_row_value = current_matrix[current_row];
+
+ // Clear data in matrix row
+ current_matrix[current_row] = 0;
+
+ // Select row and wait for row selecton to stabilize
+ select_row(current_row);
+ wait_us(30);
+
+ // For each col...
+ for (uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) {
+ // Populate the matrix row with the state of the col pin
+ current_matrix[current_row] |= readPin(col_pins[col_index]) ? 0 : (ROW_SHIFTER << col_index);
+ }
+
+ // Unselect row
+ unselect_row(current_row);
+
+ return (last_row_value != current_matrix[current_row]);
+}
+
+#elif (DIODE_DIRECTION == ROW2COL)
+
+static void select_col(uint8_t col) {
+ setPinOutput(col_pins[col]);
+ writePinLow(col_pins[col]);
+}
+
+static void unselect_col(uint8_t col) { setPinInputHigh(col_pins[col]); }
+
+static void unselect_cols(void) {
+ for (uint8_t x = 0; x < MATRIX_COLS; x++) {
+ setPinInputHigh(col_pins[x]);
+ }
+}
+
+static void init_pins(void) {
+ unselect_cols();
+ for (uint8_t x = 0; x < ROWS_PER_HAND; x++) {
+ setPinInputHigh(row_pins[x]);
+ }
+}
+
+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 < ROWS_PER_HAND; 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])) {
+ // Pin HI, clear col bit
+ current_matrix[row_index] &= ~(ROW_SHIFTER << current_col);
+ } else {
+ // Pin LO, set col bit
+ current_matrix[row_index] |= (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(void) {
+ debug_enable = true;
+ debug_matrix = true;
+ debug_mouse = true;
+
+ // Set pinout for right half if pinout for that half is defined
+ if (!isLeftHand) {
+#ifdef MATRIX_ROW_PINS_RIGHT
+ const uint8_t row_pins_right[MATRIX_ROWS] = MATRIX_ROW_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ row_pins[i] = row_pins_right[i];
+ }
+#endif
+#ifdef MATRIX_COL_PINS_RIGHT
+ const uint8_t col_pins_right[MATRIX_COLS] = MATRIX_COL_PINS_RIGHT;
+ for (uint8_t i = 0; i < MATRIX_COLS; i++) {
+ col_pins[i] = col_pins_right[i];
+ }
+#endif
+ }
+
+ thisHand = isLeftHand ? 0 : (ROWS_PER_HAND);
+ thatHand = ROWS_PER_HAND - thisHand;
+
+ // initialize key pins
+ init_pins();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+
+ debounce_init(ROWS_PER_HAND);
+
+ matrix_init_quantum();
+}
+
+uint8_t _matrix_scan(void) {
+ bool changed = false;
+
+#if defined(DIRECT_PINS) || (DIODE_DIRECTION == COL2ROW)
+ // Set row, read cols
+ for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
+ changed |= read_cols_on_row(raw_matrix, current_row);
+ }
+#elif (DIODE_DIRECTION == ROW2COL)
+ // Set col, read rows
+ for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
+ changed |= read_rows_on_col(raw_matrix, current_col);
+ }
+#endif
+
+ debounce(raw_matrix, matrix + thisHand, ROWS_PER_HAND, changed);
+
+ return 1;
+}
+
+uint8_t matrix_scan(void) {
+ uint8_t ret = _matrix_scan();
+
+ if (is_keyboard_master()) {
+ static uint8_t error_count;
+
+ if (!transport_master(matrix + thatHand)) {
+ error_count++;
+
+ if (error_count > ERROR_DISCONNECT_COUNT) {
+ // reset other half if disconnected
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[thatHand + i] = 0;
+ }
+ }
+ } else {
+ error_count = 0;
+ }
+
+ matrix_scan_quantum();
+ } else {
+ transport_slave(matrix + thisHand);
+ matrix_slave_scan_user();
+ }
+
+ return ret;
+}
diff --git a/keyboards/ai03/orbit/matrix.h b/keyboards/ai03/orbit/matrix.h
new file mode 100644
index 000000000000..c2bdd3098c1d
--- /dev/null
+++ b/keyboards/ai03/orbit/matrix.h
@@ -0,0 +1,3 @@
+#pragma once
+
+#include
diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c
new file mode 100644
index 000000000000..2f149875b1cb
--- /dev/null
+++ b/keyboards/ai03/orbit/orbit.c
@@ -0,0 +1,228 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "orbit.h"
+#include "split_util.h"
+#include "transport.h"
+
+
+// Call led_toggle to set LEDs easily
+// LED IDs:
+//
+// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
+
+void led_toggle(int id, bool on) {
+
+ if (isLeftHand) {
+ switch(id) {
+ case 0:
+ // Left hand C6
+ if (on)
+ //PORTC |= (1<<6);
+ writePinHigh(C6);
+ else
+ //PORTC &= ~(1<<6);
+ writePinLow(C6);
+ break;
+ case 1:
+ // Left hand B6
+ if (on)
+ //PORTB |= (1<<6);
+ writePinHigh(B6);
+ else
+ //PORTB &= ~(1<<6);
+ writePinLow(B6);
+ break;
+ case 2:
+ // Left hand B5
+ if (on)
+ //PORTB |= (1<<5);
+ writePinHigh(B5);
+ else
+ //PORTB &= ~(1<<5);
+ writePinLow(B5);
+ break;
+ default:
+ break;
+ }
+ } else {
+ switch(id) {
+ case 3:
+ // Right hand F6
+ if (on)
+ //PORTF |= (1<<6);
+ writePinHigh(F6);
+ else
+ //PORTF &= ~(1<<6);
+ writePinLow(F6);
+ break;
+ case 4:
+ // Right hand F7
+ if (on)
+ //PORTF |= (1<<7);
+ writePinHigh(F7);
+ else
+ //PORTF &= ~(1<<7);
+ writePinLow(F7);
+ break;
+ case 5:
+ // Right hand C7
+ if (on)
+ //PORTC |= (1<<7);
+ writePinHigh(C7);
+ else
+ //PORTC &= ~(1<<7);
+ writePinLow(C7);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+// Set all LEDs at once using an array of 6 booleans
+// LED IDs:
+//
+// (LEFT) 0 1 2 | 3 4 5 (RIGHT)
+//
+// Ex. set_all_leds({ false, false, false, true, true, true }) would turn off left hand, turn on right hand
+
+void set_all_leds(bool leds[6]) {
+ for (int i = 0; i < 6; i++) {
+ led_toggle(i, leds[i]);
+ }
+}
+
+void set_layer_indicators(uint8_t layer) {
+
+ switch (layer)
+ {
+ case 0:
+ led_toggle(0, true);
+ led_toggle(1, false);
+ led_toggle(2, false);
+ break;
+ case 1:
+ led_toggle(0, true);
+ led_toggle(1, true);
+ led_toggle(2, false);
+ break;
+ case 2:
+ led_toggle(0, true);
+ led_toggle(1, true);
+ led_toggle(2, true);
+ break;
+ case 3:
+ led_toggle(0, false);
+ led_toggle(1, true);
+ led_toggle(2, true);
+ break;
+ case 4:
+ led_toggle(0, false);
+ led_toggle(1, false);
+ led_toggle(2, true);
+ break;
+ default:
+ led_toggle(0, true);
+ led_toggle(1, false);
+ led_toggle(2, true);
+ break;
+ }
+
+}
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ // Initialize indicator LEDs to output
+ if (isLeftHand)
+ {
+ setPinOutput(C6);
+ setPinOutput(B6);
+ setPinOutput(B5);
+ //DDRC |= (1<<6);
+ //DDRB |= (1<<6);
+ //DDRB |= (1<<5);
+ }
+ else
+ {
+ setPinOutput(F6);
+ setPinOutput(F7);
+ setPinOutput(C7);
+ //DDRF |= (1<<6);
+ //DDRF |= (1<<7);
+ //DDRC |= (1<<7);
+ }
+
+ set_layer_indicators(0);
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ if (is_keyboard_master()) {
+
+ serial_m2s_buffer.nlock_led = IS_LED_ON(usb_led, USB_LED_NUM_LOCK);
+ serial_m2s_buffer.clock_led = IS_LED_ON(usb_led, USB_LED_CAPS_LOCK);
+ serial_m2s_buffer.slock_led = IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK);
+
+ led_toggle(3, IS_LED_ON(usb_led, USB_LED_NUM_LOCK));
+ led_toggle(4, IS_LED_ON(usb_led, USB_LED_CAPS_LOCK));
+ led_toggle(5, IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK));
+
+ }
+
+ led_set_user(usb_led);
+}
+
+uint32_t layer_state_set_kb(uint32_t state) {
+
+ if (is_keyboard_master())
+ {
+
+ current_layer = biton32(state);
+ serial_m2s_buffer.current_layer = biton32(state);
+
+ // If left half, do the LED toggle thing
+ if (isLeftHand)
+ {
+ set_layer_indicators(biton32(state));
+ }
+
+ }
+ // NOTE: Do not set slave LEDs here.
+ // This is not called on slave
+
+ return layer_state_set_user(state);
+}
+
+
diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h
new file mode 100644
index 000000000000..211b9ebca9e2
--- /dev/null
+++ b/keyboards/ai03/orbit/orbit.h
@@ -0,0 +1,65 @@
+/* Copyright 2018 Ryota Goto
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 ORBIT_H
+#define ORBIT_H
+
+#include "quantum.h"
+
+/* This 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.
+ */
+
+#ifdef USE_I2C
+#include
+#ifdef __AVR__
+ #include
+ #include
+#endif
+#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, \
+ 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 } \
+}
+
+uint8_t current_layer;
+
+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/readme.md b/keyboards/ai03/orbit/readme.md
new file mode 100644
index 000000000000..58ba2079d5de
--- /dev/null
+++ b/keyboards/ai03/orbit/readme.md
@@ -0,0 +1,15 @@
+# Orbit
+
+![Orbit](https://raw.githubusercontent.com/ai03-2725/Orbit/master/Images/PCB-R2.0.jpg)
+
+A split ergonomic keyboard project.
+
+Keyboard Maintainer: [ai03](https://github.com/ai03-2725)
+Hardware Supported: The [Orbit PCB](https://github.com/ai03-2725/Orbit)
+Hardware Availability: [This repository](https://github.com/ai03-2725/Orbit) has PCB files. Case group buy orders are currently closed.
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ai03/orbit: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/ai03/orbit/rules.mk b/keyboards/ai03/orbit/rules.mk
new file mode 100644
index 000000000000..4b40e47cb7e8
--- /dev/null
+++ b/keyboards/ai03/orbit/rules.mk
@@ -0,0 +1,92 @@
+SRC += split_util.c \
+ split_flags.c \
+ serial.c \
+ transport.c \
+ matrix.c
+
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+USE_I2C = no # I2C for split communication
+CUSTOM_MATRIX = yes # For providing custom matrix.c (in this case, override regular matrix.c with split matrix.c)
+# SPLIT_KEYBOARD = yes # Split keyboard flag disabled as manual edits had to be done to the split common files
+
+
diff --git a/keyboards/ai03/orbit/serial.c b/keyboards/ai03/orbit/serial.c
new file mode 100644
index 000000000000..1315377a3459
--- /dev/null
+++ b/keyboards/ai03/orbit/serial.c
@@ -0,0 +1,546 @@
+/*
+ * WARNING: be careful changing this code, it is very timing dependent
+ *
+ * 2018-10-28 checked
+ * avr-gcc 4.9.2
+ * avr-gcc 5.4.0
+ * avr-gcc 7.3.0
+ */
+
+#ifndef F_CPU
+#define F_CPU 16000000
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include "serial.h"
+//#include
+
+#ifdef SOFT_SERIAL_PIN
+
+#ifdef __AVR_ATmega32U4__
+ // if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
+ #ifdef USE_AVR_I2C
+ #if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
+ #error Using ATmega32U4 I2C, so can not use PD0, PD1
+ #endif
+ #endif
+
+ #if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
+ #define SERIAL_PIN_DDR DDRD
+ #define SERIAL_PIN_PORT PORTD
+ #define SERIAL_PIN_INPUT PIND
+ #if SOFT_SERIAL_PIN == D0
+ #define SERIAL_PIN_MASK _BV(PD0)
+ #define EIMSK_BIT _BV(INT0)
+ #define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
+ #define SERIAL_PIN_INTERRUPT INT0_vect
+ #elif SOFT_SERIAL_PIN == D1
+ #define SERIAL_PIN_MASK _BV(PD1)
+ #define EIMSK_BIT _BV(INT1)
+ #define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
+ #define SERIAL_PIN_INTERRUPT INT1_vect
+ #elif SOFT_SERIAL_PIN == D2
+ #define SERIAL_PIN_MASK _BV(PD2)
+ #define EIMSK_BIT _BV(INT2)
+ #define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
+ #define SERIAL_PIN_INTERRUPT INT2_vect
+ #elif SOFT_SERIAL_PIN == D3
+ #define SERIAL_PIN_MASK _BV(PD3)
+ #define EIMSK_BIT _BV(INT3)
+ #define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
+ #define SERIAL_PIN_INTERRUPT INT3_vect
+ #endif
+ #elif SOFT_SERIAL_PIN == E6
+ #define SERIAL_PIN_DDR DDRE
+ #define SERIAL_PIN_PORT PORTE
+ #define SERIAL_PIN_INPUT PINE
+ #define SERIAL_PIN_MASK _BV(PE6)
+ #define EIMSK_BIT _BV(INT6)
+ #define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
+ #define SERIAL_PIN_INTERRUPT INT6_vect
+ #else
+ #error invalid SOFT_SERIAL_PIN value
+ #endif
+
+#else
+ #error serial.c now support ATmega32U4 only
+#endif
+
+#define ALWAYS_INLINE __attribute__((always_inline))
+#define NO_INLINE __attribute__((noinline))
+#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
+
+// parity check
+#define ODD_PARITY 1
+#define EVEN_PARITY 0
+#define PARITY EVEN_PARITY
+
+#ifdef SERIAL_DELAY
+ // custom setup in config.h
+ // #define TID_SEND_ADJUST 2
+ // #define SERIAL_DELAY 6 // micro sec
+ // #define READ_WRITE_START_ADJUST 30 // cycles
+ // #define READ_WRITE_WIDTH_ADJUST 8 // cycles
+#else
+// ============ Standard setups ============
+
+#ifndef SELECT_SOFT_SERIAL_SPEED
+#define SELECT_SOFT_SERIAL_SPEED 1
+// 0: about 189kbps (Experimental only)
+// 1: about 137kbps (default)
+// 2: about 75kbps
+// 3: about 39kbps
+// 4: about 26kbps
+// 5: about 20kbps
+#endif
+
+#if __GNUC__ < 6
+ #define TID_SEND_ADJUST 14
+#else
+ #define TID_SEND_ADJUST 2
+#endif
+
+#if SELECT_SOFT_SERIAL_SPEED == 0
+ // Very High speed
+ #define SERIAL_DELAY 4 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 34 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 1
+ // High speed
+ #define SERIAL_DELAY 6 // micro sec
+ #if __GNUC__ < 6
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_START_ADJUST 33 // cycles
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 2
+ // Middle speed
+ #define SERIAL_DELAY 12 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 3
+ // Low speed
+ #define SERIAL_DELAY 24 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 4
+ // Very Low speed
+ #define SERIAL_DELAY 36 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#elif SELECT_SOFT_SERIAL_SPEED == 5
+ // Ultra Low speed
+ #define SERIAL_DELAY 48 // micro sec
+ #define READ_WRITE_START_ADJUST 30 // cycles
+ #if __GNUC__ < 6
+ #define READ_WRITE_WIDTH_ADJUST 3 // cycles
+ #else
+ #define READ_WRITE_WIDTH_ADJUST 7 // cycles
+ #endif
+#else
+#error invalid SELECT_SOFT_SERIAL_SPEED value
+#endif /* SELECT_SOFT_SERIAL_SPEED */
+#endif /* SERIAL_DELAY */
+
+#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
+#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
+
+#define SLAVE_INT_WIDTH_US 1
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ #define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
+#else
+ #define SLAVE_INT_ACK_WIDTH_UNIT 2
+ #define SLAVE_INT_ACK_WIDTH 4
+#endif
+
+static SSTD_t *Transaction_table = NULL;
+static uint8_t Transaction_table_size = 0;
+
+inline static void serial_delay(void) ALWAYS_INLINE;
+inline static
+void serial_delay(void) {
+ _delay_us(SERIAL_DELAY);
+}
+
+inline static void serial_delay_half1(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half1(void) {
+ _delay_us(SERIAL_DELAY_HALF1);
+}
+
+inline static void serial_delay_half2(void) ALWAYS_INLINE;
+inline static
+void serial_delay_half2(void) {
+ _delay_us(SERIAL_DELAY_HALF2);
+}
+
+inline static void serial_output(void) ALWAYS_INLINE;
+inline static
+void serial_output(void) {
+ SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
+}
+
+// make the serial pin an input with pull-up resistor
+inline static void serial_input_with_pullup(void) ALWAYS_INLINE;
+inline static
+void serial_input_with_pullup(void) {
+ SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+inline static uint8_t serial_read_pin(void) ALWAYS_INLINE;
+inline static
+uint8_t serial_read_pin(void) {
+ return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
+}
+
+inline static void serial_low(void) ALWAYS_INLINE;
+inline static
+void serial_low(void) {
+ SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
+}
+
+inline static void serial_high(void) ALWAYS_INLINE;
+inline static
+void serial_high(void) {
+ SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
+}
+
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_output();
+ serial_high();
+}
+
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size)
+{
+ Transaction_table = sstd_table;
+ Transaction_table_size = (uint8_t)sstd_table_size;
+ serial_input_with_pullup();
+
+ // Enable INT0-INT3,INT6
+ EIMSK |= EIMSK_BIT;
+#if SERIAL_PIN_MASK == _BV(PE6)
+ // Trigger on falling edge of INT6
+ EICRB &= EICRx_BIT;
+#else
+ // Trigger on falling edge of INT0-INT3
+ EICRA &= EICRx_BIT;
+#endif
+}
+
+// Used by the sender to synchronize timing with the reciver.
+static void sync_recv(void) NO_INLINE;
+static
+void sync_recv(void) {
+ for (uint8_t i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
+ }
+ // This shouldn't hang if the target disconnects because the
+ // serial line will float to high if the target does disconnect.
+ while (!serial_read_pin());
+}
+
+// Used by the reciver to send a synchronization signal to the sender.
+static void sync_send(void) NO_INLINE;
+static
+void sync_send(void) {
+ serial_low();
+ serial_delay();
+ serial_high();
+}
+
+// Reads a byte from the serial line
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) NO_INLINE;
+static uint8_t serial_read_chunk(uint8_t *pterrcount, uint8_t bit) {
+ uint8_t byte, i, p, pb;
+
+ _delay_sub_us(READ_WRITE_START_ADJUST);
+ for( i = 0, byte = 0, p = PARITY; i < bit; i++ ) {
+ serial_delay_half1(); // read the middle of pulses
+ if( serial_read_pin() ) {
+ byte = (byte << 1) | 1; p ^= 1;
+ } else {
+ byte = (byte << 1) | 0; p ^= 0;
+ }
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+ }
+ /* recive parity bit */
+ serial_delay_half1(); // read the middle of pulses
+ pb = serial_read_pin();
+ _delay_sub_us(READ_WRITE_WIDTH_ADJUST);
+ serial_delay_half2();
+
+ *pterrcount += (p != pb)? 1 : 0;
+
+ return byte;
+}
+
+// Sends a byte with MSB ordering
+void serial_write_chunk(uint8_t data, uint8_t bit) NO_INLINE;
+void serial_write_chunk(uint8_t data, uint8_t bit) {
+ uint8_t b, p;
+ for( p = PARITY, b = 1<<(bit-1); b ; b >>= 1) {
+ if(data & b) {
+ serial_high(); p ^= 1;
+ } else {
+ serial_low(); p ^= 0;
+ }
+ serial_delay();
+ }
+ /* send parity bit */
+ if(p & 1) { serial_high(); }
+ else { serial_low(); }
+ serial_delay();
+
+ serial_low(); // sync_send() / senc_recv() need raise edge
+}
+
+static void serial_send_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+void serial_send_packet(uint8_t *buffer, uint8_t size) {
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ data = buffer[i];
+ sync_send();
+ serial_write_chunk(data,8);
+ }
+}
+
+static uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) NO_INLINE;
+static
+uint8_t serial_recive_packet(uint8_t *buffer, uint8_t size) {
+ uint8_t pecount = 0;
+ for (uint8_t i = 0; i < size; ++i) {
+ uint8_t data;
+ sync_recv();
+ data = serial_read_chunk(&pecount, 8);
+ buffer[i] = data;
+ }
+ return pecount == 0;
+}
+
+inline static
+void change_sender2reciver(void) {
+ sync_send(); //0
+ serial_delay_half1(); //1
+ serial_low(); //2
+ serial_input_with_pullup(); //2
+ serial_delay_half1(); //3
+}
+
+inline static
+void change_reciver2sender(void) {
+ sync_recv(); //0
+ serial_delay(); //1
+ serial_low(); //3
+ serial_output(); //3
+ serial_delay_half1(); //4
+}
+
+static inline uint8_t nibble_bits_count(uint8_t bits)
+{
+ bits = (bits & 0x5) + (bits >> 1 & 0x5);
+ bits = (bits & 0x3) + (bits >> 2 & 0x3);
+ return bits;
+}
+
+// interrupt handle to be used by the target device
+ISR(SERIAL_PIN_INTERRUPT) {
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ serial_low();
+ serial_output();
+ SSTD_t *trans = Transaction_table;
+#else
+ // recive transaction table index
+ uint8_t tid, bits;
+ uint8_t pecount = 0;
+ sync_recv();
+ bits = serial_read_chunk(&pecount,7);
+ tid = bits>>3;
+ bits = (bits&7) != nibble_bits_count(tid);
+ if( bits || pecount> 0 || tid > Transaction_table_size ) {
+ return;
+ }
+ serial_delay_half1();
+
+ serial_high(); // response step1 low->high
+ serial_output();
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT*SLAVE_INT_ACK_WIDTH);
+ SSTD_t *trans = &Transaction_table[tid];
+ serial_low(); // response step2 ack high->low
+#endif
+
+ // target send phase
+ if( trans->target2initiator_buffer_size > 0 )
+ serial_send_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size);
+ // target switch to input
+ change_sender2reciver();
+
+ // target recive phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ if (serial_recive_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size) ) {
+ *trans->status = TRANSACTION_ACCEPTED;
+ } else {
+ *trans->status = TRANSACTION_DATA_ERROR;
+ }
+ } else {
+ *trans->status = TRANSACTION_ACCEPTED;
+ }
+
+ sync_recv(); //weit initiator output to high
+}
+
+/////////
+// start transaction by initiator
+//
+// int soft_serial_transaction(int sstd_index)
+//
+// Returns:
+// TRANSACTION_END
+// TRANSACTION_NO_RESPONSE
+// TRANSACTION_DATA_ERROR
+// this code is very time dependent, so we need to disable interrupts
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void) {
+ SSTD_t *trans = Transaction_table;
+#else
+int soft_serial_transaction(int sstd_index) {
+ if( sstd_index > Transaction_table_size )
+ return TRANSACTION_TYPE_ERROR;
+ SSTD_t *trans = &Transaction_table[sstd_index];
+#endif
+ cli();
+
+ // signal to the target that we want to start a transaction
+ serial_output();
+ serial_low();
+ _delay_us(SLAVE_INT_WIDTH_US);
+
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+ // wait for the target response
+ serial_input_with_pullup();
+ _delay_us(SLAVE_INT_RESPONSE_TIME);
+
+ // check if the target is present
+ if (serial_read_pin()) {
+ // target failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+
+#else
+ // send transaction table index
+ int tid = (sstd_index<<3) | (7 & nibble_bits_count(sstd_index));
+ sync_send();
+ _delay_sub_us(TID_SEND_ADJUST);
+ serial_write_chunk(tid, 7);
+ serial_delay_half1();
+
+ // wait for the target response (step1 low->high)
+ serial_input_with_pullup();
+ while( !serial_read_pin() ) {
+ _delay_sub_us(2);
+ }
+
+ // check if the target is present (step2 high->low)
+ for( int i = 0; serial_read_pin(); i++ ) {
+ if (i > SLAVE_INT_ACK_WIDTH + 1) {
+ // slave failed to pull the line low, assume not present
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_NO_RESPONSE;
+ sei();
+ return TRANSACTION_NO_RESPONSE;
+ }
+ _delay_sub_us(SLAVE_INT_ACK_WIDTH_UNIT);
+ }
+#endif
+
+ // initiator recive phase
+ // if the target is present syncronize with it
+ if( trans->target2initiator_buffer_size > 0 ) {
+ if (!serial_recive_packet((uint8_t *)trans->target2initiator_buffer,
+ trans->target2initiator_buffer_size) ) {
+ serial_output();
+ serial_high();
+ *trans->status = TRANSACTION_DATA_ERROR;
+ sei();
+ return TRANSACTION_DATA_ERROR;
+ }
+ }
+
+ // initiator switch to output
+ change_reciver2sender();
+
+ // initiator send phase
+ if( trans->initiator2target_buffer_size > 0 ) {
+ serial_send_packet((uint8_t *)trans->initiator2target_buffer,
+ trans->initiator2target_buffer_size);
+ }
+
+ // always, release the line when not in use
+ sync_send();
+
+ *trans->status = TRANSACTION_END;
+ sei();
+ return TRANSACTION_END;
+}
+
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index) {
+ SSTD_t *trans = &Transaction_table[sstd_index];
+ cli();
+ int retval = *trans->status;
+ *trans->status = 0;;
+ sei();
+ return retval;
+}
+#endif
+
+#endif
+
+// Helix serial.c history
+// 2018-1-29 fork from let's split and add PD2, modify sync_recv() (#2308, bceffdefc)
+// 2018-6-28 bug fix master to slave comm and speed up (#3255, 1038bbef4)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-7-13 remove USE_SERIAL_PD2 macro (#3374, f30d6dd78)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-8-11 add support multi-type transaction (#3608, feb5e4aae)
+// (adjusted with avr-gcc 4.9.2)
+// 2018-10-21 fix serial and RGB animation conflict (#4191, 4665e4fff)
+// (adjusted with avr-gcc 7.3.0)
+// 2018-10-28 re-adjust compiler depend value of delay (#4269, 8517f8a66)
+// (adjusted with avr-gcc 5.4.0, 7.3.0)
+// 2018-12-17 copy to TOP/quantum/split_common/ and remove backward compatibility code (#4669)
diff --git a/keyboards/ai03/orbit/serial.h b/keyboards/ai03/orbit/serial.h
new file mode 100644
index 000000000000..1c1e640069c9
--- /dev/null
+++ b/keyboards/ai03/orbit/serial.h
@@ -0,0 +1,62 @@
+#pragma once
+
+#include
+
+// /////////////////////////////////////////////////////////////////
+// Need Soft Serial defines in config.h
+// /////////////////////////////////////////////////////////////////
+// ex.
+// #define SOFT_SERIAL_PIN ?? // ?? = D0,D1,D2,D3,E6
+// OPTIONAL: #define SELECT_SOFT_SERIAL_SPEED ? // ? = 1,2,3,4,5
+// // 1: about 137kbps (default)
+// // 2: about 75kbps
+// // 3: about 39kbps
+// // 4: about 26kbps
+// // 5: about 20kbps
+//
+// //// USE simple API (using signle-type transaction function)
+// /* nothing */
+// //// USE flexible API (using multi-type transaction function)
+// #define SERIAL_USE_MULTI_TRANSACTION
+//
+// /////////////////////////////////////////////////////////////////
+
+// Soft Serial Transaction Descriptor
+typedef struct _SSTD_t {
+ uint8_t *status;
+ uint8_t initiator2target_buffer_size;
+ uint8_t *initiator2target_buffer;
+ uint8_t target2initiator_buffer_size;
+ uint8_t *target2initiator_buffer;
+} SSTD_t;
+#define TID_LIMIT( table ) (sizeof(table) / sizeof(SSTD_t))
+
+// initiator is transaction start side
+void soft_serial_initiator_init(SSTD_t *sstd_table, int sstd_table_size);
+// target is interrupt accept side
+void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size);
+
+// initiator resullt
+#define TRANSACTION_END 0
+#define TRANSACTION_NO_RESPONSE 0x1
+#define TRANSACTION_DATA_ERROR 0x2
+#define TRANSACTION_TYPE_ERROR 0x4
+#ifndef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_transaction(void);
+#else
+int soft_serial_transaction(int sstd_index);
+#endif
+
+// target status
+// *SSTD_t.status has
+// initiator:
+// TRANSACTION_END
+// or TRANSACTION_NO_RESPONSE
+// or TRANSACTION_DATA_ERROR
+// target:
+// TRANSACTION_DATA_ERROR
+// or TRANSACTION_ACCEPTED
+#define TRANSACTION_ACCEPTED 0x8
+#ifdef SERIAL_USE_MULTI_TRANSACTION
+int soft_serial_get_and_clean_status(int sstd_index);
+#endif
diff --git a/quantum/split_common/split_flags.c b/keyboards/ai03/orbit/split_flags.c
similarity index 100%
rename from quantum/split_common/split_flags.c
rename to keyboards/ai03/orbit/split_flags.c
diff --git a/quantum/split_common/split_flags.h b/keyboards/ai03/orbit/split_flags.h
similarity index 100%
rename from quantum/split_common/split_flags.h
rename to keyboards/ai03/orbit/split_flags.h
diff --git a/keyboards/ai03/orbit/split_util.c b/keyboards/ai03/orbit/split_util.c
new file mode 100644
index 000000000000..5095cb8fdce1
--- /dev/null
+++ b/keyboards/ai03/orbit/split_util.c
@@ -0,0 +1,87 @@
+#include "split_util.h"
+#include "matrix.h"
+#include "keyboard.h"
+#include "config.h"
+#include "timer.h"
+#include "split_flags.h"
+#include "transport.h"
+#include "quantum.h"
+
+#ifdef EE_HANDS
+# include "tmk_core/common/eeprom.h"
+# include "eeconfig.h"
+#endif
+
+volatile bool isLeftHand = true;
+
+__attribute__((weak))
+bool is_keyboard_left(void) {
+ #ifdef SPLIT_HAND_PIN
+ // Test pin SPLIT_HAND_PIN for High/Low, if low it's right hand
+ setPinInput(SPLIT_HAND_PIN);
+ return readPin(SPLIT_HAND_PIN);
+ #else
+ #ifdef EE_HANDS
+ return eeprom_read_byte(EECONFIG_HANDEDNESS);
+ #else
+ #ifdef MASTER_RIGHT
+ return !is_keyboard_master();
+ #else
+ return is_keyboard_master();
+ #endif
+ #endif
+ #endif
+}
+
+bool is_keyboard_master(void)
+{
+#ifdef __AVR__
+ static enum { UNKNOWN, MASTER, SLAVE } usbstate = UNKNOWN;
+
+ // only check once, as this is called often
+ if (usbstate == UNKNOWN)
+ {
+ USBCON |= (1 << OTGPADE); // enables VBUS pad
+ wait_us(5);
+
+ usbstate = (USBSTA & (1 << VBUS)) ? MASTER : SLAVE; // checks state of VBUS
+ }
+
+ return (usbstate == MASTER);
+#else
+ return true;
+#endif
+}
+
+static void keyboard_master_setup(void) {
+#if defined(USE_I2C) || defined(EH)
+ #ifdef SSD1306OLED
+ matrix_master_OLED_init ();
+ #endif
+#endif
+ transport_master_init();
+
+ // For master the Backlight info needs to be sent on startup
+ // Otherwise the salve won't start with the proper info until an update
+ BACKLIT_DIRTY = true;
+}
+
+static void keyboard_slave_setup(void)
+{
+ transport_slave_init();
+}
+
+// this code runs before the usb and keyboard is initialized
+void matrix_setup(void)
+{
+ isLeftHand = is_keyboard_left();
+
+ if (is_keyboard_master())
+ {
+ keyboard_master_setup();
+ }
+ else
+ {
+ keyboard_slave_setup();
+ }
+}
diff --git a/keyboards/ai03/orbit/split_util.h b/keyboards/ai03/orbit/split_util.h
new file mode 100644
index 000000000000..20f7535bf44b
--- /dev/null
+++ b/keyboards/ai03/orbit/split_util.h
@@ -0,0 +1,10 @@
+#pragma once
+
+#include
+#include
+#include
+#include
+
+extern volatile bool isLeftHand;
+
+void matrix_master_OLED_init (void);
diff --git a/keyboards/ai03/orbit/transport.c b/keyboards/ai03/orbit/transport.c
new file mode 100644
index 000000000000..adedf2432205
--- /dev/null
+++ b/keyboards/ai03/orbit/transport.c
@@ -0,0 +1,238 @@
+
+#include "transport.h"
+
+#include "config.h"
+#include "matrix.h"
+#include "quantum.h"
+
+#include "orbit.h"
+
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
+#ifdef RGBLIGHT_ENABLE
+# include "rgblight.h"
+#endif
+
+#ifdef BACKLIGHT_ENABLE
+# include "backlight.h"
+ extern backlight_config_t backlight_config;
+#endif
+
+#if defined(USE_I2C) || defined(EH)
+
+#include "i2c.h"
+
+#ifndef SLAVE_I2C_ADDRESS
+# define SLAVE_I2C_ADDRESS 0x32
+#endif
+
+#if (MATRIX_COLS > 8)
+# error "Currently only supports 8 COLS"
+#endif
+
+// Get rows from other half over i2c
+bool transport_master(matrix_row_t matrix[]) {
+ int err = 0;
+
+ // write backlight info
+#ifdef BACKLIGHT_ENABLE
+ if (BACKLIT_DIRTY) {
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // Backlight location
+ err = i2c_master_write(I2C_BACKLIT_START);
+ if (err) { goto i2c_error; }
+
+ // Write backlight
+ i2c_master_write(get_backlight_level());
+
+ BACKLIT_DIRTY = false;
+ }
+#endif
+
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // start of matrix stored at I2C_KEYMAP_START
+ err = i2c_master_write(I2C_KEYMAP_START);
+ if (err) { goto i2c_error; }
+
+ // Start read
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
+ if (err) { goto i2c_error; }
+
+ if (!err) {
+ int i;
+ for (i = 0; i < ROWS_PER_HAND-1; ++i) {
+ matrix[i] = i2c_master_read(I2C_ACK);
+ }
+ matrix[i] = i2c_master_read(I2C_NACK);
+ i2c_master_stop();
+ } else {
+i2c_error: // the cable is disconnceted, or something else went wrong
+ i2c_reset_state();
+ return false;
+ }
+
+#ifdef RGBLIGHT_ENABLE
+ if (RGB_DIRTY) {
+ err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
+ if (err) { goto i2c_error; }
+
+ // RGB Location
+ err = i2c_master_write(I2C_RGB_START);
+ if (err) { goto i2c_error; }
+
+ uint32_t dword = eeconfig_read_rgblight();
+
+ // Write RGB
+ err = i2c_master_write_data(&dword, 4);
+ if (err) { goto i2c_error; }
+
+ RGB_DIRTY = false;
+ i2c_master_stop();
+ }
+#endif
+
+ return true;
+}
+
+void transport_slave(matrix_row_t matrix[]) {
+
+ for (int i = 0; i < ROWS_PER_HAND; ++i)
+ {
+ i2c_slave_buffer[I2C_KEYMAP_START + i] = matrix[i];
+ }
+ // Read Backlight Info
+ #ifdef BACKLIGHT_ENABLE
+ if (BACKLIT_DIRTY)
+ {
+ backlight_set(i2c_slave_buffer[I2C_BACKLIT_START]);
+ BACKLIT_DIRTY = false;
+ }
+ #endif
+ #ifdef RGBLIGHT_ENABLE
+ if (RGB_DIRTY)
+ {
+ // Disable interupts (RGB data is big)
+ cli();
+ // Create new DWORD for RGB data
+ uint32_t dword;
+
+ // Fill the new DWORD with the data that was sent over
+ uint8_t * dword_dat = (uint8_t *)(&dword);
+ for (int i = 0; i < 4; i++)
+ {
+ dword_dat[i] = i2c_slave_buffer[I2C_RGB_START + i];
+ }
+
+ // Update the RGB now with the new data and set RGB_DIRTY to false
+ rgblight_update_dword(dword);
+ RGB_DIRTY = false;
+ // Re-enable interupts now that RGB is set
+ sei();
+ }
+ #endif
+}
+
+void transport_master_init(void) {
+ i2c_master_init();
+}
+
+void transport_slave_init(void) {
+ i2c_slave_init(SLAVE_I2C_ADDRESS);
+}
+
+#else // USE_SERIAL
+
+#include "serial.h"
+
+
+
+volatile Serial_s2m_buffer_t serial_s2m_buffer = {};
+volatile Serial_m2s_buffer_t serial_m2s_buffer = {};
+uint8_t volatile status0 = 0;
+
+SSTD_t transactions[] = {
+ { (uint8_t *)&status0,
+ sizeof(serial_m2s_buffer), (uint8_t *)&serial_m2s_buffer,
+ sizeof(serial_s2m_buffer), (uint8_t *)&serial_s2m_buffer
+ }
+};
+
+uint8_t slave_layer_cache;
+uint8_t slave_nlock_cache;
+uint8_t slave_clock_cache;
+uint8_t slave_slock_cache;
+
+void transport_master_init(void)
+{ soft_serial_initiator_init(transactions, TID_LIMIT(transactions)); }
+
+void transport_slave_init(void)
+{
+ soft_serial_target_init(transactions, TID_LIMIT(transactions));
+ slave_layer_cache = 255;
+ slave_nlock_cache = 255;
+ slave_clock_cache = 255;
+ slave_slock_cache = 255;
+}
+
+bool transport_master(matrix_row_t matrix[]) {
+
+ if (soft_serial_transaction()) {
+ return false;
+ }
+
+ // TODO: if MATRIX_COLS > 8 change to unpack()
+ for (int i = 0; i < ROWS_PER_HAND; ++i) {
+ matrix[i] = serial_s2m_buffer.smatrix[i];
+ }
+
+ #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ // Code to send RGB over serial goes here (not implemented yet)
+ #endif
+
+ #ifdef BACKLIGHT_ENABLE
+ // Write backlight level for slave to read
+ serial_m2s_buffer.backlight_level = backlight_config.enable ? backlight_config.level : 0;
+ #endif
+
+ return true;
+}
+
+void transport_slave(matrix_row_t matrix[]) {
+
+ // TODO: if MATRIX_COLS > 8 change to pack()
+ for (int i = 0; i < ROWS_PER_HAND; ++i)
+ {
+ serial_s2m_buffer.smatrix[i] = matrix[i];
+ }
+ #ifdef BACKLIGHT_ENABLE
+ backlight_set(serial_m2s_buffer.backlight_level);
+ #endif
+ #if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ // Add serial implementation for RGB here
+ #endif
+
+ if (slave_layer_cache != serial_m2s_buffer.current_layer) {
+ slave_layer_cache = serial_m2s_buffer.current_layer;
+ set_layer_indicators(slave_layer_cache);
+ }
+
+ if (slave_nlock_cache != serial_m2s_buffer.nlock_led) {
+ slave_nlock_cache = serial_m2s_buffer.nlock_led;
+ led_toggle(3, slave_nlock_cache);
+ }
+ if (slave_clock_cache != serial_m2s_buffer.clock_led) {
+ slave_clock_cache = serial_m2s_buffer.clock_led;
+ led_toggle(4, slave_clock_cache);
+ }
+ if (slave_slock_cache != serial_m2s_buffer.slock_led) {
+ slave_slock_cache = serial_m2s_buffer.slock_led;
+ led_toggle(5, slave_slock_cache);
+ }
+
+}
+
+#endif
diff --git a/keyboards/ai03/orbit/transport.h b/keyboards/ai03/orbit/transport.h
new file mode 100644
index 000000000000..422e2ecb9902
--- /dev/null
+++ b/keyboards/ai03/orbit/transport.h
@@ -0,0 +1,42 @@
+#pragma once
+
+#include
+
+#define ROWS_PER_HAND (MATRIX_ROWS/2)
+
+typedef struct _Serial_s2m_buffer_t {
+ // TODO: if MATRIX_COLS > 8 change to uint8_t packed_matrix[] for pack/unpack
+ matrix_row_t smatrix[ROWS_PER_HAND];
+} Serial_s2m_buffer_t;
+
+typedef struct _Serial_m2s_buffer_t {
+#ifdef BACKLIGHT_ENABLE
+ uint8_t backlight_level;
+#endif
+#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_SPLIT)
+ rgblight_config_t rgblight_config; //not yet use
+ //
+ // When MCUs on both sides drive their respective RGB LED chains,
+ // it is necessary to synchronize, so it is necessary to communicate RGB information.
+ // In that case, define the RGBLIGHT_SPLIT macro.
+ //
+ // Otherwise, if the master side MCU drives both sides RGB LED chains,
+ // there is no need to communicate.
+#endif
+
+ uint8_t current_layer;
+ uint8_t nlock_led;
+ uint8_t clock_led;
+ uint8_t slock_led;
+
+} Serial_m2s_buffer_t;
+
+extern volatile Serial_s2m_buffer_t serial_s2m_buffer;
+extern volatile Serial_m2s_buffer_t serial_m2s_buffer;
+
+void transport_master_init(void);
+void transport_slave_init(void);
+
+// returns false if valid data not received from slave
+bool transport_master(matrix_row_t matrix[]);
+void transport_slave(matrix_row_t matrix[]);
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h
index 3a3daf8673f0..838d56963868 100644
--- a/keyboards/al1/config.h
+++ b/keyboards/al1/config.h
@@ -43,7 +43,7 @@ along with this program. If not, see .
*
*/
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B6
diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h
index c3e2ecb2e032..f551a3e3d163 100644
--- a/keyboards/alf/dc60/config.h
+++ b/keyboards/alf/dc60/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { B5, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B6
diff --git a/keyboards/alf/x11/config.h b/keyboards/alf/x11/config.h
new file mode 100644
index 000000000000..14c97247b525
--- /dev/null
+++ b/keyboards/alf/x11/config.h
@@ -0,0 +1,245 @@
+/*
+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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0000
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Alf
+#define PRODUCT x11
+#define DESCRIPTION A TKL custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 7
+#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 { B0, B1, B2, B3, B4, B5, B6 }
+#define MATRIX_COL_PINS { D0, D1, D2, D3, D4, D5, D6, D7, F0, F1, F4, F5, F6 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B7
+#define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 3
+
+#define RGB_DI_PIN F7
+#ifdef RGB_DI_PIN
+ #define RGBLED_NUM 28
+ #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 /* 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
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/alf/x11/info.json b/keyboards/alf/x11/info.json
new file mode 100644
index 000000000000..ca794f56ce7a
--- /dev/null
+++ b/keyboards/alf/x11/info.json
@@ -0,0 +1,103 @@
+{
+ "keyboard_name": "QMK80",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 18.25,
+ "height": 6.5,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 88,
+ "layout": [
+ {"label":"K00", "x":0, "y":0},
+ {"label":"K01", "x":2, "y":0},
+ {"label":"K02", "x":3, "y":0},
+ {"label":"K03", "x":4, "y":0},
+ {"label":"K04", "x":5, "y":0},
+ {"label":"K05", "x":6.5, "y":0},
+ {"label":"K06", "x":7.5, "y":0},
+ {"label":"K07", "x":8.5, "y":0},
+ {"label":"K08", "x":9.5, "y":0},
+ {"label":"K09", "x":11, "y":0},
+ {"label":"K0A", "x":12, "y":0},
+ {"label":"K0B", "x":13, "y":0},
+ {"label":"K0C", "x":14, "y":0},
+ {"label":"K60", "x":15.25, "y":0},
+ {"label":"K61", "x":16.25, "y":0},
+ {"label":"K62", "x":17.25, "y":0},
+ {"label":"K10", "x":0, "y":1.5},
+ {"label":"K11", "x":1, "y":1.5},
+ {"label":"K12", "x":2, "y":1.5},
+ {"label":"K13", "x":3, "y":1.5},
+ {"label":"K14", "x":4, "y":1.5},
+ {"label":"K15", "x":5, "y":1.5},
+ {"label":"K16", "x":6, "y":1.5},
+ {"label":"K17", "x":7, "y":1.5},
+ {"label":"K18", "x":8, "y":1.5},
+ {"label":"K19", "x":9, "y":1.5},
+ {"label":"K1A", "x":10, "y":1.5},
+ {"label":"K1B", "x":11, "y":1.5},
+ {"label":"K1C", "x":12, "y":1.5},
+ {"label":"K5A", "x":13, "y":1.5, "w":2},
+ {"label":"K63", "x":15.25, "y":1.5},
+ {"label":"K65", "x":16.25, "y":1.5},
+ {"label":"K67", "x":17.25, "y":1.5},
+ {"label":"K20", "x":0, "y":2.5, "w":1.5},
+ {"label":"K21", "x":1.5, "y":2.5},
+ {"label":"K22", "x":2.5, "y":2.5},
+ {"label":"K23", "x":3.5, "y":2.5},
+ {"label":"K24", "x":4.5, "y":2.5},
+ {"label":"K25", "x":5.5, "y":2.5},
+ {"label":"K26", "x":6.5, "y":2.5},
+ {"label":"K27", "x":7.5, "y":2.5},
+ {"label":"K28", "x":8.5, "y":2.5},
+ {"label":"K29", "x":9.5, "y":2.5},
+ {"label":"K2A", "x":10.5, "y":2.5},
+ {"label":"K2B", "x":11.5, "y":2.5},
+ {"label":"K2C", "x":12.5, "y":2.5},
+ {"label":"K4C", "x":13.5, "y":2.5, "w":1.5},
+ {"label":"K64", "x":15.25, "y":2.5},
+ {"label":"K66", "x":16.25, "y":2.5},
+ {"label":"K68", "x":17.25, "y":2.5},
+ {"label":"K30", "x":0, "y":3.5, "w":1.75},
+ {"label":"K31", "x":1.75, "y":3.5},
+ {"label":"K32", "x":2.75, "y":3.5},
+ {"label":"K33", "x":3.75, "y":3.5},
+ {"label":"K34", "x":4.75, "y":3.5},
+ {"label":"K35", "x":5.75, "y":3.5},
+ {"label":"K36", "x":6.75, "y":3.5},
+ {"label":"K37", "x":7.75, "y":3.5},
+ {"label":"K38", "x":8.75, "y":3.5},
+ {"label":"K39", "x":9.75, "y":3.5},
+ {"label":"K3A", "x":10.75, "y":3.5},
+ {"label":"K3B", "x":11.75, "y":3.5},
+ {"label":"K3C", "x":12.75, "y":3.5, "w":2.25},
+ {"label":"K40", "x":0, "y":4.5, "w":2.25},
+ {"label":"K41", "x":2.25, "y":4.5},
+ {"label":"K42", "x":3.25, "y":4.5},
+ {"label":"K43", "x":4.25, "y":4.5},
+ {"label":"K44", "x":5.25, "y":4.5},
+ {"label":"K45", "x":6.25, "y":4.5},
+ {"label":"K46", "x":7.25, "y":4.5},
+ {"label":"K47", "x":8.25, "y":4.5},
+ {"label":"K48", "x":9.25, "y":4.5},
+ {"label":"K49", "x":10.25, "y":4.5},
+ {"label":"K4A", "x":11.25, "y":4.5},
+ {"label":"K4B", "x":12.25, "y":4.5, "w":1.75},
+ {"label":"K69", "x":14, "y":4.5},
+ {"label":"K58", "x":16.25, "y":4.5},
+ {"label":"K50", "x":0, "y":5.5, "w":1.25},
+ {"label":"K51", "x":1.25, "y":5.5, "w":1.25},
+ {"label":"K52", "x":2.5, "y":5.5, "w":1.25},
+ {"label":"K53", "x":3.75, "y":5.5, "w":6.25},
+ {"label":"K54", "x":10, "y":5.5, "w":1.25},
+ {"label":"K55", "x":11.25, "y":5.5, "w":1.25},
+ {"label":"K56", "x":12.5, "y":5.5, "w":1.25},
+ {"label":"K57", "x":13.75, "y":5.5, "w":1.25},
+ {"label":"K6A", "x":15.25, "y":5.5},
+ {"label":"K59", "x":16.25, "y":5.5},
+ {"label":"K6B", "x":17.25, "y":5.5}
+ ]
+ }
+ }
+ }
+
\ No newline at end of file
diff --git a/keyboards/alf/x11/keymaps/default/config.h b/keyboards/alf/x11/keymaps/default/config.h
new file mode 100644
index 000000000000..26c6d6ade101
--- /dev/null
+++ b/keyboards/alf/x11/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* 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 .
+ */
+
+#pragma once
+
+// place overrides here
diff --git a/keyboards/alf/x11/keymaps/default/keymap.c b/keyboards/alf/x11/keymaps/default/keymap.c
new file mode 100644
index 000000000000..cd97dd0a2b4d
--- /dev/null
+++ b/keyboards/alf/x11/keymaps/default/keymap.c
@@ -0,0 +1,78 @@
+/* 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
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+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, \
+ 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, MO(1), KC_UP, KC_LCTL, \
+ KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+ [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, 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, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_MPLY, KC_MSTP, RGB_TOG, RGB_MOD, \
+ RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAI, KC_TRNS, \
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_VAD, RGB_SAD \
+ ),
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
+
+void matrix_init_user(void) {
+
+}
+
+void matrix_scan_user(void) {
+
+}
+
+void led_set_user(uint8_t usb_led) {
+
+}
diff --git a/keyboards/alf/x11/keymaps/default/readme.md b/keyboards/alf/x11/keymaps/default/readme.md
new file mode 100644
index 000000000000..a08c59173fe6
--- /dev/null
+++ b/keyboards/alf/x11/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for x11
diff --git a/keyboards/alf/x11/readme.md b/keyboards/alf/x11/readme.md
new file mode 100644
index 000000000000..b403a0952a47
--- /dev/null
+++ b/keyboards/alf/x11/readme.md
@@ -0,0 +1,13 @@
+# Alf X1.1
+
+TKL Keyboard made by Alf
+
+Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+Hardware Supported: Alf X1.1 PCB
+Hardware Availability: [Massdrop](https://www.massdrop.com/buy/alf-studio-x1-1-custom-mechanical-keyboard-kit)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make alf/x11: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/alf/x11/rules.mk b/keyboards/alf/x11/rules.mk
new file mode 100644
index 000000000000..180c60a4a4ec
--- /dev/null
+++ b/keyboards/alf/x11/rules.mk
@@ -0,0 +1,82 @@
+# MCU name
+#MCU = at90usb1286
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 = yes # Enable keyboard backlight functionality on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+EXTRAFLAGS += -flto
diff --git a/keyboards/alf/x11/x11.c b/keyboards/alf/x11/x11.c
new file mode 100644
index 000000000000..b91de016e281
--- /dev/null
+++ b/keyboards/alf/x11/x11.c
@@ -0,0 +1,63 @@
+/* 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 "x11.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ setPinOutput(C6);
+ setPinOutput(E6);
+ setPinOutput(C7);
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
+ writePinLow(C6);
+ } else {
+ writePinHigh(C6);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
+ writePinLow(E6);
+ } else {
+ writePinHigh(E6);
+ }
+
+ if (IS_LED_ON(usb_led, USB_LED_SCROLL_LOCK)) {
+ writePinLow(C7);
+ } else {
+ writePinHigh(C7);
+ }
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/alf/x11/x11.h b/keyboards/alf/x11/x11.h
new file mode 100644
index 000000000000..53f3a3e34d1d
--- /dev/null
+++ b/keyboards/alf/x11/x11.h
@@ -0,0 +1,43 @@
+/* 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 .
+ */
+#pragma once
+
+#include "quantum.h"
+
+/* This 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, K60, K61, K62, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K5A, K63, K65, K67, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K4C, K64, K66, K68, \
+ 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, K69, K58, \
+ K50, K51, K52, K53, K54, K55, K56, K57, K6A, K59, K6B \
+) { \
+ { 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, K55, K56, K57, K58, K59, K5A, KC_NO, KC_NO }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, KC_NO }, \
+}
diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h
index 16460ed701cf..1486612f9f17 100644
--- a/keyboards/alice/alice.h
+++ b/keyboards/alice/alice.h
@@ -1,5 +1,5 @@
/*
-Copyright 2017 Luiz Ribeiro
+Copyright 2019 Felipe Coury
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -21,30 +21,30 @@ along with this program. If not, see .
/* LAYOUT
* ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐
- * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │
+ * │50 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │0A │0B │0C │0D │0E │
* ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤
- * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │
+ * │51 │ │10 │11 │12 │13 │14 │15 │ │16 │17 │18 │19 │1A │1B │1C │1D │
* ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
- * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │
+ * │52 │ │20 │21 │22 │23 │24 │25 │ │26 │27 │28 │29 │2A │2B │2C │
* └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
- * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │
+ * │30 │31 │32 │33 │34 │35 │ │36 │37 │38 │39 │4A │4B │4C │4D │
* ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤
- * │56 │ │57 │58 │59 │ │60 │61 │ │62 │
+ * │40 │ │41 │42 │43 │ │46 │47 │ │48 │
* └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘
*/
#define LAYOUT( \
- K63, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \
- K64, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \
- K65, 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 \
+ K50, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \
+ K51, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \
+ K52, K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K4A, K4B, K4C, K4D, \
+ K40, K41, K42, K43, K46, K47, K48 \
) \
{ \
- { 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 , KC_NO }, \
- { K29 , K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K40 , K41 , KC_NO, KC_NO }, \
- { K42 , K43 , K44 , K45 , K46 , K47 , K48 , K49 , K50 , K51 , K52 , K53 , K54 , K55 , KC_NO }, \
- { K56 , K57 , K58 , K59 , KC_NO, KC_NO, K60 , K61 , K62 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
- { K63 , K64 , K65 , 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 , KC_NO }, \
+ { K20 , K21 , K22 , K23 , K24 , K25 , K26 , K27 , K28 , K29 , K2A , K2B , K2C , KC_NO, KC_NO }, \
+ { K30 , K31 , K32 , K33 , K34 , K35 , K36 , K37 , K38 , K39 , K4A , K4B , K4C , K4D , KC_NO }, \
+ { K40 , K41 , K42 , K43 , KC_NO, KC_NO, K46 , K47 , K48 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
+ { K50 , K51 , K52 , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \
}
diff --git a/keyboards/alice/program b/keyboards/alice/program
deleted file mode 100755
index 3779bad040aa..000000000000
--- a/keyboards/alice/program
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro , Sebastian Kaim
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s ' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboard in normal mode. Attempting to send it to bootloader mode ...', end='')
- printDeviceInfo(kb)
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/alice/rules.mk b/keyboards/alice/rules.mk
index bb57cbeae304..eecd38d7e760 100644
--- a/keyboards/alice/rules.mk
+++ b/keyboards/alice/rules.mk
@@ -45,4 +45,4 @@ OPT_DEFS = -DDEBUG_LEVEL=0
SRC += i2c_master.c
# programming options
-PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/alpha/keymaps/default/keymap.c b/keyboards/alpha/keymaps/default/keymap.c
index e8d04b8e7ea1..c18790fe4b3b 100755
--- a/keyboards/alpha/keymaps/default/keymap.c
+++ b/keyboards/alpha/keymaps/default/keymap.c
@@ -6,7 +6,7 @@
#define OTHER 3
enum custom_keycodes {
- MACRO1
+ MACRO1 = SAFE_RANGE
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c
index c81317b84425..884fb761d453 100755
--- a/keyboards/amj40/keymaps/default/keymap.c
+++ b/keyboards/amj40/keymaps/default/keymap.c
@@ -21,14 +21,6 @@ enum custom_keycodes {
ADJUST,
};
-
-
-
-
-// increase readability
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Default Layer
* ,-----------------------------------------------------------.
@@ -45,7 +37,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_ENT,\
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\
- KC_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \
+ KC_LCTL, KC_LGUI, KC_LALT, LT(_LOWER, KC_SPC),LT(_RAISE, KC_SPC),LT(_ADJUST, KC_LGUI), KC_RALT, KC_RCTL \
),
/* Function Layer 1 HHKB style
@@ -106,24 +98,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
-
-
-
-enum function_id {
- LAUNCH,
- RGBLED_TOGGLE,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC),
- [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC),
- [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI),
-
-};
-
-
-
-
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c
index 5055771ff86e..360424f300d7 100755
--- a/keyboards/amj40/keymaps/fabian/keymap.c
+++ b/keyboards/amj40/keymaps/fabian/keymap.c
@@ -50,9 +50,6 @@ enum custom_keycodes {
EXT_PLV
};
-#define XXXXXXX KC_NO
-#define _______ KC_TRNS
-
#define CTL_ESC CTL_T(KC_ESC) // Tap for Escape, hold for Control
#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Alt+Shift)
#define MEH_GRV MEH_T(KC_GRV) // Tap for Backtick, hold for Meh (Ctrl+Alt+Shift)
diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c
index baddea72d539..7642ede34da7 100644
--- a/keyboards/amj40/keymaps/myee/keymap.c
+++ b/keyboards/amj40/keymaps/myee/keymap.c
@@ -22,10 +22,6 @@ enum custom_keycodes {
ADJUST,
};
-// increase readability
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT( \
diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c
index fd8e198f59c8..c5dc25018c8c 100644
--- a/keyboards/amj60/keymaps/default/keymap.c
+++ b/keyboards/amj60/keymaps/default/keymap.c
@@ -11,10 +11,6 @@
// dual-role shortcuts
#define SPACEDUAL LT(_SPC, KC_SPACE)
-
-// increase readability
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
* ,-----------------------------------------------------------.
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c
index b5fd731ddd9b..0c5dc6b880a0 100644
--- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c
+++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c
@@ -30,10 +30,6 @@
#define GER_BRC_L RALT(KC_8) // [
#define GER_BRC_R RALT(KC_9) // ]
-// increase readability
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
* ,-----------------------------------------------------------.
@@ -111,21 +107,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_SFX] = LAYOUT_iso_splitrshift(
RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \
_______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \
- _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \
- _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \
+ _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \
_______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT),
};
-enum function_id {
- LAUNCH,
- RGBLED_TOGGLE,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_FUNCTION(LAUNCH),
- [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT),
-};
-
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
// MACRODOWN only works in this function
diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c
index fd8e198f59c8..c5dc25018c8c 100644
--- a/keyboards/amj60/keymaps/maximized/keymap.c
+++ b/keyboards/amj60/keymaps/maximized/keymap.c
@@ -11,10 +11,6 @@
// dual-role shortcuts
#define SPACEDUAL LT(_SPC, KC_SPACE)
-
-// increase readability
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _DEF: Default Layer
* ,-----------------------------------------------------------.
diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h
index 2e49380ae672..866bcd526605 100644
--- a/keyboards/amj96/config.h
+++ b/keyboards/amj96/config.h
@@ -44,7 +44,7 @@ along with this program. If not, see .
*/
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN D4
diff --git a/keyboards/amj96/keymaps/default/config.h b/keyboards/amj96/keymaps/default/config.h
index 5e346088ed1d..0c01a85594d3 100644
--- a/keyboards/amj96/keymaps/default/config.h
+++ b/keyboards/amj96/keymaps/default/config.h
@@ -14,11 +14,7 @@
* along with this program. If not, see .
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
+#pragma once
-#include "config_common.h"
// place overrides here
-
-#endif
diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c
index 01621d54f62d..1c9122c9ec72 100644
--- a/keyboards/amjpad/keymaps/default/keymap.c
+++ b/keyboards/amjpad/keymaps/default/keymap.c
@@ -1,9 +1,5 @@
#include QMK_KEYBOARD_H
-#ifdef RGBLIGHT_ENABLE
-#include "rgblight.h"
-#endif
-
// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -11,8 +7,6 @@
#define _BL 0
#define _FL 1
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c
index 463a265de134..eb50567e987c 100644
--- a/keyboards/amjpad/keymaps/max/keymap.c
+++ b/keyboards/amjpad/keymaps/max/keymap.c
@@ -14,8 +14,6 @@
#define _BL 0
#define _FL 1
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c
index 5245138bd16a..815ac2a6818f 100644
--- a/keyboards/amjpad/keymaps/ortho_left/keymap.c
+++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c
@@ -11,8 +11,6 @@
#define _BL 0
#define _FL 1
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c
index 52e93524b554..cbb81a2eabf4 100644
--- a/keyboards/amjpad/keymaps/ortho_right/keymap.c
+++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c
@@ -11,8 +11,6 @@
#define _BL 0
#define _FL 1
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap _BL: (Base Layer) Default Layer
* ,-------------------.
diff --git a/keyboards/ares/ares.c b/keyboards/ares/ares.c
new file mode 100644
index 000000000000..85c7435edc3f
--- /dev/null
+++ b/keyboards/ares/ares.c
@@ -0,0 +1,107 @@
+/*
+Copyright 2017 Luiz Ribeiro
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 "ares.h"
+
+#ifdef RGBLIGHT_ENABLE
+
+#include
+#include "i2c_master.h"
+#include "rgblight.h"
+
+extern rgblight_config_t rgblight_config;
+
+void matrix_init_kb(void) {
+ i2c_init();
+ // call user level keymaps, if any
+ matrix_init_user();
+}
+
+// custom RGB driver
+void rgblight_set(void) {
+ if (!rgblight_config.enable) {
+ memset(led, 0, 3 * RGBLED_NUM);
+ }
+
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+}
+
+bool rgb_init = false;
+
+void matrix_scan_kb(void) {
+ // if LEDs were previously on before poweroff, turn them back on
+ if (rgb_init == false && rgblight_config.enable) {
+ i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
+ rgb_init = true;
+ }
+
+ rgblight_task();
+ matrix_scan_user();
+}
+
+#endif
+
+#ifdef BACKLIGHT_ENABLE
+void backlight_init_ports(void) {
+ setPinOutput(D0);
+ setPinOutput(D1);
+ setPinOutput(D4);
+ setPinOutput(D6);
+}
+
+void backlight_set(uint8_t level) {
+ if (level == 0) {
+ // Turn out the lights
+ writePinLow(D0);
+ writePinLow(D1);
+ writePinLow(D4);
+ writePinLow(D6);
+ } else {
+ // Turn on the lights
+ writePinHigh(D0);
+ writePinHigh(D1);
+ writePinHigh(D4);
+ writePinHigh(D6);
+ }
+}
+#endif
+
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+/*
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+ matrix_init_user();
+}
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+ matrix_scan_user();
+}
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+ return process_record_user(keycode, record);
+}
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+ led_set_user(usb_led);
+}
+*/
\ No newline at end of file
diff --git a/keyboards/ares/ares.h b/keyboards/ares/ares.h
new file mode 100644
index 000000000000..41ecb570c65b
--- /dev/null
+++ b/keyboards/ares/ares.h
@@ -0,0 +1,37 @@
+/*
+Copyright 2019 Maarten 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 .
+*/
+
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT( \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4e, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
+ k00, k01, k02, k06, k0a, k0b, k0c, k0d \
+) \
+{ \
+ {k00, k01, k02, XXX, XXX, XXX, k06, XXX, XXX, XXX, 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, k2c, k2d, XXX}, \
+ {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, k4d, k4e} \
+}
diff --git a/keyboards/ares/config.h b/keyboards/ares/config.h
new file mode 100644
index 000000000000..f278c6fdca57
--- /dev/null
+++ b/keyboards/ares/config.h
@@ -0,0 +1,51 @@
+/*
+Copyright 2017 Luiz Ribeiro
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 0x20A0
+#define PRODUCT_ID 0x422D
+#define MANUFACTURER LSJ
+#define PRODUCT QMK Firmware for Ares
+
+#define RGBLED_NUM 16
+
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4 }
+#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 DEBOUNCING_DELAY 5
+
+#define NO_BACKLIGHT_CLOCK
+#define BACKLIGHT_LEVELS 1
+#define RGBLIGHT_ANIMATIONS
+
+#define NO_UART 1
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
\ No newline at end of file
diff --git a/keyboards/ares/info.json b/keyboards/ares/info.json
new file mode 100644
index 000000000000..00911deb93cf
--- /dev/null
+++ b/keyboards/ares/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "LSJ Ares",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT": {
+ "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":"|", "x":13, "y":0}, {"label":"Back space", "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":"|", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"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":"Fn", "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}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/ares/keymaps/default/keymap.c b/keyboards/ares/keymaps/default/keymap.c
new file mode 100644
index 000000000000..18e3d30b0d6a
--- /dev/null
+++ b/keyboards/ares/keymaps/default/keymap.c
@@ -0,0 +1,40 @@
+/*
+Copyright 2019 Maarten 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 QMK_KEYBOARD_H
+
+#define _MA 0
+#define _FN 1
+
+#define ______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+[_MA] = 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_BSLS, 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_BSLS, 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, MO(_FN),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTRL),
+[_FN] = LAYOUT(
+ RGB_MOD, BL_TOGG, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET,
+ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
+ ______, ______, ______, ______, ______, ______, ______, ______)
+
+};
diff --git a/keyboards/ares/readme.md b/keyboards/ares/readme.md
new file mode 100644
index 000000000000..338113a13aa7
--- /dev/null
+++ b/keyboards/ares/readme.md
@@ -0,0 +1,42 @@
+lSJ Ares
+========
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: LSJ Ares PCB
+Hardware Availability: https://geekhack.org/index.php?topic=93146.0
+
+Make example for this keyboard (after setting up your build environment):
+
+ make ares:default
+
+Flashing
+
+ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
+
+Windows:
+1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
+2. Place your keyboard into reset by holding the left control key and plugging the cable in.
+3. Press the `Find Device` button and ensure that your keyboard is found.
+4. Press the `Open .hex File` button and locate the `.hex` file you created.
+5. Press the `Flash Device` button and wait for the process to complete.
+
+macOS:
+1. Install homebrew by typing the following:
+ ```
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+ ```
+2. Install `crosspack-avr`.
+ ```
+ brew cask install crosspack-avr
+ ```
+3. Install the following packages:
+ ```
+ brew install python
+ brew install pyusb
+ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
+
+4. Place your keyboard into reset.
+5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
+
+
+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/ares/rules.mk b/keyboards/ares/rules.mk
new file mode 100644
index 000000000000..cd8edc611219
--- /dev/null
+++ b/keyboards/ares/rules.mk
@@ -0,0 +1,48 @@
+# Copyright 2017 Luiz Ribeiro
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# MCU name
+MCU = atmega32a
+PROTOCOL = VUSB
+
+# unsupported features for now
+NO_SUSPEND_POWER_DOWN = yes
+
+# processor frequency
+F_CPU = 12000000
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = bootloadHID
+
+# build options
+BOOTMAGIC_ENABLE = lite
+MOUSEKEY_ENABLE = no
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+BACKLIGHT_ENABLE = no
+RGBLIGHT_ENABLE = no
+RGBLIGHT_CUSTOM_DRIVER = yes
+NO_UART = yes
+
+OPT_DEFS = -DDEBUG_LEVEL=0
+
+SRC += i2c_master.c
+
+# programming options
+PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex
diff --git a/keyboards/ares/usbconfig.h b/keyboards/ares/usbconfig.h
new file mode 100644
index 000000000000..89b7ffbaab4c
--- /dev/null
+++ b/keyboards/ares/usbconfig.h
@@ -0,0 +1,396 @@
+/* Name: usbconfig.h
+ * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers
+ * Author: Christian Starkjohann
+ * Creation Date: 2005-04-01
+ * Tabsize: 4
+ * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH
+ * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt)
+ * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $
+ */
+
+#ifndef __usbconfig_h_included__
+#define __usbconfig_h_included__
+
+#include "config.h"
+
+/*
+General Description:
+This file is an example configuration (with inline documentation) for the USB
+driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is
+also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may
+wire the lines to any other port, as long as D+ is also wired to INT0 (or any
+other hardware interrupt, as long as it is the highest level interrupt, see
+section at the end of this file).
+*/
+
+/* ---------------------------- Hardware Config ---------------------------- */
+
+#define USB_CFG_IOPORTNAME D
+/* This is the port where the USB bus is connected. When you configure it to
+ * "B", the registers PORTB, PINB and DDRB will be used.
+ */
+#define USB_CFG_DMINUS_BIT 3
+/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected.
+ * This may be any bit in the port.
+ */
+#define USB_CFG_DPLUS_BIT 2
+/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected.
+ * This may be any bit in the port. Please note that D+ must also be connected
+ * to interrupt pin INT0! [You can also use other interrupts, see section
+ * "Optional MCU Description" below, or you can connect D- to the interrupt, as
+ * it is required if you use the USB_COUNT_SOF feature. If you use D- for the
+ * interrupt, the USB interrupt will also be triggered at Start-Of-Frame
+ * markers every millisecond.]
+ */
+#define USB_CFG_CLOCK_KHZ (F_CPU/1000)
+/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000,
+ * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code
+ * require no crystal, they tolerate +/- 1% deviation from the nominal
+ * frequency. All other rates require a precision of 2000 ppm and thus a
+ * crystal!
+ * Since F_CPU should be defined to your actual clock rate anyway, you should
+ * not need to modify this setting.
+ */
+#define USB_CFG_CHECK_CRC 0
+/* Define this to 1 if you want that the driver checks integrity of incoming
+ * data packets (CRC checks). CRC checks cost quite a bit of code size and are
+ * currently only available for 18 MHz crystal clock. You must choose
+ * USB_CFG_CLOCK_KHZ = 18000 if you enable this option.
+ */
+
+/* ----------------------- Optional Hardware Config ------------------------ */
+
+/* #define USB_CFG_PULLUP_IOPORTNAME D */
+/* If you connect the 1.5k pullup resistor from D- to a port pin instead of
+ * V+, you can connect and disconnect the device from firmware by calling
+ * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h).
+ * This constant defines the port on which the pullup resistor is connected.
+ */
+/* #define USB_CFG_PULLUP_BIT 4 */
+/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined
+ * above) where the 1.5k pullup resistor is connected. See description
+ * above for details.
+ */
+
+/* --------------------------- Functional Range ---------------------------- */
+
+#define USB_CFG_HAVE_INTRIN_ENDPOINT 1
+/* Define this to 1 if you want to compile a version with two endpoints: The
+ * default control endpoint 0 and an interrupt-in endpoint (any other endpoint
+ * number).
+ */
+#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1
+/* Define this to 1 if you want to compile a version with three endpoints: The
+ * default control endpoint 0, an interrupt-in endpoint 3 (or the number
+ * configured below) and a catch-all default interrupt-in endpoint as above.
+ * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature.
+ */
+#define USB_CFG_EP3_NUMBER 3
+/* If the so-called endpoint 3 is used, it can now be configured to any other
+ * endpoint number (except 0) with this macro. Default if undefined is 3.
+ */
+/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */
+/* The above macro defines the startup condition for data toggling on the
+ * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1.
+ * Since the token is toggled BEFORE sending any data, the first packet is
+ * sent with the oposite value of this configuration!
+ */
+#define USB_CFG_IMPLEMENT_HALT 0
+/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature
+ * for endpoint 1 (interrupt endpoint). Although you may not need this feature,
+ * it is required by the standard. We have made it a config option because it
+ * bloats the code considerably.
+ */
+#define USB_CFG_SUPPRESS_INTR_CODE 0
+/* Define this to 1 if you want to declare interrupt-in endpoints, but don't
+ * want to send any data over them. If this macro is defined to 1, functions
+ * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if
+ * you need the interrupt-in endpoints in order to comply to an interface
+ * (e.g. HID), but never want to send any data. This option saves a couple
+ * of bytes in flash memory and the transmit buffers in RAM.
+ */
+#define USB_CFG_INTR_POLL_INTERVAL 1
+/* If you compile a version with endpoint 1 (interrupt-in), this is the poll
+ * interval. The value is in milliseconds and must not be less than 10 ms for
+ * low speed devices.
+ */
+#define USB_CFG_IS_SELF_POWERED 0
+/* Define this to 1 if the device has its own power supply. Set it to 0 if the
+ * device is powered from the USB bus.
+ */
+#define USB_CFG_MAX_BUS_POWER 500
+/* Set this variable to the maximum USB bus power consumption of your device.
+ * The value is in milliamperes. [It will be divided by two since USB
+ * communicates power requirements in units of 2 mA.]
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITE 1
+/* Set this to 1 if you want usbFunctionWrite() to be called for control-out
+ * transfers. Set it to 0 if you don't need it and want to save a couple of
+ * bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_READ 0
+/* Set this to 1 if you need to send control replies which are generated
+ * "on the fly" when usbFunctionRead() is called. If you only want to send
+ * data from a static buffer, set it to 0 and return the data from
+ * usbFunctionSetup(). This saves a couple of bytes.
+ */
+#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0
+/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
+ * You must implement the function usbFunctionWriteOut() which receives all
+ * interrupt/bulk data sent to any endpoint other than 0. The endpoint number
+ * can be found in 'usbRxToken'.
+ */
+#define USB_CFG_HAVE_FLOWCONTROL 0
+/* Define this to 1 if you want flowcontrol over USB data. See the definition
+ * of the macros usbDisableAllRequests() and usbEnableAllRequests() in
+ * usbdrv.h.
+ */
+#define USB_CFG_DRIVER_FLASH_PAGE 0
+/* If the device has more than 64 kBytes of flash, define this to the 64 k page
+ * where the driver's constants (descriptors) are located. Or in other words:
+ * Define this to 1 for boot loaders on the ATMega128.
+ */
+#define USB_CFG_LONG_TRANSFERS 0
+/* Define this to 1 if you want to send/receive blocks of more than 254 bytes
+ * in a single control-in or control-out transfer. Note that the capability
+ * for long transfers increases the driver size.
+ */
+/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */
+/* This macro is a hook if you want to do unconventional things. If it is
+ * defined, it's inserted at the beginning of received message processing.
+ * If you eat the received message and don't want default processing to
+ * proceed, do a return after doing your things. One possible application
+ * (besides debugging) is to flash a status LED on each packet.
+ */
+/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */
+/* This macro is a hook if you need to know when an USB RESET occurs. It has
+ * one parameter which distinguishes between the start of RESET state and its
+ * end.
+ */
+/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */
+/* This macro (if defined) is executed when a USB SET_ADDRESS request was
+ * received.
+ */
+#define USB_COUNT_SOF 1
+/* define this macro to 1 if you need the global variable "usbSofCount" which
+ * counts SOF packets. This feature requires that the hardware interrupt is
+ * connected to D- instead of D+.
+ */
+/* #ifdef __ASSEMBLER__
+ * macro myAssemblerMacro
+ * in YL, TCNT0
+ * sts timer0Snapshot, YL
+ * endm
+ * #endif
+ * #define USB_SOF_HOOK myAssemblerMacro
+ * This macro (if defined) is executed in the assembler module when a
+ * Start Of Frame condition is detected. It is recommended to define it to
+ * the name of an assembler macro which is defined here as well so that more
+ * than one assembler instruction can be used. The macro may use the register
+ * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages
+ * immediately after an SOF pulse may be lost and must be retried by the host.
+ * What can you do with this hook? Since the SOF signal occurs exactly every
+ * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in
+ * designs running on the internal RC oscillator.
+ * Please note that Start Of Frame detection works only if D- is wired to the
+ * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES!
+ */
+#define USB_CFG_CHECK_DATA_TOGGLING 0
+/* define this macro to 1 if you want to filter out duplicate data packets
+ * sent by the host. Duplicates occur only as a consequence of communication
+ * errors, when the host does not receive an ACK. Please note that you need to
+ * implement the filtering yourself in usbFunctionWriteOut() and
+ * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable
+ * for each control- and out-endpoint to check for duplicate packets.
+ */
+#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0
+/* define this macro to 1 if you want the function usbMeasureFrameLength()
+ * compiled in. This function can be used to calibrate the AVR's RC oscillator.
+ */
+#define USB_USE_FAST_CRC 0
+/* The assembler module has two implementations for the CRC algorithm. One is
+ * faster, the other is smaller. This CRC routine is only used for transmitted
+ * messages where timing is not critical. The faster routine needs 31 cycles
+ * per byte while the smaller one needs 61 to 69 cycles. The faster routine
+ * may be worth the 32 bytes bigger code size if you transmit lots of data and
+ * run the AVR close to its limit.
+ */
+
+/* -------------------------- Device Description --------------------------- */
+
+#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF)
+/* USB vendor ID for the device, low byte first. If you have registered your
+ * own Vendor ID, define it here. Otherwise you may use one of obdev's free
+ * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF)
+/* This is the ID of the product, low byte first. It is interpreted in the
+ * scope of the vendor ID. If you have registered your own VID with usb.org
+ * or if you have licensed a PID from somebody else, define it here. Otherwise
+ * you may use one of obdev's free shared VID/PID pairs. See the file
+ * USB-IDs-for-free.txt for details!
+ * *** IMPORTANT NOTE ***
+ * This template uses obdev's shared VID/PID pair for Vendor Class devices
+ * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand
+ * the implications!
+ */
+#define USB_CFG_DEVICE_VERSION 0x00, 0x02
+/* Version number of the device: Minor number first, then major number.
+ */
+#define USB_CFG_VENDOR_NAME 'L', 'S', 'J'
+#define USB_CFG_VENDOR_NAME_LEN 3
+/* These two values define the vendor name returned by the USB device. The name
+ * must be given as a list of characters under single quotes. The characters
+ * are interpreted as Unicode (UTF-16) entities.
+ * If you don't want a vendor name string, undefine these macros.
+ * ALWAYS define a vendor name containing your Internet domain name if you use
+ * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for
+ * details.
+ */
+#define USB_CFG_DEVICE_NAME 'A', 'r', 'e', 's'
+#define USB_CFG_DEVICE_NAME_LEN 4
+/* Same as above for the device name. If you don't want a device name, undefine
+ * the macros. See the file USB-IDs-for-free.txt before you assign a name if
+ * you use a shared VID/PID.
+ */
+/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */
+/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */
+/* Same as above for the serial number. If you don't want a serial number,
+ * undefine the macros.
+ * It may be useful to provide the serial number through other means than at
+ * compile time. See the section about descriptor properties below for how
+ * to fine tune control over USB descriptors such as the string descriptor
+ * for the serial number.
+ */
+#define USB_CFG_DEVICE_CLASS 0
+#define USB_CFG_DEVICE_SUBCLASS 0
+/* See USB specification if you want to conform to an existing device class.
+ * Class 0xff is "vendor specific".
+ */
+#define USB_CFG_INTERFACE_CLASS 3 /* HID */
+#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */
+#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */
+/* See USB specification if you want to conform to an existing device class or
+ * protocol. The following classes must be set at interface level:
+ * HID class is 3, no subclass and protocol required (but may be useful!)
+ * CDC class is 2, use subclass 2 and protocol 1 for ACM
+ */
+#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0
+/* Define this to the length of the HID report descriptor, if you implement
+ * an HID device. Otherwise don't define it or define it to 0.
+ * If you use this define, you must add a PROGMEM character array named
+ * "usbHidReportDescriptor" to your code which contains the report descriptor.
+ * Don't forget to keep the array and this define in sync!
+ */
+
+/* #define USB_PUBLIC static */
+/* Use the define above if you #include usbdrv.c instead of linking against it.
+ * This technique saves a couple of bytes in flash memory.
+ */
+
+/* ------------------- Fine Control over USB Descriptors ------------------- */
+/* If you don't want to use the driver's default USB descriptors, you can
+ * provide our own. These can be provided as (1) fixed length static data in
+ * flash memory, (2) fixed length static data in RAM or (3) dynamically at
+ * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more
+ * information about this function.
+ * Descriptor handling is configured through the descriptor's properties. If
+ * no properties are defined or if they are 0, the default descriptor is used.
+ * Possible properties are:
+ * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched
+ * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is
+ * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if
+ * you want RAM pointers.
+ * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found
+ * in static memory is in RAM, not in flash memory.
+ * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash),
+ * the driver must know the descriptor's length. The descriptor itself is
+ * found at the address of a well known identifier (see below).
+ * List of static descriptor names (must be declared PROGMEM if in flash):
+ * char usbDescriptorDevice[];
+ * char usbDescriptorConfiguration[];
+ * char usbDescriptorHidReport[];
+ * char usbDescriptorString0[];
+ * int usbDescriptorStringVendor[];
+ * int usbDescriptorStringDevice[];
+ * int usbDescriptorStringSerialNumber[];
+ * Other descriptors can't be provided statically, they must be provided
+ * dynamically at runtime.
+ *
+ * Descriptor properties are or-ed or added together, e.g.:
+ * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18))
+ *
+ * The following descriptors are defined:
+ * USB_CFG_DESCR_PROPS_DEVICE
+ * USB_CFG_DESCR_PROPS_CONFIGURATION
+ * USB_CFG_DESCR_PROPS_STRINGS
+ * USB_CFG_DESCR_PROPS_STRING_0
+ * USB_CFG_DESCR_PROPS_STRING_VENDOR
+ * USB_CFG_DESCR_PROPS_STRING_PRODUCT
+ * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER
+ * USB_CFG_DESCR_PROPS_HID
+ * USB_CFG_DESCR_PROPS_HID_REPORT
+ * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver)
+ *
+ * Note about string descriptors: String descriptors are not just strings, they
+ * are Unicode strings prefixed with a 2 byte header. Example:
+ * int serialNumberDescriptor[] = {
+ * USB_STRING_DESCRIPTOR_HEADER(6),
+ * 'S', 'e', 'r', 'i', 'a', 'l'
+ * };
+ */
+
+#define USB_CFG_DESCR_PROPS_DEVICE 0
+#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0
+#define USB_CFG_DESCR_PROPS_STRINGS 0
+#define USB_CFG_DESCR_PROPS_STRING_0 0
+#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0
+#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0
+#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0
+#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID 0
+#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC
+//#define USB_CFG_DESCR_PROPS_HID_REPORT 0
+#define USB_CFG_DESCR_PROPS_UNKNOWN 0
+
+#define usbMsgPtr_t unsigned short
+/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to
+ * a scalar type here because gcc generates slightly shorter code for scalar
+ * arithmetics than for pointer arithmetics. Remove this define for backward
+ * type compatibility or define it to an 8 bit type if you use data in RAM only
+ * and all RAM is below 256 bytes (tiny memory model in IAR CC).
+ */
+
+/* ----------------------- Optional MCU Description ------------------------ */
+
+/* The following configurations have working defaults in usbdrv.h. You
+ * usually don't need to set them explicitly. Only if you want to run
+ * the driver on a device which is not yet supported or with a compiler
+ * which is not fully supported (such as IAR C) or if you use a differnt
+ * interrupt than INT0, you may have to define some of these.
+ */
+/* #define USB_INTR_CFG MCUCR */
+/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE GIMSK */
+/* #define USB_INTR_ENABLE_BIT INT0 */
+/* #define USB_INTR_PENDING GIFR */
+/* #define USB_INTR_PENDING_BIT INTF0 */
+/* #define USB_INTR_VECTOR INT0_vect */
+
+/* Set INT1 for D- falling edge to count SOF */
+/* #define USB_INTR_CFG EICRA */
+#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10))
+/* #define USB_INTR_CFG_CLR 0 */
+/* #define USB_INTR_ENABLE EIMSK */
+#define USB_INTR_ENABLE_BIT INT1
+/* #define USB_INTR_PENDING EIFR */
+#define USB_INTR_PENDING_BIT INTF1
+#define USB_INTR_VECTOR INT1_vect
+
+#endif /* __usbconfig_h_included__ */
diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c
index 15343ab33541..87e1244214a5 100644
--- a/keyboards/atom47/keymaps/LEdiodes/keymap.c
+++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c
@@ -6,8 +6,6 @@
#define _L2 2
#define _L3 3
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_L0] = 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_BSPC, \
diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c
index a66961fba92e..dc87b5a52bea 100644
--- a/keyboards/atom47/keymaps/default/keymap.c
+++ b/keyboards/atom47/keymaps/default/keymap.c
@@ -10,8 +10,6 @@
#define _FN1 2 //Fn1
#define _PN 3 //Pn
-#define _______ KC_TRNS
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_MA] = 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_BSPC, \
diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/atom47/keymaps/maartenwut/keymap.c
index 33ed0936a0a8..c01ace92a96f 100644
--- a/keyboards/atom47/keymaps/maartenwut/keymap.c
+++ b/keyboards/atom47/keymaps/maartenwut/keymap.c
@@ -9,8 +9,6 @@
#define _LO 1 //FN1
#define _RA 2 //FN
-#define _______ KC_TRNS
-
enum custom_keycodes {
CTRLZ = SAFE_RANGE,
CTRLX,
diff --git a/keyboards/atomic/keymaps/default/keymap.c b/keyboards/atomic/keymaps/default/keymap.c
index 6e8cd9f05c75..55de476d1a8f 100644
--- a/keyboards/atomic/keymaps/default/keymap.c
+++ b/keyboards/atomic/keymaps/default/keymap.c
@@ -1,9 +1,7 @@
#include QMK_KEYBOARD_H
// Fillers to make layering more clear
-#define _______ KC_TRNS
#define ___T___ KC_TRNS
-#define XXXXXXX KC_NO
// Layer shorthand
#define _QW 0
diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c
index 4ccac63f6cb1..33b3a9d824b8 100644
--- a/keyboards/atomic/keymaps/pvc/keymap.c
+++ b/keyboards/atomic/keymaps/pvc/keymap.c
@@ -104,8 +104,6 @@ enum keyboard_macros {
#define TG_NKRO MAGIC_TOGGLE_NKRO
#define OS_SHFT KC_FN0
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
#define ________________ _______, _______
#define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX
@@ -608,4 +606,4 @@ void music_scale_user(void)
PLAY_SONG(music_scale);
}
-#endif /* AUDIO_ENABLE */
\ No newline at end of file
+#endif /* AUDIO_ENABLE */
diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md
index ab2fa4a23975..0561c4fea5ec 100644
--- a/keyboards/atomic/readme.md
+++ b/keyboards/atomic/readme.md
@@ -3,7 +3,7 @@ Atomic
![Atomic](http://i.imgur.com/3gNDJAh.jpg)
-A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB. [More info on qmk.fm](http://qmk.fm/atomic/)
+A compact 60% (15x5) ortholinear keyboard kit made and sold by OLKB.
Keyboard Maintainer: [Jack Humbert](https://github.com/jackhumbert)
Hardware Supported: Atomic PCB rev1, Teensy 2.0
diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c
index d353728a97e4..631697384b89 100644
--- a/keyboards/atreus/keymaps/default/keymap.c
+++ b/keyboards/atreus/keymaps/default/keymap.c
@@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/
[_LW] = LAYOUT( /* [> LOWER <] */
KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10 ,
- KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
+ KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11 ,
KC_NO, KC_VOLU, KC_NO, KC_NO, RESET, KC_NO, KC_F1, KC_F2, KC_F3, KC_F12 ,
KC_NO, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, TO(_QW), KC_PSCR, KC_SLCK, KC_PAUS )
};
diff --git a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
index a6efd1befa37..0fda245e2ee5 100644
--- a/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
+++ b/keyboards/atreus/keymaps/dvorak_42_key/keymap.c
@@ -8,6 +8,21 @@
#define COMBINED 3
#define BROWSER_CONTROL 4
+// aliases
+// shell
+#define SHELL_DEL_WORD RCTL(KC_W)
+// android studio
+
+#define AS_TABLEFT LALT(KC_LEFT)
+#define AS_TABRIGHT LALT(KC_RIGHT)
+#define AS_SYMBOL LCTL(LALT(KC_N))
+#define AS_CLASS LCTL(KC_N)
+#define AS_FINDUSAGE LALT(KC_F7)
+#define AS_BACK LCTL(LALT(KC_LEFT))
+#define AS_GO_DECLARATION LCTL(KC_B)
+#define AS_GO_IMPLEMENTATION LCTL(LALT(KC_B))
+#define AS_CLOSETAB LCTL(KC_F4)
+#define AS_CLOSETOOLWINDOW LCTL(LSFT(KC_F4))
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
@@ -37,10 +52,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
),
[KEYNAV] = LAYOUT(
- KC_ESC, CLOUD9_GOTO_LINE, RCTL(KC_Z), RCTL(KC_S), MEH(KC_F10), KC_TRNS, KC_HOME, KC_UP, KC_END, KC_PGUP,
- MEH(KC_F11), CLOUD9_GOTO_SYMBOL, RSFT(KC_TAB), KC_TAB, MEH(KC_A), LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT),
- MEH(KC_B), CLOUD9_NAVIGATE, CLOUD9_TAB_LEFT, CLOUD9_TAB_RIGHT, CLOUD9_TAB_CLOSE, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE)
+ KC_ESC, AS_GO_IMPLEMENTATION, RCTL(KC_Z), RCTL(KC_S), MEH(KC_A), MEH(KC_B), KC_HOME, KC_UP, KC_END, KC_PGUP,
+ AS_BACK, AS_SYMBOL, RSFT(KC_TAB), KC_TAB, SHELL_DEL_WORD, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT),
+ AS_FINDUSAGE, AS_CLASS, AS_TABLEFT, AS_TABRIGHT, AS_CLOSETAB, KC_TRNS, RCTL(KC_C), RCTL(KC_X), RCTL(KC_V), KC_PGDOWN,
+ AS_CLOSETOOLWINDOW, AS_GO_DECLARATION, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENTER, KC_SPACE, KC_BSPC, RCTL(KC_BSPC), KC_DELETE, LCTL(KC_DELETE)
),
[KEYSEL] = LAYOUT(
diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c
index 232c700e948b..e890e7f52812 100644
--- a/keyboards/atreus/keymaps/erlandsona/keymap.c
+++ b/keyboards/atreus/keymaps/erlandsona/keymap.c
@@ -11,11 +11,6 @@
#define NUMS 1
#define MOUS 2
-// Some quick aliases, just to make it look pretty
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = LAYOUT( /* Qwerty */
KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P ,
diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c
index ed1f634cebe8..a03dee9ca9d5 100644
--- a/keyboards/atreus/keymaps/xk/keymap.c
+++ b/keyboards/atreus/keymaps/xk/keymap.c
@@ -57,9 +57,6 @@ WINSH,
OSX,
};
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
// action-TAP for key/mod behavior LT(layer, KC)
#define XK_TAB LT(_KAMELOC, KC_TAB)
#define XK_BSP LT(_KAMELOC, KC_BSPC)
diff --git a/keyboards/atreus/keymaps/xyverz/keymap.c b/keyboards/atreus/keymaps/xyverz/keymap.c
index dc9c308c3894..fe1ca295d86f 100644
--- a/keyboards/atreus/keymaps/xyverz/keymap.c
+++ b/keyboards/atreus/keymaps/xyverz/keymap.c
@@ -38,10 +38,6 @@ enum planck_keycodes {
#define ESCTRL CTL_T(KC_ESC)
#define TABALT ALT_T(KC_TAB)
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Dvorak Layer
,----------------------------------. ,----------------------------------.
diff --git a/keyboards/atreus/keymaps/yttyx/README.md b/keyboards/atreus/keymaps/yttyx/README.md
index 9ed9d6239b78..aac02c6c11f7 100644
--- a/keyboards/atreus/keymaps/yttyx/README.md
+++ b/keyboards/atreus/keymaps/yttyx/README.md
@@ -1,77 +1,103 @@
# Overview
-A Balance 12 layout for the Atreus keyboard.
+This layout is based on Balance Twelve (mirror variant) by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
+for more information. It's designed for left-handers who use their right hand for the mouse.
-Balance 12 was created by Sasha Viminitz. Please see [this page](https://mathematicalmulticore.wordpress.com/the-keyboard-layout-project/)
-for some background on the design of the layout.
+## To build
-* The variant used here is a mirror of the original for left-handers
-* The central column of punctuation keys has been moved elsewhere
-* Home positions for the left and right forefingers are *T* and *A* respectively
+```
+sudo make atreus:yttyx
+```
-## To build/flash
+## To flash (example)
-> make atreus:yttyx:avrdude
+```
+sudo avrdude -p atmega32u4 -c avr109 -U flash:w:atreus_yttyx.hex -P /dev/ttyACM0
+```
## Layers
### Base:
- .----------------------------------. .------------------------------.
- | P | L | C | D | W | | U | O | Y | K | Q |
- +------+------+------+-----+-------| |------+-----+-----+-----+-----|
- | N | R | S | T | M | | A | E | I | H | V |
- +------+------+------+-----+-------| |------+-----+-----+-----+-----|
- | Z | J | F | G | B | | , | . | ; | X | - |
- +------+------+------+-----+-------+---------+------+-----+-----+-----+-----|
- | Shft | Ctl | Alt | BS | Space | L1 | R1 | Shft | R2 | Win | Ctl | Alt |
- '---------------------------------------------------------------------------'
-
-### L1:
-
- .---------------------------------. .--------------------------------.
- | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
- |------+------+------+----+-------| |------+----+-----+------+-------|
- | Tab | ? | = | - | _ | | ' | " | + | * | Enter |
- |------+------+------+----+-------| |------+----+-----+------+-------|
- | Esc | ! | & | | | | , | . | ; | | - |
- |------+------+------+----+-------+---------+------+----+-----+------+-------|
- | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
- '----------------------------------------------------------------------------'
-
-### R1:
-
- .---------------------------------. .-------------------------------.
- | < | > | { | } | @ | | $ | � | | | R3 |
- +------+------+-----+-----|-------| |------+----+-----+------+------|
- | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
- |------+------+-----+-----+-------| |------+----+-----+------+------|
- | / | \ | ^ | | | % | | , | . | ; | | PScn |
- |------+------+-----+-----+-------+---------+------+----+-----+------+------|
- | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
- '---------------------------------------------------------------------------'
-
-### R2:
-
- .-----------------------------------. .--------------------.-----------------.
- | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
- |------+------+------+------+-------| |------+------+------+------+----------|
- | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
- |------+------+------+------+-------| |------+------+------+------+----------|
- | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
- |------+------+------+------+-------+---------+------+------+------+------+----------|
- | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
- '------------------------------------------------------------------------------------'
-
-### R3:
-
- .----------------------------. .------------------------.
- | RESET | | | | | | | | | | R3 |
- |-------+----+-----+----+----| |----+----+----+----+----|
- | | | | | | | | | | | |
- |-------+----+-----+----+----| |----+----+----+----+----|
- | | | | | | | | | | | |
- |-------+----+-----+----+----+---------+----+----+----+----+----|
- | | | | | | | | | | | | |
- '---------------------------------------------------------------'
-
+ .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------.
+ | P | L | C | D | W | | U | O | Y | K | Q |
+ |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
+ | N | R | S | T | M | | A | E | I | H | V |
+ |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
+ | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup |
+ '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------'
+ | BS P1 | Spc P2 | P3 | | | Sft | |
+ '-------'--------'-----' '-----'-------'-------'
+
+### P1: Punctuation (1)
+
+
+ .--------.-------.-------.-------.-------. .------.-------.-------.-------.------.
+ | Esc | | | | RS | | | | / | ^ | � | ~ |
+ |--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Tab | | | | | | & | \ | ` | $ | Ent |
+ |--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup |
+ '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
+ | P1 | | | | | Sft | |
+ '-------'-------'-----' '-----'------'-------'
+
+### P2: Punctuation (2)
+
+ .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------.
+ | Esc | | NC | FV | | | ( | ) | " | ? | |
+ |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
+ | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent |
+ |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------'
+ | BS | P2 | | | | Sft | |
+ '-------'-------'-----' '-----'-------'-------'
+
+### P3: Punctuation (3)
+
+ .-------.-------.-------.-------.-------. .------.-------.-------.-------.------.
+ | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = |
+ |-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Tab | | | Caps | | | [ | ] | * | - | Ent |
+ |-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
+ | BS | | P3 | | | Sft | |
+ '-------'-------'-----' '-----'------'-------'
+
+### Numerals / Cursor control
+
+ .-------.-------.-------.------.-------. .------.-------.-------.------.------.
+ | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | |
+ |-------+-------+-------+------+-------| |------+-------+-------+------+------|
+ | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | |
+ |-------+-------+-------+------+-------| |------+-------+-------+------+------|
+ | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------'
+ | BS | BA | | | | Sft | |
+ '------'-------'-----' '-----'------'-------'
+
+### FV: Function keys / Cursor control (Vim)
+
+ .-------.------.-------.-----.-------. .------.-------.-----.-------.------.
+ | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup |
+ '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
+ | BS | BA | | | | Sft | |
+ '-----'-------'-----' '-----'------'-------'
+
+### RS: Reset
+
+ .-------.------.-------.-----.-------. .------.-------.-----.-------.------.
+ | RESET | | | | | | | | | | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | | | | | | | | | | | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | | | | | | | | | | | |
+ '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
+ | | BA | | | | | |
+ '-----'-------'-----' '-----'------'-------'
diff --git a/keyboards/atreus/keymaps/yttyx/config.h b/keyboards/atreus/keymaps/yttyx/config.h
index 68e0225e0087..b9e113ec0bb4 100644
--- a/keyboards/atreus/keymaps/yttyx/config.h
+++ b/keyboards/atreus/keymaps/yttyx/config.h
@@ -1,12 +1,4 @@
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#define ONESHOT_TIMEOUT 500 // Time (in ms) before the one shot key is released
-
-// Disable some options to reduce firmware size
-#define NO_PRINT
-#define NO_ACTION_TAPPING
+#pragma once
+#define NO_ACTION_ONESHOT
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboards/atreus/keymaps/yttyx/keymap.c b/keyboards/atreus/keymaps/yttyx/keymap.c
index 8773a9734bdb..dad36cad9288 100644
--- a/keyboards/atreus/keymaps/yttyx/keymap.c
+++ b/keyboards/atreus/keymaps/yttyx/keymap.c
@@ -2,118 +2,158 @@
#include QMK_KEYBOARD_H
enum layers {
- BASE, // Balance Twelve
- L1, // (momentary)
- R1, // (momentary)
- R2, // (momentary)
- R3 // (momentary)
+ BA, // Base (Balance Twelve mirror variant)
+ P1, // Punctuation (1)
+ P2, // Punctuation (2)
+ P3, // Punctuation (2)
+ NC, // Numerals / Cursor control
+ FV, // Function keys / Cursor control (Vim)
+ RS // Reset
};
-#define xxxxxxx KC_NO
-#define _______ KC_TRNS
+// Abbreviations - base
+#define KX_P1_BSPC LT(P1, KC_BSPC)
+#define KX_P2_SPC LT(P2, KC_SPC)
-// Aliases from replicaJunction's atreus layout
-#define KCX_LST LSFT(KC_TAB)
-#define KX_COPY LCTL(KC_C)
-#define KX_CUT LCTL(KC_X)
-#define KX_PAST LCTL(KC_V)
-#define KX_UNDO LCTL(KC_Z)
+#define KX_SFT_Z MT(MOD_LSFT, KC_Z)
+#define KX_CTL_J MT(MOD_LCTL, KC_J)
+#define KX_ALT_F MT(MOD_LALT, KC_F)
-#define KX_AT LSFT(KC_QUOT)
-#define KX_PIPE LSFT(KC_NUBS)
-#define KX_WINR LSFT(LGUI(KC_RGHT)) // Move window to next monitor (Windows)
+#define KX_ALT_DOT MT(MOD_LALT, KC_DOT)
+#define KX_CTL_SCLN MT(MOD_LCTL, KC_SCLN)
+#define KX_SFT_X MT(MOD_LSFT, KC_X)
+#define KX_AT LSFT(KC_QUOT)
+#define KX_DQUOT LSFT(KC_2)
+#define KX_PIPE LSFT(KC_NUBS)
+#define KX_TILDA LSFT(KC_NUHS)
+
const uint16_t PROGMEM keymaps[][ MATRIX_ROWS ][ MATRIX_COLS ] = {
+ /*
+ .--------.-------.-------.-------.--------. .-------.-------.-------.-------.------.
+ | P | L | C | D | W | | U | O | Y | K | Q |
+ |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
+ | N | R | S | T | M | | A | E | I | H | V |
+ |--------+-------+-------+-------+--------| |-------+-------+-------+-------+------|
+ | Z Sft | J Ctl | F Alt | G | B | | , | . Alt | ; Ctl | X Sft | Sup |
+ '--------'-------'-------+-------+--------+-----. .-----+-------+-------+-------'-------'------'
+ | BS P1 | Spc P2 | P3 | | | Sft | |
+ '-------'--------'-----' '-----'-------'-------'
+ */
+ [BA] = LAYOUT(
+ KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
+ KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
+ KX_SFT_Z, KX_CTL_J, KX_ALT_F, KC_G, KC_B, KC_COMM, KX_ALT_DOT, KX_CTL_SCLN, KX_SFT_X, KC_LGUI,
+ XXXXXXX, XXXXXXX, XXXXXXX, KX_P1_BSPC, KX_P2_SPC, MO(P3), XXXXXXX, KC_RSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ ),
+
+ /* P1: Punctuation (1)
+ .--------.-------.-------.-------.-------. .------.-------.-------.-------.------.
+ | Esc | | | | RS | | | | / | ^ | � | ~ |
+ |--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Tab | | | | | | & | \ | ` | $ | Ent |
+ |--------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | | | % | Alt | Ctl | Sft | Sup |
+ '--------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
+ | P1 | | | | | Sft | |
+ '-------'-------'-----' '-----'------'-------'
+ */
+ [P1] = LAYOUT(
+ KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, TO(RS), KX_PIPE, KC_SLSH, KC_CIRC, KC_HASH, KX_TILDA,
+ KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_AMPR, KC_NUBS, KC_GRV, KC_DLR, KC_ENT,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KC_PERC, KC_LALT, KC_LCTL, KC_LSFT, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
+ ),
- /* Balance Twelve mirror variant (left-handed)
- .--------------------------------. .------------------------------.
- | P | L | C | D | W | | U | O | Y | K | Q |
- +------+------+-----+----+-------| |------+----+-----+------+-----|
- | N | R | S | T | M | | A | E | I | H | V |
- +------+------+-----+----+-------| |------+----+-----+------+-----|
- | Z | J | F | G | B | | , | . | ; | X | - |
- +------+------+-----+----+-------+---------+------+----+-----+------+-----|
- | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Win | Ctrl | Alt |
- '-------------------------------------------------------------------------'
+ /* P2: Punctuation (2)
+ .-------.-------.-------.-------.-------. .-------.-------.-------.-------.------.
+ | Esc | | NC | FV | | | ( | ) | " | ? | |
+ |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
+ | Tab | Ctl-X | Ctl-C | Ctl-V | Ctl-Z | | { | } | ' | ! | Ent |
+ |-------+-------+-------+-------+-------| |-------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | Ent | | # | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+-------+-------+-----. .-----+-------+-------+-------'-------'------'
+ | BS | P2 | | | | Sft | |
+ '-------'-------'-----' '-----'-------'-------'
*/
- [BASE] = LAYOUT(
- KC_P, KC_L, KC_C, KC_D, KC_W, KC_U, KC_O, KC_Y, KC_K, KC_Q,
- KC_N, KC_R, KC_S, KC_T, KC_M, KC_A, KC_E, KC_I, KC_H, KC_V,
- KC_Z, KC_J, KC_F, KC_G, KC_B, KC_COMM, KC_DOT, KC_SCLN, KC_X, KC_MINS,
- KC_LSFT, KC_LCTL, KC_LALT, KC_BSPC, KC_SPC, MO(L1), MO(R1), OSM(MOD_LSFT), MO(R2), KC_LWIN, KC_RCTL, KC_RALT
+ [P2] = LAYOUT(
+ KC_ESC, XXXXXXX, TO(NC), TO(FV), XXXXXXX, KC_LPRN, KC_RPRN, KX_DQUOT, KC_QUES, XXXXXXX,
+ KC_TAB, LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_Z), KC_LCBR, KC_RCBR, KC_QUOT, KC_EXLM, KC_ENT,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_ENT, KC_NUHS, KC_LALT, KC_LCTL, KC_LSFT, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
- /* L1
- .---------------------------------. .--------------------------------.
- | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
- |------+------+------+----+-------| |------+----+-----+------+-------|
- | Tab | ? | = | - | _ | | ' | " | + | * | Enter |
- |------+------+------+----+-------| |------+----+-----+------+-------|
- | Esc | ! | & | | | | , | . | ; | | - |
- |------+------+------+----+-------+---------+------+----+-----+------+-------|
- | Shft | Ctrl | Alt | Bk | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
- '----------------------------------------------------------------------------'
+ /* P3: Punctuation (3)
+ .-------.-------.-------.-------.-------. .------.-------.-------.-------.------.
+ | Esc | | Break | Pscr | ScLk | | < | > | + | _ | = |
+ |-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Tab | | | Caps | | | [ | ] | * | - | Ent |
+ |-------+-------+-------+-------+-------| |------+-------+-------+-------+------|
+ | Sft | Ctl | Alt | Del | | | @ | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+-------+-------+-----. .-----+------+-------+-------'-------'------'
+ | BS | | P3 | | | Sft | |
+ '-------'-------'-----' '-----'------'-------'
*/
- [L1] = LAYOUT(
- KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
- KC_TAB, KC_QUES, KC_EQL, KC_MINS, KC_UNDS, KC_QUOT, LSFT(KC_2), KC_PLUS, KC_ASTR, KC_ENT,
- KC_ESC, KC_EXLM, KC_AMPR, xxxxxxx, xxxxxxx, _______, _______, _______, xxxxxxx, _______,
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ [P3] = LAYOUT(
+ KC_ESC, XXXXXXX, KC_BRK, KC_PSCR, KC_SLCK, KC_LABK, KC_RABK, KC_PLUS, KC_UNDS, KC_EQL,
+ KC_TAB, XXXXXXX, XXXXXXX, KC_CAPS, XXXXXXX, KC_LBRC, KC_RBRC, KC_ASTR, KC_MINS, KC_ENT,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, XXXXXXX, KX_AT, KC_LALT, KC_LCTL, KC_LSFT, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
- /* R1
- .---------------------------------. .-------------------------------.
- | < | > | { | } | @ | | $ | � | | | R3 |
- +------+------+-----+-----|-------| |------+----+-----+------+------|
- | [ | ] | ( | ) | # | | ' | " | ~ | ` | Caps |
- |------+------+-----+-----+-------| |------+----+-----+------+------|
- | / | \ | ^ | | | % | | , | . | ; | | PScn |
- |------+------+-----+-----+-------+---------+------+----+-----+------+------|
- | Shft | Ctrl | Alt | Del | Space | L1 | R1 | Shft | R2 | Sup | Ctrl | Alt |
- '---------------------------------------------------------------------------'
+ /* NC: Numerals / Cursor control
+ .-------.-------.-------.------.-------. .------.-------.-------.------.------.
+ | 1 | 2 | 3 | 4 | 5 | | Home | Up | End | PgUp | |
+ |-------+-------+-------+------+-------| |------+-------+-------+------+------|
+ | 6 | 7 | 8 | 9 | 0 | | Left | Down | Right | PgDn | |
+ |-------+-------+-------+------+-------| |------+-------+-------+------+------|
+ | Sft | Ctl | Alt | Del | . | | Ins | Alt | Ctl | Sft | Sup |
+ '-------'-------'-------+------+-------+-----. .-----+------+-------+-------'------'------'
+ | BS | BA | | | | Sft | |
+ '------'-------'-----' '-----'------'-------'
*/
- [R1] = LAYOUT(
- KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KX_AT, KC_DLR, KC_HASH, xxxxxxx, xxxxxxx, MO(R3),
- KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_NUHS, KC_QUOT, LSFT(KC_2), LSFT(KC_NUHS), KC_GRV, KC_CAPS,
- KC_SLSH, KC_NUBS, KC_CIRC, KX_PIPE, KC_PERC, _______, _______, _______, xxxxxxx, KC_PSCR,
- _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______, _______, _______, _______
+ [NC] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_UP, KC_END, KC_PGUP, XXXXXXX,
+ KC_6, KC_7, KC_8, KC_9, KC_0, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, XXXXXXX,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_DEL, KC_DOT, KC_INS, KC_LALT, KC_LCTL, KC_LSFT, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
- /* R2
- .-----------------------------------. .--------------------.-----------------.
- | F12 | F11 | F10 | F9 | Copy | | Home | Up | End | PgUp | Insert |
- |------+------+------+------+-------| |------+------+------+------+----------|
- | F8 | F7 | F6 | F5 | Paste | | Left | Down | Right| PgDn | Enter |
- |------+------+------+------+-------| |------+------+------+------+----------|
- | F4 | F3 | F2 | F1 | Cut | | ^Tab | | Tab | | |
- |------+------+------+------+-------+---------+------+------+------+------+----------|
- | Shft | Ctrl | Alt | Del | Undo | L1 | R1 | Shft | R2 | Sup | Ctrl | WinRight |
- '------------------------------------------------------------------------------------'
+ /* FV: Function keys / Cursor control (Vim)
+ .-------.------.-------.-----.-------. .------.-------.-----.-------.------.
+ | F1 | F2 | F3 | F4 | F5 | | 0 | K | $ | Ctl-B | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | F6 | F7 | F8 | F9 | F10 | | H | J | L | Ctl-F | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | Sft | Ctl | Alt | F11 | F12 | | | Alt | Ctl | Sft | Sup |
+ '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
+ | BS | BA | | | | Sft | |
+ '-----'-------'-----' '-----'------'-------'
*/
- [R2] = LAYOUT(
- KC_F12, KC_F11, KC_F10, KC_F9, KX_COPY, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_INS,
- KC_F8, KC_F7, KC_F6, KC_F5, KX_PAST, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_ENT,
- KC_F4, KC_F3, KC_F2, KC_F1, KX_CUT, KCX_LST, xxxxxxx, KC_TAB, xxxxxxx, xxxxxxx,
- _______, _______, _______, KC_DEL, KX_UNDO, _______, _______, _______, _______, _______, _______, KX_WINR
+ [FV] = LAYOUT(
+ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_0, KC_K, KC_DLR, LCTL(KC_B), XXXXXXX,
+ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_H, KC_J, KC_L, LCTL(KC_F), XXXXXXX,
+ KC_LSFT, KC_LCTL, KC_LALT, KC_F11, KC_F12, XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, _______,
+ XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, TO(BA), XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
),
- /* R3
- .----------------------------. .------------------------.
- | RESET | | | | | | | | | | R3 |
- |-------+----+-----+----+----| |----+----+----+----+----|
- | | | | | | | | | | | |
- |-------+----+-----+----+----| |----+----+----+----+----|
- | | | | | | | | | | | |
- |-------+----+-----+----+----+---------+----+----+----+----+----|
- | | | | | | | | | | | | |
- '---------------------------------------------------------------'
+ /* RS: Reset
+ .-------.------.-------.-----.-------. .------.-------.-----.-------.------.
+ | RESET | | | | | | | | | | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | | | | | | | | | | | |
+ |-------+------+-------+-----+-------| |------+-------+-----+-------+------|
+ | | | | | | | | | | | |
+ '-------'------'-------+-----+-------+-----. .-----+------+-------+-----'-------'------'
+ | | BA | | | | | |
+ '-----'-------'-----' '-----'------'-------'
*/
- [R3] = LAYOUT(
- RESET, 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
+ [RS] = LAYOUT(
+ RESET, 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, TO(BA), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
)
};
diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md
index 50901ee328a1..5cd797da96ff 100644
--- a/keyboards/atreus/readme.md
+++ b/keyboards/atreus/readme.md
@@ -1,21 +1,24 @@
Atreus
-===
+======
A small mechanical keyboard that is based around the shape of the human hand.
-These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2, (usually hand-wired) one powered by an A-Star. (usually using a PCB) This repository currently assumes that you have an A-Star powered Atreus. If you are using a Teensy2, specify that by adding `TEENSY2=yes` to your `make` commands.
-
Keyboard Maintainer: [Phil Hagelberg](https://github.com/technomancy)
Hardware Supported: Atreus, PCB-based or hand-wired
Hardware Availability: https://atreus.technomancy.us
-Make example for this keyboard (after setting up your build environment):
+These configuration files are specifically for the Atreus keyboards created by Phil Hagelberg (@technomancy). This keyboard is available in two variants: one powered by a Teensy 2 (usually hand-wired), one powered by an A-Star (usually using a PCB). You will need to use different `make` commands depending on the variant you have; see examples below.
+
+A-Star:\
+`make atreus:default:avrdude`
- make atreus:default:avrdude
+Teensy:\
+`make TEENSY2=yes atreus:default:teensy`
+
+If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands, e.g.
-Unlike the TMK firmware, this command should be run from the root of
-the repository, not the directory containing this readme.
+`make PCBDOWN=yes atreus:default:avrdude`
-If your keyboard layout is a mirror image of what you expected (i.e. you do not get QWERTY on the left but YTREWQ on the right), then you have an A-Star powered Atreus (older than March 2016) with PCB labels facing *down* instead of up. Specify that by adding `PCBDOWN=yes` to your `make` commands.
+*Unlike the TMK firmware, these commands should be run from the root of the repository, not the directory containing this readme.*
-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.
+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/atreus/rules.mk b/keyboards/atreus/rules.mk
index 2488fd5e8742..eda77404a023 100644
--- a/keyboards/atreus/rules.mk
+++ b/keyboards/atreus/rules.mk
@@ -1,19 +1,4 @@
-
-
-ifdef TEENSY2
- OPT_DEFS += -DATREUS_TEENSY2
- ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex
-else
- OPT_DEFS += -DATREUS_ASTAR
-ifdef PCBDOWN
- OPT_DEFS += -DPCBDOWN
-endif
- ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \
- avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB)
-endif
-
# MCU name
-#MCU = at90usb1287
MCU = atmega32u4
# Processor frequency.
@@ -48,34 +33,56 @@ ARCH = AVR8
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
F_USB = $(F_CPU)
-# Bootloader
-# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
-# automatically (+60). See bootloader.mk for all options.
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
ifdef TEENSY2
BOOTLOADER = halfkay
+ OPT_DEFS += -DATREUS_TEENSY2
else
BOOTLOADER = caterina
+ OPT_DEFS += -DATREUS_ASTAR
+ ifdef PCBDOWN
+ OPT_DEFS += -DPCBDOWN
+ endif
endif
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
# Build Options
-# comment out to disable the options.
+# change yes to no to disable
#
-#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = yes # Console for debug(+400)
-COMMAND_ENABLE = yes # Commands for debug and configuration
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+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 = yes # Breathing sleep LED during USB suspend
-NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
-# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
-# MIDI_ENABLE = YES # MIDI controls
-UNICODE_ENABLE = YES # Unicode
-# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
-
-USB = /dev/cu.usbmodem1411
+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 on B7 by default
+RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = yes # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
diff --git a/keyboards/atreus62/keymaps/jarred/config.h b/keyboards/atreus62/keymaps/jarred/config.h
new file mode 100644
index 000000000000..34ab0baaf0b9
--- /dev/null
+++ b/keyboards/atreus62/keymaps/jarred/config.h
@@ -0,0 +1,21 @@
+/* Copyright 2018 Jarred Steenvoorden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// My hand wire diodes are in the opposite direction to the Atreus62 PCB
+#undef DIODE_DIRECTION
+#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/atreus62/keymaps/jarred/keymap.c b/keyboards/atreus62/keymaps/jarred/keymap.c
new file mode 100644
index 000000000000..7a49b2890c4a
--- /dev/null
+++ b/keyboards/atreus62/keymaps/jarred/keymap.c
@@ -0,0 +1,26 @@
+/* Copyright 2018 Jarred Steenvoorden
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "jarred.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, QWERTY_1_12, QWERTY_2_12, QWERTY_3_12, QWERTY_L4, KC_NO, KC_NO, QWERTY_R4),
+ [_LW] = LAYOUT_atreus62_grid_wrapper(BLANK_12, LOWER_1_12 , LOWER_2_12 , LOWER_3_12 , LOWER_L4 , KC_NO, KC_NO, LOWER_R4 ),
+ [_NV] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NAV_1_12 , NAV_2_12 , NAV_3_12 , NAV_L4 , KC_NO, KC_NO, NAV_R4 ),
+ [_NP] = LAYOUT_atreus62_grid_wrapper(BLANK_12, NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_L4, KC_NO, KC_NO, NUMPAD_R4),
+ [_MS] = LAYOUT_atreus62_grid_wrapper(BLANK_12, MOUSE_1_12 , MOUSE_2_12 , MOUSE_3_12 , MOUSE_L4 , KC_NO, KC_NO, MOUSE_R4 )
+};
diff --git a/keyboards/atreus62/keymaps/pcewing/keymap.c b/keyboards/atreus62/keymaps/pcewing/keymap.c
index 46ec3d548ea1..eee22271f48b 100644
--- a/keyboards/atreus62/keymaps/pcewing/keymap.c
+++ b/keyboards/atreus62/keymaps/pcewing/keymap.c
@@ -1,6 +1,5 @@
#include QMK_KEYBOARD_H
-#define _______ KC_TRNS
#define FN MO(_FN)
#define TODO KC_NO
diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c
index cc45e25fa402..a7c33ce9eabe 100644
--- a/keyboards/atreus62/keymaps/xyverz/keymap.c
+++ b/keyboards/atreus62/keymaps/xyverz/keymap.c
@@ -63,10 +63,6 @@ enum atreus52_keycodes {
RAISE
};
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
// Aliases to make the keymap clearer.
#define CTL_ENT CTL_T(KC_ENT)
diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h
index 0b53c653f679..1259d7055936 100644
--- a/keyboards/baguette/config.h
+++ b/keyboards/baguette/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { B6, C6, C7, F7, F6, F5, F4, F1, F0, B0, D0, D1, D2, D3, D5, D4 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B7
diff --git a/keyboards/baguette/info.json b/keyboards/baguette/info.json
index f3c9b308fb6e..2e845cdda59b 100644
--- a/keyboards/baguette/info.json
+++ b/keyboards/baguette/info.json
@@ -123,7 +123,7 @@
{"label":";", "x":10.75, "y":2},
{"label":"'", "x":11.75, "y":2},
{"label":"ISO #", "x":12.75, "y":2},
- {"label":"Enter", "x":13.75, "y":2, "w":1.25, "h":2},
+ {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2},
{"label":"Shift", "x":0, "y":3, "w":1.25},
{"label":"ISO \\", "x":1.25, "y":3},
{"label":"Z", "x":2.25, "y":3},
diff --git a/keyboards/baguette/readme.md b/keyboards/baguette/readme.md
index d211af16a546..e6188cc99048 100644
--- a/keyboards/baguette/readme.md
+++ b/keyboards/baguette/readme.md
@@ -6,7 +6,7 @@ Baguette
This is a custom keyboard with backlight inspired by France.
Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar)
-Hardware Supported: ATMEGA 32u4 MCU with backlight support.
+Hardware Supported: ATMEGA 32u4 MCU with backlight support.
Hardware Availability: Closed group-buy please contact the runners (Tesletron and Enjoy)
Make example for this keyboard (after setting up your build environment):
diff --git a/keyboards/bdn9/config.h b/keyboards/bdn9/config.h
deleted file mode 100644
index 1d0062375227..000000000000
--- a/keyboards/bdn9/config.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-Copyright 2019 Danny Nguyen
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General 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 0xCB10
-#define PRODUCT_ID 0x1133
-#define DEVICE_VER 0x0100
-#define MANUFACTURER Keebio
-#define PRODUCT BDN9
-#define DESCRIPTION 3x3 Macropad with Rotary Encoders
-
-/* key matrix size */
-#define MATRIX_ROWS 1
-#define MATRIX_COLS 9
-
-/* Keyboard Matrix Assignments */
-#define NO_PIN (~0)
-#define MATRIX_ROW_PINS { NO_PIN }
-#define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 }
-
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
-#define DIODE_DIRECTION COL2ROW
-
-#define NUMBER_OF_ENCODERS 2
-#define ENCODERS_PAD_A { D1, F5 }
-#define ENCODERS_PAD_B { D0, F6 }
-
-
-#define BACKLIGHT_PIN B5
-// #define BACKLIGHT_BREATHING
-#define BACKLIGHT_LEVELS 7
-
-#define RGB_DI_PIN D3
-#ifdef RGB_DI_PIN
- #define RGBLED_NUM 4
- #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 /* If defined, the RGB lighting will be switched off when the host goes to sleep */
- /*== all animations enable ==*/
- #define RGBLIGHT_ANIMATIONS
-#endif
-
-/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
-#define DEBOUNCING_DELAY 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/bdn9/keymaps/default/keymap.c b/keyboards/bdn9/keymaps/default/keymap.c
deleted file mode 100644
index 3bab86ae5468..000000000000
--- a/keyboards/bdn9/keymaps/default/keymap.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* Copyright 2019 Danny Nguyen
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General 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_MUTE, KC_HOME, KC_MPLY, \
- MO(1), KC_UP, RGB_MOD, \
- KC_LEFT, KC_DOWN, KC_RGHT \
- ),
- [1] = LAYOUT(
- RESET, BL_STEP, KC_STOP, \
- _______, KC_HOME, RGB_MOD, \
- KC_MPRV, KC_END, KC_MNXT \
- ),
-};
-
-void encoder_update_user(uint8_t index, bool clockwise) {
- if (index == 0) {
- if (clockwise) {
- tap_code(KC_VOLU);
- } else {
- tap_code(KC_VOLD);
- }
- }
- else if (index == 1) {
- if (clockwise) {
- tap_code(KC_PGDN);
- } else {
- tap_code(KC_PGUP);
- }
- }
-}
diff --git a/keyboards/bdn9/readme.md b/keyboards/bdn9/readme.md
deleted file mode 100644
index c9d5ed0b3567..000000000000
--- a/keyboards/bdn9/readme.md
+++ /dev/null
@@ -1,15 +0,0 @@
-# BDN9
-
-![BDN9](https://cdn.shopify.com/s/files/1/1851/5125/products/image_bd8d9423-950e-4aad-bea5-665d896f879a_530x@2x.jpg?v=1547909493)
-
-A 3x3 macropad with support for a rotary encoder at the upper two corners.
-
-Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges)
-Hardware Supported: Pro Micro, Elite-C, Proton C
-Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-macropad-rotary-encoder-support)
-
-Make example for this keyboard (after setting up your build environment):
-
- make bdn9: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/bface/README.md b/keyboards/bface/README.md
deleted file mode 100644
index 0dac7caf308f..000000000000
--- a/keyboards/bface/README.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# B.face
-
-A 60% keyboard with RGB that runs ps2avrgb natively. Please note that the B.face and B.fake have different switch matrices. Firmware on one, will not work on the other.
-
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.face PCB
-Hardware Availability: [Winkeyless](https://winkeyless.kr/product/b-face-x2-pcb/)
-
-Make example for this keyboard (after setting up your build environment):
-
- make bface:default
-
-Flashing
-
-ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-
-Windows:
-1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
-2. Place your keyboard into reset.
-3. Press the `Find Device` button and ensure that your keyboard is found.
-4. Press the `Open .hex File` button and locate the `.hex` file you created.
-5. Press the `Flash Device` button and wait for the process to complete.
-
-macOS:
-1. Install homebrew by typing the following:
- ```
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- ```
-2. Install `crosspack-avr`.
- ```
- brew cask install crosspack-avr
- ```
-3. Install the following packages:
- ```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
- ```
-
-4. Place your keyboard into reset.
-5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-
-
-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/bface/program b/keyboards/bface/program
deleted file mode 100755
index 298e645477de..000000000000
--- a/keyboards/bface/program
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env python
-# Copyright 2017 Luiz Ribeiro , Sebastian Kaim
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-from __future__ import print_function
-
-import os
-import sys
-import time
-import usb
-
-
-def checkForKeyboardInNormalMode():
- """Returns a device if a ps2avrGB device in normal made (that is in keyboard mode) or None if it is not found."""
- return usb.core.find(idVendor=0x20A0, idProduct=0x422D)
-
-def checkForKeyboardInBootloaderMode():
- """Returns True if a ps2avrGB device in bootloader (flashable) mode is found and False otherwise."""
- return (usb.core.find(idVendor=0x16c0, idProduct=0x05df) is not None)
-
-def flashKeyboard(firmware_file):
- """Calls bootloadHID to flash the given file to the device."""
- print('Flashing firmware to device ...')
- if os.system('bootloadHID -r "%s"' % firmware_file) == 0:
- print('\nDone!')
- else:
- print('\nbootloadHID returned an error.')
-
-def printDeviceInfo(dev):
- """Prints all infos for a given USB device"""
- print('Device Information:')
- print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor))
- print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct))
- print('Manufacturer: %s' % (dev.iManufacturer))
- print('Serial: %s' % (dev.iSerialNumber))
- print('Product: %s' % (dev.iProduct), end='\n\n')
-
-def sendDeviceToBootloaderMode(dev):
- """Tries to send a given ps2avrGB keyboard to bootloader mode to allow flashing."""
- try:
- dev.set_configuration()
-
- request_type = usb.util.build_request_type(
- usb.util.CTRL_OUT,
- usb.util.CTRL_TYPE_CLASS,
- usb.util.CTRL_RECIPIENT_DEVICE)
-
- USBRQ_HID_SET_REPORT = 0x09
- HID_REPORT_OPTION = 0x0301
-
- dev.ctrl_transfer(request_type, USBRQ_HID_SET_REPORT, HID_REPORT_OPTION, 0, [0, 0, 0xFF] + [0] * 5)
- except usb.core.USBError:
- # for some reason I keep getting USBError, but it works!
- pass
-
-
-if len(sys.argv) < 2:
- print('Usage: %s ' % sys.argv[0])
- sys.exit(1)
-
-kb = checkForKeyboardInNormalMode()
-
-if kb is not None:
- print('Found a keyboad in normal mode. Attempting to send it to bootloader mode ...', end='')
- sendDeviceToBootloaderMode(kb)
- print(' done.')
- print("Hint: If your keyboard can't be set to bootloader mode automatically, plug it in while pressing the bootloader key to do so manually.")
- print(" You can find more infos about this here: https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB#setting-the-board-to-bootloader-mode")
-
-attempts = 12 # 60 seconds
-found = False
-for attempt in range(1, attempts + 1):
- print("Searching for keyboard in bootloader mode (%i/%i) ... " % (attempt, attempts), end='')
-
- if checkForKeyboardInBootloaderMode():
- print('Found', end='\n\n')
- flashKeyboard(sys.argv[1])
- found = True
- break
- else:
- print('Nothing.', end='')
-
- if attempt != attempts: # no need to wait on the last attempt
- print(' Sleeping 5 seconds.', end='')
- time.sleep(5)
-
- # print a newline
- print()
-
-if not found:
- print("Couldn't find a flashable keyboard. Aborting.")
- sys.exit(2)
-
diff --git a/keyboards/bface/rules.mk b/keyboards/bface/rules.mk
deleted file mode 100644
index 95b6c8a97a6c..000000000000
--- a/keyboards/bface/rules.mk
+++ /dev/null
@@ -1,49 +0,0 @@
-# Copyright 2017 Luiz Ribeiro
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-# MCU name
-MCU = atmega32a
-PROTOCOL = VUSB
-
-# unsupported features for now
-NO_UART = yes
-NO_SUSPEND_POWER_DOWN = yes
-
-# processor frequency
-F_CPU = 12000000
-
-# build options
-BOOTMAGIC_ENABLE = yes
-MOUSEKEY_ENABLE = yes
-EXTRAKEY_ENABLE = yes
-CONSOLE_ENABLE = no
-COMMAND_ENABLE = yes
-BACKLIGHT_ENABLE = yes
-BACKLIGHT_CUSTOM_DRIVER = yes
-BACKLIGHT_BREATHING = no
-RGBLIGHT_ENABLE = yes
-RGBLIGHT_CUSTOM_DRIVER = yes
-
-OPT_DEFS = -DDEBUG_LEVEL=0
-OPT_DEFS += -DBOOTLOADER_SIZE=2048
-
-# custom matrix setup
-CUSTOM_MATRIX = yes
-SRC = matrix.c i2c.c backlight_ps2avrGB.c
-
-# programming options
-PROGRAM_CMD = ./keyboards/bface/program .build/$(TARGET).hex
-
-LAYOUTS = 60_ansi
diff --git a/keyboards/bfo9000/config.h b/keyboards/bfo9000/config.h
deleted file mode 100644
index 8098428d66cc..000000000000
--- a/keyboards/bfo9000/config.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-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 .
-*/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-#include "config_common.h"
-
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0xCEEB
-#define PRODUCT_ID 0x1169
-#define DEVICE_VER 0x0100
-#define MANUFACTURER Keebio
-#define PRODUCT BFO-9000
-#define DESCRIPTION Really big split ortholinear keyboard
-
-/* key matrix size */
-// Rows are doubled-up
-#define MATRIX_ROWS 12
-#define MATRIX_COLS 9
-
-// wiring of each half
-#define MATRIX_ROW_PINS { D3, D2, D4, C6, D7, E6 }
-#define MATRIX_COL_PINS { B5, B6, B2, B3, B1, F7, F6, F5, F4 }
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 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
-
-/* ws2812 RGB LED */
-#define RGB_DI_PIN B4
-
-#define RGBLED_NUM 20 // Number of LEDs
-
-/*
- * 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
-
-#endif
diff --git a/keyboards/bfo9000/i2c.c b/keyboards/bfo9000/i2c.c
deleted file mode 100644
index 084c890c405f..000000000000
--- a/keyboards/bfo9000/i2c.c
+++ /dev/null
@@ -1,162 +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 400000L
-
-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/bfo9000/keymaps/andylikescandy6x18/keymap.c b/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
deleted file mode 100644
index 24208e2a890a..000000000000
--- a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
+++ /dev/null
@@ -1,87 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#include "action_layer.h"
-
-
-
-#define _BASE 0
-#define _QWERTY 1
-#define _RAISE 2
-#define _NAVIGATION 3
-
-
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
-//Switch Layouts
-#define SWBASE M(_BASE)
-#define SWQWERTY M(_QWERTY)
-
-// layer access
-#define RSESPC LT( 2, KC_SPC)
-#define NAVSPC LT( 3, KC_SPC)
-
-// Key Combos
-#define CTRLSFT LCTL(KC_LSFT)
-#define CTLALTSFT LALT(LCTL(KC_LSFT))
-#define CTLALTDEL LALT(LCTL(KC_DEL))
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-[_BASE] = LAYOUT( \
- CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \
- KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, 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_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
- KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
-),
-[_QWERTY] = LAYOUT( \
- CTLALTSFT, 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_PSCREEN, KC_PAUSE, KC_CAPS, KC_INSERT, KC_EQL, \
- KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_HOME, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_LBRC, KC_RBRC, 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_END, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_PGUP, 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_DEL, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, SFT_T(KC_ENT), KC_P1, KC_P2, KC_P3, KC_UP, KC_BSLASH, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \
- KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, KC_LCTL, KC_P0, KC_PDOT, KC_LEFT, KC_DOWN, KC_RGHT, NAVSPC, RSESPC, KC_RALT, KC_RGUI, KC_APPLICATION, KC_RCTL \
-),
-[_RAISE] = LAYOUT( \
- CTLALTDEL, SWBASE, SWQWERTY, 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, _______, _______, \
- _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGUP), KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
- KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), KC_6, KC_7, KC_8, KC_9, KC_0, _______, \
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, _______, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
-),
-[_NAVIGATION] = LAYOUT( \
- CTLALTDEL, SWBASE, SWQWERTY, 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, _______, LCTL(KC_PGUP), XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, \
- KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, LCTL(KC_PGDN), XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, \
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, LSFT(KC_BSLASH), XXXXXXX, XXXXXXX, _______, _______, _______, _______, \
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
-)
-
-
-};
-
-void persistent_default_layer_set(uint16_t default_layer) {
- eeconfig_update_default_layer(default_layer);
- default_layer_set(default_layer);
-}
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
- switch(id) {
- case _BASE:
- if (record->event.pressed) {
- persistent_default_layer_set(1UL<<_BASE);
- }
- break;
- case _QWERTY:
- if (record->event.pressed) {
- persistent_default_layer_set(1UL<<_QWERTY);
- }
- break;
- }
- return MACRO_NONE;
-};
diff --git a/keyboards/bfo9000/keymaps/default/config.h b/keyboards/bfo9000/keymaps/default/config.h
deleted file mode 100644
index 6b31e8d14ee1..000000000000
--- a/keyboards/bfo9000/keymaps/default/config.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-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 .
-*/
-
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
-
-/* Use I2C or Serial, not both */
-
-#define USE_SERIAL
-// #define USE_I2C
-
-/* Select hand configuration */
-
-#define MASTER_LEFT
-// #define MASTER_RIGHT
-// #define EE_HANDS
-
-#endif
diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/bfo9000/keymaps/default/keymap.c
deleted file mode 100644
index 5de5e123e509..000000000000
--- a/keyboards/bfo9000/keymaps/default/keymap.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include QMK_KEYBOARD_H
-
-#define _BASE 0
-
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-[_BASE] = LAYOUT( \
- KC_ESC, KC_VOLU, KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \
- KC_HOME, KC_VOLD, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
- KC_END, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
- KC_PGUP, KC_CAPS, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, \
- KC_PGDN, KC_UP, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, XXXXXXX, \
- KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_ENT, KC_BSPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
-)
-};
diff --git a/keyboards/bfo9000/matrix.c b/keyboards/bfo9000/matrix.c
deleted file mode 100644
index 2ca5f4d87abc..000000000000
--- a/keyboards/bfo9000/matrix.c
+++ /dev/null
@@ -1,342 +0,0 @@
-/*
-Copyright 2012 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 .
-*/
-
-/*
- * scan matrix
- */
-#include
-#include
-#ifdef USE_I2C
-// provides memcpy for copying TWI slave buffer
-// #include
-#endif
-#include
-#include
-#include
-#include
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "matrix.h"
-#include "split_util.h"
-#include "pro_micro.h"
-#include "config.h"
-
-#ifdef USE_I2C
-# include "i2c.h"
-#else // USE_SERIAL
-# include "serial.h"
-#endif
-
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-
-#define ERROR_DISCONNECT_COUNT 5
-
-static uint8_t debouncing = DEBOUNCE;
-static const int ROWS_PER_HAND = MATRIX_ROWS/2;
-static uint8_t error_count = 0;
-
-static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
-static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
-
-/* matrix state(1:on, 0:off) */
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-static matrix_row_t read_cols(void);
-static void init_cols(void);
-static void unselect_rows(void);
-static void select_row(uint8_t row);
-
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-inline
-uint8_t matrix_rows(void)
-{
- return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
- return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
- debug_enable = true;
- debug_matrix = true;
- debug_mouse = true;
- // initialize row and col
- unselect_rows();
- init_cols();
-
- TX_RX_LED_INIT;
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- }
-
- matrix_init_quantum();
-}
-
-uint8_t _matrix_scan(void)
-{
- // Right hand is stored after the left in the matrix so, we need to offset it
- int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
-
- for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
- select_row(i);
- _delay_us(30); // without this wait read unstable value.
- matrix_row_t cols = read_cols();
- if (matrix_debouncing[i+offset] != cols) {
- matrix_debouncing[i+offset] = cols;
- debouncing = DEBOUNCE;
- }
- unselect_rows();
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
- matrix[i+offset] = matrix_debouncing[i+offset];
- }
- }
- }
-
- return 1;
-}
-
-#ifdef USE_I2C
-
-// Get rows from other half over i2c
-int i2c_transaction(void) {
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE);
- if (err) goto i2c_error;
-
- // start of matrix stored at 0x00
- err = i2c_master_write(0x00);
- if (err) goto i2c_error;
-
- // Start read
- err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ);
- if (err) goto i2c_error;
-
- if (!err) {
- /*
- // read from TWI byte-by-byte into matrix_row_t memory space
- size_t i;
- for (i = 0; i < SLAVE_BUFFER_SIZE-1; ++i) {
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_ACK);
- }
- // last byte to be read / end of chunk
- *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK);
- */
-
- // kludge for column #9: unpack bits for keys (2,9) and (3,9) from (1,7) and (1,8)
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+0] = i2c_master_read(I2C_ACK);
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+1] = (matrix_row_t)i2c_master_read(I2C_ACK)\
- | (matrix[slaveOffset+0]&0x40U)<<2;
- // i2c_master_read(I2C_ACK);
- matrix[slaveOffset+2] = (matrix_row_t)i2c_master_read(I2C_NACK)\
- | (matrix[slaveOffset+0]&0x80U)<<1;
- // clear highest two bits on row 1, where the col9 bits were transported
- matrix[slaveOffset+0] &= 0x3F;
-
- i2c_master_stop();
- } else {
-i2c_error: // the cable is disconnected, or something else went wrong
- i2c_reset_state();
- return err;
- }
-
- return 0;
-}
-
-#else // USE_SERIAL
-
-int serial_transaction(void) {
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
-
- if (serial_update_buffers()) {
- return 1;
- }
-
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = serial_slave_buffer[i];
- }
- return 0;
-}
-#endif
-
-uint8_t matrix_scan(void)
-{
- int ret = _matrix_scan();
-
-
-
-#ifdef USE_I2C
- if( i2c_transaction() ) {
-#else // USE_SERIAL
- if( serial_transaction() ) {
-#endif
- // turn on the indicator led when halves are disconnected
- TXLED1;
-
- error_count++;
-
- if (error_count > ERROR_DISCONNECT_COUNT) {
- // reset other half if disconnected
- int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- matrix[slaveOffset+i] = 0;
- }
- }
- } else {
- // turn off the indicator led on no error
- TXLED0;
- error_count = 0;
- }
- matrix_scan_quantum();
- return ret;
-}
-
-void matrix_slave_scan(void) {
- _matrix_scan();
-
- int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
-
-#ifdef USE_I2C
- // SLAVE_BUFFER_SIZE is from i2c.h
- // (MATRIX_ROWS/2*sizeof(matrix_row_t))
- // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t)));
-
- // kludge for column #9: put bits for keys (2,9) and (3,9) into (1,7) and (1,8)
- i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0])\
- | (matrix[offset+1]&0x100U)>>2\
- | (matrix[offset+2]&0x100U)>>1;
- i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]);
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]);
- // note: looks like a possible operator-precedence bug here, in last version?
- /*
- i2c_slave_buffer[1] = (uint8_t)matrix[offset+0];
- i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8);
- i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8);
- i2c_slave_buffer[5] = (uint8_t)matrix[offset+2];
- */
-#else // USE_SERIAL
- for (int i = 0; i < ROWS_PER_HAND; ++i) {
- serial_slave_buffer[i] = matrix[offset+i];
- }
-#endif
-}
-
-bool matrix_is_modified(void)
-{
- if (debouncing) return false;
- return true;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
- return (matrix[row] & ((matrix_row_t)1<> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
- _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
- }
-}
-
-static matrix_row_t read_cols(void)
-{
- matrix_row_t result = 0;
- for(int x = 0; x < MATRIX_COLS; x++) {
- result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
- }
- return result;
-}
-
-static void unselect_rows(void)
-{
- for(int x = 0; x < ROWS_PER_HAND; x++) {
- _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
- _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
- }
-}
-
-static void select_row(uint8_t row)
-{
- _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
- _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
-}
diff --git a/keyboards/bfo9000/readme.md b/keyboards/bfo9000/readme.md
deleted file mode 100644
index d2175af23606..000000000000
--- a/keyboards/bfo9000/readme.md
+++ /dev/null
@@ -1,18 +0,0 @@
-BFO-9000
-========
-
-A split full-size ortholinear keyboard made and sold by Keebio. Each half is a 6x9 arrangement, with breakable pieces to allow the number of rows to be customized between 4 to 6, and the number of columns to be between 7 to 9. [More info at Keebio](https://keeb.io).
-
-Keyboard Maintainer: [Bakingpy/nooges](https://github.com/nooges)
-Hardware Supported: Pro Micro
-Hardware Availability: [Keebio](https://keeb.io)
-
-Make example for this keyboard (after setting up your build environment):
-
- make bfo9000:default
-
-Example of flashing this keyboard:
-
- make bfo9000:default:avrdude
-
-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/bfo9000/rules.mk b/keyboards/bfo9000/rules.mk
deleted file mode 100644
index d11f9a54e7cb..000000000000
--- a/keyboards/bfo9000/rules.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-SRC += matrix.c \
- i2c.c \
- split_util.c \
- serial.c
-
-# MCU name
-#MCU = at90usb1287
-MCU = atmega32u4
-
-# 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)
-
-# Bootloader
-# This definition is optional, and if your keyboard supports multiple bootloaders of
-# different sizes, comment this out, and the correct address will be loaded
-# automatically (+60). See bootloader.mk for all options.
-BOOTLOADER = caterina
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
-# Build Options
-# 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)
-MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
-EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
-CONSOLE_ENABLE = no # Console for debug(+400)
-COMMAND_ENABLE = yes # 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 = no # Enable keyboard backlight functionality
-MIDI_ENABLE = no # MIDI controls
-AUDIO_ENABLE = no # Audio output on port C6
-UNICODE_ENABLE = no # Unicode
-BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
-# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
-SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
-
-CUSTOM_MATRIX = yes
diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c
deleted file mode 100644
index fea57b651018..000000000000
--- a/keyboards/bfo9000/serial.c
+++ /dev/null
@@ -1,230 +0,0 @@
-/*
- * WARNING: be careful changing this code, it is very timing dependent
- */
-
-#ifndef F_CPU
-#define F_CPU 16000000
-#endif
-
-#include
-#include
-#include
-#include
-#include "serial.h"
-
-#ifndef USE_I2C
-
-// Serial pulse period in microseconds. Its probably a bad idea to lower this
-// value.
-#define SERIAL_DELAY 24
-
-matrix_row_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
-matrix_row_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
-
-#define ROW_MASK (((matrix_row_t)0-1)>>(8*sizeof(matrix_row_t)-MATRIX_COLS))
-
-#define SLAVE_DATA_CORRUPT (1<<0)
-volatile uint8_t status = 0;
-
-inline static
-void serial_delay(void) {
- _delay_us(SERIAL_DELAY);
-}
-
-inline static
-void serial_output(void) {
- SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
-}
-
-// make the serial pin an input with pull-up resistor
-inline static
-void serial_input(void) {
- SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-inline static
-matrix_row_t serial_read_pin(void) {
- return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
-}
-
-inline static
-void serial_low(void) {
- SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
-}
-
-inline static
-void serial_high(void) {
- SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
-}
-
-void serial_master_init(void) {
- serial_output();
- serial_high();
-}
-
-void serial_slave_init(void) {
- serial_input();
-
- // Enable INT0
- EIMSK |= _BV(INT0);
- // Trigger on falling edge of INT0
- EICRA &= ~(_BV(ISC00) | _BV(ISC01));
-}
-
-// Used by the master to synchronize timing with the slave.
-static
-void sync_recv(void) {
- serial_input();
- // This shouldn't hang if the slave disconnects because the
- // serial line will float to high if the slave does disconnect.
- while (!serial_read_pin());
- serial_delay();
-}
-
-// Used by the slave to send a synchronization signal to the master.
-static
-void sync_send(void) {
- serial_output();
-
- serial_low();
- serial_delay();
-
- serial_high();
-}
-
-// Reads a byte from the serial line
-static
-matrix_row_t serial_read_byte(void) {
- matrix_row_t byte = 0;
- serial_input();
- for ( uint8_t i = 0; i < MATRIX_COLS; ++i) {
- byte = (byte << 1) | serial_read_pin();
- serial_delay();
- _delay_us(1);
- }
-
- return byte;
-}
-
-// Sends a byte with MSB ordering
-static
-void serial_write_byte(matrix_row_t data) {
- matrix_row_t b = MATRIX_COLS;
- serial_output();
- while( b-- ) {
- if(data & (1UL << b)) {
- serial_high();
- } else {
- serial_low();
- }
- serial_delay();
- }
-}
-
-// interrupt handle to be used by the slave device
-ISR(SERIAL_PIN_INTERRUPT) {
- sync_send();
-
- matrix_row_t checksum = 0;
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_slave_buffer[i]);
- sync_send();
- checksum += ROW_MASK & serial_slave_buffer[i];
- }
- serial_write_byte(checksum);
- sync_send();
-
- // wait for the sync to finish sending
- serial_delay();
-
- // read the middle of pulses
- _delay_us(SERIAL_DELAY/2);
-
- matrix_row_t checksum_computed = 0;
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_master_buffer[i] = serial_read_byte();
- sync_send();
- checksum_computed += ROW_MASK & serial_master_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_send();
-
- serial_input(); // end transaction
-
- if ( checksum_computed != checksum_received ) {
- status |= SLAVE_DATA_CORRUPT;
- } else {
- status &= ~SLAVE_DATA_CORRUPT;
- }
-}
-
-inline
-bool serial_slave_DATA_CORRUPT(void) {
- return status & SLAVE_DATA_CORRUPT;
-}
-
-// Copies the serial_slave_buffer to the master and sends the
-// serial_master_buffer to the slave.
-//
-// Returns:
-// 0 => no error
-// 1 => slave did not respond
-int serial_update_buffers(void) {
- // this code is very time dependent, so we need to disable interrupts
- cli();
-
- // signal to the slave that we want to start a transaction
- serial_output();
- serial_low();
- _delay_us(1);
-
- // wait for the slaves response
- serial_input();
- serial_high();
- _delay_us(SERIAL_DELAY);
-
- // check if the slave is present
- if (serial_read_pin()) {
- // slave failed to pull the line low, assume not present
- sei();
- return 1;
- }
-
- // if the slave is present syncronize with it
- sync_recv();
-
- matrix_row_t checksum_computed = 0;
- // receive data from the slave
- for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
- serial_slave_buffer[i] = serial_read_byte();
- sync_recv();
- checksum_computed += ROW_MASK & serial_slave_buffer[i];
- }
- matrix_row_t checksum_received = serial_read_byte();
- sync_recv();
-
- if (checksum_computed != checksum_received) {
- sei();
- return 1;
- }
-
- matrix_row_t checksum = 0;
- // send data to the slave
- for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
- serial_write_byte(serial_master_buffer[i]);
- sync_recv();
- checksum += ROW_MASK & serial_master_buffer[i];
- }
- serial_write_byte(checksum);
- sync_recv();
-
- // always, release the line when not in use
- serial_output();
- serial_high();
-
- sei();
- return 0;
-}
-
-#endif
diff --git a/keyboards/bfo9000/serial.h b/keyboards/bfo9000/serial.h
deleted file mode 100644
index 62761945721b..000000000000
--- a/keyboards/bfo9000/serial.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef MY_SERIAL_H
-#define MY_SERIAL_H
-
-#include "config.h"
-#include "matrix.h"
-#include
-
-/* TODO: some defines for interrupt setup */
-#define SERIAL_PIN_DDR DDRD
-#define SERIAL_PIN_PORT PORTD
-#define SERIAL_PIN_INPUT PIND
-#define SERIAL_PIN_MASK _BV(PD0)
-#define SERIAL_PIN_INTERRUPT INT0_vect
-
-#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
-#define SERIAL_MASTER_BUFFER_LENGTH 1
-
-// Buffers for master - slave communication
-extern volatile matrix_row_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
-extern volatile matrix_row_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
-
-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/bfo9000/split_util.c b/keyboards/bfo9000/split_util.c
deleted file mode 100644
index 7f200e6c9420..000000000000
--- a/keyboards/bfo9000/split_util.c
+++ /dev/null
@@ -1,86 +0,0 @@
-#include
-#include
-#include
-#include
-#include
-#include
-#include "split_util.h"
-#include "matrix.h"
-#include "keyboard.h"
-#include "config.h"
-#include "timer.h"
-
-#ifdef USE_I2C
-# include "i2c.h"
-#else
-# include "serial.h"
-#endif
-
-volatile bool isLeftHand = true;
-
-static void setup_handedness(void) {
- #ifdef EE_HANDS
- isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
- #else
- // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c
- #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT)
- isLeftHand = !has_usb();
- #else
- isLeftHand = has_usb();
- #endif
- #endif
-}
-
-static void keyboard_master_setup(void) {
-#ifdef USE_I2C
- i2c_master_init();
-#ifdef SSD1306OLED
- matrix_master_OLED_init();
-#endif
-#else
- serial_master_init();
-#endif
-}
-
-static void keyboard_slave_setup(void) {
- timer_init();
-#ifdef USE_I2C
- i2c_slave_init(SLAVE_I2C_ADDRESS);
-#else
- serial_slave_init();
-#endif
-}
-
-bool has_usb(void) {
- USBCON |= (1 << OTGPADE); //enables VBUS pad
- _delay_us(5);
- return (USBSTA & (1<
-#include "eeconfig.h"
-
-#define SLAVE_I2C_ADDRESS 0x32
-
-extern volatile bool isLeftHand;
-
-// slave version of matix scan, defined in matrix.c
-void matrix_slave_scan(void);
-
-void split_keyboard_setup(void);
-bool has_usb(void);
-void keyboard_slave_loop(void);
-
-void matrix_master_OLED_init (void);
-
-#endif
diff --git a/keyboards/bigswitch/keymaps/wanleg/config.h b/keyboards/bigswitch/keymaps/wanleg/config.h
index 8ac82f40d99f..0c6790618e8e 100644
--- a/keyboards/bigswitch/keymaps/wanleg/config.h
+++ b/keyboards/bigswitch/keymaps/wanleg/config.h
@@ -22,7 +22,7 @@
#undef MATRIX_COL_PINS
#define MATRIX_COL_PINS { B6 }
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#undef DIODE_DIRECTION
#define DIODE_DIRECTION COL2ROW
diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h
index f47849744afd..9bf64ef002ab 100644
--- a/keyboards/blockey/config.h
+++ b/keyboards/blockey/config.h
@@ -46,7 +46,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D0, B4, C6, D7, F4, F5, F7 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
/* ws2812 RGB LED */
diff --git a/keyboards/blockey/keymaps/default/keymap.c b/keyboards/blockey/keymaps/default/keymap.c
index 5b1145482322..82366501aedf 100644
--- a/keyboards/blockey/keymaps/default/keymap.c
+++ b/keyboards/blockey/keymaps/default/keymap.c
@@ -20,11 +20,6 @@
extern rgblight_config_t rgblight_config;
#endif
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
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, \
diff --git a/keyboards/blockey/keymaps/eucalyn/keymap.c b/keyboards/blockey/keymaps/eucalyn/keymap.c
index 33d1051a11e6..99564cae165b 100644
--- a/keyboards/blockey/keymaps/eucalyn/keymap.c
+++ b/keyboards/blockey/keymaps/eucalyn/keymap.c
@@ -20,11 +20,6 @@
extern rgblight_config_t rgblight_config;
#endif
-// Fillers to make layering more clear
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
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, \
diff --git a/keyboards/bm16a/bm16a.c b/keyboards/bm16a/bm16a.c
new file mode 100644
index 000000000000..3d616f29e9dc
--- /dev/null
+++ b/keyboards/bm16a/bm16a.c
@@ -0,0 +1,43 @@
+/* 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 .
+ */
+#include "bm16a.h"
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ matrix_scan_user();
+}
+
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
diff --git a/keyboards/bm16a/bm16a.h b/keyboards/bm16a/bm16a.h
new file mode 100644
index 000000000000..cf8bab4730ad
--- /dev/null
+++ b/keyboards/bm16a/bm16a.h
@@ -0,0 +1,39 @@
+/* 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 "quantum.h"
+
+/* This 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_ortho_4x4( \
+ K01, K02, K03, K04, \
+ K11, K12, K13, K14, \
+ K21, K22, K23, K24, \
+ K31, K32, K33, K34 \
+) \
+{ \
+ { K01, K02, K03, K04 }, \
+ { K11, K12, K13, K14 }, \
+ { K21, K22, K23, K24 }, \
+ { K31, K32, K33, K34 } \
+}
diff --git a/keyboards/bm16a/config.h b/keyboards/bm16a/config.h
new file mode 100644
index 000000000000..c6b460a1184d
--- /dev/null
+++ b/keyboards/bm16a/config.h
@@ -0,0 +1,246 @@
+/* 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"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x424D
+#define DEVICE_VER 0x0001
+#define MANUFACTURER KPrepublic
+#define PRODUCT bm16a
+#define DESCRIPTION KPrepublic bm16a
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/*
+ * 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 { D3, D5, D1, D2}
+#define MATRIX_COL_PINS { D6, D4, D7, B4}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
+ */
+//#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6
+
+#define BACKLIGHT_PIN B6
+// #define BACKLIGHT_BREATHING
+#define BACKLIGHT_LEVELS 5
+
+#define RGB_DI_PIN E2
+#define RGBLED_NUM 4
+#define RGBLIGHT_ANIMATIONS
+// #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 /* 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
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/* 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* key combination for magic key command */
+/* defined by default; to change, uncomment and set to the combination you want */
+// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP H
+//#define MAGIC_KEY_HELP_ALT SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER0_ALT GRAVE
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER B
+//#define MAGIC_KEY_BOOTLOADER_ALT ESC
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_EEPROM_CLEAR BSPACE
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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
+
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 1
+
+/*
+ * HD44780 LCD Display Configuration
+ */
+/*
+#define LCD_LINES 2 //< number of visible lines of the display
+#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
+
+#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
+
+#if LCD_IO_MODE
+#define LCD_PORT PORTB //< port for the LCD lines
+#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
+#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
+#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
+#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
+#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
+#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
+#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
+#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
+#define LCD_RS_PORT LCD_PORT //< port for RS line
+#define LCD_RS_PIN 3 //< pin for RS line
+#define LCD_RW_PORT LCD_PORT //< port for RW line
+#define LCD_RW_PIN 2 //< pin for RW line
+#define LCD_E_PORT LCD_PORT //< port for Enable line
+#define LCD_E_PIN 1 //< pin for Enable line
+#endif
+*/
+
+/* Bootmagic Lite key configuration */
+// #define BOOTMAGIC_LITE_ROW 0
+// #define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/bm16a/info.json b/keyboards/bm16a/info.json
new file mode 100644
index 000000000000..4f87c5ae1d27
--- /dev/null
+++ b/keyboards/bm16a/info.json
@@ -0,0 +1,30 @@
+{
+ "keyboard_name": "bm16a",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "key_count": 16,
+ "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}
+ ]
+ }
+ }
+ }
\ No newline at end of file
diff --git a/keyboards/bm16a/keymaps/default/config.h b/keyboards/bm16a/keymaps/default/config.h
new file mode 100644
index 000000000000..08c234aee2b2
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/config.h
@@ -0,0 +1,19 @@
+/* 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
+
+// place overrides here
diff --git a/keyboards/bm16a/keymaps/default/keymap.c b/keyboards/bm16a/keymaps/default/keymap.c
new file mode 100644
index 000000000000..a0b06ee92a38
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/keymap.c
@@ -0,0 +1,73 @@
+/* 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 .
+ */
+#include QMK_KEYBOARD_H
+
+enum layers {
+ _BASE = 0,
+ _FN1,
+ _FN2,
+};
+
+// Defines the keycodes used by our macros in process_record_user
+enum custom_keycodes {
+ QMKBEST = SAFE_RANGE,
+ QMKURL
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = LAYOUT_ortho_4x4(
+ KC_PGUP, KC_HOME, KC_UP, KC_END , \
+ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \
+ MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \
+ MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \
+ ),
+ [_FN1] = LAYOUT_ortho_4x4(
+ KC_ESC, KC_P7, KC_P8, KC_P9, \
+ KC_TAB, KC_P4, KC_P5, KC_P6, \
+ KC_ENT, KC_P1, KC_P2, KC_P3, \
+ _______, KC_P0, KC_P0, KC_DOT \
+ ),
+ [_FN2] = LAYOUT_ortho_4x4(
+ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
+ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \
+ _______, _______, _______, RESET, \
+ BL_STEP, _______, QMKBEST, QMKURL \
+ )
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ }
+ return true;
+}
diff --git a/keyboards/bm16a/keymaps/default/readme.md b/keyboards/bm16a/keymaps/default/readme.md
new file mode 100644
index 000000000000..f356f2cca051
--- /dev/null
+++ b/keyboards/bm16a/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for bm16a
\ No newline at end of file
diff --git a/keyboards/bm16a/readme.md b/keyboards/bm16a/readme.md
new file mode 100644
index 000000000000..8d43b7014d03
--- /dev/null
+++ b/keyboards/bm16a/readme.md
@@ -0,0 +1,15 @@
+# bm16a
+
+![bm16a](https://ae01.alicdn.com/kf/HTB1RRRQaZfrK1RjSszcq6xGGFXaY.jpg)
+
+A 16 key macropad, with USB C, RGB underglow and backlight.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: The PCBs, controllers supported
+Hardware Availability: [KPrepublic](https://kprepublic.com/products/bm16a-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom-underglow-alps-mx); [AliExpress](https://www.aliexpress.com/store/product/bm16a-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-bottom/3034003_32970629907.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make bm16a: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/bm16a/rules.mk b/keyboards/bm16a/rules.mk
new file mode 100644
index 000000000000..013dac3c90a1
--- /dev/null
+++ b/keyboards/bm16a/rules.mk
@@ -0,0 +1,82 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+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 on B7 by default
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
+HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
+
+LAYOUTS = ortho_4x4
diff --git a/keyboards/bm16s/bm16s.h b/keyboards/bm16s/bm16s.h
new file mode 100755
index 000000000000..9aca8c0e3738
--- /dev/null
+++ b/keyboards/bm16s/bm16s.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "quantum.h"
+
+#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 } \
+}
diff --git a/keyboards/bm16s/config.h b/keyboards/bm16s/config.h
new file mode 100755
index 000000000000..568e80b39640
--- /dev/null
+++ b/keyboards/bm16s/config.h
@@ -0,0 +1,46 @@
+#pragma once
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER KPrepublic
+#define PRODUCT bm16s
+#define DESCRIPTION KPrepublic bm16s
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D1, D0, D3, D2 }
+#define MATRIX_COL_PINS { F7, F6, D4, D6 }
+#define UNUSED_PINS
+
+/* 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 DEBOUNCING_DELAY 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 RGB_DI_PIN E2
+#ifdef RGB_DI_PIN
+ #define RGBLIGHT_ANIMATIONS
+ #define RGBLED_NUM 16
+ #define RGBLIGHT_HUE_STEP 8
+ #define RGBLIGHT_SAT_STEP 8
+ #define RGBLIGHT_VAL_STEP 8
+#endif
diff --git a/keyboards/bm16s/info.json b/keyboards/bm16s/info.json
new file mode 100644
index 000000000000..706453561e7d
--- /dev/null
+++ b/keyboards/bm16s/info.json
@@ -0,0 +1,30 @@
+{
+ "keyboard_name": "bm16s",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT_ortho_4x4": {
+ "key_count": 16,
+ "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}
+ ]
+ }
+ }
+ }
\ No newline at end of file
diff --git a/keyboards/bm16s/keymaps/default/keymap.c b/keyboards/bm16s/keymaps/default/keymap.c
new file mode 100755
index 000000000000..9dd697a0d978
--- /dev/null
+++ b/keyboards/bm16s/keymaps/default/keymap.c
@@ -0,0 +1,16 @@
+#include QMK_KEYBOARD_H
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = LAYOUT_ortho_4x4(
+ KC_KP_7, KC_KP_8, KC_KP_9, MO(1), \
+ KC_KP_4, KC_KP_5, KC_KP_6, KC_PMNS, \
+ KC_KP_1, KC_KP_2, KC_KP_3, KC_PPLS, \
+ KC_KP_0, KC_PDOT, KC_PCMM, KC_PENT \
+ ),
+ [1] = LAYOUT_ortho_4x4(
+ RESET, BL_STEP, _______, KC_VOLU, \
+ BL_TOGG, BL_DEC, BL_INC, KC_VOLD, \
+ RGB_TOG, RGB_MOD, RGB_HUI, KC_MUTE, \
+ RGB_SAI, RGB_SAD, RGB_HUD, _______ \
+ ),
+};
\ No newline at end of file
diff --git a/keyboards/bm16s/keymaps/media/keymap.c b/keyboards/bm16s/keymaps/media/keymap.c
new file mode 100755
index 000000000000..082879320a2b
--- /dev/null
+++ b/keyboards/bm16s/keymaps/media/keymap.c
@@ -0,0 +1,20 @@
+#include QMK_KEYBOARD_H
+
+#define RGB_BRU RGB_VAI
+#define RGB_BRD RGB_VAD
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [0] = LAYOUT_ortho_4x4(
+ KC_BRIU, _______, _______, KC_VOLU, \
+ KC_BRID, _______, _______, KC_VOLD, \
+ _______, _______, _______, KC_MUTE, \
+ KC_MPRV, KC_MPLY, KC_MNXT, MO(1) \
+ ),
+ [1] = LAYOUT_ortho_4x4(
+ RESET, _______, _______, _______, \
+ RGB_SPD, RGB_BRU, RGB_SPI, _______, \
+ RGB_RMOD, RGB_BRD, RGB_MOD, _______, \
+ RGB_TOG, _______, _______, _______ \
+ ),
+};
\ No newline at end of file
diff --git a/keyboards/bm16s/readme.md b/keyboards/bm16s/readme.md
new file mode 100644
index 000000000000..097a38008031
--- /dev/null
+++ b/keyboards/bm16s/readme.md
@@ -0,0 +1,13 @@
+# bm16s
+
+A 16-key macropad, with USB C and per-key RGB backlighting. This is a variant of the BM16A, but with low profile Choc switches.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: The PCBs, controllers supported
+Hardware Availability: [KPrepublic](https://kprepublic.com/collections/pcb/products/bm16s-16-keys-custom-mechanical-keyboard-pcb-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch-leds-choc-switch); [AliExpress](https://www.aliexpress.com/item/bm16s-16-keys-Custom-Mechanical-Keyboard-PCB-plate-programmed-numpad-layouts-qmk-firmware-with-rgb-switch/32999247908.html); [Massdrop](https://www.massdrop.com/buy/78169)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make bm16s: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/bm16s/rules.mk b/keyboards/bm16s/rules.mk
new file mode 100755
index 000000000000..f4f1dfd639b9
--- /dev/null
+++ b/keyboards/bm16s/rules.mk
@@ -0,0 +1,72 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Bootloader selection
+# Teensy halfkay
+# Pro Micro caterina
+# Atmel DFU atmel-dfu
+# LUFA DFU lufa-dfu
+# QMK DFU qmk-dfu
+# atmega32a bootloadHID
+BOOTLOADER = atmel-dfu
+
+
+# If you don't know the bootloader type, then you can specify the
+# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+# OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
+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 = 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
+
+LAYOUTS = ortho_4x4
\ No newline at end of file
diff --git a/keyboards/bmini/readme.md b/keyboards/bmini/readme.md
deleted file mode 100644
index 9c702621295b..000000000000
--- a/keyboards/bmini/readme.md
+++ /dev/null
@@ -1,44 +0,0 @@
-B.mini
-========
-
-A 75% keyboard with RGB
-
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.mini PCB
-Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/
-
-Make example for this keyboard (after setting up your build environment):
-
- make bmini:default
-
-Flashing
-
-ps2avr(GB) boards use an atmega32a microcontroller and a different bootloader. It is not flashable using the regular QMK methods.
-
-Windows:
-1. Download [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash).
-2. Place your keyboard into reset.
-3. Press the `Find Device` button and ensure that your keyboard is found.
-4. Press the `Open .hex File` button and locate the `.hex` file you created.
-5. Press the `Flash Device` button and wait for the process to complete.
-
-macOS:
-1. Install homebrew by typing the following:
- ```
- /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- ```
-2. Install `crosspack-avr`.
- ```
- brew cask install crosspack-avr
- ```
-3. Install the following packages:
- ```
- brew install python
- brew install pyusb
- brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb
-
-4. Place your keyboard into reset.
-5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file.
-
-
-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/bminiex/readme.md b/keyboards/bminiex/readme.md
deleted file mode 100644
index 204bcbbb1b77..000000000000
--- a/keyboards/bminiex/readme.md
+++ /dev/null
@@ -1,14 +0,0 @@
-B.mini EX
-=========
-
-A compact fullsize keyboard with RGB
-
-Keyboard Maintainer: QMK Community
-Hardware Supported: B.mini EX PCB
-Hardware Availability: https://winkeyless.kr/product/b-mini-ex-x2-pcb/
-
-Make example for this keyboard (after setting up your build environment):
-
- make bminiex: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).
\ No newline at end of file
diff --git a/keyboards/boardwalk/boardwalk.h b/keyboards/boardwalk/boardwalk.h
new file mode 100644
index 000000000000..580a320c1f91
--- /dev/null
+++ b/keyboards/boardwalk/boardwalk.h
@@ -0,0 +1,78 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_ortho_5x14( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k410, k411, k412, k413 } \
+}
+
+#define LAYOUT_ortho_hhkb( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
+ k41, k42, k43, k44, k45, k47, k49, k410, k411, k412 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
+ { KC_NO, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k410, k411, k412, KC_NO } \
+}
+
+#define LAYOUT_ortho_7u( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
+ k41, k42, k46, k411, k412 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
+ { KC_NO, k41, k42, KC_NO, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, KC_NO, k411, k412, KC_NO } \
+}
+
+#define LAYOUT_2u_arrow( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
+ k40, k41, k42, k43, k44, k46, k48, k49, k410, k411, k412, k413 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
+ { k40, k41, k42, k43, k44, KC_NO, k46, KC_NO, k48, k49, k410, k411, k412, k413 } \
+}
+
+#define LAYOUT_625u_arrow( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, \
+ k40, k41, k42, k45, k49, k410, k411, k412, k413 \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013 }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113 }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213 }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313 }, \
+ { k40, k41, k42, KC_NO, KC_NO, k45, KC_NO, KC_NO, KC_NO, k49, k410, k411, k412, k413 } \
+}
diff --git a/keyboards/boardwalk/config.h b/keyboards/boardwalk/config.h
new file mode 100644
index 000000000000..67352b80d0b7
--- /dev/null
+++ b/keyboards/boardwalk/config.h
@@ -0,0 +1,84 @@
+/*
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 0xCDCD
+#define PRODUCT_ID 0x5337
+#define DEVICE_VER 0x0001
+#define MANUFACTURER shens
+#define PRODUCT Boardwalk
+#define DESCRIPTION QMK keyboard firmware for Boardwalk
+
+/* 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 { F0, F1, F4, F5, F6 }
+#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, D1, D0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+#define DIODE_DIRECTION COL2ROW
+
+// #define BACKLIGHT_PIN F5
+// #define BACKLIGHT_LEVELS 6
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 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
+
+/*
+ * 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
+
+// ws2812 options
+#define RGB_DI_PIN B7 // pin the DI on the ws2812 is hooked-up to
+#define RGBLIGHT_ANIMATIONS // run RGB animations
+#define RGBLED_NUM 14 // number of LEDs
+#define RGBLIGHT_HUE_STEP 12 // units to step when in/decreasing hue
+#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation
+#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness)
diff --git a/keyboards/boardwalk/info.json b/keyboards/boardwalk/info.json
new file mode 100644
index 000000000000..a287f31a44e4
--- /dev/null
+++ b/keyboards/boardwalk/info.json
@@ -0,0 +1,359 @@
+{
+ "keyboard_name": "Boardwalk",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_ortho_5x14": {
+ "layout": [
+ {"label":"k00", "x":0, "y":0, "w":1.5},
+ {"label":"k01", "x":1.5, "y":0},
+ {"label":"k02", "x":2.5, "y":0},
+ {"label":"k03", "x":3.5, "y":0},
+ {"label":"k04", "x":4.5, "y":0},
+ {"label":"k05", "x":5.5, "y":0},
+ {"label":"k06", "x":6.5, "y":0},
+ {"label":"k07", "x":7.5, "y":0},
+ {"label":"k08", "x":8.5, "y":0},
+ {"label":"k09", "x":9.5, "y":0},
+ {"label":"k010", "x":10.5, "y":0},
+ {"label":"k011", "x":11.5, "y":0},
+ {"label":"k012", "x":12.5, "y":0},
+ {"label":"k013", "x":13.5, "y":0, "w":1.5},
+ {"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":"k110", "x":10.5, "y":1},
+ {"label":"k111", "x":11.5, "y":1},
+ {"label":"k112", "x":12.5, "y":1},
+ {"label":"k113", "x":13.5, "y":1, "w":1.5},
+ {"label":"k20", "x":0, "y":2, "w":1.5},
+ {"label":"k21", "x":1.5, "y":2},
+ {"label":"k22", "x":2.5, "y":2},
+ {"label":"k23", "x":3.5, "y":2},
+ {"label":"k24", "x":4.5, "y":2},
+ {"label":"k25", "x":5.5, "y":2},
+ {"label":"k26", "x":6.5, "y":2},
+ {"label":"k27", "x":7.5, "y":2},
+ {"label":"k28", "x":8.5, "y":2},
+ {"label":"k29", "x":9.5, "y":2},
+ {"label":"k210", "x":10.5, "y":2},
+ {"label":"k211", "x":11.5, "y":2},
+ {"label":"k212", "x":12.5, "y":2},
+ {"label":"k213", "x":13.5, "y":2, "w":1.5},
+ {"label":"k30", "x":0, "y":3, "w":1.5},
+ {"label":"k31", "x":1.5, "y":3},
+ {"label":"k32", "x":2.5, "y":3},
+ {"label":"k33", "x":3.5, "y":3},
+ {"label":"k34", "x":4.5, "y":3},
+ {"label":"k35", "x":5.5, "y":3},
+ {"label":"k36", "x":6.5, "y":3},
+ {"label":"k37", "x":7.5, "y":3},
+ {"label":"k38", "x":8.5, "y":3},
+ {"label":"k39", "x":9.5, "y":3},
+ {"label":"k310", "x":10.5, "y":3},
+ {"label":"k311", "x":11.5, "y":3},
+ {"label":"k312", "x":12.5, "y":3},
+ {"label":"k313", "x":13.5, "y":3, "w":1.5},
+ {"label":"k40", "x":0, "y":4, "w":1.5},
+ {"label":"k41", "x":1.5, "y":4},
+ {"label":"k42", "x":2.5, "y":4},
+ {"label":"k43", "x":3.5, "y":4},
+ {"label":"k44", "x":4.5, "y":4},
+ {"label":"k45", "x":5.5, "y":4},
+ {"label":"k46", "x":6.5, "y":4},
+ {"label":"k47", "x":7.5, "y":4},
+ {"label":"k48", "x":8.5, "y":4},
+ {"label":"k49", "x":9.5, "y":4},
+ {"label":"k410", "x":10.5, "y":4},
+ {"label":"k411", "x":11.5, "y":4},
+ {"label":"k412", "x":12.5, "y":4},
+ {"label":"k413", "x":13.5, "y":4, "w":1.5}
+ ]
+ },
+ "LAYOUT_ortho_hhkb": {
+ "layout": [
+ {"label":"k00", "x":0, "y":0, "w":1.5},
+ {"label":"k01", "x":1.5, "y":0},
+ {"label":"k02", "x":2.5, "y":0},
+ {"label":"k03", "x":3.5, "y":0},
+ {"label":"k04", "x":4.5, "y":0},
+ {"label":"k05", "x":5.5, "y":0},
+ {"label":"k06", "x":6.5, "y":0},
+ {"label":"k07", "x":7.5, "y":0},
+ {"label":"k08", "x":8.5, "y":0},
+ {"label":"k09", "x":9.5, "y":0},
+ {"label":"k010", "x":10.5, "y":0},
+ {"label":"k011", "x":11.5, "y":0},
+ {"label":"k012", "x":12.5, "y":0},
+ {"label":"k013", "x":13.5, "y":0, "w":1.5},
+ {"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":"k110", "x":10.5, "y":1},
+ {"label":"k111", "x":11.5, "y":1},
+ {"label":"k112", "x":12.5, "y":1},
+ {"label":"k113", "x":13.5, "y":1, "w":1.5},
+ {"label":"k20", "x":0, "y":2, "w":1.5},
+ {"label":"k21", "x":1.5, "y":2},
+ {"label":"k22", "x":2.5, "y":2},
+ {"label":"k23", "x":3.5, "y":2},
+ {"label":"k24", "x":4.5, "y":2},
+ {"label":"k25", "x":5.5, "y":2},
+ {"label":"k26", "x":6.5, "y":2},
+ {"label":"k27", "x":7.5, "y":2},
+ {"label":"k28", "x":8.5, "y":2},
+ {"label":"k29", "x":9.5, "y":2},
+ {"label":"k210", "x":10.5, "y":2},
+ {"label":"k211", "x":11.5, "y":2},
+ {"label":"k212", "x":12.5, "y":2},
+ {"label":"k213", "x":13.5, "y":2, "w":1.5},
+ {"label":"k30", "x":0, "y":3, "w":1.5},
+ {"label":"k31", "x":1.5, "y":3},
+ {"label":"k32", "x":2.5, "y":3},
+ {"label":"k33", "x":3.5, "y":3},
+ {"label":"k34", "x":4.5, "y":3},
+ {"label":"k35", "x":5.5, "y":3},
+ {"label":"k36", "x":6.5, "y":3},
+ {"label":"k37", "x":7.5, "y":3},
+ {"label":"k38", "x":8.5, "y":3},
+ {"label":"k39", "x":9.5, "y":3},
+ {"label":"k310", "x":10.5, "y":3},
+ {"label":"k311", "x":11.5, "y":3},
+ {"label":"k312", "x":12.5, "y":3},
+ {"label":"k313", "x":13.5, "y":3, "w":1.5},
+ {"label":"k41", "x":1.5, "y":4},
+ {"label":"k42", "x":2.5, "y":4},
+ {"label":"k43", "x":3.5, "y":4},
+ {"label":"k44", "x":4.5, "y":4},
+ {"label":"k45", "x":5.5, "y":4, "w":2},
+ {"label":"k47", "x":7.5, "y":4, "w":2},
+ {"label":"k49", "x":9.5, "y":4},
+ {"label":"k410", "x":10.5, "y":4},
+ {"label":"k411", "x":11.5, "y":4},
+ {"label":"k412", "x":12.5, "y":4}
+ ]
+ },
+ "LAYOUT_ortho_7u": {
+ "layout": [
+ {"label":"k00", "x":0, "y":0, "w":1.5},
+ {"label":"k01", "x":1.5, "y":0},
+ {"label":"k02", "x":2.5, "y":0},
+ {"label":"k03", "x":3.5, "y":0},
+ {"label":"k04", "x":4.5, "y":0},
+ {"label":"k05", "x":5.5, "y":0},
+ {"label":"k06", "x":6.5, "y":0},
+ {"label":"k07", "x":7.5, "y":0},
+ {"label":"k08", "x":8.5, "y":0},
+ {"label":"k09", "x":9.5, "y":0},
+ {"label":"k010", "x":10.5, "y":0},
+ {"label":"k011", "x":11.5, "y":0},
+ {"label":"k012", "x":12.5, "y":0},
+ {"label":"k013", "x":13.5, "y":0, "w":1.5},
+ {"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":"k110", "x":10.5, "y":1},
+ {"label":"k111", "x":11.5, "y":1},
+ {"label":"k112", "x":12.5, "y":1},
+ {"label":"k113", "x":13.5, "y":1, "w":1.5},
+ {"label":"k20", "x":0, "y":2, "w":1.5},
+ {"label":"k21", "x":1.5, "y":2},
+ {"label":"k22", "x":2.5, "y":2},
+ {"label":"k23", "x":3.5, "y":2},
+ {"label":"k24", "x":4.5, "y":2},
+ {"label":"k25", "x":5.5, "y":2},
+ {"label":"k26", "x":6.5, "y":2},
+ {"label":"k27", "x":7.5, "y":2},
+ {"label":"k28", "x":8.5, "y":2},
+ {"label":"k29", "x":9.5, "y":2},
+ {"label":"k210", "x":10.5, "y":2},
+ {"label":"k211", "x":11.5, "y":2},
+ {"label":"k212", "x":12.5, "y":2},
+ {"label":"k213", "x":13.5, "y":2, "w":1.5},
+ {"label":"k30", "x":0, "y":3, "w":1.5},
+ {"label":"k31", "x":1.5, "y":3},
+ {"label":"k32", "x":2.5, "y":3},
+ {"label":"k33", "x":3.5, "y":3},
+ {"label":"k34", "x":4.5, "y":3},
+ {"label":"k35", "x":5.5, "y":3},
+ {"label":"k36", "x":6.5, "y":3},
+ {"label":"k37", "x":7.5, "y":3},
+ {"label":"k38", "x":8.5, "y":3},
+ {"label":"k39", "x":9.5, "y":3},
+ {"label":"k310", "x":10.5, "y":3},
+ {"label":"k311", "x":11.5, "y":3},
+ {"label":"k312", "x":12.5, "y":3},
+ {"label":"k313", "x":13.5, "y":3, "w":1.5},
+ {"label":"k41", "x":1.5, "y":4},
+ {"label":"k42", "x":2.5, "y":4, "w":1.5},
+ {"label":"k46", "x":4, "y":4, "w":7},
+ {"label":"k411", "x":11, "y":4, "w":1.5},
+ {"label":"k412", "x":12.5, "y":4}
+ ]
+ },
+ "LAYOUT_2u_arrow": {
+ "layout": [
+ {"label":"k00", "x":0, "y":0, "w":1.5},
+ {"label":"k01", "x":1.5, "y":0},
+ {"label":"k02", "x":2.5, "y":0},
+ {"label":"k03", "x":3.5, "y":0},
+ {"label":"k04", "x":4.5, "y":0},
+ {"label":"k05", "x":5.5, "y":0},
+ {"label":"k06", "x":6.5, "y":0},
+ {"label":"k07", "x":7.5, "y":0},
+ {"label":"k08", "x":8.5, "y":0},
+ {"label":"k09", "x":9.5, "y":0},
+ {"label":"k010", "x":10.5, "y":0},
+ {"label":"k011", "x":11.5, "y":0},
+ {"label":"k012", "x":12.5, "y":0},
+ {"label":"k013", "x":13.5, "y":0, "w":1.5},
+ {"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":"k110", "x":10.5, "y":1},
+ {"label":"k111", "x":11.5, "y":1},
+ {"label":"k112", "x":12.5, "y":1},
+ {"label":"k113", "x":13.5, "y":1, "w":1.5},
+ {"label":"k20", "x":0, "y":2, "w":1.5},
+ {"label":"k21", "x":1.5, "y":2},
+ {"label":"k22", "x":2.5, "y":2},
+ {"label":"k23", "x":3.5, "y":2},
+ {"label":"k24", "x":4.5, "y":2},
+ {"label":"k25", "x":5.5, "y":2},
+ {"label":"k26", "x":6.5, "y":2},
+ {"label":"k27", "x":7.5, "y":2},
+ {"label":"k28", "x":8.5, "y":2},
+ {"label":"k29", "x":9.5, "y":2},
+ {"label":"k210", "x":10.5, "y":2},
+ {"label":"k211", "x":11.5, "y":2},
+ {"label":"k212", "x":12.5, "y":2, "w":1.5},
+ {"label":"k213", "x":14, "y":2},
+ {"label":"k30", "x":0, "y":3, "w":1.5},
+ {"label":"k31", "x":1.5, "y":3},
+ {"label":"k32", "x":2.5, "y":3},
+ {"label":"k33", "x":3.5, "y":3},
+ {"label":"k34", "x":4.5, "y":3},
+ {"label":"k35", "x":5.5, "y":3},
+ {"label":"k36", "x":6.5, "y":3},
+ {"label":"k37", "x":7.5, "y":3},
+ {"label":"k38", "x":8.5, "y":3},
+ {"label":"k39", "x":9.5, "y":3},
+ {"label":"k310", "x":10.5, "y":3},
+ {"label":"k311", "x":11.5, "y":3, "w":1.5},
+ {"label":"k312", "x":13, "y":3},
+ {"label":"k313", "x":14, "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},
+ {"label":"k43", "x":3.5, "y":4},
+ {"label":"k44", "x":4.5, "y":4, "w":2},
+ {"label":"k46", "x":6.5, "y":4, "w":2},
+ {"label":"k48", "x":8.5, "y":4},
+ {"label":"k49", "x":9.5, "y":4, "w":1.25},
+ {"label":"k410", "x":10.75, "y":4, "w":1.25},
+ {"label":"k411", "x":12, "y":4},
+ {"label":"k412", "x":13, "y":4},
+ {"label":"k413", "x":14, "y":4}
+ ]
+ },
+ "LAYOUT_625u_arrow": {
+ "layout": [
+ {"label":"k00", "x":0, "y":0, "w":1.5},
+ {"label":"k01", "x":1.5, "y":0},
+ {"label":"k02", "x":2.5, "y":0},
+ {"label":"k03", "x":3.5, "y":0},
+ {"label":"k04", "x":4.5, "y":0},
+ {"label":"k05", "x":5.5, "y":0},
+ {"label":"k06", "x":6.5, "y":0},
+ {"label":"k07", "x":7.5, "y":0},
+ {"label":"k08", "x":8.5, "y":0},
+ {"label":"k09", "x":9.5, "y":0},
+ {"label":"k010", "x":10.5, "y":0},
+ {"label":"k011", "x":11.5, "y":0},
+ {"label":"k012", "x":12.5, "y":0},
+ {"label":"k013", "x":13.5, "y":0, "w":1.5},
+ {"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":"k110", "x":10.5, "y":1},
+ {"label":"k111", "x":11.5, "y":1},
+ {"label":"k112", "x":12.5, "y":1},
+ {"label":"k113", "x":13.5, "y":1, "w":1.5},
+ {"label":"k20", "x":0, "y":2, "w":1.5},
+ {"label":"k21", "x":1.5, "y":2},
+ {"label":"k22", "x":2.5, "y":2},
+ {"label":"k23", "x":3.5, "y":2},
+ {"label":"k24", "x":4.5, "y":2},
+ {"label":"k25", "x":5.5, "y":2},
+ {"label":"k26", "x":6.5, "y":2},
+ {"label":"k27", "x":7.5, "y":2},
+ {"label":"k28", "x":8.5, "y":2},
+ {"label":"k29", "x":9.5, "y":2},
+ {"label":"k210", "x":10.5, "y":2},
+ {"label":"k211", "x":11.5, "y":2},
+ {"label":"k212", "x":12.5, "y":2, "w":1.5},
+ {"label":"k213", "x":14, "y":2},
+ {"label":"k30", "x":0, "y":3, "w":1.5},
+ {"label":"k31", "x":1.5, "y":3},
+ {"label":"k32", "x":2.5, "y":3},
+ {"label":"k33", "x":3.5, "y":3},
+ {"label":"k34", "x":4.5, "y":3},
+ {"label":"k35", "x":5.5, "y":3},
+ {"label":"k36", "x":6.5, "y":3},
+ {"label":"k37", "x":7.5, "y":3},
+ {"label":"k38", "x":8.5, "y":3},
+ {"label":"k39", "x":9.5, "y":3},
+ {"label":"k310", "x":10.5, "y":3},
+ {"label":"k311", "x":11.5, "y":3, "w":1.5},
+ {"label":"k312", "x":13, "y":3},
+ {"label":"k313", "x":14, "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},
+ {"label":"k45", "x":3.5, "y":4, "w":6.25},
+ {"label":"k49", "x":9.75, "y":4},
+ {"label":"k410", "x":10.75, "y":4, "w":1.25},
+ {"label":"k411", "x":12, "y":4},
+ {"label":"k412", "x":13, "y":4},
+ {"label":"k413", "x":14, "y":4}
+ ]
+ }
+ }
+ }
\ No newline at end of file
diff --git a/keyboards/boardwalk/keymaps/brendanwr/config.h b/keyboards/boardwalk/keymaps/brendanwr/config.h
new file mode 100644
index 000000000000..a2530241f477
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/brendanwr/config.h
@@ -0,0 +1,16 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
diff --git a/keyboards/boardwalk/keymaps/brendanwr/keymap.c b/keyboards/boardwalk/keymaps/brendanwr/keymap.c
new file mode 100644
index 000000000000..b428651e73e3
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/brendanwr/keymap.c
@@ -0,0 +1,95 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 {
+ _BASE,
+ _FN,
+ _BACKLIT
+};
+
+
+#define FN MO(_FN)
+#define BACKLIT MO(_BACKLIT)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ /* BASE
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | \ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | HOME |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | FN | END |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | LALT | LGUI | SPACE | RGUI | RALT | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_BASE] = LAYOUT_ortho_7u(
+ 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_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,
+ 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_HOME,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, KC_END,
+ KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
+ ),
+
+/* FUNCTION
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ` |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | | | | | | | | | | | UP | | | DEL |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | | VOLD | VOLU | MUTE | | | | | | | LEFT | RIGHT | | PG_UP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | | | | | | | | | | | DOWN | | | PG_DN |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | | | | | | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_FN] = LAYOUT_ortho_7u(
+ _______, 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_GRV,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL,
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, KC_PGUP,
+ BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, KC_PGDN,
+ _______, _______, _______, _______, _______
+ ),
+
+/* BACKLIT
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | | RGBTOG | RGBMOD | RGBHUI | RGBHUD | RGBSAI | RGBSAD | RGBVAI | RGBVAD | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | | | | | | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_BACKLIT] = LAYOUT_ortho_7u(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/boardwalk/keymaps/default/config.h b/keyboards/boardwalk/keymaps/default/config.h
new file mode 100644
index 000000000000..a2530241f477
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/default/config.h
@@ -0,0 +1,16 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
diff --git a/keyboards/boardwalk/keymaps/default/keymap.c b/keyboards/boardwalk/keymaps/default/keymap.c
new file mode 100644
index 000000000000..fddb3da8251f
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/default/keymap.c
@@ -0,0 +1,162 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// Layer shorthand
+enum layer {
+ _1U,
+ _FN,
+ _HHKB,
+ _7U,
+ _2UARROW,
+ _625UARROW,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* 1uGrid
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | SPACE | SPACE | SPACE | SPACE | RIGHT | DOWN | UP | RIGHT |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_1U] = LAYOUT_ortho_5x14(
+ 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_BSPC, \
+ 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_QUOT, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_PGUP, 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_END, KC_PGDN, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL, KC_LGUI, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCTL \
+ ),
+
+ /* HHKB
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | LCTRL | FN | LALT | LGUI | SPACE | SPACE | LEFT | DOWN | UP | RIGHT | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_HHKB] = LAYOUT_ortho_hhkb(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_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, MO(1), KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+ /* 7u HHKB
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 0 | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | [ | ] | Y | U | I | O | P | ' |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | CAP LK | A | S | D | F | G | HOME | PG UP | H | J | K | L | ; | ENTER |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | END | PG DN | N | M | , | . | / | RSHIFT |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | LCTRL | LALT | SPACE | RALT | FN | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_7U] = LAYOUT_ortho_7u(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_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_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_LALT, KC_SPC, KC_RALT, MO(1) \
+ ),
+
+ /* 2x2u Space with Arrows
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | LCTRL | LGUI | FN | LALT | SPACE | SPACE | RALT | RGUI | RCTRL | LEFT | DOWN | RIGHT |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_2UARROW] = LAYOUT_2u_arrow(
+ 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_QUOT, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, 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, MO(1), KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+ /* 6.25u Space with Arrows
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | CAP LK | A | S | D | F | G | H | J | K | L | ; | " | ENTER | PG UP |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PG DN |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | LCTRL | LGUI | LALT | SPACE | FN | RCTRL | LEFT | DOWN | RIGHT |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+ [_625UARROW] = LAYOUT_625u_arrow(
+ 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_QUOT, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
+ ),
+
+/* FUNCTION
+ * .-----------------------------------------------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
+ * | | | | | | | | | | | | | | |
+ * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
+ * | | | | | | | | | | | | | | |
+ * '-----------------------------------------------------------------------------------------------------------------------------'
+ */
+
+
+ [_FN] = LAYOUT_ortho_5x14(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/boardwalk/keymaps/default/readme.md b/keyboards/boardwalk/keymaps/default/readme.md
new file mode 100644
index 000000000000..73cf19b06fbd
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for Boardwalk
diff --git a/keyboards/boardwalk/keymaps/mcallaster/keymap.c b/keyboards/boardwalk/keymaps/mcallaster/keymap.c
new file mode 100644
index 000000000000..9ec6f926711b
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/mcallaster/keymap.c
@@ -0,0 +1,54 @@
+#include QMK_KEYBOARD_H
+
+// Layer shorthand
+enum layer {
+ _BASE,
+ _LOWER,
+ _RAISE,
+ _FN
+};
+
+#define LOWER MO(1)
+#define RAISE MO(2)
+#define FN MO(3)
+
+// Mac sleep
+#define __SLEEP S(LCTL(KC_POWER))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_ortho_hhkb(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_SLCK, KC_PSCR, 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_HOME, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END, KC_PGDN, 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_DEL, KC_INS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \
+ KC_CAPS, KC_LALT, KC_LGUI, RAISE, KC_SPC, KC_SPC, LOWER, KC_RGUI, KC_RALT, KC_RCTL
+ ),
+
+ [_LOWER] = LAYOUT_ortho_hhkb(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_PAUS, KC_NLCK, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, \
+ _______, 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_LBRC, KC_RBRC, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_GRV, KC_BSLS, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_RAISE] = LAYOUT_ortho_hhkb(
+ _______, KC_F11, KC_F12, _______, _______, _______, KC_PAUS, KC_NLCK, _______, _______, _______, _______, _______, _______, \
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_TILD, KC_PIPE, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ ),
+
+ [_FN] = LAYOUT_ortho_hhkb(
+ __SLEEP, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \
+ _______, RESET, _______, KC_MPRV, KC_MNXT, _______, RGB_SAI, RGB_HUI, _______, _______, _______, _______, _______, _______, \
+ _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, _______, RGB_SAD, RGB_HUD, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, \
+ _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _FN);
+}
diff --git a/keyboards/boardwalk/keymaps/nchristus/config.h b/keyboards/boardwalk/keymaps/nchristus/config.h
new file mode 100644
index 000000000000..a2530241f477
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/nchristus/config.h
@@ -0,0 +1,16 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
diff --git a/keyboards/boardwalk/keymaps/nchristus/keymap.c b/keyboards/boardwalk/keymaps/nchristus/keymap.c
new file mode 100644
index 000000000000..57b6736cbb57
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/nchristus/keymap.c
@@ -0,0 +1,62 @@
+/*
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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
+
+// Layer shorthand
+#define _QW 0
+
+#define LOWER LT(1, KC_SPC)
+#define RAISE LT(2, KC_ENT)
+
+#define CTRLESC CTL_T(KC_ESC)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ /* Keymap _QWE: Base Layer (Default Layer) */
+ [_QW] = LAYOUT_ortho_hhkb(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, 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_BSPC, \
+ CTRLESC, 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_RSFT, \
+ MO(3), KC_LCTL, KC_LALT, KC_LGUI, RAISE, LOWER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
+ ),
+
+ /* Keymap LOWER: Lower Layer */
+ [1] = LAYOUT_ortho_hhkb(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______
+ ),
+
+ /* Keymap RAISE: Raise Layer */
+ [2] = LAYOUT_ortho_hhkb(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______
+ ),
+
+ /* Keymap _FL: Function Layer */
+ [3] = LAYOUT_ortho_hhkb(
+ RESET, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/boardwalk/keymaps/nchristus/readme.md b/keyboards/boardwalk/keymaps/nchristus/readme.md
new file mode 100644
index 000000000000..73cf19b06fbd
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/nchristus/readme.md
@@ -0,0 +1 @@
+# The default keymap for Boardwalk
diff --git a/keyboards/boardwalk/keymaps/nchristus/rules.mk b/keyboards/boardwalk/keymaps/nchristus/rules.mk
new file mode 100644
index 000000000000..b07a6475be53
--- /dev/null
+++ b/keyboards/boardwalk/keymaps/nchristus/rules.mk
@@ -0,0 +1,14 @@
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/boardwalk/readme.md b/keyboards/boardwalk/readme.md
new file mode 100644
index 000000000000..932e7e9d6c42
--- /dev/null
+++ b/keyboards/boardwalk/readme.md
@@ -0,0 +1,16 @@
+# Boardwalk
+
+![Boardwalk](https://i.imgur.com/CQj3b9E.jpg)
+
+The Boardwalk is a 60% ortholinear keyboard, designed around Ergodox keycap sets and to fit into many standard 60% cases. The project was inspired by OLKB’s Atomic keyboard, which used larger 2u mods, but u/shensmobile
+decided to switch to 1.5u keys so that Ergodox sets would provide excellent compatibility. The rest of the board can be covered using standard key sizes from 60% sets.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: Boardwalk Ortholinear PCB
+Hardware Availability: [panc.co](https://www.panc.co/boardwalk-group-buy.html)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make boardwalk: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/boardwalk/rules.mk b/keyboards/boardwalk/rules.mk
new file mode 100644
index 000000000000..0a02497bc3bb
--- /dev/null
+++ b/keyboards/boardwalk/rules.mk
@@ -0,0 +1,66 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+BOOTLOADER = atmel-dfu
+
+# QMK Build Options
+# 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)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = yes # 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
+MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = yes # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+
+LAYOUTS = ortho_5x14
diff --git a/keyboards/boston_meetup/2019/2019.c b/keyboards/boston_meetup/2019/2019.c
new file mode 100644
index 000000000000..933c14dee4f9
--- /dev/null
+++ b/keyboards/boston_meetup/2019/2019.c
@@ -0,0 +1,215 @@
+/* Copyright 2019 ishtob
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "2019.h"
+#include "qwiic.h"
+#include "action_layer.h"
+#include "haptic.h"
+
+#ifdef RGB_MATRIX_ENABLE
+#include "rgb_matrix.h"
+
+led_config_t g_led_config = { {
+ { 5, NO_LED, NO_LED, 0 },
+ { NO_LED, NO_LED, NO_LED, NO_LED },
+ { 4, NO_LED, NO_LED, 1 },
+ { 3, NO_LED, NO_LED, 2 }
+}, {
+ { 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
+}, {
+ 4, 4, 4, 4, 4, 4
+} };
+#endif
+
+uint8_t *o_fb;
+
+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);
+
+/* 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);
+ }
+
+/* Lock display is 23 x 32 */
+#define LOCK_DISPLAY_X 104
+#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 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;}
+ }
+ 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;}
+ }
+ 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;}
+ }
+}
+
+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);
+}
+
+void encoder_update_kb(uint8_t index, bool clockwise) {
+ encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64;
+ queue_for_send = true;
+}
+
+#endif
+
+void matrix_init_kb(void) {
+ queue_for_send = true;
+ matrix_init_user();
+}
+
+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/2019.h b/keyboards/boston_meetup/2019/2019.h
new file mode 100644
index 000000000000..fbba5c3154f2
--- /dev/null
+++ b/keyboards/boston_meetup/2019/2019.h
@@ -0,0 +1,19 @@
+/* Copyright 2019 ishtob
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "boston_meetup.h"
+
diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h
new file mode 100644
index 000000000000..5652816446cc
--- /dev/null
+++ b/keyboards/boston_meetup/2019/config.h
@@ -0,0 +1,196 @@
+#pragma once
+
+/* USB Device descriptor parameter */
+#define DEVICE_VER 0x07E3
+
+#undef MATRIX_ROWS
+#undef MATRIX_COLS
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 4
+
+/*
+ * 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)
+ *
+*/
+
+#undef MATRIX_ROW_PINS
+#undef MATRIX_COL_PINS
+
+#define MATRIX_ROW_PINS { A3, B8, B9, B1 }
+#define MATRIX_COL_PINS { A7, A8, B2, B10 }
+
+#define NUMBER_OF_ENCODERS 1
+#define ENCODERS_PAD_A { B13 }
+#define ENCODERS_PAD_B { B14 }
+
+//Audio
+#undef AUDIO_VOICES
+#undef C6_AUDIO
+
+#ifdef AUDIO_ENABLE
+ #define STARTUP_SONG SONG(ONE_UP_SOUND)
+ // #define STARTUP_SONG SONG(NO_SOUND)
+
+#define AUDIO_CLICKY
+ /* to enable clicky on startup */
+ //#define AUDIO_CLICKY_ON
+#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
+/*
+ * 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)
+ *
+*/
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCE 6
+
+/* 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
+
+/*
+ * 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
+/*
+ * MIDI options
+ */
+
+/* Prevent use of disabled MIDI features in the keymap */
+//#define MIDI_ENABLE_STRICT 1
+
+/* 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
+
+/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
+//#define MIDI_TONE_KEYCODE_OCTAVES 2
+
+/* Haptic Driver initialization settings
+ * Feedback Control Settings */
+#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/
+#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */
+#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */
+
+/* default 3V ERM vibration motor voltage and library*/
+#if FB_ERM_LRA == 0
+#define RATED_VOLTAGE 3
+#define V_RMS 2.3
+#define V_PEAK 3.30
+/* Library Selection */
+#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
+
+/* default 2V LRA voltage and library */
+#elif FB_ERM_LRA == 1
+#define RATED_VOLTAGE 2
+#define V_RMS 2.0
+#define V_PEAK 2.85
+#define F_LRA 200
+/* Library Selection */
+#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */
+
+#endif
+
+/* Control 1 register settings */
+#define DRIVE_TIME 25
+#define AC_COUPLE 0
+#define STARTUP_BOOST 1
+
+/* Control 2 Settings */
+#define BIDIR_INPUT 1
+#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */
+#define SAMPLE_TIME 3
+#define BLANKING_TIME 1
+#define IDISS_TIME 1
+
+/* Control 3 settings */
+#define NG_THRESH 2
+#define ERM_OPEN_LOOP 1
+#define SUPPLY_COMP_DIS 0
+#define DATA_FORMAT_RTO 0
+#define LRA_DRIVE_MODE 0
+#define N_PWM_ANALOG 0
+#define LRA_OPEN_LOOP 0
+/* Control 4 settings */
+#define ZC_DET_TIME 0
+#define AUTO_CAL_TIME 3
+
+#define RGBLIGHT_ANIMATIONS
+
+#define RGBLED_NUM 10
+#define RGB_DI_PIN B5
+#define DRIVER_LED_TOTAL RGBLED_NUM
+
+#define RGB_MATRIX_KEYPRESSES
+
+#define SOLENOID_PIN A14
+
diff --git a/keyboards/boston_meetup/2019/info.json b/keyboards/boston_meetup/2019/info.json
new file mode 100644
index 000000000000..15ab72935c2b
--- /dev/null
+++ b/keyboards/boston_meetup/2019/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Boston Meetup 2019",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 4,
+ "height": 4,
+ "layouts": {
+ "LAYOUT": {
+ "key_count": 13,
+ "layout": [{"label":"K00", "x":0, "y":0}, {"label":"K10", "x":0, "y":1}, {"label":"K11", "x":1, "y":1}, {"label":"K12", "x":2, "y":1}, {"label":"K13", "x":3, "y":1}, {"label":"K20", "x":0, "y":2}, {"label":"K21", "x":1, "y":2}, {"label":"K22", "x":2, "y":2}, {"label":"K23", "x":3, "y":2}, {"label":"K30", "x":0, "y":3}, {"label":"K31", "x":1, "y":3}, {"label":"K32", "x":2, "y":3}, {"label":"K33", "x":3, "y":3}] }
+ }
+}
diff --git a/keyboards/boston_meetup/2019/keymaps/default/keymap.c b/keyboards/boston_meetup/2019/keymaps/default/keymap.c
new file mode 100644
index 000000000000..52d67273e370
--- /dev/null
+++ b/keyboards/boston_meetup/2019/keymaps/default/keymap.c
@@ -0,0 +1,166 @@
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+enum custom_layers {
+ _BASE,
+ _LOWER,
+ _RAISE,
+ _ADJUST
+};
+
+enum custom_keycodes {
+ BASE = SAFE_RANGE,
+ LOWER,
+ RAISE,
+ KC_DEMOMACRO
+};
+
+// Custom macros
+#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl
+#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl
+#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl
+#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift
+// 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] = {
+
+/* Base
+ * ,------.
+ * | Esc |
+ * |------+------+-------------.
+ * | : | 7 | 8 | 9 |
+ * |------+------+------+------|
+ * | RAISE| 4 | 5 | 6 |
+ * |------+------+------+------|
+ * | LOWER| 1 | 2 | 3 |
+ * `---------------------------'
+ */
+[_BASE] = LAYOUT(
+ KC_ESC,
+ KC_COLN, KC_P7, KC_P8, KC_P9,
+ RAISE, KC_P4, KC_P5, KC_P6,
+ LOWER, KC_P1, KC_P2, KC_P3
+),
+
+/* Lower
+ * ,------.
+ * | Nmlk |
+ * |------+------+-------------.
+ * | : | / | * | - |
+ * |------+------+------+------|
+ * | | | = | + |
+ * |------+------+------+------|
+ * | | 0 | . | ENT |
+ * `---------------------------'
+ */
+[_LOWER] = LAYOUT(
+ KC_NLCK,
+ KC_COLN, KC_PSLS, KC_PAST, KC_PMNS,
+ _______, XXXXXXX, KC_EQL, KC_PPLS,
+ _______, KC_P0, KC_PDOT, KC_PENT
+),
+
+/* Raise
+ * ,------.
+ * | Esc |
+ * |------+------+-------------.
+ * |RGB TG|RGB M+|RGB M-| |
+ * |------+------+------+------|
+ * | |RGB H+|RGB S+|RGB V+|
+ * |------+------+------+------|
+ * | ` |RGB H-|RGB S-|RGB V-|
+ * `---------------------------'
+ */
+[_RAISE] = LAYOUT(
+ KC_NLCK,
+ RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX,
+ _______, RGB_HUI, RGB_SAI, RGB_VAI,
+ _______, RGB_HUD, RGB_SAD, RGB_VAD
+
+),
+
+/* Adjust
+ * ,------.
+ * | DFU |
+ * |------+------+-------------.
+ * |HPT TG|HPT FB|HPT RS| BKSP |
+ * |------+------+------+------|
+ * | |HPT M+| | |
+ * |------+------+------+------|
+ * | |HPT M-|Clk TG| Del |
+ * `---------------------------'
+ */
+[_ADJUST] = LAYOUT(
+ RESET,
+ HPT_TOG, HPT_FBK, HPT_RST, KC_BSPC,
+ _______, HPT_MODI, XXXXXXX, XXXXXXX,
+ _______, HPT_MODD, CK_TOGG, KC_DEL
+),
+
+
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+
+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
+ //uses another variable that would be set to true after the first time a reactive key is pressed.
+ layer_on(_LOWER);
+ } else {
+ layer_off(_LOWER);
+ }
+ return false;
+ break;
+ case RAISE:
+ if (record->event.pressed) {
+ //not sure how to have keyboard check mode and set it to a variable, so my work around
+ //uses another variable that would be set to true after the first time a reactive key is pressed.
+ layer_on(_RAISE);
+ } else {
+ layer_off(_RAISE);
+ }
+ return false;
+ break;
+ }
+ return true;
+}
+
+bool music_mask_user(uint16_t keycode) {
+ switch (keycode) {
+ case RAISE:
+ case LOWER:
+ return false;
+ default:
+ return true;
+ }
+}
+
+void matrix_init_user(void) {
+}
+
+
+void matrix_scan_user(void) {
+}
+
diff --git a/keyboards/boston_meetup/2019/keymaps/default/readme.md b/keyboards/boston_meetup/2019/keymaps/default/readme.md
new file mode 100644
index 000000000000..75f80b519144
--- /dev/null
+++ b/keyboards/boston_meetup/2019/keymaps/default/readme.md
@@ -0,0 +1,51 @@
+# The Default Boston Meetup 2019 board Layout
+
+Keymap:
+```
+Base
+,------.
+| Esc |
+|------+------+-------------.
+| : | 7 | 8 | 9 |
+|------+------+------+------|
+| RAISE| 4 | 5 | 6 |
+|------+------+------+------|
+| LOWER| 1 | 2 | 3 |
+`---------------------------'
+
+Lower
+,------.
+| Nmlk |
+|------+------+-------------.
+| : | / | * | - |
+|------+------+------+------|
+| | | = | + |
+|------+------+------+------|
+| | 0 | . | ENT |
+`---------------------------'
+
+Raise
+,------.
+| Esc |
+|------+------+-------------.
+|RGB TG|RGB M+|RGB M-| |
+|------+------+------+------|
+| |RGB H+|RGB S+|RGB V+|
+|------+------+------+------|
+| |RGB H-|RGB S-|RGB V-|
+`---------------------------'
+
+Adjust:
+,------.
+| DFU |
+|------+------+-------------.
+|HPT TG|HPT FB|HPT RS| BKSP |
+|------+------+------+------|
+| |HPT M+| | |
+|------+------+------+------|
+| |HPT M-|Clk TG| Del |
+`---------------------------'
+
+```
+
+RGB still work in progress
\ No newline at end of file
diff --git a/keyboards/boston_meetup/2019/keymaps/readme.md b/keyboards/boston_meetup/2019/keymaps/readme.md
new file mode 100644
index 000000000000..c10a49f7d03e
--- /dev/null
+++ b/keyboards/boston_meetup/2019/keymaps/readme.md
@@ -0,0 +1,22 @@
+# 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/readme.md b/keyboards/boston_meetup/2019/readme.md
new file mode 100644
index 000000000000..2bdac9dcde1b
--- /dev/null
+++ b/keyboards/boston_meetup/2019/readme.md
@@ -0,0 +1,13 @@
+# Boston Meetup 2019 Macropad
+
+![Boston Meetup 2019](https://i.imgur.com/6LgBc4g.jpg)
+
+Limited-run board designed for Boston MK community meetup 2019.
+
+Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make boston_meetup/2019: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).
\ No newline at end of file
diff --git a/keyboards/boston_meetup/2019/rules.mk b/keyboards/boston_meetup/2019/rules.mk
new file mode 100644
index 000000000000..7c03a025eef5
--- /dev/null
+++ b/keyboards/boston_meetup/2019/rules.mk
@@ -0,0 +1,24 @@
+# project specific files
+
+# Cortex version
+MCU = STM32F303
+
+# Build Options
+# comment out to disable the options.
+#
+BACKLIGHT_ENABLE = no
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
+## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
+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
+RGBLIGHT_ENABLE = no
+RGB_MATRIX_ENABLE = no #WS2812
+HAPTIC_ENABLE += DRV2605L
+QWIIC_ENABLE += MICRO_OLED
+# SERIAL_LINK_ENABLE = yes
diff --git a/keyboards/boston_meetup/boston_meetup.c b/keyboards/boston_meetup/boston_meetup.c
new file mode 100644
index 000000000000..a9201ac85209
--- /dev/null
+++ b/keyboards/boston_meetup/boston_meetup.c
@@ -0,0 +1,2 @@
+#include "boston_meetup.h"
+
diff --git a/keyboards/boston_meetup/boston_meetup.h b/keyboards/boston_meetup/boston_meetup.h
new file mode 100644
index 000000000000..e1d9d9206033
--- /dev/null
+++ b/keyboards/boston_meetup/boston_meetup.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#ifdef KEYBOARD_boston_meetup_2019
+ #include "2019.h"
+#define LAYOUT( \
+ K00, \
+ K10, K11, K12, K13, \
+ K20, K21, K22, K23, \
+ K30, K31, K32, K33 \
+ ) \
+{ \
+ { K00, KC_NO, KC_NO, KC_NO }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, K23 }, \
+ { K30, K31, K32, K33 } \
+}
+#endif
+
+#include "quantum.h"
\ No newline at end of file
diff --git a/keyboards/boston_meetup/config.h b/keyboards/boston_meetup/config.h
new file mode 100644
index 000000000000..b025e18df56a
--- /dev/null
+++ b/keyboards/boston_meetup/config.h
@@ -0,0 +1,60 @@
+/*
+Copyright 2012 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 .
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFB30
+#define PRODUCT_ID 0x26BE
+#define MANUFACTURER ishtob
+#define PRODUCT Boston Meetup Board
+#define DESCRIPTION A limited-run community meetup board
+
+//#define AUDIO_VOICES
+
+//#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#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
+
+/*
+ * 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/boston_meetup/readme.md b/keyboards/boston_meetup/readme.md
new file mode 100644
index 000000000000..2fa1ec9583f1
--- /dev/null
+++ b/keyboards/boston_meetup/readme.md
@@ -0,0 +1,14 @@
+# Boston Meetup Macropads
+
+![Boston Meetup Macropads](https://i.imgur.com/yQcBF8g.jpg)
+
+Limited-run boards designed for Boston MK community meetups.
+
+Keyboard Maintainer: [ishtob](https://github.com/ishtob), [QMK](https://github.com/qmk)
+Hardware Supported: Boston Meetup PCB 2018, 2019
+
+Make example for this keyboard (after setting up your build environment):
+
+ make boston_meetup/YYYY: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).
\ No newline at end of file
diff --git a/keyboards/boston_meetup/rules.mk b/keyboards/boston_meetup/rules.mk
new file mode 100644
index 000000000000..6dd899edc85f
--- /dev/null
+++ b/keyboards/boston_meetup/rules.mk
@@ -0,0 +1,2 @@
+
+DEFAULT_FOLDER = boston_meetup/2019
diff --git a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
index 684987e3627a..f76b7e02c812 100644
--- a/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
+++ b/keyboards/bpiphany/frosty_flake/keymaps/QFR_JM/keymap.c
@@ -21,7 +21,7 @@ enum custom_macros {
R_POINT
};
- const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5
+ const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space,
[1] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE
@@ -120,4 +120,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
break;
}
return true;
-}
\ No newline at end of file
+}
diff --git a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
index c0549c424eae..e2b56132bfbe 100644
--- a/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
+++ b/keyboards/bpiphany/kitten_paw/keymaps/ickerwx/keymap.c
@@ -1,8 +1,6 @@
#include QMK_KEYBOARD_H
#include "mousekey.h"
-#define _______ KC_TRNS
-#define XXXXXXX KC_NO
#undef C
#undef S
#define C(kc) LCTL(KC_##kc)
@@ -43,9 +41,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
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_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,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, \
- F(0), 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, \
+ TT(MOUSE1), 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, \
F(8),KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, F(9), KC_UP, KC_P1, KC_P2, KC_P3,KC_PENT, \
- F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4), F(5), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
+ F(1),KC_LGUI, F(3), LT(MISC, KC_SPC), F(4),TT(PROG1), MEDAPP, F(2), KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
/* Layer 1: Programming Layer 1, emulating US l ayout */
[PROG1] = LAYOUT(\
KC_ESC,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \
@@ -99,12 +97,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_LAYER_TAP_TOGGLE(MOUSE1), // tap-toggle mouse layer (4)
[1] = ACTION_FUNCTION_TAP(LCTRL_BRACKET), // tap to print [
[2] = ACTION_FUNCTION_TAP(RCTRL_BRACKET), // tap to print ]
[3] = ACTION_FUNCTION_TAP(LALT_CURLY), // tap to print {
[4] = ACTION_FUNCTION_TAP(RALT_CURLY), // tap to print }
- [5] = ACTION_LAYER_TAP_TOGGLE(PROG1), // tap-toggle programming layer 1
[6] = ACTION_LAYER_SET_CLEAR(DEFAULT),
[7] = ACTION_FUNCTION_TAP(CTRL_CLICK),
[8] = ACTION_FUNCTION_TAP(LSHFT_PAREN), // tap to print (
diff --git a/keyboards/bpiphany/sixshooter/config.h b/keyboards/bpiphany/sixshooter/config.h
new file mode 100644
index 000000000000..ed890d3c9076
--- /dev/null
+++ b/keyboards/bpiphany/sixshooter/config.h
@@ -0,0 +1,122 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6666
+#define DEVICE_VER 0x0001
+#define MANUFACTURER bpiphany
+#define PRODUCT sixshooter
+#define DESCRIPTION A PCB for the CM Storm switch tester utilizing a Teensy 2.0.
+
+/* key matrix size */
+#define MATRIX_ROWS 1
+#define MATRIX_COLS 6
+
+/*
+ * 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 { }
+#define MATRIX_COL_PINS { F7, F6, F1, F5, F4, F0 }
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
+#define DEBOUNCING_DELAY 5
+
+/*
+ * 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/* control how magic key switches layers */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
+
+/* override magic key keymap */
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
+//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
+//#define MAGIC_KEY_HELP1 H
+//#define MAGIC_KEY_HELP2 SLASH
+//#define MAGIC_KEY_DEBUG D
+//#define MAGIC_KEY_DEBUG_MATRIX X
+//#define MAGIC_KEY_DEBUG_KBD K
+//#define MAGIC_KEY_DEBUG_MOUSE M
+//#define MAGIC_KEY_VERSION V
+//#define MAGIC_KEY_STATUS S
+//#define MAGIC_KEY_CONSOLE C
+//#define MAGIC_KEY_LAYER0_ALT1 ESC
+//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
+//#define MAGIC_KEY_LAYER0 0
+//#define MAGIC_KEY_LAYER1 1
+//#define MAGIC_KEY_LAYER2 2
+//#define MAGIC_KEY_LAYER3 3
+//#define MAGIC_KEY_LAYER4 4
+//#define MAGIC_KEY_LAYER5 5
+//#define MAGIC_KEY_LAYER6 6
+//#define MAGIC_KEY_LAYER7 7
+//#define MAGIC_KEY_LAYER8 8
+//#define MAGIC_KEY_LAYER9 9
+//#define MAGIC_KEY_BOOTLOADER PAUSE
+//#define MAGIC_KEY_LOCK CAPS
+//#define MAGIC_KEY_EEPROM E
+//#define MAGIC_KEY_NKRO N
+//#define MAGIC_KEY_SLEEP_LED Z
+
+/*
+ * 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/sixshooter/info.json b/keyboards/bpiphany/sixshooter/info.json
similarity index 100%
rename from keyboards/sixshooter/info.json
rename to keyboards/bpiphany/sixshooter/info.json
diff --git a/keyboards/sixshooter/keymaps/default/keymap.c b/keyboards/bpiphany/sixshooter/keymaps/default/keymap.c
similarity index 100%
rename from keyboards/sixshooter/keymaps/default/keymap.c
rename to keyboards/bpiphany/sixshooter/keymaps/default/keymap.c
diff --git a/keyboards/sixshooter/keymaps/default/readme.md b/keyboards/bpiphany/sixshooter/keymaps/default/readme.md
similarity index 100%
rename from keyboards/sixshooter/keymaps/default/readme.md
rename to keyboards/bpiphany/sixshooter/keymaps/default/readme.md
diff --git a/keyboards/bpiphany/sixshooter/readme.md b/keyboards/bpiphany/sixshooter/readme.md
new file mode 100644
index 000000000000..f5d92600348b
--- /dev/null
+++ b/keyboards/bpiphany/sixshooter/readme.md
@@ -0,0 +1,13 @@
+# The Six Shooter
+
+A PCB for the CM Storm switch tester utilizing a Teensy 2.0 designed by Bpiphany. Because the PCB was designed with individual pins for each LED, there are custom keycodes (`SS_LON` and `SS_LOFF`) for turning on and off the backlight LEDs.
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: Six Shooter PCB, Teensy 2.0
+Hardware Availability: [GeekHack.org](https://geekhack.org/index.php?topic=70033.0)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make bpiphany/sixshooter: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/sixshooter/rules.mk b/keyboards/bpiphany/sixshooter/rules.mk
similarity index 100%
rename from keyboards/sixshooter/rules.mk
rename to keyboards/bpiphany/sixshooter/rules.mk
diff --git a/keyboards/sixshooter/sixshooter.c b/keyboards/bpiphany/sixshooter/sixshooter.c
similarity index 100%
rename from keyboards/sixshooter/sixshooter.c
rename to keyboards/bpiphany/sixshooter/sixshooter.c
diff --git a/keyboards/sixshooter/sixshooter.h b/keyboards/bpiphany/sixshooter/sixshooter.h
similarity index 100%
rename from keyboards/sixshooter/sixshooter.h
rename to keyboards/bpiphany/sixshooter/sixshooter.h
diff --git a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
index 8893d122e04b..271f48d0011b 100644
--- a/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
+++ b/keyboards/bpiphany/tiger_lily/keymaps/default/config.h
@@ -1,8 +1,3 @@
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "../../config.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
index c55f7f9f7d27..ed56340c3914 100644
--- a/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
+++ b/keyboards/bpiphany/unloved_bastard/keymaps/default/config.h
@@ -14,11 +14,6 @@
* along with this program. If not, see .
*/
-#ifndef CONFIG_USER_H
-#define CONFIG_USER_H
-
-#include "config_common.h"
+#pragma once
// place overrides here
-
-#endif
diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h
index 6b03ae30a733..017bee184880 100644
--- a/keyboards/bthlabs/geekpad/config.h
+++ b/keyboards/bthlabs/geekpad/config.h
@@ -45,7 +45,7 @@ along with this program. If not, see .
#define MATRIX_COL_PINS { D4, D0, D1 }
#define UNUSED_PINS
-/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
+/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
// #define BACKLIGHT_PIN B7
diff --git a/keyboards/butterstick/butterstick.c b/keyboards/butterstick/butterstick.c
new file mode 100644
index 000000000000..6c00bbe5dfda
--- /dev/null
+++ b/keyboards/butterstick/butterstick.c
@@ -0,0 +1,56 @@
+/* Copyright 2019 Jeremy Bernhardt
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General 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 "butterstick.h"
+
+// Optional override functions below.
+// You can leave any or all of these undefined.
+// These are only required if you want to perform custom actions.
+
+/*
+
+void matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ matrix_init_user();
+}
+*/
+
+void matrix_scan_kb(void) {
+#ifdef DEBUG_MATRIX
+ for (uint8_t c = 0; c < MATRIX_COLS; c++)
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++)
+ if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
+#endif
+
+ matrix_scan_user();
+}
+
+/*
+bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
+ // put your per-action keyboard code here
+ // runs for every action, just before processing by the firmware
+
+ return process_record_user(keycode, record);
+}
+
+void led_set_kb(uint8_t usb_led) {
+ // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
+
+ led_set_user(usb_led);
+}
+
+*/
diff --git a/keyboards/butterstick/butterstick.h b/keyboards/butterstick/butterstick.h
new file mode 100644
index 000000000000..f97488c3f589
--- /dev/null
+++ b/keyboards/butterstick/butterstick.h
@@ -0,0 +1,11 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_butter( \
+ k09, k08, k07, k06, k05, k04, k03, k02, k01, k00, \
+ k19, k18, k17, k16, k15, k14, k13, k12, k11, k10 \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09}, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19}, \
+}
diff --git a/keyboards/butterstick/config.h b/keyboards/butterstick/config.h
new file mode 100644
index 000000000000..4c104deb220d
--- /dev/null
+++ b/keyboards/butterstick/config.h
@@ -0,0 +1,26 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0001
+#define MANUFACTURER g Heavy Industries
+#define PRODUCT Butter Stick
+#define DESCRIPTION Its a stick of butter
+#define VERSION "Paula Deen"
+
+#define DEBOUNCING_DELAY 5
+#define FORCE_NKRO
+
+/* key matrix size */
+#define MATRIX_ROWS 2
+#define MATRIX_COLS 10
+#define MATRIX_ROW_PINS { F4, F5 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, B4, B5, B6, B7, C6, C7}
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION ROW2COL
+
diff --git a/keyboards/butterstick/keymaps/default/keymap.c b/keyboards/butterstick/keymaps/default/keymap.c
new file mode 100644
index 000000000000..e4d1ea91f3e8
--- /dev/null
+++ b/keyboards/butterstick/keymaps/default/keymap.c
@@ -0,0 +1,184 @@
+#include QMK_KEYBOARD_H
+
+#include "sten.h"
+/*
+ * Key names are inherited from steno machines
+ * .-----------------------------------------------------.
+ * | LSU | LFT | LP | LH | ST1 | RF | RP | RL | RT | RD |
+ * |-----------------------------------------------------|
+ * | LSD | LK | LW | LR | ST2 | RR | RB | RG | RS | RZ |
+ * '-----------------------------------------------------'
+ */
+
+// Function prefixes
+#define MEDIA (LSD | LK | LW | LR)
+#define FUNCT (LSD | LK | LP | LH)
+#define MOVE (LSU | LFT | LP | LH)
+#define SYMB (RD | RZ)
+#define NUMA (LW | LR)
+#define NUMB (RR | RB)
+
+// QMK Layer Numbers
+ #define BASE 0
+ #define GAME 1
+
+// Do not change QMK Layer 0! This is your main keyboard.
+// Make your QMK modifications to the later layers, to add
+// keys/customize on the first layer modify processQwerty():
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [BASE] = LAYOUT_butter(
+ STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR,
+ STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR
+ ),
+ // I don't game don't roast me thanks
+ [GAME] = LAYOUT_butter(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_ENT,
+ KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TO(BASE)
+ )
+};
+
+// Note: You can only use basic keycodes here!
+// P() is just a wrapper to make your life easier, any C code can be executed.
+// Only the longest matched chord is run!
+//
+// http://docs.gboards.ca
+uint32_t processQwerty(bool lookup) {
+ // SECRET AGENT CHORDS
+ P( LSU | LK | RS | RD, SEND_STRING(VERSION); SEND_STRING(__DATE__));
+ P( LR | ST2| RR | RB, SEND(KC_BSPC));
+ P( LSD | RZ, SEND(KC_SPC));
+
+ // Dual chords
+ P( LP | LH, CLICK_MOUSE(KC_MS_BTN2));
+ P( ST1 | RF, CLICK_MOUSE(KC_MS_BTN1));
+ P( LSU | LFT, SEND(KC_ESC));
+ P( LSD | LK, SEND(KC_LSFT));
+ P( RZ | RS, SEND(KC_LSFT));
+ P( ST2 | RR, SEND(KC_SPC));
+ P( RP | RL, SEND(KC_LGUI));
+ P( RT | RD, SEND(KC_LCTL));
+ P( RL | RT, SEND(KC_LALT));
+ P( LSU | LSD | LFT | LK, SEND(KC_LCTL));
+ P( RS | RT | RD | RZ, SEND(KC_ENT));
+
+ // Function Layer
+ P( FUNCT | RF, SEND(KC_F1));
+ P( FUNCT | RP, SEND(KC_F2));
+ P( FUNCT | RL, SEND(KC_F3));
+ P( FUNCT | RT, SEND(KC_F4));
+ P( FUNCT | RF | RR, SEND(KC_F5));
+ P( FUNCT | RP | RB, SEND(KC_F6));
+ P( FUNCT | RL | RG, SEND(KC_F7));
+ P( FUNCT | RT | RS, SEND(KC_F8));
+ P( FUNCT | RR, SEND(KC_F9));
+ P( FUNCT | RB, SEND(KC_F10));
+ P( FUNCT | RG, SEND(KC_F11));
+ P( FUNCT | RS, SEND(KC_F12));
+
+ // Movement Layer
+ P( MOVE | RF, SEND(KC_LEFT));
+ P( MOVE | RP, SEND(KC_DOWN));
+ P( MOVE | RL, SEND(KC_UP));
+ P( MOVE | RT, SEND(KC_RIGHT));
+ P( MOVE | ST1, SEND(KC_PGUP));
+ P( MOVE | ST2, SEND(KC_PGDN));
+
+ // Media Layer
+ P( MEDIA | RF, SEND(KC_MPRV));
+ P( MEDIA | RP, SEND(KC_MPLY));
+ P( MEDIA | RL, SEND(KC_MPLY));
+ P( MEDIA | RT, SEND(KC_MNXT));
+ P( MEDIA | RG, SEND(KC_VOLU));
+ P( MEDIA | RB, SEND(KC_VOLD));
+ P( MEDIA | RS, SEND(KC_MUTE));
+
+ // Number Row, Right
+ P( NUMB | LSU, SEND(KC_1));
+ P( NUMB | LFT, SEND(KC_2));
+ P( NUMB | LP, SEND(KC_3));
+ P( NUMB | LH, SEND(KC_4));
+ P( NUMB | ST1, SEND(KC_5));
+ P( NUMB | RF, SEND(KC_6));
+ P( NUMB | RP, SEND(KC_7));
+ P( NUMB | RL, SEND(KC_8));
+ P( NUMB | RT, SEND(KC_9));
+ P( NUMB | RD, SEND(KC_0));
+
+ // Number Row, Left
+ P( NUMA | LSU, SEND(KC_1));
+ P( NUMA | LFT, SEND(KC_2));
+ P( NUMA | LP, SEND(KC_3));
+ P( NUMA | LH, SEND(KC_4));
+ P( NUMA | ST1, SEND(KC_5));
+ P( NUMA | RF, SEND(KC_6));
+ P( NUMA | RP, SEND(KC_7));
+ P( NUMA | RL, SEND(KC_8));
+ P( NUMA | RT, SEND(KC_9));
+ P( NUMA | RD, SEND(KC_0));
+
+
+ // Symbols and Numbers
+ P( SYMB | LP | LW, SEND(KC_LSFT); SEND(KC_9)); // (
+ P( SYMB | LH | LR, SEND(KC_LSFT); SEND(KC_0)); // )
+ P( SYMB | ST1 | ST2, SEND(KC_GRV)); // `
+ P( SYMB | RR | RF, SEND(KC_LSFT); SEND(KC_3)); // #
+ P( SYMB | LFT | LK, SEND(KC_LSFT); SEND(KC_4)); // $
+ P( SYMB | LSU, SEND(KC_LSFT); SEND(KC_1)); // !
+ P( SYMB | LSD, SEND(KC_LSFT); SEND(KC_5)); // %
+ P( SYMB | LFT, SEND(KC_LSFT); SEND(KC_2)); // @
+ P( SYMB | LK, SEND(KC_LSFT); SEND(KC_6)); // ^
+ P( SYMB | LP, SEND(KC_LSFT); SEND(KC_LBRC)); // {
+ P( SYMB | LW, SEND(KC_LBRC));
+ P( SYMB | LH, SEND(KC_LSFT); SEND(KC_RBRC)); // }
+ P( SYMB | LR, SEND(KC_RBRC));
+ P( SYMB | ST1, SEND(KC_LSFT); SEND(KC_BSLS)); // |
+ P( SYMB | ST2, SEND(KC_LSFT); SEND(KC_GRV)); // ~
+ P( SYMB | RP | RB, SEND(KC_QUOT));
+ P( SYMB | RP | RG, SEND(KC_LSFT); SEND(KC_QUOT)); // "
+ P( SYMB | RF, SEND(KC_KP_PLUS));
+ P( SYMB | RR, SEND(KC_LSFT); SEND(KC_7)); // &
+ P( SYMB | RP, SEND(KC_MINS));
+ P( SYMB | RB, SEND(KC_EQL));
+ P( SYMB | RL, SEND(KC_SLSH));
+ P( SYMB | RG, SEND(KC_COMM));
+ P( SYMB | RT, SEND(KC_PAST));
+ P( SYMB | RS, SEND(KC_DOT));
+
+ // Letters
+ P( LSU | LSD, SEND(KC_A));
+ P( LFT | LK, SEND(KC_S));
+ P( LP | LW, SEND(KC_D));
+ P( LH | LR, SEND(KC_F));
+ P( ST1 | ST2, SEND(KC_G));
+ P( RF | RR, SEND(KC_H));
+ P( RT | RS, SEND(KC_L));
+ P( RD | RZ, SEND(KC_SCLN));
+ P( RG | RL, SEND(KC_K));
+ P( RP | RB, SEND(KC_J));
+ P( LSU, SEND(KC_Q));
+ P( LSD, SEND(KC_Z));
+ P( LFT, SEND(KC_W));
+ P( LK, SEND(KC_X));
+ P( LP, SEND(KC_E));
+ P( LW, SEND(KC_C));
+ P( LH, SEND(KC_R));
+ P( LR, SEND(KC_V));
+ P( ST1, SEND(KC_T));
+ P( ST2, SEND(KC_B));
+ P( RF, SEND(KC_Y));
+ P( RR, SEND(KC_N));
+ P( RP, SEND(KC_U));
+ P( RB, SEND(KC_M));
+ P( RL, SEND(KC_I));
+ P( RG, SEND(KC_COMM));
+ P( RT, SEND(KC_O));
+ P( RS, SEND(KC_DOT));
+ P( RD, SEND(KC_P));
+ P( RZ, SEND(KC_SLSH));
+
+ return 0;
+}
+
+
+// Don't fuck with this, thanks.
+size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]);
diff --git a/keyboards/ergodash/rev2/keymaps/default/rules.mk b/keyboards/butterstick/keymaps/default/rules.mk
similarity index 100%
rename from keyboards/ergodash/rev2/keymaps/default/rules.mk
rename to keyboards/butterstick/keymaps/default/rules.mk
diff --git a/keyboards/butterstick/readme.md b/keyboards/butterstick/readme.md
new file mode 100644
index 000000000000..8bae8ba5a05f
--- /dev/null
+++ b/keyboards/butterstick/readme.md
@@ -0,0 +1,14 @@
+# Butter Stick
+
+![Butter Stick](https://i.redd.it/mvteaomko7s21.jpg)
+
+A chorded 20% keyboard packing full sized useage into your pocket. More info on [gboards.ca](http://docs.gboards.ca/Meet-Butter-Stick)!
+
+Keyboard Maintainer: [Germ](https://github.com/germ)
+Hardware Availability: [g Heavy Industries](https://www.gboards.ca/product/butter-stick-limited-edition)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make butterstick: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/butterstick/rules.mk b/keyboards/butterstick/rules.mk
new file mode 100644
index 000000000000..68b117bf590a
--- /dev/null
+++ b/keyboards/butterstick/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32u4
+F_CPU = 16000000
+ARCH = AVR8
+F_USB = $(F_CPU)
+
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -DONLYQWERTY -DDEBUG_MATRIX
+SRC += sten.c
+EXTRAFLAGS += -flto
+
+
+BOOTLOADER = atmel-dfu
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # USB Nkey Rollover
+STENO_ENABLE = yes # Needed for chording
+
diff --git a/keyboards/butterstick/sten.c b/keyboards/butterstick/sten.c
new file mode 100644
index 000000000000..a239e3884215
--- /dev/null
+++ b/keyboards/butterstick/sten.c
@@ -0,0 +1,367 @@
+#include "sten.h"
+
+// Chord state
+uint32_t cChord = 0; // Current Chord
+int chordIndex = 0; // Keys in previousachord
+int32_t chordState[32]; // Full Chord history
+#define QWERBUF 24 // Size of chords to buffer for output
+
+bool repeatFlag = false; // Should we repeat?
+uint32_t pChord = 0; // Previous Chord
+int pChordIndex = 0; // Keys in previousachord
+uint32_t pChordState[32]; // Previous chord sate
+uint32_t stickyBits = 0; // Or'd with every incoming press
+
+// Mode state
+enum MODE { STENO = 0, QWERTY, COMMAND };
+enum MODE pMode;
+bool QWERSTENO = false;
+#ifdef ONLYQWERTY
+enum MODE cMode = QWERTY;
+#else
+enum MODE cMode = STENO;
+#endif
+
+// Command State
+#define MAX_CMD_BUF 20
+uint8_t CMDLEN = 0;
+uint8_t CMDBUF[MAX_CMD_BUF];
+
+// Key Repeat state
+bool inChord = false;
+bool repEngaged = false;
+uint16_t repTimer = 0;
+#define REP_INIT_DELAY 750
+#define REP_DELAY 25
+
+// Mousekeys state
+bool inMouse = false;
+int8_t mousePress;
+
+// All processing done at chordUp goes through here
+// Note, this is a gutted version of the Georgi sten.h
+bool send_steno_chord_user(steno_mode_t mode, uint8_t chord[6]) {
+ // Check for mousekeys, this is release
+#ifdef MOUSEKEY_ENABLE
+ if (inMouse) {
+ inMouse = false;
+ mousekey_off(mousePress);
+ mousekey_send();
+ }
+#endif
+
+ // handle command mode
+ if (cChord == (LSU | LSD | RD | RZ)) {
+ if (cMode != COMMAND) { // Entering Command Mode
+ CMDLEN = 0;
+ pMode = cMode;
+ cMode = COMMAND;
+ } else { // Exiting Command Mode
+ cMode = pMode;
+
+ // Press all and release all
+ for (int i = 0; i < CMDLEN; i++) {
+ register_code(CMDBUF[i]);
+ }
+ clear_keyboard();
+ }
+
+ goto out;
+ }
+
+ // Handle Gaming Toggle,
+ if (cChord == (LSU | LSD | LFT | LK | RT | RS | RD | RZ) && keymapsCount > 1) {
+#ifndef NO_DEBUG
+ uprintf("Switching to QMK\n");
+#endif
+ layer_on(1);
+ goto out;
+ }
+
+ // Do QWERTY and Momentary QWERTY
+ if (cMode == QWERTY || (cMode == COMMAND)) {
+ processChord(false);
+ goto out;
+ }
+
+out:
+ cChord = 0;
+ inChord = false;
+ chordIndex = 0;
+ clear_keyboard();
+ repEngaged = false;
+ for (int i = 0; i < 32; i++)
+ chordState[i] = 0xFFFF;
+
+ return false;
+}
+
+// Update Chord State
+bool process_steno_user(uint16_t keycode, keyrecord_t *record) {
+ // Everything happens in here when steno keys come in.
+ // Bail on keyup
+ if (!record->event.pressed) return true;
+
+ // Update key repeat timers
+ repTimer = timer_read();
+ inChord = true;
+
+ // Switch on the press adding to chord
+ bool pr = record->event.pressed;
+ switch (keycode) {
+ // Mods and stuff
+ case STN_ST1: pr ? (cChord |= (ST1)): (cChord &= ~(ST1)); break;
+ case STN_ST2: pr ? (cChord |= (ST2)): (cChord &= ~(ST2)); break;
+ case STN_ST3: pr ? (cChord |= (ST3)): (cChord &= ~(ST3)); break;
+ case STN_ST4: pr ? (cChord |= (ST4)): (cChord &= ~(ST4)); break;
+ case STN_FN: pr ? (cChord |= (FN)) : (cChord &= ~(FN)); break;
+ case STN_PWR: pr ? (cChord |= (PWR)): (cChord &= ~(PWR)); break;
+ case STN_N1...STN_N6: pr ? (cChord |= (LNO)): (cChord &= ~(LNO)); break;
+ case STN_N7...STN_NC: pr ? (cChord |= (RNO)): (cChord &= ~(RNO)); break;
+
+ // All the letter keys
+ case STN_S1: pr ? (cChord |= (LSU)) : (cChord &= ~(LSU)); break;
+ case STN_S2: pr ? (cChord |= (LSD)) : (cChord &= ~(LSD)); break;
+ case STN_TL: pr ? (cChord |= (LFT)) : (cChord &= ~(LFT)); break;
+ case STN_KL: pr ? (cChord |= (LK)) : (cChord &= ~(LK)); break;
+ case STN_PL: pr ? (cChord |= (LP)) : (cChord &= ~(LP)); break;
+ case STN_WL: pr ? (cChord |= (LW)) : (cChord &= ~(LW)); break;
+ case STN_HL: pr ? (cChord |= (LH)) : (cChord &= ~(LH)); break;
+ case STN_RL: pr ? (cChord |= (LR)) : (cChord &= ~(LR)); break;
+ case STN_A: pr ? (cChord |= (LA)) : (cChord &= ~(LA)); break;
+ case STN_O: pr ? (cChord |= (LO)) : (cChord &= ~(LO)); break;
+ case STN_E: pr ? (cChord |= (RE)) : (cChord &= ~(RE)); break;
+ case STN_U: pr ? (cChord |= (RU)) : (cChord &= ~(RU)); break;
+ case STN_FR: pr ? (cChord |= (RF)) : (cChord &= ~(RF)); break;
+ case STN_RR: pr ? (cChord |= (RR)) : (cChord &= ~(RR)); break;
+ case STN_PR: pr ? (cChord |= (RP)) : (cChord &= ~(RP)); break;
+ case STN_BR: pr ? (cChord |= (RB)) : (cChord &= ~(RB)); break;
+ case STN_LR: pr ? (cChord |= (RL)) : (cChord &= ~(RL)); break;
+ case STN_GR: pr ? (cChord |= (RG)) : (cChord &= ~(RG)); break;
+ case STN_TR: pr ? (cChord |= (RT)) : (cChord &= ~(RT)); break;
+ case STN_SR: pr ? (cChord |= (RS)) : (cChord &= ~(RS)); break;
+ case STN_DR: pr ? (cChord |= (RD)) : (cChord &= ~(RD)); break;
+ case STN_ZR: pr ? (cChord |= (RZ)) : (cChord &= ~(RZ)); break;
+ }
+
+ // Store previous state for fastQWER
+ if (pr) {
+ chordState[chordIndex] = cChord;
+ chordIndex++;
+ }
+
+ return true;
+}
+void matrix_scan_user(void) {
+ // We abuse this for early sending of key
+ // Key repeat only on QWER/SYMB layers
+ if (cMode != QWERTY || !inChord) return;
+
+ // Check timers
+#ifndef NO_REPEAT
+ if (repEngaged && timer_elapsed(repTimer) > REP_DELAY) {
+ // Process Key for report
+ processChord(false);
+
+ // Send report to host
+ send_keyboard_report();
+ clear_keyboard();
+ repTimer = timer_read();
+ }
+
+ if (!repEngaged && timer_elapsed(repTimer) > REP_INIT_DELAY) {
+ repEngaged = true;
+ }
+#endif
+};
+
+// For Plover NKRO
+uint32_t processFakeSteno(bool lookup) {
+ P( LSU, SEND(KC_Q););
+ P( LSD, SEND(KC_A););
+ P( LFT, SEND(KC_W););
+ P( LP, SEND(KC_E););
+ P( LH, SEND(KC_R););
+ P( LK, SEND(KC_S););
+ P( LW, SEND(KC_D););
+ P( LR, SEND(KC_F););
+ P( ST1, SEND(KC_T););
+ P( ST2, SEND(KC_G););
+ P( LA, SEND(KC_C););
+ P( LO, SEND(KC_V););
+ P( RE, SEND(KC_N););
+ P( RU, SEND(KC_M););
+ P( ST3, SEND(KC_Y););
+ P( ST4, SEND(KC_H););
+ P( RF, SEND(KC_U););
+ P( RP, SEND(KC_I););
+ P( RL, SEND(KC_O););
+ P( RT, SEND(KC_P););
+ P( RD, SEND(KC_LBRC););
+ P( RR, SEND(KC_J););
+ P( RB, SEND(KC_K););
+ P( RG, SEND(KC_L););
+ P( RS, SEND(KC_SCLN););
+ P( RZ, SEND(KC_COMM););
+ P( LNO, SEND(KC_1););
+ P( RNO, SEND(KC_1););
+
+ return 0;
+}
+
+// Traverse the chord history to a given point
+// Returns the mask to use
+void processChord(bool useFakeSteno) {
+ // Save the clean chord state
+ uint32_t savedChord = cChord;
+
+ // Apply Stick Bits if needed
+ if (stickyBits != 0) {
+ cChord |= stickyBits;
+ for (int i = 0; i <= chordIndex; i++)
+ chordState[i] |= stickyBits;
+ }
+
+ // Strip FN
+ if (cChord & FN) cChord ^= FN;
+
+ // First we test if a whole chord was passsed
+ // If so we just run it handling repeat logic
+ if (useFakeSteno && processFakeSteno(true) == cChord) {
+ processFakeSteno(false);
+ return;
+ } else if (processQwerty(true) == cChord) {
+ processQwerty(false);
+ // Repeat logic
+ if (repeatFlag) {
+ restoreState();
+ repeatFlag = false;
+ processChord(false);
+ } else {
+ saveState(cChord);
+ }
+ return;
+ }
+
+ // Iterate through chord picking out the individual
+ // and longest chords
+ uint32_t bufChords[QWERBUF];
+ int bufLen = 0;
+ uint32_t mask = 0;
+
+ // We iterate over it multiple times to catch the longest
+ // chord. Then that gets addded to the mask and re run.
+ while (savedChord != mask) {
+ uint32_t test = 0;
+ uint32_t longestChord = 0;
+
+ for (int i = 0; i <= chordIndex; i++) {
+ cChord = chordState[i] & ~mask;
+ if (cChord == 0)
+ continue;
+
+ // Assume mid parse Sym is new chord
+ if (i != 0 && test != 0 && (cChord ^ test) == PWR) {
+ longestChord = test;
+ break;
+ }
+
+ // Lock SYM layer in once detected
+ if (mask & PWR)
+ cChord |= PWR;
+
+
+ // Testing for keycodes
+ if (useFakeSteno) {
+ test = processFakeSteno(true);
+ } else {
+ test = processQwerty(true);
+ }
+
+ if (test != 0) {
+ longestChord = test;
+ }
+ }
+
+ mask |= longestChord;
+ bufChords[bufLen] = longestChord;
+ bufLen++;
+
+ // That's a loop of sorts, halt processing
+ if (bufLen >= QWERBUF) {
+ return;
+ }
+ }
+
+ // Now that the buffer is populated, we run it
+ for (int i = 0; i < bufLen ; i++) {
+ cChord = bufChords[i];
+ if (useFakeSteno) {
+ processFakeSteno(false);
+ } else {
+ processQwerty(false);
+ }
+ }
+
+ // Save state in case of repeat
+ if (!repeatFlag) {
+ saveState(savedChord);
+ }
+
+ // Restore cChord for held repeat
+ cChord = savedChord;
+
+ return;
+}
+void saveState(uint32_t cleanChord) {
+ pChord = cleanChord;
+ pChordIndex = chordIndex;
+ for (int i = 0; i < 32; i++)
+ pChordState[i] = chordState[i];
+}
+void restoreState() {
+ cChord = pChord;
+ chordIndex = pChordIndex;
+ for (int i = 0; i < 32; i++)
+ chordState[i] = pChordState[i];
+}
+
+// Macros for calling from keymap.c
+void SEND(uint8_t kc) {
+ // Send Keycode, Does not work for Quantum Codes
+ if (cMode == COMMAND && CMDLEN < MAX_CMD_BUF) {
+#ifndef NO_DEBUG
+ uprintf("CMD LEN: %d BUF: %d\n", CMDLEN, MAX_CMD_BUF);
+#endif
+ CMDBUF[CMDLEN] = kc;
+ CMDLEN++;
+ }
+
+ if (cMode != COMMAND) register_code(kc);
+ return;
+}
+void REPEAT(void) {
+ if (cMode != QWERTY)
+ return;
+
+ repeatFlag = true;
+ return;
+}
+void SET_STICKY(uint32_t stick) {
+ stickyBits = stick;
+ return;
+}
+void SWITCH_LAYER(int layer) {
+ if (keymapsCount >= layer)
+ layer_on(layer);
+}
+void CLICK_MOUSE(uint8_t kc) {
+#ifdef MOUSEKEY_ENABLE
+ mousekey_on(kc);
+ mousekey_send();
+
+ // Store state for later use
+ inMouse = true;
+ mousePress = kc;
+#endif
+}
diff --git a/keyboards/butterstick/sten.h b/keyboards/butterstick/sten.h
new file mode 100644
index 000000000000..5a9771d9a028
--- /dev/null
+++ b/keyboards/butterstick/sten.h
@@ -0,0 +1,77 @@
+// 2019, g Heavy Industries
+// Blessed mother of Christ, please keep this readable
+// and protect us from segfaults. For thine is the clock,
+// the slave and the master. Until we return from main.
+//
+// Amen.
+
+#include QMK_KEYBOARD_H
+#include "mousekey.h"
+#include "keymap.h"
+#include "keymap_steno.h"
+#include "wait.h"
+
+extern size_t keymapsCount; // Total keymaps
+extern uint32_t cChord; // Current Chord
+
+// Function defs
+void processChord(bool useFakeSteno);
+uint32_t processQwerty(bool lookup);
+uint32_t processFakeSteno(bool lookup);
+void saveState(uint32_t cChord);
+void restoreState(void);
+
+// Macros for use in keymap.c
+void SEND(uint8_t kc);
+void REPEAT(void);
+void SET_STICKY(uint32_t);
+void SWITCH_LAYER(int);
+void CLICK_MOUSE(uint8_t);
+
+// Keymap helper
+#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
+
+// Shift to internal representation
+// i.e) S(teno)R(ight)F
+#define STN(n) (1L<
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 2 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General 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 0xCA17
+#define PRODUCT_ID 0xCA39
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Maple Computing
+#define PRODUCT C39
+#define DESCRIPTION A compact 39 key keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 13
+
+#define MATRIX_ROW_PINS { D1, B4, B5 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D7, E6, C6, D2, D3 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/*
+ * 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
+
+/*
+ * Magic Key Options
+ *
+ * Magic keys are hotkey commands that allow control over firmware functions of
+ * the keyboard. They are best used in combination with the HID Listen program,
+ * found here: https://www.pjrc.com/teensy/hid_listen.html
+ *
+ * The options below allow the magic key functionality to be changed. This is
+ * useful if your keyboard/keypad is missing keys and you want magic key support.
+ *
+ */
+
+/*
+ * 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/c39/info.json b/keyboards/c39/info.json
new file mode 100755
index 000000000000..4ed7f018c8d9
--- /dev/null
+++ b/keyboards/c39/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "C39",
+ "url": "",
+ "maintainer": "Space Cat",
+ "width": 13.25,
+ "height": 3,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [{"label":"Q", "x":0, "y":0}, {"label":"W", "x":1, "y":0}, {"label":"E", "x":2, "y":0}, {"label":"R", "x":3, "y":0}, {"label":"T", "x":4, "y":0}, {"label":"Back", "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":"M1", "x":11.25, "y":0}, {"label":"M2", "x":12.25, "y":0}, {"label":"A", "x":0, "y":1}, {"label":"S", "x":1, "y":1}, {"label":"D", "x":2, "y":1}, {"label":"F", "x":3, "y":1}, {"label":"G", "x":4, "y":1}, {"label":"Enter", "x":5, "y":1}, {"label":"H", "x":6, "y":1}, {"label":"J", "x":7, "y":1}, {"label":"K", "x":8, "y":1}, {"label":"L", "x":9, "y":1}, {"label":";", "x":10, "y":1}, {"label":"M3", "x":11.25, "y":1}, {"label":"M4", "x":12.25, "y":1}, {"label":"Z", "x":0, "y":2}, {"label":"X", "x":1, "y":2}, {"label":"C", "x":2, "y":2}, {"label":"V", "x":3, "y":2}, {"label":"B", "x":4, "y":2}, {"label":"Fn", "x":5, "y":2}, {"label":"N", "x":6, "y":2}, {"label":"M", "x":7, "y":2}, {"label":"<", "x":8, "y":2}, {"label":">", "x":9, "y":2}, {"label":"?", "x":10, "y":2}, {"label":"M5", "x":11.25, "y":2}, {"label":"M6", "x":12.25, "y":2}]
+ }
+ }
+}
\ No newline at end of file
diff --git a/keyboards/c39/keymaps/default/config.h b/keyboards/c39/keymaps/default/config.h
new file mode 100755
index 000000000000..271f48d0011b
--- /dev/null
+++ b/keyboards/c39/keymaps/default/config.h
@@ -0,0 +1,3 @@
+#pragma once
+
+// place overrides here
diff --git a/keyboards/c39/keymaps/default/keymap.c b/keyboards/c39/keymaps/default/keymap.c
new file mode 100755
index 000000000000..9de75190d030
--- /dev/null
+++ b/keyboards/c39/keymaps/default/keymap.c
@@ -0,0 +1,45 @@
+#include QMK_KEYBOARD_H
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// 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 _FN1 1
+
+// Defines for task manager and such
+#define CALTDEL LCTL(LALT(KC_DEL))
+#define TSKMGR LCTL(LSFT(KC_ESC))
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * ,----------------------------------------------------------------------------. ,-------------.
+ * | Q | W | E | R | T | Bksp | Y | U | I | O | P | | M1 | M2 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | A | S | D | F | G | Enter| H | J | K | L | ; | | M3 | M4 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | Z | X | C | V | B | FN1 | N | M | , | . | / | | M5 | M6 |
+ * `----------------------------------------------------------------------------' `-------------'
+ */
+[_QWERTY] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_BSPC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_1, KC_2,
+ KC_A, KC_S, KC_D, KC_F, KC_G, MT(MOD_LSFT, KC_ENT), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_3, KC_4,
+ KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_FN1, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_5, KC_6
+),
+
+/* FN1
+ * ,----------------------------------------------------------------------------. ,-------------.
+ * | 1 | 2 | 3 | 4 | 5 | Bksp | 6 | 7 | 8 | 9 | 0 | | M1 | M2 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | 4 | 5 | 6 | + | | Enter| | | | | | | M3 | M4 |
+ * |------+------+------+------+------+------+------+------+------+------+------+ |------+------|
+ * | 7 | 8 | 9 | 0 | | FN1 | | | | | | | M5 | M6 |
+ * `----------------------------------------------------------------------------' `-------------'
+ */
+[_FN1] = LAYOUT(
+ KC_1, KC_2, KC_3, KC_4, KC_5, KC_BSPC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_1, KC_2,
+ KC_4, KC_5, KC_6, KC_PLUS, _______, KC_ENT, _______, _______, _______, _______, _______, KC_3, KC_4,
+ KC_7, KC_8, KC_9, KC_0, _______, _______, _______, _______, _______, _______, _______, KC_5, KC_6
+),
+};
diff --git a/keyboards/c39/keymaps/default/readme.md b/keyboards/c39/keymaps/default/readme.md
new file mode 100755
index 000000000000..f5b1b6ac1145
--- /dev/null
+++ b/keyboards/c39/keymaps/default/readme.md
@@ -0,0 +1 @@
+# The default keymap for the C39
diff --git a/keyboards/c39/readme.md b/keyboards/c39/readme.md
new file mode 100755
index 000000000000..0454f1c12b02
--- /dev/null
+++ b/keyboards/c39/readme.md
@@ -0,0 +1,16 @@
+# C39
+=======
+
+![C39](https://i.imgur.com/KuWIIuW.png)
+
+A compact 39 key keyboard.
+
+Keyboard Maintainer: [Maple Computing]()
+Hardware Supported: C39 PCB
+Hardware Availability: [SpaceCat.design](https://spacecat.design)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make c39: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/c39/rules.mk b/keyboards/c39/rules.mk
new file mode 100755
index 000000000000..8fcb089817ce
--- /dev/null
+++ b/keyboards/c39/rules.mk
@@ -0,0 +1,66 @@
+# MCU name
+MCU = atmega32u4
+
+# 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(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+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 on B7 by default
+MIDI_ENABLE = no # MIDI controls
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+AUDIO_ENABLE = no # Audio output on port C6
+RGBLIGHT_ENABLE = no # RGB Enable / Disable
diff --git a/keyboards/candybar/keymaps/default/keymap.c b/keyboards/candybar/keymaps/default/keymap.c
index bf589289a3cb..8f4cc08c7467 100644
--- a/keyboards/candybar/keymaps/default/keymap.c
+++ b/keyboards/candybar/keymaps/default/keymap.c
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-#include "candybar.h"
+#include QMK_KEYBOARD_H
#define _BL 0
#define _FL 1
@@ -35,4 +35,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB,KC_A,KC_SLCK,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_QUOT,KC_BSLS,KC_P4,KC_P5,KC_P6,KC_VOLD, \
KC_LSFT,KC_Z,KC_X,KC_CAPS,KC_V,KC_B,KC_NLCK,KC_M,KC_COMM,KC_DOT,KC_SLSH,KC_PGUP,KC_P1,KC_P2,KC_P3,KC_PEQL, \
KC_LCTL,KC_LGUI,KC_LALT,KC_SPC,KC_SPC,KC_BSPC,KC_APP,MO(_FL),KC_HOME,KC_PGDN,KC_END,KC_P0,KC_PDOT,KC_PENT),
-};
\ No newline at end of file
+};
diff --git a/keyboards/candybar/rules.mk b/keyboards/candybar/rules.mk
index d27bbe102a7b..0bc9a5b3e691 100644
--- a/keyboards/candybar/rules.mk
+++ b/keyboards/candybar/rules.mk
@@ -31,6 +31,7 @@ OPT_DEFS =
# Options to pass to dfu-util when flashing
DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave
+DFU_SUFFIX_ARGS = -p DF11 -v 0483
# Build Options
# comment out to disable the options.
@@ -39,11 +40,11 @@ EXTRAFLAGS+=-flto
BACKLIGHT_ENABLE = no
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
-MOUSEKEY_ENABLE = yes # Mouse keys
+MOUSEKEY_ENABLE = no # 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 = yes # Breathing sleep LED during USB suspend
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover
AUDIO_ENABLE = no
RGBLIGHT_ENABLE = no
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
new file mode 100644
index 000000000000..9d10fbd754da
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.c
@@ -0,0 +1,109 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 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.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#include "hal.h"
+
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+const PALConfig pal_default_config = {
+#if STM32_HAS_GPIOA
+ {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR,
+ VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH},
+#endif
+#if STM32_HAS_GPIOB
+ {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR,
+ VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH},
+#endif
+#if STM32_HAS_GPIOC
+ {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR,
+ VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH},
+#endif
+#if STM32_HAS_GPIOD
+ {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR,
+ VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH},
+#endif
+#if STM32_HAS_GPIOE
+ {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR,
+ VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH},
+#endif
+#if STM32_HAS_GPIOF
+ {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR,
+ VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH},
+#endif
+#if STM32_HAS_GPIOG
+ {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR,
+ VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH},
+#endif
+#if STM32_HAS_GPIOH
+ {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR,
+ VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH},
+#endif
+#if STM32_HAS_GPIOI
+ {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR,
+ VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH}
+#endif
+};
+#endif
+
+void enter_bootloader_mode_if_requested(void);
+
+/**
+ * @brief Early initialization code.
+ * @details This initialization must be performed just after stack setup
+ * and before any other initialization.
+ */
+void __early_init(void) {
+ enter_bootloader_mode_if_requested();
+ stm32_clock_init();
+}
+
+#if HAL_USE_MMC_SPI || defined(__DOXYGEN__)
+/**
+ * @brief MMC_SPI card detection.
+ */
+bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ /* TODO: Fill the implementation.*/
+ return true;
+}
+
+/**
+ * @brief MMC_SPI card write protection detection.
+ */
+bool mmc_lld_is_write_protected(MMCDriver *mmcp) {
+
+ (void)mmcp;
+ /* TODO: Fill the implementation.*/
+ return false;
+}
+#endif
+
+/**
+ * @brief Board-specific initialization code.
+ * @todo Add your board-specific code, if any.
+ */
+void boardInit(void) {
+}
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
new file mode 100644
index 000000000000..de3a93d1ceb0
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.h
@@ -0,0 +1,922 @@
+/*
+ ChibiOS - Copyright (C) 2006..2016 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.
+*/
+
+/*
+ * This file has been automatically generated using ChibiStudio board
+ * generator plugin. Do not edit manually.
+ */
+
+#ifndef BOARD_H
+#define BOARD_H
+
+/*
+ * Setup for ST STM32F072B-Discovery board.
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_ST_STM32F072B_DISCOVERY
+#define BOARD_NAME "ST STM32F072B-Discovery"
+
+/*
+ * Board oscillators-related settings.
+ * NOTE: HSE not fitted.
+ */
+#if !defined(STM32_LSECLK)
+#define STM32_LSECLK 32768
+#endif
+
+#define STM32_LSEDRV (3U << 3U)
+
+#if !defined(STM32_HSECLK)
+#define STM32_HSECLK 0U
+#endif
+
+#define STM32_HSE_BYPASS
+
+/*
+ * MCU type as defined in the ST header.
+ */
+#define STM32F072xB
+
+/*
+ * IO pins assignments.
+ */
+#define GPIOA_BUTTON 0U
+#define GPIOA_PIN1 1U
+#define GPIOA_PIN2 2U
+#define GPIOA_PIN3 3U
+#define GPIOA_PIN4 4U
+#define GPIOA_PIN5 5U
+#define GPIOA_PIN6 6U
+#define GPIOA_PIN7 7U
+#define GPIOA_PIN8 8U
+#define GPIOA_PIN9 9U
+#define GPIOA_PIN10 10U
+#define GPIOA_USB_DM 11U
+#define GPIOA_USB_DP 12U
+#define GPIOA_SWDIO 13U
+#define GPIOA_SWCLK 14U
+#define GPIOA_PIN15 15U
+
+#define GPIOB_PIN0 0U
+#define GPIOB_PIN1 1U
+#define GPIOB_PIN2 2U
+#define GPIOB_PIN3 3U
+#define GPIOB_PIN4 4U
+#define GPIOB_PIN5 5U
+#define GPIOB_PIN6 6U
+#define GPIOB_PIN7 7U
+#define GPIOB_PIN8 8U
+#define GPIOB_PIN9 9U
+#define GPIOB_PIN10 10U
+#define GPIOB_PIN11 11U
+#define GPIOB_PIN12 12U
+#define GPIOB_SPI2_SCK 13U
+#define GPIOB_SPI2_MISO 14U
+#define GPIOB_SPI2_MOSI 15U
+
+#define GPIOC_MEMS_CS 0U
+#define GPIOC_PIN1 1U
+#define GPIOC_PIN2 2U
+#define GPIOC_PIN3 3U
+#define GPIOC_PIN4 4U
+#define GPIOC_PIN5 5U
+#define GPIOC_LED_RED 6U
+#define GPIOC_LED_BLUE 7U
+#define GPIOC_LED_ORANGE 8U
+#define GPIOC_LED_GREEN 9U
+#define GPIOC_PIN10 10U
+#define GPIOC_PIN11 11U
+#define GPIOC_PIN12 12U
+#define GPIOC_PIN13 13U
+#define GPIOC_OSC32_IN 14U
+#define GPIOC_OSC32_OUT 15U
+
+#define GPIOD_PIN0 0U
+#define GPIOD_PIN1 1U
+#define GPIOD_PIN2 2U
+#define GPIOD_PIN3 3U
+#define GPIOD_PIN4 4U
+#define GPIOD_PIN5 5U
+#define GPIOD_PIN6 6U
+#define GPIOD_PIN7 7U
+#define GPIOD_PIN8 8U
+#define GPIOD_PIN9 9U
+#define GPIOD_PIN10 10U
+#define GPIOD_PIN11 11U
+#define GPIOD_PIN12 12U
+#define GPIOD_PIN13 13U
+#define GPIOD_PIN14 14U
+#define GPIOD_PIN15 15U
+
+#define GPIOE_PIN0 0U
+#define GPIOE_PIN1 1U
+#define GPIOE_PIN2 2U
+#define GPIOE_PIN3 3U
+#define GPIOE_PIN4 4U
+#define GPIOE_PIN5 5U
+#define GPIOE_PIN6 6U
+#define GPIOE_PIN7 7U
+#define GPIOE_PIN8 8U
+#define GPIOE_PIN9 9U
+#define GPIOE_PIN10 10U
+#define GPIOE_PIN11 11U
+#define GPIOE_PIN12 12U
+#define GPIOE_PIN13 13U
+#define GPIOE_PIN14 14U
+#define GPIOE_PIN15 15U
+
+#define GPIOF_OSC_IN 0U
+#define GPIOF_OSC_OUT 1U
+#define GPIOF_PIN2 2U
+#define GPIOF_PIN3 3U
+#define GPIOF_PIN4 4U
+#define GPIOF_PIN5 5U
+#define GPIOF_PIN6 6U
+#define GPIOF_PIN7 7U
+#define GPIOF_PIN8 8U
+#define GPIOF_PIN9 9U
+#define GPIOF_PIN10 10U
+#define GPIOF_PIN11 11U
+#define GPIOF_PIN12 12U
+#define GPIOF_PIN13 13U
+#define GPIOF_PIN14 14U
+#define GPIOF_PIN15 15U
+
+/*
+ * IO lines assignments.
+ */
+#define LINE_BUTTON PAL_LINE(GPIOA, 0U)
+#define LINE_USB_DM PAL_LINE(GPIOA, 11U)
+#define LINE_USB_DP PAL_LINE(GPIOA, 12U)
+#define LINE_SWDIO PAL_LINE(GPIOA, 13U)
+#define LINE_SWCLK PAL_LINE(GPIOA, 14U)
+
+#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U)
+#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U)
+#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U)
+
+#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U)
+#define LINE_LED_RED PAL_LINE(GPIOC, 6U)
+#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U)
+#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U)
+#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U)
+#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U)
+#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U)
+
+
+
+#define LINE_OSC_IN PAL_LINE(GPIOF, 0U)
+#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U)
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ * Please refer to the STM32 Reference Manual for details.
+ */
+#define PIN_MODE_INPUT(n) (0U << ((n) * 2U))
+#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U))
+#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U))
+#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U))
+#define PIN_ODR_LOW(n) (0U << (n))
+#define PIN_ODR_HIGH(n) (1U << (n))
+#define PIN_OTYPE_PUSHPULL(n) (0U << (n))
+#define PIN_OTYPE_OPENDRAIN(n) (1U << (n))
+#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U))
+#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U))
+#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U))
+#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U))
+#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U))
+#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U))
+#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U))
+#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U))
+
+/*
+ * GPIOA setup:
+ *
+ * PA0 - BUTTON (input floating).
+ * PA1 - PIN1 (input pullup).
+ * PA2 - PIN2 (input pullup).
+ * PA3 - PIN3 (input pullup).
+ * PA4 - PIN4 (input pullup).
+ * PA5 - PIN5 (input pullup).
+ * PA6 - PIN6 (input pullup).
+ * PA7 - PIN7 (input pullup).
+ * PA8 - PIN8 (input pullup).
+ * PA9 - PIN9 (input pullup).
+ * PA10 - PIN10 (input pullup).
+ * PA11 - USB_DM (input floating).
+ * PA12 - USB_DP (input floating).
+ * PA13 - SWDIO (alternate 0).
+ * PA14 - SWCLK (alternate 0).
+ * PA15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \
+ PIN_MODE_INPUT(GPIOA_PIN1) | \
+ PIN_MODE_INPUT(GPIOA_PIN2) | \
+ PIN_MODE_INPUT(GPIOA_PIN3) | \
+ PIN_MODE_INPUT(GPIOA_PIN4) | \
+ PIN_MODE_INPUT(GPIOA_PIN5) | \
+ PIN_MODE_INPUT(GPIOA_PIN6) | \
+ PIN_MODE_INPUT(GPIOA_PIN7) | \
+ PIN_MODE_INPUT(GPIOA_PIN8) | \
+ PIN_MODE_INPUT(GPIOA_PIN9) | \
+ PIN_MODE_INPUT(GPIOA_PIN10) | \
+ PIN_MODE_INPUT(GPIOA_USB_DM) | \
+ PIN_MODE_INPUT(GPIOA_USB_DP) | \
+ PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \
+ PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \
+ PIN_MODE_INPUT(GPIOA_PIN15))
+#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \
+ PIN_OTYPE_PUSHPULL(GPIOA_PIN15))
+#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \
+ PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \
+ PIN_OSPEED_HIGH(GPIOA_SWDIO) | \
+ PIN_OSPEED_HIGH(GPIOA_SWCLK) | \
+ PIN_OSPEED_HIGH(GPIOA_PIN15))
+#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN10) | \
+ PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \
+ PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \
+ PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \
+ PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \
+ PIN_PUPDR_PULLUP(GPIOA_PIN15))
+#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \
+ PIN_ODR_HIGH(GPIOA_PIN1) | \
+ PIN_ODR_HIGH(GPIOA_PIN2) | \
+ PIN_ODR_HIGH(GPIOA_PIN3) | \
+ PIN_ODR_HIGH(GPIOA_PIN4) | \
+ PIN_ODR_HIGH(GPIOA_PIN5) | \
+ PIN_ODR_HIGH(GPIOA_PIN6) | \
+ PIN_ODR_HIGH(GPIOA_PIN7) | \
+ PIN_ODR_HIGH(GPIOA_PIN8) | \
+ PIN_ODR_HIGH(GPIOA_PIN9) | \
+ PIN_ODR_HIGH(GPIOA_PIN10) | \
+ PIN_ODR_HIGH(GPIOA_USB_DM) | \
+ PIN_ODR_HIGH(GPIOA_USB_DP) | \
+ PIN_ODR_HIGH(GPIOA_SWDIO) | \
+ PIN_ODR_HIGH(GPIOA_SWCLK) | \
+ PIN_ODR_HIGH(GPIOA_PIN15))
+#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN7, 0U))
+#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \
+ PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \
+ PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \
+ PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \
+ PIN_AFIO_AF(GPIOA_PIN15, 0U))
+
+/*
+ * GPIOB setup:
+ *
+ * PB0 - PIN0 (input pullup).
+ * PB1 - PIN1 (input pullup).
+ * PB2 - PIN2 (input pullup).
+ * PB3 - PIN3 (input pullup).
+ * PB4 - PIN4 (input pullup).
+ * PB5 - PIN5 (input pullup).
+ * PB6 - PIN6 (input pullup).
+ * PB7 - PIN7 (input pullup).
+ * PB8 - PIN8 (input pullup).
+ * PB9 - PIN9 (input pullup).
+ * PB10 - PIN10 (input pullup).
+ * PB11 - PIN11 (input pullup).
+ * PB12 - PIN12 (input pullup).
+ * PB13 - SPI2_SCK (alternate 0).
+ * PB14 - SPI2_MISO (alternate 0).
+ * PB15 - SPI2_MOSI (alternate 0).
+ */
+#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \
+ PIN_MODE_INPUT(GPIOB_PIN1) | \
+ PIN_MODE_INPUT(GPIOB_PIN2) | \
+ PIN_MODE_INPUT(GPIOB_PIN3) | \
+ PIN_MODE_INPUT(GPIOB_PIN4) | \
+ PIN_MODE_INPUT(GPIOB_PIN5) | \
+ PIN_MODE_INPUT(GPIOB_PIN6) | \
+ PIN_MODE_INPUT(GPIOB_PIN7) | \
+ PIN_MODE_INPUT(GPIOB_PIN8) | \
+ PIN_MODE_INPUT(GPIOB_PIN9) | \
+ PIN_MODE_INPUT(GPIOB_PIN10) | \
+ PIN_MODE_INPUT(GPIOB_PIN11) | \
+ PIN_MODE_INPUT(GPIOB_PIN12) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \
+ PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \
+ PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN2) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN3) | \
+ PIN_OSPEED_HIGH(GPIOB_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \
+ PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOB_PIN12) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \
+ PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \
+ PIN_ODR_HIGH(GPIOB_PIN1) | \
+ PIN_ODR_HIGH(GPIOB_PIN2) | \
+ PIN_ODR_HIGH(GPIOB_PIN3) | \
+ PIN_ODR_HIGH(GPIOB_PIN4) | \
+ PIN_ODR_HIGH(GPIOB_PIN5) | \
+ PIN_ODR_HIGH(GPIOB_PIN6) | \
+ PIN_ODR_HIGH(GPIOB_PIN7) | \
+ PIN_ODR_HIGH(GPIOB_PIN8) | \
+ PIN_ODR_HIGH(GPIOB_PIN9) | \
+ PIN_ODR_HIGH(GPIOB_PIN10) | \
+ PIN_ODR_HIGH(GPIOB_PIN11) | \
+ PIN_ODR_HIGH(GPIOB_PIN12) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \
+ PIN_ODR_HIGH(GPIOB_SPI2_MOSI))
+#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN7, 0U))
+#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOB_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \
+ PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U))
+
+/*
+ * GPIOC setup:
+ *
+ * PC0 - MEMS_CS (output pushpull maximum).
+ * PC1 - PIN1 (input pullup).
+ * PC2 - PIN2 (input pullup).
+ * PC3 - PIN3 (input pullup).
+ * PC4 - PIN4 (input pullup).
+ * PC5 - PIN5 (input pullup).
+ * PC6 - LED_RED (output pushpull maximum).
+ * PC7 - LED_BLUE (output pushpull maximum).
+ * PC8 - LED_ORANGE (output pushpull maximum).
+ * PC9 - LED_GREEN (output pushpull maximum).
+ * PC10 - PIN10 (input pullup).
+ * PC11 - PIN11 (input pullup).
+ * PC12 - PIN12 (input pullup).
+ * PC13 - PIN13 (input pullup).
+ * PC14 - OSC32_IN (input floating).
+ * PC15 - OSC32_OUT (input floating).
+ */
+#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \
+ PIN_MODE_INPUT(GPIOC_PIN1) | \
+ PIN_MODE_INPUT(GPIOC_PIN2) | \
+ PIN_MODE_INPUT(GPIOC_PIN3) | \
+ PIN_MODE_INPUT(GPIOC_PIN4) | \
+ PIN_MODE_INPUT(GPIOC_PIN5) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_RED) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \
+ PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \
+ PIN_MODE_INPUT(GPIOC_PIN10) | \
+ PIN_MODE_INPUT(GPIOC_PIN11) | \
+ PIN_MODE_INPUT(GPIOC_PIN12) | \
+ PIN_MODE_INPUT(GPIOC_PIN13) | \
+ PIN_MODE_INPUT(GPIOC_OSC32_IN) | \
+ PIN_MODE_INPUT(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \
+ PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_RED) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \
+ PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \
+ PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \
+ PIN_OSPEED_HIGH(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN5) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \
+ PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOC_PIN13) | \
+ PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \
+ PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \
+ PIN_ODR_HIGH(GPIOC_PIN1) | \
+ PIN_ODR_HIGH(GPIOC_PIN2) | \
+ PIN_ODR_HIGH(GPIOC_PIN3) | \
+ PIN_ODR_HIGH(GPIOC_PIN4) | \
+ PIN_ODR_HIGH(GPIOC_PIN5) | \
+ PIN_ODR_LOW(GPIOC_LED_RED) | \
+ PIN_ODR_LOW(GPIOC_LED_BLUE) | \
+ PIN_ODR_LOW(GPIOC_LED_ORANGE) | \
+ PIN_ODR_LOW(GPIOC_LED_GREEN) | \
+ PIN_ODR_HIGH(GPIOC_PIN10) | \
+ PIN_ODR_HIGH(GPIOC_PIN11) | \
+ PIN_ODR_HIGH(GPIOC_PIN12) | \
+ PIN_ODR_HIGH(GPIOC_PIN13) | \
+ PIN_ODR_HIGH(GPIOC_OSC32_IN) | \
+ PIN_ODR_HIGH(GPIOC_OSC32_OUT))
+#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_BLUE, 0U))
+#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \
+ PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOC_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \
+ PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U))
+
+/*
+ * GPIOD setup:
+ *
+ * PD0 - PIN0 (input pullup).
+ * PD1 - PIN1 (input pullup).
+ * PD2 - PIN2 (input pullup).
+ * PD3 - PIN3 (input pullup).
+ * PD4 - PIN4 (input pullup).
+ * PD5 - PIN5 (input pullup).
+ * PD6 - PIN6 (input pullup).
+ * PD7 - PIN7 (input pullup).
+ * PD8 - PIN8 (input pullup).
+ * PD9 - PIN9 (input pullup).
+ * PD10 - PIN10 (input pullup).
+ * PD11 - PIN11 (input pullup).
+ * PD12 - PIN12 (input pullup).
+ * PD13 - PIN13 (input pullup).
+ * PD14 - PIN14 (input pullup).
+ * PD15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \
+ PIN_MODE_INPUT(GPIOD_PIN1) | \
+ PIN_MODE_INPUT(GPIOD_PIN2) | \
+ PIN_MODE_INPUT(GPIOD_PIN3) | \
+ PIN_MODE_INPUT(GPIOD_PIN4) | \
+ PIN_MODE_INPUT(GPIOD_PIN5) | \
+ PIN_MODE_INPUT(GPIOD_PIN6) | \
+ PIN_MODE_INPUT(GPIOD_PIN7) | \
+ PIN_MODE_INPUT(GPIOD_PIN8) | \
+ PIN_MODE_INPUT(GPIOD_PIN9) | \
+ PIN_MODE_INPUT(GPIOD_PIN10) | \
+ PIN_MODE_INPUT(GPIOD_PIN11) | \
+ PIN_MODE_INPUT(GPIOD_PIN12) | \
+ PIN_MODE_INPUT(GPIOD_PIN13) | \
+ PIN_MODE_INPUT(GPIOD_PIN14) | \
+ PIN_MODE_INPUT(GPIOD_PIN15))
+#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOD_PIN15))
+#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOD_PIN15))
+#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOD_PIN15))
+#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \
+ PIN_ODR_HIGH(GPIOD_PIN1) | \
+ PIN_ODR_HIGH(GPIOD_PIN2) | \
+ PIN_ODR_HIGH(GPIOD_PIN3) | \
+ PIN_ODR_HIGH(GPIOD_PIN4) | \
+ PIN_ODR_HIGH(GPIOD_PIN5) | \
+ PIN_ODR_HIGH(GPIOD_PIN6) | \
+ PIN_ODR_HIGH(GPIOD_PIN7) | \
+ PIN_ODR_HIGH(GPIOD_PIN8) | \
+ PIN_ODR_HIGH(GPIOD_PIN9) | \
+ PIN_ODR_HIGH(GPIOD_PIN10) | \
+ PIN_ODR_HIGH(GPIOD_PIN11) | \
+ PIN_ODR_HIGH(GPIOD_PIN12) | \
+ PIN_ODR_HIGH(GPIOD_PIN13) | \
+ PIN_ODR_HIGH(GPIOD_PIN14) | \
+ PIN_ODR_HIGH(GPIOD_PIN15))
+#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN7, 0U))
+#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOD_PIN15, 0U))
+
+/*
+ * GPIOE setup:
+ *
+ * PE0 - PIN0 (input pullup).
+ * PE1 - PIN1 (input pullup).
+ * PE2 - PIN2 (input pullup).
+ * PE3 - PIN3 (input pullup).
+ * PE4 - PIN4 (input pullup).
+ * PE5 - PIN5 (input pullup).
+ * PE6 - PIN6 (input pullup).
+ * PE7 - PIN7 (input pullup).
+ * PE8 - PIN8 (input pullup).
+ * PE9 - PIN9 (input pullup).
+ * PE10 - PIN10 (input pullup).
+ * PE11 - PIN11 (input pullup).
+ * PE12 - PIN12 (input pullup).
+ * PE13 - PIN13 (input pullup).
+ * PE14 - PIN14 (input pullup).
+ * PE15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \
+ PIN_MODE_INPUT(GPIOE_PIN1) | \
+ PIN_MODE_INPUT(GPIOE_PIN2) | \
+ PIN_MODE_INPUT(GPIOE_PIN3) | \
+ PIN_MODE_INPUT(GPIOE_PIN4) | \
+ PIN_MODE_INPUT(GPIOE_PIN5) | \
+ PIN_MODE_INPUT(GPIOE_PIN6) | \
+ PIN_MODE_INPUT(GPIOE_PIN7) | \
+ PIN_MODE_INPUT(GPIOE_PIN8) | \
+ PIN_MODE_INPUT(GPIOE_PIN9) | \
+ PIN_MODE_INPUT(GPIOE_PIN10) | \
+ PIN_MODE_INPUT(GPIOE_PIN11) | \
+ PIN_MODE_INPUT(GPIOE_PIN12) | \
+ PIN_MODE_INPUT(GPIOE_PIN13) | \
+ PIN_MODE_INPUT(GPIOE_PIN14) | \
+ PIN_MODE_INPUT(GPIOE_PIN15))
+#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOE_PIN15))
+#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOE_PIN15))
+#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN1) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOE_PIN15))
+#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \
+ PIN_ODR_HIGH(GPIOE_PIN1) | \
+ PIN_ODR_HIGH(GPIOE_PIN2) | \
+ PIN_ODR_HIGH(GPIOE_PIN3) | \
+ PIN_ODR_HIGH(GPIOE_PIN4) | \
+ PIN_ODR_HIGH(GPIOE_PIN5) | \
+ PIN_ODR_HIGH(GPIOE_PIN6) | \
+ PIN_ODR_HIGH(GPIOE_PIN7) | \
+ PIN_ODR_HIGH(GPIOE_PIN8) | \
+ PIN_ODR_HIGH(GPIOE_PIN9) | \
+ PIN_ODR_HIGH(GPIOE_PIN10) | \
+ PIN_ODR_HIGH(GPIOE_PIN11) | \
+ PIN_ODR_HIGH(GPIOE_PIN12) | \
+ PIN_ODR_HIGH(GPIOE_PIN13) | \
+ PIN_ODR_HIGH(GPIOE_PIN14) | \
+ PIN_ODR_HIGH(GPIOE_PIN15))
+#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN1, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN7, 0U))
+#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOE_PIN15, 0U))
+
+/*
+ * GPIOF setup:
+ *
+ * PF0 - OSC_IN (input floating).
+ * PF1 - OSC_OUT (input floating).
+ * PF2 - PIN2 (input pullup).
+ * PF3 - PIN3 (input pullup).
+ * PF4 - PIN4 (input pullup).
+ * PF5 - PIN5 (input pullup).
+ * PF6 - PIN6 (input pullup).
+ * PF7 - PIN7 (input pullup).
+ * PF8 - PIN8 (input pullup).
+ * PF9 - PIN9 (input pullup).
+ * PF10 - PIN10 (input pullup).
+ * PF11 - PIN11 (input pullup).
+ * PF12 - PIN12 (input pullup).
+ * PF13 - PIN13 (input pullup).
+ * PF14 - PIN14 (input pullup).
+ * PF15 - PIN15 (input pullup).
+ */
+#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \
+ PIN_MODE_INPUT(GPIOF_OSC_OUT) | \
+ PIN_MODE_INPUT(GPIOF_PIN2) | \
+ PIN_MODE_INPUT(GPIOF_PIN3) | \
+ PIN_MODE_INPUT(GPIOF_PIN4) | \
+ PIN_MODE_INPUT(GPIOF_PIN5) | \
+ PIN_MODE_INPUT(GPIOF_PIN6) | \
+ PIN_MODE_INPUT(GPIOF_PIN7) | \
+ PIN_MODE_INPUT(GPIOF_PIN8) | \
+ PIN_MODE_INPUT(GPIOF_PIN9) | \
+ PIN_MODE_INPUT(GPIOF_PIN10) | \
+ PIN_MODE_INPUT(GPIOF_PIN11) | \
+ PIN_MODE_INPUT(GPIOF_PIN12) | \
+ PIN_MODE_INPUT(GPIOF_PIN13) | \
+ PIN_MODE_INPUT(GPIOF_PIN14) | \
+ PIN_MODE_INPUT(GPIOF_PIN15))
+#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \
+ PIN_OTYPE_PUSHPULL(GPIOF_PIN15))
+#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \
+ PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \
+ PIN_OSPEED_VERYLOW(GPIOF_PIN15))
+#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \
+ PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN2) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN3) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN4) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN5) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN6) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN7) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN8) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN9) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN10) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN11) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN12) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN13) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN14) | \
+ PIN_PUPDR_PULLUP(GPIOF_PIN15))
+#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \
+ PIN_ODR_HIGH(GPIOF_OSC_OUT) | \
+ PIN_ODR_HIGH(GPIOF_PIN2) | \
+ PIN_ODR_HIGH(GPIOF_PIN3) | \
+ PIN_ODR_HIGH(GPIOF_PIN4) | \
+ PIN_ODR_HIGH(GPIOF_PIN5) | \
+ PIN_ODR_HIGH(GPIOF_PIN6) | \
+ PIN_ODR_HIGH(GPIOF_PIN7) | \
+ PIN_ODR_HIGH(GPIOF_PIN8) | \
+ PIN_ODR_HIGH(GPIOF_PIN9) | \
+ PIN_ODR_HIGH(GPIOF_PIN10) | \
+ PIN_ODR_HIGH(GPIOF_PIN11) | \
+ PIN_ODR_HIGH(GPIOF_PIN12) | \
+ PIN_ODR_HIGH(GPIOF_PIN13) | \
+ PIN_ODR_HIGH(GPIOF_PIN14) | \
+ PIN_ODR_HIGH(GPIOF_PIN15))
+#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \
+ PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN2, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN3, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN4, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN5, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN6, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN7, 0U))
+#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN9, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN10, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN11, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN12, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN13, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN14, 0U) | \
+ PIN_AFIO_AF(GPIOF_PIN15, 0U))
+
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* BOARD_H */
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk
new file mode 100644
index 000000000000..b98dcdd26c6a
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY
diff --git a/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
new file mode 100644
index 000000000000..9c7cf4fd76a3
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg
@@ -0,0 +1,703 @@
+
+
+
+
+ resources/gencfg/processors/boards/stm32f0xx/templates
+ ..
+ 3.0.x
+
+ ST STM32F072B-Discovery
+ ST_STM32F072B_DISCOVERY
+
+ STM32F072xB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/keyboards/cannonkeys/instant60/bootloader_defs.h b/keyboards/cannonkeys/instant60/bootloader_defs.h
new file mode 100644
index 000000000000..02c48c4e6dcb
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/bootloader_defs.h
@@ -0,0 +1,7 @@
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up here (page 175):
+ * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+ * This also requires a patch to chibios:
+ * /tmk_core/tool/chibios/ch-bootloader-jump.patch
+ */
+#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800
diff --git a/keyboards/cannonkeys/instant60/chconf.h b/keyboards/cannonkeys/instant60/chconf.h
new file mode 100644
index 000000000000..99fa8ce39822
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/chconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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/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_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#define CH_CFG_ST_RESOLUTION 32
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+#define CH_CFG_ST_FREQUENCY 10000
+
+/**
+ * @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.
+ */
+#define CH_CFG_ST_TIMEDELTA 2
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_TIME_QUANTUM 0
+
+/**
+ * @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.
+ */
+#define CH_CFG_MEMCORE_SIZE 0
+
+/**
+ * @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.
+ */
+#define CH_CFG_NO_IDLE_THREAD FALSE
+
+/* Use __WFI in the idle thread for waiting. Does lower the power
+ * consumption. */
+#define CORTEX_ENABLE_WFI_IDLE TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_OPTIMIZE_SPEED FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_USE_TM FALSE
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_REGISTRY TRUE
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_WAITEXIT TRUE
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_SEMAPHORES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MUTEXES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_CONDVARS TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_EVENTS TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MESSAGES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MAILBOXES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MEMCORE FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_HEAP FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MEMPOOLS FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_DYNAMIC FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_STATISTICS FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_ENABLE_CHECKS FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_ENABLE_ASSERTS FALSE
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+
+/**
+ * @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.
+ */
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @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.
+ */
+#define CH_DBG_ENABLE_STACK_CHECK FALSE
+
+/**
+ * @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.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_FILL_THREADS FALSE
+
+/**
+ * @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.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+#define CH_DBG_THREADS_PROFILING FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @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 chThdInit() API.
+ *
+ * @note It is invoked from within @p chThdInit() 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.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/cannonkeys/instant60/config.h b/keyboards/cannonkeys/instant60/config.h
new file mode 100644
index 000000000000..095384fb9ebc
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/config.h
@@ -0,0 +1,98 @@
+/*
+Copyright 2015 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 .
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xCA04
+#define PRODUCT_ID 0x1600
+#define DEVICE_VER 0x0001
+/* in python2: list(u"whatever".encode('utf-16-le')) */
+/* at most 32 characters or the ugly hack in usb_main.c borks */
+#define MANUFACTURER CannonKeys
+#define PRODUCT Instant60
+#define DESCRIPTION Instant 60 Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 15
+
+#define MATRIX_COL_PINS { B2, B10, B11, A9, A15, B3, B4, B5, B6, B7, B8, B9, C13, C14, C15 }
+#define MATRIX_ROW_PINS { B1, B0, A7, A5, A4 }
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_LEVELS 6
+#define BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 6
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* 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 RGBLIGHT_ANIMATIONS
+
+#define WS2812_LED_N 14
+#define RGBLED_NUM WS2812_LED_N
+#define PORT_WS2812 GPIOB
+#define PIN_WS2812 15
+#define WS2812_SPI SPID2
+
+
+// EEPROM usage
+// TODO: refactor with new user EEPROM code (coming soon)
+#define EEPROM_MAGIC 0x451F
+#define EEPROM_MAGIC_ADDR 32
+// Bump this every time we change what we store
+// This will automatically reset the EEPROM with defaults
+// and avoid loading invalid data from the EEPROM
+#define EEPROM_VERSION 0x02
+#define EEPROM_VERSION_ADDR 34
+
+
+#define DYNAMIC_KEYMAP_LAYER_COUNT 4
+// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) = 635
+// start + layer * rows * col * 2
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
+#define EEPROM_CUSTOM_BACKLIGHT 636
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 637
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 200
+#define DYNAMIC_KEYMAP_MACRO_COUNT 16
+
+/*
+ * 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/cannonkeys/instant60/halconf.h b/keyboards/cannonkeys/instant60/halconf.h
new file mode 100644
index 000000000000..38743e0904fd
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/halconf.h
@@ -0,0 +1,354 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef _HALCONF_H_
+#define _HALCONF_H_
+
+#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 DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
+#endif
+
+/**
+ * @brief Enables the EXT subsystem.
+ */
+#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
+#define HAL_USE_EXT 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 TRUE
+#endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC FALSE
+#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 SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART FALSE
+#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
+
+/*===========================================================================*/
+/* 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
+
+/*===========================================================================*/
+/* 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 an event sources for incoming packets.
+ */
+#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
+
+/*===========================================================================*/
+/* 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 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE 16
+#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 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_SIZE 1
+#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 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
+
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @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
+
+#endif /* _HALCONF_H_ */
+
+/** @} */
diff --git a/keyboards/cannonkeys/instant60/info.json b/keyboards/cannonkeys/instant60/info.json
new file mode 100644
index 000000000000..73a64b8b3282
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/info.json
@@ -0,0 +1,15 @@
+{
+ "keyboard_name": "Instant60",
+ "url": "https://cannonkeys.com",
+ "maintainer": "awkannan",
+ "width": 15,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_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_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}, {"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":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}]
+ }
+ }
+}
diff --git a/keyboards/cannonkeys/instant60/instant60.c b/keyboards/cannonkeys/instant60/instant60.c
new file mode 100644
index 000000000000..25b7099b0b1a
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/instant60.c
@@ -0,0 +1 @@
+#include "instant60.h"
diff --git a/keyboards/cannonkeys/instant60/instant60.h b/keyboards/cannonkeys/instant60/instant60.h
new file mode 100644
index 000000000000..67d5ba98fe21
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/instant60.h
@@ -0,0 +1,47 @@
+#pragma once
+
+#include "quantum.h"
+
+#define KNO KC_NO
+
+#define LAYOUT_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, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, \
+ K40, K41, K42, K45, K49, K4A, K4B, K4E \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, KNO}, \
+ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, KNO }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \
+}
+
+#define LAYOUT_tsangan( \
+ 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, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\
+ K40, K41, K42, K45, K49, K4B, 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, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, KNO, K4B, KNO, KNO, K4E } \
+}
+
+#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, K1E, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2E, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3E,\
+ K40, K41, K42, K45, K49, K4A, K4B, 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, KNO, K1E }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KNO, KNO, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KNO, KNO, K3E }, \
+ { K40, K41, K42, KNO, KNO, K45, KNO, KNO, KNO, K49, K4A, K4B, KNO, KNO, K4E } \
+}
diff --git a/keyboards/cannonkeys/instant60/keymaps/default/keymap.c b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c
new file mode 100644
index 000000000000..7753181a4893
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/default/keymap.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2012,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 QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// 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 _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_ansi(
+ 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_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(_FN1), KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_ansi(
+ KC_GESC, 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, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_GRV, _______, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c
new file mode 100644
index 000000000000..c16c506301f2
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/tsangan/keymap.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2012,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 QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// 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 _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_tsangan(
+ 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_BSLS, 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_BSPC, \
+ 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, MO(_FN1),\
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_tsangan(
+ 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, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ _______, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/keymaps/via/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c
new file mode 100644
index 000000000000..9be7d187e456
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/via/keymap.c
@@ -0,0 +1,43 @@
+/*
+Copyright 2012,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 QMK_KEYBOARD_H
+
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// 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 _BASE 0
+#define _FN1 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_all(
+ 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_BSLS, 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_BSPC,
+ 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, MO(_FN1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL
+ ),
+
+ [_FN1] = 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_DEL, _______,
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/keymaps/via/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk
new file mode 100644
index 000000000000..d12497792d56
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/via/rules.mk
@@ -0,0 +1,5 @@
+# rules.mk overrides to enable VIA
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
+
diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c
new file mode 100644
index 000000000000..b182ac5f4f0e
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/keymap.c
@@ -0,0 +1,43 @@
+/*
+Copyright 2012,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 QMK_KEYBOARD_H
+
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// 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 _BASE 0
+#define _FN1 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_all(
+ 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_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_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, MO(_FN1),
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL
+ ),
+
+ [_FN1] = 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_DEL, _______,
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, RESET
+ )
+};
diff --git a/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk
new file mode 100644
index 000000000000..d12497792d56
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/keymaps/via_standard/rules.mk
@@ -0,0 +1,5 @@
+# rules.mk overrides to enable VIA
+
+RAW_ENABLE = yes
+DYNAMIC_KEYMAP_ENABLE = yes
+
diff --git a/keyboards/cannonkeys/instant60/mcuconf.h b/keyboards/cannonkeys/instant60/mcuconf.h
new file mode 100644
index 000000000000..048eb4df650d
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/mcuconf.h
@@ -0,0 +1,176 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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_
+
+/*
+ * STM32F0xx 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:
+ * 3...0 Lowest...Highest.
+ *
+ * DMA priorities:
+ * 0...3 Lowest...Highest.
+ */
+
+#define STM32F0xx_MCUCONF
+// #define STM32F070xB
+
+/*
+ * HAL driver system settings.
+ */
+#define STM32_NO_INIT FALSE
+#define STM32_PVD_ENABLE FALSE
+#define STM32_PLS STM32_PLS_LEV0
+#define STM32_HSI_ENABLED TRUE
+#define STM32_HSI14_ENABLED TRUE
+#define STM32_HSI48_ENABLED FALSE
+#define STM32_LSI_ENABLED TRUE
+#define STM32_HSE_ENABLED FALSE
+#define STM32_LSE_ENABLED FALSE
+#define STM32_SW STM32_SW_PLL
+#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2
+#define STM32_PREDIV_VALUE 1
+#define STM32_PLLMUL_VALUE 12
+#define STM32_HPRE STM32_HPRE_DIV1
+#define STM32_PPRE STM32_PPRE_DIV1
+#define STM32_ADCSW STM32_ADCSW_HSI14
+#define STM32_ADCPRE STM32_ADCPRE_DIV4
+#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK
+#define STM32_ADCPRE STM32_ADCPRE_DIV4
+#define STM32_ADCSW STM32_ADCSW_HSI14
+#define STM32_USBSW STM32_USBSW_HSI48
+#define STM32_CECSW STM32_CECSW_HSI
+#define STM32_I2C1SW STM32_I2C1SW_HSI
+#define STM32_USART1SW STM32_USART1SW_PCLK
+#define STM32_RTCSEL STM32_RTCSEL_LSI
+
+/*
+ * ADC driver system settings.
+ */
+#define STM32_ADC_USE_ADC1 FALSE
+#define STM32_ADC_ADC1_DMA_PRIORITY 2
+#define STM32_ADC_IRQ_PRIORITY 2
+#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2
+
+/*
+ * EXT driver system settings.
+ */
+#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI16_IRQ_PRIORITY 3
+#define STM32_EXT_EXTI17_IRQ_PRIORITY 3
+
+/*
+ * 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_TIM14 FALSE
+#define STM32_GPT_TIM1_IRQ_PRIORITY 2
+#define STM32_GPT_TIM2_IRQ_PRIORITY 2
+#define STM32_GPT_TIM3_IRQ_PRIORITY 2
+#define STM32_GPT_TIM14_IRQ_PRIORITY 2
+
+/*
+ * I2C driver system settings.
+ */
+#define STM32_I2C_USE_I2C1 TRUE
+#define STM32_I2C_USE_I2C2 FALSE
+#define STM32_I2C_BUSY_TIMEOUT 50
+#define STM32_I2C_I2C1_IRQ_PRIORITY 3
+#define STM32_I2C_I2C2_IRQ_PRIORITY 3
+#define STM32_I2C_USE_DMA TRUE
+#define STM32_I2C_I2C1_DMA_PRIORITY 1
+#define STM32_I2C_I2C2_DMA_PRIORITY 1
+#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
+#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6)
+#define STM32_I2C_DMA_ERROR_HOOK(i2cp) 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_TIM1_IRQ_PRIORITY 3
+#define STM32_ICU_TIM2_IRQ_PRIORITY 3
+#define STM32_ICU_TIM3_IRQ_PRIORITY 3
+
+/*
+ * 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 TRUE
+#define STM32_PWM_TIM1_IRQ_PRIORITY 3
+#define STM32_PWM_TIM2_IRQ_PRIORITY 3
+#define STM32_PWM_TIM3_IRQ_PRIORITY 3
+
+/*
+ * SERIAL driver system settings.
+ */
+#define STM32_SERIAL_USE_USART1 FALSE
+#define STM32_SERIAL_USE_USART2 FALSE
+#define STM32_SERIAL_USART1_PRIORITY 3
+#define STM32_SERIAL_USART2_PRIORITY 3
+
+/*
+ * SPI driver system settings.
+ */
+#define STM32_SPI_USE_SPI1 FALSE
+#define STM32_SPI_USE_SPI2 TRUE
+#define STM32_SPI_SPI1_DMA_PRIORITY 1
+#define STM32_SPI_SPI2_DMA_PRIORITY 1
+#define STM32_SPI_SPI1_IRQ_PRIORITY 2
+#define STM32_SPI_SPI2_IRQ_PRIORITY 2
+#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4)
+#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
+#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure")
+
+/*
+ * ST driver system settings.
+ */
+#define STM32_ST_IRQ_PRIORITY 2
+#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_USART1_IRQ_PRIORITY 3
+#define STM32_UART_USART2_IRQ_PRIORITY 3
+#define STM32_UART_USART1_DMA_PRIORITY 0
+#define STM32_UART_USART2_DMA_PRIORITY 0
+#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure")
+
+/*
+ * USB driver system settings.
+ */
+#define STM32_USB_USE_USB1 TRUE
+#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE
+#define STM32_USB_USB1_LP_IRQ_PRIORITY 3
+
+#endif /* _MCUCONF_H_ */
diff --git a/keyboards/cannonkeys/instant60/readme.md b/keyboards/cannonkeys/instant60/readme.md
new file mode 100644
index 000000000000..9cd91e9516ee
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/readme.md
@@ -0,0 +1,12 @@
+# Instant60
+
+Instant60 Keyboard
+
+Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1)
+Hardware Supported: STM32F072CBT6
+
+Make example for this keyboard (after setting up your build environment):
+
+ make cannonkeys/instant60: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/cannonkeys/instant60/rules.mk b/keyboards/cannonkeys/instant60/rules.mk
new file mode 100644
index 000000000000..cd366c76aa7c
--- /dev/null
+++ b/keyboards/cannonkeys/instant60/rules.mk
@@ -0,0 +1,56 @@
+# project specific files
+# SRC = ssd1306.c
+## 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/ports/ARMCMx/compilers/GCC/ld/
+# or /ld/
+MCU_LDSCRIPT = STM32F072xB
+# startup code to use
+# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/
+MCU_STARTUP = stm32f0xx
+# it should exist either in /os/hal/boards/
+# or /boards
+BOARD = ST_STM32F072B_DISCOVERY
+# Cortex version
+# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4
+MCU = cortex-m0
+# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7
+ARMV = 6
+# If you want to be able to jump to bootloader from firmware on STM32 MCUs,
+# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in
+# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have
+# a custom board definition that you plan to reuse).
+# If you're not setting it here, leave it commented out.
+# It is chip dependent, the correct number can be looked up here (page 175):
+# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+# This also requires a patch to chibios:
+# /tmk_core/tool/chibios/ch-bootloader-jump.patch
+#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800
+
+# Build Options
+# comment out to disable the options.
+#
+
+# project specific files
+VPATH += keyboards/cannonkeys/stm32f072
+SRC = keyboard.c \
+ led.c
+
+#BOOTMAGIC_ENABLE = yes # 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
+SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover
+CUSTOM_MATRIX = no # Custom matrix file
+# BACKLIGHT_ENABLE = yes # This is broken on 072 for some reason
+RGBLIGHT_ENABLE = yes
+
+# RAW_ENABLE = yes
+# DYNAMIC_KEYMAP_ENABLE = yes
+
diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c
new file mode 100644
index 000000000000..8c5a87f35f8b
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.c
@@ -0,0 +1,56 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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.
+*/
+
+#include "hal.h"
+
+// Value to place in RTC backup register 10 for persistent bootloader mode
+#define RTC_BOOTLOADER_FLAG 0x424C
+
+/**
+ * @brief PAL setup.
+ * @details Digital I/O ports static configuration as defined in @p board.h.
+ * This variable is used by the HAL when initializing the PAL driver.
+ */
+#if HAL_USE_PAL || defined(__DOXYGEN__)
+const PALConfig pal_default_config =
+{
+ {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH},
+ {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH},
+ {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH},
+ {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH},
+ {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH},
+};
+#endif
+
+/*
+ * Early initialization code.
+ * This initialization must be performed just after stack setup and before
+ * any other initialization.
+ */
+void __early_init(void) {
+
+ stm32_clock_init();
+}
+
+/*
+ * Board-specific initialization code.
+ */
+void boardInit(void) {
+ //JTAG-DP Disabled and SW-DP Enabled
+ AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE;
+ //Set backup register DR10 to enter bootloader on reset
+ BKP->DR10 = RTC_BOOTLOADER_FLAG;
+}
diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h
new file mode 100644
index 000000000000..9427adabf11d
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.h
@@ -0,0 +1,166 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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 _BOARD_H_
+#define _BOARD_H_
+
+/*
+ * Setup for a Generic STM32F103 board.
+ */
+
+/*
+ * Board identifier.
+ */
+#define BOARD_GENERIC_STM32_F103
+#define BOARD_NAME "Generic STM32F103x board"
+
+/*
+ * Board frequencies.
+ */
+#define STM32_LSECLK 32768
+#define STM32_HSECLK 8000000
+
+/*
+ * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h.
+ */
+#define STM32F103xB
+
+/*
+ * IO pins assignments
+ */
+
+/* on-board */
+
+#define GPIOA_LED 8
+#define GPIOD_OSC_IN 0
+#define GPIOD_OSC_OUT 1
+
+/* In case your board has a "USB enable" hardware
+ controlled by a pin, define it here. (It could be just
+ a 1.5k resistor connected to D+ line.)
+*/
+/*
+#define GPIOB_USB_DISC 10
+*/
+
+/*
+ * I/O ports initial setup, this configuration is established soon after reset
+ * in the initialization code.
+ *
+ * The digits have the following meaning:
+ * 0 - Analog input.
+ * 1 - Push Pull output 10MHz.
+ * 2 - Push Pull output 2MHz.
+ * 3 - Push Pull output 50MHz.
+ * 4 - Digital input.
+ * 5 - Open Drain output 10MHz.
+ * 6 - Open Drain output 2MHz.
+ * 7 - Open Drain output 50MHz.
+ * 8 - Digital input with PullUp or PullDown resistor depending on ODR.
+ * 9 - Alternate Push Pull output 10MHz.
+ * A - Alternate Push Pull output 2MHz.
+ * B - Alternate Push Pull output 50MHz.
+ * C - Reserved.
+ * D - Alternate Open Drain output 10MHz.
+ * E - Alternate Open Drain output 2MHz.
+ * F - Alternate Open Drain output 50MHz.
+ * Please refer to the STM32 Reference Manual for details.
+ */
+
+/*
+ * Port A setup.
+ * Everything input with pull-up except:
+ * PA2 - Alternate output (USART2 TX).
+ * PA3 - Normal input (USART2 RX).
+ * PA9 - Alternate output (USART1 TX).
+ * PA10 - Normal input (USART1 RX).
+ */
+#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */
+#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */
+#define VAL_GPIOAODR 0xFFFFFFFF
+
+/*
+ * Port B setup.
+ * Everything input with pull-up except:
+ * PB10 - Push Pull output (USB switch).
+ */
+#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */
+#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */
+#define VAL_GPIOBODR 0xFFFFFFFF
+
+/*
+ * Port C setup.
+ * Everything input with pull-up except:
+ * PC13 - Push Pull output (LED).
+ */
+#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */
+#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */
+#define VAL_GPIOCODR 0xFFFFFFFF
+
+/*
+ * Port D setup.
+ * Everything input with pull-up except:
+ * PD0 - Normal input (XTAL).
+ * PD1 - Normal input (XTAL).
+ */
+#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */
+#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */
+#define VAL_GPIODODR 0xFFFFFFFF
+
+/*
+ * Port E setup.
+ * Everything input with pull-up except:
+ */
+#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */
+#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */
+#define VAL_GPIOEODR 0xFFFFFFFF
+
+/*
+ * USB bus activation macro, required by the USB driver.
+ */
+/* The point is that most of the generic STM32F103* boards
+ have a 1.5k resistor connected on one end to the D+ line
+ and on the other end to some pin. Or even a slightly more
+ complicated "USB enable" circuit, controlled by a pin.
+ That should go here.
+
+ However on some boards (e.g. one that I have), there's no
+ such hardware. In which case it's better to not do anything.
+*/
+/*
+#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC)
+*/
+#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT);
+
+/*
+ * USB bus de-activation macro, required by the USB driver.
+ */
+/*
+#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC)
+*/
+#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12);
+
+#if !defined(_FROM_ASM_)
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void boardInit(void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* _FROM_ASM_ */
+
+#endif /* _BOARD_H_ */
diff --git a/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk
new file mode 100644
index 000000000000..6b8b312fd9fd
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/boards/GENERIC_STM32_F103/board.mk
@@ -0,0 +1,5 @@
+# List of all the board related files.
+BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c
+
+# Required include directories
+BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103
diff --git a/keyboards/cannonkeys/practice65/bootloader_defs.h b/keyboards/cannonkeys/practice65/bootloader_defs.h
new file mode 100644
index 000000000000..6b8fa9f727c9
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/bootloader_defs.h
@@ -0,0 +1,10 @@
+/* Address for jumping to bootloader on STM32 chips. */
+/* It is chip dependent, the correct number can be looked up here (page 175):
+ * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf
+ * This also requires a patch to chibios:
+ * /tmk_core/tool/chibios/ch-bootloader-jump.patch
+ */
+
+// STM32F103* does NOT have an USB bootloader in ROM (only serial),
+// so setting anything here does not make much sense
+#define STM32_BOOTLOADER_ADDRESS 0x80000000
diff --git a/keyboards/cannonkeys/practice65/chconf.h b/keyboards/cannonkeys/practice65/chconf.h
new file mode 100644
index 000000000000..bbd9b2da62d2
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/chconf.h
@@ -0,0 +1,524 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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/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_
+
+/*===========================================================================*/
+/**
+ * @name System timers settings
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief System time counter resolution.
+ * @note Allowed values are 16 or 32 bits.
+ */
+#define CH_CFG_ST_RESOLUTION 32
+
+/**
+ * @brief System tick frequency.
+ * @details Frequency of the system timer that drives the system ticks. This
+ * setting also defines the system tick time unit.
+ */
+#define CH_CFG_ST_FREQUENCY 100000
+
+/**
+ * @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.
+ */
+#define CH_CFG_ST_TIMEDELTA 0
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_TIME_QUANTUM 0
+
+/**
+ * @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.
+ */
+#define CH_CFG_MEMCORE_SIZE 0
+
+/**
+ * @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.
+ */
+#define CH_CFG_NO_IDLE_THREAD FALSE
+
+/* Use __WFI in the idle thread for waiting. Does lower the power
+ * consumption. */
+#define CORTEX_ENABLE_WFI_IDLE TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_OPTIMIZE_SPEED TRUE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @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.
+ */
+#define CH_CFG_USE_TM FALSE
+
+/**
+ * @brief Threads registry APIs.
+ * @details If enabled then the registry APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_REGISTRY TRUE
+
+/**
+ * @brief Threads synchronization APIs.
+ * @details If enabled then the @p chThdWait() function is included in
+ * the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_WAITEXIT TRUE
+
+/**
+ * @brief Semaphores APIs.
+ * @details If enabled then the Semaphores APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_SEMAPHORES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
+
+/**
+ * @brief Mutexes APIs.
+ * @details If enabled then the mutexes APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MUTEXES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_CONDVARS TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
+
+/**
+ * @brief Events Flags APIs.
+ * @details If enabled then the event flags APIs are included in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_EVENTS TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
+
+/**
+ * @brief Synchronous Messages APIs.
+ * @details If enabled then the synchronous messages APIs are included
+ * in the kernel.
+ *
+ * @note The default is @p TRUE.
+ */
+#define CH_CFG_USE_MESSAGES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MAILBOXES TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MEMCORE TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_HEAP TRUE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_MEMPOOLS FALSE
+
+/**
+ * @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.
+ */
+#define CH_CFG_USE_DYNAMIC FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Debug options
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @brief Debug option, kernel statistics.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_STATISTICS FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_SYSTEM_STATE_CHECK FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_ENABLE_CHECKS FALSE
+
+/**
+ * @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.
+ */
+#define CH_DBG_ENABLE_ASSERTS FALSE
+
+/**
+ * @brief Debug option, trace buffer.
+ * @details If enabled then the trace buffer is activated.
+ *
+ * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
+ */
+#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
+
+/**
+ * @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.
+ */
+#define CH_DBG_TRACE_BUFFER_SIZE 128
+
+/**
+ * @brief Debug option, stack checks.
+ * @details If enabled then a runtime stack check is performed.
+ *
+ * @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.
+ */
+#define CH_DBG_ENABLE_STACK_CHECK FALSE
+
+/**
+ * @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.
+ *
+ * @note The default is @p FALSE.
+ */
+#define CH_DBG_FILL_THREADS FALSE
+
+/**
+ * @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.
+ *
+ * @note The default is @p FALSE.
+ * @note This debug option is not currently compatible with the
+ * tickless mode.
+ */
+#define CH_DBG_THREADS_PROFILING FALSE
+
+/** @} */
+
+/*===========================================================================*/
+/**
+ * @name Kernel hooks
+ * @{
+ */
+/*===========================================================================*/
+
+/**
+ * @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 chThdInit() API.
+ *
+ * @note It is invoked from within @p chThdInit() 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.
+ */
+#define CH_CFG_TRACE_HOOK(tep) { \
+ /* Trace code here.*/ \
+}
+
+/** @} */
+
+/*===========================================================================*/
+/* Port-specific settings (override port settings defaulted in chcore.h). */
+/*===========================================================================*/
+
+#endif /* CHCONF_H */
+
+/** @} */
diff --git a/keyboards/cannonkeys/practice65/config.h b/keyboards/cannonkeys/practice65/config.h
new file mode 100644
index 000000000000..d09b521bfabf
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/config.h
@@ -0,0 +1,78 @@
+/*
+Copyright 2015 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 .
+*/
+
+#pragma once
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xCA04
+#define PRODUCT_ID 0x6565
+#define DEVICE_VER 0x0001
+/* in python2: list(u"whatever".encode('utf-16-le')) */
+/* at most 32 characters or the ugly hack in usb_main.c borks */
+#define MANUFACTURER CannonKeys
+#define PRODUCT Practice 65
+#define DESCRIPTION Practice 65
+
+/* key matrix size */
+#define MATRIX_ROWS 5
+#define MATRIX_COLS 16
+
+#define MATRIX_COL_PINS { B8, B0, A0, B5, B10, B9, A6, B12, A7, A5, A4, A3, A2, A1, B13, B14 }
+#define MATRIX_ROW_PINS { B4, B11, B1, B7, B6 }
+#define DIODE_DIRECTION COL2ROW
+
+#define BACKLIGHT_LEVELS 6
+#define BACKLIGHT_BREATHING
+#define BREATHING_PERIOD 6
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* 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 RGBLIGHT_ANIMATIONS
+
+#define WS2812_LED_N 20
+#define RGBLED_NUM WS2812_LED_N
+#define PORT_WS2812 GPIOB
+#define PIN_WS2812 15
+#define WS2812_SPI SPID2
+
+
+/*
+ * 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/cannonkeys/practice65/halconf.h b/keyboards/cannonkeys/practice65/halconf.h
new file mode 100644
index 000000000000..72879a575b9c
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/halconf.h
@@ -0,0 +1,353 @@
+/*
+ ChibiOS - Copyright (C) 2006..2015 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.
+ *
+ * @addtogroup HAL_CONF
+ * @{
+ */
+
+#ifndef _HALCONF_H_
+#define _HALCONF_H_
+
+#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 DAC subsystem.
+ */
+#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
+#define HAL_USE_DAC FALSE
+#endif
+
+/**
+ * @brief Enables the EXT subsystem.
+ */
+#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__)
+#define HAL_USE_EXT 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 FALSE
+#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 TRUE
+#endif
+
+/**
+ * @brief Enables the RTC subsystem.
+ */
+#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
+#define HAL_USE_RTC FALSE
+#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 SPI subsystem.
+ */
+#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
+#define HAL_USE_SPI TRUE
+#endif
+
+/**
+ * @brief Enables the UART subsystem.
+ */
+#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
+#define HAL_USE_UART FALSE
+#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
+
+/*===========================================================================*/
+/* 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
+
+/*===========================================================================*/
+/* 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 an event sources for incoming packets.
+ */
+#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
+
+/*===========================================================================*/
+/* 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 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_BUFFERS_SIZE 16
+#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 64 bytes for both the transmission and receive
+ * buffers.
+ */
+#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
+#define SERIAL_USB_BUFFERS_SIZE 1
+#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 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
+
+/*===========================================================================*/
+/* USB driver related settings. */
+/*===========================================================================*/
+
+/**
+ * @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
+
+#endif /* _HALCONF_H_ */
+
+/** @} */
diff --git a/keyboards/cannonkeys/practice65/info.json b/keyboards/cannonkeys/practice65/info.json
new file mode 100644
index 000000000000..6c448fda205a
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/info.json
@@ -0,0 +1,12 @@
+{
+ "keyboard_name": "Practice65",
+ "url": "https://cannonkeys.com",
+ "maintainer": "awkannan",
+ "width": 16,
+ "height": 5,
+ "layouts": {
+ "LAYOUT_default": {
+ "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}, {"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}, {"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}, {"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}, {"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":6.25}, {"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/cannonkeys/practice65/keymaps/default/keymap.c b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c
new file mode 100644
index 000000000000..fdc06e398579
--- /dev/null
+++ b/keyboards/cannonkeys/practice65/keymaps/default/keymap.c
@@ -0,0 +1,48 @@
+/*
+Copyright 2012,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