mirror of
https://github.com/zsa/qmk_firmware.git
synced 2026-01-13 00:47:53 +00:00
Compare commits
1315 Commits
firmware24
...
firmware23
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e777bc9d1a | ||
|
|
1e66361615 | ||
|
|
ce352c6f86 | ||
|
|
8dfcde3029 | ||
|
|
f633614efc | ||
|
|
50e0bbccd6 | ||
|
|
9a0e1b6195 | ||
|
|
23468c1e17 | ||
|
|
b1142d886d | ||
|
|
b8258500a9 | ||
|
|
cf038f510a | ||
|
|
9ec74b5bad | ||
|
|
1bd6b1b035 | ||
|
|
d237ef2531 | ||
|
|
983736e0bc | ||
|
|
7e8b2db4e0 | ||
|
|
99a0c791ba | ||
|
|
560546037e | ||
|
|
20d57f097e | ||
|
|
6b764d5c1c | ||
|
|
0cdb97c71d | ||
|
|
bce73885a2 | ||
|
|
138a2aca42 | ||
|
|
91d91a831a | ||
|
|
df8d493f33 | ||
|
|
474d465efb | ||
|
|
9f536ffe57 | ||
|
|
a7c35821fa | ||
|
|
b86e3aae09 | ||
|
|
4ff2d2fc96 | ||
|
|
01a55f45cd | ||
|
|
306ab27ce1 | ||
|
|
5f26c9c1fe | ||
|
|
bcf975ae98 | ||
|
|
0b30bf5455 | ||
|
|
9a95ca868d | ||
|
|
8f09dc9587 | ||
|
|
68af56468c | ||
|
|
3a1064ae07 | ||
|
|
a1bee71b0f | ||
|
|
dde5549783 | ||
|
|
449a1ba4e6 | ||
|
|
d82df5890f | ||
|
|
bfa000e7fa | ||
|
|
cf87d88fb2 | ||
|
|
422ff9e549 | ||
|
|
a191c9f964 | ||
|
|
71f97e9054 | ||
|
|
0ed59b362d | ||
|
|
e7574b161e | ||
|
|
8fe96b2509 | ||
|
|
0f23d33a86 | ||
|
|
788d70c1a7 | ||
|
|
2f50d1ed03 | ||
|
|
612ae1cff4 | ||
|
|
6f611938ae | ||
|
|
6a40c2b9bb | ||
|
|
bb7f824ced | ||
|
|
3f9672fa5f | ||
|
|
b183d0e8ff | ||
|
|
ae490ef9e5 | ||
|
|
263bc7cf21 | ||
|
|
64f04b30c2 | ||
|
|
d9f575fa86 | ||
|
|
89e3c4c0da | ||
|
|
f3ac73f6cf | ||
|
|
b6657f6a7b | ||
|
|
e14aa9223b | ||
|
|
ba20394370 | ||
|
|
d3c3625aaf | ||
|
|
764ac89d8d | ||
|
|
085f0898e0 | ||
|
|
60c1aa3677 | ||
|
|
c30d2d4648 | ||
|
|
eba78af8b5 | ||
|
|
6b42067a38 | ||
|
|
7d5eb53524 | ||
|
|
b8ba88abe0 | ||
|
|
8067638176 | ||
|
|
523fa6fea6 | ||
|
|
5ca3092465 | ||
|
|
894569ee10 | ||
|
|
d54c6c6b14 | ||
|
|
939bcc5422 | ||
|
|
0cb81b76f8 | ||
|
|
e0ef1fc3a7 | ||
|
|
fc773ff0cf | ||
|
|
1fbd91aa10 | ||
|
|
3e44377af0 | ||
|
|
30aac80d5a | ||
|
|
67f4e5f344 | ||
|
|
00b8c127c6 | ||
|
|
07a3743e87 | ||
|
|
53ff570bf0 | ||
|
|
e8171efc71 | ||
|
|
0837c37674 | ||
|
|
087cdc6b74 | ||
|
|
0ebd0de6f6 | ||
|
|
00d0bd6c61 | ||
|
|
dc534e19b1 | ||
|
|
eff2efbe27 | ||
|
|
fe8a53b097 | ||
|
|
053f48d2cf | ||
|
|
1a3eed9b2c | ||
|
|
6337fd6d3f | ||
|
|
68f0dc9b97 | ||
|
|
5aa61497ec | ||
|
|
633d2f6dfd | ||
|
|
662c8e671c | ||
|
|
93e4f52fc6 | ||
|
|
ca700fea61 | ||
|
|
53f8a4ee09 | ||
|
|
7c18b1c9d3 | ||
|
|
43002bdf77 | ||
|
|
6d7b6596be | ||
|
|
acec40a11a | ||
|
|
6fa37edf5e | ||
|
|
af3b9c8834 | ||
|
|
8ea22cc06f | ||
|
|
51517ee9d4 | ||
|
|
b34675555c | ||
|
|
28d29f7df6 | ||
|
|
bcddde8738 | ||
|
|
2c7be9e1d7 | ||
|
|
4d0291668b | ||
|
|
bd00ce2d6a | ||
|
|
dde6439257 | ||
|
|
996a19ee7b | ||
|
|
acf2c323e2 | ||
|
|
ec7a7beeed | ||
|
|
30b0184dce | ||
|
|
c85ce3b58c | ||
|
|
97dd9e6acc | ||
|
|
d2cf9c1c36 | ||
|
|
fd09f4bc2f | ||
|
|
36b79a0630 | ||
|
|
fd9afdcf70 | ||
|
|
70b3b5cdab | ||
|
|
ca83d05851 | ||
|
|
d6f37f0f74 | ||
|
|
a798f38e73 | ||
|
|
3d45f17e5a | ||
|
|
53d1cfb705 | ||
|
|
1b29979433 | ||
|
|
d2342a38d6 | ||
|
|
cc5e4b76a2 | ||
|
|
2a629f0573 | ||
|
|
f02a3af5c5 | ||
|
|
b2e9489485 | ||
|
|
325a551086 | ||
|
|
d553a23636 | ||
|
|
fa1a47fd1a | ||
|
|
006c55012e | ||
|
|
c04d37da3b | ||
|
|
5aac30a85a | ||
|
|
2a1bedec66 | ||
|
|
a0555ae233 | ||
|
|
3e1f25806b | ||
|
|
ef45401f53 | ||
|
|
329d563bf9 | ||
|
|
0719cda851 | ||
|
|
97b1e6faf8 | ||
|
|
d909bc2765 | ||
|
|
8d6f9ce2a8 | ||
|
|
dc11c3da3b | ||
|
|
f1a82690be | ||
|
|
0aaf72a2b9 | ||
|
|
9ee0271c00 | ||
|
|
515c080252 | ||
|
|
fa610bc9b1 | ||
|
|
47a047a9ee | ||
|
|
c23161cbb2 | ||
|
|
2f52604357 | ||
|
|
8797abdb9c | ||
|
|
2a02ef56ee | ||
|
|
a16e9c54d9 | ||
|
|
ab717d2a52 | ||
|
|
8f03f44ec7 | ||
|
|
882d3a3789 | ||
|
|
42eba55514 | ||
|
|
2ca376f6d6 | ||
|
|
c239c7c028 | ||
|
|
bc0f45f9fd | ||
|
|
4a5b99e756 | ||
|
|
88e9c05049 | ||
|
|
88b9486728 | ||
|
|
b91c12246d | ||
|
|
67b2ddbbc6 | ||
|
|
180cb957fe | ||
|
|
4dd03061b4 | ||
|
|
60fd4d61ef | ||
|
|
3635973fd5 | ||
|
|
edc6a30ccc | ||
|
|
074147a74a | ||
|
|
eaec0a1bfd | ||
|
|
dc9d8297fa | ||
|
|
9af1faa040 | ||
|
|
a2bb489e37 | ||
|
|
75a672151f | ||
|
|
17cf1b1a8a | ||
|
|
1309bca30b | ||
|
|
d8ff5fd505 | ||
|
|
336e007310 | ||
|
|
18b03049f3 | ||
|
|
c16ddb3985 | ||
|
|
e33afb2255 | ||
|
|
664f5de687 | ||
|
|
a0eb53cb16 | ||
|
|
ec485c962d | ||
|
|
7f03ebaf72 | ||
|
|
f304fa3ea2 | ||
|
|
8d5fa95f4f | ||
|
|
63d0fe05bb | ||
|
|
5a9849c70c | ||
|
|
53e7b1f152 | ||
|
|
f01e9becdf | ||
|
|
99d80b2acb | ||
|
|
dc57b14a0a | ||
|
|
d6c468dcbb | ||
|
|
3a5434f5f4 | ||
|
|
3272f6ee6a | ||
|
|
10d4cfd8dd | ||
|
|
933326cd9c | ||
|
|
7483e0712b | ||
|
|
1375f426a8 | ||
|
|
4d8d69237d | ||
|
|
546a0e1edc | ||
|
|
a3b6a0c4d4 | ||
|
|
8673e483d7 | ||
|
|
0df0f00f6a | ||
|
|
b4f8309e9b | ||
|
|
2dbe99b04f | ||
|
|
2077e6561c | ||
|
|
aa41225a1e | ||
|
|
bad0b20fe5 | ||
|
|
a0a2881599 | ||
|
|
781cc0ed51 | ||
|
|
838dfcf7cc | ||
|
|
4a2c2a8e8a | ||
|
|
d5a353b263 | ||
|
|
7812b1df57 | ||
|
|
0928d03213 | ||
|
|
6edb004732 | ||
|
|
f8b43b6388 | ||
|
|
93cc1c7e02 | ||
|
|
5cc304cb2b | ||
|
|
2e58be9e14 | ||
|
|
a1b24056f3 | ||
|
|
6a285785f2 | ||
|
|
bb4c6b8991 | ||
|
|
02a073ce83 | ||
|
|
aab7d18bcb | ||
|
|
112cf40d6d | ||
|
|
b6dbef77e2 | ||
|
|
9daa7dcb37 | ||
|
|
71c1d5a011 | ||
|
|
5af121f815 | ||
|
|
ae5ee61e7b | ||
|
|
cce4f22e3a | ||
|
|
5872797820 | ||
|
|
08bbda7111 | ||
|
|
3b36ad0840 | ||
|
|
639dbd16fc | ||
|
|
46647a3f93 | ||
|
|
990b9654c9 | ||
|
|
204f4c4ea3 | ||
|
|
4db4a0c73f | ||
|
|
0a3d60d356 | ||
|
|
2afb475019 | ||
|
|
10402a4f09 | ||
|
|
63d73fdb02 | ||
|
|
07baaa23f7 | ||
|
|
47559f7960 | ||
|
|
ec2a7452fc | ||
|
|
7a6904cdf6 | ||
|
|
b129fa575b | ||
|
|
4a3cd96b12 | ||
|
|
7ed08a191f | ||
|
|
0435ba95ca | ||
|
|
d529eb8c0d | ||
|
|
bc8438f739 | ||
|
|
a270d67f9f | ||
|
|
a4b6fe0b23 | ||
|
|
ded395e45d | ||
|
|
edd58256f5 | ||
|
|
4018c5daa6 | ||
|
|
454684a8bb | ||
|
|
396b86b92d | ||
|
|
77a779ae2c | ||
|
|
99951c11d7 | ||
|
|
edbb2c5082 | ||
|
|
6ebc9a2afa | ||
|
|
c2eaf9740b | ||
|
|
303fa4f58d | ||
|
|
b26eb7fecb | ||
|
|
cb14edb893 | ||
|
|
3902b562fc | ||
|
|
db2254c3ea | ||
|
|
eb186843bb | ||
|
|
e232f1f764 | ||
|
|
7b4d9fc7c1 | ||
|
|
d5f4fc7c2e | ||
|
|
a29cb23322 | ||
|
|
a9087f8a17 | ||
|
|
f454a7be21 | ||
|
|
2d4e228d0a | ||
|
|
44e16ef407 | ||
|
|
90f90bd9a9 | ||
|
|
222fbc1cba | ||
|
|
7ed2cd3de1 | ||
|
|
af7272b1b3 | ||
|
|
a768805945 | ||
|
|
2cc35632ed | ||
|
|
94e676d05b | ||
|
|
356659b8a0 | ||
|
|
eb056ac97d | ||
|
|
28947d5f54 | ||
|
|
9d4cbcd81e | ||
|
|
8190423aad | ||
|
|
f85b1ee83f | ||
|
|
7d63eef32e | ||
|
|
92eeea4362 | ||
|
|
b4019eef6e | ||
|
|
3f900fc967 | ||
|
|
2d37b79534 | ||
|
|
b3363f407b | ||
|
|
756867c653 | ||
|
|
6a5700b31a | ||
|
|
8c38482ebd | ||
|
|
0f599bb7ef | ||
|
|
ce09c5c922 | ||
|
|
6e5476c447 | ||
|
|
9894e54f4f | ||
|
|
ba0c53b7f8 | ||
|
|
85360eee26 | ||
|
|
1dd723510e | ||
|
|
e74b8a0464 | ||
|
|
0df455119d | ||
|
|
8784ab09d8 | ||
|
|
a1d87ee1d4 | ||
|
|
34e094388f | ||
|
|
fae09e2aeb | ||
|
|
6a0b2d77a5 | ||
|
|
86fc93a8b4 | ||
|
|
12207daaff | ||
|
|
849aa2fb9e | ||
|
|
4f9797f439 | ||
|
|
d2bf02c91e | ||
|
|
b0bd2e674b | ||
|
|
35cbcb582c | ||
|
|
d51626796d | ||
|
|
a55bdf0718 | ||
|
|
cd0523e7d4 | ||
|
|
215fdc39fd | ||
|
|
abc174c328 | ||
|
|
6b318bd420 | ||
|
|
281a94ceda | ||
|
|
790a58ddd7 | ||
|
|
ed8461315a | ||
|
|
65cb9c4fde | ||
|
|
07c36a9ddf | ||
|
|
0d781c50bc | ||
|
|
8c0ac47cc4 | ||
|
|
c00414e429 | ||
|
|
6ac9422d03 | ||
|
|
8ddee61180 | ||
|
|
fe14cbb4f4 | ||
|
|
54b4307018 | ||
|
|
58fd4f077d | ||
|
|
6dc67cfef0 | ||
|
|
063f14f72d | ||
|
|
e0ab67fb43 | ||
|
|
dce40e33d4 | ||
|
|
3fa11d8613 | ||
|
|
f32994a5ee | ||
|
|
95782d3137 | ||
|
|
846a3197b6 | ||
|
|
067031293f | ||
|
|
c41102d192 | ||
|
|
712a930fa9 | ||
|
|
3565e56573 | ||
|
|
957111d11d | ||
|
|
872cabee5b | ||
|
|
2d5109e244 | ||
|
|
dc2c6e3a7d | ||
|
|
43dadc79ff | ||
|
|
4badbca517 | ||
|
|
bbc30127f9 | ||
|
|
15cc75be6f | ||
|
|
d34a4d0062 | ||
|
|
7d8930c805 | ||
|
|
d26bb7e403 | ||
|
|
9e607a70ae | ||
|
|
c759836a16 | ||
|
|
1cf68dffd4 | ||
|
|
3390de3551 | ||
|
|
98e93c95ec | ||
|
|
b9f8ad1b9a | ||
|
|
d9cebd5d46 | ||
|
|
51912a8efc | ||
|
|
ea0abec564 | ||
|
|
e85a5f04f8 | ||
|
|
583c2cead2 | ||
|
|
ec8c10ac1b | ||
|
|
5ea1cd3526 | ||
|
|
4db676c64d | ||
|
|
a2cbd53ac9 | ||
|
|
15553646b8 | ||
|
|
fa51e2b5c3 | ||
|
|
e6c9b83eac | ||
|
|
0e20dcd6f1 | ||
|
|
e1c7a31279 | ||
|
|
e11f80b098 | ||
|
|
21d4976448 | ||
|
|
e73966e6c2 | ||
|
|
3ecb3e1bae | ||
|
|
9d4e1c2642 | ||
|
|
2cbf1f08fd | ||
|
|
ce68912cf2 | ||
|
|
4a2102fa64 | ||
|
|
68c005d4a7 | ||
|
|
7a685cf795 | ||
|
|
73d1fa5c1f | ||
|
|
5aa3747ec1 | ||
|
|
b86d1cad9e | ||
|
|
9d171fcb89 | ||
|
|
0a34257a95 | ||
|
|
5621916ef7 | ||
|
|
2a16819c27 | ||
|
|
daa06948bb | ||
|
|
c5ec960a11 | ||
|
|
dc99dab283 | ||
|
|
d4dd4d4864 | ||
|
|
375e2d7ec8 | ||
|
|
b3e265538d | ||
|
|
0c8ee28d9b | ||
|
|
83a785cca3 | ||
|
|
b50d24a323 | ||
|
|
7b720d9ff1 | ||
|
|
0f2836bdac | ||
|
|
a45989a93e | ||
|
|
ebc8349609 | ||
|
|
d487e0fa46 | ||
|
|
f91afd09fe | ||
|
|
83ab50965a | ||
|
|
b5ca1f6ec6 | ||
|
|
a6f9c9c867 | ||
|
|
528f7d27d9 | ||
|
|
1aa5d2d6d0 | ||
|
|
f0e97ba472 | ||
|
|
d6cd4182b5 | ||
|
|
204887d1e4 | ||
|
|
d26a9a7a22 | ||
|
|
f945c3d474 | ||
|
|
2b10d303d4 | ||
|
|
df51ac1db1 | ||
|
|
fa2c955880 | ||
|
|
7595ce5cb4 | ||
|
|
ea3557fc29 | ||
|
|
5f62d5ce92 | ||
|
|
0a833a3c6f | ||
|
|
1dfe06affc | ||
|
|
d424a716a0 | ||
|
|
4c72911ad9 | ||
|
|
2c719dbb71 | ||
|
|
107ceb3d39 | ||
|
|
fc69012b20 | ||
|
|
470be280d4 | ||
|
|
27e43567d7 | ||
|
|
84562a4465 | ||
|
|
37ee7ea539 | ||
|
|
9fe1c38b4c | ||
|
|
da7b76967e | ||
|
|
330519ef73 | ||
|
|
15bea898d2 | ||
|
|
dc9e7b3946 | ||
|
|
582fbbc4f0 | ||
|
|
a7a93758d5 | ||
|
|
ad19cc8a5e | ||
|
|
8f6fe2284e | ||
|
|
2a1ff15c39 | ||
|
|
7ec087183b | ||
|
|
4f5c76bfbe | ||
|
|
dcad318105 | ||
|
|
9941734329 | ||
|
|
874a6c9076 | ||
|
|
c64bbdbc4b | ||
|
|
2137d51432 | ||
|
|
7777c04547 | ||
|
|
09e02e644e | ||
|
|
1709da86ad | ||
|
|
ac81237286 | ||
|
|
93b0976dbb | ||
|
|
f1252d446a | ||
|
|
06ffea0372 | ||
|
|
93d371890e | ||
|
|
50b109c133 | ||
|
|
8a8e1593d6 | ||
|
|
ce318b12d7 | ||
|
|
cb117c6578 | ||
|
|
194300ec73 | ||
|
|
b34f369492 | ||
|
|
b1f674ca8c | ||
|
|
e5af14f7cc | ||
|
|
3b2ecdedde | ||
|
|
0a76aa88b9 | ||
|
|
fec6ee365c | ||
|
|
65de39bb6d | ||
|
|
8746dbd083 | ||
|
|
3cc7234810 | ||
|
|
9362382ac0 | ||
|
|
ee1860315d | ||
|
|
09aa3b15f4 | ||
|
|
626da49ee0 | ||
|
|
01f51b9cf7 | ||
|
|
ada0ccef5a | ||
|
|
a8c1208e38 | ||
|
|
2d6b5a61e1 | ||
|
|
39f44be042 | ||
|
|
f441e197b3 | ||
|
|
e1754460c2 | ||
|
|
b656b61e58 | ||
|
|
02b1c7e1d0 | ||
|
|
0def4a9c08 | ||
|
|
18a7247336 | ||
|
|
11efbd1ed3 | ||
|
|
f6e32b4e8d | ||
|
|
694777041b | ||
|
|
a4fcea7a90 | ||
|
|
63df792fcc | ||
|
|
a0732543d7 | ||
|
|
acc74479b6 | ||
|
|
3012ffe48a | ||
|
|
646de31974 | ||
|
|
ae6a8965ad | ||
|
|
0b34abe5b8 | ||
|
|
5a20bb87ca | ||
|
|
33e10d961b | ||
|
|
0fcb6ef6d5 | ||
|
|
2257a026b0 | ||
|
|
d9c38abbab | ||
|
|
62510625fe | ||
|
|
19f7e089c0 | ||
|
|
3d467303cc | ||
|
|
73cb7c4941 | ||
|
|
6eb6e4669a | ||
|
|
662ff6623a | ||
|
|
c04358777d | ||
|
|
248655eedc | ||
|
|
acae5fa8f3 | ||
|
|
c4f12f9d76 | ||
|
|
ae57cdc97a | ||
|
|
0471dc3d88 | ||
|
|
4434339a9d | ||
|
|
316feba848 | ||
|
|
928cb8ef92 | ||
|
|
cd1ba27a7b | ||
|
|
0f8a5d1d38 | ||
|
|
5b752d390f | ||
|
|
8eec4424d0 | ||
|
|
ead0015d9a | ||
|
|
c90f03da99 | ||
|
|
2aa0d5f3d1 | ||
|
|
24de1f5cdd | ||
|
|
b3b8c6af3c | ||
|
|
ae484e34a0 | ||
|
|
6f63effe3d | ||
|
|
6a72429095 | ||
|
|
e1e62cabee | ||
|
|
6ad01d36f1 | ||
|
|
eaaad37c2f | ||
|
|
0419c61ad1 | ||
|
|
f01c45ef54 | ||
|
|
ae8641748e | ||
|
|
74bcafa2de | ||
|
|
e28b21794f | ||
|
|
1b04d564e2 | ||
|
|
84a7d834ec | ||
|
|
686e501160 | ||
|
|
44108e524d | ||
|
|
4e98025d2e | ||
|
|
f6949c1eac | ||
|
|
4f5daf4528 | ||
|
|
f713abefb9 | ||
|
|
4dc91caf4e | ||
|
|
28f45b8ff4 | ||
|
|
ebb243aace | ||
|
|
f4b460c200 | ||
|
|
12d532d778 | ||
|
|
177f5613d8 | ||
|
|
283b18f3e0 | ||
|
|
87ece02fa9 | ||
|
|
583bd29a60 | ||
|
|
31d15910e7 | ||
|
|
f6e33771c5 | ||
|
|
72b85f52e7 | ||
|
|
91d34ed5b7 | ||
|
|
0caee68c9c | ||
|
|
4c3335b00b | ||
|
|
2b0c1a7661 | ||
|
|
76dd7b5ae5 | ||
|
|
39466aa7c4 | ||
|
|
e97ef90fac | ||
|
|
c9d18bc22e | ||
|
|
3ee8f43fd5 | ||
|
|
456da3897f | ||
|
|
3847cb5858 | ||
|
|
155cec398d | ||
|
|
c7a4d68457 | ||
|
|
ff2dbaa012 | ||
|
|
4aeaea515f | ||
|
|
7f4088c937 | ||
|
|
94aa9a48bf | ||
|
|
9e09acfa3d | ||
|
|
3dfd906390 | ||
|
|
2ddc8d7746 | ||
|
|
cac0d749ed | ||
|
|
1416666022 | ||
|
|
4fc42d04a3 | ||
|
|
269f772b7c | ||
|
|
4bb25deceb | ||
|
|
f896a2cd12 | ||
|
|
45c70f889c | ||
|
|
12aabf12bf | ||
|
|
97da465d4d | ||
|
|
86b6a5553e | ||
|
|
ebd211b7b0 | ||
|
|
155fa9fcd3 | ||
|
|
6f1f085b2d | ||
|
|
4771cc9f63 | ||
|
|
e0a355267f | ||
|
|
84a0ba874d | ||
|
|
75ca366082 | ||
|
|
ff1a52360e | ||
|
|
9cd5fa0454 | ||
|
|
9619d1e4ff | ||
|
|
3cab0731b6 | ||
|
|
094244ca04 | ||
|
|
a8e1406574 | ||
|
|
ca79f45ea8 | ||
|
|
d9ac815f71 | ||
|
|
8402fcc22d | ||
|
|
a714e1e0e3 | ||
|
|
41194bcbd3 | ||
|
|
4885430361 | ||
|
|
141e02df88 | ||
|
|
cd52615704 | ||
|
|
79386844a4 | ||
|
|
f3154a54fa | ||
|
|
ff8d9d41b8 | ||
|
|
2d17177c3c | ||
|
|
f23bfa24d1 | ||
|
|
0631d66680 | ||
|
|
b0896a3b35 | ||
|
|
df6e5f16b6 | ||
|
|
4c88e39d15 | ||
|
|
12806f1216 | ||
|
|
7ed8cd4f17 | ||
|
|
4029f3ff50 | ||
|
|
02f0f0811d | ||
|
|
67d285a1a1 | ||
|
|
ccbeb616a6 | ||
|
|
93bd061c0e | ||
|
|
7e614bbdba | ||
|
|
d4f504b70d | ||
|
|
bd73633b67 | ||
|
|
cca46a85f3 | ||
|
|
6defb96175 | ||
|
|
cc9befe283 | ||
|
|
ebd4b1dc1e | ||
|
|
30ed4bdb38 | ||
|
|
93557cca47 | ||
|
|
0a1b1e3235 | ||
|
|
5e3bd392cb | ||
|
|
c3dbc8831f | ||
|
|
5b6592f616 | ||
|
|
895f8bdeb5 | ||
|
|
5ad2d4f57d | ||
|
|
8d5c1033b3 | ||
|
|
14ff12f1ab | ||
|
|
060244a705 | ||
|
|
f67c942c49 | ||
|
|
0c4d319e8d | ||
|
|
b1e8a80477 | ||
|
|
7645e9795b | ||
|
|
9ca1b1b60b | ||
|
|
c71d01f254 | ||
|
|
532cf8509e | ||
|
|
f7dbbf006a | ||
|
|
ce9397836b | ||
|
|
1d05d8ba6a | ||
|
|
0ca620a7f6 | ||
|
|
b1f101030b | ||
|
|
41b518c55f | ||
|
|
72c5e4958c | ||
|
|
97038602f5 | ||
|
|
6a5afb67fd | ||
|
|
bbcc605195 | ||
|
|
06e5032ad3 | ||
|
|
dc05100c4c | ||
|
|
d37042f31c | ||
|
|
dac9a94d17 | ||
|
|
9986ef7635 | ||
|
|
e5890845a7 | ||
|
|
fcfe182836 | ||
|
|
b80becc5e5 | ||
|
|
5f03514246 | ||
|
|
922984f981 | ||
|
|
977fd47df5 | ||
|
|
65edbc6261 | ||
|
|
5bf407c8e9 | ||
|
|
39a9486b35 | ||
|
|
6198382cb1 | ||
|
|
d550603b8c | ||
|
|
c72b69194c | ||
|
|
4c6c17e68b | ||
|
|
66d48534b1 | ||
|
|
0c4e870063 | ||
|
|
bac3e50f88 | ||
|
|
678f1a9595 | ||
|
|
e7a2fdc271 | ||
|
|
ed1cbad3e7 | ||
|
|
2feb42ddb0 | ||
|
|
a8e4c490bf | ||
|
|
3b71e1e819 | ||
|
|
5c1c41462a | ||
|
|
bd9df62713 | ||
|
|
5ed3ecdd73 | ||
|
|
259cc07202 | ||
|
|
1bd151eee3 | ||
|
|
9b9e5e1d47 | ||
|
|
e41ab50016 | ||
|
|
d3f23ecfbc | ||
|
|
0c676d6e47 | ||
|
|
7b8d56d6d5 | ||
|
|
138f981238 | ||
|
|
455f9e9d1f | ||
|
|
6a7b6815de | ||
|
|
d0e06f0385 | ||
|
|
9c06f5a2e6 | ||
|
|
052e4ee4d2 | ||
|
|
5f9e60bd95 | ||
|
|
20f465bfb6 | ||
|
|
1378e0de96 | ||
|
|
172fbd48ab | ||
|
|
ffc0605370 | ||
|
|
5a5c90f851 | ||
|
|
493c675778 | ||
|
|
1a62f5c142 | ||
|
|
4586615534 | ||
|
|
bf2512dcef | ||
|
|
319e86e1c6 | ||
|
|
37b55e3693 | ||
|
|
a0ebf160f2 | ||
|
|
ea6680ab27 | ||
|
|
2dd7d55f30 | ||
|
|
c17675f50a | ||
|
|
8e52dc41b4 | ||
|
|
c465c4ac84 | ||
|
|
50fcd78772 | ||
|
|
5d02ae2111 | ||
|
|
13d1a7e40a | ||
|
|
0f1f9ba155 | ||
|
|
ac75812e50 | ||
|
|
dfa3631a44 | ||
|
|
4dc4b7af75 | ||
|
|
6f57ecc58e | ||
|
|
d459da0c95 | ||
|
|
22891f9c83 | ||
|
|
31608fe2a9 | ||
|
|
853394f8e1 | ||
|
|
8d35ebab7f | ||
|
|
55b2c4c1ed | ||
|
|
06a8a3c0d3 | ||
|
|
ab609a07a6 | ||
|
|
5aa1d81b15 | ||
|
|
df91396be9 | ||
|
|
81126b6673 | ||
|
|
4c1bdea275 | ||
|
|
9e4f537013 | ||
|
|
c70de1d595 | ||
|
|
b4ff413d69 | ||
|
|
e87c2fe8ce | ||
|
|
8a4525a678 | ||
|
|
1836a6f5d2 | ||
|
|
619d2ffcb6 | ||
|
|
72f42d8e52 | ||
|
|
50c6d1e178 | ||
|
|
8c273cd0f2 | ||
|
|
2b15486272 | ||
|
|
2c0173f0ff | ||
|
|
bac9fc60fe | ||
|
|
d1dc2d5389 | ||
|
|
9db7651e7b | ||
|
|
b89cafbdec | ||
|
|
80f8ad232b | ||
|
|
a15119dc6f | ||
|
|
1f66fd1a3c | ||
|
|
9d5e6c1c0a | ||
|
|
20a2ebfeb9 | ||
|
|
bf09fa6148 | ||
|
|
2fe7d6aea2 | ||
|
|
13e1dd3d53 | ||
|
|
038cef3054 | ||
|
|
52f5c344c4 | ||
|
|
0f319b48e6 | ||
|
|
9620bdbf00 | ||
|
|
52e4c04afd | ||
|
|
05ddbc6b6a | ||
|
|
4ca9256118 | ||
|
|
7c51cd7d99 | ||
|
|
47fa4894bb | ||
|
|
c80f69639b | ||
|
|
1f926d5431 | ||
|
|
0e3739a213 | ||
|
|
afdba6115a | ||
|
|
39c6035657 | ||
|
|
40f08c04c3 | ||
|
|
817720fbdb | ||
|
|
368c2f1cdf | ||
|
|
70cfe93f3e | ||
|
|
e1c12338a1 | ||
|
|
ea6f99e05d | ||
|
|
5400211a9a | ||
|
|
c1d468a5b7 | ||
|
|
2a3cc8e273 | ||
|
|
f832395063 | ||
|
|
4af7cbcc71 | ||
|
|
e54578a89c | ||
|
|
616b97782a | ||
|
|
70ce9e566e | ||
|
|
67d52f67df | ||
|
|
9148b001ff | ||
|
|
cb7d24d95d | ||
|
|
4dc4084c03 | ||
|
|
9ac9fffc9c | ||
|
|
7f07b9d5af | ||
|
|
05ed342709 | ||
|
|
05cbac82e3 | ||
|
|
62c1edc5ac | ||
|
|
a73c258d79 | ||
|
|
a2c458863e | ||
|
|
69542eaa4b | ||
|
|
703f905a72 | ||
|
|
f0fe12e005 | ||
|
|
135e0dfff4 | ||
|
|
c29b1da096 | ||
|
|
dfda3cf71d | ||
|
|
6099a97718 | ||
|
|
fe32c9172d | ||
|
|
860995817f | ||
|
|
53e7452e49 | ||
|
|
74d911b5df | ||
|
|
70d35e8e30 | ||
|
|
ac7de6603c | ||
|
|
f7408111c7 | ||
|
|
15d3efd5d1 | ||
|
|
0bd727cb19 | ||
|
|
4a8aa15634 | ||
|
|
54d6f5d4c5 | ||
|
|
3a14d8874f | ||
|
|
354af71894 | ||
|
|
9a97a0eee9 | ||
|
|
925c43c4c0 | ||
|
|
b3c0f3b0ef | ||
|
|
f3edef8c69 | ||
|
|
40e9813ba2 | ||
|
|
9b8e12814a | ||
|
|
40312b7575 | ||
|
|
91f8f7f69e | ||
|
|
ce0c294dc7 | ||
|
|
bea96d1d84 | ||
|
|
ae96eed205 | ||
|
|
560d1c5385 | ||
|
|
66d4c71b03 | ||
|
|
0a3343aca9 | ||
|
|
a595a1b675 | ||
|
|
d0ee924c9d | ||
|
|
9d1f6c699b | ||
|
|
14e5aab4c7 | ||
|
|
bea75bd84e | ||
|
|
5f57fa478d | ||
|
|
ab799d5628 | ||
|
|
af26d4b1fe | ||
|
|
58567e9003 | ||
|
|
4175e3cbe8 | ||
|
|
f62a4e3ec4 | ||
|
|
618075135d | ||
|
|
fc27898796 | ||
|
|
a14b72580d | ||
|
|
0d893b1143 | ||
|
|
930ab89eee | ||
|
|
e3e2489f86 | ||
|
|
415ab3c96c | ||
|
|
be4771380f | ||
|
|
56dd8cfe48 | ||
|
|
74d3820ff4 | ||
|
|
3f2ea83234 | ||
|
|
7d58ebe288 | ||
|
|
9dbff9f9c8 | ||
|
|
de86a0111a | ||
|
|
42f70cd423 | ||
|
|
66d3ac0b72 | ||
|
|
e3f8f475fe | ||
|
|
1d600f09a8 | ||
|
|
25214378a4 | ||
|
|
2258b09275 | ||
|
|
fede32c9eb | ||
|
|
241982ea6c | ||
|
|
4d97dceac6 | ||
|
|
abc9586c2a | ||
|
|
cd7aba09ee | ||
|
|
ff7a7adbcf | ||
|
|
e079d58b7d | ||
|
|
b198661d18 | ||
|
|
b4dc878501 | ||
|
|
b5a5ce043b | ||
|
|
c2788ef766 | ||
|
|
6ee3b53807 | ||
|
|
97649a2ac4 | ||
|
|
789bdaaf16 | ||
|
|
a935511465 | ||
|
|
e881dfd17e | ||
|
|
8a155fe021 | ||
|
|
e9e9233835 | ||
|
|
e19fa20802 | ||
|
|
6eae35c3c0 | ||
|
|
d978c59b52 | ||
|
|
6e9ddbc2e2 | ||
|
|
93f6749e06 | ||
|
|
da34bddba1 | ||
|
|
9f184ab5da | ||
|
|
d5212f4739 | ||
|
|
aba3108289 | ||
|
|
d5d631691d | ||
|
|
31f8c4eb3a | ||
|
|
a5d07e9656 | ||
|
|
ef314477b3 | ||
|
|
5ad8d221c8 | ||
|
|
200c6bedd1 | ||
|
|
0492378872 | ||
|
|
d179863d2e | ||
|
|
89104e0d2d | ||
|
|
9c70eceec1 | ||
|
|
74d97c7c1d | ||
|
|
6d891bfae9 | ||
|
|
3cb9a24bff | ||
|
|
50f3d2556d | ||
|
|
4a5ec09f61 | ||
|
|
47f2ecb633 | ||
|
|
486290af96 | ||
|
|
b39dbc0342 | ||
|
|
6e2424e658 | ||
|
|
db4445e870 | ||
|
|
9bc4684371 | ||
|
|
128bde1be1 | ||
|
|
ffca0ecd0a | ||
|
|
56443ee486 | ||
|
|
0c67055ae1 | ||
|
|
327a6e0f55 | ||
|
|
5ecd526d13 | ||
|
|
f8fe33acfa | ||
|
|
c339d67068 | ||
|
|
07cfca1beb | ||
|
|
f6e500e199 | ||
|
|
7ee98d5265 | ||
|
|
338c36dbae | ||
|
|
0d1d10edfd | ||
|
|
2dc509475b | ||
|
|
fc8a27497f | ||
|
|
9d0612cb51 | ||
|
|
e8a922ece3 | ||
|
|
9e42d327ce | ||
|
|
a0c98997af | ||
|
|
ec9f501cfb | ||
|
|
c1ba3aef57 | ||
|
|
4040654edf | ||
|
|
d4a6178b89 | ||
|
|
f82d2aedb5 | ||
|
|
6512732a31 | ||
|
|
d3611fbf64 | ||
|
|
0ec90ce881 | ||
|
|
e85eeeaa53 | ||
|
|
9702d6d82e | ||
|
|
8e5b9f89c6 | ||
|
|
cd9064ac52 | ||
|
|
0caa4264c8 | ||
|
|
9aba563661 | ||
|
|
b2db6db409 | ||
|
|
5784d1ab6c | ||
|
|
97fdecf1dd | ||
|
|
468290f373 | ||
|
|
da2ec386d8 | ||
|
|
8b7047a62c | ||
|
|
09c4e8ac5d | ||
|
|
ca5162b90e | ||
|
|
a75e0b2374 | ||
|
|
cfbb03645e | ||
|
|
592f65d280 | ||
|
|
7651b3dd73 | ||
|
|
3d3154b29c | ||
|
|
ac52955ff2 | ||
|
|
ef5cdd2262 | ||
|
|
aa074cf592 | ||
|
|
e5224082f1 | ||
|
|
dbd4de0174 | ||
|
|
d52ad98f4a | ||
|
|
4b766cec2e | ||
|
|
ba5c46267c | ||
|
|
fd63ea595f | ||
|
|
3489ebb1c1 | ||
|
|
e7b95fba58 | ||
|
|
8f065c420b | ||
|
|
76ba4c4fa5 | ||
|
|
96a09786d8 | ||
|
|
5f2b255bb1 | ||
|
|
7215cb932b | ||
|
|
a587846d97 | ||
|
|
2db33bc5e1 | ||
|
|
87487abd05 | ||
|
|
b188634e6f | ||
|
|
a6dfd85e60 | ||
|
|
ce6f145802 | ||
|
|
b6e465be96 | ||
|
|
36a0c2b456 | ||
|
|
86c9a1a384 | ||
|
|
562884a328 | ||
|
|
9e38863d64 | ||
|
|
1cb8fa3cdc | ||
|
|
dd1a8564ed | ||
|
|
31b5a5c22f | ||
|
|
d6fe48954e | ||
|
|
986a0f068f | ||
|
|
2823be1b2f | ||
|
|
98fd7ebf58 | ||
|
|
64566241cb | ||
|
|
6d9eb7e97a | ||
|
|
48db06e8c1 | ||
|
|
573e0bfab1 | ||
|
|
c8db6dfdd3 | ||
|
|
4de36ce45b | ||
|
|
5a30142914 | ||
|
|
927969d6cb | ||
|
|
d2100ba45d | ||
|
|
4a5b36ec4c | ||
|
|
6d6506e6ee | ||
|
|
81c563c692 | ||
|
|
8c164726e8 | ||
|
|
1102bea973 | ||
|
|
4df874a1d9 | ||
|
|
e0eecc6834 | ||
|
|
04eb1226b9 | ||
|
|
a393d4d43e | ||
|
|
8253427f12 | ||
|
|
aa482e2e4f | ||
|
|
f5980a2478 | ||
|
|
4cc72c55e5 | ||
|
|
7e3af676e7 | ||
|
|
3aced2b5c9 | ||
|
|
ce1b51be8b | ||
|
|
90853e60bb | ||
|
|
c08ddb41a6 | ||
|
|
c7dcc83e5e | ||
|
|
e237feba30 | ||
|
|
3acf64b708 | ||
|
|
4083565334 | ||
|
|
b279d2b94e | ||
|
|
656b2ee939 | ||
|
|
d8925d7ba7 | ||
|
|
9fb4d67877 | ||
|
|
a20730f634 | ||
|
|
4562a637bf | ||
|
|
e8de784425 | ||
|
|
0b25414aec | ||
|
|
3dd97c383b | ||
|
|
ffc273b14a | ||
|
|
7f75ee8cd6 | ||
|
|
8ca6a89078 | ||
|
|
7e080e7ecd | ||
|
|
1879c6e734 | ||
|
|
c98d65fd03 | ||
|
|
ecf353a1d5 | ||
|
|
92d137cec9 | ||
|
|
fd2246f972 | ||
|
|
16a8150de3 | ||
|
|
dd148c595c | ||
|
|
642986a834 | ||
|
|
ea40d07776 | ||
|
|
3e7e8a3d9f | ||
|
|
70ed220c19 | ||
|
|
517329696b | ||
|
|
341cf42d92 | ||
|
|
4675f2727b | ||
|
|
dba5ec7d92 | ||
|
|
d29148f289 | ||
|
|
d5aa21b024 | ||
|
|
b69a93d65e | ||
|
|
47909e2821 | ||
|
|
2f960abb51 | ||
|
|
0ea9391236 | ||
|
|
d49944f1a2 | ||
|
|
59055df0d4 | ||
|
|
071e51994b | ||
|
|
e2f2d8b22e | ||
|
|
03a8adc19b | ||
|
|
1c9011fbd1 | ||
|
|
2aa3b88823 | ||
|
|
a31212a389 | ||
|
|
f55c4ced28 | ||
|
|
1a3f69b02a | ||
|
|
b2f15ce264 | ||
|
|
dc13f5f518 | ||
|
|
61d1932f7c | ||
|
|
1ba27782ef | ||
|
|
9b248baf43 | ||
|
|
f781b36aaa | ||
|
|
028d02d1f1 | ||
|
|
524e2b9487 | ||
|
|
3a96a585e1 | ||
|
|
6005f6b6bb | ||
|
|
12e79b6972 | ||
|
|
a9f88d121e | ||
|
|
a92ab87f98 | ||
|
|
bb71ba4b00 | ||
|
|
4cb92b05ed | ||
|
|
f3c7a253ca | ||
|
|
877b962dcc | ||
|
|
4b6c1b8c2c | ||
|
|
f76e726edd | ||
|
|
4bc1ac65ca | ||
|
|
96147e03e8 | ||
|
|
9e86204fd4 | ||
|
|
548848645a | ||
|
|
655a4e7cec | ||
|
|
5b346419c7 | ||
|
|
0315ef645b | ||
|
|
680c966e8e | ||
|
|
20218bebf5 | ||
|
|
85291ed7a3 | ||
|
|
b58ea9ad0f | ||
|
|
09e6b94927 | ||
|
|
75eb509452 | ||
|
|
0cce8cbab0 | ||
|
|
3ed039ed76 | ||
|
|
24d05fee49 | ||
|
|
a90a78c265 | ||
|
|
3662999df2 | ||
|
|
5cb5e04f13 | ||
|
|
0554bced7c | ||
|
|
18e15a7077 | ||
|
|
2e08096ba6 | ||
|
|
5b69491bac | ||
|
|
05e01eb565 | ||
|
|
fd7caea42e | ||
|
|
1e51f568dd | ||
|
|
1724b515b5 | ||
|
|
cf1b36bf83 | ||
|
|
689303e49f | ||
|
|
37d0686bd0 | ||
|
|
8ca41899d2 | ||
|
|
95e4c8a461 | ||
|
|
c4f2f95db8 | ||
|
|
a8ed2608b5 | ||
|
|
665e719e31 | ||
|
|
5d9a4c4414 | ||
|
|
b4dab5b09b | ||
|
|
4d57a049b5 | ||
|
|
6364fe4efb | ||
|
|
51cc6f398d | ||
|
|
9ab77d760c | ||
|
|
be58a68473 | ||
|
|
4b5a0375d4 | ||
|
|
ff3e430970 | ||
|
|
270ab0d3fb | ||
|
|
43aae47b38 | ||
|
|
c7d9b48cc9 | ||
|
|
3c5dd583e1 | ||
|
|
3504bf30e1 | ||
|
|
7a136f7440 | ||
|
|
8e9ac7d142 | ||
|
|
46ea7dfd51 | ||
|
|
1f3fd52b6d | ||
|
|
e622e6d1bb | ||
|
|
2a70dc8eea | ||
|
|
feb7c58f30 | ||
|
|
4f2efc06ce | ||
|
|
8903b7913a | ||
|
|
25aa7bcbdb | ||
|
|
19c6b7fe10 | ||
|
|
caef39bf2a | ||
|
|
4550e29f95 | ||
|
|
22426a4b4a | ||
|
|
2351739cd9 | ||
|
|
882b8df7af | ||
|
|
fd776b06b3 | ||
|
|
8a9e766bdc | ||
|
|
59d28fe288 | ||
|
|
fd06a342ee | ||
|
|
c382378a35 | ||
|
|
882651dc06 | ||
|
|
c3d6f89274 | ||
|
|
f6743b86a9 | ||
|
|
edf5c533d6 | ||
|
|
b6648f46a8 | ||
|
|
51b568a197 | ||
|
|
396c6adaa8 | ||
|
|
38c65e4928 | ||
|
|
9e8cd4f5ea | ||
|
|
c941ef0f09 | ||
|
|
eedffbdfc4 | ||
|
|
1a3d6cd98f | ||
|
|
cc1e4cde13 | ||
|
|
98a35272cf | ||
|
|
d663b42978 | ||
|
|
ebca01b46b | ||
|
|
d1d0211bf1 | ||
|
|
190bc5bada | ||
|
|
5a7085b642 | ||
|
|
2e76759f76 | ||
|
|
b71e3e80c6 | ||
|
|
8eb37fa4f3 | ||
|
|
57bfdd8b50 | ||
|
|
1267504957 | ||
|
|
9f37354851 | ||
|
|
bd66bf5f8f | ||
|
|
f93b7b53b7 | ||
|
|
2d95c30c28 | ||
|
|
7ca465911d | ||
|
|
d22fda3ca4 | ||
|
|
ff2838d2dd | ||
|
|
86f437c81f | ||
|
|
95462d0d65 | ||
|
|
c3a160bf72 | ||
|
|
70945f1146 | ||
|
|
9470a4b17d | ||
|
|
3dbbb83d59 | ||
|
|
e0fe8edb2d | ||
|
|
25c88b2bb4 | ||
|
|
9f180afb25 | ||
|
|
3fe282f1c1 | ||
|
|
5959e23fd0 | ||
|
|
6cb88628e9 | ||
|
|
28cbf7c352 | ||
|
|
95f8ac3424 | ||
|
|
4bbdd77e83 | ||
|
|
cedda573be | ||
|
|
f661d86d97 | ||
|
|
0a04a0e419 | ||
|
|
0886c7ce57 | ||
|
|
60204faed0 | ||
|
|
0612c9968b | ||
|
|
c8cbf4733a | ||
|
|
021df9d028 | ||
|
|
9c17531c19 | ||
|
|
bcb37d5f57 | ||
|
|
69ab70c97c | ||
|
|
f5e47ed1e5 | ||
|
|
52044905a4 | ||
|
|
c752284c7c | ||
|
|
ad02b62dd2 | ||
|
|
25a9a2f91c | ||
|
|
b51f1e0971 | ||
|
|
51a682bb9c | ||
|
|
09d1ff9a32 | ||
|
|
5f65ba63e7 | ||
|
|
362eaec0a3 | ||
|
|
12c0611189 | ||
|
|
54a7f66aee | ||
|
|
eed7c15c2f | ||
|
|
7b3545c3d8 | ||
|
|
4c2444a4e2 | ||
|
|
a5ded39656 | ||
|
|
e26b21baf4 | ||
|
|
7f3d1b627c | ||
|
|
e3fce19c55 | ||
|
|
417d80d421 | ||
|
|
637c276070 | ||
|
|
590a07bf94 | ||
|
|
743fda2658 | ||
|
|
7b19fcc9e9 | ||
|
|
72537dd8e9 | ||
|
|
7a5cbcac9f | ||
|
|
bb91bc4309 | ||
|
|
1fa1feec59 | ||
|
|
8b5c5b5699 | ||
|
|
cd1a59c614 | ||
|
|
e2f96b9d53 | ||
|
|
33178f1261 | ||
|
|
36f667f09e | ||
|
|
6e57437c42 | ||
|
|
317735239f | ||
|
|
4506931676 | ||
|
|
60ffa59a77 | ||
|
|
ea4581cef1 | ||
|
|
4a98f1e7a0 | ||
|
|
f2332d2bcb | ||
|
|
dc9736a806 | ||
|
|
a98777199e | ||
|
|
7661468719 | ||
|
|
45207b079b | ||
|
|
431766476b | ||
|
|
5f8fdefe3a | ||
|
|
6acfceaeb4 | ||
|
|
5747449ca5 | ||
|
|
fd770232d9 | ||
|
|
c846f82fa7 | ||
|
|
399b992b01 | ||
|
|
ffd18ce409 | ||
|
|
25609b09ae | ||
|
|
51a7fb1f1e | ||
|
|
7c9d1d58ee | ||
|
|
b6850bc043 | ||
|
|
19ed62114a | ||
|
|
6baec0fffd | ||
|
|
23a52e40b3 |
2
.clangd
2
.clangd
@@ -1,4 +1,4 @@
|
||||
CompileFlags:
|
||||
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
|
||||
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues]
|
||||
Remove: [-W*, -mcall-prologues]
|
||||
Compiler: clang
|
||||
|
||||
@@ -4,39 +4,39 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.yaml,*.yml}] # To match GitHub Actions formatting
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
|
||||
[{Makefile,*.mk}]
|
||||
[{qmk,*.py}]
|
||||
charset = utf-8
|
||||
max_line_length = 200
|
||||
|
||||
# Make these match what we have in .gitattributes
|
||||
[*.mk]
|
||||
end_of_line = lf
|
||||
indent_style = tab
|
||||
|
||||
# Don't override anything in `lib/`...
|
||||
[lib/**]
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
tab_width = unset
|
||||
end_of_line = unset
|
||||
charset = unset
|
||||
spelling_language = unset
|
||||
trim_trailing_whitespace = unset
|
||||
insert_final_newline = unset
|
||||
|
||||
# ...except QMK's `lib/python`.
|
||||
[{*.py,lib/python/**.py}]
|
||||
[Makefile]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 200
|
||||
indent_style = tab
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files
|
||||
|
||||
|
||||
# We don't have gitattributes properly for these
|
||||
# So if the user have for example core.autocrlf set to true
|
||||
# the line endings would be wrong.
|
||||
[lib/**]
|
||||
end_of_line = unset
|
||||
|
||||
35
.github/PULL_REQUEST_TEMPLATE.md
vendored
35
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,35 +0,0 @@
|
||||
<!--- Provide a general summary of your changes in the title above. -->
|
||||
|
||||
<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
|
||||
<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
|
||||
|
||||
## Description
|
||||
|
||||
<!--- Describe your changes in detail here. -->
|
||||
|
||||
## Types of Changes
|
||||
|
||||
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply. -->
|
||||
- [ ] Core
|
||||
- [ ] Bugfix
|
||||
- [ ] New feature
|
||||
- [ ] Enhancement/optimization
|
||||
- [ ] Keyboard (addition or update)
|
||||
- [ ] Keymap/layout/userspace (addition or update)
|
||||
- [ ] Documentation
|
||||
|
||||
## Issues Fixed or Closed by This PR
|
||||
|
||||
*
|
||||
|
||||
## Checklist
|
||||
|
||||
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
|
||||
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
|
||||
- [ ] My code follows the code style of this project: [**C**](https://docs.qmk.fm/#/coding_conventions_c), [**Python**](https://docs.qmk.fm/#/coding_conventions_python)
|
||||
- [ ] I have read the [**PR Checklist** document](https://docs.qmk.fm/#/pr_checklist) and have made the appropriate changes.
|
||||
- [ ] My change requires a change to the documentation.
|
||||
- [ ] I have updated the documentation accordingly.
|
||||
- [ ] I have read the [**CONTRIBUTING** document](https://docs.qmk.fm/#/contributing).
|
||||
- [ ] I have added tests to cover my changes.
|
||||
- [ ] I have tested the changes and verified that they work and don't break anything (as well as I can manage).
|
||||
9
.github/dependabot.yml
vendored
9
.github/dependabot.yml
vendored
@@ -1,9 +0,0 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
labels: CI
|
||||
reviewers:
|
||||
- "qmk/collaborators"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
11
.github/workflows/build.yml
vendored
11
.github/workflows/build.yml
vendored
@@ -16,6 +16,15 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
keyboard:
|
||||
- ergodox_ez
|
||||
- ergodox_ez/shine
|
||||
- ergodox_ez/glow
|
||||
- moonlander
|
||||
- planck/ez
|
||||
- planck/ez/glow
|
||||
- voyager
|
||||
- voyager/gd32
|
||||
keymap:
|
||||
- default
|
||||
- oryx
|
||||
@@ -31,4 +40,4 @@ jobs:
|
||||
- name: Build
|
||||
id: build
|
||||
run: |
|
||||
qmk mass-compile -f manufacturer="ZSA Technology Labs" -km ${{ matrix.keymap }} -e SKIP_GIT=1
|
||||
qmk compile -kb ${{ matrix.keyboard}} -km ${{ matrix.keymap }}
|
||||
|
||||
4
.github/workflows/format.yml
vendored
4
.github/workflows/format.yml
vendored
@@ -35,9 +35,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
use_rest_api: true
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: Run qmk formatters
|
||||
shell: 'bash {0}'
|
||||
|
||||
18
.github/workflows/labeler.yml
vendored
18
.github/workflows/labeler.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: "Pull Request Labeler"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, synchronize, reopened, ready_for_review, locked]
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: '.github/labeler.yml'
|
||||
39
.github/workflows/lint.yml
vendored
39
.github/workflows/lint.yml
vendored
@@ -27,9 +27,7 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
use_rest_api: true
|
||||
uses: tj-actions/changed-files@v38
|
||||
|
||||
- name: Print info
|
||||
run: |
|
||||
@@ -64,12 +62,10 @@ jobs:
|
||||
|
||||
qmk format-text ${{ steps.file_changes.outputs.all_changed_files}} || true
|
||||
for file in ${{ steps.file_changes.outputs.all_changed_files}}; do
|
||||
if [[ -f $file ]]; then
|
||||
if ! git diff --quiet $file; then
|
||||
echo "File '${file}' Requires Formatting"
|
||||
echo "::error file=${file}::Requires Formatting"
|
||||
exit_code=$(($exit_code + 1))
|
||||
fi
|
||||
if ! git diff --quiet $file; then
|
||||
echo "File '${file}' Requires Formatting"
|
||||
echo "::error file=${file}::Requires Formatting"
|
||||
exit_code=$(($exit_code + 1))
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -78,10 +74,31 @@ jobs:
|
||||
fi
|
||||
exit $exit_code
|
||||
|
||||
- name: Verify keyboard aliases
|
||||
- name: Verify at most one added keyboard
|
||||
if: always()
|
||||
shell: 'bash {0}'
|
||||
run: |
|
||||
git reset --hard
|
||||
git clean -xfd
|
||||
qmk ci-validate-aliases
|
||||
|
||||
# Get the keyboard list and count for the target branch
|
||||
git checkout -f ${{ github.base_ref }}
|
||||
git pull --ff-only
|
||||
QMK_KEYBOARDS_BASE=$(qmk list-keyboards)
|
||||
QMK_KEYBOARDS_BASE_COUNT=$(qmk list-keyboards | wc -l)
|
||||
|
||||
# Get the keyboard list and count for the PR
|
||||
git checkout -f ${{ github.head_ref }}
|
||||
git merge --no-commit --squash ${{ github.base_ref }}
|
||||
QMK_KEYBOARDS_PR=$(qmk list-keyboards)
|
||||
QMK_KEYBOARDS_PR_COUNT=$(qmk list-keyboards | wc -l)
|
||||
|
||||
echo "::group::Keyboards changes in this PR"
|
||||
diff -d -U 0 <(echo "$QMK_KEYBOARDS_BASE") <(echo "$QMK_KEYBOARDS_PR") | grep -vE '^(---|\+\+\+|@@)' | sed -e 's@^-@Removed: @g' -e 's@^+@ Added: @g'
|
||||
echo "::endgroup::"
|
||||
|
||||
if [[ $QMK_KEYBOARDS_PR_COUNT -gt $(($QMK_KEYBOARDS_BASE_COUNT + 1)) ]]; then
|
||||
echo "More than one keyboard added in this PR -- see the PR Checklist."
|
||||
echo "::error::More than one keyboard added in this PR -- see the PR Checklist."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
36
.github/workflows/regen.yml
vendored
36
.github/workflows/regen.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: PR Regenerate Files
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- 'data/constants/**'
|
||||
- 'lib/python/**'
|
||||
|
||||
jobs:
|
||||
regen:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run qmk generators
|
||||
run: |
|
||||
util/regen.sh
|
||||
git diff
|
||||
|
||||
- name: Fail when regeneration required
|
||||
run: |
|
||||
git diff
|
||||
for file in $(git diff --name-only); do
|
||||
echo "File '${file}' Requires Regeneration"
|
||||
echo "::error file=${file}::Requires Regeneration"
|
||||
done
|
||||
test -z "$(git diff --name-only)"
|
||||
7
.github/workflows/unit_test.yml
vendored
7
.github/workflows/unit_test.yml
vendored
@@ -5,9 +5,8 @@ permissions:
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- develop
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'builddefs/**'
|
||||
@@ -32,4 +31,4 @@ jobs:
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements-dev.txt
|
||||
- name: Run tests
|
||||
run: qmk test-c
|
||||
run: make test:all
|
||||
|
||||
32
.gitignore
vendored
32
.gitignore
vendored
@@ -18,11 +18,6 @@
|
||||
*.lst
|
||||
*.map
|
||||
*.o
|
||||
*.a
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
*.la
|
||||
*.stackdump
|
||||
*.sym
|
||||
|
||||
@@ -37,7 +32,6 @@ quantum/version.h
|
||||
|
||||
# DD config at wrong location
|
||||
/keyboards/**/keymaps/*/info.json
|
||||
/keyboards/**/keymaps/*/keyboard.json
|
||||
|
||||
# Old-style QMK Makefiles
|
||||
/keyboards/**/Makefile
|
||||
@@ -109,24 +103,20 @@ __pycache__
|
||||
# Allow to exist but don't include it in the repo
|
||||
user_song_list.h
|
||||
|
||||
/util/wsl_downloaded
|
||||
/util/win_downloaded
|
||||
/users/
|
||||
/layouts/
|
||||
/keyboards/*
|
||||
!/keyboards/planck
|
||||
!/keyboards/moonlander
|
||||
!/keyboards/ergodox_ez
|
||||
!/keyboards/voyager
|
||||
/keyboards/**/keymaps/*
|
||||
# clangd
|
||||
compile_commands.json
|
||||
.clangd/
|
||||
.cache/
|
||||
|
||||
# VIA(L) files that don't belong in QMK repo
|
||||
# VIA(L) json files that don't belong in QMK repo
|
||||
via*.json
|
||||
/keyboards/**/keymaps/vial/*
|
||||
|
||||
# ZSA Specific ignores
|
||||
/docs/**
|
||||
/users/**
|
||||
/layouts/community/**
|
||||
/keyboards/**
|
||||
!/keyboards/zsa/
|
||||
!/keyboards/zsa/**
|
||||
/keyboards/zsa/**/keymaps/**
|
||||
!/keyboards/zsa/**/keymaps/default
|
||||
!/keyboards/zsa/**/keymaps/default/**
|
||||
!/keyboards/zsa/**/keymaps/oryx
|
||||
!/keyboards/zsa/**/keymaps/oryx/**
|
||||
|
||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -4,8 +4,8 @@
|
||||
branch = master
|
||||
[submodule "lib/chibios-contrib"]
|
||||
path = lib/chibios-contrib
|
||||
url = https://github.com/qmk/ChibiOS-Contrib
|
||||
branch = master
|
||||
url = https://github.com/drashna/ChibiOS-Contrib
|
||||
branch = gd32f303
|
||||
[submodule "lib/googletest"]
|
||||
path = lib/googletest
|
||||
url = https://github.com/qmk/googletest
|
||||
|
||||
10
.vscode/extensions.json
vendored
10
.vscode/extensions.json
vendored
@@ -1,10 +0,0 @@
|
||||
// Suggested extensions
|
||||
{
|
||||
"recommendations": [
|
||||
"EditorConfig.EditorConfig",
|
||||
"xaver.clang-format",
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"bierner.github-markdown-preview",
|
||||
"donjayamanne.git-extension-pack"
|
||||
]
|
||||
}
|
||||
34
.vscode/settings.json
vendored
34
.vscode/settings.json
vendored
@@ -1,34 +0,0 @@
|
||||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
// Unofficially, QMK uses spaces for indentation
|
||||
"editor.insertSpaces": true,
|
||||
// Configure glob patterns for excluding files and folders.
|
||||
"files.exclude": {
|
||||
"**/.build": true,
|
||||
"**/*.hex": true,
|
||||
"**/*.bin": true,
|
||||
"**/*.uf2": true
|
||||
},
|
||||
"files.associations": {
|
||||
"*.h": "c",
|
||||
"*.c": "c",
|
||||
"*.inc": "c",
|
||||
"*.cpp": "cpp",
|
||||
"*.hpp": "cpp",
|
||||
"xstddef": "c",
|
||||
"type_traits": "c",
|
||||
"utility": "c",
|
||||
"ranges": "c"
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.trimAutoWhitespace": false,
|
||||
"files.trimTrailingWhitespace": false
|
||||
},
|
||||
"python.formatting.provider": "yapf",
|
||||
"[json]": {
|
||||
"editor.formatOnSave": false
|
||||
},
|
||||
"clangd.arguments": [
|
||||
"--header-insertion=never"
|
||||
]
|
||||
}
|
||||
70
Doxyfile
70
Doxyfile
@@ -21,7 +21,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||
PROJECT_NAME = "QMK Firmware"
|
||||
PROJECT_NUMBER = https://github.com/qmk/qmk_firmware
|
||||
PROJECT_BRIEF = "Keyboard controller firmware for Atmel AVR and ARM USB families"
|
||||
OUTPUT_DIRECTORY = .build/docs/static/doxygen
|
||||
OUTPUT_DIRECTORY = .build/doxygen
|
||||
ALLOW_UNICODE_NAMES = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
@@ -40,8 +40,8 @@ ABBREVIATE_BRIEF = "The $name class" \
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
STRIP_FROM_PATH =
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
QT_AUTOBRIEF = NO
|
||||
@@ -49,13 +49,13 @@ MULTILINE_CPP_IS_BRIEF = NO
|
||||
INHERIT_DOCS = YES
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 4
|
||||
ALIASES =
|
||||
TCL_SUBST =
|
||||
ALIASES =
|
||||
TCL_SUBST =
|
||||
OPTIMIZE_OUTPUT_FOR_C = YES
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
OPTIMIZE_FOR_FORTRAN = NO
|
||||
OPTIMIZE_OUTPUT_VHDL = NO
|
||||
EXTENSION_MAPPING =
|
||||
EXTENSION_MAPPING =
|
||||
MARKDOWN_SUPPORT = YES
|
||||
TOC_INCLUDE_HEADINGS = 2
|
||||
AUTOLINK_SUPPORT = YES
|
||||
@@ -104,14 +104,14 @@ GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_FILES = YES
|
||||
SHOW_NAMESPACES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
FILE_VERSION_FILTER =
|
||||
LAYOUT_FILE =
|
||||
CITE_BIB_FILES =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to warning and progress messages
|
||||
@@ -124,7 +124,7 @@ WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_AS_ERROR = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
WARN_LOGFILE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the input files
|
||||
@@ -143,19 +143,19 @@ FILE_PATTERNS = *.c \
|
||||
*.hpp \
|
||||
*.h++
|
||||
RECURSIVE = YES
|
||||
EXCLUDE =
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS = */protocol/arm_atsam/*
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
FILTER_SOURCE_PATTERNS =
|
||||
USE_MDFILE_AS_MAINPAGE =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to source browsing
|
||||
@@ -177,7 +177,7 @@ VERBATIM_HEADERS = YES
|
||||
|
||||
ALPHABETICAL_INDEX = YES
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
IGNORE_PREFIX =
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to disabled outputs
|
||||
@@ -207,18 +207,18 @@ ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED = __DOXYGEN__ PROGMEM
|
||||
EXPAND_AS_DEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
EXTERNAL_PAGES = YES
|
||||
@@ -229,14 +229,14 @@ PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
CLASS_DIAGRAMS = YES
|
||||
MSCGEN_PATH =
|
||||
DIA_PATH =
|
||||
MSCGEN_PATH =
|
||||
DIA_PATH =
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
DOT_NUM_THREADS = 0
|
||||
DOT_FONTNAME = Helvetica
|
||||
DOT_FONTSIZE = 10
|
||||
DOT_FONTPATH =
|
||||
DOT_FONTPATH =
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
@@ -251,13 +251,13 @@ GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
INTERACTIVE_SVG = NO
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MSCFILE_DIRS =
|
||||
DIAFILE_DIRS =
|
||||
PLANTUML_JAR_PATH =
|
||||
PLANTUML_CFG_FILE =
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MSCFILE_DIRS =
|
||||
DIAFILE_DIRS =
|
||||
PLANTUML_JAR_PATH =
|
||||
PLANTUML_CFG_FILE =
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
DOT_GRAPH_MAX_NODES = 50
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_TRANSPARENT = NO
|
||||
|
||||
66
Makefile
66
Makefile
@@ -38,11 +38,6 @@ $(info QMK Firmware $(QMK_VERSION))
|
||||
endif
|
||||
endif
|
||||
|
||||
# Try to determine userspace from qmk config, if set.
|
||||
ifeq ($(QMK_USERSPACE),)
|
||||
QMK_USERSPACE = $(shell qmk config -ro user.overlay_dir | cut -d= -f2 | sed -e 's@^None$$@@g')
|
||||
endif
|
||||
|
||||
# Determine which qmk cli to use
|
||||
QMK_BIN := qmk
|
||||
|
||||
@@ -196,20 +191,9 @@ define PARSE_KEYBOARD
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
|
||||
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_1)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_2)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_3)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_4)/keymaps/*/.)))
|
||||
KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/keyboards/$$(KEYBOARD_FOLDER_PATH_5)/keymaps/*/.)))
|
||||
endif
|
||||
|
||||
KEYBOARD_LAYOUTS := $(shell $(QMK_BIN) list-layouts --keyboard $1)
|
||||
LAYOUT_KEYMAPS :=
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(ROOT_DIR)/layouts/*/$$(LAYOUT)/*/.)))))
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
$$(foreach LAYOUT,$$(KEYBOARD_LAYOUTS),$$(eval LAYOUT_KEYMAPS += $$(notdir $$(patsubst %/.,%,$$(wildcard $(QMK_USERSPACE)/layouts/$$(LAYOUT)/*/.)))))
|
||||
endif
|
||||
|
||||
KEYMAPS := $$(sort $$(KEYMAPS) $$(LAYOUT_KEYMAPS))
|
||||
|
||||
@@ -316,18 +300,17 @@ endef
|
||||
define BUILD_TEST
|
||||
TEST_PATH := $1
|
||||
TEST_NAME := $$(notdir $$(TEST_PATH))
|
||||
TEST_FULL_NAME := $$(subst /,_,$$(patsubst $$(ROOT_DIR)tests/%,%,$$(TEST_PATH)))
|
||||
MAKE_TARGET := $2
|
||||
COMMAND := $1
|
||||
MAKE_CMD := $$(MAKE) -r -R -C $(ROOT_DIR) -f $(BUILDDEFS_PATH)/build_test.mk $$(MAKE_TARGET)
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) TEST_OUTPUT=$$(TEST_FULL_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
|
||||
MAKE_VARS := TEST=$$(TEST_NAME) TEST_PATH=$$(TEST_PATH) FULL_TESTS="$$(FULL_TESTS)"
|
||||
MAKE_MSG := $$(MSG_MAKE_TEST)
|
||||
$$(eval $$(call BUILD))
|
||||
ifneq ($$(MAKE_TARGET),clean)
|
||||
TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_FULL_NAME).elf
|
||||
TESTS += $$(TEST_FULL_NAME)
|
||||
TEST_EXECUTABLE := $$(TEST_OUTPUT_DIR)/$$(TEST_NAME).elf
|
||||
TESTS += $$(TEST_NAME)
|
||||
TEST_MSG := $$(MSG_TEST)
|
||||
$$(TEST_FULL_NAME)_COMMAND := \
|
||||
$$(TEST_NAME)_COMMAND := \
|
||||
printf "$$(TEST_MSG)\n"; \
|
||||
$$(TEST_EXECUTABLE); \
|
||||
if [ $$$$? -gt 0 ]; \
|
||||
@@ -337,12 +320,6 @@ define BUILD_TEST
|
||||
endif
|
||||
endef
|
||||
|
||||
define LIST_TEST
|
||||
include $(BUILDDEFS_PATH)/testlist.mk
|
||||
FOUND_TESTS := $$(patsubst ./tests/%,%,$$(TEST_LIST))
|
||||
$$(info $$(FOUND_TESTS))
|
||||
endef
|
||||
|
||||
define PARSE_TEST
|
||||
TESTS :=
|
||||
TEST_NAME := $$(firstword $$(subst :, ,$$(RULE)))
|
||||
@@ -351,7 +328,7 @@ define PARSE_TEST
|
||||
ifeq ($$(TEST_NAME),all)
|
||||
MATCHED_TESTS := $$(TEST_LIST)
|
||||
else
|
||||
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring x$$(TEST_NAME)x, x$$(patsubst ./tests/%,%,$$(TEST)x)), $$(TEST),))
|
||||
MATCHED_TESTS := $$(foreach TEST, $$(TEST_LIST),$$(if $$(findstring x$$(TEST_NAME)x, x$$(notdir $$(TEST))x), $$(TEST),))
|
||||
endif
|
||||
$$(foreach TEST,$$(MATCHED_TESTS),$$(eval $$(call BUILD_TEST,$$(TEST),$$(TEST_TARGET))))
|
||||
endef
|
||||
@@ -436,10 +413,6 @@ git-submodules: git-submodule
|
||||
list-keyboards:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults | tr '\n' ' '
|
||||
|
||||
.PHONY: list-tests
|
||||
list-tests:
|
||||
$(eval $(call LIST_TEST))
|
||||
|
||||
.PHONY: generate-keyboards-file
|
||||
generate-keyboards-file:
|
||||
$(QMK_BIN) list-keyboards --no-resolve-defaults
|
||||
@@ -450,33 +423,8 @@ clean:
|
||||
rm -rf $(BUILD_DIR)
|
||||
echo 'done.'
|
||||
|
||||
.PHONY: distclean distclean_qmk
|
||||
distclean: distclean_qmk
|
||||
distclean_qmk: clean
|
||||
.PHONY: distclean
|
||||
distclean: clean
|
||||
echo -n 'Deleting *.bin, *.hex, and *.uf2 ... '
|
||||
rm -f *.bin *.hex *.uf2
|
||||
echo 'done.'
|
||||
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
.PHONY: distclean_userspace
|
||||
distclean: distclean_userspace
|
||||
distclean_userspace: clean
|
||||
echo -n 'Deleting userspace *.bin, *.hex, and *.uf2 ... '
|
||||
rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2
|
||||
echo 'done.'
|
||||
endif
|
||||
|
||||
# Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA.
|
||||
CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt
|
||||
|
||||
.PHONY: format-core
|
||||
format-core:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a"
|
||||
|
||||
.PHONY: pytest
|
||||
pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest"
|
||||
|
||||
.PHONY: format-and-pytest
|
||||
format-and-pytest:
|
||||
RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest"
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
$(TEST_OUTPUT)_INC := \
|
||||
$(TEST)_INC := \
|
||||
tests/test_common/common_config.h
|
||||
|
||||
$(TEST_OUTPUT)_SRC := \
|
||||
$(TEST)_SRC := \
|
||||
$(QUANTUM_SRC) \
|
||||
$(SRC) \
|
||||
$(QUANTUM_PATH)/keymap_introspection.c \
|
||||
@@ -30,8 +30,8 @@ $(TEST_OUTPUT)_SRC := \
|
||||
tests/test_common/test_logger.cpp \
|
||||
$(patsubst $(ROOTDIR)/%,%,$(wildcard $(TEST_PATH)/*.cpp))
|
||||
|
||||
$(TEST_OUTPUT)_DEFS := $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\""
|
||||
$(TEST)_DEFS := $(OPT_DEFS) "-DKEYMAP_C=\"keymap.c\""
|
||||
|
||||
$(TEST_OUTPUT)_CONFIG := $(TEST_PATH)/config.h
|
||||
$(TEST)_CONFIG := $(TEST_PATH)/config.h
|
||||
|
||||
VPATH += $(TOP_DIR)/tests/test_common
|
||||
|
||||
@@ -1,36 +1,17 @@
|
||||
# Look for a json keymap file
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
KEYMAP_JSON := $(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||
KEYMAP_JSON_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json)","")
|
||||
KEYMAP_JSON := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.json
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
endif
|
||||
|
||||
@@ -119,7 +119,7 @@ MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
|
||||
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)
|
||||
|
||||
# Pull in rules from DD keyboard config
|
||||
# Pull in rules from info.json
|
||||
INFO_RULES_MK = $(shell $(QMK_BIN) generate-rules-mk --quiet --escape --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/info_rules.mk)
|
||||
include $(INFO_RULES_MK)
|
||||
|
||||
@@ -129,68 +129,37 @@ include $(BUILDDEFS_PATH)/build_json.mk
|
||||
# Pull in keymap level rules.mk
|
||||
ifeq ("$(wildcard $(KEYMAP_PATH))", "")
|
||||
# Look through the possible keymap folders until we find a matching keymap.c
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(QMK_USERSPACE)/$(MAIN_KEYMAP_PATH_5)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(KEYMAP_PATH),)
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
# If we haven't found a keymap yet fall back to community layouts
|
||||
include $(BUILDDEFS_PATH)/build_layout.mk
|
||||
else ifeq ("$(wildcard $(KEYMAP_JSON_PATH))", "") # Not finding keymap.c is fine if we found a keymap.json
|
||||
$(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
|
||||
# this state should never be reached
|
||||
endif
|
||||
ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
|
||||
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
|
||||
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
|
||||
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
|
||||
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
|
||||
else ifneq ($(LAYOUTS),)
|
||||
# If we haven't found a keymap yet fall back to community layouts
|
||||
include $(BUILDDEFS_PATH)/build_layout.mk
|
||||
else
|
||||
$(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
|
||||
# this state should never be reached
|
||||
endif
|
||||
endif
|
||||
|
||||
# Have we found a keymap.json?
|
||||
ifneq ("$(wildcard $(KEYMAP_JSON))", "")
|
||||
ifneq ("$(wildcard $(KEYMAP_C))", "")
|
||||
$(call WARNING_MESSAGE,Keymap is specified as both keymap.json and keymap.c -- keymap.json file wins.)
|
||||
endif
|
||||
|
||||
KEYMAP_PATH := $(KEYMAP_JSON_PATH)
|
||||
|
||||
KEYMAP_C := $(INTERMEDIATE_OUTPUT)/src/keymap.c
|
||||
KEYMAP_H := $(INTERMEDIATE_OUTPUT)/src/config.h
|
||||
|
||||
@@ -221,7 +190,7 @@ include $(BUILDDEFS_PATH)/converters.mk
|
||||
MCU_ORIG := $(MCU)
|
||||
include $(wildcard $(PLATFORM_PATH)/*/mcu_selection.mk)
|
||||
|
||||
# PLATFORM_KEY should be detected in DD keyboard config via key 'processor' (or rules.mk 'MCU')
|
||||
# PLATFORM_KEY should be detected in info.json via key 'processor' (or rules.mk 'MCU')
|
||||
ifeq ($(PLATFORM_KEY),)
|
||||
$(call CATASTROPHIC_ERROR,Platform not defined)
|
||||
endif
|
||||
@@ -335,54 +304,38 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_5)/post_config.h)","")
|
||||
POST_CONFIG_H += $(KEYBOARD_PATH_5)/post_config.h
|
||||
endif
|
||||
|
||||
# Create dependencies on DD keyboard config - structure validated elsewhere
|
||||
DD_CONFIG_FILES :=
|
||||
# Pull in stuff from info.json
|
||||
INFO_JSON_FILES :=
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/info.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_1)/info.json
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_1)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/info.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_2)/info.json
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_2)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/info.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_3)/info.json
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_3)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/info.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_4)/info.json
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_4)/info.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/info.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_5)/info.json
|
||||
endif
|
||||
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_1)/keyboard.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_1)/keyboard.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_2)/keyboard.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_2)/keyboard.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_3)/keyboard.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_3)/keyboard.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_4)/keyboard.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_4)/keyboard.json
|
||||
endif
|
||||
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/keyboard.json)","")
|
||||
DD_CONFIG_FILES += $(KEYBOARD_PATH_5)/keyboard.json
|
||||
INFO_JSON_FILES += $(KEYBOARD_PATH_5)/info.json
|
||||
endif
|
||||
|
||||
CONFIG_H += $(INTERMEDIATE_OUTPUT)/src/info_config.h
|
||||
KEYBOARD_SRC += $(INTERMEDIATE_OUTPUT)/src/default_keyboard.c
|
||||
|
||||
$(INTERMEDIATE_OUTPUT)/src/info_config.h: $(DD_CONFIG_FILES)
|
||||
$(INTERMEDIATE_OUTPUT)/src/info_config.h: $(INFO_JSON_FILES)
|
||||
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=$(QMK_BIN) generate-config-h --quiet --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/info_config.h)
|
||||
@$(BUILD_CMD)
|
||||
|
||||
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.c: $(DD_CONFIG_FILES)
|
||||
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.c: $(INFO_JSON_FILES)
|
||||
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=$(QMK_BIN) generate-keyboard-c --quiet --keyboard $(KEYBOARD) --output $(INTERMEDIATE_OUTPUT)/src/default_keyboard.c)
|
||||
@$(BUILD_CMD)
|
||||
|
||||
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.h: $(DD_CONFIG_FILES)
|
||||
$(INTERMEDIATE_OUTPUT)/src/default_keyboard.h: $(INFO_JSON_FILES)
|
||||
@$(SILENT) || printf "$(MSG_GENERATING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=$(QMK_BIN) generate-keyboard-h --quiet --keyboard $(KEYBOARD) --include $(FOUND_KEYBOARD_H) --output $(INTERMEDIATE_OUTPUT)/src/default_keyboard.h)
|
||||
@$(BUILD_CMD)
|
||||
@@ -406,16 +359,6 @@ ifeq ("$(USER_NAME)","")
|
||||
endif
|
||||
USER_PATH := users/$(USER_NAME)
|
||||
|
||||
# If we have userspace, then add it to the lookup VPATH
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)),)
|
||||
VPATH += $(QMK_USERSPACE)
|
||||
endif
|
||||
|
||||
# If the equivalent users directory exists in userspace, use that in preference to anything currently in the main repo
|
||||
ifneq ($(wildcard $(QMK_USERSPACE)/$(USER_PATH)),)
|
||||
USER_PATH := $(QMK_USERSPACE)/$(USER_PATH)
|
||||
endif
|
||||
|
||||
# Pull in user level rules.mk
|
||||
-include $(USER_PATH)/rules.mk
|
||||
ifneq ("$(wildcard $(USER_PATH)/config.h)","")
|
||||
@@ -456,10 +399,6 @@ ifneq ("$(KEYMAP_H)","")
|
||||
CONFIG_H += $(KEYMAP_H)
|
||||
endif
|
||||
|
||||
ifeq ($(KEYMAP_C),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid keymap,Could not find keymap)
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DKEYMAP_C=\"$(KEYMAP_C)\"
|
||||
|
||||
# If a keymap or userspace places their keymap array in another file instead, allow for it to be included
|
||||
@@ -511,7 +450,6 @@ $(eval $(call add_qmk_prefix_defs,MCU_PORT_NAME,MCU_PORT_NAME))
|
||||
$(eval $(call add_qmk_prefix_defs,MCU_FAMILY,MCU_FAMILY))
|
||||
$(eval $(call add_qmk_prefix_defs,MCU_SERIES,MCU_SERIES))
|
||||
$(eval $(call add_qmk_prefix_defs,BOARD,BOARD))
|
||||
$(eval $(call add_qmk_prefix_defs,OPT,OPT))
|
||||
|
||||
# Control whether intermediate file listings are generated
|
||||
# e.g.:
|
||||
@@ -521,14 +459,22 @@ ifeq ($(strip $(KEEP_INTERMEDIATES)), yes)
|
||||
OPT_DEFS += -save-temps=obj
|
||||
endif
|
||||
|
||||
# TODO: remove this bodge?
|
||||
PROJECT_DEFS := $(OPT_DEFS)
|
||||
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
PROJECT_CONFIG := $(CONFIG_H)
|
||||
|
||||
CONFIG_H += $(POST_CONFIG_H)
|
||||
ALL_CONFIGS := $(PROJECT_CONFIG) $(CONFIG_H)
|
||||
|
||||
OUTPUTS := $(INTERMEDIATE_OUTPUT)
|
||||
$(INTERMEDIATE_OUTPUT)_SRC := $(SRC) $(PLATFORM_SRC)
|
||||
$(INTERMEDIATE_OUTPUT)_DEFS := \
|
||||
$(INTERMEDIATE_OUTPUT)_DEFS := $(OPT_DEFS) \
|
||||
-DQMK_KEYBOARD=\"$(KEYBOARD)\" -DQMK_KEYBOARD_H=\"$(INTERMEDIATE_OUTPUT)/src/default_keyboard.h\" \
|
||||
-DQMK_KEYMAP=\"$(KEYMAP)\" -DQMK_KEYMAP_H=\"$(KEYMAP).h\" -DQMK_KEYMAP_CONFIG_H=\"$(KEYMAP_PATH)/config.h\" \
|
||||
$(OPT_DEFS)
|
||||
$(INTERMEDIATE_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
|
||||
$(INTERMEDIATE_OUTPUT)_CONFIG := $(CONFIG_H) $(POST_CONFIG_H)
|
||||
$(PROJECT_DEFS)
|
||||
$(INTERMEDIATE_OUTPUT)_INC := $(VPATH) $(EXTRAINCDIRS) $(PROJECT_INC)
|
||||
$(INTERMEDIATE_OUTPUT)_CONFIG := $(CONFIG_H) $(PROJECT_CONFIG)
|
||||
|
||||
# Default target.
|
||||
all: build check-size
|
||||
@@ -549,10 +495,10 @@ check-size: top-symbols
|
||||
top-symbols: build
|
||||
echo "###########################################"
|
||||
echo "# Highest flash usage:"
|
||||
$(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep ' [RrTt] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
|
||||
$(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [t] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
|
||||
echo "###########################################"
|
||||
echo "# Highest RAM usage:"
|
||||
$(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep ' [BbCDdGgSs] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
|
||||
$(NM) -Crtd --size-sort $(BUILD_DIR)/$(TARGET).elf | grep -i ' [dbv] ' | head -n$(NUM_TOP_SYMBOLS) | sed -e 's#^0000000# #g' -e 's#^000000# #g' -e 's#^00000# #g' -e 's#^0000# #g' -e 's#^000# #g' -e 's#^00# #g' -e 's#^0# #g'
|
||||
echo "###########################################"
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
LAYOUTS_PATH := layouts
|
||||
LAYOUTS_REPOS := $(patsubst %/,%,$(sort $(dir $(wildcard $(LAYOUTS_PATH)/*/))))
|
||||
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
LAYOUTS_REPOS += $(patsubst %/,%,$(QMK_USERSPACE)/$(LAYOUTS_PATH))
|
||||
endif
|
||||
|
||||
define SEARCH_LAYOUTS_REPO
|
||||
LAYOUT_KEYMAP_PATH := $$(LAYOUTS_REPO)/$$(LAYOUT)/$$(KEYMAP)
|
||||
LAYOUT_KEYMAP_JSON := $$(LAYOUT_KEYMAP_PATH)/keymap.json
|
||||
|
||||
@@ -9,13 +9,13 @@ OPT = g
|
||||
include paths.mk
|
||||
include $(BUILDDEFS_PATH)/message.mk
|
||||
|
||||
TARGET=test/$(TEST_OUTPUT)
|
||||
TARGET=test/$(TEST)
|
||||
|
||||
GTEST_OUTPUT = $(BUILD_DIR)/gtest
|
||||
|
||||
TEST_OBJ = $(BUILD_DIR)/test_obj
|
||||
|
||||
OUTPUTS := $(TEST_OBJ)/$(TEST_OUTPUT) $(GTEST_OUTPUT)
|
||||
OUTPUTS := $(TEST_OBJ)/$(TEST) $(GTEST_OUTPUT)
|
||||
|
||||
GTEST_INC := \
|
||||
$(LIB_PATH)/googletest/googletest/include \
|
||||
@@ -71,18 +71,18 @@ ifneq ($(filter $(FULL_TESTS),$(TEST)),)
|
||||
include $(BUILDDEFS_PATH)/build_full_test.mk
|
||||
endif
|
||||
|
||||
$(TEST_OUTPUT)_SRC += \
|
||||
$(TEST)_SRC += \
|
||||
tests/test_common/main.cpp \
|
||||
$(QUANTUM_PATH)/logging/print.c
|
||||
|
||||
ifneq ($(strip $(INTROSPECTION_KEYMAP_C)),)
|
||||
$(TEST_OUTPUT)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
|
||||
$(TEST)_DEFS += -DINTROSPECTION_KEYMAP_C=\"$(strip $(INTROSPECTION_KEYMAP_C))\"
|
||||
endif
|
||||
|
||||
$(TEST_OBJ)/$(TEST_OUTPUT)_SRC := $($(TEST_OUTPUT)_SRC)
|
||||
$(TEST_OBJ)/$(TEST_OUTPUT)_INC := $($(TEST_OUTPUT)_INC) $(VPATH) $(GTEST_INC)
|
||||
$(TEST_OBJ)/$(TEST_OUTPUT)_DEFS := $($(TEST_OUTPUT)_DEFS)
|
||||
$(TEST_OBJ)/$(TEST_OUTPUT)_CONFIG := $($(TEST_OUTPUT)_CONFIG)
|
||||
$(TEST_OBJ)/$(TEST)_SRC := $($(TEST)_SRC)
|
||||
$(TEST_OBJ)/$(TEST)_INC := $($(TEST)_INC) $(VPATH) $(GTEST_INC)
|
||||
$(TEST_OBJ)/$(TEST)_DEFS := $($(TEST)_DEFS)
|
||||
$(TEST_OBJ)/$(TEST)_CONFIG := $($(TEST)_CONFIG)
|
||||
|
||||
include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk
|
||||
include $(BUILDDEFS_PATH)/common_rules.mk
|
||||
|
||||
@@ -75,7 +75,10 @@ ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
|
||||
OPT_DEFS += -DSEQUENCER_ENABLE
|
||||
MUSIC_ENABLE = yes
|
||||
SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
@@ -91,6 +94,11 @@ ifeq ($(strip $(MIDI_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
|
||||
endif
|
||||
|
||||
MUSIC_ENABLE ?= no
|
||||
ifeq ($(MUSIC_ENABLE), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
|
||||
endif
|
||||
|
||||
VALID_STENO_PROTOCOL_TYPES := geminipr txbolt all
|
||||
STENO_PROTOCOL ?= all
|
||||
ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||
@@ -116,11 +124,17 @@ ifeq ($(strip $(STENO_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
|
||||
MOUSE_ENABLE := yes
|
||||
ifeq ($(strip $(VIRTSER_ENABLE)), yes)
|
||||
OPT_DEFS += -DVIRTSER_ENABLE
|
||||
endif
|
||||
|
||||
VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick azoteq_iqs5xx cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
|
||||
ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
|
||||
OPT_DEFS += -DMOUSEKEY_ENABLE
|
||||
MOUSE_ENABLE := yes
|
||||
SRC += $(QUANTUM_DIR)/mousekey.c
|
||||
endif
|
||||
|
||||
VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
|
||||
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type)
|
||||
@@ -137,26 +151,30 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
|
||||
endif
|
||||
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER))
|
||||
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), azoteq_iqs5xx)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_ADC -DHAL_USE_ADC=TRUE
|
||||
LIB_SRC += analog.c
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
SRC += drivers/sensors/cirque_pinnacle.c
|
||||
SRC += drivers/sensors/cirque_pinnacle_gestures.c
|
||||
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
|
||||
SRC += drivers/sensors/cirque_pinnacle.c
|
||||
SRC += drivers/sensors/cirque_pinnacle_gestures.c
|
||||
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
|
||||
SRC += drivers/sensors/pmw33xx_common.c
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -186,12 +204,12 @@ else
|
||||
else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
|
||||
# External I2C EEPROM implementation
|
||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
SRC += eeprom_driver.c eeprom_i2c.c
|
||||
else ifeq ($(strip $(EEPROM_DRIVER)), spi)
|
||||
# External SPI EEPROM implementation
|
||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
SRC += eeprom_driver.c eeprom_spi.c
|
||||
else ifeq ($(strip $(EEPROM_DRIVER)), legacy_stm32_flash)
|
||||
# STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated)
|
||||
@@ -209,13 +227,13 @@ else
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
# Automatically provided by avr-libc, nothing required
|
||||
else ifeq ($(PLATFORM),CHIBIOS)
|
||||
ifneq ($(filter %_STM32F072xB %_STM32F042x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),)
|
||||
ifneq ($(filter %_STM32F072xB %_STM32F042x6 _GD32F303x6, $(MCU_SERIES)_$(MCU_LDSCRIPT)),)
|
||||
# STM32 Emulated EEPROM, backed by MCU flash (soon to be deprecated)
|
||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_LEGACY_EMULATED_FLASH
|
||||
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/flash
|
||||
COMMON_VPATH += $(DRIVER_PATH)/flash
|
||||
SRC += eeprom_driver.c eeprom_legacy_emulated_flash.c legacy_flash_ops.c
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103),)
|
||||
else ifneq ($(filter $(MCU_SERIES),STM32F1xx STM32F3xx STM32F4xx STM32L4xx STM32G4xx WB32F3G71xx WB32FQ95xx GD32VF103 GD32F303),)
|
||||
# Wear-leveling EEPROM implementation, backed by MCU flash
|
||||
OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_WEAR_LEVELING
|
||||
SRC += eeprom_driver.c eeprom_wear_leveling.c
|
||||
@@ -290,14 +308,15 @@ ifneq ($(strip $(FLASH_DRIVER)), none)
|
||||
else
|
||||
OPT_DEFS += -DFLASH_ENABLE
|
||||
ifeq ($(strip $(FLASH_DRIVER)),spi)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DFLASH_DRIVER -DFLASH_SPI
|
||||
COMMON_VPATH += $(DRIVER_PATH)/flash
|
||||
SRC += flash_spi.c
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
RGBLIGHT_ENABLE ?= no
|
||||
VALID_RGBLIGHT_TYPES := ws2812 apa102 custom
|
||||
|
||||
@@ -310,10 +329,8 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgblight
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
OPT_DEFS += -DRGBLIGHT_$(strip $(shell echo $(RGBLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
|
||||
SRC += $(QUANTUM_DIR)/rgblight/rgblight_drivers.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
endif
|
||||
@@ -326,137 +343,90 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
APA102_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
|
||||
OPT_DEFS += -DVELOCIKEY_ENABLE
|
||||
ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
|
||||
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
|
||||
endif
|
||||
endif
|
||||
|
||||
# Deprecated driver names - do not use
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), aw20216)
|
||||
LED_MATRIX_DRIVER := aw20216s
|
||||
endif
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001)
|
||||
LED_MATRIX_DRIVER := snled27351
|
||||
endif
|
||||
|
||||
LED_MATRIX_ENABLE ?= no
|
||||
VALID_LED_MATRIX_TYPES := is31fl3218 is31fl3236 is31fl3729 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 custom
|
||||
VALID_LED_MATRIX_TYPES := is31fl3731 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 custom
|
||||
# TODO: is31fl3733 is31fl3737 is31fl3741
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid LED_MATRIX_DRIVER,LED_MATRIX_DRIVER="$(LED_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DLED_MATRIX_ENABLE
|
||||
OPT_DEFS += -DLED_MATRIX_$(strip $(shell echo $(LED_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
|
||||
POST_CONFIG_H += $(QUANTUM_DIR)/led_matrix/post_config.h
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
|
||||
LIB8TION_ENABLE := yes
|
||||
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
|
||||
CIE1931_CURVE := yes
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3218)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3218-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3236)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3236-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3729)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3729-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3731)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3731-mono.c
|
||||
SRC += is31fl3731-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3733)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3742A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3733-mono.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3736)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3743A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3736-mono.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3737)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3745 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3737-mono.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3741)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3746A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3741-mono.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3742a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3742a-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3743a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3743a-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3745)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3745-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), is31fl3746a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3746a-mono.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), snled27351)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(LED_MATRIX_DRIVER)), ckled2001)
|
||||
OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += snled27351-mono.c
|
||||
SRC += ckled2001-simple.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
# Deprecated driver names - do not use
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216)
|
||||
RGB_MATRIX_DRIVER := aw20216s
|
||||
endif
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001)
|
||||
RGB_MATRIX_DRIVER := snled27351
|
||||
endif
|
||||
|
||||
RGB_MATRIX_ENABLE ?= no
|
||||
|
||||
VALID_RGB_MATRIX_TYPES := aw20216s is31fl3218 is31fl3236 is31fl3729 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a snled27351 ws2812 custom
|
||||
VALID_RGB_MATRIX_TYPES := aw20216 is31fl3731 is31fl3733 is31fl3736 is31fl3737 is31fl3741 is31fl3742a is31fl3743a is31fl3745 is31fl3746a ckled2001 ws2812 custom
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid RGB_MATRIX_DRIVER,RGB_MATRIX_DRIVER="$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
|
||||
endif
|
||||
OPT_DEFS += -DRGB_MATRIX_ENABLE
|
||||
OPT_DEFS += -DRGB_MATRIX_$(strip $(shell echo $(RGB_MATRIX_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
|
||||
@@ -464,99 +434,94 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/color.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
|
||||
SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
|
||||
LIB8TION_ENABLE := yes
|
||||
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
|
||||
CIE1931_CURVE := yes
|
||||
RGB_KEYCODES_ENABLE := yes
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216s)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), aw20216)
|
||||
OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += aw20216s.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3218)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3218.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3236)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3236.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3729)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3729.c
|
||||
SRC += aw20216.c
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3731)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3731.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3733)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3733.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3736)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3736 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3736.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3737)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3737.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3741)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3741.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3742a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3742A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3742a.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3743a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3743A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3743a.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3745)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3745 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3745.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), is31fl3746a)
|
||||
OPT_DEFS += -DIS31FLCOMMON -DIS31FL3746A -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led/issi
|
||||
SRC += is31fl3746a.c
|
||||
SRC += is31flcommon.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), snled27351)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), ckled2001)
|
||||
OPT_DEFS += -DCKLED2001 -DSTM32_I2C -DHAL_USE_I2C=TRUE
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += snled27351.c
|
||||
SRC += ckled2001.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), ws2812)
|
||||
OPT_DEFS += -DWS2812
|
||||
WS2812_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_DRIVER)), apa102)
|
||||
OPT_DEFS += -DAPA102
|
||||
APA102_DRIVER_REQUIRED := yes
|
||||
endif
|
||||
|
||||
@@ -603,7 +568,6 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight.c
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
|
||||
OPT_DEFS += -DBACKLIGHT_ENABLE
|
||||
OPT_DEFS += -DBACKLIGHT_$(strip $(shell echo $(BACKLIGHT_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
ifneq ($(strip $(BACKLIGHT_DRIVER)), custom)
|
||||
SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
|
||||
@@ -616,6 +580,35 @@ ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
|
||||
|
||||
WS2812_DRIVER ?= bitbang
|
||||
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
|
||||
ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid WS2812_DRIVER,WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
SRC += ws2812_$(strip $(WS2812_DRIVER)).c
|
||||
|
||||
ifeq ($(strip $(PLATFORM)), CHIBIOS)
|
||||
ifeq ($(strip $(WS2812_DRIVER)), pwm)
|
||||
OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
|
||||
endif
|
||||
endif
|
||||
|
||||
# add extra deps
|
||||
ifeq ($(strip $(WS2812_DRIVER)), i2c)
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += apa102.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CIE1931_CURVE)), yes)
|
||||
OPT_DEFS += -DUSE_CIE1931_CURVE
|
||||
LED_TABLES := yes
|
||||
@@ -625,16 +618,39 @@ ifeq ($(strip $(LED_TABLES)), yes)
|
||||
SRC += $(QUANTUM_DIR)/led_tables.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ORYX_ENABLE)), yes)
|
||||
RAW_ENABLE := yes
|
||||
SRC += $(QUANTUM_DIR)/oryx.c
|
||||
OPT_DEFS += -DORYX_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VIA_ENABLE)), yes)
|
||||
DYNAMIC_KEYMAP_ENABLE := yes
|
||||
RAW_ENABLE := yes
|
||||
BOOTMAGIC_ENABLE := yes
|
||||
TRI_LAYER_ENABLE := yes
|
||||
SRC += $(QUANTUM_DIR)/via.c
|
||||
OPT_DEFS += -DVIA_ENABLE
|
||||
endif
|
||||
|
||||
VALID_MAGIC_TYPES := yes
|
||||
BOOTMAGIC_ENABLE ?= no
|
||||
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
|
||||
ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid BOOTMAGIC_ENABLE,BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
|
||||
endif
|
||||
ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
|
||||
OPT_DEFS += -DBOOTMAGIC_LITE
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
|
||||
endif
|
||||
endif
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
|
||||
QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
|
||||
|
||||
VALID_CUSTOM_MATRIX_TYPES:= yes lite no
|
||||
|
||||
CUSTOM_MATRIX ?= no
|
||||
|
||||
ifneq ($(strip $(CUSTOM_MATRIX)), yes)
|
||||
ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid CUSTOM_MATRIX,CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type)
|
||||
@@ -699,35 +715,33 @@ ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
COMMON_VPATH += $(QUANTUM_PATH)/split_common
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CRC_ENABLE)), yes)
|
||||
OPT_DEFS += -DCRC_ENABLE
|
||||
SRC += crc.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(FNV_ENABLE)), yes)
|
||||
OPT_DEFS += -DFNV_ENABLE
|
||||
VPATH += $(LIB_PATH)/fnv
|
||||
SRC += qmk_fnv_type_validation.c hash_32a.c hash_64a.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(LIB8TION_ENABLE)), yes)
|
||||
ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
|
||||
# ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
|
||||
OPT_DEFS += -DLIB8_ATTINY
|
||||
endif
|
||||
SRC += $(LIB_PATH)/lib8tion/lib8tion.c
|
||||
endif
|
||||
|
||||
VALID_HAPTIC_DRIVER_TYPES := drv2605l solenoid
|
||||
ifeq ($(strip $(HAPTIC_ENABLE)),yes)
|
||||
ifeq ($(filter $(HAPTIC_DRIVER),$(VALID_HAPTIC_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid HAPTIC_DRIVER,HAPTIC_DRIVER="$(HAPTIC_DRIVER)" is not a valid Haptic driver)
|
||||
else
|
||||
OPT_DEFS += -DHAPTIC_$(strip $(shell echo $(HAPTIC_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
COMMON_VPATH += $(DRIVER_PATH)/haptic
|
||||
|
||||
ifeq ($(strip $(HAPTIC_DRIVER)), drv2605l)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
SRC += drv2605l.c
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
OPT_DEFS += -DHAPTIC_DRV2605L
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(HAPTIC_DRIVER)), solenoid)
|
||||
SRC += solenoid.c
|
||||
OPT_DEFS += -DHAPTIC_SOLENOID
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -750,7 +764,6 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
$(call CATASTROPHIC_ERROR,Invalid OLED_TRANSPORT,OLED_TRANSPORT="$(OLED_TRANSPORT)" is not a valid OLED transport)
|
||||
else
|
||||
OPT_DEFS += -DOLED_ENABLE
|
||||
OPT_DEFS += -DOLED_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
COMMON_VPATH += $(DRIVER_PATH)/oled
|
||||
ifneq ($(strip $(OLED_DRIVER)), custom)
|
||||
SRC += oled_driver.c
|
||||
@@ -758,10 +771,10 @@ ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
|
||||
OPT_DEFS += -DOLED_TRANSPORT_$(strip $(shell echo $(OLED_TRANSPORT) | tr '[:lower:]' '[:upper:]'))
|
||||
ifeq ($(strip $(OLED_TRANSPORT)), i2c)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
ifeq ($(strip $(OLED_TRANSPORT)), spi)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
@@ -769,9 +782,9 @@ endif
|
||||
|
||||
ifeq ($(strip $(ST7565_ENABLE)), yes)
|
||||
OPT_DEFS += -DST7565_ENABLE
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
|
||||
COMMON_VPATH += $(DRIVER_PATH)/lcd
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
SRC += st7565.c
|
||||
endif
|
||||
|
||||
@@ -803,6 +816,27 @@ ifeq ($(strip $(UNICODE_COMMON)), yes)
|
||||
$(QUANTUM_DIR)/unicode/utf8.c
|
||||
endif
|
||||
|
||||
MAGIC_ENABLE ?= yes
|
||||
ifeq ($(strip $(MAGIC_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c
|
||||
OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
|
||||
endif
|
||||
|
||||
SEND_STRING_ENABLE ?= yes
|
||||
ifeq ($(strip $(SEND_STRING_ENABLE)), yes)
|
||||
OPT_DEFS += -DSEND_STRING_ENABLE
|
||||
COMMON_VPATH += $(QUANTUM_DIR)/send_string
|
||||
SRC += $(QUANTUM_DIR)/send_string/send_string.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
|
||||
OPT_DEFS += -DAUTO_SHIFT_ENABLE
|
||||
ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
|
||||
OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes)
|
||||
PS2_ENABLE := yes
|
||||
MOUSE_ENABLE := yes
|
||||
@@ -839,12 +873,15 @@ ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
|
||||
$(call CATASTROPHIC_ERROR,Invalid JOYSTICK_DRIVER,JOYSTICK_DRIVER="$(JOYSTICK_DRIVER)" is not a valid joystick driver)
|
||||
endif
|
||||
OPT_DEFS += -DJOYSTICK_ENABLE
|
||||
OPT_DEFS += -DJOYSTICK_$(strip $(shell echo $(JOYSTICK_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
|
||||
SRC += $(QUANTUM_DIR)/joystick.c
|
||||
|
||||
ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
|
||||
SRC += analog.c
|
||||
endif
|
||||
ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
|
||||
OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
|
||||
endif
|
||||
endif
|
||||
|
||||
@@ -879,109 +916,39 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
|
||||
$(call CATASTROPHIC_ERROR,Invalid BLUETOOTH_DRIVER,BLUETOOTH_DRIVER="$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type)
|
||||
endif
|
||||
OPT_DEFS += -DBLUETOOTH_ENABLE
|
||||
OPT_DEFS += -DBLUETOOTH_$(strip $(shell echo $(BLUETOOTH_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
NO_USB_STARTUP_CHECK := yes
|
||||
COMMON_VPATH += $(DRIVER_PATH)/bluetooth
|
||||
SRC += outputselect.c
|
||||
|
||||
ifeq ($(strip $(BLUETOOTH_DRIVER)), bluefruit_le)
|
||||
SPI_DRIVER_REQUIRED = yes
|
||||
ANALOG_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE
|
||||
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
|
||||
SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(BLUETOOTH_DRIVER)), rn42)
|
||||
UART_DRIVER_REQUIRED = yes
|
||||
OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE
|
||||
SRC += $(DRIVER_PATH)/bluetooth/bluetooth.c
|
||||
SRC += $(DRIVER_PATH)/bluetooth/rn42.c
|
||||
QUANTUM_LIB_SRC += uart.c
|
||||
endif
|
||||
endif
|
||||
|
||||
ENCODER_ENABLE ?= no
|
||||
ENCODER_DRIVER ?= quadrature
|
||||
VALID_ENCODER_DRIVER_TYPES := quadrature custom
|
||||
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
ifeq ($(filter $(ENCODER_DRIVER),$(VALID_ENCODER_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid ENCODER_DRIVER,ENCODER_DRIVER="$(ENCODER_DRIVER)" is not a valid encoder driver)
|
||||
endif
|
||||
SRC += $(QUANTUM_DIR)/encoder.c
|
||||
OPT_DEFS += -DENCODER_ENABLE
|
||||
OPT_DEFS += -DENCODER_DRIVER_$(strip $(shell echo $(ENCODER_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/encoder
|
||||
COMMON_VPATH += $(DRIVER_PATH)/encoder
|
||||
|
||||
ifneq ($(strip $(ENCODER_DRIVER)), custom)
|
||||
SRC += encoder_$(strip $(ENCODER_DRIVER)).c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ENCODER_MAP_ENABLE)), yes)
|
||||
OPT_DEFS += -DENCODER_MAP_ENABLE
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
|
||||
ifeq ($(strip $(DIP_SWITCH_MAP_ENABLE)), yes)
|
||||
OPT_DEFS += -DDIP_SWITCH_MAP_ENABLE
|
||||
endif
|
||||
endif
|
||||
|
||||
VALID_WS2812_DRIVER_TYPES := bitbang custom i2c pwm spi vendor
|
||||
|
||||
WS2812_DRIVER ?= bitbang
|
||||
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
|
||||
ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
|
||||
$(call CATASTROPHIC_ERROR,Invalid WS2812_DRIVER,WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
|
||||
endif
|
||||
|
||||
OPT_DEFS += -DWS2812_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
|
||||
|
||||
SRC += ws2812_$(strip $(WS2812_DRIVER)).c
|
||||
|
||||
ifeq ($(strip $(PLATFORM)), CHIBIOS)
|
||||
ifeq ($(strip $(WS2812_DRIVER)), pwm)
|
||||
OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
|
||||
endif
|
||||
endif
|
||||
|
||||
# add extra deps
|
||||
ifeq ($(strip $(WS2812_DRIVER)), i2c)
|
||||
I2C_DRIVER_REQUIRED = yes
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
|
||||
COMMON_VPATH += $(DRIVER_PATH)/led
|
||||
SRC += apa102.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ANALOG_DRIVER_REQUIRED)), yes)
|
||||
OPT_DEFS += -DHAL_USE_ADC=TRUE
|
||||
QUANTUM_LIB_SRC += analog.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(I2C_DRIVER_REQUIRED)), yes)
|
||||
OPT_DEFS += -DHAL_USE_I2C=TRUE
|
||||
QUANTUM_LIB_SRC += i2c_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(SPI_DRIVER_REQUIRED)), yes)
|
||||
OPT_DEFS += -DHAL_USE_SPI=TRUE
|
||||
QUANTUM_LIB_SRC += spi_master.c
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(UART_DRIVER_REQUIRED)), yes)
|
||||
ifeq ($(strip $(PLATFORM)), CHIBIOS)
|
||||
ifneq ($(filter $(MCU_SERIES),RP2040),)
|
||||
OPT_DEFS += -DHAL_USE_SIO=TRUE
|
||||
QUANTUM_LIB_SRC += uart_sio.c
|
||||
else
|
||||
OPT_DEFS += -DHAL_USE_SERIAL=TRUE
|
||||
QUANTUM_LIB_SRC += uart_serial.c
|
||||
endif
|
||||
else
|
||||
QUANTUM_LIB_SRC += uart.c
|
||||
ifeq ($(strip $(OS_DETECTION_ENABLE)), yes)
|
||||
SRC += $(QUANTUM_DIR)/os_detection.c
|
||||
OPT_DEFS += -DOS_DETECTION_ENABLE
|
||||
ifeq ($(strip $(OS_DETECTION_DEBUG_ENABLE)), yes)
|
||||
OPT_DEFS += -DOS_DETECTION_DEBUG_ENABLE
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -12,9 +12,6 @@ vpath %.hpp $(VPATH_SRC)
|
||||
vpath %.S $(VPATH_SRC)
|
||||
VPATH :=
|
||||
|
||||
# Helper to return the distinct elements of a list
|
||||
uniq = $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1)))
|
||||
|
||||
# Convert all SRC to OBJ
|
||||
define OBJ_FROM_SRC
|
||||
$(patsubst %.c,$1/%.o,$(patsubst %.cpp,$1/%.o,$(patsubst %.cc,$1/%.o,$(patsubst %.S,$1/%.o,$(patsubst %.clib,$1/%.a,$($1_SRC))))))
|
||||
@@ -191,7 +188,7 @@ DFU_SUFFIX_ARGS ?=
|
||||
elf: $(BUILD_DIR)/$(TARGET).elf
|
||||
hex: $(BUILD_DIR)/$(TARGET).hex
|
||||
uf2: $(BUILD_DIR)/$(TARGET).uf2
|
||||
cpfirmware_qmk: $(FIRMWARE_FORMAT)
|
||||
cpfirmware: $(FIRMWARE_FORMAT)
|
||||
$(SILENT) || printf "Copying $(TARGET).$(FIRMWARE_FORMAT) to qmk_firmware folder" | $(AWK_CMD)
|
||||
$(COPY) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT) $(TARGET).$(FIRMWARE_FORMAT) && $(PRINT_OK)
|
||||
eep: $(BUILD_DIR)/$(TARGET).eep
|
||||
@@ -200,15 +197,6 @@ sym: $(BUILD_DIR)/$(TARGET).sym
|
||||
LIBNAME=lib$(TARGET).a
|
||||
lib: $(LIBNAME)
|
||||
|
||||
cpfirmware: cpfirmware_qmk
|
||||
|
||||
ifneq ($(QMK_USERSPACE),)
|
||||
cpfirmware: cpfirmware_userspace
|
||||
cpfirmware_userspace: cpfirmware_qmk
|
||||
$(SILENT) || printf "Copying $(TARGET).$(FIRMWARE_FORMAT) to userspace folder" | $(AWK_CMD)
|
||||
$(COPY) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT) $(QMK_USERSPACE)/$(TARGET).$(FIRMWARE_FORMAT) && $(PRINT_OK)
|
||||
endif
|
||||
|
||||
# Display size of file, modifying the output so people don't mistakenly grab the hex output
|
||||
BINARY_SIZE = $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(SED) -e 's/\.build\/.*$$/$(TARGET).$(FIRMWARE_FORMAT)/g'
|
||||
|
||||
@@ -276,7 +264,7 @@ BEGIN = gccversion sizebefore
|
||||
# Note the obj.txt depeendency is there to force linking if a source file is deleted
|
||||
%.elf: $(OBJ) $(MASTER_OUTPUT)/cflags.txt $(MASTER_OUTPUT)/ldflags.txt $(MASTER_OUTPUT)/obj.txt | $(BEGIN)
|
||||
@$(SILENT) || printf "$(MSG_LINKING) $@" | $(AWK_CMD)
|
||||
$(eval CMD=MAKE=$(MAKE) $(CC) $(ALL_CFLAGS) $(call uniq,$(OBJ)) --output $@ $(LDFLAGS))
|
||||
$(eval CMD=MAKE=$(MAKE) $(CC) $(ALL_CFLAGS) $(filter-out %.txt,$^) --output $@ $(LDFLAGS))
|
||||
@$(BUILD_CMD)
|
||||
|
||||
|
||||
@@ -392,9 +380,43 @@ dump_vars:
|
||||
objs-size:
|
||||
for i in $(OBJ); do echo $$i; done | sort | xargs $(SIZE)
|
||||
|
||||
ifeq ($(findstring avr-gcc,$(CC)),avr-gcc)
|
||||
SIZE_MARGIN = 1024
|
||||
|
||||
# size check optionally implemented in its platform.mk
|
||||
check-size:
|
||||
$(eval MAX_SIZE=$(shell n=`$(CC) -E -mmcu=$(MCU) -D__ASSEMBLER__ $(CFLAGS) $(OPT_DEFS) platforms/avr/bootloader_size.c 2> /dev/null | $(SED) -ne 's/\r//;/^#/n;/^AVR_SIZE:/,$${s/^AVR_SIZE: //;p;}'` && echo $$(($$n)) || echo 0))
|
||||
$(eval CURRENT_SIZE=$(shell if [ -f $(BUILD_DIR)/$(TARGET).hex ]; then $(SIZE) --target=$(FORMAT) $(BUILD_DIR)/$(TARGET).hex | $(AWK) 'NR==2 {print $$4}'; else printf 0; fi))
|
||||
$(eval FREE_SIZE=$(shell expr $(MAX_SIZE) - $(CURRENT_SIZE)))
|
||||
$(eval OVER_SIZE=$(shell expr $(CURRENT_SIZE) - $(MAX_SIZE)))
|
||||
$(eval PERCENT_SIZE=$(shell expr $(CURRENT_SIZE) \* 100 / $(MAX_SIZE)))
|
||||
if [ $(MAX_SIZE) -gt 0 ] && [ $(CURRENT_SIZE) -gt 0 ]; then \
|
||||
$(SILENT) || printf "$(MSG_CHECK_FILESIZE)" | $(AWK_CMD); \
|
||||
if [ $(CURRENT_SIZE) -gt $(MAX_SIZE) ]; then \
|
||||
printf "\n * $(MSG_FILE_TOO_BIG)"; $(PRINT_ERROR_PLAIN); \
|
||||
else \
|
||||
if [ $(FREE_SIZE) -lt $(SIZE_MARGIN) ]; then \
|
||||
$(PRINT_WARNING_PLAIN); printf " * $(MSG_FILE_NEAR_LIMIT)"; \
|
||||
else \
|
||||
$(PRINT_OK); $(SILENT) || printf " * $(MSG_FILE_JUST_RIGHT)"; \
|
||||
fi ; \
|
||||
fi ; \
|
||||
fi
|
||||
$(eval END_POINTER=$(shell printf "%d" $$(( 0xffff & 0x$$( if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then avr-objdump -t $(BUILD_DIR)/$(TARGET).elf | grep -e '\b_end\b' | cut -c -8; else printf 0; fi ) )) ))
|
||||
$(eval STACK_POINTER=$(shell printf "%d" $$(( 0xffff & 0x$$( if [ -f $(BUILD_DIR)/$(TARGET).elf ]; then avr-objdump -t $(BUILD_DIR)/$(TARGET).elf | grep -e '\b__stack\b' | cut -c -8; else printf 0; fi ) )) ))
|
||||
$(eval STACK_SIZE=$(shell expr $(STACK_POINTER) + 1 - $(END_POINTER)))
|
||||
$(eval RAM_OVERFLOW_AMOUNT=$(shell expr 0 - $(STACK_SIZE)))
|
||||
if [ $(STACK_POINTER) -gt 0 ] && [ $(END_POINTER) -gt 0 ]; then \
|
||||
$(SILENT) || printf "$(MSG_CHECK_STACKSIZE)" | $(AWK_CMD); \
|
||||
if [ $(STACK_SIZE) -lt 0 ] ; then \
|
||||
printf "\n * $(MSG_MEMORY_OVERFLOW)"; $(PRINT_ERROR_PLAIN); \
|
||||
else \
|
||||
$(SILENT) || printf "\n * $(MSG_STACK_SIZE)"; \
|
||||
fi ; \
|
||||
fi
|
||||
else
|
||||
check-size:
|
||||
$(SILENT) || echo "$(MSG_CHECK_FILESIZE_SKIPPED)"
|
||||
endif
|
||||
|
||||
check-md5:
|
||||
$(MD5SUM) $(BUILD_DIR)/$(TARGET).$(FIRMWARE_FORMAT)
|
||||
|
||||
@@ -5,10 +5,8 @@ ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
|
||||
$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
|
||||
endif
|
||||
|
||||
ifneq (,$(filter $(MCU),atmega32u4))
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
endif
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
|
||||
# Remove whitespace from any rule.mk provided vars
|
||||
# - env cannot be overwritten but cannot have whitespace anyway
|
||||
@@ -18,10 +16,6 @@ ifneq ($(CONVERT_TO),)
|
||||
# stash so we can overwrite env provided vars if needed
|
||||
ACTIVE_CONVERTER=$(CONVERT_TO)
|
||||
|
||||
ifeq ($(PIN_COMPATIBLE),)
|
||||
$(call CATASTROPHIC_ERROR,Converting to '$(CONVERT_TO)' not possible!)
|
||||
endif
|
||||
|
||||
# glob to search each platfrorm and/or check for valid converter
|
||||
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
|
||||
ifeq ($(CONVERTER),)
|
||||
@@ -31,9 +25,7 @@ ifneq ($(CONVERT_TO),)
|
||||
-include $(CONVERTER)/pre_converter.mk
|
||||
|
||||
PLATFORM_KEY = $(shell echo $(CONVERTER) | cut -d "/" -f2)
|
||||
|
||||
# force setting as value can be from environment
|
||||
override TARGET := $(TARGET)_$(CONVERT_TO)
|
||||
TARGET := $(TARGET)_$(CONVERT_TO)
|
||||
|
||||
# Configure any defaults
|
||||
OPT_DEFS += -DCONVERT_TO_$(shell echo $(CONVERT_TO) | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
5
builddefs/docsgen/.gitignore
vendored
5
builddefs/docsgen/.gitignore
vendored
@@ -1,5 +0,0 @@
|
||||
node_modules
|
||||
.vitepress/cache
|
||||
.vitepress/.temp
|
||||
.vitepress/dist
|
||||
docs
|
||||
@@ -1,51 +0,0 @@
|
||||
import { defineConfig } from "vitepress";
|
||||
import { tabsMarkdownPlugin } from "vitepress-plugin-tabs";
|
||||
import sidebar from "../../../docs/_sidebar.json";
|
||||
|
||||
// https://vitepress.dev/reference/site-config
|
||||
export default defineConfig(({ mode }) => {
|
||||
const prod = mode === "production";
|
||||
return {
|
||||
title: "QMK Firmware",
|
||||
description: "Documentation for QMK Firmware",
|
||||
|
||||
srcDir: prod ? "docs" : "../../docs",
|
||||
outDir: "../../.build/docs",
|
||||
cleanUrls: true,
|
||||
|
||||
markdown: {
|
||||
config(md) {
|
||||
md.use(tabsMarkdownPlugin);
|
||||
},
|
||||
},
|
||||
|
||||
vite: {
|
||||
resolve: {
|
||||
preserveSymlinks: true,
|
||||
},
|
||||
},
|
||||
|
||||
themeConfig: {
|
||||
// https://vitepress.dev/reference/default-theme-config
|
||||
logo: {
|
||||
light: "/qmk-logo-light.svg",
|
||||
dark: "/qmk-logo-dark.svg",
|
||||
},
|
||||
title: 'QMK Firmware',
|
||||
|
||||
nav: [{ text: "Home", link: "./" }],
|
||||
|
||||
search: {
|
||||
provider: "local",
|
||||
},
|
||||
|
||||
sidebar: sidebar,
|
||||
|
||||
socialLinks: [
|
||||
{ icon: { svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" width="50px" height="50px"><path d="M 29 3 C 28.0625 3 27.164063 3.382813 26.5 4 C 25.835938 4.617188 25.363281 5.433594 25 6.40625 C 24.355469 8.140625 24.085938 10.394531 24.03125 13.03125 C 19.234375 13.179688 14.820313 14.421875 11.28125 16.46875 C 10.214844 15.46875 8.855469 14.96875 7.5 14.96875 C 6.089844 14.96875 4.675781 15.511719 3.59375 16.59375 C 1.425781 18.761719 1.425781 22.238281 3.59375 24.40625 L 3.84375 24.65625 C 3.3125 26.035156 3 27.488281 3 29 C 3 33.527344 5.566406 37.585938 9.5625 40.4375 C 13.558594 43.289063 19.007813 45 25 45 C 30.992188 45 36.441406 43.289063 40.4375 40.4375 C 44.433594 37.585938 47 33.527344 47 29 C 47 27.488281 46.6875 26.035156 46.15625 24.65625 L 46.40625 24.40625 C 48.574219 22.238281 48.574219 18.761719 46.40625 16.59375 C 45.324219 15.511719 43.910156 14.96875 42.5 14.96875 C 41.144531 14.96875 39.785156 15.46875 38.71875 16.46875 C 35.195313 14.433594 30.800781 13.191406 26.03125 13.03125 C 26.09375 10.546875 26.363281 8.46875 26.875 7.09375 C 27.164063 6.316406 27.527344 5.757813 27.875 5.4375 C 28.222656 5.117188 28.539063 5 29 5 C 29.460938 5 29.683594 5.125 30.03125 5.40625 C 30.378906 5.6875 30.785156 6.148438 31.3125 6.6875 C 32.253906 7.652344 33.695313 8.714844 36.09375 8.9375 C 36.539063 11.238281 38.574219 13 41 13 C 43.75 13 46 10.75 46 8 C 46 5.25 43.75 3 41 3 C 38.605469 3 36.574219 4.710938 36.09375 6.96875 C 34.3125 6.796875 33.527344 6.109375 32.75 5.3125 C 32.300781 4.851563 31.886719 4.3125 31.3125 3.84375 C 30.738281 3.375 29.9375 3 29 3 Z M 41 5 C 42.667969 5 44 6.332031 44 8 C 44 9.667969 42.667969 11 41 11 C 39.332031 11 38 9.667969 38 8 C 38 6.332031 39.332031 5 41 5 Z M 25 15 C 30.609375 15 35.675781 16.613281 39.28125 19.1875 C 42.886719 21.761719 45 25.226563 45 29 C 45 32.773438 42.886719 36.238281 39.28125 38.8125 C 35.675781 41.386719 30.609375 43 25 43 C 19.390625 43 14.324219 41.386719 10.71875 38.8125 C 7.113281 36.238281 5 32.773438 5 29 C 5 25.226563 7.113281 21.761719 10.71875 19.1875 C 14.324219 16.613281 19.390625 15 25 15 Z M 7.5 16.9375 C 8.203125 16.9375 8.914063 17.148438 9.53125 17.59375 C 7.527344 19.03125 5.886719 20.769531 4.75 22.71875 C 3.582031 21.296875 3.660156 19.339844 5 18 C 5.714844 17.285156 6.609375 16.9375 7.5 16.9375 Z M 42.5 16.9375 C 43.390625 16.9375 44.285156 17.285156 45 18 C 46.339844 19.339844 46.417969 21.296875 45.25 22.71875 C 44.113281 20.769531 42.472656 19.03125 40.46875 17.59375 C 41.085938 17.148438 41.796875 16.9375 42.5 16.9375 Z M 17 22 C 14.800781 22 13 23.800781 13 26 C 13 28.199219 14.800781 30 17 30 C 19.199219 30 21 28.199219 21 26 C 21 23.800781 19.199219 22 17 22 Z M 33 22 C 30.800781 22 29 23.800781 29 26 C 29 28.199219 30.800781 30 33 30 C 35.199219 30 37 28.199219 37 26 C 37 23.800781 35.199219 22 33 22 Z M 17 24 C 18.117188 24 19 24.882813 19 26 C 19 27.117188 18.117188 28 17 28 C 15.882813 28 15 27.117188 15 26 C 15 24.882813 15.882813 24 17 24 Z M 33 24 C 34.117188 24 35 24.882813 35 26 C 35 27.117188 34.117188 28 33 28 C 31.882813 28 31 27.117188 31 26 C 31 24.882813 31.882813 24 33 24 Z M 34.15625 33.84375 C 34.101563 33.851563 34.050781 33.859375 34 33.875 C 33.683594 33.9375 33.417969 34.144531 33.28125 34.4375 C 33.28125 34.4375 32.757813 35.164063 31.4375 36 C 30.117188 36.835938 28.058594 37.6875 25 37.6875 C 21.941406 37.6875 19.882813 36.835938 18.5625 36 C 17.242188 35.164063 16.71875 34.4375 16.71875 34.4375 C 16.492188 34.082031 16.066406 33.90625 15.65625 34 C 15.332031 34.082031 15.070313 34.316406 14.957031 34.632813 C 14.84375 34.945313 14.894531 35.292969 15.09375 35.5625 C 15.09375 35.5625 15.863281 36.671875 17.46875 37.6875 C 19.074219 38.703125 21.558594 39.6875 25 39.6875 C 28.441406 39.6875 30.925781 38.703125 32.53125 37.6875 C 34.136719 36.671875 34.90625 35.5625 34.90625 35.5625 C 35.207031 35.273438 35.296875 34.824219 35.128906 34.441406 C 34.960938 34.058594 34.574219 33.820313 34.15625 33.84375 Z"/></svg>' }, link: "https://reddit.com/r/olkb" },
|
||||
{ icon: "discord", link: "https://discord.gg/qmk" },
|
||||
{ icon: "github", link: "https://github.com/qmk/qmk_firmware" },
|
||||
],
|
||||
}
|
||||
};
|
||||
});
|
||||
@@ -1,29 +0,0 @@
|
||||
<script setup>
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { useRouter } from 'vitepress'
|
||||
import { onBeforeMount } from 'vue';
|
||||
import aliases from "../../../../docs/_aliases.json";
|
||||
|
||||
const router = useRouter()
|
||||
onBeforeMount(async () => {
|
||||
// Convert from docsify-style to vitepress-style URLs
|
||||
let newUrl = window.location.href.replace(/\/#\//, '/').replace(/\?id=/, '#');
|
||||
|
||||
// Convert any aliases
|
||||
let testUrl = new URL(newUrl);
|
||||
while (testUrl.pathname in aliases) {
|
||||
testUrl.pathname = aliases[testUrl.pathname];
|
||||
}
|
||||
newUrl = testUrl.toString();
|
||||
|
||||
// Redirect if required
|
||||
if (newUrl != window.location.href) {
|
||||
window.history.replaceState({}, '', newUrl);
|
||||
await router.go(newUrl);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DefaultTheme.Layout/>
|
||||
</template>
|
||||
@@ -1,19 +0,0 @@
|
||||
/* Override <kbd> as vitepress doesn't put them with borders */
|
||||
kbd {
|
||||
border: 1px solid var(--vp-c-text-1);
|
||||
border-radius: 5px;
|
||||
margin: 0.2em;
|
||||
padding: 0.2em;
|
||||
}
|
||||
|
||||
:root {
|
||||
--vp-nav-logo-height: 32px;
|
||||
|
||||
--vp-layout-max-width: calc(98% + 64px);
|
||||
|
||||
--vp-sidebar-width: 300px;
|
||||
}
|
||||
|
||||
.VPDoc.has-aside .content-container {
|
||||
max-width: unset !important;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import type { Theme } from 'vitepress'
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client'
|
||||
import QMKLayout from './QMKLayout.vue'
|
||||
import './custom.css'
|
||||
|
||||
export default {
|
||||
extends: DefaultTheme,
|
||||
Layout: QMKLayout,
|
||||
enhanceApp({ app }) {
|
||||
enhanceAppWithTabs(app)
|
||||
}
|
||||
} satisfies Theme
|
||||
@@ -1,6 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||
yarn install
|
||||
[[ -e docs ]] || ln -sf ../../docs docs
|
||||
DEBUG='vitepress:*,vite:*' yarn run docs:build
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"license": "GPL-2.0-or-later",
|
||||
"devDependencies": {
|
||||
"vite": "^5.2.10",
|
||||
"vitepress": "^1.1.0",
|
||||
"vitepress-plugin-tabs": "^0.5.0",
|
||||
"vue": "^3.4.24"
|
||||
},
|
||||
"scripts": {
|
||||
"docs:dev": "vitepress dev --host 0.0.0.0",
|
||||
"docs:build": "vitepress build",
|
||||
"docs:preview": "vitepress preview --host 0.0.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||
yarn install
|
||||
DEBUG='vitepress:*,vite:*' yarn run docs:dev
|
||||
@@ -1,797 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@algolia/autocomplete-core@1.9.3":
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz#1d56482a768c33aae0868c8533049e02e8961be7"
|
||||
integrity sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-plugin-algolia-insights" "1.9.3"
|
||||
"@algolia/autocomplete-shared" "1.9.3"
|
||||
|
||||
"@algolia/autocomplete-plugin-algolia-insights@1.9.3":
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz#9b7f8641052c8ead6d66c1623d444cbe19dde587"
|
||||
integrity sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-shared" "1.9.3"
|
||||
|
||||
"@algolia/autocomplete-preset-algolia@1.9.3":
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz#64cca4a4304cfcad2cf730e83067e0c1b2f485da"
|
||||
integrity sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-shared" "1.9.3"
|
||||
|
||||
"@algolia/autocomplete-shared@1.9.3":
|
||||
version "1.9.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz#2e22e830d36f0a9cf2c0ccd3c7f6d59435b77dfa"
|
||||
integrity sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==
|
||||
|
||||
"@algolia/cache-browser-local-storage@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.3.tgz#0cc26b96085e1115dac5fcb9d826651ba57faabc"
|
||||
integrity sha512-vRHXYCpPlTDE7i6UOy2xE03zHF2C8MEFjPN2v7fRbqVpcOvAUQK81x3Kc21xyb5aSIpYCjWCZbYZuz8Glyzyyg==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.23.3"
|
||||
|
||||
"@algolia/cache-common@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-common/-/cache-common-4.23.3.tgz#3bec79092d512a96c9bfbdeec7cff4ad36367166"
|
||||
integrity sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==
|
||||
|
||||
"@algolia/cache-in-memory@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/cache-in-memory/-/cache-in-memory-4.23.3.tgz#3945f87cd21ffa2bec23890c85305b6b11192423"
|
||||
integrity sha512-yvpbuUXg/+0rbcagxNT7un0eo3czx2Uf0y4eiR4z4SD7SiptwYTpbuS0IHxcLHG3lq22ukx1T6Kjtk/rT+mqNg==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.23.3"
|
||||
|
||||
"@algolia/client-account@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-account/-/client-account-4.23.3.tgz#8751bbf636e6741c95e7c778488dee3ee430ac6f"
|
||||
integrity sha512-hpa6S5d7iQmretHHF40QGq6hz0anWEHGlULcTIT9tbUssWUriN9AUXIFQ8Ei4w9azD0hc1rUok9/DeQQobhQMA==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/client-search" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/client-analytics@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-analytics/-/client-analytics-4.23.3.tgz#f88710885278fe6fb6964384af59004a5a6f161d"
|
||||
integrity sha512-LBsEARGS9cj8VkTAVEZphjxTjMVCci+zIIiRhpFun9jGDUlS1XmhCW7CTrnaWeIuCQS/2iPyRqSy1nXPjcBLRA==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/client-search" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/client-common@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-common/-/client-common-4.23.3.tgz#891116aa0db75055a7ecc107649f7f0965774704"
|
||||
integrity sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/client-personalization@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-personalization/-/client-personalization-4.23.3.tgz#35fa8e5699b0295fbc400a8eb211dc711e5909db"
|
||||
integrity sha512-3E3yF3Ocr1tB/xOZiuC3doHQBQ2zu2MPTYZ0d4lpfWads2WTKG7ZzmGnsHmm63RflvDeLK/UVx7j2b3QuwKQ2g==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/client-search@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/client-search/-/client-search-4.23.3.tgz#a3486e6af13a231ec4ab43a915a1f318787b937f"
|
||||
integrity sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==
|
||||
dependencies:
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/logger-common@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/logger-common/-/logger-common-4.23.3.tgz#35c6d833cbf41e853a4f36ba37c6e5864920bfe9"
|
||||
integrity sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==
|
||||
|
||||
"@algolia/logger-console@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/logger-console/-/logger-console-4.23.3.tgz#30f916781826c4db5f51fcd9a8a264a06e136985"
|
||||
integrity sha512-8xoiseoWDKuCVnWP8jHthgaeobDLolh00KJAdMe9XPrWPuf1by732jSpgy2BlsLTaT9m32pHI8CRfrOqQzHv3A==
|
||||
dependencies:
|
||||
"@algolia/logger-common" "4.23.3"
|
||||
|
||||
"@algolia/recommend@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/recommend/-/recommend-4.23.3.tgz#53d4f194d22d9c72dc05f3f7514c5878f87c5890"
|
||||
integrity sha512-9fK4nXZF0bFkdcLBRDexsnGzVmu4TSYZqxdpgBW2tEyfuSSY54D4qSRkLmNkrrz4YFvdh2GM1gA8vSsnZPR73w==
|
||||
dependencies:
|
||||
"@algolia/cache-browser-local-storage" "4.23.3"
|
||||
"@algolia/cache-common" "4.23.3"
|
||||
"@algolia/cache-in-memory" "4.23.3"
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/client-search" "4.23.3"
|
||||
"@algolia/logger-common" "4.23.3"
|
||||
"@algolia/logger-console" "4.23.3"
|
||||
"@algolia/requester-browser-xhr" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/requester-node-http" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
"@algolia/requester-browser-xhr@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.23.3.tgz#9e47e76f60d540acc8b27b4ebc7a80d1b41938b9"
|
||||
integrity sha512-jDWGIQ96BhXbmONAQsasIpTYWslyjkiGu0Quydjlowe+ciqySpiDUrJHERIRfELE5+wFc7hc1Q5hqjGoV7yghw==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
|
||||
"@algolia/requester-common@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-common/-/requester-common-4.23.3.tgz#7dbae896e41adfaaf1d1fa5f317f83a99afb04b3"
|
||||
integrity sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==
|
||||
|
||||
"@algolia/requester-node-http@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/requester-node-http/-/requester-node-http-4.23.3.tgz#c9f94a5cb96a15f48cea338ab6ef16bbd0ff989f"
|
||||
integrity sha512-zgu++8Uj03IWDEJM3fuNl34s746JnZOWn1Uz5taV1dFyJhVM/kTNw9Ik7YJWiUNHJQXcaD8IXD1eCb0nq/aByA==
|
||||
dependencies:
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
|
||||
"@algolia/transporter@4.23.3":
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/@algolia/transporter/-/transporter-4.23.3.tgz#545b045b67db3850ddf0bbecbc6c84ff1f3398b7"
|
||||
integrity sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==
|
||||
dependencies:
|
||||
"@algolia/cache-common" "4.23.3"
|
||||
"@algolia/logger-common" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
|
||||
"@babel/parser@^7.24.4":
|
||||
version "7.24.4"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.4.tgz#234487a110d89ad5a3ed4a8a566c36b9453e8c88"
|
||||
integrity sha512-zTvEBcghmeBma9QIGunWevvBAp4/Qu9Bdq+2k0Ot4fVMD6v3dsC9WOcRSKk7tRRyBM/53yKMJko9xOatGQAwSg==
|
||||
|
||||
"@docsearch/css@3.6.0", "@docsearch/css@^3.6.0":
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/css/-/css-3.6.0.tgz#0e9f56f704b3a34d044d15fd9962ebc1536ba4fb"
|
||||
integrity sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==
|
||||
|
||||
"@docsearch/js@^3.6.0":
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/js/-/js-3.6.0.tgz#f9e46943449b9092d874944f7a80bcc071004cfb"
|
||||
integrity sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==
|
||||
dependencies:
|
||||
"@docsearch/react" "3.6.0"
|
||||
preact "^10.0.0"
|
||||
|
||||
"@docsearch/react@3.6.0":
|
||||
version "3.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@docsearch/react/-/react-3.6.0.tgz#b4f25228ecb7fc473741aefac592121e86dd2958"
|
||||
integrity sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==
|
||||
dependencies:
|
||||
"@algolia/autocomplete-core" "1.9.3"
|
||||
"@algolia/autocomplete-preset-algolia" "1.9.3"
|
||||
"@docsearch/css" "3.6.0"
|
||||
algoliasearch "^4.19.1"
|
||||
|
||||
"@esbuild/aix-ppc64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz#a70f4ac11c6a1dfc18b8bbb13284155d933b9537"
|
||||
integrity sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==
|
||||
|
||||
"@esbuild/android-arm64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.20.2.tgz#db1c9202a5bc92ea04c7b6840f1bbe09ebf9e6b9"
|
||||
integrity sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==
|
||||
|
||||
"@esbuild/android-arm@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.20.2.tgz#3b488c49aee9d491c2c8f98a909b785870d6e995"
|
||||
integrity sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==
|
||||
|
||||
"@esbuild/android-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.20.2.tgz#3b1628029e5576249d2b2d766696e50768449f98"
|
||||
integrity sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==
|
||||
|
||||
"@esbuild/darwin-arm64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.20.2.tgz#6e8517a045ddd86ae30c6608c8475ebc0c4000bb"
|
||||
integrity sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==
|
||||
|
||||
"@esbuild/darwin-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.20.2.tgz#90ed098e1f9dd8a9381695b207e1cff45540a0d0"
|
||||
integrity sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==
|
||||
|
||||
"@esbuild/freebsd-arm64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.20.2.tgz#d71502d1ee89a1130327e890364666c760a2a911"
|
||||
integrity sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==
|
||||
|
||||
"@esbuild/freebsd-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.20.2.tgz#aa5ea58d9c1dd9af688b8b6f63ef0d3d60cea53c"
|
||||
integrity sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==
|
||||
|
||||
"@esbuild/linux-arm64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.20.2.tgz#055b63725df678379b0f6db9d0fa85463755b2e5"
|
||||
integrity sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==
|
||||
|
||||
"@esbuild/linux-arm@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.20.2.tgz#76b3b98cb1f87936fbc37f073efabad49dcd889c"
|
||||
integrity sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==
|
||||
|
||||
"@esbuild/linux-ia32@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.20.2.tgz#c0e5e787c285264e5dfc7a79f04b8b4eefdad7fa"
|
||||
integrity sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==
|
||||
|
||||
"@esbuild/linux-loong64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.20.2.tgz#a6184e62bd7cdc63e0c0448b83801001653219c5"
|
||||
integrity sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==
|
||||
|
||||
"@esbuild/linux-mips64el@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.20.2.tgz#d08e39ce86f45ef8fc88549d29c62b8acf5649aa"
|
||||
integrity sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==
|
||||
|
||||
"@esbuild/linux-ppc64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.20.2.tgz#8d252f0b7756ffd6d1cbde5ea67ff8fd20437f20"
|
||||
integrity sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==
|
||||
|
||||
"@esbuild/linux-riscv64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.20.2.tgz#19f6dcdb14409dae607f66ca1181dd4e9db81300"
|
||||
integrity sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==
|
||||
|
||||
"@esbuild/linux-s390x@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.20.2.tgz#3c830c90f1a5d7dd1473d5595ea4ebb920988685"
|
||||
integrity sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==
|
||||
|
||||
"@esbuild/linux-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.20.2.tgz#86eca35203afc0d9de0694c64ec0ab0a378f6fff"
|
||||
integrity sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==
|
||||
|
||||
"@esbuild/netbsd-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.20.2.tgz#e771c8eb0e0f6e1877ffd4220036b98aed5915e6"
|
||||
integrity sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==
|
||||
|
||||
"@esbuild/openbsd-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.20.2.tgz#9a795ae4b4e37e674f0f4d716f3e226dd7c39baf"
|
||||
integrity sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==
|
||||
|
||||
"@esbuild/sunos-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.20.2.tgz#7df23b61a497b8ac189def6e25a95673caedb03f"
|
||||
integrity sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==
|
||||
|
||||
"@esbuild/win32-arm64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.20.2.tgz#f1ae5abf9ca052ae11c1bc806fb4c0f519bacf90"
|
||||
integrity sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==
|
||||
|
||||
"@esbuild/win32-ia32@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.20.2.tgz#241fe62c34d8e8461cd708277813e1d0ba55ce23"
|
||||
integrity sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==
|
||||
|
||||
"@esbuild/win32-x64@0.20.2":
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.20.2.tgz#9c907b21e30a52db959ba4f80bb01a0cc403d5cc"
|
||||
integrity sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==
|
||||
|
||||
"@jridgewell/sourcemap-codec@^1.4.15":
|
||||
version "1.4.15"
|
||||
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32"
|
||||
integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==
|
||||
|
||||
"@rollup/rollup-android-arm-eabi@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.16.4.tgz#5e8930291f1e5ead7fb1171d53ba5c87718de062"
|
||||
integrity sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==
|
||||
|
||||
"@rollup/rollup-android-arm64@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.16.4.tgz#ffb84f1359c04ec8a022a97110e18a5600f5f638"
|
||||
integrity sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==
|
||||
|
||||
"@rollup/rollup-darwin-arm64@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.16.4.tgz#b2fcee8d4806a0b1b9185ac038cc428ddedce9f4"
|
||||
integrity sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==
|
||||
|
||||
"@rollup/rollup-darwin-x64@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.16.4.tgz#fcb25ccbaa3dd33a6490e9d1c64bab2e0e16b932"
|
||||
integrity sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==
|
||||
|
||||
"@rollup/rollup-linux-arm-gnueabihf@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.16.4.tgz#40d46bdfe667e5eca31bf40047460e326d2e26bb"
|
||||
integrity sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==
|
||||
|
||||
"@rollup/rollup-linux-arm-musleabihf@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.16.4.tgz#7741df2448c11c56588b50835dbfe91b1a10b375"
|
||||
integrity sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==
|
||||
|
||||
"@rollup/rollup-linux-arm64-gnu@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.16.4.tgz#0a23b02d2933e4c4872ad18d879890b6a4a295df"
|
||||
integrity sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==
|
||||
|
||||
"@rollup/rollup-linux-arm64-musl@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.16.4.tgz#e37ef259358aa886cc07d782220a4fb83c1e6970"
|
||||
integrity sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==
|
||||
|
||||
"@rollup/rollup-linux-powerpc64le-gnu@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.16.4.tgz#8c69218b6de05ee2ba211664a2d2ac1e54e43f94"
|
||||
integrity sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==
|
||||
|
||||
"@rollup/rollup-linux-riscv64-gnu@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.16.4.tgz#d32727dab8f538d9a4a7c03bcf58c436aecd0139"
|
||||
integrity sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==
|
||||
|
||||
"@rollup/rollup-linux-s390x-gnu@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.16.4.tgz#d46097246a187d99fc9451fe8393b7155b47c5ec"
|
||||
integrity sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==
|
||||
|
||||
"@rollup/rollup-linux-x64-gnu@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.16.4.tgz#6356c5a03a4afb1c3057490fc51b4764e109dbc7"
|
||||
integrity sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==
|
||||
|
||||
"@rollup/rollup-linux-x64-musl@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.16.4.tgz#03a5831a9c0d05877b94653b5ddd3020d3c6fb06"
|
||||
integrity sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==
|
||||
|
||||
"@rollup/rollup-win32-arm64-msvc@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.16.4.tgz#6cc0db57750376b9303bdb6f5482af8974fcae35"
|
||||
integrity sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==
|
||||
|
||||
"@rollup/rollup-win32-ia32-msvc@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.16.4.tgz#aea0b7e492bd9ed46971cb80bc34f1eb14e07789"
|
||||
integrity sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==
|
||||
|
||||
"@rollup/rollup-win32-x64-msvc@4.16.4":
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.16.4.tgz#c09ad9a132ccb5a67c4f211d909323ab1294f95f"
|
||||
integrity sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==
|
||||
|
||||
"@shikijs/core@1.3.0", "@shikijs/core@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.3.0.tgz#5b93b51ddb8def1e3a1543107f9b5b0540f716f6"
|
||||
integrity sha512-7fedsBfuILDTBmrYZNFI8B6ATTxhQAasUHllHmjvSZPnoq4bULWoTpHwmuQvZ8Aq03/tAa2IGo6RXqWtHdWaCA==
|
||||
|
||||
"@shikijs/transformers@^1.3.0":
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@shikijs/transformers/-/transformers-1.3.0.tgz#b03c5733ef61e25e4f53666bf11889f8876f34e9"
|
||||
integrity sha512-3mlpg2I9CjhjE96dEWQOGeCWoPcyTov3s4aAsHmgvnTHa8MBknEnCQy8/xivJPSpD+olqOqIEoHnLfbNJK29AA==
|
||||
dependencies:
|
||||
shiki "1.3.0"
|
||||
|
||||
"@types/estree@1.0.5":
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.5.tgz#a6ce3e556e00fd9895dd872dd172ad0d4bd687f4"
|
||||
integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==
|
||||
|
||||
"@types/linkify-it@*":
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/linkify-it/-/linkify-it-3.0.5.tgz#1e78a3ac2428e6d7e6c05c1665c242023a4601d8"
|
||||
integrity sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==
|
||||
|
||||
"@types/markdown-it@^14.0.1":
|
||||
version "14.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/markdown-it/-/markdown-it-14.0.1.tgz#3d3fdf9dba83b69edececc070d39ec72b84270a7"
|
||||
integrity sha512-6WfOG3jXR78DW8L5cTYCVVGAsIFZskRHCDo5tbqa+qtKVt4oDRVH7hyIWu1SpDQJlmIoEivNQZ5h+AGAOrgOtQ==
|
||||
dependencies:
|
||||
"@types/linkify-it" "*"
|
||||
"@types/mdurl" "*"
|
||||
|
||||
"@types/mdurl@*":
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/@types/mdurl/-/mdurl-1.0.5.tgz#3e0d2db570e9fb6ccb2dc8fde0be1d79ac810d39"
|
||||
integrity sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==
|
||||
|
||||
"@types/web-bluetooth@^0.0.20":
|
||||
version "0.0.20"
|
||||
resolved "https://registry.yarnpkg.com/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz#f066abfcd1cbe66267cdbbf0de010d8a41b41597"
|
||||
integrity sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==
|
||||
|
||||
"@vitejs/plugin-vue@^5.0.4":
|
||||
version "5.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-vue/-/plugin-vue-5.0.4.tgz#508d6a0f2440f86945835d903fcc0d95d1bb8a37"
|
||||
integrity sha512-WS3hevEszI6CEVEx28F8RjTX97k3KsrcY6kvTg7+Whm5y3oYvcqzVeGCU3hxSAn4uY2CLCkeokkGKpoctccilQ==
|
||||
|
||||
"@vue/compiler-core@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-core/-/compiler-core-3.4.24.tgz#6b4a5ffddcd874a692f2acfa68981201bcd7096b"
|
||||
integrity sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.24.4"
|
||||
"@vue/shared" "3.4.24"
|
||||
entities "^4.5.0"
|
||||
estree-walker "^2.0.2"
|
||||
source-map-js "^1.2.0"
|
||||
|
||||
"@vue/compiler-dom@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-dom/-/compiler-dom-3.4.24.tgz#b7335a49f095b6d35e48b6f7be8da513c1fa52b8"
|
||||
integrity sha512-4XgABML/4cNndVsQndG6BbGN7+EoisDwi3oXNovqL/4jdNhwvP8/rfRMTb6FxkxIxUUtg6AI1/qZvwfSjxJiWA==
|
||||
dependencies:
|
||||
"@vue/compiler-core" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
|
||||
"@vue/compiler-sfc@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-sfc/-/compiler-sfc-3.4.24.tgz#2872e353147ce2a145169a33ddd4d68dc95c3a18"
|
||||
integrity sha512-nRAlJUK02FTWfA2nuvNBAqsDZuERGFgxZ8sGH62XgFSvMxO2URblzulExsmj4gFZ8e+VAyDooU9oAoXfEDNxTA==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.24.4"
|
||||
"@vue/compiler-core" "3.4.24"
|
||||
"@vue/compiler-dom" "3.4.24"
|
||||
"@vue/compiler-ssr" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
estree-walker "^2.0.2"
|
||||
magic-string "^0.30.10"
|
||||
postcss "^8.4.38"
|
||||
source-map-js "^1.2.0"
|
||||
|
||||
"@vue/compiler-ssr@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/compiler-ssr/-/compiler-ssr-3.4.24.tgz#0d11fe54dabd17cbd6393a16bf7f785da1cfab46"
|
||||
integrity sha512-ZsAtr4fhaUFnVcDqwW3bYCSDwq+9Gk69q2r/7dAHDrOMw41kylaMgOP4zRnn6GIEJkQznKgrMOGPMFnLB52RbQ==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
|
||||
"@vue/devtools-api@^7.0.27":
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-api/-/devtools-api-7.1.2.tgz#8808b0f008842b756bf1e9c30788837abb62ab3a"
|
||||
integrity sha512-AKd49cN3BdRgttmX5Aw8op7sx6jmaPwaILcDjaa05UKc1yIHDYST7P8yGZs6zd2pKFETAQz40gmyG7+b57slsQ==
|
||||
dependencies:
|
||||
"@vue/devtools-kit" "^7.1.2"
|
||||
|
||||
"@vue/devtools-kit@^7.1.2":
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-kit/-/devtools-kit-7.1.2.tgz#dfb7306edf895dadc556dd5f0c516809c2f94826"
|
||||
integrity sha512-UTrcUSOhlI9eXqbPMHUWwA6NQiiPT3onzXsVk2JHGR8ZFFSkzsWTTpHyVA1woG8zvgu2HNV/wigW2k87p858zw==
|
||||
dependencies:
|
||||
"@vue/devtools-shared" "^7.1.2"
|
||||
hookable "^5.5.3"
|
||||
mitt "^3.0.1"
|
||||
perfect-debounce "^1.0.0"
|
||||
speakingurl "^14.0.1"
|
||||
|
||||
"@vue/devtools-shared@^7.1.2":
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@vue/devtools-shared/-/devtools-shared-7.1.2.tgz#7b1c1de10bab4756f271c377370a62833b4ee94b"
|
||||
integrity sha512-r9cUf93VMhKSsxF2/cBbf6Lm1nRBx+r1pRuji5CiAf3JIPYPOjeEqJ13OuwP1fauYh1tyBFcCxt3eJPvHT59gg==
|
||||
dependencies:
|
||||
rfdc "^1.3.1"
|
||||
|
||||
"@vue/reactivity@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/reactivity/-/reactivity-3.4.24.tgz#150584316ca2acc4ed19a24f9f29863c3a17a7b2"
|
||||
integrity sha512-nup3fSYg4i4LtNvu9slF/HF/0dkMQYfepUdORBcMSsankzRPzE7ypAFurpwyRBfU1i7Dn1kcwpYsE1wETSh91g==
|
||||
dependencies:
|
||||
"@vue/shared" "3.4.24"
|
||||
|
||||
"@vue/runtime-core@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-core/-/runtime-core-3.4.24.tgz#066c544dc59a07a96c12874a57b750c239124874"
|
||||
integrity sha512-c7iMfj6cJMeAG3s5yOn9Rc5D9e2/wIuaozmGf/ICGCY3KV5H7mbTVdvEkd4ZshTq7RUZqj2k7LMJWVx+EBiY1g==
|
||||
dependencies:
|
||||
"@vue/reactivity" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
|
||||
"@vue/runtime-dom@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/runtime-dom/-/runtime-dom-3.4.24.tgz#4f8e7acbe1e8ffa7c55af1366e4438729ebe9b20"
|
||||
integrity sha512-uXKzuh/Emfad2Y7Qm0ABsLZZV6H3mAJ5ZVqmAOlrNQRf+T5mxpPGZBfec1hkP41t6h6FwF6RSGCs/gd8WbuySQ==
|
||||
dependencies:
|
||||
"@vue/runtime-core" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
csstype "^3.1.3"
|
||||
|
||||
"@vue/server-renderer@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/server-renderer/-/server-renderer-3.4.24.tgz#80dd546f8d6a9f5c4f8b68083fe9cc2d62299332"
|
||||
integrity sha512-H+DLK4sQF6sRgzKyofmlEVBIV/9KrQU6HIV7nt6yIwSGGKvSwlV8pqJlebUKLpbXaNHugdSfAbP6YmXF69lxow==
|
||||
dependencies:
|
||||
"@vue/compiler-ssr" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
|
||||
"@vue/shared@3.4.24":
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/@vue/shared/-/shared-3.4.24.tgz#278ac71f492b392b9b17fe8fc7d324db1a8842db"
|
||||
integrity sha512-BW4tajrJBM9AGAknnyEw5tO2xTmnqgup0VTnDAMcxYmqOX0RG0b9aSUGAbEKolD91tdwpA6oCwbltoJoNzpItw==
|
||||
|
||||
"@vueuse/core@10.9.0", "@vueuse/core@^10.9.0":
|
||||
version "10.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/core/-/core-10.9.0.tgz#7d779a95cf0189de176fee63cee4ba44b3c85d64"
|
||||
integrity sha512-/1vjTol8SXnx6xewDEKfS0Ra//ncg4Hb0DaZiwKf7drgfMsKFExQ+FnnENcN6efPen+1kIzhLQoGSy0eDUVOMg==
|
||||
dependencies:
|
||||
"@types/web-bluetooth" "^0.0.20"
|
||||
"@vueuse/metadata" "10.9.0"
|
||||
"@vueuse/shared" "10.9.0"
|
||||
vue-demi ">=0.14.7"
|
||||
|
||||
"@vueuse/integrations@^10.9.0":
|
||||
version "10.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/integrations/-/integrations-10.9.0.tgz#2b1a9556215ad3c1f96d39cbfbef102cf6e0ec05"
|
||||
integrity sha512-acK+A01AYdWSvL4BZmCoJAcyHJ6EqhmkQEXbQLwev1MY7NBnS+hcEMx/BzVoR9zKI+UqEPMD9u6PsyAuiTRT4Q==
|
||||
dependencies:
|
||||
"@vueuse/core" "10.9.0"
|
||||
"@vueuse/shared" "10.9.0"
|
||||
vue-demi ">=0.14.7"
|
||||
|
||||
"@vueuse/metadata@10.9.0":
|
||||
version "10.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/metadata/-/metadata-10.9.0.tgz#769a1a9db65daac15cf98084cbf7819ed3758620"
|
||||
integrity sha512-iddNbg3yZM0X7qFY2sAotomgdHK7YJ6sKUvQqbvwnf7TmaVPxS4EJydcNsVejNdS8iWCtDk+fYXr7E32nyTnGA==
|
||||
|
||||
"@vueuse/shared@10.9.0":
|
||||
version "10.9.0"
|
||||
resolved "https://registry.yarnpkg.com/@vueuse/shared/-/shared-10.9.0.tgz#13af2a348de15d07b7be2fd0c7fc9853a69d8fe0"
|
||||
integrity sha512-Uud2IWncmAfJvRaFYzv5OHDli+FbOzxiVEQdLCKQKLyhz94PIyFC3CHcH7EDMwIn8NPtD06+PNbC/PiO0LGLtw==
|
||||
dependencies:
|
||||
vue-demi ">=0.14.7"
|
||||
|
||||
algoliasearch@^4.19.1:
|
||||
version "4.23.3"
|
||||
resolved "https://registry.yarnpkg.com/algoliasearch/-/algoliasearch-4.23.3.tgz#e09011d0a3b0651444916a3e6bbcba064ec44b60"
|
||||
integrity sha512-Le/3YgNvjW9zxIQMRhUHuhiUjAlKY/zsdZpfq4dlLqg6mEm0nL6yk+7f2hDOtLpxsgE4jSzDmvHL7nXdBp5feg==
|
||||
dependencies:
|
||||
"@algolia/cache-browser-local-storage" "4.23.3"
|
||||
"@algolia/cache-common" "4.23.3"
|
||||
"@algolia/cache-in-memory" "4.23.3"
|
||||
"@algolia/client-account" "4.23.3"
|
||||
"@algolia/client-analytics" "4.23.3"
|
||||
"@algolia/client-common" "4.23.3"
|
||||
"@algolia/client-personalization" "4.23.3"
|
||||
"@algolia/client-search" "4.23.3"
|
||||
"@algolia/logger-common" "4.23.3"
|
||||
"@algolia/logger-console" "4.23.3"
|
||||
"@algolia/recommend" "4.23.3"
|
||||
"@algolia/requester-browser-xhr" "4.23.3"
|
||||
"@algolia/requester-common" "4.23.3"
|
||||
"@algolia/requester-node-http" "4.23.3"
|
||||
"@algolia/transporter" "4.23.3"
|
||||
|
||||
csstype@^3.1.3:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.1.3.tgz#d80ff294d114fb0e6ac500fbf85b60137d7eff81"
|
||||
integrity sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==
|
||||
|
||||
entities@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48"
|
||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||
|
||||
esbuild@^0.20.1:
|
||||
version "0.20.2"
|
||||
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.20.2.tgz#9d6b2386561766ee6b5a55196c6d766d28c87ea1"
|
||||
integrity sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==
|
||||
optionalDependencies:
|
||||
"@esbuild/aix-ppc64" "0.20.2"
|
||||
"@esbuild/android-arm" "0.20.2"
|
||||
"@esbuild/android-arm64" "0.20.2"
|
||||
"@esbuild/android-x64" "0.20.2"
|
||||
"@esbuild/darwin-arm64" "0.20.2"
|
||||
"@esbuild/darwin-x64" "0.20.2"
|
||||
"@esbuild/freebsd-arm64" "0.20.2"
|
||||
"@esbuild/freebsd-x64" "0.20.2"
|
||||
"@esbuild/linux-arm" "0.20.2"
|
||||
"@esbuild/linux-arm64" "0.20.2"
|
||||
"@esbuild/linux-ia32" "0.20.2"
|
||||
"@esbuild/linux-loong64" "0.20.2"
|
||||
"@esbuild/linux-mips64el" "0.20.2"
|
||||
"@esbuild/linux-ppc64" "0.20.2"
|
||||
"@esbuild/linux-riscv64" "0.20.2"
|
||||
"@esbuild/linux-s390x" "0.20.2"
|
||||
"@esbuild/linux-x64" "0.20.2"
|
||||
"@esbuild/netbsd-x64" "0.20.2"
|
||||
"@esbuild/openbsd-x64" "0.20.2"
|
||||
"@esbuild/sunos-x64" "0.20.2"
|
||||
"@esbuild/win32-arm64" "0.20.2"
|
||||
"@esbuild/win32-ia32" "0.20.2"
|
||||
"@esbuild/win32-x64" "0.20.2"
|
||||
|
||||
estree-walker@^2.0.2:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac"
|
||||
integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==
|
||||
|
||||
focus-trap@^7.5.4:
|
||||
version "7.5.4"
|
||||
resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-7.5.4.tgz#6c4e342fe1dae6add9c2aa332a6e7a0bbd495ba2"
|
||||
integrity sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==
|
||||
dependencies:
|
||||
tabbable "^6.2.0"
|
||||
|
||||
fsevents@~2.3.2, fsevents@~2.3.3:
|
||||
version "2.3.3"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6"
|
||||
integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==
|
||||
|
||||
hookable@^5.5.3:
|
||||
version "5.5.3"
|
||||
resolved "https://registry.yarnpkg.com/hookable/-/hookable-5.5.3.tgz#6cfc358984a1ef991e2518cb9ed4a778bbd3215d"
|
||||
integrity sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==
|
||||
|
||||
magic-string@^0.30.10:
|
||||
version "0.30.10"
|
||||
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.10.tgz#123d9c41a0cb5640c892b041d4cfb3bd0aa4b39e"
|
||||
integrity sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
||||
mark.js@8.11.1:
|
||||
version "8.11.1"
|
||||
resolved "https://registry.yarnpkg.com/mark.js/-/mark.js-8.11.1.tgz#180f1f9ebef8b0e638e4166ad52db879beb2ffc5"
|
||||
integrity sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==
|
||||
|
||||
minisearch@^6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/minisearch/-/minisearch-6.3.0.tgz#985a2f1ca3c73c2d65af94f0616bfe57164b0b6b"
|
||||
integrity sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==
|
||||
|
||||
mitt@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mitt/-/mitt-3.0.1.tgz#ea36cf0cc30403601ae074c8f77b7092cdab36d1"
|
||||
integrity sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==
|
||||
|
||||
nanoid@^3.3.7:
|
||||
version "3.3.7"
|
||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.7.tgz#d0c301a691bc8d54efa0a2226ccf3fe2fd656bd8"
|
||||
integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==
|
||||
|
||||
perfect-debounce@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-1.0.0.tgz#9c2e8bc30b169cc984a58b7d5b28049839591d2a"
|
||||
integrity sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
|
||||
|
||||
postcss@^8.4.38:
|
||||
version "8.4.38"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.38.tgz#b387d533baf2054288e337066d81c6bee9db9e0e"
|
||||
integrity sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==
|
||||
dependencies:
|
||||
nanoid "^3.3.7"
|
||||
picocolors "^1.0.0"
|
||||
source-map-js "^1.2.0"
|
||||
|
||||
preact@^10.0.0:
|
||||
version "10.20.2"
|
||||
resolved "https://registry.yarnpkg.com/preact/-/preact-10.20.2.tgz#0b343299a8c020562311cc25db93b3d832ec5e71"
|
||||
integrity sha512-S1d1ernz3KQ+Y2awUxKakpfOg2CEmJmwOP+6igPx6dgr6pgDvenqYviyokWso2rhHvGtTlWWnJDa7RaPbQerTg==
|
||||
|
||||
rfdc@^1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f"
|
||||
integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==
|
||||
|
||||
rollup@^4.13.0:
|
||||
version "4.16.4"
|
||||
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.16.4.tgz#fe328eb41293f20c9593a095ec23bdc4b5d93317"
|
||||
integrity sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==
|
||||
dependencies:
|
||||
"@types/estree" "1.0.5"
|
||||
optionalDependencies:
|
||||
"@rollup/rollup-android-arm-eabi" "4.16.4"
|
||||
"@rollup/rollup-android-arm64" "4.16.4"
|
||||
"@rollup/rollup-darwin-arm64" "4.16.4"
|
||||
"@rollup/rollup-darwin-x64" "4.16.4"
|
||||
"@rollup/rollup-linux-arm-gnueabihf" "4.16.4"
|
||||
"@rollup/rollup-linux-arm-musleabihf" "4.16.4"
|
||||
"@rollup/rollup-linux-arm64-gnu" "4.16.4"
|
||||
"@rollup/rollup-linux-arm64-musl" "4.16.4"
|
||||
"@rollup/rollup-linux-powerpc64le-gnu" "4.16.4"
|
||||
"@rollup/rollup-linux-riscv64-gnu" "4.16.4"
|
||||
"@rollup/rollup-linux-s390x-gnu" "4.16.4"
|
||||
"@rollup/rollup-linux-x64-gnu" "4.16.4"
|
||||
"@rollup/rollup-linux-x64-musl" "4.16.4"
|
||||
"@rollup/rollup-win32-arm64-msvc" "4.16.4"
|
||||
"@rollup/rollup-win32-ia32-msvc" "4.16.4"
|
||||
"@rollup/rollup-win32-x64-msvc" "4.16.4"
|
||||
fsevents "~2.3.2"
|
||||
|
||||
shiki@1.3.0, shiki@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.3.0.tgz#3eda35cb49f6f0a98525e9da48fc072e6c655a3f"
|
||||
integrity sha512-9aNdQy/etMXctnPzsje1h1XIGm9YfRcSksKOGqZWXA/qP9G18/8fpz5Bjpma8bOgz3tqIpjERAd6/lLjFyzoww==
|
||||
dependencies:
|
||||
"@shikijs/core" "1.3.0"
|
||||
|
||||
source-map-js@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.2.0.tgz#16b809c162517b5b8c3e7dcd315a2a5c2612b2af"
|
||||
integrity sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==
|
||||
|
||||
speakingurl@^14.0.1:
|
||||
version "14.0.1"
|
||||
resolved "https://registry.yarnpkg.com/speakingurl/-/speakingurl-14.0.1.tgz#f37ec8ddc4ab98e9600c1c9ec324a8c48d772a53"
|
||||
integrity sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==
|
||||
|
||||
tabbable@^6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-6.2.0.tgz#732fb62bc0175cfcec257330be187dcfba1f3b97"
|
||||
integrity sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==
|
||||
|
||||
vite@^5.2.10, vite@^5.2.9:
|
||||
version "5.2.10"
|
||||
resolved "https://registry.yarnpkg.com/vite/-/vite-5.2.10.tgz#2ac927c91e99d51b376a5c73c0e4b059705f5bd7"
|
||||
integrity sha512-PAzgUZbP7msvQvqdSD+ErD5qGnSFiGOoWmV5yAKUEI0kdhjbH6nMWVyZQC/hSc4aXwc0oJ9aEdIiF9Oje0JFCw==
|
||||
dependencies:
|
||||
esbuild "^0.20.1"
|
||||
postcss "^8.4.38"
|
||||
rollup "^4.13.0"
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.3"
|
||||
|
||||
vitepress-plugin-tabs@^0.5.0:
|
||||
version "0.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vitepress-plugin-tabs/-/vitepress-plugin-tabs-0.5.0.tgz#2b193a72ed36b9fcd63e3907d3044fe7b6cf3e4e"
|
||||
integrity sha512-SIhFWwGsUkTByfc2b279ray/E0Jt8vDTsM1LiHxmCOBAEMmvzIBZSuYYT1DpdDTiS3SuJieBheJkYnwCq/yD9A==
|
||||
|
||||
vitepress@^1.1.0:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.1.3.tgz#ded22392f5274680aaba8bb81dd4fb1c4741c02e"
|
||||
integrity sha512-hGrIYN0w9IHWs0NQSnlMjKV/v/HLfD+Ywv5QdvCSkiT32mpNOOwUrZjnqZv/JL/WBPpUc94eghTUvmipxw0xrA==
|
||||
dependencies:
|
||||
"@docsearch/css" "^3.6.0"
|
||||
"@docsearch/js" "^3.6.0"
|
||||
"@shikijs/core" "^1.3.0"
|
||||
"@shikijs/transformers" "^1.3.0"
|
||||
"@types/markdown-it" "^14.0.1"
|
||||
"@vitejs/plugin-vue" "^5.0.4"
|
||||
"@vue/devtools-api" "^7.0.27"
|
||||
"@vueuse/core" "^10.9.0"
|
||||
"@vueuse/integrations" "^10.9.0"
|
||||
focus-trap "^7.5.4"
|
||||
mark.js "8.11.1"
|
||||
minisearch "^6.3.0"
|
||||
shiki "^1.3.0"
|
||||
vite "^5.2.9"
|
||||
vue "^3.4.23"
|
||||
|
||||
vue-demi@>=0.14.7:
|
||||
version "0.14.7"
|
||||
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.7.tgz#8317536b3ef74c5b09f268f7782e70194567d8f2"
|
||||
integrity sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==
|
||||
|
||||
vue@^3.4.23, vue@^3.4.24:
|
||||
version "3.4.24"
|
||||
resolved "https://registry.yarnpkg.com/vue/-/vue-3.4.24.tgz#f269549939a6c092480f018aa0bd886ba64f4c6f"
|
||||
integrity sha512-NPdx7dLGyHmKHGRRU5bMRYVE+rechR+KDU5R2tSTNG36PuMwbfAJ+amEvOAw7BPfZp5sQulNELSLm5YUkau+Sg==
|
||||
dependencies:
|
||||
"@vue/compiler-dom" "3.4.24"
|
||||
"@vue/compiler-sfc" "3.4.24"
|
||||
"@vue/runtime-dom" "3.4.24"
|
||||
"@vue/server-renderer" "3.4.24"
|
||||
"@vue/shared" "3.4.24"
|
||||
@@ -13,54 +13,40 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
GRAVE_ESC_ENABLE ?= yes
|
||||
MAGIC_ENABLE ?= yes
|
||||
SEND_STRING_ENABLE ?= yes
|
||||
SPACE_CADET_ENABLE ?= yes
|
||||
GRAVE_ESC_ENABLE ?= yes
|
||||
|
||||
GENERIC_FEATURES = \
|
||||
AUTO_SHIFT \
|
||||
AUTOCORRECT \
|
||||
BOOTMAGIC \
|
||||
CAPS_WORD \
|
||||
COMBO \
|
||||
COMMAND \
|
||||
CRC \
|
||||
DEFERRED_EXEC \
|
||||
DIGITIZER \
|
||||
DIP_SWITCH \
|
||||
DYNAMIC_KEYMAP \
|
||||
DYNAMIC_MACRO \
|
||||
DYNAMIC_TAPPING_TERM \
|
||||
GRAVE_ESC \
|
||||
HAPTIC \
|
||||
KEY_LOCK \
|
||||
KEY_OVERRIDE \
|
||||
LAYER_LOCK \
|
||||
LEADER \
|
||||
MAGIC \
|
||||
MOUSEKEY \
|
||||
MUSIC \
|
||||
OS_DETECTION \
|
||||
PROGRAMMABLE_BUTTON \
|
||||
REPEAT_KEY \
|
||||
SECURE \
|
||||
SEND_STRING \
|
||||
SEQUENCER \
|
||||
SPACE_CADET \
|
||||
SWAP_HANDS \
|
||||
TAP_DANCE \
|
||||
TRI_LAYER \
|
||||
VIA \
|
||||
VIRTSER \
|
||||
VELOCIKEY \
|
||||
WPM \
|
||||
DYNAMIC_TAPPING_TERM \
|
||||
TRI_LAYER
|
||||
|
||||
define HANDLE_GENERIC_FEATURE
|
||||
# $$(info "Processing: $1_ENABLE $2.c")
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/process_keycode/process_$2.c)
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2/$2.c)
|
||||
SRC += $$(wildcard $$(QUANTUM_DIR)/$2.c)
|
||||
VPATH += $$(wildcard $$(QUANTUM_DIR)/$2/)
|
||||
OPT_DEFS += -D$1_ENABLE
|
||||
endef
|
||||
|
||||
|
||||
@@ -90,14 +90,15 @@ endef
|
||||
MSG_AVAILABLE_KEYMAPS = $(eval $(call GENERATE_MSG_AVAILABLE_KEYMAPS))$(MSG_AVAILABLE_KEYMAPS_ACTUAL)
|
||||
|
||||
MSG_BOOTLOADER_NOT_FOUND_BASE = Bootloader not found. Make sure the board is in bootloader mode. See https://docs.qmk.fm/\#/newbs_flashing\n
|
||||
MSG_CHECK_STACKSIZE = Checking stack size of $(TARGET)
|
||||
MSG_CHECK_FILESIZE = Checking file size of $(TARGET).$(FIRMWARE_FORMAT)
|
||||
MSG_MEMORY_OVERFLOW = $(ERROR_COLOR)RAM usage (not including stack) exceeds available RAM by $(RAM_OVERFLOW_AMOUNT) bytes\n
|
||||
MSG_STACK_SIZE = Available stack size: $(STACK_SIZE) bytes\n
|
||||
MSG_CHECK_FILESIZE_SKIPPED = (Firmware size check does not yet support $(MCU_ORIG); skipping)
|
||||
MSG_CHECK_STACKSIZE = Checking stack size of $(TARGET)
|
||||
MSG_FILE_TOO_BIG = $(ERROR_COLOR)The firmware is too large!$(NO_COLOR) $(CURRENT_SIZE)/$(MAX_SIZE) ($(OVER_SIZE) bytes over)\n
|
||||
MSG_FILE_TOO_SMALL = The firmware is too small! $(CURRENT_SIZE)/$(MAX_SIZE)\n
|
||||
MSG_FILE_JUST_RIGHT = The firmware size is fine - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n
|
||||
MSG_FILE_NEAR_LIMIT = The firmware size is approaching the maximum - $(CURRENT_SIZE)/$(MAX_SIZE) ($(PERCENT_SIZE)%%, $(FREE_SIZE) bytes free)\n
|
||||
MSG_MEMORY_OVERFLOW = $(ERROR_COLOR)RAM usage (not including stack) exceeds available RAM by $(RAM_OVERFLOW_AMOUNT) bytes\n
|
||||
MSG_STACK_SIZE = Available stack size: $(STACK_SIZE) bytes\n
|
||||
MSG_PYTHON_MISSING = $(ERROR_COLOR)ERROR:$(NO_COLOR) Cannot run \"qmk hello\"!\n\n\
|
||||
Please run $(BOLD)qmk setup$(NO_COLOR) to install all the dependencies QMK requires.\n\n
|
||||
MSG_FLASH_BOOTLOADER = $(WARN_COLOR)WARNING:$(NO_COLOR) This board's bootloader is not specified or is not supported by the \":flash\" target at this time.\n\n
|
||||
@@ -106,10 +107,6 @@ MSG_BOOTLOADER_NOT_FOUND = $(ERROR_COLOR)ERROR:$(NO_COLOR) $(MSG_BOOTLOADER_NOT_
|
||||
BOOTLOADER_RETRY_TIME ?= 0.5
|
||||
MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY = $(MSG_BOOTLOADER_NOT_FOUND_BASE) Trying again every $(BOOTLOADER_RETRY_TIME)s (Ctrl+C to cancel)
|
||||
|
||||
define WARNING_MESSAGE
|
||||
$(shell printf "\n %-99s $(WARN_STRING)\n" "$1" >&2)
|
||||
endef
|
||||
|
||||
define CATASTROPHIC_ERROR
|
||||
$(shell printf "\n * %-99s $(ERROR_STRING)\n" "$2" >&2)
|
||||
$(error $1)
|
||||
|
||||
@@ -37,6 +37,7 @@ OTHER_OPTION_NAMES = \
|
||||
UNICODEMAP_ENABLE \
|
||||
UNICODE_COMMON \
|
||||
AUTO_SHIFT_ENABLE \
|
||||
AUTO_SHIFT_MODIFIERS \
|
||||
DYNAMIC_TAPPING_TERM_ENABLE \
|
||||
COMBO_ENABLE \
|
||||
KEY_LOCK_ENABLE \
|
||||
@@ -59,6 +60,7 @@ OTHER_OPTION_NAMES = \
|
||||
ENCODER_ENABLE_CUSTOM \
|
||||
GERMAN_ENABLE \
|
||||
HAPTIC_ENABLE \
|
||||
ISSI_ENABLE \
|
||||
KEYLOGGER_ENABLE \
|
||||
LCD_BACKLIGHT_ENABLE \
|
||||
MACROS_ENABLED \
|
||||
|
||||
@@ -1,407 +0,0 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ # │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ^ │ ¸ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ` │ < │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ « │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ É │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"KC_GRV": {
|
||||
"key": "FR_HASH",
|
||||
"label": "#",
|
||||
}
|
||||
"KC_1": {
|
||||
"key": "FR_1",
|
||||
"label": "1",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "FR_2",
|
||||
"label": "2",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "FR_3",
|
||||
"label": "3",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "FR_4",
|
||||
"label": "4",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "FR_5",
|
||||
"label": "5",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "FR_6",
|
||||
"label": "6",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "FR_7",
|
||||
"label": "7",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "FR_8",
|
||||
"label": "8",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "FR_9",
|
||||
"label": "9",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "FR_0",
|
||||
"label": "0",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "FR_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "FR_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "FR_Q",
|
||||
"label": "Q",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "FR_W",
|
||||
"label": "W",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "FR_E",
|
||||
"label": "E",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "FR_R",
|
||||
"label": "R",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "FR_T",
|
||||
"label": "T",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "FR_Y",
|
||||
"label": "Y",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "FR_U",
|
||||
"label": "U",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "FR_I",
|
||||
"label": "I",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "FR_O",
|
||||
"label": "O",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "FR_P",
|
||||
"label": "P",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "FR_DCIR",
|
||||
"label": "^ (dead)",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "FR_CEDL",
|
||||
"label": "¸ (dead)",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "FR_A",
|
||||
"label": "A",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "FR_S",
|
||||
"label": "S",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "FR_D",
|
||||
"label": "D",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "FR_F",
|
||||
"label": "F",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "FR_G",
|
||||
"label": "G",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "FR_H",
|
||||
"label": "H",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "FR_J",
|
||||
"label": "J",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "FR_K",
|
||||
"label": "K",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "FR_L",
|
||||
"label": "L",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "FR_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "FR_DGRV",
|
||||
"label": "` (dead)",
|
||||
}
|
||||
"KC_NUHS": {
|
||||
"key": "FR_LABK",
|
||||
"label": "<",
|
||||
}
|
||||
"KC_NUBS": {
|
||||
"key": "FR_LDAQ",
|
||||
"label": "«",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "FR_Z",
|
||||
"label": "Z",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "FR_X",
|
||||
"label": "X",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "FR_C",
|
||||
"label": "C",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "FR_V",
|
||||
"label": "V",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "FR_B",
|
||||
"label": "B",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "FR_N",
|
||||
"label": "N",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "FR_M",
|
||||
"label": "M",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "FR_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "FR_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "FR_EACU",
|
||||
"label": "É",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ | │ ! │ " │ / │ $ │ % │ ? │ & │ * │ ( │ ) │ _ │ + │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ : │ │ > │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ » │ │ │ │ │ │ │ │ ' │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"S(FR_HASH)": {
|
||||
"key": "FR_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"S(FR_1)": {
|
||||
"key": "FR_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"S(FR_2)": {
|
||||
"key": "FR_DQUO",
|
||||
"label": "\"",
|
||||
}
|
||||
"S(FR_3)": {
|
||||
"key": "FR_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"S(FR_4)": {
|
||||
"key": "FR_DLR",
|
||||
"label": "$",
|
||||
}
|
||||
"S(FR_5)": {
|
||||
"key": "FR_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"S(FR_6)": {
|
||||
"key": "FR_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
"S(FR_7)": {
|
||||
"key": "FR_AMPR",
|
||||
"label": "&",
|
||||
}
|
||||
"S(FR_8)": {
|
||||
"key": "FR_ASTR",
|
||||
"label": "*",
|
||||
}
|
||||
"S(FR_9)": {
|
||||
"key": "FR_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
"S(FR_0)": {
|
||||
"key": "FR_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"S(FR_MINS)": {
|
||||
"key": "FR_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
"S(FR_EQL)": {
|
||||
"key": "FR_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"S(FR_CEDL)": {
|
||||
"key": "FR_DIAE",
|
||||
"label": "¨ (dead)",
|
||||
}
|
||||
"S(FR_SCLN)": {
|
||||
"key": "FR_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"S(FR_LABK)": {
|
||||
"key": "FR_RABK",
|
||||
"label": ">",
|
||||
}
|
||||
"S(FR_LDAQ)": {
|
||||
"key": "FR_RDAQ",
|
||||
"label": "»",
|
||||
}
|
||||
"S(FR_COMM)": {
|
||||
"key": "FR_QUOT",
|
||||
"label": "'",
|
||||
}
|
||||
/* AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ \ │ ± │ @ │ £ │ ¢ │ ¤ │ ¬ │ ¦ │ ² │ ³ │ ¼ │ ½ │ ¾ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ § │ ¶ │ [ │ ] │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ ~ │ { │ } │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ ° │ │ │ │ │ │ │ µ │ ¯ │ - │ ´ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"ALGR(FR_HASH)": {
|
||||
"key": "FR_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"ALGR(FR_1)": {
|
||||
"key": "FR_PLMN",
|
||||
"label": "±",
|
||||
}
|
||||
"ALGR(FR_2)": {
|
||||
"key": "FR_AT",
|
||||
"label": "@",
|
||||
}
|
||||
"ALGR(FR_3)": {
|
||||
"key": "FR_PND",
|
||||
"label": "£",
|
||||
}
|
||||
"ALGR(FR_4)": {
|
||||
"key": "FR_CENT",
|
||||
"label": "¢",
|
||||
}
|
||||
"ALGR(FR_5)": {
|
||||
"key": "FR_CURR",
|
||||
"label": "¤",
|
||||
}
|
||||
"ALGR(FR_6)": {
|
||||
"key": "FR_NOT",
|
||||
"label": "¬",
|
||||
}
|
||||
"ALGR(FR_7)": {
|
||||
"key": "FR_BRKP",
|
||||
"label": "¦",
|
||||
}
|
||||
"ALGR(FR_8)": {
|
||||
"key": "FR_SUP2",
|
||||
"label": "²",
|
||||
}
|
||||
"ALGR(FR_9)": {
|
||||
"key": "FR_SUP3",
|
||||
"label": "³",
|
||||
}
|
||||
"ALGR(FR_0)": {
|
||||
"key": "FR_QRTR",
|
||||
"label": "¼",
|
||||
}
|
||||
"ALGR(FR_MINS)": {
|
||||
"key": "FR_HALF",
|
||||
"label": "½",
|
||||
}
|
||||
"ALGR(FR_EQL)": {
|
||||
"key": "FR_TQTR",
|
||||
"label": "¾",
|
||||
}
|
||||
"ALGR(FR_O)": {
|
||||
"key": "FR_SECT",
|
||||
"label": "§",
|
||||
}
|
||||
"ALGR(FR_P)": {
|
||||
"key": "FR_PARA",
|
||||
"label": "¶",
|
||||
}
|
||||
"ALGR(FR_DCIR)": {
|
||||
"key": "FR_LBRC",
|
||||
"label": "[",
|
||||
}
|
||||
"ALGR(FR_CEDL)": {
|
||||
"key": "FR_RBRC",
|
||||
"label": "]",
|
||||
}
|
||||
"ALGR(FR_SCLN)": {
|
||||
"key": "FR_TILD",
|
||||
"label": "~",
|
||||
}
|
||||
"ALGR(FR_DGRV)": {
|
||||
"key": "FR_LCBR",
|
||||
"label": "{",
|
||||
}
|
||||
"ALGR(FR_LABK)": {
|
||||
"key": "FR_RCBR",
|
||||
"label": "}",
|
||||
}
|
||||
"ALGR(FR_LDAQ)": {
|
||||
"key": "FR_DEG",
|
||||
"label": "°",
|
||||
}
|
||||
"ALGR(FR_M)": {
|
||||
"key": "FR_MICR",
|
||||
"label": "µ",
|
||||
}
|
||||
"ALGR(FR_COMM)": {
|
||||
"key": "FR_MACR",
|
||||
"label": "¯",
|
||||
}
|
||||
"ALGR(FR_DOT)": {
|
||||
"key": "FR_SHYP",
|
||||
"label": " (soft hyphen)",
|
||||
}
|
||||
"ALGR(FR_EACU)": {
|
||||
"key": "FR_ACUT",
|
||||
"label": "´ (dead)",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,580 +0,0 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ \ │ + │ ě │ š │ č │ ř │ ž │ ý │ á │ í │ é │ = │ ' │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ú │ ) │ ¨ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ů │ § │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤
|
||||
* │ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||
* ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"KC_GRV": {
|
||||
"key": "CZ_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"KC_1": {
|
||||
"key": "CZ_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "CZ_ECAR",
|
||||
"label": "ě",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "CZ_SCAR",
|
||||
"label": "š",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "CZ_CCAR",
|
||||
"label": "č",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "CZ_RCAR",
|
||||
"label": "ř",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "CZ_ZCAR",
|
||||
"label": "ž",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "CZ_YACU",
|
||||
"label": "ý",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "CZ_AACU",
|
||||
"label": "á",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "CZ_IACU",
|
||||
"label": "í",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "CZ_EACU",
|
||||
"label": "é",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "CZ_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "CZ_ACUT",
|
||||
"label": "' (dead)",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "CZ_Q",
|
||||
"label": "Q",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "CZ_W",
|
||||
"label": "W",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "CZ_E",
|
||||
"label": "E",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "CZ_R",
|
||||
"label": "R",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "CZ_T",
|
||||
"label": "T",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "CZ_Z",
|
||||
"label": "Z",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "CZ_U",
|
||||
"label": "U",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "CZ_I",
|
||||
"label": "I",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "CZ_O",
|
||||
"label": "O",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "CZ_P",
|
||||
"label": "P",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "CZ_UACU",
|
||||
"label": "ú",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "CZ_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"KC_NUHS": {
|
||||
"key": "CZ_DIAE",
|
||||
"label": "¨ (dead)",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "CZ_A",
|
||||
"label": "A",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "CZ_S",
|
||||
"label": "S",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "CZ_D",
|
||||
"label": "D",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "CZ_F",
|
||||
"label": "F",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "CZ_G",
|
||||
"label": "G",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "CZ_H",
|
||||
"label": "H",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "CZ_J",
|
||||
"label": "J",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "CZ_K",
|
||||
"label": "K",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "CZ_L",
|
||||
"label": "L",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "CZ_URNG",
|
||||
"label": "ů",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "CZ_SECT",
|
||||
"label": "§",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "CZ_Y",
|
||||
"label": "Y",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "CZ_X",
|
||||
"label": "X",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "CZ_C",
|
||||
"label": "C",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "CZ_V",
|
||||
"label": "V",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "CZ_B",
|
||||
"label": "B",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "CZ_N",
|
||||
"label": "N",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "CZ_M",
|
||||
"label": "M",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "CZ_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "CZ_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "CZ_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ | │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ % │ ˇ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ / │ ( │ ` │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ " │ ! │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤
|
||||
* │ │ │ │ │ │ │ │ │ ? │ : │ _ │ │
|
||||
* ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"S(CZ_BSLS)": {
|
||||
"key": "CZ_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"S(CZ_PLUS)": {
|
||||
"key": "CZ_1",
|
||||
"label": "1",
|
||||
}
|
||||
"S(CZ_ECAR)": {
|
||||
"key": "CZ_2",
|
||||
"label": "2",
|
||||
}
|
||||
"S(CZ_SCAR)": {
|
||||
"key": "CZ_3",
|
||||
"label": "3",
|
||||
}
|
||||
"S(CZ_CCAR)": {
|
||||
"key": "CZ_4",
|
||||
"label": "4",
|
||||
}
|
||||
"S(CZ_RCAR)": {
|
||||
"key": "CZ_5",
|
||||
"label": "5",
|
||||
}
|
||||
"S(CZ_ZCAR)": {
|
||||
"key": "CZ_6",
|
||||
"label": "6",
|
||||
}
|
||||
"S(CZ_YACU)": {
|
||||
"key": "CZ_7",
|
||||
"label": "7",
|
||||
}
|
||||
"S(CZ_AACU)": {
|
||||
"key": "CZ_8",
|
||||
"label": "8",
|
||||
}
|
||||
"S(CZ_IACU)": {
|
||||
"key": "CZ_9",
|
||||
"label": "9",
|
||||
}
|
||||
"S(CZ_EACU)": {
|
||||
"key": "CZ_0",
|
||||
"label": "0",
|
||||
}
|
||||
"S(CZ_EQL)": {
|
||||
"key": "CZ_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"S(CZ_ACUT)": {
|
||||
"key": "CZ_CARN",
|
||||
"label": "ˇ (dead)",
|
||||
}
|
||||
"S(CZ_UACU)": {
|
||||
"key": "CZ_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"S(CZ_RPRN)": {
|
||||
"key": "CZ_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
"S(CZ_DIAE)": {
|
||||
"key": "CZ_GRV",
|
||||
"label": "`",
|
||||
}
|
||||
"S(CZ_URNG)": {
|
||||
"key": "CZ_DQUO",
|
||||
"label": "\"",
|
||||
}
|
||||
"S(CZ_SECT)": {
|
||||
"key": "CZ_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"S(CZ_COMM)": {
|
||||
"key": "CZ_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
"S(CZ_DOT)": {
|
||||
"key": "CZ_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"S(CZ_MINS)": {
|
||||
"key": "CZ_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
/* Alted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ │ @ │ # │ $ │ ~ │ ^ │ & │ * │ { │ } │ ° │ ^ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ ė │ ę │ € │ │ │ │ │ │ │ [ │ ] │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ │ ą │ ß │ ∂ │ │ │ ‘ │ ’ │ │ ł │ ; │ ' │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤
|
||||
* │ │ │ │ │ │ │ ‚ │ │ < │ > │ – │ │
|
||||
* ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"A(CZ_ECAR)": {
|
||||
"key": "CZ_AT",
|
||||
"label": "@",
|
||||
}
|
||||
"A(CZ_SCAR)": {
|
||||
"key": "CZ_HASH",
|
||||
"label": "#",
|
||||
}
|
||||
"A(CZ_CCAR)": {
|
||||
"key": "CZ_DLR",
|
||||
"label": "$",
|
||||
}
|
||||
"A(CZ_RCAR)": {
|
||||
"key": "CZ_TILD",
|
||||
"label": "~",
|
||||
}
|
||||
"A(CZ_ZCAR)": {
|
||||
"key": "CZ_CIRC",
|
||||
"label": "^",
|
||||
}
|
||||
"A(CZ_YACU)": {
|
||||
"key": "CZ_AMPR",
|
||||
"label": "&",
|
||||
}
|
||||
"A(CZ_AACU)": {
|
||||
"key": "CZ_ASTR",
|
||||
"label": "*",
|
||||
}
|
||||
"A(CZ_IACU)": {
|
||||
"key": "CZ_LCBR",
|
||||
"label": "{",
|
||||
}
|
||||
"A(CZ_EACU)": {
|
||||
"key": "CZ_RCBR",
|
||||
"label": "}",
|
||||
}
|
||||
"A(CZ_EQL)": {
|
||||
"key": "CZ_RNGA",
|
||||
"label": "° (dead)",
|
||||
}
|
||||
"A(CZ_ACUT)": {
|
||||
"key": "CZ_DCIR",
|
||||
"label": "^ (dead)",
|
||||
}
|
||||
"A(CZ_W)": {
|
||||
"key": "CZ_LEDT",
|
||||
"label": "ė",
|
||||
}
|
||||
"A(CZ_E)": {
|
||||
"key": "CZ_LEOG",
|
||||
"label": "ę",
|
||||
}
|
||||
"A(CZ_R)": {
|
||||
"key": "CZ_EURO",
|
||||
"label": "€",
|
||||
}
|
||||
"A(CZ_Z)": {
|
||||
"key": "CZ_LZDT",
|
||||
"label": "ż",
|
||||
}
|
||||
"A(CZ_UACU)": {
|
||||
"key": "CZ_LBRC",
|
||||
"label": "[",
|
||||
}
|
||||
"A(CZ_RPRN)": {
|
||||
"key": "CZ_RBRC",
|
||||
"label": "]",
|
||||
}
|
||||
"A(CZ_A)": {
|
||||
"key": "CZ_LAOG",
|
||||
"label": "ą",
|
||||
}
|
||||
"A(CZ_S)": {
|
||||
"key": "CZ_SS",
|
||||
"label": "ß",
|
||||
}
|
||||
"A(CZ_D)": {
|
||||
"key": "CZ_PDIF",
|
||||
"label": "∂",
|
||||
}
|
||||
"A(CZ_H)": {
|
||||
"key": "CZ_LSQU",
|
||||
"label": "‘",
|
||||
}
|
||||
"A(CZ_J)": {
|
||||
"key": "CZ_RSQU",
|
||||
"label": "’",
|
||||
}
|
||||
"A(CZ_L)": {
|
||||
"key": "CZ_LLST",
|
||||
"label": "ł",
|
||||
}
|
||||
"A(CZ_URNG)": {
|
||||
"key": "CZ_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"A(CZ_SECT)": {
|
||||
"key": "CZ_QUOT",
|
||||
"label": "'",
|
||||
}
|
||||
"A(CZ_N)": {
|
||||
"key": "CZ_SLQU",
|
||||
"label": "‚",
|
||||
}
|
||||
"A(CZ_COMM)": {
|
||||
"key": "CZ_LABK",
|
||||
"label": "<",
|
||||
}
|
||||
"A(CZ_DOT)": {
|
||||
"key": "CZ_RABK",
|
||||
"label": ">",
|
||||
}
|
||||
"A(CZ_MINS)": {
|
||||
"key": "CZ_NDSH",
|
||||
"label": "–",
|
||||
}
|
||||
/* Shift+Alted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ ¬ │ • │ ≠ │ £ │ ◊ │ † │ ¶ │ ÷ │ « │ » │ , │ - │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ Ė │ Ę │ ® │ ™ │ Ż │ │ │ │ │ ‹ │ › │ " │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴───┤
|
||||
* │ │ Ą │ ∑ │ ∆ │ │ │ “ │ ” │ │ Ł │ … │ ~ │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴──────┤
|
||||
* │ │ │ │ © │ √ │ │ „ │ │ ≤ │ ≥ │ — │ │
|
||||
* ├─────┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"S(A(CZ_1))": {
|
||||
"key": "CZ_NOT",
|
||||
"label": "¬",
|
||||
}
|
||||
"S(A(CZ_2))": {
|
||||
"key": "CZ_BULT",
|
||||
"label": "•",
|
||||
}
|
||||
"S(A(CZ_3))": {
|
||||
"key": "CZ_NEQL",
|
||||
"label": "≠",
|
||||
}
|
||||
"S(A(CZ_4))": {
|
||||
"key": "CZ_PND",
|
||||
"label": "£",
|
||||
}
|
||||
"S(A(CZ_5))": {
|
||||
"key": "CZ_LOZN",
|
||||
"label": "◊",
|
||||
}
|
||||
"S(A(CZ_6))": {
|
||||
"key": "CZ_DAGG",
|
||||
"label": "†",
|
||||
}
|
||||
"S(A(CZ_7))": {
|
||||
"key": "CZ_PARA",
|
||||
"label": "¶",
|
||||
}
|
||||
"S(A(CZ_8))": {
|
||||
"key": "CZ_DIV",
|
||||
"label": "÷",
|
||||
}
|
||||
"S(A(CZ_9))": {
|
||||
"key": "CZ_LDAQ",
|
||||
"label": "«",
|
||||
}
|
||||
"S(A(CZ_0))": {
|
||||
"key": "CZ_RDAQ",
|
||||
"label": "»",
|
||||
}
|
||||
"S(A(CZ_EQL))": {
|
||||
"key": "CZ_DCOM",
|
||||
"label": ", (dead)",
|
||||
}
|
||||
"S(A(CZ_ACUT))": {
|
||||
"key": "CZ_DHPN",
|
||||
"label": "- (dead)",
|
||||
}
|
||||
"S(A(CZ_W))": {
|
||||
"key": "CZ_CEDT",
|
||||
"label": "Ė",
|
||||
}
|
||||
"S(A(CZ_E))": {
|
||||
"key": "CZ_CEOG",
|
||||
"label": "Ę",
|
||||
}
|
||||
"S(A(CZ_R))": {
|
||||
"key": "CZ_REGD",
|
||||
"label": "®",
|
||||
}
|
||||
"S(A(CZ_T))": {
|
||||
"key": "CZ_TM",
|
||||
"label": "™",
|
||||
}
|
||||
"S(A(CZ_Z))": {
|
||||
"key": "CZ_CZDT",
|
||||
"label": "Ż",
|
||||
}
|
||||
"S(A(CZ_UACU))": {
|
||||
"key": "CZ_LSAQ",
|
||||
"label": "‹",
|
||||
}
|
||||
"S(A(CZ_RPRN))": {
|
||||
"key": "CZ_RSAQ",
|
||||
"label": "›",
|
||||
}
|
||||
"S(A(CZ_DIAE))": {
|
||||
"key": "CZ_DDQT",
|
||||
"label": "\" (dead)",
|
||||
}
|
||||
"S(A(CZ_A))": {
|
||||
"key": "CZ_CAOG",
|
||||
"label": "Ą",
|
||||
}
|
||||
"S(A(CZ_S))": {
|
||||
"key": "CZ_NARS",
|
||||
"label": "∑",
|
||||
}
|
||||
"S(A(CZ_D))": {
|
||||
"key": "CZ_INCR",
|
||||
"label": "∆",
|
||||
}
|
||||
"S(A(CZ_H))": {
|
||||
"key": "CZ_LDQU",
|
||||
"label": "“",
|
||||
}
|
||||
"S(A(CZ_J))": {
|
||||
"key": "CZ_RDQU",
|
||||
"label": "”",
|
||||
}
|
||||
"S(A(CZ_L))": {
|
||||
"key": "CZ_CLST",
|
||||
"label": "Ł",
|
||||
}
|
||||
"S(A(CZ_URNG))": {
|
||||
"key": "CZ_ELLP",
|
||||
"label": "…",
|
||||
}
|
||||
"S(A(CZ_SECT))": {
|
||||
"key": "CZ_DTIL",
|
||||
"label": "~ (dead)",
|
||||
}
|
||||
"S(A(CZ_C))": {
|
||||
"key": "CZ_COPY",
|
||||
"label": "©",
|
||||
}
|
||||
"S(A(CZ_V))": {
|
||||
"key": "CZ_SQRT",
|
||||
"label": "√",
|
||||
}
|
||||
"S(A(CZ_N))": {
|
||||
"key": "CZ_DLQU",
|
||||
"label": "„",
|
||||
}
|
||||
"S(A(CZ_COMM))": {
|
||||
"key": "CZ_LEQL",
|
||||
"label": "≤",
|
||||
}
|
||||
"S(A(CZ_DOT))": {
|
||||
"key": "CZ_GEQL",
|
||||
"label": "≥",
|
||||
}
|
||||
"S(A(CZ_MINS))": {
|
||||
"key": "CZ_MDSH",
|
||||
"label": "—",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,580 +0,0 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ + │ ě │ š │ č │ ř │ ž │ ý │ á │ í │ é │ = │ ' │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ Q │ W │ E │ R │ T │ Z │ U │ I │ O │ P │ ú │ ) │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ů │ § │ ¨ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
|
||||
* │ │ \ │ Y │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||
* ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"KC_1": {
|
||||
"key": "CZ_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "CZ_ECAR",
|
||||
"label": "ě",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "CZ_SCAR",
|
||||
"label": "š",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "CZ_CCAR",
|
||||
"label": "č",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "CZ_RCAR",
|
||||
"label": "ř",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "CZ_ZCAR",
|
||||
"label": "ž",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "CZ_YACU",
|
||||
"label": "ý",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "CZ_AACU",
|
||||
"label": "á",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "CZ_IACU",
|
||||
"label": "í",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "CZ_EACU",
|
||||
"label": "é",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "CZ_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "CZ_ACUT",
|
||||
"label": "' (dead)",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "CZ_Q",
|
||||
"label": "Q",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "CZ_W",
|
||||
"label": "W",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "CZ_E",
|
||||
"label": "E",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "CZ_R",
|
||||
"label": "R",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "CZ_T",
|
||||
"label": "T",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "CZ_Z",
|
||||
"label": "Z",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "CZ_U",
|
||||
"label": "U",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "CZ_I",
|
||||
"label": "I",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "CZ_O",
|
||||
"label": "O",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "CZ_P",
|
||||
"label": "P",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "CZ_UACU",
|
||||
"label": "ú",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "CZ_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "CZ_A",
|
||||
"label": "A",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "CZ_S",
|
||||
"label": "S",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "CZ_D",
|
||||
"label": "D",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "CZ_F",
|
||||
"label": "F",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "CZ_G",
|
||||
"label": "G",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "CZ_H",
|
||||
"label": "H",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "CZ_J",
|
||||
"label": "J",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "CZ_K",
|
||||
"label": "K",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "CZ_L",
|
||||
"label": "L",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "CZ_URNG",
|
||||
"label": "ů",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "CZ_SECT",
|
||||
"label": "§",
|
||||
}
|
||||
"KC_NUHS": {
|
||||
"key": "CZ_DIAE",
|
||||
"label": "¨ (dead)",
|
||||
}
|
||||
"KC_NUBS": {
|
||||
"key": "CZ_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "CZ_Y",
|
||||
"label": "Y",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "CZ_X",
|
||||
"label": "X",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "CZ_C",
|
||||
"label": "C",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "CZ_V",
|
||||
"label": "V",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "CZ_B",
|
||||
"label": "B",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "CZ_N",
|
||||
"label": "N",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "CZ_M",
|
||||
"label": "M",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "CZ_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "CZ_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "CZ_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ % │ ˇ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ / │ ( │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ " │ ! │ ` │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
|
||||
* │ │ | │ │ │ │ │ │ │ │ ? │ : │ _ │ │
|
||||
* ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"S(CZ_PLUS)": {
|
||||
"key": "CZ_1",
|
||||
"label": "1",
|
||||
}
|
||||
"S(CZ_ECAR)": {
|
||||
"key": "CZ_2",
|
||||
"label": "2",
|
||||
}
|
||||
"S(CZ_SCAR)": {
|
||||
"key": "CZ_3",
|
||||
"label": "3",
|
||||
}
|
||||
"S(CZ_CCAR)": {
|
||||
"key": "CZ_4",
|
||||
"label": "4",
|
||||
}
|
||||
"S(CZ_RCAR)": {
|
||||
"key": "CZ_5",
|
||||
"label": "5",
|
||||
}
|
||||
"S(CZ_ZCAR)": {
|
||||
"key": "CZ_6",
|
||||
"label": "6",
|
||||
}
|
||||
"S(CZ_YACU)": {
|
||||
"key": "CZ_7",
|
||||
"label": "7",
|
||||
}
|
||||
"S(CZ_AACU)": {
|
||||
"key": "CZ_8",
|
||||
"label": "8",
|
||||
}
|
||||
"S(CZ_IACU)": {
|
||||
"key": "CZ_9",
|
||||
"label": "9",
|
||||
}
|
||||
"S(CZ_EACU)": {
|
||||
"key": "CZ_0",
|
||||
"label": "0",
|
||||
}
|
||||
"S(CZ_EQL)": {
|
||||
"key": "CZ_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"S(CZ_ACUT)": {
|
||||
"key": "CZ_CARN",
|
||||
"label": "ˇ (dead)",
|
||||
}
|
||||
"S(CZ_UACU)": {
|
||||
"key": "CZ_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"S(CZ_RPRN)": {
|
||||
"key": "CZ_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
"S(CZ_URNG)": {
|
||||
"key": "CZ_DQUO",
|
||||
"label": "\"",
|
||||
}
|
||||
"S(CZ_SECT)": {
|
||||
"key": "CZ_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"S(CZ_DIAE)": {
|
||||
"key": "CZ_GRV",
|
||||
"label": "`",
|
||||
}
|
||||
"S(CZ_BSLS)": {
|
||||
"key": "CZ_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"S(CZ_COMM)": {
|
||||
"key": "CZ_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
"S(CZ_DOT)": {
|
||||
"key": "CZ_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"S(CZ_MINS)": {
|
||||
"key": "CZ_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
/* Alted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ │ @ │ # │ $ │ ~ │ ^ │ & │ * │ { │ } │ ° │ ^ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ ė │ ę │ € │ │ ż │ │ │ │ │ [ │ ] │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ ą │ ß │ ∂ │ │ │ ‘ │ ’ │ │ ł │ ; │ ' │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
|
||||
* │ │ │ │ │ │ │ │ ‚ │ │ < │ > │ – │ │
|
||||
* ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"A(CZ_ECAR)": {
|
||||
"key": "CZ_AT",
|
||||
"label": "@",
|
||||
}
|
||||
"A(CZ_SCAR)": {
|
||||
"key": "CZ_HASH",
|
||||
"label": "#",
|
||||
}
|
||||
"A(CZ_CCAR)": {
|
||||
"key": "CZ_DLR",
|
||||
"label": "$",
|
||||
}
|
||||
"A(CZ_RCAR)": {
|
||||
"key": "CZ_TILD",
|
||||
"label": "~",
|
||||
}
|
||||
"A(CZ_ZCAR)": {
|
||||
"key": "CZ_CIRC",
|
||||
"label": "^",
|
||||
}
|
||||
"A(CZ_YACU)": {
|
||||
"key": "CZ_AMPR",
|
||||
"label": "&",
|
||||
}
|
||||
"A(CZ_AACU)": {
|
||||
"key": "CZ_ASTR",
|
||||
"label": "*",
|
||||
}
|
||||
"A(CZ_IACU)": {
|
||||
"key": "CZ_LCBR",
|
||||
"label": "{",
|
||||
}
|
||||
"A(CZ_EACU)": {
|
||||
"key": "CZ_RCBR",
|
||||
"label": "}",
|
||||
}
|
||||
"A(CZ_EQL)": {
|
||||
"key": "CZ_RNGA",
|
||||
"label": "° (dead)",
|
||||
}
|
||||
"A(CZ_ACUT)": {
|
||||
"key": "CZ_DCIR",
|
||||
"label": "^ (dead)",
|
||||
}
|
||||
"A(CZ_W)": {
|
||||
"key": "CZ_LEDT",
|
||||
"label": "ė",
|
||||
}
|
||||
"A(CZ_E)": {
|
||||
"key": "CZ_LEOG",
|
||||
"label": "ę",
|
||||
}
|
||||
"A(CZ_R)": {
|
||||
"key": "CZ_EURO",
|
||||
"label": "€",
|
||||
}
|
||||
"A(CZ_Z)": {
|
||||
"key": "CZ_LZDT",
|
||||
"label": "ż",
|
||||
}
|
||||
"A(CZ_UACU)": {
|
||||
"key": "CZ_LBRC",
|
||||
"label": "[",
|
||||
}
|
||||
"A(CZ_RPRN)": {
|
||||
"key": "CZ_RBRC",
|
||||
"label": "]",
|
||||
}
|
||||
"A(CZ_A)": {
|
||||
"key": "CZ_LAOG",
|
||||
"label": "ą",
|
||||
}
|
||||
"A(CZ_S)": {
|
||||
"key": "CZ_SS",
|
||||
"label": "ß",
|
||||
}
|
||||
"A(CZ_D)": {
|
||||
"key": "CZ_PDIF",
|
||||
"label": "∂",
|
||||
}
|
||||
"A(CZ_H)": {
|
||||
"key": "CZ_LSQU",
|
||||
"label": "‘",
|
||||
}
|
||||
"A(CZ_J)": {
|
||||
"key": "CZ_RSQU",
|
||||
"label": "’",
|
||||
}
|
||||
"A(CZ_L)": {
|
||||
"key": "CZ_LLST",
|
||||
"label": "ł",
|
||||
}
|
||||
"A(CZ_URNG)": {
|
||||
"key": "CZ_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"A(CZ_SECT)": {
|
||||
"key": "CZ_QUOT",
|
||||
"label": "'",
|
||||
}
|
||||
"A(CZ_N)": {
|
||||
"key": "CZ_SLQU",
|
||||
"label": "‚",
|
||||
}
|
||||
"A(CZ_COMM)": {
|
||||
"key": "CZ_LABK",
|
||||
"label": "<",
|
||||
}
|
||||
"A(CZ_DOT)": {
|
||||
"key": "CZ_RABK",
|
||||
"label": ">",
|
||||
}
|
||||
"A(CZ_MINS)": {
|
||||
"key": "CZ_NDSH",
|
||||
"label": "–",
|
||||
}
|
||||
/* Shift+Alted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬─────┐
|
||||
* │ │ ¬ │ • │ ≠ │ £ │ ◊ │ † │ ¶ │ ÷ │ « │ » │ , │ - │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬───┤
|
||||
* │ │ │ Ė │ Ę │ ® │ ™ │ Ż │ │ │ │ │ ‹ │ › │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ Ą │ ∑ │ ∆ │ │ │ “ │ ” │ │ Ł │ … │ ~ │ " │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴──┤
|
||||
* │ │ │ │ │ © │ √ │ │ „ │ │ ≤ │ ≥ │ — │ │
|
||||
* ├────┴┬──┴─┬─┴───┼───┴───┴───┴───┴───┴───┼───┴─┬─┴──┬─────┤
|
||||
* │ │ │ │ │ │ │ │
|
||||
* └─────┴────┴─────┴───────────────────────┴─────┴────┴─────┘
|
||||
*/
|
||||
"S(A(CZ_1))": {
|
||||
"key": "CZ_NOT",
|
||||
"label": "¬",
|
||||
}
|
||||
"S(A(CZ_2))": {
|
||||
"key": "CZ_BULT",
|
||||
"label": "•",
|
||||
}
|
||||
"S(A(CZ_3))": {
|
||||
"key": "CZ_NEQL",
|
||||
"label": "≠",
|
||||
}
|
||||
"S(A(CZ_4))": {
|
||||
"key": "CZ_PND",
|
||||
"label": "£",
|
||||
}
|
||||
"S(A(CZ_5))": {
|
||||
"key": "CZ_LOZN",
|
||||
"label": "◊",
|
||||
}
|
||||
"S(A(CZ_6))": {
|
||||
"key": "CZ_DAGG",
|
||||
"label": "†",
|
||||
}
|
||||
"S(A(CZ_7))": {
|
||||
"key": "CZ_PARA",
|
||||
"label": "¶",
|
||||
}
|
||||
"S(A(CZ_8))": {
|
||||
"key": "CZ_DIV",
|
||||
"label": "÷",
|
||||
}
|
||||
"S(A(CZ_9))": {
|
||||
"key": "CZ_LDAQ",
|
||||
"label": "«",
|
||||
}
|
||||
"S(A(CZ_0))": {
|
||||
"key": "CZ_RDAQ",
|
||||
"label": "»",
|
||||
}
|
||||
"S(A(CZ_EQL))": {
|
||||
"key": "CZ_DCOM",
|
||||
"label": ", (dead)",
|
||||
}
|
||||
"S(A(CZ_ACUT))": {
|
||||
"key": "CZ_DHPN",
|
||||
"label": "- (dead)",
|
||||
}
|
||||
"S(A(CZ_W))": {
|
||||
"key": "CZ_CEDT",
|
||||
"label": "Ė",
|
||||
}
|
||||
"S(A(CZ_E))": {
|
||||
"key": "CZ_CEOG",
|
||||
"label": "Ę",
|
||||
}
|
||||
"S(A(CZ_R))": {
|
||||
"key": "CZ_REGD",
|
||||
"label": "®",
|
||||
}
|
||||
"S(A(CZ_T))": {
|
||||
"key": "CZ_TM",
|
||||
"label": "™",
|
||||
}
|
||||
"S(A(CZ_Z))": {
|
||||
"key": "CZ_CZDT",
|
||||
"label": "Ż",
|
||||
}
|
||||
"S(A(CZ_UACU))": {
|
||||
"key": "CZ_LSAQ",
|
||||
"label": "‹",
|
||||
}
|
||||
"S(A(CZ_RPRN))": {
|
||||
"key": "CZ_RSAQ",
|
||||
"label": "›",
|
||||
}
|
||||
"S(A(CZ_A))": {
|
||||
"key": "CZ_CAOG",
|
||||
"label": "Ą",
|
||||
}
|
||||
"S(A(CZ_S))": {
|
||||
"key": "CZ_NARS",
|
||||
"label": "∑",
|
||||
}
|
||||
"S(A(CZ_D))": {
|
||||
"key": "CZ_INCR",
|
||||
"label": "∆",
|
||||
}
|
||||
"S(A(CZ_H))": {
|
||||
"key": "CZ_LDQU",
|
||||
"label": "“",
|
||||
}
|
||||
"S(A(CZ_J))": {
|
||||
"key": "CZ_RDQU",
|
||||
"label": "”",
|
||||
}
|
||||
"S(A(CZ_L))": {
|
||||
"key": "CZ_CLST",
|
||||
"label": "Ł",
|
||||
}
|
||||
"S(A(CZ_URNG))": {
|
||||
"key": "CZ_ELLP",
|
||||
"label": "…",
|
||||
}
|
||||
"S(A(CZ_SECT))": {
|
||||
"key": "CZ_DTIL",
|
||||
"label": "~ (dead)",
|
||||
}
|
||||
"S(A(CZ_DIAE))": {
|
||||
"key": "CZ_DDQT",
|
||||
"label": "\" (dead)",
|
||||
}
|
||||
"S(A(CZ_C))": {
|
||||
"key": "CZ_COPY",
|
||||
"label": "©",
|
||||
}
|
||||
"S(A(CZ_V))": {
|
||||
"key": "CZ_SQRT",
|
||||
"label": "√",
|
||||
}
|
||||
"S(A(CZ_N))": {
|
||||
"key": "CZ_DLQU",
|
||||
"label": "„",
|
||||
}
|
||||
"S(A(CZ_COMM))": {
|
||||
"key": "CZ_LEQL",
|
||||
"label": "≤",
|
||||
}
|
||||
"S(A(CZ_DOT))": {
|
||||
"key": "CZ_GEQL",
|
||||
"label": "≥",
|
||||
}
|
||||
"S(A(CZ_MINS))": {
|
||||
"key": "CZ_MDSH",
|
||||
"label": "—",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,291 +0,0 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ | │ № │ - │ / │ " │ : │ , │ . │ _ │ ? │ % │ ! │ ; │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ Й │ Ц │ У │ К │ Е │ Н │ Г │ Ш │ Щ │ З │ Х │ Ъ │ ) │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │ │ Ф │ Ы │ В │ А │ П │ Р │ О │ Л │ Д │ Ж │ Э │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │ │ Я │ Ч │ С │ М │ И │ Т │ Ь │ Б │ Ю │ Ё │ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"KC_GRV": {
|
||||
"key": "RU_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"KC_1": {
|
||||
"key": "RU_NUM",
|
||||
"label": "№",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "RU_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "RU_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "RU_DQUO",
|
||||
"label": "\"",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "RU_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "RU_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "RU_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "RU_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "RU_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "RU_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "RU_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "RU_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "RU_SHTI",
|
||||
"label": "Й",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "RU_TSE",
|
||||
"label": "Ц",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "RU_U",
|
||||
"label": "У",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "RU_KA",
|
||||
"label": "К",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "RU_IE",
|
||||
"label": "Е",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "RU_EN",
|
||||
"label": "Н",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "RU_GHE",
|
||||
"label": "Г",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "RU_SHA",
|
||||
"label": "Ш",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "RU_SHCH",
|
||||
"label": "Щ",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "RU_ZE",
|
||||
"label": "З",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "RU_HA",
|
||||
"label": "Х",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "RU_HARD",
|
||||
"label": "Ъ",
|
||||
}
|
||||
"KC_BSLS": {
|
||||
"key": "RU_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "RU_EF",
|
||||
"label": "Ф",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "RU_YERU",
|
||||
"label": "Ы",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "RU_VE",
|
||||
"label": "В",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "RU_A",
|
||||
"label": "А",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "RU_PE",
|
||||
"label": "П",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "RU_ER",
|
||||
"label": "Р",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "RU_O",
|
||||
"label": "О",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "RU_EL",
|
||||
"label": "Л",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "RU_DE",
|
||||
"label": "Д",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "RU_ZHE",
|
||||
"label": "Ж",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "RU_E",
|
||||
"label": "Э",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "RU_YA",
|
||||
"label": "Я",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "RU_CHE",
|
||||
"label": "Ч",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "RU_ES",
|
||||
"label": "С",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "RU_EM",
|
||||
"label": "М",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "RU_I",
|
||||
"label": "И",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "RU_TE",
|
||||
"label": "Т",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "RU_SOFT",
|
||||
"label": "Ь",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "RU_BE",
|
||||
"label": "Б",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "RU_YU",
|
||||
"label": "Ю",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "RU_YO",
|
||||
"label": "Ё",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ + │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ = │ \ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ ( │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"S(RU_PIPE)": {
|
||||
"key": "RU_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"S(RU_NUM)": {
|
||||
"key": "RU_1",
|
||||
"label": "1",
|
||||
}
|
||||
"S(RU_MINS)": {
|
||||
"key": "RU_2",
|
||||
"label": "2",
|
||||
}
|
||||
"S(RU_SLSH)": {
|
||||
"key": "RU_3",
|
||||
"label": "3",
|
||||
}
|
||||
"S(RU_DQUO)": {
|
||||
"key": "RU_4",
|
||||
"label": "4",
|
||||
}
|
||||
"S(RU_COLN)": {
|
||||
"key": "RU_5",
|
||||
"label": "5",
|
||||
}
|
||||
"S(RU_COMM)": {
|
||||
"key": "RU_6",
|
||||
"label": "6",
|
||||
}
|
||||
"S(RU_DOT)": {
|
||||
"key": "RU_7",
|
||||
"label": "7",
|
||||
}
|
||||
"S(RU_UNDS)": {
|
||||
"key": "RU_8",
|
||||
"label": "8",
|
||||
}
|
||||
"S(RU_QUES)": {
|
||||
"key": "RU_9",
|
||||
"label": "9",
|
||||
}
|
||||
"S(RU_PERC)": {
|
||||
"key": "RU_0",
|
||||
"label": "0",
|
||||
}
|
||||
"S(RU_EXLM)": {
|
||||
"key": "RU_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"S(RU_SCLN)": {
|
||||
"key": "RU_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"S(RU_RPRN)": {
|
||||
"key": "RU_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
/* AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ │ │ │ │ │ │ │ │ ₽ │ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"ALGR(RU_UNDS)": {
|
||||
"key": "RU_RUBL",
|
||||
"label": "₽",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,343 +0,0 @@
|
||||
{
|
||||
"aliases": {
|
||||
/*
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ | │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ ' │ ¿ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ ´ │ + │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ A │ S │ D │ F │ G │ H │ J │ K │ L │ Ñ │ { │ } │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ < │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ - │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"KC_GRV": {
|
||||
"key": "ES_PIPE",
|
||||
"label": "|",
|
||||
}
|
||||
"KC_1": {
|
||||
"key": "ES_1",
|
||||
"label": "1",
|
||||
}
|
||||
"KC_2": {
|
||||
"key": "ES_2",
|
||||
"label": "2",
|
||||
}
|
||||
"KC_3": {
|
||||
"key": "ES_3",
|
||||
"label": "3",
|
||||
}
|
||||
"KC_4": {
|
||||
"key": "ES_4",
|
||||
"label": "4",
|
||||
}
|
||||
"KC_5": {
|
||||
"key": "ES_5",
|
||||
"label": "5",
|
||||
}
|
||||
"KC_6": {
|
||||
"key": "ES_6",
|
||||
"label": "6",
|
||||
}
|
||||
"KC_7": {
|
||||
"key": "ES_7",
|
||||
"label": "7",
|
||||
}
|
||||
"KC_8": {
|
||||
"key": "ES_8",
|
||||
"label": "8",
|
||||
}
|
||||
"KC_9": {
|
||||
"key": "ES_9",
|
||||
"label": "9",
|
||||
}
|
||||
"KC_0": {
|
||||
"key": "ES_0",
|
||||
"label": "0",
|
||||
}
|
||||
"KC_MINS": {
|
||||
"key": "ES_QUOT",
|
||||
"label": "'",
|
||||
}
|
||||
"KC_EQL": {
|
||||
"key": "ES_IQUE",
|
||||
"label": "¿",
|
||||
}
|
||||
"KC_Q": {
|
||||
"key": "ES_Q",
|
||||
"label": "Q",
|
||||
}
|
||||
"KC_W": {
|
||||
"key": "ES_W",
|
||||
"label": "W",
|
||||
}
|
||||
"KC_E": {
|
||||
"key": "ES_E",
|
||||
"label": "E",
|
||||
}
|
||||
"KC_R": {
|
||||
"key": "ES_R",
|
||||
"label": "R",
|
||||
}
|
||||
"KC_T": {
|
||||
"key": "ES_T",
|
||||
"label": "T",
|
||||
}
|
||||
"KC_Y": {
|
||||
"key": "ES_Y",
|
||||
"label": "Y",
|
||||
}
|
||||
"KC_U": {
|
||||
"key": "ES_U",
|
||||
"label": "U",
|
||||
}
|
||||
"KC_I": {
|
||||
"key": "ES_I",
|
||||
"label": "I",
|
||||
}
|
||||
"KC_O": {
|
||||
"key": "ES_O",
|
||||
"label": "O",
|
||||
}
|
||||
"KC_P": {
|
||||
"key": "ES_P",
|
||||
"label": "P",
|
||||
}
|
||||
"KC_LBRC": {
|
||||
"key": "ES_ACUT",
|
||||
"label": "´ (dead)",
|
||||
}
|
||||
"KC_RBRC": {
|
||||
"key": "ES_PLUS",
|
||||
"label": "+",
|
||||
}
|
||||
"KC_A": {
|
||||
"key": "ES_A",
|
||||
"label": "A",
|
||||
}
|
||||
"KC_S": {
|
||||
"key": "ES_S",
|
||||
"label": "S",
|
||||
}
|
||||
"KC_D": {
|
||||
"key": "ES_D",
|
||||
"label": "D",
|
||||
}
|
||||
"KC_F": {
|
||||
"key": "ES_F",
|
||||
"label": "F",
|
||||
}
|
||||
"KC_G": {
|
||||
"key": "ES_G",
|
||||
"label": "G",
|
||||
}
|
||||
"KC_H": {
|
||||
"key": "ES_H",
|
||||
"label": "H",
|
||||
}
|
||||
"KC_J": {
|
||||
"key": "ES_J",
|
||||
"label": "J",
|
||||
}
|
||||
"KC_K": {
|
||||
"key": "ES_K",
|
||||
"label": "K",
|
||||
}
|
||||
"KC_L": {
|
||||
"key": "ES_L",
|
||||
"label": "L",
|
||||
}
|
||||
"KC_SCLN": {
|
||||
"key": "ES_NTIL",
|
||||
"label": "Ñ",
|
||||
}
|
||||
"KC_QUOT": {
|
||||
"key": "ES_LCBR",
|
||||
"label": "{",
|
||||
}
|
||||
"KC_NUHS": {
|
||||
"key": "ES_RCBR",
|
||||
"label": "}",
|
||||
}
|
||||
"KC_NUBS": {
|
||||
"key": "ES_LABK",
|
||||
"label": "<",
|
||||
}
|
||||
"KC_Z": {
|
||||
"key": "ES_Z",
|
||||
"label": "Z",
|
||||
}
|
||||
"KC_X": {
|
||||
"key": "ES_X",
|
||||
"label": "X",
|
||||
}
|
||||
"KC_C": {
|
||||
"key": "ES_C",
|
||||
"label": "C",
|
||||
}
|
||||
"KC_V": {
|
||||
"key": "ES_V",
|
||||
"label": "V",
|
||||
}
|
||||
"KC_B": {
|
||||
"key": "ES_B",
|
||||
"label": "B",
|
||||
}
|
||||
"KC_N": {
|
||||
"key": "ES_N",
|
||||
"label": "N",
|
||||
}
|
||||
"KC_M": {
|
||||
"key": "ES_M",
|
||||
"label": "M",
|
||||
}
|
||||
"KC_COMM": {
|
||||
"key": "ES_COMM",
|
||||
"label": ",",
|
||||
}
|
||||
"KC_DOT": {
|
||||
"key": "ES_DOT",
|
||||
"label": ".",
|
||||
}
|
||||
"KC_SLSH": {
|
||||
"key": "ES_MINS",
|
||||
"label": "-",
|
||||
}
|
||||
/* Shifted symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ° │ ! │ " │ # │ $ │ % │ & │ / │ ( │ ) │ = │ ? │ ¡ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ ¨ │ * │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ [ │ ] │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ > │ │ │ │ │ │ │ │ ; │ : │ _ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"S(ES_PIPE)": {
|
||||
"key": "ES_MORD",
|
||||
"label": "°",
|
||||
}
|
||||
"S(ES_1)": {
|
||||
"key": "ES_EXLM",
|
||||
"label": "!",
|
||||
}
|
||||
"S(ES_2)": {
|
||||
"key": "ES_DQUO",
|
||||
"label": "\"",
|
||||
}
|
||||
"S(ES_3)": {
|
||||
"key": "ES_NUMB",
|
||||
"label": "#",
|
||||
}
|
||||
"S(ES_4)": {
|
||||
"key": "ES_DLR",
|
||||
"label": "$",
|
||||
}
|
||||
"S(ES_5)": {
|
||||
"key": "ES_PERC",
|
||||
"label": "%",
|
||||
}
|
||||
"S(ES_6)": {
|
||||
"key": "ES_AMPR",
|
||||
"label": "&",
|
||||
}
|
||||
"S(ES_7)": {
|
||||
"key": "ES_SLSH",
|
||||
"label": "/",
|
||||
}
|
||||
"S(ES_8)": {
|
||||
"key": "ES_LPRN",
|
||||
"label": "(",
|
||||
}
|
||||
"S(ES_9)": {
|
||||
"key": "ES_RPRN",
|
||||
"label": ")",
|
||||
}
|
||||
"S(ES_0)": {
|
||||
"key": "ES_EQL",
|
||||
"label": "=",
|
||||
}
|
||||
"S(ES_QUOT)": {
|
||||
"key": "ES_QUES",
|
||||
"label": "?",
|
||||
}
|
||||
"S(ES_IQUE)": {
|
||||
"key": "ES_IEXL",
|
||||
"label": "¡",
|
||||
}
|
||||
"S(ES_ACUT)": {
|
||||
"key": "ES_DIAE",
|
||||
"label": "¨ (dead)",
|
||||
}
|
||||
"S(ES_PLUS)": {
|
||||
"key": "ES_ASTR",
|
||||
"label": "*",
|
||||
}
|
||||
"S(ES_LCBR)": {
|
||||
"key": "ES_LBRC",
|
||||
"label": "[",
|
||||
}
|
||||
"S(ES_RCBR)": {
|
||||
"key": "ES_RBRC",
|
||||
"label": "]",
|
||||
}
|
||||
"S(ES_LABK)": {
|
||||
"key": "ES_RABK",
|
||||
"label": ">",
|
||||
}
|
||||
"S(ES_COMM)": {
|
||||
"key": "ES_SCLN",
|
||||
"label": ";",
|
||||
}
|
||||
"S(ES_DOT)": {
|
||||
"key": "ES_COLN",
|
||||
"label": ":",
|
||||
}
|
||||
"S(ES_MINS)": {
|
||||
"key": "ES_UNDS",
|
||||
"label": "_",
|
||||
}
|
||||
/* AltGr symbols
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │ ¬ │ │ │ │ │ │ │ │ │ │ │ \ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │ │ @ │ │ │ │ │ │ │ │ │ │ │ ~ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ ^ │ ` │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤
|
||||
* │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*/
|
||||
"ALGR(ES_PIPE)": {
|
||||
"key": "ES_NOT",
|
||||
"label": "¬",
|
||||
}
|
||||
"ALGR(ES_QUOT)": {
|
||||
"key": "ES_BSLS",
|
||||
"label": "\\",
|
||||
}
|
||||
"ALGR(ES_Q)": {
|
||||
"key": "ES_AT",
|
||||
"label": "@",
|
||||
}
|
||||
"ALGR(ES_PLUS)": {
|
||||
"key": "ES_TILD",
|
||||
"label": "~",
|
||||
}
|
||||
"ALGR(ES_LCBR)": {
|
||||
"key": "ES_CIRC",
|
||||
"label": "^",
|
||||
}
|
||||
"ALGR(KC_NUHS)": {
|
||||
"key": "ES_GRV",
|
||||
"label": "`",
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,239 +0,0 @@
|
||||
{
|
||||
"keycodes": {
|
||||
"0x7810": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_ON",
|
||||
"aliases": [
|
||||
"LM_ON"
|
||||
]
|
||||
},
|
||||
"0x7811": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_OFF",
|
||||
"aliases": [
|
||||
"LM_OFF"
|
||||
]
|
||||
},
|
||||
"0x7812": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_TOGGLE",
|
||||
"aliases": [
|
||||
"LM_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7813": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_MODE_NEXT",
|
||||
"aliases": [
|
||||
"LM_NEXT"
|
||||
]
|
||||
},
|
||||
"0x7814": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_MODE_PREVIOUS",
|
||||
"aliases": [
|
||||
"LM_PREV"
|
||||
]
|
||||
},
|
||||
"0x7815": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_BRIGHTNESS_UP",
|
||||
"aliases": [
|
||||
"LM_BRIU"
|
||||
]
|
||||
},
|
||||
"0x7816": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_BRIGHTNESS_DOWN",
|
||||
"aliases": [
|
||||
"LM_BRID"
|
||||
]
|
||||
},
|
||||
"0x7817": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_SPEED_UP",
|
||||
"aliases": [
|
||||
"LM_SPDU"
|
||||
]
|
||||
},
|
||||
"0x7818": {
|
||||
"group": "led_matrix",
|
||||
"key": "QK_LED_MATRIX_SPEED_DOWN",
|
||||
"aliases": [
|
||||
"LM_SPDD"
|
||||
]
|
||||
},
|
||||
|
||||
"0x7820": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_TOGGLE",
|
||||
"aliases": [
|
||||
"UG_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7821": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_MODE_NEXT",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"UG_NEXT"
|
||||
]
|
||||
},
|
||||
"0x7822": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_MODE_PREVIOUS",
|
||||
"aliases": [
|
||||
"!reset!",
|
||||
"UG_PREV"
|
||||
]
|
||||
},
|
||||
"0x7823": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_HUE_UP",
|
||||
"aliases": [
|
||||
"UG_HUEU"
|
||||
]
|
||||
},
|
||||
"0x7824": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_HUE_DOWN",
|
||||
"aliases": [
|
||||
"UG_HUED"
|
||||
]
|
||||
},
|
||||
"0x7825": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_SATURATION_UP",
|
||||
"aliases": [
|
||||
"UG_SATU"
|
||||
]
|
||||
},
|
||||
"0x7826": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_SATURATION_DOWN",
|
||||
"aliases": [
|
||||
"UG_SATD"
|
||||
]
|
||||
},
|
||||
"0x7827": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_VALUE_UP",
|
||||
"aliases": [
|
||||
"UG_VALU"
|
||||
]
|
||||
},
|
||||
"0x7828": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_VALUE_DOWN",
|
||||
"aliases": [
|
||||
"UG_VALD"
|
||||
]
|
||||
},
|
||||
"0x7829": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_SPEED_UP",
|
||||
"aliases": [
|
||||
"UG_SPDU"
|
||||
]
|
||||
},
|
||||
"0x782A": {
|
||||
"group": "underglow",
|
||||
"key": "QK_UNDERGLOW_SPEED_DOWN",
|
||||
"aliases": [
|
||||
"UG_SPDD"
|
||||
]
|
||||
},
|
||||
|
||||
"0x7840": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_ON",
|
||||
"aliases": [
|
||||
"RM_ON"
|
||||
]
|
||||
},
|
||||
"0x7841": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_OFF",
|
||||
"aliases": [
|
||||
"RM_OFF"
|
||||
]
|
||||
},
|
||||
"0x7842": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_TOGGLE",
|
||||
"aliases": [
|
||||
"RM_TOGG"
|
||||
]
|
||||
},
|
||||
"0x7843": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_MODE_NEXT",
|
||||
"aliases": [
|
||||
"RM_NEXT"
|
||||
]
|
||||
},
|
||||
"0x7844": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_MODE_PREVIOUS",
|
||||
"aliases": [
|
||||
"RM_PREV"
|
||||
]
|
||||
},
|
||||
"0x7845": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_HUE_UP",
|
||||
"aliases": [
|
||||
"RM_HUEU"
|
||||
]
|
||||
},
|
||||
"0x7846": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_HUE_DOWN",
|
||||
"aliases": [
|
||||
"RM_HUED"
|
||||
]
|
||||
},
|
||||
"0x7847": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_SATURATION_UP",
|
||||
"aliases": [
|
||||
"RM_SATU"
|
||||
]
|
||||
},
|
||||
"0x7848": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_SATURATION_DOWN",
|
||||
"aliases": [
|
||||
"RM_SATD"
|
||||
]
|
||||
},
|
||||
"0x7849": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_VALUE_UP",
|
||||
"aliases": [
|
||||
"RM_VALU"
|
||||
]
|
||||
},
|
||||
"0x784A": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_VALUE_DOWN",
|
||||
"aliases": [
|
||||
"RM_VALD"
|
||||
]
|
||||
},
|
||||
"0x784B": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_SPEED_UP",
|
||||
"aliases": [
|
||||
"RM_SPDU"
|
||||
]
|
||||
},
|
||||
"0x784C": {
|
||||
"group": "rgb_matrix",
|
||||
"key": "QK_RGB_MATRIX_SPEED_DOWN",
|
||||
"aliases": [
|
||||
"RM_SPDD"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,89 +1,84 @@
|
||||
{
|
||||
"development_board": {
|
||||
"bit_c_pro": {
|
||||
"board": "QMK_PM2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"blackpill_f401": {
|
||||
"board": "BLACKPILL_STM32_F401",
|
||||
"bootloader": "stm32-dfu",
|
||||
"processor": "STM32F401"
|
||||
},
|
||||
"blackpill_f411": {
|
||||
"board": "BLACKPILL_STM32_F411",
|
||||
"bootloader": "stm32-dfu",
|
||||
"processor": "STM32F411"
|
||||
},
|
||||
"blok": {
|
||||
"board": "QMK_BLOK",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"bluepill": {
|
||||
"board": "STM32_F103_STM32DUINO",
|
||||
"bootloader": "stm32duino",
|
||||
"processor": "STM32F103"
|
||||
},
|
||||
"bonsai_c4": {
|
||||
"board": "BONSAI_C4",
|
||||
"bootloader": "stm32-dfu",
|
||||
"processor": "STM32F411"
|
||||
"promicro": {
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "caterina",
|
||||
"pin_compatible": "promicro"
|
||||
},
|
||||
"elite_c": {
|
||||
"processor": "atmega32u4",
|
||||
"bootloader": "atmel-dfu",
|
||||
"pin_compatible": "promicro",
|
||||
"processor": "atmega32u4"
|
||||
"pin_compatible": "promicro"
|
||||
},
|
||||
"elite_pi": {
|
||||
"board": "QMK_PM2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"helios": {
|
||||
"board": "QMK_PM2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"imera": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"proton_c": {
|
||||
"processor": "STM32F303",
|
||||
"bootloader": "stm32-dfu",
|
||||
"board": "QMK_PROTON_C"
|
||||
},
|
||||
"kb2040": {
|
||||
"board": "QMK_PM2040",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"liatris": {
|
||||
"board": "QMK_PM2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"michi": {
|
||||
"board": "QMK_PM2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
},
|
||||
"promicro": {
|
||||
"bootloader": "caterina",
|
||||
"pin_compatible": "promicro",
|
||||
"processor": "atmega32u4"
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"promicro_rp2040": {
|
||||
"board": "QMK_PM2040",
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"processor": "RP2040"
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"proton_c": {
|
||||
"board": "QMK_PROTON_C",
|
||||
"blok": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_BLOK"
|
||||
},
|
||||
"michi": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"bit_c_pro": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"bluepill": {
|
||||
"processor": "STM32F103",
|
||||
"bootloader": "stm32duino",
|
||||
"board": "STM32_F103_STM32DUINO"
|
||||
},
|
||||
"blackpill_f401": {
|
||||
"processor": "STM32F401",
|
||||
"bootloader": "stm32-dfu",
|
||||
"processor": "STM32F303"
|
||||
"board": "BLACKPILL_STM32_F401"
|
||||
},
|
||||
"blackpill_f411": {
|
||||
"processor": "STM32F411",
|
||||
"bootloader": "stm32-dfu",
|
||||
"board": "BLACKPILL_STM32_F411"
|
||||
},
|
||||
"stemcell": {
|
||||
"board": "STEMCELL",
|
||||
"processor": "STM32F411",
|
||||
"bootloader": "tinyuf2",
|
||||
"processor": "STM32F411"
|
||||
"board": "STEMCELL"
|
||||
},
|
||||
"bonsai_c4": {
|
||||
"processor": "STM32F411",
|
||||
"bootloader": "stm32-dfu",
|
||||
"board": "BONSAI_C4"
|
||||
},
|
||||
"helios": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_PM2040"
|
||||
},
|
||||
"liatris": {
|
||||
"processor": "RP2040",
|
||||
"bootloader": "rp2040",
|
||||
"board": "QMK_PM2040"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{
|
||||
// Format:
|
||||
// <config.h key>: {"info_key": <info.json key>, ["value_type": <value_type>], ["to_json": <true/false>], ["to_c": <true/false>]}
|
||||
// value_type: one of "array", "array.int", "bool, "flag", "int", "hex", "list", "mapping", "str", "raw"
|
||||
// value_type: one of "array", "array.int", "bool", "int", "hex", "list", "mapping", "str", "raw"
|
||||
// to_json: Default `true`. Set to `false` to exclude this mapping from info.json
|
||||
// to_c: Default `true`. Set to `false` to exclude this mapping from config.h
|
||||
// warn_duplicate: Default `true`. Set to `false` to turn off warning when a value exists in both places
|
||||
@@ -17,53 +17,38 @@
|
||||
"APA102_DI_PIN": {"info_key": "apa102.data_pin"},
|
||||
|
||||
// Audio
|
||||
"AUDIO_DEFAULT_ON": {"info_key": "audio.default.on", "value_type": "bool"},
|
||||
"AUDIO_DEFAULT_CLICKY_ON": {"info_key": "audio.default.clicky", "value_type": "bool"},
|
||||
"AUDIO_POWER_CONTROL_PIN": {"info_key": "audio.power_control.pin"},
|
||||
"AUDIO_POWER_CONTROL_PIN_ON_STATE": {"info_key": "audio.power_control.on_state", "value_type": "int" },
|
||||
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "flag"},
|
||||
"SENDSTRING_BELL": {"info_key": "audio.macro_beep", "value_type": "flag"},
|
||||
"AUDIO_VOICES": {"info_key": "audio.voices", "value_type": "bool"},
|
||||
"SENDSTRING_BELL": {"info_key": "audio.macro_beep", "value_type": "bool"},
|
||||
|
||||
// Backlight
|
||||
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "flag"},
|
||||
"BACKLIGHT_CAPS_LOCK": {"info_key": "backlight.as_caps_lock", "value_type": "flag"},
|
||||
"BACKLIGHT_BREATHING": {"info_key": "backlight.breathing", "value_type": "bool"},
|
||||
"BACKLIGHT_CAPS_LOCK": {"info_key": "backlight.as_caps_lock", "value_type": "bool"},
|
||||
"BACKLIGHT_LEVELS": {"info_key": "backlight.levels", "value_type": "int"},
|
||||
"BACKLIGHT_LIMIT_VAL": {"info_key": "backlight.max_brightness", "value_type": "int"},
|
||||
"BACKLIGHT_ON_STATE": {"info_key": "backlight.on_state", "value_type": "int"},
|
||||
"BACKLIGHT_PIN": {"info_key": "backlight.pin"},
|
||||
"BACKLIGHT_PINS": {"info_key": "backlight.pins", "value_type": "array"},
|
||||
"BREATHING_PERIOD": {"info_key": "backlight.breathing_period", "value_type": "int"},
|
||||
"BACKLIGHT_DEFAULT_ON": {"info_key": "backlight.default.on", "value_type": "bool"},
|
||||
"BACKLIGHT_DEFAULT_BREATHING": {"info_key": "backlight.default.breathing", "value_type": "bool"},
|
||||
"BACKLIGHT_DEFAULT_LEVEL": {"info_key": "backlight.default.brightness", "value_type": "int"},
|
||||
|
||||
// Bootmagic
|
||||
"BOOTMAGIC_COLUMN": {"info_key": "bootmagic.matrix.1", "value_type": "int"},
|
||||
"BOOTMAGIC_COLUMN_RIGHT": {"info_key": "split.bootmagic.matrix.1", "value_type": "int"},
|
||||
"BOOTMAGIC_ROW": {"info_key": "bootmagic.matrix.0", "value_type": "int"},
|
||||
"BOOTMAGIC_ROW_RIGHT": {"info_key": "split.bootmagic.matrix.0", "value_type": "int"},
|
||||
"BOOTMAGIC_LITE_COLUMN": {"info_key": "bootmagic.matrix.1", "value_type": "int"},
|
||||
"BOOTMAGIC_LITE_COLUMN_RIGHT": {"info_key": "split.bootmagic.matrix.1", "value_type": "int"},
|
||||
"BOOTMAGIC_LITE_ROW": {"info_key": "bootmagic.matrix.0", "value_type": "int"},
|
||||
"BOOTMAGIC_LITE_ROW_RIGHT": {"info_key": "split.bootmagic.matrix.0", "value_type": "int"},
|
||||
|
||||
// Caps Word
|
||||
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "flag"},
|
||||
"BOTH_SHIFTS_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.both_shifts_turns_on", "value_type": "bool"},
|
||||
"CAPS_WORD_IDLE_TIMEOUT": {"info_key": "caps_word.idle_timeout", "value_type": "int"},
|
||||
"CAPS_WORD_INVERT_ON_SHIFT": {"info_key": "caps_word.invert_on_shift", "value_type": "flag"},
|
||||
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "flag"},
|
||||
"CAPS_WORD_INVERT_ON_SHIFT": {"info_key": "caps_word.invert_on_shift", "value_type": "bool"},
|
||||
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"},
|
||||
|
||||
// Combos
|
||||
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
|
||||
|
||||
"DIP_SWITCH_MATRIX_GRID": {"info_key": "dip_switch.matrix_grid", "value_type": "array.array.int", "to_json": false},
|
||||
"DIP_SWITCH_PINS": {"info_key": "dip_switch.pins", "value_type": "array"},
|
||||
"DIP_SWITCH_PINS_RIGHT": {"info_key": "split.dip_switch.right.pins", "value_type": "array"},
|
||||
|
||||
// Dynamic Keymap
|
||||
"DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"},
|
||||
"DYNAMIC_KEYMAP_LAYER_COUNT": {"info_key": "dynamic_keymap.layer_count", "value_type": "int"},
|
||||
|
||||
// EEPROM
|
||||
"WEAR_LEVELING_BACKING_SIZE": {"info_key": "eeprom.wear_leveling.backing_size", "value_type": "int", "to_json": false},
|
||||
"WEAR_LEVELING_LOGICAL_SIZE": {"info_key": "eeprom.wear_leveling.logical_size", "value_type": "int", "to_json": false},
|
||||
|
||||
// Layer locking
|
||||
"LAYER_LOCK_IDLE_TIMEOUT": {"info_key": "layer_lock.timeout", "value_type": "int"},
|
||||
|
||||
@@ -76,29 +61,18 @@
|
||||
"LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"},
|
||||
|
||||
// Leader Key
|
||||
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "flag"},
|
||||
"LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "flag"},
|
||||
"LEADER_PER_KEY_TIMING": {"info_key": "leader_key.timing", "value_type": "bool"},
|
||||
"LEADER_KEY_STRICT_KEY_PROCESSING": {"info_key": "leader_key.strict_processing", "value_type": "bool"},
|
||||
"LEADER_TIMEOUT": {"info_key": "leader_key.timeout", "value_type": "int"},
|
||||
|
||||
// LED Matrix
|
||||
"LED_MATRIX_CENTER": {"info_key": "led_matrix.center_point", "value_type": "array.int"},
|
||||
"LED_MATRIX_KEYRELEASES": {"info_key": "led_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"LED_MATRIX_LED_FLUSH_LIMIT": {"info_key": "led_matrix.led_flush_limit", "value_type": "int"},
|
||||
"LED_MATRIX_LED_PROCESS_LIMIT": {"info_key": "led_matrix.led_process_limit", "value_type": "int", "to_json": false},
|
||||
"LED_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "led_matrix.max_brightness", "value_type": "int"},
|
||||
"LED_MATRIX_SLEEP": {"info_key": "led_matrix.sleep", "value_type": "flag"},
|
||||
"LED_MATRIX_SPD_STEP": {"info_key": "led_matrix.speed_steps", "value_type": "int"},
|
||||
"LED_MATRIX_SPLIT": {"info_key": "led_matrix.split_count", "value_type": "array.int"},
|
||||
"LED_MATRIX_TIMEOUT": {"info_key": "led_matrix.timeout", "value_type": "int"},
|
||||
"LED_MATRIX_VAL_STEP": {"info_key": "led_matrix.val_steps", "value_type": "int"},
|
||||
"LED_MATRIX_LED_COUNT": {"info_key": "led_matrix.led_count", "value_type": "int", "to_json": false},
|
||||
"LED_MATRIX_DEFAULT_ON": {"info_key": "led_matrix.default.on", "value_type": "bool"},
|
||||
"LED_MATRIX_DEFAULT_VAL": {"info_key": "led_matrix.default.val", "value_type": "int"},
|
||||
"LED_MATRIX_DEFAULT_SPD": {"info_key": "led_matrix.default.speed", "value_type": "int"},
|
||||
|
||||
// Locking Switch
|
||||
"LOCKING_SUPPORT_ENABLE": {"info_key": "qmk.locking.enabled", "value_type": "flag"},
|
||||
"LOCKING_RESYNC_ENABLE": {"info_key": "qmk.locking.resync", "value_type": "flag"},
|
||||
|
||||
// LUFA Bootloader
|
||||
"QMK_ESC_INPUT": {"info_key": "qmk_lufa_bootloader.esc_input"},
|
||||
@@ -109,7 +83,7 @@
|
||||
// Matrix
|
||||
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
|
||||
"DIODE_DIRECTION": {"info_key": "diode_direction"},
|
||||
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "flag"},
|
||||
"MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"},
|
||||
"MATRIX_INPUT_PRESSED_STATE": {"info_key": "matrix_pins.input_pressed_state", "value_type": "int"},
|
||||
"MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"},
|
||||
|
||||
@@ -131,42 +105,29 @@
|
||||
// RGB Matrix
|
||||
"RGB_MATRIX_CENTER": {"info_key": "rgb_matrix.center_point", "value_type": "array.int"},
|
||||
"RGB_MATRIX_HUE_STEP": {"info_key": "rgb_matrix.hue_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_KEYRELEASES": {"info_key": "rgb_matrix.react_on_keyup", "value_type": "flag"},
|
||||
"RGB_MATRIX_LED_FLUSH_LIMIT": {"info_key": "rgb_matrix.led_flush_limit", "value_type": "int"},
|
||||
"RGB_MATRIX_LED_PROCESS_LIMIT": {"info_key": "rgb_matrix.led_process_limit", "value_type": "int", "to_json": false},
|
||||
"RGB_MATRIX_MAXIMUM_BRIGHTNESS": {"info_key": "rgb_matrix.max_brightness", "value_type": "int"},
|
||||
"RGB_MATRIX_SAT_STEP": {"info_key": "rgb_matrix.sat_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_SLEEP": {"info_key": "rgb_matrix.sleep", "value_type": "flag"},
|
||||
"RGB_MATRIX_SPD_STEP": {"info_key": "rgb_matrix.speed_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_SPLIT": {"info_key": "rgb_matrix.split_count", "value_type": "array.int"},
|
||||
"RGB_MATRIX_TIMEOUT": {"info_key": "rgb_matrix.timeout", "value_type": "int"},
|
||||
"RGB_MATRIX_VAL_STEP": {"info_key": "rgb_matrix.val_steps", "value_type": "int"},
|
||||
"RGB_MATRIX_LED_COUNT": {"info_key": "rgb_matrix.led_count", "value_type": "int", "to_json": false},
|
||||
"RGB_MATRIX_DEFAULT_ON": {"info_key": "rgb_matrix.default.on", "value_type": "bool"},
|
||||
"RGB_MATRIX_DEFAULT_HUE": {"info_key": "rgb_matrix.default.hue", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_SAT": {"info_key": "rgb_matrix.default.sat", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_VAL": {"info_key": "rgb_matrix.default.val", "value_type": "int"},
|
||||
"RGB_MATRIX_DEFAULT_SPD": {"info_key": "rgb_matrix.default.speed", "value_type": "int"},
|
||||
|
||||
// RGBLight
|
||||
"RGBLED_NUM": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLED_SPLIT": {"info_key": "rgblight.split_count", "value_type": "array.int"},
|
||||
"RGBLIGHT_HUE_STEP": {"info_key": "rgblight.hue_steps", "value_type": "int"},
|
||||
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "flag"},
|
||||
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "flag"},
|
||||
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "flag"},
|
||||
"RGBLIGHT_LED_COUNT": {"info_key": "rgblight.led_count", "value_type": "int"},
|
||||
"RGBLIGHT_LAYER_BLINK": {"info_key": "rgblight.layers.blink", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS": {"info_key": "rgblight.layers.enabled", "value_type": "bool"},
|
||||
"RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF": {"info_key": "rgblight.layers.override_rgb", "value_type": "bool"},
|
||||
"RGBLIGHT_LED_MAP": {"info_key": "rgblight.led_map", "value_type": "array.int"},
|
||||
"RGBLIGHT_LIMIT_VAL": {"info_key": "rgblight.max_brightness", "value_type": "int"},
|
||||
"RGBLIGHT_MAX_LAYERS": {"info_key": "rgblight.layers.max", "value_type": "int"},
|
||||
"RGBLIGHT_SAT_STEP": {"info_key": "rgblight.saturation_steps", "value_type": "int"},
|
||||
"RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "flag"},
|
||||
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "flag"},
|
||||
"RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"},
|
||||
"RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"},
|
||||
"RGBLIGHT_VAL_STEP": {"info_key": "rgblight.brightness_steps", "value_type": "int"},
|
||||
"RGBLIGHT_DEFAULT_ON": {"info_key": "rgblight.default.on", "value_type": "bool"},
|
||||
"RGBLIGHT_DEFAULT_HUE": {"info_key": "rgblight.default.hue", "value_type": "int"},
|
||||
"RGBLIGHT_DEFAULT_SAT": {"info_key": "rgblight.default.sat", "value_type": "int"},
|
||||
"RGBLIGHT_DEFAULT_VAL": {"info_key": "rgblight.default.val", "value_type": "int"},
|
||||
"RGBLIGHT_DEFAULT_SPD": {"info_key": "rgblight.default.speed", "value_type": "int"},
|
||||
"RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"},
|
||||
|
||||
// Secure
|
||||
"SECURE_IDLE_TIMEOUT": {"info_key": "secure.idle_timeout", "value_type": "int"},
|
||||
@@ -176,41 +137,29 @@
|
||||
// Split Keyboard
|
||||
"SOFT_SERIAL_PIN": {"info_key": "split.soft_serial_pin"},
|
||||
"SOFT_SERIAL_SPEED": {"info_key": "split.soft_serial_speed"},
|
||||
"SPLIT_HAND_MATRIX_GRID": {"info_key": "split.handedness.matrix_grid", "value_type": "array", "to_c": false},
|
||||
"SPLIT_HAND_PIN": {"info_key": "split.handedness.pin"},
|
||||
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "flag"},
|
||||
"SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync_modifiers", "value_type": "bool"},
|
||||
"SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync_matrix_state", "value_type": "bool"},
|
||||
"SPLIT_USB_DETECT": {"info_key": "split.usb_detect.enabled", "value_type": "bool"},
|
||||
"SPLIT_USB_TIMEOUT": {"info_key": "split.usb_detect.timeout", "value_type": "int"},
|
||||
"SPLIT_USB_TIMEOUT_POLL": {"info_key": "split.usb_detect.polling_interval", "value_type": "int"},
|
||||
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "flag"},
|
||||
"SPLIT_WATCHDOG_ENABLE": {"info_key": "split.transport.watchdog", "value_type": "bool"},
|
||||
"SPLIT_WATCHDOG_TIMEOUT": {"info_key": "split.transport.watchdog_timeout", "value_type": "int"},
|
||||
"SPLIT_ACTIVITY_ENABLE": {"info_key": "split.transport.sync.activity", "value_type": "flag"},
|
||||
"SPLIT_DETECTED_OS_ENABLE": {"info_key": "split.transport.sync.detected_os", "value_type": "flag"},
|
||||
"SPLIT_HAPTIC_ENABLE": {"info_key": "split.transport.sync.haptic", "value_type": "flag"},
|
||||
"SPLIT_LAYER_STATE_ENABLE": {"info_key": "split.transport.sync.layer_state", "value_type": "flag"},
|
||||
"SPLIT_LED_STATE_ENABLE": {"info_key": "split.transport.sync.indicators", "value_type": "flag"},
|
||||
"SPLIT_TRANSPORT_MIRROR": {"info_key": "split.transport.sync.matrix_state", "value_type": "flag"},
|
||||
"SPLIT_MODS_ENABLE": {"info_key": "split.transport.sync.modifiers", "value_type": "flag"},
|
||||
"SPLIT_OLED_ENABLE": {"info_key": "split.transport.sync.oled", "value_type": "flag"},
|
||||
"SPLIT_ST7565_ENABLE": {"info_key": "split.transport.sync.st7565", "value_type": "flag"},
|
||||
"SPLIT_WPM_ENABLE": {"info_key": "split.transport.sync.wpm", "value_type": "flag"},
|
||||
|
||||
// Tapping
|
||||
"CHORDAL_HOLD": {"info_key": "tapping.chordal_hold", "value_type": "flag"},
|
||||
"FLOW_TAP_TERM": {"info_key": "tapping.flow_tap_term", "value_type": "int"},
|
||||
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "flag"},
|
||||
"HOLD_ON_OTHER_KEY_PRESS_PER_KEY": {"info_key": "tapping.hold_on_other_key_press_per_key", "value_type": "flag"},
|
||||
"PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "flag"},
|
||||
"PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "flag"},
|
||||
"RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "flag"},
|
||||
"RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "flag"},
|
||||
"HOLD_ON_OTHER_KEY_PRESS": {"info_key": "tapping.hold_on_other_key_press", "value_type": "bool"},
|
||||
"HOLD_ON_OTHER_KEY_PRESS_PER_KEY": {"info_key": "tapping.hold_on_other_key_press_per_key", "value_type": "bool"},
|
||||
"PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"},
|
||||
"PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"},
|
||||
"RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"},
|
||||
"RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"},
|
||||
"TAP_CODE_DELAY": {"info_key": "qmk.tap_keycode_delay", "value_type": "int"},
|
||||
"TAP_HOLD_CAPS_DELAY": {"info_key": "qmk.tap_capslock_delay", "value_type": "int"},
|
||||
"TAPPING_TERM": {"info_key": "tapping.term", "value_type": "int"},
|
||||
"TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "flag"},
|
||||
"TAPPING_TERM_PER_KEY": {"info_key": "tapping.term_per_key", "value_type": "bool"},
|
||||
"TAPPING_TOGGLE": {"info_key": "tapping.toggle", "value_type": "int"},
|
||||
|
||||
// USB
|
||||
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "flag"},
|
||||
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
|
||||
"USB_MAX_POWER_CONSUMPTION": {"info_key": "usb.max_power", "value_type": "int"},
|
||||
"USB_POLLING_INTERVAL_MS": {"info_key": "usb.polling_interval", "value_type": "int"},
|
||||
"USB_SUSPEND_WAKEUP_DELAY": {"info_key": "usb.suspend_wakeup_delay", "value_type": "int"},
|
||||
@@ -219,26 +168,22 @@
|
||||
"WS2812_DI_PIN": {"info_key": "ws2812.pin"},
|
||||
"WS2812_I2C_ADDRESS": {"info_key": "ws2812.i2c_address", "value_type": "hex"},
|
||||
"WS2812_I2C_TIMEOUT": {"info_key": "ws2812.i2c_timeout", "value_type": "int"},
|
||||
"WS2812_RGBW": {"info_key": "ws2812.rgbw", "value_type": "flag"},
|
||||
|
||||
"LAYOUTS": {"info_key": "layout_aliases", "value_type": "mapping"},
|
||||
|
||||
// Items we want flagged in lint
|
||||
"DEBOUNCING_DELAY": {"info_key": "_invalid.debouncing_delay", "invalid": true, "replace_with": "DEBOUNCE"},
|
||||
"DESCRIPTION": {"info_key": "_invalid.usb_description", "invalid": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "flag", "invalid": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true},
|
||||
"LED_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "_invalid.led_matrix_sleep", "invalid": true, "replace_with": "LED_MATRIX_SLEEP"},
|
||||
"IGNORE_MOD_TAP_INTERRUPT": {"info_key": "_invalid.ignore_mod_tap_interrupt", "value_type": "bool", "invalid": true},
|
||||
"IGNORE_MOD_TAP_INTERRUPT_PER_KEY": {"info_key": "_invalid.ignore_mod_tap_interrupt_per_key", "invalid": true}
|
||||
"NO_ACTION_FUNCTION": {"info_key": "_invalid.no_action_function", "invalid": true},
|
||||
"NO_ACTION_MACRO": {"info_key": "_invalid.no_action_macro", "invalid": true},
|
||||
"PREVENT_STUCK_MODIFIERS": {"info_key": "_invalid.prevent_stuck_mods", "invalid": true},
|
||||
"QMK_KEYS_PER_SCAN": {"info_key": "qmk.keys_per_scan", "value_type": "int", "deprecated": true},
|
||||
"RGB_DI_PIN": {"info_key": "rgblight.pin", "invalid": true, "replace_with": "WS2812_DI_PIN or APA102_DI_PIN"},
|
||||
"RGBW": {"info_key": "rgblight.rgbw", "invalid": true, "replace_with": "WS2812_RGBW"},
|
||||
"RGB_DISABLE_WHEN_USB_SUSPENDED": {"info_key": "_invalid.rgb_matrix_sleep", "invalid": true, "replace_with": "RGB_MATRIX_SLEEP"},
|
||||
"RGBLIGHT_ANIMATIONS": {"info_key": "_invalid.rgblight.animations.all", "value_type": "flag", "invalid": true},
|
||||
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "flag", "deprecated": true},
|
||||
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "flag", "deprecated": true},
|
||||
"RGBLIGHT_ANIMATIONS": {"info_key": "_invalid.rgblight.animations.all", "value_type": "bool", "invalid": true},
|
||||
"TAPPING_FORCE_HOLD": {"info_key": "tapping.force_hold", "value_type": "bool", "deprecated": true},
|
||||
"TAPPING_FORCE_HOLD_PER_KEY": {"info_key": "tapping.force_hold_per_key", "value_type": "bool", "deprecated": true},
|
||||
"UNUSED_PINS": {"info_key": "_invalid.unused_pins", "deprecated": true},
|
||||
"COMBO_COUNT": {"info_key": "_invalid.combo.count", "invalid": true},
|
||||
|
||||
@@ -248,9 +193,4 @@
|
||||
"PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false, "value_type": "str", "deprecated": true, "replace_with": "`keyboard_name` in info.json"},
|
||||
"PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.pid` in info.json"},
|
||||
"VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex", "deprecated": true, "replace_with": "`usb.vid` in info.json"},
|
||||
|
||||
// Items we want flagged in lint
|
||||
"VIAL_KEYBOARD_UID": {"info_key": "_invalid.vial_uid", "invalid": true},
|
||||
"VIAL_UNLOCK_COMBO_COLS": {"info_key": "_invalid.vial_unlock_cols", "invalid": true},
|
||||
"VIAL_UNLOCK_COMBO_ROWS": {"info_key": "_invalid.vial_unlock_rows", "invalid": true}
|
||||
}
|
||||
|
||||
@@ -11,20 +11,16 @@
|
||||
// invalid: Default `false`. Set to `true` to generate errors when a value exists
|
||||
// replace_with: use with a key marked deprecated or invalid to designate a replacement
|
||||
|
||||
"AUDIO_DRIVER": {"info_key": "audio.driver"},
|
||||
"BACKLIGHT_DRIVER": {"info_key": "backlight.driver"},
|
||||
"BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"},
|
||||
"BOARD": {"info_key": "board"},
|
||||
"BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false},
|
||||
"BOOTMAGIC_ENABLE": {"info_key": "bootmagic.enabled", "value_type": "bool"},
|
||||
"CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"},
|
||||
"DIP_SWITCH_ENABLE": {"info_key": "dip_switch.enabled", "value_type": "bool"},
|
||||
"DEBOUNCE_TYPE": {"info_key": "build.debounce_type"},
|
||||
"EEPROM_DRIVER": {"info_key": "eeprom.driver"},
|
||||
"ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"},
|
||||
"ENCODER_DRIVER": {"info_key": "encoder.driver"},
|
||||
"FIRMWARE_FORMAT": {"info_key": "build.firmware_format"},
|
||||
"HAPTIC_DRIVER": {"info_key": "haptic.driver"},
|
||||
"KEYBOARD_SHARED_EP": {"info_key": "usb.shared_endpoint.keyboard", "value_type": "bool"},
|
||||
"LAYOUTS": {"info_key": "community_layouts", "value_type": "list"},
|
||||
"LED_MATRIX_DRIVER": {"info_key": "led_matrix.driver"},
|
||||
@@ -45,8 +41,7 @@
|
||||
"SPLIT_TRANSPORT": {"info_key": "split.transport.protocol", "to_c": false},
|
||||
"STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"},
|
||||
"STENO_PROTOCOL": {"info_key": "stenography.protocol"},
|
||||
"USB_WAIT_FOR_ENUMERATION": {"info_key": "usb.wait_for_enumeration", "value_type": "bool"},
|
||||
"WEAR_LEVELING_DRIVER": {"info_key": "eeprom.wear_leveling.driver"},
|
||||
"WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"},
|
||||
"WS2812_DRIVER": {"info_key": "ws2812.driver"},
|
||||
|
||||
// Items we want flagged in lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,25 +3,10 @@
|
||||
"$id": "qmk.definitions.v1",
|
||||
"title": "Common definitions used across QMK's jsonschemas.",
|
||||
"type": "object",
|
||||
"bcd_version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
|
||||
},
|
||||
"bit": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
},
|
||||
"boolean_array": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"build_target": {
|
||||
"oneOf": [
|
||||
{"$ref": "#/keyboard_keymap_tuple"},
|
||||
{"$ref": "#/json_file_path"}
|
||||
]
|
||||
},
|
||||
"filename": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
@@ -35,57 +20,14 @@
|
||||
"type": "string",
|
||||
"pattern": "^0x[0-9A-F]{4}$"
|
||||
},
|
||||
"json_file_path": {
|
||||
"bcd_version": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-z_/\\-]+\\.json$"
|
||||
"pattern": "^[0-9]{1,2}\\.[0-9]\\.[0-9]$"
|
||||
},
|
||||
"key_unit": {
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
},
|
||||
"keyboard": {
|
||||
"text_identifier": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-z][0-9a-z_/]*$"
|
||||
},
|
||||
"keyboard_keymap_tuple": {
|
||||
"type": "array",
|
||||
"prefixItems": [
|
||||
{"$ref": "#/keyboard"},
|
||||
{"$ref": "#/filename"}
|
||||
],
|
||||
"unevaluatedItems": false
|
||||
},
|
||||
"keycode": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
},
|
||||
"keycode_decl": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {"$ref": "#/keycode"},
|
||||
"label": {"$ref": "#/text_identifier"},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "#/keycode_short"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycode_decl_array": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "#/keycode_decl"}
|
||||
},
|
||||
"keycode_short": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 7,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
"minLength": 1,
|
||||
"maxLength": 250
|
||||
},
|
||||
"layout_macro": {
|
||||
"oneOf": [
|
||||
@@ -122,6 +64,49 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"key_unit": {
|
||||
"type": "number"
|
||||
},
|
||||
"keyboard": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9a-z][0-9a-z_/]*$"
|
||||
},
|
||||
"keycode": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 50,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
},
|
||||
"keycode_short": {
|
||||
"type": "string",
|
||||
"minLength": 2,
|
||||
"maxLength": 7,
|
||||
"pattern": "^[A-Z][A-Zs_0-9]*$"
|
||||
},
|
||||
"keycode_decl": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"key"
|
||||
],
|
||||
"properties": {
|
||||
"key": {"$ref": "#/keycode"},
|
||||
"label": {"$ref": "#/text_identifier"},
|
||||
"aliases": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {"$ref": "#/keycode_short"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"keycode_decl_array": {
|
||||
"type": "array",
|
||||
"minItems": 1
|
||||
"items": {"$ref": "#/keycode_decl"}
|
||||
},
|
||||
"mcu_pin_array": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "#/mcu_pin"}
|
||||
},
|
||||
"mcu_pin": {
|
||||
"oneOf": [
|
||||
{
|
||||
@@ -140,14 +125,14 @@
|
||||
"type": "string",
|
||||
"pattern": "^GP\\d{1,2}$"
|
||||
},
|
||||
{"type": "integer"},
|
||||
{"type": "null"}
|
||||
{
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
]
|
||||
},
|
||||
"mcu_pin_array": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "#/mcu_pin"}
|
||||
},
|
||||
"signed_decimal": {
|
||||
"type": "number"
|
||||
},
|
||||
@@ -159,22 +144,17 @@
|
||||
"minimum": -127,
|
||||
"maximum": 127
|
||||
},
|
||||
"snake_case": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z][a-z0-9_]*$"
|
||||
},
|
||||
"string_array": {
|
||||
"type": "array",
|
||||
"items": {"type": "string"}
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"string_object": {
|
||||
"type": "object",
|
||||
"additionalProperties": {"type": "string"}
|
||||
},
|
||||
"text_identifier": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 250
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"unsigned_decimal": {
|
||||
"type": "number",
|
||||
@@ -188,5 +168,10 @@
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 255
|
||||
},
|
||||
"bit": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,10 +6,6 @@
|
||||
"encoder_config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["custom", "quadrature"]
|
||||
},
|
||||
"rotary": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -24,16 +20,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dip_switch_config": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"not": {"required": ["vendorId", "productId"]}, // reject via keys...
|
||||
"not": { "required": [ "vendorId", "productId" ] }, // reject via keys...
|
||||
"properties": {
|
||||
"keyboard_name": {"$ref": "qmk.definitions.v1#/text_identifier"},
|
||||
"keyboard_folder": {"$ref": "qmk.definitions.v1#/keyboard"},
|
||||
@@ -45,7 +35,7 @@
|
||||
},
|
||||
"development_board": {
|
||||
"type": "string",
|
||||
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris", "imera"]
|
||||
"enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "michi", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4", "helios", "liatris"]
|
||||
},
|
||||
"pin_compatible": {
|
||||
"type": "string",
|
||||
@@ -90,6 +80,7 @@
|
||||
"STM32L442",
|
||||
"STM32L443",
|
||||
"GD32VF103",
|
||||
"GD32F303",
|
||||
"WB32F3G71",
|
||||
"WB32FQ95",
|
||||
"atmega16u2",
|
||||
@@ -125,28 +116,8 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"clicky": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["dac_additive", "dac_basic", "pwm_software", "pwm_hardware"]
|
||||
},
|
||||
"macro_beep": {"type": "boolean"},
|
||||
"pins": {"$ref": "qmk.definitions.v1#/mcu_pin_array"},
|
||||
"power_control": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on_state": {"$ref": "qmk.definitions.v1#/bit"},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
}
|
||||
},
|
||||
"voices": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
@@ -156,16 +127,7 @@
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["custom", "pwm", "software", "timer"]
|
||||
},
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"breathing": {"type": "boolean"},
|
||||
"brightness": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
"enum": ["pwm", "software", "timer", "custom"]
|
||||
},
|
||||
"breathing": {"type": "boolean"},
|
||||
"breathing_period": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
@@ -222,6 +184,7 @@
|
||||
"custom",
|
||||
"gd32v-dfu",
|
||||
"halfkay",
|
||||
"ignition",
|
||||
"kiibohd",
|
||||
"lufa-dfu",
|
||||
"lufa-ms",
|
||||
@@ -284,40 +247,9 @@
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/filename"}
|
||||
},
|
||||
"dip_switch": {
|
||||
"$ref": "#/definitions/dip_switch_config",
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"matrix_grid": {
|
||||
"type": "array",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2,
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eeprom": {
|
||||
"properties": {
|
||||
"driver": {"type": "string"},
|
||||
"wear_leveling": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["custom", "embedded_flash", "legacy", "rp2040_flash", "spi_flash"]
|
||||
},
|
||||
"backing_size": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"logical_size": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
}
|
||||
"driver": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
@@ -326,11 +258,7 @@
|
||||
"enabled": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"features": {
|
||||
"$ref": "qmk.definitions.v1#/boolean_array",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"not": {"required": ["lto"]}
|
||||
},
|
||||
"features": {"$ref": "qmk.definitions.v1#/boolean_array"},
|
||||
"indicators": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -360,9 +288,15 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"filename": {"type": "string"},
|
||||
"c_macro": {"type": "boolean"},
|
||||
"json_layout": {"type": "boolean"},
|
||||
"filename": {
|
||||
"type": "string"
|
||||
},
|
||||
"c_macro": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"json_layout": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"layout": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -370,7 +304,6 @@
|
||||
"additionalProperties": false,
|
||||
"required": ["x", "y"],
|
||||
"properties": {
|
||||
"encoder": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"pattern": "^[^\\n]*$"
|
||||
@@ -390,26 +323,13 @@
|
||||
"h": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"w": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"hand": {
|
||||
"type": "string",
|
||||
"enum": ["L", "R", "*"]
|
||||
}
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"haptic": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["drv2605l", "solenoid"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"leader_key": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -458,38 +378,11 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"custom",
|
||||
"is31fl3218",
|
||||
"is31fl3236",
|
||||
"is31fl3729",
|
||||
"is31fl3731",
|
||||
"is31fl3733",
|
||||
"is31fl3736",
|
||||
"is31fl3737",
|
||||
"is31fl3741",
|
||||
"is31fl3742a",
|
||||
"is31fl3743a",
|
||||
"is31fl3745",
|
||||
"is31fl3746a",
|
||||
"snled27351"
|
||||
]
|
||||
},
|
||||
"driver": {"type": "string"},
|
||||
"center_point": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
@@ -500,10 +393,6 @@
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"react_on_keyup": {"type": "boolean"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
@@ -525,8 +414,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
@@ -538,42 +427,11 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"hue": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"sat": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"aw20216s",
|
||||
"custom",
|
||||
"is31fl3218",
|
||||
"is31fl3236",
|
||||
"is31fl3729",
|
||||
"is31fl3731",
|
||||
"is31fl3733",
|
||||
"is31fl3736",
|
||||
"is31fl3737",
|
||||
"is31fl3741",
|
||||
"is31fl3742a",
|
||||
"is31fl3743a",
|
||||
"is31fl3745",
|
||||
"is31fl3746a",
|
||||
"snled27351",
|
||||
"ws2812"
|
||||
]
|
||||
},
|
||||
"driver": {"type": "string"},
|
||||
"center_point": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
@@ -586,10 +444,6 @@
|
||||
"sat_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"val_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"speed_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_flush_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"led_process_limit": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"react_on_keyup": {"type": "boolean"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split_count": {
|
||||
"type": "array",
|
||||
"minItems": 2,
|
||||
@@ -611,8 +465,8 @@
|
||||
"minimum": 0
|
||||
}
|
||||
},
|
||||
"x": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"x": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"y": {"$ref": "qmk.definitions.v1#/key_unit"},
|
||||
"flags": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
}
|
||||
}
|
||||
@@ -625,22 +479,11 @@
|
||||
"properties": {
|
||||
"animations": {
|
||||
"type": "object",
|
||||
"propertyNames": {"$ref": "qmk.definitions.v1#/snake_case"},
|
||||
"additionalProperties": {"type": "boolean"}
|
||||
},
|
||||
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"default": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"on": {"type": "boolean"},
|
||||
"animation": {"type": "string"},
|
||||
"hue": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"sat": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"val": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"speed": {"$ref": "qmk.definitions.v1#/unsigned_int_8"}
|
||||
"additionalProperties": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"brightness_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"driver": {
|
||||
"type": "string",
|
||||
"enum": ["apa102", "custom", "ws2812"]
|
||||
@@ -671,10 +514,7 @@
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin",
|
||||
"$comment": "Deprecated: use ws2812.pin instead"
|
||||
},
|
||||
"rgbw": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use ws2812.rgbw instead"
|
||||
},
|
||||
"rgbw": {"type": "boolean"},
|
||||
"saturation_steps": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"sleep": {"type": "boolean"},
|
||||
"split": {"type": "boolean"},
|
||||
@@ -754,6 +594,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"matrix_grid": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"}
|
||||
},
|
||||
"matrix_pins": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -773,15 +617,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dip_switch": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"right": {
|
||||
"$ref": "#/definitions/dip_switch_config"
|
||||
}
|
||||
}
|
||||
},
|
||||
"encoder": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
@@ -791,17 +626,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"handedness": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"matrix_grid": {
|
||||
"$ref": "qmk.definitions.v1#/mcu_pin_array",
|
||||
"minItems": 2,
|
||||
"maxItems": 2
|
||||
}
|
||||
}
|
||||
"main": {
|
||||
"type": "string",
|
||||
"enum": ["eeprom", "left", "matrix_grid", "pin", "right"]
|
||||
},
|
||||
"soft_serial_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"soft_serial_speed": {
|
||||
@@ -815,34 +642,12 @@
|
||||
"properties": {
|
||||
"protocol": {
|
||||
"type": "string",
|
||||
"enum": ["custom", "i2c", "serial"]
|
||||
},
|
||||
"sync": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"activity": {"type": "boolean"},
|
||||
"detected_os": {"type": "boolean"},
|
||||
"haptic": {"type": "boolean"},
|
||||
"layer_state": {"type": "boolean"},
|
||||
"indicators": {"type": "boolean"},
|
||||
"matrix_state": {"type": "boolean"},
|
||||
"modifiers": {"type": "boolean"},
|
||||
"oled": {"type": "boolean"},
|
||||
"st7565": {"type": "boolean"},
|
||||
"wpm": {"type": "boolean"}
|
||||
}
|
||||
"enum": ["custom", "i2c", "serial", "serial_usart"]
|
||||
},
|
||||
"sync_matrix_state": {"type": "boolean"},
|
||||
"sync_modifiers": {"type": "boolean"},
|
||||
"watchdog": {"type": "boolean"},
|
||||
"watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"sync_matrix_state": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use sync.matrix_state instead"
|
||||
},
|
||||
"sync_modifiers": {
|
||||
"type": "boolean",
|
||||
"$comment": "Deprecated: use sync.modifiers instead"
|
||||
}
|
||||
"watchdog_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"usb_detect": {
|
||||
@@ -853,16 +658,6 @@
|
||||
"polling_interval": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"main": {
|
||||
"type": "string",
|
||||
"enum": ["eeprom", "left", "matrix_grid", "pin", "right"],
|
||||
"$comment": "Deprecated: use config.h options for now"
|
||||
},
|
||||
"matrix_grid": {
|
||||
"type": "array",
|
||||
"items": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"$comment": "Deprecated: use split.handedness.matrix_grid instead"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -873,7 +668,6 @@
|
||||
"tapping": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"chordal_hold": {"type": "boolean"},
|
||||
"force_hold": {"type": "boolean"},
|
||||
"force_hold_per_key": {"type": "boolean"},
|
||||
"ignore_mod_tap_interrupt": {"type": "boolean"},
|
||||
@@ -912,7 +706,7 @@
|
||||
}
|
||||
},
|
||||
"suspend_wakeup_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"wait_for_enumeration": {"type": "boolean"}
|
||||
"wait_for": {"type": "boolean"}
|
||||
}
|
||||
},
|
||||
"qmk": {
|
||||
@@ -921,15 +715,7 @@
|
||||
"properties": {
|
||||
"keys_per_scan": {"$ref": "qmk.definitions.v1#/unsigned_int_8"},
|
||||
"tap_keycode_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"},
|
||||
"locking": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"enabled": {"type": "boolean"},
|
||||
"resync": {"type": "boolean"}
|
||||
}
|
||||
}
|
||||
"tap_capslock_delay": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
},
|
||||
"qmk_lufa_bootloader": {
|
||||
@@ -951,7 +737,6 @@
|
||||
"enum": ["bitbang", "custom", "i2c", "pwm", "spi", "vendor"]
|
||||
},
|
||||
"pin": {"$ref": "qmk.definitions.v1#/mcu_pin"},
|
||||
"rgbw": {"type": "boolean"},
|
||||
"i2c_address": {"$ref": "qmk.definitions.v1#/hex_number_2d"},
|
||||
"i2c_timeout": {"$ref": "qmk.definitions.v1#/unsigned_int"}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema#",
|
||||
"$id": "qmk.user_repo.v0",
|
||||
"title": "User Repository Information",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"userspace_version"
|
||||
],
|
||||
"properties": {
|
||||
"userspace_version": {
|
||||
"type": "string",
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema#",
|
||||
"$id": "qmk.user_repo.v1",
|
||||
"title": "User Repository Information",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"userspace_version",
|
||||
"build_targets"
|
||||
],
|
||||
"properties": {
|
||||
"userspace_version": {
|
||||
"type": "string",
|
||||
"enum": ["1.0"]
|
||||
},
|
||||
"build_targets": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "qmk.definitions.v1#/build_target"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
data/templates/keyboard/config.h
Normal file
20
data/templates/keyboard/config.h
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright %YEAR% %REAL_NAME% (@%USER_NAME%)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
1
data/templates/keyboard/rules.mk
Normal file
1
data/templates/keyboard/rules.mk
Normal file
@@ -0,0 +1 @@
|
||||
# This file intentionally left blank
|
||||
@@ -188,7 +188,7 @@ static bool sdep_recv_pkt(struct sdep_msg *msg, uint16_t timeout) {
|
||||
bool ready = false;
|
||||
|
||||
do {
|
||||
ready = gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN);
|
||||
ready = readPin(BLUEFRUIT_LE_IRQ_PIN);
|
||||
if (ready) {
|
||||
break;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ static void resp_buf_read_one(bool greedy) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
struct sdep_msg msg;
|
||||
|
||||
again:
|
||||
@@ -242,7 +242,7 @@ static void resp_buf_read_one(bool greedy) {
|
||||
dprintf("recv latency %dms\n", TIMER_DIFF_16(timer_read(), last_send));
|
||||
}
|
||||
|
||||
if (greedy && resp_buf.peek(last_send) && gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (greedy && resp_buf.peek(last_send) && readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
goto again;
|
||||
}
|
||||
}
|
||||
@@ -293,16 +293,16 @@ void bluefruit_le_init(void) {
|
||||
state.configured = false;
|
||||
state.is_connected = false;
|
||||
|
||||
gpio_set_pin_input(BLUEFRUIT_LE_IRQ_PIN);
|
||||
setPinInput(BLUEFRUIT_LE_IRQ_PIN);
|
||||
|
||||
spi_init();
|
||||
|
||||
// Perform a hardware reset
|
||||
gpio_set_pin_output(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_write_pin_high(BLUEFRUIT_LE_RST_PIN);
|
||||
gpio_write_pin_low(BLUEFRUIT_LE_RST_PIN);
|
||||
setPinOutput(BLUEFRUIT_LE_RST_PIN);
|
||||
writePinHigh(BLUEFRUIT_LE_RST_PIN);
|
||||
writePinLow(BLUEFRUIT_LE_RST_PIN);
|
||||
wait_ms(10);
|
||||
gpio_write_pin_high(BLUEFRUIT_LE_RST_PIN);
|
||||
writePinHigh(BLUEFRUIT_LE_RST_PIN);
|
||||
|
||||
wait_ms(1000); // Give it a second to initialize
|
||||
|
||||
@@ -508,7 +508,7 @@ void bluefruit_le_task(void) {
|
||||
resp_buf_read_one(true);
|
||||
send_buf_send_one(SdepShortTimeout);
|
||||
|
||||
if (resp_buf.empty() && (state.event_flags & UsingEvents) && gpio_read_pin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
if (resp_buf.empty() && (state.event_flags & UsingEvents) && readPin(BLUEFRUIT_LE_IRQ_PIN)) {
|
||||
// Must be an event update
|
||||
if (at_command_P(PSTR("AT+EVENTSTATUS"), resbuf, sizeof(resbuf))) {
|
||||
uint32_t mask = strtoul(resbuf, NULL, 16);
|
||||
|
||||
@@ -57,8 +57,8 @@ void eeprom_driver_init(void) {
|
||||
i2c_init();
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
/* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
gpio_set_pin_input_high(EXTERNAL_EEPROM_WP_PIN);
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -100,8 +100,8 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
uintptr_t target_addr = (uintptr_t)addr;
|
||||
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
gpio_set_pin_output(EXTERNAL_EEPROM_WP_PIN);
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 0);
|
||||
setPinOutput(EXTERNAL_EEPROM_WP_PIN);
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 0);
|
||||
#endif
|
||||
|
||||
while (len > 0) {
|
||||
@@ -134,7 +134,7 @@ void eeprom_write_block(const void *buf, void *addr, size_t len) {
|
||||
|
||||
#if defined(EXTERNAL_EEPROM_WP_PIN)
|
||||
/* We are setting the WP pin to high in a way that requires at least two bit-flips to change back to 0 */
|
||||
gpio_write_pin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
gpio_set_pin_input_high(EXTERNAL_EEPROM_WP_PIN);
|
||||
writePin(EXTERNAL_EEPROM_WP_PIN, 1);
|
||||
setPinInputHigh(EXTERNAL_EEPROM_WP_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -16,18 +16,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
Default device configurations:
|
||||
|
||||
For the Adafruit SPI Non-Volatile FRAM Breakout: https://www.adafruit.com/product/1897
|
||||
#define EEPROM_SPI_MB85RS64V
|
||||
*/
|
||||
#if defined(EEPROM_SPI_MB85RS64V)
|
||||
# define EXTERNAL_EEPROM_BYTE_COUNT 8192
|
||||
# define EXTERNAL_EEPROM_PAGE_SIZE 64 // it's FRAM, so it doesn't actually matter, this just sets the RAM buffer
|
||||
# define EXTERNAL_EEPROM_ADDRESS_SIZE 2
|
||||
#endif
|
||||
|
||||
/*
|
||||
The slave select pin of the EEPROM.
|
||||
This needs to be a normal GPIO pin_t value, such as A7.
|
||||
|
||||
@@ -1,213 +0,0 @@
|
||||
// Copyright 2018 Jack Humbert <jack.humb@gmail.com>
|
||||
// Copyright 2018-2023 Nick Brassel (@tzarc)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <stdint.h>
|
||||
#include "encoder.h"
|
||||
#include "gpio.h"
|
||||
#include "keyboard.h"
|
||||
#include "action.h"
|
||||
#include "keycodes.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
# include "split_util.h"
|
||||
#endif
|
||||
|
||||
// for memcpy
|
||||
#include <string.h>
|
||||
|
||||
#if !defined(ENCODER_RESOLUTIONS) && !defined(ENCODER_RESOLUTION)
|
||||
# define ENCODER_RESOLUTION 4
|
||||
#endif
|
||||
|
||||
#undef ENCODER_DEFAULT_PIN_API_IMPL
|
||||
#if defined(ENCODERS_PAD_A) && defined(ENCODERS_PAD_B)
|
||||
// Inform the quadrature driver that it needs to implement pin init/read functions
|
||||
# define ENCODER_DEFAULT_PIN_API_IMPL
|
||||
#endif
|
||||
|
||||
extern volatile bool isLeftHand;
|
||||
|
||||
__attribute__((weak)) void encoder_quadrature_init_pin(uint8_t index, bool pad_b);
|
||||
__attribute__((weak)) uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b);
|
||||
|
||||
#ifdef ENCODER_DEFAULT_PIN_API_IMPL
|
||||
|
||||
static pin_t encoders_pad_a[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_A;
|
||||
static pin_t encoders_pad_b[NUM_ENCODERS_MAX_PER_SIDE] = ENCODERS_PAD_B;
|
||||
|
||||
__attribute__((weak)) void encoder_wait_pullup_charge(void) {
|
||||
wait_us(100);
|
||||
}
|
||||
|
||||
__attribute__((weak)) void encoder_quadrature_init_pin(uint8_t index, bool pad_b) {
|
||||
pin_t pin = pad_b ? encoders_pad_b[index] : encoders_pad_a[index];
|
||||
if (pin != NO_PIN) {
|
||||
gpio_set_pin_input_high(pin);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) uint8_t encoder_quadrature_read_pin(uint8_t index, bool pad_b) {
|
||||
pin_t pin = pad_b ? encoders_pad_b[index] : encoders_pad_a[index];
|
||||
if (pin != NO_PIN) {
|
||||
return gpio_read_pin(pin) ? 1 : 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // ENCODER_DEFAULT_PIN_API_IMPL
|
||||
|
||||
#ifdef ENCODER_RESOLUTIONS
|
||||
static uint8_t encoder_resolutions[NUM_ENCODERS] = ENCODER_RESOLUTIONS;
|
||||
#endif
|
||||
|
||||
#ifndef ENCODER_DIRECTION_FLIP
|
||||
# define ENCODER_CLOCKWISE true
|
||||
# define ENCODER_COUNTER_CLOCKWISE false
|
||||
#else
|
||||
# define ENCODER_CLOCKWISE false
|
||||
# define ENCODER_COUNTER_CLOCKWISE true
|
||||
#endif
|
||||
static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
|
||||
|
||||
static uint8_t encoder_state[NUM_ENCODERS] = {0};
|
||||
static int8_t encoder_pulses[NUM_ENCODERS] = {0};
|
||||
|
||||
// encoder counts
|
||||
static uint8_t thisCount;
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
// encoder offsets for each hand
|
||||
static uint8_t thisHand, thatHand;
|
||||
// encoder counts for each hand
|
||||
static uint8_t thatCount;
|
||||
#endif
|
||||
|
||||
__attribute__((weak)) void encoder_quadrature_post_init_kb(void) {
|
||||
extern void encoder_quadrature_handle_read(uint8_t index, uint8_t pin_a_state, uint8_t pin_b_state);
|
||||
// Unused normally, but can be used for things like setting up pin-change interrupts in keyboard code.
|
||||
// During the interrupt, read the pins then call `encoder_handle_read()` with the pin states and it'll queue up an encoder event if needed.
|
||||
}
|
||||
|
||||
void encoder_quadrature_post_init(void) {
|
||||
#ifdef ENCODER_DEFAULT_PIN_API_IMPL
|
||||
for (uint8_t i = 0; i < thisCount; i++) {
|
||||
encoder_quadrature_init_pin(i, false);
|
||||
encoder_quadrature_init_pin(i, true);
|
||||
}
|
||||
encoder_wait_pullup_charge();
|
||||
for (uint8_t i = 0; i < thisCount; i++) {
|
||||
encoder_state[i] = (encoder_quadrature_read_pin(i, false) << 0) | (encoder_quadrature_read_pin(i, true) << 1);
|
||||
}
|
||||
#else
|
||||
memset(encoder_state, 0, sizeof(encoder_state));
|
||||
#endif
|
||||
|
||||
encoder_quadrature_post_init_kb();
|
||||
}
|
||||
|
||||
void encoder_driver_init(void) {
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
thisHand = isLeftHand ? 0 : NUM_ENCODERS_LEFT;
|
||||
thatHand = NUM_ENCODERS_LEFT - thisHand;
|
||||
thisCount = isLeftHand ? NUM_ENCODERS_LEFT : NUM_ENCODERS_RIGHT;
|
||||
thatCount = isLeftHand ? NUM_ENCODERS_RIGHT : NUM_ENCODERS_LEFT;
|
||||
#else // SPLIT_KEYBOARD
|
||||
thisCount = NUM_ENCODERS;
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_TESTS
|
||||
// Annoying that we have to clear out values during initialisation here, but
|
||||
// because all the arrays are static locals, rerunning tests in the same
|
||||
// executable doesn't reset any of these. Kinda crappy having test-only code
|
||||
// here, but it's the simplest solution.
|
||||
memset(encoder_state, 0, sizeof(encoder_state));
|
||||
memset(encoder_pulses, 0, sizeof(encoder_pulses));
|
||||
const pin_t encoders_pad_a_left[] = ENCODERS_PAD_A;
|
||||
const pin_t encoders_pad_b_left[] = ENCODERS_PAD_B;
|
||||
for (uint8_t i = 0; i < thisCount; i++) {
|
||||
encoders_pad_a[i] = encoders_pad_a_left[i];
|
||||
encoders_pad_b[i] = encoders_pad_b_left[i];
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT)
|
||||
// Re-initialise the pads if it's the right-hand side
|
||||
if (!isLeftHand) {
|
||||
const pin_t encoders_pad_a_right[] = ENCODERS_PAD_A_RIGHT;
|
||||
const pin_t encoders_pad_b_right[] = ENCODERS_PAD_B_RIGHT;
|
||||
for (uint8_t i = 0; i < thisCount; i++) {
|
||||
encoders_pad_a[i] = encoders_pad_a_right[i];
|
||||
encoders_pad_b[i] = encoders_pad_b_right[i];
|
||||
}
|
||||
}
|
||||
#endif // defined(SPLIT_KEYBOARD) && defined(ENCODERS_PAD_A_RIGHT) && defined(ENCODERS_PAD_B_RIGHT)
|
||||
|
||||
// Encoder resolutions is defined differently in config.h, so concatenate
|
||||
#if defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS)
|
||||
# if defined(ENCODER_RESOLUTIONS_RIGHT)
|
||||
static const uint8_t encoder_resolutions_right[NUM_ENCODERS_RIGHT] = ENCODER_RESOLUTIONS_RIGHT;
|
||||
# else // defined(ENCODER_RESOLUTIONS_RIGHT)
|
||||
static const uint8_t encoder_resolutions_right[NUM_ENCODERS_RIGHT] = ENCODER_RESOLUTIONS;
|
||||
# endif // defined(ENCODER_RESOLUTIONS_RIGHT)
|
||||
for (uint8_t i = 0; i < NUM_ENCODERS_RIGHT; i++) {
|
||||
encoder_resolutions[NUM_ENCODERS_LEFT + i] = encoder_resolutions_right[i];
|
||||
}
|
||||
#endif // defined(SPLIT_KEYBOARD) && defined(ENCODER_RESOLUTIONS)
|
||||
|
||||
encoder_quadrature_post_init();
|
||||
}
|
||||
|
||||
static void encoder_handle_state_change(uint8_t index, uint8_t state) {
|
||||
uint8_t i = index;
|
||||
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
index += thisHand;
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_RESOLUTIONS
|
||||
const uint8_t resolution = encoder_resolutions[index];
|
||||
#else
|
||||
const uint8_t resolution = ENCODER_RESOLUTION;
|
||||
#endif
|
||||
|
||||
encoder_pulses[i] += encoder_LUT[state & 0xF];
|
||||
|
||||
#ifdef ENCODER_DEFAULT_POS
|
||||
if ((encoder_pulses[i] >= resolution) || (encoder_pulses[i] <= -resolution) || ((state & 0x3) == ENCODER_DEFAULT_POS)) {
|
||||
if (encoder_pulses[i] >= 1) {
|
||||
#else
|
||||
if (encoder_pulses[i] >= resolution) {
|
||||
#endif
|
||||
|
||||
encoder_queue_event(index, ENCODER_COUNTER_CLOCKWISE);
|
||||
}
|
||||
|
||||
#ifdef ENCODER_DEFAULT_POS
|
||||
if (encoder_pulses[i] <= -1) {
|
||||
#else
|
||||
if (encoder_pulses[i] <= -resolution) { // direction is arbitrary here, but this clockwise
|
||||
#endif
|
||||
encoder_queue_event(index, ENCODER_CLOCKWISE);
|
||||
}
|
||||
encoder_pulses[i] %= resolution;
|
||||
#ifdef ENCODER_DEFAULT_POS
|
||||
encoder_pulses[i] = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void encoder_quadrature_handle_read(uint8_t index, uint8_t pin_a_state, uint8_t pin_b_state) {
|
||||
uint8_t state = pin_a_state | (pin_b_state << 1);
|
||||
if ((encoder_state[index] & 0x3) != state) {
|
||||
encoder_state[index] <<= 2;
|
||||
encoder_state[index] |= state;
|
||||
encoder_handle_state_change(index, encoder_state[index]);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((weak)) void encoder_driver_task(void) {
|
||||
for (uint8_t i = 0; i < thisCount; i++) {
|
||||
encoder_quadrature_handle_read(i, encoder_quadrature_read_pin(i, false), encoder_quadrature_read_pin(i, true));
|
||||
}
|
||||
}
|
||||
@@ -7,9 +7,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
#define SLAVE_TO_ADDR(n) (n << 1)
|
||||
#ifndef MCP23018_TIMEOUT
|
||||
# define MCP23018_TIMEOUT 100
|
||||
#endif // MCP23018_TIMEOUT
|
||||
#define TIMEOUT 100
|
||||
|
||||
enum {
|
||||
CMD_IODIRA = 0x00, // i/o direction register
|
||||
@@ -35,13 +33,13 @@ bool mcp23018_set_config(uint8_t slave_addr, mcp23018_port_t port, uint8_t conf)
|
||||
uint8_t cmdDirection = port ? CMD_IODIRB : CMD_IODIRA;
|
||||
uint8_t cmdPullup = port ? CMD_GPPUB : CMD_GPPUA;
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmdDirection, &conf, sizeof(conf), MCP23018_TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmdDirection, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_set_config::directionFAILED::%u\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
ret = i2c_write_register(addr, cmdPullup, &conf, sizeof(conf), MCP23018_TIMEOUT);
|
||||
ret = i2c_writeReg(addr, cmdPullup, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_set_config::pullupFAILED::%u\n", ret);
|
||||
return false;
|
||||
@@ -54,7 +52,7 @@ bool mcp23018_set_output(uint8_t slave_addr, mcp23018_port_t port, uint8_t conf)
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA;
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), MCP23018_TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_set_output::FAILED::%u\n", ret);
|
||||
return false;
|
||||
@@ -67,7 +65,7 @@ bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t conf[2] = {confA, confB};
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, CMD_GPIOA, &conf[0], sizeof(conf), MCP23018_TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, CMD_GPIOA, &conf[0], sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_set_output::FAILED::%u\n", ret);
|
||||
return false;
|
||||
@@ -76,20 +74,20 @@ bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool mcp23018_read_pins(uint8_t slave_addr, mcp23018_port_t port, uint8_t* out) {
|
||||
bool mcp23018_readPins(uint8_t slave_addr, mcp23018_port_t port, uint8_t* out) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = port ? CMD_GPIOB : CMD_GPIOA;
|
||||
|
||||
i2c_status_t ret = i2c_read_register(addr, cmd, out, sizeof(uint8_t), MCP23018_TIMEOUT);
|
||||
i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_read_pins::FAILED::%u\n", ret);
|
||||
dprintf("mcp23018_readPins::FAILED::%u\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool mcp23018_read_pins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
|
||||
typedef union {
|
||||
@@ -99,9 +97,9 @@ bool mcp23018_read_pins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
|
||||
data16 data = {.u16 = 0};
|
||||
|
||||
i2c_status_t ret = i2c_read_register(addr, CMD_GPIOA, &data.u8[0], sizeof(data), MCP23018_TIMEOUT);
|
||||
i2c_status_t ret = i2c_readReg(addr, CMD_GPIOA, &data.u8[0], sizeof(data), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("mcp23018_read_pins_all::FAILED::%u\n", ret);
|
||||
dprintf("mcp23018_readPins::FAILED::%u\n", ret);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,16 +55,11 @@ bool mcp23018_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB);
|
||||
/**
|
||||
* Read state of a given port
|
||||
*/
|
||||
bool mcp23018_read_pins(uint8_t slave_addr, mcp23018_port_t port, uint8_t* ret);
|
||||
bool mcp23018_readPins(uint8_t slave_addr, mcp23018_port_t port, uint8_t* ret);
|
||||
|
||||
/**
|
||||
* Read state of both ports sequentially
|
||||
*
|
||||
* - slightly faster than multiple readPins
|
||||
*/
|
||||
bool mcp23018_read_pins_all(uint8_t slave_addr, uint16_t* ret);
|
||||
|
||||
// DEPRECATED - DO NOT USE
|
||||
|
||||
#define mcp23018_readPins mcp23018_read_pins
|
||||
#define mcp23018_readPins_all mcp23018_read_pins_all
|
||||
bool mcp23018_readPins_all(uint8_t slave_addr, uint16_t* ret);
|
||||
|
||||
@@ -41,6 +41,8 @@ void pca9505_init(uint8_t slave_addr) {
|
||||
}
|
||||
|
||||
// TODO: could check device connected
|
||||
// i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE);
|
||||
// i2c_stop();
|
||||
}
|
||||
|
||||
bool pca9505_set_config(uint8_t slave_addr, pca9505_port_t port, uint8_t conf) {
|
||||
@@ -64,7 +66,7 @@ bool pca9505_set_config(uint8_t slave_addr, pca9505_port_t port, uint8_t conf) {
|
||||
break;
|
||||
}
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9505_set_config::FAILED\n");
|
||||
return false;
|
||||
@@ -94,7 +96,7 @@ bool pca9505_set_polarity(uint8_t slave_addr, pca9505_port_t port, uint8_t conf)
|
||||
break;
|
||||
}
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9505_set_polarity::FAILED\n");
|
||||
return false;
|
||||
@@ -124,7 +126,7 @@ bool pca9505_set_output(uint8_t slave_addr, pca9505_port_t port, uint8_t conf) {
|
||||
break;
|
||||
}
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9505_set_output::FAILED\n");
|
||||
return false;
|
||||
@@ -133,7 +135,7 @@ bool pca9505_set_output(uint8_t slave_addr, pca9505_port_t port, uint8_t conf) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pca9505_read_pins(uint8_t slave_addr, pca9505_port_t port, uint8_t* out) {
|
||||
bool pca9505_readPins(uint8_t slave_addr, pca9505_port_t port, uint8_t* out) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = 0;
|
||||
switch (port) {
|
||||
@@ -154,9 +156,9 @@ bool pca9505_read_pins(uint8_t slave_addr, pca9505_port_t port, uint8_t* out) {
|
||||
break;
|
||||
}
|
||||
|
||||
i2c_status_t ret = i2c_read_register(addr, cmd, out, sizeof(uint8_t), TIMEOUT);
|
||||
i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9505_read_pins::FAILED\n");
|
||||
print("pca9505_readPins::FAILED\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,8 +64,4 @@ bool pca9505_set_output(uint8_t slave_addr, pca9505_port_t port, uint8_t conf);
|
||||
/**
|
||||
* Read state of a given port
|
||||
*/
|
||||
bool pca9505_read_pins(uint8_t slave_addr, pca9505_port_t port, uint8_t* ret);
|
||||
|
||||
// DEPRECATED - DO NOT USE
|
||||
|
||||
#define pca9505_readPins pca9505_read_pins
|
||||
bool pca9505_readPins(uint8_t slave_addr, pca9505_port_t port, uint8_t* ret);
|
||||
|
||||
@@ -29,13 +29,15 @@ void pca9555_init(uint8_t slave_addr) {
|
||||
}
|
||||
|
||||
// TODO: could check device connected
|
||||
// i2c_start(SLAVE_TO_ADDR(slave) | I2C_WRITE);
|
||||
// i2c_stop();
|
||||
}
|
||||
|
||||
bool pca9555_set_config(uint8_t slave_addr, pca9555_port_t port, uint8_t conf) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = port ? CMD_CONFIG_1 : CMD_CONFIG_0;
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9555_set_config::FAILED\n");
|
||||
return false;
|
||||
@@ -48,7 +50,7 @@ bool pca9555_set_output(uint8_t slave_addr, pca9555_port_t port, uint8_t conf) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = port ? CMD_OUTPUT_1 : CMD_OUTPUT_0;
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, cmd, &conf, sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9555_set_output::FAILED\n");
|
||||
return false;
|
||||
@@ -61,7 +63,7 @@ bool pca9555_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t conf[2] = {confA, confB};
|
||||
|
||||
i2c_status_t ret = i2c_write_register(addr, CMD_OUTPUT_0, &conf[0], sizeof(conf), TIMEOUT);
|
||||
i2c_status_t ret = i2c_writeReg(addr, CMD_OUTPUT_0, &conf[0], sizeof(conf), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
dprintf("pca9555_set_output::FAILED::%u\n", ret);
|
||||
return false;
|
||||
@@ -70,20 +72,20 @@ bool pca9555_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pca9555_read_pins(uint8_t slave_addr, pca9555_port_t port, uint8_t* out) {
|
||||
bool pca9555_readPins(uint8_t slave_addr, pca9555_port_t port, uint8_t* out) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
uint8_t cmd = port ? CMD_INPUT_1 : CMD_INPUT_0;
|
||||
|
||||
i2c_status_t ret = i2c_read_register(addr, cmd, out, sizeof(uint8_t), TIMEOUT);
|
||||
i2c_status_t ret = i2c_readReg(addr, cmd, out, sizeof(uint8_t), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9555_read_pins::FAILED\n");
|
||||
print("pca9555_readPins::FAILED\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool pca9555_read_pins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
bool pca9555_readPins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
uint8_t addr = SLAVE_TO_ADDR(slave_addr);
|
||||
|
||||
typedef union {
|
||||
@@ -93,9 +95,9 @@ bool pca9555_read_pins_all(uint8_t slave_addr, uint16_t* out) {
|
||||
|
||||
data16 data = {.u16 = 0};
|
||||
|
||||
i2c_status_t ret = i2c_read_register(addr, CMD_INPUT_0, &data.u8[0], sizeof(data), TIMEOUT);
|
||||
i2c_status_t ret = i2c_readReg(addr, CMD_INPUT_0, &data.u8[0], sizeof(data), TIMEOUT);
|
||||
if (ret != I2C_STATUS_SUCCESS) {
|
||||
print("pca9555_read_pins_all::FAILED\n");
|
||||
print("pca9555_readPins_all::FAILED\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -78,16 +78,11 @@ bool pca9555_set_output_all(uint8_t slave_addr, uint8_t confA, uint8_t confB);
|
||||
/**
|
||||
* Read state of a given port
|
||||
*/
|
||||
bool pca9555_read_pins(uint8_t slave_addr, pca9555_port_t port, uint8_t* ret);
|
||||
bool pca9555_readPins(uint8_t slave_addr, pca9555_port_t port, uint8_t* ret);
|
||||
|
||||
/**
|
||||
* Read state of both ports sequentially
|
||||
*
|
||||
* - slightly faster than multiple readPins
|
||||
*/
|
||||
bool pca9555_read_pins_all(uint8_t slave_addr, uint16_t* ret);
|
||||
|
||||
// DEPRECATED - DO NOT USE
|
||||
|
||||
#define pca9555_readPins pca9555_read_pins
|
||||
#define pca9555_readPins_all pca9555_read_pins_all
|
||||
bool pca9555_readPins_all(uint8_t slave_addr, uint16_t* ret);
|
||||
|
||||
@@ -27,39 +27,39 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X138_ADDRESS_PINS;
|
||||
|
||||
void sn74x138_init(void) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
gpio_set_pin_output(address_pins[i]);
|
||||
gpio_write_pin_low(address_pins[i]);
|
||||
setPinOutput(address_pins[i]);
|
||||
writePinLow(address_pins[i]);
|
||||
}
|
||||
|
||||
#if defined(SN74X138_E1_PIN)
|
||||
gpio_set_pin_output(SN74X138_E1_PIN);
|
||||
gpio_write_pin_high(SN74X138_E1_PIN);
|
||||
setPinOutput(SN74X138_E1_PIN);
|
||||
writePinHigh(SN74X138_E1_PIN);
|
||||
#endif
|
||||
|
||||
#if defined(SN74X138_E2_PIN)
|
||||
gpio_set_pin_output(SN74X138_E2_PIN);
|
||||
gpio_write_pin_high(SN74X138_E2_PIN);
|
||||
setPinOutput(SN74X138_E2_PIN);
|
||||
writePinHigh(SN74X138_E2_PIN);
|
||||
#endif
|
||||
#if defined(SN74X138_E3_PIN)
|
||||
gpio_set_pin_output(SN74X138_E3_PIN);
|
||||
gpio_write_pin_low(SN74X138_E3_PIN);
|
||||
setPinOutput(SN74X138_E3_PIN);
|
||||
writePinLow(SN74X138_E3_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x138_set_enabled(bool enabled) {
|
||||
#if defined(SN74X138_E1_PIN)
|
||||
gpio_write_pin(SN74X138_E1_PIN, !enabled);
|
||||
writePin(SN74X138_E1_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X138_E2_PIN)
|
||||
gpio_write_pin(SN74X138_E2_PIN, !enabled);
|
||||
writePin(SN74X138_E2_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X138_E3_PIN)
|
||||
gpio_write_pin(SN74X138_E3_PIN, enabled);
|
||||
writePin(SN74X138_E3_PIN, enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x138_set_addr(uint8_t address) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
gpio_write_pin(address_pins[i], address & (1 << i));
|
||||
writePin(address_pins[i], address & (1 << i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,32 +27,32 @@ static const pin_t address_pins[ADDRESS_PIN_COUNT] = SN74X154_ADDRESS_PINS;
|
||||
|
||||
void sn74x154_init(void) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
gpio_set_pin_output(address_pins[i]);
|
||||
gpio_write_pin_low(address_pins[i]);
|
||||
setPinOutput(address_pins[i]);
|
||||
writePinLow(address_pins[i]);
|
||||
}
|
||||
|
||||
#if defined(SN74X154_E0_PIN)
|
||||
gpio_set_pin_output(SN74X154_E0_PIN);
|
||||
gpio_write_pin_high(SN74X154_E0_PIN);
|
||||
setPinOutput(SN74X154_E0_PIN);
|
||||
writePinHigh(SN74X154_E0_PIN);
|
||||
#endif
|
||||
|
||||
#if defined(SN74X154_E1_PIN)
|
||||
gpio_set_pin_output(SN74X154_E1_PIN);
|
||||
gpio_write_pin_high(SN74X154_E1_PIN);
|
||||
setPinOutput(SN74X154_E1_PIN);
|
||||
writePinHigh(SN74X154_E1_PIN);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x154_set_enabled(bool enabled) {
|
||||
#if defined(SN74X154_E0_PIN)
|
||||
gpio_write_pin(SN74X154_E0_PIN, !enabled);
|
||||
writePin(SN74X154_E0_PIN, !enabled);
|
||||
#endif
|
||||
#if defined(SN74X154_E1_PIN)
|
||||
gpio_write_pin(SN74X154_E1_PIN, !enabled);
|
||||
writePin(SN74X154_E1_PIN, !enabled);
|
||||
#endif
|
||||
}
|
||||
|
||||
void sn74x154_set_addr(uint8_t address) {
|
||||
for (int i = 0; i < ADDRESS_PIN_COUNT; i++) {
|
||||
gpio_write_pin(address_pins[i], address & (1 << i));
|
||||
writePin(address_pins[i], address & (1 << i));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ void drv2605l_write(uint8_t reg_addr, uint8_t data) {
|
||||
}
|
||||
|
||||
uint8_t drv2605l_read(uint8_t reg_addr) {
|
||||
i2c_read_register(DRV2605L_I2C_ADDRESS << 1, reg_addr, &drv2605l_read_buffer, 1, 100);
|
||||
i2c_readReg(DRV2605L_I2C_ADDRESS << 1, reg_addr, &drv2605l_read_buffer, 1, 100);
|
||||
|
||||
return drv2605l_read_buffer;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "util.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL;
|
||||
static pin_t solenoid_pads[] = SOLENOID_PINS;
|
||||
#define NUMBER_OF_SOLENOIDS ARRAY_SIZE(solenoid_pads)
|
||||
bool solenoid_on[NUMBER_OF_SOLENOIDS] = {false};
|
||||
@@ -52,7 +53,7 @@ void solenoid_set_buzz(uint8_t buzz) {
|
||||
}
|
||||
|
||||
void solenoid_set_dwell(uint8_t dwell) {
|
||||
haptic_set_dwell(dwell);
|
||||
solenoid_dwell = dwell;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,7 +62,7 @@ void solenoid_set_dwell(uint8_t dwell) {
|
||||
* @param index select which solenoid to check/stop
|
||||
*/
|
||||
void solenoid_stop(uint8_t index) {
|
||||
gpio_write_pin(solenoid_pads[index], !solenoid_active_state[index]);
|
||||
writePin(solenoid_pads[index], !solenoid_active_state[index]);
|
||||
solenoid_on[index] = false;
|
||||
solenoid_buzzing[index] = false;
|
||||
}
|
||||
@@ -78,7 +79,7 @@ void solenoid_fire(uint8_t index) {
|
||||
solenoid_on[index] = true;
|
||||
solenoid_buzzing[index] = true;
|
||||
solenoid_start[index] = timer_read();
|
||||
gpio_write_pin(solenoid_pads[index], solenoid_active_state[index]);
|
||||
writePin(solenoid_pads[index], solenoid_active_state[index]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -118,7 +119,7 @@ void solenoid_check(void) {
|
||||
elapsed[i] = timer_elapsed(solenoid_start[i]);
|
||||
|
||||
// Check if it's time to finish this solenoid click cycle
|
||||
if (elapsed[i] > haptic_config.dwell) {
|
||||
if (elapsed[i] > solenoid_dwell) {
|
||||
solenoid_stop(i);
|
||||
continue;
|
||||
}
|
||||
@@ -128,12 +129,12 @@ void solenoid_check(void) {
|
||||
if ((elapsed[i] % (SOLENOID_BUZZ_ACTUATED + SOLENOID_BUZZ_NONACTUATED)) < SOLENOID_BUZZ_ACTUATED) {
|
||||
if (!solenoid_buzzing[i]) {
|
||||
solenoid_buzzing[i] = true;
|
||||
gpio_write_pin(solenoid_pads[i], solenoid_active_state[i]);
|
||||
writePin(solenoid_pads[i], solenoid_active_state[i]);
|
||||
}
|
||||
} else {
|
||||
if (solenoid_buzzing[i]) {
|
||||
solenoid_buzzing[i] = false;
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,8 +157,8 @@ void solenoid_setup(void) {
|
||||
#else
|
||||
solenoid_active_state[i] = high;
|
||||
#endif
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
gpio_set_pin_output(solenoid_pads[i]);
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
setPinOutput(solenoid_pads[i]);
|
||||
if ((!HAPTIC_OFF_IN_LOW_POWER) || (usb_device_state == USB_DEVICE_STATE_CONFIGURED)) {
|
||||
solenoid_fire(i);
|
||||
}
|
||||
@@ -170,6 +171,6 @@ void solenoid_setup(void) {
|
||||
*/
|
||||
void solenoid_shutdown(void) {
|
||||
for (uint8_t i = 0; i < NUMBER_OF_SOLENOIDS; i++) {
|
||||
gpio_write_pin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
writePin(solenoid_pads[i], !solenoid_active_state[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,67 +57,67 @@ static const pin_t data_pins[4] = HD44780_DATA_PINS;
|
||||
#define HD44780_ENABLE_DELAY_US 1
|
||||
|
||||
static void hd44780_latch(void) {
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
writePinLow(HD44780_E_PIN);
|
||||
}
|
||||
|
||||
void hd44780_write(uint8_t data, bool isData) {
|
||||
gpio_write_pin(HD44780_RS_PIN, isData);
|
||||
gpio_write_pin_low(HD44780_RW_PIN);
|
||||
writePin(HD44780_RS_PIN, isData);
|
||||
writePinLow(HD44780_RW_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_set_pin_output(data_pins[i]);
|
||||
setPinOutput(data_pins[i]);
|
||||
}
|
||||
|
||||
// Write high nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_write_pin(data_pins[i], (data >> 4) & (1 << i));
|
||||
writePin(data_pins[i], (data >> 4) & (1 << i));
|
||||
}
|
||||
hd44780_latch();
|
||||
|
||||
// Write low nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_write_pin(data_pins[i], data & (1 << i));
|
||||
writePin(data_pins[i], data & (1 << i));
|
||||
}
|
||||
hd44780_latch();
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_write_pin_high(data_pins[i]);
|
||||
writePinHigh(data_pins[i]);
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t hd44780_read(bool isData) {
|
||||
uint8_t data = 0;
|
||||
|
||||
gpio_write_pin(HD44780_RS_PIN, isData);
|
||||
gpio_write_pin_high(HD44780_RW_PIN);
|
||||
writePin(HD44780_RS_PIN, isData);
|
||||
writePinHigh(HD44780_RW_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_set_pin_input(data_pins[i]);
|
||||
setPinInput(data_pins[i]);
|
||||
}
|
||||
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
|
||||
// Read high nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
data |= (gpio_read_pin(data_pins[i]) << i);
|
||||
data |= (readPin(data_pins[i]) << i);
|
||||
}
|
||||
|
||||
data <<= 4;
|
||||
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
writePinLow(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
gpio_write_pin_high(HD44780_E_PIN);
|
||||
writePinHigh(HD44780_E_PIN);
|
||||
wait_us(HD44780_ENABLE_DELAY_US);
|
||||
|
||||
// Read low nibble
|
||||
for (int i = 0; i < 4; i++) {
|
||||
data |= (gpio_read_pin(data_pins[i]) << i);
|
||||
data |= (readPin(data_pins[i]) << i);
|
||||
}
|
||||
|
||||
gpio_write_pin_low(HD44780_E_PIN);
|
||||
writePinLow(HD44780_E_PIN);
|
||||
|
||||
return data;
|
||||
}
|
||||
@@ -171,20 +171,20 @@ void hd44780_set_ddram_address(uint8_t address) {
|
||||
}
|
||||
|
||||
void hd44780_init(bool cursor, bool blink) {
|
||||
gpio_set_pin_output(HD44780_RS_PIN);
|
||||
gpio_set_pin_output(HD44780_RW_PIN);
|
||||
gpio_set_pin_output(HD44780_E_PIN);
|
||||
setPinOutput(HD44780_RS_PIN);
|
||||
setPinOutput(HD44780_RW_PIN);
|
||||
setPinOutput(HD44780_E_PIN);
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
gpio_set_pin_output(data_pins[i]);
|
||||
setPinOutput(data_pins[i]);
|
||||
}
|
||||
|
||||
wait_ms(HD44780_INIT_DELAY_MS);
|
||||
|
||||
// Manually configure for 4-bit mode - can't use hd44780_command() yet
|
||||
// HD44780U datasheet, Fig. 24 (p46)
|
||||
gpio_write_pin_high(data_pins[0]); // Function set
|
||||
gpio_write_pin_high(data_pins[1]); // DL = 1
|
||||
writePinHigh(data_pins[0]); // Function set
|
||||
writePinHigh(data_pins[1]); // DL = 1
|
||||
hd44780_latch();
|
||||
wait_ms(5);
|
||||
// Send again
|
||||
@@ -194,7 +194,7 @@ void hd44780_init(bool cursor, bool blink) {
|
||||
hd44780_latch();
|
||||
wait_us(64);
|
||||
|
||||
gpio_write_pin_low(data_pins[0]); // DL = 0
|
||||
writePinLow(data_pins[0]); // DL = 0
|
||||
hd44780_latch();
|
||||
wait_us(64);
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@ static void InvertCharacter(uint8_t *cursor) {
|
||||
}
|
||||
|
||||
bool st7565_init(display_rotation_t rotation) {
|
||||
gpio_set_pin_output(ST7565_A0_PIN);
|
||||
gpio_write_pin_high(ST7565_A0_PIN);
|
||||
gpio_set_pin_output(ST7565_RST_PIN);
|
||||
gpio_write_pin_high(ST7565_RST_PIN);
|
||||
setPinOutput(ST7565_A0_PIN);
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
setPinOutput(ST7565_RST_PIN);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
|
||||
st7565_rotation = st7565_init_user(rotation);
|
||||
|
||||
@@ -488,18 +488,18 @@ void st7565_task(void) {
|
||||
__attribute__((weak)) void st7565_task_user(void) {}
|
||||
|
||||
void st7565_reset(void) {
|
||||
gpio_write_pin_low(ST7565_RST_PIN);
|
||||
writePinLow(ST7565_RST_PIN);
|
||||
wait_ms(20);
|
||||
gpio_write_pin_high(ST7565_RST_PIN);
|
||||
writePinHigh(ST7565_RST_PIN);
|
||||
wait_ms(20);
|
||||
}
|
||||
|
||||
spi_status_t st7565_send_cmd(uint8_t cmd) {
|
||||
gpio_write_pin_low(ST7565_A0_PIN);
|
||||
writePinLow(ST7565_A0_PIN);
|
||||
return spi_write(cmd);
|
||||
}
|
||||
|
||||
spi_status_t st7565_send_data(uint8_t *data, uint16_t length) {
|
||||
gpio_write_pin_high(ST7565_A0_PIN);
|
||||
writePinHigh(ST7565_A0_PIN);
|
||||
return spi_transmit(data, length);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
# elif defined(PROTOCOL_CHIBIOS)
|
||||
# include "hal.h"
|
||||
# include "chibios_config.h"
|
||||
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103) || defined(MCU_RP)
|
||||
# if defined(STM32F0XX) || defined(STM32F1XX) || defined(STM32F3XX) || defined(STM32F4XX) || defined(STM32L0XX) || defined(GD32VF103)
|
||||
# define APA102_NOPS (100 / (1000000000L / (CPU_CLOCK / 4))) // This calculates how many loops of 4 nops to run to delay 100 ns
|
||||
# else
|
||||
# error APA102_NOPS configuration required
|
||||
@@ -43,39 +43,72 @@
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define APA102_SEND_BIT(byte, bit) \
|
||||
do { \
|
||||
gpio_write_pin(APA102_DI_PIN, (byte >> bit) & 1); \
|
||||
io_wait; \
|
||||
gpio_write_pin_high(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
gpio_write_pin_low(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
#define APA102_SEND_BIT(byte, bit) \
|
||||
do { \
|
||||
writePin(APA102_DI_PIN, (byte >> bit) & 1); \
|
||||
io_wait; \
|
||||
writePinHigh(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
writePinLow(APA102_CI_PIN); \
|
||||
io_wait; \
|
||||
} while (0)
|
||||
|
||||
uint8_t apa102_led_brightness = APA102_DEFAULT_BRIGHTNESS;
|
||||
|
||||
static void apa102_send_byte(uint8_t byte) {
|
||||
APA102_SEND_BIT(byte, 7);
|
||||
APA102_SEND_BIT(byte, 6);
|
||||
APA102_SEND_BIT(byte, 5);
|
||||
APA102_SEND_BIT(byte, 4);
|
||||
APA102_SEND_BIT(byte, 3);
|
||||
APA102_SEND_BIT(byte, 2);
|
||||
APA102_SEND_BIT(byte, 1);
|
||||
APA102_SEND_BIT(byte, 0);
|
||||
void static apa102_start_frame(void);
|
||||
void static apa102_end_frame(uint16_t num_leds);
|
||||
|
||||
void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness);
|
||||
void static apa102_send_byte(uint8_t byte);
|
||||
|
||||
void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds) {
|
||||
LED_TYPE *end = start_led + num_leds;
|
||||
|
||||
apa102_start_frame();
|
||||
for (LED_TYPE *led = start_led; led < end; led++) {
|
||||
apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
|
||||
}
|
||||
apa102_end_frame(num_leds);
|
||||
}
|
||||
|
||||
static void apa102_start_frame(void) {
|
||||
gpio_write_pin_low(APA102_DI_PIN);
|
||||
gpio_write_pin_low(APA102_CI_PIN);
|
||||
// Overwrite the default rgblight_call_driver to use apa102 driver
|
||||
void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
|
||||
apa102_setleds(start_led, num_leds);
|
||||
}
|
||||
|
||||
void static apa102_init(void) {
|
||||
setPinOutput(APA102_DI_PIN);
|
||||
setPinOutput(APA102_CI_PIN);
|
||||
|
||||
writePinLow(APA102_DI_PIN);
|
||||
writePinLow(APA102_CI_PIN);
|
||||
}
|
||||
|
||||
void apa102_set_brightness(uint8_t brightness) {
|
||||
if (brightness > APA102_MAX_BRIGHTNESS) {
|
||||
apa102_led_brightness = APA102_MAX_BRIGHTNESS;
|
||||
} else if (brightness < 0) {
|
||||
apa102_led_brightness = 0;
|
||||
} else {
|
||||
apa102_led_brightness = brightness;
|
||||
}
|
||||
}
|
||||
|
||||
void static apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) {
|
||||
apa102_send_byte(0b11100000 | brightness);
|
||||
apa102_send_byte(blue);
|
||||
apa102_send_byte(green);
|
||||
apa102_send_byte(red);
|
||||
}
|
||||
|
||||
void static apa102_start_frame(void) {
|
||||
apa102_init();
|
||||
for (uint16_t i = 0; i < 4; i++) {
|
||||
apa102_send_byte(0);
|
||||
}
|
||||
}
|
||||
|
||||
static void apa102_end_frame(uint16_t num_leds) {
|
||||
void static apa102_end_frame(uint16_t num_leds) {
|
||||
// This function has been taken from: https://github.com/pololu/apa102-arduino/blob/master/APA102.h
|
||||
// and adapted. The code is MIT licensed. I think thats compatible?
|
||||
//
|
||||
@@ -105,38 +138,16 @@ static void apa102_end_frame(uint16_t num_leds) {
|
||||
apa102_send_byte(0);
|
||||
}
|
||||
|
||||
gpio_write_pin_low(APA102_DI_PIN);
|
||||
gpio_write_pin_low(APA102_CI_PIN);
|
||||
apa102_init();
|
||||
}
|
||||
|
||||
static void apa102_send_frame(uint8_t red, uint8_t green, uint8_t blue, uint8_t brightness) {
|
||||
apa102_send_byte(0b11100000 | brightness);
|
||||
apa102_send_byte(blue);
|
||||
apa102_send_byte(green);
|
||||
apa102_send_byte(red);
|
||||
}
|
||||
|
||||
void apa102_init(void) {
|
||||
gpio_set_pin_output(APA102_DI_PIN);
|
||||
gpio_set_pin_output(APA102_CI_PIN);
|
||||
}
|
||||
|
||||
void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds) {
|
||||
rgb_led_t *end = start_led + num_leds;
|
||||
|
||||
apa102_start_frame();
|
||||
for (rgb_led_t *led = start_led; led < end; led++) {
|
||||
apa102_send_frame(led->r, led->g, led->b, apa102_led_brightness);
|
||||
}
|
||||
apa102_end_frame(num_leds);
|
||||
}
|
||||
|
||||
void apa102_set_brightness(uint8_t brightness) {
|
||||
if (brightness > APA102_MAX_BRIGHTNESS) {
|
||||
apa102_led_brightness = APA102_MAX_BRIGHTNESS;
|
||||
} else if (brightness < 0) {
|
||||
apa102_led_brightness = 0;
|
||||
} else {
|
||||
apa102_led_brightness = brightness;
|
||||
}
|
||||
void static apa102_send_byte(uint8_t byte) {
|
||||
APA102_SEND_BIT(byte, 7);
|
||||
APA102_SEND_BIT(byte, 6);
|
||||
APA102_SEND_BIT(byte, 5);
|
||||
APA102_SEND_BIT(byte, 4);
|
||||
APA102_SEND_BIT(byte, 3);
|
||||
APA102_SEND_BIT(byte, 2);
|
||||
APA102_SEND_BIT(byte, 1);
|
||||
APA102_SEND_BIT(byte, 0);
|
||||
}
|
||||
|
||||
@@ -19,19 +19,13 @@
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#if defined(RGBLIGHT_APA102)
|
||||
# define APA102_LED_COUNT RGBLIGHT_LED_COUNT
|
||||
#elif defined(RGB_MATRIX_APA102)
|
||||
# define APA102_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#ifndef APA102_DEFAULT_BRIGHTNESS
|
||||
# define APA102_DEFAULT_BRIGHTNESS 31
|
||||
#endif
|
||||
|
||||
#define APA102_MAX_BRIGHTNESS 31
|
||||
|
||||
void apa102_init(void);
|
||||
extern uint8_t apa102_led_brightness;
|
||||
|
||||
/* User Interface
|
||||
*
|
||||
@@ -43,6 +37,5 @@ void apa102_init(void);
|
||||
* - Set the data-out pin as output
|
||||
* - Send out the LED data
|
||||
*/
|
||||
void apa102_setleds(rgb_led_t *start_led, uint16_t num_leds);
|
||||
|
||||
void apa102_setleds(LED_TYPE *start_led, uint16_t num_leds);
|
||||
void apa102_set_brightness(uint8_t brightness);
|
||||
|
||||
168
drivers/led/aw20216.c
Normal file
168
drivers/led/aw20216.c
Normal file
@@ -0,0 +1,168 @@
|
||||
/* Copyright 2021 Jasper Chan
|
||||
* 2023 Huckies <https://github.com/Huckies>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "aw20216.h"
|
||||
#include "wait.h"
|
||||
#include "spi_master.h"
|
||||
|
||||
/* The AW20216 appears to be somewhat similar to the IS31FL743, although quite
|
||||
* a few things are different, such as the command byte format and page ordering.
|
||||
* The LED addresses start from 0x00 instead of 0x01.
|
||||
*/
|
||||
#define AWINIC_ID 0b1010 << 4
|
||||
|
||||
#define AW_PAGE_FUNCTION 0x00 << 1 // PG0, Function registers
|
||||
#define AW_PAGE_PWM 0x01 << 1 // PG1, LED PWM control
|
||||
#define AW_PAGE_SCALING 0x02 << 1 // PG2, LED current scaling control
|
||||
#define AW_PAGE_PATCHOICE 0x03 << 1 // PG3, Pattern choice?
|
||||
#define AW_PAGE_PWMSCALING 0x04 << 1 // PG4, LED PWM + Scaling control?
|
||||
|
||||
#define AW_WRITE 0
|
||||
#define AW_READ 1
|
||||
|
||||
#define AW_REG_CONFIGURATION 0x00 // PG0
|
||||
#define AW_REG_GLOBALCURRENT 0x01 // PG0
|
||||
#define AW_REG_RESET 0x2F // PG0
|
||||
#define AW_REG_MIXFUNCTION 0x46 // PG0
|
||||
|
||||
// Default value of AW_REG_CONFIGURATION
|
||||
// D7:D4 = 1011, SWSEL (SW1~SW12 active)
|
||||
// D3 = 0?, reserved (apparently this should be 1 but it doesn't seem to matter)
|
||||
// D2:D1 = 00, OSDE (open/short detection enable)
|
||||
// D0 = 0, CHIPEN (write 1 to enable LEDs when hardware enable pulled high)
|
||||
#define AW_CONFIG_DEFAULT 0b10110000
|
||||
#define AW_MIXCR_DEFAULT 0b00000000
|
||||
#define AW_RESET_CMD 0xAE
|
||||
#define AW_CHIPEN 1
|
||||
#define AW_LPEN (0x01 << 1)
|
||||
|
||||
#define AW_PWM_REGISTER_COUNT 216
|
||||
|
||||
#ifndef AW_SCALING_MAX
|
||||
# define AW_SCALING_MAX 150
|
||||
#endif
|
||||
|
||||
#ifndef AW_GLOBAL_CURRENT_MAX
|
||||
# define AW_GLOBAL_CURRENT_MAX 150
|
||||
#endif
|
||||
|
||||
#ifndef AW_SPI_MODE
|
||||
# define AW_SPI_MODE 0
|
||||
#endif
|
||||
|
||||
#ifndef AW_SPI_DIVISOR
|
||||
# define AW_SPI_DIVISOR 4
|
||||
#endif
|
||||
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][AW_PWM_REGISTER_COUNT];
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
bool aw20216_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) {
|
||||
static uint8_t s_spi_transfer_buffer[2] = {0};
|
||||
|
||||
if (!spi_start(cs_pin, false, AW_SPI_MODE, AW_SPI_DIVISOR)) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
s_spi_transfer_buffer[0] = (AWINIC_ID | page | AW_WRITE);
|
||||
s_spi_transfer_buffer[1] = reg;
|
||||
|
||||
if (spi_transmit(s_spi_transfer_buffer, 2) != SPI_STATUS_SUCCESS) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (spi_transmit(data, len) != SPI_STATUS_SUCCESS) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
spi_stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool aw20216_write_register(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t value) {
|
||||
// Little wrapper so callers need not care about sending a buffer
|
||||
return aw20216_write(cs_pin, page, reg, &value, 1);
|
||||
}
|
||||
|
||||
void aw20216_soft_reset(pin_t cs_pin) {
|
||||
aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_RESET, AW_RESET_CMD);
|
||||
}
|
||||
|
||||
static void aw20216_init_scaling(pin_t cs_pin) {
|
||||
// Set constant current to the max, control brightness with PWM
|
||||
for (uint8_t i = 0; i < AW_PWM_REGISTER_COUNT; i++) {
|
||||
aw20216_write_register(cs_pin, AW_PAGE_SCALING, i, AW_SCALING_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void aw20216_init_current_limit(pin_t cs_pin) {
|
||||
// Push config
|
||||
aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_GLOBALCURRENT, AW_GLOBAL_CURRENT_MAX);
|
||||
}
|
||||
|
||||
static inline void aw20216_soft_enable(pin_t cs_pin) {
|
||||
// Push config
|
||||
aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_CONFIGURATION, AW_CONFIG_DEFAULT | AW_CHIPEN);
|
||||
}
|
||||
|
||||
static inline void aw20216_auto_lowpower(pin_t cs_pin) {
|
||||
aw20216_write_register(cs_pin, AW_PAGE_FUNCTION, AW_REG_MIXFUNCTION, AW_MIXCR_DEFAULT | AW_LPEN);
|
||||
}
|
||||
|
||||
void aw20216_init(pin_t cs_pin, pin_t en_pin) {
|
||||
setPinOutput(en_pin);
|
||||
writePinHigh(en_pin);
|
||||
|
||||
aw20216_soft_reset(cs_pin);
|
||||
wait_ms(2);
|
||||
|
||||
// Drivers should start with all scaling and PWM registers as off
|
||||
aw20216_init_current_limit(cs_pin);
|
||||
aw20216_init_scaling(cs_pin);
|
||||
|
||||
aw20216_soft_enable(cs_pin);
|
||||
aw20216_auto_lowpower(cs_pin);
|
||||
}
|
||||
|
||||
void aw20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
aw_led led;
|
||||
memcpy_P(&led, (&g_aw_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
g_pwm_buffer[led.driver][led.g] = green;
|
||||
g_pwm_buffer[led.driver][led.b] = blue;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void aw20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (uint8_t i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
|
||||
aw20216_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void aw20216_update_pwm_buffers(pin_t cs_pin, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
aw20216_write(cs_pin, AW_PAGE_PWM, 0, g_pwm_buffer[index], AW_PWM_REGISTER_COUNT);
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
253
drivers/led/aw20216.h
Normal file
253
drivers/led/aw20216.h
Normal file
@@ -0,0 +1,253 @@
|
||||
/* Copyright 2021 Jasper Chan (Gigahawk)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "gpio.h"
|
||||
|
||||
typedef struct aw_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} aw_led;
|
||||
|
||||
extern const aw_led PROGMEM g_aw_leds[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
void aw20216_init(pin_t cs_pin, pin_t en_pin);
|
||||
void aw20216_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void aw20216_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
void aw20216_update_pwm_buffers(pin_t cs_pin, uint8_t index);
|
||||
|
||||
#define CS1_SW1 0x00
|
||||
#define CS2_SW1 0x01
|
||||
#define CS3_SW1 0x02
|
||||
#define CS4_SW1 0x03
|
||||
#define CS5_SW1 0x04
|
||||
#define CS6_SW1 0x05
|
||||
#define CS7_SW1 0x06
|
||||
#define CS8_SW1 0x07
|
||||
#define CS9_SW1 0x08
|
||||
#define CS10_SW1 0x09
|
||||
#define CS11_SW1 0x0A
|
||||
#define CS12_SW1 0x0B
|
||||
#define CS13_SW1 0x0C
|
||||
#define CS14_SW1 0x0D
|
||||
#define CS15_SW1 0x0E
|
||||
#define CS16_SW1 0x0F
|
||||
#define CS17_SW1 0x10
|
||||
#define CS18_SW1 0x11
|
||||
#define CS1_SW2 0x12
|
||||
#define CS2_SW2 0x13
|
||||
#define CS3_SW2 0x14
|
||||
#define CS4_SW2 0x15
|
||||
#define CS5_SW2 0x16
|
||||
#define CS6_SW2 0x17
|
||||
#define CS7_SW2 0x18
|
||||
#define CS8_SW2 0x19
|
||||
#define CS9_SW2 0x1A
|
||||
#define CS10_SW2 0x1B
|
||||
#define CS11_SW2 0x1C
|
||||
#define CS12_SW2 0x1D
|
||||
#define CS13_SW2 0x1E
|
||||
#define CS14_SW2 0x1F
|
||||
#define CS15_SW2 0x20
|
||||
#define CS16_SW2 0x21
|
||||
#define CS17_SW2 0x22
|
||||
#define CS18_SW2 0x23
|
||||
#define CS1_SW3 0x24
|
||||
#define CS2_SW3 0x25
|
||||
#define CS3_SW3 0x26
|
||||
#define CS4_SW3 0x27
|
||||
#define CS5_SW3 0x28
|
||||
#define CS6_SW3 0x29
|
||||
#define CS7_SW3 0x2A
|
||||
#define CS8_SW3 0x2B
|
||||
#define CS9_SW3 0x2C
|
||||
#define CS10_SW3 0x2D
|
||||
#define CS11_SW3 0x2E
|
||||
#define CS12_SW3 0x2F
|
||||
#define CS13_SW3 0x30
|
||||
#define CS14_SW3 0x31
|
||||
#define CS15_SW3 0x32
|
||||
#define CS16_SW3 0x33
|
||||
#define CS17_SW3 0x34
|
||||
#define CS18_SW3 0x35
|
||||
#define CS1_SW4 0x36
|
||||
#define CS2_SW4 0x37
|
||||
#define CS3_SW4 0x38
|
||||
#define CS4_SW4 0x39
|
||||
#define CS5_SW4 0x3A
|
||||
#define CS6_SW4 0x3B
|
||||
#define CS7_SW4 0x3C
|
||||
#define CS8_SW4 0x3D
|
||||
#define CS9_SW4 0x3E
|
||||
#define CS10_SW4 0x3F
|
||||
#define CS11_SW4 0x40
|
||||
#define CS12_SW4 0x41
|
||||
#define CS13_SW4 0x42
|
||||
#define CS14_SW4 0x43
|
||||
#define CS15_SW4 0x44
|
||||
#define CS16_SW4 0x45
|
||||
#define CS17_SW4 0x46
|
||||
#define CS18_SW4 0x47
|
||||
#define CS1_SW5 0x48
|
||||
#define CS2_SW5 0x49
|
||||
#define CS3_SW5 0x4A
|
||||
#define CS4_SW5 0x4B
|
||||
#define CS5_SW5 0x4C
|
||||
#define CS6_SW5 0x4D
|
||||
#define CS7_SW5 0x4E
|
||||
#define CS8_SW5 0x4F
|
||||
#define CS9_SW5 0x50
|
||||
#define CS10_SW5 0x51
|
||||
#define CS11_SW5 0x52
|
||||
#define CS12_SW5 0x53
|
||||
#define CS13_SW5 0x54
|
||||
#define CS14_SW5 0x55
|
||||
#define CS15_SW5 0x56
|
||||
#define CS16_SW5 0x57
|
||||
#define CS17_SW5 0x58
|
||||
#define CS18_SW5 0x59
|
||||
#define CS1_SW6 0x5A
|
||||
#define CS2_SW6 0x5B
|
||||
#define CS3_SW6 0x5C
|
||||
#define CS4_SW6 0x5D
|
||||
#define CS5_SW6 0x5E
|
||||
#define CS6_SW6 0x5F
|
||||
#define CS7_SW6 0x60
|
||||
#define CS8_SW6 0x61
|
||||
#define CS9_SW6 0x62
|
||||
#define CS10_SW6 0x63
|
||||
#define CS11_SW6 0x64
|
||||
#define CS12_SW6 0x65
|
||||
#define CS13_SW6 0x66
|
||||
#define CS14_SW6 0x67
|
||||
#define CS15_SW6 0x68
|
||||
#define CS16_SW6 0x69
|
||||
#define CS17_SW6 0x6A
|
||||
#define CS18_SW6 0x6B
|
||||
#define CS1_SW7 0x6C
|
||||
#define CS2_SW7 0x6D
|
||||
#define CS3_SW7 0x6E
|
||||
#define CS4_SW7 0x6F
|
||||
#define CS5_SW7 0x70
|
||||
#define CS6_SW7 0x71
|
||||
#define CS7_SW7 0x72
|
||||
#define CS8_SW7 0x73
|
||||
#define CS9_SW7 0x74
|
||||
#define CS10_SW7 0x75
|
||||
#define CS11_SW7 0x76
|
||||
#define CS12_SW7 0x77
|
||||
#define CS13_SW7 0x78
|
||||
#define CS14_SW7 0x79
|
||||
#define CS15_SW7 0x7A
|
||||
#define CS16_SW7 0x7B
|
||||
#define CS17_SW7 0x7C
|
||||
#define CS18_SW7 0x7D
|
||||
#define CS1_SW8 0x7E
|
||||
#define CS2_SW8 0x7F
|
||||
#define CS3_SW8 0x80
|
||||
#define CS4_SW8 0x81
|
||||
#define CS5_SW8 0x82
|
||||
#define CS6_SW8 0x83
|
||||
#define CS7_SW8 0x84
|
||||
#define CS8_SW8 0x85
|
||||
#define CS9_SW8 0x86
|
||||
#define CS10_SW8 0x87
|
||||
#define CS11_SW8 0x88
|
||||
#define CS12_SW8 0x89
|
||||
#define CS13_SW8 0x8A
|
||||
#define CS14_SW8 0x8B
|
||||
#define CS15_SW8 0x8C
|
||||
#define CS16_SW8 0x8D
|
||||
#define CS17_SW8 0x8E
|
||||
#define CS18_SW8 0x8F
|
||||
#define CS1_SW9 0x90
|
||||
#define CS2_SW9 0x91
|
||||
#define CS3_SW9 0x92
|
||||
#define CS4_SW9 0x93
|
||||
#define CS5_SW9 0x94
|
||||
#define CS6_SW9 0x95
|
||||
#define CS7_SW9 0x96
|
||||
#define CS8_SW9 0x97
|
||||
#define CS9_SW9 0x98
|
||||
#define CS10_SW9 0x99
|
||||
#define CS11_SW9 0x9A
|
||||
#define CS12_SW9 0x9B
|
||||
#define CS13_SW9 0x9C
|
||||
#define CS14_SW9 0x9D
|
||||
#define CS15_SW9 0x9E
|
||||
#define CS16_SW9 0x9F
|
||||
#define CS17_SW9 0xA0
|
||||
#define CS18_SW9 0xA1
|
||||
#define CS1_SW10 0xA2
|
||||
#define CS2_SW10 0xA3
|
||||
#define CS3_SW10 0xA4
|
||||
#define CS4_SW10 0xA5
|
||||
#define CS5_SW10 0xA6
|
||||
#define CS6_SW10 0xA7
|
||||
#define CS7_SW10 0xA8
|
||||
#define CS8_SW10 0xA9
|
||||
#define CS9_SW10 0xAA
|
||||
#define CS10_SW10 0xAB
|
||||
#define CS11_SW10 0xAC
|
||||
#define CS12_SW10 0xAD
|
||||
#define CS13_SW10 0xAE
|
||||
#define CS14_SW10 0xAF
|
||||
#define CS15_SW10 0xB0
|
||||
#define CS16_SW10 0xB1
|
||||
#define CS17_SW10 0xB2
|
||||
#define CS18_SW10 0xB3
|
||||
#define CS1_SW11 0xB4
|
||||
#define CS2_SW11 0xB5
|
||||
#define CS3_SW11 0xB6
|
||||
#define CS4_SW11 0xB7
|
||||
#define CS5_SW11 0xB8
|
||||
#define CS6_SW11 0xB9
|
||||
#define CS7_SW11 0xBA
|
||||
#define CS8_SW11 0xBB
|
||||
#define CS9_SW11 0xBC
|
||||
#define CS10_SW11 0xBD
|
||||
#define CS11_SW11 0xBE
|
||||
#define CS12_SW11 0xBF
|
||||
#define CS13_SW11 0xC0
|
||||
#define CS14_SW11 0xC1
|
||||
#define CS15_SW11 0xC2
|
||||
#define CS16_SW11 0xC3
|
||||
#define CS17_SW11 0xC4
|
||||
#define CS18_SW11 0xC5
|
||||
#define CS1_SW12 0xC6
|
||||
#define CS2_SW12 0xC7
|
||||
#define CS3_SW12 0xC8
|
||||
#define CS4_SW12 0xC9
|
||||
#define CS5_SW12 0xCA
|
||||
#define CS6_SW12 0xCB
|
||||
#define CS7_SW12 0xCC
|
||||
#define CS8_SW12 0xCD
|
||||
#define CS9_SW12 0xCE
|
||||
#define CS10_SW12 0xCF
|
||||
#define CS11_SW12 0xD0
|
||||
#define CS12_SW12 0xD1
|
||||
#define CS13_SW12 0xD2
|
||||
#define CS14_SW12 0xD3
|
||||
#define CS15_SW12 0xD4
|
||||
#define CS16_SW12 0xD5
|
||||
#define CS17_SW12 0xD6
|
||||
#define CS18_SW12 0xD7
|
||||
@@ -1,171 +0,0 @@
|
||||
/* Copyright 2021 Jasper Chan
|
||||
* 2023 Huckies <https://github.com/Huckies>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "aw20216s.h"
|
||||
#include "wait.h"
|
||||
#include "spi_master.h"
|
||||
|
||||
#define AW20216S_PWM_REGISTER_COUNT 216
|
||||
|
||||
#ifndef AW20216S_CONFIGURATION
|
||||
# define AW20216S_CONFIGURATION (AW20216S_CONFIGURATION_SWSEL_1_12 | AW20216S_CONFIGURATION_CHIPEN)
|
||||
#endif
|
||||
|
||||
#ifndef AW20216S_MIX_FUNCTION
|
||||
# define AW20216S_MIX_FUNCTION (AW20216S_MIX_FUNCTION_LPEN)
|
||||
#endif
|
||||
|
||||
#ifndef AW20216S_SCALING_MAX
|
||||
# define AW20216S_SCALING_MAX 150
|
||||
#endif
|
||||
|
||||
#ifndef AW20216S_GLOBAL_CURRENT_MAX
|
||||
# define AW20216S_GLOBAL_CURRENT_MAX 150
|
||||
#endif
|
||||
|
||||
#ifndef AW20216S_SPI_MODE
|
||||
# define AW20216S_SPI_MODE 0
|
||||
#endif
|
||||
|
||||
#ifndef AW20216S_SPI_DIVISOR
|
||||
# define AW20216S_SPI_DIVISOR 4
|
||||
#endif
|
||||
|
||||
typedef struct aw20216s_driver_t {
|
||||
uint8_t pwm_buffer[AW20216S_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
} PACKED aw20216s_driver_t;
|
||||
|
||||
aw20216s_driver_t driver_buffers[AW20216S_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
bool aw20216s_write(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t* data, uint8_t len) {
|
||||
static uint8_t s_spi_transfer_buffer[2] = {0};
|
||||
|
||||
if (!spi_start(cs_pin, false, AW20216S_SPI_MODE, AW20216S_SPI_DIVISOR)) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
s_spi_transfer_buffer[0] = (AW20216S_ID | page | AW20216S_WRITE);
|
||||
s_spi_transfer_buffer[1] = reg;
|
||||
|
||||
if (spi_transmit(s_spi_transfer_buffer, 2) != SPI_STATUS_SUCCESS) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (spi_transmit(data, len) != SPI_STATUS_SUCCESS) {
|
||||
spi_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
spi_stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline bool aw20216s_write_register(pin_t cs_pin, uint8_t page, uint8_t reg, uint8_t value) {
|
||||
// Little wrapper so callers need not care about sending a buffer
|
||||
return aw20216s_write(cs_pin, page, reg, &value, 1);
|
||||
}
|
||||
|
||||
void aw20216s_soft_reset(pin_t cs_pin) {
|
||||
aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_FUNCTION_REG_RESET, AW20216S_RESET_MAGIC);
|
||||
}
|
||||
|
||||
static void aw20216s_init_scaling(pin_t cs_pin) {
|
||||
// Set constant current to the max, control brightness with PWM
|
||||
for (uint8_t i = 0; i < AW20216S_PWM_REGISTER_COUNT; i++) {
|
||||
aw20216s_write_register(cs_pin, AW20216S_PAGE_SCALING, i, AW20216S_SCALING_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void aw20216s_init_current_limit(pin_t cs_pin) {
|
||||
// Push config
|
||||
aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_FUNCTION_REG_GLOBAL_CURRENT, AW20216S_GLOBAL_CURRENT_MAX);
|
||||
}
|
||||
|
||||
static inline void aw20216s_soft_enable(pin_t cs_pin) {
|
||||
// Push config
|
||||
aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_FUNCTION_REG_CONFIGURATION, AW20216S_CONFIGURATION);
|
||||
}
|
||||
|
||||
static inline void aw20216s_auto_lowpower(pin_t cs_pin) {
|
||||
aw20216s_write_register(cs_pin, AW20216S_PAGE_FUNCTION, AW20216S_FUNCTION_REG_MIX_FUNCTION, AW20216S_MIX_FUNCTION);
|
||||
}
|
||||
|
||||
void aw20216s_init_drivers(void) {
|
||||
spi_init();
|
||||
|
||||
#if defined(AW20216S_EN_PIN)
|
||||
gpio_set_pin_output(AW20216S_EN_PIN);
|
||||
gpio_write_pin_high(AW20216S_EN_PIN);
|
||||
#endif
|
||||
|
||||
aw20216s_init(AW20216S_CS_PIN_1);
|
||||
#if defined(AW20216S_CS_PIN_2)
|
||||
aw20216s_init(AW20216S_CS_PIN_2);
|
||||
#endif
|
||||
}
|
||||
|
||||
void aw20216s_init(pin_t cs_pin) {
|
||||
aw20216s_soft_reset(cs_pin);
|
||||
wait_ms(2);
|
||||
|
||||
// Drivers should start with all scaling and PWM registers as off
|
||||
aw20216s_init_current_limit(cs_pin);
|
||||
aw20216s_init_scaling(cs_pin);
|
||||
|
||||
aw20216s_soft_enable(cs_pin);
|
||||
aw20216s_auto_lowpower(cs_pin);
|
||||
}
|
||||
|
||||
void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
aw20216s_led_t led;
|
||||
memcpy_P(&led, (&g_aw20216s_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.r] == red && driver_buffers[led.driver].pwm_buffer[led.g] == green && driver_buffers[led.driver].pwm_buffer[led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.r] = red;
|
||||
driver_buffers[led.driver].pwm_buffer[led.g] = green;
|
||||
driver_buffers[led.driver].pwm_buffer[led.b] = blue;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (uint8_t i = 0; i < AW20216S_LED_COUNT; i++) {
|
||||
aw20216s_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
aw20216s_write(cs_pin, AW20216S_PAGE_PWM, 0, driver_buffers[index].pwm_buffer, AW20216S_PWM_REGISTER_COUNT);
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void aw20216s_flush(void) {
|
||||
aw20216s_update_pwm_buffers(AW20216S_CS_PIN_1, 0);
|
||||
#if defined(AW20216S_CS_PIN_2)
|
||||
aw20216s_update_pwm_buffers(AW20216S_CS_PIN_2, 1);
|
||||
#endif
|
||||
}
|
||||
@@ -1,560 +0,0 @@
|
||||
/* Copyright 2021 Jasper Chan (Gigahawk)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "gpio.h"
|
||||
#include "util.h"
|
||||
|
||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
|
||||
#ifdef AW_SCALING_MAX
|
||||
# define AW20216S_SCALING_MAX AW_SCALING_MAX
|
||||
#endif
|
||||
#ifdef AW_GLOBAL_CURRENT_MAX
|
||||
# define AW20216S_GLOBAL_CURRENT_MAX AW_GLOBAL_CURRENT_MAX
|
||||
#endif
|
||||
#ifdef AW_SPI_MODE
|
||||
# define AW20216S_SPI_MODE AW_SPI_MODE
|
||||
#endif
|
||||
#ifdef AW_SPI_DIVISOR
|
||||
# define AW20216S_SPI_DIVISOR AW_SPI_DIVISOR
|
||||
#endif
|
||||
#ifdef DRIVER_1_CS
|
||||
# define AW20216S_CS_PIN_1 DRIVER_1_CS
|
||||
#endif
|
||||
#ifdef DRIVER_2_CS
|
||||
# define AW20216S_CS_PIN_2 DRIVER_2_CS
|
||||
#endif
|
||||
#ifdef DRIVER_1_EN
|
||||
# define AW20216S_EN_PIN DRIVER_1_EN
|
||||
#endif
|
||||
#ifdef AW20216S_EN_PIN_1
|
||||
# define AW20216S_EN_PIN AW20216S_EN_PIN_1
|
||||
#endif
|
||||
|
||||
#define aw_led aw20216s_led_t
|
||||
#define g_aw_leds g_aw20216s_leds
|
||||
// ========
|
||||
|
||||
#define AW20216S_ID (0b1010 << 4)
|
||||
#define AW20216S_WRITE 0
|
||||
#define AW20216S_READ 1
|
||||
|
||||
#define AW20216S_PAGE_FUNCTION (0x00 << 1)
|
||||
#define AW20216S_PAGE_PWM (0x01 << 1)
|
||||
#define AW20216S_PAGE_SCALING (0x02 << 1)
|
||||
#define AW20216S_PAGE_PATTERN_CHOICE (0x03 << 1)
|
||||
#define AW20216S_PAGE_PWM_SCALING (0x04 << 1)
|
||||
|
||||
#define AW20216S_FUNCTION_REG_CONFIGURATION 0x00
|
||||
#define AW20216S_CONFIGURATION_SWSEL_1_12 (0b1011 << 4)
|
||||
#define AW20216S_CONFIGURATION_CHIPEN (0b1 << 0)
|
||||
|
||||
#define AW20216S_FUNCTION_REG_GLOBAL_CURRENT 0x01
|
||||
|
||||
#define AW20216S_FUNCTION_REG_RESET 0x2F
|
||||
#define AW20216S_RESET_MAGIC 0xAE
|
||||
|
||||
#define AW20216S_FUNCTION_REG_MIX_FUNCTION 0x46
|
||||
#define AW20216S_MIX_FUNCTION_LPEN (0b1 << 1)
|
||||
|
||||
#if defined(RGB_MATRIX_AW20216S)
|
||||
# define AW20216S_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(AW20216S_CS_PIN_2)
|
||||
# define AW20216S_DRIVER_COUNT 2
|
||||
#elif defined(AW20216S_CS_PIN_1)
|
||||
# define AW20216S_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct aw20216s_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} PACKED aw20216s_led_t;
|
||||
|
||||
extern const aw20216s_led_t PROGMEM g_aw20216s_leds[AW20216S_LED_COUNT];
|
||||
|
||||
void aw20216s_init_drivers(void);
|
||||
void aw20216s_init(pin_t cs_pin);
|
||||
void aw20216s_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void aw20216s_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
void aw20216s_update_pwm_buffers(pin_t cs_pin, uint8_t index);
|
||||
|
||||
void aw20216s_flush(void);
|
||||
|
||||
#define SW1_CS1 0x00
|
||||
#define SW1_CS2 0x01
|
||||
#define SW1_CS3 0x02
|
||||
#define SW1_CS4 0x03
|
||||
#define SW1_CS5 0x04
|
||||
#define SW1_CS6 0x05
|
||||
#define SW1_CS7 0x06
|
||||
#define SW1_CS8 0x07
|
||||
#define SW1_CS9 0x08
|
||||
#define SW1_CS10 0x09
|
||||
#define SW1_CS11 0x0A
|
||||
#define SW1_CS12 0x0B
|
||||
#define SW1_CS13 0x0C
|
||||
#define SW1_CS14 0x0D
|
||||
#define SW1_CS15 0x0E
|
||||
#define SW1_CS16 0x0F
|
||||
#define SW1_CS17 0x10
|
||||
#define SW1_CS18 0x11
|
||||
|
||||
#define SW2_CS1 0x12
|
||||
#define SW2_CS2 0x13
|
||||
#define SW2_CS3 0x14
|
||||
#define SW2_CS4 0x15
|
||||
#define SW2_CS5 0x16
|
||||
#define SW2_CS6 0x17
|
||||
#define SW2_CS7 0x18
|
||||
#define SW2_CS8 0x19
|
||||
#define SW2_CS9 0x1A
|
||||
#define SW2_CS10 0x1B
|
||||
#define SW2_CS11 0x1C
|
||||
#define SW2_CS12 0x1D
|
||||
#define SW2_CS13 0x1E
|
||||
#define SW2_CS14 0x1F
|
||||
#define SW2_CS15 0x20
|
||||
#define SW2_CS16 0x21
|
||||
#define SW2_CS17 0x22
|
||||
#define SW2_CS18 0x23
|
||||
|
||||
#define SW3_CS1 0x24
|
||||
#define SW3_CS2 0x25
|
||||
#define SW3_CS3 0x26
|
||||
#define SW3_CS4 0x27
|
||||
#define SW3_CS5 0x28
|
||||
#define SW3_CS6 0x29
|
||||
#define SW3_CS7 0x2A
|
||||
#define SW3_CS8 0x2B
|
||||
#define SW3_CS9 0x2C
|
||||
#define SW3_CS10 0x2D
|
||||
#define SW3_CS11 0x2E
|
||||
#define SW3_CS12 0x2F
|
||||
#define SW3_CS13 0x30
|
||||
#define SW3_CS14 0x31
|
||||
#define SW3_CS15 0x32
|
||||
#define SW3_CS16 0x33
|
||||
#define SW3_CS17 0x34
|
||||
#define SW3_CS18 0x35
|
||||
|
||||
#define SW4_CS1 0x36
|
||||
#define SW4_CS2 0x37
|
||||
#define SW4_CS3 0x38
|
||||
#define SW4_CS4 0x39
|
||||
#define SW4_CS5 0x3A
|
||||
#define SW4_CS6 0x3B
|
||||
#define SW4_CS7 0x3C
|
||||
#define SW4_CS8 0x3D
|
||||
#define SW4_CS9 0x3E
|
||||
#define SW4_CS10 0x3F
|
||||
#define SW4_CS11 0x40
|
||||
#define SW4_CS12 0x41
|
||||
#define SW4_CS13 0x42
|
||||
#define SW4_CS14 0x43
|
||||
#define SW4_CS15 0x44
|
||||
#define SW4_CS16 0x45
|
||||
#define SW4_CS17 0x46
|
||||
#define SW4_CS18 0x47
|
||||
|
||||
#define SW5_CS1 0x48
|
||||
#define SW5_CS2 0x49
|
||||
#define SW5_CS3 0x4A
|
||||
#define SW5_CS4 0x4B
|
||||
#define SW5_CS5 0x4C
|
||||
#define SW5_CS6 0x4D
|
||||
#define SW5_CS7 0x4E
|
||||
#define SW5_CS8 0x4F
|
||||
#define SW5_CS9 0x50
|
||||
#define SW5_CS10 0x51
|
||||
#define SW5_CS11 0x52
|
||||
#define SW5_CS12 0x53
|
||||
#define SW5_CS13 0x54
|
||||
#define SW5_CS14 0x55
|
||||
#define SW5_CS15 0x56
|
||||
#define SW5_CS16 0x57
|
||||
#define SW5_CS17 0x58
|
||||
#define SW5_CS18 0x59
|
||||
|
||||
#define SW6_CS1 0x5A
|
||||
#define SW6_CS2 0x5B
|
||||
#define SW6_CS3 0x5C
|
||||
#define SW6_CS4 0x5D
|
||||
#define SW6_CS5 0x5E
|
||||
#define SW6_CS6 0x5F
|
||||
#define SW6_CS7 0x60
|
||||
#define SW6_CS8 0x61
|
||||
#define SW6_CS9 0x62
|
||||
#define SW6_CS10 0x63
|
||||
#define SW6_CS11 0x64
|
||||
#define SW6_CS12 0x65
|
||||
#define SW6_CS13 0x66
|
||||
#define SW6_CS14 0x67
|
||||
#define SW6_CS15 0x68
|
||||
#define SW6_CS16 0x69
|
||||
#define SW6_CS17 0x6A
|
||||
#define SW6_CS18 0x6B
|
||||
|
||||
#define SW7_CS1 0x6C
|
||||
#define SW7_CS2 0x6D
|
||||
#define SW7_CS3 0x6E
|
||||
#define SW7_CS4 0x6F
|
||||
#define SW7_CS5 0x70
|
||||
#define SW7_CS6 0x71
|
||||
#define SW7_CS7 0x72
|
||||
#define SW7_CS8 0x73
|
||||
#define SW7_CS9 0x74
|
||||
#define SW7_CS10 0x75
|
||||
#define SW7_CS11 0x76
|
||||
#define SW7_CS12 0x77
|
||||
#define SW7_CS13 0x78
|
||||
#define SW7_CS14 0x79
|
||||
#define SW7_CS15 0x7A
|
||||
#define SW7_CS16 0x7B
|
||||
#define SW7_CS17 0x7C
|
||||
#define SW7_CS18 0x7D
|
||||
|
||||
#define SW8_CS1 0x7E
|
||||
#define SW8_CS2 0x7F
|
||||
#define SW8_CS3 0x80
|
||||
#define SW8_CS4 0x81
|
||||
#define SW8_CS5 0x82
|
||||
#define SW8_CS6 0x83
|
||||
#define SW8_CS7 0x84
|
||||
#define SW8_CS8 0x85
|
||||
#define SW8_CS9 0x86
|
||||
#define SW8_CS10 0x87
|
||||
#define SW8_CS11 0x88
|
||||
#define SW8_CS12 0x89
|
||||
#define SW8_CS13 0x8A
|
||||
#define SW8_CS14 0x8B
|
||||
#define SW8_CS15 0x8C
|
||||
#define SW8_CS16 0x8D
|
||||
#define SW8_CS17 0x8E
|
||||
#define SW8_CS18 0x8F
|
||||
|
||||
#define SW9_CS1 0x90
|
||||
#define SW9_CS2 0x91
|
||||
#define SW9_CS3 0x92
|
||||
#define SW9_CS4 0x93
|
||||
#define SW9_CS5 0x94
|
||||
#define SW9_CS6 0x95
|
||||
#define SW9_CS7 0x96
|
||||
#define SW9_CS8 0x97
|
||||
#define SW9_CS9 0x98
|
||||
#define SW9_CS10 0x99
|
||||
#define SW9_CS11 0x9A
|
||||
#define SW9_CS12 0x9B
|
||||
#define SW9_CS13 0x9C
|
||||
#define SW9_CS14 0x9D
|
||||
#define SW9_CS15 0x9E
|
||||
#define SW9_CS16 0x9F
|
||||
#define SW9_CS17 0xA0
|
||||
#define SW9_CS18 0xA1
|
||||
|
||||
#define SW10_CS1 0xA2
|
||||
#define SW10_CS2 0xA3
|
||||
#define SW10_CS3 0xA4
|
||||
#define SW10_CS4 0xA5
|
||||
#define SW10_CS5 0xA6
|
||||
#define SW10_CS6 0xA7
|
||||
#define SW10_CS7 0xA8
|
||||
#define SW10_CS8 0xA9
|
||||
#define SW10_CS9 0xAA
|
||||
#define SW10_CS10 0xAB
|
||||
#define SW10_CS11 0xAC
|
||||
#define SW10_CS12 0xAD
|
||||
#define SW10_CS13 0xAE
|
||||
#define SW10_CS14 0xAF
|
||||
#define SW10_CS15 0xB0
|
||||
#define SW10_CS16 0xB1
|
||||
#define SW10_CS17 0xB2
|
||||
#define SW10_CS18 0xB3
|
||||
|
||||
#define SW11_CS1 0xB4
|
||||
#define SW11_CS2 0xB5
|
||||
#define SW11_CS3 0xB6
|
||||
#define SW11_CS4 0xB7
|
||||
#define SW11_CS5 0xB8
|
||||
#define SW11_CS6 0xB9
|
||||
#define SW11_CS7 0xBA
|
||||
#define SW11_CS8 0xBB
|
||||
#define SW11_CS9 0xBC
|
||||
#define SW11_CS10 0xBD
|
||||
#define SW11_CS11 0xBE
|
||||
#define SW11_CS12 0xBF
|
||||
#define SW11_CS13 0xC0
|
||||
#define SW11_CS14 0xC1
|
||||
#define SW11_CS15 0xC2
|
||||
#define SW11_CS16 0xC3
|
||||
#define SW11_CS17 0xC4
|
||||
#define SW11_CS18 0xC5
|
||||
|
||||
#define SW12_CS1 0xC6
|
||||
#define SW12_CS2 0xC7
|
||||
#define SW12_CS3 0xC8
|
||||
#define SW12_CS4 0xC9
|
||||
#define SW12_CS5 0xCA
|
||||
#define SW12_CS6 0xCB
|
||||
#define SW12_CS7 0xCC
|
||||
#define SW12_CS8 0xCD
|
||||
#define SW12_CS9 0xCE
|
||||
#define SW12_CS10 0xCF
|
||||
#define SW12_CS11 0xD0
|
||||
#define SW12_CS12 0xD1
|
||||
#define SW12_CS13 0xD2
|
||||
#define SW12_CS14 0xD3
|
||||
#define SW12_CS15 0xD4
|
||||
#define SW12_CS16 0xD5
|
||||
#define SW12_CS17 0xD6
|
||||
#define SW12_CS18 0xD7
|
||||
|
||||
// DEPRECATED - DO NOT USE
|
||||
|
||||
#define CS1_SW1 SW1_CS1
|
||||
#define CS2_SW1 SW1_CS2
|
||||
#define CS3_SW1 SW1_CS3
|
||||
#define CS4_SW1 SW1_CS4
|
||||
#define CS5_SW1 SW1_CS5
|
||||
#define CS6_SW1 SW1_CS6
|
||||
#define CS7_SW1 SW1_CS7
|
||||
#define CS8_SW1 SW1_CS8
|
||||
#define CS9_SW1 SW1_CS9
|
||||
#define CS10_SW1 SW1_CS10
|
||||
#define CS11_SW1 SW1_CS11
|
||||
#define CS12_SW1 SW1_CS12
|
||||
#define CS13_SW1 SW1_CS13
|
||||
#define CS14_SW1 SW1_CS14
|
||||
#define CS15_SW1 SW1_CS15
|
||||
#define CS16_SW1 SW1_CS16
|
||||
#define CS17_SW1 SW1_CS17
|
||||
#define CS18_SW1 SW1_CS18
|
||||
|
||||
#define CS1_SW2 SW2_CS1
|
||||
#define CS2_SW2 SW2_CS2
|
||||
#define CS3_SW2 SW2_CS3
|
||||
#define CS4_SW2 SW2_CS4
|
||||
#define CS5_SW2 SW2_CS5
|
||||
#define CS6_SW2 SW2_CS6
|
||||
#define CS7_SW2 SW2_CS7
|
||||
#define CS8_SW2 SW2_CS8
|
||||
#define CS9_SW2 SW2_CS9
|
||||
#define CS10_SW2 SW2_CS10
|
||||
#define CS11_SW2 SW2_CS11
|
||||
#define CS12_SW2 SW2_CS12
|
||||
#define CS13_SW2 SW2_CS13
|
||||
#define CS14_SW2 SW2_CS14
|
||||
#define CS15_SW2 SW2_CS15
|
||||
#define CS16_SW2 SW2_CS16
|
||||
#define CS17_SW2 SW2_CS17
|
||||
#define CS18_SW2 SW2_CS18
|
||||
|
||||
#define CS1_SW3 SW3_CS1
|
||||
#define CS2_SW3 SW3_CS2
|
||||
#define CS3_SW3 SW3_CS3
|
||||
#define CS4_SW3 SW3_CS4
|
||||
#define CS5_SW3 SW3_CS5
|
||||
#define CS6_SW3 SW3_CS6
|
||||
#define CS7_SW3 SW3_CS7
|
||||
#define CS8_SW3 SW3_CS8
|
||||
#define CS9_SW3 SW3_CS9
|
||||
#define CS10_SW3 SW3_CS10
|
||||
#define CS11_SW3 SW3_CS11
|
||||
#define CS12_SW3 SW3_CS12
|
||||
#define CS13_SW3 SW3_CS13
|
||||
#define CS14_SW3 SW3_CS14
|
||||
#define CS15_SW3 SW3_CS15
|
||||
#define CS16_SW3 SW3_CS16
|
||||
#define CS17_SW3 SW3_CS17
|
||||
#define CS18_SW3 SW3_CS18
|
||||
|
||||
#define CS1_SW4 SW4_CS1
|
||||
#define CS2_SW4 SW4_CS2
|
||||
#define CS3_SW4 SW4_CS3
|
||||
#define CS4_SW4 SW4_CS4
|
||||
#define CS5_SW4 SW4_CS5
|
||||
#define CS6_SW4 SW4_CS6
|
||||
#define CS7_SW4 SW4_CS7
|
||||
#define CS8_SW4 SW4_CS8
|
||||
#define CS9_SW4 SW4_CS9
|
||||
#define CS10_SW4 SW4_CS10
|
||||
#define CS11_SW4 SW4_CS11
|
||||
#define CS12_SW4 SW4_CS12
|
||||
#define CS13_SW4 SW4_CS13
|
||||
#define CS14_SW4 SW4_CS14
|
||||
#define CS15_SW4 SW4_CS15
|
||||
#define CS16_SW4 SW4_CS16
|
||||
#define CS17_SW4 SW4_CS17
|
||||
#define CS18_SW4 SW4_CS18
|
||||
|
||||
#define CS1_SW5 SW5_CS1
|
||||
#define CS2_SW5 SW5_CS2
|
||||
#define CS3_SW5 SW5_CS3
|
||||
#define CS4_SW5 SW5_CS4
|
||||
#define CS5_SW5 SW5_CS5
|
||||
#define CS6_SW5 SW5_CS6
|
||||
#define CS7_SW5 SW5_CS7
|
||||
#define CS8_SW5 SW5_CS8
|
||||
#define CS9_SW5 SW5_CS9
|
||||
#define CS10_SW5 SW5_CS10
|
||||
#define CS11_SW5 SW5_CS11
|
||||
#define CS12_SW5 SW5_CS12
|
||||
#define CS13_SW5 SW5_CS13
|
||||
#define CS14_SW5 SW5_CS14
|
||||
#define CS15_SW5 SW5_CS15
|
||||
#define CS16_SW5 SW5_CS16
|
||||
#define CS17_SW5 SW5_CS17
|
||||
#define CS18_SW5 SW5_CS18
|
||||
|
||||
#define CS1_SW6 SW6_CS1
|
||||
#define CS2_SW6 SW6_CS2
|
||||
#define CS3_SW6 SW6_CS3
|
||||
#define CS4_SW6 SW6_CS4
|
||||
#define CS5_SW6 SW6_CS5
|
||||
#define CS6_SW6 SW6_CS6
|
||||
#define CS7_SW6 SW6_CS7
|
||||
#define CS8_SW6 SW6_CS8
|
||||
#define CS9_SW6 SW6_CS9
|
||||
#define CS10_SW6 SW6_CS10
|
||||
#define CS11_SW6 SW6_CS11
|
||||
#define CS12_SW6 SW6_CS12
|
||||
#define CS13_SW6 SW6_CS13
|
||||
#define CS14_SW6 SW6_CS14
|
||||
#define CS15_SW6 SW6_CS15
|
||||
#define CS16_SW6 SW6_CS16
|
||||
#define CS17_SW6 SW6_CS17
|
||||
#define CS18_SW6 SW6_CS18
|
||||
|
||||
#define CS1_SW7 SW7_CS1
|
||||
#define CS2_SW7 SW7_CS2
|
||||
#define CS3_SW7 SW7_CS3
|
||||
#define CS4_SW7 SW7_CS4
|
||||
#define CS5_SW7 SW7_CS5
|
||||
#define CS6_SW7 SW7_CS6
|
||||
#define CS7_SW7 SW7_CS7
|
||||
#define CS8_SW7 SW7_CS8
|
||||
#define CS9_SW7 SW7_CS9
|
||||
#define CS10_SW7 SW7_CS10
|
||||
#define CS11_SW7 SW7_CS11
|
||||
#define CS12_SW7 SW7_CS12
|
||||
#define CS13_SW7 SW7_CS13
|
||||
#define CS14_SW7 SW7_CS14
|
||||
#define CS15_SW7 SW7_CS15
|
||||
#define CS16_SW7 SW7_CS16
|
||||
#define CS17_SW7 SW7_CS17
|
||||
#define CS18_SW7 SW7_CS18
|
||||
|
||||
#define CS1_SW8 SW8_CS1
|
||||
#define CS2_SW8 SW8_CS2
|
||||
#define CS3_SW8 SW8_CS3
|
||||
#define CS4_SW8 SW8_CS4
|
||||
#define CS5_SW8 SW8_CS5
|
||||
#define CS6_SW8 SW8_CS6
|
||||
#define CS7_SW8 SW8_CS7
|
||||
#define CS8_SW8 SW8_CS8
|
||||
#define CS9_SW8 SW8_CS9
|
||||
#define CS10_SW8 SW8_CS10
|
||||
#define CS11_SW8 SW8_CS11
|
||||
#define CS12_SW8 SW8_CS12
|
||||
#define CS13_SW8 SW8_CS13
|
||||
#define CS14_SW8 SW8_CS14
|
||||
#define CS15_SW8 SW8_CS15
|
||||
#define CS16_SW8 SW8_CS16
|
||||
#define CS17_SW8 SW8_CS17
|
||||
#define CS18_SW8 SW8_CS18
|
||||
|
||||
#define CS1_SW9 SW9_CS1
|
||||
#define CS2_SW9 SW9_CS2
|
||||
#define CS3_SW9 SW9_CS3
|
||||
#define CS4_SW9 SW9_CS4
|
||||
#define CS5_SW9 SW9_CS5
|
||||
#define CS6_SW9 SW9_CS6
|
||||
#define CS7_SW9 SW9_CS7
|
||||
#define CS8_SW9 SW9_CS8
|
||||
#define CS9_SW9 SW9_CS9
|
||||
#define CS10_SW9 SW9_CS10
|
||||
#define CS11_SW9 SW9_CS11
|
||||
#define CS12_SW9 SW9_CS12
|
||||
#define CS13_SW9 SW9_CS13
|
||||
#define CS14_SW9 SW9_CS14
|
||||
#define CS15_SW9 SW9_CS15
|
||||
#define CS16_SW9 SW9_CS16
|
||||
#define CS17_SW9 SW9_CS17
|
||||
#define CS18_SW9 SW9_CS18
|
||||
|
||||
#define CS1_SW10 SW10_CS1
|
||||
#define CS2_SW10 SW10_CS2
|
||||
#define CS3_SW10 SW10_CS3
|
||||
#define CS4_SW10 SW10_CS4
|
||||
#define CS5_SW10 SW10_CS5
|
||||
#define CS6_SW10 SW10_CS6
|
||||
#define CS7_SW10 SW10_CS7
|
||||
#define CS8_SW10 SW10_CS8
|
||||
#define CS9_SW10 SW10_CS9
|
||||
#define CS10_SW10 SW10_CS10
|
||||
#define CS11_SW10 SW10_CS11
|
||||
#define CS12_SW10 SW10_CS12
|
||||
#define CS13_SW10 SW10_CS13
|
||||
#define CS14_SW10 SW10_CS14
|
||||
#define CS15_SW10 SW10_CS15
|
||||
#define CS16_SW10 SW10_CS16
|
||||
#define CS17_SW10 SW10_CS17
|
||||
#define CS18_SW10 SW10_CS18
|
||||
|
||||
#define CS1_SW11 SW11_CS1
|
||||
#define CS2_SW11 SW11_CS2
|
||||
#define CS3_SW11 SW11_CS3
|
||||
#define CS4_SW11 SW11_CS4
|
||||
#define CS5_SW11 SW11_CS5
|
||||
#define CS6_SW11 SW11_CS6
|
||||
#define CS7_SW11 SW11_CS7
|
||||
#define CS8_SW11 SW11_CS8
|
||||
#define CS9_SW11 SW11_CS9
|
||||
#define CS10_SW11 SW11_CS10
|
||||
#define CS11_SW11 SW11_CS11
|
||||
#define CS12_SW11 SW11_CS12
|
||||
#define CS13_SW11 SW11_CS13
|
||||
#define CS14_SW11 SW11_CS14
|
||||
#define CS15_SW11 SW11_CS15
|
||||
#define CS16_SW11 SW11_CS16
|
||||
#define CS17_SW11 SW11_CS17
|
||||
#define CS18_SW11 SW11_CS18
|
||||
|
||||
#define CS1_SW12 SW12_CS1
|
||||
#define CS2_SW12 SW12_CS2
|
||||
#define CS3_SW12 SW12_CS3
|
||||
#define CS4_SW12 SW12_CS4
|
||||
#define CS5_SW12 SW12_CS5
|
||||
#define CS6_SW12 SW12_CS6
|
||||
#define CS7_SW12 SW12_CS7
|
||||
#define CS8_SW12 SW12_CS8
|
||||
#define CS9_SW12 SW12_CS9
|
||||
#define CS10_SW12 SW12_CS10
|
||||
#define CS11_SW12 SW12_CS11
|
||||
#define CS12_SW12 SW12_CS12
|
||||
#define CS13_SW12 SW12_CS13
|
||||
#define CS14_SW12 SW12_CS14
|
||||
#define CS15_SW12 SW12_CS15
|
||||
#define CS16_SW12 SW12_CS16
|
||||
#define CS17_SW12 SW12_CS17
|
||||
#define CS18_SW12 SW12_CS18
|
||||
221
drivers/led/ckled2001-simple.c
Normal file
221
drivers/led/ckled2001-simple.c
Normal file
@@ -0,0 +1,221 @@
|
||||
/* Copyright 2021 @ Keychron (https://www.keychron.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ckled2001-simple.h"
|
||||
#include "i2c_master.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifndef CKLED2001_TIMEOUT
|
||||
# define CKLED2001_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef CKLED2001_PERSISTENCE
|
||||
# define CKLED2001_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef PHASE_CHANNEL
|
||||
# define PHASE_CHANNEL MSKPHASE_12CHANNEL
|
||||
#endif
|
||||
|
||||
#ifndef CKLED2001_CURRENT_TUNE
|
||||
# define CKLED2001_CURRENT_TUNE \
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
|
||||
#endif
|
||||
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// These buffers match the CKLED2001 PWM registers.
|
||||
// The control buffers match the PG0 LED On/Off registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in ckled2001_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
|
||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
// If the transaction fails function returns false.
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if CKLED2001_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// Assumes PG1 is already selected.
|
||||
// If any of the transactions fails function returns false.
|
||||
// Transmit PWM registers in 12 transfers of 16 bytes.
|
||||
// g_twi_transfer_buffer[] is 20 bytes
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (int i = 0; i < 192; i += 16) {
|
||||
g_twi_transfer_buffer[0] = i;
|
||||
// Copy the data from i to i+15.
|
||||
// Device will auto-increment register for data after the first byte
|
||||
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
|
||||
for (int j = 0; j < 16; j++) {
|
||||
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
|
||||
}
|
||||
|
||||
#if CKLED2001_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ckled2001_init(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to shutdown mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
|
||||
// Setting internal channel pulldown/pullup
|
||||
ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
|
||||
// Select number of scan phase
|
||||
ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
|
||||
// Setting PWM Delay Phase
|
||||
ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
|
||||
// Setting Driving/Sinking Channel Slew Rate
|
||||
ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
|
||||
// Setting Iref
|
||||
ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
|
||||
// Set LED CONTROL PAGE (Page 0)
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Set PWM PAGE (Page 1)
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
|
||||
for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Set CURRENT PAGE (Page 4)
|
||||
uint8_t current_tuen_reg_list[LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, CURRENT_TUNE_PAGE);
|
||||
for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, current_tuen_reg_list[i]);
|
||||
}
|
||||
|
||||
// Enable LEDs ON/OFF
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0xFF);
|
||||
}
|
||||
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to normal mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
|
||||
}
|
||||
|
||||
void ckled2001_set_value(int index, uint8_t value) {
|
||||
ckled2001_led led;
|
||||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.v] == value) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.v] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ckled2001_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
|
||||
ckled2001_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void ckled2001_set_led_control_register(uint8_t index, bool value) {
|
||||
ckled2001_led led;
|
||||
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 8;
|
||||
uint8_t bit_value = led.v % 8;
|
||||
|
||||
if (value) {
|
||||
g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
|
||||
|
||||
// If any of the transactions fail we risk writing dirty PG0,
|
||||
// refresh page 0 just in case.
|
||||
if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) {
|
||||
g_led_control_registers_update_required[index] = true;
|
||||
}
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
|
||||
void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < 24; i++) {
|
||||
ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
||||
void ckled2001_sw_return_normal(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to normal mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
|
||||
}
|
||||
|
||||
void ckled2001_sw_shutdown(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to shutdown mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
|
||||
// Write SW Sleep Register
|
||||
ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
|
||||
}
|
||||
337
drivers/led/ckled2001-simple.h
Normal file
337
drivers/led/ckled2001-simple.h
Normal file
@@ -0,0 +1,337 @@
|
||||
/* Copyright 2021 @ Keychron (https://www.keychron.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
|
||||
typedef struct ckled2001_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} __attribute__((packed)) ckled2001_led;
|
||||
|
||||
extern const ckled2001_led PROGMEM g_ckled2001_leds[LED_MATRIX_LED_COUNT];
|
||||
|
||||
void ckled2001_init(uint8_t addr);
|
||||
bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
|
||||
|
||||
void ckled2001_set_value(int index, uint8_t value);
|
||||
void ckled2001_set_value_all(uint8_t value);
|
||||
|
||||
void ckled2001_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index);
|
||||
void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
void ckled2001_sw_return_normal(uint8_t addr);
|
||||
void ckled2001_sw_shutdown(uint8_t addr);
|
||||
|
||||
// Registers Page Define
|
||||
#define CONFIGURE_CMD_PAGE 0xFD
|
||||
#define LED_CONTROL_PAGE 0x00
|
||||
#define LED_PWM_PAGE 0x01
|
||||
#define FUNCTION_PAGE 0x03
|
||||
#define CURRENT_TUNE_PAGE 0x04
|
||||
|
||||
// Function Register: address 0x00
|
||||
#define CONFIGURATION_REG 0x00
|
||||
#define MSKSW_SHUT_DOWN_MODE (0x0 << 0)
|
||||
#define MSKSW_NORMAL_MODE (0x1 << 0)
|
||||
|
||||
#define DRIVER_ID_REG 0x11
|
||||
#define CKLED2001_ID 0x8A
|
||||
|
||||
#define PDU_REG 0x13
|
||||
#define MSKSET_CA_CB_CHANNEL 0xAA
|
||||
#define MSKCLR_CA_CB_CHANNEL 0x00
|
||||
|
||||
#define SCAN_PHASE_REG 0x14
|
||||
#define MSKPHASE_12CHANNEL 0x00
|
||||
#define MSKPHASE_11CHANNEL 0x01
|
||||
#define MSKPHASE_10CHANNEL 0x02
|
||||
#define MSKPHASE_9CHANNEL 0x03
|
||||
#define MSKPHASE_8CHANNEL 0x04
|
||||
#define MSKPHASE_7CHANNEL 0x05
|
||||
#define MSKPHASE_6CHANNEL 0x06
|
||||
#define MSKPHASE_5CHANNEL 0x07
|
||||
#define MSKPHASE_4CHANNEL 0x08
|
||||
#define MSKPHASE_3CHANNEL 0x09
|
||||
#define MSKPHASE_2CHANNEL 0x0A
|
||||
#define MSKPHASE_1CHANNEL 0x0B
|
||||
|
||||
#define SLEW_RATE_CONTROL_MODE1_REG 0x15
|
||||
#define MSKPWM_DELAY_PHASE_ENABLE 0x04
|
||||
#define MSKPWM_DELAY_PHASE_DISABLE 0x00
|
||||
|
||||
#define SLEW_RATE_CONTROL_MODE2_REG 0x16
|
||||
#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE 0xC0
|
||||
#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_DISABLE 0x00
|
||||
|
||||
#define OPEN_SHORT_ENABLE_REG 0x17
|
||||
#define MSKOPEN_DETECTION_ENABLE (0x01 << 7)
|
||||
#define MSKOPEN_DETECTION_DISABLE (0x00)
|
||||
|
||||
#define MSKSHORT_DETECTION_ENABLE (0x01 << 6)
|
||||
#define MSKSHORT_DETECTION_DISABLE (0x00)
|
||||
|
||||
#define OPEN_SHORT_DUTY_REG 0x18
|
||||
#define OPEN_SHORT_FLAG_REG 0x19
|
||||
|
||||
#define MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
|
||||
#define MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
|
||||
|
||||
#define MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
|
||||
#define MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
|
||||
|
||||
#define SOFTWARE_SLEEP_REG 0x1A
|
||||
#define MSKSLEEP_ENABLE 0x02
|
||||
#define MSKSLEEP_DISABLE 0x00
|
||||
|
||||
// LED Control Registers
|
||||
#define LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
|
||||
#define LED_CONTROL_ON_OFF_LAST_ADDR 0x17
|
||||
#define LED_CONTROL_ON_OFF_LENGTH ((LED_CONTROL_ON_OFF_LAST_ADDR - LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_OPEN_FIRST_ADDR 0x18
|
||||
#define LED_CONTROL_OPEN_LAST_ADDR 0x2F
|
||||
#define LED_CONTROL_OPEN_LENGTH ((LED_CONTROL_OPEN_LAST_ADDR - LED_CONTROL_OPEN_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_SHORT_FIRST_ADDR 0x30
|
||||
#define LED_CONTROL_SHORT_LAST_ADDR 0x47
|
||||
#define LED_CONTROL_SHORT_LENGTH ((LED_CONTROL_SHORT_LAST_ADDR - LED_CONTROL_SHORT_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_PAGE_LENGTH 0x48
|
||||
|
||||
// LED Control Registers
|
||||
#define LED_PWM_FIRST_ADDR 0x00
|
||||
#define LED_PWM_LAST_ADDR 0xBF
|
||||
#define LED_PWM_LENGTH 0xC0
|
||||
|
||||
// Current Tune Registers
|
||||
#define LED_CURRENT_TUNE_FIRST_ADDR 0x00
|
||||
#define LED_CURRENT_TUNE_LAST_ADDR 0x0B
|
||||
#define LED_CURRENT_TUNE_LENGTH 0x0C
|
||||
|
||||
#define A_1 0x00
|
||||
#define A_2 0x01
|
||||
#define A_3 0x02
|
||||
#define A_4 0x03
|
||||
#define A_5 0x04
|
||||
#define A_6 0x05
|
||||
#define A_7 0x06
|
||||
#define A_8 0x07
|
||||
#define A_9 0x08
|
||||
#define A_10 0x09
|
||||
#define A_11 0x0A
|
||||
#define A_12 0x0B
|
||||
#define A_13 0x0C
|
||||
#define A_14 0x0D
|
||||
#define A_15 0x0E
|
||||
#define A_16 0x0F
|
||||
|
||||
#define B_1 0x10
|
||||
#define B_2 0x11
|
||||
#define B_3 0x12
|
||||
#define B_4 0x13
|
||||
#define B_5 0x14
|
||||
#define B_6 0x15
|
||||
#define B_7 0x16
|
||||
#define B_8 0x17
|
||||
#define B_9 0x18
|
||||
#define B_10 0x19
|
||||
#define B_11 0x1A
|
||||
#define B_12 0x1B
|
||||
#define B_13 0x1C
|
||||
#define B_14 0x1D
|
||||
#define B_15 0x1E
|
||||
#define B_16 0x1F
|
||||
|
||||
#define C_1 0x20
|
||||
#define C_2 0x21
|
||||
#define C_3 0x22
|
||||
#define C_4 0x23
|
||||
#define C_5 0x24
|
||||
#define C_6 0x25
|
||||
#define C_7 0x26
|
||||
#define C_8 0x27
|
||||
#define C_9 0x28
|
||||
#define C_10 0x29
|
||||
#define C_11 0x2A
|
||||
#define C_12 0x2B
|
||||
#define C_13 0x2C
|
||||
#define C_14 0x2D
|
||||
#define C_15 0x2E
|
||||
#define C_16 0x2F
|
||||
|
||||
#define D_1 0x30
|
||||
#define D_2 0x31
|
||||
#define D_3 0x32
|
||||
#define D_4 0x33
|
||||
#define D_5 0x34
|
||||
#define D_6 0x35
|
||||
#define D_7 0x36
|
||||
#define D_8 0x37
|
||||
#define D_9 0x38
|
||||
#define D_10 0x39
|
||||
#define D_11 0x3A
|
||||
#define D_12 0x3B
|
||||
#define D_13 0x3C
|
||||
#define D_14 0x3D
|
||||
#define D_15 0x3E
|
||||
#define D_16 0x3F
|
||||
|
||||
#define E_1 0x40
|
||||
#define E_2 0x41
|
||||
#define E_3 0x42
|
||||
#define E_4 0x43
|
||||
#define E_5 0x44
|
||||
#define E_6 0x45
|
||||
#define E_7 0x46
|
||||
#define E_8 0x47
|
||||
#define E_9 0x48
|
||||
#define E_10 0x49
|
||||
#define E_11 0x4A
|
||||
#define E_12 0x4B
|
||||
#define E_13 0x4C
|
||||
#define E_14 0x4D
|
||||
#define E_15 0x4E
|
||||
#define E_16 0x4F
|
||||
|
||||
#define F_1 0x50
|
||||
#define F_2 0x51
|
||||
#define F_3 0x52
|
||||
#define F_4 0x53
|
||||
#define F_5 0x54
|
||||
#define F_6 0x55
|
||||
#define F_7 0x56
|
||||
#define F_8 0x57
|
||||
#define F_9 0x58
|
||||
#define F_10 0x59
|
||||
#define F_11 0x5A
|
||||
#define F_12 0x5B
|
||||
#define F_13 0x5C
|
||||
#define F_14 0x5D
|
||||
#define F_15 0x5E
|
||||
#define F_16 0x5F
|
||||
|
||||
#define G_1 0x60
|
||||
#define G_2 0x61
|
||||
#define G_3 0x62
|
||||
#define G_4 0x63
|
||||
#define G_5 0x64
|
||||
#define G_6 0x65
|
||||
#define G_7 0x66
|
||||
#define G_8 0x67
|
||||
#define G_9 0x68
|
||||
#define G_10 0x69
|
||||
#define G_11 0x6A
|
||||
#define G_12 0x6B
|
||||
#define G_13 0x6C
|
||||
#define G_14 0x6D
|
||||
#define G_15 0x6E
|
||||
#define G_16 0x6F
|
||||
|
||||
#define H_1 0x70
|
||||
#define H_2 0x71
|
||||
#define H_3 0x72
|
||||
#define H_4 0x73
|
||||
#define H_5 0x74
|
||||
#define H_6 0x75
|
||||
#define H_7 0x76
|
||||
#define H_8 0x77
|
||||
#define H_9 0x78
|
||||
#define H_10 0x79
|
||||
#define H_11 0x7A
|
||||
#define H_12 0x7B
|
||||
#define H_13 0x7C
|
||||
#define H_14 0x7D
|
||||
#define H_15 0x7E
|
||||
#define H_16 0x7F
|
||||
|
||||
#define I_1 0x80
|
||||
#define I_2 0x81
|
||||
#define I_3 0x82
|
||||
#define I_4 0x83
|
||||
#define I_5 0x84
|
||||
#define I_6 0x85
|
||||
#define I_7 0x86
|
||||
#define I_8 0x87
|
||||
#define I_9 0x88
|
||||
#define I_10 0x89
|
||||
#define I_11 0x8A
|
||||
#define I_12 0x8B
|
||||
#define I_13 0x8C
|
||||
#define I_14 0x8D
|
||||
#define I_15 0x8E
|
||||
#define I_16 0x8F
|
||||
|
||||
#define J_1 0x90
|
||||
#define J_2 0x91
|
||||
#define J_3 0x92
|
||||
#define J_4 0x93
|
||||
#define J_5 0x94
|
||||
#define J_6 0x95
|
||||
#define J_7 0x96
|
||||
#define J_8 0x97
|
||||
#define J_9 0x98
|
||||
#define J_10 0x99
|
||||
#define J_11 0x9A
|
||||
#define J_12 0x9B
|
||||
#define J_13 0x9C
|
||||
#define J_14 0x9D
|
||||
#define J_15 0x9E
|
||||
#define J_16 0x9F
|
||||
|
||||
#define K_1 0xA0
|
||||
#define K_2 0xA1
|
||||
#define K_3 0xA2
|
||||
#define K_4 0xA3
|
||||
#define K_5 0xA4
|
||||
#define K_6 0xA5
|
||||
#define K_7 0xA6
|
||||
#define K_8 0xA7
|
||||
#define K_9 0xA8
|
||||
#define K_10 0xA9
|
||||
#define K_11 0xAA
|
||||
#define K_12 0xAB
|
||||
#define K_13 0xAC
|
||||
#define K_14 0xAD
|
||||
#define K_15 0xAE
|
||||
#define K_16 0xAF
|
||||
|
||||
#define L_1 0xB0
|
||||
#define L_2 0xB1
|
||||
#define L_3 0xB2
|
||||
#define L_4 0xB3
|
||||
#define L_5 0xB4
|
||||
#define L_6 0xB5
|
||||
#define L_7 0xB6
|
||||
#define L_8 0xB7
|
||||
#define L_9 0xB8
|
||||
#define L_10 0xB9
|
||||
#define L_11 0xBA
|
||||
#define L_12 0xBB
|
||||
#define L_13 0xBC
|
||||
#define L_14 0xBD
|
||||
#define L_15 0xBE
|
||||
#define L_16 0xBF
|
||||
236
drivers/led/ckled2001.c
Normal file
236
drivers/led/ckled2001.c
Normal file
@@ -0,0 +1,236 @@
|
||||
/* Copyright 2021 @ Keychron (https://www.keychron.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ckled2001.h"
|
||||
#include "i2c_master.h"
|
||||
#include "wait.h"
|
||||
|
||||
#ifndef CKLED2001_TIMEOUT
|
||||
# define CKLED2001_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef CKLED2001_PERSISTENCE
|
||||
# define CKLED2001_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef PHASE_CHANNEL
|
||||
# define PHASE_CHANNEL MSKPHASE_12CHANNEL
|
||||
#endif
|
||||
|
||||
#ifndef CKLED2001_CURRENT_TUNE
|
||||
# define CKLED2001_CURRENT_TUNE \
|
||||
{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
|
||||
#endif
|
||||
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[65];
|
||||
|
||||
// These buffers match the CKLED2001 PWM registers.
|
||||
// The control buffers match the PG0 LED On/Off registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in ckled2001_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][192];
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
uint8_t g_led_control_registers[DRIVER_COUNT][24] = {0};
|
||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
// If the transaction fails function returns false.
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if CKLED2001_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// Assumes PG1 is already selected.
|
||||
// If any of the transactions fails function returns false.
|
||||
// Transmit PWM registers in 3 transfers of 64 bytes.
|
||||
|
||||
// Iterate over the pwm_buffer contents at 64 byte intervals.
|
||||
for (uint8_t i = 0; i < 192; i += 64) {
|
||||
g_twi_transfer_buffer[0] = i;
|
||||
// Copy the data from i to i+63.
|
||||
// Device will auto-increment register for data after the first byte
|
||||
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
|
||||
for (uint8_t j = 0; j < 64; j++) {
|
||||
g_twi_transfer_buffer[1 + j] = pwm_buffer[i + j];
|
||||
}
|
||||
|
||||
#if CKLED2001_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < CKLED2001_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 65, CKLED2001_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void ckled2001_init(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to shutdown mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
|
||||
// Setting internal channel pulldown/pullup
|
||||
ckled2001_write_register(addr, PDU_REG, MSKSET_CA_CB_CHANNEL);
|
||||
// Select number of scan phase
|
||||
ckled2001_write_register(addr, SCAN_PHASE_REG, PHASE_CHANNEL);
|
||||
// Setting PWM Delay Phase
|
||||
ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE1_REG, MSKPWM_DELAY_PHASE_ENABLE);
|
||||
// Setting Driving/Sinking Channel Slew Rate
|
||||
ckled2001_write_register(addr, SLEW_RATE_CONTROL_MODE2_REG, MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE);
|
||||
// Setting Iref
|
||||
ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_DISABLE);
|
||||
// Set LED CONTROL PAGE (Page 0)
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Set PWM PAGE (Page 1)
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
|
||||
for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Set CURRENT PAGE (Page 4)
|
||||
uint8_t current_tuen_reg_list[LED_CURRENT_TUNE_LENGTH] = CKLED2001_CURRENT_TUNE;
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, CURRENT_TUNE_PAGE);
|
||||
for (int i = 0; i < LED_CURRENT_TUNE_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, current_tuen_reg_list[i]);
|
||||
}
|
||||
|
||||
// Enable LEDs ON/OFF
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < LED_CONTROL_ON_OFF_LENGTH; i++) {
|
||||
ckled2001_write_register(addr, i, 0xFF);
|
||||
}
|
||||
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to normal mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
|
||||
}
|
||||
|
||||
void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
ckled2001_led led;
|
||||
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.r] == red && g_pwm_buffer[led.driver][led.g] == green && g_pwm_buffer[led.driver][led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.r] = red;
|
||||
g_pwm_buffer[led.driver][led.g] = green;
|
||||
g_pwm_buffer[led.driver][led.b] = blue;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
|
||||
ckled2001_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
ckled2001_led led;
|
||||
memcpy_P(&led, (&g_ckled2001_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register_r = led.r / 8;
|
||||
uint8_t control_register_g = led.g / 8;
|
||||
uint8_t control_register_b = led.b / 8;
|
||||
uint8_t bit_r = led.r % 8;
|
||||
uint8_t bit_g = led.g % 8;
|
||||
uint8_t bit_b = led.b % 8;
|
||||
|
||||
if (red) {
|
||||
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
|
||||
}
|
||||
if (green) {
|
||||
g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
|
||||
}
|
||||
if (blue) {
|
||||
g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_PWM_PAGE);
|
||||
|
||||
// If any of the transactions fail we risk writing dirty PG0,
|
||||
// refresh page 0 just in case.
|
||||
if (!ckled2001_write_pwm_buffer(addr, g_pwm_buffer[index])) {
|
||||
g_led_control_registers_update_required[index] = true;
|
||||
}
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
|
||||
void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, LED_CONTROL_PAGE);
|
||||
for (int i = 0; i < 24; i++) {
|
||||
ckled2001_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
||||
void ckled2001_sw_return_normal(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to normal mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_NORMAL_MODE);
|
||||
}
|
||||
|
||||
void ckled2001_sw_shutdown(uint8_t addr) {
|
||||
// Select to function page
|
||||
ckled2001_write_register(addr, CONFIGURE_CMD_PAGE, FUNCTION_PAGE);
|
||||
// Setting LED driver to shutdown mode
|
||||
ckled2001_write_register(addr, CONFIGURATION_REG, MSKSW_SHUT_DOWN_MODE);
|
||||
// Write SW Sleep Register
|
||||
ckled2001_write_register(addr, SOFTWARE_SLEEP_REG, MSKSLEEP_ENABLE);
|
||||
}
|
||||
339
drivers/led/ckled2001.h
Normal file
339
drivers/led/ckled2001.h
Normal file
@@ -0,0 +1,339 @@
|
||||
/* Copyright 2021 @ Keychron (https://www.keychron.com)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
|
||||
typedef struct ckled2001_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} __attribute__((packed)) ckled2001_led;
|
||||
|
||||
extern const ckled2001_led PROGMEM g_ckled2001_leds[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
void ckled2001_init(uint8_t addr);
|
||||
bool ckled2001_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
bool ckled2001_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
|
||||
|
||||
void ckled2001_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void ckled2001_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void ckled2001_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void ckled2001_update_pwm_buffers(uint8_t addr, uint8_t index);
|
||||
void ckled2001_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
void ckled2001_sw_return_normal(uint8_t addr);
|
||||
void ckled2001_sw_shutdown(uint8_t addr);
|
||||
|
||||
// Registers Page Define
|
||||
#define CONFIGURE_CMD_PAGE 0xFD
|
||||
#define LED_CONTROL_PAGE 0x00
|
||||
#define LED_PWM_PAGE 0x01
|
||||
#define FUNCTION_PAGE 0x03
|
||||
#define CURRENT_TUNE_PAGE 0x04
|
||||
|
||||
// Function Register: address 0x00
|
||||
#define CONFIGURATION_REG 0x00
|
||||
#define MSKSW_SHUT_DOWN_MODE (0x0 << 0)
|
||||
#define MSKSW_NORMAL_MODE (0x1 << 0)
|
||||
|
||||
#define DRIVER_ID_REG 0x11
|
||||
#define CKLED2001_ID 0x8A
|
||||
|
||||
#define PDU_REG 0x13
|
||||
#define MSKSET_CA_CB_CHANNEL 0xAA
|
||||
#define MSKCLR_CA_CB_CHANNEL 0x00
|
||||
|
||||
#define SCAN_PHASE_REG 0x14
|
||||
#define MSKPHASE_12CHANNEL 0x00
|
||||
#define MSKPHASE_11CHANNEL 0x01
|
||||
#define MSKPHASE_10CHANNEL 0x02
|
||||
#define MSKPHASE_9CHANNEL 0x03
|
||||
#define MSKPHASE_8CHANNEL 0x04
|
||||
#define MSKPHASE_7CHANNEL 0x05
|
||||
#define MSKPHASE_6CHANNEL 0x06
|
||||
#define MSKPHASE_5CHANNEL 0x07
|
||||
#define MSKPHASE_4CHANNEL 0x08
|
||||
#define MSKPHASE_3CHANNEL 0x09
|
||||
#define MSKPHASE_2CHANNEL 0x0A
|
||||
#define MSKPHASE_1CHANNEL 0x0B
|
||||
|
||||
#define SLEW_RATE_CONTROL_MODE1_REG 0x15
|
||||
#define MSKPWM_DELAY_PHASE_ENABLE 0x04
|
||||
#define MSKPWM_DELAY_PHASE_DISABLE 0x00
|
||||
|
||||
#define SLEW_RATE_CONTROL_MODE2_REG 0x16
|
||||
#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_ENABLE 0xC0
|
||||
#define MSKDRIVING_SINKING_CHHANNEL_SLEWRATE_DISABLE 0x00
|
||||
|
||||
#define OPEN_SHORT_ENABLE_REG 0x17
|
||||
#define MSKOPEN_DETECTION_ENABLE (0x01 << 7)
|
||||
#define MSKOPEN_DETECTION_DISABLE (0x00)
|
||||
|
||||
#define MSKSHORT_DETECTION_ENABLE (0x01 << 6)
|
||||
#define MSKSHORT_DETECTION_DISABLE (0x00)
|
||||
|
||||
#define OPEN_SHORT_DUTY_REG 0x18
|
||||
#define OPEN_SHORT_FLAG_REG 0x19
|
||||
|
||||
#define MSKOPEN_DETECTION_INTERRUPT_ENABLE (0x01 << 7)
|
||||
#define MSKOPEN_DETECTION_INTERRUPT_DISABLE (0x00)
|
||||
|
||||
#define MSKSHORT_DETECTION_INTERRUPT_ENABLE (0x01 << 6)
|
||||
#define MSKSHORT_DETECTION_INTERRUPT_DISABLE (0x00)
|
||||
|
||||
#define SOFTWARE_SLEEP_REG 0x1A
|
||||
#define MSKSLEEP_ENABLE 0x02
|
||||
#define MSKSLEEP_DISABLE 0x00
|
||||
|
||||
// LED Control Registers
|
||||
#define LED_CONTROL_ON_OFF_FIRST_ADDR 0x0
|
||||
#define LED_CONTROL_ON_OFF_LAST_ADDR 0x17
|
||||
#define LED_CONTROL_ON_OFF_LENGTH ((LED_CONTROL_ON_OFF_LAST_ADDR - LED_CONTROL_ON_OFF_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_OPEN_FIRST_ADDR 0x18
|
||||
#define LED_CONTROL_OPEN_LAST_ADDR 0x2F
|
||||
#define LED_CONTROL_OPEN_LENGTH ((LED_CONTROL_OPEN_LAST_ADDR - LED_CONTROL_OPEN_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_SHORT_FIRST_ADDR 0x30
|
||||
#define LED_CONTROL_SHORT_LAST_ADDR 0x47
|
||||
#define LED_CONTROL_SHORT_LENGTH ((LED_CONTROL_SHORT_LAST_ADDR - LED_CONTROL_SHORT_FIRST_ADDR) + 1)
|
||||
|
||||
#define LED_CONTROL_PAGE_LENGTH 0x48
|
||||
|
||||
// LED Control Registers
|
||||
#define LED_PWM_FIRST_ADDR 0x00
|
||||
#define LED_PWM_LAST_ADDR 0xBF
|
||||
#define LED_PWM_LENGTH 0xC0
|
||||
|
||||
// Current Tune Registers
|
||||
#define LED_CURRENT_TUNE_FIRST_ADDR 0x00
|
||||
#define LED_CURRENT_TUNE_LAST_ADDR 0x0B
|
||||
#define LED_CURRENT_TUNE_LENGTH 0x0C
|
||||
|
||||
#define A_1 0x00
|
||||
#define A_2 0x01
|
||||
#define A_3 0x02
|
||||
#define A_4 0x03
|
||||
#define A_5 0x04
|
||||
#define A_6 0x05
|
||||
#define A_7 0x06
|
||||
#define A_8 0x07
|
||||
#define A_9 0x08
|
||||
#define A_10 0x09
|
||||
#define A_11 0x0A
|
||||
#define A_12 0x0B
|
||||
#define A_13 0x0C
|
||||
#define A_14 0x0D
|
||||
#define A_15 0x0E
|
||||
#define A_16 0x0F
|
||||
|
||||
#define B_1 0x10
|
||||
#define B_2 0x11
|
||||
#define B_3 0x12
|
||||
#define B_4 0x13
|
||||
#define B_5 0x14
|
||||
#define B_6 0x15
|
||||
#define B_7 0x16
|
||||
#define B_8 0x17
|
||||
#define B_9 0x18
|
||||
#define B_10 0x19
|
||||
#define B_11 0x1A
|
||||
#define B_12 0x1B
|
||||
#define B_13 0x1C
|
||||
#define B_14 0x1D
|
||||
#define B_15 0x1E
|
||||
#define B_16 0x1F
|
||||
|
||||
#define C_1 0x20
|
||||
#define C_2 0x21
|
||||
#define C_3 0x22
|
||||
#define C_4 0x23
|
||||
#define C_5 0x24
|
||||
#define C_6 0x25
|
||||
#define C_7 0x26
|
||||
#define C_8 0x27
|
||||
#define C_9 0x28
|
||||
#define C_10 0x29
|
||||
#define C_11 0x2A
|
||||
#define C_12 0x2B
|
||||
#define C_13 0x2C
|
||||
#define C_14 0x2D
|
||||
#define C_15 0x2E
|
||||
#define C_16 0x2F
|
||||
|
||||
#define D_1 0x30
|
||||
#define D_2 0x31
|
||||
#define D_3 0x32
|
||||
#define D_4 0x33
|
||||
#define D_5 0x34
|
||||
#define D_6 0x35
|
||||
#define D_7 0x36
|
||||
#define D_8 0x37
|
||||
#define D_9 0x38
|
||||
#define D_10 0x39
|
||||
#define D_11 0x3A
|
||||
#define D_12 0x3B
|
||||
#define D_13 0x3C
|
||||
#define D_14 0x3D
|
||||
#define D_15 0x3E
|
||||
#define D_16 0x3F
|
||||
|
||||
#define E_1 0x40
|
||||
#define E_2 0x41
|
||||
#define E_3 0x42
|
||||
#define E_4 0x43
|
||||
#define E_5 0x44
|
||||
#define E_6 0x45
|
||||
#define E_7 0x46
|
||||
#define E_8 0x47
|
||||
#define E_9 0x48
|
||||
#define E_10 0x49
|
||||
#define E_11 0x4A
|
||||
#define E_12 0x4B
|
||||
#define E_13 0x4C
|
||||
#define E_14 0x4D
|
||||
#define E_15 0x4E
|
||||
#define E_16 0x4F
|
||||
|
||||
#define F_1 0x50
|
||||
#define F_2 0x51
|
||||
#define F_3 0x52
|
||||
#define F_4 0x53
|
||||
#define F_5 0x54
|
||||
#define F_6 0x55
|
||||
#define F_7 0x56
|
||||
#define F_8 0x57
|
||||
#define F_9 0x58
|
||||
#define F_10 0x59
|
||||
#define F_11 0x5A
|
||||
#define F_12 0x5B
|
||||
#define F_13 0x5C
|
||||
#define F_14 0x5D
|
||||
#define F_15 0x5E
|
||||
#define F_16 0x5F
|
||||
|
||||
#define G_1 0x60
|
||||
#define G_2 0x61
|
||||
#define G_3 0x62
|
||||
#define G_4 0x63
|
||||
#define G_5 0x64
|
||||
#define G_6 0x65
|
||||
#define G_7 0x66
|
||||
#define G_8 0x67
|
||||
#define G_9 0x68
|
||||
#define G_10 0x69
|
||||
#define G_11 0x6A
|
||||
#define G_12 0x6B
|
||||
#define G_13 0x6C
|
||||
#define G_14 0x6D
|
||||
#define G_15 0x6E
|
||||
#define G_16 0x6F
|
||||
|
||||
#define H_1 0x70
|
||||
#define H_2 0x71
|
||||
#define H_3 0x72
|
||||
#define H_4 0x73
|
||||
#define H_5 0x74
|
||||
#define H_6 0x75
|
||||
#define H_7 0x76
|
||||
#define H_8 0x77
|
||||
#define H_9 0x78
|
||||
#define H_10 0x79
|
||||
#define H_11 0x7A
|
||||
#define H_12 0x7B
|
||||
#define H_13 0x7C
|
||||
#define H_14 0x7D
|
||||
#define H_15 0x7E
|
||||
#define H_16 0x7F
|
||||
|
||||
#define I_1 0x80
|
||||
#define I_2 0x81
|
||||
#define I_3 0x82
|
||||
#define I_4 0x83
|
||||
#define I_5 0x84
|
||||
#define I_6 0x85
|
||||
#define I_7 0x86
|
||||
#define I_8 0x87
|
||||
#define I_9 0x88
|
||||
#define I_10 0x89
|
||||
#define I_11 0x8A
|
||||
#define I_12 0x8B
|
||||
#define I_13 0x8C
|
||||
#define I_14 0x8D
|
||||
#define I_15 0x8E
|
||||
#define I_16 0x8F
|
||||
|
||||
#define J_1 0x90
|
||||
#define J_2 0x91
|
||||
#define J_3 0x92
|
||||
#define J_4 0x93
|
||||
#define J_5 0x94
|
||||
#define J_6 0x95
|
||||
#define J_7 0x96
|
||||
#define J_8 0x97
|
||||
#define J_9 0x98
|
||||
#define J_10 0x99
|
||||
#define J_11 0x9A
|
||||
#define J_12 0x9B
|
||||
#define J_13 0x9C
|
||||
#define J_14 0x9D
|
||||
#define J_15 0x9E
|
||||
#define J_16 0x9F
|
||||
|
||||
#define K_1 0xA0
|
||||
#define K_2 0xA1
|
||||
#define K_3 0xA2
|
||||
#define K_4 0xA3
|
||||
#define K_5 0xA4
|
||||
#define K_6 0xA5
|
||||
#define K_7 0xA6
|
||||
#define K_8 0xA7
|
||||
#define K_9 0xA8
|
||||
#define K_10 0xA9
|
||||
#define K_11 0xAA
|
||||
#define K_12 0xAB
|
||||
#define K_13 0xAC
|
||||
#define K_14 0xAD
|
||||
#define K_15 0xAE
|
||||
#define K_16 0xAF
|
||||
|
||||
#define L_1 0xB0
|
||||
#define L_2 0xB1
|
||||
#define L_3 0xB2
|
||||
#define L_4 0xB3
|
||||
#define L_5 0xB4
|
||||
#define L_6 0xB5
|
||||
#define L_7 0xB6
|
||||
#define L_8 0xB7
|
||||
#define L_9 0xB8
|
||||
#define L_10 0xB9
|
||||
#define L_11 0xBA
|
||||
#define L_12 0xBB
|
||||
#define L_13 0xBC
|
||||
#define L_14 0xBD
|
||||
#define L_15 0xBE
|
||||
#define L_16 0xBF
|
||||
@@ -1,156 +0,0 @@
|
||||
/* Copyright 2018 Jason Williams (Wilba)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3218-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3218_PWM_REGISTER_COUNT 18
|
||||
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
|
||||
|
||||
#ifndef IS31FL3218_I2C_TIMEOUT
|
||||
# define IS31FL3218_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3218_I2C_PERSISTENCE
|
||||
# define IS31FL3218_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3218_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3218_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3218_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3218_driver_t;
|
||||
|
||||
// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
|
||||
is31fl3218_driver_t driver_buffers = {
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
};
|
||||
|
||||
void is31fl3218_write_register(uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3218_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3218_write_pwm_buffer(void) {
|
||||
#if IS31FL3218_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, driver_buffers.pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, driver_buffers.pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3218_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
|
||||
|
||||
// Turn off software shutdown
|
||||
is31fl3218_write_register(IS31FL3218_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// Set all PWM values to zero
|
||||
for (uint8_t i = 0; i < IS31FL3218_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_PWM + i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3218_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_LED_CONTROL_1 + i, 0x00);
|
||||
}
|
||||
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
|
||||
|
||||
for (int i = 0; i < IS31FL3218_LED_COUNT; i++) {
|
||||
is31fl3218_set_led_control_register(i, true);
|
||||
}
|
||||
|
||||
is31fl3218_update_led_control_registers();
|
||||
}
|
||||
|
||||
void is31fl3218_set_value(int index, uint8_t value) {
|
||||
is31fl3218_led_t led;
|
||||
|
||||
if (index >= 0 && index < IS31FL3218_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers.pwm_buffer[led.v] == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers.pwm_buffer[led.v] = value;
|
||||
driver_buffers.pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3218_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < IS31FL3218_LED_COUNT; i++) {
|
||||
is31fl3218_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3218_set_led_control_register(uint8_t index, bool value) {
|
||||
is31fl3218_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 6;
|
||||
uint8_t bit_value = led.v % 6;
|
||||
|
||||
if (value) {
|
||||
driver_buffers.led_control_buffer[control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
driver_buffers.led_control_buffer[control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
driver_buffers.led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3218_update_pwm_buffers(void) {
|
||||
if (driver_buffers.pwm_buffer_dirty) {
|
||||
is31fl3218_write_pwm_buffer();
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
|
||||
|
||||
driver_buffers.pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3218_update_led_control_registers(void) {
|
||||
if (driver_buffers.led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3218_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_LED_CONTROL_1 + i, driver_buffers.led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers.led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
/* Copyright 2018 Jason Williams (Wilba)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3218_REG_SHUTDOWN 0x00
|
||||
#define IS31FL3218_REG_PWM 0x01
|
||||
#define IS31FL3218_REG_LED_CONTROL_1 0x13
|
||||
#define IS31FL3218_REG_LED_CONTROL_2 0x14
|
||||
#define IS31FL3218_REG_LED_CONTROL_3 0x15
|
||||
#define IS31FL3218_REG_UPDATE 0x16
|
||||
#define IS31FL3218_REG_RESET 0x17
|
||||
|
||||
#define IS31FL3218_I2C_ADDRESS 0x54
|
||||
|
||||
#if defined(LED_MATRIX_IS31FL3218)
|
||||
# define IS31FL3218_LED_COUNT LED_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3218_led_t {
|
||||
uint8_t v;
|
||||
} PACKED is31fl3218_led_t;
|
||||
|
||||
extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT];
|
||||
|
||||
void is31fl3218_init(void);
|
||||
|
||||
void is31fl3218_write_register(uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3218_set_value(int index, uint8_t value);
|
||||
|
||||
void is31fl3218_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3218_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
void is31fl3218_update_pwm_buffers(void);
|
||||
|
||||
void is31fl3218_update_led_control_registers(void);
|
||||
|
||||
#define OUT1 0x00
|
||||
#define OUT2 0x01
|
||||
#define OUT3 0x02
|
||||
#define OUT4 0x03
|
||||
#define OUT5 0x04
|
||||
#define OUT6 0x05
|
||||
#define OUT7 0x06
|
||||
#define OUT8 0x07
|
||||
#define OUT9 0x08
|
||||
#define OUT10 0x09
|
||||
#define OUT11 0x0A
|
||||
#define OUT12 0x0B
|
||||
#define OUT13 0x0C
|
||||
#define OUT14 0x0D
|
||||
#define OUT15 0x0E
|
||||
#define OUT16 0x0F
|
||||
#define OUT17 0x10
|
||||
#define OUT18 0x11
|
||||
@@ -13,160 +13,85 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3218.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3218_PWM_REGISTER_COUNT 18
|
||||
#define IS31FL3218_LED_CONTROL_REGISTER_COUNT 3
|
||||
// This is the full 8-bit address
|
||||
#define ISSI_ADDRESS 0b10101000
|
||||
|
||||
#ifndef IS31FL3218_I2C_TIMEOUT
|
||||
# define IS31FL3218_I2C_TIMEOUT 100
|
||||
#endif
|
||||
// These are the register addresses
|
||||
#define ISSI_REG_SHUTDOWN 0x00
|
||||
#define ISSI_REG_PWM 0x01
|
||||
#define ISSI_REG_CONTROL 0x13
|
||||
#define ISSI_REG_UPDATE 0x16
|
||||
#define ISSI_REG_RESET 0x17
|
||||
|
||||
#ifndef IS31FL3218_I2C_PERSISTENCE
|
||||
# define IS31FL3218_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
// Default timeout if no I2C response
|
||||
#define ISSI_TIMEOUT 100
|
||||
|
||||
typedef struct is31fl3218_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3218_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3218_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3218_driver_t;
|
||||
// Reusable buffer for transfers
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// IS31FL3218 has 18 PWM outputs and a fixed I2C address, so no chaining.
|
||||
is31fl3218_driver_t driver_buffers = {
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
};
|
||||
// If used as RGB LED driver, LEDs are assigned RGB,RGB,RGB,RGB,RGB,RGB
|
||||
uint8_t g_pwm_buffer[18];
|
||||
bool g_pwm_buffer_update_required = false;
|
||||
|
||||
void is31fl3218_write_register(uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3218_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, reg, &data, 1, IS31FL3218_I2C_TIMEOUT);
|
||||
#endif
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||
}
|
||||
|
||||
void is31fl3218_write_pwm_buffer(void) {
|
||||
#if IS31FL3218_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3218_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, driver_buffers.pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(IS31FL3218_I2C_ADDRESS << 1, IS31FL3218_REG_PWM, driver_buffers.pwm_buffer, 18, IS31FL3218_I2C_TIMEOUT);
|
||||
#endif
|
||||
void is31fl3218_write_pwm_buffer(uint8_t *pwm_buffer) {
|
||||
g_twi_transfer_buffer[0] = ISSI_REG_PWM;
|
||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer, 18);
|
||||
|
||||
i2c_transmit(ISSI_ADDRESS, g_twi_transfer_buffer, 19, ISSI_TIMEOUT);
|
||||
}
|
||||
|
||||
void is31fl3218_init(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3218_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3218_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3218_SDB_PIN);
|
||||
#endif
|
||||
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3218_write_register(IS31FL3218_REG_RESET, 0x00);
|
||||
is31fl3218_write_register(ISSI_REG_RESET, 0x00);
|
||||
|
||||
// Turn off software shutdown
|
||||
is31fl3218_write_register(IS31FL3218_REG_SHUTDOWN, 0x01);
|
||||
is31fl3218_write_register(ISSI_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// Set all PWM values to zero
|
||||
for (uint8_t i = 0; i < IS31FL3218_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_PWM + i, 0x00);
|
||||
for (uint8_t i = 0; i < 18; i++) {
|
||||
is31fl3218_write_register(ISSI_REG_PWM + i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3218_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_LED_CONTROL_1 + i, 0x00);
|
||||
// Enable all channels
|
||||
for (uint8_t i = 0; i < 3; i++) {
|
||||
is31fl3218_write_register(ISSI_REG_CONTROL + i, 0b00111111);
|
||||
}
|
||||
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
|
||||
|
||||
for (int i = 0; i < IS31FL3218_LED_COUNT; i++) {
|
||||
is31fl3218_set_led_control_register(i, true, true, true);
|
||||
}
|
||||
|
||||
is31fl3218_update_led_control_registers();
|
||||
is31fl3218_write_register(ISSI_REG_UPDATE, 0x01);
|
||||
}
|
||||
|
||||
void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
is31fl3218_led_t led;
|
||||
|
||||
if (index >= 0 && index < IS31FL3218_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers.pwm_buffer[led.r] == red && driver_buffers.pwm_buffer[led.g] == green && driver_buffers.pwm_buffer[led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers.pwm_buffer[led.r] = red;
|
||||
driver_buffers.pwm_buffer[led.g] = green;
|
||||
driver_buffers.pwm_buffer[led.b] = blue;
|
||||
driver_buffers.pwm_buffer_dirty = true;
|
||||
if (g_pwm_buffer[index * 3 + 0] == red && g_pwm_buffer[index * 3 + 1] == green && g_pwm_buffer[index * 3 + 2] == blue) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[index * 3 + 0] = red;
|
||||
g_pwm_buffer[index * 3 + 1] = green;
|
||||
g_pwm_buffer[index * 3 + 2] = blue;
|
||||
g_pwm_buffer_update_required = true;
|
||||
}
|
||||
|
||||
void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < IS31FL3218_LED_COUNT; i++) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
is31fl3218_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
is31fl3218_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3218_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register_r = led.r / 6;
|
||||
uint8_t control_register_g = led.g / 6;
|
||||
uint8_t control_register_b = led.b / 6;
|
||||
uint8_t bit_r = led.r % 6;
|
||||
uint8_t bit_g = led.g % 6;
|
||||
uint8_t bit_b = led.b % 6;
|
||||
|
||||
if (red) {
|
||||
driver_buffers.led_control_buffer[control_register_r] |= (1 << bit_r);
|
||||
} else {
|
||||
driver_buffers.led_control_buffer[control_register_r] &= ~(1 << bit_r);
|
||||
}
|
||||
if (green) {
|
||||
driver_buffers.led_control_buffer[control_register_g] |= (1 << bit_g);
|
||||
} else {
|
||||
driver_buffers.led_control_buffer[control_register_g] &= ~(1 << bit_g);
|
||||
}
|
||||
if (blue) {
|
||||
driver_buffers.led_control_buffer[control_register_b] |= (1 << bit_b);
|
||||
} else {
|
||||
driver_buffers.led_control_buffer[control_register_b] &= ~(1 << bit_b);
|
||||
}
|
||||
|
||||
driver_buffers.led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3218_update_pwm_buffers(void) {
|
||||
if (driver_buffers.pwm_buffer_dirty) {
|
||||
is31fl3218_write_pwm_buffer();
|
||||
if (g_pwm_buffer_update_required) {
|
||||
is31fl3218_write_pwm_buffer(g_pwm_buffer);
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3218_write_register(IS31FL3218_REG_UPDATE, 0x01);
|
||||
|
||||
driver_buffers.pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3218_update_led_control_registers(void) {
|
||||
if (driver_buffers.led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3218_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3218_write_register(IS31FL3218_REG_LED_CONTROL_1 + i, driver_buffers.led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers.led_control_buffer_dirty = false;
|
||||
is31fl3218_write_register(ISSI_REG_UPDATE, 0x01);
|
||||
}
|
||||
g_pwm_buffer_update_required = false;
|
||||
}
|
||||
|
||||
@@ -18,60 +18,9 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3218_REG_SHUTDOWN 0x00
|
||||
#define IS31FL3218_REG_PWM 0x01
|
||||
#define IS31FL3218_REG_LED_CONTROL_1 0x13
|
||||
#define IS31FL3218_REG_LED_CONTROL_2 0x14
|
||||
#define IS31FL3218_REG_LED_CONTROL_3 0x15
|
||||
#define IS31FL3218_REG_UPDATE 0x16
|
||||
#define IS31FL3218_REG_RESET 0x17
|
||||
|
||||
#define IS31FL3218_I2C_ADDRESS 0x54
|
||||
|
||||
#if defined(RGB_MATRIX_IS31FL3218)
|
||||
# define IS31FL3218_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3218_led_t {
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} PACKED is31fl3218_led_t;
|
||||
|
||||
extern const is31fl3218_led_t PROGMEM g_is31fl3218_leds[IS31FL3218_LED_COUNT];
|
||||
#include <string.h>
|
||||
|
||||
void is31fl3218_init(void);
|
||||
|
||||
void is31fl3218_write_register(uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3218_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void is31fl3218_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void is31fl3218_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
|
||||
|
||||
void is31fl3218_update_pwm_buffers(void);
|
||||
|
||||
void is31fl3218_update_led_control_registers(void);
|
||||
|
||||
#define OUT1 0x00
|
||||
#define OUT2 0x01
|
||||
#define OUT3 0x02
|
||||
#define OUT4 0x03
|
||||
#define OUT5 0x04
|
||||
#define OUT6 0x05
|
||||
#define OUT7 0x06
|
||||
#define OUT8 0x07
|
||||
#define OUT9 0x08
|
||||
#define OUT10 0x09
|
||||
#define OUT11 0x0A
|
||||
#define OUT12 0x0B
|
||||
#define OUT13 0x0C
|
||||
#define OUT14 0x0D
|
||||
#define OUT15 0x0E
|
||||
#define OUT16 0x0F
|
||||
#define OUT17 0x10
|
||||
#define OUT18 0x11
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "is31fl3236-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3236_PWM_REGISTER_COUNT 36
|
||||
#define IS31FL3236_LED_CONTROL_REGISTER_COUNT 36
|
||||
|
||||
#ifndef IS31FL3236_I2C_TIMEOUT
|
||||
# define IS31FL3236_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3236_I2C_PERSISTENCE
|
||||
# define IS31FL3236_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3236_PWM_FREQUENCY
|
||||
# define IS31FL3236_PWM_FREQUENCY IS31FL3236_PWM_FREQUENCY_3K_HZ // OFS - IS31FL3236A only
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3236_DRIVER_COUNT] = {
|
||||
IS31FL3236_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3236_I2C_ADDRESS_2
|
||||
IS31FL3236_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3236_I2C_ADDRESS_3
|
||||
IS31FL3236_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3236_I2C_ADDRESS_4
|
||||
IS31FL3236_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct is31fl3236_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3236_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3236_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3236_driver_t;
|
||||
|
||||
is31fl3236_driver_t driver_buffers[IS31FL3236_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3236_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3236_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3236_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3236_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3236_write_pwm_buffer(uint8_t index) {
|
||||
#if IS31FL3236_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3236_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3236_REG_PWM, driver_buffers[index].pwm_buffer, 36, IS31FL3236_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3236_REG_PWM, driver_buffers[index].pwm_buffer, 36, IS31FL3236_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3236_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3236_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3236_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3236_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_init(i);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_COUNT; i++) {
|
||||
is31fl3236_set_led_control_register(i, true);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_update_led_control_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_init(uint8_t index) {
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_RESET, 0x00);
|
||||
|
||||
// Turn off software shutdown
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// Set all PWM values to zero
|
||||
for (uint8_t i = 0; i < IS31FL3236_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_PWM + i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_LED_CONTROL + i, 0x00);
|
||||
}
|
||||
|
||||
// Set PWM frequency (IS31FL3236A)
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_PWM_FREQUENCY, IS31FL3236_PWM_FREQUENCY);
|
||||
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_UPDATE, 0x01);
|
||||
}
|
||||
|
||||
void is31fl3236_set_value(int index, uint8_t value) {
|
||||
is31fl3236_led_t led;
|
||||
|
||||
if (index < IS31FL3236_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3236_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.v] == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.v] = value;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_set_value_all(uint8_t value) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_COUNT; i++) {
|
||||
is31fl3236_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_set_led_control_register(uint8_t index, bool value) {
|
||||
is31fl3236_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3236_leds[index]), sizeof(led));
|
||||
|
||||
driver_buffers[led.driver].led_control_buffer[led.v] = value ? 0x01 : 0x00;
|
||||
driver_buffers[led.driver].led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3236_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3236_write_pwm_buffer(index);
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_UPDATE, 0x01);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_update_led_control_registers(uint8_t index) {
|
||||
if (driver_buffers[index].led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_LED_CONTROL + i, driver_buffers[index].led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3236_REG_SHUTDOWN 0x00
|
||||
#define IS31FL3236_REG_PWM 0x01
|
||||
#define IS31FL3236_REG_UPDATE 0x25
|
||||
#define IS31FL3236_REG_LED_CONTROL 0x26
|
||||
#define IS31FL3236_REG_GLOBAL_CONTROL 0x4A
|
||||
#define IS31FL3236_REG_PWM_FREQUENCY 0x4B
|
||||
#define IS31FL3236_REG_RESET 0x4F
|
||||
|
||||
#define IS31FL3236_I2C_ADDRESS_GND 0x3C
|
||||
#define IS31FL3236_I2C_ADDRESS_SCL 0x3D
|
||||
#define IS31FL3236_I2C_ADDRESS_SDA 0x3E
|
||||
#define IS31FL3236_I2C_ADDRESS_VCC 0x3F
|
||||
|
||||
#if defined(LED_MATRIX_IS31FL3236)
|
||||
# define IS31FL3236_LED_COUNT LED_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3236_I2C_ADDRESS_4)
|
||||
# define IS31FL3236_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_3)
|
||||
# define IS31FL3236_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_2)
|
||||
# define IS31FL3236_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_1)
|
||||
# define IS31FL3236_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3236_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} PACKED is31fl3236_led_t;
|
||||
|
||||
extern const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT];
|
||||
|
||||
void is31fl3236_init_drivers(void);
|
||||
|
||||
void is31fl3236_init(uint8_t index);
|
||||
|
||||
void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3236_set_value(int index, uint8_t value);
|
||||
|
||||
void is31fl3236_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3236_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
void is31fl3236_update_pwm_buffers(uint8_t index);
|
||||
|
||||
void is31fl3236_update_led_control_registers(uint8_t index);
|
||||
|
||||
void is31fl3236_flush(void);
|
||||
|
||||
#define IS31FL3236_PWM_FREQUENCY_3K_HZ 0b0
|
||||
#define IS31FL3236_PWM_FREQUENCY_22K_HZ 0b1
|
||||
|
||||
#define OUT1 0x00
|
||||
#define OUT2 0x01
|
||||
#define OUT3 0x02
|
||||
#define OUT4 0x03
|
||||
#define OUT5 0x04
|
||||
#define OUT6 0x05
|
||||
#define OUT7 0x06
|
||||
#define OUT8 0x07
|
||||
#define OUT9 0x08
|
||||
#define OUT10 0x09
|
||||
#define OUT11 0x0A
|
||||
#define OUT12 0x0B
|
||||
#define OUT13 0x0C
|
||||
#define OUT14 0x0D
|
||||
#define OUT15 0x0E
|
||||
#define OUT16 0x0F
|
||||
#define OUT17 0x10
|
||||
#define OUT18 0x11
|
||||
#define OUT19 0x12
|
||||
#define OUT20 0x13
|
||||
#define OUT21 0x14
|
||||
#define OUT22 0x15
|
||||
#define OUT23 0x16
|
||||
#define OUT24 0x17
|
||||
#define OUT25 0x18
|
||||
#define OUT26 0x19
|
||||
#define OUT27 0x1A
|
||||
#define OUT28 0x1B
|
||||
#define OUT29 0x1C
|
||||
#define OUT30 0x1D
|
||||
#define OUT31 0x1E
|
||||
#define OUT32 0x1F
|
||||
#define OUT33 0x20
|
||||
#define OUT34 0x21
|
||||
#define OUT35 0x22
|
||||
#define OUT36 0x23
|
||||
@@ -1,172 +0,0 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "is31fl3236.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
|
||||
#define IS31FL3236_PWM_REGISTER_COUNT 36
|
||||
#define IS31FL3236_LED_CONTROL_REGISTER_COUNT 36
|
||||
|
||||
#ifndef IS31FL3236_I2C_TIMEOUT
|
||||
# define IS31FL3236_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3236_I2C_PERSISTENCE
|
||||
# define IS31FL3236_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3236_PWM_FREQUENCY
|
||||
# define IS31FL3236_PWM_FREQUENCY IS31FL3236_PWM_FREQUENCY_3K_HZ // OFS - IS31FL3236A only
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3236_DRIVER_COUNT] = {
|
||||
IS31FL3236_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3236_I2C_ADDRESS_2
|
||||
IS31FL3236_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3236_I2C_ADDRESS_3
|
||||
IS31FL3236_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3236_I2C_ADDRESS_4
|
||||
IS31FL3236_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef struct is31fl3236_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3236_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3236_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3236_driver_t;
|
||||
|
||||
is31fl3236_driver_t driver_buffers[IS31FL3236_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3236_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3236_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3236_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3236_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3236_write_pwm_buffer(uint8_t index) {
|
||||
#if IS31FL3236_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3236_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3236_REG_PWM, driver_buffers[index].pwm_buffer, 36, IS31FL3236_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3236_REG_PWM, driver_buffers[index].pwm_buffer, 36, IS31FL3236_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3236_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3236_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3236_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3236_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_init(i);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_COUNT; i++) {
|
||||
is31fl3236_set_led_control_register(i, true, true, true);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_update_led_control_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_init(uint8_t index) {
|
||||
// In case we ever want to reinitialize (?)
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_RESET, 0x00);
|
||||
|
||||
// Turn off software shutdown
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// Set all PWM values to zero
|
||||
for (uint8_t i = 0; i < IS31FL3236_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_PWM + i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_LED_CONTROL + i, 0x00);
|
||||
}
|
||||
|
||||
// Set PWM frequency (IS31FL3236A)
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_PWM_FREQUENCY, IS31FL3236_PWM_FREQUENCY);
|
||||
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_UPDATE, 0x01);
|
||||
}
|
||||
|
||||
void is31fl3236_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
is31fl3236_led_t led;
|
||||
|
||||
if (index < IS31FL3236_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3236_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.r] == red && driver_buffers[led.driver].pwm_buffer[led.g] == green && driver_buffers[led.driver].pwm_buffer[led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.r] = red;
|
||||
driver_buffers[led.driver].pwm_buffer[led.g] = green;
|
||||
driver_buffers[led.driver].pwm_buffer[led.b] = blue;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_COUNT; i++) {
|
||||
is31fl3236_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
is31fl3236_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3236_leds[index]), sizeof(led));
|
||||
|
||||
driver_buffers[led.driver].led_control_buffer[led.r] = red ? 0x01 : 0x00;
|
||||
driver_buffers[led.driver].led_control_buffer[led.g] = green ? 0x01 : 0x00;
|
||||
driver_buffers[led.driver].led_control_buffer[led.b] = blue ? 0x01 : 0x00;
|
||||
driver_buffers[led.driver].led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3236_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3236_write_pwm_buffer(index);
|
||||
// Load PWM registers and LED Control register data
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_UPDATE, 0x01);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_update_led_control_registers(uint8_t index) {
|
||||
if (driver_buffers[index].led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3236_write_register(index, IS31FL3236_REG_LED_CONTROL + i, driver_buffers[index].led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3236_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3236_DRIVER_COUNT; i++) {
|
||||
is31fl3236_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
// Copyright 2024 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3236_REG_SHUTDOWN 0x00
|
||||
#define IS31FL3236_REG_PWM 0x01
|
||||
#define IS31FL3236_REG_UPDATE 0x25
|
||||
#define IS31FL3236_REG_LED_CONTROL 0x26
|
||||
#define IS31FL3236_REG_GLOBAL_CONTROL 0x4A
|
||||
#define IS31FL3236_REG_PWM_FREQUENCY 0x4B
|
||||
#define IS31FL3236_REG_RESET 0x4F
|
||||
|
||||
#define IS31FL3236_I2C_ADDRESS_GND 0x3C
|
||||
#define IS31FL3236_I2C_ADDRESS_SCL 0x3D
|
||||
#define IS31FL3236_I2C_ADDRESS_SDA 0x3E
|
||||
#define IS31FL3236_I2C_ADDRESS_VCC 0x3F
|
||||
|
||||
#if defined(RGB_MATRIX_IS31FL3236)
|
||||
# define IS31FL3236_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3236_I2C_ADDRESS_4)
|
||||
# define IS31FL3236_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_3)
|
||||
# define IS31FL3236_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_2)
|
||||
# define IS31FL3236_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3236_I2C_ADDRESS_1)
|
||||
# define IS31FL3236_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3236_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} PACKED is31fl3236_led_t;
|
||||
|
||||
extern const is31fl3236_led_t PROGMEM g_is31fl3236_leds[IS31FL3236_LED_COUNT];
|
||||
|
||||
void is31fl3236_init_drivers(void);
|
||||
|
||||
void is31fl3236_init(uint8_t index);
|
||||
|
||||
void is31fl3236_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3236_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void is31fl3236_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void is31fl3236_set_led_control_register(uint8_t index, bool red, bool green, bool blue);
|
||||
|
||||
void is31fl3236_update_pwm_buffers(uint8_t index);
|
||||
|
||||
void is31fl3236_update_led_control_registers(uint8_t index);
|
||||
|
||||
void is31fl3236_flush(void);
|
||||
|
||||
#define IS31FL3236_PWM_FREQUENCY_3K_HZ 0b0
|
||||
#define IS31FL3236_PWM_FREQUENCY_22K_HZ 0b1
|
||||
|
||||
#define OUT1 0x00
|
||||
#define OUT2 0x01
|
||||
#define OUT3 0x02
|
||||
#define OUT4 0x03
|
||||
#define OUT5 0x04
|
||||
#define OUT6 0x05
|
||||
#define OUT7 0x06
|
||||
#define OUT8 0x07
|
||||
#define OUT9 0x08
|
||||
#define OUT10 0x09
|
||||
#define OUT11 0x0A
|
||||
#define OUT12 0x0B
|
||||
#define OUT13 0x0C
|
||||
#define OUT14 0x0D
|
||||
#define OUT15 0x0E
|
||||
#define OUT16 0x0F
|
||||
#define OUT17 0x10
|
||||
#define OUT18 0x11
|
||||
#define OUT19 0x12
|
||||
#define OUT20 0x13
|
||||
#define OUT21 0x14
|
||||
#define OUT22 0x15
|
||||
#define OUT23 0x16
|
||||
#define OUT24 0x17
|
||||
#define OUT25 0x18
|
||||
#define OUT26 0x19
|
||||
#define OUT27 0x1A
|
||||
#define OUT28 0x1B
|
||||
#define OUT29 0x1C
|
||||
#define OUT30 0x1D
|
||||
#define OUT31 0x1E
|
||||
#define OUT32 0x1F
|
||||
#define OUT33 0x20
|
||||
#define OUT34 0x21
|
||||
#define OUT35 0x22
|
||||
#define OUT36 0x23
|
||||
@@ -1,213 +0,0 @@
|
||||
/* Copyright 2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
* Copyright 2024 Harrison Chan (Xelus)
|
||||
* Copyright 2024 Dimitris Mantzouranis <d3xter93@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3729-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3729_PWM_REGISTER_COUNT 143
|
||||
#define IS31FL3729_SCALING_REGISTER_COUNT 16
|
||||
|
||||
#ifndef IS31FL3729_I2C_TIMEOUT
|
||||
# define IS31FL3729_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_I2C_PERSISTENCE
|
||||
# define IS31FL3729_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_CONFIGURATION
|
||||
# define IS31FL3729_CONFIGURATION IS31FL3729_CONFIG_SWS_15_9
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_GLOBAL_CURRENT
|
||||
# define IS31FL3729_GLOBAL_CURRENT 0x40
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SW_PULLDOWN
|
||||
# define IS31FL3729_SW_PULLDOWN IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_CS_PULLUP
|
||||
# define IS31FL3729_CS_PULLUP IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM
|
||||
# define IS31FL3729_SPREAD_SPECTRUM IS31FL3729_SPREAD_SPECTRUM_DISABLE
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM_RANGE
|
||||
# define IS31FL3729_SPREAD_SPECTRUM_RANGE IS31FL3729_SPREAD_SPECTRUM_RANGE_5_PERCENT
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME
|
||||
# define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1980_US
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_PWM_FREQUENCY
|
||||
# define IS31FL3729_PWM_FREQUENCY IS31FL3729_PWM_FREQUENCY_32K_HZ
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3729_DRIVER_COUNT] = {
|
||||
IS31FL3729_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3729_I2C_ADDRESS_2
|
||||
IS31FL3729_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3729_I2C_ADDRESS_3
|
||||
IS31FL3729_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3729_I2C_ADDRESS_4
|
||||
IS31FL3729_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
// These buffers match the PWM & scaling registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
typedef struct is31fl3729_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3729_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t scaling_buffer[IS31FL3729_SCALING_REGISTER_COUNT];
|
||||
bool scaling_buffer_dirty;
|
||||
} PACKED is31fl3729_driver_t;
|
||||
|
||||
is31fl3729_driver_t driver_buffers[IS31FL3729_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.scaling_buffer = {0},
|
||||
.scaling_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3729_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3729_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3729_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3729_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3729_write_pwm_buffer(uint8_t index) {
|
||||
// Transmit PWM registers in 11 transfers of 13 bytes.
|
||||
|
||||
// Iterate over the pwm_buffer contents at 13 byte intervals.
|
||||
for (uint8_t i = 0; i <= IS31FL3729_PWM_REGISTER_COUNT; i += 13) {
|
||||
#if IS31FL3729_I2C_PERSISTENCE > 0
|
||||
for (uint8_t j = 0; j < IS31FL3729_I2C_PERSISTENCE; j++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3729_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 13, IS31FL3729_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3729_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 13, IS31FL3729_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3729_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3729_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3729_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_init(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IS31FL3729_LED_COUNT; i++) {
|
||||
is31fl3729_set_scaling_register(i, 0xFF);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_update_scaling_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_init(uint8_t index) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_PULLDOWNUP, ((IS31FL3729_SW_PULLDOWN & 0b111) << 4) | (IS31FL3729_CS_PULLUP & 0b111));
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_SPREAD_SPECTRUM, ((IS31FL3729_SPREAD_SPECTRUM & 0b1) << 4) | ((IS31FL3729_SPREAD_SPECTRUM_RANGE & 0b11) << 2) | (IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME & 0b11));
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_PWM_FREQUENCY, IS31FL3729_PWM_FREQUENCY);
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_GLOBAL_CURRENT, IS31FL3729_GLOBAL_CURRENT);
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_CONFIGURATION, IS31FL3729_CONFIGURATION);
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
void is31fl3729_set_value(int index, uint8_t value) {
|
||||
is31fl3729_led_t led;
|
||||
if (index >= 0 && index < IS31FL3729_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3729_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.v] == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.v] = value;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < IS31FL3729_LED_COUNT; i++) {
|
||||
is31fl3729_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_set_scaling_register(uint8_t index, uint8_t value) {
|
||||
is31fl3729_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3729_leds[index]), sizeof(led));
|
||||
|
||||
// need to do a bit of checking here since 3729 scaling is per CS pin.
|
||||
// not the usual per single LED key as per other ISSI drivers
|
||||
// only enable them, since they should be default disabled
|
||||
int cs_value = (led.v & 0x0F) - 1;
|
||||
|
||||
driver_buffers[led.driver].scaling_buffer[cs_value] = value;
|
||||
driver_buffers[led.driver].scaling_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3729_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3729_write_pwm_buffer(index);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_update_scaling_registers(uint8_t index) {
|
||||
if (driver_buffers[index].scaling_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3729_SCALING_REGISTER_COUNT; i++) {
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_SCALING + i, driver_buffers[index].scaling_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].scaling_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,278 +0,0 @@
|
||||
/* Copyright 2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
* Copyright 2024 Harrison Chan (Xelus)
|
||||
* Copyright 2024 Dimitris Mantzouranis <d3xter93@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3729_REG_PWM 0x01
|
||||
#define IS31FL3729_REG_SCALING 0x90
|
||||
#define IS31FL3729_REG_CONFIGURATION 0xA0
|
||||
#define IS31FL3729_REG_GLOBAL_CURRENT 0xA1
|
||||
#define IS31FL3729_REG_PULLDOWNUP 0xB0
|
||||
#define IS31FL3729_REG_SPREAD_SPECTRUM 0xB1
|
||||
#define IS31FL3729_REG_PWM_FREQUENCY 0xB2
|
||||
#define IS31FL3729_REG_RESET 0xCF
|
||||
|
||||
#define IS31FL3729_I2C_ADDRESS_GND 0x34
|
||||
#define IS31FL3729_I2C_ADDRESS_SCL 0x35
|
||||
#define IS31FL3729_I2C_ADDRESS_SDA 0x36
|
||||
#define IS31FL3729_I2C_ADDRESS_VCC 0x37
|
||||
|
||||
#if defined(LED_MATRIX_IS31FL3729)
|
||||
# define IS31FL3729_LED_COUNT LED_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3729_I2C_ADDRESS_4)
|
||||
# define IS31FL3729_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_3)
|
||||
# define IS31FL3729_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_2)
|
||||
# define IS31FL3729_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_1)
|
||||
# define IS31FL3729_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3729_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} PACKED is31fl3729_led_t;
|
||||
|
||||
extern const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT];
|
||||
|
||||
void is31fl3729_init_drivers(void);
|
||||
void is31fl3729_init(uint8_t index);
|
||||
void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3729_set_value(int index, uint8_t value);
|
||||
void is31fl3729_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3729_set_scaling_register(uint8_t index, uint8_t value);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3729_update_pwm_buffers(uint8_t index);
|
||||
void is31fl3729_update_scaling_registers(uint8_t index);
|
||||
|
||||
void is31fl3729_flush(void);
|
||||
|
||||
#define IS31FL3729_SW_PULLDOWN_0_OHM 0b000
|
||||
#define IS31FL3729_SW_PULLDOWN_0K5_OHM_SW_OFF 0b001
|
||||
#define IS31FL3729_SW_PULLDOWN_1K_OHM_SW_OFF 0b010
|
||||
#define IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF 0b011
|
||||
#define IS31FL3729_SW_PULLDOWN_1K_OHM 0b100
|
||||
#define IS31FL3729_SW_PULLDOWN_2K_OHM 0b101
|
||||
#define IS31FL3729_SW_PULLDOWN_4K_OHM 0b110
|
||||
#define IS31FL3729_SW_PULLDOWN_8K_OHM 0b111
|
||||
|
||||
#define IS31FL3729_CS_PULLUP_0_OHM 0b000
|
||||
#define IS31FL3729_CS_PULLUP_0K5_OHM_CS_OFF 0b001
|
||||
#define IS31FL3729_CS_PULLUP_1K_OHM_CS_OFF 0b010
|
||||
#define IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF 0b011
|
||||
#define IS31FL3729_CS_PULLUP_1K_OHM 0b100
|
||||
#define IS31FL3729_CS_PULLUP_2K_OHM 0b101
|
||||
#define IS31FL3729_CS_PULLUP_4K_OHM 0b110
|
||||
#define IS31FL3729_CS_PULLUP_8K_OHM 0b111
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_DISABLE 0b0
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_ENABLE 0b1
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_5_PERCENT 0b00
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_15_PERCENT 0b01
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_24_PERCENT 0b10
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_34_PERCENT 0b11
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1980_US 0b00
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1200_US 0b01
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_820_US 0b10
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_660_US 0b11
|
||||
|
||||
#define IS31FL3729_PWM_FREQUENCY_55K_HZ 0b000
|
||||
#define IS31FL3729_PWM_FREQUENCY_32K_HZ 0b001
|
||||
#define IS31FL3729_PWM_FREQUENCY_4K_HZ 0b010
|
||||
#define IS31FL3729_PWM_FREQUENCY_2K_HZ 0b011
|
||||
#define IS31FL3729_PWM_FREQUENCY_1K_HZ 0b100
|
||||
#define IS31FL3729_PWM_FREQUENCY_500_HZ 0b101
|
||||
#define IS31FL3729_PWM_FREQUENCY_250_HZ 0b110
|
||||
#define IS31FL3729_PWM_FREQUENCY_80K_HZ 0b111
|
||||
|
||||
#define IS31FL3729_CONFIG_SWS_15_9 0x01 // 15 CS x 9 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_8 0x11 // 16 CS x 8 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_7 0x21 // 16 CS x 7 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_6 0x31 // 16 CS x 6 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_5 0x41 // 16 CS x 5 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_4 0x51 // 16 CS x 4 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_3 0x61 // 16 CS x 3 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_2 0x71 // 16 CS x 2 SW matrix
|
||||
|
||||
#define SW1_CS1 0x00
|
||||
#define SW1_CS2 0x01
|
||||
#define SW1_CS3 0x02
|
||||
#define SW1_CS4 0x03
|
||||
#define SW1_CS5 0x04
|
||||
#define SW1_CS6 0x05
|
||||
#define SW1_CS7 0x06
|
||||
#define SW1_CS8 0x07
|
||||
#define SW1_CS9 0x08
|
||||
#define SW1_CS10 0x09
|
||||
#define SW1_CS11 0x0A
|
||||
#define SW1_CS12 0x0B
|
||||
#define SW1_CS13 0x0C
|
||||
#define SW1_CS14 0x0D
|
||||
#define SW1_CS15 0x0E
|
||||
#define SW1_CS16 0x0F
|
||||
|
||||
#define SW2_CS1 0x10
|
||||
#define SW2_CS2 0x11
|
||||
#define SW2_CS3 0x12
|
||||
#define SW2_CS4 0x13
|
||||
#define SW2_CS5 0x14
|
||||
#define SW2_CS6 0x15
|
||||
#define SW2_CS7 0x16
|
||||
#define SW2_CS8 0x17
|
||||
#define SW2_CS9 0x18
|
||||
#define SW2_CS10 0x19
|
||||
#define SW2_CS11 0x1A
|
||||
#define SW2_CS12 0x1B
|
||||
#define SW2_CS13 0x1C
|
||||
#define SW2_CS14 0x1D
|
||||
#define SW2_CS15 0x1E
|
||||
#define SW2_CS16 0x1F
|
||||
|
||||
#define SW3_CS1 0x20
|
||||
#define SW3_CS2 0x21
|
||||
#define SW3_CS3 0x22
|
||||
#define SW3_CS4 0x23
|
||||
#define SW3_CS5 0x24
|
||||
#define SW3_CS6 0x25
|
||||
#define SW3_CS7 0x26
|
||||
#define SW3_CS8 0x27
|
||||
#define SW3_CS9 0x28
|
||||
#define SW3_CS10 0x29
|
||||
#define SW3_CS11 0x2A
|
||||
#define SW3_CS12 0x2B
|
||||
#define SW3_CS13 0x2C
|
||||
#define SW3_CS14 0x2D
|
||||
#define SW3_CS15 0x2E
|
||||
#define SW3_CS16 0x2F
|
||||
|
||||
#define SW4_CS1 0x30
|
||||
#define SW4_CS2 0x31
|
||||
#define SW4_CS3 0x32
|
||||
#define SW4_CS4 0x33
|
||||
#define SW4_CS5 0x34
|
||||
#define SW4_CS6 0x35
|
||||
#define SW4_CS7 0x36
|
||||
#define SW4_CS8 0x37
|
||||
#define SW4_CS9 0x38
|
||||
#define SW4_CS10 0x39
|
||||
#define SW4_CS11 0x3A
|
||||
#define SW4_CS12 0x3B
|
||||
#define SW4_CS13 0x3C
|
||||
#define SW4_CS14 0x3D
|
||||
#define SW4_CS15 0x3E
|
||||
#define SW4_CS16 0x3F
|
||||
|
||||
#define SW5_CS1 0x40
|
||||
#define SW5_CS2 0x41
|
||||
#define SW5_CS3 0x42
|
||||
#define SW5_CS4 0x43
|
||||
#define SW5_CS5 0x44
|
||||
#define SW5_CS6 0x45
|
||||
#define SW5_CS7 0x46
|
||||
#define SW5_CS8 0x47
|
||||
#define SW5_CS9 0x48
|
||||
#define SW5_CS10 0x49
|
||||
#define SW5_CS11 0x4A
|
||||
#define SW5_CS12 0x4B
|
||||
#define SW5_CS13 0x4C
|
||||
#define SW5_CS14 0x4D
|
||||
#define SW5_CS15 0x4E
|
||||
#define SW5_CS16 0x4F
|
||||
|
||||
#define SW6_CS1 0x50
|
||||
#define SW6_CS2 0x51
|
||||
#define SW6_CS3 0x52
|
||||
#define SW6_CS4 0x53
|
||||
#define SW6_CS5 0x54
|
||||
#define SW6_CS6 0x55
|
||||
#define SW6_CS7 0x56
|
||||
#define SW6_CS8 0x57
|
||||
#define SW6_CS9 0x58
|
||||
#define SW6_CS10 0x59
|
||||
#define SW6_CS11 0x5A
|
||||
#define SW6_CS12 0x5B
|
||||
#define SW6_CS13 0x5C
|
||||
#define SW6_CS14 0x5D
|
||||
#define SW6_CS15 0x5E
|
||||
#define SW6_CS16 0x5F
|
||||
|
||||
#define SW7_CS1 0x60
|
||||
#define SW7_CS2 0x61
|
||||
#define SW7_CS3 0x62
|
||||
#define SW7_CS4 0x63
|
||||
#define SW7_CS5 0x64
|
||||
#define SW7_CS6 0x65
|
||||
#define SW7_CS7 0x66
|
||||
#define SW7_CS8 0x67
|
||||
#define SW7_CS9 0x68
|
||||
#define SW7_CS10 0x69
|
||||
#define SW7_CS11 0x6A
|
||||
#define SW7_CS12 0x6B
|
||||
#define SW7_CS13 0x6C
|
||||
#define SW7_CS14 0x6D
|
||||
#define SW7_CS15 0x6E
|
||||
#define SW7_CS16 0x6F
|
||||
|
||||
#define SW8_CS1 0x70
|
||||
#define SW8_CS2 0x71
|
||||
#define SW8_CS3 0x72
|
||||
#define SW8_CS4 0x73
|
||||
#define SW8_CS5 0x74
|
||||
#define SW8_CS6 0x75
|
||||
#define SW8_CS7 0x76
|
||||
#define SW8_CS8 0x77
|
||||
#define SW8_CS9 0x78
|
||||
#define SW8_CS10 0x79
|
||||
#define SW8_CS11 0x7A
|
||||
#define SW8_CS12 0x7B
|
||||
#define SW8_CS13 0x7C
|
||||
#define SW8_CS14 0x7D
|
||||
#define SW8_CS15 0x7E
|
||||
#define SW8_CS16 0x7F
|
||||
|
||||
#define SW9_CS1 0x80
|
||||
#define SW9_CS2 0x81
|
||||
#define SW9_CS3 0x82
|
||||
#define SW9_CS4 0x83
|
||||
#define SW9_CS5 0x84
|
||||
#define SW9_CS6 0x85
|
||||
#define SW9_CS7 0x86
|
||||
#define SW9_CS8 0x87
|
||||
#define SW9_CS9 0x88
|
||||
#define SW9_CS10 0x89
|
||||
#define SW9_CS11 0x8A
|
||||
#define SW9_CS12 0x8B
|
||||
#define SW9_CS13 0x8C
|
||||
#define SW9_CS14 0x8D
|
||||
#define SW9_CS15 0x8E
|
||||
@@ -1,219 +0,0 @@
|
||||
/* Copyright 2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
* Copyright 2024 Harrison Chan (Xelus)
|
||||
* Copyright 2024 Dimitris Mantzouranis <d3xter93@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3729.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3729_PWM_REGISTER_COUNT 143
|
||||
#define IS31FL3729_SCALING_REGISTER_COUNT 16
|
||||
|
||||
#ifndef IS31FL3729_I2C_TIMEOUT
|
||||
# define IS31FL3729_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_I2C_PERSISTENCE
|
||||
# define IS31FL3729_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_CONFIGURATION
|
||||
# define IS31FL3729_CONFIGURATION IS31FL3729_CONFIG_SWS_15_9
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_GLOBAL_CURRENT
|
||||
# define IS31FL3729_GLOBAL_CURRENT 0x40
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SW_PULLDOWN
|
||||
# define IS31FL3729_SW_PULLDOWN IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_CS_PULLUP
|
||||
# define IS31FL3729_CS_PULLUP IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM
|
||||
# define IS31FL3729_SPREAD_SPECTRUM IS31FL3729_SPREAD_SPECTRUM_DISABLE
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM_RANGE
|
||||
# define IS31FL3729_SPREAD_SPECTRUM_RANGE IS31FL3729_SPREAD_SPECTRUM_RANGE_5_PERCENT
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME
|
||||
# define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1980_US
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3729_PWM_FREQUENCY
|
||||
# define IS31FL3729_PWM_FREQUENCY IS31FL3729_PWM_FREQUENCY_32K_HZ
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3729_DRIVER_COUNT] = {
|
||||
IS31FL3729_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3729_I2C_ADDRESS_2
|
||||
IS31FL3729_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3729_I2C_ADDRESS_3
|
||||
IS31FL3729_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3729_I2C_ADDRESS_4
|
||||
IS31FL3729_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
// These buffers match the PWM & scaling registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
typedef struct is31fl3729_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3729_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t scaling_buffer[IS31FL3729_SCALING_REGISTER_COUNT];
|
||||
bool scaling_buffer_dirty;
|
||||
} PACKED is31fl3729_driver_t;
|
||||
|
||||
is31fl3729_driver_t driver_buffers[IS31FL3729_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.scaling_buffer = {0},
|
||||
.scaling_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3729_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3729_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3729_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3729_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3729_write_pwm_buffer(uint8_t index) {
|
||||
// Transmit PWM registers in 11 transfers of 13 bytes.
|
||||
|
||||
// Iterate over the pwm_buffer contents at 13 byte intervals.
|
||||
for (uint8_t i = 0; i <= IS31FL3729_PWM_REGISTER_COUNT; i += 13) {
|
||||
#if IS31FL3729_I2C_PERSISTENCE > 0
|
||||
for (uint8_t j = 0; j < IS31FL3729_I2C_PERSISTENCE; j++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3729_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 13, IS31FL3729_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3729_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 13, IS31FL3729_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3729_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3729_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3729_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_init(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IS31FL3729_LED_COUNT; i++) {
|
||||
is31fl3729_set_scaling_register(i, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_update_scaling_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_init(uint8_t index) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_PULLDOWNUP, ((IS31FL3729_SW_PULLDOWN & 0b111) << 4) | (IS31FL3729_CS_PULLUP & 0b111));
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_SPREAD_SPECTRUM, ((IS31FL3729_SPREAD_SPECTRUM & 0b1) << 4) | ((IS31FL3729_SPREAD_SPECTRUM_RANGE & 0b11) << 2) | (IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME & 0b11));
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_PWM_FREQUENCY, IS31FL3729_PWM_FREQUENCY);
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_GLOBAL_CURRENT, IS31FL3729_GLOBAL_CURRENT);
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_CONFIGURATION, IS31FL3729_CONFIGURATION);
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
void is31fl3729_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
is31fl3729_led_t led;
|
||||
if (index >= 0 && index < IS31FL3729_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3729_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.r] == red && driver_buffers[led.driver].pwm_buffer[led.g] == green && driver_buffers[led.driver].pwm_buffer[led.b] == blue) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.r] = red;
|
||||
driver_buffers[led.driver].pwm_buffer[led.g] = green;
|
||||
driver_buffers[led.driver].pwm_buffer[led.b] = blue;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < IS31FL3729_LED_COUNT; i++) {
|
||||
is31fl3729_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
is31fl3729_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3729_leds[index]), sizeof(led));
|
||||
|
||||
// need to do a bit of checking here since 3729 scaling is per CS pin.
|
||||
// not the usual per RGB key as per other ISSI drivers
|
||||
// only enable them, since they should be default disabled
|
||||
int cs_red = (led.r & 0x0F) - 1;
|
||||
int cs_green = (led.g & 0x0F) - 1;
|
||||
int cs_blue = (led.b & 0x0F) - 1;
|
||||
|
||||
driver_buffers[led.driver].scaling_buffer[cs_red] = red;
|
||||
driver_buffers[led.driver].scaling_buffer[cs_green] = green;
|
||||
driver_buffers[led.driver].scaling_buffer[cs_blue] = blue;
|
||||
driver_buffers[led.driver].scaling_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3729_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3729_write_pwm_buffer(index);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_update_scaling_registers(uint8_t index) {
|
||||
if (driver_buffers[index].scaling_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3729_SCALING_REGISTER_COUNT; i++) {
|
||||
is31fl3729_write_register(index, IS31FL3729_REG_SCALING + i, driver_buffers[index].scaling_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].scaling_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3729_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3729_DRIVER_COUNT; i++) {
|
||||
is31fl3729_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,280 +0,0 @@
|
||||
/* Copyright 2024 HorrorTroll <https://github.com/HorrorTroll>
|
||||
* Copyright 2024 Harrison Chan (Xelus)
|
||||
* Copyright 2024 Dimitris Mantzouranis <d3xter93@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
#define IS31FL3729_REG_PWM 0x01
|
||||
#define IS31FL3729_REG_SCALING 0x90
|
||||
#define IS31FL3729_REG_CONFIGURATION 0xA0
|
||||
#define IS31FL3729_REG_GLOBAL_CURRENT 0xA1
|
||||
#define IS31FL3729_REG_PULLDOWNUP 0xB0
|
||||
#define IS31FL3729_REG_SPREAD_SPECTRUM 0xB1
|
||||
#define IS31FL3729_REG_PWM_FREQUENCY 0xB2
|
||||
#define IS31FL3729_REG_RESET 0xCF
|
||||
|
||||
#define IS31FL3729_I2C_ADDRESS_GND 0x34
|
||||
#define IS31FL3729_I2C_ADDRESS_SCL 0x35
|
||||
#define IS31FL3729_I2C_ADDRESS_SDA 0x36
|
||||
#define IS31FL3729_I2C_ADDRESS_VCC 0x37
|
||||
|
||||
#if defined(RGB_MATRIX_IS31FL3729)
|
||||
# define IS31FL3729_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3729_I2C_ADDRESS_4)
|
||||
# define IS31FL3729_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_3)
|
||||
# define IS31FL3729_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_2)
|
||||
# define IS31FL3729_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3729_I2C_ADDRESS_1)
|
||||
# define IS31FL3729_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3729_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} PACKED is31fl3729_led_t;
|
||||
|
||||
extern const is31fl3729_led_t PROGMEM g_is31fl3729_leds[IS31FL3729_LED_COUNT];
|
||||
|
||||
void is31fl3729_init_drivers(void);
|
||||
void is31fl3729_init(uint8_t index);
|
||||
void is31fl3729_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
|
||||
void is31fl3729_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void is31fl3729_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
void is31fl3729_set_scaling_register(uint8_t index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3729_update_pwm_buffers(uint8_t index);
|
||||
void is31fl3729_update_scaling_registers(uint8_t index);
|
||||
|
||||
void is31fl3729_flush(void);
|
||||
|
||||
#define IS31FL3729_SW_PULLDOWN_0_OHM 0b000
|
||||
#define IS31FL3729_SW_PULLDOWN_0K5_OHM_SW_OFF 0b001
|
||||
#define IS31FL3729_SW_PULLDOWN_1K_OHM_SW_OFF 0b010
|
||||
#define IS31FL3729_SW_PULLDOWN_2K_OHM_SW_OFF 0b011
|
||||
#define IS31FL3729_SW_PULLDOWN_1K_OHM 0b100
|
||||
#define IS31FL3729_SW_PULLDOWN_2K_OHM 0b101
|
||||
#define IS31FL3729_SW_PULLDOWN_4K_OHM 0b110
|
||||
#define IS31FL3729_SW_PULLDOWN_8K_OHM 0b111
|
||||
|
||||
#define IS31FL3729_CS_PULLUP_0_OHM 0b000
|
||||
#define IS31FL3729_CS_PULLUP_0K5_OHM_CS_OFF 0b001
|
||||
#define IS31FL3729_CS_PULLUP_1K_OHM_CS_OFF 0b010
|
||||
#define IS31FL3729_CS_PULLUP_2K_OHM_CS_OFF 0b011
|
||||
#define IS31FL3729_CS_PULLUP_1K_OHM 0b100
|
||||
#define IS31FL3729_CS_PULLUP_2K_OHM 0b101
|
||||
#define IS31FL3729_CS_PULLUP_4K_OHM 0b110
|
||||
#define IS31FL3729_CS_PULLUP_8K_OHM 0b111
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_DISABLE 0b0
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_ENABLE 0b1
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_5_PERCENT 0b00
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_15_PERCENT 0b01
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_24_PERCENT 0b10
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_RANGE_34_PERCENT 0b11
|
||||
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1980_US 0b00
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_1200_US 0b01
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_820_US 0b10
|
||||
#define IS31FL3729_SPREAD_SPECTRUM_CYCLE_TIME_660_US 0b11
|
||||
|
||||
#define IS31FL3729_PWM_FREQUENCY_55K_HZ 0b000
|
||||
#define IS31FL3729_PWM_FREQUENCY_32K_HZ 0b001
|
||||
#define IS31FL3729_PWM_FREQUENCY_4K_HZ 0b010
|
||||
#define IS31FL3729_PWM_FREQUENCY_2K_HZ 0b011
|
||||
#define IS31FL3729_PWM_FREQUENCY_1K_HZ 0b100
|
||||
#define IS31FL3729_PWM_FREQUENCY_500_HZ 0b101
|
||||
#define IS31FL3729_PWM_FREQUENCY_250_HZ 0b110
|
||||
#define IS31FL3729_PWM_FREQUENCY_80K_HZ 0b111
|
||||
|
||||
#define IS31FL3729_CONFIG_SWS_15_9 0x01 // 15 CS x 9 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_8 0x11 // 16 CS x 8 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_7 0x21 // 16 CS x 7 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_6 0x31 // 16 CS x 6 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_5 0x41 // 16 CS x 5 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_4 0x51 // 16 CS x 4 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_3 0x61 // 16 CS x 3 SW matrix
|
||||
#define IS31FL3729_CONFIG_SWS_16_2 0x71 // 16 CS x 2 SW matrix
|
||||
|
||||
#define SW1_CS1 0x00
|
||||
#define SW1_CS2 0x01
|
||||
#define SW1_CS3 0x02
|
||||
#define SW1_CS4 0x03
|
||||
#define SW1_CS5 0x04
|
||||
#define SW1_CS6 0x05
|
||||
#define SW1_CS7 0x06
|
||||
#define SW1_CS8 0x07
|
||||
#define SW1_CS9 0x08
|
||||
#define SW1_CS10 0x09
|
||||
#define SW1_CS11 0x0A
|
||||
#define SW1_CS12 0x0B
|
||||
#define SW1_CS13 0x0C
|
||||
#define SW1_CS14 0x0D
|
||||
#define SW1_CS15 0x0E
|
||||
#define SW1_CS16 0x0F
|
||||
|
||||
#define SW2_CS1 0x10
|
||||
#define SW2_CS2 0x11
|
||||
#define SW2_CS3 0x12
|
||||
#define SW2_CS4 0x13
|
||||
#define SW2_CS5 0x14
|
||||
#define SW2_CS6 0x15
|
||||
#define SW2_CS7 0x16
|
||||
#define SW2_CS8 0x17
|
||||
#define SW2_CS9 0x18
|
||||
#define SW2_CS10 0x19
|
||||
#define SW2_CS11 0x1A
|
||||
#define SW2_CS12 0x1B
|
||||
#define SW2_CS13 0x1C
|
||||
#define SW2_CS14 0x1D
|
||||
#define SW2_CS15 0x1E
|
||||
#define SW2_CS16 0x1F
|
||||
|
||||
#define SW3_CS1 0x20
|
||||
#define SW3_CS2 0x21
|
||||
#define SW3_CS3 0x22
|
||||
#define SW3_CS4 0x23
|
||||
#define SW3_CS5 0x24
|
||||
#define SW3_CS6 0x25
|
||||
#define SW3_CS7 0x26
|
||||
#define SW3_CS8 0x27
|
||||
#define SW3_CS9 0x28
|
||||
#define SW3_CS10 0x29
|
||||
#define SW3_CS11 0x2A
|
||||
#define SW3_CS12 0x2B
|
||||
#define SW3_CS13 0x2C
|
||||
#define SW3_CS14 0x2D
|
||||
#define SW3_CS15 0x2E
|
||||
#define SW3_CS16 0x2F
|
||||
|
||||
#define SW4_CS1 0x30
|
||||
#define SW4_CS2 0x31
|
||||
#define SW4_CS3 0x32
|
||||
#define SW4_CS4 0x33
|
||||
#define SW4_CS5 0x34
|
||||
#define SW4_CS6 0x35
|
||||
#define SW4_CS7 0x36
|
||||
#define SW4_CS8 0x37
|
||||
#define SW4_CS9 0x38
|
||||
#define SW4_CS10 0x39
|
||||
#define SW4_CS11 0x3A
|
||||
#define SW4_CS12 0x3B
|
||||
#define SW4_CS13 0x3C
|
||||
#define SW4_CS14 0x3D
|
||||
#define SW4_CS15 0x3E
|
||||
#define SW4_CS16 0x3F
|
||||
|
||||
#define SW5_CS1 0x40
|
||||
#define SW5_CS2 0x41
|
||||
#define SW5_CS3 0x42
|
||||
#define SW5_CS4 0x43
|
||||
#define SW5_CS5 0x44
|
||||
#define SW5_CS6 0x45
|
||||
#define SW5_CS7 0x46
|
||||
#define SW5_CS8 0x47
|
||||
#define SW5_CS9 0x48
|
||||
#define SW5_CS10 0x49
|
||||
#define SW5_CS11 0x4A
|
||||
#define SW5_CS12 0x4B
|
||||
#define SW5_CS13 0x4C
|
||||
#define SW5_CS14 0x4D
|
||||
#define SW5_CS15 0x4E
|
||||
#define SW5_CS16 0x4F
|
||||
|
||||
#define SW6_CS1 0x50
|
||||
#define SW6_CS2 0x51
|
||||
#define SW6_CS3 0x52
|
||||
#define SW6_CS4 0x53
|
||||
#define SW6_CS5 0x54
|
||||
#define SW6_CS6 0x55
|
||||
#define SW6_CS7 0x56
|
||||
#define SW6_CS8 0x57
|
||||
#define SW6_CS9 0x58
|
||||
#define SW6_CS10 0x59
|
||||
#define SW6_CS11 0x5A
|
||||
#define SW6_CS12 0x5B
|
||||
#define SW6_CS13 0x5C
|
||||
#define SW6_CS14 0x5D
|
||||
#define SW6_CS15 0x5E
|
||||
#define SW6_CS16 0x5F
|
||||
|
||||
#define SW7_CS1 0x60
|
||||
#define SW7_CS2 0x61
|
||||
#define SW7_CS3 0x62
|
||||
#define SW7_CS4 0x63
|
||||
#define SW7_CS5 0x64
|
||||
#define SW7_CS6 0x65
|
||||
#define SW7_CS7 0x66
|
||||
#define SW7_CS8 0x67
|
||||
#define SW7_CS9 0x68
|
||||
#define SW7_CS10 0x69
|
||||
#define SW7_CS11 0x6A
|
||||
#define SW7_CS12 0x6B
|
||||
#define SW7_CS13 0x6C
|
||||
#define SW7_CS14 0x6D
|
||||
#define SW7_CS15 0x6E
|
||||
#define SW7_CS16 0x6F
|
||||
|
||||
#define SW8_CS1 0x70
|
||||
#define SW8_CS2 0x71
|
||||
#define SW8_CS3 0x72
|
||||
#define SW8_CS4 0x73
|
||||
#define SW8_CS5 0x74
|
||||
#define SW8_CS6 0x75
|
||||
#define SW8_CS7 0x76
|
||||
#define SW8_CS8 0x77
|
||||
#define SW8_CS9 0x78
|
||||
#define SW8_CS10 0x79
|
||||
#define SW8_CS11 0x7A
|
||||
#define SW8_CS12 0x7B
|
||||
#define SW8_CS13 0x7C
|
||||
#define SW8_CS14 0x7D
|
||||
#define SW8_CS15 0x7E
|
||||
#define SW8_CS16 0x7F
|
||||
|
||||
#define SW9_CS1 0x80
|
||||
#define SW9_CS2 0x81
|
||||
#define SW9_CS3 0x82
|
||||
#define SW9_CS4 0x83
|
||||
#define SW9_CS5 0x84
|
||||
#define SW9_CS6 0x85
|
||||
#define SW9_CS7 0x86
|
||||
#define SW9_CS8 0x87
|
||||
#define SW9_CS9 0x88
|
||||
#define SW9_CS10 0x89
|
||||
#define SW9_CS11 0x8A
|
||||
#define SW9_CS12 0x8B
|
||||
#define SW9_CS13 0x8C
|
||||
#define SW9_CS14 0x8D
|
||||
#define SW9_CS15 0x8E
|
||||
@@ -1,230 +0,0 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2019 Clueboard
|
||||
* Copyright 2021 Doni Crosby
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3731-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3731_PWM_REGISTER_COUNT 144
|
||||
#define IS31FL3731_LED_CONTROL_REGISTER_COUNT 18
|
||||
|
||||
#ifndef IS31FL3731_I2C_TIMEOUT
|
||||
# define IS31FL3731_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3731_I2C_PERSISTENCE
|
||||
# define IS31FL3731_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3731_DRIVER_COUNT] = {
|
||||
IS31FL3731_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3731_I2C_ADDRESS_2
|
||||
IS31FL3731_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3731_I2C_ADDRESS_3
|
||||
IS31FL3731_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3731_I2C_ADDRESS_4
|
||||
IS31FL3731_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in is31fl3731_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
typedef struct is31fl3731_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3731_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3731_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3731_driver_t;
|
||||
|
||||
is31fl3731_driver_t driver_buffers[IS31FL3731_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3731_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3731_select_page(uint8_t index, uint8_t page) {
|
||||
is31fl3731_write_register(index, IS31FL3731_REG_COMMAND, page);
|
||||
}
|
||||
|
||||
void is31fl3731_write_pwm_buffer(uint8_t index) {
|
||||
// Assumes page 0 is already selected.
|
||||
// Transmit PWM registers in 9 transfers of 16 bytes.
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (uint8_t i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i += 16) {
|
||||
#if IS31FL3731_I2C_PERSISTENCE > 0
|
||||
for (uint8_t j = 0; j < IS31FL3731_I2C_PERSISTENCE; j++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3731_FRAME_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3731_FRAME_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3731_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_init(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IS31FL3731_LED_COUNT; i++) {
|
||||
is31fl3731_set_led_control_register(i, true);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_update_led_control_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_init(uint8_t index) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, first enable software shutdown,
|
||||
// then set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FUNCTION);
|
||||
|
||||
// enable software shutdown
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x00);
|
||||
#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_GHOST_IMAGE_PREVENTION, IS31FL3731_GHOST_IMAGE_PREVENTION_GEN);
|
||||
#endif
|
||||
|
||||
// this delay was copied from other drivers, might not be needed
|
||||
wait_ms(10);
|
||||
|
||||
// picture mode
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_CONFIG, IS31FL3731_CONFIG_MODE_PICTURE);
|
||||
// display frame 0
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_PICTURE_DISPLAY, 0x00);
|
||||
// audio sync off
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_AUDIO_SYNC, 0x00);
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FRAME_1);
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_LED_CONTROL + i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the blink control register (not really needed)
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_BLINK_CONTROL + i, 0x00);
|
||||
}
|
||||
|
||||
// set PWM on all LEDs to 0
|
||||
for (uint8_t i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_PWM + i, 0x00);
|
||||
}
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FUNCTION);
|
||||
|
||||
// disable software shutdown
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// select page 0 and leave it selected.
|
||||
// most usage after initialization is just writing PWM buffers in page 0
|
||||
// as there's not much point in double-buffering
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FRAME_1);
|
||||
}
|
||||
|
||||
void is31fl3731_set_value(int index, uint8_t value) {
|
||||
is31fl3731_led_t led;
|
||||
|
||||
if (index >= 0 && index < IS31FL3731_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.v] == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.v] = value;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < IS31FL3731_LED_COUNT; i++) {
|
||||
is31fl3731_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_led_control_register(uint8_t index, bool value) {
|
||||
is31fl3731_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 8;
|
||||
uint8_t bit_value = led.v % 8;
|
||||
|
||||
if (value) {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3731_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3731_write_pwm_buffer(index);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_update_led_control_registers(uint8_t index) {
|
||||
if (driver_buffers[index].led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, i, driver_buffers[index].led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,286 +0,0 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2019 Clueboard
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
|
||||
#ifdef LED_DRIVER_ADDR_1
|
||||
# define IS31FL3731_I2C_ADDRESS_1 LED_DRIVER_ADDR_1
|
||||
#endif
|
||||
#ifdef LED_DRIVER_ADDR_2
|
||||
# define IS31FL3731_I2C_ADDRESS_2 LED_DRIVER_ADDR_2
|
||||
#endif
|
||||
#ifdef LED_DRIVER_ADDR_3
|
||||
# define IS31FL3731_I2C_ADDRESS_3 LED_DRIVER_ADDR_3
|
||||
#endif
|
||||
#ifdef LED_DRIVER_ADDR_4
|
||||
# define IS31FL3731_I2C_ADDRESS_4 LED_DRIVER_ADDR_4
|
||||
#endif
|
||||
#ifdef ISSI_TIMEOUT
|
||||
# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
|
||||
#endif
|
||||
#ifdef ISSI_PERSISTENCE
|
||||
# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE
|
||||
#endif
|
||||
#ifdef ISSI_3731_DEGHOST
|
||||
# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST
|
||||
#endif
|
||||
|
||||
#define is31_led is31fl3731_led_t
|
||||
#define g_is31_leds g_is31fl3731_leds
|
||||
// ========
|
||||
|
||||
#define IS31FL3731_REG_COMMAND 0xFD
|
||||
#define IS31FL3731_COMMAND_FRAME_1 0x00
|
||||
#define IS31FL3731_COMMAND_FRAME_2 0x01
|
||||
#define IS31FL3731_COMMAND_FRAME_3 0x02
|
||||
#define IS31FL3731_COMMAND_FRAME_4 0x03
|
||||
#define IS31FL3731_COMMAND_FRAME_5 0x04
|
||||
#define IS31FL3731_COMMAND_FRAME_6 0x05
|
||||
#define IS31FL3731_COMMAND_FRAME_7 0x06
|
||||
#define IS31FL3731_COMMAND_FRAME_8 0x07
|
||||
#define IS31FL3731_COMMAND_FUNCTION 0x0B
|
||||
|
||||
#define IS31FL3731_FRAME_REG_LED_CONTROL 0x00
|
||||
#define IS31FL3731_FRAME_REG_BLINK_CONTROL 0x12
|
||||
#define IS31FL3731_FRAME_REG_PWM 0x24
|
||||
|
||||
#define IS31FL3731_FUNCTION_REG_CONFIG 0x00
|
||||
#define IS31FL3731_CONFIG_MODE_PICTURE 0x00
|
||||
#define IS31FL3731_CONFIG_MODE_AUTO_PLAY 0x08
|
||||
#define IS31FL3731_CONFIG_MODE_AUDIO_PLAY 0x18
|
||||
|
||||
#define IS31FL3731_FUNCTION_REG_PICTURE_DISPLAY 0x01
|
||||
#define IS31FL3731_FUNCTION_REG_AUDIO_SYNC 0x06
|
||||
#define IS31FL3731_FUNCTION_REG_SHUTDOWN 0x0A
|
||||
|
||||
// Not defined in the datasheet -- See AN for IC
|
||||
#define IS31FL3731_FUNCTION_REG_GHOST_IMAGE_PREVENTION 0xC2
|
||||
#define IS31FL3731_GHOST_IMAGE_PREVENTION_GEN 0x10
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_GND 0x74
|
||||
#define IS31FL3731_I2C_ADDRESS_SCL 0x75
|
||||
#define IS31FL3731_I2C_ADDRESS_SDA 0x76
|
||||
#define IS31FL3731_I2C_ADDRESS_VCC 0x77
|
||||
|
||||
#if defined(LED_MATRIX_IS31FL3731)
|
||||
# define IS31FL3731_LED_COUNT LED_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined IS31FL3731_I2C_ADDRESS_4
|
||||
# define IS31FL3731_DRIVER_COUNT 4
|
||||
#elif defined IS31FL3731_I2C_ADDRESS_3
|
||||
# define IS31FL3731_DRIVER_COUNT 3
|
||||
#elif defined IS31FL3731_I2C_ADDRESS_2
|
||||
# define IS31FL3731_DRIVER_COUNT 2
|
||||
#elif defined IS31FL3731_I2C_ADDRESS_1
|
||||
# define IS31FL3731_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3731_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} PACKED is31fl3731_led_t;
|
||||
|
||||
extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT];
|
||||
|
||||
void is31fl3731_init_drivers(void);
|
||||
void is31fl3731_init(uint8_t index);
|
||||
void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
void is31fl3731_select_page(uint8_t index, uint8_t page);
|
||||
|
||||
void is31fl3731_set_value(int index, uint8_t value);
|
||||
void is31fl3731_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3731_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3731_update_pwm_buffers(uint8_t index);
|
||||
void is31fl3731_update_led_control_registers(uint8_t index);
|
||||
|
||||
void is31fl3731_flush(void);
|
||||
|
||||
#define C1_1 0x00
|
||||
#define C1_2 0x01
|
||||
#define C1_3 0x02
|
||||
#define C1_4 0x03
|
||||
#define C1_5 0x04
|
||||
#define C1_6 0x05
|
||||
#define C1_7 0x06
|
||||
#define C1_8 0x07
|
||||
|
||||
#define C1_9 0x08
|
||||
#define C1_10 0x09
|
||||
#define C1_11 0x0A
|
||||
#define C1_12 0x0B
|
||||
#define C1_13 0x0C
|
||||
#define C1_14 0x0D
|
||||
#define C1_15 0x0E
|
||||
#define C1_16 0x0F
|
||||
|
||||
#define C2_1 0x10
|
||||
#define C2_2 0x11
|
||||
#define C2_3 0x12
|
||||
#define C2_4 0x13
|
||||
#define C2_5 0x14
|
||||
#define C2_6 0x15
|
||||
#define C2_7 0x16
|
||||
#define C2_8 0x17
|
||||
|
||||
#define C2_9 0x18
|
||||
#define C2_10 0x19
|
||||
#define C2_11 0x1A
|
||||
#define C2_12 0x1B
|
||||
#define C2_13 0x1C
|
||||
#define C2_14 0x1D
|
||||
#define C2_15 0x1E
|
||||
#define C2_16 0x1F
|
||||
|
||||
#define C3_1 0x20
|
||||
#define C3_2 0x21
|
||||
#define C3_3 0x22
|
||||
#define C3_4 0x23
|
||||
#define C3_5 0x24
|
||||
#define C3_6 0x25
|
||||
#define C3_7 0x26
|
||||
#define C3_8 0x27
|
||||
|
||||
#define C3_9 0x28
|
||||
#define C3_10 0x29
|
||||
#define C3_11 0x2A
|
||||
#define C3_12 0x2B
|
||||
#define C3_13 0x2C
|
||||
#define C3_14 0x2D
|
||||
#define C3_15 0x2E
|
||||
#define C3_16 0x2F
|
||||
|
||||
#define C4_1 0x30
|
||||
#define C4_2 0x31
|
||||
#define C4_3 0x32
|
||||
#define C4_4 0x33
|
||||
#define C4_5 0x34
|
||||
#define C4_6 0x35
|
||||
#define C4_7 0x36
|
||||
#define C4_8 0x37
|
||||
|
||||
#define C4_9 0x38
|
||||
#define C4_10 0x39
|
||||
#define C4_11 0x3A
|
||||
#define C4_12 0x3B
|
||||
#define C4_13 0x3C
|
||||
#define C4_14 0x3D
|
||||
#define C4_15 0x3E
|
||||
#define C4_16 0x3F
|
||||
|
||||
#define C5_1 0x40
|
||||
#define C5_2 0x41
|
||||
#define C5_3 0x42
|
||||
#define C5_4 0x43
|
||||
#define C5_5 0x44
|
||||
#define C5_6 0x45
|
||||
#define C5_7 0x46
|
||||
#define C5_8 0x47
|
||||
|
||||
#define C5_9 0x48
|
||||
#define C5_10 0x49
|
||||
#define C5_11 0x4A
|
||||
#define C5_12 0x4B
|
||||
#define C5_13 0x4C
|
||||
#define C5_14 0x4D
|
||||
#define C5_15 0x4E
|
||||
#define C5_16 0x4F
|
||||
|
||||
#define C6_1 0x50
|
||||
#define C6_2 0x51
|
||||
#define C6_3 0x52
|
||||
#define C6_4 0x53
|
||||
#define C6_5 0x54
|
||||
#define C6_6 0x55
|
||||
#define C6_7 0x56
|
||||
#define C6_8 0x57
|
||||
|
||||
#define C6_9 0x58
|
||||
#define C6_10 0x59
|
||||
#define C6_11 0x5A
|
||||
#define C6_12 0x5B
|
||||
#define C6_13 0x5C
|
||||
#define C6_14 0x5D
|
||||
#define C6_15 0x5E
|
||||
#define C6_16 0x5F
|
||||
|
||||
#define C7_1 0x60
|
||||
#define C7_2 0x61
|
||||
#define C7_3 0x62
|
||||
#define C7_4 0x63
|
||||
#define C7_5 0x64
|
||||
#define C7_6 0x65
|
||||
#define C7_7 0x66
|
||||
#define C7_8 0x67
|
||||
|
||||
#define C7_9 0x68
|
||||
#define C7_10 0x69
|
||||
#define C7_11 0x6A
|
||||
#define C7_12 0x6B
|
||||
#define C7_13 0x6C
|
||||
#define C7_14 0x6D
|
||||
#define C7_15 0x6E
|
||||
#define C7_16 0x6F
|
||||
|
||||
#define C8_1 0x70
|
||||
#define C8_2 0x71
|
||||
#define C8_3 0x72
|
||||
#define C8_4 0x73
|
||||
#define C8_5 0x74
|
||||
#define C8_6 0x75
|
||||
#define C8_7 0x76
|
||||
#define C8_8 0x77
|
||||
|
||||
#define C8_9 0x78
|
||||
#define C8_10 0x79
|
||||
#define C8_11 0x7A
|
||||
#define C8_12 0x7B
|
||||
#define C8_13 0x7C
|
||||
#define C8_14 0x7D
|
||||
#define C8_15 0x7E
|
||||
#define C8_16 0x7F
|
||||
|
||||
#define C9_1 0x80
|
||||
#define C9_2 0x81
|
||||
#define C9_3 0x82
|
||||
#define C9_4 0x83
|
||||
#define C9_5 0x84
|
||||
#define C9_6 0x85
|
||||
#define C9_7 0x86
|
||||
#define C9_8 0x87
|
||||
|
||||
#define C9_9 0x88
|
||||
#define C9_10 0x89
|
||||
#define C9_11 0x8A
|
||||
#define C9_12 0x8B
|
||||
#define C9_13 0x8C
|
||||
#define C9_14 0x8D
|
||||
#define C9_15 0x8E
|
||||
#define C9_16 0x8F
|
||||
244
drivers/led/issi/is31fl3731-simple.c
Normal file
244
drivers/led/issi/is31fl3731-simple.c
Normal file
@@ -0,0 +1,244 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2019 Clueboard
|
||||
* Copyright 2021 Doni Crosby
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3731-simple.h"
|
||||
#include "i2c_master.h"
|
||||
#include "wait.h"
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0b1110100 AD <-> GND
|
||||
// 0b1110111 AD <-> VCC
|
||||
// 0b1110101 AD <-> SCL
|
||||
// 0b1110110 AD <-> SDA
|
||||
#define ISSI_ADDR_DEFAULT 0x74
|
||||
|
||||
#define ISSI_REG_CONFIG 0x00
|
||||
#define ISSI_REG_CONFIG_PICTUREMODE 0x00
|
||||
#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
|
||||
#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18
|
||||
|
||||
#define ISSI_CONF_PICTUREMODE 0x00
|
||||
#define ISSI_CONF_AUTOFRAMEMODE 0x04
|
||||
#define ISSI_CONF_AUDIOMODE 0x08
|
||||
|
||||
#define ISSI_REG_PICTUREFRAME 0x01
|
||||
|
||||
// Not defined in the datasheet -- See AN for IC
|
||||
#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
|
||||
|
||||
#define ISSI_REG_SHUTDOWN 0x0A
|
||||
#define ISSI_REG_AUDIOSYNC 0x06
|
||||
|
||||
#define ISSI_COMMANDREGISTER 0xFD
|
||||
#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
|
||||
|
||||
#ifndef ISSI_TIMEOUT
|
||||
# define ISSI_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_PERSISTENCE
|
||||
# define ISSI_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in is31fl3731_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][144];
|
||||
bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
/* There's probably a better way to init this... */
|
||||
#if LED_DRIVER_COUNT == 1
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}};
|
||||
#elif LED_DRIVER_COUNT == 2
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}};
|
||||
#elif LED_DRIVER_COUNT == 3
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}};
|
||||
#elif LED_DRIVER_COUNT == 4
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][18] = {{0}, {0}, {0}, {0}};
|
||||
#endif
|
||||
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
// This is the bit pattern in the LED control registers
|
||||
// (for matrix A, add one to register for matrix B)
|
||||
//
|
||||
// reg - b7 b6 b5 b4 b3 b2 b1 b0
|
||||
// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01
|
||||
// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00
|
||||
// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00
|
||||
// 0x06 - - , - , - , - , - ,B02,B01,B00
|
||||
// 0x08 - - , - , - , - , - , - , - , -
|
||||
// 0x0A - B17,B16,B15, - , - , - , - , -
|
||||
// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09
|
||||
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
||||
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
||||
|
||||
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// assumes bank is already selected
|
||||
|
||||
// transmit PWM registers in 9 transfers of 16 bytes
|
||||
// g_twi_transfer_buffer[] is 20 bytes
|
||||
|
||||
// iterate over the pwm_buffer contents at 16 byte intervals
|
||||
for (int i = 0; i < 144; i += 16) {
|
||||
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
|
||||
g_twi_transfer_buffer[0] = 0x24 + i;
|
||||
// copy the data from i to i+15
|
||||
// device will auto-increment register for data after the first byte
|
||||
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
|
||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||
}
|
||||
#else
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_init(uint8_t addr) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, first enable software shutdown,
|
||||
// then set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
// select "function register" bank
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
|
||||
|
||||
// enable software shutdown
|
||||
is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
|
||||
#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array
|
||||
is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10);
|
||||
#endif
|
||||
|
||||
// this delay was copied from other drivers, might not be needed
|
||||
wait_ms(10);
|
||||
|
||||
// picture mode
|
||||
is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
|
||||
// display frame 0
|
||||
is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00);
|
||||
// audio sync off
|
||||
is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00);
|
||||
|
||||
// select bank 0
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (int i = 0x00; i <= 0x11; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the blink control register (not really needed)
|
||||
for (int i = 0x12; i <= 0x23; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// set PWM on all LEDs to 0
|
||||
for (int i = 0x24; i <= 0xB3; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// select "function register" bank
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
|
||||
|
||||
// disable software shutdown
|
||||
is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// select bank 0 and leave it selected.
|
||||
// most usage after initialization is just writing PWM buffers in bank 0
|
||||
// as there's not much point in double-buffering
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||
}
|
||||
|
||||
void is31fl3731_set_value(int index, uint8_t value) {
|
||||
is31_led led;
|
||||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
// Subtract 0x24 to get the second index of g_pwm_buffer
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.v - 0x24] == value) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.v - 0x24] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
|
||||
is31fl3731_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_led_control_register(uint8_t index, bool value) {
|
||||
is31_led led;
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = (led.v - 0x24) / 8;
|
||||
uint8_t bit_value = (led.v - 0x24) % 8;
|
||||
|
||||
if (value) {
|
||||
g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
is31fl3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
for (int i = 0; i < 18; i++) {
|
||||
is31fl3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
209
drivers/led/issi/is31fl3731-simple.h
Normal file
209
drivers/led/issi/is31fl3731-simple.h
Normal file
@@ -0,0 +1,209 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2019 Clueboard
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "progmem.h"
|
||||
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} __attribute__((packed)) is31_led;
|
||||
|
||||
extern const is31_led PROGMEM g_is31_leds[LED_MATRIX_LED_COUNT];
|
||||
|
||||
void is31fl3731_init(uint8_t addr);
|
||||
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
|
||||
|
||||
void is31fl3731_set_value(int index, uint8_t value);
|
||||
void is31fl3731_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3731_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index);
|
||||
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
#define C1_1 0x24
|
||||
#define C1_2 0x25
|
||||
#define C1_3 0x26
|
||||
#define C1_4 0x27
|
||||
#define C1_5 0x28
|
||||
#define C1_6 0x29
|
||||
#define C1_7 0x2A
|
||||
#define C1_8 0x2B
|
||||
|
||||
#define C1_9 0x2C
|
||||
#define C1_10 0x2D
|
||||
#define C1_11 0x2E
|
||||
#define C1_12 0x2F
|
||||
#define C1_13 0x30
|
||||
#define C1_14 0x31
|
||||
#define C1_15 0x32
|
||||
#define C1_16 0x33
|
||||
|
||||
#define C2_1 0x34
|
||||
#define C2_2 0x35
|
||||
#define C2_3 0x36
|
||||
#define C2_4 0x37
|
||||
#define C2_5 0x38
|
||||
#define C2_6 0x39
|
||||
#define C2_7 0x3A
|
||||
#define C2_8 0x3B
|
||||
|
||||
#define C2_9 0x3C
|
||||
#define C2_10 0x3D
|
||||
#define C2_11 0x3E
|
||||
#define C2_12 0x3F
|
||||
#define C2_13 0x40
|
||||
#define C2_14 0x41
|
||||
#define C2_15 0x42
|
||||
#define C2_16 0x43
|
||||
|
||||
#define C3_1 0x44
|
||||
#define C3_2 0x45
|
||||
#define C3_3 0x46
|
||||
#define C3_4 0x47
|
||||
#define C3_5 0x48
|
||||
#define C3_6 0x49
|
||||
#define C3_7 0x4A
|
||||
#define C3_8 0x4B
|
||||
|
||||
#define C3_9 0x4C
|
||||
#define C3_10 0x4D
|
||||
#define C3_11 0x4E
|
||||
#define C3_12 0x4F
|
||||
#define C3_13 0x50
|
||||
#define C3_14 0x51
|
||||
#define C3_15 0x52
|
||||
#define C3_16 0x53
|
||||
|
||||
#define C4_1 0x54
|
||||
#define C4_2 0x55
|
||||
#define C4_3 0x56
|
||||
#define C4_4 0x57
|
||||
#define C4_5 0x58
|
||||
#define C4_6 0x59
|
||||
#define C4_7 0x5A
|
||||
#define C4_8 0x5B
|
||||
|
||||
#define C4_9 0x5C
|
||||
#define C4_10 0x5D
|
||||
#define C4_11 0x5E
|
||||
#define C4_12 0x5F
|
||||
#define C4_13 0x60
|
||||
#define C4_14 0x61
|
||||
#define C4_15 0x62
|
||||
#define C4_16 0x63
|
||||
|
||||
#define C5_1 0x64
|
||||
#define C5_2 0x65
|
||||
#define C5_3 0x66
|
||||
#define C5_4 0x67
|
||||
#define C5_5 0x68
|
||||
#define C5_6 0x69
|
||||
#define C5_7 0x6A
|
||||
#define C5_8 0x6B
|
||||
|
||||
#define C5_9 0x6C
|
||||
#define C5_10 0x6D
|
||||
#define C5_11 0x6E
|
||||
#define C5_12 0x6F
|
||||
#define C5_13 0x70
|
||||
#define C5_14 0x71
|
||||
#define C5_15 0x72
|
||||
#define C5_16 0x73
|
||||
|
||||
#define C6_1 0x74
|
||||
#define C6_2 0x75
|
||||
#define C6_3 0x76
|
||||
#define C6_4 0x77
|
||||
#define C6_5 0x78
|
||||
#define C6_6 0x79
|
||||
#define C6_7 0x7A
|
||||
#define C6_8 0x7B
|
||||
|
||||
#define C6_9 0x7C
|
||||
#define C6_10 0x7D
|
||||
#define C6_11 0x7E
|
||||
#define C6_12 0x7F
|
||||
#define C6_13 0x80
|
||||
#define C6_14 0x81
|
||||
#define C6_15 0x82
|
||||
#define C6_16 0x83
|
||||
|
||||
#define C7_1 0x84
|
||||
#define C7_2 0x85
|
||||
#define C7_3 0x86
|
||||
#define C7_4 0x87
|
||||
#define C7_5 0x88
|
||||
#define C7_6 0x89
|
||||
#define C7_7 0x8A
|
||||
#define C7_8 0x8B
|
||||
|
||||
#define C7_9 0x8C
|
||||
#define C7_10 0x8D
|
||||
#define C7_11 0x8E
|
||||
#define C7_12 0x8F
|
||||
#define C7_13 0x90
|
||||
#define C7_14 0x91
|
||||
#define C7_15 0x92
|
||||
#define C7_16 0x93
|
||||
|
||||
#define C8_1 0x94
|
||||
#define C8_2 0x95
|
||||
#define C8_3 0x96
|
||||
#define C8_4 0x97
|
||||
#define C8_5 0x98
|
||||
#define C8_6 0x99
|
||||
#define C8_7 0x9A
|
||||
#define C8_8 0x9B
|
||||
|
||||
#define C8_9 0x9C
|
||||
#define C8_10 0x9D
|
||||
#define C8_11 0x9E
|
||||
#define C8_12 0x9F
|
||||
#define C8_13 0xA0
|
||||
#define C8_14 0xA1
|
||||
#define C8_15 0xA2
|
||||
#define C8_16 0xA3
|
||||
|
||||
#define C9_1 0xA4
|
||||
#define C9_2 0xA5
|
||||
#define C9_3 0xA6
|
||||
#define C9_4 0xA7
|
||||
#define C9_5 0xA8
|
||||
#define C9_6 0xA9
|
||||
#define C9_7 0xAA
|
||||
#define C9_8 0xAB
|
||||
|
||||
#define C9_9 0xAC
|
||||
#define C9_10 0xAD
|
||||
#define C9_11 0xAE
|
||||
#define C9_12 0xAF
|
||||
#define C9_13 0xB0
|
||||
#define C9_14 0xB1
|
||||
#define C9_15 0xB2
|
||||
#define C9_16 0xB3
|
||||
@@ -18,228 +18,230 @@
|
||||
|
||||
#include "is31fl3731.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3731_PWM_REGISTER_COUNT 144
|
||||
#define IS31FL3731_LED_CONTROL_REGISTER_COUNT 18
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 0b1110100 AD <-> GND
|
||||
// 0b1110111 AD <-> VCC
|
||||
// 0b1110101 AD <-> SCL
|
||||
// 0b1110110 AD <-> SDA
|
||||
#define ISSI_ADDR_DEFAULT 0x74
|
||||
|
||||
#ifndef IS31FL3731_I2C_TIMEOUT
|
||||
# define IS31FL3731_I2C_TIMEOUT 100
|
||||
#define ISSI_REG_CONFIG 0x00
|
||||
#define ISSI_REG_CONFIG_PICTUREMODE 0x00
|
||||
#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08
|
||||
#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18
|
||||
|
||||
#define ISSI_CONF_PICTUREMODE 0x00
|
||||
#define ISSI_CONF_AUTOFRAMEMODE 0x04
|
||||
#define ISSI_CONF_AUDIOMODE 0x08
|
||||
|
||||
#define ISSI_REG_PICTUREFRAME 0x01
|
||||
|
||||
// Not defined in the datasheet -- See AN for IC
|
||||
#define ISSI_REG_GHOST_IMAGE_PREVENTION 0xC2 // Set bit 4 to enable de-ghosting
|
||||
|
||||
#define ISSI_REG_SHUTDOWN 0x0A
|
||||
#define ISSI_REG_AUDIOSYNC 0x06
|
||||
|
||||
#define ISSI_COMMANDREGISTER 0xFD
|
||||
#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine'
|
||||
|
||||
#ifndef ISSI_TIMEOUT
|
||||
# define ISSI_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3731_I2C_PERSISTENCE
|
||||
# define IS31FL3731_I2C_PERSISTENCE 0
|
||||
#ifndef ISSI_PERSISTENCE
|
||||
# define ISSI_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3731_DRIVER_COUNT] = {
|
||||
IS31FL3731_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3731_I2C_ADDRESS_2
|
||||
IS31FL3731_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3731_I2C_ADDRESS_3
|
||||
IS31FL3731_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3731_I2C_ADDRESS_4
|
||||
IS31FL3731_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in is31fl3731_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
typedef struct is31fl3731_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3731_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3731_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3731_driver_t;
|
||||
uint8_t g_pwm_buffer[DRIVER_COUNT][144];
|
||||
bool g_pwm_buffer_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
is31fl3731_driver_t driver_buffers[IS31FL3731_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
}};
|
||||
uint8_t g_led_control_registers[DRIVER_COUNT][18] = {{0}};
|
||||
bool g_led_control_registers_update_required[DRIVER_COUNT] = {false};
|
||||
|
||||
void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3731_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3731_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
// This is the bit pattern in the LED control registers
|
||||
// (for matrix A, add one to register for matrix B)
|
||||
//
|
||||
// reg - b7 b6 b5 b4 b3 b2 b1 b0
|
||||
// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01
|
||||
// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00
|
||||
// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00
|
||||
// 0x06 - - , - , - , - , - ,B02,B01,B00
|
||||
// 0x08 - - , - , - , - , - , - , - , -
|
||||
// 0x0A - B17,B16,B15, - , - , - , - , -
|
||||
// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09
|
||||
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09
|
||||
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09
|
||||
|
||||
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) == 0) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3731_I2C_TIMEOUT);
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3731_select_page(uint8_t index, uint8_t page) {
|
||||
is31fl3731_write_register(index, IS31FL3731_REG_COMMAND, page);
|
||||
}
|
||||
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// assumes bank is already selected
|
||||
|
||||
void is31fl3731_write_pwm_buffer(uint8_t index) {
|
||||
// Assumes page 0 is already selected.
|
||||
// Transmit PWM registers in 9 transfers of 16 bytes.
|
||||
// transmit PWM registers in 9 transfers of 16 bytes
|
||||
// g_twi_transfer_buffer[] is 20 bytes
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (uint8_t i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i += 16) {
|
||||
#if IS31FL3731_I2C_PERSISTENCE > 0
|
||||
for (uint8_t j = 0; j < IS31FL3731_I2C_PERSISTENCE; j++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, IS31FL3731_FRAME_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
// iterate over the pwm_buffer contents at 16 byte intervals
|
||||
for (int i = 0; i < 144; i += 16) {
|
||||
// set the first register, e.g. 0x24, 0x34, 0x44, etc.
|
||||
g_twi_transfer_buffer[0] = 0x24 + i;
|
||||
// copy the data from i to i+15
|
||||
// device will auto-increment register for data after the first byte
|
||||
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer
|
||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) == 0) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, IS31FL3731_FRAME_REG_PWM + i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3731_I2C_TIMEOUT);
|
||||
i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3731_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3731_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3731_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_init(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IS31FL3731_LED_COUNT; i++) {
|
||||
is31fl3731_set_led_control_register(i, true, true, true);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_update_led_control_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_init(uint8_t index) {
|
||||
void is31fl3731_init(uint8_t addr) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, first enable software shutdown,
|
||||
// then set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FUNCTION);
|
||||
// select "function register" bank
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
|
||||
|
||||
// enable software shutdown
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x00);
|
||||
#ifdef IS31FL3731_DEGHOST // set to enable de-ghosting of the array
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_GHOST_IMAGE_PREVENTION, IS31FL3731_GHOST_IMAGE_PREVENTION_GEN);
|
||||
is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x00);
|
||||
#ifdef ISSI_3731_DEGHOST // set to enable de-ghosting of the array
|
||||
is31fl3731_write_register(addr, ISSI_REG_GHOST_IMAGE_PREVENTION, 0x10);
|
||||
#endif
|
||||
|
||||
// this delay was copied from other drivers, might not be needed
|
||||
wait_ms(10);
|
||||
|
||||
// picture mode
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_CONFIG, IS31FL3731_CONFIG_MODE_PICTURE);
|
||||
is31fl3731_write_register(addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE);
|
||||
// display frame 0
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_PICTURE_DISPLAY, 0x00);
|
||||
is31fl3731_write_register(addr, ISSI_REG_PICTUREFRAME, 0x00);
|
||||
// audio sync off
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_AUDIO_SYNC, 0x00);
|
||||
is31fl3731_write_register(addr, ISSI_REG_AUDIOSYNC, 0x00);
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FRAME_1);
|
||||
// select bank 0
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||
|
||||
// turn off all LEDs in the LED control register
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_LED_CONTROL + i, 0x00);
|
||||
for (int i = 0x00; i <= 0x11; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// turn off all LEDs in the blink control register (not really needed)
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_BLINK_CONTROL + i, 0x00);
|
||||
for (int i = 0x12; i <= 0x23; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// set PWM on all LEDs to 0
|
||||
for (uint8_t i = 0; i < IS31FL3731_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, IS31FL3731_FRAME_REG_PWM + i, 0x00);
|
||||
for (int i = 0x24; i <= 0xB3; i++) {
|
||||
is31fl3731_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FUNCTION);
|
||||
// select "function register" bank
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG);
|
||||
|
||||
// disable software shutdown
|
||||
is31fl3731_write_register(index, IS31FL3731_FUNCTION_REG_SHUTDOWN, 0x01);
|
||||
is31fl3731_write_register(addr, ISSI_REG_SHUTDOWN, 0x01);
|
||||
|
||||
// select page 0 and leave it selected.
|
||||
// most usage after initialization is just writing PWM buffers in page 0
|
||||
// select bank 0 and leave it selected.
|
||||
// most usage after initialization is just writing PWM buffers in bank 0
|
||||
// as there's not much point in double-buffering
|
||||
is31fl3731_select_page(index, IS31FL3731_COMMAND_FRAME_1);
|
||||
is31fl3731_write_register(addr, ISSI_COMMANDREGISTER, 0);
|
||||
}
|
||||
|
||||
void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue) {
|
||||
is31fl3731_led_t led;
|
||||
is31_led led;
|
||||
if (index >= 0 && index < RGB_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
if (index >= 0 && index < IS31FL3731_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.r] == red && driver_buffers[led.driver].pwm_buffer[led.g] == green && driver_buffers[led.driver].pwm_buffer[led.b] == blue) {
|
||||
// Subtract 0x24 to get the second index of g_pwm_buffer
|
||||
if (g_pwm_buffer[led.driver][led.r - 0x24] == red && g_pwm_buffer[led.driver][led.g - 0x24] == green && g_pwm_buffer[led.driver][led.b - 0x24] == blue) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.r] = red;
|
||||
driver_buffers[led.driver].pwm_buffer[led.g] = green;
|
||||
driver_buffers[led.driver].pwm_buffer[led.b] = blue;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
g_pwm_buffer[led.driver][led.r - 0x24] = red;
|
||||
g_pwm_buffer[led.driver][led.g - 0x24] = green;
|
||||
g_pwm_buffer[led.driver][led.b - 0x24] = blue;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue) {
|
||||
for (int i = 0; i < IS31FL3731_LED_COUNT; i++) {
|
||||
for (int i = 0; i < RGB_MATRIX_LED_COUNT; i++) {
|
||||
is31fl3731_set_color(i, red, green, blue);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bool blue) {
|
||||
is31fl3731_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3731_leds[index]), sizeof(led));
|
||||
is31_led led;
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register_r = led.r / 8;
|
||||
uint8_t control_register_g = led.g / 8;
|
||||
uint8_t control_register_b = led.b / 8;
|
||||
uint8_t bit_r = led.r % 8;
|
||||
uint8_t bit_g = led.g % 8;
|
||||
uint8_t bit_b = led.b % 8;
|
||||
uint8_t control_register_r = (led.r - 0x24) / 8;
|
||||
uint8_t control_register_g = (led.g - 0x24) / 8;
|
||||
uint8_t control_register_b = (led.b - 0x24) / 8;
|
||||
uint8_t bit_r = (led.r - 0x24) % 8;
|
||||
uint8_t bit_g = (led.g - 0x24) % 8;
|
||||
uint8_t bit_b = (led.b - 0x24) % 8;
|
||||
|
||||
if (red) {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_r] |= (1 << bit_r);
|
||||
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r);
|
||||
} else {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_r] &= ~(1 << bit_r);
|
||||
g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r);
|
||||
}
|
||||
if (green) {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_g] |= (1 << bit_g);
|
||||
g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g);
|
||||
} else {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_g] &= ~(1 << bit_g);
|
||||
g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g);
|
||||
}
|
||||
if (blue) {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_b] |= (1 << bit_b);
|
||||
g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b);
|
||||
} else {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register_b] &= ~(1 << bit_b);
|
||||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b);
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].led_control_buffer_dirty = true;
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void is31fl3731_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3731_write_pwm_buffer(index);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
is31fl3731_write_pwm_buffer(addr, g_pwm_buffer[index]);
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
|
||||
void is31fl3731_update_led_control_registers(uint8_t index) {
|
||||
if (driver_buffers[index].led_control_buffer_dirty) {
|
||||
for (uint8_t i = 0; i < IS31FL3731_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3731_write_register(index, i, driver_buffers[index].led_control_buffer[i]);
|
||||
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
for (int i = 0; i < 18; i++) {
|
||||
is31fl3731_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3731_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3731_DRIVER_COUNT; i++) {
|
||||
is31fl3731_update_pwm_buffers(i);
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
|
||||
@@ -19,96 +19,21 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
|
||||
#ifdef DRIVER_ADDR_1
|
||||
# define IS31FL3731_I2C_ADDRESS_1 DRIVER_ADDR_1
|
||||
#endif
|
||||
#ifdef DRIVER_ADDR_2
|
||||
# define IS31FL3731_I2C_ADDRESS_2 DRIVER_ADDR_2
|
||||
#endif
|
||||
#ifdef DRIVER_ADDR_3
|
||||
# define IS31FL3731_I2C_ADDRESS_3 DRIVER_ADDR_3
|
||||
#endif
|
||||
#ifdef DRIVER_ADDR_4
|
||||
# define IS31FL3731_I2C_ADDRESS_4 DRIVER_ADDR_4
|
||||
#endif
|
||||
#ifdef ISSI_TIMEOUT
|
||||
# define IS31FL3731_I2C_TIMEOUT ISSI_TIMEOUT
|
||||
#endif
|
||||
#ifdef ISSI_PERSISTENCE
|
||||
# define IS31FL3731_I2C_PERSISTENCE ISSI_PERSISTENCE
|
||||
#endif
|
||||
#ifdef ISSI_3731_DEGHOST
|
||||
# define IS31FL3731_DEGHOST ISSI_3731_DEGHOST
|
||||
#endif
|
||||
|
||||
#define is31_led is31fl3731_led_t
|
||||
#define g_is31_leds g_is31fl3731_leds
|
||||
// ========
|
||||
|
||||
#define IS31FL3731_REG_COMMAND 0xFD
|
||||
#define IS31FL3731_COMMAND_FRAME_1 0x00
|
||||
#define IS31FL3731_COMMAND_FRAME_2 0x01
|
||||
#define IS31FL3731_COMMAND_FRAME_3 0x02
|
||||
#define IS31FL3731_COMMAND_FRAME_4 0x03
|
||||
#define IS31FL3731_COMMAND_FRAME_5 0x04
|
||||
#define IS31FL3731_COMMAND_FRAME_6 0x05
|
||||
#define IS31FL3731_COMMAND_FRAME_7 0x06
|
||||
#define IS31FL3731_COMMAND_FRAME_8 0x07
|
||||
#define IS31FL3731_COMMAND_FUNCTION 0x0B
|
||||
|
||||
#define IS31FL3731_FRAME_REG_LED_CONTROL 0x00
|
||||
#define IS31FL3731_FRAME_REG_BLINK_CONTROL 0x12
|
||||
#define IS31FL3731_FRAME_REG_PWM 0x24
|
||||
|
||||
#define IS31FL3731_FUNCTION_REG_CONFIG 0x00
|
||||
#define IS31FL3731_CONFIG_MODE_PICTURE 0x00
|
||||
#define IS31FL3731_CONFIG_MODE_AUTO_PLAY 0x08
|
||||
#define IS31FL3731_CONFIG_MODE_AUDIO_PLAY 0x18
|
||||
|
||||
#define IS31FL3731_FUNCTION_REG_PICTURE_DISPLAY 0x01
|
||||
#define IS31FL3731_FUNCTION_REG_AUDIO_SYNC 0x06
|
||||
#define IS31FL3731_FUNCTION_REG_SHUTDOWN 0x0A
|
||||
|
||||
// Not defined in the datasheet -- See AN for IC
|
||||
#define IS31FL3731_FUNCTION_REG_GHOST_IMAGE_PREVENTION 0xC2
|
||||
#define IS31FL3731_GHOST_IMAGE_PREVENTION_GEN 0x10
|
||||
|
||||
#define IS31FL3731_I2C_ADDRESS_GND 0x74
|
||||
#define IS31FL3731_I2C_ADDRESS_SCL 0x75
|
||||
#define IS31FL3731_I2C_ADDRESS_SDA 0x76
|
||||
#define IS31FL3731_I2C_ADDRESS_VCC 0x77
|
||||
|
||||
#if defined(RGB_MATRIX_IS31FL3731)
|
||||
# define IS31FL3731_LED_COUNT RGB_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3731_I2C_ADDRESS_4)
|
||||
# define IS31FL3731_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_3)
|
||||
# define IS31FL3731_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_2)
|
||||
# define IS31FL3731_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3731_I2C_ADDRESS_1)
|
||||
# define IS31FL3731_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3731_led_t {
|
||||
typedef struct is31_led {
|
||||
uint8_t driver : 2;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
} PACKED is31fl3731_led_t;
|
||||
} __attribute__((packed)) is31_led;
|
||||
|
||||
extern const is31fl3731_led_t PROGMEM g_is31fl3731_leds[IS31FL3731_LED_COUNT];
|
||||
extern const is31_led PROGMEM g_is31_leds[RGB_MATRIX_LED_COUNT];
|
||||
|
||||
void is31fl3731_init_drivers(void);
|
||||
void is31fl3731_init(uint8_t index);
|
||||
void is31fl3731_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
void is31fl3731_select_page(uint8_t index, uint8_t page);
|
||||
void is31fl3731_init(uint8_t addr);
|
||||
void is31fl3731_write_register(uint8_t addr, uint8_t reg, uint8_t data);
|
||||
void is31fl3731_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer);
|
||||
|
||||
void is31fl3731_set_color(int index, uint8_t red, uint8_t green, uint8_t blue);
|
||||
void is31fl3731_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
@@ -119,169 +44,167 @@ void is31fl3731_set_led_control_register(uint8_t index, bool red, bool green, bo
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3731_update_pwm_buffers(uint8_t index);
|
||||
void is31fl3731_update_led_control_registers(uint8_t index);
|
||||
void is31fl3731_update_pwm_buffers(uint8_t addr, uint8_t index);
|
||||
void is31fl3731_update_led_control_registers(uint8_t addr, uint8_t index);
|
||||
|
||||
void is31fl3731_flush(void);
|
||||
#define C1_1 0x24
|
||||
#define C1_2 0x25
|
||||
#define C1_3 0x26
|
||||
#define C1_4 0x27
|
||||
#define C1_5 0x28
|
||||
#define C1_6 0x29
|
||||
#define C1_7 0x2A
|
||||
#define C1_8 0x2B
|
||||
|
||||
#define C1_1 0x00
|
||||
#define C1_2 0x01
|
||||
#define C1_3 0x02
|
||||
#define C1_4 0x03
|
||||
#define C1_5 0x04
|
||||
#define C1_6 0x05
|
||||
#define C1_7 0x06
|
||||
#define C1_8 0x07
|
||||
#define C1_9 0x2C
|
||||
#define C1_10 0x2D
|
||||
#define C1_11 0x2E
|
||||
#define C1_12 0x2F
|
||||
#define C1_13 0x30
|
||||
#define C1_14 0x31
|
||||
#define C1_15 0x32
|
||||
#define C1_16 0x33
|
||||
|
||||
#define C1_9 0x08
|
||||
#define C1_10 0x09
|
||||
#define C1_11 0x0A
|
||||
#define C1_12 0x0B
|
||||
#define C1_13 0x0C
|
||||
#define C1_14 0x0D
|
||||
#define C1_15 0x0E
|
||||
#define C1_16 0x0F
|
||||
#define C2_1 0x34
|
||||
#define C2_2 0x35
|
||||
#define C2_3 0x36
|
||||
#define C2_4 0x37
|
||||
#define C2_5 0x38
|
||||
#define C2_6 0x39
|
||||
#define C2_7 0x3A
|
||||
#define C2_8 0x3B
|
||||
|
||||
#define C2_1 0x10
|
||||
#define C2_2 0x11
|
||||
#define C2_3 0x12
|
||||
#define C2_4 0x13
|
||||
#define C2_5 0x14
|
||||
#define C2_6 0x15
|
||||
#define C2_7 0x16
|
||||
#define C2_8 0x17
|
||||
#define C2_9 0x3C
|
||||
#define C2_10 0x3D
|
||||
#define C2_11 0x3E
|
||||
#define C2_12 0x3F
|
||||
#define C2_13 0x40
|
||||
#define C2_14 0x41
|
||||
#define C2_15 0x42
|
||||
#define C2_16 0x43
|
||||
|
||||
#define C2_9 0x18
|
||||
#define C2_10 0x19
|
||||
#define C2_11 0x1A
|
||||
#define C2_12 0x1B
|
||||
#define C2_13 0x1C
|
||||
#define C2_14 0x1D
|
||||
#define C2_15 0x1E
|
||||
#define C2_16 0x1F
|
||||
#define C3_1 0x44
|
||||
#define C3_2 0x45
|
||||
#define C3_3 0x46
|
||||
#define C3_4 0x47
|
||||
#define C3_5 0x48
|
||||
#define C3_6 0x49
|
||||
#define C3_7 0x4A
|
||||
#define C3_8 0x4B
|
||||
|
||||
#define C3_1 0x20
|
||||
#define C3_2 0x21
|
||||
#define C3_3 0x22
|
||||
#define C3_4 0x23
|
||||
#define C3_5 0x24
|
||||
#define C3_6 0x25
|
||||
#define C3_7 0x26
|
||||
#define C3_8 0x27
|
||||
#define C3_9 0x4C
|
||||
#define C3_10 0x4D
|
||||
#define C3_11 0x4E
|
||||
#define C3_12 0x4F
|
||||
#define C3_13 0x50
|
||||
#define C3_14 0x51
|
||||
#define C3_15 0x52
|
||||
#define C3_16 0x53
|
||||
|
||||
#define C3_9 0x28
|
||||
#define C3_10 0x29
|
||||
#define C3_11 0x2A
|
||||
#define C3_12 0x2B
|
||||
#define C3_13 0x2C
|
||||
#define C3_14 0x2D
|
||||
#define C3_15 0x2E
|
||||
#define C3_16 0x2F
|
||||
#define C4_1 0x54
|
||||
#define C4_2 0x55
|
||||
#define C4_3 0x56
|
||||
#define C4_4 0x57
|
||||
#define C4_5 0x58
|
||||
#define C4_6 0x59
|
||||
#define C4_7 0x5A
|
||||
#define C4_8 0x5B
|
||||
|
||||
#define C4_1 0x30
|
||||
#define C4_2 0x31
|
||||
#define C4_3 0x32
|
||||
#define C4_4 0x33
|
||||
#define C4_5 0x34
|
||||
#define C4_6 0x35
|
||||
#define C4_7 0x36
|
||||
#define C4_8 0x37
|
||||
#define C4_9 0x5C
|
||||
#define C4_10 0x5D
|
||||
#define C4_11 0x5E
|
||||
#define C4_12 0x5F
|
||||
#define C4_13 0x60
|
||||
#define C4_14 0x61
|
||||
#define C4_15 0x62
|
||||
#define C4_16 0x63
|
||||
|
||||
#define C4_9 0x38
|
||||
#define C4_10 0x39
|
||||
#define C4_11 0x3A
|
||||
#define C4_12 0x3B
|
||||
#define C4_13 0x3C
|
||||
#define C4_14 0x3D
|
||||
#define C4_15 0x3E
|
||||
#define C4_16 0x3F
|
||||
#define C5_1 0x64
|
||||
#define C5_2 0x65
|
||||
#define C5_3 0x66
|
||||
#define C5_4 0x67
|
||||
#define C5_5 0x68
|
||||
#define C5_6 0x69
|
||||
#define C5_7 0x6A
|
||||
#define C5_8 0x6B
|
||||
|
||||
#define C5_1 0x40
|
||||
#define C5_2 0x41
|
||||
#define C5_3 0x42
|
||||
#define C5_4 0x43
|
||||
#define C5_5 0x44
|
||||
#define C5_6 0x45
|
||||
#define C5_7 0x46
|
||||
#define C5_8 0x47
|
||||
#define C5_9 0x6C
|
||||
#define C5_10 0x6D
|
||||
#define C5_11 0x6E
|
||||
#define C5_12 0x6F
|
||||
#define C5_13 0x70
|
||||
#define C5_14 0x71
|
||||
#define C5_15 0x72
|
||||
#define C5_16 0x73
|
||||
|
||||
#define C5_9 0x48
|
||||
#define C5_10 0x49
|
||||
#define C5_11 0x4A
|
||||
#define C5_12 0x4B
|
||||
#define C5_13 0x4C
|
||||
#define C5_14 0x4D
|
||||
#define C5_15 0x4E
|
||||
#define C5_16 0x4F
|
||||
#define C6_1 0x74
|
||||
#define C6_2 0x75
|
||||
#define C6_3 0x76
|
||||
#define C6_4 0x77
|
||||
#define C6_5 0x78
|
||||
#define C6_6 0x79
|
||||
#define C6_7 0x7A
|
||||
#define C6_8 0x7B
|
||||
|
||||
#define C6_1 0x50
|
||||
#define C6_2 0x51
|
||||
#define C6_3 0x52
|
||||
#define C6_4 0x53
|
||||
#define C6_5 0x54
|
||||
#define C6_6 0x55
|
||||
#define C6_7 0x56
|
||||
#define C6_8 0x57
|
||||
#define C6_9 0x7C
|
||||
#define C6_10 0x7D
|
||||
#define C6_11 0x7E
|
||||
#define C6_12 0x7F
|
||||
#define C6_13 0x80
|
||||
#define C6_14 0x81
|
||||
#define C6_15 0x82
|
||||
#define C6_16 0x83
|
||||
|
||||
#define C6_9 0x58
|
||||
#define C6_10 0x59
|
||||
#define C6_11 0x5A
|
||||
#define C6_12 0x5B
|
||||
#define C6_13 0x5C
|
||||
#define C6_14 0x5D
|
||||
#define C6_15 0x5E
|
||||
#define C6_16 0x5F
|
||||
#define C7_1 0x84
|
||||
#define C7_2 0x85
|
||||
#define C7_3 0x86
|
||||
#define C7_4 0x87
|
||||
#define C7_5 0x88
|
||||
#define C7_6 0x89
|
||||
#define C7_7 0x8A
|
||||
#define C7_8 0x8B
|
||||
|
||||
#define C7_1 0x60
|
||||
#define C7_2 0x61
|
||||
#define C7_3 0x62
|
||||
#define C7_4 0x63
|
||||
#define C7_5 0x64
|
||||
#define C7_6 0x65
|
||||
#define C7_7 0x66
|
||||
#define C7_8 0x67
|
||||
#define C7_9 0x8C
|
||||
#define C7_10 0x8D
|
||||
#define C7_11 0x8E
|
||||
#define C7_12 0x8F
|
||||
#define C7_13 0x90
|
||||
#define C7_14 0x91
|
||||
#define C7_15 0x92
|
||||
#define C7_16 0x93
|
||||
|
||||
#define C7_9 0x68
|
||||
#define C7_10 0x69
|
||||
#define C7_11 0x6A
|
||||
#define C7_12 0x6B
|
||||
#define C7_13 0x6C
|
||||
#define C7_14 0x6D
|
||||
#define C7_15 0x6E
|
||||
#define C7_16 0x6F
|
||||
#define C8_1 0x94
|
||||
#define C8_2 0x95
|
||||
#define C8_3 0x96
|
||||
#define C8_4 0x97
|
||||
#define C8_5 0x98
|
||||
#define C8_6 0x99
|
||||
#define C8_7 0x9A
|
||||
#define C8_8 0x9B
|
||||
|
||||
#define C8_1 0x70
|
||||
#define C8_2 0x71
|
||||
#define C8_3 0x72
|
||||
#define C8_4 0x73
|
||||
#define C8_5 0x74
|
||||
#define C8_6 0x75
|
||||
#define C8_7 0x76
|
||||
#define C8_8 0x77
|
||||
#define C8_9 0x9C
|
||||
#define C8_10 0x9D
|
||||
#define C8_11 0x9E
|
||||
#define C8_12 0x9F
|
||||
#define C8_13 0xA0
|
||||
#define C8_14 0xA1
|
||||
#define C8_15 0xA2
|
||||
#define C8_16 0xA3
|
||||
|
||||
#define C8_9 0x78
|
||||
#define C8_10 0x79
|
||||
#define C8_11 0x7A
|
||||
#define C8_12 0x7B
|
||||
#define C8_13 0x7C
|
||||
#define C8_14 0x7D
|
||||
#define C8_15 0x7E
|
||||
#define C8_16 0x7F
|
||||
#define C9_1 0xA4
|
||||
#define C9_2 0xA5
|
||||
#define C9_3 0xA6
|
||||
#define C9_4 0xA7
|
||||
#define C9_5 0xA8
|
||||
#define C9_6 0xA9
|
||||
#define C9_7 0xAA
|
||||
#define C9_8 0xAB
|
||||
|
||||
#define C9_1 0x80
|
||||
#define C9_2 0x81
|
||||
#define C9_3 0x82
|
||||
#define C9_4 0x83
|
||||
#define C9_5 0x84
|
||||
#define C9_6 0x85
|
||||
#define C9_7 0x86
|
||||
#define C9_8 0x87
|
||||
|
||||
#define C9_9 0x88
|
||||
#define C9_10 0x89
|
||||
#define C9_11 0x8A
|
||||
#define C9_12 0x8B
|
||||
#define C9_13 0x8C
|
||||
#define C9_14 0x8D
|
||||
#define C9_15 0x8E
|
||||
#define C9_16 0x8F
|
||||
#define C9_9 0xAC
|
||||
#define C9_10 0xAD
|
||||
#define C9_11 0xAE
|
||||
#define C9_12 0xAF
|
||||
#define C9_13 0xB0
|
||||
#define C9_14 0xB1
|
||||
#define C9_15 0xB2
|
||||
#define C9_16 0xB3
|
||||
|
||||
@@ -1,265 +0,0 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
* Copyright 2021 Doni Crosby
|
||||
* Copyright 2021 Leo Deng
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3733-mono.h"
|
||||
#include "i2c_master.h"
|
||||
#include "gpio.h"
|
||||
#include "wait.h"
|
||||
|
||||
#define IS31FL3733_PWM_REGISTER_COUNT 192
|
||||
#define IS31FL3733_LED_CONTROL_REGISTER_COUNT 24
|
||||
|
||||
#ifndef IS31FL3733_I2C_TIMEOUT
|
||||
# define IS31FL3733_I2C_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_I2C_PERSISTENCE
|
||||
# define IS31FL3733_I2C_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_PWM_FREQUENCY
|
||||
# define IS31FL3733_PWM_FREQUENCY IS31FL3733_PWM_FREQUENCY_8K4_HZ // PFS - IS31FL3733B only
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_SW_PULLUP
|
||||
# define IS31FL3733_SW_PULLUP IS31FL3733_PUR_0_OHM
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_CS_PULLDOWN
|
||||
# define IS31FL3733_CS_PULLDOWN IS31FL3733_PDR_0_OHM
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_GLOBAL_CURRENT
|
||||
# define IS31FL3733_GLOBAL_CURRENT 0xFF
|
||||
#endif
|
||||
|
||||
#ifndef IS31FL3733_SYNC_1
|
||||
# define IS31FL3733_SYNC_1 IS31FL3733_SYNC_NONE
|
||||
#endif
|
||||
#ifndef IS31FL3733_SYNC_2
|
||||
# define IS31FL3733_SYNC_2 IS31FL3733_SYNC_NONE
|
||||
#endif
|
||||
#ifndef IS31FL3733_SYNC_3
|
||||
# define IS31FL3733_SYNC_3 IS31FL3733_SYNC_NONE
|
||||
#endif
|
||||
#ifndef IS31FL3733_SYNC_4
|
||||
# define IS31FL3733_SYNC_4 IS31FL3733_SYNC_NONE
|
||||
#endif
|
||||
|
||||
const uint8_t i2c_addresses[IS31FL3733_DRIVER_COUNT] = {
|
||||
IS31FL3733_I2C_ADDRESS_1,
|
||||
#ifdef IS31FL3733_I2C_ADDRESS_2
|
||||
IS31FL3733_I2C_ADDRESS_2,
|
||||
# ifdef IS31FL3733_I2C_ADDRESS_3
|
||||
IS31FL3733_I2C_ADDRESS_3,
|
||||
# ifdef IS31FL3733_I2C_ADDRESS_4
|
||||
IS31FL3733_I2C_ADDRESS_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
const uint8_t driver_sync[IS31FL3733_DRIVER_COUNT] = {
|
||||
IS31FL3733_SYNC_1,
|
||||
#ifdef IS31FL3733_I2C_ADDRESS_2
|
||||
IS31FL3733_SYNC_2,
|
||||
# ifdef IS31FL3733_I2C_ADDRESS_3
|
||||
IS31FL3733_SYNC_3,
|
||||
# ifdef IS31FL3733_I2C_ADDRESS_4
|
||||
IS31FL3733_SYNC_4,
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
};
|
||||
|
||||
// These buffers match the IS31FL3733 PWM registers.
|
||||
// The control buffers match the page 0 LED On/Off registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
typedef struct is31fl3733_driver_t {
|
||||
uint8_t pwm_buffer[IS31FL3733_PWM_REGISTER_COUNT];
|
||||
bool pwm_buffer_dirty;
|
||||
uint8_t led_control_buffer[IS31FL3733_LED_CONTROL_REGISTER_COUNT];
|
||||
bool led_control_buffer_dirty;
|
||||
} PACKED is31fl3733_driver_t;
|
||||
|
||||
is31fl3733_driver_t driver_buffers[IS31FL3733_DRIVER_COUNT] = {{
|
||||
.pwm_buffer = {0},
|
||||
.pwm_buffer_dirty = false,
|
||||
.led_control_buffer = {0},
|
||||
.led_control_buffer_dirty = false,
|
||||
}};
|
||||
|
||||
void is31fl3733_write_register(uint8_t index, uint8_t reg, uint8_t data) {
|
||||
#if IS31FL3733_I2C_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < IS31FL3733_I2C_PERSISTENCE; i++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, reg, &data, 1, IS31FL3733_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
|
||||
void is31fl3733_select_page(uint8_t index, uint8_t page) {
|
||||
is31fl3733_write_register(index, IS31FL3733_REG_COMMAND_WRITE_LOCK, IS31FL3733_COMMAND_WRITE_LOCK_MAGIC);
|
||||
is31fl3733_write_register(index, IS31FL3733_REG_COMMAND, page);
|
||||
}
|
||||
|
||||
void is31fl3733_write_pwm_buffer(uint8_t index) {
|
||||
// Assumes page 1 is already selected.
|
||||
// Transmit PWM registers in 12 transfers of 16 bytes.
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (uint8_t i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i += 16) {
|
||||
#if IS31FL3733_I2C_PERSISTENCE > 0
|
||||
for (uint8_t j = 0; j < IS31FL3733_I2C_PERSISTENCE; j++) {
|
||||
if (i2c_write_register(i2c_addresses[index] << 1, i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3733_I2C_TIMEOUT) == I2C_STATUS_SUCCESS) break;
|
||||
}
|
||||
#else
|
||||
i2c_write_register(i2c_addresses[index] << 1, i, driver_buffers[index].pwm_buffer + i, 16, IS31FL3733_I2C_TIMEOUT);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_init_drivers(void) {
|
||||
i2c_init();
|
||||
|
||||
#if defined(IS31FL3733_SDB_PIN)
|
||||
gpio_set_pin_output(IS31FL3733_SDB_PIN);
|
||||
gpio_write_pin_high(IS31FL3733_SDB_PIN);
|
||||
#endif
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
is31fl3733_init(i);
|
||||
}
|
||||
|
||||
for (int i = 0; i < IS31FL3733_LED_COUNT; i++) {
|
||||
is31fl3733_set_led_control_register(i, true);
|
||||
}
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
is31fl3733_update_led_control_registers(i);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_init(uint8_t index) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
|
||||
is31fl3733_select_page(index, IS31FL3733_COMMAND_LED_CONTROL);
|
||||
|
||||
// Turn off all LEDs.
|
||||
for (uint8_t i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3733_write_register(index, i, 0x00);
|
||||
}
|
||||
|
||||
is31fl3733_select_page(index, IS31FL3733_COMMAND_PWM);
|
||||
|
||||
// Set PWM on all LEDs to 0
|
||||
// No need to setup Breath registers to PWM as that is the default.
|
||||
for (uint8_t i = 0; i < IS31FL3733_PWM_REGISTER_COUNT; i++) {
|
||||
is31fl3733_write_register(index, i, 0x00);
|
||||
}
|
||||
|
||||
is31fl3733_select_page(index, IS31FL3733_COMMAND_FUNCTION);
|
||||
|
||||
uint8_t sync = driver_sync[index];
|
||||
|
||||
// Set de-ghost pull-up resistors (SWx)
|
||||
is31fl3733_write_register(index, IS31FL3733_FUNCTION_REG_SW_PULLUP, IS31FL3733_SW_PULLUP);
|
||||
// Set de-ghost pull-down resistors (CSx)
|
||||
is31fl3733_write_register(index, IS31FL3733_FUNCTION_REG_CS_PULLDOWN, IS31FL3733_CS_PULLDOWN);
|
||||
// Set global current to maximum.
|
||||
is31fl3733_write_register(index, IS31FL3733_FUNCTION_REG_GLOBAL_CURRENT, IS31FL3733_GLOBAL_CURRENT);
|
||||
// Disable software shutdown.
|
||||
is31fl3733_write_register(index, IS31FL3733_FUNCTION_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((IS31FL3733_PWM_FREQUENCY & 0b111) << 3) | 0x01);
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
void is31fl3733_set_value(int index, uint8_t value) {
|
||||
is31fl3733_led_t led;
|
||||
|
||||
if (index >= 0 && index < IS31FL3733_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
|
||||
|
||||
if (driver_buffers[led.driver].pwm_buffer[led.v] == value) {
|
||||
return;
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].pwm_buffer[led.v] = value;
|
||||
driver_buffers[led.driver].pwm_buffer_dirty = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < IS31FL3733_LED_COUNT; i++) {
|
||||
is31fl3733_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_set_led_control_register(uint8_t index, bool value) {
|
||||
is31fl3733_led_t led;
|
||||
memcpy_P(&led, (&g_is31fl3733_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 8;
|
||||
uint8_t bit_value = led.v % 8;
|
||||
|
||||
if (value) {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
driver_buffers[led.driver].led_control_buffer[control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
driver_buffers[led.driver].led_control_buffer_dirty = true;
|
||||
}
|
||||
|
||||
void is31fl3733_update_pwm_buffers(uint8_t index) {
|
||||
if (driver_buffers[index].pwm_buffer_dirty) {
|
||||
is31fl3733_select_page(index, IS31FL3733_COMMAND_PWM);
|
||||
|
||||
is31fl3733_write_pwm_buffer(index);
|
||||
|
||||
driver_buffers[index].pwm_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_update_led_control_registers(uint8_t index) {
|
||||
if (driver_buffers[index].led_control_buffer_dirty) {
|
||||
is31fl3733_select_page(index, IS31FL3733_COMMAND_LED_CONTROL);
|
||||
|
||||
for (uint8_t i = 0; i < IS31FL3733_LED_CONTROL_REGISTER_COUNT; i++) {
|
||||
is31fl3733_write_register(index, i, driver_buffers[index].led_control_buffer[i]);
|
||||
}
|
||||
|
||||
driver_buffers[index].led_control_buffer_dirty = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_flush(void) {
|
||||
for (uint8_t i = 0; i < IS31FL3733_DRIVER_COUNT; i++) {
|
||||
is31fl3733_update_pwm_buffers(i);
|
||||
}
|
||||
}
|
||||
@@ -1,366 +0,0 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
* Copyright 2021 Doni Crosby
|
||||
* Copyright 2021 Leo Deng
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include "progmem.h"
|
||||
#include "util.h"
|
||||
|
||||
// ======== DEPRECATED DEFINES - DO NOT USE ========
|
||||
#ifdef ISSI_TIMEOUT
|
||||
# define IS31FL3733_I2C_TIMEOUT ISSI_TIMEOUT
|
||||
#endif
|
||||
#ifdef ISSI_PERSISTENCE
|
||||
# define IS31FL3733_I2C_PERSISTENCE ISSI_PERSISTENCE
|
||||
#endif
|
||||
#ifdef ISSI_PWM_FREQUENCY
|
||||
# define IS31FL3733_PWM_FREQUENCY ISSI_PWM_FREQUENCY
|
||||
#endif
|
||||
#ifdef ISSI_SWPULLUP
|
||||
# define IS31FL3733_SW_PULLUP ISSI_SWPULLUP
|
||||
#endif
|
||||
#ifdef ISSI_CSPULLUP
|
||||
# define IS31FL3733_CS_PULLDOWN ISSI_CSPULLUP
|
||||
#endif
|
||||
#ifdef ISSI_GLOBALCURRENT
|
||||
# define IS31FL3733_GLOBAL_CURRENT ISSI_GLOBALCURRENT
|
||||
#endif
|
||||
|
||||
#define is31_led is31fl3733_led_t
|
||||
#define g_is31_leds g_is31fl3733_leds
|
||||
|
||||
#define PUR_0R IS31FL3733_PUR_0_OHM
|
||||
#define PUR_05KR IS31FL3733_PUR_1K_OHM
|
||||
#define PUR_3KR IS31FL3733_PUR_2K_OHM
|
||||
#define PUR_4KR IS31FL3733_PUR_4K_OHM
|
||||
#define PUR_8KR IS31FL3733_PUR_8K_OHM
|
||||
#define PUR_16KR IS31FL3733_PUR_16K_OHM
|
||||
#define PUR_32KR IS31FL3733_PUR_32K_OHM
|
||||
// ========
|
||||
|
||||
#define IS31FL3733_REG_INTERRUPT_MASK 0xF0
|
||||
#define IS31FL3733_REG_INTERRUPT_STATUS 0xF1
|
||||
|
||||
#define IS31FL3733_REG_COMMAND 0xFD
|
||||
|
||||
#define IS31FL3733_COMMAND_LED_CONTROL 0x00
|
||||
#define IS31FL3733_COMMAND_PWM 0x01
|
||||
#define IS31FL3733_COMMAND_AUTO_BREATH 0x02
|
||||
#define IS31FL3733_COMMAND_FUNCTION 0x03
|
||||
|
||||
#define IS31FL3733_FUNCTION_REG_CONFIGURATION 0x00
|
||||
#define IS31FL3733_FUNCTION_REG_GLOBAL_CURRENT 0x01
|
||||
#define IS31FL3733_FUNCTION_REG_SW_PULLUP 0x0F
|
||||
#define IS31FL3733_FUNCTION_REG_CS_PULLDOWN 0x10
|
||||
#define IS31FL3733_FUNCTION_REG_RESET 0x11
|
||||
|
||||
#define IS31FL3733_REG_COMMAND_WRITE_LOCK 0xFE
|
||||
#define IS31FL3733_COMMAND_WRITE_LOCK_MAGIC 0xC5
|
||||
|
||||
#define IS31FL3733_I2C_ADDRESS_GND_GND 0x50
|
||||
#define IS31FL3733_I2C_ADDRESS_GND_SCL 0x51
|
||||
#define IS31FL3733_I2C_ADDRESS_GND_SDA 0x52
|
||||
#define IS31FL3733_I2C_ADDRESS_GND_VCC 0x53
|
||||
#define IS31FL3733_I2C_ADDRESS_SCL_GND 0x54
|
||||
#define IS31FL3733_I2C_ADDRESS_SCL_SCL 0x55
|
||||
#define IS31FL3733_I2C_ADDRESS_SCL_SDA 0x56
|
||||
#define IS31FL3733_I2C_ADDRESS_SCL_VCC 0x57
|
||||
#define IS31FL3733_I2C_ADDRESS_SDA_GND 0x58
|
||||
#define IS31FL3733_I2C_ADDRESS_SDA_SCL 0x59
|
||||
#define IS31FL3733_I2C_ADDRESS_SDA_SDA 0x5A
|
||||
#define IS31FL3733_I2C_ADDRESS_SDA_VCC 0x5B
|
||||
#define IS31FL3733_I2C_ADDRESS_VCC_GND 0x5C
|
||||
#define IS31FL3733_I2C_ADDRESS_VCC_SCL 0x5D
|
||||
#define IS31FL3733_I2C_ADDRESS_VCC_SDA 0x5E
|
||||
#define IS31FL3733_I2C_ADDRESS_VCC_VCC 0x5F
|
||||
|
||||
#if defined(LED_MATRIX_IS31FL3733)
|
||||
# define IS31FL3733_LED_COUNT LED_MATRIX_LED_COUNT
|
||||
#endif
|
||||
|
||||
#if defined(IS31FL3733_I2C_ADDRESS_4)
|
||||
# define IS31FL3733_DRIVER_COUNT 4
|
||||
#elif defined(IS31FL3733_I2C_ADDRESS_3)
|
||||
# define IS31FL3733_DRIVER_COUNT 3
|
||||
#elif defined(IS31FL3733_I2C_ADDRESS_2)
|
||||
# define IS31FL3733_DRIVER_COUNT 2
|
||||
#elif defined(IS31FL3733_I2C_ADDRESS_1)
|
||||
# define IS31FL3733_DRIVER_COUNT 1
|
||||
#endif
|
||||
|
||||
typedef struct is31fl3733_led_t {
|
||||
uint8_t driver : 2;
|
||||
uint8_t v;
|
||||
} PACKED is31fl3733_led_t;
|
||||
|
||||
extern const is31fl3733_led_t PROGMEM g_is31fl3733_leds[IS31FL3733_LED_COUNT];
|
||||
|
||||
void is31fl3733_init_drivers(void);
|
||||
void is31fl3733_init(uint8_t index);
|
||||
void is31fl3733_write_register(uint8_t index, uint8_t reg, uint8_t data);
|
||||
void is31fl3733_select_page(uint8_t index, uint8_t page);
|
||||
|
||||
void is31fl3733_set_value(int index, uint8_t value);
|
||||
void is31fl3733_set_value_all(uint8_t value);
|
||||
|
||||
void is31fl3733_set_led_control_register(uint8_t index, bool value);
|
||||
|
||||
// This should not be called from an interrupt
|
||||
// (eg. from a timer interrupt).
|
||||
// Call this while idle (in between matrix scans).
|
||||
// If the buffer is dirty, it will update the driver with the buffer.
|
||||
void is31fl3733_update_pwm_buffers(uint8_t index);
|
||||
void is31fl3733_update_led_control_registers(uint8_t index);
|
||||
|
||||
void is31fl3733_flush(void);
|
||||
|
||||
#define IS31FL3733_PDR_0_OHM 0b000 // No pull-down resistor
|
||||
#define IS31FL3733_PDR_0K5_OHM 0b001 // 0.5 kOhm resistor
|
||||
#define IS31FL3733_PDR_1K_OHM 0b010 // 1 kOhm resistor
|
||||
#define IS31FL3733_PDR_2K_OHM 0b011 // 2 kOhm resistor
|
||||
#define IS31FL3733_PDR_4K_OHM 0b100 // 4 kOhm resistor
|
||||
#define IS31FL3733_PDR_8K_OHM 0b101 // 8 kOhm resistor
|
||||
#define IS31FL3733_PDR_16K_OHM 0b110 // 16 kOhm resistor
|
||||
#define IS31FL3733_PDR_32K_OHM 0b111 // 32 kOhm resistor
|
||||
|
||||
#define IS31FL3733_PUR_0_OHM 0b000 // No pull-up resistor
|
||||
#define IS31FL3733_PUR_0K5_OHM 0b001 // 0.5 kOhm resistor
|
||||
#define IS31FL3733_PUR_1K_OHM 0b010 // 1 kOhm resistor
|
||||
#define IS31FL3733_PUR_2K_OHM 0b011 // 2 kOhm resistor
|
||||
#define IS31FL3733_PUR_4K_OHM 0b100 // 4 kOhm resistor
|
||||
#define IS31FL3733_PUR_8K_OHM 0b101 // 8 kOhm resistor
|
||||
#define IS31FL3733_PUR_16K_OHM 0b110 // 16 kOhm resistor
|
||||
#define IS31FL3733_PUR_32K_OHM 0b111 // 32 kOhm resistor
|
||||
|
||||
#define IS31FL3733_PWM_FREQUENCY_8K4_HZ 0b000
|
||||
#define IS31FL3733_PWM_FREQUENCY_4K2_HZ 0b001
|
||||
#define IS31FL3733_PWM_FREQUENCY_26K7_HZ 0b010
|
||||
#define IS31FL3733_PWM_FREQUENCY_2K1_HZ 0b011
|
||||
#define IS31FL3733_PWM_FREQUENCY_1K05_HZ 0b100
|
||||
|
||||
#define IS31FL3733_SYNC_NONE 0b00
|
||||
#define IS31FL3733_SYNC_MASTER 0b01
|
||||
#define IS31FL3733_SYNC_SLAVE 0b10
|
||||
|
||||
#define SW1_CS1 0x00
|
||||
#define SW1_CS2 0x01
|
||||
#define SW1_CS3 0x02
|
||||
#define SW1_CS4 0x03
|
||||
#define SW1_CS5 0x04
|
||||
#define SW1_CS6 0x05
|
||||
#define SW1_CS7 0x06
|
||||
#define SW1_CS8 0x07
|
||||
#define SW1_CS9 0x08
|
||||
#define SW1_CS10 0x09
|
||||
#define SW1_CS11 0x0A
|
||||
#define SW1_CS12 0x0B
|
||||
#define SW1_CS13 0x0C
|
||||
#define SW1_CS14 0x0D
|
||||
#define SW1_CS15 0x0E
|
||||
#define SW1_CS16 0x0F
|
||||
|
||||
#define SW2_CS1 0x10
|
||||
#define SW2_CS2 0x11
|
||||
#define SW2_CS3 0x12
|
||||
#define SW2_CS4 0x13
|
||||
#define SW2_CS5 0x14
|
||||
#define SW2_CS6 0x15
|
||||
#define SW2_CS7 0x16
|
||||
#define SW2_CS8 0x17
|
||||
#define SW2_CS9 0x18
|
||||
#define SW2_CS10 0x19
|
||||
#define SW2_CS11 0x1A
|
||||
#define SW2_CS12 0x1B
|
||||
#define SW2_CS13 0x1C
|
||||
#define SW2_CS14 0x1D
|
||||
#define SW2_CS15 0x1E
|
||||
#define SW2_CS16 0x1F
|
||||
|
||||
#define SW3_CS1 0x20
|
||||
#define SW3_CS2 0x21
|
||||
#define SW3_CS3 0x22
|
||||
#define SW3_CS4 0x23
|
||||
#define SW3_CS5 0x24
|
||||
#define SW3_CS6 0x25
|
||||
#define SW3_CS7 0x26
|
||||
#define SW3_CS8 0x27
|
||||
#define SW3_CS9 0x28
|
||||
#define SW3_CS10 0x29
|
||||
#define SW3_CS11 0x2A
|
||||
#define SW3_CS12 0x2B
|
||||
#define SW3_CS13 0x2C
|
||||
#define SW3_CS14 0x2D
|
||||
#define SW3_CS15 0x2E
|
||||
#define SW3_CS16 0x2F
|
||||
|
||||
#define SW4_CS1 0x30
|
||||
#define SW4_CS2 0x31
|
||||
#define SW4_CS3 0x32
|
||||
#define SW4_CS4 0x33
|
||||
#define SW4_CS5 0x34
|
||||
#define SW4_CS6 0x35
|
||||
#define SW4_CS7 0x36
|
||||
#define SW4_CS8 0x37
|
||||
#define SW4_CS9 0x38
|
||||
#define SW4_CS10 0x39
|
||||
#define SW4_CS11 0x3A
|
||||
#define SW4_CS12 0x3B
|
||||
#define SW4_CS13 0x3C
|
||||
#define SW4_CS14 0x3D
|
||||
#define SW4_CS15 0x3E
|
||||
#define SW4_CS16 0x3F
|
||||
|
||||
#define SW5_CS1 0x40
|
||||
#define SW5_CS2 0x41
|
||||
#define SW5_CS3 0x42
|
||||
#define SW5_CS4 0x43
|
||||
#define SW5_CS5 0x44
|
||||
#define SW5_CS6 0x45
|
||||
#define SW5_CS7 0x46
|
||||
#define SW5_CS8 0x47
|
||||
#define SW5_CS9 0x48
|
||||
#define SW5_CS10 0x49
|
||||
#define SW5_CS11 0x4A
|
||||
#define SW5_CS12 0x4B
|
||||
#define SW5_CS13 0x4C
|
||||
#define SW5_CS14 0x4D
|
||||
#define SW5_CS15 0x4E
|
||||
#define SW5_CS16 0x4F
|
||||
|
||||
#define SW6_CS1 0x50
|
||||
#define SW6_CS2 0x51
|
||||
#define SW6_CS3 0x52
|
||||
#define SW6_CS4 0x53
|
||||
#define SW6_CS5 0x54
|
||||
#define SW6_CS6 0x55
|
||||
#define SW6_CS7 0x56
|
||||
#define SW6_CS8 0x57
|
||||
#define SW6_CS9 0x58
|
||||
#define SW6_CS10 0x59
|
||||
#define SW6_CS11 0x5A
|
||||
#define SW6_CS12 0x5B
|
||||
#define SW6_CS13 0x5C
|
||||
#define SW6_CS14 0x5D
|
||||
#define SW6_CS15 0x5E
|
||||
#define SW6_CS16 0x5F
|
||||
|
||||
#define SW7_CS1 0x60
|
||||
#define SW7_CS2 0x61
|
||||
#define SW7_CS3 0x62
|
||||
#define SW7_CS4 0x63
|
||||
#define SW7_CS5 0x64
|
||||
#define SW7_CS6 0x65
|
||||
#define SW7_CS7 0x66
|
||||
#define SW7_CS8 0x67
|
||||
#define SW7_CS9 0x68
|
||||
#define SW7_CS10 0x69
|
||||
#define SW7_CS11 0x6A
|
||||
#define SW7_CS12 0x6B
|
||||
#define SW7_CS13 0x6C
|
||||
#define SW7_CS14 0x6D
|
||||
#define SW7_CS15 0x6E
|
||||
#define SW7_CS16 0x6F
|
||||
|
||||
#define SW8_CS1 0x70
|
||||
#define SW8_CS2 0x71
|
||||
#define SW8_CS3 0x72
|
||||
#define SW8_CS4 0x73
|
||||
#define SW8_CS5 0x74
|
||||
#define SW8_CS6 0x75
|
||||
#define SW8_CS7 0x76
|
||||
#define SW8_CS8 0x77
|
||||
#define SW8_CS9 0x78
|
||||
#define SW8_CS10 0x79
|
||||
#define SW8_CS11 0x7A
|
||||
#define SW8_CS12 0x7B
|
||||
#define SW8_CS13 0x7C
|
||||
#define SW8_CS14 0x7D
|
||||
#define SW8_CS15 0x7E
|
||||
#define SW8_CS16 0x7F
|
||||
|
||||
#define SW9_CS1 0x80
|
||||
#define SW9_CS2 0x81
|
||||
#define SW9_CS3 0x82
|
||||
#define SW9_CS4 0x83
|
||||
#define SW9_CS5 0x84
|
||||
#define SW9_CS6 0x85
|
||||
#define SW9_CS7 0x86
|
||||
#define SW9_CS8 0x87
|
||||
#define SW9_CS9 0x88
|
||||
#define SW9_CS10 0x89
|
||||
#define SW9_CS11 0x8A
|
||||
#define SW9_CS12 0x8B
|
||||
#define SW9_CS13 0x8C
|
||||
#define SW9_CS14 0x8D
|
||||
#define SW9_CS15 0x8E
|
||||
#define SW9_CS16 0x8F
|
||||
|
||||
#define SW10_CS1 0x90
|
||||
#define SW10_CS2 0x91
|
||||
#define SW10_CS3 0x92
|
||||
#define SW10_CS4 0x93
|
||||
#define SW10_CS5 0x94
|
||||
#define SW10_CS6 0x95
|
||||
#define SW10_CS7 0x96
|
||||
#define SW10_CS8 0x97
|
||||
#define SW10_CS9 0x98
|
||||
#define SW10_CS10 0x99
|
||||
#define SW10_CS11 0x9A
|
||||
#define SW10_CS12 0x9B
|
||||
#define SW10_CS13 0x9C
|
||||
#define SW10_CS14 0x9D
|
||||
#define SW10_CS15 0x9E
|
||||
#define SW10_CS16 0x9F
|
||||
|
||||
#define SW11_CS1 0xA0
|
||||
#define SW11_CS2 0xA1
|
||||
#define SW11_CS3 0xA2
|
||||
#define SW11_CS4 0xA3
|
||||
#define SW11_CS5 0xA4
|
||||
#define SW11_CS6 0xA5
|
||||
#define SW11_CS7 0xA6
|
||||
#define SW11_CS8 0xA7
|
||||
#define SW11_CS9 0xA8
|
||||
#define SW11_CS10 0xA9
|
||||
#define SW11_CS11 0xAA
|
||||
#define SW11_CS12 0xAB
|
||||
#define SW11_CS13 0xAC
|
||||
#define SW11_CS14 0xAD
|
||||
#define SW11_CS15 0xAE
|
||||
#define SW11_CS16 0xAF
|
||||
|
||||
#define SW12_CS1 0xB0
|
||||
#define SW12_CS2 0xB1
|
||||
#define SW12_CS3 0xB2
|
||||
#define SW12_CS4 0xB3
|
||||
#define SW12_CS5 0xB4
|
||||
#define SW12_CS6 0xB5
|
||||
#define SW12_CS7 0xB6
|
||||
#define SW12_CS8 0xB7
|
||||
#define SW12_CS9 0xB8
|
||||
#define SW12_CS10 0xB9
|
||||
#define SW12_CS11 0xBA
|
||||
#define SW12_CS12 0xBB
|
||||
#define SW12_CS13 0xBC
|
||||
#define SW12_CS14 0xBD
|
||||
#define SW12_CS15 0xBE
|
||||
#define SW12_CS16 0xBF
|
||||
255
drivers/led/issi/is31fl3733-simple.c
Normal file
255
drivers/led/issi/is31fl3733-simple.c
Normal file
@@ -0,0 +1,255 @@
|
||||
/* Copyright 2017 Jason Williams
|
||||
* Copyright 2018 Jack Humbert
|
||||
* Copyright 2018 Yiancar
|
||||
* Copyright 2021 Doni Crosby
|
||||
* Copyright 2021 Leo Deng
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "is31fl3733-simple.h"
|
||||
#include "i2c_master.h"
|
||||
#include "wait.h"
|
||||
|
||||
// This is a 7-bit address, that gets left-shifted and bit 0
|
||||
// set to 0 for write, 1 for read (as per I2C protocol)
|
||||
// The address will vary depending on your wiring:
|
||||
// 00 <-> GND
|
||||
// 01 <-> SCL
|
||||
// 10 <-> SDA
|
||||
// 11 <-> VCC
|
||||
// ADDR1 represents A1:A0 of the 7-bit address.
|
||||
// ADDR2 represents A3:A2 of the 7-bit address.
|
||||
// The result is: 0b101(ADDR2)(ADDR1)
|
||||
#define ISSI_ADDR_DEFAULT 0x50
|
||||
|
||||
#define ISSI_COMMANDREGISTER 0xFD
|
||||
#define ISSI_COMMANDREGISTER_WRITELOCK 0xFE
|
||||
#define ISSI_INTERRUPTMASKREGISTER 0xF0
|
||||
#define ISSI_INTERRUPTSTATUSREGISTER 0xF1
|
||||
|
||||
#define ISSI_PAGE_LEDCONTROL 0x00 // PG0
|
||||
#define ISSI_PAGE_PWM 0x01 // PG1
|
||||
#define ISSI_PAGE_AUTOBREATH 0x02 // PG2
|
||||
#define ISSI_PAGE_FUNCTION 0x03 // PG3
|
||||
|
||||
#define ISSI_REG_CONFIGURATION 0x00 // PG3
|
||||
#define ISSI_REG_GLOBALCURRENT 0x01 // PG3
|
||||
#define ISSI_REG_RESET 0x11 // PG3
|
||||
#define ISSI_REG_SWPULLUP 0x0F // PG3
|
||||
#define ISSI_REG_CSPULLUP 0x10 // PG3
|
||||
|
||||
#ifndef ISSI_TIMEOUT
|
||||
# define ISSI_TIMEOUT 100
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_PERSISTENCE
|
||||
# define ISSI_PERSISTENCE 0
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_PWM_FREQUENCY
|
||||
# define ISSI_PWM_FREQUENCY 0b000 // PFS - IS31FL3733B only
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_SWPULLUP
|
||||
# define ISSI_SWPULLUP PUR_0R
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_CSPULLUP
|
||||
# define ISSI_CSPULLUP PUR_0R
|
||||
#endif
|
||||
|
||||
#ifndef ISSI_GLOBALCURRENT
|
||||
# define ISSI_GLOBALCURRENT 0xFF
|
||||
#endif
|
||||
|
||||
// Transfer buffer for TWITransmitData()
|
||||
uint8_t g_twi_transfer_buffer[20];
|
||||
|
||||
// These buffers match the IS31FL3733 PWM registers.
|
||||
// The control buffers match the PG0 LED On/Off registers.
|
||||
// Storing them like this is optimal for I2C transfers to the registers.
|
||||
// We could optimize this and take out the unused registers from these
|
||||
// buffers and the transfers in is31fl3733_write_pwm_buffer() but it's
|
||||
// probably not worth the extra complexity.
|
||||
uint8_t g_pwm_buffer[LED_DRIVER_COUNT][192];
|
||||
bool g_pwm_buffer_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
/* There's probably a better way to init this... */
|
||||
#if LED_DRIVER_COUNT == 1
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}};
|
||||
#elif LED_DRIVER_COUNT == 2
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}};
|
||||
#elif LED_DRIVER_COUNT == 3
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}, {0}};
|
||||
#elif LED_DRIVER_COUNT == 4
|
||||
uint8_t g_led_control_registers[LED_DRIVER_COUNT][24] = {{0}, {0}, {0}, {0}};
|
||||
#endif
|
||||
bool g_led_control_registers_update_required[LED_DRIVER_COUNT] = {false};
|
||||
|
||||
bool is31fl3733_write_register(uint8_t addr, uint8_t reg, uint8_t data) {
|
||||
// If the transaction fails function returns false.
|
||||
g_twi_transfer_buffer[0] = reg;
|
||||
g_twi_transfer_buffer[1] = data;
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool is31fl3733_write_pwm_buffer(uint8_t addr, uint8_t *pwm_buffer) {
|
||||
// Assumes PG1 is already selected.
|
||||
// If any of the transactions fails function returns false.
|
||||
// Transmit PWM registers in 12 transfers of 16 bytes.
|
||||
// g_twi_transfer_buffer[] is 20 bytes
|
||||
|
||||
// Iterate over the pwm_buffer contents at 16 byte intervals.
|
||||
for (int i = 0; i < 192; i += 16) {
|
||||
g_twi_transfer_buffer[0] = i;
|
||||
// Copy the data from i to i+15.
|
||||
// Device will auto-increment register for data after the first byte
|
||||
// Thus this sets registers 0x00-0x0F, 0x10-0x1F, etc. in one transfer.
|
||||
memcpy(g_twi_transfer_buffer + 1, pwm_buffer + i, 16);
|
||||
|
||||
#if ISSI_PERSISTENCE > 0
|
||||
for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) {
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (i2c_transmit(addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void is31fl3733_init(uint8_t addr, uint8_t sync) {
|
||||
// In order to avoid the LEDs being driven with garbage data
|
||||
// in the LED driver's PWM registers, shutdown is enabled last.
|
||||
// Set up the mode and other settings, clear the PWM registers,
|
||||
// then disable software shutdown.
|
||||
// Sync is passed so set it according to the datasheet.
|
||||
|
||||
// Unlock the command register.
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
|
||||
// Select PG0
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||
// Turn off all LEDs.
|
||||
for (int i = 0x00; i <= 0x17; i++) {
|
||||
is31fl3733_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Unlock the command register.
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
|
||||
// Select PG1
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||
// Set PWM on all LEDs to 0
|
||||
// No need to setup Breath registers to PWM as that is the default.
|
||||
for (int i = 0x00; i <= 0xBF; i++) {
|
||||
is31fl3733_write_register(addr, i, 0x00);
|
||||
}
|
||||
|
||||
// Unlock the command register.
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
|
||||
// Select PG3
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_FUNCTION);
|
||||
// Set de-ghost pull-up resistors (SWx)
|
||||
is31fl3733_write_register(addr, ISSI_REG_SWPULLUP, ISSI_SWPULLUP);
|
||||
// Set de-ghost pull-down resistors (CSx)
|
||||
is31fl3733_write_register(addr, ISSI_REG_CSPULLUP, ISSI_CSPULLUP);
|
||||
// Set global current to maximum.
|
||||
is31fl3733_write_register(addr, ISSI_REG_GLOBALCURRENT, ISSI_GLOBALCURRENT);
|
||||
// Disable software shutdown.
|
||||
is31fl3733_write_register(addr, ISSI_REG_CONFIGURATION, ((sync & 0b11) << 6) | ((ISSI_PWM_FREQUENCY & 0b111) << 3) | 0x01);
|
||||
|
||||
// Wait 10ms to ensure the device has woken up.
|
||||
wait_ms(10);
|
||||
}
|
||||
|
||||
void is31fl3733_set_value(int index, uint8_t value) {
|
||||
is31_led led;
|
||||
if (index >= 0 && index < LED_MATRIX_LED_COUNT) {
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
if (g_pwm_buffer[led.driver][led.v] == value) {
|
||||
return;
|
||||
}
|
||||
g_pwm_buffer[led.driver][led.v] = value;
|
||||
g_pwm_buffer_update_required[led.driver] = true;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_set_value_all(uint8_t value) {
|
||||
for (int i = 0; i < LED_MATRIX_LED_COUNT; i++) {
|
||||
is31fl3733_set_value(i, value);
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_set_led_control_register(uint8_t index, bool value) {
|
||||
is31_led led;
|
||||
memcpy_P(&led, (&g_is31_leds[index]), sizeof(led));
|
||||
|
||||
uint8_t control_register = led.v / 8;
|
||||
uint8_t bit_value = led.v % 8;
|
||||
|
||||
if (value) {
|
||||
g_led_control_registers[led.driver][control_register] |= (1 << bit_value);
|
||||
} else {
|
||||
g_led_control_registers[led.driver][control_register] &= ~(1 << bit_value);
|
||||
}
|
||||
|
||||
g_led_control_registers_update_required[led.driver] = true;
|
||||
}
|
||||
|
||||
void is31fl3733_update_pwm_buffers(uint8_t addr, uint8_t index) {
|
||||
if (g_pwm_buffer_update_required[index]) {
|
||||
// Firstly we need to unlock the command register and select PG1.
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_PWM);
|
||||
|
||||
// If any of the transactions fail we risk writing dirty PG0,
|
||||
// refresh page 0 just in case.
|
||||
if (!is31fl3733_write_pwm_buffer(addr, g_pwm_buffer[index])) {
|
||||
g_led_control_registers_update_required[index] = true;
|
||||
}
|
||||
g_pwm_buffer_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
|
||||
void is31fl3733_update_led_control_registers(uint8_t addr, uint8_t index) {
|
||||
if (g_led_control_registers_update_required[index]) {
|
||||
// Firstly we need to unlock the command register and select PG0
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER_WRITELOCK, 0xC5);
|
||||
is31fl3733_write_register(addr, ISSI_COMMANDREGISTER, ISSI_PAGE_LEDCONTROL);
|
||||
for (int i = 0; i < 24; i++) {
|
||||
is31fl3733_write_register(addr, i, g_led_control_registers[index][i]);
|
||||
}
|
||||
g_led_control_registers_update_required[index] = false;
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user