mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-06 15:23:28 +00:00
Compare commits
411 Commits
0.25.2
...
connection
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4bce7fef31 | ||
![]() |
2577f05cb3 | ||
![]() |
89ac5cb0ff | ||
![]() |
64d626864a | ||
![]() |
7f9d61fe21 | ||
![]() |
0c12f74c5c | ||
![]() |
d88048cc93 | ||
![]() |
22c9c8c87e | ||
![]() |
ac1b488170 | ||
![]() |
b5b4e93857 | ||
![]() |
1f942bb17e | ||
![]() |
5c10bd3d8c | ||
![]() |
0fbe150303 | ||
![]() |
0b4065b50c | ||
![]() |
b04fee4ff7 | ||
![]() |
75402109e9 | ||
![]() |
ddc60da839 | ||
![]() |
fa657fef70 | ||
![]() |
eb78ca1c1a | ||
![]() |
bb20093b24 | ||
![]() |
d28a50e176 | ||
![]() |
8808fffc2f | ||
![]() |
9f387f525c | ||
![]() |
807ba71c89 | ||
![]() |
c7662e4f36 | ||
![]() |
5439507f5e | ||
![]() |
73cb6fd89f | ||
![]() |
8ca082892a | ||
![]() |
9c1e1d1fee | ||
![]() |
d538451adb | ||
![]() |
02b43b4b60 | ||
![]() |
20ae67ba01 | ||
![]() |
938837e881 | ||
![]() |
b3d8d5671c | ||
![]() |
cf84ea7662 | ||
![]() |
56ebd3b829 | ||
![]() |
f98ddf02f4 | ||
![]() |
c25b3bbe90 | ||
![]() |
8c35011d0a | ||
![]() |
c45e75037b | ||
![]() |
8c5acdea12 | ||
![]() |
783f465cd4 | ||
![]() |
60c5ad821c | ||
![]() |
59c275afbc | ||
![]() |
bcfe3a0718 | ||
![]() |
adb884761d | ||
![]() |
622dc56250 | ||
![]() |
e8103722bc | ||
![]() |
ce1adce696 | ||
![]() |
df2d30fd2c | ||
![]() |
d079372580 | ||
![]() |
883821fa62 | ||
![]() |
599899c5fb | ||
![]() |
af70e3759a | ||
![]() |
1eaead3ba4 | ||
![]() |
4bcc80ad46 | ||
![]() |
d09c11dc78 | ||
![]() |
9da9b245d3 | ||
![]() |
82f9019cc9 | ||
![]() |
4e2effc538 | ||
![]() |
a9d6825795 | ||
![]() |
8d5517fa63 | ||
![]() |
8ef275789c | ||
![]() |
ee1505971f | ||
![]() |
a5e9926c45 | ||
![]() |
b6e1a20950 | ||
![]() |
cced3ee622 | ||
![]() |
4e20740efa | ||
![]() |
f2c789bb4a | ||
![]() |
d5cc00ab62 | ||
![]() |
1e4435f22d | ||
![]() |
fab50be817 | ||
![]() |
f04fd13dff | ||
![]() |
23e7d93d0e | ||
![]() |
eb60235cd5 | ||
![]() |
8a58ad27a2 | ||
![]() |
2fb9816c77 | ||
![]() |
2764e48146 | ||
![]() |
6fbe91aecd | ||
![]() |
a6c8c41c68 | ||
![]() |
a6857872f2 | ||
![]() |
78fa0f5ca0 | ||
![]() |
56323f75c6 | ||
![]() |
ddb679ba88 | ||
![]() |
11031adc1b | ||
![]() |
7b4e806c25 | ||
![]() |
8b46500a74 | ||
![]() |
d79f46e408 | ||
![]() |
5a0112df08 | ||
![]() |
7ca0424189 | ||
![]() |
2ddfd60be7 | ||
![]() |
4ab36df48f | ||
![]() |
daa777d6fb | ||
![]() |
e69be076fc | ||
![]() |
63ef6516d3 | ||
![]() |
275e9de350 | ||
![]() |
35356c4623 | ||
![]() |
522bf1daf2 | ||
![]() |
8abaa3bc2d | ||
![]() |
fef8e7195b | ||
![]() |
a763dd5bbd | ||
![]() |
65143b08a3 | ||
![]() |
c70c99367a | ||
![]() |
fd44e96110 | ||
![]() |
b5b06f1094 | ||
![]() |
caa7599b83 | ||
![]() |
40d617f812 | ||
![]() |
c2dbbc060a | ||
![]() |
d885963e38 | ||
![]() |
85447bd53b | ||
![]() |
21b9b70c50 | ||
![]() |
c0aca9f45c | ||
![]() |
e76069ea4e | ||
![]() |
875eb43a28 | ||
![]() |
2db93b5945 | ||
![]() |
2908f0b846 | ||
![]() |
3ebf9880ca | ||
![]() |
a3d938d822 | ||
![]() |
83a7506438 | ||
![]() |
6dfd7ed46f | ||
![]() |
f0807ea64f | ||
![]() |
26e84c513c | ||
![]() |
1552cf2ddc | ||
![]() |
5c43a9bed1 | ||
![]() |
7b5d7907df | ||
![]() |
cfd0ab2198 | ||
![]() |
79ad561b67 | ||
![]() |
85cf8b5183 | ||
![]() |
5a5f68038e | ||
![]() |
52ee9f2ce1 | ||
![]() |
2c2885639e | ||
![]() |
57b7f8534b | ||
![]() |
4d4d7b76b0 | ||
![]() |
6051fc87e3 | ||
![]() |
c58c5fa8fa | ||
![]() |
aaf9074e85 | ||
![]() |
565bb704e0 | ||
![]() |
1ba4fef711 | ||
![]() |
890909c2d7 | ||
![]() |
3251f4b168 | ||
![]() |
f15fff3258 | ||
![]() |
f7a53df9d4 | ||
![]() |
f922ed4283 | ||
![]() |
7d94db8661 | ||
![]() |
4827d383a8 | ||
![]() |
063f1444c6 | ||
![]() |
ec5786bdd1 | ||
![]() |
2e671cfd8b | ||
![]() |
2df8046dd0 | ||
![]() |
1b8b6801d4 | ||
![]() |
2623a258f1 | ||
![]() |
ac8759fe74 | ||
![]() |
cc62eb503d | ||
![]() |
22f830d67c | ||
![]() |
0c4fd514f1 | ||
![]() |
9be6d76c61 | ||
![]() |
27ea1b1332 | ||
![]() |
3d10171e2c | ||
![]() |
e0809eade5 | ||
![]() |
23c4704123 | ||
![]() |
e3ef5b2d9d | ||
![]() |
4d4ccdc41a | ||
![]() |
f8cf58a512 | ||
![]() |
b066c86e43 | ||
![]() |
494af672ce | ||
![]() |
aa8d68036a | ||
![]() |
efa5b30cfd | ||
![]() |
f5319d8911 | ||
![]() |
d69b44e68a | ||
![]() |
f637ff8966 | ||
![]() |
fb54a59bba | ||
![]() |
c97ec805cd | ||
![]() |
07fd206370 | ||
![]() |
fbbc71ec34 | ||
![]() |
83d436581f | ||
![]() |
a0bb7ff992 | ||
![]() |
6eb6e3048a | ||
![]() |
d08da05cb8 | ||
![]() |
8336b5c72f | ||
![]() |
54f907bfe9 | ||
![]() |
b23ddb9ad8 | ||
![]() |
67d512e639 | ||
![]() |
e643fa03ef | ||
![]() |
4fbb395602 | ||
![]() |
1c02c3dfad | ||
![]() |
e4dfbb075e | ||
![]() |
2477aa9161 | ||
![]() |
300505bd9e | ||
![]() |
38f07e1fd2 | ||
![]() |
b82f6ac402 | ||
![]() |
4ae0ca5a11 | ||
![]() |
b9e67347f1 | ||
![]() |
be967d42d2 | ||
![]() |
c5e317aad9 | ||
![]() |
af72a58c8f | ||
![]() |
d0e89aecca | ||
![]() |
ecf5b26ff0 | ||
![]() |
9fb51cfe2b | ||
![]() |
4e8772b5cc | ||
![]() |
6d21898c14 | ||
![]() |
5078ca651c | ||
![]() |
096dc672c1 | ||
![]() |
10e2f1e29f | ||
![]() |
8e64ff574a | ||
![]() |
5e2368984e | ||
![]() |
9dba1cadc9 | ||
![]() |
15af5d7d0d | ||
![]() |
443d111403 | ||
![]() |
62c1787d72 | ||
![]() |
777db159ac | ||
![]() |
8fe667a1a4 | ||
![]() |
3a711f4cfa | ||
![]() |
cd22b8a945 | ||
![]() |
031ccd4887 | ||
![]() |
41878d276e | ||
![]() |
43fc7b5a4f | ||
![]() |
9536b86a09 | ||
![]() |
4ced8d9371 | ||
![]() |
9adac59c29 | ||
![]() |
1c6cdb8d74 | ||
![]() |
c663f5e9f3 | ||
![]() |
32ec677d8d | ||
![]() |
977918982d | ||
![]() |
26c114a2b4 | ||
![]() |
17c6744c82 | ||
![]() |
c2f7974c8e | ||
![]() |
bdca9318f9 | ||
![]() |
e07f752a57 | ||
![]() |
eed2a74be9 | ||
![]() |
bc8ac86422 | ||
![]() |
ce9edc94e5 | ||
![]() |
33adb8cba0 | ||
![]() |
a400c332d2 | ||
![]() |
e754c9f2b4 | ||
![]() |
f8596b40a4 | ||
![]() |
bc0c69570b | ||
![]() |
8471dcc563 | ||
![]() |
869b7d9ae6 | ||
![]() |
7bc3eef8cc | ||
![]() |
641a1ce568 | ||
![]() |
3ffe8d917a | ||
![]() |
e8e5d11ed8 | ||
![]() |
12379dc1eb | ||
![]() |
0947299864 | ||
![]() |
bd5da148ec | ||
![]() |
d6bfbdb6b1 | ||
![]() |
3e4159bc55 | ||
![]() |
cc0b2f9814 | ||
![]() |
5624804c68 | ||
![]() |
38f72c5d2b | ||
![]() |
07253bfe4a | ||
![]() |
62f81cfcc3 | ||
![]() |
2bde8ce206 | ||
![]() |
b94f70d642 | ||
![]() |
086e8e938e | ||
![]() |
af8fe44e0f | ||
![]() |
7bc53b8baa | ||
![]() |
9ca1f35333 | ||
![]() |
2998d20a00 | ||
![]() |
cd374b1500 | ||
![]() |
be7728ae58 | ||
![]() |
ffd9062190 | ||
![]() |
9d02ac37f7 | ||
![]() |
a7aa58cc81 | ||
![]() |
276ecd4693 | ||
![]() |
603586800c | ||
![]() |
90b043e01c | ||
![]() |
5e3b558d5a | ||
![]() |
5f794217b4 | ||
![]() |
7c6dbe5e7c | ||
![]() |
b71b81d539 | ||
![]() |
8bccabca25 | ||
![]() |
17ae6f9b53 | ||
![]() |
2f18d4f449 | ||
![]() |
cebe521b11 | ||
![]() |
94586f821c | ||
![]() |
0b572a1be6 | ||
![]() |
a2176f6a03 | ||
![]() |
751482580e | ||
![]() |
378dbd32bd | ||
![]() |
c973ee1445 | ||
![]() |
03e688e91f | ||
![]() |
d4e98e9fda | ||
![]() |
d5e0562a70 | ||
![]() |
f0471dd5b4 | ||
![]() |
e96d6d9bd4 | ||
![]() |
b4047be3eb | ||
![]() |
191c8cca33 | ||
![]() |
7824e7ed9b | ||
![]() |
17498fa48a | ||
![]() |
cb39df273d | ||
![]() |
99aa4f5191 | ||
![]() |
35f0a17679 | ||
![]() |
7aa2ce2b38 | ||
![]() |
b180a0d415 | ||
![]() |
6f03d20a92 | ||
![]() |
cc6bcf9bac | ||
![]() |
e5c80fc6b3 | ||
![]() |
05573be7b5 | ||
![]() |
aa11ef5bcf | ||
![]() |
751a6b5bc4 | ||
![]() |
27455bba6c | ||
![]() |
a6ef34cd16 | ||
![]() |
92881d38ef | ||
![]() |
4fdde75333 | ||
![]() |
0a5b892820 | ||
![]() |
53a0cdc446 | ||
![]() |
938badc3b0 | ||
![]() |
59a3098139 | ||
![]() |
dafc46f1d1 | ||
![]() |
590281f4f2 | ||
![]() |
baa564bddf | ||
![]() |
51acd35e6f | ||
![]() |
9f449246bb | ||
![]() |
3f44231d2d | ||
![]() |
63848603be | ||
![]() |
4864d5afca | ||
![]() |
0966901f95 | ||
![]() |
089a819179 | ||
![]() |
fca1417f6b | ||
![]() |
751fbd75d3 | ||
![]() |
1317a0732b | ||
![]() |
3c868b9316 | ||
![]() |
3ddd20cf51 | ||
![]() |
7ac1a34a34 | ||
![]() |
c43667fa74 | ||
![]() |
ad82c4703a | ||
![]() |
faa84a7c90 | ||
![]() |
0262161914 | ||
![]() |
e31418ee11 | ||
![]() |
d4654ab893 | ||
![]() |
0c8a968e3d | ||
![]() |
aec7569a04 | ||
![]() |
0594121b68 | ||
![]() |
a2f2de7d2c | ||
![]() |
4e8b740dd7 | ||
![]() |
4f8aab748b | ||
![]() |
c92becc57e | ||
![]() |
e1839238a4 | ||
![]() |
cd565a95a0 | ||
![]() |
a98aa70f80 | ||
![]() |
caf13bb9db | ||
![]() |
248a09d545 | ||
![]() |
4a4eda4c3c | ||
![]() |
55538b2e1e | ||
![]() |
c4a74be7f0 | ||
![]() |
dafbb92f4e | ||
![]() |
942c2a8d5a | ||
![]() |
8fe777adff | ||
![]() |
be9dfe65dd | ||
![]() |
49317f058a | ||
![]() |
fa40356250 | ||
![]() |
b3d3a7c46f | ||
![]() |
7247039742 | ||
![]() |
9fbf4579a4 | ||
![]() |
e69d30a9e9 | ||
![]() |
52b4058ca4 | ||
![]() |
bdd10ef8e7 | ||
![]() |
c785584fa5 | ||
![]() |
031ca3b40b | ||
![]() |
b826877c40 | ||
![]() |
e239d0383a | ||
![]() |
8041a88f5d | ||
![]() |
354a2e40cf | ||
![]() |
e381f91c6e | ||
![]() |
8b5cdfabf5 | ||
![]() |
d4f8b478aa | ||
![]() |
df4538d894 | ||
![]() |
c6ecb9ce41 | ||
![]() |
e484a3a179 | ||
![]() |
186dab5619 | ||
![]() |
9dc183afe4 | ||
![]() |
4926f0de8b | ||
![]() |
333f8bf0d7 | ||
![]() |
3de5e44f52 | ||
![]() |
e7a08ef1a9 | ||
![]() |
d12f090d1e | ||
![]() |
950d765370 | ||
![]() |
c561750f73 | ||
![]() |
260e9a546e | ||
![]() |
0d360b64fa | ||
![]() |
a4da5f219f | ||
![]() |
a82b0628b3 | ||
![]() |
75d11e0421 | ||
![]() |
1a343cfaf4 | ||
![]() |
6d365dd8f1 | ||
![]() |
c1c7c4f6e0 | ||
![]() |
8253697a63 | ||
![]() |
1c536513b3 | ||
![]() |
282253a7e0 | ||
![]() |
a1b2e0261d | ||
![]() |
41dbb4c86c | ||
![]() |
c67789b717 | ||
![]() |
78a0adfbb4 | ||
![]() |
6c87500231 | ||
![]() |
fa6d23235b | ||
![]() |
93f566280e | ||
![]() |
119e54e9e3 | ||
![]() |
c60554e090 | ||
![]() |
32af90ae84 | ||
![]() |
64098fafa6 | ||
![]() |
8a394503c7 | ||
![]() |
8b84fa6b50 | ||
![]() |
6ca94ae158 | ||
![]() |
b39285807e | ||
![]() |
47356b2201 | ||
![]() |
b36c7b99ae | ||
![]() |
4d32073681 | ||
![]() |
9be50fdce5 | ||
![]() |
267dffda15 | ||
![]() |
6921c8a7dd |
82
.github/labeler.yml
vendored
82
.github/labeler.yml
vendored
@@ -1,46 +1,56 @@
|
||||
core:
|
||||
- quantum/**/*
|
||||
- tmk_core/**/*
|
||||
- drivers/**/*
|
||||
- tests/**/*
|
||||
- util/**/*
|
||||
- platforms/**/*
|
||||
- builddefs/**/*
|
||||
- Makefile
|
||||
- '*.mk'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- quantum/**
|
||||
- tmk_core/**
|
||||
- drivers/**
|
||||
- tests/**
|
||||
- util/**
|
||||
- platforms/**
|
||||
- builddefs/*.mk
|
||||
- Makefile
|
||||
- '*.mk'
|
||||
dependencies:
|
||||
- any:
|
||||
- 'lib/**/*'
|
||||
- '!lib/python/**/*'
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: lib/**
|
||||
- all-globs-to-all-files: '!lib/python/**'
|
||||
keyboard:
|
||||
- any:
|
||||
- 'keyboards/**/*'
|
||||
- '!keyboards/**/keymaps/**/*'
|
||||
- all:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: keyboards/**
|
||||
- all-globs-to-all-files: '!keyboards/**/keymaps/**'
|
||||
keymap:
|
||||
- users/**/*
|
||||
- layouts/**/*
|
||||
- keyboards/**/keymaps/**/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- users/**
|
||||
- layouts/**
|
||||
- keyboards/**/keymaps/**
|
||||
via:
|
||||
- keyboards/**/keymaps/via/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- keyboards/**/keymaps/via/*
|
||||
cli:
|
||||
- requirements.txt
|
||||
- lib/python/**/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- requirements.txt
|
||||
- lib/python/**
|
||||
python:
|
||||
- '**/*.py'
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- '**/*.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/**/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- docs/**
|
||||
- builddefs/docsgen/**
|
||||
CI:
|
||||
- .github/**/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- .github/**
|
||||
dd:
|
||||
- data/constants/**/*
|
||||
- data/mappings/**/*
|
||||
- data/schemas/**/*
|
||||
- changed-files:
|
||||
- any-glob-to-any-file:
|
||||
- data/constants/**
|
||||
- data/mappings/**
|
||||
- data/schemas/**
|
||||
|
6
.github/workflows/auto_approve.yml
vendored
6
.github/workflows/auto_approve.yml
vendored
@@ -13,8 +13,8 @@ jobs:
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
|
||||
steps:
|
||||
- uses: mheap/automatic-approve-action@v1
|
||||
- uses: zvecr/automatic-approve-action@safe_files
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
workflows: "format.yml,lint.yml,unit_test.yml"
|
||||
dangerous_files: "lib/python/,Makefile,paths.mk,builddefs/"
|
||||
workflows: "labeler.yml,lint.yml,docs.yml"
|
||||
safe_files: "keyboards/,docs/"
|
||||
|
34
.github/workflows/ci_build_major_branch.yml
vendored
34
.github/workflows/ci_build_major_branch.yml
vendored
@@ -52,9 +52,9 @@ jobs:
|
||||
run: |
|
||||
target_count=$( {
|
||||
qmk find -km default 2>/dev/null
|
||||
qmk find -km via 2>/dev/null
|
||||
# qmk find -km xap 2>/dev/null
|
||||
} | sort | uniq | wc -l)
|
||||
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution as we're splitting default and via
|
||||
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution
|
||||
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
|
||||
|
||||
build_targets:
|
||||
@@ -63,7 +63,8 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
keymap: [default, via]
|
||||
keymap: [default]
|
||||
# keymap: [default, xap]
|
||||
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
|
||||
with:
|
||||
branch: ${{ inputs.branch || github.ref_name }}
|
||||
@@ -77,44 +78,59 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: firmware-*
|
||||
path: firmwares
|
||||
path: .
|
||||
merge-multiple: true
|
||||
|
||||
- name: Generate index page
|
||||
run: |
|
||||
python3 -m pip install -r ./util/ci/requirements.txt
|
||||
./util/ci/index_generator.py > index.html
|
||||
./util/ci/firmware_list_generator.py > firmware_list.json
|
||||
|
||||
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
|
||||
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
|
||||
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
|
||||
SOURCE_DIR: firmwares
|
||||
SOURCE_DIR: .
|
||||
DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
|
||||
|
||||
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
args: --acl public-read --follow-symlinks --delete --exclude '*' --include 'index.html' --include 'firmware_list.json' --include '*.hex' --include '*.bin' --include '*.uf2'
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
|
||||
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
|
||||
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
|
||||
SOURCE_DIR: firmwares
|
||||
SOURCE_DIR: .
|
||||
DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
|
||||
|
||||
- name: Check if failure marker file exists
|
||||
id: check_failure_marker
|
||||
uses: andstor/file-existence-action@v3
|
||||
with:
|
||||
files: firmwares/.failed
|
||||
files: ./.failed
|
||||
|
||||
- name: Fail build if needed
|
||||
if: steps.check_failure_marker.outputs.files_exists == 'true'
|
||||
|
@@ -172,10 +172,10 @@ jobs:
|
||||
targets-${{ inputs.keymap }}
|
||||
|
||||
- name: 'CI Discord Notification'
|
||||
if: always()
|
||||
if: always() && !cancelled()
|
||||
working-directory: util/ci/
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.CI_DISCORD_WEBHOOK }}
|
||||
run: |
|
||||
python3 -m pip install -r requirements.txt
|
||||
python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
python3 ./discord-results.py --branch ${{ inputs.branch || github.ref_name }} --sha $(git rev-parse HEAD) --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
|
38
.github/workflows/docs.yml
vendored
38
.github/workflows/docs.yml
vendored
@@ -7,7 +7,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- vitepress
|
||||
paths:
|
||||
- 'builddefs/docsgen/**'
|
||||
- 'tmk_core/**'
|
||||
@@ -15,6 +14,11 @@ on:
|
||||
- 'platforms/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'builddefs/docsgen/**'
|
||||
- 'docs/**'
|
||||
- '.github/workflows/docs.yml'
|
||||
|
||||
defaults:
|
||||
run:
|
||||
@@ -25,9 +29,6 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
# protect against those who develop with their fork on master
|
||||
if: github.repository == 'qmk/qmk_firmware' || (github.repository == 'tzarc/qmk_firmware' && github.ref == 'refs/heads/vitepress')
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -35,10 +36,10 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
apt-get update && apt-get install -y rsync doxygen curl
|
||||
apt-get update && apt-get install -y rsync doxygen
|
||||
# install nvm
|
||||
touch $HOME/.bashrc
|
||||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
|
||||
|
||||
- name: Install node
|
||||
run: |
|
||||
@@ -46,40 +47,19 @@ jobs:
|
||||
nvm install 20
|
||||
nvm use 20
|
||||
corepack enable
|
||||
npm install -g moxygen
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
source $HOME/.bashrc
|
||||
nvm use 20
|
||||
qmk --verbose generate-docs
|
||||
touch '.build/docs/.nojekyll'
|
||||
|
||||
- name: Set CNAME
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
run: |
|
||||
# Override target CNAME
|
||||
echo 'docs.qmk.fm' > .build/docs/CNAME
|
||||
|
||||
- name: Override CNAME
|
||||
if: github.repository == 'tzarc/qmk_firmware'
|
||||
run: |
|
||||
# Temporarily override target CNAME during development
|
||||
echo 'vitepress.qmk.fm' > .build/docs/CNAME
|
||||
|
||||
- name: Deploy
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.1
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'qmk/qmk_firmware' }}
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.3
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: gh-pages
|
||||
folder: .build/docs
|
||||
git-config-name: QMK Bot
|
||||
git-config-email: hello@qmk.fm
|
||||
|
||||
- name: Deploy
|
||||
if: github.repository == 'tzarc/qmk_firmware'
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.1
|
||||
with:
|
||||
branch: gh-pages
|
||||
folder: .build/docs
|
||||
|
15
.github/workflows/labeler.yml
vendored
15
.github/workflows/labeler.yml
vendored
@@ -1,18 +1,13 @@
|
||||
name: "Pull Request Labeler"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review, locked]
|
||||
- pull_request_target
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: '.github/labeler.yml'
|
||||
- uses: actions/labeler@v5
|
||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,6 +25,8 @@
|
||||
*.la
|
||||
*.stackdump
|
||||
*.sym
|
||||
index.html
|
||||
firmware_list.json
|
||||
|
||||
# QMK-specific
|
||||
api_data/v1
|
||||
|
15
Makefile
15
Makefile
@@ -465,3 +465,18 @@ distclean_userspace: clean
|
||||
rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2
|
||||
echo 'done.'
|
||||
endif
|
||||
|
||||
# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA.
|
||||
CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt
|
||||
|
||||
.PHONY: format-core
|
||||
format-core:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a"
|
||||
|
||||
.PHONY: pytest
|
||||
pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest"
|
||||
|
||||
.PHONY: format-and-pytest
|
||||
format-and-pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest"
|
||||
|
@@ -212,7 +212,12 @@ $(INTERMEDIATE_OUTPUT)/src/config.h: $(KEYMAP_JSON)
|
||||
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --output $(KEYMAP_H) $(KEYMAP_JSON))
|
||||
@$(BUILD_CMD)
|
||||
|
||||
generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c
|
||||
$(INTERMEDIATE_OUTPUT)/src/keymap.h: $(KEYMAP_JSON)
|
||||
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=$(QMK_BIN) generate-keymap-h --quiet --output $(INTERMEDIATE_OUTPUT)/src/keymap.h $(KEYMAP_JSON))
|
||||
@$(BUILD_CMD)
|
||||
|
||||
generated-files: $(INTERMEDIATE_OUTPUT)/src/config.h $(INTERMEDIATE_OUTPUT)/src/keymap.c $(INTERMEDIATE_OUTPUT)/src/keymap.h
|
||||
|
||||
endif
|
||||
|
||||
|
@@ -47,7 +47,8 @@ PLATFORM:=TEST
|
||||
PLATFORM_KEY:=test
|
||||
BOOTLOADER_TYPE:=none
|
||||
|
||||
ifeq ($(strip $(DEBUG)), 1)
|
||||
DEBUG ?= 0
|
||||
ifneq ($(strip $(DEBUG)), 0)
|
||||
CONSOLE_ENABLE = yes
|
||||
endif
|
||||
|
||||
|
@@ -282,18 +282,17 @@ ifneq ($(strip $(WEAR_LEVELING_DRIVER)),none)
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_FLASH_DRIVER_TYPES := spi
|
||||
VALID_FLASH_DRIVER_TYPES := spi custom
|
||||
FLASH_DRIVER ?= none
|
||||
ifneq ($(strip $(FLASH_DRIVER)), none)
|
||||
ifeq ($(filter $(FLASH_DRIVER),$(VALID_FLASH_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid FLASH_DRIVER,FLASH_DRIVER="$(FLASH_DRIVER)" is not a valid flash driver)
|
||||
else
|
||||
OPT_DEFS += -DFLASH_ENABLE
|
||||
OPT_DEFS += -DFLASH_ENABLE -DFLASH_DRIVER -DFLASH_DRIVER_$(strip $(shell echo $(FLASH_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
COMMON_VPATH += $(DRIVER_PATH)/flash
|
||||
ifeq ($(strip $(FLASH_DRIVER)),spi)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI
|
||||
COMMON_VPATH += $(DRIVER_PATH)/flash
|
||||
SRC += flash_spi.c
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -882,7 +881,7 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
|
||||
OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
NO_USB_STARTUP_CHECK := yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/bluetooth
|
||||
SRC += outputselect.c
|
||||
SRC += outputselect.c process_connection.c
|
||||
|
||||
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
|
@@ -28,12 +28,12 @@ export default defineConfig(({ mode }) => {
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: {
|
||||
light: "/badge-community-light.svg",
|
||||
dark: "/badge-community-dark.svg",
|
||||
light: "/qmk-logo-light.svg",
|
||||
dark: "/qmk-logo-dark.svg",
|
||||
},
|
||||
siteTitle: false,
|
||||
title: 'QMK Firmware',
|
||||
|
||||
nav: [{ text: "Home", link: "./" }],
|
||||
nav: [{ text: "Home", link: "/" }],
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
|
@@ -2,11 +2,22 @@
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { useRouter } from 'vitepress'
|
||||
import { onBeforeMount } from 'vue';
|
||||
import aliases from "../../../../docs/_aliases.json";
|
||||
|
||||
const router = useRouter()
|
||||
onBeforeMount(async () => {
|
||||
if (window.location.href.includes('/#/')) {
|
||||
const newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
|
||||
// Convert from docsify-style to vitepress-style URLs
|
||||
let newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
|
||||
|
||||
// Convert any aliases
|
||||
let testUrl = new URL(newUrl);
|
||||
while (testUrl.pathname in aliases) {
|
||||
testUrl.pathname = aliases[testUrl.pathname];
|
||||
}
|
||||
newUrl = testUrl.toString();
|
||||
|
||||
// Redirect if required
|
||||
if (newUrl != window.location.href) {
|
||||
window.history.replaceState({}, '', newUrl);
|
||||
await router.go(newUrl);
|
||||
}
|
||||
|
@@ -1,19 +1,19 @@
|
||||
/* Override <kbd> as vitepress doesn't put them with borders */
|
||||
kbd {
|
||||
border: 1px solid var(--vp-c-text-1);
|
||||
border-radius: 0.6em;
|
||||
border-radius: 5px;
|
||||
margin: 0.2em;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
:root {
|
||||
--vp-nav-logo-height: 100%;
|
||||
--vp-nav-logo-height: 32px;
|
||||
|
||||
--vp-layout-max-width: calc(98% + 64px);
|
||||
|
||||
--vp-sidebar-width: 300px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
padding-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.VPNavBarTitle.has-sidebar .title {
|
||||
border-bottom: 0;
|
||||
.VPDoc.has-aside .content-container {
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
616
data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
Normal file
616
data/constants/keycodes/extras/keycodes_farsi_0.0.1.hjson
Normal file
@@ -0,0 +1,616 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ │ ۱ │ ۲ │ ۳ │ ۴ │ ۵ │ ۶ │ ۷ │ ۸ │ ۹ │ ۰ │ - │ = │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ ض │ ص │ ث │ ق │ ف │ غ │ ع │ ه │ خ │ ح │ ج │ چ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ ش │ س │ ی │ ب │ ل │ ا │ ت │ ن │ م │ ک │ گ │ \ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ < │ ظ │ ط │ ز │ ر │ ذ │ د │ پ │ و │ . │ / │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"KC_GRV": {
|
||||
"key": "FA_ZWJ",
|
||||
"label": "(zero-width joiner)",
|
||||
}
|
||||
"KC_1": {
|
||||
"key": "FA_1A",
|
||||
"label": "۱",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "FA_2A",
|
||||
"label": "۲",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "FA_3A",
|
||||
"label": "۳",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "FA_4A",
|
||||
"label": "۴",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "FA_5A",
|
||||
"label": "۵",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "FA_6A",
|
||||
"label": "۶",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "FA_7A",
|
||||
"label": "۷",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "FA_8A",
|
||||
"label": "۸",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "FA_9A",
|
||||
"label": "۹",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "FA_0A",
|
||||
"label": "۰",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "FA_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "FA_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "FA_ZAD",
|
||||
"label": "ض",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "FA_SAD",
|
||||
"label": "ص",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "FA_SE",
|
||||
"label": "ث",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "FA_QAF",
|
||||
"label": "ق",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "FA_FE",
|
||||
"label": "ف",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "FA_GHYN",
|
||||
"label": "غ",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "FA_EYN",
|
||||
"label": "ع",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "FA_HE",
|
||||
"label": "ه",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "FA_KHE",
|
||||
"label": "خ",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "FA_HEJ",
|
||||
"label": "ح",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "FA_JIM",
|
||||
"label": "ج",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "FA_CHE",
|
||||
"label": "چ",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "FA_SHIN",
|
||||
"label": "ش",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "FA_SIN",
|
||||
"label": "س",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "FA_YE",
|
||||
"label": "ی",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "FA_BE",
|
||||
"label": "ب",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "FA_LAM",
|
||||
"label": "ل",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "FA_ALEF",
|
||||
"label": "ا",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "FA_TE",
|
||||
"label": "ت",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "FA_NOON",
|
||||
"label": "ن",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "FA_MIM",
|
||||
"label": "م",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "FA_KAF",
|
||||
"label": "ک",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "FA_GAF",
|
||||
"label": "گ",
|
||||
}
|
||||
"KC_BSLS": {
|
||||
"key": "FA_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"KC_LT": {
|
||||
"key": "FA_LT",
|
||||
"label": "<",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "FA_ZA",
|
||||
"label": "ظ",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "FA_TA",
|
||||
"label": "ط",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "FA_ZE",
|
||||
"label": "ز",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "FA_RE",
|
||||
"label": "ر",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "FA_ZAL",
|
||||
"label": "ذ",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "FA_DAL",
|
||||
"label": "د",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "FA_PE",
|
||||
"label": "پ",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "FA_WAW",
|
||||
"label": "و",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "FA_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "FA_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"KC_SPC": {
|
||||
"key": "FA_SPC",
|
||||
"label": " ",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ÷ │ ! │ ٬ │ ٫ │ ﷼ │ ٪ │ × │ ، │ * │ ) │ ( │ ـ │ + │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ ْ │ ٌ │ ٍ │ ً │ ُ │ ِ │ َ │ ّ │ ] │ [ │ } │ { │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ ؤ │ ئ │ ي │ إ │ أ │ آ │ ة │ » │ « │ : │ ؛ │ | │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ > │ ك │ ٓ │ ژ │ ٰ │ │ ٔ │ ء │ │ │ ؟ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"S(FA_ZWJ)": {
|
||||
"key": "FA_DIV",
|
||||
"label": "÷",
|
||||
}
|
||||
"S(FA_1A)": {
|
||||
"key": "FA_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"S(FA_2A)": {
|
||||
"key": "FA_THS",
|
||||
"label": "٬",
|
||||
}
|
||||
"S(FA_3A)": {
|
||||
"key": "FA_DECS",
|
||||
"label": "٫",
|
||||
}
|
||||
"S(FA_4A)": {
|
||||
"key": "FA_RIAL",
|
||||
"label": "﷼",
|
||||
}
|
||||
"S(FA_5A)": {
|
||||
"key": "FA_PRCA",
|
||||
"label": "٪",
|
||||
}
|
||||
"S(FA_6A)": {
|
||||
"key": "FA_MUL",
|
||||
"label": "×",
|
||||
}
|
||||
"S(FA_7A)": {
|
||||
"key": "FA_COMA",
|
||||
"label": "،",
|
||||
}
|
||||
"S(FA_8A)": {
|
||||
"key": "FA_ASTR",
|
||||
"label": "*",
|
||||
}
|
||||
"S(FA_9A)": {
|
||||
"key": "FA_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"S(FA_0A)": {
|
||||
"key": "FA_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
"S(FA_MINS)": {
|
||||
"key": "FA_TATW",
|
||||
"label": "ـ",
|
||||
}
|
||||
"S(FA_EQL)": {
|
||||
"key": "FA_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"S(FA_ZAD)": {
|
||||
"key": "FA_SUK",
|
||||
"label": "ْ",
|
||||
}
|
||||
"S(FA_SAD)": {
|
||||
"key": "FA_DMTN",
|
||||
"label": "ٌ",
|
||||
}
|
||||
"S(FA_SE)": {
|
||||
"key": "FA_KSTN",
|
||||
"label": "ٍ",
|
||||
}
|
||||
"S(FA_QAF)": {
|
||||
"key": "FA_FTHN",
|
||||
"label": "ً",
|
||||
}
|
||||
"S(FA_FE)": {
|
||||
"key": "FA_DMM",
|
||||
"label": "ُ",
|
||||
}
|
||||
"S(FA_GHYN)": {
|
||||
"key": "FA_KAS",
|
||||
"label": "ِ",
|
||||
}
|
||||
"S(FA_EYN)": {
|
||||
"key": "FA_FAT",
|
||||
"label": "َ",
|
||||
}
|
||||
"S(FA_HE)": {
|
||||
"key": "FA_TSDD",
|
||||
"label": "",
|
||||
}
|
||||
"S(FA_KHE)": {
|
||||
"key": "FA_RBRC",
|
||||
"label": "]",
|
||||
}
|
||||
"S(FA_HEJ)": {
|
||||
"key": "FA_LBRC",
|
||||
"label": "[",
|
||||
}
|
||||
"S(FA_JIM)": {
|
||||
"key": "FA_RCBR",
|
||||
"label": "}",
|
||||
}
|
||||
"S(FA_CHE)": {
|
||||
"key": "FA_LCBR",
|
||||
"label": "{",
|
||||
}
|
||||
"S(FA_SHIN)": {
|
||||
"key": "FA_HMZV",
|
||||
"label": "ؤ",
|
||||
}
|
||||
"S(FA_SIN)": {
|
||||
"key": "FA_HMZY",
|
||||
"label": "ئ",
|
||||
}
|
||||
"S(FA_YE)": {
|
||||
"key": "FA_YEA",
|
||||
"label": "ي",
|
||||
}
|
||||
"S(FA_BE)": {
|
||||
"key": "FA_HMZU",
|
||||
"label": "إ",
|
||||
}
|
||||
"S(FA_LAM)": {
|
||||
"key": "FA_HMZO",
|
||||
"label": "أ",
|
||||
}
|
||||
"S(FA_ALEF)": {
|
||||
"key": "FA_MALF",
|
||||
"label": "آ",
|
||||
}
|
||||
"S(FA_TE)": {
|
||||
"key": "FA_TEHM",
|
||||
"label": "ة",
|
||||
}
|
||||
"S(FA_NOON)": {
|
||||
"key": "FA_RQOT",
|
||||
"label": "»",
|
||||
}
|
||||
"S(FA_MIM)": {
|
||||
"key": "FA_LQOT",
|
||||
"label": "«",
|
||||
}
|
||||
"S(FA_KAF)": {
|
||||
"key": "FA_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"S(FA_GAF)": {
|
||||
"key": "FA_SCLA",
|
||||
"label": "؛",
|
||||
}
|
||||
"S(FA_LT)": {
|
||||
"key": "FA_GT",
|
||||
"label": ">",
|
||||
}
|
||||
"S(FA_ZA)": {
|
||||
"key": "FA_KAFA",
|
||||
"label": "ك",
|
||||
}
|
||||
"S(FA_TA)": {
|
||||
"key": "FA_MADO",
|
||||
"label": "ٓ",
|
||||
}
|
||||
"S(FA_ZE)": {
|
||||
"key": "FA_JEH",
|
||||
"label": "ژ",
|
||||
}
|
||||
"S(FA_RE)": {
|
||||
"key": "FA_SUPA",
|
||||
"label": "ٰ",
|
||||
}
|
||||
"S(FA_ZAL)": {
|
||||
"key": "FA_ZWNJ",
|
||||
"label": "(zero-width non-joiner)",
|
||||
}
|
||||
"S(FA_DAL)": {
|
||||
"key": "FA_HMZA",
|
||||
"label": "ٔ",
|
||||
}
|
||||
"S(FA_PE)": {
|
||||
"key": "FA_HMZ",
|
||||
"label": "ء",
|
||||
}
|
||||
"S(FA_SLSH)": {
|
||||
"key": "FA_QSA",
|
||||
"label": "؟",
|
||||
}
|
||||
/* AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ~ │ ` │ @ │ # │ $ │ % │ ^ │ & │ • │ │ │ _ │ − │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ ° │ │ € │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ ى │ │ │ ٱ │ │ ﴾ │ ﴿ │ ; │ " │ ‐ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ | │ │ │ │ ٖ │ │ ٕ │ … │ , │ ' │ ? │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"ALGR(FA_ZWJ)": {
|
||||
"key": "FA_TILD",
|
||||
"label": "~",
|
||||
}
|
||||
"ALGR(FA_1A)": {
|
||||
"key": "FA_GRV",
|
||||
"label": "`",
|
||||
}
|
||||
"ALGR(FA_2A)": {
|
||||
"key": "FA_AT",
|
||||
"label": "@",
|
||||
}
|
||||
"ALGR(FA_3A)": {
|
||||
"key": "FA_HASH",
|
||||
"label": "#",
|
||||
}
|
||||
"ALGR(FA_4A)": {
|
||||
"key": "FA_DLR",
|
||||
"label": "$",
|
||||
}
|
||||
"ALGR(FA_5A)": {
|
||||
"key": "FA_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"ALGR(FA_6A)": {
|
||||
"key": "FA_CIRC",
|
||||
"label": "^",
|
||||
}
|
||||
"ALGR(FA_7A)": {
|
||||
"key": "FA_AMPR",
|
||||
"label": "&",
|
||||
}
|
||||
"ALGR(FA_8A)": {
|
||||
"key": "FA_BULT",
|
||||
"label": "•",
|
||||
}
|
||||
"ALGR(FA_9A)": {
|
||||
"key": "FA_LRM",
|
||||
"label": "(left-to-right mark)",
|
||||
}
|
||||
"ALGR(FA_0A)": {
|
||||
"key": "FA_RLM",
|
||||
"label": "(right-to-left mark)",
|
||||
}
|
||||
"ALGR(FA_MINS)": {
|
||||
"key": "FA_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
"ALGR(FA_EQL)": {
|
||||
"key": "FA_DMNS",
|
||||
"label": "− (dead)",
|
||||
}
|
||||
"ALGR(FA_ZAD)": {
|
||||
"key": "FA_DEG",
|
||||
"label": "°",
|
||||
}
|
||||
"ALGR(FA_SE)": {
|
||||
"key": "FA_EURO",
|
||||
"label": "€",
|
||||
}
|
||||
"ALGR(FA_HE)": {
|
||||
"key": "FA_LRO",
|
||||
"label": "(left-to-right override)",
|
||||
}
|
||||
"ALGR(FA_KHE)": {
|
||||
"key": "FA_RLO",
|
||||
"label": "(right-to-left override)",
|
||||
}
|
||||
"ALGR(FA_HEJ)": {
|
||||
"key": "FA_PDF",
|
||||
"label": "(pop directional formatting)",
|
||||
}
|
||||
"ALGR(FA_JIM)": {
|
||||
"key": "FA_LRE",
|
||||
"label": "(left-to-right embedding)",
|
||||
}
|
||||
"ALGR(FA_CHE)": {
|
||||
"key": "FA_RLE",
|
||||
"label": "(right-to-left embedding)",
|
||||
}
|
||||
"ALGR(FA_YE)": {
|
||||
"key": "FA_ALFM",
|
||||
"label": "ى",
|
||||
}
|
||||
"ALGR(FA_ALEF)": {
|
||||
"key": "FA_ALFW",
|
||||
"label": "ٱ",
|
||||
}
|
||||
"ALGR(FA_NOON)": {
|
||||
"key": "FA_LORP",
|
||||
"label": "﴾",
|
||||
}
|
||||
"ALGR(FA_MIM)": {
|
||||
"key": "FA_RORP",
|
||||
"label": "﴿",
|
||||
}
|
||||
"ALGR(FA_KAF)": {
|
||||
"key": "FA_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"ALGR(FA_GAF)": {
|
||||
"key": "FA_DQT",
|
||||
"label": "\"",
|
||||
}
|
||||
"ALGR(FA_BSLS)": {
|
||||
"key": "FA_MINA",
|
||||
"label": "-",
|
||||
}
|
||||
"ALGR(FA_ZA)": {
|
||||
"key": "FA_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"ALGR(FA_RA)": {
|
||||
"key": "FA_SUBA",
|
||||
"label": "ٖ",
|
||||
}
|
||||
"ALGR(FA_DAL)": {
|
||||
"key": "FA_HMZB",
|
||||
"label": "ء",
|
||||
}
|
||||
"ALGR(FA_PE)": {
|
||||
"key": "FA_ELLP",
|
||||
"label": "…",
|
||||
}
|
||||
"ALGR(FA_WAW)": {
|
||||
"key": "FA_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"ALGR(FA_DOT)": {
|
||||
"key": "FA_QUOT",
|
||||
"label": "'",
|
||||
}
|
||||
"ALGR(FA_SLSH)": {
|
||||
"key": "FA_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
/* Shift+AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ ¦ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"S(ALGR(FA_1A))": {
|
||||
"key": "FA_1",
|
||||
"label": "1",
|
||||
}
|
||||
"S(ALGR(FA_2A))": {
|
||||
"key": "FA_2",
|
||||
"label": "2",
|
||||
}
|
||||
"S(ALGR(FA_3A))": {
|
||||
"key": "FA_3",
|
||||
"label": "3",
|
||||
}
|
||||
"S(ALGR(FA_4A))": {
|
||||
"key": "FA_4",
|
||||
"label": "4",
|
||||
}
|
||||
"S(ALGR(FA_5A))": {
|
||||
"key": "FA_5",
|
||||
"label": "5",
|
||||
}
|
||||
"S(ALGR(FA_6A))": {
|
||||
"key": "FA_6",
|
||||
"label": "6",
|
||||
}
|
||||
"S(ALGR(FA_7A))": {
|
||||
"key": "FA_7",
|
||||
"label": "7",
|
||||
}
|
||||
"S(ALGR(FA_8A))": {
|
||||
"key": "FA_8",
|
||||
"label": "8",
|
||||
}
|
||||
"S(ALGR(FA_9A))": {
|
||||
"key": "FA_9",
|
||||
"label": "9",
|
||||
}
|
||||
"S(ALGR(FA_0A))": {
|
||||
"key": "FA_0",
|
||||
"label": "0",
|
||||
}
|
||||
"S(ALGR(FA_LT))": {
|
||||
"key": "FA_BRKP",
|
||||
"label": "¦",
|
||||
}
|
||||
"S(ALGR(FA_SPC))": {
|
||||
"key": "FA_NNBS",
|
||||
"label": "(narrow non-breaking space)",
|
||||
}
|
||||
}
|
||||
}
|
175
data/constants/keycodes/keycodes_0.0.5_basic.hjson
Normal file
175
data/constants/keycodes/keycodes_0.0.5_basic.hjson
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x00CD": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_UP",
|
||||
"label": "Mouse cursor up",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_UP"
|
||||
]
|
||||
},
|
||||
"0x00CE": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_DOWN",
|
||||
"label": "Mouse cursor down",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_DOWN"
|
||||
]
|
||||
},
|
||||
"0x00CF": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_LEFT",
|
||||
"label": "Mouse cursor left",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_LEFT"
|
||||
]
|
||||
},
|
||||
"0x00D0": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_CURSOR_RIGHT",
|
||||
"label": "Mouse cursor right",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_RGHT"
|
||||
]
|
||||
},
|
||||
"0x00D1": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_1",
|
||||
"label": "Mouse button 1",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN1"
|
||||
]
|
||||
},
|
||||
"0x00D2": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_2",
|
||||
"label": "Mouse button 2",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN2"
|
||||
]
|
||||
},
|
||||
"0x00D3": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_3",
|
||||
"label": "Mouse button 3",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN3"
|
||||
]
|
||||
},
|
||||
"0x00D4": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_4",
|
||||
"label": "Mouse button 4",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN4"
|
||||
]
|
||||
},
|
||||
"0x00D5": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_5",
|
||||
"label": "Mouse button 5",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN5"
|
||||
]
|
||||
},
|
||||
"0x00D6": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_6",
|
||||
"label": "Mouse button 6",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN6"
|
||||
]
|
||||
},
|
||||
"0x00D7": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_7",
|
||||
"label": "Mouse button 7",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN7"
|
||||
]
|
||||
},
|
||||
"0x00D8": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_BUTTON_8",
|
||||
"label": "Mouse button 8",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_BTN8"
|
||||
]
|
||||
},
|
||||
"0x00D9": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_UP",
|
||||
"label": "Mouse wheel up",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLU"
|
||||
]
|
||||
},
|
||||
"0x00DA": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_DOWN",
|
||||
"label": "Mouse wheel down",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLD"
|
||||
]
|
||||
},
|
||||
"0x00DB": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_LEFT",
|
||||
"label": "Mouse wheel left",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLL"
|
||||
]
|
||||
},
|
||||
"0x00DC": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_WHEEL_RIGHT",
|
||||
"label": "Mouse wheel right",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_WHLR"
|
||||
]
|
||||
},
|
||||
"0x00DD": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_0",
|
||||
"label": "Set mouse acceleration to 0",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL0"
|
||||
]
|
||||
},
|
||||
"0x00DE": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_1",
|
||||
"label": "Set mouse acceleration to 1",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL1"
|
||||
]
|
||||
},
|
||||
"0x00DF": {
|
||||
"group": "mouse",
|
||||
"key": "QK_MOUSE_ACCELERATION_2",
|
||||
"label": "Set mouse acceleration to 2",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"MS_ACL2"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
109
data/constants/keycodes/keycodes_0.0.5_connection.hjson
Normal file
109
data/constants/keycodes/keycodes_0.0.5_connection.hjson
Normal file
@@ -0,0 +1,109 @@
|
||||
{
|
||||
"ranges": {
|
||||
"0x7780/0x003F": {
|
||||
"define": "QK_CONNECTION"
|
||||
}
|
||||
}
|
||||
"keycodes": {
|
||||
"0x7780": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_NEXT",
|
||||
"aliases": [
|
||||
"OU_NEXT",
|
||||
"OU_AUTO"
|
||||
]
|
||||
},
|
||||
"0x7781": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_PREV",
|
||||
"aliases": [
|
||||
"OU_PREV"
|
||||
]
|
||||
},
|
||||
"0x7782": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_NONE",
|
||||
"aliases": [
|
||||
"OU_NONE"
|
||||
]
|
||||
},
|
||||
"0x7783": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_USB",
|
||||
"aliases": [
|
||||
"OU_USB"
|
||||
]
|
||||
},
|
||||
"0x7784": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_2P4GHZ",
|
||||
"aliases": [
|
||||
"OU_2P4G"
|
||||
]
|
||||
},
|
||||
"0x7785": {
|
||||
"group": "connection",
|
||||
"key": "QK_OUTPUT_BLUETOOTH",
|
||||
"aliases": [
|
||||
"OU_BT"
|
||||
]
|
||||
},
|
||||
|
||||
"0x7790": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE_NEXT",
|
||||
"aliases": [
|
||||
"BT_NEXT"
|
||||
]
|
||||
},
|
||||
"0x7791": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE_PREV",
|
||||
"aliases": [
|
||||
"BT_PREV"
|
||||
]
|
||||
},
|
||||
"0x7792": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_UNPAIR",
|
||||
"aliases": [
|
||||
"BT_UNPR"
|
||||
]
|
||||
}
|
||||
"0x7793": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE1",
|
||||
"aliases": [
|
||||
"BT_PRF1"
|
||||
]
|
||||
},
|
||||
"0x7794": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE2",
|
||||
"aliases": [
|
||||
"BT_PRF2"
|
||||
]
|
||||
},
|
||||
"0x7795": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE3",
|
||||
"aliases": [
|
||||
"BT_PRF3"
|
||||
]
|
||||
},
|
||||
"0x7796": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE4",
|
||||
"aliases": [
|
||||
"BT_PRF4"
|
||||
]
|
||||
},
|
||||
"0x7797": {
|
||||
"group": "connection",
|
||||
"key": "QK_BLUETOOTH_PROFILE5",
|
||||
"aliases": [
|
||||
"BT_PRF5"
|
||||
]
|
||||
},
|
||||
}
|
||||
}
|
7
data/constants/keycodes/keycodes_0.0.5_quantum.hjson
Normal file
7
data/constants/keycodes/keycodes_0.0.5_quantum.hjson
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7C20": "!delete!", // old QK_OUTPUT_AUTO
|
||||
"0x7C21": "!delete!", // old QK_OUTPUT_USB
|
||||
"0x7C22": "!delete!", // old QK_OUTPUT_BLUETOOTH
|
||||
}
|
||||
}
|
@@ -72,6 +72,11 @@
|
||||
"LED_KANA_PIN": {"info_key": "indicators.kana"},
|
||||
"LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"},
|
||||
|
||||
// Joystick
|
||||
"JOYSTICK_AXIS_COUNT": {"info_key": "joystick.axis_count", "value_type": "int"},
|
||||
"JOYSTICK_AXIS_RESOLUTION": {"info_key": "joystick.axis_resolution", "value_type": "int"},
|
||||
"JOYSTICK_BUTTON_COUNT": {"info_key": "joystick.button_count", "value_type": "int"},
|
||||
|
||||
// Leader Key
|
||||
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "flag"},
|
||||
"LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "flag"},
|
||||
@@ -171,7 +176,7 @@
|
||||
"SECURE_UNLOCK_TIMEOUT": {"info_key": "secure.unlock_timeout", "value_type": "int"},
|
||||
|
||||
// Split Keyboard
|
||||
"SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
|
||||
"SOFT_SERIAL_PIN": {"info_key": "split.serial.pin"},
|
||||
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
|
||||
"SPLIT_HAND_MATRIX_GRID": {"info_key": "split.handedness.matrix_grid", "value_type": "array", "to_c": false},
|
||||
"SPLIT_HAND_PIN": {"info_key": "split.handedness.pin"},
|
||||
|
@@ -25,6 +25,8 @@
|
||||
"ENCODER_DRIVER": {"info_key": "encoder.driver"},
|
||||
"FIRMWARE_FORMAT": {"info_key": "build.firmware_format"},
|
||||
"HAPTIC_DRIVER": {"info_key": "haptic.driver"},
|
||||
"JOYSTICK_DRIVER": {"info_key": "joystick.driver"},
|
||||
"JOYSTICK_ENABLE": {"info_key": "joystick.enabled", "value_type": "bool"},
|
||||
"KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"},
|
||||
"LAYOUTS": {"info_key": "community_layouts", "value_type": "list"},
|
||||
"LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"},
|
||||
@@ -41,6 +43,7 @@
|
||||
"RGB_MATRIX_DRIVER": {"info_key": "rgb_matrix.driver"},
|
||||
"RGBLIGHT_DRIVER": {"info_key": "rgblight.driver"},
|
||||
"SECURE_ENABLE": {"info_key": "secure.enabled", "value_type": "bool"},
|
||||
"SERIAL_DRIVER": {"info_key": "split.serial.driver"},
|
||||
"SPLIT_KEYBOARD": {"info_key": "split.enabled", "value_type": "bool"},
|
||||
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
|
||||
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
|
||||
|
@@ -1060,7 +1060,7 @@
|
||||
"target": "lyso1/lefishe"
|
||||
},
|
||||
"lets_split_eh/eh": {
|
||||
"target": "maple_computing/lets_split_eh/eh"
|
||||
"target": "maple_computing/lets_split_eh"
|
||||
},
|
||||
"ls_60": {
|
||||
"target": "weirdo/ls_60"
|
||||
@@ -1080,6 +1080,9 @@
|
||||
"macro1": {
|
||||
"target": "laneware/macro1"
|
||||
},
|
||||
"maple_computing/lets_split_eh/eh": {
|
||||
"target": "maple_computing/lets_split_eh"
|
||||
},
|
||||
"massdrop/thekey": {
|
||||
"target": "drop/thekey/v1"
|
||||
},
|
||||
@@ -1137,6 +1140,12 @@
|
||||
"mt980": {
|
||||
"target": "mt/mt980"
|
||||
},
|
||||
"mt/ncr80/hotswap": {
|
||||
"target": "mt/ncr80/r2/hotswap"
|
||||
},
|
||||
"mt/ncr80/solder": {
|
||||
"target": "mt/ncr80/r2/solder"
|
||||
},
|
||||
"nafuda": {
|
||||
"target": "salicylic_acid3/nafuda"
|
||||
},
|
||||
@@ -1525,5 +1534,8 @@
|
||||
},
|
||||
"kprepublic/jj50": {
|
||||
"target": "kprepublic/jj50/rev1"
|
||||
},
|
||||
"dnworks/9973": {
|
||||
"target": "dnworks/tkl87"
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,8 @@
|
||||
"pattern": "^[0-9a-z_/\\-]+\\.json$"
|
||||
},
|
||||
"key_unit": {
|
||||
"type": "number"
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"keyboard": {
|
||||
"type": "string",
|
||||
|
@@ -1 +0,0 @@
|
||||
false
|
@@ -342,6 +342,36 @@
|
||||
"on_state": {"$ref": "qmk.definitions.v1#/bit"}
|
||||
}
|
||||
},
|
||||
"joystick": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"driver": {"type": "string"},
|
||||
"button_count": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"axis_resolution": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"axes": {
|
||||
"type": "object",
|
||||
"propertyNames": {"enum": ["x", "y", "z", "rx", "ry", "rz"]}
|
||||
"additionalProperties": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"input_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"low": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"rest": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"high": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"enum": ["virtual"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycodes": {"$ref": "qmk.definitions.v1#/keycode_decl_array"},
|
||||
"layout_aliases": {
|
||||
"type": "object",
|
||||
@@ -515,8 +545,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
@@ -601,8 +631,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
@@ -793,12 +823,26 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"soft_serial_pin": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin",
|
||||
"$comment": "Deprecated: use split.serial.pin instead"
|
||||
},
|
||||
"soft_serial_speed": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 5
|
||||
},
|
||||
"serial": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["bitbang", "usart", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
}
|
||||
},
|
||||
"transport": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
|
@@ -1 +0,0 @@
|
||||
true
|
@@ -2,8 +2,6 @@
|
||||
"keyboard_name": "%KEYBOARD%",
|
||||
"maintainer": "%USER_NAME%",
|
||||
"manufacturer": "%REAL_NAME%",
|
||||
"processor": "%MCU%",
|
||||
"bootloader": "%BOOTLOADER%",
|
||||
"diode_direction": "COL2ROW",
|
||||
"matrix_pins": {
|
||||
"cols": ["C2"],
|
||||
|
@@ -10,11 +10,11 @@ It is also now possible to define combos that have keys overlapping with other c
|
||||
|
||||
### Key Overrides ([#11422](https://github.com/qmk/qmk_firmware/pull/11422)) {#key-overrides}
|
||||
|
||||
QMK now has a new feature: [key overrides](../feature_key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
|
||||
QMK now has a new feature: [key overrides](../features/key_overrides). This feature allows for overriding the output of key combinations involving modifiers. As an example, pressing <kbd>Shift+2</kbd> normally results in an <kbd>@</kbd> on US-ANSI keyboard layouts -- the new key overrides allow for adding similar functionality, but for any <kbd>modifier + key</kbd> press.
|
||||
|
||||
To illustrate, it's now possible to use the key overrides feature to translate <kbd>Shift + Backspace</kbd> into <kbd>Delete</kbd> -- an often-requested example of where this functionality comes in handy.
|
||||
|
||||
There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../feature_key_overrides) for more examples and info.
|
||||
There's far more to describe that what lives in this changelog, so head over to the [key overrides documentation](../features/key_overrides) for more examples and info.
|
||||
|
||||
### Digitizer support ([#12851](https://github.com/qmk/qmk_firmware/pull/12851))
|
||||
|
||||
|
@@ -31,7 +31,7 @@ QMK now has core-supplied support for the following pointing device peripherals:
|
||||
| `POINTING_DEVICE_DRIVER = pimoroni_trackball` | Pimoroni Trackball |
|
||||
| `POINTING_DEVICE_DRIVER = pmw3360` | PMW 3360 |
|
||||
|
||||
See the new documentation for the [Pointing Device](../feature_pointing_device) feature for more information on specific configuration for each driver.
|
||||
See the new documentation for the [Pointing Device](../features/pointing_device) feature for more information on specific configuration for each driver.
|
||||
|
||||
### Dynamic Tapping Term ([#11036](https://github.com/qmk/qmk_firmware/pull/11036)) {#dynamic-tapping-term}
|
||||
|
||||
@@ -116,7 +116,7 @@ Related to the previous section -- RGB Matrix modes have now been made to be opt
|
||||
|
||||
Most keyboards keep their original functionality, but over time the QMK maintainers have found that removal of animations ends up being the quickest way to free up space... and some keyboards have had animations such as reactive effects disabled by default in order to still fit within the flash space available.
|
||||
|
||||
The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../feature_rgb_matrix#rgb-matrix-effects) page.
|
||||
The full list of configurables to turn specific animations back on can be found at on the [RGB Matrix documentation](../features/rgb_matrix#rgb-matrix-effects) page.
|
||||
|
||||
### OLED task refactoring ([#14864](https://github.com/qmk/qmk_firmware/pull/14864)) {#oled-task-refactor}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ Something something *Lets go gamers!*
|
||||
|
||||
Pointing devices can now be shared across a split keyboard with support for a single pointing device or a pointing device on each side.
|
||||
|
||||
See the [Pointing Device](../feature_pointing_device) documentation for further configuration options.
|
||||
See the [Pointing Device](../features/pointing_device) documentation for further configuration options.
|
||||
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
|
@@ -8,7 +8,7 @@ This is a new feature that allows for capslock-like functionality that turns its
|
||||
|
||||
For instance, if you wish to type "QMK" without holding shift the entire time, you can either tap both left and right shift, or double-tap shift, to turn on _Caps Word_ -- then type `qmk` (lowercase) without holding shift. Once you hit any key other than `a`--`z`, `0`--`9`, `-`, `_`, delete, or backspace, this will go back to normal typing!
|
||||
|
||||
There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../feature_caps_word) for more information.
|
||||
There are other activation mechanisms as well as configurable options like timeout and the like -- see the [Caps Word documentation](../features/caps_word) for more information.
|
||||
|
||||
### Quantum Painter ([#10174](https://github.com/qmk/qmk_firmware/pull/10174)) {#quantum-painter}
|
||||
|
||||
@@ -26,7 +26,7 @@ Quantum Painter is not supported on AVR due to complexity and size constraints.
|
||||
|
||||
### Encoder Mapping ([#13286](https://github.com/qmk/qmk_firmware/pull/13286)) {#encoder-mapping}
|
||||
|
||||
One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../feature_encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap.
|
||||
One of the long-standing complaints with Encoders is that there has been no easy way to configure them in user keymaps. [#13286](https://github.com/qmk/qmk_firmware/pull/13286) added support for [Encoder Mapping](../features/encoders#encoder-map), which allows users to define encoder functionality in a similar way to their normal keymap.
|
||||
|
||||
::: warning
|
||||
This is not yet supported by QMK Configurator. It is also unlikely to ever be supported by VIA.
|
||||
|
@@ -83,7 +83,7 @@ The now-EOL kbfirmware allowed people who aren't set up with QMK the ability to
|
||||
|
||||
QMK has had the ability to write to internal MCU flash in order to emulate EEPROM for some time now, but it was only limited to a small number of MCUs. The base HAL used by QMK for a large number of ARM devices provides a "proper" embedded MCU flash driver, so _@tzarc_ decoupled the wear-leveling algorithm from the old flash writing code, improved it, wrote some tests, and enabled its use for a much larger number of other devices... including RP2040's XIP flash, and external SPI NOR Flash.
|
||||
|
||||
See the [EEPROM Driver](../eeprom_driver) documentation for more information.
|
||||
See the [EEPROM Driver](../drivers/eeprom) documentation for more information.
|
||||
|
||||
### Pointing Device Improvements ([#16371](https://github.com/qmk/qmk_firmware/pull/16371), [#17111](https://github.com/qmk/qmk_firmware/pull/17111), [#17176](https://github.com/qmk/qmk_firmware/pull/17176), [#17482](https://github.com/qmk/qmk_firmware/pull/17482), [#17776](https://github.com/qmk/qmk_firmware/pull/17776), [#17613](https://github.com/qmk/qmk_firmware/pull/17613)) {#pointing-device-improvements}
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
### Autocorrect ([#15699](https://github.com/qmk/qmk_firmware/pull/15699)) {#autocorrect}
|
||||
|
||||
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../feature_autocorrect) for more ifnormation (grin).
|
||||
_@getreuer_ in their infinite wisdom decided that autocorrect was a feature needed by QMK. As is customary, _@drashna_ adapted it to core and got it into a state that everyone else can use it. See [Feature: Autocorrect](../features/autocorrect) for more ifnormation (grin).
|
||||
|
||||
## Changes Requiring User Action {#changes-requiring-user-action}
|
||||
|
||||
@@ -132,7 +132,7 @@ The equivalent transformations should be done for LED Matrix boards.
|
||||
|
||||
### Unicode mode refactoring {#unicode-mode-renaming}
|
||||
|
||||
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../feature_unicode#setting-the-input-mode) for the new list of values and how to configure them.
|
||||
Unicode modes were renamed in order to prevent collision with equivalent keycodes. The available values for `UNICODE_SELECTED_MODES` changed -- see [Feature: Unicode](../features/unicode#setting-the-input-mode) for the new list of values and how to configure them.
|
||||
|
||||
## Notable core changes {#notable-core}
|
||||
|
||||
|
@@ -106,7 +106,7 @@ void leader_end_user(void) {
|
||||
}
|
||||
```
|
||||
|
||||
For more information please see the [Leader Key documentation](../feature_leader_key).
|
||||
For more information please see the [Leader Key documentation](../features/leader_key).
|
||||
|
||||
### Updated Keyboard Codebases {#updated-keyboard-codebases}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ Of note for keyboard designers:
|
||||
|
||||
A new pair of keys has been added to QMK -- namely `QK_REPEAT_KEY` and `QK_ALT_REPEAT_KEY` (shortened: `QK_REP`/`QK_AREP`). These allow you to repeat the last key pressed, or in the case of the alternate key, press the "opposite" of the last key. For example, if you press `KC_LEFT`, pressing `QK_REPEAT_KEY` afterwards repeats `KC_LEFT`, but pressing `QK_ALT_REPEAT_KEY` instead sends `KC_RIGHT`.
|
||||
|
||||
The full list of default alternate keys is available on the [Repeat Key](../feature_repeat_key) documentation.
|
||||
The full list of default alternate keys is available on the [Repeat Key](../features/repeat_key) documentation.
|
||||
|
||||
To enable these keys, in your keymap's `rules.mk`, add:
|
||||
|
||||
@@ -93,7 +93,7 @@ Additionally, this ensures that builds on QMK Configurator produce some sort of
|
||||
|
||||
The "classic" OLED driver picked up support for additional sizes of OLED displays, support for the SH1107 controller, and SPI-based OLED support.
|
||||
|
||||
Other configurable items are available and can be found on the [OLED Driver page](../feature_oled_driver).
|
||||
Other configurable items are available and can be found on the [OLED Driver page](../features/oled_driver).
|
||||
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
|
@@ -42,7 +42,7 @@ AVR sees minimal (if any) benefit -- `double` was interpreted as `float` on AVR
|
||||
|
||||
### Remove encoder in-matrix workaround code ([#20389](https://github.com/qmk/qmk_firmware/pull/20389)) {#remove-encoder-in-matrix-workaround-code}
|
||||
|
||||
Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../feature_encoders#encoder-map) API instead.
|
||||
Some keyboards "hacked" encoder support into spare slots in the key matrix in order to interoperate with VIA. This workaround is no longer necessary, and the code has been removed. If you have a keyboard that uses this workaround, you will need to update your keymap to use the new [Encoder Map](../features/encoders#encoder-map) API instead.
|
||||
|
||||
### Unicodemap keycodes rename ([#21092](https://github.com/qmk/qmk_firmware/pull/21092)) {#unicodemap-keycodes-rename}
|
||||
|
||||
|
@@ -120,7 +120,7 @@ In some cases, accidental automatic activation of the mouse layer made it diffic
|
||||
|
||||
### DIP Switch Mapping ([#22543](https://github.com/qmk/qmk_firmware/pull/22543)) {#dip-switch-map}
|
||||
|
||||
Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../feature_dip_switch#dip-switch-map) for more information.
|
||||
Much like Encoder Mapping, DIP Switch Mapping allows for specifying a table of actions to execute when a DIP switch state changes. See the [DIP Switch Documentation](../features/dip_switch#dip-switch-map) for more information.
|
||||
|
||||
```c
|
||||
#if defined(DIP_SWITCH_MAP_ENABLE)
|
||||
|
@@ -109,6 +109,16 @@ Essentially, changes were made in the internals of how QMK interacts with USB fo
|
||||
|
||||
Compliance checks were run against QMK firmwares for the most popular ARM microcontrollers, as well as suspend/resume tests. As far as we can tell, a whole host of hard-to-reproduce issues are mitigated by this change.
|
||||
|
||||
## Deprecation Notices
|
||||
|
||||
In line with the [notice period](../support_deprecation_policy#how-much-advance-notice-will-be-given), deprecation notices for larger items are listed here.
|
||||
|
||||
### Migration of VIA keymaps to VIA team control
|
||||
|
||||
The QMK team has been in discussion with the VIA maintainers and all VIA-related keymaps in the `qmk_firmware` repository will transition to a `qmk_userspace`-style repository under the VIA team's control at the end of the next breaking changes period. This allows the VIA team to support many more custom keyboard configurations, as well as reduces the turnaround time for any changes to the VIA protocol they wish to make.
|
||||
|
||||
At the end of the breaking changes cycle ending 2024-08-25, VIA-enabled keymaps will no longer be accepted into the QMK repository. At the time of migration, any open PRs against `qmk_firmware` which include new VIA-related keymaps will be subsequently be asked to remove those keymaps and instead raise a PR against the userspace repository containing all VIA keymaps.
|
||||
|
||||
## Full changelist {#full-changelist}
|
||||
|
||||
Core:
|
||||
|
19
docs/ChangeLog/20240825/PR24120.md
Normal file
19
docs/ChangeLog/20240825/PR24120.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## Changes requiring user action
|
||||
|
||||
### Key Override Introspection
|
||||
|
||||
Changes were made to key overrides in order to hook them into the keymap introspection system.
|
||||
|
||||
Key override signature changed from:
|
||||
|
||||
```c
|
||||
const key_override_t **key_overrides = (const key_override_t *[]){
|
||||
```
|
||||
|
||||
to:
|
||||
|
||||
```c
|
||||
const key_override_t *key_overrides[] = {
|
||||
```
|
||||
|
||||
The list of key overrides now does not need to be `NULL`-terminated.
|
19
docs/ChangeLog/20240825/PR24192.md
Normal file
19
docs/ChangeLog/20240825/PR24192.md
Normal file
@@ -0,0 +1,19 @@
|
||||
## Changes requiring user action
|
||||
|
||||
### SparkFun Pro Micro RP2040 converter renamed
|
||||
|
||||
The converter for the SparkFun Pro Micro RP2040 has been renamed.
|
||||
|
||||
from:
|
||||
|
||||
```
|
||||
promicro_rp2040
|
||||
```
|
||||
|
||||
to:
|
||||
|
||||
```c
|
||||
sparkfun_rp2040
|
||||
```
|
||||
|
||||
This change was made to avoid confusion between the clones named ProMicro RP2040 and the SparkFun Pro Micro RP2040. The clones should be using the `rp2040_ce` option.
|
@@ -41,7 +41,7 @@ Unrelated to styling, high-level tech.
|
||||

|
||||

|
||||
|
||||
<img src="./gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
<img src="./public/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
### Lists
|
||||
|
||||
@@ -84,7 +84,7 @@ Nested mixed:
|
||||
* `lib/python/qmk/cli/generate/config_h.py`
|
||||
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||
|
||||
### Emoji :id=emoji
|
||||
### Emoji {#emoji}
|
||||
|
||||
#### Direct:
|
||||
|
||||
|
75
docs/_aliases.json
Normal file
75
docs/_aliases.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"/adding_a_keyboard_to_qmk": "/hardware_keyboard_guidelines",
|
||||
"/build_environment_setup": "/newbs_getting_started",
|
||||
"/cli_dev_configuration": "/cli_configuration",
|
||||
"/dynamic_macros": "/feature_dynamic_macros",
|
||||
"/feature_common_shortcuts": "/feature_advanced_keycodes",
|
||||
"/flashing_bootloadhid": "/flashing",
|
||||
"/getting_started_build_tools": "/newbs_getting_started",
|
||||
"/getting_started_getting_help": "/support",
|
||||
"/glossary": "/reference_glossary",
|
||||
"/key_lock": "/feature_key_lock",
|
||||
"/make_instructions": "/getting_started_make_guide",
|
||||
"/python_development": "/cli_development",
|
||||
"/space_cadet_shift": "/feature_space_cadet_shift",
|
||||
"/tap_dance": "/feature_tap_dance",
|
||||
"/tutorial": "/newbs",
|
||||
"/unicode": "/feature_unicode",
|
||||
|
||||
"/adc_driver": "/drivers/adc",
|
||||
"/apa102_driver": "/drivers/apa102",
|
||||
"/audio_driver": "/drivers/audio",
|
||||
"/eeprom_driver": "/drivers/eeprom",
|
||||
"/feature_audio": "/features/audio",
|
||||
"/feature_auto_shift": "/features/auto_shift",
|
||||
"/feature_autocorrect": "/features/autocorrect",
|
||||
"/feature_backlight": "/features/backlight",
|
||||
"/feature_bluetooth": "/features/bluetooth",
|
||||
"/feature_bootmagic": "/features/bootmagic",
|
||||
"/feature_caps_word": "/features/caps_word",
|
||||
"/feature_combo": "/features/combo",
|
||||
"/feature_command": "/features/command",
|
||||
"/feature_digitizer": "/features/digitizer",
|
||||
"/feature_dip_switch": "/features/dip_switch",
|
||||
"/feature_dynamic_macros": "/features/dynamic_macros",
|
||||
"/feature_encoders": "/features/encoders",
|
||||
"/feature_grave_esc": "/features/grave_esc",
|
||||
"/feature_haptic_feedback": "/features/haptic_feedback",
|
||||
"/feature_hd44780": "/features/hd44780",
|
||||
"/feature_joystick": "/features/joystick",
|
||||
"/feature_key_lock": "/features/key_lock",
|
||||
"/feature_key_overrides": "/features/key_overrides",
|
||||
"/feature_leader_key": "/features/leader_key",
|
||||
"/feature_led_indicators": "/features/led_indicators",
|
||||
"/feature_led_matrix": "/features/led_matrix",
|
||||
"/feature_midi": "/features/midi",
|
||||
"/feature_mouse_keys": "/features/mouse_keys",
|
||||
"/feature_oled_driver": "/features/oled_driver",
|
||||
"/feature_os_detection": "/features/os_detection",
|
||||
"/feature_pointing_device": "/features/pointing_device",
|
||||
"/feature_programmable_button": "/features/programmable_button",
|
||||
"/feature_ps2_mouse": "/features/ps2_mouse",
|
||||
"/feature_rawhid": "/features/rawhid",
|
||||
"/feature_repeat_key": "/features/repeat_key",
|
||||
"/feature_rgb_matrix": "/features/rgb_matrix",
|
||||
"/feature_rgblight": "/features/rgblight",
|
||||
"/feature_secure": "/features/secure",
|
||||
"/feature_send_string": "/features/send_string",
|
||||
"/feature_sequencer": "/features/sequencer",
|
||||
"/feature_space_cadet": "/features/space_cadet",
|
||||
"/feature_split_keyboard": "/features/split_keyboard",
|
||||
"/feature_st7565": "/features/st7565",
|
||||
"/feature_stenography": "/features/stenography",
|
||||
"/feature_swap_hands": "/features/swap_hands",
|
||||
"/feature_tap_dance": "/features/tap_dance",
|
||||
"/feature_tri_layer": "/features/tri_layer",
|
||||
"/feature_unicode": "/features/unicode",
|
||||
"/feature_wpm": "/features/wpm",
|
||||
"/flash_driver": "/drivers/flash",
|
||||
"/gpio_control": "/drivers/gpio",
|
||||
"/i2c_driver": "/drivers/i2c",
|
||||
"/serial_driver": "/drivers/serial",
|
||||
"/spi_driver": "/drivers/spi",
|
||||
"/uart_driver": "/drivers/uart",
|
||||
"/ws2812_driver": "/drivers/ws2812"
|
||||
}
|
@@ -64,13 +64,7 @@
|
||||
"text": "Development Environments",
|
||||
"items": [{ "text": "Docker Guide", "link": "/getting_started_docker" }]
|
||||
},
|
||||
{
|
||||
"text": "Flashing",
|
||||
"items": [
|
||||
{ "text": "Flashing", "link": "/flashing" },
|
||||
{ "text": "Flashing ATmega32A (ps2avrgb)", "link": "/flashing_bootloadhid" }
|
||||
]
|
||||
},
|
||||
{ "text": "Flashing", "link": "/flashing" },
|
||||
{
|
||||
"text": "IDEs",
|
||||
"items": [
|
||||
@@ -103,45 +97,45 @@
|
||||
{
|
||||
"text": "Advanced Keycodes",
|
||||
"items": [
|
||||
{ "text": "Command", "link": "/feature_command" },
|
||||
{ "text": "Dynamic Macros", "link": "/feature_dynamic_macros" },
|
||||
{ "text": "Grave Escape", "link": "/feature_grave_esc" },
|
||||
{ "text": "Leader Key", "link": "/feature_leader_key" },
|
||||
{ "text": "Command", "link": "/features/command" },
|
||||
{ "text": "Dynamic Macros", "link": "/features/dynamic_macros" },
|
||||
{ "text": "Grave Escape", "link": "/features/grave_esc" },
|
||||
{ "text": "Leader Key", "link": "/features/leader_key" },
|
||||
{ "text": "Mod-Tap", "link": "/mod_tap" },
|
||||
{ "text": "Macros", "link": "/feature_macros" },
|
||||
{ "text": "Mouse Keys", "link": "/feature_mouse_keys" },
|
||||
{ "text": "Programmable Button", "link": "/feature_programmable_button" },
|
||||
{ "text": "Repeat Key", "link": "/feature_repeat_key" },
|
||||
{ "text": "Space Cadet Shift", "link": "/feature_space_cadet" },
|
||||
{ "text": "Mouse Keys", "link": "/features/mouse_keys" },
|
||||
{ "text": "Programmable Button", "link": "/features/programmable_button" },
|
||||
{ "text": "Repeat Key", "link": "/features/repeat_key" },
|
||||
{ "text": "Space Cadet Shift", "link": "/features/space_cadet" },
|
||||
{ "text": "US ANSI Shifted Keys", "link": "/keycodes_us_ansi_shifted" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Software Features",
|
||||
"items": [
|
||||
{ "text": "Auto Shift", "link": "/feature_auto_shift" },
|
||||
{ "text": "Autocorrect", "link": "/feature_autocorrect" },
|
||||
{ "text": "Caps Word", "link": "/feature_caps_word" },
|
||||
{ "text": "Combos", "link": "/feature_combo" },
|
||||
{ "text": "Auto Shift", "link": "/features/auto_shift" },
|
||||
{ "text": "Autocorrect", "link": "/features/autocorrect" },
|
||||
{ "text": "Caps Word", "link": "/features/caps_word" },
|
||||
{ "text": "Combos", "link": "/features/combo" },
|
||||
{ "text": "Debounce API", "link": "/feature_debounce_type" },
|
||||
{ "text": "Digitizer", "link": "/feature_digitizer" },
|
||||
{ "text": "Digitizer", "link": "/features/digitizer" },
|
||||
{ "text": "EEPROM", "link": "/feature_eeprom" },
|
||||
{ "text": "Key Lock", "link": "/feature_key_lock" },
|
||||
{ "text": "Key Overrides", "link": "/feature_key_overrides" },
|
||||
{ "text": "Key Lock", "link": "/features/key_lock" },
|
||||
{ "text": "Key Overrides", "link": "/features/key_overrides" },
|
||||
{ "text": "Layers", "link": "/feature_layers" },
|
||||
{ "text": "One Shot Keys", "link": "/one_shot_keys" },
|
||||
{ "text": "OS Detection", "link": "/feature_os_detection" },
|
||||
{ "text": "Raw HID", "link": "/feature_rawhid" },
|
||||
{ "text": "Secure", "link": "/feature_secure" },
|
||||
{ "text": "Send String", "link": "/feature_send_string" },
|
||||
{ "text": "Sequencer", "link": "/feature_sequencer" },
|
||||
{ "text": "Swap Hands", "link": "/feature_swap_hands" },
|
||||
{ "text": "Tap Dance", "link": "/feature_tap_dance" },
|
||||
{ "text": "OS Detection", "link": "/features/os_detection" },
|
||||
{ "text": "Raw HID", "link": "/features/rawhid" },
|
||||
{ "text": "Secure", "link": "/features/secure" },
|
||||
{ "text": "Send String", "link": "/features/send_string" },
|
||||
{ "text": "Sequencer", "link": "/features/sequencer" },
|
||||
{ "text": "Swap Hands", "link": "/features/swap_hands" },
|
||||
{ "text": "Tap Dance", "link": "/features/tap_dance" },
|
||||
{ "text": "Tap-Hold Configuration", "link": "/tap_hold" },
|
||||
{ "text": "Tri Layer", "link": "/feature_tri_layer" },
|
||||
{ "text": "Unicode", "link": "/feature_unicode" },
|
||||
{ "text": "Tri Layer", "link": "/features/tri_layer" },
|
||||
{ "text": "Unicode", "link": "/features/unicode" },
|
||||
{ "text": "Userspace", "link": "/feature_userspace" },
|
||||
{ "text": "WPM Calculation", "link": "/feature_wpm" }
|
||||
{ "text": "WPM Calculation", "link": "/features/wpm" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -157,35 +151,35 @@
|
||||
{ "text": "Quantum Painter LVGL Integration", "link": "/quantum_painter_lvgl" }
|
||||
]
|
||||
},
|
||||
{ "text": "HD44780 LCD Driver", "link": "/feature_hd44780" },
|
||||
{ "text": "ST7565 LCD Driver", "link": "/feature_st7565" },
|
||||
{ "text": "OLED Driver", "link": "/feature_oled_driver" }
|
||||
{ "text": "HD44780 LCD Driver", "link": "/features/hd44780" },
|
||||
{ "text": "ST7565 LCD Driver", "link": "/features/st7565" },
|
||||
{ "text": "OLED Driver", "link": "/features/oled_driver" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"text": "Lighting",
|
||||
"items": [
|
||||
{ "text": "Backlight", "link": "/feature_backlight" },
|
||||
{ "text": "LED Matrix", "link": "/feature_led_matrix" },
|
||||
{ "text": "RGB Lighting", "link": "/feature_rgblight" },
|
||||
{ "text": "RGB Matrix", "link": "/feature_rgb_matrix" }
|
||||
{ "text": "Backlight", "link": "/features/backlight" },
|
||||
{ "text": "LED Matrix", "link": "/features/led_matrix" },
|
||||
{ "text": "RGB Lighting", "link": "/features/rgblight" },
|
||||
{ "text": "RGB Matrix", "link": "/features/rgb_matrix" }
|
||||
]
|
||||
},
|
||||
{ "text": "Audio", "link": "/feature_audio" },
|
||||
{ "text": "Bluetooth", "link": "/feature_bluetooth" },
|
||||
{ "text": "Bootmagic Lite", "link": "/feature_bootmagic" },
|
||||
{ "text": "Audio", "link": "/features/audio" },
|
||||
{ "text": "Bluetooth", "link": "/features/bluetooth" },
|
||||
{ "text": "Bootmagic Lite", "link": "/features/bootmagic" },
|
||||
{ "text": "Converters", "link": "/feature_converters" },
|
||||
{ "text": "Custom Matrix", "link": "/custom_matrix" },
|
||||
{ "text": "DIP Switch", "link": "/feature_dip_switch" },
|
||||
{ "text": "Encoders", "link": "/feature_encoders" },
|
||||
{ "text": "Haptic Feedback", "link": "/feature_haptic_feedback" },
|
||||
{ "text": "Joystick", "link": "/feature_joystick" },
|
||||
{ "text": "LED Indicators", "link": "/feature_led_indicators" },
|
||||
{ "text": "MIDI", "link": "/feature_midi" },
|
||||
{ "text": "Pointing Device", "link": "/feature_pointing_device" },
|
||||
{ "text": "PS/2 Mouse", "link": "/feature_ps2_mouse" },
|
||||
{ "text": "Split Keyboard", "link": "/feature_split_keyboard" },
|
||||
{ "text": "Stenography", "link": "/feature_stenography" }
|
||||
{ "text": "DIP Switch", "link": "/features/dip_switch" },
|
||||
{ "text": "Encoders", "link": "/features/encoders" },
|
||||
{ "text": "Haptic Feedback", "link": "/features/haptic_feedback" },
|
||||
{ "text": "Joystick", "link": "/features/joystick" },
|
||||
{ "text": "LED Indicators", "link": "/features/led_indicators" },
|
||||
{ "text": "MIDI", "link": "/features/midi" },
|
||||
{ "text": "Pointing Device", "link": "/features/pointing_device" },
|
||||
{ "text": "PS/2 Mouse", "link": "/features/ps2_mouse" },
|
||||
{ "text": "Split Keyboard", "link": "/features/split_keyboard" },
|
||||
{ "text": "Stenography", "link": "/features/stenography" }
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -212,7 +206,8 @@
|
||||
"text": "Most Recent ChangeLog",
|
||||
"link": "/ChangeLog/20240526"
|
||||
},
|
||||
{ "text": "Past Breaking Changes", "link": "/breaking_changes_history" }
|
||||
{ "text": "Past Breaking Changes", "link": "/breaking_changes_history" },
|
||||
{ "text": "Deprecation Policy", "link": "/support_deprecation_policy" }
|
||||
]
|
||||
},
|
||||
|
||||
@@ -226,19 +221,19 @@
|
||||
"text": "Drivers",
|
||||
"link": "hardware_drivers",
|
||||
"items": [
|
||||
{ "text": "ADC Driver", "link": "/adc_driver" },
|
||||
{ "text": "APA102 Driver", "link": "/apa102_driver" },
|
||||
{ "text": "Audio Driver", "link": "/audio_driver" },
|
||||
{ "text": "I2C Driver", "link": "/i2c_driver" },
|
||||
{ "text": "SPI Driver", "link": "/spi_driver" },
|
||||
{ "text": "WS2812 Driver", "link": "/ws2812_driver" },
|
||||
{ "text": "EEPROM Driver", "link": "/eeprom_driver" },
|
||||
{ "text": "Flash Driver", "link": "/flash_driver" },
|
||||
{ "text": "'serial' Driver", "link": "/serial_driver" },
|
||||
{ "text": "UART Driver", "link": "/uart_driver" }
|
||||
{ "text": "ADC Driver", "link": "/drivers/adc" },
|
||||
{ "text": "APA102 Driver", "link": "/drivers/apa102" },
|
||||
{ "text": "Audio Driver", "link": "/drivers/audio" },
|
||||
{ "text": "EEPROM Driver", "link": "/drivers/eeprom" },
|
||||
{ "text": "Flash Driver", "link": "/drivers/flash" },
|
||||
{ "text": "I2C Driver", "link": "/drivers/i2c" },
|
||||
{ "text": "'serial' Driver", "link": "/drivers/serial" },
|
||||
{ "text": "SPI Driver", "link": "/drivers/spi" },
|
||||
{ "text": "UART Driver", "link": "/drivers/uart" },
|
||||
{ "text": "WS2812 Driver", "link": "/drivers/ws2812" }
|
||||
]
|
||||
},
|
||||
{ "text": "GPIO Controls", "link": "/gpio_control" },
|
||||
{ "text": "GPIO Controls", "link": "/drivers/gpio" },
|
||||
{ "text": "Keyboard Guidelines", "link": "/hardware_keyboard_guidelines" }
|
||||
]
|
||||
},
|
||||
|
@@ -1,49 +0,0 @@
|
||||
# APA102 Driver {#apa102-driver}
|
||||
|
||||
This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812_driver) LEDs, but have increased data and refresh rates.
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
APA102_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
You can then call the APA102 API by including `apa102.h` in your code.
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------------|-------------|------------------------------------------------------------------|
|
||||
|`APA102_DI_PIN` |*Not defined*|The GPIO pin connected to the DI pin of the first LED in the chain|
|
||||
|`APA102_CI_PIN` |*Not defined*|The GPIO pin connected to the CI pin of the first LED in the chain|
|
||||
|`APA102_DEFAULT_BRIGHTNESS`|`31` |The default global brightness level of the LEDs, from 0 to 31 |
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds)`
|
||||
|
||||
Send RGB data to the APA102 LED chain.
|
||||
|
||||
#### Arguments {#api-apa102-setleds-arguments}
|
||||
|
||||
- `rgb_led_t *start_led`
|
||||
A pointer to the LED array.
|
||||
- `uint16_t num_leds`
|
||||
The length of the LED array.
|
||||
|
||||
---
|
||||
|
||||
### `void apa102_set_brightness(uint8_t brightness)`
|
||||
|
||||
Set the global brightness.
|
||||
|
||||
#### Arguments {#api-apa102-set-brightness-arguments}
|
||||
|
||||
- `uint8_t brightness`
|
||||
The brightness level to set, from 0 to 31.
|
@@ -254,15 +254,21 @@ qmk doctor [-y] [-n]
|
||||
|
||||
Check your environment for problems and prompt to fix them:
|
||||
|
||||
qmk doctor
|
||||
```
|
||||
qmk doctor
|
||||
```
|
||||
|
||||
Check your environment and automatically fix any problems found:
|
||||
|
||||
qmk doctor -y
|
||||
```
|
||||
qmk doctor -y
|
||||
```
|
||||
|
||||
Check your environment and report problems only:
|
||||
|
||||
qmk doctor -n
|
||||
```
|
||||
qmk doctor -n
|
||||
```
|
||||
|
||||
## `qmk format-json`
|
||||
|
||||
@@ -290,15 +296,21 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
|
||||
Show basic information for a keyboard:
|
||||
|
||||
qmk info -kb planck/rev5
|
||||
```
|
||||
qmk info -kb planck/rev5
|
||||
```
|
||||
|
||||
Show the matrix for a keyboard:
|
||||
|
||||
qmk info -kb ergodox_ez -m
|
||||
```
|
||||
qmk info -kb ergodox_ez -m
|
||||
```
|
||||
|
||||
Show a JSON keymap for a keyboard:
|
||||
|
||||
qmk info -kb clueboard/california -km default
|
||||
```
|
||||
qmk info -kb clueboard/california -km default
|
||||
```
|
||||
|
||||
## `qmk json2c`
|
||||
|
||||
@@ -350,7 +362,9 @@ This command is directory aware. It will automatically fill in KEYBOARD and/or K
|
||||
|
||||
Do a basic lint check:
|
||||
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
```
|
||||
qmk lint -kb rominronin/katana60/rev2
|
||||
```
|
||||
|
||||
## `qmk list-keyboards`
|
||||
|
||||
@@ -735,7 +749,7 @@ options:
|
||||
|
||||
## `qmk generate-rgb-breathe-table`
|
||||
|
||||
This command generates a lookup table (LUT) header file for the [RGB Lighting](feature_rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
|
||||
This command generates a lookup table (LUT) header file for the [RGB Lighting](features/rgblight) feature's breathing animation. Place this file in your keyboard or keymap directory as `rgblight_breathe_table.h` to override the default LUT in `quantum/rgblight/`.
|
||||
|
||||
**Usage**:
|
||||
|
||||
@@ -789,16 +803,22 @@ qmk pytest [-t TEST]
|
||||
|
||||
Run entire test suite:
|
||||
|
||||
qmk pytest
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
Run test group:
|
||||
|
||||
qmk pytest -t qmk.tests.test_cli_commands
|
||||
```
|
||||
qmk pytest -t qmk.tests.test_cli_commands
|
||||
```
|
||||
|
||||
Run single test:
|
||||
|
||||
qmk pytest -t qmk.tests.test_cli_commands.test_c2json
|
||||
qmk pytest -t qmk.tests.test_qmk_path
|
||||
```
|
||||
qmk pytest -t qmk.tests.test_cli_commands.test_c2json
|
||||
qmk pytest -t qmk.tests.test_qmk_path
|
||||
```
|
||||
|
||||
## `qmk painter-convert-graphics`
|
||||
|
||||
@@ -835,16 +855,24 @@ options:
|
||||
|
||||
Run entire test suite:
|
||||
|
||||
qmk test-c
|
||||
```
|
||||
qmk test-c
|
||||
```
|
||||
|
||||
List available tests:
|
||||
|
||||
qmk test-c --list
|
||||
```
|
||||
qmk test-c --list
|
||||
```
|
||||
|
||||
Run matching test:
|
||||
|
||||
qmk test-c --test unicode*
|
||||
```
|
||||
qmk test-c --test unicode*
|
||||
```
|
||||
|
||||
Run single test:
|
||||
|
||||
qmk test-c --test basic
|
||||
```
|
||||
qmk test-c --test basic
|
||||
```
|
||||
|
@@ -43,7 +43,9 @@ user.keymap: None -> default
|
||||
|
||||
The `qmk config` command is used to interact with the underlying configuration. When run with no argument it shows the current configuration. When arguments are supplied they are assumed to be configuration tokens, which are strings containing no spaces with the following form:
|
||||
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
```
|
||||
<subcommand|general|default>[.<key>][=<value>]
|
||||
```
|
||||
|
||||
## Setting Configuration Values
|
||||
|
||||
@@ -63,19 +65,27 @@ You can read configuration values for the entire configuration, a single key, or
|
||||
|
||||
### Entire Configuration Example
|
||||
|
||||
qmk config
|
||||
```
|
||||
qmk config
|
||||
```
|
||||
|
||||
### Whole Section Example
|
||||
|
||||
qmk config compile
|
||||
```
|
||||
qmk config compile
|
||||
```
|
||||
|
||||
### Single Key Example
|
||||
|
||||
qmk config compile.keyboard
|
||||
```
|
||||
qmk config compile.keyboard
|
||||
```
|
||||
|
||||
### Multiple Keys Example
|
||||
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
```
|
||||
qmk config user compile.keyboard compile.keymap
|
||||
```
|
||||
|
||||
## Deleting Configuration Values
|
||||
|
||||
|
@@ -192,18 +192,22 @@ We use nose2, flake8, and yapf to test, lint, and format code. You can use the `
|
||||
|
||||
### Testing and Linting
|
||||
|
||||
qmk pytest
|
||||
```
|
||||
qmk pytest
|
||||
```
|
||||
|
||||
### Formatting
|
||||
|
||||
qmk format-python
|
||||
```
|
||||
qmk format-python
|
||||
```
|
||||
|
||||
## Formatting Details
|
||||
|
||||
We use [yapf](https://github.com/google/yapf) to automatically format code. Our configuration is in the `[yapf]` section of `setup.cfg`.
|
||||
|
||||
::: tip
|
||||
Tip- Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
Many editors can use yapf as a plugin to automatically format code as you type.
|
||||
:::
|
||||
|
||||
## Testing Details
|
||||
@@ -212,7 +216,9 @@ Our tests can be found in `lib/python/qmk/tests/`. You will find both unit and i
|
||||
|
||||
If your PR does not include a comprehensive set of tests please add comments like this to your code so that other people know where they can help:
|
||||
|
||||
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||
```python
|
||||
# TODO(unassigned/<your_github_username>): Write <unit|integration> tests
|
||||
```
|
||||
|
||||
We use [nose2](https://nose2.readthedocs.io/en/latest/getting_started.html) to run our tests. You can refer to the nose2 documentation for more details on what you can do in your test functions.
|
||||
|
||||
|
@@ -10,22 +10,30 @@ There are several ways you can setup tab completion.
|
||||
|
||||
Add this to the end of your `.profile` or `.bashrc`:
|
||||
|
||||
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||
```
|
||||
source ~/qmk_firmware/util/qmk_tab_complete.sh
|
||||
```
|
||||
|
||||
If you put `qmk_firmware` into another location you will need to adjust this path.
|
||||
|
||||
Zsh users will need to load `bashcompinit`. The following can be added to `~/.zshrc` file:
|
||||
|
||||
autoload -Uz bashcompinit && bashcompinit
|
||||
```
|
||||
autoload -Uz bashcompinit && bashcompinit
|
||||
```
|
||||
|
||||
### System Wide Symlink
|
||||
|
||||
If you want the tab completion available to all users of the system you can add a symlink to the `qmk_tab_complete.sh` script:
|
||||
|
||||
ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
|
||||
```
|
||||
ln -s ~/qmk_firmware/util/qmk_tab_complete.sh /etc/profile.d/qmk_tab_complete.sh
|
||||
```
|
||||
|
||||
### System Wide Copy
|
||||
|
||||
In some cases a symlink may not work. Instead you can copy the file directly into place. Be aware that updates to the tab complete script may happen from time to time, you will want to recopy the file periodically.
|
||||
|
||||
cp util/qmk_tab_complete.sh /etc/profile.d
|
||||
```
|
||||
cp util/qmk_tab_complete.sh /etc/profile.d
|
||||
```
|
||||
|
@@ -207,7 +207,7 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define TAP_HOLD_CAPS_DELAY 80`
|
||||
* Sets the delay for Tap Hold keys (`LT`, `MT`) when using `KC_CAPS_LOCK` keycode, as this has some special handling on MacOS. The value is in milliseconds, and defaults to 80 ms if not defined. For macOS, you may want to set this to 200 or higher.
|
||||
* `#define KEY_OVERRIDE_REPEAT_DELAY 500`
|
||||
* Sets the key repeat interval for [key overrides](feature_key_overrides).
|
||||
* Sets the key repeat interval for [key overrides](features/key_overrides).
|
||||
* `#define LEGACY_MAGIC_HANDLING`
|
||||
* Enables magic configuration handling for advanced keycodes (such as Mod Tap and Layer Tap)
|
||||
|
||||
@@ -217,14 +217,14 @@ If you define these options you will enable the associated feature, which may in
|
||||
* `#define WS2812_DI_PIN D7`
|
||||
* pin the DI on the WS2812 is hooked-up to
|
||||
* `#define RGBLIGHT_LAYERS`
|
||||
* Lets you define [lighting layers](feature_rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||
* Lets you define [lighting layers](features/rgblight#lighting-layers) that can be toggled on or off. Great for showing the current keyboard layer or caps lock state.
|
||||
* `#define RGBLIGHT_MAX_LAYERS`
|
||||
* Defaults to 8. Can be expanded up to 32 if more [lighting layers](feature_rgblight#lighting-layers) are needed.
|
||||
* Defaults to 8. Can be expanded up to 32 if more [lighting layers](features/rgblight#lighting-layers) are needed.
|
||||
* Note: Increasing the maximum will increase the firmware size and slow sync on split keyboards.
|
||||
* `#define RGBLIGHT_LAYER_BLINK`
|
||||
* Adds ability to [blink](feature_rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* Adds ability to [blink](features/rgblight#lighting-layer-blink) a lighting layer for a specified number of milliseconds (e.g. to acknowledge an action).
|
||||
* `#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF`
|
||||
* If defined, then [lighting layers](feature_rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* If defined, then [lighting layers](features/rgblight#overriding-rgb-lighting-onoff-status) will be shown even if RGB Light is off.
|
||||
* `#define RGBLIGHT_LED_COUNT 12`
|
||||
* number of LEDs
|
||||
* `#define RGBLIGHT_SPLIT`
|
||||
@@ -358,7 +358,7 @@ There are a few different ways to set handedness for split keyboards (listed in
|
||||
|
||||
* `#define SPLIT_TRANSACTION_IDS_KB .....`
|
||||
* `#define SPLIT_TRANSACTION_IDS_USER .....`
|
||||
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](feature_split_keyboard#custom-data-sync) for more information.
|
||||
* Allows for custom data sync with the slave when using the QMK-provided split transport. See [custom data sync between sides](features/split_keyboard#custom-data-sync) for more information.
|
||||
|
||||
# The `rules.mk` File
|
||||
|
||||
|
@@ -16,7 +16,9 @@ I'll say that again because it's important:
|
||||
**MAKE SURE YOU SELECT THE RIGHT VERSION!**
|
||||
:::
|
||||
|
||||
If your keyboard has been advertised to be powered by QMK but is not in the list, chances are a developer hasn't gotten to it yet or we haven't had a chance to merge it in yet. File an issue at [qmk_firmware](https://github.com/qmk/qmk_firmware/issues) requesting to support that particular keyboard, if there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard) for it. There are also QMK powered keyboards that are in their manufacturer's own GitHub accounts. Double check for that as well. <!-- FIXME(skullydazed): This feels too wordy and I'm not sure we want to encourage these kinds of issues. Also, should we prompt them to bug the manufacutrer? -->
|
||||
Unfortunately if your keyboard has been advertised to be powered by QMK but is not in the list, you will **not** be able to use Configurator to customize your keyboard.
|
||||
|
||||
Chances are a developer hasn't gotten round to adding support or we haven't had a chance to merge it in yet. If there is no active [Pull Request](https://github.com/qmk/qmk_firmware/pulls?q=is%3Aopen+is%3Apr+label%3Akeyboard), contact the manufacturer and encourage them to add support.
|
||||
|
||||
## Step 2: Select Your Keyboard Layout
|
||||
|
||||
|
@@ -105,7 +105,9 @@ enum my_keycodes {
|
||||
|
||||
Before opening a pull request, you can preview your changes if you have set up the development environment by running this command from the `qmk_firmware/` folder:
|
||||
|
||||
qmk docs
|
||||
```
|
||||
qmk docs
|
||||
```
|
||||
|
||||
and navigating to `http://localhost:5173/`.
|
||||
|
||||
|
@@ -206,7 +206,7 @@ Similar to `matrix_scan_*`, these are called as often as the MCU can handle. To
|
||||
|
||||
### Example `void housekeeping_task_user(void)` implementation
|
||||
|
||||
This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](feature_rgblight). For RGB Matrix, the [builtin](feature_rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.
|
||||
This example will show you how to use `void housekeeping_task_user(void)` to turn off [RGB Light](features/rgblight). For RGB Matrix, the [builtin](features/rgb_matrix#additional-configh-options) `RGB_MATRIX_TIMEOUT` should be used.
|
||||
|
||||
First, add the following lines to your keymap's `config.h`:
|
||||
|
||||
|
@@ -69,4 +69,4 @@ This page describes my cool feature. You can use my cool feature to make coffee
|
||||
|KC_SUGAR||Order Sugar|
|
||||
```
|
||||
|
||||
Place your documentation into `docs/feature_<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
Place your documentation into `docs/features/<my_cool_feature>.md`, and add that file to the appropriate place in `docs/_sidebar.json`. If you have added any keycodes be sure to add them to `docs/keycodes.md` with a link back to your feature page.
|
||||
|
@@ -8,8 +8,8 @@ We recommend the use of the [Zadig](https://zadig.akeo.ie/) utility. If you have
|
||||
|
||||
## Installation
|
||||
|
||||
Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](feature_bootmagic) docs for more details). Some boards use [Command](feature_command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](feature_bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||
Put your keyboard into bootloader mode, either by hitting the `QK_BOOT` keycode (which may be on a different layer), or by pressing the reset switch that's usually located on the underside of the board. If your keyboard has neither, try holding Escape or Space+`B` as you plug it in (see the [Bootmagic Lite](features/bootmagic) docs for more details). Some boards use [Command](features/command) instead of Bootmagic; in this case, you can enter bootloader mode by hitting Left Shift+Right Shift+`B` or Left Shift+Right Shift+Escape at any point while the keyboard is plugged in.
|
||||
Some keyboards may have specific instructions for entering the bootloader. For example, the [Bootmagic Lite](features/bootmagic) key (default: Escape) might be on a different key, e.g. Left Control; or the magic combination for Command (default: Left Shift+Right Shift) might require you to hold something else, e.g. Left Control+Right Control. Refer to the board's README file if you are unsure.
|
||||
|
||||
To put a device in bootloader mode with USBaspLoader, tap the `RESET` button while holding down the `BOOT` button.
|
||||
Alternatively, hold `BOOT` while inserting the USB cable.
|
||||
@@ -65,7 +65,7 @@ Run `pnputil /delete-driver oemXX.inf /uninstall`. This will delete the driver a
|
||||
As with the previous section, this process may need to be repeated multiple times, as multiple drivers can be applicable to the same device.
|
||||
|
||||
::: warning
|
||||
**WARNING:** Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
|
||||
Be *extremely careful* when doing this! You could potentially uninstall the driver for some other critical device. If you are unsure, double check the output of `/enum-drivers`, and omit the `/uninstall` flag when running `/delete-driver`.
|
||||
:::
|
||||
|
||||
## List of Known Bootloaders
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# ADC Driver
|
||||
|
||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](feature_encoders).
|
||||
QMK can leverage the Analog-to-Digital Converter (ADC) on supported MCUs to measure voltages on certain pins. This can be useful for implementing things such as battery level indicators for Bluetooth keyboards, or volume controls using a potentiometer, as opposed to a [rotary encoder](../features/encoders).
|
||||
|
||||
This driver currently supports both AVR and a limited selection of ARM devices. The values returned are 10-bit integers (0-1023) mapped between 0V and VCC (usually 5V or 3.3V for AVR, 3.3V only for ARM), however on ARM there is more flexibility in control of operation through `#define`s if you need more precision.
|
||||
|
80
docs/drivers/apa102.md
Normal file
80
docs/drivers/apa102.md
Normal file
@@ -0,0 +1,80 @@
|
||||
# APA102 Driver {#apa102-driver}
|
||||
|
||||
This driver provides support for APA102 addressable RGB LEDs. They are similar to the [WS2812](ws2812) LEDs, but have increased data and refresh rates.
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the APA102 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `apa102` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
||||
```make
|
||||
APA102_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
You can then call the APA102 API by including `apa102.h` in your code.
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|---------------------------|-------------|------------------------------------------------------------------|
|
||||
|`APA102_DI_PIN` |*Not defined*|The GPIO pin connected to the DI pin of the first LED in the chain|
|
||||
|`APA102_CI_PIN` |*Not defined*|The GPIO pin connected to the CI pin of the first LED in the chain|
|
||||
|`APA102_DEFAULT_BRIGHTNESS`|`31` |The default global brightness level of the LEDs, from 0 to 31 |
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `void apa102_init(void)` {#api-apa102-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
---
|
||||
|
||||
### `void apa102_set_color(uint16_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color}
|
||||
|
||||
Set the color of a single LED. This function does not immediately update the LEDs; call `apa102_flush()` after you are finished.
|
||||
|
||||
#### Arguments {#api-apa102-set-color-arguments}
|
||||
|
||||
- `uint16_t index`
|
||||
The LED index in the APA102 chain.
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void apa102_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-apa102-set-color-all}
|
||||
|
||||
Set the color of all LEDs.
|
||||
|
||||
#### Arguments {#api-apa102-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void apa102_flush(void)` {#api-apa102-flush}
|
||||
|
||||
Flush the PWM values to the LED chain.
|
||||
|
||||
---
|
||||
|
||||
### `void apa102_set_brightness(uint8_t brightness)` {#api-apa102-set-brightness}
|
||||
|
||||
Set the global brightness.
|
||||
|
||||
#### Arguments {#api-apa102-set-brightness-arguments}
|
||||
|
||||
- `uint8_t brightness`
|
||||
The brightness level to set, from 0 to 31.
|
@@ -1,6 +1,6 @@
|
||||
# Audio Driver {#audio-driver}
|
||||
|
||||
The [Audio feature](feature_audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
The [Audio feature](../features/audio) breaks the hardware specifics out into separate, exchangeable driver units, with a common interface to the audio-"core" - which itself handles playing songs and notes while tracking their progress in an internal state, initializing/starting/stopping the driver as needed.
|
||||
|
||||
Not all MCUs support every available driver, either the platform-support is not there (yet?) or the MCU simply does not have the required hardware peripheral.
|
||||
|
133
docs/drivers/aw20216s.md
Normal file
133
docs/drivers/aw20216s.md
Normal file
@@ -0,0 +1,133 @@
|
||||
# AW20216S Driver {#aw20216s-driver}
|
||||
|
||||
SPI 18x12 LED matrix driver by Awinic. Supports a maximum of four drivers, each controlling up to 216 single-color LEDs, or 72 RGB LEDs.
|
||||
|
||||
[AW20216S Datasheet](https://doc.awinic.com/doc/20230609wm/b6a9c70b-e1bd-495b-925f-bcbed3fc2620.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The AW20216S driver code is automatically included if you are using the [RGB Matrix](../features/rgb_matrix) feature with the `aw20216s` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += aw20216s.c
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|-------------|-------------------------------------------------------------|
|
||||
|`AW20216S_CS_PIN_1` |*Not defined*|The GPIO pin connected to the first driver's Chip Select pin |
|
||||
|`AW20216S_CS_PIN_2` |*Not defined*|The GPIO pin connected to the second driver's Chip Select pin|
|
||||
|`AW20216S_EN_PIN` |*Not defined*|The GPIO pin connected to the drivers' Enable pins |
|
||||
|`AW20216S_SPI_MODE` |`0` |The SPI mode to use |
|
||||
|`AW20216S_SPI_DIVISOR` |`4` |The SPI divisor to use |
|
||||
|`AW20216S_SCALING_MAX` |`150` |The scaling value |
|
||||
|`AW20216S_GLOBAL_CURRENT_MAX`|`150` |The global current control value |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. To adjust it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define AW20216S_GLOBAL_CURRENT_MAX 150
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure SPI](spi#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the first LED index on driver 0 has its red channel on `SW1_CS1`, green on `SW1_CS2` and blue on `SW1_CS3`.
|
||||
|
||||
These values correspond to the matrix locations as shown in the datasheet on page 16, figure 16.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct aw20216s_led_t` {#api-aw20216s-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-aw20216s-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel.
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel.
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void aw20216s_init(pin_t cs_pin)` {#api-aw20216s-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-aw20216s-init-arguments}
|
||||
|
||||
- `pin_t cs_pin`
|
||||
The GPIO connected to the Chip Select pin of the LED driver to initialize.
|
||||
|
||||
---
|
||||
|
||||
### `void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color}
|
||||
|
||||
Set the color of a single LED. This function does not immediately update the LEDs; call `aw20216s_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-aw20216s-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_aw20216s_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-aw20216s-set-color-all}
|
||||
|
||||
Set the color of all LEDs.
|
||||
|
||||
#### Arguments {#api-aw20216s-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index)` {#api-aw20216s-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-aw20216s-update-pwm-buffers-arguments}
|
||||
|
||||
- `pin_t cs_pin`
|
||||
The GPIO connected to the Chip Select pin of the driver.
|
||||
- `uint8_t index`
|
||||
The index of the driver.
|
@@ -119,13 +119,14 @@ This driver performs writes to the embedded flash storage embedded in the MCU. I
|
||||
|
||||
Configurable options in your keyboard's `config.h`:
|
||||
|
||||
`config.h` override | Default | Description
|
||||
-----------------------------------------|-------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
|
||||
`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
|
||||
`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
|
||||
`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
|
||||
`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
|
||||
`config.h` override | Default | Description
|
||||
---------------------------------------------------|--------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
`#define WEAR_LEVELING_EFL_FIRST_SECTOR` | _unset_ | The first sector on the MCU to use. By default this is not defined and calculated at runtime based on the MCU. However, different flash sizes on MCUs may require custom configuration.
|
||||
`#define WEAR_LEVELING_EFL_FLASH_SIZE` | _unset_ | Allows overriding the flash size available for use for wear-leveling. Under normal circumstances this is automatically calculated and should not need to be overridden. Specifying a size larger than the amount actually available in flash will usually prevent the MCU from booting.
|
||||
`#define WEAR_LEVELING_EFL_OMIT_LAST_SECTOR_COUNT` | `0` | Number of sectors to omit at the end of the flash. These sectors will not be allocated to the driver and the usable flash block will be offset, but keeping the set flash size. Useful on devices with bootloaders requiring a check flag at the end of flash to be present in order to confirm a valid, bootable firmware.
|
||||
`#define WEAR_LEVELING_LOGICAL_SIZE` | `(backing_size/2)` | Number of bytes "exposed" to the rest of QMK and denotes the size of the usable EEPROM.
|
||||
`#define WEAR_LEVELING_BACKING_SIZE` | `2048` | Number of bytes used by the wear-leveling algorithm for its underlying storage, and needs to be a multiple of the logical size.
|
||||
`#define BACKING_STORE_WRITE_SIZE` | _automatic_ | The byte width of the underlying write used on the MCU, and is usually automatically determined from the selected MCU family. If an error occurs in the auto-detection, you'll need to consult the MCU's datasheet and determine this value, specifying it directly.
|
||||
|
||||
::: warning
|
||||
If your MCU does not boot after swapping to the EFL wear-leveling driver, it's likely that the flash size is incorrectly detected, usually as an MCU with larger flash and may require overriding.
|
||||
@@ -133,7 +134,7 @@ If your MCU does not boot after swapping to the EFL wear-leveling driver, it's l
|
||||
|
||||
## Wear-leveling SPI Flash Driver Configuration {#wear_leveling-flash_spi-driver-configuration}
|
||||
|
||||
This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash_driver) documentation for more information.
|
||||
This driver performs writes to an external SPI NOR Flash peripheral. It also requires a working configuration for the SPI NOR Flash peripheral -- see the [flash driver](flash) documentation for more information.
|
||||
|
||||
Configurable options in your keyboard's `config.h`:
|
||||
|
@@ -4,7 +4,7 @@ The I2C Master drivers used in QMK have a set of common functions to allow porta
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver).
|
||||
In most cases, the I2C Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver).
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
194
docs/drivers/is31fl3218.md
Normal file
194
docs/drivers/is31fl3218.md
Normal file
@@ -0,0 +1,194 @@
|
||||
# IS31FL3218 Driver {#is31fl3218-driver}
|
||||
|
||||
I²C LED driver by Lumissil. Supports up to 18 single-color LEDs, or 6 RGB LEDs.
|
||||
|
||||
[IS31FL3218 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3218_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3218 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3218` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3218-mono.c # For single-color
|
||||
SRC += is31fl3218.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|-------------|---------------------------------------------------|
|
||||
|`IS31FL3218_SDB_PIN` |*Not defined*|The GPIO pin connected to the driver's shutdown pin|
|
||||
|`IS31FL3218_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3218_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3218's 7-bit I²C address is `0x54`, available as `IS31FL3218_I2C_ADDRESS`.
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
|
||||
/* R G B */
|
||||
{OUT1, OUT2, OUT3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT] = {
|
||||
/* V */
|
||||
{OUT1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3218_led_t` {#api-is31fl3218-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3218-led-t-members}
|
||||
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_init(void)` {#api-is31fl3218-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_write_register(uint8_t reg, uint8_t data)` {#api-is31fl3218-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3218-write-register-arguments}
|
||||
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3218_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3218-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_value(int index, uint8_t value)` {#api-is31fl3218-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3218_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_value_all(uint8_t value)` {#api-is31fl3218-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3218-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3218_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3218-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3218_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3218-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3218_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_update_pwm_buffers(void)` {#api-is31fl3218-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3218_update_led_control_registers(void)` {#api-is31fl3218-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
228
docs/drivers/is31fl3236.md
Normal file
228
docs/drivers/is31fl3236.md
Normal file
@@ -0,0 +1,228 @@
|
||||
# IS31FL3236 Driver {#is31fl3236-driver}
|
||||
|
||||
I²C LED driver by Lumissil. Supports a maximum of four drivers, each controlling up to 36 single-color LEDs, or 12 RGB LEDs.
|
||||
|
||||
[IS31FL3236 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3236_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3236 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3236` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3236-mono.c # For single-color
|
||||
SRC += is31fl3236.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|-------------|----------------------------------------------------|
|
||||
|`IS31FL3236_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3236_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3236_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3236_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
|
||||
|`IS31FL3236_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
|
||||
|`IS31FL3236_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
|
||||
|`IS31FL3236_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3236 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3236_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|----------------------------|------|
|
||||
|`IS31FL3236_I2C_ADDRESS_GND`|`0x3C`|
|
||||
|`IS31FL3236_I2C_ADDRESS_SCL`|`0x3D`|
|
||||
|`IS31FL3236_I2C_ADDRESS_SDA`|`0x3E`|
|
||||
|`IS31FL3236_I2C_ADDRESS_VCC`|`0x3F`|
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = {
|
||||
/* Driver
|
||||
| R G B */
|
||||
{0, OUT1, OUT2, OUT3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to `VCC`, and their cathodes on the `OUT1`, `OUT2` and `OUT3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT] = {
|
||||
/* Driver
|
||||
| V */
|
||||
{0, OUT1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3236_led_t` {#api-is31fl3236-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3236-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_init(uint8_t index)` {#api-is31fl3236-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3236-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3236-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3236-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3236_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3236-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_value(int index, uint8_t value)` {#api-is31fl3236-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3236_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_value_all(uint8_t value)` {#api-is31fl3236-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3236-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3236_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3236-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3236_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3236-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3236_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_update_pwm_buffers(uint8_t index)` {#api-is31fl3236-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3236-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3236_update_led_control_registers(uint8_t index)` {#api-is31fl3236-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3236-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
300
docs/drivers/is31fl3729.md
Normal file
300
docs/drivers/is31fl3729.md
Normal file
@@ -0,0 +1,300 @@
|
||||
# IS31FL3729 Driver {#is31fl3729-driver}
|
||||
|
||||
I²C 16x8/15x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 135 single-color LEDs, or 45 RGB LEDs.
|
||||
|
||||
[IS31FL3729 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3729_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3729 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3729` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3729-mono.c # For single-color
|
||||
SRC += is31fl3729.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|--------------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3729_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3729_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3729_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3729_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3729_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3729_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3729_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3729_PWM_FREQUENCY` |`IS31FL3729_PWM_FREQUENCY_32K_HZ` |The PWM frequency of the LEDs |
|
||||
|`IS31FL3729_SW_PULLDOWN` |`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF`|The `SWx` pullup resistor value |
|
||||
|`IS31FL3729_CS_PULLUP` |`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |The `CSx` pulldown resistor value |
|
||||
|`IS31FL3729_GLOBAL_CURRENT` |`0x40` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3729 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3729_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|----------------------------|------|
|
||||
|`IS31FL3729_I2C_ADDRESS_GND`|`0x34`|
|
||||
|`IS31FL3729_I2C_ADDRESS_SCL`|`0x35`|
|
||||
|`IS31FL3729_I2C_ADDRESS_SDA`|`0x36`|
|
||||
|`IS31FL3729_I2C_ADDRESS_VCC`|`0x37`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3729_PWM_FREQUENCY IS31FL3729_PWM_FREQUENCY_32K_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|----------------------------------|----------------|
|
||||
|`IS31FL3729_PWM_FREQUENCY_55K_HZ` |55 kHz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_32K_HZ` |32 kHz (default)|
|
||||
|`IS31FL3729_PWM_FREQUENCY_4K_HZ` |4 kHz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_2K_HZ` |2 kHz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_1K_HZ` |1 kHz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_500_HZ` |500 Hz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_250_HZ` |250 Hz |
|
||||
|`IS31FL3729_PWM_FREQUENCY_80K_HZ` |80 kHz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3729_SW_PULLDOWN IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF
|
||||
#define IS31FL3729_CS_PULLUP IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3729_SW_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|---------------------------------------|------------------------------|
|
||||
|`IS31FL3729_SW_PULLDOWN_0_OHM` |None |
|
||||
|`IS31FL3729_SW_PULLDOWN_0K5_OHM_SW_OFF`|0.5 kΩ in SWy off time |
|
||||
|`IS31FL3729_SW_PULLDOWN_1K_OHM_SW_OFF` |1 kΩ in SWy off time |
|
||||
|`IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF` |2 kΩ in SWy off time (default)|
|
||||
|`IS31FL3729_SW_PULLDOWN_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3729_SW_PULLDOWN_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3729_SW_PULLDOWN_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3729_SW_PULLDOWN_8K_OHM` |8 kΩ |
|
||||
|
||||
Valid values for `IS31FL3729_CS_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|-------------------------------------|------------------------------|
|
||||
|`IS31FL3729_CS_PULLUP_0_OHM` |None |
|
||||
|`IS31FL3729_CS_PULLUP_0K5_OHM_CS_OFF`|0.5 kΩ in CSx off time |
|
||||
|`IS31FL3729_CS_PULLUP_1K_OHM_CS_OFF` |1 kΩ in CSx off time |
|
||||
|`IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF` |2 kΩ in CSx off time (default)|
|
||||
|`IS31FL3729_CS_PULLUP_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3729_CS_PULLUP_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3729_CS_PULLUP_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3729_CS_PULLUP_8K_OHM` |8 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is 64, but if you need to adjust it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3729_GLOBAL_CURRENT 0x40
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 12, figure 9.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3729_led_t` {#api-is31fl3729-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3729-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_init(uint8_t index)` {#api-is31fl3729-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3729-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3729-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3729-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3729_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_value(int index, uint8_t value)` {#api-is31fl3729-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3729_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_value_all(uint8_t value)` {#api-is31fl3729-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3729-set-scaling-register-rgb}
|
||||
|
||||
Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-scaling-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3729_leds` array).
|
||||
- `uint8_t red`
|
||||
The scaling value for the red channel.
|
||||
- `uint8_t green`
|
||||
The scaling value for the green channel.
|
||||
- `uint8_t blue`
|
||||
The scaling value for the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3729-set-scaling-register-mono}
|
||||
|
||||
Configure the scaling registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3729_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3729-set-scaling-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3729_leds` array).
|
||||
- `uint8_t value`
|
||||
The scaling value for the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_update_pwm_buffers(uint8_t index)` {#api-is31fl3729-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3729-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3729_update_scaling_registers(uint8_t index)` {#api-is31fl3729-update-scaling-registers}
|
||||
|
||||
Flush the scaling register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3729-update-scaling-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
254
docs/drivers/is31fl3731.md
Normal file
254
docs/drivers/is31fl3731.md
Normal file
@@ -0,0 +1,254 @@
|
||||
# IS31FL3731 Driver {#is31fl3731-driver}
|
||||
|
||||
I²C Charlieplexed 16x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
|
||||
|
||||
[IS31FL3731 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3731_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3731 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3731` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3731-mono.c # For single-color
|
||||
SRC += is31fl3731.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|-------------|----------------------------------------------------|
|
||||
|`IS31FL3731_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3731_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3731_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3731_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
|
||||
|`IS31FL3731_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
|
||||
|`IS31FL3731_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
|
||||
|`IS31FL3731_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
|
||||
|`IS31FL3731_DEGHOST` |*Not defined*|Enable ghost image prevention |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3731 has four possible 7-bit I²C addresses, depending on how the `AD` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3731_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|----------------------------|------|
|
||||
|`IS31FL3731_I2C_ADDRESS_GND`|`0x74`|
|
||||
|`IS31FL3731_I2C_ADDRESS_SCL`|`0x75`|
|
||||
|`IS31FL3731_I2C_ADDRESS_SDA`|`0x76`|
|
||||
|`IS31FL3731_I2C_ADDRESS_VCC`|`0x77`|
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
This setting enables the de-ghosting feature on the IS31FL3731. See this [Application Note](https://www.lumissil.com/assets/pdf/core/IS31FL3731_AN.pdf) (p. 15) for more information.
|
||||
|
||||
To enable, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3731_DEGHOST
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, C1_1, C1_2, C1_3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CA1` pin, and their anodes on the `CA2`, `CA3` and `CA4` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, C1_1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 11, figure 8.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3731_led_t` {#api-is31fl3731-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3731-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_init(uint8_t index)` {#api-is31fl3731-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3731-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3731-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3731-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_select_page(uint8_t index, uint8_t page)` {#api-is31fl3731-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3731-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3731_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3731-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_value(int index, uint8_t value)` {#api-is31fl3731-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3731_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_value_all(uint8_t value)` {#api-is31fl3731-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3731-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3731_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3731-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3731_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3731-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3731_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_update_pwm_buffers(uint8_t index)` {#api-is31fl3731-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3731-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3731_update_led_control_registers(uint8_t index)` {#api-is31fl3731-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3731-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
338
docs/drivers/is31fl3733.md
Normal file
338
docs/drivers/is31fl3733.md
Normal file
@@ -0,0 +1,338 @@
|
||||
# IS31FL3733 Driver {#is31fl3733-driver}
|
||||
|
||||
I²C 12x16 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs.
|
||||
|
||||
[IS31FL3733 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3733_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3733 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3733` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3733-mono.c # For single-color
|
||||
SRC += is31fl3733.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|---------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3733_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3733_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3733_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3733_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3733_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3733_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3733_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3733_SYNC_1` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 0 |
|
||||
|`IS31FL3733_SYNC_2` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 1 |
|
||||
|`IS31FL3733_SYNC_3` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 2 |
|
||||
|`IS31FL3733_SYNC_4` |`IS31FL3733_SYNC_NONE` |The sync configuration for driver 3 |
|
||||
|`IS31FL3733_PWM_FREQUENCY` |`IS31FL3733_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3733B only) |
|
||||
|`IS31FL3733_SW_PULLUP` |`IS31FL3733_PUR_0_OHM` |The `SWx` pullup resistor value |
|
||||
|`IS31FL3733_CS_PULLDOWN` |`IS31FL3733_PDR_0_OHM` |The `CSx` pulldown resistor value |
|
||||
|`IS31FL3733_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3733 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
|
||||
|
||||
To configure this, set the `IS31FL3733_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|--------------------------------|------|
|
||||
|`IS31FL3733_I2C_ADDRESS_GND_GND`|`0x50`|
|
||||
|`IS31FL3733_I2C_ADDRESS_GND_SCL`|`0x51`|
|
||||
|`IS31FL3733_I2C_ADDRESS_GND_SDA`|`0x52`|
|
||||
|`IS31FL3733_I2C_ADDRESS_GND_VCC`|`0x53`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SCL_GND`|`0x54`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SCL_SCL`|`0x55`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SCL_SDA`|`0x56`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SCL_VCC`|`0x57`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SDA_GND`|`0x58`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SDA_SCL`|`0x59`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SDA_SDA`|`0x5A`|
|
||||
|`IS31FL3733_I2C_ADDRESS_SDA_VCC`|`0x5B`|
|
||||
|`IS31FL3733_I2C_ADDRESS_VCC_GND`|`0x5C`|
|
||||
|`IS31FL3733_I2C_ADDRESS_VCC_SCL`|`0x5D`|
|
||||
|`IS31FL3733_I2C_ADDRESS_VCC_SDA`|`0x5E`|
|
||||
|`IS31FL3733_I2C_ADDRESS_VCC_VCC`|`0x5F`|
|
||||
|
||||
### Multi-Driver Synchronization {#multi-driver-synchronization}
|
||||
|
||||
Multiple IS31FL3733 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
|
||||
|
||||
To do this, set the `IS31FL3733_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|------------------------|---------------------------|
|
||||
|`IS31FL3733_SYNC_NONE` |No synchronization |
|
||||
|`IS31FL3733_SYNC_MASTER`|Driver configured as master|
|
||||
|`IS31FL3733_SYNC_SLAVE` |Driver configured as slave |
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted (for IS31FL3733B only) by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|----------------------------------|-----------------|
|
||||
|`IS31FL3733_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
|
||||
|`IS31FL3733_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
|
||||
|`IS31FL3733_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
|
||||
|`IS31FL3733_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
|
||||
|`IS31FL3733_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM
|
||||
#define IS31FL3733_CS_PULLDOWN IS31FL3733_PUR_0_OHM
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3733_SW_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3733_PUR_0_OHM` |None (default)|
|
||||
|`IS31FL3733_PUR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3733_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3733_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3733_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3733_PUR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3733_PUR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3733_PUR_32K_OHM`|32 kΩ |
|
||||
|
||||
Valid values for `IS31FL3733_CS_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3733_PDR_0_OHM` |None (default)|
|
||||
|`IS31FL3733_PDR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3733_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3733_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3733_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3733_PDR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3733_PDR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3733_PDR_32K_OHM`|32 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3733_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 15, figure 9.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3733_led_t` {#api-is31fl3733-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3733-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_init(uint8_t index)` {#api-is31fl3733-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3733-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3733-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3733-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_select_page(uint8_t index, uint8_t page)` {#api-is31fl3733-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3733-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3733_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3733-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_value(int index, uint8_t value)` {#api-is31fl3733-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3733_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_value_all(uint8_t value)` {#api-is31fl3733-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3733-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3733_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3733-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3733_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3733-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3733_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_update_pwm_buffers(uint8_t index)` {#api-is31fl3733-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3733-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3733_update_led_control_registers(uint8_t index)` {#api-is31fl3733-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3733-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
322
docs/drivers/is31fl3736.md
Normal file
322
docs/drivers/is31fl3736.md
Normal file
@@ -0,0 +1,322 @@
|
||||
# IS31FL3736 Driver {#is31fl3736-driver}
|
||||
|
||||
I²C 12x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 96 single-color LEDs, or 32 RGB LEDs.
|
||||
|
||||
[IS31FL3736 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3736_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3736 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3736` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3736-mono.c # For single-color
|
||||
SRC += is31fl3736.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|---------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3736_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3736_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3736_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3736_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3736_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3736_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3736_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3736_PWM_FREQUENCY` |`IS31FL3736_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3736B only) |
|
||||
|`IS31FL3736_SW_PULLUP` |`IS31FL3736_PUR_0_OHM` |The `SWx` pullup resistor value |
|
||||
|`IS31FL3736_CS_PULLDOWN` |`IS31FL3736_PDR_0_OHM` |The `CSx` pulldown resistor value |
|
||||
|`IS31FL3736_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3736 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
|
||||
|
||||
To configure this, set the `IS31FL3736_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|--------------------------------|------|
|
||||
|`IS31FL3736_I2C_ADDRESS_GND_GND`|`0x50`|
|
||||
|`IS31FL3736_I2C_ADDRESS_GND_SCL`|`0x51`|
|
||||
|`IS31FL3736_I2C_ADDRESS_GND_SDA`|`0x52`|
|
||||
|`IS31FL3736_I2C_ADDRESS_GND_VCC`|`0x53`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SCL_GND`|`0x54`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SCL_SCL`|`0x55`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SCL_SDA`|`0x56`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SCL_VCC`|`0x57`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SDA_GND`|`0x58`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SDA_SCL`|`0x59`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SDA_SDA`|`0x5A`|
|
||||
|`IS31FL3736_I2C_ADDRESS_SDA_VCC`|`0x5B`|
|
||||
|`IS31FL3736_I2C_ADDRESS_VCC_GND`|`0x5C`|
|
||||
|`IS31FL3736_I2C_ADDRESS_VCC_SCL`|`0x5D`|
|
||||
|`IS31FL3736_I2C_ADDRESS_VCC_SDA`|`0x5E`|
|
||||
|`IS31FL3736_I2C_ADDRESS_VCC_VCC`|`0x5F`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted (for IS31FL3736B only) by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3736_PWM_FREQUENCY IS31FL3736_PWM_FREQUENCY_8K4_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|----------------------------------|-----------------|
|
||||
|`IS31FL3736_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
|
||||
|`IS31FL3736_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
|
||||
|`IS31FL3736_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
|
||||
|`IS31FL3736_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
|
||||
|`IS31FL3736_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 25) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3736_SW_PULLUP IS31FL3736_PUR_0_OHM
|
||||
#define IS31FL3736_CS_PULLDOWN IS31FL3736_PDR_0_OHM
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3736_SW_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3736_PUR_0_OHM` |None (default)|
|
||||
|`IS31FL3736_PUR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3736_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3736_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3736_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3736_PUR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3736_PUR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3736_PUR_32K_OHM`|32 kΩ |
|
||||
|
||||
Valid values for `IS31FL3736_CS_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3736_PDR_0_OHM` |None (default)|
|
||||
|`IS31FL3736_PDR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3736_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3736_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3736_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3736_PDR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3736_PDR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3736_PDR_32K_OHM`|32 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3736_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3736_led_t PROGMEM g_is31fl3736_leds[IS31FL3736_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 16, figure 9.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3736_led_t` {#api-is31fl3736-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3736-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_init(uint8_t index)` {#api-is31fl3736-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3736-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3736-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3736-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_select_page(uint8_t index, uint8_t page)` {#api-is31fl3736-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3736-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3736_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3736-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_value(int index, uint8_t value)` {#api-is31fl3736-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3736_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_value_all(uint8_t value)` {#api-is31fl3736-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3736-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3736_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3736-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3736_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3736-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3736_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_update_pwm_buffers(uint8_t index)` {#api-is31fl3736-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3736-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3736_update_led_control_registers(uint8_t index)` {#api-is31fl3736-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3736-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
310
docs/drivers/is31fl3737.md
Normal file
310
docs/drivers/is31fl3737.md
Normal file
@@ -0,0 +1,310 @@
|
||||
# IS31FL3737 Driver {#is31fl3737-driver}
|
||||
|
||||
I²C 12x12 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
|
||||
|
||||
[IS31FL3737 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3737_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3737 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3737` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3737-mono.c # For single-color
|
||||
SRC += is31fl3737.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|---------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3737_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3737_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3737_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3737_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3737_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3737_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3737_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3737_PWM_FREQUENCY` |`IS31FL3737_PWM_FREQUENCY_8K4_HZ`|The PWM frequency of the LEDs (IS31FL3737B only) |
|
||||
|`IS31FL3737_SW_PULLUP` |`IS31FL3737_PUR_0_OHM` |The `SWx` pullup resistor value |
|
||||
|`IS31FL3737_CS_PULLDOWN` |`IS31FL3737_PDR_0_OHM` |The `CSx` pulldown resistor value |
|
||||
|`IS31FL3737_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3737 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3737_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|----------------------------|------|
|
||||
|`IS31FL3737_I2C_ADDRESS_GND`|`0x50`|
|
||||
|`IS31FL3737_I2C_ADDRESS_SCL`|`0x55`|
|
||||
|`IS31FL3737_I2C_ADDRESS_SDA`|`0x5A`|
|
||||
|`IS31FL3737_I2C_ADDRESS_VCC`|`0x5F`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted (for IS31FL3737B only) by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3737_PWM_FREQUENCY IS31FL3737_PWM_FREQUENCY_8K4_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|----------------------------------|-----------------|
|
||||
|`IS31FL3737_PWM_FREQUENCY_8K4_HZ` |8.4 kHz (default)|
|
||||
|`IS31FL3737_PWM_FREQUENCY_4K2_HZ` |4.2 kHz |
|
||||
|`IS31FL3737_PWM_FREQUENCY_26K7_HZ`|26.7 kHz |
|
||||
|`IS31FL3737_PWM_FREQUENCY_2K1_HZ` |2.1 kHz |
|
||||
|`IS31FL3737_PWM_FREQUENCY_1K05_HZ`|1.05 kHz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pullup and pulldown resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3737_SW_PULLUP IS31FL3737_PUR_0_OHM
|
||||
#define IS31FL3737_CS_PULLDOWN IS31FL3737_PDR_0_OHM
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3737_SW_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3737_PUR_0_OHM` |None (default)|
|
||||
|`IS31FL3737_PUR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3737_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3737_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3737_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3737_PUR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3737_PUR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3737_PUR_32K_OHM`|32 kΩ |
|
||||
|
||||
Valid values for `IS31FL3737_CS_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|--------------|
|
||||
|`IS31FL3737_PDR_0_OHM` |None (default)|
|
||||
|`IS31FL3737_PDR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3737_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3737_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3737_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3737_PDR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3737_PDR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3737_PDR_32K_OHM`|32 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3737_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `SW1` pin, and their anodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3737_led_t PROGMEM g_is31fl3737_leds[IS31FL3737_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 15, figure 9.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3737_led_t` {#api-is31fl3737-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3737-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_init(uint8_t index)` {#api-is31fl3737-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3737-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3737-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3737-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_select_page(uint8_t index, uint8_t page)` {#api-is31fl3737-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3737-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3737_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3737-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_value(int index, uint8_t value)` {#api-is31fl3737-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3737_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_value_all(uint8_t value)` {#api-is31fl3737-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3737-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3737_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3737-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3737_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3737-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3737_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_update_pwm_buffers(uint8_t index)` {#api-is31fl3737-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3737-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3737_update_led_control_registers(uint8_t index)` {#api-is31fl3737-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3737-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
310
docs/drivers/is31fl3741.md
Normal file
310
docs/drivers/is31fl3741.md
Normal file
@@ -0,0 +1,310 @@
|
||||
# IS31FL3741 Driver {#is31fl3741-driver}
|
||||
|
||||
I²C 39x9 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 351 single-color LEDs, or 117 RGB LEDs.
|
||||
|
||||
[IS31FL3741A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3741A_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3741 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3741` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3741-mono.c # For single-color
|
||||
SRC += is31fl3741.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|---------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3741_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3741_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3741_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3741_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3741_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3741_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3741_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3741_CONFIGURATION` |`1` |The value of the configuration register |
|
||||
|`IS31FL3741_PWM_FREQUENCY` |`IS31FL3741_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs (IS31FL3741A only) |
|
||||
|`IS31FL3741_SW_PULLUP` |`IS31FL3741_PUR_32K_OHM` |The `SWx` pullup resistor value |
|
||||
|`IS31FL3741_CS_PULLDOWN` |`IS31FL3741_PDR_32K_OHM` |The `CSx` pulldown resistor value |
|
||||
|`IS31FL3741_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3741 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3741_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|----------------------------|------|
|
||||
|`IS31FL3741_I2C_ADDRESS_GND`|`0x30`|
|
||||
|`IS31FL3741_I2C_ADDRESS_SCL`|`0x31`|
|
||||
|`IS31FL3741_I2C_ADDRESS_SDA`|`0x32`|
|
||||
|`IS31FL3741_I2C_ADDRESS_VCC`|`0x33`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted (for IS31FL3741A only) by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3741_PWM_FREQUENCY IS31FL3741_PWM_FREQUENCY_29K_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|---------------------------------|----------------|
|
||||
|`IS31FL3741_PWM_FREQUENCY_29K_HZ`|29 kHz (default)|
|
||||
|`IS31FL3741_PWM_FREQUENCY_3K6_HZ`|3.6 kHz |
|
||||
|`IS31FL3741_PWM_FREQUENCY_1K8_HZ`|1.8 kHz |
|
||||
|`IS31FL3741_PWM_FREQUENCY_900_HZ`|900 Hz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pullup and pulldown resistor values on the `CSx` and `SWy` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 18) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3741_SW_PULLUP IS31FL3741_PUR_32K_OHM
|
||||
#define IS31FL3741_CS_PULLDOWN IS31FL3741_PDR_32K_OHM
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3741_SW_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|---------------|
|
||||
|`IS31FL3741_PUR_0_OHM` |None |
|
||||
|`IS31FL3741_PUR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3741_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3741_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3741_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3741_PUR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3741_PUR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3741_PUR_32K_OHM`|32 kΩ (default)|
|
||||
|
||||
Valid values for `IS31FL3741_CS_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|------------------------|---------------|
|
||||
|`IS31FL3741_PDR_0_OHM` |None |
|
||||
|`IS31FL3741_PDR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3741_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3741_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3741_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3741_PDR_8K_OHM` |8 kΩ |
|
||||
|`IS31FL3741_PDR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3741_PDR_32K_OHM`|32 kΩ (default)|
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3741_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3741_led_t PROGMEM g_is31fl3741_leds[IS31FL3741_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3741_led_t` {#api-is31fl3741-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3741-led-t-members}
|
||||
|
||||
- `uint32_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint32_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint32_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint32_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint32_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_init(uint8_t index)` {#api-is31fl3741-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3741-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3741-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3741-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_select_page(uint8_t index, uint8_t page)` {#api-is31fl3741-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3741-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3741_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3741-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_value(int index, uint8_t value)` {#api-is31fl3741-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3741_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_value_all(uint8_t value)` {#api-is31fl3741-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-is31fl3741-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3741_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_set_led_control_register(uint8_t index, bool value)` {#api-is31fl3741-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3741_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3741-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3741_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_update_pwm_buffers(uint8_t index)` {#api-is31fl3741-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3741-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3741_update_led_control_registers(uint8_t index)` {#api-is31fl3741-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3741-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
310
docs/drivers/is31fl3742a.md
Normal file
310
docs/drivers/is31fl3742a.md
Normal file
@@ -0,0 +1,310 @@
|
||||
# IS31FL3742A Driver {#is31fl3742a-driver}
|
||||
|
||||
I²C 30x6 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 180 single-color LEDs, or 60 RGB LEDs.
|
||||
|
||||
[IS31FL3742A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3742A_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3742A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3742a` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3742a-mono.c # For single-color
|
||||
SRC += is31fl3742a.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|----------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3742A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3742A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3742A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3742A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3742A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3742A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3742A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3742A_CONFIGURATION` |`0x31` |The value of the configuration register |
|
||||
|`IS31FL3742A_PWM_FREQUENCY` |`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs |
|
||||
|`IS31FL3742A_SW_PULLDOWN` |`IS31FL3742A_PDR_8K_OHM` |The `SWx` pulldown resistor value |
|
||||
|`IS31FL3742A_CS_PULLUP` |`IS31FL3742A_PUR_8K_OHM` |The `CSx` pullup resistor value |
|
||||
|`IS31FL3742A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3742A has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
|
||||
|
||||
To configure this, set the `IS31FL3742A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|-----------------------------|------|
|
||||
|`IS31FL3742A_I2C_ADDRESS_GND`|`0x30`|
|
||||
|`IS31FL3742A_I2C_ADDRESS_SCL`|`0x31`|
|
||||
|`IS31FL3742A_I2C_ADDRESS_SDA`|`0x32`|
|
||||
|`IS31FL3742A_I2C_ADDRESS_VCC`|`0x33`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3742A_PWM_FREQUENCY IS31FL3742A_PWM_FREQUENCY_29K_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|----------------------------------|----------------|
|
||||
|`IS31FL3742A_PWM_FREQUENCY_29K_HZ`|29 kHz (default)|
|
||||
|`IS31FL3742A_PWM_FREQUENCY_3K6_HZ`|3.6 kHz |
|
||||
|`IS31FL3742A_PWM_FREQUENCY_1K8_HZ`|1.8 kHz |
|
||||
|`IS31FL3742A_PWM_FREQUENCY_900_HZ`|900 Hz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3742A_SW_PULLDOWN IS31FL3742A_PDR_8K_OHM
|
||||
#define IS31FL3742A_CS_PULLUP IS31FL3742A_PUR_8K_OHM
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3742A_SW_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|-------------------------|--------------|
|
||||
|`IS31FL3742A_PDR_0_OHM` |None |
|
||||
|`IS31FL3742A_PDR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3742A_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3742A_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3742A_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3742A_PDR_8K_OHM` |8 kΩ (default)|
|
||||
|`IS31FL3742A_PDR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3742A_PDR_32K_OHM`|32 kΩ |
|
||||
|
||||
Valid values for `IS31FL3742A_CS_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|-------------------------|--------------|
|
||||
|`IS31FL3742A_PUR_0_OHM` |None |
|
||||
|`IS31FL3742A_PUR_0K5_OHM`|0.5 kΩ |
|
||||
|`IS31FL3742A_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3742A_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3742A_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3742A_PUR_8K_OHM` |8 kΩ (default)|
|
||||
|`IS31FL3742A_PUR_16K_OHM`|16 kΩ |
|
||||
|`IS31FL3742A_PUR_32K_OHM`|32 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSx` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3742A_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3742a_led_t PROGMEM g_is31fl3742a_leds[IS31FL3742A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3742a_led_t` {#api-is31fl3742a-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3742a-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_init(uint8_t index)` {#api-is31fl3742a-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3742a-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3742a-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3742a_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_value(int index, uint8_t value)` {#api-is31fl3742a-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3742a_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_value_all(uint8_t value)` {#api-is31fl3742a-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3742a-set-scaling-register-rgb}
|
||||
|
||||
Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-scaling-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3742a_leds` array).
|
||||
- `uint8_t red`
|
||||
The scaling value for the red channel.
|
||||
- `uint8_t green`
|
||||
The scaling value for the green channel.
|
||||
- `uint8_t blue`
|
||||
The scaling value for the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3742a-set-scaling-register-mono}
|
||||
|
||||
Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3742a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-set-scaling-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3742a_leds` array).
|
||||
- `uint8_t value`
|
||||
The scaling value for the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_update_pwm_buffers(uint8_t index)` {#api-is31fl3742a-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3742a_update_scaling_registers(uint8_t index)` {#api-is31fl3742a-update-scaling-registers}
|
||||
|
||||
Flush the scaling register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3742a-update-scaling-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
320
docs/drivers/is31fl3743a.md
Normal file
320
docs/drivers/is31fl3743a.md
Normal file
@@ -0,0 +1,320 @@
|
||||
# IS31FL3743A Driver {#is31fl3743a-driver}
|
||||
|
||||
I²C 18x11 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 198 single-color LEDs, or 66 RGB LEDs.
|
||||
|
||||
[IS31FL3743A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3743A_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3743A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3743a` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3743a-mono.c # For single-color
|
||||
SRC += is31fl3743a.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|-------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3743A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3743A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3743A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3743A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3743A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3743A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3743A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3743A_SYNC_1` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 0 |
|
||||
|`IS31FL3743A_SYNC_2` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 1 |
|
||||
|`IS31FL3743A_SYNC_3` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 2 |
|
||||
|`IS31FL3743A_SYNC_4` |`IS31FL3743A_SYNC_NONE` |The sync configuration for driver 3 |
|
||||
|`IS31FL3743A_CONFIGURATION` |`0x01` |The value of the configuration register |
|
||||
|`IS31FL3743A_SW_PULLDOWN` |`IS31FL3743A_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value |
|
||||
|`IS31FL3743A_CS_PULLUP` |`IS31FL3743A_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value |
|
||||
|`IS31FL3743A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3743A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
|
||||
|
||||
To configure this, set the `IS31FL3743A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|---------------------------------|------|
|
||||
|`IS31FL3743A_I2C_ADDRESS_GND_GND`|`0x20`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_GND_SCL`|`0x21`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_GND_SDA`|`0x22`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_GND_VCC`|`0x23`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SCL_GND`|`0x24`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SCL_SCL`|`0x25`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SCL_SDA`|`0x26`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SCL_VCC`|`0x27`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SDA_GND`|`0x28`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SDA_SCL`|`0x29`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SDA_SDA`|`0x2A`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_SDA_VCC`|`0x2B`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_VCC_GND`|`0x2C`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_VCC_SCL`|`0x2D`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_VCC_SDA`|`0x2E`|
|
||||
|`IS31FL3743A_I2C_ADDRESS_VCC_VCC`|`0x2F`|
|
||||
|
||||
### Multi-Driver Synchronization {#multi-driver-synchronization}
|
||||
|
||||
Multiple IS31FL3743A drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
|
||||
|
||||
To do this, set the `IS31FL3743A_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|-------------------------|---------------------------|
|
||||
|`IS31FL3743A_SYNC_NONE` |No synchronization |
|
||||
|`IS31FL3743A_SYNC_MASTER`|Driver configured as master|
|
||||
|`IS31FL3743A_SYNC_SLAVE` |Driver configured as slave |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3743A_SW_PULLDOWN IS31FL3743A_PDR_2K_OHM_SW_OFF
|
||||
#define IS31FL3743A_CS_PULLUP IS31FL3743A_PUR_2K_OHM_CS_OFF
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3743A_SW_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|--------------------------------|------------------------------|
|
||||
|`IS31FL3743A_PDR_0_OHM` |None (default) |
|
||||
|`IS31FL3743A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
|
||||
|`IS31FL3743A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
|
||||
|`IS31FL3743A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
|
||||
|`IS31FL3743A_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3743A_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3743A_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3743A_PDR_8K_OHM` |8 kΩ |
|
||||
|
||||
Valid values for `IS31FL3743A_CS_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|--------------------------------|------------------------------|
|
||||
|`IS31FL3743A_PUR_0_OHM` |None (default) |
|
||||
|`IS31FL3743A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
|
||||
|`IS31FL3743A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
|
||||
|`IS31FL3743A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
|
||||
|`IS31FL3743A_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3743A_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3743A_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3743A_PUR_8K_OHM` |8 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3743A_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3743a_led_t PROGMEM g_is31fl3743a_leds[IS31FL3743A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 12, figure 8.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3743a_led_t` {#api-is31fl3743a-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3743a-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_init(uint8_t index)` {#api-is31fl3743a-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3743a-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3743a-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3743a_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_value(int index, uint8_t value)` {#api-is31fl3743a-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3743a_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_value_all(uint8_t value)` {#api-is31fl3743a-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3743a-set-scaling-register-rgb}
|
||||
|
||||
Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-scaling-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3743a_leds` array).
|
||||
- `uint8_t red`
|
||||
The scaling value for the red channel.
|
||||
- `uint8_t green`
|
||||
The scaling value for the green channel.
|
||||
- `uint8_t blue`
|
||||
The scaling value for the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3743a-set-scaling-register-mono}
|
||||
|
||||
Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3743a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-set-scaling-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3743a_leds` array).
|
||||
- `uint8_t value`
|
||||
The scaling value for the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_update_pwm_buffers(uint8_t index)` {#api-is31fl3743a-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3743a_update_scaling_registers(uint8_t index)` {#api-is31fl3743a-update-scaling-registers}
|
||||
|
||||
Flush the scaling register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3743a-update-scaling-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
320
docs/drivers/is31fl3745.md
Normal file
320
docs/drivers/is31fl3745.md
Normal file
@@ -0,0 +1,320 @@
|
||||
# IS31FL3745 Driver {#is31fl3745-driver}
|
||||
|
||||
I²C 18x8 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 144 single-color LEDs, or 48 RGB LEDs.
|
||||
|
||||
[IS31FL3745 Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3745_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3745 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3745` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3745-mono.c # For single-color
|
||||
SRC += is31fl3745.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3745_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3745_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3745_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3745_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3745_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3745_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3745_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3745_SYNC_1` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 0 |
|
||||
|`IS31FL3745_SYNC_2` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 1 |
|
||||
|`IS31FL3745_SYNC_3` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 2 |
|
||||
|`IS31FL3745_SYNC_4` |`IS31FL3745_SYNC_NONE` |The sync configuration for driver 3 |
|
||||
|`IS31FL3745_CONFIGURATION` |`0x31` |The value of the configuration register |
|
||||
|`IS31FL3745_SW_PULLDOWN` |`IS31FL3745_PDR_2K_OHM_SW_OFF`|The `SWx` pulldown resistor value |
|
||||
|`IS31FL3745_CS_PULLUP` |`IS31FL3745_PUR_2K_OHM_CS_OFF`|The `CSx` pullup resistor value |
|
||||
|`IS31FL3745_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3745 has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
|
||||
|
||||
To configure this, set the `IS31FL3745_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|--------------------------------|------|
|
||||
|`IS31FL3745_I2C_ADDRESS_GND_GND`|`0x20`|
|
||||
|`IS31FL3745_I2C_ADDRESS_GND_SCL`|`0x21`|
|
||||
|`IS31FL3745_I2C_ADDRESS_GND_SDA`|`0x22`|
|
||||
|`IS31FL3745_I2C_ADDRESS_GND_VCC`|`0x23`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SCL_GND`|`0x24`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SCL_SCL`|`0x25`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SCL_SDA`|`0x26`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SCL_VCC`|`0x27`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SDA_GND`|`0x28`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SDA_SCL`|`0x29`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SDA_SDA`|`0x2A`|
|
||||
|`IS31FL3745_I2C_ADDRESS_SDA_VCC`|`0x2B`|
|
||||
|`IS31FL3745_I2C_ADDRESS_VCC_GND`|`0x2C`|
|
||||
|`IS31FL3745_I2C_ADDRESS_VCC_SCL`|`0x2D`|
|
||||
|`IS31FL3745_I2C_ADDRESS_VCC_SDA`|`0x2E`|
|
||||
|`IS31FL3745_I2C_ADDRESS_VCC_VCC`|`0x2F`|
|
||||
|
||||
### Multi-Driver Synchronization {#multi-driver-synchronization}
|
||||
|
||||
Multiple IS31FL3745 drivers can be synchronized by connecting the `SYNC` pins together. One driver must be designated as the "master", and the others configured as "slave".
|
||||
|
||||
To do this, set the `IS31FL3745_SYNC_n` defines accordingly in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|------------------------|---------------------------|
|
||||
|`IS31FL3745_SYNC_NONE` |No synchronization |
|
||||
|`IS31FL3745_SYNC_MASTER`|Driver configured as master|
|
||||
|`IS31FL3745_SYNC_SLAVE` |Driver configured as slave |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3745_SW_PULLDOWN IS31FL3745_PDR_2K_OHM_SW_OFF
|
||||
#define IS31FL3745_CS_PULLUP IS31FL3745_PUR_2K_OHM_CS_OFF
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3745_SW_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|-------------------------------|------------------------------|
|
||||
|`IS31FL3745_PDR_0_OHM` |None (default) |
|
||||
|`IS31FL3745_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
|
||||
|`IS31FL3745_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
|
||||
|`IS31FL3745_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
|
||||
|`IS31FL3745_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3745_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3745_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3745_PDR_8K_OHM` |8 kΩ |
|
||||
|
||||
Valid values for `IS31FL3745_CS_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|-------------------------------|------------------------------|
|
||||
|`IS31FL3745_PUR_0_OHM` |None (default) |
|
||||
|`IS31FL3745_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
|
||||
|`IS31FL3745_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
|
||||
|`IS31FL3745_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
|
||||
|`IS31FL3745_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3745_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3745_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3745_PUR_8K_OHM` |8 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3745_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3745_led_t PROGMEM g_is31fl3745_leds[IS31FL3745_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 12, figure 9.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3745_led_t` {#api-is31fl3745-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3745-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_init(uint8_t index)` {#api-is31fl3745-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3745-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3745-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3745-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_select_page(uint8_t index, uint8_t page)` {#api-is31fl3745-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3745-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3745_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_value(int index, uint8_t value)` {#api-is31fl3745-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3745_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_value_all(uint8_t value)` {#api-is31fl3745-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3745-set-scaling-register-rgb}
|
||||
|
||||
Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-scaling-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3745_leds` array).
|
||||
- `uint8_t red`
|
||||
The scaling value for the red channel.
|
||||
- `uint8_t green`
|
||||
The scaling value for the green channel.
|
||||
- `uint8_t blue`
|
||||
The scaling value for the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3745-set-scaling-register-mono}
|
||||
|
||||
Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3745_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3745-set-scaling-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3745_leds` array).
|
||||
- `uint8_t value`
|
||||
The scaling value for the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_update_pwm_buffers(uint8_t index)` {#api-is31fl3745-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3745-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3745_update_scaling_registers(uint8_t index)` {#api-is31fl3745-update-scaling-registers}
|
||||
|
||||
Flush the scaling register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3745-update-scaling-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
327
docs/drivers/is31fl3746a.md
Normal file
327
docs/drivers/is31fl3746a.md
Normal file
@@ -0,0 +1,327 @@
|
||||
# IS31FL3746A Driver {#is31fl3746a-driver}
|
||||
|
||||
I²C 18x4 LED matrix driver by Lumissil. Supports a maximum of four drivers, each controlling up to 72 single-color LEDs, or 24 RGB LEDs.
|
||||
|
||||
[IS31FL3746A Datasheet](https://www.lumissil.com/assets/pdf/core/IS31FL3746A_DS.pdf)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The IS31FL3746A driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `is31fl3746a` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3746a-mono.c # For single-color
|
||||
SRC += is31fl3746a.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|-----------------------------|----------------------------------|----------------------------------------------------|
|
||||
|`IS31FL3746A_SDB_PIN` |*Not defined* |The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`IS31FL3746A_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`IS31FL3746A_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`IS31FL3746A_I2C_ADDRESS_1` |*Not defined* |The I²C address of driver 0 |
|
||||
|`IS31FL3746A_I2C_ADDRESS_2` |*Not defined* |The I²C address of driver 1 |
|
||||
|`IS31FL3746A_I2C_ADDRESS_3` |*Not defined* |The I²C address of driver 2 |
|
||||
|`IS31FL3746A_I2C_ADDRESS_4` |*Not defined* |The I²C address of driver 3 |
|
||||
|`IS31FL3746A_CONFIGURATION` |`0x01` |The value of the configuration register |
|
||||
|`IS31FL3746A_PWM_FREQUENCY` |`IS31FL3746A_PWM_FREQUENCY_29K_HZ`|The PWM frequency of the LEDs |
|
||||
|`IS31FL3746A_SW_PULLDOWN` |`IS31FL3746A_PDR_2K_OHM_SW_OFF` |The `SWx` pulldown resistor value |
|
||||
|`IS31FL3746A_CS_PULLUP` |`IS31FL3746A_PUR_2K_OHM_CS_OFF` |The `CSx` pullup resistor value |
|
||||
|`IS31FL3746A_GLOBAL_CURRENT` |`0xFF` |The global current control value |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The IS31FL3746A has 16 possible 7-bit I²C addresses, depending on how the `ADDR1` and `ADDR2` pins are connected.
|
||||
|
||||
To configure this, set the `IS31FL3746A_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|---------------------------------|------|
|
||||
|`IS31FL3746A_I2C_ADDRESS_GND_GND`|`0x60`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_GND_SCL`|`0x61`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_GND_SDA`|`0x62`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_GND_VCC`|`0x63`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SCL_GND`|`0x64`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SCL_SCL`|`0x65`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SCL_SDA`|`0x66`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SCL_VCC`|`0x67`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SDA_GND`|`0x68`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SDA_SCL`|`0x69`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SDA_SDA`|`0x6A`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_SDA_VCC`|`0x6B`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_VCC_GND`|`0x6C`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_VCC_SCL`|`0x6D`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_VCC_SDA`|`0x6E`|
|
||||
|`IS31FL3746A_I2C_ADDRESS_VCC_VCC`|`0x6F`|
|
||||
|
||||
### PWM Frequency {#pwm-frequency}
|
||||
|
||||
The PWM frequency can be adjusted by adding the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3746A_PWM_FREQUENCY IS31FL3746A_PWM_FREQUENCY_29K_HZ
|
||||
```
|
||||
|
||||
Valid values are:
|
||||
|
||||
|Define |Frequency |
|
||||
|-----------------------------------|----------------|
|
||||
|`IS31FL3746A_PWM_FREQUENCY_29K_HZ` |29 kHz (default)|
|
||||
|`IS31FL3746A_PWM_FREQUENCY_14K5_HZ`|14.5 kHz |
|
||||
|`IS31FL3746A_PWM_FREQUENCY_7K25_HZ`|7.25 kHz |
|
||||
|`IS31FL3746A_PWM_FREQUENCY_3K63_HZ`|3.63 kHz |
|
||||
|`IS31FL3746A_PWM_FREQUENCY_1K81_HZ`|1.81 kHz |
|
||||
|`IS31FL3746A_PWM_FREQUENCY_906_HZ` |906 Hz |
|
||||
|`IS31FL3746A_PWM_FREQUENCY_453_HZ` |453 Hz |
|
||||
|
||||
### De-Ghosting {#de-ghosting}
|
||||
|
||||
These settings control the pulldown and pullup resistor values on the `SWy` and `CSx` pins respectively, for the purposes of eliminating ghosting. Refer to the datasheet (p. 23) for more information on how and why this occurs.
|
||||
|
||||
To adjust the resistor values, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3746A_SW_PULLDOWN IS31FL3746A_PDR_2K_OHM_SW_OFF
|
||||
#define IS31FL3746A_CS_PULLUP IS31FL3746A_PUR_2K_OHM_CS_OFF
|
||||
```
|
||||
|
||||
Valid values for `IS31FL3746A_SW_PULLDOWN` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|--------------------------------|------------------------------|
|
||||
|`IS31FL3746A_PDR_0_OHM` |None |
|
||||
|`IS31FL3746A_PDR_0K5_OHM_SW_OFF`|0.5 kΩ in SWx off time |
|
||||
|`IS31FL3746A_PDR_1K_OHM_SW_OFF` |1 kΩ in SWx off time |
|
||||
|`IS31FL3746A_PDR_2K_OHM_SW_OFF` |2 kΩ in SWx off time (default)|
|
||||
|`IS31FL3746A_PDR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3746A_PDR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3746A_PDR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3746A_PDR_8K_OHM` |8 kΩ |
|
||||
|
||||
Valid values for `IS31FL3746A_CS_PULLUP` are:
|
||||
|
||||
|Define |Resistance |
|
||||
|--------------------------------|------------------------------|
|
||||
|`IS31FL3746A_PUR_0_OHM` |None (default) |
|
||||
|`IS31FL3746A_PUR_0K5_OHM_CS_OFF`|0.5 kΩ in CSy off time |
|
||||
|`IS31FL3746A_PUR_1K_OHM_CS_OFF` |1 kΩ in CSy off time |
|
||||
|`IS31FL3746A_PUR_2K_OHM_CS_OFF` |2 kΩ in CSy off time (default)|
|
||||
|`IS31FL3746A_PUR_1K_OHM` |1 kΩ |
|
||||
|`IS31FL3746A_PUR_2K_OHM` |2 kΩ |
|
||||
|`IS31FL3746A_PUR_4K_OHM` |4 kΩ |
|
||||
|`IS31FL3746A_PUR_8K_OHM` |8 kΩ |
|
||||
|
||||
### Global Current Control {#global-current-control}
|
||||
|
||||
This setting controls the current sunk by the `CSy` pins, from 0 to 255. By default, the value is the maximum (255), but if you need to lower it, add the following to your `config.h`:
|
||||
|
||||
```c
|
||||
#define IS31FL3746A_GLOBAL_CURRENT 0xFF
|
||||
```
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, SW1_CS1, SW1_CS2, SW1_CS3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their anodes connected to the `SW1` pin, and their cathodes on the `CS1`, `CS2` and `CS3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const is31fl3746a_led_t PROGMEM g_is31fl3746a_leds[IS31FL3746A_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, SW1_CS1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 13, figure 8.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct is31fl3746a_led_t` {#api-is31fl3746a-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-is31fl3746a-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_init(uint8_t index)` {#api-is31fl3746a-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t sync`
|
||||
Sync configuration of the LED driver.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-is31fl3746a-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_select_page(uint8_t index, uint8_t page)` {#api-is31fl3746a-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3746a_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_value(int index, uint8_t value)` {#api-is31fl3746a-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_is31fl3746a_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_value_all(uint8_t value)` {#api-is31fl3746a-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue)` {#api-is31fl3746a-set-scaling-register-rgb}
|
||||
|
||||
Configure the scaling registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-scaling-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3746a_leds` array).
|
||||
- `uint8_t red`
|
||||
The scaling value for the red channel.
|
||||
- `uint8_t green`
|
||||
The scaling value for the green channel.
|
||||
- `uint8_t blue`
|
||||
The scaling value for the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_set_scaling_register(uint8_t index, uint8_t value)` {#api-is31fl3746a-set-scaling-register-mono}
|
||||
|
||||
Configure the scaling register for a single LED (single-color driver only). This function does not immediately update the LEDs; call `is31fl3746a_update_scaling_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-set-scaling-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_is31fl3746a_leds` array).
|
||||
- `uint8_t value`
|
||||
The scaling value for the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_update_pwm_buffers(uint8_t index)` {#api-is31fl3746a-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void is31fl3746a_update_scaling_registers(uint8_t index)` {#api-is31fl3746a-update-scaling-registers}
|
||||
|
||||
Flush the scaling register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-is31fl3746a-update-scaling-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
@@ -1,6 +1,6 @@
|
||||
# 'serial' Driver
|
||||
|
||||
The Serial driver powers the [Split Keyboard](feature_split_keyboard) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
|
||||
The Serial driver powers the [Split Keyboard](../features/split_keyboard) feature. Several implementations are available that cater to the platform and capabilities of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
|
||||
|
||||
| Driver | AVR | ARM | Connection between halves |
|
||||
| --------------------------------------- | ------------------ | ------------------ | --------------------------------------------------------------------------------------------- |
|
||||
@@ -298,7 +298,7 @@ If you're having issues withe serial communication, you can enable debug message
|
||||
```
|
||||
|
||||
::: tip
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug).
|
||||
The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](../faq_debug).
|
||||
:::
|
||||
|
||||
## Alternate Functions for selected STM32 MCUs
|
245
docs/drivers/snled27351.md
Normal file
245
docs/drivers/snled27351.md
Normal file
@@ -0,0 +1,245 @@
|
||||
# SNLED27351 Driver {#snled27351-driver}
|
||||
|
||||
I²C 16x12 LED matrix driver by Sonix. Supports a maximum of four drivers, each controlling up to 192 single-color LEDs, or 64 RGB LEDs.
|
||||
|
||||
A slightly modified version of this IC is also known as "CKLED2001".
|
||||
|
||||
[SNLED27351 Datasheet](https://www.sonix.com.tw/files/1/D235860C0C037C28E050007F01001CBE)
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
The SNLED27351 driver code is automatically included if you are using the [LED Matrix](../features/led_matrix) or [RGB Matrix](../features/rgb_matrix) feature with the `snled27351` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add this to your `rules.mk`:
|
||||
|
||||
```make
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += snled27351-mono.c # For single-color
|
||||
SRC += snled27351.c # For RGB
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
```
|
||||
|
||||
## Basic Configuration {#basic-configuration}
|
||||
|
||||
Add the following to your `config.h`:
|
||||
|
||||
|Define |Default |Description |
|
||||
|----------------------------|-------------|----------------------------------------------------|
|
||||
|`SNLED27351_SDB_PIN` |*Not defined*|The GPIO pin connected to the drivers' shutdown pins|
|
||||
|`SNLED27351_I2C_TIMEOUT` |`100` |The I²C timeout in milliseconds |
|
||||
|`SNLED27351_I2C_PERSISTENCE`|`0` |The number of times to retry I²C transmissions |
|
||||
|`SNLED27351_I2C_ADDRESS_1` |*Not defined*|The I²C address of driver 0 |
|
||||
|`SNLED27351_I2C_ADDRESS_2` |*Not defined*|The I²C address of driver 1 |
|
||||
|`SNLED27351_I2C_ADDRESS_3` |*Not defined*|The I²C address of driver 2 |
|
||||
|`SNLED27351_I2C_ADDRESS_4` |*Not defined*|The I²C address of driver 3 |
|
||||
|
||||
### I²C Addressing {#i2c-addressing}
|
||||
|
||||
The SNLED27351 has four possible 7-bit I²C addresses, depending on how the `ADDR` pin is connected.
|
||||
|
||||
To configure this, set the `SNLED27351_I2C_ADDRESS_n` defines to one of the following in your `config.h`, where *n* denotes the driver index:
|
||||
|
||||
|Define |Value |
|
||||
|------------------------------|------|
|
||||
|`SNLED27351_I2C_ADDRESS_GND` |`0x74`|
|
||||
|`SNLED27351_I2C_ADDRESS_SCL` |`0x75`|
|
||||
|`SNLED27351_I2C_ADDRESS_SDA` |`0x76`|
|
||||
|`SNLED27351_I2C_ADDRESS_VDDIO`|`0x77`|
|
||||
|
||||
## ARM/ChibiOS Configuration {#arm-configuration}
|
||||
|
||||
Depending on the ChibiOS board configuration, you may need to [enable and configure I²C](i2c#arm-configuration) at the keyboard level.
|
||||
|
||||
## LED Mapping {#led-mapping}
|
||||
|
||||
In order to use this driver, each output must be mapped to an LED index, by adding the following to your `<keyboardname>.c`:
|
||||
|
||||
```c
|
||||
const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | R G B */
|
||||
{0, CB1_CA1, CB1_CA2, CB1_CA3},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
In this example, the red, green and blue channels for the first LED index on driver 0 all have their cathodes connected to the `CB1` pin, and their anodes on the `CA1`, `CA2` and `CA3` pins respectively.
|
||||
|
||||
For the single-color driver, the principle is the same, but there is only one channel:
|
||||
|
||||
```c
|
||||
const snled27351_led_t PROGMEM g_snled27351_leds[SNLED27351_LED_COUNT] = {
|
||||
/* Driver
|
||||
* | V */
|
||||
{0, CB1_CA1},
|
||||
// etc...
|
||||
};
|
||||
```
|
||||
|
||||
These values correspond to the register indices as shown in the datasheet on page 13.
|
||||
|
||||
## API {#api}
|
||||
|
||||
### `struct snled27351_led_t` {#api-snled27351-led-t}
|
||||
|
||||
Contains the PWM register addresses for a single RGB LED.
|
||||
|
||||
#### Members {#api-snled27351-led-t-members}
|
||||
|
||||
- `uint8_t driver`
|
||||
The driver index of the LED, from 0 to 3.
|
||||
- `uint8_t r`
|
||||
The output PWM register address for the LED's red channel (RGB driver only).
|
||||
- `uint8_t g`
|
||||
The output PWM register address for the LED's green channel (RGB driver only).
|
||||
- `uint8_t b`
|
||||
The output PWM register address for the LED's blue channel (RGB driver only).
|
||||
- `uint8_t v`
|
||||
The output PWM register address for the LED (single-color driver only).
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_init(uint8_t index)` {#api-snled27351-init}
|
||||
|
||||
Initialize the LED driver. This function should be called first.
|
||||
|
||||
#### Arguments {#api-snled27351-init-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_write_register(uint8_t index, uint8_t reg, uint8_t data)` {#api-snled27351-write-register}
|
||||
|
||||
Set the value of the given register.
|
||||
|
||||
#### Arguments {#api-snled27351-write-register-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t reg`
|
||||
The register address.
|
||||
- `uint8_t data`
|
||||
The value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_select_page(uint8_t index, uint8_t page)` {#api-snled27351-select-page}
|
||||
|
||||
Change the current page for configuring the LED driver.
|
||||
|
||||
#### Arguments {#api-snled27351-select-page-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
- `uint8_t page`
|
||||
The page number to select.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_color(int index, uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color}
|
||||
|
||||
Set the color of a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-snled27351-set-color-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_snled27351_leds` array).
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_color_all(uint8_t red, uint8_t green, uint8_t blue)` {#api-snled27351-set-color-all}
|
||||
|
||||
Set the color of all LEDs (RGB driver only).
|
||||
|
||||
#### Arguments {#api-snled27351-set-color-all-arguments}
|
||||
|
||||
- `uint8_t red`
|
||||
The red value to set.
|
||||
- `uint8_t green`
|
||||
The green value to set.
|
||||
- `uint8_t blue`
|
||||
The blue value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_value(int index, uint8_t value)` {#api-snled27351-set-value}
|
||||
|
||||
Set the brightness of a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_pwm_buffers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-snled27351-set-value-arguments}
|
||||
|
||||
- `int index`
|
||||
The LED index (ie. the index into the `g_snled27351_leds` array).
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_value_all(uint8_t value)` {#api-snled27351-set-value-all}
|
||||
|
||||
Set the brightness of all LEDs (single-color driver only).
|
||||
|
||||
#### Arguments {#api-snled27351-set-value-all-arguments}
|
||||
|
||||
- `uint8_t value`
|
||||
The brightness value to set.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_led_control_register(uint8_t index, bool red, bool green, bool blue)` {#api-snled27351-set-led-control-register-rgb}
|
||||
|
||||
Configure the LED control registers for a single LED (RGB driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-snled27351-set-led-control-register-rgb-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_snled27351_leds` array).
|
||||
- `bool red`
|
||||
Enable or disable the red channel.
|
||||
- `bool green`
|
||||
Enable or disable the green channel.
|
||||
- `bool blue`
|
||||
Enable or disable the blue channel.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_set_led_control_register(uint8_t index, bool value)` {#api-snled27351-set-led-control-register-mono}
|
||||
|
||||
Configure the LED control registers for a single LED (single-color driver only). This function does not immediately update the LEDs; call `snled27351_update_led_control_registers()` after you are finished.
|
||||
|
||||
#### Arguments {#api-snled27351-set-led-control-register-mono-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The LED index (ie. the index into the `g_snled27351_leds` array).
|
||||
- `bool value`
|
||||
Enable or disable the LED.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_update_pwm_buffers(uint8_t index)` {#api-snled27351-update-pwm-buffers}
|
||||
|
||||
Flush the PWM values to the LED driver.
|
||||
|
||||
#### Arguments {#api-snled27351-update-pwm-buffers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
||||
|
||||
---
|
||||
|
||||
### `void snled27351_update_led_control_registers(uint8_t index)` {#api-snled27351-update-led-control-registers}
|
||||
|
||||
Flush the LED control register values to the LED driver.
|
||||
|
||||
#### Arguments {#api-snled27351-update-led-control-registers-arguments}
|
||||
|
||||
- `uint8_t index`
|
||||
The driver index.
|
@@ -4,7 +4,7 @@ The SPI Master drivers used in QMK have a set of common functions to allow porta
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](feature_oled_driver).
|
||||
In most cases, the SPI Master driver code is automatically included if you are using a feature or driver which requires it, such as [OLED](../features/oled_driver).
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -10,7 +10,7 @@ The LEDs can be chained together, and the remaining data is passed on to the nex
|
||||
|
||||
## Usage {#usage}
|
||||
|
||||
In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](feature_rgblight) or [RGB Matrix](feature_rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead.
|
||||
In most cases, the WS2812 driver code is automatically included if you are using either the [RGBLight](../features/rgblight) or [RGB Matrix](../features/rgb_matrix) feature with the `ws2812` driver set, and you would use those APIs instead.
|
||||
|
||||
However, if you need to use the driver standalone, add the following to your `rules.mk`:
|
||||
|
@@ -5,7 +5,7 @@ Have you ever needed an easy way to program a controller, such as a Proton C or
|
||||
There are different styles of Easy Maker available depending on your needs:
|
||||
|
||||
* [Direct Pin](https://config.qmk.fm/#/?filter=ez_maker/direct) - Connect a single switch to a single pin
|
||||
* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](feature_backlight) control
|
||||
* Direct Pin + Backlight (Coming Soon) - Like Direct Pin but dedicates a single pin to [Backlight](features/backlight) control
|
||||
* Direct Pin + Numlock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Numlock LED
|
||||
* Direct Pin + Capslock (Coming Soon) - Like Direct Pin but dedicates a single pin to the Capslock LED
|
||||
* Direct Pin + Encoder (Coming Soon) - Like Direct Pin but uses 2 pins to add a single rotary encoder
|
||||
|
@@ -66,4 +66,4 @@ Due to how EEPROM works on ARM based chips, saved settings may no longer be vali
|
||||
[Planck rev6 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/539284620861243409/planck_rev6_default.bin) can be used to force an eeprom reset. After flashing this image, flash your normal firmware again which should restore your keyboard to _normal_ working order.
|
||||
[Preonic rev3 reset EEPROM](https://cdn.discordapp.com/attachments/473506116718952450/537849497313738762/preonic_rev3_default.bin)
|
||||
|
||||
If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](feature_bootmagic) and keyboard info for specifics on how to do this).
|
||||
If bootmagic is enabled in any form, you should be able to do this too (see [Bootmagic docs](features/bootmagic) and keyboard info for specifics on how to do this).
|
||||
|
@@ -4,7 +4,7 @@ This page details various common questions people have about troubleshooting the
|
||||
|
||||
## Debugging {#debugging}
|
||||
|
||||
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](feature_command) feature to enable debug mode, or add the following code to your keymap.
|
||||
Your keyboard will output debug information if you have `CONSOLE_ENABLE = yes` in your `rules.mk`. By default the output is very limited, but you can turn on debug mode to increase the amount of debug output. Use the `DB_TOGG` keycode in your keymap, use the [Command](features/command) feature to enable debug mode, or add the following code to your keymap.
|
||||
|
||||
```c
|
||||
void keyboard_post_init_user(void) {
|
||||
|
@@ -45,7 +45,7 @@ QMK has a couple of features which allow you to change the behavior of your keyb
|
||||
Refer to the EEPROM clearing methods above, which should return those keys to normal operation. If that doesn't work, look here:
|
||||
|
||||
* [Magic Keycodes](keycodes_magic)
|
||||
* [Command](feature_command)
|
||||
* [Command](features/command)
|
||||
|
||||
## The Menu Key Isn't Working
|
||||
|
||||
@@ -86,7 +86,7 @@ Old vintage mechanical keyboards occasionally have lock switches but modern ones
|
||||
|
||||
## Input Special Characters Other Than ASCII like Cédille 'Ç'
|
||||
|
||||
See the [Unicode](feature_unicode) feature.
|
||||
See the [Unicode](features/unicode) feature.
|
||||
|
||||
## `Fn` Key on macOS
|
||||
|
||||
@@ -130,7 +130,7 @@ https://github.com/tekezo/Karabiner/issues/403
|
||||
|
||||
## Esc and <code>`</code> on a Single Key
|
||||
|
||||
See the [Grave Escape](feature_grave_esc) feature.
|
||||
See the [Grave Escape](features/grave_esc) feature.
|
||||
|
||||
## Eject on Mac OSX
|
||||
|
||||
|
@@ -160,7 +160,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
};
|
||||
```
|
||||
Alternatively, this can be done with [Key Overrides](feature_key_overrides#simple-example).
|
||||
Alternatively, this can be done with [Key Overrides](features/key_overrides#simple-example).
|
||||
|
||||
# Advanced topics {#advanced-topics}
|
||||
|
||||
@@ -184,4 +184,4 @@ This page used to encompass a large set of features. We have moved many sections
|
||||
|
||||
## Key Overrides {#key-overrides}
|
||||
|
||||
* [Key Overrides](feature_key_overrides)
|
||||
* [Key Overrides](features/key_overrides)
|
||||
|
@@ -10,7 +10,7 @@ The following converters are available at this time:
|
||||
|------------|-------------------|
|
||||
| `promicro` | `proton_c` |
|
||||
| `promicro` | `kb2040` |
|
||||
| `promicro` | `promicro_rp2040` |
|
||||
| `promicro` | `sparkfun_pm2040` |
|
||||
| `promicro` | `blok` |
|
||||
| `promicro` | `bit_c_pro` |
|
||||
| `promicro` | `stemcell` |
|
||||
@@ -39,7 +39,7 @@ qmk flash -c -kb keebio/bdn9/rev1 -km default -e CONVERT_TO=proton_c
|
||||
You can also add the same `CONVERT_TO=<target>` to your keymap's `rules.mk`, which will accomplish the same thing.
|
||||
|
||||
::: tip
|
||||
If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](gpio_control) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all.
|
||||
If you get errors about `PORTB/DDRB`, etc not being defined, you'll need to convert the keyboard's code to use the [GPIO Controls](drivers/gpio) that will work for both ARM and AVR. This shouldn't affect the AVR builds at all.
|
||||
:::
|
||||
|
||||
### Conditional Configuration
|
||||
@@ -77,7 +77,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co
|
||||
|------------------------------------------------------------------------------------------|-------------------|
|
||||
| [Proton C](https://qmk.fm/proton-c/) | `proton_c` |
|
||||
| [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) | `kb2040` |
|
||||
| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `promicro_rp2040` |
|
||||
| [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) | `sparkfun_pm2040` |
|
||||
| [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) | `blok` |
|
||||
| [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` |
|
||||
| [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` |
|
||||
@@ -94,7 +94,7 @@ Converter summary:
|
||||
|-------------------|---------------------------------|------------------------------|-------------------------------------|
|
||||
| `proton_c` | `-e CONVERT_TO=proton_c` | `CONVERT_TO=proton_c` | `#ifdef CONVERT_TO_PROTON_C` |
|
||||
| `kb2040` | `-e CONVERT_TO=kb2040` | `CONVERT_TO=kb2040` | `#ifdef CONVERT_TO_KB2040` |
|
||||
| `promicro_rp2040` | `-e CONVERT_TO=promicro_rp2040` | `CONVERT_TO=promicro_rp2040` | `#ifdef CONVERT_TO_PROMICRO_RP2040` |
|
||||
| `sparkfun_pm2040` | `-e CONVERT_TO=sparkfun_pm2040` | `CONVERT_TO=sparkfun_pm2040` | `#ifdef CONVERT_TO_SPARKFUN_PM2040` |
|
||||
| `blok` | `-e CONVERT_TO=blok` | `CONVERT_TO=blok` | `#ifdef CONVERT_TO_BLOK` |
|
||||
| `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` |
|
||||
| `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` |
|
||||
@@ -118,11 +118,11 @@ The following defaults are based on what has been implemented for STM32 boards.
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [Audio](feature_audio) | Enabled |
|
||||
| [RGB Lighting](feature_rgblight) | Disabled |
|
||||
| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| [Audio](features/audio) | Enabled |
|
||||
| [RGB Lighting](features/rgblight) | Disabled |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](feature_split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
| [Split keyboards](features/split_keyboard) | Partial - heavily dependent on enabled features |
|
||||
|
||||
### Adafruit KB2040 {#kb2040}
|
||||
|
||||
@@ -130,12 +130,12 @@ The following defaults are based on what has been implemented for [RP2040](platf
|
||||
|
||||
| Feature | Notes |
|
||||
|----------------------------------------------|------------------------------------------------------------------------------------------------------------------|
|
||||
| [RGB Lighting](feature_rgblight) | Enabled via `PIO` vendor driver |
|
||||
| [Backlight](feature_backlight) | Forces [task driven PWM](feature_backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| [RGB Lighting](features/rgblight) | Enabled via `PIO` vendor driver |
|
||||
| [Backlight](features/backlight) | Forces [task driven PWM](features/backlight#software-pwm-driver) until ARM can provide automatic configuration |
|
||||
| USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) |
|
||||
| [Split keyboards](feature_split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
| [Split keyboards](features/split_keyboard) | Partial via `PIO` vendor driver - heavily dependent on enabled features |
|
||||
|
||||
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#promicro_rp2040 }
|
||||
### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO and Michi {#sparkfun_pm2040 }
|
||||
|
||||
Feature set is identical to [Adafruit KB2040](#kb2040).
|
||||
|
||||
|
@@ -109,7 +109,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
```
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](feature_bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
And lastly, you want to add the `eeconfig_init_user` function, so that when the EEPROM is reset, you can specify default values, and even custom actions. To force an EEPROM reset, use the `EE_CLR` keycode or [Bootmagic Lite](features/bootmagic) functionallity. For example, if you want to set rgb layer indication by default, and save the default valued.
|
||||
|
||||
```c
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
|
@@ -27,7 +27,7 @@ For a similar reason, the `layer` argument of `LM()` is also limited to layers 0
|
||||
|:---------------:|:----------------------:|:------------------------:|:----------------:|
|
||||
| ❌ | ❌ | ❌ | ✅ |
|
||||
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](feature_tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
Expanding this would be complicated, at best. Moving to a 32-bit keycode would solve a lot of this, but would double the amount of space that the keymap matrix uses. And it could potentially cause issues, too. If you need to apply modifiers to your tapped keycode, [Tap Dance](features/tap_dance#example-5-using-tap-dance-for-advanced-mod-tap-and-layer-tap-keys) can be used to accomplish this.
|
||||
|
||||
## Working with Layers {#working-with-layers}
|
||||
|
||||
@@ -104,7 +104,7 @@ This runs code every time that the layers get changed. This can be useful for l
|
||||
|
||||
### Example `layer_state_set_*` Implementation
|
||||
|
||||
This example shows how to set the [RGB Underglow](feature_rgblight) lights based on the layer, using the Planck as an example.
|
||||
This example shows how to set the [RGB Underglow](features/rgblight) lights based on the layer, using the Planck as an example.
|
||||
|
||||
```c
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
|
@@ -37,17 +37,23 @@ New names should try to stick to the standards set by existing layouts, and can
|
||||
|
||||
For a keyboard to support a layout, the variable must be defined in it's `<keyboard>.h`, and match the number of arguments/keys (and preferably the physical layout):
|
||||
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
```c
|
||||
#define LAYOUT_60_ansi KEYMAP_ANSI
|
||||
```
|
||||
|
||||
The name of the layout must match this regex: `[a-z0-9_]+`
|
||||
|
||||
The folder name must be added to the keyboard's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_ansi
|
||||
```
|
||||
LAYOUTS = 60_ansi
|
||||
```
|
||||
|
||||
`LAYOUTS` can be set in any keyboard folder level's `rules.mk`:
|
||||
|
||||
LAYOUTS = 60_iso
|
||||
```
|
||||
LAYOUTS = 60_iso
|
||||
```
|
||||
|
||||
but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
@@ -55,12 +61,16 @@ but the `LAYOUT_<layout>` variable must be defined in `<folder>.h` as well.
|
||||
|
||||
You should be able to build the keyboard keymap with a command in this format:
|
||||
|
||||
make <keyboard>:<layout>
|
||||
```
|
||||
make <keyboard>:<layout>
|
||||
```
|
||||
|
||||
### Conflicting layouts
|
||||
When a keyboard supports multiple layout options,
|
||||
|
||||
LAYOUTS = ortho_4x4 ortho_4x12
|
||||
```
|
||||
LAYOUTS = ortho_4x4 ortho_4x12
|
||||
```
|
||||
|
||||
And a layout exists for both options,
|
||||
```
|
||||
@@ -77,8 +87,10 @@ layouts/
|
||||
|
||||
The FORCE_LAYOUT argument can be used to specify which layout to build
|
||||
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x4
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x12
|
||||
```
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x4
|
||||
make <keyboard>:<layout> FORCE_LAYOUT=ortho_4x12
|
||||
```
|
||||
|
||||
## Tips for Making Layouts Keyboard-Agnostic
|
||||
|
||||
@@ -86,7 +98,9 @@ The FORCE_LAYOUT argument can be used to specify which layout to build
|
||||
|
||||
Instead of using `#include "planck.h"`, you can use this line to include whatever `<keyboard>.h` (`<folder>.h` should not be included here) file that is being compiled:
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
```c
|
||||
#include QMK_KEYBOARD_H
|
||||
```
|
||||
|
||||
If you want to keep some keyboard-specific code, you can use these variables to escape it with an `#ifdef` statement:
|
||||
|
||||
|
@@ -86,7 +86,7 @@ All objects have one required key: `action`. This tells QMK what the object does
|
||||
Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_` prefix when listing keycodes.
|
||||
|
||||
* `beep`
|
||||
* Play a bell if the keyboard has [audio enabled](feature_audio).
|
||||
* Play a bell if the keyboard has [audio enabled](features/audio).
|
||||
* Example: `{"action": "beep"}`
|
||||
* `delay`
|
||||
* Pause macro playback. Duration is specified in milliseconds (ms).
|
||||
@@ -108,7 +108,7 @@ Only basic keycodes (prefixed by `KC_`) are supported. Do not include the `KC_`
|
||||
|
||||
### `SEND_STRING()` & `process_record_user`
|
||||
|
||||
See also: [Send String](feature_send_string)
|
||||
See also: [Send String](features/send_string)
|
||||
|
||||
Sometimes you want a key to type out words or phrases. For the most common situations, we've provided `SEND_STRING()`, which will type out a string (i.e. a sequence of characters) for you. All ASCII characters that are easily translatable to a keycode are supported (e.g. `qmk 123\n\t`).
|
||||
|
||||
@@ -252,11 +252,15 @@ You can send arbitrary keycodes by wrapping them in:
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
```c
|
||||
SEND_STRING(SS_TAP(X_HOME));
|
||||
```
|
||||
|
||||
Would tap `KC_HOME` - note how the prefix is now `X_`, and not `KC_`. You can also combine this with other strings, like this:
|
||||
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
```c
|
||||
SEND_STRING("VE"SS_TAP(X_HOME)"LO");
|
||||
```
|
||||
|
||||
Which would send "VE" followed by a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline).
|
||||
|
||||
@@ -266,7 +270,9 @@ Delays can be also added to the string:
|
||||
|
||||
For example:
|
||||
|
||||
SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
|
||||
```c
|
||||
SEND_STRING("VE" SS_DELAY(1000) SS_TAP(X_HOME) "LO");
|
||||
```
|
||||
|
||||
Which would send "VE" followed by a 1-second delay, then a `KC_HOME` tap, and "LO" (spelling "LOVE" if on a newline, but delayed in the middle).
|
||||
|
||||
@@ -284,7 +290,9 @@ There's also a couple of mod shortcuts you can use:
|
||||
These press the respective modifier, send the supplied string and then release the modifier.
|
||||
They can be used like this:
|
||||
|
||||
SEND_STRING(SS_LCTL("a"));
|
||||
```c
|
||||
SEND_STRING(SS_LCTL("a"));
|
||||
```
|
||||
|
||||
Which would send Left Control+`a` (Left Control down, `a`, Left Control up) - notice that they take strings (eg `"k"`), and not the `X_K` keycodes.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@ per speaker is - for example with a piezo buzzer - the black lead to Ground, and
|
||||
|
||||
|
||||
## ARM based boards
|
||||
for more technical details, see the notes on [Audio driver](audio_driver).
|
||||
for more technical details, see the notes on [Audio driver](../drivers/audio).
|
||||
|
||||
<!-- because I'm not sure where to fit this in: https://waveeditonline.com/ -->
|
||||
### DAC (basic)
|
||||
@@ -196,7 +196,7 @@ These keycodes turn all of the audio functionality on and off. Turning it off m
|
||||
|`GUITAR_SONG` | `GUITAR_SOUND` |Plays when the guitar music mode is selected (process_music.c) |
|
||||
|`VIOLIN_SONG` | `VIOLIN_SOUND` |Plays when the violin music mode is selected (process_music.c) |
|
||||
|`MAJOR_SONG` | `MAJOR_SOUND` |Plays when the major music mode is selected (process_music.c) |
|
||||
|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](ref_functions.md#setting-the-persistent-default-layer)(quantum.c). |
|
||||
|`DEFAULT_LAYER_SONGS` | *Not defined* |Plays song when switched default layers with [`set_single_persistent_default_layer(layer)`](../ref_functions#setting-the-persistent-default-layer)(quantum.c). |
|
||||
|`SENDSTRING_BELL` | *Not defined* |Plays chime when the "enter" ("\a") character is sent (send_string.c) |
|
||||
|
||||
## Tempo
|
||||
@@ -263,31 +263,39 @@ In music mode, the following keycodes work differently, and don't pass through:
|
||||
|
||||
The pitch standard (`PITCH_STANDARD_A`) is 440.0f by default - to change this, add something like this to your `config.h`:
|
||||
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
```c
|
||||
#define PITCH_STANDARD_A 432.0f
|
||||
```
|
||||
|
||||
You can completely disable Music Mode as well. This is useful, if you're pressed for space on your controller. To disable it, add this to your `config.h`:
|
||||
|
||||
#define NO_MUSIC_MODE
|
||||
```c
|
||||
#define NO_MUSIC_MODE
|
||||
```
|
||||
|
||||
### Music Mask
|
||||
|
||||
By default, `MUSIC_MASK` is set to `keycode < 0xFF` which means keycodes less than `0xFF` are turned into notes, and don't output anything. You can change this by defining this in your `config.h` like this:
|
||||
|
||||
#define MUSIC_MASK keycode != KC_NO
|
||||
```c
|
||||
#define MUSIC_MASK keycode != KC_NO
|
||||
```
|
||||
|
||||
Which will capture all keycodes - be careful, this will get you stuck in music mode until you restart your keyboard!
|
||||
|
||||
For a more advanced way to control which keycodes should still be processed, you can use `music_mask_kb(keycode)` in `<keyboard>.c` and `music_mask_user(keycode)` in your `keymap.c`:
|
||||
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
```c
|
||||
bool music_mask_user(uint16_t keycode) {
|
||||
switch (keycode) {
|
||||
case RAISE:
|
||||
case LOWER:
|
||||
return false;
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Things that return false are not part of the mask, and are always processed.
|
||||
|
||||
@@ -329,8 +337,9 @@ Keycodes available:
|
||||
|
||||
The feature is disabled by default, to save space. To enable it, add this to your `config.h`:
|
||||
|
||||
#define AUDIO_CLICKY
|
||||
|
||||
```c
|
||||
#define AUDIO_CLICKY
|
||||
```
|
||||
|
||||
You can configure the default, min and max frequencies, the stepping and built in randomness by defining these values:
|
||||
|
||||
@@ -343,12 +352,9 @@ You can configure the default, min and max frequencies, the stepping and built i
|
||||
| `AUDIO_CLICKY_FREQ_RANDOMNESS` | 0.05f | Sets a factor of randomness for the clicks, Setting this to `0f` will make each click identical, and `1.0f` will make this sound much like the 90's computer screen scrolling/typing effect. |
|
||||
| `AUDIO_CLICKY_DELAY_DURATION` | 1 | An integer note duration where 1 is 1/16th of the tempo, or a sixty-fourth note (see `quantum/audio/musical_notes.h` for implementation details). The main clicky effect will be delayed by this duration. Adjusting this to values around 6-12 will help compensate for loud switches. |
|
||||
|
||||
|
||||
|
||||
|
||||
## MIDI Functionality
|
||||
|
||||
See [MIDI](feature_midi)
|
||||
See [MIDI](midi)
|
||||
|
||||
## Audio Keycodes
|
||||
|
@@ -51,7 +51,9 @@ Yes, unfortunately.
|
||||
|
||||
Add to your `rules.mk` in the keymap folder:
|
||||
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
```
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
```
|
||||
|
||||
If no `rules.mk` exists, you can create one.
|
||||
|
||||
@@ -292,7 +294,7 @@ Holding and releasing a Tap Hold key without pressing another key will ordinaril
|
||||
result in only the hold. With `retro shift` enabled this action will instead
|
||||
produce a shifted version of the tap keycode on release.
|
||||
|
||||
It does not require [Retro Tapping](tap_hold#retro-tapping) to be enabled, and
|
||||
It does not require [Retro Tapping](../tap_hold#retro-tapping) to be enabled, and
|
||||
if both are enabled the state of `retro tapping` will only apply if the tap keycode
|
||||
is not matched by Auto Shift. `RETRO_TAPPING_PER_KEY` and its corresponding
|
||||
function, however, are checked before `retro shift` is applied.
|
||||
@@ -316,10 +318,10 @@ Without a value set, holds of any length without an interrupting key will produc
|
||||
|
||||
This value (if set) must be greater than one's `TAPPING_TERM`, as the key press
|
||||
must be designated as a 'hold' by `process_tapping` before we send the modifier.
|
||||
[Per-key tapping terms](tap_hold#tapping-term) can be used as a workaround.
|
||||
[Per-key tapping terms](../tap_hold#tapping-term) can be used as a workaround.
|
||||
There is no such limitation in regards to `AUTO_SHIFT_TIMEOUT` for normal keys.
|
||||
|
||||
**Note:** Tap Holds must be added to Auto Shift, see [here.](feature_auto_shift#auto-shift-per-key)
|
||||
**Note:** Tap Holds must be added to Auto Shift, see [here.](auto_shift#auto-shift-per-key)
|
||||
`IS_RETRO` may be helpful if one wants all Tap Holds retro shifted.
|
||||
|
||||
### Retro Shift and Tap Hold Configurations
|
||||
@@ -328,7 +330,7 @@ Tap Hold Configurations work a little differently when using Retro Shift.
|
||||
Referencing `TAPPING_TERM` makes little sense, as holding longer would result in
|
||||
shifting one of the keys.
|
||||
|
||||
`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies.
|
||||
`RETRO_SHIFT` enables [`PERMISSIVE_HOLD`-like behaviour](../tap_hold#permissive-hold) (even if not explicitly enabled) on all mod-taps for which `RETRO_SHIFT` applies.
|
||||
|
||||
## Using Auto Shift Setup
|
||||
|
||||
@@ -372,22 +374,24 @@ completely normal and with no intention of shifted keys.
|
||||
|
||||
#### An Example Run
|
||||
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
```
|
||||
hello world. my name is john doe. i am a computer programmer playing with
|
||||
keyboards right now.
|
||||
|
||||
[PRESS AS_DOWN quite a few times]
|
||||
[PRESS AS_DOWN quite a few times]
|
||||
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
heLLo woRLd. mY nAMe is JOHn dOE. i AM A compUTeR proGRaMMER PlAYiNG witH
|
||||
KEYboArDS RiGHT NOw.
|
||||
|
||||
[PRESS AS_UP a few times]
|
||||
[PRESS AS_UP a few times]
|
||||
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
hello world. my name is john Doe. i am a computer programmer playing with
|
||||
keyboarDs right now.
|
||||
|
||||
[PRESS AS_RPT]
|
||||
[PRESS AS_RPT]
|
||||
|
||||
115
|
||||
115
|
||||
```
|
||||
|
||||
The keyboard typed `115` which represents your current `AUTO_SHIFT_TIMEOUT`
|
||||
value. You are now set! Practice on the *D* key a little bit that showed up
|
@@ -113,7 +113,7 @@ Additionally, you can use the `AC_TOGG` keycode to toggle the on/off status for
|
||||
Callback function `bool process_autocorrect_user(uint16_t *keycode, keyrecord_t *record, uint8_t *typo_buffer_size, uint8_t *mods)` is available to customise incoming keycodes and handle exceptions. You can use this function to sanitise input before they are passed onto the autocorrect engine
|
||||
|
||||
::: tip
|
||||
Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`.
|
||||
Sanitisation of input is required because autocorrect will only match 8-bit [basic keycodes](../keycodes_basic) for typos. If valid modifier keys or 16-bit keycodes that are part of a user's word input (such as Shift + A) is passed through, they will fail typo letter detection. For example a [Mod-Tap](../mod_tap) key such as `LCTL_T(KC_A)` is 16-bit and should be masked for the 8-bit `KC_A`.
|
||||
:::
|
||||
|
||||
The default user callback function is found inside `quantum/process_keycode/process_autocorrect.c`. It covers most use-cases for QMK special functions and quantum keycodes, including [overriding autocorrect](#overriding-autocorrect) with a modifier other than shift. The `process_autocorrect_user` function is `weak` defined to allow user's copy inside `keymap.c` (or code files) to overwrite it.
|
@@ -1,6 +1,6 @@
|
||||
# Backlighting {#backlighting}
|
||||
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](feature_rgblight) and [RGB Matrix](feature_rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard.
|
||||
Many keyboards support backlit keys by way of individual LEDs placed through or underneath the keyswitches. This feature is distinct from both the [RGB Underglow](rgblight) and [RGB Matrix](rgb_matrix) features as it usually allows for only a single colour per switch, though you can obviously install multiple different single coloured LEDs on a keyboard.
|
||||
|
||||
QMK is able to control the brightness of these LEDs by switching them on and off rapidly in a certain ratio, a technique known as *Pulse Width Modulation*, or PWM. By altering the duty cycle of the PWM signal, it creates the illusion of dimming.
|
||||
|
||||
@@ -153,7 +153,7 @@ The following `#define`s apply only to the `timer` driver:
|
||||
|-----------------------|-------|----------------|
|
||||
|`BACKLIGHT_PWM_TIMER` |`1` |The timer to use|
|
||||
|
||||
Note that the choice of timer may conflict with the [Audio](feature_audio) feature.
|
||||
Note that the choice of timer may conflict with the [Audio](audio) feature.
|
||||
|
||||
## ChibiOS/ARM Configuration {#arm-configuration}
|
||||
|
@@ -26,7 +26,7 @@ A Bluefruit UART friend can be converted to an SPI friend, however this [require
|
||||
<!-- FIXME: Document bluetooth support more completely. -->
|
||||
## Bluetooth Rules.mk Options
|
||||
|
||||
The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.
|
||||
The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](../reference_glossary#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.
|
||||
|
||||
Add the following to your `rules.mk`:
|
||||
|
||||
@@ -39,8 +39,8 @@ BLUETOOTH_DRIVER = bluefruit_le # or rn42
|
||||
|
||||
This is used when multiple keyboard outputs can be selected. Currently this only allows for switching between USB and Bluetooth on keyboards that support both.
|
||||
|
||||
|Key |Aliases |Description |
|
||||
|---------------------|---------|----------------------------------------------|
|
||||
|`QK_OUTPUT_AUTO` |`OU_AUTO`|Automatically switch between USB and Bluetooth|
|
||||
|`QK_OUTPUT_USB` |`OU_USB` |USB only |
|
||||
|`QK_OUTPUT_BLUETOOTH`|`OU_BT` |Bluetooth only |
|
||||
| Key | Aliases | Description |
|
||||
|-----------------------|----------------------|------------------------------------------------|
|
||||
| `QK_OUTPUT_NEXT` | `OU_NEXT`, `OU_AUTO` | Automatically switch between USB and Bluetooth |
|
||||
| `QK_OUTPUT_USB` | `OU_USB` | USB only |
|
||||
| `QK_OUTPUT_BLUETOOTH` | `OU_BT` | Bluetooth only |
|
@@ -25,7 +25,7 @@ Using Bootmagic will **always reset** the EEPROM, so you will lose any settings
|
||||
|
||||
## Split Keyboards
|
||||
|
||||
When [handedness](feature_split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `<keyboard>.h` file, e.g.:
|
||||
When [handedness](split_keyboard#setting-handedness) is predetermined via options like `SPLIT_HAND_PIN` or `EE_HANDS`, you might need to configure a different key between halves. To identify the correct key for the right half, examine the split key matrix defined in the `<keyboard>.h` file, e.g.:
|
||||
|
||||
```c
|
||||
#define LAYOUT_split_3x5_2( \
|
||||
@@ -80,6 +80,6 @@ You can define additional logic here. For instance, resetting the EEPROM or requ
|
||||
|
||||
## Addenda
|
||||
|
||||
To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](keycodes_magic).
|
||||
To manipulate settings that were formerly configured through the now-deprecated full Bootmagic feature, see [Magic Keycodes](../keycodes_magic).
|
||||
|
||||
The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](feature_command).
|
||||
The Command feature, formerly known as Magic, also allows you to control different aspects of your keyboard. While it shares some functionality with Magic Keycodes, it also allows you to do things that Magic Keycodes cannot, such as printing version information to the console. For more information, see [Command](command).
|
@@ -62,7 +62,7 @@ Next, use one the following methods to activate Caps Word:
|
||||
|
||||
* **Custom activation**: You can activate Caps Word from code by calling
|
||||
`caps_word_on()`. This may be used to activate Caps Word through [a
|
||||
combo](feature_combo) or [tap dance](feature_tap_dance) or any means
|
||||
combo](combo) or [tap dance](tap_dance) or any means
|
||||
you like.
|
||||
|
||||
### Troubleshooting: Command {#troubleshooting-command}
|
||||
@@ -71,7 +71,7 @@ When using `BOTH_SHIFTS_TURNS_ON_CAPS_WORD`, you might see a compile message
|
||||
**"BOTH_SHIFTS_TURNS_ON_CAPS_WORD and Command should not be enabled at the same
|
||||
time, since both use the Left Shift + Right Shift key combination."**
|
||||
|
||||
Many keyboards enable the [Command feature](feature_command), which by
|
||||
Many keyboards enable the [Command feature](command), which by
|
||||
default is also activated using the Left Shift + Right Shift key combination. To
|
||||
fix this conflict, please disable Command by adding in rules.mk:
|
||||
|
@@ -18,7 +18,7 @@ combo_t key_combos[] = {
|
||||
This will send "Escape" if you hit the A and B keys, and Ctrl+Z when you hit the C and D keys.
|
||||
|
||||
## Advanced Keycodes Support
|
||||
Advanced keycodes, such as [Mod-Tap](mod_tap) and [Tap Dance](feature_tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.:
|
||||
Advanced keycodes, such as [Mod-Tap](../mod_tap) and [Tap Dance](tap_dance) are also supported together with combos. If you use these advanced keycodes in your keymap, you will need to place the full keycode in the combo definition, e.g.:
|
||||
|
||||
```c
|
||||
const uint16_t PROGMEM test_combo1[] = {LSFT_T(KC_A), LT(1, KC_B), COMBO_END};
|
||||
@@ -99,7 +99,7 @@ void process_combo_event(uint16_t combo_index, bool pressed) {
|
||||
|
||||
This will send "john.doe@example.com" if you chord E and M together, and clear the current line with Backspace and Left-Shift. You could change this to do stuff like play sounds or change settings.
|
||||
|
||||
It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(<key_array>, <your_custom_keycode>)`. See the first example in [Macros](feature_macros).
|
||||
It is worth noting that `COMBO_ACTION`s are not needed anymore. As of [PR#8591](https://github.com/qmk/qmk_firmware/pull/8591/), it is possible to run your own custom keycodes from combos. Just define the custom keycode, program its functionality in `process_record_user`, and define a combo with `COMBO(<key_array>, <your_custom_keycode>)`. See the first example in [Macros](../feature_macros).
|
||||
|
||||
## Keycodes
|
||||
You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game. The following keycodes are available for use in your `keymap.c`
|
@@ -1,6 +1,6 @@
|
||||
# Command
|
||||
|
||||
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](feature_bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
|
||||
Command, formerly known as Magic, is a way to change your keyboard's behavior without having to flash or unplug it to use [Bootmagic Lite](bootmagic). There is a lot of overlap between this functionality and the [Magic Keycodes](../keycodes_magic). Wherever possible we encourage you to use that feature instead of Command.
|
||||
|
||||
On some keyboards Command is disabled by default. If this is the case, it must be explicitly enabled in your `rules.mk`:
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Digitizer {#digitizer}
|
||||
|
||||
Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](feature_pointing_device) feature which applies relative displacements.
|
||||
Digitizers allow the mouse cursor to be placed at absolute coordinates, unlike the [Pointing Device](pointing_device) feature which applies relative displacements.
|
||||
|
||||
This feature implements a stylus device with a tip switch and barrel switch (generally equivalent to the primary and secondary mouse buttons respectively). Tip pressure is not currently implemented.
|
||||
|
||||
@@ -71,43 +71,43 @@ Send the digitizer report to the host if it is marked as dirty.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_in_range_on(void)` :api-digitizer-in-range-on
|
||||
### `void digitizer_in_range_on(void)` {#api-digitizer-in-range-on}
|
||||
|
||||
Assert the "in range" indicator, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_in_range_off(void)` :api-digitizer-in-range-off
|
||||
### `void digitizer_in_range_off(void)` {#api-digitizer-in-range-off}
|
||||
|
||||
Deassert the "in range" indicator, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_tip_switch_on(void)` :api-digitizer-tip-switch-on
|
||||
### `void digitizer_tip_switch_on(void)` {#api-digitizer-tip-switch-on}
|
||||
|
||||
Assert the tip switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_tip_switch_off(void)` :api-digitizer-tip-switch-off
|
||||
### `void digitizer_tip_switch_off(void)` {#api-digitizer-tip-switch-off}
|
||||
|
||||
Deassert the tip switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_barrel_switch_on(void)` :api-digitizer-barrel-switch-on
|
||||
### `void digitizer_barrel_switch_on(void)` {#api-digitizer-barrel-switch-on}
|
||||
|
||||
Assert the barrel switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_barrel_switch_off(void)` :api-digitizer-barrel-switch-off
|
||||
### `void digitizer_barrel_switch_off(void)` {#api-digitizer-barrel-switch-off}
|
||||
|
||||
Deassert the barrel switch, and flush the report.
|
||||
|
||||
---
|
||||
|
||||
### `void digitizer_set_position(float x, float y)` :api-digitizer-set-position
|
||||
### `void digitizer_set_position(float x, float y)` {#api-digitizer-set-position}
|
||||
|
||||
Set the absolute X and Y position of the digitizer contact, and flush the report.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user