Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12568fb5a9 | ||
|
|
824e1cd95d | ||
|
|
2573ed8c6b | ||
|
|
25d9cdc88f | ||
|
|
962b8d3814 | ||
|
|
122cf3ad0f | ||
|
|
5edfdeff50 | ||
|
|
221d8fd866 | ||
|
|
3300164065 | ||
|
|
55843480ff | ||
|
|
5fde2d730c | ||
|
|
1b7b72c0e9 | ||
|
|
bbf0f65284 | ||
|
|
1d1d5da43f | ||
|
|
48f4768d33 | ||
|
|
53eb7f0774 | ||
|
|
5544bf8524 | ||
|
|
7ca4b61922 | ||
|
|
b7f640ca76 | ||
|
|
436b5394bb | ||
|
|
cd0d2d0de5 | ||
|
|
6a292e11d3 | ||
|
|
3e3f93c971 | ||
|
|
9136c122f8 | ||
|
|
cc4b93b330 | ||
|
|
d40d1e4024 | ||
|
|
b2ab0af905 | ||
|
|
d898d4a6fc | ||
|
|
7c0cb18681 | ||
|
|
e52b4797d3 | ||
|
|
498d89f4b3 | ||
|
|
d5f3f7c126 | ||
|
|
e9ed5d7571 | ||
|
|
806aa9bc67 | ||
|
|
dc7081a823 | ||
|
|
fd177582ad | ||
|
|
dee506c096 | ||
|
|
78b2f120e5 | ||
|
|
ce7d3855f4 | ||
|
|
4eebefada7 | ||
|
|
71b52416d8 | ||
|
|
bf324c38e3 | ||
|
|
f40b564683 | ||
|
|
2843e7f995 | ||
|
|
54e2bf3ede | ||
|
|
9453573080 | ||
|
|
c0dcee96a8 | ||
|
|
4e0718a3b7 | ||
|
|
a380a26ad2 | ||
|
|
e3211e307e | ||
|
|
0239ce025a | ||
|
|
13bbeefc5a | ||
|
|
63362a9c5e | ||
|
|
25b1367806 | ||
|
|
624cafbfd2 | ||
|
|
5619b1d3db | ||
|
|
bded5f473c | ||
|
|
6890090fbb | ||
|
|
03cbee8637 | ||
|
|
a9f7d4dccc | ||
|
|
6ea4b06f9f | ||
|
|
d9dcb716bf | ||
|
|
8346151fe0 | ||
|
|
dc4c80eef4 | ||
|
|
c4aae0e93b | ||
|
|
49b6c5fd83 | ||
|
|
7938921f9e | ||
|
|
58107ebedf | ||
|
|
d82ab56a14 | ||
|
|
14024fabeb | ||
|
|
d60031b321 | ||
|
|
c807695035 | ||
|
|
11669bb45b | ||
|
|
3295ac90ee | ||
|
|
0d42d7b87b | ||
|
|
9366ed7282 | ||
|
|
37fb14f1b5 | ||
|
|
3925ff5342 | ||
|
|
0831a3181a | ||
|
|
ac8cddda22 | ||
|
|
e6217b6aa6 | ||
|
|
795e82074d | ||
|
|
70f40339c2 | ||
|
|
10e4487ba3 | ||
|
|
8ea7f4f45f | ||
|
|
4b03b6f7f4 | ||
|
|
1ebd243cdc | ||
|
|
b185816717 | ||
|
|
501f2fdef1 | ||
|
|
5b5d74a267 | ||
|
|
6c4b6531fe | ||
|
|
82bb47a2f1 | ||
|
|
9517d90e84 | ||
|
|
79d992d1e7 | ||
|
|
cd67074f72 | ||
|
|
01c7108db5 | ||
|
|
f440111b4b | ||
|
|
56933b9b9f | ||
|
|
e03d72d71e | ||
|
|
563723392f | ||
|
|
2ae700c8c8 | ||
|
|
666861dd6f | ||
|
|
35f922df73 | ||
|
|
af03b92246 | ||
|
|
d354b1f0a4 | ||
|
|
95022bc366 | ||
|
|
399be2a9b3 | ||
|
|
ab2a43edb0 | ||
|
|
d17caeb8ec | ||
|
|
10f7f6009d | ||
|
|
9346bd6f80 | ||
|
|
a5a1f860c0 | ||
|
|
3a69d688f2 | ||
|
|
e2e6ff43ab | ||
|
|
b953a585d6 | ||
|
|
dfeba3f9b6 | ||
|
|
df3a81b31e | ||
|
|
f1b082320e | ||
|
|
8d6ad23b09 | ||
|
|
a6a1289003 | ||
|
|
644dd9c388 | ||
|
|
3076f86dc1 | ||
|
|
6b1f96dca8 | ||
|
|
c59f87a5d7 | ||
|
|
08bf9f9e74 | ||
|
|
cba76092eb | ||
|
|
5cf70f3993 | ||
|
|
54b932e844 | ||
|
|
9971caa632 | ||
|
|
15faffacf4 | ||
|
|
e3888281f4 | ||
|
|
1e7661651c | ||
|
|
f05b1b54a9 | ||
|
|
59832e7654 | ||
|
|
0f086df89f | ||
|
|
6ab0a6e796 | ||
|
|
c1dc676d28 | ||
|
|
138c3e7042 | ||
|
|
a5a65fb1e2 | ||
|
|
fc85ebecd4 | ||
|
|
2989f9ce2b | ||
|
|
bcab02b654 | ||
|
|
3aae5300e2 | ||
|
|
41347cdcec | ||
|
|
33802ab5cd | ||
|
|
eaa8c18174 | ||
|
|
3a77ef5fa3 | ||
|
|
1124e51b11 | ||
|
|
c7dab4bb25 |
No files matched your search
@@ -0,0 +1,33 @@
|
|||||||
|
name: Essential files modified
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
paths:
|
||||||
|
- quantum/**/*
|
||||||
|
- tmk_core/**/*
|
||||||
|
- drivers/**/*
|
||||||
|
- tests/**/*
|
||||||
|
- util/**/*
|
||||||
|
- platforms/**/*
|
||||||
|
- Makefile
|
||||||
|
- '*.mk'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tag:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# protect against those who develop with their fork on master
|
||||||
|
if: github.repository == 'qmk/qmk_firmware'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Bump version and push tag
|
||||||
|
uses: anothrNick/[email protected]
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
DEFAULT_BUMP: 'patch'
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
name: Format Codebase
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: qmkfm/base_container
|
||||||
|
|
||||||
|
# protect against those who develop with their fork on master
|
||||||
|
if: github.repository == 'qmk/qmk_firmware'
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.API_TOKEN_GITHUB }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update && apt-get install -y dos2unix
|
||||||
|
|
||||||
|
- name: Format files
|
||||||
|
run: |
|
||||||
|
bin/qmk cformat -a
|
||||||
|
bin/qmk pyformat
|
||||||
|
bin/qmk fileformat
|
||||||
|
|
||||||
|
- name: Commit files
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
|
with:
|
||||||
|
commit_message: Format code according to conventions for $GITHUB_SHA
|
||||||
|
commit_user_name: QMK Bot
|
||||||
|
commit_user_email: [email protected]
|
||||||
|
commit_author: QMK Bot <[email protected]>
|
||||||
@@ -19,7 +19,6 @@ addons:
|
|||||||
- llvm-toolchain-trusty-7
|
- llvm-toolchain-trusty-7
|
||||||
packages:
|
packages:
|
||||||
- diffutils
|
- diffutils
|
||||||
- dos2unix
|
|
||||||
- clang-format-7
|
- clang-format-7
|
||||||
- libstdc++-7-dev
|
- libstdc++-7-dev
|
||||||
script:
|
script:
|
||||||
|
|||||||
@@ -68,71 +68,15 @@ PATH_ELEMENTS := $(subst /, ,$(STARTING_DIR))
|
|||||||
# Initialize the path elements list for further processing
|
# Initialize the path elements list for further processing
|
||||||
$(eval $(call NEXT_PATH_ELEMENT))
|
$(eval $(call NEXT_PATH_ELEMENT))
|
||||||
|
|
||||||
# This function sets the KEYBOARD; KEYMAP and SUBPROJECT to the correct
|
|
||||||
# variables depending on which directory you stand in.
|
|
||||||
# It's really a very simple if else chain, if you squint enough,
|
|
||||||
# but the makefile syntax makes it very verbose.
|
|
||||||
# If we are in a subfolder of keyboards
|
|
||||||
#
|
|
||||||
# *** No longer needed **
|
|
||||||
#
|
|
||||||
# ifeq ($(CURRENT_PATH_ELEMENT),keyboards)
|
|
||||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
|
||||||
# KEYBOARD := $(CURRENT_PATH_ELEMENT)
|
|
||||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
|
||||||
# # If we are in a subfolder of keymaps, or in other words in a keymap
|
|
||||||
# # folder
|
|
||||||
# ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
|
||||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
|
||||||
# KEYMAP := $(CURRENT_PATH_ELEMENT)
|
|
||||||
# # else if we are not in the keyboard folder itself
|
|
||||||
# else ifneq ($(CURRENT_PATH_ELEMENT),)
|
|
||||||
# # the we can assume it's a subproject, as no other folders
|
|
||||||
# # should have make files in them
|
|
||||||
# SUBPROJECT := $(CURRENT_PATH_ELEMENT)
|
|
||||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
|
||||||
# # if we are inside a keymap folder of a subproject
|
|
||||||
# ifeq ($(CURRENT_PATH_ELEMENT),keymaps)
|
|
||||||
# $(eval $(call NEXT_PATH_ELEMENT))
|
|
||||||
# KEYMAP := $(CURRENT_PATH_ELEMENT)
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
|
|
||||||
define GET_KEYBOARDS
|
|
||||||
ifndef ALT_GET_KEYBOARDS
|
|
||||||
All_RULES_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/rules.mk))
|
|
||||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
|
||||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/rules.mk))
|
|
||||||
All_RULES_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/rules.mk))
|
|
||||||
|
|
||||||
KEYMAPS_MK := $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/keymaps/*/rules.mk))
|
|
||||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/keymaps/*/rules.mk))
|
|
||||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/keymaps/*/rules.mk))
|
|
||||||
KEYMAPS_MK += $$(patsubst $(ROOT_DIR)/keyboards/%/rules.mk,%,$$(wildcard $(ROOT_DIR)/keyboards/*/*/*/*/keymaps/*/rules.mk))
|
|
||||||
|
|
||||||
KEYBOARDS := $$(sort $$(filter-out $$(KEYMAPS_MK), $$(All_RULES_MK)))
|
|
||||||
else
|
|
||||||
KEYBOARDS := $(shell find keyboards/ -type f -iname "rules.mk" | grep -v keymaps | sed 's!keyboards/\(.*\)/rules.mk!\1!' | sort | uniq)
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call GET_KEYBOARDS))
|
|
||||||
|
|
||||||
# Only consider folders with makefiles, to prevent errors in case there are extra folders
|
|
||||||
#KEYBOARDS += $(patsubst $(ROOD_DIR)/keyboards/%/rules.mk,%,$(wildcard $(ROOT_DIR)/keyboards/*/*/rules.mk))
|
|
||||||
|
|
||||||
|
# Phony targets to enable a few simple make commands outside the main processing below.
|
||||||
.PHONY: list-keyboards
|
.PHONY: list-keyboards
|
||||||
list-keyboards:
|
list-keyboards:
|
||||||
echo $(KEYBOARDS)
|
util/list_keyboards.sh | sort -u | tr '\n' ' '
|
||||||
|
|
||||||
define PRINT_KEYBOARD
|
|
||||||
$(info $(PRINTING_KEYBOARD))
|
|
||||||
endef
|
|
||||||
|
|
||||||
.PHONY: generate-keyboards-file
|
.PHONY: generate-keyboards-file
|
||||||
generate-keyboards-file:
|
generate-keyboards-file:
|
||||||
$(foreach PRINTING_KEYBOARD,$(KEYBOARDS),$(eval $(call PRINT_KEYBOARD)))
|
util/list_keyboards.sh | sort -u
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@@ -158,8 +102,6 @@ endif
|
|||||||
# Uncomment these for debugging
|
# Uncomment these for debugging
|
||||||
# $(info Keyboard: $(KEYBOARD))
|
# $(info Keyboard: $(KEYBOARD))
|
||||||
# $(info Keymap: $(KEYMAP))
|
# $(info Keymap: $(KEYMAP))
|
||||||
# $(info Subproject: $(SUBPROJECT))
|
|
||||||
# $(info Keyboards: $(KEYBOARDS))
|
|
||||||
|
|
||||||
|
|
||||||
# Set the default goal depending on where we are running make from
|
# Set the default goal depending on where we are running make from
|
||||||
@@ -217,7 +159,6 @@ endef
|
|||||||
# A recursive helper function for finding the longest match
|
# A recursive helper function for finding the longest match
|
||||||
# $1 The list to be checked
|
# $1 The list to be checked
|
||||||
# It works by always removing the currently matched item from the list
|
# It works by always removing the currently matched item from the list
|
||||||
# and call itself recursively, until a match is found
|
|
||||||
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
|
define TRY_TO_MATCH_RULE_FROM_LIST_HELPER2
|
||||||
# Stop the recursion when the list is empty
|
# Stop the recursion when the list is empty
|
||||||
ifneq ($1,)
|
ifneq ($1,)
|
||||||
@@ -294,7 +235,7 @@ define PARSE_RULE
|
|||||||
$$(eval $$(call PARSE_TEST))
|
$$(eval $$(call PARSE_TEST))
|
||||||
# If the rule starts with the name of a known keyboard, then continue
|
# If the rule starts with the name of a known keyboard, then continue
|
||||||
# the parsing from PARSE_KEYBOARD
|
# the parsing from PARSE_KEYBOARD
|
||||||
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(KEYBOARDS)),true)
|
else ifeq ($$(call TRY_TO_MATCH_RULE_FROM_LIST,$$(shell util/list_keyboards.sh | sort -u)),true)
|
||||||
KEYBOARD_RULE=$$(MATCHED_ITEM)
|
KEYBOARD_RULE=$$(MATCHED_ITEM)
|
||||||
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
|
$$(eval $$(call PARSE_KEYBOARD,$$(MATCHED_ITEM)))
|
||||||
# Otherwise use the KEYBOARD variable, which is determined either by
|
# Otherwise use the KEYBOARD variable, which is determined either by
|
||||||
@@ -411,26 +352,9 @@ endef
|
|||||||
# if we are going to compile all keyboards, match the rest of the rule
|
# if we are going to compile all keyboards, match the rest of the rule
|
||||||
# for each of them
|
# for each of them
|
||||||
define PARSE_ALL_KEYBOARDS
|
define PARSE_ALL_KEYBOARDS
|
||||||
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(KEYBOARDS)))
|
$$(eval $$(call PARSE_ALL_IN_LIST,PARSE_KEYBOARD,$(shell util/list_keyboards.sh noci | sort -u)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# $1 Subproject
|
|
||||||
# When entering this, the keyboard and subproject are known, so now we need
|
|
||||||
# to determine which keymaps are going to get compiled
|
|
||||||
# define PARSE_SUBPROJECT
|
|
||||||
|
|
||||||
# endef
|
|
||||||
|
|
||||||
# If we want to parse all subprojects, but the keyboard doesn't have any,
|
|
||||||
# then use defaultsp instead
|
|
||||||
# define PARSE_ALL_SUBPROJECTS
|
|
||||||
# ifeq ($$(SUBPROJECTS),)
|
|
||||||
# $$(eval $$(call PARSE_SUBPROJECT,defaultsp))
|
|
||||||
# else
|
|
||||||
# $$(eval $$(call PARSE_ALL_IN_LIST,PARSE_SUBPROJECT,$$(SUBPROJECTS)))
|
|
||||||
# endif
|
|
||||||
# endef
|
|
||||||
|
|
||||||
# Prints a list of all known keymaps for the given keyboard
|
# Prints a list of all known keymaps for the given keyboard
|
||||||
define LIST_ALL_KEYMAPS
|
define LIST_ALL_KEYMAPS
|
||||||
COMMAND_true_LIST_KEYMAPS := \
|
COMMAND_true_LIST_KEYMAPS := \
|
||||||
@@ -572,12 +496,12 @@ if [ $$error_occurred -gt 0 ]; then $(HANDLE_ERROR); fi;
|
|||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
# Let's match everything, we handle all the rule parsing ourselves
|
# Catch everything and parse the command line ourselves.
|
||||||
.PHONY: %
|
.PHONY: %
|
||||||
%:
|
%:
|
||||||
# Check if we have the CMP tool installed
|
# 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;
|
cmp $(ROOT_DIR)/Makefile $(ROOT_DIR)/Makefile >/dev/null 2>&1; if [ $$? -gt 0 ]; then printf "$(MSG_NO_CMP)"; exit 1; fi;
|
||||||
# Ensure that bin/qmk works. This will be a failing check after the next develop merge on 2020 Aug 29.
|
# Ensure that bin/qmk works. This will be a failing check after the next develop merge
|
||||||
if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
if ! bin/qmk hello 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
|
||||||
# Check if the submodules are dirty, and display a warning if they are
|
# Check if the submodules are dirty, and display a warning if they are
|
||||||
ifndef SKIP_GIT
|
ifndef SKIP_GIT
|
||||||
@@ -608,25 +532,6 @@ endif
|
|||||||
$(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
|
$(foreach TEST,$(sort $(TESTS)),$(RUN_TEST))
|
||||||
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
if [ -f $(ERROR_FILE) ]; then printf "$(MSG_ERRORS)" & exit 1; fi;
|
||||||
|
|
||||||
# These no longer work because of the colon system
|
|
||||||
|
|
||||||
# All should compile everything
|
|
||||||
# .PHONY: all
|
|
||||||
# all: all-keyboards test-all
|
|
||||||
|
|
||||||
# Define some shortcuts, mostly for compatibility with the old syntax
|
|
||||||
# .PHONY: all-keyboards
|
|
||||||
# all-keyboards: all\:all\:all
|
|
||||||
|
|
||||||
# .PHONY: all-keyboards-defaults
|
|
||||||
# all-keyboards-defaults: all\:default
|
|
||||||
|
|
||||||
# .PHONY: test
|
|
||||||
# test: test-all
|
|
||||||
|
|
||||||
# .PHONY: test-clean
|
|
||||||
# test-clean: test-all-clean
|
|
||||||
|
|
||||||
lib/%:
|
lib/%:
|
||||||
git submodule sync $?
|
git submodule sync $?
|
||||||
git submodule update --init $?
|
git submodule update --init $?
|
||||||
|
|||||||
@@ -66,4 +66,3 @@ include $(TMK_PATH)/rules.mk
|
|||||||
|
|
||||||
$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
|
$(shell mkdir -p $(BUILD_DIR)/test 2>/dev/null)
|
||||||
$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)
|
$(shell mkdir -p $(TEST_OBJ) 2>/dev/null)
|
||||||
|
|
||||||
@@ -50,4 +50,3 @@ This document marks the inaugural Breaking Change merge. A list of changes follo
|
|||||||
* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
|
* `KC_DELT` was a redundant, undocumented alias for `KC_DELETE`
|
||||||
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
|
* It has been removed and all its uses replaced with the more common `KC_DEL` alias
|
||||||
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result
|
* Around 90 keymaps (mostly for ErgoDox boards) have been modified as a result
|
||||||
|
|
||||||
+1
-1
@@ -24,7 +24,7 @@ Totally new to QMK? There are two ways to get started:
|
|||||||
|
|
||||||
## Make It Yours
|
## Make It Yours
|
||||||
|
|
||||||
QMK has lots of [features](features.md) to explore, and a good deal of reference documentation to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
|
QMK has lots of features to explore, and a good deal of reference documentation to dig through. Most features are taken advantage of by modifying your [keymap](keymap.md), and changing the [keycodes](keycodes.md).
|
||||||
|
|
||||||
## Need help?
|
## Need help?
|
||||||
|
|
||||||
|
|||||||
+11
-1
@@ -175,7 +175,7 @@ Creates a keymap.json from a keymap.c.
|
|||||||
**Usage**:
|
**Usage**:
|
||||||
|
|
||||||
```
|
```
|
||||||
qmk c2json [--no-cpp] [-o OUTPUT] filename
|
qmk c2json -km KEYMAP -kb KEYBOARD [-q] [--no-cpp] [-o OUTPUT] filename
|
||||||
```
|
```
|
||||||
|
|
||||||
## `qmk lint`
|
## `qmk lint`
|
||||||
@@ -296,6 +296,16 @@ This command allows you to generate QMK documentation locally. It can be uses fo
|
|||||||
qmk generate-docs
|
qmk generate-docs
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## `qmk generate-rgb-breathe-table`
|
||||||
|
|
||||||
|
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight.md) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/`.
|
||||||
|
|
||||||
|
**Usage**:
|
||||||
|
|
||||||
|
```
|
||||||
|
qmk generate-rgb-breathe-table [-q] [-o OUTPUT] [-m MAX] [-c CENTER]
|
||||||
|
```
|
||||||
|
|
||||||
## `qmk kle2json`
|
## `qmk kle2json`
|
||||||
|
|
||||||
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
This command allows you to convert from raw KLE data to QMK Configurator JSON. It accepts either an absolute file path, or a file name in the current directory. By default it will not overwrite `info.json` if it is already present. Use the `-f` or `--force` flag to overwrite.
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ This level contains all of the options for that particular keymap. If you wish t
|
|||||||
|
|
||||||
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
|
This is a C header file that is one of the first things included, and will persist over the whole project (if included). Lots of variables can be set here and accessed elsewhere. The `config.h` file shouldn't be including other `config.h` files, or anything besides this:
|
||||||
|
|
||||||
#include "config_common.h"
|
```c
|
||||||
|
#include "config_common.h"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## Hardware Options
|
## Hardware Options
|
||||||
|
|||||||
@@ -41,7 +41,9 @@ Bevorzugst Du es lieber auf der Befehlszeile zu debuggen? Dafür eignet sich das
|
|||||||
|
|
||||||
Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren:
|
Manchmal ist es hilfreich Debug-Nachrichten innerhalb deines eigenen [Custom Codes](de/custom_quantum_functions.md) zu drucken. Das ist ziemlich einfach. Beginne damit `print.h` am Anfang deiner Datei zu inkludieren:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
Danach stehen dir verschiedene Druck-Funktionen zur Verfügung:
|
Danach stehen dir verschiedene Druck-Funktionen zur Verfügung:
|
||||||
|
|
||||||
|
|||||||
@@ -14,16 +14,11 @@ Some keyboards may have specific instructions for entering the bootloader. For e
|
|||||||
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
||||||
Alternatively, hold `BOOT` while inserting the USB cable.
|
Alternatively, hold `BOOT` while inserting the USB cable.
|
||||||
|
|
||||||
Zadig will automatically detect the bootloader device. You may sometimes need to check **Options → List All Devices**.
|
Zadig should automatically detect the bootloader device, but you may sometimes need to check **Options → List All Devices** and select the device from the dropdown instead.
|
||||||
|
|
||||||
- For keyboards with Atmel AVR MCUs, the bootloader will be named something similar to `ATm32U4DFU`, and have a Vendor ID of `03EB`.
|
|
||||||
- USBasp bootloaders will appear as `USBasp`, with a VID/PID of `16C0:05DC`.
|
|
||||||
- AVR keyboards flashed with the QMK-DFU bootloader will be named `<keyboard name> Bootloader` and will also have the VID `03EB`.
|
|
||||||
- For most ARM keyboards, it will be called `STM32 BOOTLOADER`, and have a VID/PID of `0483:DF11`.
|
|
||||||
|
|
||||||
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
!> If Zadig lists one or more devices with the `HidUsb` driver, your keyboard is probably not in bootloader mode. The arrow will be colored orange and you will be asked to confirm modifying a system driver. **Do not** proceed if this is the case!
|
||||||
|
|
||||||
If the arrow appears green, select the driver, and click **Install Driver**. The `libusb-win32` driver will usually work for AVR, and `WinUSB` for ARM, but if you still cannot flash the board, try installing a different driver from the list. USBAspLoader devices must use the `libusbK` driver.
|
If the arrow appears green, select the driver, and click **Install Driver**. See the [list of known bootloaders](#list-of-known-bootloaders) for the correct driver to install.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@@ -43,6 +38,40 @@ Right-click it and hit **Uninstall device**. Make sure to tick **Delete the driv
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again!
|
Click **Action → Scan for hardware changes**. At this point, you should be able to type again. Double check in Zadig that the keyboard device(s) are using the `HidUsb` driver. If so, you're all done, and your board should be functional again! Otherwise, repeat the process until Zadig reports the correct driver.
|
||||||
|
|
||||||
?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver.
|
?> A full reboot of your computer may sometimes be necessary at this point, to get Windows to pick up the new driver.
|
||||||
|
|
||||||
|
## List of Known Bootloaders
|
||||||
|
|
||||||
|
This is a list of known bootloader devices and their USB vendor and product IDs, as well as the correct driver to assign for flashing with QMK. Note that the usbser and HidUsb drivers are built in to Windows, and cannot be assigned with Zadig - if your device has an incorrect driver, you must use the Device Manager to uninstall it as described in the previous section.
|
||||||
|
|
||||||
|
The device name here is the name that appears in Zadig, and may not be what the Device Manager or QMK Toolbox displays.
|
||||||
|
|
||||||
|
|Bootloader |Device Name |VID/PID |Driver |
|
||||||
|
|-------------|------------------------------|--------------|-------|
|
||||||
|
|`atmel-dfu` |ATmega16u2 DFU |`03EB:2FEF` |libusb0|
|
||||||
|
|`atmel-dfu` |ATmega32U2 DFU |`03EB:2FF0` |libusb0|
|
||||||
|
|`atmel-dfu` |ATm16U4 DFU V1.0.2 |`03EB:2FF3` |libusb0|
|
||||||
|
|`atmel-dfu` |ATm32U4DFU |`03EB:2FF4` |libusb0|
|
||||||
|
|`atmel-dfu` |*none* (AT90USB64) |`03EB:2FF9` |libusb0|
|
||||||
|
|`atmel-dfu` |AT90USB128 DFU |`03EB:2FFB` |libusb0|
|
||||||
|
|`qmk-dfu` |(keyboard name) Bootloader |As `atmel-dfu`|libusb0|
|
||||||
|
|`halfkay` |*none* |`16C0:0478` |HidUsb |
|
||||||
|
|`caterina` |Pro Micro 3.3V |`1B4F:9203` |usbser |
|
||||||
|
|`caterina` |Pro Micro 5V |`1B4F:9205` |usbser |
|
||||||
|
|`caterina` |LilyPadUSB |`1B4F:9207` |usbser |
|
||||||
|
|`caterina` |Pololu A-Star 32U4 Bootloader |`1FFB:0101` |usbser |
|
||||||
|
|`caterina` |Arduino Leonardo |`2341:0036` |usbser |
|
||||||
|
|`caterina` |Arduino Micro |`2341:0037` |usbser |
|
||||||
|
|`caterina` |Adafruit Feather 32u4 |`239A:000C` |usbser |
|
||||||
|
|`caterina` |Adafruit ItsyBitsy 32u4 3V |`239A:000D` |usbser |
|
||||||
|
|`caterina` |Adafruit ItsyBitsy 32u4 5V |`239A:000E` |usbser |
|
||||||
|
|`caterina` |Arduino Leonardo |`2A03:0036` |usbser |
|
||||||
|
|`caterina` |Arduino Micro |`2A03:0037` |usbser |
|
||||||
|
|`bootloadHID`|HIDBoot |`16C0:05DF` |HidUsb |
|
||||||
|
|`USBasp` |USBasp |`16C0:05DC` |libusbK|
|
||||||
|
|`apm32-dfu` |??? |`314B:0106` |WinUSB |
|
||||||
|
|`stm32-dfu` |STM32 BOOTLOADER |`0483:DF11` |WinUSB |
|
||||||
|
|`kiibohd` |Kiibohd DFU Bootloader |`1C11:B007` |WinUSB |
|
||||||
|
|`stm32duino` |Maple 003 |`1EAF:0003` |WinUSB |
|
||||||
@@ -40,6 +40,7 @@ Module | Equivalent `#define` | Source
|
|||||||
-----------------|---------------------------------|------------------------------------------
|
-----------------|---------------------------------|------------------------------------------
|
||||||
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
|
CAT24C512 EEPROM | `#define EEPROM_I2C_CAT24C512` | <https://www.sparkfun.com/products/14764>
|
||||||
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
|
RM24C512C EEPROM | `#define EEPROM_I2C_RM24C512C` | <https://www.sparkfun.com/products/14764>
|
||||||
|
24LC64 EEPROM | `#define EEPROM_I2C_24LC64` | <https://www.microchip.com/wwwproducts/en/24LC64>
|
||||||
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
|
24LC128 EEPROM | `#define EEPROM_I2C_24LC128` | <https://www.microchip.com/wwwproducts/en/24LC128>
|
||||||
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
|
24LC256 EEPROM | `#define EEPROM_I2C_24LC256` | <https://www.sparkfun.com/products/525>
|
||||||
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
|
MB85RC256V FRAM | `#define EEPROM_I2C_MB85RC256V` | <https://www.adafruit.com/product/1895>
|
||||||
|
|||||||
@@ -33,4 +33,3 @@ Soporte para hasta 2 controladores. Cada controlador implementa 2 matrices charl
|
|||||||
## IS31FL3733
|
## IS31FL3733
|
||||||
|
|
||||||
Soporte para hasta un solo controlador con espacio para expansión. Cada controlador puede controlar 192 LEDs individuales o 64 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md).
|
Soporte para hasta un solo controlador con espacio para expansión. Cada controlador puede controlar 192 LEDs individuales o 64 LEDs RGB. Para obtener más información sobre cómo configurar el controlador, consulta la página de [Matriz RGB](feature_rgb_matrix.md).
|
||||||
|
|
||||||
@@ -41,7 +41,9 @@ Para plataformas compatibles, [QMK Toolbox](https://github.com/qmk/qmk_toolbox)
|
|||||||
|
|
||||||
A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero:
|
A veces, es útil imprimir mensajes de depuración desde tu [código personalizado](custom_quantum_functions.md). Hacerlo es bastante simple. Comienza incluyendo `print.h` al principio de tu fichero:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
Después de eso puedes utilzar algunas funciones print diferentes:
|
Después de eso puedes utilzar algunas funciones print diferentes:
|
||||||
|
|
||||||
|
|||||||
@@ -148,4 +148,3 @@ The following old names for existing algorithms will continue to be supported, h
|
|||||||
* eager_pk - old name for sym_eager_pk
|
* eager_pk - old name for sym_eager_pk
|
||||||
* sym_pk - old name for sym_defer_pk
|
* sym_pk - old name for sym_defer_pk
|
||||||
* eager_pr - old name for sym_eager_pr
|
* eager_pr - old name for sym_eager_pr
|
||||||
|
|
||||||
@@ -182,7 +182,9 @@ Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - no
|
|||||||
|
|
||||||
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
By default, it assumes a US keymap with a QWERTY layout; if you want to change that (e.g. if your OS uses software Colemak), include this somewhere in your keymap:
|
||||||
|
|
||||||
#include <sendstring_colemak.h>
|
```c
|
||||||
|
#include "sendstring_colemak.h"
|
||||||
|
```
|
||||||
|
|
||||||
### Strings in Memory
|
### Strings in Memory
|
||||||
|
|
||||||
@@ -207,7 +209,7 @@ SEND_STRING(".."SS_TAP(X_END));
|
|||||||
|
|
||||||
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.
|
There are some functions you may find useful in macro-writing. Keep in mind that while you can write some fairly advanced code within a macro, if your functionality gets too complex you may want to define a custom keycode instead. Macros are meant to be simple.
|
||||||
|
|
||||||
?> You can also use the functions described in [Useful function](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro.
|
?> You can also use the functions described in [Useful functions](ref_functions.md) for additional functionality. For example `reset_keyboard()` allows you to reset the keyboard as part of a macro.
|
||||||
|
|
||||||
### `record->event.pressed`
|
### `record->event.pressed`
|
||||||
|
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
`raw_hid_receive` can receive variable size packets from host with maximum length `RAW_EPSIZE`. `raw_hid_send` on the other hand can send packets to host of exactly `RAW_EPSIZE` length, therefore it should be used with data of length `RAW_EPSIZE`.
|
These two functions send and receive packets of length `RAW_EPSIZE` bytes to and from the host (32 on LUFA/ChibiOS/V-USB, 64 on ATSAM).
|
||||||
|
|
||||||
Make sure to flash raw enabled firmware before proceeding with working on the host side.
|
Make sure to flash raw enabled firmware before proceeding with working on the host side.
|
||||||
|
|
||||||
|
|||||||
@@ -306,6 +306,12 @@ To declare new effects, create a new `rgb_matrix_user/kb.inc` that looks somethi
|
|||||||
`rgb_matrix_user.inc` should go in the root of the keymap directory.
|
`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.
|
`rgb_matrix_kb.inc` should go in the root of the keyboard directory.
|
||||||
|
|
||||||
|
To use custom effects in your code, simply prepend `RGB_MATRIX_CUSTOM_` to the effect name specified in `RGB_MATRIX_EFFECT()`. For example, an effect declared as `RGB_MATRIX_EFFECT(my_cool_effect)` would be referenced with:
|
||||||
|
|
||||||
|
```c
|
||||||
|
rgb_matrix_mode(RGB_MATRIX_CUSTOM_my_cool_effect);
|
||||||
|
```
|
||||||
|
|
||||||
```c
|
```c
|
||||||
// !!! DO NOT ADD #pragma once !!! //
|
// !!! DO NOT ADD #pragma once !!! //
|
||||||
|
|
||||||
|
|||||||
@@ -85,4 +85,3 @@ While the tempo defines the absolute speed at which the sequencer goes through t
|
|||||||
|`void sequencer_activate_track(uint8_t track);` |Activate the `track` |
|
|`void sequencer_activate_track(uint8_t track);` |Activate the `track` |
|
||||||
|`void sequencer_deactivate_track(uint8_t track);` |Deactivate the `track` |
|
|`void sequencer_deactivate_track(uint8_t track);` |Deactivate the `track` |
|
||||||
|`void sequencer_toggle_single_active_track(uint8_t track);` |Set `track` as the only active track or deactivate all |
|
|`void sequencer_toggle_single_active_track(uint8_t track);` |Set `track` as the only active track or deactivate all |
|
||||||
|
|
||||||
@@ -129,4 +129,3 @@ As defined in `keymap_steno.h`.
|
|||||||
|`STN_RES1`||(GeminiPR only)|
|
|`STN_RES1`||(GeminiPR only)|
|
||||||
|`STN_RES2`||(GeminiPR only)|
|
|`STN_RES2`||(GeminiPR only)|
|
||||||
|`STN_PWR`||(GeminiPR only)|
|
|`STN_PWR`||(GeminiPR only)|
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ If you wanted to consolidate macros and other functions into your userspace for
|
|||||||
|
|
||||||
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
|
First, you'd want to go through all of your `keymap.c` files and replace `process_record_user` with `process_record_keymap` instead. This way, you can still use keyboard specific codes on those boards, and use your custom "global" keycodes as well. You'll also want to replace `SAFE_RANGE` with `NEW_SAFE_RANGE` so that you wont have any overlapping keycodes
|
||||||
|
|
||||||
Then add `#include <name.h>` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
Then add `#include "<name>.h"` to all of your keymap.c files. This allows you to use these new keycodes without having to redefine them in each keymap.
|
||||||
|
|
||||||
Once you've done that, you'll want to set the keycode definitions that you need to the `<name>.h` file. For instance:
|
Once you've done that, you'll want to set the keycode definitions that you need to the `<name>.h` file. For instance:
|
||||||
```c
|
```c
|
||||||
|
|||||||
@@ -42,7 +42,9 @@ Vous préférez une solution basée sur le terminal? [hid_listen](https://www.pj
|
|||||||
|
|
||||||
Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier:
|
Parfois, il est utile d'afficher des messages de débugage depuis votre [code custom](custom_quantum_functions.md). Le faire est assez simple. Commencez par ajouter `print.h` au début de votre fichier:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
Une fois fait, vous pouvez utiliser les fonctions print suivantes:
|
Une fois fait, vous pouvez utiliser les fonctions print suivantes:
|
||||||
|
|
||||||
|
|||||||
@@ -47,4 +47,3 @@ This configuration is from usbasploader's Makefile.
|
|||||||
# | | +----- LB 2..1 (No memory lock features enabled)
|
# | | +----- LB 2..1 (No memory lock features enabled)
|
||||||
# | +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
|
# | +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
|
||||||
# +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
|
# +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
|
||||||
|
|
||||||
@@ -126,6 +126,10 @@
|
|||||||
headings: 'h1, h2',
|
headings: 'h1, h2',
|
||||||
title: 'Table of Contents',
|
title: 'Table of Contents',
|
||||||
},
|
},
|
||||||
|
tabs: {
|
||||||
|
persist : false,
|
||||||
|
tabComments: false,
|
||||||
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
function (hook, vm) {
|
function (hook, vm) {
|
||||||
hook.beforeEach(function (html) {
|
hook.beforeEach(function (html) {
|
||||||
@@ -148,6 +152,7 @@
|
|||||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||||
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
|
||||||
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
|
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
|
||||||
|
<script src="//unpkg.com/docsify-tabs@1"></script>
|
||||||
<script src="//unpkg.com/docsify-copy-code@2"></script>
|
<script src="//unpkg.com/docsify-copy-code@2"></script>
|
||||||
<script src="//unpkg.com/[email protected]/dist/toc.js"></script>
|
<script src="//unpkg.com/[email protected]/dist/toc.js"></script>
|
||||||
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script>
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ QMK での全ての利用可能な設定にはデフォルトがあります。
|
|||||||
|
|
||||||
これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください:
|
これは最初に include されるものの 1 つである C ヘッダファイルで、プロジェクト全体(もし含まれる場合)にわたって持続します。多くの変数をここで設定し、他の場所からアクセスすることができます。`config.h` ファイルでは、以下のもの以外の、他の `config.h` ファイルやその他のファイルの include をしないでください:
|
||||||
|
|
||||||
#include "config_common.h"
|
```c
|
||||||
|
#include "config_common.h"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## ハードウェアオプション
|
## ハードウェアオプション
|
||||||
|
|||||||
@@ -43,5 +43,3 @@ endif
|
|||||||
* eager_pk - キーごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後そのキーは ```DEBOUNCE``` ミリ秒の間入力されません。
|
* eager_pk - キーごとにデバウンスします。状態が変化すると、応答は即座に行われ、その後そのキーは ```DEBOUNCE``` ミリ秒の間入力されません。
|
||||||
* sym_g - キーボードごとにデバウンスします。状態が変化すると、グローバルタイマが設定されます。```DEBOUNCE``` ミリ秒の間何も変化がなければ、全ての入力の変更がプッシュされます。
|
* sym_g - キーボードごとにデバウンスします。状態が変化すると、グローバルタイマが設定されます。```DEBOUNCE``` ミリ秒の間何も変化がなければ、全ての入力の変更がプッシュされます。
|
||||||
* sym_pk - キーごとにデバウンスします。状態が変化すると、キーごとのタイマーが設定されます。```DEBOUNCE``` ミリ秒の間そのキーに変化がなければ、キーの状態の変更がプッシュされます。
|
* sym_pk - キーごとにデバウンスします。状態が変化すると、キーごとのタイマーが設定されます。```DEBOUNCE``` ミリ秒の間そのキーに変化がなければ、キーの状態の変更がプッシュされます。
|
||||||
|
|
||||||
|
|
||||||
@@ -187,7 +187,9 @@ void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます:
|
デフォルトでは、QWERTY レイアウトの US キーマップを想定しています; それを変更したい場合(例えば OS がソフトウェア Colemak を使う場合)、キーマップのどこかに以下を含めます:
|
||||||
|
|
||||||
#include <sendstring_colemak.h>
|
```c
|
||||||
|
#include "sendstring_colemak.h"
|
||||||
|
```
|
||||||
|
|
||||||
### メモリ内の文字列
|
### メモリ内の文字列
|
||||||
|
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。
|
最初に、全ての `keymap.c` ファイルを調べ、代わりに `process_record_user` を `process_record_keymap` に置き換えます。この方法では、これらのキーボードでキーボード固有のコードを使用でき、カスタムの "global" キーコードも使うことができます。また、`SAFE_RANGE` を `NEW_SAFE_RANGE` に置き換えて、キーコードが重複しないようにすることもできます。
|
||||||
|
|
||||||
次に、全ての keymap.c ファイルに `#include <name.h>` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。
|
次に、全ての keymap.c ファイルに `#include "<name>.h"` を追加します。これにより、各キーマップでそれらを再定義することなく新しいキーコードを使うことができます。
|
||||||
|
|
||||||
それが完了したら、必要なキーコードの定義を `<name>.h` ファイルに設定します。例えば:
|
それが完了したら、必要なキーコードの定義を `<name>.h` ファイルに設定します。例えば:
|
||||||
```c
|
```c
|
||||||
|
|||||||
@@ -171,4 +171,3 @@
|
|||||||
* `device` 関連するデバイス
|
* `device` 関連するデバイス
|
||||||
|
|
||||||
* `func` 登録するコールバック関数
|
* `func` 登録するコールバック関数
|
||||||
|
|
||||||
@@ -45,7 +45,9 @@ void keyboard_post_init_user(void) {
|
|||||||
|
|
||||||
[custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します:
|
[custom code](ja/custom_quantum_functions.md)内からデバッグメッセージを出力すると便利な場合があります。それはとても簡単です。ファイルの先頭に`print.h`のインクルードを追加します:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
そのあとは、いくつかの異なった print 関数を使用することが出来ます。
|
そのあとは、いくつかの異なった print 関数を使用することが出来ます。
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -124,17 +124,17 @@ See also: [Basic Keycodes](keycodes_basic.md)
|
|||||||
|`KC_F22` | |F22 |✔ | |✔ |
|
|`KC_F22` | |F22 |✔ | |✔ |
|
||||||
|`KC_F23` | |F23 |✔ | |✔ |
|
|`KC_F23` | |F23 |✔ | |✔ |
|
||||||
|`KC_F24` | |F24 |✔ | |✔ |
|
|`KC_F24` | |F24 |✔ | |✔ |
|
||||||
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|
|`KC_EXECUTE` |`KC_EXEC` |Execute | | |✔ |
|
||||||
|`KC_HELP` | |Help | | |✔ |
|
|`KC_HELP` | |Help | | |✔ |
|
||||||
|`KC_MENU` | |Menu | | |✔ |
|
|`KC_MENU` | |Menu | | |✔ |
|
||||||
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|
|`KC_SELECT` |`KC_SLCT` |Select | | |✔ |
|
||||||
|`KC_STOP` | |Stop | | |✔ |
|
|`KC_STOP` | |Stop | | |✔ |
|
||||||
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|
|`KC_AGAIN` |`KC_AGIN` |Again | | |✔ |
|
||||||
|`KC_UNDO` | |Undo | | |✔ |
|
|`KC_UNDO` | |Undo | | |✔ |
|
||||||
|`KC_CUT` | |Cut | | |✔ |
|
|`KC_CUT` | |Cut | | |✔ |
|
||||||
|`KC_COPY` | |Copy | | |✔ |
|
|`KC_COPY` | |Copy | | |✔ |
|
||||||
|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ |
|
|`KC_PASTE` |`KC_PSTE` |Paste | | |✔ |
|
||||||
|`KC_FIND` | |Find | | |✔ |
|
|`KC_FIND` | |Find | | |✔ |
|
||||||
|`KC__MUTE` | |Mute | |✔ |✔ |
|
|`KC__MUTE` | |Mute | |✔ |✔ |
|
||||||
|`KC__VOLUP` | |Volume Up | |✔ |✔ |
|
|`KC__VOLUP` | |Volume Up | |✔ |✔ |
|
||||||
|`KC__VOLDOWN` | |Volume Down | |✔ |✔ |
|
|`KC__VOLDOWN` | |Volume Down | |✔ |✔ |
|
||||||
|
|||||||
+71
-71
@@ -144,48 +144,48 @@ The basic set of keycodes are based on the [HID Keyboard/Keypad Usage Page (0x07
|
|||||||
|
|
||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|------------------|------------------------------|------------------------------|
|
|------------------|------------------------------|--------------------------------------|
|
||||||
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
|`KC_PSCREEN` |`KC_PSCR` |Print Screen |
|
||||||
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |
|
|`KC_PAUSE` |`KC_PAUS`, `KC_BRK`, `KC_BRMU`|Pause, Brightness Up (macOS) |
|
||||||
|`KC_INSERT` |`KC_INS` |Insert |
|
|`KC_INSERT` |`KC_INS` |Insert |
|
||||||
|`KC_HOME` | |Home |
|
|`KC_HOME` | |Home |
|
||||||
|`KC_PGUP` | |Page Up |
|
|`KC_PGUP` | |Page Up |
|
||||||
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
|`KC_DELETE` |`KC_DEL` |Forward Delete |
|
||||||
|`KC_END` | |End |
|
|`KC_END` | |End |
|
||||||
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
|`KC_PGDOWN` |`KC_PGDN` |Page Down |
|
||||||
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
|`KC_RIGHT` |`KC_RGHT` |Right Arrow |
|
||||||
|`KC_LEFT` | |Left Arrow |
|
|`KC_LEFT` | |Left Arrow |
|
||||||
|`KC_DOWN` | |Down Arrow |
|
|`KC_DOWN` | |Down Arrow |
|
||||||
|`KC_UP` | |Up Arrow |
|
|`KC_UP` | |Up Arrow |
|
||||||
|`KC_APPLICATION` |`KC_APP` |Application (Windows Menu Key)|
|
|`KC_APPLICATION` |`KC_APP` |Application (Windows Context Menu Key)|
|
||||||
|`KC_POWER` | |System Power (macOS/Linux) |
|
|`KC_POWER` | |System Power |
|
||||||
|`KC_EXECUTE` |`KC_EXEC` |Execute |
|
|`KC_EXECUTE` |`KC_EXEC` |Execute |
|
||||||
|`KC_HELP` | |Help |
|
|`KC_HELP` | |Help |
|
||||||
|`KC_MENU` | |Menu |
|
|`KC_MENU` | |Menu |
|
||||||
|`KC_SELECT` |`KC_SLCT` |Select |
|
|`KC_SELECT` |`KC_SLCT` |Select |
|
||||||
|`KC_STOP` | |Stop |
|
|`KC_STOP` | |Stop |
|
||||||
|`KC_AGAIN` |`KC_AGIN` |Again |
|
|`KC_AGAIN` |`KC_AGIN` |Again |
|
||||||
|`KC_UNDO` | |Undo |
|
|`KC_UNDO` | |Undo |
|
||||||
|`KC_CUT` | |Cut |
|
|`KC_CUT` | |Cut |
|
||||||
|`KC_COPY` | |Copy |
|
|`KC_COPY` | |Copy |
|
||||||
|`KC_PASTE` |`KC_PSTE` |Paste |
|
|`KC_PASTE` |`KC_PSTE` |Paste |
|
||||||
|`KC_FIND` | |Find |
|
|`KC_FIND` | |Find |
|
||||||
|`KC__MUTE` | |Mute (macOS) |
|
|`KC__MUTE` | |Mute |
|
||||||
|`KC__VOLUP` | |Volume Up (macOS) |
|
|`KC__VOLUP` | |Volume Up |
|
||||||
|`KC__VOLDOWN` | |Volume Down (macOS) |
|
|`KC__VOLDOWN` | |Volume Down |
|
||||||
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase |
|
|`KC_ALT_ERASE` |`KC_ERAS` |Alternate Erase |
|
||||||
|`KC_SYSREQ` | |SysReq/Attention |
|
|`KC_SYSREQ` | |SysReq/Attention |
|
||||||
|`KC_CANCEL` | |Cancel |
|
|`KC_CANCEL` | |Cancel |
|
||||||
|`KC_CLEAR` |`KC_CLR` |Clear |
|
|`KC_CLEAR` |`KC_CLR` |Clear |
|
||||||
|`KC_PRIOR` | |Prior |
|
|`KC_PRIOR` | |Prior |
|
||||||
|`KC_RETURN` | |Return |
|
|`KC_RETURN` | |Return |
|
||||||
|`KC_SEPARATOR` | |Separator |
|
|`KC_SEPARATOR` | |Separator |
|
||||||
|`KC_OUT` | |Out |
|
|`KC_OUT` | |Out |
|
||||||
|`KC_OPER` | |Oper |
|
|`KC_OPER` | |Oper |
|
||||||
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
|`KC_CLEAR_AGAIN` | |Clear/Again |
|
||||||
|`KC_CRSEL` | |CrSel/Props |
|
|`KC_CRSEL` | |CrSel/Props |
|
||||||
|`KC_EXSEL` | |ExSel |
|
|`KC_EXSEL` | |ExSel |
|
||||||
|
|
||||||
## Media Keys
|
## Media Keys
|
||||||
|
|
||||||
@@ -193,34 +193,34 @@ These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` key
|
|||||||
|
|
||||||
?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped.
|
?> Some of these keycodes may behave differently depending on the OS. For example, on macOS, the keycodes `KC_MEDIA_FAST_FORWARD`, `KC_MEDIA_REWIND`, `KC_MEDIA_NEXT_TRACK` and `KC_MEDIA_PREV_TRACK` skip within the current track when held, but skip the entire track when tapped.
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|-----------------------|---------|-----------------------------|
|
|-----------------------|---------|-------------------|
|
||||||
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
|`KC_SYSTEM_POWER` |`KC_PWR` |System Power Down |
|
||||||
|`KC_SYSTEM_SLEEP` |`KC_SLEP`|System Sleep |
|
|`KC_SYSTEM_SLEEP` |`KC_SLEP`|System Sleep |
|
||||||
|`KC_SYSTEM_WAKE` |`KC_WAKE`|System Wake |
|
|`KC_SYSTEM_WAKE` |`KC_WAKE`|System Wake |
|
||||||
|`KC_AUDIO_MUTE` |`KC_MUTE`|Mute |
|
|`KC_AUDIO_MUTE` |`KC_MUTE`|Mute |
|
||||||
|`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up |
|
|`KC_AUDIO_VOL_UP` |`KC_VOLU`|Volume Up |
|
||||||
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down |
|
|`KC_AUDIO_VOL_DOWN` |`KC_VOLD`|Volume Down |
|
||||||
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track |
|
|`KC_MEDIA_NEXT_TRACK` |`KC_MNXT`|Next Track |
|
||||||
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track |
|
|`KC_MEDIA_PREV_TRACK` |`KC_MPRV`|Previous Track |
|
||||||
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track (Windows) |
|
|`KC_MEDIA_STOP` |`KC_MSTP`|Stop Track |
|
||||||
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
|`KC_MEDIA_PLAY_PAUSE` |`KC_MPLY`|Play/Pause Track |
|
||||||
|`KC_MEDIA_SELECT` |`KC_MSEL`|Launch Media Player (Windows)|
|
|`KC_MEDIA_SELECT` |`KC_MSEL`|Launch Media Player|
|
||||||
|`KC_MEDIA_EJECT` |`KC_EJCT`|Eject (macOS) |
|
|`KC_MEDIA_EJECT` |`KC_EJCT`|Eject |
|
||||||
|`KC_MAIL` | |Launch Mail (Windows) |
|
|`KC_MAIL` | |Launch Mail |
|
||||||
|`KC_CALCULATOR` |`KC_CALC`|Launch Calculator (Windows) |
|
|`KC_CALCULATOR` |`KC_CALC`|Launch Calculator |
|
||||||
|`KC_MY_COMPUTER` |`KC_MYCM`|Launch My Computer (Windows) |
|
|`KC_MY_COMPUTER` |`KC_MYCM`|Launch My Computer |
|
||||||
|`KC_WWW_SEARCH` |`KC_WSCH`|Browser Search (Windows) |
|
|`KC_WWW_SEARCH` |`KC_WSCH`|Browser Search |
|
||||||
|`KC_WWW_HOME` |`KC_WHOM`|Browser Home (Windows) |
|
|`KC_WWW_HOME` |`KC_WHOM`|Browser Home |
|
||||||
|`KC_WWW_BACK` |`KC_WBAK`|Browser Back (Windows) |
|
|`KC_WWW_BACK` |`KC_WBAK`|Browser Back |
|
||||||
|`KC_WWW_FORWARD` |`KC_WFWD`|Browser Forward (Windows) |
|
|`KC_WWW_FORWARD` |`KC_WFWD`|Browser Forward |
|
||||||
|`KC_WWW_STOP` |`KC_WSTP`|Browser Stop (Windows) |
|
|`KC_WWW_STOP` |`KC_WSTP`|Browser Stop |
|
||||||
|`KC_WWW_REFRESH` |`KC_WREF`|Browser Refresh (Windows) |
|
|`KC_WWW_REFRESH` |`KC_WREF`|Browser Refresh |
|
||||||
|`KC_WWW_FAVORITES` |`KC_WFAV`|Browser Favorites (Windows) |
|
|`KC_WWW_FAVORITES` |`KC_WFAV`|Browser Favorites |
|
||||||
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track (macOS) |
|
|`KC_MEDIA_FAST_FORWARD`|`KC_MFFD`|Next Track |
|
||||||
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track (macOS) |
|
|`KC_MEDIA_REWIND` |`KC_MRWD`|Previous Track |
|
||||||
|`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up |
|
|`KC_BRIGHTNESS_UP` |`KC_BRIU`|Brightness Up |
|
||||||
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |
|
|`KC_BRIGHTNESS_DOWN` |`KC_BRID`|Brightness Down |
|
||||||
|
|
||||||
## Number Pad
|
## Number Pad
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ These keycodes are not part of the Keyboard/Keypad usage page. The `SYSTEM_` key
|
|||||||
|
|
||||||
## Special Keys
|
## Special Keys
|
||||||
|
|
||||||
In addition to these, keycodes in the range of `0xA5-DF` are reserved for internal use by TMK.
|
In addition to these, keycodes in the range of `0xA5-DF` are reserved for internal use.
|
||||||
|
|
||||||
|Key |Aliases |Description |
|
|Key |Aliases |Description |
|
||||||
|----------------|--------------------|---------------------------------------|
|
|----------------|--------------------|---------------------------------------|
|
||||||
|
|||||||
@@ -37,26 +37,45 @@ We've tried to make QMK as easy to set up as possible. You only have to prepare
|
|||||||
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
|
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br>
|
||||||
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html)
|
||||||
|
|
||||||
### Windows
|
<!-- tabs:start -->
|
||||||
|
|
||||||
You will need to install MSYS2, Git, and the QMK CLI.
|
### ** Windows **
|
||||||
|
|
||||||
Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org). Close any open MSYS terminals and open a new MinGW 64-bit terminal. **NOTE: This is *not* the same as the MSYS terminal that opens when installation is completed.**
|
#### Prerequisites
|
||||||
|
|
||||||
Then, run the following:
|
You will need to install MSYS2, Git and Python. Follow the installation instructions on https://www.msys2.org.
|
||||||
|
|
||||||
|
Once MSYS2 is installed, close any open MSYS terminals and open a new MinGW 64-bit terminal.
|
||||||
|
|
||||||
|
!> **NOTE:** The MinGW 64-bit terminal is *not* the same as the MSYS terminal that opens when installation is completed. Your prompt should say "MINGW64" in purple text, rather than "MSYS". See [this page](https://www.msys2.org/wiki/MSYS2-introduction/#subsystems) for more information on the differences.
|
||||||
|
|
||||||
|
Then run the following command:
|
||||||
|
|
||||||
pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip
|
pacman --needed --noconfirm --disable-download-timeout -S git mingw-w64-x86_64-toolchain mingw-w64-x86_64-python3-pip
|
||||||
|
|
||||||
|
#### Installation
|
||||||
|
|
||||||
|
Install the QMK CLI by running:
|
||||||
|
|
||||||
python3 -m pip install qmk
|
python3 -m pip install qmk
|
||||||
|
|
||||||
### macOS
|
### ** macOS **
|
||||||
|
|
||||||
You will need to install Homebrew. Follow the instructions on the [Homebrew homepage](https://brew.sh).
|
QMK maintains a Homebrew tap and formula which will automatically install the CLI and all necessary dependencies.
|
||||||
|
|
||||||
After Homebrew is installed run this command:
|
#### Prerequisites
|
||||||
|
|
||||||
|
You will need to install Homebrew. Follow the instructions on https://brew.sh.
|
||||||
|
|
||||||
|
#### Installation
|
||||||
|
|
||||||
|
Install the QMK CLI by running:
|
||||||
|
|
||||||
brew install qmk/qmk/qmk
|
brew install qmk/qmk/qmk
|
||||||
|
|
||||||
### Linux
|
### ** Linux/WSL **
|
||||||
|
|
||||||
|
#### Prerequisites
|
||||||
|
|
||||||
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
You will need to install Git and Python. It's very likely that you already have both, but if not, one of the following commands should install them:
|
||||||
|
|
||||||
@@ -66,30 +85,63 @@ You will need to install Git and Python. It's very likely that you already have
|
|||||||
* Void: `sudo xbps-install -y git python3-pip`
|
* Void: `sudo xbps-install -y git python3-pip`
|
||||||
* Solus: `sudo eopkg -y install git python3`
|
* Solus: `sudo eopkg -y install git python3`
|
||||||
* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
|
* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
|
||||||
|
* Gentoo: `sudo emerge dev-vcs/git dev-python/pip`
|
||||||
|
|
||||||
Install the global CLI to bootstrap your system:
|
#### Installation
|
||||||
|
|
||||||
`python3 -m pip install --user qmk` (on Arch-based distros you can also try the `qmk` package from AUR (**note**: it's maintained by a community member): `yay -S qmk`)
|
Install the QMK CLI by running:
|
||||||
|
|
||||||
### FreeBSD
|
python3 -m pip install --user qmk
|
||||||
|
|
||||||
|
On Arch-based distros you can also try the `qmk` package from AUR (**NOTE**: this package is maintained by a community member, and at the time of writing marks some dependencies as optional that should not be):
|
||||||
|
|
||||||
|
yay -S qmk
|
||||||
|
|
||||||
|
### ** FreeBSD **
|
||||||
|
|
||||||
|
#### Prerequisites
|
||||||
|
|
||||||
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
|
You will need to install Git and Python. It's possible that you already have both, but if not, run the following commands to install them:
|
||||||
|
|
||||||
pkg install git python3
|
pkg install git python3
|
||||||
|
|
||||||
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally install Python packages are available.
|
Make sure that `$HOME/.local/bin` is added to your `$PATH` so that locally installed Python packages are available.
|
||||||
|
|
||||||
Once installed, you can install QMK CLI:
|
#### Installation
|
||||||
|
|
||||||
|
Install the QMK CLI by running:
|
||||||
|
|
||||||
python3 -m pip install --user qmk
|
python3 -m pip install --user qmk
|
||||||
|
|
||||||
|
<!-- tabs:end -->
|
||||||
|
|
||||||
## 3. Run QMK Setup :id=set-up-qmk
|
## 3. Run QMK Setup :id=set-up-qmk
|
||||||
|
|
||||||
|
<!-- tabs:start -->
|
||||||
|
|
||||||
|
### ** Windows **
|
||||||
|
|
||||||
After installing QMK you can set it up with this command:
|
After installing QMK you can set it up with this command:
|
||||||
|
|
||||||
qmk setup
|
qmk setup
|
||||||
|
|
||||||
In most situations you will want to answer Yes to all of the prompts.
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
|
### ** macOS **
|
||||||
|
|
||||||
|
After installing QMK you can set it up with this command:
|
||||||
|
|
||||||
|
qmk setup
|
||||||
|
|
||||||
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
|
### ** Linux/WSL **
|
||||||
|
|
||||||
|
After installing QMK you can set it up with this command:
|
||||||
|
|
||||||
|
qmk setup
|
||||||
|
|
||||||
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
?>**Note on Debian, Ubuntu and their derivatives**:
|
?>**Note on Debian, Ubuntu and their derivatives**:
|
||||||
It's possible, that you will get an error saying something like: `bash: qmk: command not found`.
|
It's possible, that you will get an error saying something like: `bash: qmk: command not found`.
|
||||||
@@ -97,12 +149,22 @@ This is due to a [bug](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=839155)
|
|||||||
Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
|
Sadly, Ubuntu reitroduced this bug and is [yet to fix it](https://bugs.launchpad.net/ubuntu/+source/bash/+bug/1588562).
|
||||||
Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
|
Luckily, the fix is easy. Run this as your user: `echo 'PATH="$HOME/.local/bin:$PATH"' >> $HOME/.bashrc && source $HOME/.bashrc`
|
||||||
|
|
||||||
|
### ** FreeBSD **
|
||||||
|
|
||||||
|
After installing QMK you can set it up with this command:
|
||||||
|
|
||||||
|
qmk setup
|
||||||
|
|
||||||
|
In most situations you will want to answer `y` to all of the prompts.
|
||||||
|
|
||||||
?>**Note on FreeBSD**:
|
?>**Note on FreeBSD**:
|
||||||
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
It is suggested to run `qmk setup` as a non-`root` user to start with, but this will likely identify packages that need to be installed to your
|
||||||
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
|
base system using `pkg`. However the installation will probably fail when run as an unprivileged user.
|
||||||
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
|
To manually install the base dependencies, run `./util/qmk_install.sh` either as `root`, or with `sudo`.
|
||||||
Once that completes, re-run `qmk setup` to complete the setup and checks.
|
Once that completes, re-run `qmk setup` to complete the setup and checks.
|
||||||
|
|
||||||
|
<!-- tabs:end -->
|
||||||
|
|
||||||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create your own fork and use `qmk setup <github_username>/qmk_firmware` to clone your personal fork. If you don't know what that means you can safely ignore this message.
|
||||||
|
|
||||||
## 4. Test Your Build Environment
|
## 4. Test Your Build Environment
|
||||||
|
|||||||
@@ -36,7 +36,9 @@ Prefer a terminal based solution? [hid_listen](https://www.pjrc.com/teensy/hid_l
|
|||||||
|
|
||||||
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
Sometimes it's useful to print debug messages from within your [custom code](custom_quantum_functions.md). Doing so is pretty simple. Start by including `print.h` at the top of your file:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
After that you can use a few different print functions:
|
After that you can use a few different print functions:
|
||||||
|
|
||||||
|
|||||||
@@ -27,3 +27,20 @@
|
|||||||
.markdown-section hr, .search {
|
.markdown-section hr, .search {
|
||||||
border-bottom: 1px solid #777 !important;
|
border-bottom: 1px solid #777 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--docsifytabs-border-color: #555;
|
||||||
|
--docsifytabs-tab-highlight-color: var(--theme-color,#ea6f5a);
|
||||||
|
|
||||||
|
--docsifytabs-tab-background: #444;
|
||||||
|
--docsifytabs-tab-background-active: #3f3f3f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docsify-tabs__tab:focus {
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docsify-tabs__content .anchor {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
@@ -28,3 +28,20 @@
|
|||||||
.markdown-section pre {
|
.markdown-section pre {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
:root {
|
||||||
|
--docsifytabs-border-color: #ddd;
|
||||||
|
--docsifytabs-tab-highlight-color: var(--theme-color, #0074d9);
|
||||||
|
|
||||||
|
--docsifytabs-tab-background: #f8f8f8;
|
||||||
|
--docsifytabs-tab-background-active: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docsify-tabs__tab:focus {
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.docsify-tabs__content .anchor {
|
||||||
|
transition: none;
|
||||||
|
}
|
||||||
@@ -28,6 +28,17 @@ The default setting is 280 µs, which should work for most cases, but this can b
|
|||||||
#define WS2812_TRST_US 80
|
#define WS2812_TRST_US 80
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Byte Order
|
||||||
|
|
||||||
|
Some variants of the WS2812 may have their color components in a different physical or logical order. For example, the WS2812B-2020 has physically swapped red and green LEDs, which causes the wrong color to be displayed, because the default order of the bytes sent over the wire is defined as GRB.
|
||||||
|
In this case, you can change the byte order by defining `WS2812_BYTE_ORDER` as one of the following values:
|
||||||
|
|
||||||
|
| Byte order | Known devices |
|
||||||
|
|-----------------------------------|-------------------------------|
|
||||||
|
| `WS2812_BYTE_ORDER_GRB` (default) | Most WS2812's, SK6812, SK6805 |
|
||||||
|
| `WS2812_BYTE_ORDER_RGB` | WS2812B-2020 |
|
||||||
|
|
||||||
|
|
||||||
### Bitbang
|
### Bitbang
|
||||||
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
|
Default driver, the absence of configuration assumes this driver. To configure it, add this to your rules.mk:
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,9 @@ void keyboard_post_init_user(void) {
|
|||||||
|
|
||||||
有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`:
|
有时用[custom code](custom_quantum_functions.md)发送自定义调试信息很有用. 这么做很简单. 首先在你文件头部包含`print.h`:
|
||||||
|
|
||||||
#include <print.h>
|
```c
|
||||||
|
#include "print.h"
|
||||||
|
```
|
||||||
|
|
||||||
之后,您可以使用一些不同的打印功能:
|
之后,您可以使用一些不同的打印功能:
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#ifndef LCD_H
|
|
||||||
#define LCD_H
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Title : C include file for the HD44780U LCD library (lcd.c)
|
Title : C include file for the HD44780U LCD library (lcd.c)
|
||||||
Author: Peter Fleury <[email protected]> http://tinyurl.com/peterfleury
|
Author: Peter Fleury <[email protected]> http://tinyurl.com/peterfleury
|
||||||
@@ -43,6 +41,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#include <avr/pgmspace.h>
|
#include <avr/pgmspace.h>
|
||||||
|
|
||||||
@@ -346,5 +346,3 @@ extern void lcd_data(uint8_t data);
|
|||||||
#define lcd_puts_P(__s) lcd_puts_p(PSTR(__s))
|
#define lcd_puts_P(__s) lcd_puts_p(PSTR(__s))
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|
||||||
#endif // LCD_H
|
|
||||||
@@ -17,8 +17,7 @@
|
|||||||
* GitHub repository: https://github.com/g4lvanix/I2C-master-lib
|
* GitHub repository: https://github.com/g4lvanix/I2C-master-lib
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef I2C_MASTER_H
|
#pragma once
|
||||||
#define I2C_MASTER_H
|
|
||||||
|
|
||||||
#define I2C_READ 0x01
|
#define I2C_READ 0x01
|
||||||
#define I2C_WRITE 0x00
|
#define I2C_WRITE 0x00
|
||||||
@@ -42,5 +41,3 @@ i2c_status_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16
|
|||||||
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_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_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);
|
||||||
void i2c_stop(void);
|
void i2c_stop(void);
|
||||||
|
|
||||||
#endif // I2C_MASTER_H
|
|
||||||
@@ -20,8 +20,7 @@
|
|||||||
Read or write to the necessary buffer according to the opperation.
|
Read or write to the necessary buffer according to the opperation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef I2C_SLAVE_H
|
#pragma once
|
||||||
#define I2C_SLAVE_H
|
|
||||||
|
|
||||||
#define I2C_SLAVE_REG_COUNT 30
|
#define I2C_SLAVE_REG_COUNT 30
|
||||||
|
|
||||||
@@ -29,5 +28,3 @@ extern volatile uint8_t i2c_slave_reg[I2C_SLAVE_REG_COUNT];
|
|||||||
|
|
||||||
void i2c_slave_init(uint8_t address);
|
void i2c_slave_init(uint8_t address);
|
||||||
void i2c_slave_stop(void);
|
void i2c_slave_stop(void);
|
||||||
|
|
||||||
#endif // I2C_SLAVE_H
|
|
||||||
@@ -140,27 +140,33 @@ spi_status_t spi_read() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
|
spi_status_t spi_transmit(const uint8_t *data, uint16_t length) {
|
||||||
spi_status_t status = SPI_STATUS_ERROR;
|
spi_status_t status;
|
||||||
|
|
||||||
for (uint16_t i = 0; i < length; i++) {
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
status = spi_write(data[i]);
|
status = spi_write(data[i]);
|
||||||
|
|
||||||
|
if (status < 0) {
|
||||||
|
return status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return status;
|
return SPI_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
|
spi_status_t spi_receive(uint8_t *data, uint16_t length) {
|
||||||
spi_status_t status = SPI_STATUS_ERROR;
|
spi_status_t status;
|
||||||
|
|
||||||
for (uint16_t i = 0; i < length; i++) {
|
for (uint16_t i = 0; i < length; i++) {
|
||||||
status = spi_read();
|
status = spi_read();
|
||||||
|
|
||||||
if (status > 0) {
|
if (status >= 0) {
|
||||||
data[i] = status;
|
data[i] = status;
|
||||||
|
} else {
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (status < 0) ? status : SPI_STATUS_SUCCESS;
|
return SPI_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void spi_stop(void) {
|
void spi_stop(void) {
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
#ifndef SSD1306_H
|
#pragma once
|
||||||
#define SSD1306_H
|
|
||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -86,5 +85,3 @@ void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c);
|
|||||||
void matrix_write(struct CharacterMatrix *matrix, const char *data);
|
void matrix_write(struct CharacterMatrix *matrix, const char *data);
|
||||||
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
void matrix_write_P(struct CharacterMatrix *matrix, const char *data);
|
||||||
void matrix_render(struct CharacterMatrix *matrix);
|
void matrix_render(struct CharacterMatrix *matrix);
|
||||||
|
|
||||||
#endif
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "analog.h"
|
#include "analog.h"
|
||||||
#include "ch.h"
|
#include <ch.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
#if !HAL_USE_ADC
|
#if !HAL_USE_ADC
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
*/
|
*/
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "ch.h"
|
#include <ch.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
|
|
||||||
#ifdef I2C1_BANK
|
#ifdef I2C1_BANK
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "wait.h"
|
#include "wait.h"
|
||||||
|
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
|
|
||||||
// TODO: resolve/remove build warnings
|
// TODO: resolve/remove build warnings
|
||||||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG)
|
#if defined(RGBLIGHT_ENABLE) && defined(RGBLED_SPLIT) && defined(PROTOCOL_CHIBIOS) && defined(WS2812_DRIVER_BITBANG)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
#include "printf.h"
|
#include "print.h"
|
||||||
|
|
||||||
#include "ch.h"
|
#include <ch.h>
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
|
|
||||||
#ifndef USART_CR1_M0
|
#ifndef USART_CR1_M0
|
||||||
# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so
|
# define USART_CR1_M0 USART_CR1_M // some platforms (f1xx) dont have this so
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
#include <ch.h>
|
#include <ch.h>
|
||||||
#include <hal.h>
|
#include <hal.h>
|
||||||
#include <quantum.h>
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifndef SPI_DRIVER
|
#ifndef SPI_DRIVER
|
||||||
# define SPI_DRIVER SPID2
|
# define SPI_DRIVER SPID2
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "ws2812.h"
|
#include "ws2812.h"
|
||||||
#include "ch.h"
|
#include <ch.h>
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
|
|
||||||
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
|
/* Adapted from https://github.com/bigjosh/SimpleNeoPixelDemo/ */
|
||||||
|
|
||||||
@@ -89,9 +89,16 @@ void ws2812_setleds(LED_TYPE *ledarray, uint16_t leds) {
|
|||||||
|
|
||||||
for (uint8_t i = 0; i < leds; i++) {
|
for (uint8_t i = 0; i < leds; i++) {
|
||||||
// WS2812 protocol dictates grb order
|
// WS2812 protocol dictates grb order
|
||||||
|
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||||
sendByte(ledarray[i].g);
|
sendByte(ledarray[i].g);
|
||||||
sendByte(ledarray[i].r);
|
sendByte(ledarray[i].r);
|
||||||
sendByte(ledarray[i].b);
|
sendByte(ledarray[i].b);
|
||||||
|
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||||
|
sendByte(ledarray[i].r);
|
||||||
|
sendByte(ledarray[i].g);
|
||||||
|
sendByte(ledarray[i].b);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGBW
|
#ifdef RGBW
|
||||||
sendByte(ledarray[i].w);
|
sendByte(ledarray[i].w);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "ws2812.h"
|
#include "ws2812.h"
|
||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
|
|
||||||
/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */
|
/* Adapted from https://github.com/joewa/WS2812-LED-Driver_ChibiOS/ */
|
||||||
|
|
||||||
@@ -107,6 +107,7 @@
|
|||||||
*/
|
*/
|
||||||
#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit)))
|
#define WS2812_BIT(led, byte, bit) (24 * (led) + 8 * (byte) + (7 - (bit)))
|
||||||
|
|
||||||
|
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||||
/**
|
/**
|
||||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
|
||||||
*
|
*
|
||||||
@@ -117,7 +118,7 @@
|
|||||||
*
|
*
|
||||||
* @return The bit index
|
* @return The bit index
|
||||||
*/
|
*/
|
||||||
#define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
|
||||||
@@ -129,7 +130,7 @@
|
|||||||
*
|
*
|
||||||
* @return The bit index
|
* @return The bit index
|
||||||
*/
|
*/
|
||||||
#define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
|
||||||
@@ -141,7 +142,45 @@
|
|||||||
*
|
*
|
||||||
* @return The bit index
|
* @return The bit index
|
||||||
*/
|
*/
|
||||||
#define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
||||||
|
|
||||||
|
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||||
|
/**
|
||||||
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given red bit
|
||||||
|
*
|
||||||
|
* @note The red byte is the middle byte in the color packet
|
||||||
|
*
|
||||||
|
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||||
|
* @param[in] bit: The bit number [0, 7]
|
||||||
|
*
|
||||||
|
* @return The bit index
|
||||||
|
*/
|
||||||
|
# define WS2812_RED_BIT(led, bit) WS2812_BIT((led), 0, (bit))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given green bit
|
||||||
|
*
|
||||||
|
* @note The red byte is the first byte in the color packet
|
||||||
|
*
|
||||||
|
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||||
|
* @param[in] bit: The bit number [0, 7]
|
||||||
|
*
|
||||||
|
* @return The bit index
|
||||||
|
*/
|
||||||
|
# define WS2812_GREEN_BIT(led, bit) WS2812_BIT((led), 1, (bit))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Determine the index in @ref ws2812_frame_buffer "the frame buffer" of a given blue bit
|
||||||
|
*
|
||||||
|
* @note The red byte is the last byte in the color packet
|
||||||
|
*
|
||||||
|
* @param[in] led: The led index [0, @ref RGBLED_NUM)
|
||||||
|
* @param[in] bit: The bit index [0, 7]
|
||||||
|
*
|
||||||
|
* @return The bit index
|
||||||
|
*/
|
||||||
|
# define WS2812_BLUE_BIT(led, bit) WS2812_BIT((led), 2, (bit))
|
||||||
|
#endif
|
||||||
|
|
||||||
/* --- PRIVATE VARIABLES ---------------------------------------------------- */
|
/* --- PRIVATE VARIABLES ---------------------------------------------------- */
|
||||||
|
|
||||||
|
|||||||
@@ -62,9 +62,15 @@ static uint8_t get_protocol_eq(uint8_t data, int pos) {
|
|||||||
static void set_led_color_rgb(LED_TYPE color, int pos) {
|
static void set_led_color_rgb(LED_TYPE color, int pos) {
|
||||||
uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
|
uint8_t* tx_start = &txbuf[PREAMBLE_SIZE];
|
||||||
|
|
||||||
|
#if (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_GRB)
|
||||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.g, j);
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.g, j);
|
||||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.r, j);
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.r, j);
|
||||||
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
|
||||||
|
#elif (WS2812_BYTE_ORDER == WS2812_BYTE_ORDER_RGB)
|
||||||
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + j] = get_protocol_eq(color.r, j);
|
||||||
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE + j] = get_protocol_eq(color.g, j);
|
||||||
|
for (int j = 0; j < 4; j++) tx_start[BYTES_FOR_LED * pos + BYTES_FOR_LED_BYTE * 2 + j] = get_protocol_eq(color.b, j);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void ws2812_init(void) {
|
void ws2812_init(void) {
|
||||||
|
|||||||
@@ -49,6 +49,11 @@
|
|||||||
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
# define EXTERNAL_EEPROM_PAGE_SIZE 64
|
||||||
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
|
#elif defined(EEPROM_I2C_24LC64)
|
||||||
|
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
|
||||||
|
# define EXTERNAL_EEPROM_PAGE_SIZE 32
|
||||||
|
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||||
|
# define EXTERNAL_EEPROM_WRITE_TIME 5
|
||||||
#elif defined(EEPROM_I2C_MB85RC256V)
|
#elif defined(EEPROM_I2C_MB85RC256V)
|
||||||
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
# define EXTERNAL_EEPROM_BYTE_COUNT 32768
|
||||||
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
# define EXTERNAL_EEPROM_PAGE_SIZE 128
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "hal.h"
|
#include <hal.h>
|
||||||
#include "eeprom_driver.h"
|
#include "eeprom_driver.h"
|
||||||
#include "eeprom_stm32_L0_L1.h"
|
#include "eeprom_stm32_L0_L1.h"
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,6 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
uint8_t DRV2605L_transfer_buffer[2];
|
uint8_t DRV2605L_transfer_buffer[2];
|
||||||
uint8_t DRV2605L_tx_register[0];
|
|
||||||
uint8_t DRV2605L_read_buffer[0];
|
|
||||||
uint8_t DRV2605L_read_register;
|
uint8_t DRV2605L_read_register;
|
||||||
|
|
||||||
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
void DRV_write(uint8_t drv_register, uint8_t settings) {
|
||||||
@@ -32,8 +30,7 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t DRV_read(uint8_t regaddress) {
|
uint8_t DRV_read(uint8_t regaddress) {
|
||||||
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100);
|
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, &DRV2605L_read_register, 1, 100);
|
||||||
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
|
|
||||||
|
|
||||||
return DRV2605L_read_register;
|
return DRV2605L_read_register;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <timer.h>
|
#include "timer.h"
|
||||||
#include "solenoid.h"
|
#include "solenoid.h"
|
||||||
#include "haptic.h"
|
#include "haptic.h"
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ uint8_t g_twi_transfer_buffer[20];
|
|||||||
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
|
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's
|
||||||
// probably not worth the extra complexity.
|
// probably not worth the extra complexity.
|
||||||
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
|
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
|
||||||
bool g_pwm_buffer_update_required = false;
|
bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
|
||||||
|
|
||||||
/* There's probably a better way to init this... */
|
/* There's probably a better way to init this... */
|
||||||
#if LED_DRIVER_COUNT == 1
|
#if LED_DRIVER_COUNT == 1
|
||||||
@@ -75,7 +75,7 @@ uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
|
|||||||
#elif LED_DRIVER_COUNT == 4
|
#elif LED_DRIVER_COUNT == 4
|
||||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
||||||
#endif
|
#endif
|
||||||
bool g_led_control_registers_update_required = false;
|
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
|
||||||
|
|
||||||
// This is the bit pattern in the LED control registers
|
// This is the bit pattern in the LED control registers
|
||||||
// (for matrix A, add one to register for matrix B)
|
// (for matrix A, add one to register for matrix B)
|
||||||
@@ -190,8 +190,8 @@ void IS31FL3731_set_value(int index, uint8_t value) {
|
|||||||
is31_led led = g_is31_leds[index];
|
is31_led led = g_is31_leds[index];
|
||||||
|
|
||||||
// Subtract 0x24 to get the second index of g_pwm_buffer
|
// Subtract 0x24 to get the second index of g_pwm_buffer
|
||||||
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
||||||
g_pwm_buffer_update_required = true;
|
g_pwm_buffer_update_required[led.driver] = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,20 +213,21 @@ void IS31FL3731_set_led_control_register(uint8_t index, bool value) {
|
|||||||
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_led_control_registers_update_required = true;
|
g_led_control_registers_update_required[led.driver] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
void IS31FL3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||||
if (g_pwm_buffer_update_required) {
|
if (g_pwm_buffer_update_required[index]) {
|
||||||
IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
IS31FL3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
||||||
g_pwm_buffer_update_required = false;
|
g_pwm_buffer_update_required[index] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
void IS31FL3731_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]) {
|
||||||
for (int i = 0; i < 18; i++) {
|
for (int i = 0; i < 18; i++) {
|
||||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||||
}
|
}
|
||||||
|
g_led_control_registers_update_required[index] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -271,6 +271,10 @@ static void rotate_90(const uint8_t *src, uint8_t *dest) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void oled_render(void) {
|
void oled_render(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Do we have work to do?
|
// Do we have work to do?
|
||||||
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
oled_dirty &= OLED_ALL_BLOCKS_MASK;
|
||||||
if (!oled_dirty || oled_scrolling) {
|
if (!oled_dirty || oled_scrolling) {
|
||||||
@@ -527,6 +531,10 @@ void oled_write_raw_P(const char *data, uint16_t size) {
|
|||||||
#endif // defined(__AVR__)
|
#endif // defined(__AVR__)
|
||||||
|
|
||||||
bool oled_on(void) {
|
bool oled_on(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_active;
|
||||||
|
}
|
||||||
|
|
||||||
#if OLED_TIMEOUT > 0
|
#if OLED_TIMEOUT > 0
|
||||||
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
oled_timeout = timer_read32() + OLED_TIMEOUT;
|
||||||
#endif
|
#endif
|
||||||
@@ -543,6 +551,10 @@ bool oled_on(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_off(void) {
|
bool oled_off(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return !oled_active;
|
||||||
|
}
|
||||||
|
|
||||||
static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF};
|
static const uint8_t PROGMEM display_off[] = {I2C_CMD, DISPLAY_OFF};
|
||||||
if (oled_active) {
|
if (oled_active) {
|
||||||
if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_off) != I2C_STATUS_SUCCESS) {
|
||||||
@@ -557,6 +569,10 @@ bool oled_off(void) {
|
|||||||
bool is_oled_on(void) { return oled_active; }
|
bool is_oled_on(void) { return oled_active; }
|
||||||
|
|
||||||
uint8_t oled_set_brightness(uint8_t level) {
|
uint8_t oled_set_brightness(uint8_t level) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_brightness;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
||||||
if (oled_brightness != level) {
|
if (oled_brightness != level) {
|
||||||
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
||||||
@@ -596,6 +612,10 @@ void oled_scroll_set_speed(uint8_t speed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_scroll_right(void) {
|
bool oled_scroll_right(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
@@ -610,6 +630,10 @@ bool oled_scroll_right(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_scroll_left(void) {
|
bool oled_scroll_left(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
// Dont enable scrolling if we need to update the display
|
// Dont enable scrolling if we need to update the display
|
||||||
// This prevents scrolling of bad data from starting the scroll too early after init
|
// This prevents scrolling of bad data from starting the scroll too early after init
|
||||||
if (!oled_dirty && !oled_scrolling) {
|
if (!oled_dirty && !oled_scrolling) {
|
||||||
@@ -624,6 +648,10 @@ bool oled_scroll_left(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool oled_scroll_off(void) {
|
bool oled_scroll_off(void) {
|
||||||
|
if (!oled_initialized) {
|
||||||
|
return !oled_scrolling;
|
||||||
|
}
|
||||||
|
|
||||||
if (oled_scrolling) {
|
if (oled_scrolling) {
|
||||||
static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL};
|
static const uint8_t PROGMEM display_scroll_off[] = {I2C_CMD, DEACTIVATE_SCROLL};
|
||||||
if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
|
if (I2C_TRANSMIT_P(display_scroll_off) != I2C_STATUS_SUCCESS) {
|
||||||
|
|||||||
@@ -28,11 +28,11 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "micro_oled.h"
|
#include "micro_oled.h"
|
||||||
#include <print.h>
|
#include "print.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "util/font5x7.h"
|
#include "util/font5x7.h"
|
||||||
#include "util/font8x16.h"
|
#include "util/font8x16.h"
|
||||||
#include "string.h"
|
#include <string.h>
|
||||||
|
|
||||||
#define TOTALFONTS 2
|
#define TOTALFONTS 2
|
||||||
const unsigned char* fonts_pointer[] = {font5x7, font8x16};
|
const unsigned char* fonts_pointer[] = {font5x7, font8x16};
|
||||||
|
|||||||
Whitespace-only changes.
@@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.*/
|
|||||||
/* key matrix size */
|
/* key matrix size */
|
||||||
#define MATRIX_ROWS 4
|
#define MATRIX_ROWS 4
|
||||||
#define MATRIX_COLS 3
|
#define MATRIX_COLS 3
|
||||||
#define MATRIX_ROW_PINS { F6, F5, F4, F1 }
|
#define MATRIX_ROW_PINS { F0, F5, F4, F6 }
|
||||||
#define MATRIX_COL_PINS { D6, D7, B5 }
|
#define MATRIX_COL_PINS { D6, D7, B5 }
|
||||||
#define UNUSED_PINS
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
|||||||
Whitespace-only changes.
@@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "config_common.h"
|
#include "config_common.h"
|
||||||
|
|
||||||
/* USB Device descriptor parameter */
|
/* USB Device descriptor parameter */
|
||||||
#define VENDOR_ID 0xCEEB
|
#define VENDOR_ID 0x3430 // "40"
|
||||||
#define PRODUCT_ID 0x0510
|
#define PRODUCT_ID 0x4D68 // "M68"
|
||||||
#define DEVICE_VER 0x0101
|
#define DEVICE_VER 0x0101
|
||||||
#define MANUFACTURER di0ib
|
#define MANUFACTURER di0ib
|
||||||
#define PRODUCT MF68
|
#define PRODUCT MF68
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
/* Copyright 2020 MechMerlin
|
||||||
|
*
|
||||||
|
* This program is free software: you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation, either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = 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,
|
||||||
|
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
|
),
|
||||||
|
[1] = 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
|
||||||
|
),
|
||||||
|
[2] = LAYOUT_68_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
[3] = LAYOUT_68_ansi(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
|
LTO_ENABLE = yes
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
{ K40, K41, K42, K43, K44, K45, K46, K47, K48 }, \
|
||||||
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
{ K50, K51, K52, K53, K54, K55, K56, K57, K58 }, \
|
||||||
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
{ K60, K61, K62, K63, K64, K65, K66, K67, K68 }, \
|
||||||
{ K70, K71, K72, K73, K74 } \
|
{ K70, K71, K72, K73, K74, KC_NO, KC_NO, KC_NO, KC_NO } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_kc( \
|
#define LAYOUT_kc( \
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ BOOTLOADER = caterina
|
|||||||
# Build Options
|
# Build Options
|
||||||
# change yes to no to disable
|
# change yes to no to disable
|
||||||
#
|
#
|
||||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
CONSOLE_ENABLE = no # Console for debug
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
@@ -22,7 +22,7 @@ COMMAND_ENABLE = no # Commands for debug and configuration
|
|||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
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
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
NKRO_ENABLE = no # USB Nkey Rollover
|
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default
|
||||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
MIDI_ENABLE = no # MIDI controls
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include "stdint.h"
|
#include <stdint.h>
|
||||||
#include "led.h"
|
#include "led.h"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "bootleg Rev A",
|
||||||
|
"url": "https://github.com/4pplet/bootlegs",
|
||||||
|
"maintainer": "4pplet",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [
|
||||||
|
{ "label": "Esc", "x": 0, "y": 0 },
|
||||||
|
{ "label": "!", "x": 1, "y": 0 },
|
||||||
|
{ "label": "@", "x": 2, "y": 0 },
|
||||||
|
{ "label": "#", "x": 3, "y": 0 },
|
||||||
|
{ "label": "$", "x": 4, "y": 0 },
|
||||||
|
{ "label": "%", "x": 5, "y": 0 },
|
||||||
|
{ "label": "^", "x": 6, "y": 0 },
|
||||||
|
{ "label": "&", "x": 7, "y": 0 },
|
||||||
|
{ "label": "*", "x": 8, "y": 0 },
|
||||||
|
{ "label": "(", "x": 9, "y": 0 },
|
||||||
|
{ "label": ")", "x": 10, "y": 0 },
|
||||||
|
{ "label": "_", "x": 11, "y": 0 },
|
||||||
|
{ "label": "+", "x": 12, "y": 0 },
|
||||||
|
{ "label": "|", "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": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||||
|
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||||
|
{ "label": "A", "x": 1.75, "y": 2 },
|
||||||
|
{ "label": "S", "x": 2.75, "y": 2 },
|
||||||
|
{ "label": "D", "x": 3.75, "y": 2 },
|
||||||
|
{ "label": "F", "x": 4.75, "y": 2 },
|
||||||
|
{ "label": "G", "x": 5.75, "y": 2 },
|
||||||
|
{ "label": "H", "x": 6.75, "y": 2 },
|
||||||
|
{ "label": "J", "x": 7.75, "y": 2 },
|
||||||
|
{ "label": "K", "x": 8.75, "y": 2 },
|
||||||
|
{ "label": "L", "x": 9.75, "y": 2 },
|
||||||
|
{ "label": ":", "x": 10.75, "y": 2 },
|
||||||
|
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||||
|
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||||
|
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||||
|
{ "label": "|", "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, "w": 1 },
|
||||||
|
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 },
|
||||||
|
{ "label": "Space2", "x": 6, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 },
|
||||||
|
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// main layer
|
||||||
|
[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_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_LCTRL, 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,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, MO(1)),
|
||||||
|
// basic function layer
|
||||||
|
[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_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_UP, KC_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_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
// main layer
|
||||||
|
[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_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_LCTRL, 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,
|
||||||
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_APP, MO(1)),
|
||||||
|
// basic function layer
|
||||||
|
[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_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_UP, KC_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_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
// extra layer for VIA
|
||||||
|
[2] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
|
// extra layer for VIA
|
||||||
|
[3] = LAYOUT_all(
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||||
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
VIA_ENABLE = yes
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# bootleg
|
||||||
|
|
||||||
|
A 60% PCB for non tray-mount keyboards
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||||
|
* Hardware Supported: bootleg Rev A
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 4pplet/bootleg/rev_a: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).
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4444
|
||||||
|
#define PRODUCT_ID 0x0004
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER 4pplet
|
||||||
|
#define PRODUCT bootleg Rev A
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 15
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
#define MATRIX_ROW_PINS {D0,C2,C4,D4,D2}
|
||||||
|
#define MATRIX_COL_PINS {C5,C6,C7,B7,B6,B5,B4,B3,B2,B1,B0,D6,D5,D3,D1}
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
#define QMK_ESC_OUTPUT C4 // usually COL
|
||||||
|
#define QMK_ESC_INPUT D0 // usually ROW
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# bootleg
|
||||||
|
|
||||||
|
A 60% PCB for non tray-mount keyboards
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||||
|
* Hardware Supported: bootleg Rev A
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 4pplet/bootleg/rev_a: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).
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "rev_a.h"
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#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, k1d, k1e, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||||
|
k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e}, \
|
||||||
|
{k40, k41, k43, k45, k47, k48, k4a, k4b, k4d, k4e } \
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
{
|
||||||
|
"keyboard_name": "Waffling60 Rev A",
|
||||||
|
"url": "https://github.com/4pplet/waffling60",
|
||||||
|
"maintainer": "4pplet",
|
||||||
|
"width": 15,
|
||||||
|
"height": 5,
|
||||||
|
"layouts": {
|
||||||
|
"LAYOUT_all": {
|
||||||
|
"layout": [
|
||||||
|
{ "label": "Esc", "x": 0, "y": 0 },
|
||||||
|
{ "label": "!", "x": 1, "y": 0 },
|
||||||
|
{ "label": "@", "x": 2, "y": 0 },
|
||||||
|
{ "label": "#", "x": 3, "y": 0 },
|
||||||
|
{ "label": "$", "x": 4, "y": 0 },
|
||||||
|
{ "label": "%", "x": 5, "y": 0 },
|
||||||
|
{ "label": "^", "x": 6, "y": 0 },
|
||||||
|
{ "label": "&", "x": 7, "y": 0 },
|
||||||
|
{ "label": "*", "x": 8, "y": 0 },
|
||||||
|
{ "label": "(", "x": 9, "y": 0 },
|
||||||
|
{ "label": ")", "x": 10, "y": 0 },
|
||||||
|
{ "label": "_", "x": 11, "y": 0 },
|
||||||
|
{ "label": "+", "x": 12, "y": 0 },
|
||||||
|
{ "label": "|", "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": "Backsp.", "x": 13.5, "y": 1, "w": 1.5 },
|
||||||
|
{ "label": "Caps Lock", "x": 0, "y": 2, "w": 1.75 },
|
||||||
|
{ "label": "A", "x": 1.75, "y": 2 },
|
||||||
|
{ "label": "S", "x": 2.75, "y": 2 },
|
||||||
|
{ "label": "D", "x": 3.75, "y": 2 },
|
||||||
|
{ "label": "F", "x": 4.75, "y": 2 },
|
||||||
|
{ "label": "G", "x": 5.75, "y": 2 },
|
||||||
|
{ "label": "H", "x": 6.75, "y": 2 },
|
||||||
|
{ "label": "J", "x": 7.75, "y": 2 },
|
||||||
|
{ "label": "K", "x": 8.75, "y": 2 },
|
||||||
|
{ "label": "L", "x": 9.75, "y": 2 },
|
||||||
|
{ "label": ":", "x": 10.75, "y": 2 },
|
||||||
|
{ "label": "\"", "x": 11.75, "y": 2 },
|
||||||
|
{ "label": "Enter", "x": 12.75, "y": 2, "w": 2.25 },
|
||||||
|
{ "label": "Shift", "x": 0, "y": 3, "w": 1.25 },
|
||||||
|
{ "label": "|", "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, "w": 1 },
|
||||||
|
{ "label": "Ctrl", "x": 0, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Win", "x": 1.25, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Alt", "x": 2.5, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Space1", "x": 3.75, "y": 4, "w": 2.25 },
|
||||||
|
{ "label": "Space2", "x": 6, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Space3", "x": 7.25, "y": 4, "w": 2.75 },
|
||||||
|
{ "label": "Alt", "x": 10, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Menu", "x": 11.25, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Win", "x": 12.5, "y": 4, "w": 1.25 },
|
||||||
|
{ "label": "Ctrl", "x": 13.75, "y": 4, "w": 1.25 }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ More info: https://geekhack.org/index.php?topic=103531.0
|
|||||||
|
|
||||||
Make example for this keyboard (after setting up your build environment):
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
make 4pplet/steezy60/rev_a:default
|
make 4pplet/waffling60/rev_a:default
|
||||||
|
make 4pplet/waffling60/rev_b: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).
|
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).
|
||||||
Whitespace-only changes.
@@ -0,0 +1,14 @@
|
|||||||
|
# waffling60
|
||||||
|
|
||||||
|
A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support.
|
||||||
|
|
||||||
|
More info: https://geekhack.org/index.php?topic=103531.0
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||||
|
* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 4pplet/waffling60/rev_a: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).
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4444
|
||||||
|
#define PRODUCT_ID 0x0005
|
||||||
|
#define DEVICE_VER 0x0002
|
||||||
|
#define MANUFACTURER 4pplet
|
||||||
|
#define PRODUCT waffling60 Rev B
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
// ROWS: Top to bottom, COLS: Left to right
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS {C2,D0,B0,D6,D5}
|
||||||
|
#define MATRIX_COL_PINS {C4,C5,D2,C6,C7,B7,B6,B5,B4,B3,B2,B1,D1,D4}
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
/* define if matrix has ghost */
|
||||||
|
//#define MATRIX_HAS_GHOST
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
#define QMK_ESC_OUTPUT C2 // usually COL
|
||||||
|
#define QMK_ESC_INPUT C4 // usually ROW
|
||||||
|
|
||||||
|
#define RGB_DI_PIN D3
|
||||||
|
#define RGBLED_NUM 1
|
||||||
|
#define BACKLIGHT_LEVELS 5
|
||||||
|
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
# waffling60
|
||||||
|
|
||||||
|
A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support.
|
||||||
|
|
||||||
|
More info: https://geekhack.org/index.php?topic=103531.0
|
||||||
|
|
||||||
|
* Keyboard Maintainer: [4pplet](https://github.com/4pplet)
|
||||||
|
* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60)
|
||||||
|
|
||||||
|
Make example for this keyboard (after setting up your build environment):
|
||||||
|
|
||||||
|
make 4pplet/waffling60/rev_b: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).
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include "rev_b.h"
|
||||||
|
|
||||||
|
bool led_update_kb(led_t led_state) {
|
||||||
|
bool res = led_update_user(led_state);
|
||||||
|
if(CAPS_LOCK_ENABLE){
|
||||||
|
if(res) {
|
||||||
|
if(led_state.caps_lock){
|
||||||
|
rgblight_enable();
|
||||||
|
rgblight_mode(1);
|
||||||
|
rgblight_sethsv_noeeprom(CAPS_LOCK_COLOR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
rgblight_disable_noeeprom();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 Stefan Sundin "4pplet" <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// defines to set RGB-led behaviour. Off by default
|
||||||
|
#define CAPS_LOCK_ENABLE false
|
||||||
|
#define CAPS_LOCK_COLOR HSV_ORANGE
|
||||||
|
|
||||||
|
#include "quantum.h"
|
||||||
|
|
||||||
|
#define LAYOUT_all( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k1d, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
|
||||||
|
k40, k41, k42, k44, k46, k48, k4a, k4b, k4c, k4d \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
|
||||||
|
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \
|
||||||
|
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \
|
||||||
|
{k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \
|
||||||
|
{k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d}, \
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
# MCU name
|
||||||
|
MCU = atmega32u2
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
MOUSEKEY_ENABLE = no # Mouse keys
|
||||||
|
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||||
|
CONSOLE_ENABLE = no # Console for debug
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||||
|
AUDIO_ENABLE = no # Audio output
|
||||||
Whitespace-only changes.
Whitespace-only changes.
Whitespace-only changes.
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"keyboard": "abacus",
|
||||||
|
"keymap": "default",
|
||||||
|
"layout": "LAYOUT",
|
||||||
|
"layers": [
|
||||||
|
["KC_ESCAPE", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_BSPACE", "KC_TAB", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCOLON", "KC_BSLASH", "KC_LSHIFT", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMMA", "KC_DOT", "KC_UP", "KC_DELETE", "KC_LCTRL", "KC_LGUI", "MO(1)", "KC_SPACE", "KC_ENTER", "MO(2)", "KC_LEFT", "KC_DOWN", "KC_RIGHT"],
|
||||||
|
["KC_GRAVE", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_LBRACKET", "KC_RBRACKET", "KC_QUOTE", "KC_SLASH", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MINUS", "KC_EQUAL", "KC_TRNS", "KC_TRNS", "KC_LALT", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_HOME", "KC_TRNS", "KC_END"],
|
||||||
|
["KC_GRV", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_TRNS", "KC_TRNS", "KC_F11", "KC_F12", "RGB_MODE_PLAIN", "RGB_MODE_BREATHE", "RGB_MODE_RAINBOW", "RGB_MODE_SWIRL", "RGB_MODE_SNAKE", "RGB_MODE_KNIGHT", "RGB_MODE_GRADIENT", "KC_NO", "RGB_TOG", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_HUI", "KC_CAPS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"]
|
||||||
|
]
|
||||||
|
}
|
||||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1 @@
|
|||||||
|
UNICODEMAP_ENABLE = yes
|
||||||
@@ -29,7 +29,6 @@ MIDI_ENABLE = no # MIDI support
|
|||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
UNICODEMAP_ENABLE = yes
|
|
||||||
ENCODER_ENABLE = yes
|
ENCODER_ENABLE = yes
|
||||||
DIP_SWITCH_ENABLE = yes
|
DIP_SWITCH_ENABLE = yes
|
||||||
LTO_ENABLE = yes
|
LTO_ENABLE = yes
|
||||||
@@ -27,13 +27,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \
|
||||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \
|
||||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k43, \
|
||||||
k40, k41, k42, k44, k46, k48, k4a, k4b, k4c, k4d \
|
k40, k41, k42, k44, k46, k48, k4a, k4d, k4b, k4c, k49 \
|
||||||
){ \
|
){ \
|
||||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \
|
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d }, \
|
||||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \
|
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d }, \
|
||||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \
|
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d }, \
|
||||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, ___, ___ }, \
|
||||||
{ k40, k41, k42, k43, k44, ___, k46, ___, k48, ___, k4a, k4b, k4c, k4d } \
|
{ k40, k41, k42, k43, k44, ___, k46, ___, k48, k49, k4a, k4b, k4c, k4d } \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LAYOUT_all_ansi_2u_lshift( \
|
#define LAYOUT_all_ansi_2u_lshift( \
|
||||||
|
|||||||
@@ -0,0 +1,714 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file rt/templates/chconf.h
|
||||||
|
* @brief Configuration file template.
|
||||||
|
* @details A copy of this file must be placed in each project directory, it
|
||||||
|
* contains the application specific kernel settings.
|
||||||
|
*
|
||||||
|
* @addtogroup config
|
||||||
|
* @details Kernel related settings and hooks.
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef CHCONF_H
|
||||||
|
#define CHCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_RT_CONF_
|
||||||
|
#define _CHIBIOS_RT_CONF_VER_6_0_
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name System timers settings
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System time counter resolution.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_RESOLUTION)
|
||||||
|
#define CH_CFG_ST_RESOLUTION 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick frequency.
|
||||||
|
* @details Frequency of the system timer that drives the system ticks. This
|
||||||
|
* setting also defines the system tick time unit.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_FREQUENCY)
|
||||||
|
#define CH_CFG_ST_FREQUENCY 10000
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time intervals data size.
|
||||||
|
* @note Allowed values are 16, 32 or 64 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_INTERVALS_SIZE)
|
||||||
|
#define CH_CFG_INTERVALS_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time types data size.
|
||||||
|
* @note Allowed values are 16 or 32 bits.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_TIME_TYPES_SIZE)
|
||||||
|
#define CH_CFG_TIME_TYPES_SIZE 32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time delta constant for the tick-less mode.
|
||||||
|
* @note If this value is zero then the system uses the classic
|
||||||
|
* periodic tick. This value represents the minimum number
|
||||||
|
* of ticks that is safe to specify in a timeout directive.
|
||||||
|
* The value one is not valid, timeouts are rounded up to
|
||||||
|
* this value.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_ST_TIMEDELTA)
|
||||||
|
#define CH_CFG_ST_TIMEDELTA 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel parameters and options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Round robin interval.
|
||||||
|
* @details This constant is the number of system ticks allowed for the
|
||||||
|
* threads before preemption occurs. Setting this value to zero
|
||||||
|
* disables the preemption for threads with equal priority and the
|
||||||
|
* round robin becomes cooperative. Note that higher priority
|
||||||
|
* threads can still preempt, the kernel is always preemptive.
|
||||||
|
* @note Disabling the round robin preemption makes the kernel more compact
|
||||||
|
* and generally faster.
|
||||||
|
* @note The round robin preemption is not supported in tickless mode and
|
||||||
|
* must be set to zero in that case.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_TIME_QUANTUM)
|
||||||
|
#define CH_CFG_TIME_QUANTUM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Managed RAM size.
|
||||||
|
* @details Size of the RAM area to be managed by the OS. If set to zero
|
||||||
|
* then the whole available RAM is used. The core memory is made
|
||||||
|
* available to the heap allocator and/or can be used directly through
|
||||||
|
* the simplified core memory allocator.
|
||||||
|
*
|
||||||
|
* @note In order to let the OS manage the whole RAM the linker script must
|
||||||
|
* provide the @p __heap_base__ and @p __heap_end__ symbols.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_MEMCORE_SIZE)
|
||||||
|
#define CH_CFG_MEMCORE_SIZE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread automatic spawn suppression.
|
||||||
|
* @details When this option is activated the function @p chSysInit()
|
||||||
|
* does not spawn the idle thread. The application @p main()
|
||||||
|
* function becomes the idle thread and must implement an
|
||||||
|
* infinite loop.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_NO_IDLE_THREAD)
|
||||||
|
#define CH_CFG_NO_IDLE_THREAD FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Performance options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OS optimization.
|
||||||
|
* @details If enabled then time efficient rather than space efficient code
|
||||||
|
* is used when two possible implementations exist.
|
||||||
|
*
|
||||||
|
* @note This is not related to the compiler optimization options.
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_OPTIMIZE_SPEED)
|
||||||
|
#define CH_CFG_OPTIMIZE_SPEED FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Subsystem options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Time Measurement APIs.
|
||||||
|
* @details If enabled then the time measurement APIs are included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_TM)
|
||||||
|
#define CH_CFG_USE_TM FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads registry APIs.
|
||||||
|
* @details If enabled then the registry APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_REGISTRY)
|
||||||
|
#define CH_CFG_USE_REGISTRY TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads synchronization APIs.
|
||||||
|
* @details If enabled then the @p chThdWait() function is included in
|
||||||
|
* the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_WAITEXIT)
|
||||||
|
#define CH_CFG_USE_WAITEXIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores APIs.
|
||||||
|
* @details If enabled then the Semaphores APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES)
|
||||||
|
#define CH_CFG_USE_SEMAPHORES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Semaphores queuing mode.
|
||||||
|
* @details If enabled then the threads are enqueued on semaphores by
|
||||||
|
* priority rather than in FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
|
||||||
|
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mutexes APIs.
|
||||||
|
* @details If enabled then the mutexes APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MUTEXES)
|
||||||
|
#define CH_CFG_USE_MUTEXES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables recursive behavior on mutexes.
|
||||||
|
* @note Recursive mutexes are heavier and have an increased
|
||||||
|
* memory footprint.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
|
||||||
|
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs.
|
||||||
|
* @details If enabled then the conditional variables APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MUTEXES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_CONDVARS)
|
||||||
|
#define CH_CFG_USE_CONDVARS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Conditional Variables APIs with timeout.
|
||||||
|
* @details If enabled then the conditional variables APIs with timeout
|
||||||
|
* specification are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_CONDVARS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
|
||||||
|
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs.
|
||||||
|
* @details If enabled then the event flags APIs are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_EVENTS)
|
||||||
|
#define CH_CFG_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Events Flags APIs with timeout.
|
||||||
|
* @details If enabled then the events APIs with timeout specification
|
||||||
|
* are included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_EVENTS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
|
||||||
|
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages APIs.
|
||||||
|
* @details If enabled then the synchronous messages APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES)
|
||||||
|
#define CH_CFG_USE_MESSAGES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Synchronous Messages queuing mode.
|
||||||
|
* @details If enabled then messages are served by priority rather than in
|
||||||
|
* FIFO order.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE. Enable this if you have special
|
||||||
|
* requirements.
|
||||||
|
* @note Requires @p CH_CFG_USE_MESSAGES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
|
||||||
|
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Mailboxes APIs.
|
||||||
|
* @details If enabled then the asynchronous messages (mailboxes) APIs are
|
||||||
|
* included in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MAILBOXES)
|
||||||
|
#define CH_CFG_USE_MAILBOXES TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Core Memory Manager APIs.
|
||||||
|
* @details If enabled then the core memory manager APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMCORE)
|
||||||
|
#define CH_CFG_USE_MEMCORE FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Heap Allocator APIs.
|
||||||
|
* @details If enabled then the memory heap allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or
|
||||||
|
* @p CH_CFG_USE_SEMAPHORES.
|
||||||
|
* @note Mutexes are recommended.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_HEAP)
|
||||||
|
#define CH_CFG_USE_HEAP FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Memory Pools Allocator APIs.
|
||||||
|
* @details If enabled then the memory pools allocator APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_MEMPOOLS)
|
||||||
|
#define CH_CFG_USE_MEMPOOLS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects FIFOs APIs.
|
||||||
|
* @details If enabled then the objects FIFOs APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_OBJ_FIFOS)
|
||||||
|
#define CH_CFG_USE_OBJ_FIFOS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Pipes APIs.
|
||||||
|
* @details If enabled then the pipes APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_PIPES)
|
||||||
|
#define CH_CFG_USE_PIPES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Dynamic Threads APIs.
|
||||||
|
* @details If enabled then the dynamic threads creation APIs are included
|
||||||
|
* in the kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p TRUE.
|
||||||
|
* @note Requires @p CH_CFG_USE_WAITEXIT.
|
||||||
|
* @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_DYNAMIC)
|
||||||
|
#define CH_CFG_USE_DYNAMIC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Objects factory options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Objects Factory APIs.
|
||||||
|
* @details If enabled then the objects factory APIs are included in the
|
||||||
|
* kernel.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_USE_FACTORY)
|
||||||
|
#define CH_CFG_USE_FACTORY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Maximum length for object names.
|
||||||
|
* @details If the specified length is zero then the name is stored by
|
||||||
|
* pointer but this could have unintended side effects.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
|
||||||
|
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the registry of generic objects.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
|
||||||
|
#define CH_CFG_FACTORY_OBJECTS_REGISTRY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for generic buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
|
||||||
|
#define CH_CFG_FACTORY_GENERIC_BUFFERS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for semaphores.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_SEMAPHORES)
|
||||||
|
#define CH_CFG_FACTORY_SEMAPHORES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for mailboxes.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_MAILBOXES)
|
||||||
|
#define CH_CFG_FACTORY_MAILBOXES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for objects FIFOs.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
|
||||||
|
#define CH_CFG_FACTORY_OBJ_FIFOS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables factory for Pipes.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
|
||||||
|
#define CH_CFG_FACTORY_PIPES FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Debug options
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, kernel statistics.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_STATISTICS)
|
||||||
|
#define CH_DBG_STATISTICS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, system state check.
|
||||||
|
* @details If enabled the correct call protocol for system APIs is checked
|
||||||
|
* at runtime.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_SYSTEM_STATE_CHECK)
|
||||||
|
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, parameters checks.
|
||||||
|
* @details If enabled then the checks on the API functions input
|
||||||
|
* parameters are activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_CHECKS)
|
||||||
|
#define CH_DBG_ENABLE_CHECKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, consistency checks.
|
||||||
|
* @details If enabled then all the assertions in the kernel code are
|
||||||
|
* activated. This includes consistency checks inside the kernel,
|
||||||
|
* runtime anomalies and port-defined checks.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_ASSERTS)
|
||||||
|
#define CH_DBG_ENABLE_ASSERTS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, trace buffer.
|
||||||
|
* @details If enabled then the trace buffer is activated.
|
||||||
|
*
|
||||||
|
* @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_TRACE_MASK)
|
||||||
|
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace buffer entries.
|
||||||
|
* @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
|
||||||
|
* different from @p CH_DBG_TRACE_MASK_DISABLED.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_TRACE_BUFFER_SIZE)
|
||||||
|
#define CH_DBG_TRACE_BUFFER_SIZE 128
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stack checks.
|
||||||
|
* @details If enabled then a runtime stack check is performed.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note The stack check is performed in a architecture/port dependent way.
|
||||||
|
* It may not be implemented or some ports.
|
||||||
|
* @note The default failure mode is to halt the system with the global
|
||||||
|
* @p panic_msg variable set to @p NULL.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_ENABLE_STACK_CHECK)
|
||||||
|
#define CH_DBG_ENABLE_STACK_CHECK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, stacks initialization.
|
||||||
|
* @details If enabled then the threads working area is filled with a byte
|
||||||
|
* value when a thread is created. This can be useful for the
|
||||||
|
* runtime measurement of the used stack.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_FILL_THREADS)
|
||||||
|
#define CH_DBG_FILL_THREADS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Debug option, threads profiling.
|
||||||
|
* @details If enabled then a field is added to the @p thread_t structure that
|
||||||
|
* counts the system ticks occurred while executing the thread.
|
||||||
|
*
|
||||||
|
* @note The default is @p FALSE.
|
||||||
|
* @note This debug option is not currently compatible with the
|
||||||
|
* tickless mode.
|
||||||
|
*/
|
||||||
|
#if !defined(CH_DBG_THREADS_PROFILING)
|
||||||
|
#define CH_DBG_THREADS_PROFILING FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/**
|
||||||
|
* @name Kernel hooks
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System structure extension.
|
||||||
|
* @details User fields added to the end of the @p ch_system_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System initialization hook.
|
||||||
|
* @details User initialization code added to the @p chSysInit() function
|
||||||
|
* just before interrupts are enabled globally.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_INIT_HOOK() { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads descriptor structure extension.
|
||||||
|
* @details User fields added to the end of the @p thread_t structure.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXTRA_FIELDS \
|
||||||
|
/* Add threads custom fields here.*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads initialization hook.
|
||||||
|
* @details User initialization code added to the @p _thread_init() function.
|
||||||
|
*
|
||||||
|
* @note It is invoked from within @p _thread_init() and implicitly from all
|
||||||
|
* the threads creation APIs.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_INIT_HOOK(tp) { \
|
||||||
|
/* Add threads initialization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Threads finalization hook.
|
||||||
|
* @details User finalization code added to the @p chThdExit() API.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_THREAD_EXIT_HOOK(tp) { \
|
||||||
|
/* Add threads finalization code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Context switch hook.
|
||||||
|
* @details This hook is invoked just before switching between threads.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \
|
||||||
|
/* Context switch code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR enter hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_PROLOGUE_HOOK() { \
|
||||||
|
/* IRQ prologue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief ISR exit hook.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IRQ_EPILOGUE_HOOK() { \
|
||||||
|
/* IRQ epilogue code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread enter hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to activate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_ENTER_HOOK() { \
|
||||||
|
/* Idle-enter code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle thread leave hook.
|
||||||
|
* @note This hook is invoked within a critical zone, no OS functions
|
||||||
|
* should be invoked from here.
|
||||||
|
* @note This macro can be used to deactivate a power saving mode.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LEAVE_HOOK() { \
|
||||||
|
/* Idle-leave code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Idle Loop hook.
|
||||||
|
* @details This hook is continuously invoked by the idle thread loop.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_IDLE_LOOP_HOOK() { \
|
||||||
|
/* Idle loop code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System tick event hook.
|
||||||
|
* @details This hook is invoked in the system tick handler immediately
|
||||||
|
* after processing the virtual timers queue.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_TICK_HOOK() { \
|
||||||
|
/* System tick event code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief System halt hook.
|
||||||
|
* @details This hook is invoked in case to a system halting error before
|
||||||
|
* the system is halted.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \
|
||||||
|
/* System halt code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Trace hook.
|
||||||
|
* @details This hook is invoked each time a new record is written in the
|
||||||
|
* trace buffer.
|
||||||
|
*/
|
||||||
|
#define CH_CFG_TRACE_HOOK(tep) { \
|
||||||
|
/* Trace code here.*/ \
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @} */
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* Port-specific settings (override port settings defaulted in chcore.h). */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
#endif /* CHCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Álvaro "Gondolindrim" Volpato <[email protected]>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4150 // AP for AcheronProject
|
||||||
|
#define PRODUCT_ID 0x7641 // LA for Lasgweloth
|
||||||
|
#define DEVICE_VER 0x0001
|
||||||
|
#define MANUFACTURER AcheronProect
|
||||||
|
#define PRODUCT Lasgweloth
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 5
|
||||||
|
#define MATRIX_COLS 14
|
||||||
|
|
||||||
|
#define MATRIX_COL_PINS { B12, A2 , A1 , A0 , F1 , F0 , C15, C14, C13, A7 , A6 , A5 , A4 , B7}
|
||||||
|
#define MATRIX_ROW_PINS { B9 , B8 , A3 , B0 , B1 }
|
||||||
|
#define DIODE_DIRECTION COL2ROW
|
||||||
|
|
||||||
|
//#define BACKLIGHT_PIN A6
|
||||||
|
//#define BACKLIGHT_PWM_DRIVER PWMD3
|
||||||
|
//#define BACKLIGHT_PWM_CHANNEL 1
|
||||||
|
//#define BACKLIGHT_PAL_MODE 1
|
||||||
|
//#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
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
||||||
@@ -0,0 +1,525 @@
|
|||||||
|
/*
|
||||||
|
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @file templates/halconf.h
|
||||||
|
* @brief HAL configuration header.
|
||||||
|
* @details HAL configuration file, this file allows to enable or disable the
|
||||||
|
* various device drivers from your application. You may also use
|
||||||
|
* this file in order to override the device drivers default settings.
|
||||||
|
*
|
||||||
|
* @addtogroup HAL_CONF
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef HALCONF_H
|
||||||
|
#define HALCONF_H
|
||||||
|
|
||||||
|
#define _CHIBIOS_HAL_CONF_
|
||||||
|
#define _CHIBIOS_HAL_CONF_VER_7_0_
|
||||||
|
|
||||||
|
#include "mcuconf.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the PAL subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_PAL TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the ADC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_ADC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the CAN subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CAN FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the cryptographic subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_CRY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the DAC subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_DAC FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the 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 FALSE
|
||||||
|
#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 SIO subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SIO FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_SPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the TRNG subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_TRNG FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the UART subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_UART 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
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the WSPI subsystem.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_USE_WSPI FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* PAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
#define PAL_USE_CALLBACKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define PAL_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* ADC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define ADC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CAN driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sleep mode related APIs inclusion switch.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_USE_SLEEP_MODE TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enforces the driver to use direct callbacks rather than OSAL events.
|
||||||
|
*/
|
||||||
|
#if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
|
||||||
|
#define CAN_ENFORCE_USE_CALLBACKS FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* CRY driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the SW fall-back of the cryptographic driver.
|
||||||
|
* @details When enabled, this option, activates a fall-back software
|
||||||
|
* implementation for algorithms not supported by the underlying
|
||||||
|
* hardware.
|
||||||
|
* @note Fall-back implementations may not be present for all algorithms.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_CRY_USE_FALLBACK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Makes the driver forcibly use the fall-back implementations.
|
||||||
|
*/
|
||||||
|
#if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
|
||||||
|
#define HAL_CRY_ENFORCE_FALLBACK FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* DAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define DAC_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define DAC_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* I2C driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the mutual exclusion APIs on the I2C bus.
|
||||||
|
*/
|
||||||
|
#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define I2C_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MAC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the zero-copy API.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_ZERO_COPY FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables an event sources for incoming packets.
|
||||||
|
*/
|
||||||
|
#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__)
|
||||||
|
#define MAC_USE_EVENTS TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* MMC_SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
* This option is recommended also if the SPI driver does not
|
||||||
|
* use a DMA channel and heavily loads the CPU.
|
||||||
|
*/
|
||||||
|
#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define MMC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SDC driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Number of initialization attempts before rejecting the card.
|
||||||
|
* @note Attempts are performed at 10mS intervals.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_RETRY 100
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Include support for MMC cards.
|
||||||
|
* @note MMC support is not yet implemented so this option must be kept
|
||||||
|
* at @p FALSE.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_MMC_SUPPORT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Delays insertions.
|
||||||
|
* @details If enabled this options inserts delays into the MMC waiting
|
||||||
|
* routines releasing some extra CPU time for the threads with
|
||||||
|
* lower priority, this may slow down the driver a bit however.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_NICE_WAITING TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for V20 cards.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_OCR_V20 0x50FF8000U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief OCR initialization constant for non-V20 cards.
|
||||||
|
*/
|
||||||
|
#if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
|
||||||
|
#define SDC_INIT_OCR 0x80100000U
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SERIAL driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Default bit rate.
|
||||||
|
* @details Configuration parameter, this is the baud rate selected for the
|
||||||
|
* default configuration.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_DEFAULT_BITRATE 38400
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial buffers size.
|
||||||
|
* @details Configuration parameter, you can change the depth of the queue
|
||||||
|
* buffers depending on the requirements of your application.
|
||||||
|
* @note The default is 16 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_BUFFERS_SIZE 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 256 bytes for both the transmission and receive
|
||||||
|
* buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_SIZE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Serial over USB number of buffers.
|
||||||
|
* @note The default is 2 buffers.
|
||||||
|
*/
|
||||||
|
#if !defined(SERIAL_USB_BUFFERS_NUMBER) || defined(__DOXYGEN__)
|
||||||
|
#define SERIAL_USB_BUFFERS_NUMBER 2
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* SPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables circular transfers APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_CIRCULAR FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handling method for SPI CS line.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
|
||||||
|
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* UART driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_WAIT FALSE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p uartAcquireBus() and @p uartReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(UART_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define UART_USE_MUTUAL_EXCLUSION FALSE
|
||||||
|
#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
|
||||||
|
|
||||||
|
/*===========================================================================*/
|
||||||
|
/* WSPI driver related settings. */
|
||||||
|
/*===========================================================================*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables synchronous APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
|
||||||
|
#define WSPI_USE_WAIT TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
|
||||||
|
* @note Disabling this option saves both code and data space.
|
||||||
|
*/
|
||||||
|
#if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
|
||||||
|
#define WSPI_USE_MUTUAL_EXCLUSION TRUE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* HALCONF_H */
|
||||||
|
|
||||||
|
/** @} */
|
||||||
Loaded 100 of 1420 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user