Compare commits
651 commits
dependabot
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
6b4d591c37 | ||
|
1c48f64730 | ||
|
f0319fde94 | ||
|
d52bb04090 | ||
|
58207fdb2c | ||
|
cddc92108c | ||
|
a2f32cc12c | ||
|
2a137bb675 | ||
|
ba6f21fd2b | ||
|
91447ac55c | ||
|
eaa8989f37 | ||
|
e0ec2ff84d | ||
|
03b5b38bc4 | ||
|
3975d2fdaf | ||
|
5176fbea6a | ||
|
782695f4a9 | ||
|
e0339a2a57 | ||
|
b84436e611 | ||
|
fd28eab179 | ||
|
d77e400eb9 | ||
|
c8c19598a7 | ||
|
0f972f1cc3 | ||
|
266227b580 | ||
|
aae4feeda8 | ||
|
b74cd39ab5 | ||
|
0120156002 | ||
|
745b960593 | ||
|
882226e261 | ||
|
d74896d780 | ||
|
f019524600 | ||
|
6946ca8b07 | ||
|
b866ec031f | ||
|
5f056f7199 | ||
|
503f6c8e58 | ||
|
b735a051ce | ||
|
d5061c5d3b | ||
|
6ae6bf78b4 | ||
|
fb67e4603a | ||
|
bafe648425 | ||
|
b1bcc3e418 | ||
|
feda96eb40 | ||
|
ea64fcaf71 | ||
|
6fe13c9565 | ||
|
08988ec7da | ||
|
b42d06ecf7 | ||
|
895f557ae5 | ||
|
96cd3a1ce2 | ||
|
4faeb365b1 | ||
|
ba0dee088f | ||
|
0d15ae84f4 | ||
|
8b909acdcf | ||
|
3de8a56fcb | ||
|
00e4818094 | ||
|
049c070b3a | ||
|
fb3af5327e | ||
|
6d50ba5553 | ||
|
3fec690def | ||
|
2eff266f5b | ||
|
2a0708d1fc | ||
|
2501f1f548 | ||
|
d75e388593 | ||
|
cd25c12ce9 | ||
|
78ed721c36 | ||
|
47a6715aa6 | ||
|
b9a025c76e | ||
|
b080befebb | ||
|
9e7fcde868 | ||
|
f92dce43e9 | ||
|
97294aa341 | ||
|
fd152baff0 | ||
|
7bd74a6b0f | ||
|
8c6bda260a | ||
|
3694ff85a0 | ||
|
e01f13f9f0 | ||
|
82eed0f5dd | ||
|
b4f9081b09 | ||
|
5fcf092901 | ||
|
74f7fe921b | ||
|
0438cb0ee5 | ||
|
c5cca5b34f | ||
|
80173f8ea3 | ||
|
f18974e8c4 | ||
|
f2ea1da036 | ||
|
96e55c8be6 | ||
|
483a4930e9 | ||
|
f7c34c70ba | ||
|
b576d52d58 | ||
|
49f7275beb | ||
|
29599e8b0a | ||
|
10d03ca46c | ||
|
4dce096161 | ||
|
9c6d1af102 | ||
|
7c9477be6e | ||
|
0bea7832e9 | ||
|
3e2c428fca | ||
|
03099b04b6 | ||
|
7cdf1e42ea | ||
|
7be955ff72 | ||
|
a080b5287f | ||
|
7c09eb217e | ||
|
e56db304ea | ||
|
308d6bce6e | ||
|
2d96f469c8 | ||
|
2ee76be6fe | ||
|
f0b20c1c93 | ||
|
8f5c7bbfd4 | ||
|
7d1f84e3eb | ||
|
4dfc45d4ab | ||
|
2423136788 | ||
|
af908826cd | ||
|
d1ad34761a | ||
|
0d3a4b7bbb | ||
|
4d566853af | ||
|
f4a070aacf | ||
|
16e92cf665 | ||
|
e22bc7620c | ||
|
a9021deef6 | ||
|
dfc6dc84b8 | ||
|
7a51a46b9f | ||
|
849eca7228 | ||
|
7d5aa0c0bf | ||
|
fe509c466f | ||
|
e7d6519534 | ||
|
eb5a6fcfe1 | ||
|
e65a1227d8 | ||
|
4bef4e98f5 | ||
|
fff1cbecdc | ||
|
d672b0c705 | ||
|
18b86b7720 | ||
|
25bb126a11 | ||
|
34910787ff | ||
|
f9bb18b676 | ||
|
e66f068fb5 | ||
|
29c0cdb3ab | ||
|
7e7110d85f | ||
|
41d81801ed | ||
|
d0e0ecb4e3 | ||
|
2df6dcd973 | ||
|
fa9ea9ea8b | ||
|
bb94a7aafe | ||
|
cac999b1d6 | ||
|
8d54e287f0 | ||
|
bd21f41412 | ||
|
5d960a758f | ||
|
4198fac90f | ||
|
09111f1cf3 | ||
|
c3144055e8 | ||
|
a0ad1d4c94 | ||
|
e78b25a445 | ||
|
933fdcd364 | ||
|
5ebe924e94 | ||
|
fceb0351a5 | ||
|
96968514e3 | ||
|
e78249ee06 | ||
|
0d4d4fb2b5 | ||
|
860e53b33a | ||
|
d3fffb9e89 | ||
|
b19df0cbf0 | ||
|
738c3c0e3b | ||
|
adb3a13dc5 | ||
|
58ccc5970d | ||
|
e806cd6da1 | ||
|
94c3b9a246 | ||
|
c684cee76f | ||
|
f2d8b9b0a3 | ||
|
44358798d3 | ||
|
931a36ff4a | ||
|
3a3eed2960 | ||
|
1f7cd7a107 | ||
|
828943156a | ||
|
736c5fb46e | ||
|
ce743f2b35 | ||
|
af7e4198ae | ||
|
94d9d837e3 | ||
|
341534aa15 | ||
|
8929355ac0 | ||
|
6f2e19ff88 | ||
|
3a38979684 | ||
|
c6e0551fb0 | ||
|
325e207781 | ||
|
aa6cfe250d | ||
|
bddee70b6b | ||
|
388ad71385 | ||
|
a77288f527 | ||
|
14b06a36bf | ||
|
1dfcfc7d3f | ||
|
610a806c84 | ||
|
2adaa00d10 | ||
|
08ab45fc78 | ||
|
37af94edde | ||
|
db7b197790 | ||
|
c9c620d19f | ||
|
8b20874c99 | ||
|
c007d60357 | ||
|
104c73d303 | ||
|
b44ec381f6 | ||
|
ccf0380179 | ||
|
c082f8d802 | ||
|
a9ae6796a0 | ||
|
fda6a5f185 | ||
|
604af2ebd3 | ||
|
0f49fa9ae4 | ||
|
c7fb418e88 | ||
|
40adb3858d | ||
|
cdcf4ebfb6 | ||
|
f72f415c5b | ||
|
50a303b8bb | ||
|
1d83f279cd | ||
|
edc72c1166 | ||
|
4bcecd98f8 | ||
|
2d6c9f797c | ||
|
18e5a1a26b | ||
|
cd6f8a680c | ||
|
b2a0a357e1 | ||
|
d9c0ded402 | ||
|
aeb5bed3d6 | ||
|
a6c0399493 | ||
|
324ada1d20 | ||
|
8e9b4fa57c | ||
|
3968d9febd | ||
|
b3f1d769f0 | ||
|
4fcbe3268a | ||
|
413820fc7f | ||
|
802881b625 | ||
|
f4e6d70465 | ||
|
94aa7d8d53 | ||
|
552347b8a4 | ||
|
a81a2d37a8 | ||
|
98e3b8b435 | ||
|
b6d9f3c911 | ||
|
58413ca8c5 | ||
|
d6de8a3acc | ||
|
ba1a6c08ad | ||
|
d06e90e713 | ||
|
bd9c71ab0a | ||
|
0b5afbf9c0 | ||
|
fb99496a73 | ||
|
f7e7c9c10b | ||
|
bf4008da02 | ||
|
f4fce9e158 | ||
|
b8846cf635 | ||
|
efbcd3c8f6 | ||
|
4b03fcb709 | ||
|
5826b80374 | ||
|
3a4cf185a1 | ||
|
be75da096c | ||
|
c2299e2203 | ||
|
f24a0bf9c8 | ||
|
aab09d504c | ||
|
4a5806ac73 | ||
|
0755b7a64c | ||
|
5685074835 | ||
|
b120daa16a | ||
|
275c0ce271 | ||
|
3c14c7c112 | ||
|
789c11629e | ||
|
72d5c01e46 | ||
|
1f8b45d57d | ||
|
1dbd6910cb | ||
|
08d9391a8a | ||
|
bf5284b3b9 | ||
|
d4be70587d | ||
|
37fcf190e6 | ||
|
84e056793b | ||
|
a0465391be | ||
|
1a3529a3e6 | ||
|
6b547019c2 | ||
|
a3fbc2a5ba | ||
|
19613128b9 | ||
|
0dc04df09c | ||
|
7196f9f075 | ||
|
fa91648cce | ||
|
e3f458e539 | ||
|
57684f8a66 | ||
|
5cbffd6625 | ||
|
1b326ff856 | ||
|
dcfe07d9f6 | ||
|
ee855de349 | ||
|
f014eb45a7 | ||
|
00962a7255 | ||
|
a0a952413a | ||
|
13c856d1d3 | ||
|
0827ff245f | ||
|
f71458aca0 | ||
|
8c14b155e8 | ||
|
0890aaeaff | ||
|
e5050e40fe | ||
|
e89cffc959 | ||
|
331915f989 | ||
|
644feeb40d | ||
|
33209dee1d | ||
|
50e473276f | ||
|
466cf92029 | ||
|
2829185a94 | ||
|
db9ab30335 | ||
|
6bf4870704 | ||
|
7652fbeb6b | ||
|
12bc8b0402 | ||
|
cebf651d11 | ||
|
395ffaa790 | ||
|
74875314f8 | ||
|
69f962fab2 | ||
|
bc7b4b56bd | ||
|
7d1c1ae8fd | ||
|
7b9466c7dc | ||
|
194a9790eb | ||
|
b813f34e34 | ||
|
f4fe7fa40f | ||
|
604c95118e | ||
|
b8cb407351 | ||
|
7a5155f36e | ||
|
5257cde1f5 | ||
|
6f8d080b6a | ||
|
b3146e665e | ||
|
0e2f94b73b | ||
|
d35311af97 | ||
|
7ef6ec7560 | ||
|
c965e35140 | ||
|
a593c7260a | ||
|
12d73ba4f9 | ||
|
78fa1e77c4 | ||
|
1b8b6b4a0e | ||
|
f4f402fa44 | ||
|
9b3a98691c | ||
|
52ed49b4bb | ||
|
ff57ccc75a | ||
|
2c50cff891 | ||
|
b35a5e83c0 | ||
|
63c8c5700a | ||
|
96f9031951 | ||
|
384637ae6c | ||
|
09d47d8117 | ||
|
55bf7cae7e | ||
|
56d863cba6 | ||
|
2bab81a304 | ||
|
76a209c728 | ||
|
f3ad08b619 | ||
|
88338a9b3c | ||
|
291bbc2257 | ||
|
3656ec63d0 | ||
|
efd403a567 | ||
|
0ab6a0ad11 | ||
|
17a6f0b128 | ||
|
0fd8e25807 | ||
|
23ecf08119 | ||
|
36eda571b7 | ||
|
5ecd3521f5 | ||
|
d4e8dee444 | ||
|
ba5637fdef | ||
|
3ae9e74056 | ||
|
05925c72d7 | ||
|
179bdbc41a | ||
|
dbe5dfb1d8 | ||
|
9bacaffe62 | ||
|
8ee3467adf | ||
|
042e5209b3 | ||
|
ecefd6d24b | ||
|
55aed8e89d | ||
|
c63d0791d5 | ||
|
693530c2f1 | ||
|
da15564d0e | ||
|
3fad4dba07 | ||
|
329d6474ee | ||
|
744f70c80c | ||
|
69f7bfb409 | ||
|
817ce8764f | ||
|
d9bb0d7d0e | ||
|
4e55c5f6e9 | ||
|
6276e973d5 | ||
|
84b93350b8 | ||
|
a3f30ee799 | ||
|
f77e38f2b9 | ||
|
0a4b1a6533 | ||
|
d7d9eed317 | ||
|
8776911da5 | ||
|
3027b2a6e8 | ||
|
f6716f869a | ||
|
2a1904e184 | ||
|
afe65ead9c | ||
|
964c54139d | ||
|
7b4b5d4ff2 | ||
|
a5c3edd51b | ||
|
2554b5c88f | ||
|
c1bf35ce1d | ||
|
91aa3378f3 | ||
|
b80c0be0ce | ||
|
5b49bc10cd | ||
|
c2d220fbdf | ||
|
34c8b3f1e3 | ||
|
8d09809ef0 | ||
|
9e8ee86842 | ||
|
82e85699ed | ||
|
7fe9ecd87f | ||
|
3b1d04372b | ||
|
a9a53e6da4 | ||
|
3ab922822c | ||
|
a9f677007b | ||
|
0c06023ca0 | ||
|
6c75d6986c | ||
|
65667b863a | ||
|
4a339093ce | ||
|
6af22424f1 | ||
|
791711b555 | ||
|
8a84b7dd5b | ||
|
fd05478897 | ||
|
ca5c9b4ae6 | ||
|
913fdb831e | ||
|
df92b0e37d | ||
|
11996ff7f0 | ||
|
2234be0871 | ||
|
f0f6d61e79 | ||
|
b85ffa4b6c | ||
|
49c393e8f8 | ||
|
1e84e265b1 | ||
|
77eb44ba9b | ||
|
2f6abff3bc | ||
|
aa4cb143bf | ||
|
6a3cc914fc | ||
|
b17d896c5c | ||
|
651ed05e9a | ||
|
2f05ad55ca | ||
|
dffdb2365e | ||
|
933e369d7c | ||
|
c1ebadcd2a | ||
|
9b3d2cb99f | ||
|
07c82836e0 | ||
|
8abc449cc2 | ||
|
28ce23d489 | ||
|
0ca7f69b6d | ||
|
c28ef1b61e | ||
|
690bc1bb44 | ||
|
eaeea4bdfa | ||
|
7f9e9f8c64 | ||
|
f442776fe2 | ||
|
8087fa3b2b | ||
|
693875675f | ||
|
718500543b | ||
|
3936298260 | ||
|
647945d9f8 | ||
|
8984e12f0d | ||
|
3de23938d6 | ||
|
ac0691471f | ||
|
544612c8c0 | ||
|
4e18b879bd | ||
|
b20d3178b9 | ||
|
369c7c1721 | ||
|
3d938033b0 | ||
|
1e11e84d0d | ||
|
fd47965838 | ||
|
185457bc11 | ||
|
a92a4967aa | ||
|
dcb1f8f135 | ||
|
9d44229800 | ||
|
c957348e61 | ||
|
d17c473d45 | ||
|
e65a7e3075 | ||
|
cb9c573b53 | ||
|
9a963abfc8 | ||
|
f743d57ff1 | ||
|
147f7f23dc | ||
|
5f6a13413b | ||
|
54c2e8e155 | ||
|
ed400c4feb | ||
|
73e1b526d5 | ||
|
b945ffe943 | ||
|
cec2061dad | ||
|
ee1e135104 | ||
|
51a4be8935 | ||
|
18a2b76bf0 | ||
|
f3110d1d1e | ||
|
aaf9958d86 | ||
|
bbb27ac027 | ||
|
3772ecb04e | ||
|
b259d5a22e | ||
|
805dd4a53b | ||
|
e686fce4d9 | ||
|
5763558a02 | ||
|
753802cd79 | ||
|
3a91b32513 | ||
|
8b29f6d345 | ||
|
d781ec795b | ||
|
f8aaaff556 | ||
|
621d946d29 | ||
|
f0f7e2081b | ||
|
295ed83409 | ||
|
2244bd3d81 | ||
|
dcf5e75fa6 | ||
|
9ff1eaeb5a | ||
|
9d714c0b69 | ||
|
0be0d07630 | ||
|
9d39a87f67 | ||
|
98524a9567 | ||
|
a5c57fa224 | ||
|
5d9ae8fffa | ||
|
f08802eaa7 | ||
|
19d883cdfe | ||
|
ace11e327f | ||
|
0682bc3aa6 | ||
|
a9ad11f91e | ||
|
30ba4b08ae | ||
|
4042aea66f | ||
|
0508718d6c | ||
|
a2af74f5ab | ||
|
b276a3bfb0 | ||
|
1adfcf92bf | ||
|
5aac2743b1 | ||
|
864394b40a | ||
|
7e29166c6c | ||
|
b021d19255 | ||
|
c4c014e3d1 | ||
|
dae020787e | ||
|
c6bf95a901 | ||
|
da2599aa75 | ||
|
4674215551 | ||
|
d799560985 | ||
|
89d71ed2c2 | ||
|
b1ca9199de | ||
|
a1e0607a22 | ||
|
d53cd19929 | ||
|
48be2eedd0 | ||
|
94789a092c | ||
|
0239f18b61 | ||
|
39d7f86f70 | ||
|
4a9c59317f | ||
|
2c70048bee | ||
|
ab65ffc114 | ||
|
a6787b08c7 | ||
|
9bd171ede4 | ||
|
db08e041c6 | ||
|
e52e734480 | ||
|
de152fe741 | ||
|
7a352908ee | ||
|
5b07c86d05 | ||
|
94061bb916 | ||
|
32ae776c42 | ||
|
9c4f1e02d1 | ||
|
53dea223b7 | ||
|
9d64c2a3a0 | ||
|
3db163aa2c | ||
|
9a73650041 | ||
|
5c6f21b0e0 | ||
|
e7a6e4016d | ||
|
83a151890c | ||
|
71855af14f | ||
|
f1b138cbf0 | ||
|
309359b32f | ||
|
ee9fcec3c9 | ||
|
a20b9502bc | ||
|
3f48062225 | ||
|
702d79c108 | ||
|
3c8f55ede0 | ||
|
064aff6bc0 | ||
|
374104dec6 | ||
|
b31b42018a | ||
|
7434a6b99b | ||
|
9dcc3ac375 | ||
|
134b64ef5b | ||
|
2614b85634 | ||
|
313ed6adb6 | ||
|
0c5bcf5fe4 | ||
|
1493620bf7 | ||
|
518f9a550f | ||
|
198daaf524 | ||
|
c3d06b22c8 | ||
|
a6ebdb7180 | ||
|
2f9bc2f1f7 | ||
|
31f664ffec | ||
|
4ff1a4d3ea | ||
|
09ed79a867 | ||
|
062f94d014 | ||
|
e84b4299b5 | ||
|
3a958c667f | ||
|
35a1c5a3d4 | ||
|
4f2f9db1d4 | ||
|
d513dc1766 | ||
|
243a227ff9 | ||
|
69a4c3200d | ||
|
168b32b828 | ||
|
ae8299edb3 | ||
|
cd64c59b39 | ||
|
56299ba5dc | ||
|
6cb42a8060 | ||
|
8904407983 | ||
|
5ef6f2f2b7 | ||
|
719de801e7 | ||
|
1d65661efa | ||
|
3eee53676f | ||
|
0c0ebda65b | ||
|
5d22d76d72 | ||
|
72624a41fa | ||
|
c065d451cb | ||
|
b7d5865e40 | ||
|
9d1070a140 | ||
|
2a5e914a77 | ||
|
41830ce19a | ||
|
fbdb24c6fe | ||
|
82ff6d8e85 | ||
|
a82a0ec496 | ||
|
b7b563a4c3 | ||
|
5b9b507de3 | ||
|
c23443a086 | ||
|
d993b03433 | ||
|
080c47825f | ||
|
77d60182bf | ||
|
14324390e8 | ||
|
58f8c97d3c | ||
|
6e99a48696 | ||
|
3eb06f137b | ||
|
11ca0098a5 | ||
|
5cbe572f7d | ||
|
781df31ec4 | ||
|
b8fb218a01 | ||
|
ebb4cb76d3 | ||
|
4a3e783f32 | ||
|
984b16e03b | ||
|
4faf6eba97 | ||
|
408b87ae7b | ||
|
1425d0f2d9 | ||
|
f03e29ca13 | ||
|
617136b45e | ||
|
01500b085e | ||
|
70aa4fa824 | ||
|
36ee1f4e0a | ||
|
2b235ae281 | ||
|
63b29ccd32 | ||
|
12329b388e | ||
|
2a42fe658e | ||
|
58eb7a3305 | ||
|
6ccb5280c9 | ||
|
593db85378 | ||
|
001105e318 | ||
|
6550c043c4 | ||
|
4d0e0fa34b | ||
|
5cd608cb60 | ||
|
c7fdce863a | ||
|
9f90dd1fc7 | ||
|
6e7c2a08a2 | ||
|
768fc4a5e5 | ||
|
1e98ea0afb | ||
|
a9048956b5 | ||
|
c7d83fb951 | ||
|
9847a4c5d5 | ||
|
2364960f84 | ||
|
a61eac9139 | ||
|
d393247e15 | ||
|
4e11913127 | ||
|
3353712bc1 | ||
|
a02eb28271 | ||
|
2d7c8f6073 | ||
|
41fdd07315 | ||
|
f59da74a3e |
1687 changed files with 64435 additions and 34671 deletions
|
@ -6,3 +6,8 @@ fi
|
|||
if [ -f "$WORKSPACE_DIR/zephyr/zephyr-env.sh" ]; then
|
||||
source "$WORKSPACE_DIR/zephyr/zephyr-env.sh"
|
||||
fi
|
||||
|
||||
if [ -d "$WORKSPACE_DIR/tools/bsim" ]; then
|
||||
export BSIM_OUT_PATH="$WORKSPACE_DIR/tools/bsim/"
|
||||
export BSIM_COMPONENTS_PATH="$WORKSPACE_DIR/tools/bsim/components/"
|
||||
fi
|
|
@ -1,4 +1,4 @@
|
|||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
|
||||
FROM docker.io/zmkfirmware/zmk-dev-arm:3.5
|
||||
|
||||
COPY .bashrc tmp
|
||||
RUN mv /tmp/.bashrc ~/.bashrc
|
||||
|
|
|
@ -13,9 +13,13 @@
|
|||
"type=volume,source=zmk-zephyr-modules,target=${containerWorkspaceFolder}/modules",
|
||||
"type=volume,source=zmk-zephyr-tools,target=${containerWorkspaceFolder}/tools"
|
||||
],
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["ms-vscode.cpptools"],
|
||||
"settings": {
|
||||
"terminal.integrated.shell.linux": "/bin/bash"
|
||||
}
|
||||
}
|
||||
},
|
||||
"forwardPorts": [3000]
|
||||
}
|
||||
|
|
24
.github/pull_request_template.md
vendored
24
.github/pull_request_template.md
vendored
|
@ -1,13 +1,15 @@
|
|||
<!-- If you're adding a board/shield please fill out this check-list, otherwise you can delete it -->
|
||||
|
||||
## Board/Shield Check-list
|
||||
- [ ] This board/shield is tested working on real hardware
|
||||
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
||||
- [ ] `.zmk.yml` metadata file added
|
||||
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
|
||||
- [ ] General consistent formatting of DeviceTree files
|
||||
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
||||
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
||||
- [ ] If split, no name added for the right/peripheral half
|
||||
- [ ] Kconfig.defconfig file correctly wraps *all* configuration in conditional on the shield symbol
|
||||
- [ ] `.conf` file has optional extra features commented out
|
||||
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
|
||||
|
||||
- [ ] This board/shield is tested working on real hardware
|
||||
- [ ] Definitions follow the general style of other shields/boards upstream ([Reference](https://zmk.dev/docs/development/new-shield))
|
||||
- [ ] `.zmk.yml` metadata file added
|
||||
- [ ] Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
|
||||
- [ ] General consistent formatting of DeviceTree files
|
||||
- [ ] Keymaps do not use deprecated key defines (Check using the [upgrader tool](https://zmk.dev/docs/codes/keymap-upgrader))
|
||||
- [ ] `&pro_micro` used in favor of `&pro_micro_d/a` if applicable
|
||||
- [ ] If split, no name added for the right/peripheral half
|
||||
- [ ] Kconfig.defconfig file correctly wraps _all_ configuration in conditional on the shield symbol
|
||||
- [ ] `.conf` file has optional extra features commented out
|
||||
- [ ] Keyboard/PCB is part of a shipped group buy or is generally available in stock to purchase (OSH/personal projects without general availability should create a zmk-config repo instead)
|
||||
|
|
78
.github/workflows/ble-test.yml
vendored
Normal file
78
.github/workflows/ble-test.yml
vendored
Normal file
|
@ -0,0 +1,78 @@
|
|||
name: BLE Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/ble-test.yml"
|
||||
- "app/tests/ble/**"
|
||||
- "app/src/**"
|
||||
- "app/run-ble-test.sh"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/ble-test.yml"
|
||||
- "app/tests/ble/**"
|
||||
- "app/src/**"
|
||||
- "app/run-ble-test.sh"
|
||||
|
||||
jobs:
|
||||
collect-tests:
|
||||
outputs:
|
||||
test-dirs: ${{ steps.test-dirs.outputs.test-dirs }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
cd app/tests/ble
|
||||
export TESTS=$(ls -d * | grep -v central | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "test-dirs=${TESTS}" > $GITHUB_OUTPUT
|
||||
run-tests:
|
||||
needs: collect-tests
|
||||
strategy:
|
||||
matrix:
|
||||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
path: |
|
||||
modules/
|
||||
tools/
|
||||
zephyr/
|
||||
bootloader/
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
timeout-minutes: 2
|
||||
continue-on-error: true
|
||||
- name: Initialize workspace (west init)
|
||||
run: west init -l app
|
||||
- name: Enable babblesim group filter
|
||||
run: west config manifest.group-filter -- +babblesim
|
||||
- name: Update modules (west update)
|
||||
run: west update
|
||||
- name: Export Zephyr CMake package (west zephyr-export)
|
||||
run: west zephyr-export
|
||||
- name: Build BabbleSim components
|
||||
working-directory: tools/bsim
|
||||
run: make everything
|
||||
- name: Test ${{ matrix.test }}
|
||||
working-directory: app
|
||||
run: BSIM_COMPONENTS_PATH="${GITHUB_WORKSPACE}/tools/bsim/components" BSIM_OUT_PATH="${GITHUB_WORKSPACE}/tools/bsim" ./run-ble-test.sh tests/ble/${{ matrix.test }}
|
||||
- name: Archive artifacts
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "${{ matrix.test }}-log-files"
|
||||
path: app/build/**/*.log
|
124
.github/workflows/build-user-config.yml
vendored
124
.github/workflows/build-user-config.yml
vendored
|
@ -19,8 +19,8 @@ on:
|
|||
required: false
|
||||
type: string
|
||||
archive_name:
|
||||
description: 'Archive output file name'
|
||||
default: 'firmware'
|
||||
description: "Archive output file name"
|
||||
default: "firmware"
|
||||
required: false
|
||||
type: string
|
||||
|
||||
|
@ -32,15 +32,15 @@ jobs:
|
|||
build_matrix: ${{ env.build_matrix }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.1.0
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install yaml2json
|
||||
run: python3 -m pip install remarshal
|
||||
|
||||
- name: Fetch Build Matrix
|
||||
run: |
|
||||
echo "build_matrix=$(yaml2json ${{ inputs.build_matrix_path }} | jq -c .)" >> $GITHUB_ENV
|
||||
yaml2json ${{ inputs.build_matrix_path }} | jq
|
||||
echo "build_matrix=$(yaml2json '${{ inputs.build_matrix_path }}' | jq -c .)" >> $GITHUB_ENV
|
||||
yaml2json "${{ inputs.build_matrix_path }}" | jq
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -52,36 +52,59 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Create build directory
|
||||
run: |
|
||||
echo "build_dir=$(mktemp -d)" >> $GITHUB_ENV
|
||||
|
||||
- name: Prepare variables
|
||||
shell: sh -x {0}
|
||||
env:
|
||||
board: ${{ matrix.board }}
|
||||
shield: ${{ matrix.shield }}
|
||||
artifact_name: ${{ matrix.artifact-name }}
|
||||
snippet: ${{ matrix.snippet }}
|
||||
run: |
|
||||
if [ -n "${{ matrix.shield }}" ]
|
||||
then
|
||||
echo "extra_cmake_args=-DSHIELD=\"${{ matrix.shield }}\"" >> $GITHUB_ENV
|
||||
echo "artifact_name=${{ matrix.shield }}-${{ matrix.board }}-zmk" >> $GITHUB_ENV
|
||||
echo "display_name=${{ matrix.shield }} - ${{ matrix.board }}" >> $GITHUB_ENV
|
||||
if [ -e zephyr/module.yml ]; then
|
||||
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'"
|
||||
new_tmp_dir="${TMPDIR:-/tmp}/zmk-config"
|
||||
mkdir -p "${new_tmp_dir}"
|
||||
echo "base_dir=${new_tmp_dir}" >> $GITHUB_ENV
|
||||
else
|
||||
echo "extra_cmake_args=" >> $GITHUB_ENV
|
||||
echo "artifact_name=${{ matrix.board }}-zmk" >> $GITHUB_ENV
|
||||
echo "display_name=${{ matrix.board }}" >> $GITHUB_ENV
|
||||
echo "base_dir=${GITHUB_WORKSPACE}" >> $GITHUB_ENV
|
||||
fi
|
||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3.1.0
|
||||
if [ -n "${snippet}" ]; then
|
||||
extra_west_args="-S \"${snippet}\""
|
||||
fi
|
||||
|
||||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV
|
||||
echo "extra_west_args=${extra_west_args}" >> $GITHUB_ENV
|
||||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV
|
||||
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV
|
||||
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV
|
||||
|
||||
- name: Copy config files to isolated temporary directory
|
||||
run: |
|
||||
if [ "${{ env.base_dir }}" != "${GITHUB_WORKSPACE}" ]; then
|
||||
mkdir "${{ env.base_dir }}/${{ inputs.config_path }}"
|
||||
cp -R ${{ inputs.config_path }}/* "${{ env.base_dir }}/${{ inputs.config_path }}/"
|
||||
fi
|
||||
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3.0.11
|
||||
uses: actions/cache@v4
|
||||
continue-on-error: true
|
||||
env:
|
||||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
||||
with:
|
||||
path: |
|
||||
modules/
|
||||
tools/
|
||||
zephyr/
|
||||
bootloader/
|
||||
zmk/
|
||||
${{ env.base_dir }}/modules/
|
||||
${{ env.base_dir }}/tools/
|
||||
${{ env.base_dir }}/zephyr/
|
||||
${{ env.base_dir }}/bootloader/
|
||||
${{ env.base_dir }}/zmk/
|
||||
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache_name }}-
|
||||
|
@ -89,36 +112,71 @@ jobs:
|
|||
${{ runner.os }}-
|
||||
|
||||
- name: West Init
|
||||
run: west init -l ${{ inputs.config_path }}
|
||||
working-directory: ${{ env.base_dir }}
|
||||
run: west init -l "${{ env.base_dir }}/${{ inputs.config_path }}"
|
||||
|
||||
- name: West Update
|
||||
working-directory: ${{ env.base_dir }}
|
||||
run: west update
|
||||
|
||||
- name: West Zephyr export
|
||||
working-directory: ${{ env.base_dir }}
|
||||
run: west zephyr-export
|
||||
|
||||
- name: West Build (${{ env.display_name }})
|
||||
working-directory: ${{ env.base_dir }}
|
||||
shell: sh -x {0}
|
||||
run: |
|
||||
west build -s zmk/app -b ${{ matrix.board }} -- -DZMK_CONFIG=${GITHUB_WORKSPACE}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" ${{ env.extra_west_args }} -- -DZMK_CONFIG=${{ env.base_dir }}/${{ inputs.config_path }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }}
|
||||
|
||||
- name: ${{ env.display_name }} Kconfig file
|
||||
run: grep -v -e "^#" -e "^$" build/zephyr/.config | sort
|
||||
run: |
|
||||
if [ -f "${{ env.build_dir }}/zephyr/.config" ]
|
||||
then
|
||||
grep -v -e "^#" -e "^$" "${{ env.build_dir }}/zephyr/.config" | sort
|
||||
else
|
||||
echo "No Kconfig output"
|
||||
fi
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- name: ${{ env.display_name }} Devicetree file
|
||||
run: |
|
||||
if [ -f "${{ env.build_dir }}/zephyr/zephyr.dts" ]
|
||||
then
|
||||
cat "${{ env.build_dir }}/zephyr/zephyr.dts"
|
||||
elif [ -f "${{ env.build_dir }}/zephyr/zephyr.dts.pre" ]
|
||||
then
|
||||
cat -s "${{ env.build_dir }}/zephyr/zephyr.dts.pre"
|
||||
else
|
||||
echo "No Devicetree output"
|
||||
fi
|
||||
if: ${{ !cancelled() }}
|
||||
|
||||
- name: Rename artifacts
|
||||
shell: sh -x {0}
|
||||
run: |
|
||||
mkdir build/artifacts
|
||||
if [ -f build/zephyr/zmk.uf2 ]
|
||||
mkdir "${{ env.build_dir }}/artifacts"
|
||||
if [ -f "${{ env.build_dir }}/zephyr/zmk.uf2" ]
|
||||
then
|
||||
cp build/zephyr/zmk.uf2 "build/artifacts/${{ env.artifact_name }}.uf2"
|
||||
elif [ -f build/zephyr/zmk.${{ inputs.fallback_binary }} ]
|
||||
cp "${{ env.build_dir }}/zephyr/zmk.uf2" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.uf2"
|
||||
elif [ -f "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" ]
|
||||
then
|
||||
cp build/zephyr/zmk.${{ inputs.fallback_binary }} "build/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
|
||||
cp "${{ env.build_dir }}/zephyr/zmk.${{ inputs.fallback_binary }}" "${{ env.build_dir }}/artifacts/${{ env.artifact_name }}.${{ inputs.fallback_binary }}"
|
||||
fi
|
||||
|
||||
- name: Archive (${{ env.display_name }})
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: artifact-${{ env.artifact_name }}
|
||||
path: ${{ env.build_dir }}/artifacts
|
||||
|
||||
merge:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
name: Merge Output Artifacts
|
||||
steps:
|
||||
- name: Merge Artifacts
|
||||
uses: actions/upload-artifact/merge@v4
|
||||
with:
|
||||
name: ${{ inputs.archive_name }}
|
||||
path: build/artifacts
|
||||
pattern: artifact-*
|
||||
delete-merged: true
|
||||
|
|
129
.github/workflows/build.yml
vendored
129
.github/workflows/build.yml
vendored
|
@ -10,23 +10,31 @@ on:
|
|||
- ".github/workflows/build.yml"
|
||||
- "app/**"
|
||||
schedule:
|
||||
- cron: '22 4 * * *'
|
||||
- cron: "22 4 * * *"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name == 'schedule' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ always() }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
needs: compile-matrix
|
||||
strategy:
|
||||
matrix:
|
||||
include: ${{ fromJSON(needs.compile-matrix.outputs.include-list) }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3.0.2
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
|
@ -49,19 +57,17 @@ jobs:
|
|||
- name: Export Zephyr CMake package (west zephyr-export)
|
||||
run: west zephyr-export
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '14.x'
|
||||
node-version: "14.x"
|
||||
- name: Install @actions/artifact
|
||||
run: npm install @actions/artifact
|
||||
- name: Build and upload artifacts
|
||||
uses: actions/github-script@v4
|
||||
- name: Build
|
||||
uses: actions/github-script@v7
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const artifact = require('@actions/artifact');
|
||||
const artifactClient = artifact.create();
|
||||
|
||||
const execSync = require('child_process').execSync;
|
||||
|
||||
|
@ -71,10 +77,39 @@ jobs:
|
|||
|
||||
for (const shieldArgs of buildShieldArgs) {
|
||||
try {
|
||||
const output = execSync(`west build -s app -p -b ${{ matrix.board }} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
|
||||
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Build`)
|
||||
|
||||
const output = execSync(`west build -s app -p -b ${{ matrix.board }} ${shieldArgs.snippet ? '-S ' + shieldArgs.snippet : ''} -- ${shieldArgs.shield ? '-DSHIELD="' + shieldArgs.shield + '"' : ''} ${shieldArgs['cmake-args'] || ''}`);
|
||||
|
||||
console.log(output.toString());
|
||||
} catch (e) {
|
||||
console.error(`::error::Failed to build ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
error = true;
|
||||
} finally {
|
||||
console.log('::endgroup::');
|
||||
}
|
||||
}
|
||||
|
||||
if (error) {
|
||||
throw new Error('Failed to build one or more configurations');
|
||||
}
|
||||
- name: Upload artifacts
|
||||
uses: actions/github-script@v7
|
||||
continue-on-error: ${{ github.event_name == 'pull_request' }}
|
||||
id: boards-upload
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const {default: artifact} = require('@actions/artifact');
|
||||
|
||||
const buildShieldArgs = JSON.parse(`${{ matrix.shieldArgs }}`);
|
||||
|
||||
let error = false;
|
||||
|
||||
for (const shieldArgs of buildShieldArgs) {
|
||||
try {
|
||||
console.log(`::group::${{ matrix.board}} ${shieldArgs.shield} Upload`)
|
||||
|
||||
const fileExtensions = ["hex", "uf2"];
|
||||
|
||||
|
@ -90,9 +125,9 @@ jobs:
|
|||
const cmakeName = shieldArgs['cmake-args'] ? '-' + (shieldArgs.nickname || shieldArgs['cmake-args'].split(' ').join('')) : '';
|
||||
const artifactName = `${{ matrix.board }}${shieldArgs.shield ? '-' + shieldArgs.shield : ''}${cmakeName}-zmk`;
|
||||
|
||||
await artifactClient.uploadArtifact(artifactName, files, rootDirectory, options);
|
||||
await artifact.uploadArtifact(artifactName, files, rootDirectory, options);
|
||||
} catch (e) {
|
||||
console.error(`::error::Failed to build or upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(`::error::Failed to upload ${{ matrix.board }} ${shieldArgs.shield} ${shieldArgs['cmake-args']}`);
|
||||
console.error(e);
|
||||
error = true;
|
||||
} finally {
|
||||
|
@ -104,14 +139,14 @@ jobs:
|
|||
throw new Error('Failed to build one or more configurations');
|
||||
}
|
||||
compile-matrix:
|
||||
if: ${{ always() }}
|
||||
if: ${{ !cancelled() }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [core-coverage, board-changes, nightly]
|
||||
outputs:
|
||||
include-list: ${{ steps.compile-list.outputs.result }}
|
||||
steps:
|
||||
- name: Join build lists
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: compile-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -135,6 +170,7 @@ jobs:
|
|||
perBoard[configuration.board].push({
|
||||
shield: configuration.shield,
|
||||
'cmake-args': configuration['cmake-args'],
|
||||
snippet: configuration.snippet,
|
||||
nickname: configuration.nickname
|
||||
})
|
||||
}
|
||||
|
@ -151,14 +187,16 @@ jobs:
|
|||
core-include: ${{ steps.core-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
node-version: '14.x'
|
||||
persist-credentials: false
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: core-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -180,14 +218,14 @@ jobs:
|
|||
boards-include: ${{ steps.boards-list.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '14.x'
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: boards-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -257,14 +295,14 @@ jobs:
|
|||
});
|
||||
}))).flat();
|
||||
nightly:
|
||||
if: ${{ github.event_name == 'schedule' }}
|
||||
if: ${{ github.event_name == 'schedule' && github.repository_owner == 'zmkfirmware' }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: get-grouped-hardware
|
||||
outputs:
|
||||
nightly-include: ${{ steps.nightly-list.outputs.result }}
|
||||
steps:
|
||||
- name: Create nightly list
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: nightly-list
|
||||
with:
|
||||
script: |
|
||||
|
@ -307,15 +345,17 @@ jobs:
|
|||
organized-metadata: ${{ steps.organize-metadata.outputs.result }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
node-version: '14.x'
|
||||
persist-credentials: false
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "14.x"
|
||||
- name: Install js-yaml
|
||||
run: npm install js-yaml
|
||||
- name: Aggregate Metadata
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: aggregate-metadata
|
||||
with:
|
||||
script: |
|
||||
|
@ -329,11 +369,11 @@ jobs:
|
|||
yaml.loadAll(fs.readFileSync(f, "utf8"))
|
||||
);
|
||||
|
||||
return JSON.stringify(aggregated).replace(/\\/g,"\\\\");
|
||||
return JSON.stringify(aggregated).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
||||
result-encoding: string
|
||||
|
||||
- name: Organize Metadata
|
||||
uses: actions/github-script@v4
|
||||
uses: actions/github-script@v7
|
||||
id: organize-metadata
|
||||
with:
|
||||
script: |
|
||||
|
@ -376,33 +416,38 @@ jobs:
|
|||
},
|
||||
{ onboard: [], interconnects: {} });
|
||||
|
||||
return JSON.stringify(grouped).replace(/\\/g,"\\\\");
|
||||
return JSON.stringify(grouped).replace(/\\/g,"\\\\").replace(/`/g,"\\`");
|
||||
result-encoding: string
|
||||
get-changed-files:
|
||||
if: ${{ github.event_name != 'schedule' }}
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
changed-files: ${{ steps.changed-files.outputs.all }}
|
||||
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
board-changes: ${{ steps.board-changes.outputs.result }}
|
||||
core-changes: ${{ steps.core-changes.outputs.result }}
|
||||
steps:
|
||||
- uses: Ana06/get-changed-files@v2.0.0
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: tj-actions/changed-files@v45
|
||||
id: changed-files
|
||||
with:
|
||||
format: 'json'
|
||||
- uses: actions/github-script@v4
|
||||
json: true
|
||||
escape_json: false
|
||||
- uses: actions/github-script@v7
|
||||
id: board-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
return boardChanges.length ? 'true' : 'false';
|
||||
result-encoding: string
|
||||
- uses: actions/github-script@v4
|
||||
- uses: actions/github-script@v7
|
||||
id: core-changes
|
||||
with:
|
||||
script: |
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all }}`);
|
||||
const changedFiles = JSON.parse(`${{ steps.changed-files.outputs.all_changed_files }}`);
|
||||
const boardChanges = changedFiles.filter(f => f.startsWith('app/boards'));
|
||||
const appChanges = changedFiles.filter(f => f.startsWith('app'));
|
||||
const ymlChanges = changedFiles.includes('.github/workflows/build.yml');
|
||||
|
|
29
.github/workflows/clang-format-lint.yml
vendored
29
.github/workflows/clang-format-lint.yml
vendored
|
@ -1,29 +0,0 @@
|
|||
name: Clang Format
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".github/workflows/clang-format-lint.yml"
|
||||
- "app/boards/**/*.c"
|
||||
- "app/include/**/*.h"
|
||||
- "app/src/**"
|
||||
- "app/drivers/**/*.c"
|
||||
- "app/drivers/**/*.h"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/clang-format-lint.yml"
|
||||
- "app/boards/**/*.c"
|
||||
- "app/include/**/*.h"
|
||||
- "app/src/**"
|
||||
- "app/drivers/**/*.c"
|
||||
- "app/drivers/**/*.h"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: DoozyX/clang-format-lint-action@v0.13
|
||||
with:
|
||||
source: "./app"
|
||||
extensions: "h,c"
|
14
.github/workflows/doc-checks.yml
vendored
14
.github/workflows/doc-checks.yml
vendored
|
@ -14,27 +14,17 @@ jobs:
|
|||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
- name: ESLint
|
||||
run: npm run lint
|
||||
working-directory: docs
|
||||
prettier:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
- name: Prettier check
|
||||
run: npm run prettier:check
|
||||
working-directory: docs
|
||||
typecheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: docs
|
||||
|
|
|
@ -15,25 +15,14 @@ on:
|
|||
- "app/scripts/west_commands/metadata.py"
|
||||
|
||||
jobs:
|
||||
check-metadata-format:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v2
|
||||
- uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: app
|
||||
- name: Prettier Check
|
||||
run: npm run prettier:check
|
||||
working-directory: app
|
||||
validate-metadata:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
|
||||
image: docker.io/zmkfirmware/zmk-dev-arm:3.5
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: pip install -r app/scripts/requirements.txt
|
||||
run: pip install --break-system-packages -r app/scripts/requirements.txt
|
||||
- name: West init
|
||||
run: west init -l app
|
||||
- name: Update modules (west update)
|
||||
|
|
15
.github/workflows/pre-commit.yml
vendored
Normal file
15
.github/workflows/pre-commit.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: pre-commit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
- uses: pre-commit/action@v3.0.1
|
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
|
@ -6,11 +6,13 @@ on:
|
|||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/test.yml"
|
||||
- "app/tests/**"
|
||||
- "app/src/**"
|
||||
- "app/include/**"
|
||||
|
||||
jobs:
|
||||
collect-tests:
|
||||
|
@ -19,13 +21,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Find test directories
|
||||
id: test-dirs
|
||||
run: |
|
||||
cd app/tests/
|
||||
export TESTS=$(ls -d * | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "::set-output name=test-dirs::${TESTS}"
|
||||
export TESTS=$(ls -d * | grep -v ble | jq -R -s -c 'split("\n")[:-1]')
|
||||
echo "test-dirs=${TESTS}" >> $GITHUB_OUTPUT
|
||||
run-tests:
|
||||
needs: collect-tests
|
||||
strategy:
|
||||
|
@ -33,12 +35,12 @@ jobs:
|
|||
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.0
|
||||
image: docker.io/zmkfirmware/zmk-build-arm:3.5
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache west modules
|
||||
uses: actions/cache@v3.0.2
|
||||
uses: actions/cache@v4
|
||||
env:
|
||||
cache-name: cache-zephyr-modules
|
||||
with:
|
||||
|
@ -65,7 +67,7 @@ jobs:
|
|||
run: west test tests/${{ matrix.test }}
|
||||
- name: Archive artifacts
|
||||
if: ${{ always() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: "log-files"
|
||||
name: "${{ matrix.test }}-log-files"
|
||||
path: app/build/**/*.log
|
||||
|
|
9
.gitignore
vendored
9
.gitignore
vendored
|
@ -5,5 +5,14 @@
|
|||
/zephyr
|
||||
/zmk-config
|
||||
/build
|
||||
|
||||
# macOS
|
||||
*.DS_Store
|
||||
|
||||
# Python
|
||||
__pycache__
|
||||
.python-version
|
||||
.venv
|
||||
|
||||
# clangd
|
||||
app/.cache/
|
||||
|
|
|
@ -1,12 +1,28 @@
|
|||
fail_fast: false
|
||||
repos:
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: v1.5.1
|
||||
hooks:
|
||||
- id: remove-tabs
|
||||
exclude: "vendor-prefixes\\.txt$"
|
||||
- repo: https://github.com/pocc/pre-commit-hooks
|
||||
rev: v1.1.1
|
||||
rev: v1.3.5
|
||||
hooks:
|
||||
- id: clang-format
|
||||
args:
|
||||
- -i
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v2.2.1
|
||||
rev: v2.7.1
|
||||
hooks:
|
||||
- id: prettier
|
||||
# Workaround for https://github.com/pre-commit/mirrors-prettier/issues/29
|
||||
additional_dependencies:
|
||||
- prettier@2.8.7
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: check-yaml
|
||||
- id: check-added-large-files
|
||||
- id: check-shebang-scripts-are-executable
|
||||
exclude: "\\.mustache$"
|
||||
|
|
10
.vscode/extensions.json
vendored
Normal file
10
.vscode/extensions.json
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"esbenp.prettier-vscode",
|
||||
"ms-python.python",
|
||||
"ms-vscode.cpptools",
|
||||
"plorefice.devicetree",
|
||||
"twxs.cmake",
|
||||
"unifiedjs.vscode-mdx"
|
||||
]
|
||||
}
|
17
.vscode/settings.json
vendored
17
.vscode/settings.json
vendored
|
@ -3,5 +3,20 @@
|
|||
"*.overlay": "dts",
|
||||
"*.keymap": "dts"
|
||||
},
|
||||
"python.formatting.provider": "black"
|
||||
"python.formatting.provider": "black",
|
||||
"[c]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascript][javascriptreact][typescript][typescriptreact]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[python]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "ms-python.python"
|
||||
},
|
||||
"[css][json][jsonc][html][markdown][yaml]": {
|
||||
"editor.formatOnSave": true,
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
}
|
||||
}
|
|
@ -86,6 +86,12 @@ documentation to areas not currently covered are greatly appreciated.
|
|||
ZMK uses `prettier` to format documentation files. You can run prettier with `npm run prettier:format`.
|
||||
You can setup git to run prettier automatically when you commit by installing the pre-commit hooks: `pip3 install pre-commit`, `pre-commit install`.
|
||||
|
||||
### Linting
|
||||
|
||||
This repository utilizes ESLint for code linting to ensure consistent code style and identify potential errors or bugs early in the development process.
|
||||
|
||||
You can run ESLint with `npm run lint` to verify your changes.
|
||||
|
||||
## Code Contributions
|
||||
|
||||
### Development Setup
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
[](https://github.com/zmkfirmware/zmk/actions)
|
||||
[](CODE_OF_CONDUCT.md)
|
||||
|
||||
[ZMK Firmware](https://zmk.dev/) is an open source (MIT) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
||||
[ZMK Firmware](https://zmk.dev/) is an open source ([MIT](LICENSE)) keyboard firmware built on the [Zephyr™ Project](https://www.zephyrproject.org/) Real Time Operating System (RTOS). ZMK's goal is to provide a modern, wireless, and powerful firmware free of licensing issues.
|
||||
|
||||
Check out the website to learn more: https://zmk.dev/
|
||||
Check out the website to learn more: https://zmk.dev/.
|
||||
|
||||
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite)
|
||||
You can also come join our [ZMK Discord Server](https://zmk.dev/community/discord/invite).
|
||||
|
||||
To review features, check out the [feature overview](https://zmk.dev/docs/). ZMK is under active development, and new features are listed with the [enhancement label](https://github.com/zmkfirmware/zmk/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) in GitHub. Please feel free to add 👍 to the issue description of any requests to upvote the feature.
|
||||
|
|
|
@ -2,67 +2,80 @@ cmake_minimum_required(VERSION 3.13.1)
|
|||
|
||||
set(CONFIG_APPLICATION_DEFINED_SYSCALL true)
|
||||
|
||||
# Add our custom Zephyr module for drivers w/ syscalls, etc.
|
||||
list(APPEND DTS_ROOT ${CMAKE_SOURCE_DIR}/drivers/zephyr)
|
||||
|
||||
set(ZephyrBuildConfiguration_ROOT ${CMAKE_SOURCE_DIR}/cmake)
|
||||
|
||||
list(APPEND ZEPHYR_EXTRA_MODULES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/drivers
|
||||
)
|
||||
set(ZEPHYR_EXTRA_MODULES "${ZMK_EXTRA_MODULES};${CMAKE_CURRENT_SOURCE_DIR}/module;${CMAKE_CURRENT_SOURCE_DIR}/keymap-module")
|
||||
|
||||
# Find Zephyr. This also loads Zephyr's build system.
|
||||
find_package(Zephyr REQUIRED HINTS ../zephyr)
|
||||
project(zmk)
|
||||
|
||||
zephyr_linker_sources(SECTIONS include/linker/zmk-behaviors.ld)
|
||||
zephyr_linker_sources(RODATA include/linker/zmk-events.ld)
|
||||
|
||||
if(CONFIG_ZMK_BEHAVIOR_LOCAL_IDS)
|
||||
zephyr_linker_sources(DATA_SECTIONS include/linker/zmk-behavior-local-id-map.ld)
|
||||
endif()
|
||||
|
||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/behavior.h)
|
||||
zephyr_syscall_header(${APPLICATION_SOURCE_DIR}/include/drivers/ext_power.h)
|
||||
|
||||
# Add your source file to the "app" target. This must come after
|
||||
# find_package(Zephyr) which defines the target.
|
||||
target_include_directories(app PRIVATE include)
|
||||
target_sources(app PRIVATE src/stdlib.c)
|
||||
target_sources(app PRIVATE src/activity.c)
|
||||
target_sources(app PRIVATE src/kscan.c)
|
||||
target_sources(app PRIVATE src/behavior.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_KSCAN_SIDEBAND_BEHAVIORS app PRIVATE src/kscan_sideband_behaviors.c)
|
||||
target_sources(app PRIVATE src/matrix_transform.c)
|
||||
target_sources(app PRIVATE src/physical_layouts.c)
|
||||
target_sources(app PRIVATE src/sensors.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/wpm.c)
|
||||
target_sources(app PRIVATE src/event_manager.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_PM app PRIVATE src/pm.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/ext_power_generic.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_GPIO_KEY_WAKEUP_TRIGGER app PRIVATE src/gpio_key_wakeup_trigger.c)
|
||||
target_sources(app PRIVATE src/events/activity_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/position_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/sensor_event.c)
|
||||
target_sources(app PRIVATE src/events/mouse_button_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_WPM app PRIVATE src/events/wpm_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/events/usb_conn_state_changed.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_reset.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_EXT_POWER app PRIVATE src/behaviors/behavior_ext_power.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SOFT_OFF app PRIVATE src/behaviors/behavior_soft_off.c)
|
||||
if ((NOT CONFIG_ZMK_SPLIT) OR CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
target_sources(app PRIVATE src/hid.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_MOUSE app PRIVATE src/mouse.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_key_press.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_KEY_TOGGLE app PRIVATE src/behaviors/behavior_key_toggle.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_HOLD_TAP app PRIVATE src/behaviors/behavior_hold_tap.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STICKY_KEY app PRIVATE src/behaviors/behavior_sticky_key.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_caps_word.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_key_repeat.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_macro.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MACRO app PRIVATE src/behaviors/behavior_macro.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_momentary_layer.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_mod_morph.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_outputs.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_toggle_layer.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_to_layer.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_transparent.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_none.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_sensor_rotate_key_press.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE app PRIVATE src/behaviors/behavior_sensor_rotate.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR app PRIVATE src/behaviors/behavior_sensor_rotate_var.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON app PRIVATE src/behaviors/behavior_sensor_rotate_common.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_MOUSE_KEY_PRESS app PRIVATE src/behaviors/behavior_mouse_key_press.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BEHAVIOR_STUDIO_UNLOCK app PRIVATE src/behaviors/behavior_studio_unlock.c)
|
||||
target_sources(app PRIVATE src/combo.c)
|
||||
target_sources(app PRIVATE src/behaviors/behavior_tap_dance.c)
|
||||
target_sources(app PRIVATE src/behavior_queue.c)
|
||||
target_sources(app PRIVATE src/conditional_layer.c)
|
||||
target_sources(app PRIVATE src/endpoints.c)
|
||||
target_sources(app PRIVATE src/events/endpoint_selection_changed.c)
|
||||
target_sources(app PRIVATE src/events/endpoint_changed.c)
|
||||
target_sources(app PRIVATE src/hid_listener.c)
|
||||
target_sources(app PRIVATE src/keymap.c)
|
||||
target_sources(app PRIVATE src/events/layer_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/modifiers_state_changed.c)
|
||||
target_sources(app PRIVATE src/events/keycode_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/hid_indicators.c)
|
||||
|
||||
if (CONFIG_ZMK_BLE)
|
||||
target_sources(app PRIVATE src/events/ble_active_profile_changed.c)
|
||||
|
@ -75,8 +88,10 @@ endif()
|
|||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/behaviors/behavior_rgb_underglow.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/behaviors/behavior_backlight.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/events/battery_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BLE app PRIVATE src/battery.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/events/battery_state_changed.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BATTERY_REPORTING app PRIVATE src/battery.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_HID_INDICATORS app PRIVATE src/events/hid_indicators_changed.c)
|
||||
|
||||
target_sources_ifdef(CONFIG_ZMK_SPLIT app PRIVATE src/events/split_peripheral_status_changed.c)
|
||||
add_subdirectory(src/split)
|
||||
|
@ -85,8 +100,33 @@ target_sources_ifdef(CONFIG_USB_DEVICE_STACK app PRIVATE src/usb.c)
|
|||
target_sources_ifdef(CONFIG_ZMK_USB app PRIVATE src/usb_hid.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_RGB_UNDERGLOW app PRIVATE src/rgb_underglow.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_BACKLIGHT app PRIVATE src/backlight.c)
|
||||
target_sources_ifdef(CONFIG_ZMK_LOW_PRIORITY_WORK_QUEUE app PRIVATE src/workqueue.c)
|
||||
target_sources(app PRIVATE src/main.c)
|
||||
|
||||
add_subdirectory(src/display/)
|
||||
add_subdirectory_ifdef(CONFIG_SETTINGS src/settings/)
|
||||
|
||||
if (CONFIG_ZMK_STUDIO_RPC)
|
||||
# For some reason this is failing if run from a different sub-file.
|
||||
list(APPEND CMAKE_MODULE_PATH ${ZEPHYR_BASE}/modules/nanopb)
|
||||
|
||||
include(nanopb)
|
||||
|
||||
# Turn off the default nanopb behavior
|
||||
set(NANOPB_GENERATE_CPP_STANDALONE OFF)
|
||||
|
||||
nanopb_generate_cpp(proto_srcs proto_hdrs RELPATH ${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}
|
||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/studio.proto
|
||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/meta.proto
|
||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/core.proto
|
||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/behaviors.proto
|
||||
${ZEPHYR_ZMK_STUDIO_MESSAGES_MODULE_DIR}/proto/zmk/keymap.proto
|
||||
)
|
||||
|
||||
target_include_directories(app PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_sources(app PRIVATE ${proto_srcs} ${proto_hdrs})
|
||||
|
||||
add_subdirectory(src/studio)
|
||||
endif()
|
||||
|
||||
zephyr_cc_option(-Wfatal-errors)
|
||||
|
|
335
app/Kconfig
335
app/Kconfig
|
@ -37,6 +37,17 @@ config BT_DIS_MODEL
|
|||
config BT_DIS_MANUF
|
||||
default "ZMK Project"
|
||||
|
||||
# Hardware specific overrides
|
||||
|
||||
if SOC_SERIES_NRF52X
|
||||
|
||||
# Default on for our usage until boards implement retained bootmode.
|
||||
config NRF_STORE_REBOOT_TYPE_GPREGRET
|
||||
bool
|
||||
default y
|
||||
|
||||
endif
|
||||
|
||||
menu "HID"
|
||||
|
||||
choice ZMK_HID_REPORT_TYPE
|
||||
|
@ -53,10 +64,19 @@ config ZMK_HID_REPORT_TYPE_NKRO
|
|||
help
|
||||
Enable full N-Key Roll Over for HID output. This selection will prevent the keyboard
|
||||
from working with some BIOS/UEFI versions that only support "boot keyboard" support.
|
||||
This option also prevents using some infrequently used higher range HID usages.
|
||||
This option also prevents using some infrequently used higher range HID usages (notably F13-F24 and INTL1-9)
|
||||
These usages can be re enabled with ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT.
|
||||
|
||||
endchoice
|
||||
|
||||
config ZMK_HID_KEYBOARD_NKRO_EXTENDED_REPORT
|
||||
bool "Enable extended NKRO reporting"
|
||||
depends on ZMK_HID_REPORT_TYPE_NKRO
|
||||
help
|
||||
Enables higher usage range for NKRO (F13-F24 and INTL1-9).
|
||||
Please note this is not compatible with Android currently and you will get no input
|
||||
|
||||
|
||||
if ZMK_HID_REPORT_TYPE_HKRO
|
||||
|
||||
config ZMK_HID_KEYBOARD_REPORT_SIZE
|
||||
|
@ -87,14 +107,33 @@ config ZMK_HID_CONSUMER_REPORT_USAGES_BASIC
|
|||
|
||||
endchoice
|
||||
|
||||
config ZMK_HID_INDICATORS
|
||||
bool "HID Indicators"
|
||||
help
|
||||
Enable HID indicators, used for detecting state of Caps/Scroll/Num Lock,
|
||||
Kata, and Compose.
|
||||
|
||||
config ZMK_HID_SEPARATE_MOD_RELEASE_REPORT
|
||||
bool "Release Modifiers Separately"
|
||||
help
|
||||
Send a separate release event for the modifiers, to make sure the release
|
||||
of the modifier doesn't get recognized before the actual key's release event.
|
||||
|
||||
menu "Output Types"
|
||||
|
||||
config ZMK_USB
|
||||
bool "USB"
|
||||
depends on (!ZMK_SPLIT || (ZMK_SPLIT && ZMK_SPLIT_ROLE_CENTRAL))
|
||||
select USB
|
||||
select USB_DEVICE_STACK
|
||||
select USB_DEVICE_HID
|
||||
|
||||
config ZMK_USB_BOOT
|
||||
bool "USB Boot Protocol Support"
|
||||
depends on ZMK_USB
|
||||
select USB_HID_BOOT_PROTOCOL
|
||||
select USB_DEVICE_SOF
|
||||
|
||||
if ZMK_USB
|
||||
|
||||
config USB_NUMOF_EP_WRITE_RETRIES
|
||||
|
@ -114,18 +153,55 @@ menuconfig ZMK_BLE
|
|||
select BT_SMP_APP_PAIRING_ACCEPT
|
||||
select BT_PERIPHERAL
|
||||
select BT_DIS
|
||||
select BT_BAS
|
||||
select BT_SETTINGS
|
||||
select SETTINGS
|
||||
imply BT_SETTINGS if !ARCH_POSIX
|
||||
imply SETTINGS if !ARCH_POSIX
|
||||
imply ZMK_BATTERY_REPORTING if !ARCH_POSIX
|
||||
|
||||
if ZMK_BLE
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_CONN
|
||||
bool "Experimental BLE connection changes"
|
||||
help
|
||||
Enables a combination of settings that are planned to be default in future versions of ZMK
|
||||
to improve connection stability. This includes changes to timing on BLE pairing initiation,
|
||||
restores use of the updated/new LLCP implementation, and disables 2M PHY support.
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_SEC
|
||||
bool "Experimental BLE security changes"
|
||||
imply BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||
help
|
||||
Enables a combination of settings that are planned to be officially supported in the future.
|
||||
This includes enabling BT Secure Connection passkey entry, and allows overwrite of keys from
|
||||
previously paired hosts.
|
||||
|
||||
config ZMK_BLE_EXPERIMENTAL_FEATURES
|
||||
bool "Experimental BLE connection and security settings/features"
|
||||
select ZMK_BLE_EXPERIMENTAL_CONN
|
||||
select ZMK_BLE_EXPERIMENTAL_SEC
|
||||
help
|
||||
Enables experimental connection changes and security features.
|
||||
|
||||
config ZMK_BLE_PASSKEY_ENTRY
|
||||
bool "Require passkey entry on the keyboard to complete pairing"
|
||||
select RING_BUFFER
|
||||
|
||||
config BT_SMP_ALLOW_UNAUTH_OVERWRITE
|
||||
imply ZMK_BLE_PASSKEY_ENTRY
|
||||
|
||||
config BT_CTLR_PHY_2M
|
||||
default n if ZMK_BLE_EXPERIMENTAL_CONN
|
||||
|
||||
# BT_TINYCRYPT_ECC is required for BT_SMP_SC_PAIR_ONLY when using HCI
|
||||
config BT_TINYCRYPT_ECC
|
||||
default y if BT_HCI && !BT_CTLR
|
||||
|
||||
config SYSTEM_WORKQUEUE_STACK_SIZE
|
||||
default 4096 if SOC_RP2040
|
||||
default 2048
|
||||
|
||||
config ZMK_BLE_THREAD_STACK_SIZE
|
||||
int "BLE notify thread stack size"
|
||||
default 512
|
||||
default 768
|
||||
|
||||
config ZMK_BLE_THREAD_PRIORITY
|
||||
int "BLE notify thread priority"
|
||||
|
@ -139,24 +215,23 @@ config ZMK_BLE_CONSUMER_REPORT_QUEUE_SIZE
|
|||
int "Max number of consumer HID reports to queue for sending over BLE"
|
||||
default 5
|
||||
|
||||
config ZMK_BLE_MOUSE_REPORT_QUEUE_SIZE
|
||||
int "Max number of mouse HID reports to queue for sending over BLE"
|
||||
default 20
|
||||
|
||||
config ZMK_BLE_CLEAR_BONDS_ON_START
|
||||
bool "Configuration that clears all bond information from the keyboard on startup."
|
||||
default n
|
||||
|
||||
# HID GATT notifications sent this way are *not* picked up by Linux, and possibly others.
|
||||
config BT_GATT_NOTIFY_MULTIPLE
|
||||
default n
|
||||
|
||||
config BT_GATT_AUTO_SEC_REQ
|
||||
default n
|
||||
default (ZMK_SPLIT_BLE && !ZMK_SPLIT_ROLE_CENTRAL)
|
||||
|
||||
config BT_DEVICE_APPEARANCE
|
||||
default 961
|
||||
|
||||
config ZMK_BLE_PASSKEY_ENTRY
|
||||
bool "Experimental: Requiring typing passkey from host to pair BLE connection"
|
||||
default n
|
||||
|
||||
config BT_PERIPHERAL_PREF_MIN_INT
|
||||
default 6
|
||||
|
||||
|
@ -183,13 +258,36 @@ rsource "src/split/Kconfig"
|
|||
#Basic Keyboard Setup
|
||||
endmenu
|
||||
|
||||
menu "Keymaps"
|
||||
|
||||
config ZMK_KEYMAP_LAYER_REORDERING
|
||||
bool "Layer Reordering Support"
|
||||
|
||||
config ZMK_KEYMAP_SETTINGS_STORAGE
|
||||
bool "Settings Save/Load"
|
||||
depends on SETTINGS
|
||||
depends on ZMK_BEHAVIOR_LOCAL_IDS
|
||||
|
||||
if ZMK_KEYMAP_SETTINGS_STORAGE
|
||||
|
||||
config ZMK_KEYMAP_LAYER_NAME_MAX_LEN
|
||||
int "Max Layer Name Length"
|
||||
default 20
|
||||
|
||||
endif
|
||||
|
||||
endmenu # Keymaps
|
||||
|
||||
rsource "src/studio/Kconfig"
|
||||
|
||||
menu "Display/LED Options"
|
||||
|
||||
rsource "src/display/Kconfig"
|
||||
|
||||
menuconfig ZMK_RGB_UNDERGLOW
|
||||
bool "RGB Adressable LED Underglow"
|
||||
bool "RGB Addressable LED Underglow"
|
||||
select LED_STRIP
|
||||
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
|
||||
if ZMK_RGB_UNDERGLOW
|
||||
|
||||
|
@ -297,14 +395,45 @@ endif
|
|||
#Display/LED Options
|
||||
endmenu
|
||||
|
||||
menu "Mouse Options"
|
||||
|
||||
config ZMK_MOUSE
|
||||
bool "Enable ZMK mouse emulation"
|
||||
|
||||
#Mouse Options
|
||||
endmenu
|
||||
|
||||
menu "Power Management"
|
||||
|
||||
config ZMK_BATTERY_REPORTING
|
||||
bool "Battery level detection/reporting"
|
||||
select SENSOR
|
||||
select ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
imply BT_BAS if ZMK_BLE
|
||||
|
||||
if ZMK_BATTERY_REPORTING
|
||||
|
||||
choice ZMK_BATTERY_REPORTING_FETCH_MODE
|
||||
prompt "Battery Reporting Fetch Mode"
|
||||
|
||||
config ZMK_BATTERY_REPORTING_FETCH_MODE_STATE_OF_CHARGE
|
||||
bool "State of charge"
|
||||
|
||||
config ZMK_BATTERY_REPORTING_FETCH_MODE_LITHIUM_VOLTAGE
|
||||
bool "Lithium Voltage"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
config ZMK_IDLE_TIMEOUT
|
||||
int "Milliseconds of inactivity before entering idle state (OLED shutoff, etc)"
|
||||
default 30000
|
||||
|
||||
config ZMK_SLEEP
|
||||
bool "Enable deep sleep support"
|
||||
depends on HAS_POWEROFF
|
||||
select POWEROFF
|
||||
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
imply USB
|
||||
|
||||
if ZMK_SLEEP
|
||||
|
@ -323,6 +452,26 @@ config ZMK_EXT_POWER
|
|||
bool "Enable support to control external power output"
|
||||
default y
|
||||
|
||||
config ZMK_PM
|
||||
bool
|
||||
|
||||
config ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
bool
|
||||
select ZMK_PM
|
||||
|
||||
config ZMK_PM_SOFT_OFF
|
||||
bool "Soft-off support"
|
||||
depends on HAS_POWEROFF
|
||||
select ZMK_PM
|
||||
select PM_DEVICE
|
||||
select ZMK_PM_DEVICE_SUSPEND_RESUME
|
||||
select POWEROFF
|
||||
|
||||
config ZMK_GPIO_KEY_WAKEUP_TRIGGER
|
||||
bool "Hardware supported wakeup (GPIO)"
|
||||
default y
|
||||
depends on DT_HAS_ZMK_GPIO_KEY_WAKEUP_TRIGGER_ENABLED && ZMK_PM_SOFT_OFF
|
||||
|
||||
#Power Management
|
||||
endmenu
|
||||
|
||||
|
@ -349,11 +498,15 @@ config ZMK_BEHAVIORS_QUEUE_SIZE
|
|||
int "Maximum number of behaviors to allow queueing from a macro or other complex behavior"
|
||||
default 64
|
||||
|
||||
DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE := zmk,behavior-key-toggle
|
||||
rsource "Kconfig.behaviors"
|
||||
|
||||
config ZMK_BEHAVIOR_KEY_TOGGLE
|
||||
bool
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_BEHAVIOR_KEY_TOGGLE))
|
||||
config ZMK_MACRO_DEFAULT_WAIT_MS
|
||||
int "Default time to wait (in milliseconds) before triggering the next behavior in macros"
|
||||
default 15
|
||||
|
||||
config ZMK_MACRO_DEFAULT_TAP_MS
|
||||
int "Default time to wait (in milliseconds) between the press and release events of a tapped behavior in macros"
|
||||
default 30
|
||||
|
||||
endmenu
|
||||
|
||||
|
@ -365,7 +518,11 @@ if USB_DEVICE_STACK
|
|||
|
||||
config ZMK_USB_INIT_PRIORITY
|
||||
int "USB Init Priority"
|
||||
default 50
|
||||
default 94
|
||||
|
||||
config ZMK_USB_HID_INIT_PRIORITY
|
||||
int "USB HID Init Priority"
|
||||
default 95
|
||||
|
||||
#USB
|
||||
endif
|
||||
|
@ -382,16 +539,46 @@ endif
|
|||
#Initialization Priorities
|
||||
endmenu
|
||||
|
||||
menu "KSCAN Settings"
|
||||
menuconfig ZMK_KSCAN
|
||||
bool "ZMK KScan Integration"
|
||||
default y
|
||||
select KSCAN
|
||||
|
||||
if ZMK_KSCAN
|
||||
|
||||
config ZMK_KSCAN_EVENT_QUEUE_SIZE
|
||||
int "Size of the event queue for KSCAN events to buffer events"
|
||||
default 4
|
||||
|
||||
#KSCAN Settings
|
||||
endmenu
|
||||
endif # ZMK_KSCAN
|
||||
|
||||
menu "USB Logging"
|
||||
config ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_KSCAN_SIDEBAND_BEHAVIORS_ENABLED
|
||||
select KSCAN
|
||||
|
||||
if ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
|
||||
config ZMK_KSCAN_SIDEBAND_BEHAVIORS_INIT_PRIORITY
|
||||
int "Keyboard scan sideband behaviors driver init priority"
|
||||
# The default kscan init priority is 90, so be sure we are initialized later.
|
||||
default 95
|
||||
|
||||
endif # ZMK_KSCAN_SIDEBAND_BEHAVIORS
|
||||
|
||||
menu "Logging"
|
||||
|
||||
config ZMK_LOGGING_MINIMAL
|
||||
bool "Suppress all ZMK debug log messages"
|
||||
default false
|
||||
|
||||
if !ZMK_LOGGING_MINIMAL
|
||||
|
||||
config ZMK_LOG_LEVEL
|
||||
default 4
|
||||
|
||||
endif
|
||||
|
||||
config ZMK_USB_LOGGING
|
||||
bool "Enable USB CDC ACM logging to help debug"
|
||||
|
@ -408,33 +595,74 @@ config ZMK_USB_LOGGING
|
|||
|
||||
if ZMK_USB_LOGGING
|
||||
|
||||
config ZMK_LOG_LEVEL
|
||||
default 4
|
||||
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
|
||||
default USB_CDC_ACM_LOG_LEVEL_OFF
|
||||
endchoice
|
||||
|
||||
choice USB_DRIVER_LOG_LEVEL_CHOICE
|
||||
default USB_DRIVER_LOG_LEVEL_OFF
|
||||
endchoice
|
||||
|
||||
# We do this to avoid log loop where logging to USB generates more log messages.
|
||||
config USB_CDC_ACM_LOG_LEVEL
|
||||
default 1
|
||||
|
||||
config USB_CDC_ACM_RINGBUF_SIZE
|
||||
default 1024
|
||||
|
||||
config LOG_BUFFER_SIZE
|
||||
default 8192
|
||||
|
||||
config LOG_STRDUP_BUF_COUNT
|
||||
default 16
|
||||
|
||||
config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
|
||||
default 1000
|
||||
|
||||
#ZMK_USB_LOGGING
|
||||
endif
|
||||
|
||||
#USB Logging
|
||||
config ZMK_RTT_LOGGING
|
||||
bool "Enable RTT logging to help debug"
|
||||
select LOG
|
||||
select DEBUG
|
||||
select ASSERT
|
||||
select USE_SEGGER_RTT
|
||||
select CONSOLE
|
||||
select RTT_CONSOLE
|
||||
|
||||
if ZMK_RTT_LOGGING
|
||||
|
||||
config SEGGER_RTT_BUFFER_SIZE_UP
|
||||
default 8192
|
||||
|
||||
#ZMK_RTT_LOGGING
|
||||
endif
|
||||
|
||||
if ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
||||
|
||||
config LOG_BUFFER_SIZE
|
||||
default 8192
|
||||
|
||||
config LOG_PROCESS_THREAD_SLEEP_MS
|
||||
default 100
|
||||
|
||||
#ZMK_USB_LOGGING || ZMK_RTT_LOGGING
|
||||
endif
|
||||
|
||||
#Logging
|
||||
endmenu
|
||||
|
||||
if SETTINGS
|
||||
|
||||
config ZMK_SETTINGS_RESET_ON_START
|
||||
bool "Delete all persistent settings when the keyboard boots"
|
||||
|
||||
if ZMK_SETTINGS_RESET_ON_START
|
||||
|
||||
config ZMK_SETTINGS_RESET_ON_START_INIT_PRIORITY
|
||||
int "Settings Reset ON Start Initialization Priority"
|
||||
default 60
|
||||
help
|
||||
Initialization priority for the settings reset on start. Must be lower priority/
|
||||
higher value than FLASH_INIT_PRIORITY if using the NVS/Flash settings backend.
|
||||
|
||||
|
||||
endif
|
||||
|
||||
|
||||
config ZMK_SETTINGS_SAVE_DEBOUNCE
|
||||
int "Milliseconds to debounce settings saves"
|
||||
default 60000
|
||||
|
@ -443,19 +671,31 @@ config ZMK_SETTINGS_SAVE_DEBOUNCE
|
|||
endif
|
||||
|
||||
config ZMK_BATTERY_REPORT_INTERVAL
|
||||
depends on ZMK_BLE
|
||||
depends on ZMK_BATTERY_REPORTING
|
||||
int "Battery level report interval in seconds"
|
||||
default 60
|
||||
|
||||
config ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
bool "Work queue for low priority items"
|
||||
|
||||
if ZMK_LOW_PRIORITY_WORK_QUEUE
|
||||
|
||||
config ZMK_LOW_PRIORITY_THREAD_STACK_SIZE
|
||||
int "Low priority thread stack size"
|
||||
default 768
|
||||
|
||||
config ZMK_LOW_PRIORITY_THREAD_PRIORITY
|
||||
int "Low priority thread priority"
|
||||
default 10
|
||||
|
||||
endif
|
||||
|
||||
#Advanced
|
||||
endmenu
|
||||
|
||||
#ZMK
|
||||
endmenu
|
||||
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 8192
|
||||
|
||||
config KERNEL_BIN_NAME
|
||||
default "zmk"
|
||||
|
||||
|
@ -465,12 +705,30 @@ config REBOOT
|
|||
config USB_DEVICE_STACK
|
||||
default y if HAS_HW_NRF_USBD
|
||||
|
||||
config FPU
|
||||
default CPU_HAS_FPU
|
||||
|
||||
config ZMK_WPM
|
||||
bool "Calculate WPM"
|
||||
default n
|
||||
|
||||
config SENSOR
|
||||
config ZMK_KEYMAP_SENSORS
|
||||
bool "Enable Keymap Sensors support"
|
||||
default y
|
||||
depends on DT_HAS_ZMK_KEYMAP_SENSORS_ENABLED
|
||||
select SENSOR
|
||||
|
||||
if ZMK_KEYMAP_SENSORS
|
||||
|
||||
config ZMK_KEYMAP_SENSORS_DEFAULT_TRIGGERS_PER_ROTATION
|
||||
int "Default triggers per rotation"
|
||||
help
|
||||
Unless overridden for a sensor in the board/shield/devicetree, this value
|
||||
determines how many times to trigger the bound behavior per full rotation.
|
||||
For tactile encoders with detents, this usually should match the number of
|
||||
detents per rotation of the encoder.
|
||||
default 20
|
||||
|
||||
endif # ZMK_KEYMAP_SENSORS
|
||||
|
||||
choice CBPRINTF_IMPLEMENTATION
|
||||
default CBPRINTF_NANO
|
||||
|
@ -490,4 +748,3 @@ osource "$(ZMK_CONFIG)/boards/shields/*/Kconfig.shield"
|
|||
|
||||
|
||||
source "Kconfig.zephyr"
|
||||
|
||||
|
|
120
app/Kconfig.behaviors
Normal file
120
app/Kconfig.behaviors
Normal file
|
@ -0,0 +1,120 @@
|
|||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config ZMK_BEHAVIOR_METADATA
|
||||
bool "Metadata"
|
||||
help
|
||||
Enabling this option adds APIs for documenting and fetching
|
||||
metadata describing a behaviors name, and supported parameters.
|
||||
|
||||
config ZMK_BEHAVIOR_LOCAL_IDS
|
||||
bool "Local IDs"
|
||||
|
||||
if ZMK_BEHAVIOR_LOCAL_IDS
|
||||
|
||||
config ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
|
||||
bool "Track in behavior bindings"
|
||||
|
||||
choice ZMK_BEHAVIOR_LOCAL_ID_TYPE
|
||||
prompt "Local ID Type"
|
||||
|
||||
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_SETTINGS_TABLE
|
||||
bool "Settings Table"
|
||||
depends on SETTINGS
|
||||
select ZMK_BEHAVIOR_LOCAL_IDS_IN_BINDINGS
|
||||
help
|
||||
Use persistent entries in the settings subsystem to identify
|
||||
behaviors by local ID, which uses the device name to generate
|
||||
a new settings entry tying a presistant local ID to that name.
|
||||
This guarantees stable, colllision-free local IDs at the expense
|
||||
of settings storage used.
|
||||
|
||||
config ZMK_BEHAVIOR_LOCAL_ID_TYPE_CRC16
|
||||
bool "CRC16 Hash"
|
||||
select CRC
|
||||
help
|
||||
Use the CRC16-ANSI hash of behavior device names to generate
|
||||
stable behavior local IDs. This saves on settings storage at
|
||||
the expense of (highly unlikely) risk of collisions.
|
||||
|
||||
endchoice
|
||||
|
||||
endif
|
||||
|
||||
|
||||
config ZMK_BEHAVIOR_HOLD_TAP
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_HOLD_TAP_ENABLED
|
||||
|
||||
if ZMK_BEHAVIOR_HOLD_TAP
|
||||
|
||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_HELD
|
||||
int "Hold Tap Max Held"
|
||||
default 10
|
||||
help
|
||||
Max number of simultaneously held hold-taps
|
||||
|
||||
config ZMK_BEHAVIOR_HOLD_TAP_MAX_CAPTURED_EVENTS
|
||||
int "Hold Tap Max Captured Events"
|
||||
default 40
|
||||
help
|
||||
Max number of captured system events while waiting to resolve hold taps
|
||||
|
||||
endif
|
||||
|
||||
config ZMK_BEHAVIOR_KEY_TOGGLE
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_KEY_TOGGLE_ENABLED
|
||||
|
||||
config ZMK_BEHAVIOR_MOUSE_KEY_PRESS
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_MOUSE_KEY_PRESS_ENABLED
|
||||
imply ZMK_MOUSE
|
||||
|
||||
config ZMK_BEHAVIOR_STICKY_KEY
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_STICKY_KEY_ENABLED
|
||||
|
||||
if ZMK_BEHAVIOR_STICKY_KEY
|
||||
|
||||
config ZMK_BEHAVIOR_STICKY_KEY_MAX_HELD
|
||||
int "Sticky Key Max Held"
|
||||
default 10
|
||||
help
|
||||
Max number of simultaneously held sticky keys
|
||||
|
||||
endif
|
||||
|
||||
config ZMK_BEHAVIOR_SOFT_OFF
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_SOFT_OFF_ENABLED && ZMK_PM_SOFT_OFF
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||
bool
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_ENABLED
|
||||
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||
|
||||
config ZMK_BEHAVIOR_SENSOR_ROTATE_VAR
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_SENSOR_ROTATE_VAR_ENABLED
|
||||
select ZMK_BEHAVIOR_SENSOR_ROTATE_COMMON
|
||||
|
||||
config ZMK_BEHAVIOR_STUDIO_UNLOCK
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_STUDIO_UNLOCK_ENABLED && ZMK_STUDIO
|
||||
|
||||
config ZMK_BEHAVIOR_MACRO
|
||||
bool
|
||||
default y
|
||||
depends on DT_HAS_ZMK_BEHAVIOR_MACRO_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_ONE_PARAM_ENABLED || DT_HAS_ZMK_BEHAVIOR_MACRO_TWO_PARAM_ENABLED
|
6
app/boards/01space_rp2040_042lcd.conf
Normal file
6
app/boards/01space_rp2040_042lcd.conf
Normal file
|
@ -0,0 +1,6 @@
|
|||
CONFIG_ZMK_DISPLAY=y
|
||||
CONFIG_LV_FONT_UNSCII_8=n
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_I2C_DW=y
|
||||
CONFIG_LV_Z_VDB_SIZE=50
|
7
app/boards/01space_rp2040_042lcd.overlay
Normal file
7
app/boards/01space_rp2040_042lcd.overlay
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&xiao_serial { status = "disabled"; };
|
4
app/boards/adafruit_kb2040.conf
Normal file
4
app/boards/adafruit_kb2040.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
CONFIG_CONSOLE=n
|
||||
CONFIG_SERIAL=n
|
||||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_ZMK_USB=y
|
7
app/boards/adafruit_kb2040.overlay
Normal file
7
app/boards/adafruit_kb2040.overlay
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pro_micro_serial { status = "disabled"; };
|
4
app/boards/adafruit_qt_py_rp2040.conf
Normal file
4
app/boards/adafruit_qt_py_rp2040.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
CONFIG_CONSOLE=n
|
||||
CONFIG_SERIAL=n
|
||||
CONFIG_UART_CONSOLE=n
|
||||
CONFIG_ZMK_USB=y
|
7
app/boards/adafruit_qt_py_rp2040.overlay
Normal file
7
app/boards/adafruit_qt_py_rp2040.overlay
Normal file
|
@ -0,0 +1,7 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&xiao_serial { status = "disabled"; };
|
9
app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml
Normal file
9
app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: adafruit_kb2040
|
||||
name: Adafruit KB2040
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://www.adafruit.com/product/5302
|
||||
exposes: [pro_micro]
|
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: adafruit_qt_py_rp2040
|
||||
name: Adafruit QT Py RP2040
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://www.adafruit.com/product/4900
|
||||
exposes: [seeed_xiao]
|
7
app/boards/arm/adv360pro/Kconfig
Normal file
7
app/boards/arm/adv360pro/Kconfig
Normal file
|
@ -0,0 +1,7 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
|
12
app/boards/arm/adv360pro/Kconfig.board
Normal file
12
app/boards/arm/adv360pro/Kconfig.board
Normal file
|
@ -0,0 +1,12 @@
|
|||
#
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
config BOARD_ADV360PRO_LEFT
|
||||
bool "adv360pro_left"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
|
||||
config BOARD_ADV360PRO_RIGHT
|
||||
bool "adv360pro_right"
|
||||
depends on SOC_NRF52840_QIAA
|
55
app/boards/arm/adv360pro/Kconfig.defconfig
Normal file
55
app/boards/arm/adv360pro/Kconfig.defconfig
Normal file
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if BOARD_ADV360PRO_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Adv360 Pro"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif # BOARD_ADV360PRO_LEFT
|
||||
|
||||
if BOARD_ADV360PRO_RIGHT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Adv360 Pro rt"
|
||||
|
||||
endif # BOARD_ADV360PRO_RIGHT
|
||||
|
||||
|
||||
if BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
|
||||
|
||||
config BOARD
|
||||
default "adv360pro"
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
config SPI
|
||||
bool
|
||||
default y
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||
default y
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
endif # BOARD_ADV360PRO_LEFT || BOARD_ADV360PRO_RIGHT
|
7
app/boards/arm/adv360pro/README.md
Executable file
7
app/boards/arm/adv360pro/README.md
Executable file
|
@ -0,0 +1,7 @@
|
|||
# Kinesis Advantage 360 Professional
|
||||
|
||||
This board definition provides upstream support for the [Kinesis Advantage 360 Professional](https://kinesis-ergo.com/keyboards/advantage360/)
|
||||
|
||||
Kinesis offer a specific [custom configuration](https://github.com/KinesisCorporation/Adv360-Pro-ZMK/) for the 360 Pro that references [a customised version of ZMK](https://github.com/ReFil/zmk/tree/adv360-z3.2-2) with Advantage 360 Pro specific functionality and changes over base ZMK. The Kinesis fork is regularly updated to bring the latest updates and changes from base ZMK however will not always be completely up to date, some features such as new keycodes will not be immediately available on the 360 Pro after they are implemented in base ZMK.
|
||||
|
||||
When using this board definition some of the more advanced features (the indicator RGB leds) will not work, and Kinesis cannot provide customer service for usage of base ZMK. Likewise the ZMK community cannot provide support for either the Kinesis keymap editor, nor any usage of the Kinesis custom fork.
|
30
app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi
Normal file
30
app/boards/arm/adv360pro/adv360pro-pinctrl.dtsi
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
||||
};
|
||||
};
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
155
app/boards/arm/adv360pro/adv360pro.dtsi
Normal file
155
app/boards/arm/adv360pro/adv360pro.dtsi
Normal file
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
#include <dt-bindings/led/led.h>
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include "adv360pro-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Adv360 Pro";
|
||||
compatible = "kinesis,adv360pro";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,backlight = &backlight;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <20>;
|
||||
rows = <5>;
|
||||
|
||||
|
||||
map = <
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,13) RC(4,14) RC(4,15) RC(4,16) RC(4,17) RC(4,18) RC(4,19)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,13) RC(3,14) RC(3,15) RC(3,16) RC(3,17) RC(3,18) RC(3,19)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,13) RC(2,14) RC(2,15) RC(2,16) RC(2,17) RC(2,18) RC(2,19)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,9) RC(1,10) RC(1,14) RC(1,15) RC(1,16) RC(1,17) RC(1,18) RC(1,19)
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,15) RC(0,16) RC(0,17) RC(0,18) RC(0,19)
|
||||
|
||||
>;
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <100000>;
|
||||
full-ohms = <(100000 + 100000)>;
|
||||
};
|
||||
|
||||
backlight: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_0 {
|
||||
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
/* WS2812 */
|
||||
chain-length = <3>; /* number of LEDs */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
48
app/boards/arm/adv360pro/adv360pro.keymap
Normal file
48
app/boards/arm/adv360pro/adv360pro.keymap
Normal file
|
@ -0,0 +1,48 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/backlight.h>
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
bindings = <
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &tog 1 &mo 3 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp U &kp I &kp O &kp P &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp SPACE &kp UP &kp DOWN &kp LBKT &kp RBKT &mo 2
|
||||
>;
|
||||
};
|
||||
keypad {
|
||||
bindings = <
|
||||
&kp EQUAL &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &trans &mo 3 &kp N6 &kp KP_NUM &kp KP_EQUAL &kp KP_DIVIDE &kp KP_MULTIPLY &kp MINUS
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &none &none &kp Y &kp KP_N7 &kp KP_N8 &kp KP_N9 &kp KP_MINUS &kp BSLH
|
||||
&kp ESC &kp A &kp S &kp D &kp F &kp G &none &kp LCTRL &kp LALT &kp LGUI &kp RCTRL &none &kp H &kp KP_N4 &kp KP_N5 &kp KP_N6 &kp KP_PLUS &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp HOME &kp PG_UP &kp N &kp KP_N1 &kp KP_N2 &kp KP_N3 &kp KP_ENTER &kp RSHFT
|
||||
&mo 2 &kp GRAVE &kp CAPS &kp LEFT &kp RIGHT &kp BSPC &kp DEL &kp END &kp PG_DN &kp ENTER &kp KP_N0 &kp UP &kp DOWN &kp KP_DOT &kp RBKT &mo 2
|
||||
>;
|
||||
};
|
||||
fn {
|
||||
bindings = <
|
||||
&kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &tog 1 &mo 3 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12
|
||||
&trans &trans &trans &trans &trans &trans &none &none &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &none &trans &trans &trans &trans &none &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
>;
|
||||
};
|
||||
mod {
|
||||
bindings = <
|
||||
&none &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &none &trans &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &bootloader &bootloader &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &bt BT_CLR &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &none &none &none &none &none
|
||||
&none &none &none &none &none &none &none &none &none &bl BL_TOG &rgb_ug RGB_TOG &bl BL_INC &bl BL_DEC &none &none &none
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
19
app/boards/arm/adv360pro/adv360pro.yaml
Normal file
19
app/boards/arm/adv360pro/adv360pro.yaml
Normal file
|
@ -0,0 +1,19 @@
|
|||
identifier: adv360pro
|
||||
name: Advantage 360 Pro
|
||||
type: keyboard
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- gpio
|
||||
- i2c
|
||||
- counter
|
||||
- spi
|
||||
- usb_device
|
||||
- nvs
|
||||
- can
|
||||
- kscan
|
||||
- ble
|
||||
- pwm
|
16
app/boards/arm/adv360pro/adv360pro.zmk.yml
Normal file
16
app/boards/arm/adv360pro/adv360pro.zmk.yml
Normal file
|
@ -0,0 +1,16 @@
|
|||
file_format: "1"
|
||||
id: adv360pro
|
||||
name: Advantage 360 Pro
|
||||
type: board
|
||||
url: https://kinesis-ergo.com/keyboards/advantage360
|
||||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- underglow
|
||||
- backlight
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
siblings:
|
||||
- adv360pro_left
|
||||
- adv360pro_right
|
37
app/boards/arm/adv360pro/adv360pro_left.dts
Normal file
37
app/boards/arm/adv360pro/adv360pro_left.dts
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "adv360pro.dtsi"
|
||||
|
||||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio1 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 12 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 25 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 11 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
55
app/boards/arm/adv360pro/adv360pro_left_defconfig
Normal file
55
app/boards/arm/adv360pro/adv360pro_left_defconfig
Normal file
|
@ -0,0 +1,55 @@
|
|||
#
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_ADV360PRO_LEFT=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable SPI for LEDS
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_NRFX=y
|
||||
|
||||
# Enable writing to flash
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
# Enable 32kHz crystal
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
|
||||
|
||||
#RGB leds config
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
|
||||
|
||||
#Backlighting configuration
|
||||
CONFIG_PWM=y
|
||||
CONFIG_LED_PWM=y
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_ZMK_BACKLIGHT_BRT_START=20
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
||||
|
||||
#Misc configuration
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
|
||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
41
app/boards/arm/adv360pro/adv360pro_right.dts
Normal file
41
app/boards/arm/adv360pro/adv360pro_right.dts
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2023 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "adv360pro.dtsi"
|
||||
|
||||
/{
|
||||
kscan0: kscan {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
row-gpios
|
||||
= <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 31 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 30 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
|
||||
col-gpios
|
||||
= <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
};
|
||||
};
|
||||
|
||||
&default_transform {
|
||||
col-offset = <10>;
|
||||
};
|
54
app/boards/arm/adv360pro/adv360pro_right_defconfig
Normal file
54
app/boards/arm/adv360pro/adv360pro_right_defconfig
Normal file
|
@ -0,0 +1,54 @@
|
|||
#
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_ADV360PRO_RIGHT=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
# Enable SPI for LEDS
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_NRFX=y
|
||||
|
||||
# Enable writing to flash
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
# Enable 32kHz crystal
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_XTAL=y
|
||||
CONFIG_CLOCK_CONTROL_NRF_K32SRC_150PPM=y
|
||||
|
||||
#RGB leds config
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=n
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EFF_START=0
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_AUTO_OFF_IDLE=y
|
||||
|
||||
#Backlighting configuration
|
||||
CONFIG_PWM=y
|
||||
CONFIG_LED_PWM=y
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_ZMK_BACKLIGHT_BRT_START=20
|
||||
CONFIG_ZMK_BACKLIGHT_AUTO_OFF_IDLE=y
|
||||
|
||||
#Misc configuration
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
CONFIG_ZMK_HID_REPORT_TYPE_NKRO=y
|
||||
CONFIG_ZMK_HID_CONSUMER_REPORT_USAGES_BASIC=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
CONFIG_ZMK_BLE=y
|
9
app/boards/arm/adv360pro/board.cmake
Normal file
9
app/boards/arm/adv360pro/board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2023 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
9
app/boards/arm/adv360pro/pre_dt_board.cmake
Normal file
9
app/boards/arm/adv360pro/pre_dt_board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
|
@ -11,9 +11,6 @@ config BOARD
|
|||
config ZMK_KEYBOARD_NAME
|
||||
default "BDN9 Rev2"
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_RGB_UNDERGLOW
|
||||
select SPI
|
||||
select WS2812_STRIP
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# Uncomment these lines below to enable encoders.
|
||||
# CONFIG_EC11=y
|
||||
# CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
# Uncomment the line below to enable RGB.
|
||||
# CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
|
|
|
@ -16,14 +16,12 @@
|
|||
chosen {
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,kscan = &kscan;
|
||||
zmk,underglow = &led_strip;
|
||||
};
|
||||
|
||||
kscan: kscan {
|
||||
compatible = "zmk,kscan-gpio-direct";
|
||||
label = "KSCAN";
|
||||
|
||||
input-gpios
|
||||
= <&gpiob 12 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>
|
||||
|
@ -40,26 +38,23 @@
|
|||
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpioa 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
mid_encoder: encoder_mid {
|
||||
compatible = "alps,ec11";
|
||||
label = "MID_ENCODER";
|
||||
a-gpios = <&gpioa 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpioa 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
right_encoder: encoder_right {
|
||||
compatible = "alps,ec11";
|
||||
label = "RIGHT_ENCODER";
|
||||
a-gpios = <&gpioa 15 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpiob 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
@ -67,6 +62,7 @@
|
|||
compatible = "zmk,keymap-sensors";
|
||||
status = "disabled";
|
||||
sensors = <>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -77,7 +73,6 @@
|
|||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
label = "WS2812";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>; /* ignored, but necessary for SPI bindings */
|
||||
|
@ -110,14 +105,13 @@
|
|||
apb1-prescaler = <1>;
|
||||
};
|
||||
|
||||
&usb {
|
||||
zephyr_udc0: &usb {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&usb_dm_pa11 &usb_dp_pa12>;
|
||||
pinctrl-names = "default";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
|
||||
// Overridden to lower RAM usage.
|
||||
num-bidir-endpoints = <4>;
|
||||
};
|
||||
|
||||
&rtc {
|
||||
|
@ -136,7 +130,6 @@
|
|||
|
||||
/* Set 6Kb of storage at the end of the 128Kb of flash */
|
||||
storage_partition: partition@1e800 {
|
||||
label = "storage";
|
||||
reg = <0x0001e800 0x00001800>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#undef ZMK_BEHAVIORS_KEEP_ALL
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
|
||||
|
|
|
@ -5,9 +5,6 @@ CONFIG_SOC_STM32F072XB=y
|
|||
# 72MHz system clock
|
||||
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=72000000
|
||||
|
||||
# Floating Point Options
|
||||
CONFIG_FPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
|
@ -17,9 +14,9 @@ CONFIG_PINCTRL=y
|
|||
# Poll to avoid interrupt overlap issues
|
||||
CONFIG_ZMK_KSCAN_DIRECT_POLLING=y
|
||||
|
||||
# Needed to reduce this to size that will fit on F072
|
||||
CONFIG_HEAP_MEM_POOL_SIZE=1024
|
||||
CONFIG_ISR_STACK_SIZE=1024
|
||||
|
||||
# clock configuration
|
||||
CONFIG_CLOCK_CONTROL=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
|
|
9
app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
Normal file
9
app/boards/arm/blackpill_f401cc/blackpill_f401cc.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f401cc
|
||||
name: BlackPill F401CC
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
9
app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml
Normal file
9
app/boards/arm/blackpill_f401ce/blackpill_f401ce.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f401ce
|
||||
name: BlackPill F401CE
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
9
app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml
Normal file
9
app/boards/arm/blackpill_f411ce/blackpill_f411ce.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: blackpill_f411ce
|
||||
name: BlackPill F411CE
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1
|
||||
exposes: [blackpill]
|
|
@ -18,10 +18,4 @@ endif # USB_DEVICE_STACK
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
endif # BOARD_BLUEMICRO840_V1
|
||||
|
|
|
@ -53,5 +53,5 @@
|
|||
|
||||
pro_micro_d: &pro_micro {};
|
||||
pro_micro_i2c: &i2c0 {};
|
||||
pro_micro_spi: &spi0 {};
|
||||
pro_micro_spi: &spi1 {};
|
||||
pro_micro_serial: &uart0 {};
|
||||
|
|
56
app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
Normal file
56
app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
uart0_default: uart0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_RX, 0, 8)>;
|
||||
bias-pull-up;
|
||||
};
|
||||
group2 {
|
||||
psels = <NRF_PSEL(UART_TX, 0, 6)>;
|
||||
};
|
||||
};
|
||||
|
||||
uart0_sleep: uart0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(UART_RX, 0, 8)>,
|
||||
<NRF_PSEL(UART_TX, 0, 6)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_default: i2c0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0_sleep: i2c0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(TWIM_SDA, 0, 15)>,
|
||||
<NRF_PSEL(TWIM_SCL, 0, 17)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
|
||||
spi1_default: spi1_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 3)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi1_sleep: spi1_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_SCK, 1, 13)>,
|
||||
<NRF_PSEL(SPIM_MOSI, 0, 28)>,
|
||||
<NRF_PSEL(SPIM_MISO, 0, 3)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
|
@ -7,6 +7,7 @@
|
|||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "arduino_pro_micro_pins.dtsi"
|
||||
#include "bluemicro840_v1-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "BlueMicro840_V1";
|
||||
|
@ -16,7 +17,6 @@
|
|||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
|
@ -24,20 +24,18 @@
|
|||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
ext-power {
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
label = "EXT_POWER";
|
||||
init-delay-ms = <20>;
|
||||
control-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 7>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
|
@ -63,22 +61,28 @@
|
|||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
sda-pin = <15>;
|
||||
scl-pin = <17>;
|
||||
pinctrl-0 = <&i2c0_default>;
|
||||
pinctrl-1 = <&i2c0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
pinctrl-0 = <&spi1_default>;
|
||||
pinctrl-1 = <&spi1_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
current-speed = <115200>;
|
||||
pinctrl-0 = <&uart0_default>;
|
||||
pinctrl-1 = <&uart0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&usbd {
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -93,11 +97,9 @@
|
|||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
|
@ -111,12 +113,10 @@
|
|||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
|
|||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
|
@ -19,3 +21,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
9
app/boards/arm/bluemicro840/pre_dt_board.cmake
Normal file
9
app/boards/arm/bluemicro840/pre_dt_board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
9
app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml
Normal file
9
app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml
Normal file
|
@ -0,0 +1,9 @@
|
|||
file_format: "1"
|
||||
id: boardsource_blok
|
||||
name: BoardSource blok
|
||||
type: board
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
url: https://peg.software/docs/blok
|
||||
exposes: [pro_micro]
|
|
@ -19,12 +19,6 @@ endif # USB
|
|||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "BT60"
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
||||
|
|
|
@ -16,25 +16,24 @@
|
|||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
sensors {
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&left_encoder>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
|
||||
|
||||
left_encoder: encoder_left {
|
||||
compatible = "alps,ec11";
|
||||
label = "LEFT_ENCODER";
|
||||
a-gpios = <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
resolution = <4>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
@ -43,13 +42,11 @@
|
|||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "BATTERY";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <2000000>;
|
||||
full-ohms = <(2000000 + 806000)>;
|
||||
|
@ -72,24 +69,8 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
compatible = "nordic,nrf-twi";
|
||||
sda-pin = <17>;
|
||||
scl-pin = <20>;
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uarte";
|
||||
tx-pin = <6>;
|
||||
rx-pin = <8>;
|
||||
};
|
||||
|
||||
&usbd {
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -104,11 +85,9 @@
|
|||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
|
@ -122,12 +101,10 @@
|
|||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
|
@ -81,7 +81,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -13,15 +13,15 @@
|
|||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix_transform = &ansi_transform;
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix_transform = &hhkb_transform;
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix_transform = &iso_transform;
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix_transform = &all_1u_transform;
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#else
|
||||
zmk,matrix_transform = &split_transform;
|
||||
zmk,matrix-transform = &split_transform;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -31,7 +31,7 @@
|
|||
#ifdef ANSI
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
|
@ -56,7 +56,7 @@
|
|||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
|
||||
|
@ -84,7 +84,7 @@
|
|||
raise {
|
||||
bindings = <
|
||||
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
|
||||
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset
|
||||
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
|
||||
&trans &trans &trans &bootloader &trans &trans &trans
|
||||
|
@ -94,7 +94,7 @@
|
|||
#elif defined(ISO)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
||||
// | SHIFT | | | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
|
@ -112,7 +112,7 @@
|
|||
raise {
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||
&reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
||||
&sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
|
||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
|
@ -122,7 +122,7 @@
|
|||
#elif defined(ALL_1U)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP |
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | "|" |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
||||
|
@ -140,7 +140,7 @@
|
|||
raise {
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
|
@ -150,7 +150,7 @@
|
|||
#else
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BKSP| DEL |
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC| DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | 1 |
|
||||
|
@ -168,7 +168,7 @@
|
|||
raise {
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
|
|
|
@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
|
@ -11,7 +11,7 @@
|
|||
/ {
|
||||
chosen {
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,matrix_transform = &default_transform;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
|
@ -30,7 +30,8 @@
|
|||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
label = "KSCAN";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BKSP | DEL
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
|
@ -26,7 +26,7 @@
|
|||
raise {
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
|
||||
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
|
|
|
@ -23,3 +23,6 @@ CONFIG_SETTINGS_NVS=y
|
|||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
9
app/boards/arm/bt60/pre_dt_board.cmake
Normal file
9
app/boards/arm/bt60/pre_dt_board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
8
app/boards/arm/ckp/Kconfig
Normal file
8
app/boards/arm/ckp/Kconfig
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
16
app/boards/arm/ckp/Kconfig.board
Normal file
16
app/boards/arm/ckp/Kconfig.board
Normal file
|
@ -0,0 +1,16 @@
|
|||
# CKP boards configuration
|
||||
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_BT60_V2
|
||||
bool "bt60_v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
|
||||
config BOARD_BT65_V1
|
||||
bool "bt65_v1"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
|
||||
config BOARD_BT75_V1
|
||||
bool "bt75_v1"
|
||||
depends on SOC_NRF52840_QIAA
|
28
app/boards/arm/ckp/Kconfig.defconfig
Normal file
28
app/boards/arm/ckp/Kconfig.defconfig
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD
|
||||
default "bt60_v2" if BOARD_BT60_V2
|
||||
default "bt65_v1" if BOARD_BT65_V1
|
||||
default "bt75_v1" if BOARD_BT75_V1
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "BT60 V2" if BOARD_BT60_V2
|
||||
default "BT65" if BOARD_BT65_V1
|
||||
default "BT75" if BOARD_BT75_V1
|
||||
|
||||
if BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
endif # BOARD_BT60_V2 || BOARD_BT65_V1 || BOARD_BT75_V1
|
5
app/boards/arm/ckp/board.cmake
Normal file
5
app/boards/arm/ckp/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
71
app/boards/arm/ckp/bt60_v2.dts
Normal file
71
app/boards/arm/ckp/bt60_v2.dts
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ckp.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
model = "BT60_V2";
|
||||
compatible = "polarityworks,bt60_v2";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <15>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
||||
>;
|
||||
};
|
||||
|
||||
iso_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <15>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13)
|
||||
>;
|
||||
};
|
||||
|
||||
all_1u_transform: keymap_transform_2 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <15>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14)
|
||||
>;
|
||||
};
|
||||
|
||||
hhkb_transform: keymap_transform_3 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <15>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13)
|
||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13)
|
||||
>;
|
||||
};
|
||||
};
|
177
app/boards/arm/ckp/bt60_v2.keymap
Normal file
177
app/boards/arm/ckp/bt60_v2.keymap
Normal file
|
@ -0,0 +1,177 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/backlight.h>
|
||||
|
||||
#define ANSI
|
||||
//#define ISO
|
||||
//#define ALL_1U
|
||||
//#define HHKB
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
||||
#endif
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
#ifdef ANSI
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET | BT_CLR |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ISO)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER |
|
||||
// | SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | MENU | CTRL |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT
|
||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET
|
||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp K_CMENU &kp RCTRL
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | |
|
||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP|RGB_TOG| BOOT |
|
||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | END | PGDN | BL_TOG |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | RESET |BT_CLR |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &rgb_ug RGB_TOG &bootloader
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ALL_1U)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHFT |NONE| Z | X | C | V | B | N | M | , | . | / | SHFT | UP | 1 |
|
||||
// | CTL | WIN | ALT | SPACE | RALT| CTRL | LEFT | DOWN | RIGHT |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &mo 1
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BSPC | DEL |
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG |
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
||||
// | SHFT |NONE|VOLDN|VOLUP|MUTE|BLINC|BLDEC| N | M | , | END | PGDN | SHFT|BL_TOG| 1 |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | RALT| CTRL | LEFT |RESET| BT_CLR |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &trans &trans
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &trans &bl BL_TOG &trans
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &sys_reset &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(HHKB)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT |
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH
|
||||
&kp CAPS &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// ------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | DEL |
|
||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | INS | O |PSCRN| SLCK| P_B | RGB_TOG|
|
||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | HOME| PGUP| BOOT |
|
||||
// | SHFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | END | PGDN | BL_TOG |
|
||||
// | BT_PRV | BT_NXT | ALT | SPACE | RESET | 1 | BT_CLR |
|
||||
// ------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
|
||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &rgb_ug RGB_TOG
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &kp END &kp PG_DN &bl BL_TOG
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &sys_reset &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt60_v2.keymap"
|
||||
#endif
|
||||
|
||||
};
|
||||
};
|
15
app/boards/arm/ckp/bt60_v2.yaml
Normal file
15
app/boards/arm/ckp/bt60_v2.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
identifier: bt60_v2
|
||||
name: BT60 V2
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
14
app/boards/arm/ckp/bt60_v2.zmk.yml
Normal file
14
app/boards/arm/ckp/bt60_v2.zmk.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
file_format: "1"
|
||||
id: bt60_v2
|
||||
name: BT60 V2
|
||||
type: board
|
||||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- encoder
|
||||
- underglow
|
||||
- backlight
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://polarityworks.com/btckp
|
41
app/boards/arm/ckp/bt60_v2_defconfig
Normal file
41
app/boards/arm/ckp/bt60_v2_defconfig
Normal file
|
@ -0,0 +1,41 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_BT60_V2=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# encoder
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_LED_PWM=y
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
71
app/boards/arm/ckp/bt65_v1.dts
Normal file
71
app/boards/arm/ckp/bt65_v1.dts
Normal file
|
@ -0,0 +1,71 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ckp.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
model = "BT65_V1";
|
||||
compatible = "polarityworks,bt65_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
|
||||
iso_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
|
||||
all_1u_transform: keymap_transform_2 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
|
||||
hhkb_transform: keymap_transform_3 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <5>;
|
||||
map = <
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,11) RC(5,12) RC(5,13) RC(5,15)
|
||||
>;
|
||||
};
|
||||
};
|
177
app/boards/arm/ckp/bt65_v1.keymap
Normal file
177
app/boards/arm/ckp/bt65_v1.keymap
Normal file
|
@ -0,0 +1,177 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/backlight.h>
|
||||
|
||||
#define ANSI
|
||||
//#define ISO
|
||||
//#define ALL_1U
|
||||
//#define HHKB
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#elif defined(HHKB)
|
||||
zmk,matrix-transform = &hhkb_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
||||
#endif
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
#ifdef ANSI
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp INS
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | HOME | END |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ISO)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
|
||||
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp INS
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
|
||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | PSCRN|
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | P_BRK|
|
||||
// |SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| B | N | M | , | . | / | SHIFT | HOME | END |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PSCRN
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &kp PAUSE_BREAK
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &kp HOME &kp END
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ALL_1U)
|
||||
default_layer {
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL | HOME|
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
||||
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |BL_TOG|RGB_TOG|HOME|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
||||
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | INS |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG &trans
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
||||
&trans &none &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &kp INS
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(HHKB)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | HOME|
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | END |
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | PGUP|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 | CTRL | PGDN|
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
|
||||
&kp ESC &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp HOME
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp END
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp PG_UP
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp PG_DN
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// |GRAVE| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | BL_TOG |RGB_TOG|
|
||||
// | TAB | Q | UP | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | PSCRN|
|
||||
// | CAPS | LEFT| DOWN|RIGHT| BRI | BRD | H | J | K | L | ; | ' | BOOT | P_BRK|
|
||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | INS |
|
||||
// | BT_PRV | BT_NXT | ALT | SPACE | ALT | 1 | CTRL |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &bl BL_TOG &rgb_ug RGB_TOG
|
||||
&trans &trans &kp UP &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PSCRN
|
||||
&trans &kp LEFT &kp DOWN &kp RIGHT &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &kp PAUSE_BREAK
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &kp INS
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt65_v1.keymap"
|
||||
#endif
|
||||
|
||||
};
|
||||
};
|
15
app/boards/arm/ckp/bt65_v1.yaml
Normal file
15
app/boards/arm/ckp/bt65_v1.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
identifier: bt65_v1
|
||||
name: BT65_V1
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
14
app/boards/arm/ckp/bt65_v1.zmk.yml
Normal file
14
app/boards/arm/ckp/bt65_v1.zmk.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
file_format: "1"
|
||||
id: bt65_v1
|
||||
name: BT65
|
||||
type: board
|
||||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- encoder
|
||||
- underglow
|
||||
- backlight
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://polarityworks.com/btckp
|
41
app/boards/arm/ckp/bt65_v1_defconfig
Normal file
41
app/boards/arm/ckp/bt65_v1_defconfig
Normal file
|
@ -0,0 +1,41 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_BT65_V1=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# encoder
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_LED_PWM=y
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
61
app/boards/arm/ckp/bt75_v1.dts
Normal file
61
app/boards/arm/ckp/bt75_v1.dts
Normal file
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include "ckp.dtsi"
|
||||
|
||||
|
||||
/ {
|
||||
model = "BT75_V1";
|
||||
compatible = "polarityworks,bt75_v1";
|
||||
|
||||
chosen {
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
};
|
||||
|
||||
|
||||
ansi_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <6>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
|
||||
iso_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <6>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,12) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
|
||||
all_1u_transform: keymap_transform_2 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <16>;
|
||||
rows = <6>;
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11) RC(0,12) RC(0,13) RC(0,14) RC(0,15)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11) RC(1,12) RC(1,13) RC(1,14) RC(1,15)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11) RC(2,12) RC(2,13) RC(2,15)
|
||||
RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8) RC(3,9) RC(3,10) RC(3,11) RC(3,13) RC(3,15)
|
||||
RC(4,0) RC(4,1) RC(4,2) RC(4,3) RC(4,4) RC(4,5) RC(4,6) RC(4,7) RC(4,8) RC(4,9) RC(4,10) RC(4,11) RC(4,12) RC(4,13) RC(4,14) RC(4,15)
|
||||
RC(5,0) RC(5,1) RC(5,2) RC(5,6) RC(5,10) RC(5,11) RC(5,12) RC(5,13) RC(5,14) RC(5,15)
|
||||
>;
|
||||
};
|
||||
};
|
148
app/boards/arm/ckp/bt75_v1.keymap
Normal file
148
app/boards/arm/ckp/bt75_v1.keymap
Normal file
|
@ -0,0 +1,148 @@
|
|||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
#include <dt-bindings/zmk/rgb.h>
|
||||
#include <dt-bindings/zmk/backlight.h>
|
||||
|
||||
#define ANSI
|
||||
//#define ISO
|
||||
//#define ALL_1U
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
#ifdef ANSI
|
||||
zmk,matrix-transform = &ansi_transform;
|
||||
#elif defined(ISO)
|
||||
zmk,matrix-transform = &iso_transform;
|
||||
#elif defined(ALL_1U)
|
||||
zmk,matrix-transform = &all_1u_transform;
|
||||
#else
|
||||
#error "Layout not defined, please define a layout using by uncommenting the appropriate line in bt75_v1.keymap"
|
||||
#endif
|
||||
};
|
||||
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
#ifdef ANSI
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | INS |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
||||
// | SHIFT | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
|
||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp INS
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| HOME| END |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | P_BRK|
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PG_UP|
|
||||
// | SHIFT |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &kp PAUSE_BREAK
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
|
||||
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ISO)
|
||||
default_layer {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BSPC | DEL |
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | | INS |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | # | ENTER | PGUP|
|
||||
// |SHIFT | \ | Z | X | C | V | B | N | M | , | . | / | SHIFT | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp HOME &kp END
|
||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp INS
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp NON_US_HASH &kp RET &kp PG_UP
|
||||
&kp LSHFT &kp NON_US_BSLH &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp RALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN|HOME| END |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BL_TOG |RGB_TOG|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | | P_BRK|
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' |RESET| BOOT | PG_UP|
|
||||
// |SHIFT | \ |VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / | SHIFT | UP | PG_DN|
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL | LEFT | DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &kp PAUSE_BREAK
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &sys_reset &bootloader &trans
|
||||
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#elif defined(ALL_1U)
|
||||
default_layer {
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BSPC | DEL | HOME|
|
||||
// | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | END |
|
||||
// | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | PGUP|
|
||||
// |SHIFT|NONE | Z | X | C | V | B | N | M | , | . | / |SHIFT|NONE | UP | PGDN|
|
||||
// | CTL | WIN | ALT | SPACE | ALT | 1 |RCTRL| LEFT| DOWN|RIGHT|
|
||||
// -------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&kp ESC &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp PSCRN &kp PAUSE_BREAK &kp INS
|
||||
&kp GRAVE &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp MINUS &kp EQUAL &kp BSPC &kp DEL &kp HOME
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp LBKT &kp RBKT &kp BSLH &kp END
|
||||
&kp CLCK &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT &kp RET &kp PG_UP
|
||||
&kp LSHFT &none &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp RSHFT &none &kp UP &kp PG_DN
|
||||
&kp LCTRL &kp LGUI &kp LALT &kp SPACE &kp LALT &mo 1 &kp RCTRL &kp LEFT &kp DOWN &kp RIGHT
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
raise {
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
// | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F9 | F9 | F10 | F11 | F12 |PSCRN| P_B | INS |
|
||||
// |GRAVE| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |BL_TOG|RGB_TOG|HOME|
|
||||
// | TAB | Q | W | E | HUI | HUD | Y | U | I | O | P | SLCK| ] | RESET | END |
|
||||
// | CAPS | A | S | D | BRI | BRD | H | J | K | L | ; | ' | BOOT | PGUP |
|
||||
// |SHIFT| NONE|VOLDN|VOLUP| MUTE|BLINC|BLDEC| N | M | , | . | / |SHIFT| NONE| UP | PGDN |
|
||||
// | BT_PRV| BT_NXT| ALT | SPACE | ALT | 1 | CTRL| LEFT| DOWN |BT_CLR|
|
||||
// --------------------------------------------------------------------------------------------------
|
||||
bindings = <
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &bl BL_TOG &rgb_ug RGB_TOG &trans
|
||||
&trans &trans &trans &trans &rgb_ug RGB_HUI &rgb_ug RGB_HUD &trans &trans &trans &trans &trans &kp SLCK &trans &sys_reset &trans
|
||||
&trans &trans &trans &trans &rgb_ug RGB_BRI &rgb_ug RGB_BRD &trans &trans &trans &trans &trans &trans &bootloader &trans
|
||||
&trans &trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &bl BL_INC &bl BL_DEC &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &trans &bt BT_CLR
|
||||
>;
|
||||
sensor-bindings = <&inc_dec_kp C_VOL_UP C_VOL_DN>;
|
||||
};
|
||||
#else
|
||||
#error "Layout not defined, please define a layout by uncommenting the appropriate line in bt75.keymap"
|
||||
#endif
|
||||
|
||||
};
|
||||
};
|
15
app/boards/arm/ckp/bt75_v1.yaml
Normal file
15
app/boards/arm/ckp/bt75_v1.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
identifier: bt75_v1
|
||||
name: BT75_V1
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- ble
|
||||
- ieee802154
|
||||
- pwm
|
||||
- watchdog
|
14
app/boards/arm/ckp/bt75_v1.zmk.yml
Normal file
14
app/boards/arm/ckp/bt75_v1.zmk.yml
Normal file
|
@ -0,0 +1,14 @@
|
|||
file_format: "1"
|
||||
id: bt75_v1
|
||||
name: BT75_V1
|
||||
type: board
|
||||
arch: arm
|
||||
features:
|
||||
- keys
|
||||
- encoder
|
||||
- underglow
|
||||
- backlight
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://polarityworks.com/btckp
|
41
app/boards/arm/ckp/bt75_v1_defconfig
Normal file
41
app/boards/arm/ckp/bt75_v1_defconfig
Normal file
|
@ -0,0 +1,41 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_BT75_V1=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_PINCTRL=y
|
||||
|
||||
# encoder
|
||||
CONFIG_EC11=y
|
||||
CONFIG_EC11_TRIGGER_GLOBAL_THREAD=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=y
|
||||
CONFIG_PWM=y
|
||||
CONFIG_LED_PWM=y
|
||||
CONFIG_ZMK_BACKLIGHT=y
|
||||
CONFIG_BUILD_OUTPUT_UF2=y
|
||||
|
||||
CONFIG_MPU_ALLOW_FLASH_WRITE=y
|
||||
CONFIG_NVS=y
|
||||
CONFIG_SETTINGS_NVS=y
|
||||
CONFIG_FLASH=y
|
||||
CONFIG_FLASH_PAGE_LAYOUT=y
|
||||
CONFIG_FLASH_MAP=y
|
||||
|
||||
CONFIG_ZMK_RGB_UNDERGLOW=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_EXT_POWER=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_ON_START=y
|
||||
CONFIG_ZMK_RGB_UNDERGLOW_HUE_START=262
|
||||
CONFIG_WS2812_STRIP=y
|
||||
CONFIG_SPI=y
|
||||
|
||||
CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
|
||||
|
||||
CONFIG_ZMK_USB=y
|
||||
CONFIG_ZMK_BLE=y
|
31
app/boards/arm/ckp/ckp-pinctrl.dtsi
Normal file
31
app/boards/arm/ckp/ckp-pinctrl.dtsi
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
&pinctrl {
|
||||
spi3_default: spi3_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
||||
};
|
||||
};
|
||||
|
||||
spi3_sleep: spi3_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(SPIM_MOSI, 0, 20)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
pwm0_default: pwm0_default {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
||||
};
|
||||
};
|
||||
pwm0_sleep: pwm0_sleep {
|
||||
group1 {
|
||||
psels = <NRF_PSEL(PWM_OUT0, 0, 17)>;
|
||||
low-power-enable;
|
||||
};
|
||||
};
|
||||
};
|
208
app/boards/arm/ckp/ckp.dtsi
Normal file
208
app/boards/arm/ckp/ckp.dtsi
Normal file
|
@ -0,0 +1,208 @@
|
|||
/*
|
||||
* Copyright (c) 2022 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
#include <dt-bindings/led/led.h>
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
#include "ckp-pinctrl.dtsi"
|
||||
|
||||
/ {
|
||||
model = "CKP";
|
||||
compatible = "polarityworks,ckp";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,underglow = &led_strip;
|
||||
zmk,backlight = &backlight;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
sensors: sensors {
|
||||
compatible = "zmk,keymap-sensors";
|
||||
sensors = <&encoder_1>;
|
||||
triggers-per-rotation = <20>;
|
||||
};
|
||||
|
||||
kscan0: kscan_0 {
|
||||
compatible = "zmk,kscan-gpio-matrix";
|
||||
wakeup-source;
|
||||
|
||||
diode-direction = "col2row";
|
||||
|
||||
col-gpios
|
||||
= <&gpio1 11 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 10 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 13 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 15 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 3 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 2 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 28 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 29 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 30 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 31 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 5 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 7 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 9 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 12 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio0 23 GPIO_ACTIVE_HIGH>
|
||||
, <&gpio1 6 GPIO_ACTIVE_HIGH>
|
||||
;
|
||||
|
||||
row-gpios
|
||||
= <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 0 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 3 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 2 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
, <&gpio1 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
|
||||
;
|
||||
};
|
||||
|
||||
// Node name must match original "EXT_POWER" label to preserve user settings.
|
||||
EXT_POWER {
|
||||
compatible = "zmk,ext-power-generic";
|
||||
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
encoder_1: encoder_1 {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
encoder_2: encoder_2 {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
encoder_3: encoder_3 {
|
||||
compatible = "alps,ec11";
|
||||
a-gpios = <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
b-gpios = <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_UP)>;
|
||||
steps = <80>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
backlight: pwmleds {
|
||||
compatible = "pwm-leds";
|
||||
pwm_led_0 {
|
||||
pwms = <&pwm0 0 10000 PWM_POLARITY_NORMAL>;
|
||||
};
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
blue_led: led_0 {
|
||||
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
io-channels = <&adc 2>;
|
||||
output-ohms = <100000>;
|
||||
full-ohms = <(100000 + 100000)>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pwm0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&pwm0_default>;
|
||||
pinctrl-1 = <&pwm0_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&spi3 {
|
||||
compatible = "nordic,nrf-spim";
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi3_default>;
|
||||
pinctrl-1 = <&spi3_sleep>;
|
||||
pinctrl-names = "default", "sleep";
|
||||
|
||||
led_strip: ws2812@0 {
|
||||
compatible = "worldsemi,ws2812-spi";
|
||||
|
||||
/* SPI */
|
||||
reg = <0>;
|
||||
spi-max-frequency = <4000000>;
|
||||
|
||||
/* WS2812 */
|
||||
chain-length = <12>; /* number of LEDs */
|
||||
spi-one-frame = <0x70>;
|
||||
spi-zero-frame = <0x40>;
|
||||
color-mapping = <LED_COLOR_ID_GREEN
|
||||
LED_COLOR_ID_RED
|
||||
LED_COLOR_ID_BLUE>;
|
||||
};
|
||||
};
|
9
app/boards/arm/ckp/pre_dt_board.cmake
Normal file
9
app/boards/arm/ckp/pre_dt_board.cmake
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# Copyright (c) 2024 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
# Suppresses duplicate unit-address warning at build time for power, clock, acl and flash-controller
|
||||
# https://docs.zephyrproject.org/latest/build/dts/intro-input-output.html
|
||||
|
||||
list(APPEND EXTRA_DTC_FLAGS "-Wno-unique_unit_address_if_enabled")
|
60
app/boards/arm/corneish_zen/CMakeLists.txt
Normal file
60
app/boards/arm/corneish_zen/CMakeLists.txt
Normal file
|
@ -0,0 +1,60 @@
|
|||
if(CONFIG_ZMK_DISPLAY)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS app PRIVATE widgets/battery_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS app PRIVATE widgets/output_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_LAYER_STATUS app PRIVATE widgets/layer_status.c)
|
||||
target_sources_ifdef(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS app PRIVATE widgets/peripheral_status.c)
|
||||
|
||||
add_subdirectory_ifdef(CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM widgets/icons)
|
||||
endif()
|
||||
|
||||
zephyr_library()
|
||||
|
||||
if(CONFIG_ZMK_DISPLAY)
|
||||
if(CONFIG_CUSTOM_WIDGET_BATTERY_STATUS)
|
||||
zephyr_library_sources(widgets/icons/batt_100.c)
|
||||
zephyr_library_sources(widgets/icons/batt_100_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_75.c)
|
||||
zephyr_library_sources(widgets/icons/batt_75_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_50.c)
|
||||
zephyr_library_sources(widgets/icons/batt_50_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_25.c)
|
||||
zephyr_library_sources(widgets/icons/batt_25_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_5.c)
|
||||
zephyr_library_sources(widgets/icons/batt_5_chg.c)
|
||||
zephyr_library_sources(widgets/icons/batt_0.c)
|
||||
zephyr_library_sources(widgets/icons/batt_0_chg.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_PERIPHERAL_STATUS)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_right.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_OUTPUT_STATUS)
|
||||
zephyr_library_sources(widgets/icons/USB_connected.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_1.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_2.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_3.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_4.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_connected_5.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_1.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_2.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_3.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_4.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_advertising_5.c)
|
||||
zephyr_library_sources(widgets/icons/bluetooth_disconnected_right.c)
|
||||
endif()
|
||||
if(CONFIG_CUSTOM_WIDGET_LAYER_STATUS)
|
||||
zephyr_library_sources(widgets/icons/layers.c)
|
||||
zephyr_library_sources(widgets/icons/layers2.c)
|
||||
endif()
|
||||
if(NOT CONFIG_ZMK_SPLIT_ROLE_CENTRAL)
|
||||
zephyr_library_sources(widgets/icons/zenlogo.c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
zephyr_library_include_directories(${ZEPHYR_LVGL_MODULE_DIR})
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl/)
|
||||
zephyr_library_sources_ifdef(CONFIG_ZMK_DISPLAY custom_status_screen.c)
|
||||
zephyr_library_sources(${ZEPHYR_BASE}/misc/empty_file.c)
|
||||
zephyr_library_include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
zephyr_library_include_directories(${ZEPHYR_BASE}/drivers)
|
10
app/boards/arm/corneish_zen/Kconfig
Normal file
10
app/boards/arm/corneish_zen/Kconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
#
|
||||
# Copyright (c) 2022 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
config BOARD_CORNEISH_ZEN_LEFT
|
||||
bool
|
||||
|
||||
config BOARD_CORNEISH_ZEN_RIGHT
|
||||
bool
|
24
app/boards/arm/corneish_zen/Kconfig.board
Normal file
24
app/boards/arm/corneish_zen/Kconfig.board
Normal file
|
@ -0,0 +1,24 @@
|
|||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V1_LEFT
|
||||
bool "corneish zen left v1"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
select BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V1_RIGHT
|
||||
bool "corneish zen right v1"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
select BOARD_CORNEISH_ZEN_RIGHT
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V2_LEFT
|
||||
bool "corneish zen left v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
select BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
config BOARD_CORNEISH_ZEN_V2_RIGHT
|
||||
bool "corneish zen right v2"
|
||||
depends on SOC_NRF52840_QIAA
|
||||
select BOARD_CORNEISH_ZEN_RIGHT
|
88
app/boards/arm/corneish_zen/Kconfig.defconfig
Normal file
88
app/boards/arm/corneish_zen/Kconfig.defconfig
Normal file
|
@ -0,0 +1,88 @@
|
|||
#
|
||||
# Copyright (c) 2022 Darryl deHaan
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
config ZMK_KEYBOARD_NAME
|
||||
default "Corne-ish Zen"
|
||||
|
||||
config ZMK_SPLIT_ROLE_CENTRAL
|
||||
default y
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_LEFT
|
||||
|
||||
|
||||
if BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
||||
|
||||
config BOARD
|
||||
default "corneish_zen"
|
||||
|
||||
config ZMK_SPLIT
|
||||
default y
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config ZMK_DISPLAY
|
||||
select LV_USE_CONT
|
||||
select LV_FONT_MONTSERRAT_26
|
||||
select LV_FONT_MONTSERRAT_16
|
||||
select LV_USE_LABEL
|
||||
select LV_USE_IMG
|
||||
|
||||
choice ZMK_DISPLAY_STATUS_SCREEN
|
||||
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
|
||||
endchoice
|
||||
|
||||
if ZMK_DISPLAY
|
||||
|
||||
config SPI
|
||||
default y
|
||||
|
||||
config IL0323
|
||||
default y
|
||||
|
||||
config ZMK_DISPLAY_BLANK_ON_IDLE
|
||||
default n
|
||||
|
||||
# Needed for the IL0323 driver which allocs memory to clear the display
|
||||
config HEAP_MEM_POOL_SIZE
|
||||
default 1024
|
||||
|
||||
config LV_Z_MEM_POOL_SIZE
|
||||
default 4096
|
||||
|
||||
endif # ZMK_DISPLAY
|
||||
|
||||
menuconfig CUSTOM_WIDGET_BATTERY_STATUS
|
||||
bool "custom battery status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_OUTPUT_STATUS
|
||||
bool "custom output status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_LAYER_STATUS
|
||||
bool "custom layer status widget"
|
||||
|
||||
menuconfig CUSTOM_WIDGET_PERIPHERAL_STATUS
|
||||
bool "custom peripheral status widget"
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_LEFT || BOARD_CORNEISH_ZEN_RIGHT
|
||||
|
||||
if BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT
|
||||
|
||||
config BQ274XX
|
||||
default y
|
||||
|
||||
endif # BOARD_CORNEISH_ZEN_V1_LEFT || BOARD_CORNEISH_ZEN_V1_RIGHT
|
5
app/boards/arm/corneish_zen/board.cmake
Normal file
5
app/boards/arm/corneish_zen/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-License-Identifier: MIT
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
5
app/boards/arm/corneish_zen/corneish_zen.conf
Normal file
5
app/boards/arm/corneish_zen/corneish_zen.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Go to sleep after one hour (1*60*60*1000ms)
|
||||
CONFIG_ZMK_IDLE_SLEEP_TIMEOUT=3600000
|
||||
|
||||
# Turn on logging, and set ZMK logging to debug output
|
||||
# CONFIG_ZMK_USB_LOGGING=y
|
116
app/boards/arm/corneish_zen/corneish_zen.dtsi
Normal file
116
app/boards/arm/corneish_zen/corneish_zen.dtsi
Normal file
|
@ -0,0 +1,116 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
|
||||
#include <dt-bindings/zmk/matrix_transform.h>
|
||||
|
||||
/ {
|
||||
model = "Corne-ish Zen";
|
||||
compatible = "corneish_zen";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zmk,kscan = &kscan0;
|
||||
zmk,display = &epd;
|
||||
zmk,matrix-transform = &default_transform;
|
||||
};
|
||||
|
||||
default_transform: keymap_transform_0 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <12>;
|
||||
rows = <4>;
|
||||
|
||||
// | SW1 | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 | SW1 |
|
||||
// | SW7 | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 | SW7 |
|
||||
// | SW13 | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 | SW13 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
map = <
|
||||
RC(0,0) RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10) RC(0,11)
|
||||
RC(1,0) RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10) RC(1,11)
|
||||
RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10) RC(2,11)
|
||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
five_column_transform: keymap_transform_1 {
|
||||
compatible = "zmk,matrix-transform";
|
||||
columns = <10>;
|
||||
rows = <4>;
|
||||
|
||||
// | SW2 | SW3 | SW4 | SW5 | SW6 | | SW6 | SW5 | SW4 | SW3 | SW2 |
|
||||
// | SW8 | SW9 | SW10 | SW11 | SW12 | | SW12 | SW11 | SW10 | SW9 | SW8 |
|
||||
// | SW14 | SW15 | SW16 | SW17 | SW18 | | SW18 | SW17 | SW16 | SW15 | SW14 |
|
||||
// | SW19 | SW20 | SW21 | | SW21 | SW20 | SW19 |
|
||||
map = <
|
||||
RC(0,1) RC(0,2) RC(0,3) RC(0,4) RC(0,5) RC(0,6) RC(0,7) RC(0,8) RC(0,9) RC(0,10)
|
||||
RC(1,1) RC(1,2) RC(1,3) RC(1,4) RC(1,5) RC(1,6) RC(1,7) RC(1,8) RC(1,9) RC(1,10)
|
||||
RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) RC(2,10)
|
||||
RC(3,3) RC(3,4) RC(3,5) RC(3,6) RC(3,7) RC(3,8)
|
||||
>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usbd {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
68
app/boards/arm/corneish_zen/corneish_zen.keymap
Normal file
68
app/boards/arm/corneish_zen/corneish_zen.keymap
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2021 Darryl deHaan
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include <behaviors.dtsi>
|
||||
#include <dt-bindings/zmk/keys.h>
|
||||
#include <dt-bindings/zmk/bt.h>
|
||||
|
||||
/ {
|
||||
chosen {
|
||||
zmk,matrix-transform = &default_transform;
|
||||
// zmk,matrix-transform = &five_column_transform;
|
||||
};
|
||||
};
|
||||
|
||||
/ {
|
||||
keymap {
|
||||
compatible = "zmk,keymap";
|
||||
|
||||
default_layer {
|
||||
display-name = "QWERTY";
|
||||
// --------------------------------------------------------------------------------
|
||||
// | TAB | Q | W | E | R | T | | Y | U | I | O | P | BSPC |
|
||||
// | CTRL | A | S | D | F | G | | H | J | K | L | ; | ' |
|
||||
// | SHFT | Z | X | C | V | B | | N | M | , | . | / | ESC |
|
||||
// | GUI | LWR | SPC | | ENT | RSE | ALT |
|
||||
bindings = <
|
||||
&kp TAB &kp Q &kp W &kp E &kp R &kp T &kp Y &kp U &kp I &kp O &kp P &kp BSPC
|
||||
&kp LCTRL &kp A &kp S &kp D &kp F &kp G &kp H &kp J &kp K &kp L &kp SEMI &kp SQT
|
||||
&kp LSHFT &kp Z &kp X &kp C &kp V &kp B &kp N &kp M &kp COMMA &kp DOT &kp FSLH &kp ESC
|
||||
&kp LGUI &mo 1 &kp SPACE &kp RET &mo 2 &kp RALT
|
||||
>;
|
||||
};
|
||||
|
||||
lower_layer {
|
||||
display-name = "NUMBER";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BSPC |
|
||||
// | BTCLR| BT1 | BT2 | BT3 | BT4 | BT5 | | LFT | DWN | UP | RGT | | |
|
||||
// | SHFT | | | | | | | | | | | | |
|
||||
// | GUI | | SPC | | ENT | | ALT |
|
||||
bindings = <
|
||||
&kp TAB &kp N1 &kp N2 &kp N3 &kp N4 &kp N5 &kp N6 &kp N7 &kp N8 &kp N9 &kp N0 &kp BSPC
|
||||
&bt BT_CLR &bt BT_SEL 0 &bt BT_SEL 1 &bt BT_SEL 2 &bt BT_SEL 3 &bt BT_SEL 4 &kp LEFT &kp DOWN &kp UP &kp RIGHT &trans &trans
|
||||
&kp LSHFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
>;
|
||||
};
|
||||
|
||||
raise_layer {
|
||||
display-name = "SYMBOL";
|
||||
// -----------------------------------------------------------------------------------------
|
||||
// | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | BSPC |
|
||||
// | CTRL | | | | | | | - | = | [ | ] | \ | ` |
|
||||
// | SHFT | | | | | | | _ | + | { | } | "|" | ~ |
|
||||
// | GUI | | SPC | | ENT | | ALT |
|
||||
bindings = <
|
||||
&kp TAB &kp EXCL &kp AT &kp HASH &kp DLLR &kp PRCNT &kp CARET &kp AMPS &kp ASTRK &kp LPAR &kp RPAR &kp BSPC
|
||||
&kp LCTRL &trans &trans &trans &trans &trans &kp MINUS &kp EQUAL &kp LBKT &kp RBKT &kp BSLH &kp GRAVE
|
||||
&kp LSHFT &trans &trans &trans &trans &trans &kp UNDER &kp PLUS &kp LBRC &kp RBRC &kp PIPE &kp TILDE
|
||||
&kp LGUI &trans &kp SPACE &kp RET &trans &kp RALT
|
||||
>;
|
||||
};
|
||||
};
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue