mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-05 05:52:08 +00:00
Compare commits
274 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
cc08e3082e | ||
![]() |
02fb0de59b | ||
![]() |
8724a70c4c | ||
![]() |
485e4524f4 | ||
![]() |
ce91dd4bf3 | ||
![]() |
5909c243d4 | ||
![]() |
67976da039 | ||
![]() |
05ac139a29 | ||
![]() |
81164c1663 | ||
![]() |
c66df16644 | ||
![]() |
15385d4113 | ||
![]() |
16d55b14b7 | ||
![]() |
c41c8ff780 | ||
![]() |
c21d5a0973 | ||
![]() |
3afe0ea9b9 | ||
![]() |
1c0e8a6bb4 | ||
![]() |
10d9e8ed37 | ||
![]() |
d9613e6a33 | ||
![]() |
9c2cfe5c27 | ||
![]() |
f98e983141 | ||
![]() |
feae8f2980 | ||
![]() |
35b329052c | ||
![]() |
e8a65baf41 | ||
![]() |
d82e002737 | ||
![]() |
c78ef391dc | ||
![]() |
1bf657be41 | ||
![]() |
8897ab9b11 | ||
![]() |
50611bd814 | ||
![]() |
86b0acbae0 | ||
![]() |
24a741649d | ||
![]() |
0a9476bc2a | ||
![]() |
3fadfb565d | ||
![]() |
66b5c5eff2 | ||
![]() |
6e97a4c8b9 | ||
![]() |
429474d1c3 | ||
![]() |
6f9934c669 | ||
![]() |
c84650a147 | ||
![]() |
30afa1ccd3 | ||
![]() |
b8443863c0 | ||
![]() |
c731628946 | ||
![]() |
ca9edc5fe3 | ||
![]() |
a952bf2d31 | ||
![]() |
44d1b2e717 | ||
![]() |
8ddbb19df1 | ||
![]() |
95fd2ce81a | ||
![]() |
23222625c2 | ||
![]() |
4368611bfd | ||
![]() |
ccb15c2d29 | ||
![]() |
628d4a91b9 | ||
![]() |
9454f98099 | ||
![]() |
64572b5c4b | ||
![]() |
776d1adc76 | ||
![]() |
386cff8cf5 | ||
![]() |
e7497b3fba | ||
![]() |
6dc2d5956f | ||
![]() |
88a783a8a7 | ||
![]() |
3aef2bef8f | ||
![]() |
078586b21a | ||
![]() |
7bdc41b025 | ||
![]() |
66d52d8cd2 | ||
![]() |
0f8b0d971f | ||
![]() |
3270cbeb46 | ||
![]() |
ad9674c5af | ||
![]() |
e4aadf2c05 | ||
![]() |
f00402a2f3 | ||
![]() |
e1e13c53ac | ||
![]() |
1512e07817 | ||
![]() |
ad5cbe5982 | ||
![]() |
58f2e0439e | ||
![]() |
ddcb1794fa | ||
![]() |
adfd34c451 | ||
![]() |
3c156e130b | ||
![]() |
10782789be | ||
![]() |
cf3b683232 | ||
![]() |
a8967778d4 | ||
![]() |
503b762538 | ||
![]() |
88c09aa892 | ||
![]() |
69bb9b7386 | ||
![]() |
f3394139de | ||
![]() |
3e0789c961 | ||
![]() |
2ffac90c99 | ||
![]() |
e6a13e0b1c | ||
![]() |
aaea5e24b6 | ||
![]() |
b337ba798e | ||
![]() |
94e94ffb5b | ||
![]() |
cfc9a358c5 | ||
![]() |
e4236278b5 | ||
![]() |
81a17f4270 | ||
![]() |
bb9fbd66e9 | ||
![]() |
5edce6ba26 | ||
![]() |
91b44016f9 | ||
![]() |
45e16fd543 | ||
![]() |
a7afaa36a1 | ||
![]() |
d7c1b890f1 | ||
![]() |
0dee334bce | ||
![]() |
a422309354 | ||
![]() |
683ba8b8d4 | ||
![]() |
aae3b35c0f | ||
![]() |
abf1902ff5 | ||
![]() |
aa90cf1da8 | ||
![]() |
7595f53856 | ||
![]() |
8af767cb1d | ||
![]() |
a9f65b760a | ||
![]() |
53f11668a3 | ||
![]() |
2ef68a84b6 | ||
![]() |
489bee0ee4 | ||
![]() |
ed8d1d1ae7 | ||
![]() |
f38a3b7408 | ||
![]() |
16fe4b8b77 | ||
![]() |
84ca67f158 | ||
![]() |
cb80b59e93 | ||
![]() |
95bbd799a4 | ||
![]() |
1ff5ee255f | ||
![]() |
9cd3ffa5ba | ||
![]() |
ff7f70314e | ||
![]() |
db829c9453 | ||
![]() |
bd1c048a76 | ||
![]() |
4d33d72975 | ||
![]() |
7ce5402417 | ||
![]() |
b5ebdf1b3a | ||
![]() |
d7c90d805f | ||
![]() |
5f2c434954 | ||
![]() |
f2eb080aa2 | ||
![]() |
f12dcb0659 | ||
![]() |
262a607334 | ||
![]() |
7ef98e7f61 | ||
![]() |
d46fa2274c | ||
![]() |
e024147ce5 | ||
![]() |
c60cafae41 | ||
![]() |
38162af5a7 | ||
![]() |
e680af98d2 | ||
![]() |
4ba0cb7ebc | ||
![]() |
4b839db384 | ||
![]() |
e041ec1655 | ||
![]() |
75201c73a0 | ||
![]() |
8e71d3d053 | ||
![]() |
e69da2db2c | ||
![]() |
dc40f00aaf | ||
![]() |
c1481629fd | ||
![]() |
83eecdce22 | ||
![]() |
780b7722fb | ||
![]() |
86ac56cd7f | ||
![]() |
c1e69bcef0 | ||
![]() |
78019c3e21 | ||
![]() |
76bc235508 | ||
![]() |
fed9c97ddb | ||
![]() |
9f0dbc21a3 | ||
![]() |
c731432765 | ||
![]() |
f450bdbb41 | ||
![]() |
4fa1924bd7 | ||
![]() |
7b33897b97 | ||
![]() |
d705918f50 | ||
![]() |
a3f1defcd4 | ||
![]() |
fb579aae49 | ||
![]() |
67654e4a82 | ||
![]() |
952a4c8312 | ||
![]() |
b9ea10a80d | ||
![]() |
4e72224aa3 | ||
![]() |
1bfec6ddd9 | ||
![]() |
db9204c7e1 | ||
![]() |
27b8046867 | ||
![]() |
359aff6c49 | ||
![]() |
36f4f1e9b8 | ||
![]() |
f487b726cd | ||
![]() |
5cecc1ea1e | ||
![]() |
b9ed9d33d3 | ||
![]() |
2ac0927fd7 | ||
![]() |
9dad914841 | ||
![]() |
50481ce7ed | ||
![]() |
74a2edd903 | ||
![]() |
805e13a6d0 | ||
![]() |
fcd55e2f04 | ||
![]() |
8685409784 | ||
![]() |
1d85fe176a | ||
![]() |
a42e3ba2cb | ||
![]() |
c745cbb77a | ||
![]() |
6b1ae7e6aa | ||
![]() |
a602ef75fb | ||
![]() |
1ba93875ba | ||
![]() |
33074bcbad | ||
![]() |
555b1640b2 | ||
![]() |
f149c07d68 | ||
![]() |
2c92ee1f56 | ||
![]() |
0c42f91f4c | ||
![]() |
8ef82c466e | ||
![]() |
ad86894ae7 | ||
![]() |
af455a8368 | ||
![]() |
ac37a94e49 | ||
![]() |
24ae9232e2 | ||
![]() |
14cb662280 | ||
![]() |
3d183ed7a0 | ||
![]() |
4e30f4d102 | ||
![]() |
329eb4b8df | ||
![]() |
bf92957ff2 | ||
![]() |
33bd17a68a | ||
![]() |
7daad08a91 | ||
![]() |
d689f76110 | ||
![]() |
5d2deaca06 | ||
![]() |
8e7517aebc | ||
![]() |
b5f425b275 | ||
![]() |
47ce1a9ed0 | ||
![]() |
85f344db49 | ||
![]() |
225af5d161 | ||
![]() |
870cc37365 | ||
![]() |
9093f877a2 | ||
![]() |
5e9c078c78 | ||
![]() |
fe50bee988 | ||
![]() |
999326acc8 | ||
![]() |
8cbaea9e8d | ||
![]() |
e7d8ccdbb2 | ||
![]() |
c45d7e526c | ||
![]() |
f078980fb1 | ||
![]() |
619eb0071e | ||
![]() |
2b9b267e8e | ||
![]() |
f9bd9d3b26 | ||
![]() |
168ce1a743 | ||
![]() |
120c42255b | ||
![]() |
f9853433c1 | ||
![]() |
caf61a19c6 | ||
![]() |
ca6a3e0832 | ||
![]() |
4b2da8daf4 | ||
![]() |
c3ce06c2e7 | ||
![]() |
9f1f43bb86 | ||
![]() |
c4d87f3073 | ||
![]() |
8bb2eeaabb | ||
![]() |
c492dd7912 | ||
![]() |
7622678bd0 | ||
![]() |
0728a6b753 | ||
![]() |
e468380be6 | ||
![]() |
8456625655 | ||
![]() |
6ad813e811 | ||
![]() |
4d22bc9de0 | ||
![]() |
d49dcdd667 | ||
![]() |
f952d4f7b7 | ||
![]() |
8be058d55d | ||
![]() |
40e694ea0d | ||
![]() |
445cd95d17 | ||
![]() |
7d5ba88e6f | ||
![]() |
704934c427 | ||
![]() |
47ea522e79 | ||
![]() |
f663ba5ed0 | ||
![]() |
de0153f339 | ||
![]() |
3633330e1a | ||
![]() |
855dd2d218 | ||
![]() |
aa1c1c3865 | ||
![]() |
de68d294ec | ||
![]() |
f0a1ab5488 | ||
![]() |
1a2a838bc2 | ||
![]() |
67474f7e3f | ||
![]() |
39c473a639 | ||
![]() |
f871f7a56f | ||
![]() |
e0bdd51177 | ||
![]() |
fba7d4e32f | ||
![]() |
cab49809ad | ||
![]() |
42696a4f8c | ||
![]() |
a4dfa45f37 | ||
![]() |
616dc7dd5d | ||
![]() |
44f9017cb8 | ||
![]() |
3c4fa68000 | ||
![]() |
cb556b7a16 | ||
![]() |
87317a3af6 | ||
![]() |
92b7dff3ae | ||
![]() |
0dc74dd8c4 | ||
![]() |
6529cbac0d | ||
![]() |
139d28eaae | ||
![]() |
a1f129edd5 | ||
![]() |
73699cccbc | ||
![]() |
229dbcc547 | ||
![]() |
c738ce2f65 | ||
![]() |
c0b3034721 | ||
![]() |
f90688e550 | ||
![]() |
0f453bc5f7 | ||
![]() |
21357b658a | ||
![]() |
2c5ad9189c |
42
.github/labeler.yml
vendored
Normal file
42
.github/labeler.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
core:
|
||||
- quantum/**/*
|
||||
- tmk_core/**/*
|
||||
- drivers/**/*
|
||||
- tests/**/*
|
||||
- util/**/*
|
||||
- platforms/**/*
|
||||
- Makefile
|
||||
- '*.mk'
|
||||
dependencies:
|
||||
- any:
|
||||
- 'lib/**/*'
|
||||
- '!lib/python/**/*'
|
||||
keyboard:
|
||||
- any:
|
||||
- 'keyboards/**/*'
|
||||
- '!keyboards/**/keymaps/**/*'
|
||||
keymap:
|
||||
- users/**/*
|
||||
- layouts/**/*
|
||||
- keyboards/**/keymaps/**/*
|
||||
via:
|
||||
- keyboards/**/keymaps/via/*
|
||||
cli:
|
||||
- bin/qmk
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
python:
|
||||
- '**/*.py'
|
||||
documentation:
|
||||
- docs/**/*
|
||||
translation:
|
||||
- docs/fr-fr/**/*
|
||||
- docs/es/**/*
|
||||
- docs/ja/**/*
|
||||
- docs/he-il/**/*
|
||||
- docs/pt-br/**/*
|
||||
- docs/zh-cn/**/*
|
||||
- docs/de/**/*
|
||||
- docs/ru-ru/**/*
|
||||
CI:
|
||||
- .github/**/*
|
42
.github/workflows/api.yml
vendored
Normal file
42
.github/workflows/api.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Update API Data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
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:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards
|
||||
TARGET_FOLDER: v1
|
42
.github/workflows/develop_api.yml
vendored
Normal file
42
.github/workflows/develop_api.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
name: Update Develop API Data
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- develop
|
||||
paths:
|
||||
- 'keyboards/**'
|
||||
- 'layouts/community/**'
|
||||
|
||||
jobs:
|
||||
api_data:
|
||||
runs-on: ubuntu-latest
|
||||
container: qmkfm/base_container
|
||||
|
||||
# protect against those who work in their fork on develop
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
|
||||
- name: Generate API Data
|
||||
run: qmk generate-api
|
||||
|
||||
- name: Install rsync
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync
|
||||
|
||||
- name: Upload API Data
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
ACCESS_TOKEN: ${{ secrets.API_TOKEN_GITHUB }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: main
|
||||
FOLDER: api_data/v1
|
||||
CLEAN: true
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
||||
REPOSITORY_NAME: qmk/qmk_keyboards_devel
|
||||
TARGET_FOLDER: v1
|
37
.github/workflows/develop_update.yml
vendored
Normal file
37
.github/workflows/develop_update.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Update develop after master merge
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
|
||||
jobs:
|
||||
develop_update:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Checkout develop
|
||||
run: |
|
||||
git fetch origin master develop
|
||||
git checkout develop
|
||||
|
||||
- name: Check if branch locked
|
||||
id: check_locked
|
||||
uses: andstor/file-existence-action@v1
|
||||
with:
|
||||
files: ".locked"
|
||||
|
||||
- name: Update develop from master
|
||||
if: steps.check_locked.outputs.files_exists == 'false'
|
||||
run: |
|
||||
git config --global user.name "QMK Bot"
|
||||
git config --global user.email "hello@qmk.fm"
|
||||
git merge origin/master
|
||||
git push origin develop
|
43
.github/workflows/docs.yml
vendored
Normal file
43
.github/workflows/docs.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Generate Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'tmk_core/**'
|
||||
- 'quantum/**'
|
||||
- 'platforms/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
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:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync nodejs npm doxygen
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
qmk --verbose generate-docs
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@3.7.1
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
BRANCH: gh-pages
|
||||
FOLDER: .build/docs
|
||||
GIT_CONFIG_EMAIL: hello@qmk.fm
|
14
.github/workflows/labeler.yml
vendored
Normal file
14
.github/workflows/labeler.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: "Pull Request Labeler"
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review, locked]
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: '.github/labeler.yml'
|
@@ -6,7 +6,7 @@ on:
|
||||
- 'keyboards/**'
|
||||
|
||||
jobs:
|
||||
info:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: qmkfm/base_container
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
echo ${{ github.event.pull_request.base.sha }}
|
||||
echo '${{ steps.file_changes.outputs.files}}'
|
||||
|
||||
- name: Run qmk info
|
||||
- name: Run qmk lint
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
QMK_CHANGES=$(echo -e '${{ steps.file_changes.outputs.files}}')
|
||||
@@ -45,10 +45,11 @@ jobs:
|
||||
if [[ $KEYMAP_ONLY -gt 0 ]]; then
|
||||
echo "linting ${KB}"
|
||||
|
||||
# TODO: info info always returns 0 - right now the only way to know failure is to inspect log lines
|
||||
qmk info -l -kb ${KB} 2>&1 | tee /tmp/$$
|
||||
!(grep -cq ☒ /tmp/$$)
|
||||
: $((exit_code = $exit_code + $?))
|
||||
qmk lint --keyboard ${KB} && qmk info -l --keyboard ${KB}
|
||||
exit_code=$(($exit_code + $?))
|
||||
fi
|
||||
done
|
||||
if [[ $exit_code -gt 255 ]]; then
|
||||
exit 255
|
||||
fi
|
||||
exit $exit_code
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,6 +16,7 @@
|
||||
*.swp
|
||||
tags
|
||||
*~
|
||||
api_data/v1
|
||||
build/
|
||||
.build/
|
||||
*.bak
|
||||
|
@@ -18,21 +18,16 @@ addons:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-7
|
||||
packages:
|
||||
- pandoc
|
||||
- diffutils
|
||||
- dos2unix
|
||||
- doxygen
|
||||
- clang-format-7
|
||||
- libstdc++-7-dev
|
||||
install:
|
||||
- npm install -g moxygen
|
||||
script:
|
||||
- git fetch --depth=50 origin $TRAVIS_BRANCH:$TRAVIS_BRANCH
|
||||
- git rev-parse --short HEAD
|
||||
- git diff --name-only HEAD $TRAVIS_BRANCH
|
||||
- bash util/travis_test.sh
|
||||
- bash util/travis_build.sh
|
||||
- bash util/travis_docs.sh
|
||||
after_script:
|
||||
bash util/travis_compiled_push.sh
|
||||
notifications:
|
||||
|
24
Makefile
24
Makefile
@@ -272,11 +272,24 @@ endef
|
||||
define PARSE_RULE
|
||||
RULE := $1
|
||||
COMMANDS :=
|
||||
REQUIRE_PLATFORM_KEY :=
|
||||
# If the rule starts with all, then continue the parsing from
|
||||
# PARSE_ALL_KEYBOARDS
|
||||
ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all),true)
|
||||
KEYBOARD_RULE=all
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-avr),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := avr
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-chibios),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := chibios
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,all-arm_atsam),true)
|
||||
KEYBOARD_RULE=all
|
||||
REQUIRE_PLATFORM_KEY := arm_atsam
|
||||
$$(eval $$(call PARSE_ALL_KEYBOARDS))
|
||||
else ifeq ($$(call COMPARE_AND_REMOVE_FROM_RULE,test),true)
|
||||
$$(eval $$(call PARSE_TEST))
|
||||
# If the rule starts with the name of a known keyboard, then continue
|
||||
@@ -447,7 +460,7 @@ define PARSE_KEYMAP
|
||||
# Format it in bold
|
||||
KB_SP := $(BOLD)$$(KB_SP)$(NO_COLOR)
|
||||
# Specify the variables that we are passing forward to submake
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM)
|
||||
MAKE_VARS := KEYBOARD=$$(CURRENT_KB) KEYMAP=$$(CURRENT_KM) REQUIRE_PLATFORM_KEY=$$(REQUIRE_PLATFORM_KEY)
|
||||
# And the first part of the make command
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f build_keyboard.mk $$(MAKE_TARGET)
|
||||
# The message to display
|
||||
@@ -466,6 +479,8 @@ define BUILD
|
||||
LOG=$$$$($$(MAKE_CMD) $$(MAKE_VARS) SILENT=true 2>&1) ; \
|
||||
if [ $$$$? -gt 0 ]; \
|
||||
then $$(PRINT_ERROR_PLAIN); \
|
||||
elif [ "$$$$LOG" = "skipped" ] ; \
|
||||
then $$(PRINT_SKIPPED_PLAIN); \
|
||||
elif [ "$$$$LOG" != "" ] ; \
|
||||
then $$(PRINT_WARNING_PLAIN); \
|
||||
else \
|
||||
@@ -637,12 +652,13 @@ else
|
||||
endif
|
||||
ifndef SKIP_VERSION
|
||||
BUILD_DATE := $(shell date +"%Y-%m-%d-%H:%M:%S")
|
||||
else
|
||||
BUILD_DATE := 2020-01-01-00:00:00
|
||||
endif
|
||||
|
||||
$(shell echo '#define QMK_VERSION "$(GIT_VERSION)"' > $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define QMK_BUILDDATE "$(BUILD_DATE)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_VERSION "$(CHIBIOS_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
$(shell echo '#define CHIBIOS_CONTRIB_VERSION "$(CHIBIOS_CONTRIB_VERSION)"' >> $(ROOT_DIR)/quantum/version.h)
|
||||
else
|
||||
BUILD_DATE := NA
|
||||
endif
|
||||
|
||||
include $(ROOT_DIR)/testlist.mk
|
||||
|
1
api_data/_config.yml
Normal file
1
api_data/_config.yml
Normal file
@@ -0,0 +1 @@
|
||||
theme: jekyll-theme-cayman
|
5
api_data/readme.md
Normal file
5
api_data/readme.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# QMK Keyboard Metadata
|
||||
|
||||
This directory contains machine parsable data about keyboards supported by QMK. The latest version is always available online at <https://keyboards.qmk.fm>.
|
||||
|
||||
Do not edit anything here by hand. It is generated with the `qmk generate-api` command.
|
@@ -317,6 +317,13 @@ SRC += $(TMK_COMMON_SRC)
|
||||
OPT_DEFS += $(TMK_COMMON_DEFS)
|
||||
EXTRALDFLAGS += $(TMK_COMMON_LDFLAGS)
|
||||
|
||||
SKIP_COMPILE := no
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),)
|
||||
ifneq ($(REQUIRE_PLATFORM_KEY),$(PLATFORM_KEY))
|
||||
SKIP_COMPILE := yes
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(TMK_PATH)/$(PLATFORM_KEY).mk
|
||||
ifneq ($(strip $(PROTOCOL)),)
|
||||
include $(TMK_PATH)/protocol/$(strip $(shell echo $(PROTOCOL) | tr '[:upper:]' '[:lower:]')).mk
|
||||
@@ -352,7 +359,13 @@ $(KEYBOARD_OUTPUT)_INC := $(PROJECT_INC) $(GFXINC)
|
||||
$(KEYBOARD_OUTPUT)_CONFIG := $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
ifeq ($(SKIP_COMPILE),no)
|
||||
all: build check-size
|
||||
else
|
||||
all:
|
||||
echo "skipped" >&2
|
||||
endif
|
||||
|
||||
build: elf cpfirmware
|
||||
check-size: build
|
||||
objs-size: build
|
||||
|
@@ -49,6 +49,7 @@ endif
|
||||
|
||||
include common_features.mk
|
||||
include $(TMK_PATH)/common.mk
|
||||
include $(QUANTUM_PATH)/sequencer/tests/rules.mk
|
||||
include $(QUANTUM_PATH)/serial_link/tests/rules.mk
|
||||
ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include build_full_test.mk
|
||||
|
@@ -21,4 +21,5 @@ COMMON_VPATH += $(QUANTUM_PATH)/keymap_extras
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/audio
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/process_keycode
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/api
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/sequencer
|
||||
COMMON_VPATH += $(DRIVER_PATH)
|
||||
|
@@ -17,9 +17,15 @@ SERIAL_PATH := $(QUANTUM_PATH)/serial_link
|
||||
|
||||
QUANTUM_SRC += \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/led.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c
|
||||
|
||||
ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
|
||||
OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
|
||||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
|
||||
OPT_DEFS += -DAPI_SYSEX_ENABLE
|
||||
OPT_DEFS += -DAPI_ENABLE
|
||||
@@ -38,6 +44,13 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/audio/luts.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
|
||||
OPT_DEFS += -DSEQUENCER_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
OPT_DEFS += -DMIDI_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
@@ -114,6 +127,17 @@ else
|
||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
|
||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6)
|
||||
|
||||
# Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
|
||||
# This ensures that the EEPROM page buffer fits into RAM
|
||||
USE_PROCESS_STACKSIZE = 0x600
|
||||
USE_EXCEPTIONS_STACKSIZE = 0x300
|
||||
|
||||
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
|
||||
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
|
||||
OPT_DEFS += -DEEPROM_EMU_STM32F042x6
|
||||
OPT_DEFS += -DSTM32_EEPROM_ENABLE
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
|
||||
OPT_DEFS += -DEEPROM_DRIVER
|
||||
COMMON_VPATH += $(DRIVER_PATH)/eeprom
|
||||
@@ -144,12 +168,14 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_MATRIX_TYPES := yes IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||
|
||||
LED_MATRIX_ENABLE ?= no
|
||||
ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
ifeq ($(filter $(LED_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_ENABLE="$(LED_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
VALID_LED_MATRIX_TYPES := IS31FL3731 custom
|
||||
# TODO: IS31FL3733 IS31FL3737 IS31FL3741
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||
$(error LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
else
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BACKLIGHT_DRIVER = custom
|
||||
@@ -157,72 +183,73 @@ ifneq ($(strip $(LED_MATRIX_ENABLE)), no)
|
||||
SRC += $(QUANTUM_DIR)/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix_drivers.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
RGB_MATRIX_ENABLE ?= no
|
||||
VALID_RGB_MATRIX_TYPES := IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
|
||||
|
||||
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
||||
ifeq ($(filter $(RGB_MATRIX_ENABLE),$(VALID_MATRIX_TYPES)),)
|
||||
$(error RGB_MATRIX_ENABLE="$(RGB_MATRIX_ENABLE)" is not a valid matrix type)
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||
$(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
RGB_MATRIX_ENABLE := IS31FL3731
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3731)
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3731.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3733.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3733)
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3733.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3737.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3737)
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3737.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), IS31FL3741)
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||
ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
|
||||
OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
|
||||
@@ -428,11 +455,14 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
|
||||
# Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
QUANTUM_LIB_SRC += i2c_master.c \
|
||||
i2c_slave.c
|
||||
ifneq ($(NO_I2C),yes)
|
||||
QUANTUM_LIB_SRC += i2c_master.c \
|
||||
i2c_slave.c
|
||||
endif
|
||||
endif
|
||||
|
||||
SERIAL_DRIVER ?= bitbang
|
||||
OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
|
||||
QUANTUM_LIB_SRC += serial.c
|
||||
else
|
||||
|
150
docs/ChangeLog/20201128.md
Normal file
150
docs/ChangeLog/20201128.md
Normal file
@@ -0,0 +1,150 @@
|
||||
# QMK Breaking Change - 2020 Nov 28 Changelog
|
||||
|
||||
Four times a year QMK runs a process for merging Breaking Changes. A Breaking Change is any change which modifies how QMK behaves in a way that is incompatible or potentially dangerous. We limit these changes to 4 times per year so that users can have confidence that updating their QMK tree will not break their keymaps.
|
||||
|
||||
|
||||
## Changes Requiring User Action :id=changes-requiring-user-action
|
||||
|
||||
### Relocated Keyboards :id-relocated-keyboards
|
||||
|
||||
#### Reduce Helix keyboard build variation ([#8669](https://github.com/qmk/qmk_firmware/pull/8669))
|
||||
|
||||
The build commands for the Helix keyboard are:
|
||||
|
||||
```
|
||||
make <helix_build_name>:<keymap_name>
|
||||
```
|
||||
|
||||
For `<helix_build_name>`, specify the one in the rightmost column of the table below, such as `helix`,` helix/pico`.
|
||||
|
||||
| before Oct 17 2019 | Oct 17 2019 | Mar 10 2020 | Nov 28 2020 |
|
||||
| ---------------------|-------------------------|-------------------------| ------------------------|
|
||||
| helix/rev1 | helix/rev1 | helix/rev1 | helix/rev1 |
|
||||
| helix/pico | helix/pico | helix/pico | helix/pico |
|
||||
| | helix/pico/back | helix/pico/back | helix/pico/back |
|
||||
| | helix/pico/under | helix/pico/under | helix/pico/under |
|
||||
| | | helix/pico/sc | -- |
|
||||
| | | helix/pico/sc/back | helix/pico/sc |
|
||||
| | | helix/pico/sc/under | -- |
|
||||
| helix/rev2 (=helix) | helix/rev2 (=helix) | helix/rev2 (=helix) | -- |
|
||||
| | helix/rev2/back | helix/rev2/back | -- |
|
||||
| | helix/rev2/back/oled | helix/rev2/back/oled | ( --> helix/rev2/back) |
|
||||
| | helix/rev2/oled | helix/rev2/oled | helix/rev2 (=helix) |
|
||||
| | helix/rev2/oled/back | helix/rev2/oled/back | helix/rev2/back |
|
||||
| | helix/rev2/oled/under | helix/rev2/oled/under | helix/rev2/under |
|
||||
| | | helix/rev2/sc | -- |
|
||||
| | | helix/rev2/sc/back | -- |
|
||||
| | | helix/rev2/sc/oled | -- |
|
||||
| | | helix/rev2/sc/oledback | helix/rev2/sc |
|
||||
| | | helix/rev2/sc/oledunder | -- |
|
||||
| | | helix/rev2/sc/under | -- |
|
||||
| | helix/rev2/under | helix/rev2/under | -- |
|
||||
| | helix/rev2/under/oled | helix/rev2/under/oled | ( --> helix/rev2/under) |
|
||||
|
||||
#### Update the Speedo firmware for v3.0 ([#10657](https://github.com/qmk/qmk_firmware/pull/10657))
|
||||
|
||||
The Speedo keyboard has moved to `cozykeys/speedo/v2` as the designer prepares to release the Speedo v3.0.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :------------ | :------------------------- |
|
||||
| speedo | cozykeys/speedo/v2 |
|
||||
| -- | cozykeys/speedo/v3 **new** |
|
||||
|
||||
#### Maartenwut/Maarten name change to evyd13/Evy ([#10274](https://github.com/qmk/qmk_firmware/pull/10274))
|
||||
|
||||
Maartenwut has rebranded as @evyd13, and all released Maartenwut boards have moved.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :--------------------- | :----------------- |
|
||||
| maartenwut/atom47/rev2 | evyd13/atom47/rev2 |
|
||||
| maartenwut/atom47/rev3 | evyd13/atom47/rev3 |
|
||||
| maartenwut/eon40 | evyd13/eon40 |
|
||||
| maartenwut/eon65 | evyd13/eon65 |
|
||||
| maartenwut/eon75 | evyd13/eon75 |
|
||||
| maartenwut/eon87 | evyd13/eon87 |
|
||||
| maartenwut/eon95 | evyd13/eon95 |
|
||||
| maartenwut/gh80_1800 | evyd13/gh80_1800 |
|
||||
| maartenwut/gh80_3700 | evyd13/gh80_3700 |
|
||||
| maartenwut/minitomic | evyd13/minitomic |
|
||||
| maartenwut/mx5160 | evyd13/mx5160 |
|
||||
| maartenwut/nt660 | evyd13/nt660 |
|
||||
| maartenwut/omrontkl | evyd13/omrontkl |
|
||||
| maartenwut/plain60 | evyd13/plain60 |
|
||||
| maartenwut/pockettype | evyd13/pockettype |
|
||||
| maartenwut/quackfire | evyd13/quackfire |
|
||||
| maartenwut/solheim68 | evyd13/solheim68 |
|
||||
| maartenwut/ta65 | evyd13/ta65 |
|
||||
| maartenwut/wasdat | evyd13/wasdat |
|
||||
| maartenwut/wasdat_code | evyd13/wasdat_code |
|
||||
| maartenwut/wonderland | evyd13/wonderland |
|
||||
|
||||
#### Xelus Valor and Dawn60 Refactors ([#10512](https://github.com/qmk/qmk_firmware/pull/10512), [#10584](https://github.com/qmk/qmk_firmware/pull/10584))
|
||||
|
||||
The Valor and Dawn60 keyboards by Xelus22 both now require their revisions to be specified when compiling.
|
||||
|
||||
| Previous Name | New Name |
|
||||
| :------------ | :---------------- |
|
||||
| xelus/dawn60 | xelus/dawn60/rev1 |
|
||||
| xelus/valor | xelus/valor/rev1 |
|
||||
|
||||
|
||||
### Updated Keyboard Codebases :id=keyboard-updates
|
||||
|
||||
#### AEboards EXT65 Refactor ([#10820](https://github.com/qmk/qmk_firmware/pull/10820))
|
||||
|
||||
The EXT65 codebase has been reworked so keymaps can be used with either revision.
|
||||
|
||||
|
||||
## Core Changes :id=core-changes
|
||||
|
||||
### Fixes :id=core-fixes
|
||||
|
||||
* Reconnect the USB if users wake up a computer from the keyboard to restore the USB state ([#10088](https://github.com/qmk/qmk_firmware/pull/10088))
|
||||
* Fix cursor position bug in oled_write_raw functions ([#10800](https://github.com/qmk/qmk_firmware/pull/10800))
|
||||
|
||||
### Additions and Enhancements :id=core-additions
|
||||
|
||||
* Allow MATRIX_ROWS to be greater than 32 ([#10183](https://github.com/qmk/qmk_firmware/pull/10183))
|
||||
* Add support for soft serial to ATmega32U2 ([#10204](https://github.com/qmk/qmk_firmware/pull/10204))
|
||||
* Allow direct control of MIDI velocity value ([#9940](https://github.com/qmk/qmk_firmware/pull/9940))
|
||||
* Joystick 16-bit support ([#10439](https://github.com/qmk/qmk_firmware/pull/10439))
|
||||
* Allow encoder resolutions to be set per encoder ([#10259](https://github.com/qmk/qmk_firmware/pull/10259))
|
||||
* Share button state from mousekey to pointing_device ([#10179](https://github.com/qmk/qmk_firmware/pull/10179))
|
||||
* Add advanced/efficient RGB Matrix Indicators ([#8564](https://github.com/qmk/qmk_firmware/pull/8564))
|
||||
* OLED display update interval support ([#10388](https://github.com/qmk/qmk_firmware/pull/10388))
|
||||
* Per-Key Retro Tapping ([#10622](https://github.com/qmk/qmk_firmware/pull/10622))
|
||||
* Allow backlight duty cycle limit ([#10260](https://github.com/qmk/qmk_firmware/pull/10260))
|
||||
* Add step sequencer feature ([#9703](https://github.com/qmk/qmk_firmware/pull/9703))
|
||||
* Added `add_oneshot_mods` & `del_oneshot_mods` ([#10549](https://github.com/qmk/qmk_firmware/pull/10549))
|
||||
* Add AT90USB support for serial.c ([#10706](https://github.com/qmk/qmk_firmware/pull/10706))
|
||||
* Auto shift: support repeats and early registration (#9826)
|
||||
|
||||
### Clean-ups and Optimizations :id=core-optimizations
|
||||
|
||||
* Haptic and solenoid cleanup ([#9700](https://github.com/qmk/qmk_firmware/pull/9700))
|
||||
* XD75 cleanup ([#10524](https://github.com/qmk/qmk_firmware/pull/10524))
|
||||
* Minor change to behavior allowing display updates to continue between task ticks ([#10750](https://github.com/qmk/qmk_firmware/pull/10750))
|
||||
* Change some GPIO manipulations in matrix.c to be atomic ([#10491](https://github.com/qmk/qmk_firmware/pull/10491))
|
||||
* combine repeated lines of code for ATmega32U2, ATmega16U2, ATmega328 and ATmega328P ([#10837](https://github.com/qmk/qmk_firmware/pull/10837))
|
||||
* Remove references to HD44780 ([#10735](https://github.com/qmk/qmk_firmware/pull/10735))
|
||||
|
||||
|
||||
## QMK Infrastructure and Internals :id=qmk-internals
|
||||
|
||||
* Add ability to build a subset of all keyboards based on platform. ([#10420](https://github.com/qmk/qmk_firmware/pull/10420))
|
||||
* Initialise EEPROM drivers at startup, instead of upon first execution ([#10438](https://github.com/qmk/qmk_firmware/pull/10438))
|
||||
* Make bootloader_jump weak for ChibiOS ([#10417](https://github.com/qmk/qmk_firmware/pull/10417))
|
||||
* Support for STM32 GPIOF,G,H,I,J,K ([#10206](https://github.com/qmk/qmk_firmware/pull/10206))
|
||||
* Add milc as a dependency and remove the installed milc ([#10563](https://github.com/qmk/qmk_firmware/pull/10563))
|
||||
* ChibiOS upgrade: early init conversions ([#10214](https://github.com/qmk/qmk_firmware/pull/10214))
|
||||
* ChibiOS upgrade: configuration file migrator ([#9952](https://github.com/qmk/qmk_firmware/pull/9952))
|
||||
* Add definition based on currently-selected serial driver. ([#10716](https://github.com/qmk/qmk_firmware/pull/10716))
|
||||
* Allow for modification of output RGB values when using rgblight/rgb_matrix. ([#10638](https://github.com/qmk/qmk_firmware/pull/10638))
|
||||
* Allow keyboards/keymaps to execute code at each main loop iteration ([#10530](https://github.com/qmk/qmk_firmware/pull/10530))
|
||||
* qmk cformat ([#10767](https://github.com/qmk/qmk_firmware/pull/10767))
|
||||
* Add a Make variable to easily enable DEBUG_MATRIX_SCAN_RATE on the command line ([#10824](https://github.com/qmk/qmk_firmware/pull/10824))
|
||||
* update Chibios OS USB for the OTG driver ([#8893](https://github.com/qmk/qmk_firmware/pull/8893))
|
||||
* Fixup version.h writing when using `SKIP_VERSION=yes` ([#10972](https://github.com/qmk/qmk_firmware/pull/10972), [#10974](https://github.com/qmk/qmk_firmware/pull/10974))
|
||||
* Rename ledmatrix.h to match .c file ([#7949](https://github.com/qmk/qmk_firmware/pull/7949))
|
||||
* Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10231](https://github.com/qmk/qmk_firmware/pull/10231))
|
||||
* Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER ([#10840](https://github.com/qmk/qmk_firmware/pull/10840))
|
@@ -23,6 +23,7 @@
|
||||
* [Overview](api_overview.md)
|
||||
* [API Documentation](api_docs.md)
|
||||
* [Keyboard Support](reference_configurator_support.md)
|
||||
* [Adding Default Keymaps](configurator_default_keymaps.md)
|
||||
|
||||
* CLI
|
||||
* [Overview](cli.md)
|
||||
@@ -79,6 +80,7 @@
|
||||
* [One Shot Keys](one_shot_keys.md)
|
||||
* [Pointing Device](feature_pointing_device.md)
|
||||
* [Raw HID](feature_rawhid.md)
|
||||
* [Sequencer](feature_sequencer.md)
|
||||
* [Swap Hands](feature_swap_hands.md)
|
||||
* [Tap Dance](feature_tap_dance.md)
|
||||
* [Tap-Hold Configuration](tap_hold.md)
|
||||
@@ -104,6 +106,7 @@
|
||||
* [Encoders](feature_encoders.md)
|
||||
* [Haptic Feedback](feature_haptic_feedback.md)
|
||||
* [Joystick](feature_joystick.md)
|
||||
* [LED Indicators](feature_led_indicators.md)
|
||||
* [Proton C Conversion](proton_c_conversion.md)
|
||||
* [PS/2 Mouse](feature_ps2_mouse.md)
|
||||
* [Split Keyboard](feature_split_keyboard.md)
|
||||
@@ -117,6 +120,8 @@
|
||||
* [Overview](breaking_changes.md)
|
||||
* [My Pull Request Was Flagged](breaking_changes_instructions.md)
|
||||
* History
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
* [2019 Aug 30](ChangeLog/20190830.md)
|
||||
|
@@ -6,6 +6,7 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## What has been included in past Breaking Changes?
|
||||
|
||||
* [2020 Nov 28](ChangeLog/20201128.md)
|
||||
* [2020 Aug 29](ChangeLog/20200829.md)
|
||||
* [2020 May 30](ChangeLog/20200530.md)
|
||||
* [2020 Feb 29](ChangeLog/20200229.md)
|
||||
@@ -13,16 +14,16 @@ The breaking change period is when we will merge PR's that change QMK in dangero
|
||||
|
||||
## When is the next Breaking Change?
|
||||
|
||||
The next Breaking Change is scheduled for November 28, 2020.
|
||||
The next Breaking Change is scheduled for February 27, 2021.
|
||||
|
||||
### Important Dates
|
||||
|
||||
* [x] 2020 Aug 29 - `develop` is created. It will be rebased weekly.
|
||||
* [ ] 2020 Oct 31 - `develop` closed to new PR's.
|
||||
* [ ] 2020 Oct 31 - Call for testers.
|
||||
* [ ] 2020 Nov 26 - `master` is locked, no PR's merged.
|
||||
* [ ] 2020 Nov 28 - Merge `develop` to `master`.
|
||||
* [ ] 2020 Nov 28 - `master` is unlocked. PR's can be merged again.
|
||||
* [x] 2020 Nov 28 - `develop` is created. Each push to `master` is subsequently merged to `develop`
|
||||
* [ ] 2021 Jan 30 - `develop` closed to new PR's.
|
||||
* [ ] 2021 Jan 30 - Call for testers.
|
||||
* [ ] 2021 Feb 25 - `master` is locked, no PR's merged.
|
||||
* [ ] 2021 Feb 27 - Merge `develop` to `master`.
|
||||
* [ ] 2021 Feb 27 - `master` is unlocked. PR's can be merged again.
|
||||
|
||||
## What changes will be included?
|
||||
|
||||
@@ -39,21 +40,6 @@ Criteria for acceptance:
|
||||
|
||||
This section documents various processes we use when running the Breaking Changes process.
|
||||
|
||||
## Rebase `develop` from `master`
|
||||
|
||||
This is run every Friday while `develop` is open.
|
||||
|
||||
Process:
|
||||
|
||||
```
|
||||
cd qmk_firmware
|
||||
git checkout master
|
||||
git pull --ff-only
|
||||
git checkout develop
|
||||
git rebase master
|
||||
git push --force
|
||||
```
|
||||
|
||||
## Creating the `develop` branch
|
||||
|
||||
This happens immediately after the previous `develop` branch is merged.
|
||||
|
@@ -178,6 +178,24 @@ Creates a keymap.json from a keymap.c.
|
||||
qmk c2json [--no-cpp] [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
## `qmk lint`
|
||||
|
||||
Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk lint [-km KEYMAP] [-kb KEYBOARD] [--strict]
|
||||
```
|
||||
|
||||
This command is directory aware. It will automatically fill in KEYBOARD and/or KEYMAP if you are in a keyboard or keymap directory.
|
||||
|
||||
**Examples**:
|
||||
|
||||
Do a basic lint check:
|
||||
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
This command lists all the keyboards currently defined in `qmk_firmware`
|
||||
@@ -212,6 +230,16 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
qmk new-keymap [-kb KEYBOARD] [-km KEYMAP]
|
||||
```
|
||||
|
||||
## `qmk clean`
|
||||
|
||||
This command cleans up the `.build` folder. If `--all` is passed, any .hex or .bin files present in the `qmk_firmware` directory will also be deleted.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk clean [-a]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Developer Commands
|
||||
@@ -258,6 +286,16 @@ This command starts a local HTTP server which you can use for browsing or improv
|
||||
qmk docs [-p PORT]
|
||||
```
|
||||
|
||||
## `qmk generate-docs`
|
||||
|
||||
This command allows you to generate QMK documentation locally. It can be uses for general browsing or improving the docs. External tools such as [serve](https://www.npmjs.com/package/serve) can be used to browse the generated files.
|
||||
|
||||
**Usage**:
|
||||
|
||||
```
|
||||
qmk generate-docs
|
||||
```
|
||||
|
||||
## `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.
|
||||
@@ -299,4 +337,3 @@ This command runs the python test suite. If you make changes to python code you
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
|
@@ -135,6 +135,8 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define RETRO_TAPPING`
|
||||
* tap anyway, even after TAPPING_TERM, if there was no other key interruption between press and release
|
||||
* See [Retro Tapping](tap_hold.md#retro-tapping) for details
|
||||
* `#define RETRO_TAPPING_PER_KEY`
|
||||
* enables handling for per key `RETRO_TAPPING` settings
|
||||
* `#define TAPPING_TOGGLE 2`
|
||||
* how many taps before triggering the toggle
|
||||
* `#define PERMISSIVE_HOLD`
|
||||
|
193
docs/configurator_default_keymaps.md
Normal file
193
docs/configurator_default_keymaps.md
Normal file
@@ -0,0 +1,193 @@
|
||||
# Adding Default Keymaps to QMK Configurator :id=adding-default-keymaps
|
||||
|
||||
This page covers how to add a default keymap for a keyboard to QMK Configurator.
|
||||
|
||||
|
||||
## Technical Information :id=technical-information
|
||||
|
||||
QMK Configurator uses JSON as its native file format for keymaps. As much as possible, these should be kept such that they behave the same as running `make <keyboard>:default` from `qmk_firmware`.
|
||||
|
||||
Keymaps in this directory require four key-value pairs:
|
||||
|
||||
* `keyboard` (string)
|
||||
* This is the name of the keyboard, the same as would be used when running a compile job through `make` (e.g. `make 1upkeyboards/1up60rgb:default`).
|
||||
* `keymap` (string)
|
||||
* Should be set to `default`.
|
||||
* `layout` (string)
|
||||
* This is the layout macro used by the default keymap.
|
||||
* `layers` (array)
|
||||
* The keymap itself. This key should contain one array per layer, which themselves should contain the keycodes that make up that layer.
|
||||
|
||||
Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to:
|
||||
|
||||
```shell
|
||||
f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625)
|
||||
```
|
||||
|
||||
In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that should be used for `commit`.
|
||||
|
||||
|
||||
## Example :id=example
|
||||
|
||||
If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`:
|
||||
|
||||
```shell
|
||||
user ~/qmk_firmware (master)
|
||||
$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c
|
||||
ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237)
|
||||
```
|
||||
|
||||
Now that we have the commit hash, we need the keymap (edited for readability):
|
||||
|
||||
```c
|
||||
...
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, BL_TOGG, BL_DEC, BL_INC,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT, KC_VOLD,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
```
|
||||
|
||||
The default keymap uses the `LAYOUT_all` macro, so that will be the value of the `layout` key. Compiled to a QMK Configurator JSON keymap, our resulting file should be:
|
||||
|
||||
```json
|
||||
{
|
||||
"keyboard": "hineybush/h87a",
|
||||
"keymap": "default",
|
||||
"commit": "ef8878fba5d3786e3f9c66436da63a560cd36ac9",
|
||||
"layout": "LAYOUT_all",
|
||||
"layers": [
|
||||
[
|
||||
"KC_ESC", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_PSCR", "KC_SLCK", "KC_PAUS",
|
||||
"KC_GRV", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_MINS", "KC_EQL", "KC_BSPC", "KC_BSPC", "KC_INS", "KC_HOME", "KC_PGUP",
|
||||
"KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_LBRC", "KC_RBRC", "KC_BSLS", "KC_DEL", "KC_END", "KC_PGDN",
|
||||
"KC_CAPS", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_SCLN", "KC_QUOT", "KC_NUHS", "KC_ENT",
|
||||
"KC_LSFT", "KC_NUBS", "KC_Z", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_RSFT", "KC_TRNS", "KC_UP",
|
||||
"KC_LCTL", "KC_LGUI", "KC_LALT", "KC_SPC", "KC_RALT", "MO(1)", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"
|
||||
],
|
||||
[
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "RGB_MOD", "RGB_HUD", "RGB_HUI", "RGB_SAD", "RGB_SAI", "RGB_VAD", "RGB_VAI", "BL_TOGG", "BL_DEC", "BL_INC",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_VOLU",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RESET", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_MPLY", "KC_MNXT", "KC_VOLD",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS",
|
||||
"KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS"
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
The white space in the `layers` arrays have no effect on the functionality of the keymap, but are used to make these files easier for humans to read.
|
||||
|
||||
|
||||
## Caveats :id=caveats
|
||||
|
||||
### Layers can only be referenced by number :id=layer-references
|
||||
|
||||
A common QMK convention is to name layers using a series of `#define`s, or an `enum` statement:
|
||||
|
||||
```c
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_MEDIA,
|
||||
_FN
|
||||
};
|
||||
```
|
||||
|
||||
This works in C, but for Configurator, you *must* use the layer's numeric index – `MO(_FN)` would need to be `MO(2)` in the above example.
|
||||
|
||||
### No support for custom code of any kind :id=custom-code
|
||||
|
||||
Features that require adding functions to the keymap.c file, such as Tap Dance or Unicode, can not be compiled in Configurator **at all**. Even setting `TAP_DANCE_ENABLE = yes` in the `qmk_firmware` repository at the keyboard level will prevent Configurator from compiling **any** firmware for that keyboard. This is limited both by the API and the current spec of our JSON keymap format.
|
||||
|
||||
### Limited Support for Custom keycodes :id=custom-keycodes
|
||||
|
||||
There is a way to support custom keycodes: if the logic for a custom keycode is implemented at the keyboard level instead of the keymap level in qmk_firmware, that keycode *can* be used in Configurator and it *will* compile and work. Instead of using the following in your `keymap.c`:
|
||||
|
||||
```c
|
||||
enum custom_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3
|
||||
};
|
||||
...
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
```
|
||||
|
||||
... add the keycode `enum` block to your keyboard's header file (`<keyboard>.h`) as follows (note that the `enum` is named `keyboard_keycodes` here):
|
||||
|
||||
```c
|
||||
enum keyboard_keycodes {
|
||||
MACRO_1 = SAFE_RANGE,
|
||||
MACRO_2,
|
||||
MACRO_3,
|
||||
NEW_SAFE_RANGE // Important!
|
||||
};
|
||||
```
|
||||
|
||||
... then the logic to your `<keyboard>.c` through `process_record_kb()`:
|
||||
|
||||
```c
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case MACRO_1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #1.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_2:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #2.");
|
||||
}
|
||||
return false;
|
||||
case MACRO_3:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("This is macro #3.");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
};
|
||||
```
|
||||
|
||||
Note the call to `process_record_user()` at the end. Additionally, users of the keyboard will need to use `NEW_SAFE_RANGE` instead of `SAFE_RANGE` if they wish to add their own custom keycodes at keymap level, beyond what is provided by the keyboard.
|
||||
|
||||
|
||||
## Additional Reading :id=additional-reading
|
||||
|
||||
For QMK Configurator to support your keyboard, your keyboard must be present in the `master` branch of the `qmk_firmware` repository. For instructions on this, please see [Supporting Your Keyboard in QMK Configurator](reference_configurator_support.md).
|
@@ -88,108 +88,6 @@ keyrecord_t record {
|
||||
}
|
||||
```
|
||||
|
||||
# LED Control
|
||||
|
||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
||||
|
||||
* Num Lock
|
||||
* Caps Lock
|
||||
* Scroll Lock
|
||||
* Compose
|
||||
* Kana
|
||||
|
||||
There are two ways to get the lock LED state:
|
||||
|
||||
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
||||
* by calling `led_t host_keyboard_led_state()`
|
||||
|
||||
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
||||
|
||||
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
||||
|
||||
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
||||
* `uint8_t host_keyboard_leds()`
|
||||
|
||||
## `led_update_user()`
|
||||
|
||||
This function will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
||||
|
||||
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
||||
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
||||
|
||||
Some examples include:
|
||||
|
||||
- overriding the LEDs to use them for something else like layer indication
|
||||
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
||||
- play a sound when an LED turns on or off.
|
||||
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
||||
|
||||
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
||||
|
||||
### Example `led_update_kb()` Implementation
|
||||
|
||||
```c
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(B0, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B2, !led_state.scroll_lock);
|
||||
writePin(B3, !led_state.compose);
|
||||
writePin(B4, !led_state.kana);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### Example `led_update_user()` Implementation
|
||||
|
||||
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||
#endif
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
static uint8_t caps_state = 0;
|
||||
if (caps_state != led_state.caps_lock) {
|
||||
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
||||
caps_state = led_state.caps_lock;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### `led_update_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
||||
* Keymap: `bool led_update_user(led_t led_state)`
|
||||
|
||||
## `host_keyboard_led_state()`
|
||||
|
||||
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||
|
||||
## Setting Physical LED State
|
||||
|
||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||
|
||||
### Ergodox Boards
|
||||
|
||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||
|
||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||
|
||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
||||
|
||||
# Keyboard Initialization Code
|
||||
|
||||
There are several steps in the keyboard initialization process. Depending on what you want to do, it will influence which function you should use.
|
||||
@@ -287,6 +185,14 @@ This function gets called at every matrix scan, which is basically as often as t
|
||||
|
||||
You should use this function if you need custom matrix scanning code. It can also be used for custom status output (such as LEDs or a display) or other functionality that you want to trigger regularly even when the user isn't typing.
|
||||
|
||||
# Keyboard housekeeping
|
||||
|
||||
* Keyboard/Revision: `void housekeeping_task_kb(void)`
|
||||
* Keymap: `void housekeeping_task_user(void)`
|
||||
|
||||
This function gets called at the end of all QMK processing, before starting the next iteration. You can safely assume that QMK has dealt with the last matrix scan at the time that these functions are invoked -- layer states have been updated, USB reports have been sent, LEDs have been updated, and displays have been drawn.
|
||||
|
||||
Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To keep your board responsive, it's suggested to do as little as possible during these function calls, potentially throtting their behaviour if you do indeed require implementing something special.
|
||||
|
||||
# Keyboard Idling/Wake Code
|
||||
|
||||
|
@@ -4,7 +4,7 @@ QMK presents itself to the host as a regular HID keyboard device, and as such re
|
||||
|
||||
There are two notable exceptions: the Caterina bootloader, usually seen on Pro Micros, and the HalfKay bootloader shipped with PJRC Teensys, appear as a serial port and a generic HID device respectively, and so do not require a driver.
|
||||
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2 or WSL, the `qmk_install.sh` script will have asked if you want it to install the drivers for you.
|
||||
We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have set up the development environment with MSYS2, the `qmk_install.sh` script will have already installed the drivers for you.
|
||||
|
||||
## Installation
|
||||
|
||||
|
@@ -19,71 +19,7 @@ Note that running `make` with `sudo` is generally ***not*** a good idea, and you
|
||||
|
||||
### Linux `udev` Rules
|
||||
|
||||
On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware, or place this file in `/etc/udev/rules.d/`:
|
||||
|
||||
**/etc/udev/rules.d/50-qmk.rules:**
|
||||
```
|
||||
# Atmel DFU
|
||||
### ATmega16U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FEF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega32U2
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF0", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega16U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF3", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### ATmega32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF4", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### AT90USB64
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FF9", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
### AT90USB128
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="2FFB", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# Input Club
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1C11", ATTRS{idProduct}=="B007", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# STM32duino
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1EAF", ATTRS{idProduct}=="0003", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
# STM32 DFU
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="DF11", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# BootloadHID
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DF", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# USBAspLoader
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="16C0", ATTRS{idProduct}=="05DC", TAG+="uaccess", RUN{builtin}+="uaccess"
|
||||
|
||||
# ModemManager should ignore the following devices
|
||||
# Atmel SAM-BA (Massdrop)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="03EB", ATTRS{idProduct}=="6124", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
|
||||
# Caterina (Pro Micro)
|
||||
## Spark Fun Electronics
|
||||
### Pro Micro 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9203", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Pro Micro 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9205", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### LilyPad 3V3/8MHz (and some Pro Micro clones)
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1B4F", ATTRS{idProduct}=="9207", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Pololu Electronics
|
||||
### A-Star 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="1FFB", ATTRS{idProduct}=="0101", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Arduino SA
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## Adafruit Industries LLC
|
||||
### Feather 32U4
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000C", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 3V3/8MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000D", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### ItsyBitsy 32U4 5V/16MHz
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="239A", ATTRS{idProduct}=="000E", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
## dog hunter AG
|
||||
### Leonardo
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0036", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
### Micro
|
||||
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2A03", ATTRS{idProduct}=="0037", TAG+="uaccess", RUN{builtin}+="uaccess", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
```
|
||||
On Linux, you'll need proper privileges to communicate with the bootloader device. You can either use `sudo` when flashing firmware (not recommended), or place [this file](https://github.com/qmk/qmk_firmware/tree/master/util/udev/50-qmk.rules) into `/etc/udev/rules.d/`.
|
||||
|
||||
Once added, run the following:
|
||||
|
||||
|
@@ -15,25 +15,31 @@ problem.
|
||||
When you tap a key, it stays depressed for a short period of time before it is
|
||||
then released. This depressed time is a different length for everyone. Auto Shift
|
||||
defines a constant `AUTO_SHIFT_TIMEOUT` which is typically set to twice your
|
||||
normal pressed state time. When you press a key, a timer starts and then stops
|
||||
when you release the key. If the time depressed is greater than or equal to the
|
||||
`AUTO_SHIFT_TIMEOUT`, then a shifted version of the key is emitted. If the time
|
||||
is less than the `AUTO_SHIFT_TIMEOUT` time, then the normal state is emitted.
|
||||
normal pressed state time. When you press a key, a timer starts, and if you
|
||||
have not released the key after the `AUTO_SHIFT_TIMEOUT` period, then a shifted
|
||||
version of the key is emitted. If the time is less than the `AUTO_SHIFT_TIMEOUT`
|
||||
time, or you press another key, then the normal state is emitted.
|
||||
|
||||
If `AUTO_SHIFT_REPEAT` is defined, there is keyrepeat support. Holding the key
|
||||
down will repeat the shifted key, though this can be disabled with
|
||||
`AUTO_SHIFT_NO_AUTO_REPEAT`. If you want to repeat the normal key, then tap it
|
||||
once then immediately (within `TAPPING_TERM`) hold it down again (this works
|
||||
with the shifted value as well if auto-repeat is disabled).
|
||||
|
||||
## Are There Limitations to Auto Shift?
|
||||
|
||||
Yes, unfortunately.
|
||||
|
||||
1. Key repeat will cease to work. For example, before if you wanted 20 'a'
|
||||
characters, you could press and hold the 'a' key for a second or two. This no
|
||||
longer works with Auto Shift because it is timing your depressed time instead
|
||||
of emitting a depressed key state to your operating system.
|
||||
2. You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough
|
||||
for a shifted version, but we did not. On the other hand, we may think we are
|
||||
tapping the keys, but really we have held it for a little longer than
|
||||
anticipated.
|
||||
You will have characters that are shifted when you did not intend on shifting, and
|
||||
other characters you wanted shifted, but were not. This simply comes down to
|
||||
practice. As we get in a hurry, we think we have hit the key long enough for a
|
||||
shifted version, but we did not. On the other hand, we may think we are tapping
|
||||
the keys, but really we have held it for a little longer than anticipated.
|
||||
|
||||
Additionally, with keyrepeat the desired shift state can get mixed up. It will
|
||||
always 'belong' to the last key pressed. For example, keyrepeating a capital
|
||||
and then tapping something lowercase (whether or not it's an Auto Shift key)
|
||||
will result in the capital's *key* still being held, but shift not.
|
||||
|
||||
## How Do I Enable Auto Shift?
|
||||
|
||||
@@ -103,6 +109,14 @@ Do not Auto Shift numeric keys, zero through nine.
|
||||
|
||||
Do not Auto Shift alpha characters, which include A through Z.
|
||||
|
||||
### AUTO_SHIFT_REPEAT (simple define)
|
||||
|
||||
Enables keyrepeat.
|
||||
|
||||
### AUTO_SHIFT_NO_AUTO_REPEAT (simple define)
|
||||
|
||||
Disables automatically keyrepeating when `AUTO_SHIFT_TIMEOUT` is exceeded.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
This will enable you to define three keys temporarily to increase, decrease and report your `AUTO_SHIFT_TIMEOUT`.
|
||||
|
@@ -62,14 +62,15 @@ Valid driver values are `pwm`, `software`, `custom` or `no`. See below for help
|
||||
|
||||
To configure the backlighting, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-------------------------------------------------------------------------------------|
|
||||
|`BACKLIGHT_PIN` |*Not defined*|The pin that controls the LED(s) |
|
||||
|`BACKLIGHT_LEVELS` |`3` |The number of brightness levels (maximum 31 excluding off) |
|
||||
|`BACKLIGHT_CAPS_LOCK`|*Not defined*|Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
|`BACKLIGHT_BREATHING`|*Not defined*|Enable backlight breathing, if supported |
|
||||
|`BREATHING_PERIOD` |`6` |The length of one backlight "breath" in seconds |
|
||||
|`BACKLIGHT_ON_STATE` |`1` |The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low|
|
||||
| Define | Default | Description |
|
||||
|------------------------|---------------|-------------------------------------------------------------------------------------------------------------------|
|
||||
| `BACKLIGHT_PIN` | *Not defined* | The pin that controls the LED(s) |
|
||||
| `BACKLIGHT_LEVELS` | `3` | The number of brightness levels (maximum 31 excluding off) |
|
||||
| `BACKLIGHT_CAPS_LOCK` | *Not defined* | Enable Caps Lock indicator using backlight (for keyboards without dedicated LED) |
|
||||
| `BACKLIGHT_BREATHING` | *Not defined* | Enable backlight breathing, if supported |
|
||||
| `BREATHING_PERIOD` | `6` | The length of one backlight "breath" in seconds |
|
||||
| `BACKLIGHT_ON_STATE` | `1` | The state of the backlight pin when the backlight is "on" - `1` for high, `0` for low |
|
||||
| `BACKLIGHT_LIMIT_VAL ` | `255` | The maximum duty cycle of the backlight -- `255` allows for full brightness, any lower will decrease the maximum. |
|
||||
|
||||
Unless you are designing your own keyboard, you generally should not need to change the `BACKLIGHT_PIN` or `BACKLIGHT_ON_STATE`.
|
||||
|
||||
|
@@ -32,13 +32,20 @@ Additionally, the resolution, which defines how many pulses the encoder register
|
||||
#define ENCODER_RESOLUTION 4
|
||||
```
|
||||
|
||||
It can also be defined per-encoder, by instead defining:
|
||||
|
||||
```c
|
||||
#define ENCODER_RESOLUTIONS { 4, 2 }
|
||||
```
|
||||
|
||||
## Split Keyboards
|
||||
|
||||
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout for the right half like this:
|
||||
If you are using different pinouts for the encoders on each half of a split keyboard, you can define the pinout (and optionally, resolutions) for the right half like this:
|
||||
|
||||
```c
|
||||
#define ENCODERS_PAD_A_RIGHT { encoder1a, encoder2a }
|
||||
#define ENCODERS_PAD_B_RIGHT { encoder1b, encoder2b }
|
||||
#define ENCODER_RESOLUTIONS_RIGHT { 2, 4 }
|
||||
```
|
||||
|
||||
## Callbacks
|
||||
|
@@ -42,14 +42,21 @@ First you will need a build a circuit to drive the solenoid through a mosfet as
|
||||
[Wiring diagram provided by Adafruit](https://playground.arduino.cc/uploads/Learning/solenoid_driver.pdf)
|
||||
|
||||
|
||||
| Settings | Default | Description |
|
||||
|--------------------------|---------------|-------------------------------------------------------|
|
||||
|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. |
|
||||
|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. |
|
||||
|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|
||||
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. |
|
||||
| Settings | Default | Description |
|
||||
|----------------------------|----------------------|-------------------------------------------------------|
|
||||
|`SOLENOID_PIN` | *Not defined* |Configures the pin that the Solenoid is connected to. |
|
||||
|`SOLENOID_DEFAULT_DWELL` | `12` ms |Configures the default dwell time for the solenoid. |
|
||||
|`SOLENOID_MIN_DWELL` | `4` ms |Sets the lower limit for the dwell. |
|
||||
|`SOLENOID_MAX_DWELL` | `100` ms |Sets the upper limit for the dwell. |
|
||||
|`SOLENOID_DWELL_STEP_SIZE` | `1` ms |The step size to use when `HPT_DWL*` keycodes are sent |
|
||||
|`SOLENOID_DEFAULT_BUZZ` | `0` (disabled) |On HPT_RST buzz is set "on" if this is "1" |
|
||||
|`SOLENOID_BUZZ_ACTUATED` | `SOLENOID_MIN_DWELL` |Actuated-time when the solenoid is in buzz mode |
|
||||
|`SOLENOID_BUZZ_NONACTUATED` | `SOLENOID_MIN_DWELL` |Non-Actuated-time when the solenoid is in buzz mode |
|
||||
|
||||
?> Dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds.
|
||||
* If solenoid buzz is off, then dwell time is how long the "plunger" stays activated. The dwell time changes how the solenoid sounds.
|
||||
* If solenoid buzz is on, then dwell time sets the length of the buzz, while `SOLENOID_BUZZ_ACTUATED` and `SOLENOID_BUZZ_NONACTUATED` set the (non-)actuation times withing the buzz period.
|
||||
* With the current implementation, for any of the above time settings, the precision of these settings may be affected by how fast the keyboard is able to scan the matrix.
|
||||
Therefore, if the keyboards scanning routine is slow, it may be preferable to set `SOLENOID_DWELL_STEP_SIZE` to a value slightly smaller than the time it takes to scan the keyboard.
|
||||
|
||||
Beware that some pins may be powered during bootloader (ie. A13 on the STM32F303 chip) and will result in the solenoid kept in the on state through the whole flashing process. This may overheat and damage the solenoid. If you find that the pin the solenoid is connected to is triggering the solenoid during bootloader/DFU, select another pin.
|
||||
|
||||
|
@@ -141,6 +141,12 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
```
|
||||
|
||||
### Axis Resolution
|
||||
|
||||
By default, the resolution of each axis is 8 bit, giving a range of -127 to +127. If you need higher precision, you can increase it by defining eg. `JOYSTICK_AXES_RESOLUTION 12` in your `config.h`. The resolution must be between 8 and 16.
|
||||
|
||||
Note that the supported AVR MCUs have a 10-bit ADC, and 12-bit for most STM32 MCUs.
|
||||
|
||||
### Triggering Joystick Buttons
|
||||
|
||||
Joystick buttons are normal Quantum keycodes, defined as `JS_BUTTON0` to `JS_BUTTON31`, depending on the number of buttons you have configured.
|
||||
|
116
docs/feature_led_indicators.md
Normal file
116
docs/feature_led_indicators.md
Normal file
@@ -0,0 +1,116 @@
|
||||
# LED Indicators
|
||||
|
||||
QMK provides methods to read 5 of the LEDs defined in the HID spec:
|
||||
|
||||
* Num Lock
|
||||
* Caps Lock
|
||||
* Scroll Lock
|
||||
* Compose
|
||||
* Kana
|
||||
|
||||
There are three ways to get the lock LED state:
|
||||
* by specifying configuration options within `config.h`
|
||||
* by implementing `bool led_update_kb(led_t led_state)` or `_user(led_t led_state)`; or
|
||||
* by calling `led_t host_keyboard_led_state()`
|
||||
|
||||
!> `host_keyboard_led_state()` may already reflect a new value before `led_update_user()` is called.
|
||||
|
||||
Two more deprecated functions exist that provide the LED state as a `uint8_t`:
|
||||
|
||||
* `uint8_t led_set_kb(uint8_t usb_led)` and `_user(uint8_t usb_led)`
|
||||
* `uint8_t host_keyboard_leds()`
|
||||
|
||||
## Configuration Options
|
||||
|
||||
To configure the indicators, `#define` these in your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------|-------------|-------------------------------------------|
|
||||
|`LED_NUM_LOCK_PIN` |*Not defined*|The pin that controls the `Num Lock` LED |
|
||||
|`LED_CAPS_LOCK_PIN` |*Not defined*|The pin that controls the `Caps Lock` LED |
|
||||
|`LED_SCROLL_LOCK_PIN`|*Not defined*|The pin that controls the `Scroll Lock` LED|
|
||||
|`LED_COMPOSE_PIN` |*Not defined*|The pin that controls the `Compose` LED |
|
||||
|`LED_KANA_PIN` |*Not defined*|The pin that controls the `Kana` LED |
|
||||
|`LED_PIN_ON_STATE` |`1` |The state of the indicator pins when the LED is "on" - `1` for high, `0` for low|
|
||||
|
||||
Unless you are designing your own keyboard, you generally should not need to change the above config options.
|
||||
|
||||
## `led_update_*()`
|
||||
|
||||
When the configuration options do not provide enough flexibility, the API hooks provided allow custom control of the LED behavior. These functions will be called when the state of one of those 5 LEDs changes. It receives the LED state as a struct parameter.
|
||||
|
||||
By convention, return `true` from `led_update_user()` to get the `led_update_kb()` hook to run its code, and
|
||||
return `false` when you would prefer not to run the code in `led_update_kb()`.
|
||||
|
||||
Some examples include:
|
||||
|
||||
- overriding the LEDs to use them for something else like layer indication
|
||||
- return `false` because you do not want the `_kb()` function to run, as it would override your layer behavior.
|
||||
- play a sound when an LED turns on or off.
|
||||
- return `true` because you want the `_kb` function to run, and this is in addition to the default LED behavior.
|
||||
|
||||
?> Because the `led_set_*` functions return `void` instead of `bool`, they do not allow for overriding the keyboard LED control, and thus it's recommended to use `led_update_*` instead.
|
||||
|
||||
### Example `led_update_kb()` Implementation
|
||||
|
||||
```c
|
||||
bool led_update_kb(led_t led_state) {
|
||||
bool res = led_update_user(led_state);
|
||||
if(res) {
|
||||
// writePin sets the pin high for 1 and low for 0.
|
||||
// In this example the pins are inverted, setting
|
||||
// it low/0 turns it on, and high/1 turns the LED off.
|
||||
// This behavior depends on whether the LED is between the pin
|
||||
// and VCC or the pin and GND.
|
||||
writePin(B0, !led_state.num_lock);
|
||||
writePin(B1, !led_state.caps_lock);
|
||||
writePin(B2, !led_state.scroll_lock);
|
||||
writePin(B3, !led_state.compose);
|
||||
writePin(B4, !led_state.kana);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
```
|
||||
|
||||
### Example `led_update_user()` Implementation
|
||||
|
||||
This incomplete example would play a sound if Caps Lock is turned on or off. It returns `true`, because you also want the LEDs to maintain their state.
|
||||
|
||||
```c
|
||||
#ifdef AUDIO_ENABLE
|
||||
float caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND);
|
||||
float caps_off[][2] = SONG(CAPS_LOCK_OFF_SOUND);
|
||||
#endif
|
||||
|
||||
bool led_update_user(led_t led_state) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
static uint8_t caps_state = 0;
|
||||
if (caps_state != led_state.caps_lock) {
|
||||
led_state.caps_lock ? PLAY_SONG(caps_on) : PLAY_SONG(caps_off);
|
||||
caps_state = led_state.caps_lock;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
### `led_update_*` Function Documentation
|
||||
|
||||
* Keyboard/Revision: `bool led_update_kb(led_t led_state)`
|
||||
* Keymap: `bool led_update_user(led_t led_state)`
|
||||
|
||||
## `host_keyboard_led_state()`
|
||||
|
||||
Call this function to get the last received LED state as a `led_t`. This is useful for reading the LED state outside `led_update_*`, e.g. in [`matrix_scan_user()`](#matrix-scanning-code).
|
||||
|
||||
## Setting Physical LED State
|
||||
|
||||
Some keyboard implementations provide convenience methods for setting the state of the physical LEDs.
|
||||
|
||||
### Ergodox Boards
|
||||
|
||||
The Ergodox implementations provide `ergodox_right_led_1`/`2`/`3_on`/`off()` to turn individual LEDs on or off, as well as `ergodox_right_led_on`/`off(uint8_t led)` to turn them on or off by their index.
|
||||
|
||||
In addition, it is possible to specify the brightness level of all LEDs with `ergodox_led_all_set(uint8_t n)`; of individual LEDs with `ergodox_right_led_1`/`2`/`3_set(uint8_t n)`; or by index with `ergodox_right_led_set(uint8_t led, uint8_t n)`.
|
||||
|
||||
Ergodox boards also define `LED_BRIGHTNESS_LO` for the lowest brightness and `LED_BRIGHTNESS_HI` for the highest brightness (which is the default).
|
@@ -10,7 +10,8 @@ If you want to use RGB LED's you should use the [RGB Matrix Subsystem](feature_r
|
||||
|
||||
There is basic support for addressable LED matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
LED_MATRIX_ENABLE = IS31FL3731
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
|
||||
You can use between 1 and 4 IS31FL3731 IC's. Do not specify `LED_DRIVER_ADDR_<N>` defines for IC's that are not present on your keyboard. You can define the following items in `config.h`:
|
||||
|
||||
|
@@ -140,3 +140,7 @@ To use constant speed mode, you must at least define `MK_COMBINED` in your keyma
|
||||
```c
|
||||
#define MK_COMBINED
|
||||
```
|
||||
|
||||
## Use with PS/2 Mouse and Pointing Device
|
||||
|
||||
Mouse keys button state is shared with [PS/2 mouse](feature_ps2_mouse.md) and [pointing device](feature_pointing_device.md) so mouse keys button presses can be used for clicks and drags.
|
||||
|
@@ -140,8 +140,8 @@ void oled_task_user(void) {
|
||||
|---------------------------|-----------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
|`OLED_DISPLAY_ADDRESS` |`0x3C` |The i2c address of the OLED Display |
|
||||
|`OLED_FONT_H` |`"glcdfont.c"` |The font code file to use for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting characer index for custom fonts |
|
||||
|`OLED_FONT_END` |`223` |The ending characer index for custom fonts |
|
||||
|`OLED_FONT_START` |`0` |The starting character index for custom fonts |
|
||||
|`OLED_FONT_END` |`223` |The ending character index for custom fonts |
|
||||
|`OLED_FONT_WIDTH` |`6` |The font width |
|
||||
|`OLED_FONT_HEIGHT` |`8` |The font height (untested) |
|
||||
|`OLED_TIMEOUT` |`60000` |Turns off the OLED screen after 60000ms of keyboard inactivity. Helps reduce OLED Burn-in. Set to 0 to disable. |
|
||||
@@ -149,6 +149,8 @@ void oled_task_user(void) {
|
||||
|`OLED_SCROLL_TIMEOUT_RIGHT`|*Not defined* |Scroll timeout direction is right when defined, left when undefined. |
|
||||
|`OLED_IC` |`OLED_IC_SSD1306`|Set to `OLED_IC_SH1106` if you're using the SH1106 OLED controller. |
|
||||
|`OLED_COLUMN_OFFSET` |`0` |(SH1106 only.) Shift output to the right this many pixels.<br />Useful for 128x64 displays centered on a 132x64 SH1106 IC.|
|
||||
|`OLED_BRIGHTNESS` |`255` |The default brightness level of the OLED, from 0 to 255. |
|
||||
|`OLED_UPDATE_INTERVAL` |`0` |Set the time interval for updating the OLED display in ms. This will improve the matrix scan rate. |
|
||||
|
||||
## 128x64 & Custom sized OLED Displays
|
||||
|
||||
@@ -304,6 +306,12 @@ bool oled_off(void);
|
||||
// not
|
||||
bool is_oled_on(void);
|
||||
|
||||
// Sets the brightness level of the display
|
||||
uint8_t oled_set_brightness(uint8_t level);
|
||||
|
||||
// Gets the current brightness level of the display
|
||||
uint8_t oled_get_brightness(void);
|
||||
|
||||
// Basically it's oled_render, but with timeout management and oled_task_user calling!
|
||||
void oled_task(void);
|
||||
|
||||
|
@@ -11,7 +11,8 @@ If you want to use single color LED's you should use the [LED Matrix Subsystem](
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = IS31FL3731
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3731
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -62,7 +63,8 @@ Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet]
|
||||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3733 RGB controller. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = IS31FL3733
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = IS31FL3733
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -112,7 +114,8 @@ Where `X_Y` is the location of the LED in the matrix defined by [the datasheet](
|
||||
There is basic support for addressable RGB matrix lighting with a WS2811/WS2812{a,b,c} addressable LED strand. To enable it, add this to your `rules.mk`:
|
||||
|
||||
```makefile
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
```
|
||||
|
||||
Configure the hardware via your `config.h`:
|
||||
@@ -482,6 +485,14 @@ void rgb_matrix_indicators_kb(void) {
|
||||
}
|
||||
```
|
||||
|
||||
In addition, there are the advanced indicator functions. These are aimed at those with heavily customized displays, where rendering every LED per cycle is expensive. Such as some of the "drashna" layouts. This includes a special macro to help make this easier to use: `RGB_MATRIX_INDICATOR_SET_COLOR(i, r, g, b)`.
|
||||
|
||||
```c
|
||||
void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
RGB_MATRIX_INDICATOR_SET_COLOR(index, red, green, blue);
|
||||
}
|
||||
```
|
||||
|
||||
### Suspended state :id=suspended-state
|
||||
To use the suspend feature, make sure that `#define RGB_DISABLE_WHEN_USB_SUSPENDED true` is added to the `config.h` file.
|
||||
|
||||
|
@@ -41,6 +41,8 @@ Changing the **Hue** cycles around the circle.<br>
|
||||
Changing the **Saturation** moves between the inner and outer sections of the wheel, affecting the intensity of the color.<br>
|
||||
Changing the **Value** sets the overall brightness.<br>
|
||||
|
||||

|
||||
|
||||
## Keycodes
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|
88
docs/feature_sequencer.md
Normal file
88
docs/feature_sequencer.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Sequencer
|
||||
|
||||
Since QMK has experimental support for MIDI, you can now turn your keyboard into a [step sequencer](https://en.wikipedia.org/wiki/Music_sequencer#Step_sequencers)!
|
||||
|
||||
!> **IMPORTANT:** This feature is highly experimental, it has only been tested on a Planck EZ so far. Also, the scope will be limited to support the drum machine use-case to start with.
|
||||
|
||||
## Enable the step sequencer
|
||||
|
||||
Add the following line to your `rules.mk`:
|
||||
|
||||
```make
|
||||
SEQUENCER_ENABLE = yes
|
||||
```
|
||||
|
||||
By default the sequencer has 16 steps, but you can override this setting in your `config.h`:
|
||||
|
||||
```c
|
||||
#define SEQUENCER_STEPS 32
|
||||
```
|
||||
|
||||
## Tracks
|
||||
|
||||
You can program up to 8 independent tracks with the step sequencer. Select the tracks you want to edit, enable or disable some steps, and start the sequence!
|
||||
|
||||
## Resolutions
|
||||
|
||||
While the tempo defines the absolute speed at which the sequencer goes through the steps, the resolution defines the granularity of these steps (from coarser to finer).
|
||||
|
||||
|Resolution |Description |
|
||||
|---------- |----------- |
|
||||
|`SQ_RES_2` |Every other beat |
|
||||
|`SQ_RES_2T` |Every 1.5 beats |
|
||||
|`SQ_RES_4` |Every beat |
|
||||
|`SQ_RES_4T` |Three times per 2 beats|
|
||||
|`SQ_RES_8` |Twice per beat |
|
||||
|`SQ_RES_8T` |Three times per beat |
|
||||
|`SQ_RES_16` |Four times per beat |
|
||||
|`SQ_RES_16T` |Six times per beat |
|
||||
|`SQ_RES_32` |Eight times per beat |
|
||||
|
||||
## Keycodes
|
||||
|
||||
|Keycode |Description |
|
||||
|------- |----------- |
|
||||
|`SQ_ON` |Start the step sequencer |
|
||||
|`SQ_OFF` |Stop the step sequencer |
|
||||
|`SQ_TOG` |Toggle the step sequencer playback |
|
||||
|`SQ_SALL`|Enable all the steps |
|
||||
|`SQ_SCLR`|Disable all the steps |
|
||||
|`SQ_S(n)`|Toggle the step `n` |
|
||||
|`SQ_TMPD`|Decrease the tempo |
|
||||
|`SQ_TMPU`|Increase the tempo |
|
||||
|`SQ_R(n)`|Set the resolution to n |
|
||||
|`SQ_RESD`|Change to the slower resolution |
|
||||
|`SQ_RESU`|Change to the faster resolution |
|
||||
|`SQ_T(n)`|Set `n` as the only active track or deactivate all |
|
||||
|
||||
## Functions
|
||||
|
||||
|Function |Description |
|
||||
|-------- |----------- |
|
||||
|`bool is_sequencer_on(void);` |Return whether the sequencer is playing |
|
||||
|`void sequencer_toggle(void);` |Toggle the step sequencer playback |
|
||||
|`void sequencer_on(void);` |Start the step sequencer |
|
||||
|`void sequencer_off(void);` |Stop the step sequencer |
|
||||
|`bool is_sequencer_step_on(uint8_t step);` |Return whether the step is currently enabled |
|
||||
|`void sequencer_set_step(uint8_t step, bool value);` |Enable or disable the step |
|
||||
|`void sequencer_set_step_on();` |Enable the step |
|
||||
|`void sequencer_set_step_off();` |Disable the step |
|
||||
|`void sequencer_toggle_step(uint8_t step);` |Toggle the step |
|
||||
|`void sequencer_set_all_steps(bool value);` |Enable or disable all the steps |
|
||||
|`void sequencer_set_all_steps_on();` |Enable all the steps |
|
||||
|`void sequencer_set_all_steps_off();` |Disable all the steps |
|
||||
|`uint8_t sequencer_get_tempo(void);` |Return the current tempo |
|
||||
|`void sequencer_set_tempo(uint8_t tempo);` |Set the tempo to `tempo` (between 1 and 255) |
|
||||
|`void sequencer_increase_tempo(void);` |Increase the tempo |
|
||||
|`void sequencer_decrease_tempo(void);` |Decrease the tempo |
|
||||
|`sequencer_resolution_t sequencer_get_resolution(void);` |Return the current resolution |
|
||||
|`void sequencer_set_resolution(sequencer_resolution_t resolution);` |Set the resolution to `resolution` |
|
||||
|`void sequencer_increase_resolution(void);` |Change to the faster resolution |
|
||||
|`void sequencer_decrease_resolution(void);` |Change to the slower resolution |
|
||||
|`bool is_sequencer_track_active(uint8_t track);` |Return whether the track is active |
|
||||
|`void sequencer_set_track_activation(uint8_t track, bool value);` |Activate or deactivate the `track` |
|
||||
|`void sequencer_toggle_track_activation(uint8_t track);` |Toggle the `track` |
|
||||
|`void sequencer_activate_track(uint8_t track);` |Activate 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 |
|
||||
|
@@ -237,6 +237,26 @@ This sets the maximum timeout when detecting master/slave when using `SPLIT_USB_
|
||||
```
|
||||
This sets the poll frequency when detecting master/slave when using `SPLIT_USB_DETECT`
|
||||
|
||||
## Hardware Considerations and Mods
|
||||
|
||||
While most any Pro Micro can be used, micro controllers like the AVR Teensys and most (if not all) ARM boards require the Split USB Detect.
|
||||
|
||||
However, with the Teensy 2.0 and Teensy++ 2.0, there is a simple hardware mod that you can perform to add VBUS detection, so you don't need the Split USB detection option.
|
||||
|
||||
You'll only need a few things:
|
||||
|
||||
* A knife (x-acto knife, ideally)
|
||||
* A solder station or hot air station
|
||||
* An appropriate Schottky diode, such as the [PMEG2005EH](https://www.digikey.com/en/products/detail/nexperia-usa-inc/PMEG2005EH,115/1589924)
|
||||
|
||||
You'll need to cut the small trace between the 5V and center pads on the back of the Teensy.
|
||||
|
||||
Once you have done that, you will want to solder the diode from the 5V pad to the center pad.
|
||||
|
||||
You may need to use the 5V pad from the regulator block above as the pads were too small and placed too closely together to place the Schottky diode properly.
|
||||
|
||||

|
||||
|
||||
## Additional Resources
|
||||
|
||||
Nicinabox has a [very nice and detailed guide](https://github.com/nicinabox/lets-split-guide) for the Let's Split keyboard, that covers most everything you need to know, including troubleshooting information.
|
||||
|
@@ -3,6 +3,25 @@
|
||||
Since starting, QMK has grown by leaps and bounds thanks to people like you who contribute to creating and maintaining our community keyboards. As we've grown we've discovered some patterns that work well, and ask that you conform to them to make it easier for other people to benefit from your hard work.
|
||||
|
||||
|
||||
## Use QMK Lint
|
||||
|
||||
We have provided a tool, `qmk lint`, which will let you check over your keyboard for problems. We suggest using it frequently while working on your keyboard and keymap.
|
||||
|
||||
Example passing check:
|
||||
|
||||
```
|
||||
$ qmk lint -kb rominronin/katana60/rev2
|
||||
Ψ Lint check passed!
|
||||
```
|
||||
|
||||
Example failing check:
|
||||
|
||||
```
|
||||
$ qmk lint -kb clueboard/66/rev3
|
||||
☒ Missing keyboards/clueboard/66/rev3/readme.md
|
||||
☒ Lint check failed!
|
||||
```
|
||||
|
||||
## Naming Your Keyboard/Project
|
||||
|
||||
All keyboard names are in lower case, consisting only of letters, numbers, and underscore (`_`). Names may not begin with an underscore. Forward slash (`/`) is used as a sub-folder separation character.
|
||||
|
@@ -46,6 +46,7 @@
|
||||
'/unicode': '/feature_unicode',
|
||||
'/python_development': '/cli_development',
|
||||
'/getting_started_build_tools':'/newbs_getting_started',
|
||||
'/tutorial':'/newbs',
|
||||
},
|
||||
basePath: '/',
|
||||
name: 'QMK Firmware',
|
||||
|
@@ -21,3 +21,22 @@ The following functions can provide basic control of GPIOs and are found in `qua
|
||||
## Advanced Settings :id=advanced-settings
|
||||
|
||||
Each microcontroller can have multiple advanced settings regarding its GPIO. This abstraction layer does not limit the use of architecture-specific functions. Advanced users should consult the datasheet of their desired device and include any needed libraries. For AVR, the standard avr/io.h library is used; for STM32, the ChibiOS [PAL library](http://chibios.sourceforge.net/docs3/hal/group___p_a_l.html) is used.
|
||||
|
||||
## Atomic Operation
|
||||
|
||||
The above functions are not always guaranteed to work atomically. Therefore, if you want to prevent interruptions in the middle of operations when using multiple combinations of the above functions, use the following `ATOMIC_BLOCK_FORCEON` macro.
|
||||
|
||||
eg.
|
||||
```c
|
||||
void some_function() {
|
||||
// some process
|
||||
ATOMIC_BLOCK_FORCEON {
|
||||
// Atomic Processing
|
||||
}
|
||||
// some process
|
||||
}
|
||||
```
|
||||
|
||||
`ATOMIC_BLOCK_FORCEON` forces interrupts to be disabled before the block is executed, without regard to whether they are enabled or disabled. Then, after the block is executed, the interrupt is enabled.
|
||||
|
||||
Note that `ATOMIC_BLOCK_FORCEON` can therefore be used if you know that interrupts are enabled before the execution of the block, or if you know that it is OK to enable interrupts at the completion of the block.
|
||||
|
@@ -116,6 +116,7 @@
|
||||
* [概要](ja/breaking_changes.md)
|
||||
* [プルリクエストにフラグが付けられた](ja/breaking_changes_instructions.md)
|
||||
* 履歴
|
||||
* [2020年8月29日](ja/ChangeLog/20200829.md)
|
||||
* [2020年5月30日](ja/ChangeLog/20200530.md)
|
||||
* [2020年2月29日](ja/ChangeLog/20200229.md)
|
||||
* [2019年8月30日](ja/ChangeLog/20190830.md)
|
||||
|
@@ -1,8 +1,8 @@
|
||||
# コンボ
|
||||
|
||||
<!---
|
||||
original document: 0.8.94:docs/feature_combo.md
|
||||
git diff 0.8.94 HEAD -- docs/feature_combo.md | cat
|
||||
original document: 0.10.36:docs/feature_combo.md
|
||||
git diff 0.10.36 HEAD -- docs/feature_combo.md | cat
|
||||
-->
|
||||
|
||||
コンボ機能は、同時押し方式でのカスタムアクション追加機能です。同時に複数のキーを押して、異なる効果を生み出すことができます。例えば、タッピング時間内で `A` と `S` を押すと、代わりに `ESC` が押されます。もっと複雑なタスクを実行させることもできます。
|
||||
@@ -60,7 +60,7 @@ combo_t key_combos[COMBO_COUNT] = {
|
||||
[XV_PASTE] = COMBO_ACTION(paste_combo),
|
||||
};
|
||||
|
||||
void process_combo_event(uint8_t combo_index, bool pressed) {
|
||||
void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
switch(combo_index) {
|
||||
case ZC_COPY:
|
||||
if (pressed) {
|
||||
|
@@ -15,7 +15,8 @@ RGB LED を使いたい場合は、代わりに [RGB マトリックスサブシ
|
||||
|
||||
I2C IS31FL3731 RGB コントローラを使ったアドレス指定可能な LED マトリックスライトのための基本的なサポートがあります:有効にするには、`rules.mk` に以下を追加します:
|
||||
|
||||
LED_MATRIX_ENABLE = IS31FL3731
|
||||
LED_MATRIX_ENABLE = yes
|
||||
LED_MATRIX_DRIVER = IS31FL3731
|
||||
|
||||
1から4個の IS31FL3731 IC を使うことができます。キーボード上に存在しない IC の `LED_DRIVER_ADDR_<N>` 定義を指定しないでください。`config.h` に以下の項目を定義することができます:
|
||||
|
||||
|
33
docs/ko-kr/README.md
Normal file
33
docs/ko-kr/README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Quantum Mechanical Keyboard Firmware
|
||||
|
||||
[](https://github.com/qmk/qmk_firmware/tags)
|
||||
[](https://travis-ci.org/qmk/qmk_firmware)
|
||||
[](https://discord.gg/Uq7gcHh)
|
||||
[](https://docs.qmk.fm)
|
||||
[](https://github.com/qmk/qmk_firmware/pulse/monthly)
|
||||
[](https://github.com/qmk/qmk_firmware/)
|
||||
|
||||
## QMK Firmware 란?
|
||||
|
||||
QMK(*Quantum Mechanical Keyboard 양자 기계식 키보드*)란 QMK 컴워어, QMK 툴박스, qmk.fm 를 관리하고 있는 오픈소스 커뮤니티 입니다. QMK펌웨어는 [tmk\_keyboard](http://github.com/tmk/tmk_keyboard)를 바탕으로 만들어진 키보드펌웨어이며, Atmel AVR컨트롤러와 [OLKB 제품군](http://olkb.com) [ErgoDox EZ](http://www.ergodox-ez.com), 그리고 [Clueboard 제품군](http://clueboard.co/) 이용할때 매우 편리합니다. 또한 QMK는 ChibiOS를 사용하여 ARM기반의 컨트롤러로도 사용할수 있습니다. 마지막으로 QMK는 커스텀회로와 핸드와이어드 키보드을 작동시키는데에도 사용가능합니다.
|
||||
|
||||
|
||||
## 설치하기
|
||||
|
||||
만약 당신이 QMK에 키보드, 키맵, 또는 새로운 기능을 추가하고싶다면, 가장쉬운 방법은 Github를 통해 [저장소(REPO)를 추가하고]((https://github.com/qmk/qmk_firmware#fork-destination-box)) 로컬에서 변화 또는 수정하고, [PULL REQUEST](https://github.com/qmk/qmk_firmware/pulls)을 통해 업로드 할수 있습니다.
|
||||
|
||||
또다른 방법으로는, 직접 파일들 로컬로 다운로드 하거나([zip](https://github.com/qmk/qmk_firmware/zipball/master), [tar](https://github.com/qmk/qmk_firmware/tarball/master)), git (`git@github.com:qmk/qmk_firmware.git`), https (`https://github.com/qmk/qmk_firmware.git`)을 통해 클론을 만들수 있습니다.
|
||||
|
||||
## 컴파일
|
||||
|
||||
먼저 컴파일을 하기전 AVR 이나 ARM [개발환경](getting_started_build_tools.md)을 구축해야 합니다. 모든준비가 끝났다면 `make`를 다음과 같이 키보드와 키맵을 선택하여 컴파일 할 수 있습니다.
|
||||
|
||||
make planck/rev4:default
|
||||
|
||||
이 커맨드는 `rev4`버전의 `planck`를 `default`키맵으로 컴파일 할것입니다. 다만 모든 키보드는 파일, 수정본 또는 세부프로젝트를 가지고있지 않음으로 수정본 부분을 생략될수 있습니다.
|
||||
|
||||
make preonic:default
|
||||
|
||||
## 커스터마이징
|
||||
|
||||
QMK는 사용할 수 있는 매우 다양한 [기능](features.md)과 체계화된 [참고자료](http://docs.qmk.fm)들이 있습니다. 그중 대부분은 [키맵](keymap.md)을 수정하거나 [키코드](keycodes.md)를 변경하는데에 특화되어 있습니다.
|
156
docs/ko-kr/getting_started_build_tools.md
Normal file
156
docs/ko-kr/getting_started_build_tools.md
Normal file
@@ -0,0 +1,156 @@
|
||||
# 컴파일 도구 설치
|
||||
|
||||
이 페이지는 QMK 컴파일 환경을 설치하는 방법을 설명합니다. 이 페이지는 AVR 프로세서들(예를 들면 atmega32u4와 비슷한)을 위한 가이드를 제공합니다
|
||||
|
||||
<!-- FIXME: We should have ARM instructions somewhere. -->
|
||||
|
||||
|
||||
**노트:** 만약 당신이 처음 시작한다면 [입문자를 위한 가이드](newbs.md)페이지를 확인하세요.
|
||||
|
||||
계속하기전에 당신의 서브모듈(외부라이브러리)이 최신인지 `make git-submodule`을 사용하여 확인하세요.
|
||||
|
||||
## 리눅스
|
||||
|
||||
당신이 항상 최신 파일을 가지고 있는지는 `sudo util/qmk_install.sh`을 이용하여 간단히 확인할 수 있습니다. 이 명령어는 당신이 필요한 모든 속성물(dependencies)를 설치할 것입니다. **이 명령어는 `apt-get upgrade`를 사용합니다**
|
||||
|
||||
또한 당신의 직접 필요한 것들을 설치할 수도 있습니다. 하지만 이 자료는 항상 최신의 자료을 가지고 있지 않습니다.
|
||||
|
||||
현재로써 필요한 것은 다음과 같습니다. 하지만 당신이 하는 작업에 따라 당신은 다음 패키지를 다 쓰지 않을 수도 있습니다. 또한 환경에 따라 모든 다음 패키지는 다른이름으로 존재하거나, 없을 수도 있습니다.
|
||||
|
||||
```
|
||||
build-essential
|
||||
gcc
|
||||
unzip
|
||||
wget
|
||||
zip
|
||||
gcc-avr
|
||||
binutils-avr
|
||||
avr-libc
|
||||
dfu-programmer
|
||||
dfu-util
|
||||
gcc-arm-none-eabi
|
||||
binutils-arm-none-eabi
|
||||
libnewlib-arm-none-eabi
|
||||
git
|
||||
```
|
||||
|
||||
당신이 사용하는 패키지 매니져에서 이러한 방법으로 설치하십시요.
|
||||
|
||||
데비안 / 우분투 예시:
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc unzip wget zip gcc-avr binutils-avr avr-libc dfu-programmer dfu-util gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi
|
||||
|
||||
페도라 / 레드햇 예시:
|
||||
|
||||
sudo dnf install gcc unzip wget zip dfu-util dfu-programmer avr-gcc avr-libc binutils-avr32-linux-gnu arm-none-eabi-gcc-cs arm-none-eabi-binutils-cs arm-none-eabi-newlib
|
||||
|
||||
아치 / 맨자로(Manjaro) 예시:
|
||||
|
||||
pacman -S base-devel gcc unzip wget zip avr-gcc avr-binutils avr-libc dfu-util arm-none-eabi-gcc arm-none-eabi-binutils arm-none-eabi-newlib git dfu-programmer dfu-util
|
||||
|
||||
## 닉스 (NIX)
|
||||
|
||||
만약 당신이 [NixOS](https://nixos.org/)를 사용중이거나 NIX를 리눅스 또는 맥에서 사용중이라면 `nix-shell`를 root 디렉토리에서 사용하여 컴파일 환경의 구축할 수 있습니다.
|
||||
|
||||
기본적으로 다음 커맨드는 AVR과 ARM 컴파일러를 설치할것입니다. 만약 필요 없다면 `avr` 또는 `arm`을 인수에서 해제할 수 있습니다.
|
||||
|
||||
nix-shell --arg arm false
|
||||
|
||||
## 맥
|
||||
당신이 홈브루([homebrew](http://brew.sh/))를 사용한다면, 다음을 입력하세요.
|
||||
|
||||
brew tap osx-cross/avr
|
||||
brew tap PX4/homebrew-px4
|
||||
brew update
|
||||
brew install avr-gcc@7
|
||||
brew link --force avr-gcc@7
|
||||
brew install dfu-programmer
|
||||
brew install dfu-util
|
||||
brew install gcc-arm-none-eabi
|
||||
brew install avrdude
|
||||
|
||||
이 방법을 가장 추천합니다. 만약 홈브루가 없다면 커맨드라인 환경에서 매우 편한 [Homebrew](http://brew.sh/)를 다운받는 것을 추천합니다. 참고로 `avr-gcc@7`를 설치하는 중 `make`과 `make install`는 대개 20분 넘게 걸리고 CPU 사용량이 높아집니다.
|
||||
|
||||
## msys2를 사용하는 윈도우 (추천)
|
||||
윈도우 비스타 부터 최신버젼까지 가장추천되는 환경은 [msys2](http://www.msys2.org)를 이용하는 것입니다. (윈도우 7과 윈도우 10에서 모두 테스트되었음)
|
||||
|
||||
* 이 사이트에 있는 설명을 이용해 msys2를 설치하세요: http://www.msys2.org
|
||||
* ``MSYS2 MingGW 64-bit`` 를 여세요
|
||||
* QMK폴더로 이동하세요. c드라이브 루트에 있는경우:
|
||||
* `$ cd /c/qmk_firmware`
|
||||
* `util/qmk_install.sh`을 실행시키고 나오는데요 따라하세요
|
||||
|
||||
### 크리에이터 업데이트
|
||||
만약 당신의 윈도우 10이 크리에이터 업데이트 버전 또는 더 높은 버전이라면 바로 컴파일과 프로그램 업로드(flashing)를 할 수 있습니다. 크리에이터 업데이트 전 버전이라면 컴파일만 가능합니다. 만약 당신이 잘 모르겠거나 업데이트된 버전이 아니라면 [이 링크](https://support.microsoft.com/en-us/instantanswers/d4efb316-79f0-1aa1-9ef3-dcada78f3fa0/get-the-windows-10-creators-update)를 확인해 보십시오.
|
||||
|
||||
### 리눅스용 윈도우 하위 시스템 사용 (Windows10 Subsystem for Linux)
|
||||
크리에이터 업데이트에 추가로 만약 당신이 리눅스용 윈도우 하위 시스템이 필요하다면 이 링크에서 다운받으십시오: [설명](http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/)
|
||||
|
||||
만약 당신이 이미 리눅스용 윈도우 하위 시스템을 Anniversary업데이트를 통해 받았다면 이 링크에서 16.04LTS로 업데이트 하는것을 추천합니다. 왜냐하면 업데이트 없이는 일부키보드가 14.04LTS에 포함되있는 도구들로 컴파일되지 않을수 있기때문입니다 : [WSL 업데이트](https://betanews.com/2017/04/14/upgrade-windows-subsystem-for-linux/)
|
||||
|
||||
|
||||
### Git
|
||||
만약 당신이 이미 파일을 로컬로 복제하였다면 이 섹션을 무시하십시요.
|
||||
|
||||
당신은 파일을 기본적인 git을 사용하여 로컬로 복제해야 합니다. **주의, WSL Git을 사용하면 안됩니다** [Git](https://git-scm.com/download/win) 이 링크에서 git을 다운받고 설치하십시오.
|
||||
그리고 [기본설정](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup), 유저네임과 이메일을 설정하는 것은 만약 당신이 온라인에 기여할 계획이라면 매우 중요합니다.
|
||||
|
||||
Git의 설치가 완료되었다면 Git Bash커맨드을 열고 당신의 복제 QMK파일이 있는 위치로 이동하고 `git clone --recurse-submodules https://github.com/qmk/qmk_firmware`를 실행 시키십니오. 이 커맨드는 새로운 `qmk_firmware`폴더를 이미 존재하는 것의 하위 폴더설정으로 생성할 것입니다.
|
||||
|
||||
### 도구(Toolchain) 설정
|
||||
기본적으로 도구설정은 리눅스용 윈도우 하위 시스템이 설치될때 자동으로 설정됩니다. 하지만 수동적으로 하고 싶다면 여기 설명이 있습니다. (If you want to do everything manually, there are no other instructions than the scripts themselves, but you can always open issues and ask for more information. )
|
||||
|
||||
1. "Bash On Ubuntu On Windows" 을 실행시키십시오.
|
||||
2. 당신이 `qmk_firmware`를 복제한 위치로 가십시오. WSL(리눅스용 윈도우 하위 시스템 사용)에서 `/mnt/`로 시작되는 패스를 찾으십시오. 즉 당신은 다음과 같은 형식으로 입력해야 합니다. `cd /mnt/c/path/to/qmk_firmware` (Note that the paths start with `/mnt/`in the WSL, so you have to write for example `cd /mnt/c/path/to/qmk_firmware`.)
|
||||
3. `util/wsl_install.sh`를 실행시키고 화면에 나오는 지시를 따르십니오.
|
||||
4. Bash command window를 재실행 시키십시오.
|
||||
5. 이로써 당신은 컴파일과 프로그램 업로드(flashing)을 위한 준비가 모두 끝났습니다.
|
||||
|
||||
### 중요한 참고사항
|
||||
*`util/wsl_install.sh` 명령어를 다시 실행시켜 최신 업데이트를 다운받을 수 있습니다.
|
||||
* QMK 폴더의 위치는 윈도우 파일시스템을 기반으로 해야 됩니다. WSL는 외부실행파일를 작동 시킬수 없기 때문이죠.
|
||||
* WSL의 Git은 윈도우용 Git과 **호환되지 않습니다**
|
||||
* 파일을 수정하는 것은 WSL안과 밖에서 모두 가능합니다 하지만 만약 .makefile 혹은 .sh를 수정한다면 유닉스 라인엔딩(Unix line endings)을 지원하는 에디터를 사용하는지 확인하십이오. 그렇지 않다면 컴파일이 되지않을 수도 있습니다.
|
||||
|
||||
## 윈두우 (비스타 혹은 더 최신) (비추천)
|
||||
|
||||
이 섹션은 윈도우 비스타 혹은 더 최신버젼을 위한 오래된 설명입니다. [MSYS2](#windows-with-msys2-recommended)를 사용하는 것을 더 추천합니다.
|
||||
|
||||
1. WinAVR을 설치하였다면 먼저 삭제하십시오.
|
||||
2. [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe)을 설치하십시오. (Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**)
|
||||
3. 만약 당신이 Infinity을 기반으로 하는 키보드에 프로그램 업로드를(flashing) 할거라면 dfu-util을 설치해야 합니다, [Input Club](https://github.com/kiibohd/controller/wiki/Loading-DFU-Firmware) 를 참고 하십시오.
|
||||
4. [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download)를 설치하십시오. 설치중 윈도우화면에서 GUI 추가 설치 옵션을 해재하십니오. **기본 설치 위치를 바꾸지 마십시오.** 이 명령어는 기본위치를 기반으로 하고 있습니다.
|
||||
5. 레파지토리를 복제하십시오. [이 링크로 압축파일을 받고 앞축해제 하십시오.](https://github.com/qmk/qmk_firmware/archive/master.zip) 윈도우 탐색기에서 다운받은 파일을 여십시오.
|
||||
6. `\util` 폴더를 여십시오.
|
||||
7. `1-setup-path-win` .bat파일을 더블클릭해서 실행시키시오. 유저 계정 설정 변경을 허용해야될 수도 있습니다. 스페이스바를 눌러 설치가 성공적으로 완료되었다는 메세지를 닫을 수 있습니다.
|
||||
8. `2-setup-environment-win` .bat파일에 우클릭해서 '관리자 권한으로 실행'으로 실행시키십시오. 이 작업을 꽤 오래 걸릴 수도 있습니다. 또한 드라이버 설정을 승인해야 될 수도 있습니다. 하지만 이 모든것이 끝나면 당신의 시스템의 설정이 모두 끝났습니다.
|
||||
|
||||
만약 이 작업을 하는데에 문제가 있어 도움받고 싶다면 *Win_Check_Output.txt*을 생성하는 것이 도움이 될것입니다. 이 파일은 `Win_Check.bat`을 `\util`폴더에서 실행시켜 생성할 수 있습니다.
|
||||
|
||||
## 도커(Docker)
|
||||
만약 위작업들이 당신에게 좀 어렵게 느껴졌다면 도커(Docker)가 당신을 위한 최선일 수도 있습니다(의역). [Docker CE](https://docs.docker.com/install/#supported-platforms)를 설치한뒤 아래 커맨드를 `qmk_firmware` 디랙토리에서 실행시켜 키보드 또는 키맵을 생성시킵니다.
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap
|
||||
# 예: util/docker_build.sh ergodox_ez:steno
|
||||
```
|
||||
이 커맨드는 원하는 키보드 또는 키맵을 컴파일하고 `.hex`또는 `.bin`파일을 프로그램 업로드를(flashing) 위해 QMK디랙토리에 생성할것입니다. 만약 `:keymap`이 생략된다면 `default`이 기본을로 사용됩니다. 참고로 여기서 사용되는 인수는 `make` 커맨드를 사용하여 컴파일할때와 동일합니다.
|
||||
|
||||
|
||||
또한 스크립트를 그냥 아무 인수 없이도 사용가능합니다. 그렇게 된다면 프로그램은 하나씩 자동으로 인수입력을 요구 할것입니다. 어쩌면 이방법이 더 쉬울 수도 있습니다.
|
||||
```bash
|
||||
util/docker_build.sh
|
||||
# 인수을 입력받습니다.(아무것도 쓰지 않고 놔두는면 기본값으로 설정됩니다)
|
||||
```
|
||||
|
||||
다음과 같이 `target`를 사용하여 컴파일과 프로그램 업로드(flashing)을 동시에 할수도 있습니다.
|
||||
```bash
|
||||
util/docker_build.sh keyboard:keymap:target
|
||||
# 예: util/docker_build.sh planck/rev6:default:dfu-util
|
||||
```
|
||||
만약 당시이 리눅스를 사용한다면 이 커맨드들은 추가 설정 없이 바로 작동할 것입니다. 하지만 위도우 또는 맥 환경에서는 [Docker Machine](http://gw.tnode.com/docker/docker-machine-with-usb-support-on-windows-macos/)를 사용하여야 이 커맨드들을 사용가능합니다. Docker Machine설정은 꽤 지루하고 짜증남으로 추천하지 않고 [QMK Toolbox](https://github.com/qmk/qmk_toolbox)를 사용하는 것을 추천합니다.
|
||||
|
||||
!> 윈도우에서 독커는 [Hyper-V](https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v)을 활성화 설정하여야 사용가능합니다. 즉, 도커는 Hyper-V를 지원하지 않는 윈도우 7, 윈도우 8, 그리고 **윈도우 10 홈**과 같은 윈도우 버전에서 사용할수 없다는 것을 의미합니다.
|
||||
|
||||
## Vagrant
|
||||
만약 컴웨어를 사용하는데 문제가 있다면 Vagrant라는 이름의 툴을 사용해 볼 수 있습니다. 이 툴은 가상환경을 세팅해줌과 동시에 컴웨어를 사용하는데에 필요한 모든 설정을 해줄 것입니다. OLKB는 가상환경에 파일을 호스팅하지 않습니다. [Vagrant 가이드](getting_started_vagrant.md)에서 더 많은 정보를 확인할 수 있습니다.
|
17
docs/ko-kr/getting_started_getting_help.md
Normal file
17
docs/ko-kr/getting_started_getting_help.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 도움 받기
|
||||
|
||||
QMK에서 도움을 받는 방법은 다양합니다.
|
||||
|
||||
**주의, 아래 링크들은 영어로 이루어져 있으며 영어 사용이 가능해야 편리하게 이용할 수 있습니다.**
|
||||
|
||||
## 디스코드 실시간 채팅
|
||||
|
||||
[QMK 디스코드 서버](https://discord.gg/Uq7gcHh)에서 QMK 개발자들과 실시간으로 대화를 나눌수있습니다. 이 디스코드에는 펌웨어, 툴박스, 하드웨어, 그리고 컨피겨레이터(configurator)에 관한 특별화된 채널이 운영되고 있습니다.
|
||||
|
||||
## OLKB 서브레딧
|
||||
|
||||
공식 QMK 포럼은 [reddit.com](https://reddit.com) 에 [/r/olkb](https://reddit.com/r/olkb)입니다.
|
||||
|
||||
## Github 이슈
|
||||
|
||||
[issue on GitHub](https://github.com/qmk/qmk_firmware/issues)에서 문제를 보고 할 수 있습니다. 이 링크는 문제가 오랜 시간을 필요로하거나 디버깅를 요구 할때 매우 유용합니다.
|
67
docs/ko-kr/getting_started_github.md
Normal file
67
docs/ko-kr/getting_started_github.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# QMK와 함께 Github를 사용하는 방법
|
||||
|
||||
Github can be a little tricky to those that aren't familiar with it - this guide will walk through each step of forking, cloning, and submitting a pull request with QMK.
|
||||
|
||||
Github는 자주 사용하는 사람이 아니면 좀 여려울수도 있습니다. 이 문서는 Github를 사용하는데 필요한 forking, cloning 그리고 submitting a pull request with QMK를 설명할 것입니다.
|
||||
|
||||
?> 이 가이드는 당신이 git커맨드를 사용하는데 익숙하고 git환경을 당신의 시스템이 설치하였다는 전제하에 작성되었습니다.
|
||||
|
||||
아래와 같이 [QMK Github 페이지](https://github.com/qmk/qmk_firmware)에서 당신은 "Fork"라고 쓰여있는 버튼을 볼 수 있습니다
|
||||
|
||||

|
||||
|
||||
만약 당신이 어느기관 소속이고, 무슨 계정을 사용할것인지 골라야 한다면 개인 계정을 사용하는 것을 추천합니다.
|
||||
"Fork"가 성공적으로 끝났다면 아래 보이는 "Clone or Download"를 눌러야 합니다.
|
||||
|
||||

|
||||
|
||||
"HTTPS"채크 했는지 확인하고 나와 있는 링크를 복사하세요.
|
||||
|
||||

|
||||
|
||||
여기거 부터 커맨드라인을 사용합니다. 커맨드 라인에서 `git clone `을 치고 복사한 링크를 붙여넣은후 실행시키세요.
|
||||
|
||||
```
|
||||
user@computer:~$ git clone https://github.com/whoeveryouare/qmk_firmware.git
|
||||
Cloning into 'qmk_firmware'...
|
||||
remote: Counting objects: 46625, done.
|
||||
remote: Compressing objects: 100% (2/2), done.
|
||||
remote: Total 46625 (delta 0), reused 0 (delta 0), pack-reused 46623
|
||||
Receiving objects: 100% (46625/46625), 84.47 MiB | 3.14 MiB/s, done.
|
||||
Resolving deltas: 100% (29362/29362), done.
|
||||
Checking out files: 100% (2799/2799), done.
|
||||
```
|
||||
|
||||
당신은 이제 모든파일이 로컬시스템이 추가 되었습니다 그리고 이제 키맵을 추가하거나 컴파일, 프로그램 업로드(flashing)를 할 수 있습니다.
|
||||
모든 추가 변경을 만든 뒤에는 add, commit, and push를 사용하여 당신의 Folk에 추가 할 수 있습니다.
|
||||
|
||||
```
|
||||
user@computer:~$ git add .
|
||||
user@computer:~$ git commit -m "adding my keymap"
|
||||
[master cccb1608] adding my keymap
|
||||
1 file changed, 1 insertion(+)
|
||||
create mode 100644 keyboards/planck/keymaps/mine/keymap.c
|
||||
user@computer:~$ git push
|
||||
Counting objects: 1, done.
|
||||
Delta compression using up to 4 threads.
|
||||
Compressing objects: 100% (1/1), done.
|
||||
Writing objects: 100% (1/1), 1.64 KiB | 0 bytes/s, done.
|
||||
Total 1 (delta 1), reused 0 (delta 0)
|
||||
remote: Resolving deltas: 100% (1/1), completed with 1 local objects.
|
||||
To https://github.com/whoeveryouare/qmk_firmware.git
|
||||
+ 20043e64...7da94ac5 master -> master
|
||||
```
|
||||
|
||||
이로써 당신이 만든 모든 변경들이 당신의 Github의 Folk에 추가 되었습니다. (`https://github.com/<whoeveryouare>/qmk_firmware`)에서 확인하고 "New Pull Request"를 눌러 변경사항을 QMK에 업로드할수 있습니다.
|
||||
|
||||

|
||||
|
||||
이 버튼을 누르면 당신이 만든 모든 변경사항들이 보여질 것입니다. 만약 모든 변경사항이 맘에 든다면 "Create Pull Request"를 눌러 요청을 확정할수 있습니다.
|
||||
|
||||
**요청사항이 확정된다고 변경사항이 바로 적용되는 것은 아닙니다.**
|
||||
|
||||

|
||||
|
||||
요청을 한뒤 QMK개발자들은 댓글로 무엇이 변경되었는지 등을 물어 볼수있지만 끝에는 매인 디랙토리로 업로드 될것입니다.
|
||||
|
||||
**"Thanks for contributing to QMK :)"**
|
@@ -55,3 +55,7 @@ Unfortunately, these keycodes cannot be used in Mod-Taps or Layer-Taps, since an
|
||||
Additionally, you may run into issues when using Remote Desktop Connection on Windows. Because these codes send shift very fast, Remote Desktop may miss the codes.
|
||||
|
||||
To fix this, open Remote Desktop Connection, click on "Show Options", open the the "Local Resources" tab. In the keyboard section, change the drop down to "On this Computer". This will fix the issue, and allow the characters to work correctly.
|
||||
|
||||
## Other Resources
|
||||
|
||||
See the [Tap-Hold Configuration Options](tap_hold.md) for additional flags that tweak Mod-Tap behavior.
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# The Complete Newbs Guide To QMK
|
||||
# The QMK Tutorial
|
||||
|
||||
Your computer keyboard has a processor inside of it, similar to the one inside your computer. This processor runs software that is responsible for detecting button presses and informing the computer when keys are pressed. QMK Firmware fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating an executable program for your keyboard.
|
||||
|
||||
|
@@ -60,9 +60,12 @@ After Homebrew is installed run this command:
|
||||
|
||||
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:
|
||||
|
||||
* Debian / Ubuntu / Devuan: `sudo apt install git python3 python3-pip`
|
||||
* Fedora / Red Hat / CentOS: `sudo yum install git python3 python3-pip`
|
||||
* Arch / Manjaro: `sudo pacman -S git python python-pip python-setuptools libffi`
|
||||
* Debian / Ubuntu / Devuan: `sudo apt install -y git python3-pip`
|
||||
* Fedora / Red Hat / CentOS: `sudo yum -y install git python3-pip`
|
||||
* Arch / Manjaro: `sudo pacman --needed --noconfirm -S git python-pip libffi`
|
||||
* Void: `sudo xbps-install -y git python3-pip`
|
||||
* Solus: `sudo eopkg -y install git python3`
|
||||
* Sabayon: `sudo equo install dev-vcs/git dev-python/pip`
|
||||
|
||||
Install the global CLI to bootstrap your system:
|
||||
|
||||
|
@@ -22,7 +22,7 @@ Sometimes, you want to activate a one-shot key as part of a macro or tap dance r
|
||||
|
||||
For one shot layers, you need to call `set_oneshot_layer(LAYER, ONESHOT_START)` on key down, and `clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED)` on key up. If you want to cancel the oneshot, call `reset_oneshot_layer()`.
|
||||
|
||||
For one shot mods, you need to call `set_oneshot_mods(MOD)` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||
For one shot mods, you need to call `set_oneshot_mods(MOD_BIT(KC_*))` to set it, or `clear_oneshot_mods()` to cancel it.
|
||||
|
||||
!> If you're having issues with OSM translating over Remote Desktop Connection, this can be fixed by opening the settings, going to the "Local Resources" tap, and in the keyboard section, change the drop down to "On this Computer". This will fix the issue and allow OSM to function properly over Remote Desktop.
|
||||
|
||||
|
@@ -73,6 +73,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- commented-out functions removed too
|
||||
- `matrix_init_board()` etc. migrated to `keyboard_pre_init_kb()`, see: [keyboard_pre_init*](https://docs.qmk.fm/#/custom_quantum_functions?id=keyboard_pre_init_-function-documentation)
|
||||
- prefer `CUSTOM_MATRIX = lite` if custom matrix used, allows for standard debounce, see [custom matrix 'lite'](https://docs.qmk.fm/#/custom_matrix?id=lite)
|
||||
- prefer LED indicator [Configuration Options](https://docs.qmk.fm/#/feature_led_indicators?id=configuration-options) to custom `led_update_*()` implementations where possible
|
||||
- `keyboard.h`
|
||||
- `#include "quantum.h"` appears at the top
|
||||
- `LAYOUT` macros should use standard definitions if applicable
|
||||
|
@@ -179,6 +179,25 @@ Holding and releasing a dual function key without pressing another key will resu
|
||||
|
||||
For instance, holding and releasing `LT(2, KC_SPACE)` without hitting another key will result in nothing happening. With this enabled, it will send `KC_SPACE` instead.
|
||||
|
||||
For more granular control of this feature, you can add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define RETRO_TAPPING_PER_KEY
|
||||
```
|
||||
|
||||
You can then add the following function to your keymap:
|
||||
|
||||
```c
|
||||
bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case LT(2, KC_SPACE):
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Why do we include the key record for the per key functions?
|
||||
|
||||
One thing that you may notice is that we include the key record for all of the "per key" functions, and may be wondering why we do that.
|
||||
|
@@ -20,50 +20,111 @@
|
||||
|
||||
#ifdef SOFT_SERIAL_PIN
|
||||
|
||||
# ifdef __AVR_ATmega32U4__
|
||||
// if using ATmega32U4 I2C, can not use PD0 and PD1 in soft serial.
|
||||
# ifdef USE_AVR_I2C
|
||||
# if SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1
|
||||
# error Using ATmega32U4 I2C, so can not use PD0, PD1
|
||||
# endif
|
||||
# if !(defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__) || defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
|
||||
# error serial.c is not supported for the currently selected MCU
|
||||
# endif
|
||||
// if using ATmega32U4/2, AT90USBxxx I2C, can not use PD0 and PD1 in soft serial.
|
||||
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) || defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
# if defined(USE_AVR_I2C) && (SOFT_SERIAL_PIN == D0 || SOFT_SERIAL_PIN == D1)
|
||||
# error Using I2C, so can not use PD0, PD1
|
||||
# endif
|
||||
# endif
|
||||
// PD0..PD3, common config
|
||||
# if SOFT_SERIAL_PIN == D0
|
||||
# define EIMSK_BIT _BV(INT0)
|
||||
# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||
# define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D1
|
||||
# define EIMSK_BIT _BV(INT1)
|
||||
# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||
# define SERIAL_PIN_INTERRUPT INT1_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D2
|
||||
# define EIMSK_BIT _BV(INT2)
|
||||
# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||
# define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
# define EICRx EICRA
|
||||
# elif SOFT_SERIAL_PIN == D3
|
||||
# define EIMSK_BIT _BV(INT3)
|
||||
# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||
# define SERIAL_PIN_INTERRUPT INT3_vect
|
||||
# define EICRx EICRA
|
||||
# endif
|
||||
|
||||
# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
||||
// ATmegaxxU2 specific config
|
||||
# if defined(__AVR_ATmega16U2__) || defined(__AVR_ATmega32U2__)
|
||||
// PD4(INT5), PD6(INT6), PD7(INT7), PC7(INT4)
|
||||
# if SOFT_SERIAL_PIN == D4
|
||||
# define EIMSK_BIT _BV(INT5)
|
||||
# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51)))
|
||||
# define SERIAL_PIN_INTERRUPT INT5_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == D6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == D7
|
||||
# define EIMSK_BIT _BV(INT7)
|
||||
# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71)))
|
||||
# define SERIAL_PIN_INTERRUPT INT7_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == C7
|
||||
# define EIMSK_BIT _BV(INT4)
|
||||
# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41)))
|
||||
# define SERIAL_PIN_INTERRUPT INT4_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if SOFT_SERIAL_PIN >= D0 && SOFT_SERIAL_PIN <= D3
|
||||
# if SOFT_SERIAL_PIN == D0
|
||||
# define EIMSK_BIT _BV(INT0)
|
||||
# define EICRx_BIT (~(_BV(ISC00) | _BV(ISC01)))
|
||||
# define SERIAL_PIN_INTERRUPT INT0_vect
|
||||
# elif SOFT_SERIAL_PIN == D1
|
||||
# define EIMSK_BIT _BV(INT1)
|
||||
# define EICRx_BIT (~(_BV(ISC10) | _BV(ISC11)))
|
||||
# define SERIAL_PIN_INTERRUPT INT1_vect
|
||||
# elif SOFT_SERIAL_PIN == D2
|
||||
# define EIMSK_BIT _BV(INT2)
|
||||
# define EICRx_BIT (~(_BV(ISC20) | _BV(ISC21)))
|
||||
# define SERIAL_PIN_INTERRUPT INT2_vect
|
||||
# elif SOFT_SERIAL_PIN == D3
|
||||
# define EIMSK_BIT _BV(INT3)
|
||||
# define EICRx_BIT (~(_BV(ISC30) | _BV(ISC31)))
|
||||
# define SERIAL_PIN_INTERRUPT INT3_vect
|
||||
# endif
|
||||
// ATmegaxxU4 specific config
|
||||
# if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)
|
||||
// PE6(INT6)
|
||||
# if SOFT_SERIAL_PIN == E6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
# endif
|
||||
|
||||
// AT90USBxxx specific config
|
||||
# if defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__)
|
||||
// PE4..PE7(INT4..INT7)
|
||||
# if SOFT_SERIAL_PIN == E4
|
||||
# define EIMSK_BIT _BV(INT4)
|
||||
# define EICRx_BIT (~(_BV(ISC40) | _BV(ISC41)))
|
||||
# define SERIAL_PIN_INTERRUPT INT4_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E5
|
||||
# define EIMSK_BIT _BV(INT5)
|
||||
# define EICRx_BIT (~(_BV(ISC50) | _BV(ISC51)))
|
||||
# define SERIAL_PIN_INTERRUPT INT5_vect
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E6
|
||||
# define EIMSK_BIT _BV(INT6)
|
||||
# define EICRx_BIT (~(_BV(ISC60) | _BV(ISC61)))
|
||||
# define SERIAL_PIN_INTERRUPT INT6_vect
|
||||
# else
|
||||
# error invalid SOFT_SERIAL_PIN value
|
||||
# define EICRx EICRB
|
||||
# elif SOFT_SERIAL_PIN == E7
|
||||
# define EIMSK_BIT _BV(INT7)
|
||||
# define EICRx_BIT (~(_BV(ISC70) | _BV(ISC71)))
|
||||
# define SERIAL_PIN_INTERRUPT INT7_vect
|
||||
# define EICRx EICRB
|
||||
# endif
|
||||
|
||||
# else
|
||||
# error serial.c now support ATmega32U4 only
|
||||
# endif
|
||||
|
||||
# ifndef SERIAL_PIN_INTERRUPT
|
||||
# error invalid SOFT_SERIAL_PIN value
|
||||
# endif
|
||||
|
||||
# define setPinInputHigh(pin) (DDRx_ADDRESS(pin) &= ~_BV((pin)&0xF), PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define setPinOutput(pin) (DDRx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinHigh(pin) (PORTx_ADDRESS(pin) |= _BV((pin)&0xF))
|
||||
# define writePinLow(pin) (PORTx_ADDRESS(pin) &= ~_BV((pin)&0xF))
|
||||
# define readPin(pin) ((bool)(PINx_ADDRESS(pin) & _BV((pin)&0xF)))
|
||||
|
||||
# define ALWAYS_INLINE __attribute__((always_inline))
|
||||
# define NO_INLINE __attribute__((noinline))
|
||||
# define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
|
||||
@@ -210,15 +271,9 @@ void soft_serial_target_init(SSTD_t *sstd_table, int sstd_table_size) {
|
||||
Transaction_table_size = (uint8_t)sstd_table_size;
|
||||
serial_input_with_pullup();
|
||||
|
||||
// Enable INT0-INT3,INT6
|
||||
// Enable INT0-INT7
|
||||
EIMSK |= EIMSK_BIT;
|
||||
# if SOFT_SERIAL_PIN == E6
|
||||
// Trigger on falling edge of INT6
|
||||
EICRB &= EICRx_BIT;
|
||||
# else
|
||||
// Trigger on falling edge of INT0-INT3
|
||||
EICRA &= EICRx_BIT;
|
||||
# endif
|
||||
EICRx &= EICRx_BIT;
|
||||
}
|
||||
|
||||
// Used by the sender to synchronize timing with the reciver.
|
||||
|
@@ -58,18 +58,23 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) {
|
||||
}
|
||||
|
||||
__attribute__((weak)) void i2c_init(void) {
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_INPUT);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, I2C1_SCL_PAL_MODE);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, I2C1_SDA_PAL_MODE);
|
||||
#else
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SCL_BANK, I2C1_SCL, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
palSetPadMode(I2C1_SDA_BANK, I2C1_SDA, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
i2c_status_t i2c_start(uint8_t address) {
|
||||
|
@@ -22,21 +22,26 @@ static pin_t currentSlavePin = NO_PIN;
|
||||
static SPIConfig spiConfig = {false, NULL, 0, 0, 0, 0};
|
||||
|
||||
__attribute__((weak)) void spi_init(void) {
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
||||
static bool is_initialised = false;
|
||||
if (!is_initialised) {
|
||||
is_initialised = true;
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
// Try releasing special pins for a short time
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_INPUT);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_INPUT);
|
||||
|
||||
chThdSleepMilliseconds(10);
|
||||
#if defined(USE_GPIOV1)
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_STM32_ALTERNATE_PUSHPULL);
|
||||
#else
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_SCK_PIN), PAL_PAD(SPI_SCK_PIN), PAL_MODE_ALTERNATE(SPI_SCK_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MOSI_PIN), PAL_PAD(SPI_MOSI_PIN), PAL_MODE_ALTERNATE(SPI_MOSI_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
palSetPadMode(PAL_PORT(SPI_MISO_PIN), PAL_PAD(SPI_MISO_PIN), PAL_MODE_ALTERNATE(SPI_MISO_PAL_MODE) | PAL_STM32_OTYPE_PUSHPULL | PAL_STM32_OSPEED_HIGHEST);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
bool spi_start(pin_t slavePin, bool lsbFirst, uint8_t mode, uint16_t divisor) {
|
||||
|
@@ -42,14 +42,6 @@
|
||||
# include "debug.h"
|
||||
#endif // DEBUG_EEPROM_OUTPUT
|
||||
|
||||
static inline void init_i2c_if_required(void) {
|
||||
static int done = 0;
|
||||
if (!done) {
|
||||
i2c_init();
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||
uintptr_t p = (uintptr_t)addr;
|
||||
for (int i = 0; i < EXTERNAL_EEPROM_ADDRESS_SIZE; ++i) {
|
||||
@@ -58,7 +50,7 @@ static inline void fill_target_address(uint8_t *buffer, const void *addr) {
|
||||
}
|
||||
}
|
||||
|
||||
void eeprom_driver_init(void) {}
|
||||
void eeprom_driver_init(void) { i2c_init(); }
|
||||
|
||||
void eeprom_driver_erase(void) {
|
||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
||||
@@ -80,7 +72,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
uint8_t complete_packet[EXTERNAL_EEPROM_ADDRESS_SIZE];
|
||||
fill_target_address(complete_packet, addr);
|
||||
|
||||
init_i2c_if_required();
|
||||
i2c_transmit(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), complete_packet, EXTERNAL_EEPROM_ADDRESS_SIZE, 100);
|
||||
i2c_receive(EXTERNAL_EEPROM_I2C_ADDRESS((uintptr_t)addr), buf, len, 100);
|
||||
|
||||
@@ -98,7 +89,6 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uint8_t * read_buf = (uint8_t *)buf;
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
||||
init_i2c_if_required();
|
||||
while (len > 0) {
|
||||
uintptr_t page_offset = target_addr % EXTERNAL_EEPROM_PAGE_SIZE;
|
||||
int write_length = EXTERNAL_EEPROM_PAGE_SIZE - page_offset;
|
||||
|
@@ -55,14 +55,6 @@
|
||||
# include "debug.h"
|
||||
#endif // CONSOLE_ENABLE
|
||||
|
||||
static void init_spi_if_required(void) {
|
||||
static int done = 0;
|
||||
if (!done) {
|
||||
spi_init();
|
||||
done = 1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool spi_eeprom_start(void) { return spi_start(EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN, EXTERNAL_EEPROM_SPI_LSBFIRST, EXTERNAL_EEPROM_SPI_MODE, EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR); }
|
||||
|
||||
static spi_status_t spi_eeprom_wait_while_busy(int timeout) {
|
||||
@@ -91,7 +83,7 @@ static void spi_eeprom_transmit_address(uintptr_t addr) {
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
void eeprom_driver_init(void) {}
|
||||
void eeprom_driver_init(void) { spi_init(); }
|
||||
|
||||
void eeprom_driver_erase(void) {
|
||||
#if defined(CONSOLE_ENABLE) && defined(DEBUG_EEPROM_OUTPUT)
|
||||
@@ -110,8 +102,6 @@ void eeprom_driver_erase(void) {
|
||||
}
|
||||
|
||||
void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
init_spi_if_required();
|
||||
|
||||
//-------------------------------------------------
|
||||
// Wait for the write-in-progress bit to be cleared
|
||||
bool res = spi_eeprom_start();
|
||||
@@ -154,8 +144,6 @@ void eeprom_read_block(void *buf, const void *addr, size_t len) {
|
||||
}
|
||||
|
||||
void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
init_spi_if_required();
|
||||
|
||||
bool res;
|
||||
uint8_t * read_buf = (uint8_t *)buf;
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
@@ -33,11 +33,18 @@ void haptic_init(void) {
|
||||
eeconfig_init();
|
||||
}
|
||||
haptic_config.raw = eeconfig_read_haptic();
|
||||
if (haptic_config.mode < 1) {
|
||||
haptic_config.mode = 1;
|
||||
}
|
||||
if (!haptic_config.mode) {
|
||||
dprintf("No haptic config found in eeprom, setting default configs\n");
|
||||
#ifdef SOLENOID_ENABLE
|
||||
solenoid_set_dwell(haptic_config.dwell);
|
||||
#endif
|
||||
if ((haptic_config.raw == 0)
|
||||
#ifdef SOLENOID_ENABLE
|
||||
|| (haptic_config.dwell == 0)
|
||||
#endif
|
||||
) {
|
||||
// this will be called, if the eeprom is not corrupt,
|
||||
// but the previous firmware didn't have haptic enabled,
|
||||
// or the previous firmware didn't have solenoid enabled,
|
||||
// and the current one has solenoid enabled.
|
||||
haptic_reset();
|
||||
}
|
||||
#ifdef SOLENOID_ENABLE
|
||||
@@ -118,25 +125,37 @@ void haptic_mode_decrease(void) {
|
||||
}
|
||||
|
||||
void haptic_dwell_increase(void) {
|
||||
uint8_t dwell = haptic_config.dwell + 1;
|
||||
#ifdef SOLENOID_ENABLE
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) + SOLENOID_DWELL_STEP_SIZE;
|
||||
if (haptic_config.dwell >= SOLENOID_MAX_DWELL) {
|
||||
dwell = 1;
|
||||
// if it's already at max, we wrap back to min
|
||||
next_dwell = SOLENOID_MIN_DWELL;
|
||||
} else if (next_dwell > SOLENOID_MAX_DWELL) {
|
||||
// if we overshoot the max, then cap at max
|
||||
next_dwell = SOLENOID_MAX_DWELL;
|
||||
}
|
||||
solenoid_set_dwell(dwell);
|
||||
solenoid_set_dwell(next_dwell);
|
||||
#else
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) + 1;
|
||||
#endif
|
||||
haptic_set_dwell(dwell);
|
||||
haptic_set_dwell(next_dwell);
|
||||
}
|
||||
|
||||
void haptic_dwell_decrease(void) {
|
||||
uint8_t dwell = haptic_config.dwell - 1;
|
||||
#ifdef SOLENOID_ENABLE
|
||||
if (haptic_config.dwell < SOLENOID_MIN_DWELL) {
|
||||
dwell = SOLENOID_MAX_DWELL;
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) - SOLENOID_DWELL_STEP_SIZE;
|
||||
if (haptic_config.dwell <= SOLENOID_MIN_DWELL) {
|
||||
// if it's already at min, we wrap to max
|
||||
next_dwell = SOLENOID_MAX_DWELL;
|
||||
} else if (next_dwell < SOLENOID_MIN_DWELL) {
|
||||
// if we go below min, then we cap to min
|
||||
next_dwell = SOLENOID_MIN_DWELL;
|
||||
}
|
||||
solenoid_set_dwell(dwell);
|
||||
solenoid_set_dwell(next_dwell);
|
||||
#else
|
||||
int16_t next_dwell = ((int16_t)haptic_config.dwell) - 1;
|
||||
#endif
|
||||
haptic_set_dwell(dwell);
|
||||
haptic_set_dwell(next_dwell);
|
||||
}
|
||||
|
||||
void haptic_reset(void) {
|
||||
@@ -150,6 +169,12 @@ void haptic_reset(void) {
|
||||
#ifdef SOLENOID_ENABLE
|
||||
uint8_t dwell = SOLENOID_DEFAULT_DWELL;
|
||||
haptic_config.dwell = dwell;
|
||||
haptic_config.buzz = SOLENOID_DEFAULT_BUZZ;
|
||||
solenoid_set_dwell(dwell);
|
||||
#else
|
||||
// This is to trigger haptic_reset again, if solenoid is enabled in the future.
|
||||
haptic_config.dwell = 0;
|
||||
haptic_config.buzz = 0;
|
||||
#endif
|
||||
eeconfig_update_haptic(haptic_config.raw);
|
||||
xprintf("haptic_config.feedback = %u\n", haptic_config.feedback);
|
||||
|
@@ -32,14 +32,6 @@ void solenoid_buzz_off(void) { haptic_set_buzz(0); }
|
||||
|
||||
void solenoid_set_buzz(int buzz) { haptic_set_buzz(buzz); }
|
||||
|
||||
void solenoid_dwell_minus(uint8_t solenoid_dwell) {
|
||||
if (solenoid_dwell > 0) solenoid_dwell--;
|
||||
}
|
||||
|
||||
void solenoid_dwell_plus(uint8_t solenoid_dwell) {
|
||||
if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++;
|
||||
}
|
||||
|
||||
void solenoid_set_dwell(uint8_t dwell) { solenoid_dwell = dwell; }
|
||||
|
||||
void solenoid_stop(void) {
|
||||
@@ -73,7 +65,7 @@ void solenoid_check(void) {
|
||||
|
||||
// Check whether to buzz the solenoid on and off
|
||||
if (haptic_config.buzz) {
|
||||
if (elapsed / SOLENOID_MIN_DWELL % 2 == 0) {
|
||||
if ((elapsed % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) {
|
||||
if (!solenoid_buzzing) {
|
||||
solenoid_buzzing = true;
|
||||
writePinHigh(SOLENOID_PIN);
|
||||
|
@@ -29,6 +29,22 @@
|
||||
# define SOLENOID_MIN_DWELL 4
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_DWELL_STEP_SIZE
|
||||
# define SOLENOID_DWELL_STEP_SIZE 1
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_DEFAULT_BUZZ
|
||||
# define SOLENOID_DEFAULT_BUZZ 0
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_BUZZ_ACTUATED
|
||||
# define SOLENOID_BUZZ_ACTUATED SOLENOID_MIN_DWELL
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_BUZZ_NONACTUATED
|
||||
# define SOLENOID_BUZZ_NONACTUATED SOLENOID_MIN_DWELL
|
||||
#endif
|
||||
|
||||
#ifndef SOLENOID_PIN
|
||||
# error SOLENOID_PIN not defined
|
||||
#endif
|
||||
@@ -37,8 +53,6 @@ void solenoid_buzz_on(void);
|
||||
void solenoid_buzz_off(void);
|
||||
void solenoid_set_buzz(int buzz);
|
||||
|
||||
void solenoid_dwell_minus(uint8_t solenoid_dwell);
|
||||
void solenoid_dwell_plus(uint8_t solenoid_dwell);
|
||||
void solenoid_set_dwell(uint8_t dwell);
|
||||
|
||||
void solenoid_stop(void);
|
||||
|
@@ -233,4 +233,5 @@ void IS31FL3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
IS31FL3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
@@ -264,5 +264,6 @@ void IS31FL3736_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||
IS31FL3736_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||
// IS31FL3736_write_register(addr2, i, g_led_control_registers[1][i]);
|
||||
}
|
||||
g_led_control_registers_update_required = false;
|
||||
}
|
||||
}
|
||||
|
@@ -218,5 +218,6 @@ void IS31FL3737_update_led_control_registers(uint8_t addr1, uint8_t addr2) {
|
||||
IS31FL3737_write_register(addr1, i, g_led_control_registers[0][i]);
|
||||
// IS31FL3737_write_register(addr2, i, g_led_control_registers[1][i]);
|
||||
}
|
||||
g_led_control_registers_update_required = false;
|
||||
}
|
||||
}
|
||||
|
@@ -107,6 +107,7 @@ OLED_BLOCK_TYPE oled_dirty = 0;
|
||||
bool oled_initialized = false;
|
||||
bool oled_active = false;
|
||||
bool oled_scrolling = false;
|
||||
uint8_t oled_brightness = OLED_BRIGHTNESS;
|
||||
uint8_t oled_rotation = 0;
|
||||
uint8_t oled_rotation_width = 0;
|
||||
uint8_t oled_scroll_speed = 0; // this holds the speed after being remapped to ssd1306 internal values
|
||||
@@ -118,6 +119,9 @@ uint32_t oled_timeout;
|
||||
#if OLED_SCROLL_TIMEOUT > 0
|
||||
uint32_t oled_scroll_timeout;
|
||||
#endif
|
||||
#if OLED_UPDATE_INTERVAL > 0
|
||||
uint16_t oled_update_timeout;
|
||||
#endif
|
||||
|
||||
// Internal variables to reduce math instructions
|
||||
|
||||
@@ -193,7 +197,7 @@ bool oled_init(uint8_t rotation) {
|
||||
}
|
||||
}
|
||||
|
||||
static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, 0x8F, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x40, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON};
|
||||
static const uint8_t PROGMEM display_setup2[] = {I2C_CMD, COM_PINS, OLED_COM_PINS, CONTRAST, OLED_BRIGHTNESS, PRE_CHARGE_PERIOD, 0xF1, VCOM_DETECT, 0x20, DISPLAY_ALL_ON_RESUME, NORMAL_DISPLAY, DEACTIVATE_SCROLL, DISPLAY_ON};
|
||||
if (I2C_TRANSMIT_P(display_setup2) != I2C_STATUS_SUCCESS) {
|
||||
print("display_setup2 failed\n");
|
||||
return false;
|
||||
@@ -467,8 +471,9 @@ void oled_write_raw_byte(const char data, uint16_t index) {
|
||||
}
|
||||
|
||||
void oled_write_raw(const char *data, uint16_t size) {
|
||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||
if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index;
|
||||
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
|
||||
if (oled_buffer[i] == data[i]) continue;
|
||||
oled_buffer[i] = data[i];
|
||||
oled_dirty |= ((OLED_BLOCK_TYPE)1 << (i / OLED_BLOCK_SIZE));
|
||||
@@ -510,8 +515,9 @@ void oled_write_ln_P(const char *data, bool invert) {
|
||||
}
|
||||
|
||||
void oled_write_raw_P(const char *data, uint16_t size) {
|
||||
if (size > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE;
|
||||
for (uint16_t i = 0; i < size; i++) {
|
||||
uint16_t cursor_start_index = oled_cursor - &oled_buffer[0];
|
||||
if ((size + cursor_start_index) > OLED_MATRIX_SIZE) size = OLED_MATRIX_SIZE - cursor_start_index;
|
||||
for (uint16_t i = cursor_start_index; i < cursor_start_index + size; i++) {
|
||||
uint8_t c = pgm_read_byte(data++);
|
||||
if (oled_buffer[i] == c) continue;
|
||||
oled_buffer[i] = c;
|
||||
@@ -550,6 +556,20 @@ bool oled_off(void) {
|
||||
|
||||
bool is_oled_on(void) { return oled_active; }
|
||||
|
||||
uint8_t oled_set_brightness(uint8_t level) {
|
||||
uint8_t set_contrast[] = {I2C_CMD, CONTRAST, level};
|
||||
if (oled_brightness != level) {
|
||||
if (I2C_TRANSMIT(set_contrast) != I2C_STATUS_SUCCESS) {
|
||||
print("set_brightness cmd failed\n");
|
||||
return oled_brightness;
|
||||
}
|
||||
oled_brightness = level;
|
||||
}
|
||||
return oled_brightness;
|
||||
}
|
||||
|
||||
uint8_t oled_get_brightness(void) { return oled_brightness; }
|
||||
|
||||
// Set the specific 8 lines rows of the screen to scroll.
|
||||
// 0 is the default for start, and 7 for end, which is the entire
|
||||
// height of the screen. For 128x32 screens, rows 4-7 are not used.
|
||||
@@ -635,9 +655,16 @@ void oled_task(void) {
|
||||
return;
|
||||
}
|
||||
|
||||
#if OLED_UPDATE_INTERVAL > 0
|
||||
if (timer_elapsed(oled_update_timeout) >= OLED_UPDATE_INTERVAL) {
|
||||
oled_update_timeout = timer_read();
|
||||
oled_set_cursor(0, 0);
|
||||
oled_task_user();
|
||||
}
|
||||
#else
|
||||
oled_set_cursor(0, 0);
|
||||
|
||||
oled_task_user();
|
||||
#endif
|
||||
|
||||
#if OLED_SCROLL_TIMEOUT > 0
|
||||
if (oled_dirty && oled_scrolling) {
|
||||
|
@@ -141,6 +141,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#if !defined(OLED_FONT_HEIGHT)
|
||||
# define OLED_FONT_HEIGHT 8
|
||||
#endif
|
||||
// Default brightness level
|
||||
#if !defined(OLED_BRIGHTNESS)
|
||||
# define OLED_BRIGHTNESS 255
|
||||
#endif
|
||||
|
||||
#if !defined(OLED_TIMEOUT)
|
||||
# if defined(OLED_DISABLE_TIMEOUT)
|
||||
@@ -261,6 +265,12 @@ bool oled_off(void);
|
||||
// not
|
||||
bool is_oled_on(void);
|
||||
|
||||
// Sets the brightness of the display
|
||||
uint8_t oled_set_brightness(uint8_t level);
|
||||
|
||||
// Gets the current brightness of the display
|
||||
uint8_t oled_get_brightness(void);
|
||||
|
||||
// Basically it's oled_render, but with timeout management and oled_task_user calling!
|
||||
void oled_task(void);
|
||||
|
||||
|
@@ -8,8 +8,9 @@
|
||||
#ifndef _GDISP_LLD_BOARD_H
|
||||
#define _GDISP_LLD_BOARD_H
|
||||
|
||||
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_9 // actually 6
|
||||
#define ST7565_ADC ST7565_ADC_NORMAL
|
||||
#include "quantum.h"
|
||||
|
||||
#define ST7565_LCD_BIAS ST7565_LCD_BIAS_7
|
||||
#define ST7565_COM_SCAN ST7565_COM_SCAN_DEC
|
||||
#define ST7565_PAGE_ORDER 0, 1, 2, 3
|
||||
/*
|
||||
@@ -17,19 +18,12 @@
|
||||
* #define ST7565_PAGE_ORDER 4,5,6,7,0,1,2,3
|
||||
*/
|
||||
|
||||
#define ST7565_GPIOPORT GPIOC
|
||||
#define ST7565_PORT PORTC
|
||||
#define ST7565_A0_PIN 7
|
||||
#define ST7565_RST_PIN 8
|
||||
#define ST7565_MOSI_PIN 6
|
||||
#define ST7565_SLCK_PIN 5
|
||||
#define ST7565_SS_PIN 4
|
||||
#define ST7565_A0_PIN C7
|
||||
#define ST7565_RST_PIN C8
|
||||
#define ST7565_MOSI_PIN C6
|
||||
#define ST7565_SCLK_PIN C5
|
||||
#define ST7565_SS_PIN C4
|
||||
|
||||
#define palSetPadModeRaw(portname, bits) ST7565_PORT->PCR[ST7565_##portname##_PIN] = bits
|
||||
|
||||
#define palSetPadModeNamed(portname, portmode) palSetPadMode(ST7565_GPIOPORT, ST7565_##portname##_PIN, portmode)
|
||||
|
||||
#define ST7565_SPI_MODE PORTx_PCRn_DSE | PORTx_PCRn_MUX(2)
|
||||
// DSPI Clock and Transfer Attributes
|
||||
// Frame Size: 8 bits
|
||||
// MSB First
|
||||
@@ -38,9 +32,9 @@ static const SPIConfig spi1config = {
|
||||
// Operation complete callback or @p NULL.
|
||||
.end_cb = NULL,
|
||||
// The chip select line port - when not using pcs.
|
||||
.ssport = ST7565_GPIOPORT,
|
||||
.ssport = PAL_PORT(ST7565_SS_PIN),
|
||||
// brief The chip select line pad number - when not using pcs.
|
||||
.sspad = ST7565_SS_PIN,
|
||||
.sspad = PAL_PAD(ST7565_SS_PIN),
|
||||
// SPI initialization data.
|
||||
.tar0 = SPIx_CTARn_FMSZ(7) // Frame size = 8 bytes
|
||||
| SPIx_CTARn_ASC(1) // After SCK Delay Scaler (min 50 ns) = 55.56ns
|
||||
@@ -66,13 +60,14 @@ static GFXINLINE void release_bus(GDisplay *g) {
|
||||
|
||||
static GFXINLINE void init_board(GDisplay *g) {
|
||||
(void)g;
|
||||
palSetPadModeNamed(A0, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN);
|
||||
palSetPadModeNamed(RST, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
palSetPadModeRaw(MOSI, ST7565_SPI_MODE);
|
||||
palSetPadModeRaw(SLCK, ST7565_SPI_MODE);
|
||||
palSetPadModeNamed(SS, PAL_MODE_OUTPUT_PUSHPULL);
|
||||
setPinOutput(ST7565_A0_PIN);
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
setPinOutput(ST7565_RST_PIN);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
setPinOutput(ST7565_SS_PIN);
|
||||
|
||||
palSetPadMode(PAL_PORT(ST7565_MOSI_PIN), PAL_PAD(ST7565_MOSI_PIN), PAL_MODE_ALTERNATIVE_2);
|
||||
palSetPadMode(PAL_PORT(ST7565_SCLK_PIN), PAL_PAD(ST7565_SCLK_PIN), PAL_MODE_ALTERNATIVE_2);
|
||||
|
||||
spiInit();
|
||||
spiStart(&SPID1, &spi1config);
|
||||
@@ -83,19 +78,18 @@ static GFXINLINE void post_init_board(GDisplay *g) { (void)g; }
|
||||
|
||||
static GFXINLINE void setpin_reset(GDisplay *g, bool_t state) {
|
||||
(void)g;
|
||||
if (state) {
|
||||
palClearPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
} else {
|
||||
palSetPad(ST7565_GPIOPORT, ST7565_RST_PIN);
|
||||
}
|
||||
writePin(ST7565_RST_PIN, !state);
|
||||
}
|
||||
|
||||
static GFXINLINE void enter_data_mode(GDisplay *g) { palSetPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||
|
||||
static GFXINLINE void enter_cmd_mode(GDisplay *g) { palClearPad(ST7565_GPIOPORT, ST7565_A0_PIN); }
|
||||
|
||||
static GFXINLINE void write_data(GDisplay *g, uint8_t *data, uint16_t length) {
|
||||
static GFXINLINE void write_cmd(GDisplay *g, gU8 cmd) {
|
||||
(void)g;
|
||||
writePinLow(ST7565_A0_PIN);
|
||||
spiSend(&SPID1, 1, &cmd);
|
||||
}
|
||||
|
||||
static GFXINLINE void write_data(GDisplay *g, gU8 *data, gU16 length) {
|
||||
(void)g;
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
spiSend(&SPID1, length, data);
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
GFXINC += drivers/ugfx/gdisp/st7565
|
||||
GFXSRC += drivers/ugfx/gdisp/st7565/gdisp_lld_ST7565.c
|
||||
GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK
|
||||
GDISP_DRIVER_LIST += GDISPVMT_ST7565_QMK
|
||||
|
@@ -49,31 +49,15 @@
|
||||
# define ST7565_COM_SCAN ST7565_COM_SCAN_INC
|
||||
# endif
|
||||
# ifndef ST7565_PAGE_ORDER
|
||||
# define ST7565_PAGE_ORDER 0, 1, 2, 3
|
||||
# define ST7565_PAGE_ORDER 0, 1, 2, 3, 4, 5, 6, 7
|
||||
# endif
|
||||
|
||||
/*===========================================================================*/
|
||||
/* Driver local functions. */
|
||||
/*===========================================================================*/
|
||||
|
||||
typedef struct {
|
||||
bool_t buffer2;
|
||||
uint8_t data_pos;
|
||||
uint8_t data[16];
|
||||
uint8_t ram[GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8];
|
||||
} PrivData;
|
||||
|
||||
// Some common routines and macros
|
||||
# define PRIV(g) ((PrivData *)g->priv)
|
||||
# define RAM(g) (PRIV(g)->ram)
|
||||
|
||||
static GFXINLINE void write_cmd(GDisplay *g, uint8_t cmd) { PRIV(g)->data[PRIV(g)->data_pos++] = cmd; }
|
||||
|
||||
static GFXINLINE void flush_cmd(GDisplay *g) {
|
||||
write_data(g, PRIV(g)->data, PRIV(g)->data_pos);
|
||||
PRIV(g)->data_pos = 0;
|
||||
}
|
||||
|
||||
# define RAM(g) ((gU8 *)g->priv)
|
||||
# define write_cmd2(g, cmd1, cmd2) \
|
||||
{ \
|
||||
write_cmd(g, cmd1); \
|
||||
@@ -106,9 +90,10 @@ static GFXINLINE void flush_cmd(GDisplay *g) {
|
||||
|
||||
LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||
// The private area is the display surface.
|
||||
g->priv = gfxAlloc(sizeof(PrivData));
|
||||
PRIV(g)->buffer2 = false;
|
||||
PRIV(g)->data_pos = 0;
|
||||
g->priv = gfxAlloc(GDISP_SCREEN_HEIGHT * GDISP_SCREEN_WIDTH / 8);
|
||||
if (!g->priv) {
|
||||
return gFalse;
|
||||
}
|
||||
|
||||
// Initialise the board interface
|
||||
init_board(g);
|
||||
@@ -119,25 +104,33 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
|
||||
setpin_reset(g, FALSE);
|
||||
gfxSleepMilliseconds(20);
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
|
||||
write_cmd(g, ST7565_RESET);
|
||||
write_cmd(g, ST7565_LCD_BIAS);
|
||||
write_cmd(g, ST7565_ADC);
|
||||
write_cmd(g, ST7565_COM_SCAN);
|
||||
|
||||
write_cmd(g, ST7565_RESISTOR_RATIO | 0x1);
|
||||
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST);
|
||||
|
||||
// turn on internal power supply (VC=1, VR=1, VF=1)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
|
||||
|
||||
write_cmd(g, ST7565_INVERT_DISPLAY);
|
||||
write_cmd(g, ST7565_ALLON_NORMAL);
|
||||
|
||||
write_cmd(g, ST7565_START_LINE | 0);
|
||||
|
||||
write_cmd2(g, ST7565_CONTRAST, GDISP_INITIAL_CONTRAST * 64 / 101);
|
||||
write_cmd(g, ST7565_RESISTOR_RATIO | 0x1);
|
||||
|
||||
// turn on voltage converter (VC=1, VR=0, VF=0)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x04);
|
||||
delay_ms(50);
|
||||
|
||||
// turn on voltage regulator (VC=1, VR=1, VF=0)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x06);
|
||||
delay_ms(50);
|
||||
|
||||
// turn on voltage follower (VC=1, VR=1, VF=1)
|
||||
write_cmd(g, ST7565_POWER_CONTROL | 0x07);
|
||||
delay_ms(50);
|
||||
|
||||
write_cmd(g, ST7565_DISPLAY_ON);
|
||||
write_cmd(g, ST7565_ALLON_NORMAL);
|
||||
write_cmd(g, ST7565_INVERT_DISPLAY); // Disable Inversion of display.
|
||||
|
||||
write_cmd(g, ST7565_RMW);
|
||||
flush_cmd(g);
|
||||
|
||||
// Finish Init
|
||||
post_init_board(g);
|
||||
@@ -163,22 +156,14 @@ LLDSPEC void gdisp_lld_flush(GDisplay *g) {
|
||||
if (!(g->flags & GDISP_FLG_NEEDFLUSH)) return;
|
||||
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
unsigned dstOffset = (PRIV(g)->buffer2 ? 4 : 0);
|
||||
for (p = 0; p < 4; p++) {
|
||||
write_cmd(g, ST7565_PAGE | (p + dstOffset));
|
||||
gU8 pagemap[] = {ST7565_PAGE_ORDER};
|
||||
for (p = 0; p < sizeof(pagemap); p++) {
|
||||
write_cmd(g, ST7565_PAGE | pagemap[p]);
|
||||
write_cmd(g, ST7565_COLUMN_MSB | 0);
|
||||
write_cmd(g, ST7565_COLUMN_LSB | 0);
|
||||
write_cmd(g, ST7565_RMW);
|
||||
flush_cmd(g);
|
||||
enter_data_mode(g);
|
||||
write_data(g, RAM(g) + (p * GDISP_SCREEN_WIDTH), GDISP_SCREEN_WIDTH);
|
||||
enter_cmd_mode(g);
|
||||
}
|
||||
unsigned line = (PRIV(g)->buffer2 ? 32 : 0);
|
||||
write_cmd(g, ST7565_START_LINE | line);
|
||||
flush_cmd(g);
|
||||
PRIV(g)->buffer2 = !PRIV(g)->buffer2;
|
||||
release_bus(g);
|
||||
|
||||
g->flags &= ~GDISP_FLG_NEEDFLUSH;
|
||||
@@ -243,6 +228,7 @@ LLDSPEC color_t gdisp_lld_get_pixel_color(GDisplay *g) {
|
||||
}
|
||||
# endif
|
||||
|
||||
# if GDISP_HARDWARE_BITFILLS
|
||||
LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
||||
uint8_t *buffer = (uint8_t *)g->p.ptr;
|
||||
int linelength = g->p.cx;
|
||||
@@ -268,6 +254,7 @@ LLDSPEC void gdisp_lld_blit_area(GDisplay *g) {
|
||||
}
|
||||
g->flags |= GDISP_FLG_NEEDFLUSH;
|
||||
}
|
||||
# endif
|
||||
|
||||
# if GDISP_NEED_CONTROL && GDISP_HARDWARE_CONTROL
|
||||
LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
@@ -279,16 +266,12 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
case powerSleep:
|
||||
case powerDeepSleep:
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd(g, ST7565_DISPLAY_OFF);
|
||||
flush_cmd(g);
|
||||
release_bus(g);
|
||||
break;
|
||||
case powerOn:
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd(g, ST7565_DISPLAY_ON);
|
||||
flush_cmd(g);
|
||||
release_bus(g);
|
||||
break;
|
||||
default:
|
||||
@@ -318,12 +301,11 @@ LLDSPEC void gdisp_lld_control(GDisplay *g) {
|
||||
return;
|
||||
|
||||
case GDISP_CONTROL_CONTRAST:
|
||||
g->g.Contrast = (unsigned)g->p.ptr & 63;
|
||||
if ((unsigned)g->p.ptr > 100) g->p.ptr = (void *)100;
|
||||
acquire_bus(g);
|
||||
enter_cmd_mode(g);
|
||||
write_cmd2(g, ST7565_CONTRAST, g->g.Contrast);
|
||||
flush_cmd(g);
|
||||
write_cmd2(g, ST7565_CONTRAST, ((((unsigned)g->p.ptr) << 6) / 101) & 0x3F);
|
||||
release_bus(g);
|
||||
g->g.Contrast = (unsigned)g->p.ptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -1,3 +1,4 @@
|
||||
VIA_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
||||
CONSOLE_ENABLE = no
|
||||
|
@@ -16,19 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "1up60hte.h"
|
||||
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
setPinOutput(B6);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
writePinLow(B6);
|
||||
} else {
|
||||
writePinHigh(B6);
|
||||
}
|
||||
led_set_user(usb_led);
|
||||
}
|
@@ -40,6 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define LED_CAPS_LOCK_PIN B6
|
||||
#define LED_PIN_ON_STATE 0
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_PIN B7
|
||||
#ifdef BACKLIGHT_PIN
|
||||
|
@@ -1,2 +1 @@
|
||||
VIA_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
@@ -25,7 +25,8 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
MIDI_ENABLE = no # MIDI support
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
|
@@ -17,6 +17,12 @@
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
# define LED_NUM_LOCK_PIN B0 // RXLED
|
||||
# define LED_CAPS_LOCK_PIN D5 // TXLED
|
||||
# define LED_PIN_ON_STATE 0
|
||||
#endif
|
||||
|
||||
/* Underglow options */
|
||||
#define RGB_DI_PIN B1
|
||||
#ifdef RGB_DI_PIN
|
||||
|
@@ -1,21 +1 @@
|
||||
#include "v1.h"
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
/* Map RXLED to USB_LED_NUM_LOCK */
|
||||
if (IS_LED_ON(usb_led, USB_LED_NUM_LOCK)) {
|
||||
setPinOutput(B0);
|
||||
writePinLow(B0);
|
||||
} else {
|
||||
setPinInput(B0);
|
||||
}
|
||||
|
||||
/* Map TXLED to USB_LED_CAPS_LOCK */
|
||||
if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) {
|
||||
setPinOutput(D5);
|
||||
writePinLow(D5);
|
||||
} else {
|
||||
setPinInput(D5);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@@ -1,3 +1,19 @@
|
||||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "drashna.h"
|
||||
#include "analog.h"
|
||||
#include "pointing_device.h"
|
||||
|
19
keyboards/45_ats/45_ats.c
Normal file
19
keyboards/45_ats/45_ats.c
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 "45_ats.h"
|
59
keyboards/45_ats/45_ats.h
Normal file
59
keyboards/45_ats/45_ats.h
Normal file
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 xxx KC_NO
|
||||
|
||||
#define LAYOUT_split_space( \
|
||||
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, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \
|
||||
k30, k31, k32, k33, k36, k38, k39, k3A, k3B, k3D \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \
|
||||
{ k30, k31, k32, k33, xxx, xxx, k36, xxx, k38, k39, k3A, k3B, xxx, k3D } \
|
||||
}
|
||||
|
||||
#define LAYOUT_625_space( \
|
||||
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, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \
|
||||
k30, k31, k32, k36, k39, k3A, k3B, k3D \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \
|
||||
{ k30, k31, k32, xxx, xxx, xxx, k36, xxx, xxx, k39, k3A, k3B, xxx, k3D } \
|
||||
}
|
||||
|
||||
#define LAYOUT_600_space( \
|
||||
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, k1D, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \
|
||||
k30, k31, k32, k36, k38, k39, k3A, k3B, k3D \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, xxx, k1D }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, xxx, k2D }, \
|
||||
{ k30, k31, k32, xxx, xxx, xxx, k36, xxx, k38, k39, k3A, k3B, xxx, k3D } \
|
||||
}
|
52
keyboards/45_ats/config.h
Normal file
52
keyboards/45_ats/config.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 0xAB13
|
||||
#define PRODUCT_ID 0x4511
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Abec13
|
||||
#define PRODUCT 45ATS
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 14
|
||||
|
||||
#define ENCODERS_PAD_A { B4 }
|
||||
#define ENCODERS_PAD_B { B5 }
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { D3, D5, D7, D6 }
|
||||
#define MATRIX_COL_PINS { E6, B0, B1, B2, B3, B7, F6, F5, F4, C7, F7, C6, B6, D4 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
169
keyboards/45_ats/info.json
Normal file
169
keyboards/45_ats/info.json
Normal file
@@ -0,0 +1,169 @@
|
||||
{
|
||||
"keyboard_name": "45-ATS",
|
||||
"url": "",
|
||||
"maintainer": "The-Royal",
|
||||
"width": 14.25,
|
||||
"height": 4.25,
|
||||
"layouts": {
|
||||
"LAYOUT_split_space": {
|
||||
"layout": [
|
||||
{"label":"", "x":0, "y":0},
|
||||
{"label":"", "x":1, "y":0},
|
||||
{"label":"", "x":2, "y":0},
|
||||
{"label":"", "x":3, "y":0},
|
||||
{"label":"", "x":4, "y":0},
|
||||
{"label":"", "x":5, "y":0},
|
||||
{"label":"", "x":6, "y":0},
|
||||
{"label":"", "x":7, "y":0},
|
||||
{"label":"", "x":8, "y":0},
|
||||
{"label":"", "x":9, "y":0},
|
||||
{"label":"", "x":10, "y":0},
|
||||
{"label":"", "x":11, "y":0},
|
||||
{"label":"", "x":12, "y":0},
|
||||
{"label":"", "x":13.5, "y":0},
|
||||
{"label":"", "x":0, "y":1, "w":1.25},
|
||||
{"label":"", "x":1.25, "y":1},
|
||||
{"label":"", "x":2.25, "y":1},
|
||||
{"label":"", "x":3.25, "y":1},
|
||||
{"label":"", "x":4.25, "y":1},
|
||||
{"label":"", "x":5.25, "y":1},
|
||||
{"label":"", "x":6.25, "y":1},
|
||||
{"label":"", "x":7.25, "y":1},
|
||||
{"label":"", "x":8.25, "y":1},
|
||||
{"label":"", "x":9.25, "y":1},
|
||||
{"label":"", "x":10.25, "y":1},
|
||||
{"label":"", "x":11.25, "y":1, "w":1.75},
|
||||
{"label":"", "x":13.5, "y":1},
|
||||
{"label":"", "x":0, "y":2, "w":1.75},
|
||||
{"label":"", "x":1.75, "y":2},
|
||||
{"label":"", "x":2.75, "y":2},
|
||||
{"label":"", "x":3.75, "y":2},
|
||||
{"label":"", "x":4.75, "y":2},
|
||||
{"label":"", "x":5.75, "y":2},
|
||||
{"label":"", "x":6.75, "y":2},
|
||||
{"label":"", "x":7.75, "y":2},
|
||||
{"label":"", "x":8.75, "y":2},
|
||||
{"label":"", "x":9.75, "y":2},
|
||||
{"label":"", "x":10.75, "y":2, "w":1.25},
|
||||
{"label":"", "x":12.25, "y":2.25},
|
||||
{"label":"", "x":13.5, "y":2},
|
||||
{"label":"", "x":0, "y":3, "w":1.25},
|
||||
{"label":"", "x":1.25, "y":3},
|
||||
{"label":"", "x":2.25, "y":3, "w":1.25},
|
||||
{"label":"", "x":3.5, "y":3, "w":2.75},
|
||||
{"label":"", "x":6.25, "y":3, "w":2.25},
|
||||
{"label":"", "x":8.5, "y":3, "w":1.25},
|
||||
{"label":"", "x":9.75, "y":3, "w":1.25},
|
||||
{"label":"", "x":11.25, "y":3.25},
|
||||
{"label":"", "x":12.25, "y":3.25},
|
||||
{"label":"", "x":13.25, "y":3.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_625_space": {
|
||||
"layout": [
|
||||
{"label":"", "x":0, "y":0},
|
||||
{"label":"", "x":1, "y":0},
|
||||
{"label":"", "x":2, "y":0},
|
||||
{"label":"", "x":3, "y":0},
|
||||
{"label":"", "x":4, "y":0},
|
||||
{"label":"", "x":5, "y":0},
|
||||
{"label":"", "x":6, "y":0},
|
||||
{"label":"", "x":7, "y":0},
|
||||
{"label":"", "x":8, "y":0},
|
||||
{"label":"", "x":9, "y":0},
|
||||
{"label":"", "x":10, "y":0},
|
||||
{"label":"", "x":11, "y":0},
|
||||
{"label":"", "x":12, "y":0},
|
||||
{"label":"", "x":13.5, "y":0},
|
||||
{"label":"", "x":0, "y":1, "w":1.25},
|
||||
{"label":"", "x":1.25, "y":1},
|
||||
{"label":"", "x":2.25, "y":1},
|
||||
{"label":"", "x":3.25, "y":1},
|
||||
{"label":"", "x":4.25, "y":1},
|
||||
{"label":"", "x":5.25, "y":1},
|
||||
{"label":"", "x":6.25, "y":1},
|
||||
{"label":"", "x":7.25, "y":1},
|
||||
{"label":"", "x":8.25, "y":1},
|
||||
{"label":"", "x":9.25, "y":1},
|
||||
{"label":"", "x":10.25, "y":1},
|
||||
{"label":"", "x":11.25, "y":1, "w":1.75},
|
||||
{"label":"", "x":13.5, "y":1},
|
||||
{"label":"", "x":0, "y":2, "w":1.75},
|
||||
{"label":"", "x":1.75, "y":2},
|
||||
{"label":"", "x":2.75, "y":2},
|
||||
{"label":"", "x":3.75, "y":2},
|
||||
{"label":"", "x":4.75, "y":2},
|
||||
{"label":"", "x":5.75, "y":2},
|
||||
{"label":"", "x":6.75, "y":2},
|
||||
{"label":"", "x":7.75, "y":2},
|
||||
{"label":"", "x":8.75, "y":2},
|
||||
{"label":"", "x":9.75, "y":2},
|
||||
{"label":"", "x":10.75, "y":2, "w":1.25},
|
||||
{"label":"", "x":12.25, "y":2.25},
|
||||
{"label":"K", "x":13.5, "y":2},
|
||||
{"label":"", "x":0, "y":3, "w":1.25},
|
||||
{"label":"", "x":1.25, "y":3},
|
||||
{"label":"", "x":2.25, "y":3, "w":1.25},
|
||||
{"label":"", "x":3.5, "y":3, "w":6.25},
|
||||
{"label":"", "x":9.75, "y":3, "w":1.25},
|
||||
{"label":"", "x":11.25, "y":3.25},
|
||||
{"label":"", "x":12.25, "y":3.25},
|
||||
{"label":"", "x":13.25, "y":3.25}
|
||||
]
|
||||
},
|
||||
"LAYOUT_600_space": {
|
||||
"layout": [
|
||||
{"label":"", "x":0, "y":0},
|
||||
{"label":"", "x":1, "y":0},
|
||||
{"label":"", "x":2, "y":0},
|
||||
{"label":"", "x":3, "y":0},
|
||||
{"label":"", "x":4, "y":0},
|
||||
{"label":"", "x":5, "y":0},
|
||||
{"label":"", "x":6, "y":0},
|
||||
{"label":"", "x":7, "y":0},
|
||||
{"label":"", "x":8, "y":0},
|
||||
{"label":"", "x":9, "y":0},
|
||||
{"label":"", "x":10, "y":0},
|
||||
{"label":"", "x":11, "y":0},
|
||||
{"label":"", "x":12, "y":0},
|
||||
{"label":"", "x":13.5, "y":0},
|
||||
{"label":"", "x":0, "y":1, "w":1.25},
|
||||
{"label":"", "x":1.25, "y":1},
|
||||
{"label":"", "x":2.25, "y":1},
|
||||
{"label":"", "x":3.25, "y":1},
|
||||
{"label":"", "x":4.25, "y":1},
|
||||
{"label":"", "x":5.25, "y":1},
|
||||
{"label":"", "x":6.25, "y":1},
|
||||
{"label":"", "x":7.25, "y":1},
|
||||
{"label":"", "x":8.25, "y":1},
|
||||
{"label":"", "x":9.25, "y":1},
|
||||
{"label":"", "x":10.25, "y":1},
|
||||
{"label":"", "x":11.25, "y":1, "w":1.75},
|
||||
{"label":"", "x":13.5, "y":1},
|
||||
{"label":"", "x":0, "y":2, "w":1.75},
|
||||
{"label":"", "x":1.75, "y":2},
|
||||
{"label":"", "x":2.75, "y":2},
|
||||
{"label":"", "x":3.75, "y":2},
|
||||
{"label":"", "x":4.75, "y":2},
|
||||
{"label":"", "x":5.75, "y":2},
|
||||
{"label":"", "x":6.75, "y":2},
|
||||
{"label":"", "x":7.75, "y":2},
|
||||
{"label":"", "x":8.75, "y":2},
|
||||
{"label":"", "x":9.75, "y":2},
|
||||
{"label":"", "x":10.75, "y":2, "w":1.25},
|
||||
{"label":"", "x":12.25, "y":2.25},
|
||||
{"label":"", "x":13.5, "y":2},
|
||||
{"label":"", "x":0, "y":3},
|
||||
{"label":"", "x":1, "y":3},
|
||||
{"label":"", "x":2, "y":3},
|
||||
{"label":"", "x":3, "y":3, "w":6.00},
|
||||
{"label":"", "x":9, "y":3},
|
||||
{"label":"", "x":10, "y":3},
|
||||
{"label":"", "x":11.25, "y":3.25},
|
||||
{"label":"", "x":12.25, "y":3.25},
|
||||
{"label":"", "x":13.25, "y":3.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
25
keyboards/45_ats/keymaps/default/config.h
Normal file
25
keyboards/45_ats/keymaps/default/config.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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
|
||||
|
||||
#define TAPPING_TERM 175
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define MOD_TAP_INTERUPT
|
107
keyboards/45_ats/keymaps/default/keymap.c
Normal file
107
keyboards/45_ats/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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
|
||||
|
||||
// Layer names
|
||||
enum ats_layers{
|
||||
// - Base layer:
|
||||
_BASE,
|
||||
// - Symbols, numbers, and functions:
|
||||
_FN,
|
||||
// - Alternate Function layer:
|
||||
_LN
|
||||
};
|
||||
|
||||
#define RS_SLS RSFT_T(KC_SLSH)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Default QWERTY layer
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│
|
||||
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ' │Enter │ │PgD│
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │LShift│ Z │ X │ C │ V │ B │ N │ M │ , │ . │Sft/│ ┌───┐ │CAP│
|
||||
* ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ ↑ │ └───┘
|
||||
* │LCtl│OS │LAlt│ Fn │ Space │RAlt│ Ln │ ┌───┼───┼───┐
|
||||
* └────┴───┴────┴──────────┴────────┴────┴────┘ │ ← │ ↓ │ → │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_BASE] = LAYOUT_split_space(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_PGUP,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RS_SLS, KC_UP, KC_CAPS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPACE, KC_RALT, MO(_LN), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
/* Main Numbers, Symbols & Function Layer (MOMENTARY)
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ [ │ ] │ \ │ │ │Hme│
|
||||
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │End│
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │ │ ( │ ) │ ; │ . │ │ - │ + │ * │ / │ = │ ┌───┐ │ │
|
||||
* ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘
|
||||
* │ │ │ │ │ │ │ │ ┌───┼───┼───┐
|
||||
* └────┴───┴────┴──────────┴────────┴────┴────┘ │ │ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_FN] = LAYOUT_split_space(
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_HOME,
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER, KC_END,
|
||||
_______, KC_LPRN, KC_RPRN, KC_SCLN, KC_DOT, _______, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_EQL, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* ALTERNATE Function layer (MOMENTARY)
|
||||
* ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │ PWR│F1 │F2 │F3 │F4 │F5 │F6 │ │ │ │ │PRV│NXT│ │VL+│
|
||||
* ├────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │ SLP │F7 │F8 │F9 │F10│F11│F12│ │ │ │ │ PLAY │ │VL-│
|
||||
* ├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │ WAKE │ │ │ │ │ │ │ │ │ │ │ ┌───┐ │ │
|
||||
* ├────┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘
|
||||
* │RSET│ │ │ │ │ │ │ ┌───┼───┼───┐
|
||||
* └────┴────┴────┴──────────┴────────┴────┴────┘ │ │ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_LN] = LAYOUT_split_space(
|
||||
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLU,
|
||||
KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_MPLY, KC_VOLD,
|
||||
KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
//function for layer indicator LED
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D0, layer_state_cmp(state, 0));
|
||||
writePin(D1, layer_state_cmp(state, 1));
|
||||
writePin(D2, layer_state_cmp(state, 2));
|
||||
return state;
|
||||
}
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
107
keyboards/45_ats/keymaps/via/keymap.c
Normal file
107
keyboards/45_ats/keymaps/via/keymap.c
Normal file
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
Copyright 2020 Alec Penland
|
||||
Copyright 2020 Garret Gartner
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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
|
||||
|
||||
// Layer names
|
||||
enum ats_layers{
|
||||
// - Base layer:
|
||||
_BASE,
|
||||
// - Symbols, numbers, and functions:
|
||||
_FN,
|
||||
// - Alternate Function layer:
|
||||
_LN
|
||||
};
|
||||
|
||||
#define RS_SLS RSFT_T(KC_SLSH)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Default QWERTY layer
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │Esc│ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │Del│BkS│ │PgU│
|
||||
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │Tab │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ' │Enter │ │PgD│
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │LShift│ Z │ X │ C │ V │ B │ N │ M │ , │ . │Sft/│ ┌───┐ │CAP│
|
||||
* ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ ↑ │ └───┘
|
||||
* │LCtl│OS │LAlt│ Fn │ Space │RAlt│ Ln │ ┌───┼───┼───┐
|
||||
* └────┴───┴────┴──────────┴────────┴────┴────┘ │ ← │ ↓ │ → │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_BASE] = LAYOUT_split_space(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_PGUP,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOTE, KC_ENT, KC_PGDN,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RS_SLS, KC_UP, KC_CAPS,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPACE, KC_RALT, MO(_LN), KC_LEFT, KC_DOWN, KC_RIGHT
|
||||
),
|
||||
/* Main Numbers, Symbols & Function Layer (MOMENTARY)
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │ │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ [ │ ] │ \ │ │ │Hme│
|
||||
* ├───┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │End│
|
||||
* ├────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │ │ ( │ ) │ ; │ . │ │ - │ + │ * │ / │ = │ ┌───┐ │ │
|
||||
* ├────┬─┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘
|
||||
* │ │ │ │ │ │ │ │ ┌───┼───┼───┐
|
||||
* └────┴───┴────┴──────────┴────────┴────┴────┘ │ │ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_FN] = LAYOUT_split_space(
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_BSLS, _______, KC_HOME,
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ENTER, KC_END,
|
||||
_______, KC_LPRN, KC_RPRN, KC_SCLN, KC_DOT, _______, KC_MINS, KC_PLUS, KC_ASTR, KC_SLSH, KC_EQL, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* ALTERNATE Function layer (MOMENTARY)
|
||||
* ┌────┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ ┌───┐
|
||||
* │ PWR│F1 │F2 │F3 │F4 │F5 │F6 │ │ │ │ │PRV│NXT│ │VL+│
|
||||
* ├────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤ ├───┤
|
||||
* │ SLP │F7 │F8 │F9 │F10│F11│F12│ │ │ │ │ PLAY │ │VL-│
|
||||
* ├─────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──┬───┘ ├───┤
|
||||
* │ WAKE │ │ │ │ │ │ │ │ │ │ │ ┌───┐ │ │
|
||||
* ├────┬──┴─┬─┴──┬┴───┴───┴─┬─┴───┴──┬┴───┼───┴┬───┘ │ │ └───┘
|
||||
* │RSET│ │ │ │ │ │ │ ┌───┼───┼───┐
|
||||
* └────┴────┴────┴──────────┴────────┴────┴────┘ │ │ │ │
|
||||
* └───┴───┴───┘
|
||||
*/
|
||||
[_LN] = LAYOUT_split_space(
|
||||
KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLU,
|
||||
KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, KC_MPLY, KC_VOLD,
|
||||
KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
//function for layer indicator LED
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
writePin(D0, layer_state_cmp(state, 0));
|
||||
writePin(D1, layer_state_cmp(state, 1));
|
||||
writePin(D2, layer_state_cmp(state, 2));
|
||||
return state;
|
||||
}
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
}
|
3
keyboards/45_ats/keymaps/via/readme.md
Normal file
3
keyboards/45_ats/keymaps/via/readme.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# 45-ATS VIA Firmware
|
||||
|
||||
This keymap is to enable the use of VIA on the 45-ATS Keyboard.
|
16
keyboards/45_ats/readme.md
Normal file
16
keyboards/45_ats/readme.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 45-ATS
|
||||
|
||||

|
||||
|
||||
A Premium and Beautiful 45% (And-Then-Some) Keyboard. Concept and Design by [Abec13](https://www.reddit.com/user/abec13).
|
||||
|
||||
- Keyboard Designer: [Abec13](https://reddit.com/u/abec13/)
|
||||
- Keyboard Maintainer: [The-Royal](https://github.com/the-royal)
|
||||
- Hardware Supported: 45-ATS v1.0 PCB
|
||||
- Hardware Availability: Through Group Buy - Dec. 2019
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make 45_ats: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).
|
22
keyboards/45_ats/rules.mk
Normal file
22
keyboards/45_ats/rules.mk
Normal file
@@ -0,0 +1,22 @@
|
||||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = yes # Console for debug
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth
|
||||
AUDIO_ENABLE = no # Audio output
|
17
keyboards/7splus/7splus.c
Normal file
17
keyboards/7splus/7splus.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright 2020 Salicylic_Acid
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 "7splus.h"
|
61
keyboards/7splus/7splus.h
Normal file
61
keyboards/7splus/7splus.h
Normal file
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
Copyright 2020 Salicylic_Acid
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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"
|
||||
|
||||
/*
|
||||
* ,-------------------------------------- ----------------------------------------------------------.
|
||||
* | L00 | L01 | L02 | L03 | L04 | L05 | | R00 | R01 | R02 | R03 | R04 | R05 | R06 | R07 | R60 |
|
||||
* |-------------------------------------- ------------------------------------------------------------+
|
||||
* | L10 | L11 | L12 | L13 | L14 | L15 | | R10 | R11 | R12 | R13 | R14 | R15 | R16 | R17 | R62 |
|
||||
* |---------------------------------------------------------------------------------------------------+
|
||||
* | L20 | L21 | L22 | L23 | L24 | L25 | | R20 | R21 | R22 | R23 | R24 | R25 | R26 | R27 | R63 |
|
||||
* |---------------------------------------- ---------------------------------------------------------+
|
||||
* | L30 | L31 | L32 | L33 | L34 | L35 | | R30 | R31 | R32 | R33 | R34 | R35 | R36 | R37 |
|
||||
* |---------------------------------------------------------------------------------------------------+
|
||||
* | L40 | L41 | L42 | L43 | L44 | L45 | | R40 | R41 | R42 | R43 | R44 | R45 | R47 | R57 |
|
||||
* |---------------------------------------------------------------------------------------------------+
|
||||
* | L50 | L51 | L52 | L53 | L54 | L55 | | R50 | R51 | R53 | R54 | R55 | R56 | R64 |
|
||||
* |---------------------------------------- ------------------------------------------------------'
|
||||
*/
|
||||
|
||||
#define LAYOUT( \
|
||||
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, R06, R07, R60, \
|
||||
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, R16, R17, R62, \
|
||||
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, R26, R27, R63, \
|
||||
L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, R37, \
|
||||
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45, R47, R57, \
|
||||
L50, L51, L52, L54, L55, R50, R51, R53, R54, R55, R56, R64 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05, KC_NO, KC_NO }, \
|
||||
{ L10, L11, L12, L13, L14, L15, KC_NO, KC_NO }, \
|
||||
{ L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \
|
||||
{ L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \
|
||||
{ L40, L41, L42, L43, L44, L45, KC_NO, KC_NO }, \
|
||||
{ L50, L51, L52, KC_NO, L54, L55, KC_NO, KC_NO }, \
|
||||
{KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ R00, R01, R02, R03, R04, R05, R06, R07 }, \
|
||||
{ R10, R11, R12, R13, R14, R15, R16, R17 }, \
|
||||
{ R20, R21, R22, R23, R24, R25, R26, R27 }, \
|
||||
{ R30, R31, R32, R33, R34, R35, R36, R37 }, \
|
||||
{ R40, R41, R42, R43, R44, R45, KC_NO, R47 }, \
|
||||
{ R50, R51, KC_NO, R53, R54, R55, R56, R57 }, \
|
||||
{ R60, KC_NO, R62, R63, R64, KC_NO, KC_NO, KC_NO } \
|
||||
}
|
84
keyboards/7splus/config.h
Normal file
84
keyboards/7splus/config.h
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
Copyright 2020 Salicylic_acid3
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 0x04D8
|
||||
#define PRODUCT_ID 0xEAE7
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER Salicylic_Acid
|
||||
#define PRODUCT 7splus
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 14
|
||||
#define MATRIX_COLS 8
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { D1, D0, D4, C6, D7, E6, B4 }
|
||||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B5 }
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* serial.c configuration for split keyboard */
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
#define SPLIT_HAND_PIN B6
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* ws2812 RGB LED */
|
||||
#define RGB_DI_PIN D3
|
||||
|
||||
#ifndef RGBLED_NUM
|
||||
#define RGBLED_NUM 31
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLED_SPLIT { 11, 20 }
|
||||
#endif
|
||||
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#ifndef IOS_DEVICE_ENABLE
|
||||
#define RGBLIGHT_LIMIT_VAL 180
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
#else
|
||||
#define RGBLIGHT_LIMIT_VAL 50
|
||||
#define RGBLIGHT_VAL_STEP 4
|
||||
#endif
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
|
||||
// USB_MAX_POWER_CONSUMPTION value for naked48 keyboard
|
||||
// 120 RGBoff, OLEDoff
|
||||
// 120 OLED
|
||||
// 330 RGB 6
|
||||
// 300 RGB 32
|
||||
// 310 OLED & RGB 32
|
||||
#define USB_MAX_POWER_CONSUMPTION 400
|
||||
#else
|
||||
// fix iPhone and iPad power adapter issue
|
||||
// iOS device need lessthan 100
|
||||
#define USB_MAX_POWER_CONSUMPTION 100
|
||||
#endif
|
98
keyboards/7splus/info.json
Normal file
98
keyboards/7splus/info.json
Normal file
@@ -0,0 +1,98 @@
|
||||
{
|
||||
"keyboard_name": "7splus",
|
||||
"url": "https://salicylic-acid3.hatenablog.com/",
|
||||
"maintainer": "Salicylic_acid3",
|
||||
"width": 17,
|
||||
"height": 6.25,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"Esc", "x":0, "y":0},
|
||||
{"label":"F1", "x":1.25, "y":0},
|
||||
{"label":"F2", "x":2.25, "y":0},
|
||||
{"label":"F3", "x":3.25, "y":0},
|
||||
{"label":"F4", "x":4.25, "y":0},
|
||||
{"label":"F5", "x":5.5, "y":0},
|
||||
{"label":"F6", "x":7.5, "y":0},
|
||||
{"label":"F7", "x":8.5, "y":0},
|
||||
{"label":"F8", "x":9.5, "y":0},
|
||||
{"label":"F9", "x":10.75, "y":0},
|
||||
{"label":"F10", "x":11.75, "y":0},
|
||||
{"label":"F11", "x":12.75, "y":0},
|
||||
{"label":"F12", "x":13.75, "y":0},
|
||||
{"label":"PrtScr", "x":15, "y":0},
|
||||
{"label":"Delete", "x":16, "y":0},
|
||||
{"label":"~", "x":0, "y":1.25},
|
||||
{"label":"1", "x":1, "y":1.25},
|
||||
{"label":"2", "x":2, "y":1.25},
|
||||
{"label":"3", "x":3, "y":1.25},
|
||||
{"label":"4", "x":4, "y":1.25},
|
||||
{"label":"5", "x":5, "y":1.25},
|
||||
{"label":"6", "x":7, "y":1.25},
|
||||
{"label":"7", "x":8, "y":1.25},
|
||||
{"label":"8", "x":9, "y":1.25},
|
||||
{"label":"9", "x":10, "y":1.25},
|
||||
{"label":"0", "x":11, "y":1.25},
|
||||
{"label":"-", "x":12, "y":1.25},
|
||||
{"label":"=", "x":13, "y":1.25},
|
||||
{"label":"Back Space", "x":14, "y":1.25, "w":2},
|
||||
{"label":"Home", "x":16, "y":1.25},
|
||||
{"label":"Tab", "x":0, "y":2.25, "w":1.5},
|
||||
{"label":"Q", "x":1.5, "y":2.25},
|
||||
{"label":"W", "x":2.5, "y":2.25},
|
||||
{"label":"E", "x":3.5, "y":2.25},
|
||||
{"label":"R", "x":4.5, "y":2.25},
|
||||
{"label":"T", "x":5.5, "y":2.25},
|
||||
{"label":"Y", "x":7.5, "y":2.25},
|
||||
{"label":"U", "x":8.5, "y":2.25},
|
||||
{"label":"I", "x":9.5, "y":2.25},
|
||||
{"label":"O", "x":10.5, "y":2.25},
|
||||
{"label":"P", "x":11.5, "y":2.25},
|
||||
{"label":"[", "x":12.5, "y":2.25},
|
||||
{"label":"]", "x":13.5, "y":2.25},
|
||||
{"label":"\"", "x":14.5, "y":2.25, "w":1.5},
|
||||
{"label":"Page Up", "x":16, "y":2.25},
|
||||
{"label":"Caps Lock", "x":0, "y":3.25, "w":1.75},
|
||||
{"label":"A", "x":1.75, "y":3.25},
|
||||
{"label":"S", "x":2.75, "y":3.25},
|
||||
{"label":"D", "x":3.75, "y":3.25},
|
||||
{"label":"F", "x":4.75, "y":3.25},
|
||||
{"label":"G", "x":5.75, "y":3.25},
|
||||
{"label":"H", "x":7.75, "y":3.25},
|
||||
{"label":"J", "x":8.75, "y":3.25},
|
||||
{"label":"K", "x":9.75, "y":3.25},
|
||||
{"label":"L", "x":10.75, "y":3.25},
|
||||
{"label":":", "x":11.75, "y":3.25},
|
||||
{"label":"'", "x":12.75, "y":3.25},
|
||||
{"label":"Enter", "x":13.75, "y":3.25, "w":2.25},
|
||||
{"label":"Page Down", "x":16, "y":3.25},
|
||||
{"label":"Shift", "x":0, "y":4.25, "w":2.25},
|
||||
{"label":"Z", "x":2.25, "y":4.25},
|
||||
{"label":"X", "x":3.25, "y":4.25},
|
||||
{"label":"C", "x":4.25, "y":4.25},
|
||||
{"label":"V", "x":5.25, "y":4.25},
|
||||
{"label":"B", "x":6.25, "y":4.25},
|
||||
{"label":"N", "x":8.25, "y":4.25},
|
||||
{"label":"M", "x":9.25, "y":4.25},
|
||||
{"label":"<", "x":10.25, "y":4.25},
|
||||
{"label":">", "x":11.25, "y":4.25},
|
||||
{"label":"?", "x":12.25, "y":4.25},
|
||||
{"label":"Shift","x":13.25, "y":4.25, "w":1.75},
|
||||
{"label":"Up", "x":15, "y":4.25},
|
||||
{"label":"End", "x":16, "y":4.25},
|
||||
{"label":"Ctrl", "x":0, "y":5.25, "w":1.25},
|
||||
{"label":"Win", "x":1.25, "y":5.25, "w":1.25},
|
||||
{"label":"Alt", "x":2.5, "y":5.25, "w":1.25},
|
||||
{"x":3.75, "y":5.25, "w":2},
|
||||
{"x":5.75, "y":5.25},
|
||||
{"x":7.75, "y":5.25},
|
||||
{"x":8.75, "y":5.25, "w":2.75},
|
||||
{"label":"Alt", "x":11.5, "y":5.25, "w":1.25},
|
||||
{"label":"App", "x":12.75, "y":5.25, "w":1.25},
|
||||
{"label":"Left", "x":14, "y":5.25},
|
||||
{"label":"Down", "x":15, "y":5.25},
|
||||
{"label":"Right", "x":16, "y":5.25}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
81
keyboards/7splus/keymaps/default/keymap.c
Normal file
81
keyboards/7splus/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
Copyright 2020 Salicylic_Acid
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
RGB_RST = SAFE_RANGE
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
LT(_ADJUST,KC_GRV),KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
),
|
||||
[_ADJUST] = LAYOUT( /* Base */
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
MO(_ADJUST), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_RST:
|
||||
if (record->event.pressed) {
|
||||
uint8_t mode = rgblight_get_mode();
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
rgblight_mode(mode);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
22
keyboards/7splus/keymaps/salicylic/config.h
Normal file
22
keyboards/7splus/keymaps/salicylic/config.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/* Copyright 2020 Salicylic_acid3
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General 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
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define TAPPING_FORCE_HOLD
|
||||
#define TAPPING_TERM 180
|
147
keyboards/7splus/keymaps/salicylic/keymap.c
Normal file
147
keyboards/7splus/keymaps/salicylic/keymap.c
Normal file
@@ -0,0 +1,147 @@
|
||||
/*
|
||||
Copyright 2020 Salicylic_Acid
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General 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 "keymap_jp.h"
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
enum layer_number {
|
||||
_QWERTY = 0,
|
||||
_MOUSE,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
RGB_RST = SAFE_RANGE
|
||||
};
|
||||
|
||||
enum tapdances{
|
||||
TD_ESMS = 0,
|
||||
TD_ESAR,
|
||||
};
|
||||
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
[TD_ESMS] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _MOUSE),
|
||||
[TD_ESAR] = ACTION_TAP_DANCE_DUAL_ROLE(KC_ESC, _QWERTY),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_QWERTY] = LAYOUT(
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
TD(TD_ESMS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_DEL,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_ZKHK, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_EQL, KC_BSPC, KC_HOME,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_LBRC, JP_RBRC, JP_BSLS, KC_PGUP,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_MINS, JP_QUOT, KC_ENT, KC_PGDN,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_ZKHK, KC_LGUI,ALT_T(KC_MHEN),LT(_LOWER,KC_ENT),KC_BSPC, KC_DEL,LT(_RAISE,KC_SPC), ALT_T(KC_HENK), KC_APP, KC_LEFT, KC_DOWN,KC_RIGHT
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_MOUSE] = LAYOUT(
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
TD(TD_ESAR), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_W),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(LSFT(KC_T)),
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT(
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
JP_QUOT, JP_EXLM, JP_QUES, JP_LBRC, JP_RBRC, JP_TILD, KC_P6, KC_P7, KC_P8, KC_P9, JP_ASTR, JP_SLSH, _______, _______, KC_HOME,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
LCTL_T(JP_QUOT),JP_HASH, JP_DQT, JP_LPRN, JP_RPRN, JP_AT, XXXXXXX, KC_P4, KC_P5, KC_P6, JP_MINS, JP_EQL, _______, KC_END,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
SFT_T(JP_CIRC),JP_PERC, JP_AMPR, JP_SCLN, JP_COLN, JP_PIPE, KC_P0, KC_P1, KC_P2, KC_P3, JP_PLUS, _______, KC_UP, KC_PGUP,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, MO(_LOWER), _______, _______,MO(_RAISE), _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT(
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, XXXXXXX, KC_UP, XXXXXXX, KC_PGUP, XXXXXXX, _______, _______, KC_HOME,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
LCTL_T(KC_F11),XXXXXXX, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, KC_LEFT, KC_DOWN,KC_RIGHT, XXXXXXX, XXXXXXX, _______, KC_END,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
SFT_T(KC_F12), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, _______, KC_UP, KC_PGUP,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN,KC_RIGHT
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( /* Base */
|
||||
//,-----------------------------------------------------| |--------------------------------------------------------------------------------.
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_MOD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_VAD, RGB_VAI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------|
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
//`-----------------------------------------------------| |--------------------------------------------------------------------------------'
|
||||
)
|
||||
};
|
||||
|
||||
//A description for expressing the layer position in LED mode.
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_RST:
|
||||
if (record->event.pressed) {
|
||||
uint8_t mode = rgblight_get_mode();
|
||||
eeconfig_update_rgblight_default();
|
||||
rgblight_enable();
|
||||
rgblight_mode(mode);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
2
keyboards/7splus/keymaps/salicylic/rules.mk
Normal file
2
keyboards/7splus/keymaps/salicylic/rules.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
TAP_DANCE_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user