mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-04-19 12:57:19 +00:00
Compare commits
1381 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
71cefbee82 | ||
![]() |
36e86af846 | ||
![]() |
4bdd77956f | ||
![]() |
4c04b93ea0 | ||
![]() |
4c71062cf1 | ||
![]() |
9dffb1ff22 | ||
![]() |
8a17fbbf8a | ||
![]() |
d5b8f83850 | ||
![]() |
5ef28aad33 | ||
![]() |
2f7505debb | ||
![]() |
5cc1fda908 | ||
![]() |
cc50dbf59f | ||
![]() |
38bd749f98 | ||
![]() |
945e06da9f | ||
![]() |
e3ae1e6abf | ||
![]() |
1ffd94a6bd | ||
![]() |
4584e907f9 | ||
![]() |
c25aa50cb2 | ||
![]() |
e5794ab6e1 | ||
![]() |
72e7fdcbed | ||
![]() |
1a92656d3f | ||
![]() |
1ebd9e29fe | ||
![]() |
7c7c65acc4 | ||
![]() |
74063e285f | ||
![]() |
31ca81e274 | ||
![]() |
f663d16cb6 | ||
![]() |
48884ee986 | ||
![]() |
9a59ede939 | ||
![]() |
c3a3222e4a | ||
![]() |
3eda5a4225 | ||
![]() |
bddbc3cb39 | ||
![]() |
ad85ba63d9 | ||
![]() |
001bc637df | ||
![]() |
1e85b3cd46 | ||
![]() |
1340ce19bb | ||
![]() |
7e5762d2ef | ||
![]() |
de60c0af49 | ||
![]() |
154a8ff638 | ||
![]() |
e815e31a5a | ||
![]() |
78a3b38829 | ||
![]() |
62154fb35b | ||
![]() |
70c262ebae | ||
![]() |
f1c588c5a4 | ||
![]() |
36f9256162 | ||
![]() |
b251756059 | ||
![]() |
7ced77a7a9 | ||
![]() |
0dce321aa5 | ||
![]() |
0c82612e8e | ||
![]() |
fea7be0700 | ||
![]() |
a67bcc3fc0 | ||
![]() |
12ec1a11b3 | ||
![]() |
113b6838f2 | ||
![]() |
c89d10dd90 | ||
![]() |
d8ee62ba7c | ||
![]() |
932805d3bd | ||
![]() |
9a3e9c03b8 | ||
![]() |
81d35626ae | ||
![]() |
52861a6a5d | ||
![]() |
5f29881e12 | ||
![]() |
355e1dbdda | ||
![]() |
a771438a08 | ||
![]() |
a52ed04f1e | ||
![]() |
769f283b3c | ||
![]() |
8b329dff77 | ||
![]() |
735b4a170b | ||
![]() |
e42b27f67a | ||
![]() |
31a1272c5e | ||
![]() |
22b9d894dc | ||
![]() |
b55efe007d | ||
![]() |
3047420676 | ||
![]() |
f61f0bdfa5 | ||
![]() |
0f64a3b0f4 | ||
![]() |
80a9ddb3ea | ||
![]() |
ff83c7717c | ||
![]() |
53bd328178 | ||
![]() |
52259a34a0 | ||
![]() |
707078560d | ||
![]() |
b44e8e4951 | ||
![]() |
1e0b85b3e4 | ||
![]() |
be3f934df0 | ||
![]() |
24c39a4b71 | ||
![]() |
37758b1b26 | ||
![]() |
be953b904a | ||
![]() |
b83276bca0 | ||
![]() |
f0506d185d | ||
![]() |
4809ac3915 | ||
![]() |
4d2aa8d8e0 | ||
![]() |
4b89d9ca52 | ||
![]() |
84ec6d125c | ||
![]() |
391401b3a3 | ||
![]() |
5cbb92d617 | ||
![]() |
e799a01bc5 | ||
![]() |
825f5c6da5 | ||
![]() |
08dd9c5004 | ||
![]() |
042fe05725 | ||
![]() |
7053024146 | ||
![]() |
4e16639794 | ||
![]() |
1f01ece609 | ||
![]() |
d6f3b52911 | ||
![]() |
962b01d91f | ||
![]() |
401a134658 | ||
![]() |
ca346e868f | ||
![]() |
e6eae8b391 | ||
![]() |
73c1539fda | ||
![]() |
be7eba0191 | ||
![]() |
472033446b | ||
![]() |
8b173815c9 | ||
![]() |
dada05951c | ||
![]() |
319e073e68 | ||
![]() |
1ffa7b8636 | ||
![]() |
31572ef9d0 | ||
![]() |
348852476d | ||
![]() |
2b083d376f | ||
![]() |
734f11d3d8 | ||
![]() |
4f8f01166c | ||
![]() |
0b30b075fa | ||
![]() |
c91b98ac30 | ||
![]() |
e1a063d8e1 | ||
![]() |
89ef57346a | ||
![]() |
20256b2953 | ||
![]() |
bbd96b256a | ||
![]() |
94ceaf2cf1 | ||
![]() |
23c7727504 | ||
![]() |
46956526b0 | ||
![]() |
830bf702bd | ||
![]() |
9107474603 | ||
![]() |
c4217a92e8 | ||
![]() |
57207c7119 | ||
![]() |
944f92e588 | ||
![]() |
b118e56245 | ||
![]() |
f175dc599a | ||
![]() |
d903bc905f | ||
![]() |
8a341fd09c | ||
![]() |
5c80f41fcf | ||
![]() |
1f471ad308 | ||
![]() |
a9d514b04c | ||
![]() |
cd34d8994f | ||
![]() |
6f402cb42d | ||
![]() |
27a0e7ce73 | ||
![]() |
13a211da4a | ||
![]() |
cd3fa42fc0 | ||
![]() |
e3bd3f6ac2 | ||
![]() |
983cf13fd0 | ||
![]() |
92f682c6bd | ||
![]() |
331c1d503d | ||
![]() |
646f8d91fe | ||
![]() |
1ea0752004 | ||
![]() |
83bdad83e5 | ||
![]() |
fba1331c3b | ||
![]() |
ee5df54676 | ||
![]() |
c088ddff8e | ||
![]() |
00df690a16 | ||
![]() |
de4c1875c3 | ||
![]() |
0e1d37c859 | ||
![]() |
13095042dc | ||
![]() |
6d594e3d53 | ||
![]() |
d2745abb44 | ||
![]() |
cc1d6d9458 | ||
![]() |
4fbb2417fa | ||
![]() |
07ecdcf1f2 | ||
![]() |
fcd99682b3 | ||
![]() |
e37ca4c318 | ||
![]() |
452c619e97 | ||
![]() |
b65bd46b41 | ||
![]() |
7dc3de34f8 | ||
![]() |
33f3c36915 | ||
![]() |
aa09f4bfd4 | ||
![]() |
909afcf2ba | ||
![]() |
3433efbb49 | ||
![]() |
bfe590741a | ||
![]() |
eff576efb8 | ||
![]() |
9254fac675 | ||
![]() |
ca6d521a0a | ||
![]() |
86d4511940 | ||
![]() |
8fc9ec7e17 | ||
![]() |
a6685c771f | ||
![]() |
7a3b8d0997 | ||
![]() |
c70dfe6d42 | ||
![]() |
182c8c670b | ||
![]() |
180cc84ea2 | ||
![]() |
660a8bb512 | ||
![]() |
82e4095dd4 | ||
![]() |
78ac4d95b4 | ||
![]() |
462491a5b2 | ||
![]() |
92bfd8a5cc | ||
![]() |
8b6cd9c058 | ||
![]() |
3e48c23052 | ||
![]() |
63288601e7 | ||
![]() |
c27c8b6d16 | ||
![]() |
e5b53ce6ae | ||
![]() |
b49f82a425 | ||
![]() |
75af4aed10 | ||
![]() |
577a7e7fb4 | ||
![]() |
99d9a0668e | ||
![]() |
66fe185bfe | ||
![]() |
2bbc2c53c1 | ||
![]() |
482cda6898 | ||
![]() |
4facdf0f54 | ||
![]() |
a5b91a2e5a | ||
![]() |
9458f6a66e | ||
![]() |
c6a6f54409 | ||
![]() |
f15b27c143 | ||
![]() |
2510a4304f | ||
![]() |
f0eda5018a | ||
![]() |
09dc8c947b | ||
![]() |
0c9151cf7a | ||
![]() |
0bf0a02bdf | ||
![]() |
eff65ce02b | ||
![]() |
9ba255807e | ||
![]() |
9b57bf6feb | ||
![]() |
1a08c2ca28 | ||
![]() |
4c61df0561 | ||
![]() |
0293661bde | ||
![]() |
0cdf250d0c | ||
![]() |
11e48603b6 | ||
![]() |
e641a244c5 | ||
![]() |
3e2f0a8f8f | ||
![]() |
3884b7b3f4 | ||
![]() |
6eed344aac | ||
![]() |
5487edb3fe | ||
![]() |
0c6afb21f1 | ||
![]() |
c8ac856bfd | ||
![]() |
fa55cf4d04 | ||
![]() |
a5d1eb8d69 | ||
![]() |
a6c5bed7e2 | ||
![]() |
d3edd9ea1f | ||
![]() |
796c365aff | ||
![]() |
fcd86faa78 | ||
![]() |
b4fc84b3b0 | ||
![]() |
5c4ca1f609 | ||
![]() |
ad657a0bbc | ||
![]() |
8d0ba7e6f7 | ||
![]() |
126113d1f0 | ||
![]() |
7dbf52734a | ||
![]() |
d09452e962 | ||
![]() |
3b9c2f23b3 | ||
![]() |
3168714bc3 | ||
![]() |
60a6a3d1d6 | ||
![]() |
4b6a00283a | ||
![]() |
fe5b42694c | ||
![]() |
6a819f58c7 | ||
![]() |
4d25e77ea6 | ||
![]() |
3f4e79a195 | ||
![]() |
053f1f91c8 | ||
![]() |
b9cff872f5 | ||
![]() |
408ab7af85 | ||
![]() |
80b21d46dd | ||
![]() |
5ad81ff774 | ||
![]() |
b5e413e150 | ||
![]() |
6abf99fdcd | ||
![]() |
916cae2b28 | ||
![]() |
94207cc323 | ||
![]() |
50f1068c7c | ||
![]() |
f27744b83b | ||
![]() |
9d51e974de | ||
![]() |
70738fb361 | ||
![]() |
a51b3d820a | ||
![]() |
fbc62ba97c | ||
![]() |
ded1d3e4a4 | ||
![]() |
006d4ffb3f | ||
![]() |
50817f057e | ||
![]() |
5dc9d48c7e | ||
![]() |
e1e2ff3833 | ||
![]() |
677e8cc1e7 | ||
![]() |
82a382ad57 | ||
![]() |
ce99b815b9 | ||
![]() |
ff6a8846ce | ||
![]() |
4523f134ce | ||
![]() |
080b41e036 | ||
![]() |
11f695aff7 | ||
![]() |
510565ca51 | ||
![]() |
d9ee633c92 | ||
![]() |
cf5c02d487 | ||
![]() |
e37d38e399 | ||
![]() |
02715644bb | ||
![]() |
d9d4d8d0c9 | ||
![]() |
ac6796b19d | ||
![]() |
837061b380 | ||
![]() |
d3b5658385 | ||
![]() |
25a73b4255 | ||
![]() |
a3c2e9723b | ||
![]() |
2fe7bcc1a2 | ||
![]() |
6a8bbce6ec | ||
![]() |
d71473a4e7 | ||
![]() |
baa125d4b6 | ||
![]() |
37e66cdf5b | ||
![]() |
55f39f02d0 | ||
![]() |
b0969892fd | ||
![]() |
9b3c88492c | ||
![]() |
d77428db54 | ||
![]() |
d0d2bc1940 | ||
![]() |
e974a42d41 | ||
![]() |
e93597a881 | ||
![]() |
32c21b9c52 | ||
![]() |
3fcae65fad | ||
![]() |
3cb5eb2d58 | ||
![]() |
603d38ae3c | ||
![]() |
4fff3d79c5 | ||
![]() |
2738bff96a | ||
![]() |
f1f2f51ba4 | ||
![]() |
c01e4a799e | ||
![]() |
de0aeab435 | ||
![]() |
6bfe89cac0 | ||
![]() |
4c20d6a4b9 | ||
![]() |
a0c8fd49d4 | ||
![]() |
226a88f3df | ||
![]() |
da9b034289 | ||
![]() |
a7d900ed7b | ||
![]() |
f36dd66a05 | ||
![]() |
ed6b17cfd7 | ||
![]() |
f4f5ae0f0d | ||
![]() |
18a3f0bb7f | ||
![]() |
9693ef361a | ||
![]() |
fdc5f9170a | ||
![]() |
1a5921080f | ||
![]() |
109f00368e | ||
![]() |
1043f5ddd7 | ||
![]() |
7d804f8eab | ||
![]() |
2038cce050 | ||
![]() |
91b347c8d1 | ||
![]() |
b85542c9ad | ||
![]() |
ac5fe4a424 | ||
![]() |
ce11627308 | ||
![]() |
af6576b402 | ||
![]() |
28152302b1 | ||
![]() |
775a269879 | ||
![]() |
51f35e7d36 | ||
![]() |
e922042a3d | ||
![]() |
a884fbf705 | ||
![]() |
d0e383e398 | ||
![]() |
cb1d860635 | ||
![]() |
0e87f52c1f | ||
![]() |
b9a435f0a4 | ||
![]() |
62f567773d | ||
![]() |
96bfbf397b | ||
![]() |
b738c22c67 | ||
![]() |
76b9be4d97 | ||
![]() |
9b3bbcc107 | ||
![]() |
a2d97204f8 | ||
![]() |
246f5e3ac2 | ||
![]() |
a7b558eb33 | ||
![]() |
b1716fbca1 | ||
![]() |
1364795f98 | ||
![]() |
71c20b88d6 | ||
![]() |
9a97c35df1 | ||
![]() |
fb2bebf14e | ||
![]() |
e95b916157 | ||
![]() |
71b1e5db40 | ||
![]() |
91faf61474 | ||
![]() |
54ca24405b | ||
![]() |
c190cf94b5 | ||
![]() |
1cb1448e98 | ||
![]() |
889682d49b | ||
![]() |
8436bb6493 | ||
![]() |
03cd25edd2 | ||
![]() |
6bfdcd47a1 | ||
![]() |
2dce5da766 | ||
![]() |
db7c9ddf7b | ||
![]() |
c200edf823 | ||
![]() |
79f8ed0c33 | ||
![]() |
a57029c974 | ||
![]() |
bc627f0d7b | ||
![]() |
0218736d1d | ||
![]() |
cca34e65f8 | ||
![]() |
c411f2c3b0 | ||
![]() |
a0ed65c4ce | ||
![]() |
ab4664b4b8 | ||
![]() |
a5e348e499 | ||
![]() |
8d5ae794a1 | ||
![]() |
c5eedb9b18 | ||
![]() |
9864ae7a87 | ||
![]() |
7af48cff37 | ||
![]() |
8b3451a134 | ||
![]() |
e756b4b4e2 | ||
![]() |
0ebfe7dcef | ||
![]() |
4de8f4953e | ||
![]() |
33d21e0675 | ||
![]() |
62b858fc03 | ||
![]() |
982ec0bfa6 | ||
![]() |
87e25de617 | ||
![]() |
6aac73484f | ||
![]() |
0e4fd945b2 | ||
![]() |
20830101d2 | ||
![]() |
c7b7cd4f6a | ||
![]() |
b994f41a07 | ||
![]() |
a6ba5fdd7c | ||
![]() |
a6b660fb93 | ||
![]() |
d87f0f9eb2 | ||
![]() |
3bb6b0b56c | ||
![]() |
9a27448372 | ||
![]() |
9f661511e2 | ||
![]() |
132a074ea3 | ||
![]() |
646f21e76e | ||
![]() |
472a5629a2 | ||
![]() |
a81a4879ca | ||
![]() |
86c7190660 | ||
![]() |
27ccdef806 | ||
![]() |
b2d914f562 | ||
![]() |
a256ae4ca5 | ||
![]() |
745b415714 | ||
![]() |
10f1ac0c91 | ||
![]() |
099d75f7e0 | ||
![]() |
4714f2fe2e | ||
![]() |
ae58e7edf9 | ||
![]() |
2c94573edb | ||
![]() |
3789d446bd | ||
![]() |
45dd1ed438 | ||
![]() |
031c35d442 | ||
![]() |
58970f485e | ||
![]() |
894370b4cc | ||
![]() |
e092b72a6b | ||
![]() |
e5e291c104 | ||
![]() |
b7283c9498 | ||
![]() |
8d8fc0e976 | ||
![]() |
2228ca04cd | ||
![]() |
f32d78ee24 | ||
![]() |
3fe34e17df | ||
![]() |
a6cbcadffb | ||
![]() |
6cf4262f23 | ||
![]() |
9428da59e9 | ||
![]() |
cfaf1496dd | ||
![]() |
0af0a775f5 | ||
![]() |
1b24478692 | ||
![]() |
ad0f69f68e | ||
![]() |
af9cf97a24 | ||
![]() |
4004188079 | ||
![]() |
cabfce64c8 | ||
![]() |
f28627c14d | ||
![]() |
cedb130b75 | ||
![]() |
da1305df76 | ||
![]() |
c053421d58 | ||
![]() |
febd01043a | ||
![]() |
50308777cb | ||
![]() |
9d15258e96 | ||
![]() |
c3e9fe14a4 | ||
![]() |
16ae10255c | ||
![]() |
96d0732b68 | ||
![]() |
e1371899bf | ||
![]() |
b7578182e6 | ||
![]() |
f326f48cd0 | ||
![]() |
e2910604a2 | ||
![]() |
dcb167c07e | ||
![]() |
1e5a281b22 | ||
![]() |
c5ce7c6a9f | ||
![]() |
71237c2702 | ||
![]() |
4ae1e665a1 | ||
![]() |
5aceb04a26 | ||
![]() |
47e9760500 | ||
![]() |
0e0168487d | ||
![]() |
a4d6984797 | ||
![]() |
fff79aabab | ||
![]() |
7cd9c9496c | ||
![]() |
d7793049bd | ||
![]() |
0a2feee6ed | ||
![]() |
80e29daa65 | ||
![]() |
49e1b83aae | ||
![]() |
da39d2b37a | ||
![]() |
06131f4171 | ||
![]() |
a3e2f8dbbb | ||
![]() |
e7f57e2405 | ||
![]() |
598bfb06ca | ||
![]() |
97c4f7550d | ||
![]() |
c0edb143c3 | ||
![]() |
a6719d0f35 | ||
![]() |
9c7ab21f62 | ||
![]() |
5869f88f75 | ||
![]() |
5b436b6159 | ||
![]() |
74d0f5b193 | ||
![]() |
1b56f3de0b | ||
![]() |
19ed33433e | ||
![]() |
964184d4c4 | ||
![]() |
4142adafab | ||
![]() |
146c94063b | ||
![]() |
9c3e28f654 | ||
![]() |
4d6860ff43 | ||
![]() |
37b3e488a4 | ||
![]() |
7625d688be | ||
![]() |
124a979569 | ||
![]() |
7682eea7b0 | ||
![]() |
4e5114a01b | ||
![]() |
2f4092b39e | ||
![]() |
2e5324192b | ||
![]() |
dbe3d7e5fb | ||
![]() |
ed56d9ee42 | ||
![]() |
a790679466 | ||
![]() |
8c8a7eb717 | ||
![]() |
8c51550685 | ||
![]() |
652d0e0223 | ||
![]() |
46a8f6e3b9 | ||
![]() |
5511d5864b | ||
![]() |
9b24d43aa3 | ||
![]() |
1d35530cbe | ||
![]() |
b7be2adaba | ||
![]() |
081cb69b60 | ||
![]() |
608e2efe6a | ||
![]() |
35068e39cb | ||
![]() |
5d9fecceaa | ||
![]() |
b18b72b90d | ||
![]() |
76a0d54e96 | ||
![]() |
c1fa5a8cb1 | ||
![]() |
ac3a385c04 | ||
![]() |
5b3f9f0d8c | ||
![]() |
bc407b3613 | ||
![]() |
7c35ef778d | ||
![]() |
7b10553a5e | ||
![]() |
012d6afa6c | ||
![]() |
70b4672733 | ||
![]() |
579d24361a | ||
![]() |
6fd20bae3b | ||
![]() |
a1b514eac9 | ||
![]() |
f91e2b1d5c | ||
![]() |
a3bcd82a17 | ||
![]() |
5d505a630c | ||
![]() |
14d5c7ace5 | ||
![]() |
2bf8ebfb56 | ||
![]() |
5c08b2a567 | ||
![]() |
17b13e35d5 | ||
![]() |
dcc33c5955 | ||
![]() |
9dfe882e61 | ||
![]() |
fd6a689ec5 | ||
![]() |
96eb4f7e88 | ||
![]() |
c9b6e2e67f | ||
![]() |
c38f2467b0 | ||
![]() |
c1d17825e4 | ||
![]() |
e07958b631 | ||
![]() |
f805b90b9d | ||
![]() |
2b34d3d924 | ||
![]() |
65fdbdb738 | ||
![]() |
7a6e526aa5 | ||
![]() |
55152291d1 | ||
![]() |
dd0c862aad | ||
![]() |
c47a1b9b5d | ||
![]() |
83fe5474f4 | ||
![]() |
15c9858d37 | ||
![]() |
23eadbb1eb | ||
![]() |
e8de162d8c | ||
![]() |
24e27ac3f3 | ||
![]() |
38b316a375 | ||
![]() |
37ea5da35b | ||
![]() |
4cfd34a866 | ||
![]() |
8be5599d88 | ||
![]() |
38679100d5 | ||
![]() |
23cb1e03e5 | ||
![]() |
1a5a3fc966 | ||
![]() |
d8b5e4537c | ||
![]() |
8c5bd749f3 | ||
![]() |
d3ab954f25 | ||
![]() |
346e4f93f9 | ||
![]() |
dd076ec34a | ||
![]() |
115f11da70 | ||
![]() |
6b9b66bc35 | ||
![]() |
0ae9bd02f6 | ||
![]() |
0f50710708 | ||
![]() |
57f03e1f34 | ||
![]() |
4d4b9bd988 | ||
![]() |
2363732a77 | ||
![]() |
6bb74b6321 | ||
![]() |
28177bd846 | ||
![]() |
958ff1b659 | ||
![]() |
0e1241ccf9 | ||
![]() |
850bcd357d | ||
![]() |
6181837cb4 | ||
![]() |
75f61affe3 | ||
![]() |
894a6657d7 | ||
![]() |
6ccd10dbe0 | ||
![]() |
af24bedf6d | ||
![]() |
86321beb5d | ||
![]() |
aee55907e4 | ||
![]() |
baa37d0364 | ||
![]() |
aaf535c185 | ||
![]() |
646ad3d8ca | ||
![]() |
82482c7c6e | ||
![]() |
f76dee8c88 | ||
![]() |
a99cc4ec53 | ||
![]() |
8148bbc988 | ||
![]() |
75997bcde8 | ||
![]() |
3855d32713 | ||
![]() |
fe29aafd5b | ||
![]() |
871a795210 | ||
![]() |
3436cb614d | ||
![]() |
97025a0e57 | ||
![]() |
08c465eee5 | ||
![]() |
353d33a54d | ||
![]() |
66a7d1a394 | ||
![]() |
6f4bde6556 | ||
![]() |
b74066253c | ||
![]() |
a154bb856f | ||
![]() |
04daca44d4 | ||
![]() |
bba7eddd2b | ||
![]() |
34149b875a | ||
![]() |
8460286641 | ||
![]() |
ed596fe72e | ||
![]() |
e1d78f7c1b | ||
![]() |
d07f7cb83e | ||
![]() |
516b42a7e8 | ||
![]() |
7f9dc100bd | ||
![]() |
538ca64209 | ||
![]() |
3ab88a3485 | ||
![]() |
c7b8b847ad | ||
![]() |
93529509d6 | ||
![]() |
3e6c9a67ce | ||
![]() |
e20e9fe500 | ||
![]() |
a5ef4c78b6 | ||
![]() |
e783544a9c | ||
![]() |
50e06d23d3 | ||
![]() |
eac43ff003 | ||
![]() |
ac17ec87ff | ||
![]() |
df4714cfe5 | ||
![]() |
83d2ab0ad6 | ||
![]() |
0b6a2ff0de | ||
![]() |
0e16eeb9e1 | ||
![]() |
265f9c42a9 | ||
![]() |
f58b1682be | ||
![]() |
871716f72b | ||
![]() |
31de835f4f | ||
![]() |
d41d22024f | ||
![]() |
3ad815cd5d | ||
![]() |
92b360a7ad | ||
![]() |
f309e7cc25 | ||
![]() |
b2a3e7425a | ||
![]() |
6f089d9145 | ||
![]() |
6e21425fa8 | ||
![]() |
ed9ece22a4 | ||
![]() |
de91d0d610 | ||
![]() |
2800795207 | ||
![]() |
87ce17aec7 | ||
![]() |
db24ab0075 | ||
![]() |
425e134823 | ||
![]() |
4d93dbdabf | ||
![]() |
43f36422d6 | ||
![]() |
42cd5f91e2 | ||
![]() |
43e0ff9270 | ||
![]() |
95d50ff971 | ||
![]() |
dd1f7b290b | ||
![]() |
53ae3e5fc8 | ||
![]() |
8e8c0c03a9 | ||
![]() |
93409caa69 | ||
![]() |
2f92ba4c59 | ||
![]() |
60088f7a77 | ||
![]() |
87768f3040 | ||
![]() |
46e9e97132 | ||
![]() |
c296a5e568 | ||
![]() |
59bc01be04 | ||
![]() |
912a69ad31 | ||
![]() |
08367a06fa | ||
![]() |
94642560ed | ||
![]() |
cf03790d42 | ||
![]() |
303cd45a11 | ||
![]() |
8bd001ccb0 | ||
![]() |
187ad58dc5 | ||
![]() |
4e681edcaf | ||
![]() |
62999284b2 | ||
![]() |
634c89a386 | ||
![]() |
1b9135e355 | ||
![]() |
6745c38773 | ||
![]() |
f372fa542c | ||
![]() |
ff23d19f08 | ||
![]() |
aa1f4e7642 | ||
![]() |
16c900d5e4 | ||
![]() |
7934c47509 | ||
![]() |
f842a744e4 | ||
![]() |
aaa94d263d | ||
![]() |
bc53a6fab9 | ||
![]() |
321407238d | ||
![]() |
7c0bc16629 | ||
![]() |
ac67dc65a2 | ||
![]() |
a585b969b8 | ||
![]() |
de4432ce20 | ||
![]() |
d664693407 | ||
![]() |
972ed6583f | ||
![]() |
e379d9276f | ||
![]() |
6b05d87b00 | ||
![]() |
b6b3cb26da | ||
![]() |
27f3de640c | ||
![]() |
89753608d7 | ||
![]() |
434563b5eb | ||
![]() |
eca33d0d84 | ||
![]() |
0362cdc1ce | ||
![]() |
a6cf4060d6 | ||
![]() |
e2670ab702 | ||
![]() |
29fbb358dd | ||
![]() |
81b20df787 | ||
![]() |
d4339cd1a4 | ||
![]() |
fa61cfdaf1 | ||
![]() |
5f376e2344 | ||
![]() |
445446111b | ||
![]() |
e22d1e14a8 | ||
![]() |
a4f1fdde83 | ||
![]() |
7a83367ee5 | ||
![]() |
1e517c3b24 | ||
![]() |
b3a641db15 | ||
![]() |
d5337fe147 | ||
![]() |
f542195dd6 | ||
![]() |
ec4b54f05f | ||
![]() |
116877099b | ||
![]() |
d6c5f64143 | ||
![]() |
38d308a07b | ||
![]() |
be7d8050b1 | ||
![]() |
7deb879ffd | ||
![]() |
6fba529ab5 | ||
![]() |
eaa9d34a1a | ||
![]() |
0dd8e3dc2b | ||
![]() |
596c798f3a | ||
![]() |
6451c37d01 | ||
![]() |
78629de89b | ||
![]() |
b3230fcd4c | ||
![]() |
d4e8b7e6d0 | ||
![]() |
f4ffe49d14 | ||
![]() |
401a2b4af2 | ||
![]() |
2c62575d9c | ||
![]() |
b26ea27108 | ||
![]() |
dd9c84fcc5 | ||
![]() |
8209625f1e | ||
![]() |
b0ba6a7f2b | ||
![]() |
4c0e733827 | ||
![]() |
7c10f4a655 | ||
![]() |
6e306ec396 | ||
![]() |
c52d69b4fa | ||
![]() |
11f8d7a44f | ||
![]() |
fd91ac5824 | ||
![]() |
91ee270071 | ||
![]() |
3a5190cf7b | ||
![]() |
9ca4f8a93f | ||
![]() |
e2d448fb46 | ||
![]() |
d93e9200c7 | ||
![]() |
b2f74d9780 | ||
![]() |
ca6a59ae2c | ||
![]() |
da2c975d39 | ||
![]() |
64e6b13a4f | ||
![]() |
30df6857b1 | ||
![]() |
d0da272abb | ||
![]() |
56aba9b986 | ||
![]() |
95b28eb222 | ||
![]() |
867a4c338a | ||
![]() |
ab93f3abf2 | ||
![]() |
7229ce27e7 | ||
![]() |
81c595c80b | ||
![]() |
5b8a761d35 | ||
![]() |
2870c09207 | ||
![]() |
93bc59882c | ||
![]() |
5ea9e1c373 | ||
![]() |
8ec8de6980 | ||
![]() |
560d491f71 | ||
![]() |
eff199ed38 | ||
![]() |
ef23d054e0 | ||
![]() |
ad28bbfc09 | ||
![]() |
3bdf6b872d | ||
![]() |
08e1799219 | ||
![]() |
42d179c0be | ||
![]() |
e30a572dcb | ||
![]() |
e78abd362f | ||
![]() |
b401ae7dee | ||
![]() |
964c34e75d | ||
![]() |
fdf5053174 | ||
![]() |
26092259cc | ||
![]() |
24b92322bc | ||
![]() |
50565fb349 | ||
![]() |
d2342377fb | ||
![]() |
3652655bcb | ||
![]() |
41ac2e1443 | ||
![]() |
bdceca3241 | ||
![]() |
730517d68e | ||
![]() |
23ba8c8b3b | ||
![]() |
0d9fa57f39 | ||
![]() |
2654ccc9d8 | ||
![]() |
a92860b4cd | ||
![]() |
6dfe25a176 | ||
![]() |
bbf6432606 | ||
![]() |
65ceea7062 | ||
![]() |
18a76a0024 | ||
![]() |
27207d337a | ||
![]() |
9409987c01 | ||
![]() |
0b02653a31 | ||
![]() |
b449186aba | ||
![]() |
ec0000039e | ||
![]() |
63bec8f120 | ||
![]() |
4bc2cd5e24 | ||
![]() |
e9ef961ef8 | ||
![]() |
720b3cd81f | ||
![]() |
ab28e00fb9 | ||
![]() |
9099a86882 | ||
![]() |
8ee02425a3 | ||
![]() |
4d513c2209 | ||
![]() |
78b8666787 | ||
![]() |
9e1742cb1a | ||
![]() |
988514970c | ||
![]() |
79303a450b | ||
![]() |
2ea173fa75 | ||
![]() |
1410aa382b | ||
![]() |
cb47cf8e59 | ||
![]() |
97464c9969 | ||
![]() |
3c55479f56 | ||
![]() |
4935332235 | ||
![]() |
72224ebd79 | ||
![]() |
2fd75af555 | ||
![]() |
7aa7fbbbe8 | ||
![]() |
ac7e0d6c8d | ||
![]() |
15b33e57b4 | ||
![]() |
97308367bf | ||
![]() |
dae78c1996 | ||
![]() |
3ba3fedc66 | ||
![]() |
290b2da8b6 | ||
![]() |
d54faed147 | ||
![]() |
0afaf994f3 | ||
![]() |
e973fe2b16 | ||
![]() |
0b5eb9bb41 | ||
![]() |
a664e5379e | ||
![]() |
8454b137ac | ||
![]() |
47c45eb46c | ||
![]() |
f6eb92443a | ||
![]() |
8490240f7f | ||
![]() |
b4a973dda5 | ||
![]() |
c02d039e18 | ||
![]() |
e28a1965e4 | ||
![]() |
d0ab4d7e96 | ||
![]() |
22d4360a2f | ||
![]() |
7e1e04ec71 | ||
![]() |
1e93d22833 | ||
![]() |
393195873b | ||
![]() |
5b19ede76e | ||
![]() |
a81d8a6500 | ||
![]() |
54b43a06cd | ||
![]() |
56ae45dae2 | ||
![]() |
b370733012 | ||
![]() |
180326f843 | ||
![]() |
80bda2c78e | ||
![]() |
2e13e55c68 | ||
![]() |
e0703d72aa | ||
![]() |
777b3d0734 | ||
![]() |
42e9d2c2af | ||
![]() |
c63ea0a0db | ||
![]() |
4f9656a8e2 | ||
![]() |
2e23401d0e | ||
![]() |
a7e75d8632 | ||
![]() |
0325954649 | ||
![]() |
f8c54af706 | ||
![]() |
cb0f3850cf | ||
![]() |
f20814d418 | ||
![]() |
14ba13eb02 | ||
![]() |
ac2aa275c5 | ||
![]() |
7c4537225b | ||
![]() |
f12a651443 | ||
![]() |
2f9b8f3e32 | ||
![]() |
7f4e07914a | ||
![]() |
e97bebd87e | ||
![]() |
cbbd2d9bba | ||
![]() |
ba2ed35a85 | ||
![]() |
eccfc6c7a2 | ||
![]() |
cf6817304b | ||
![]() |
dca38d199c | ||
![]() |
db322d096f | ||
![]() |
e6256886a0 | ||
![]() |
2ac4265ca3 | ||
![]() |
e7217d1f03 | ||
![]() |
c70702db9d | ||
![]() |
7805b40fd2 | ||
![]() |
7a8abec978 | ||
![]() |
4852b6f4c4 | ||
![]() |
9a17e70daf | ||
![]() |
0dc6e58b86 | ||
![]() |
df393d70f9 | ||
![]() |
bdbceeb539 | ||
![]() |
2f307c0a29 | ||
![]() |
89a1d9535f | ||
![]() |
1796ed2a81 | ||
![]() |
e919db7f25 | ||
![]() |
f04b01ec1f | ||
![]() |
3781ddcf52 | ||
![]() |
756239d245 | ||
![]() |
702143e5ee | ||
![]() |
74092ce5be | ||
![]() |
b91efeaac3 | ||
![]() |
cbeceaf209 | ||
![]() |
1aea5257df | ||
![]() |
3a72753275 | ||
![]() |
3900838ccb | ||
![]() |
7533a71bbb | ||
![]() |
f18403d9c3 | ||
![]() |
24254cc3a1 | ||
![]() |
0f7caee05f | ||
![]() |
15853c789f | ||
![]() |
06b2865ba4 | ||
![]() |
66f05103a5 | ||
![]() |
18eb8137e5 | ||
![]() |
57e512da7b | ||
![]() |
f31a06cb0a | ||
![]() |
9d245b5e78 | ||
![]() |
daa96491c5 | ||
![]() |
73de02d026 | ||
![]() |
645d2e851c | ||
![]() |
74ab9647c1 | ||
![]() |
13522244dc | ||
![]() |
8fa7a43f2e | ||
![]() |
1981b1f89e | ||
![]() |
82ec8f8b4b | ||
![]() |
b85ca9c654 | ||
![]() |
8164630a81 | ||
![]() |
43651ca2db | ||
![]() |
5f2ab5852a | ||
![]() |
94f36ba1b6 | ||
![]() |
2c8037d1d0 | ||
![]() |
c35b322bfd | ||
![]() |
213cc26060 | ||
![]() |
0f95052dc3 | ||
![]() |
2af1f4800e | ||
![]() |
bab26ff352 | ||
![]() |
6804a49769 | ||
![]() |
b41d6ee9f4 | ||
![]() |
d49e52b6f7 | ||
![]() |
755450843c | ||
![]() |
bdafc3d45e | ||
![]() |
ac93c70bc1 | ||
![]() |
6643bf031f | ||
![]() |
a5390eca1b | ||
![]() |
7357842b87 | ||
![]() |
45daee85f4 | ||
![]() |
c583e1cbf9 | ||
![]() |
497f611b03 | ||
![]() |
4cf7fdd1f8 | ||
![]() |
83b801f1c4 | ||
![]() |
1c86a3a34f | ||
![]() |
2e96b0692c | ||
![]() |
0dd1066255 | ||
![]() |
2a40365675 | ||
![]() |
b179c6cc45 | ||
![]() |
31da33f636 | ||
![]() |
145ad5fa2f | ||
![]() |
74d95d6394 | ||
![]() |
f88e4081ba | ||
![]() |
4613a3b3c8 | ||
![]() |
fdfdfd31bf | ||
![]() |
64bd33f7d6 | ||
![]() |
a1aad7c1a2 | ||
![]() |
fcd9d60c08 | ||
![]() |
001d1779eb | ||
![]() |
558a98410f | ||
![]() |
c326be6380 | ||
![]() |
baea44089f | ||
![]() |
8c1c42c258 | ||
![]() |
7921b755dd | ||
![]() |
494da6b697 | ||
![]() |
6da43d80fa | ||
![]() |
8459b632c7 | ||
![]() |
161cafcf7e | ||
![]() |
e692190cde | ||
![]() |
155dba41ce | ||
![]() |
53f695fa23 | ||
![]() |
eb5a39ed1f | ||
![]() |
c621881fce | ||
![]() |
2166583b70 | ||
![]() |
653fca0f32 | ||
![]() |
652a2d4fe1 | ||
![]() |
2618f2c613 | ||
![]() |
5e333e85a4 | ||
![]() |
3338b86974 | ||
![]() |
d5b6b94e83 | ||
![]() |
00919d7f05 | ||
![]() |
af336b190b | ||
![]() |
5dfd577599 | ||
![]() |
09e459bc5b | ||
![]() |
87c1c8ee0c | ||
![]() |
8d2b27509d | ||
![]() |
d4be43588f | ||
![]() |
0883b96908 | ||
![]() |
0de47adeb0 | ||
![]() |
8b2139d017 | ||
![]() |
b3b9661aef | ||
![]() |
76d4aa14db | ||
![]() |
e3d90d9579 | ||
![]() |
666c7d10b6 | ||
![]() |
32075f6f50 | ||
![]() |
71f01efd19 | ||
![]() |
ae728d8fb6 | ||
![]() |
230ad4b5ea | ||
![]() |
92f3588c5e | ||
![]() |
625fe380f7 | ||
![]() |
0936962ced | ||
![]() |
f12655e453 | ||
![]() |
651be6acb1 | ||
![]() |
a9859e7338 | ||
![]() |
ca9df5aaf3 | ||
![]() |
6f568ab663 | ||
![]() |
8184d2c66e | ||
![]() |
fcb228c0a8 | ||
![]() |
61a0c8b896 | ||
![]() |
6c7ec102cd | ||
![]() |
6e6bce07aa | ||
![]() |
5feef42e30 | ||
![]() |
cfdc343349 | ||
![]() |
301a227d91 | ||
![]() |
43fe7e4aff | ||
![]() |
a7a3ffab3d | ||
![]() |
1ca618f413 | ||
![]() |
3fa03f11f8 | ||
![]() |
c568187ff4 | ||
![]() |
f4e408d1c5 | ||
![]() |
188c92c459 | ||
![]() |
1c2d7760fc | ||
![]() |
4dd0a34cd6 | ||
![]() |
d3faed03ab | ||
![]() |
87fd226e32 | ||
![]() |
fc0ecc74f2 | ||
![]() |
d8109a9309 | ||
![]() |
6640bb09b0 | ||
![]() |
8040455bab | ||
![]() |
34cb3e8bd1 | ||
![]() |
c0db202eb6 | ||
![]() |
cfdeaaa89a | ||
![]() |
c5fb8fffc6 | ||
![]() |
39f8e17add | ||
![]() |
32882ed33b | ||
![]() |
4a07ecdc4a | ||
![]() |
5cfc34b70a | ||
![]() |
a7af566f89 | ||
![]() |
e9a8697a2c | ||
![]() |
ff074dfcda | ||
![]() |
ba2ef55312 | ||
![]() |
6eaf52f9b0 | ||
![]() |
36194b715d | ||
![]() |
497ea49550 | ||
![]() |
90d55a5cdf | ||
![]() |
8d8b2a194f | ||
![]() |
2dbc84f4d3 | ||
![]() |
dc4d0a268f | ||
![]() |
9d8ae83ee1 | ||
![]() |
d736a63a18 | ||
![]() |
796b89daf2 | ||
![]() |
35aed78ceb | ||
![]() |
84d62ecb9e | ||
![]() |
36f5c37888 | ||
![]() |
6d4c08e8f7 | ||
![]() |
4635931ba6 | ||
![]() |
efe621fd56 | ||
![]() |
8ab5c9a6b0 | ||
![]() |
eb6c9f85c4 | ||
![]() |
9baa2f97fd | ||
![]() |
30a17959e5 | ||
![]() |
83f128db0b | ||
![]() |
d28f346274 | ||
![]() |
0417dc95ec | ||
![]() |
9c5e4af555 | ||
![]() |
564c7ef132 | ||
![]() |
7ea6de2ee2 | ||
![]() |
53af0b0210 | ||
![]() |
42f05da78e | ||
![]() |
9cab993b2f | ||
![]() |
12280820ad | ||
![]() |
b5273fa886 | ||
![]() |
529424a622 | ||
![]() |
7d7585c04c | ||
![]() |
c17ca8991d | ||
![]() |
b7afda6cc9 | ||
![]() |
d521edc04b | ||
![]() |
991b5fc73e | ||
![]() |
b603742c55 | ||
![]() |
b323341e17 | ||
![]() |
17a2518687 | ||
![]() |
4c4b74f67a | ||
![]() |
0111ed4118 | ||
![]() |
80e0fc1fe0 | ||
![]() |
289c23444c | ||
![]() |
7629cd5d4e | ||
![]() |
aa2447d227 | ||
![]() |
dd44892c72 | ||
![]() |
beee7f5a4a | ||
![]() |
cbb98f7f4e | ||
![]() |
1a72c9e7a9 | ||
![]() |
c402a9932e | ||
![]() |
70c58213de | ||
![]() |
945ce73a76 | ||
![]() |
9816e0b3d3 | ||
![]() |
5a288781a4 | ||
![]() |
a3f2890ea0 | ||
![]() |
b073983275 | ||
![]() |
e3a6391496 | ||
![]() |
a174f0dbfb | ||
![]() |
eb846e88f3 | ||
![]() |
c1143f8e74 | ||
![]() |
89b1f7acbe | ||
![]() |
702afb12e8 | ||
![]() |
faf04073a8 | ||
![]() |
1cbeb1bc53 | ||
![]() |
b1b8141506 | ||
![]() |
ac98efff3e | ||
![]() |
a96e82cc50 | ||
![]() |
5b83b4ca88 | ||
![]() |
b3eba99558 | ||
![]() |
83011d3330 | ||
![]() |
f0443301cc | ||
![]() |
b0fea83a55 | ||
![]() |
014d95aa45 | ||
![]() |
e30e6bbeca | ||
![]() |
3c867c62d1 | ||
![]() |
53968a7b43 | ||
![]() |
335d0509b4 | ||
![]() |
5ccf73695e | ||
![]() |
372150b7b6 | ||
![]() |
a0efbabb3c | ||
![]() |
10ec121143 | ||
![]() |
c26570c13e | ||
![]() |
d0e1fd0e6d | ||
![]() |
b471ff0da5 | ||
![]() |
df4e287a11 | ||
![]() |
143abc212d | ||
![]() |
13c1c02d66 | ||
![]() |
fe7db71e8b | ||
![]() |
dec2531686 | ||
![]() |
c47b3a32a2 | ||
![]() |
316c1417ba | ||
![]() |
f2a80d5309 | ||
![]() |
0cab4efa40 | ||
![]() |
028640e37d | ||
![]() |
bbb6b099b3 | ||
![]() |
88a478d28e | ||
![]() |
e5332a3aad | ||
![]() |
0c4a192c94 | ||
![]() |
06ea14fd7c | ||
![]() |
7af944f008 | ||
![]() |
d927b49caa | ||
![]() |
749781587f | ||
![]() |
ed3ff69fc8 | ||
![]() |
7b067f7cc2 | ||
![]() |
476d268789 | ||
![]() |
ecc4b5bd0b | ||
![]() |
4d912f0c71 | ||
![]() |
456fedc2b8 | ||
![]() |
2b2febf967 | ||
![]() |
fcf7e43b82 | ||
![]() |
44f2091bf2 | ||
![]() |
54be291d73 | ||
![]() |
126fc09733 | ||
![]() |
ed40f28b7a | ||
![]() |
a3db393d31 | ||
![]() |
14a15d544f | ||
![]() |
b9eacba046 | ||
![]() |
6ea280dbe9 | ||
![]() |
817843558b | ||
![]() |
44355f24b9 | ||
![]() |
e8e78df7d9 | ||
![]() |
d53130ce30 | ||
![]() |
ec616daa80 | ||
![]() |
f96e88d63c | ||
![]() |
fada55d475 | ||
![]() |
b2b2736df7 | ||
![]() |
028595c1ef | ||
![]() |
65bb5b9a71 | ||
![]() |
327ba25956 | ||
![]() |
898397f5a4 | ||
![]() |
ee568a791a | ||
![]() |
3311de016c | ||
![]() |
2e2a7423bf | ||
![]() |
b8ab3f54e3 | ||
![]() |
f94cad59a3 | ||
![]() |
09bf85ad2a | ||
![]() |
352105a458 | ||
![]() |
1acbd6439b | ||
![]() |
d8c037bcdb | ||
![]() |
2f5a1ff4dc | ||
![]() |
155b1d1713 | ||
![]() |
4f2e3e5921 | ||
![]() |
b52768b4f6 | ||
![]() |
ae2f0a1a6f | ||
![]() |
8b17046ea4 | ||
![]() |
4e093700e4 | ||
![]() |
698fa01d7e | ||
![]() |
1dd847af03 | ||
![]() |
bd256bddd8 | ||
![]() |
e0703de170 | ||
![]() |
a1b9171b49 | ||
![]() |
f4dbfb295a | ||
![]() |
0b7c35cd11 | ||
![]() |
84e20ac39a | ||
![]() |
64b5b0a084 | ||
![]() |
c1c3d112a4 | ||
![]() |
122d7cecf2 | ||
![]() |
b4ac68eee5 | ||
![]() |
73fd2918ff | ||
![]() |
91277afef6 | ||
![]() |
da4934d831 | ||
![]() |
518914a714 | ||
![]() |
522938417c | ||
![]() |
6c37025714 | ||
![]() |
6c8376c97d | ||
![]() |
4929286ebe | ||
![]() |
73b6dd2e2f | ||
![]() |
3e0ca0241f | ||
![]() |
c3b10fd2c8 | ||
![]() |
d59bde5d9c | ||
![]() |
f0218f775d | ||
![]() |
b895dbd591 | ||
![]() |
7b3ae82d7c | ||
![]() |
665f8b992a | ||
![]() |
fc9e14a926 | ||
![]() |
43dff43a27 | ||
![]() |
be62ae46bb | ||
![]() |
152d366822 | ||
![]() |
5052186e4a | ||
![]() |
ad236feca1 | ||
![]() |
fe3b413592 | ||
![]() |
cdb426556f | ||
![]() |
8df2383d9c | ||
![]() |
b2cf43c2f5 | ||
![]() |
587f38839c | ||
![]() |
812375130b | ||
![]() |
0f75d94724 | ||
![]() |
22a0987f1b | ||
![]() |
d7d7d31dc3 | ||
![]() |
224b97e290 | ||
![]() |
f27ee802a2 | ||
![]() |
ef3c93c347 | ||
![]() |
6943f6ed5c | ||
![]() |
d1a7975347 | ||
![]() |
4d031db2de | ||
![]() |
b1e06fba1d | ||
![]() |
f02a0ccd36 | ||
![]() |
b8369c8ada | ||
![]() |
57614ee89b | ||
![]() |
89c09620fb | ||
![]() |
239c56f243 | ||
![]() |
9dfb039247 | ||
![]() |
3b768053e1 | ||
![]() |
f28d99d8e3 | ||
![]() |
80b9f0641a | ||
![]() |
9100621e0f | ||
![]() |
ffaaafbfa3 | ||
![]() |
202e824582 | ||
![]() |
6e177fefe9 | ||
![]() |
0f61304f4f | ||
![]() |
5777066821 | ||
![]() |
c2a5359603 | ||
![]() |
e459583df1 | ||
![]() |
6cc646a93f | ||
![]() |
b139d20594 | ||
![]() |
bbd4ba8d40 | ||
![]() |
f2b7a722ee | ||
![]() |
4d337da0e3 | ||
![]() |
e5ceb808fb | ||
![]() |
9230ebb6da | ||
![]() |
79deddf273 | ||
![]() |
c3ed81a4cf | ||
![]() |
968a04c2e1 | ||
![]() |
1b08419a21 | ||
![]() |
394ba36c84 | ||
![]() |
c5eda03b89 | ||
![]() |
781c711abb | ||
![]() |
084f7bd6ee | ||
![]() |
5e0198efc1 | ||
![]() |
a7a437f48f | ||
![]() |
98e8289969 | ||
![]() |
0ab05e6b4a | ||
![]() |
89dab2a3d4 | ||
![]() |
5c243910be | ||
![]() |
eb343e5e1f | ||
![]() |
13b4d25870 | ||
![]() |
c0f1eea7ae | ||
![]() |
730d34f22b | ||
![]() |
793af80c90 | ||
![]() |
00840c0f3a | ||
![]() |
35362eac96 | ||
![]() |
a8351df7db | ||
![]() |
de83fa8a9d | ||
![]() |
cacdb34df8 | ||
![]() |
7b1125080c | ||
![]() |
758289fe7c | ||
![]() |
0548367982 | ||
![]() |
1335e8a897 | ||
![]() |
2d3e498a89 | ||
![]() |
e8f1300193 | ||
![]() |
cfcaa16ab3 | ||
![]() |
017a9e6dcf | ||
![]() |
511540efd9 | ||
![]() |
182a98644b | ||
![]() |
5366ed3dda | ||
![]() |
44bce791ad | ||
![]() |
0639a0e2b5 | ||
![]() |
ee3ec951b4 | ||
![]() |
c5d405cafa | ||
![]() |
355f7d9b94 | ||
![]() |
ca5a59a026 | ||
![]() |
3fc965e9b3 | ||
![]() |
d23a58a1b6 | ||
![]() |
4831ebca6b | ||
![]() |
2f8ab031f8 | ||
![]() |
d10a7f2482 | ||
![]() |
352ad7b62f | ||
![]() |
5a15e09df6 | ||
![]() |
64923e5d82 | ||
![]() |
b6ede246b8 | ||
![]() |
1b555fd614 | ||
![]() |
40c15df7a1 | ||
![]() |
d93a11a1c9 | ||
![]() |
1a50f055af | ||
![]() |
ddd35c8be7 | ||
![]() |
43ef2426da | ||
![]() |
09ae100b27 | ||
![]() |
86cfbc98da | ||
![]() |
5235c5a2b9 | ||
![]() |
623be55655 | ||
![]() |
39031718f4 | ||
![]() |
29f9ff8eb1 | ||
![]() |
97854e5297 | ||
![]() |
64a3bf6260 | ||
![]() |
f83cf04978 | ||
![]() |
943fe5b101 | ||
![]() |
6bcf8f3796 | ||
![]() |
55d59f4195 | ||
![]() |
89ba830ce6 | ||
![]() |
0bb8d20f9e | ||
![]() |
edeb5779c7 | ||
![]() |
1dc6a2bf0c | ||
![]() |
f00e82e54c | ||
![]() |
13abc35d46 | ||
![]() |
95fead66a3 | ||
![]() |
cc9fdaa1eb | ||
![]() |
8ea6b34103 | ||
![]() |
d97359291e | ||
![]() |
8d09776e6e | ||
![]() |
c7a008dd1d | ||
![]() |
7f7c2f08c1 | ||
![]() |
1f4e030b3e | ||
![]() |
6e49a469de | ||
![]() |
8e74dc00ab | ||
![]() |
1fa119a7c8 | ||
![]() |
731be56606 | ||
![]() |
1db5b32a4a | ||
![]() |
5c11c6db27 | ||
![]() |
dae897ca28 | ||
![]() |
6013ccd452 | ||
![]() |
e3b20858a0 | ||
![]() |
32b8e2b3a1 | ||
![]() |
d482648ecf | ||
![]() |
9b036cf689 | ||
![]() |
b1fbcc597a | ||
![]() |
c2511edbd7 | ||
![]() |
2e6ffee9ce | ||
![]() |
ea87953f94 | ||
![]() |
52f2692489 | ||
![]() |
a874639b7c | ||
![]() |
af336e4ec1 | ||
![]() |
8f9342be32 | ||
![]() |
a566482a8b | ||
![]() |
f32a222936 | ||
![]() |
e65d9bc77a | ||
![]() |
47eb19b9b2 | ||
![]() |
884a466ca9 | ||
![]() |
28bf5b55e5 | ||
![]() |
471b3b56ae | ||
![]() |
f2fd400b5c | ||
![]() |
b59a8146fe | ||
![]() |
e625dc1e55 | ||
![]() |
ff8566c1a6 | ||
![]() |
236e2975b2 | ||
![]() |
32c6dcfbd7 | ||
![]() |
ec57fa0463 | ||
![]() |
80623c6615 | ||
![]() |
ee10659e84 | ||
![]() |
f06912824d | ||
![]() |
b9e0a2fb30 | ||
![]() |
17b71dbe24 | ||
![]() |
92f312df15 | ||
![]() |
df91cacfcc | ||
![]() |
156814b79c | ||
![]() |
277becea44 | ||
![]() |
d5c3a1e1dc | ||
![]() |
bdbed02b38 | ||
![]() |
8c10cf6093 | ||
![]() |
eb9fb22a39 | ||
![]() |
26825ad616 | ||
![]() |
556738af0e | ||
![]() |
94cab8382e | ||
![]() |
175f579a38 | ||
![]() |
76257add50 | ||
![]() |
9c65a63ee5 | ||
![]() |
f9e4b346ed | ||
![]() |
7faee81eab | ||
![]() |
63b3803a2e | ||
![]() |
942a92fdf3 | ||
![]() |
e9f6cf87e3 | ||
![]() |
14156aa4f9 | ||
![]() |
a3792c1619 | ||
![]() |
522352e20b |
35
.devcontainer/devcontainer.json
Normal file
35
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,35 @@
|
||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
|
||||
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
|
||||
{
|
||||
"name": "Ubuntu",
|
||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||
"image": "mcr.microsoft.com/devcontainers/base:jammy",
|
||||
|
||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/python:1": {}
|
||||
},
|
||||
|
||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||
// "forwardPorts": [],
|
||||
|
||||
// Use 'postCreateCommand' to run commands after the container is created.
|
||||
// "postCreateCommand": "uname -a",
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"ms-vscode.cpptools",
|
||||
"platformio.platformio-ide"
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
|
||||
// "remoteUser": "root"
|
||||
|
||||
// Allow uploading to device
|
||||
"mounts": ["type=bind,source=/dev/bus/usb,target=/dev/bus/usb"],
|
||||
"runArgs": ["--privileged"]
|
||||
}
|
5
.github/FUNDING.yml
vendored
5
.github/FUNDING.yml
vendored
@ -1,15 +1,16 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [aderusha, bblanchon] # Replace with up to 4 GitHub Sponsors-enabled usernames
|
||||
github: [aderusha, lovyan03, bblanchon] # Replace with up to 4 GitHub Sponsors-enabled usernames
|
||||
patreon: # Replace with a single Patreon username
|
||||
open_collective: # Replace with a single Open Collective username
|
||||
ko_fi: # Replace with a single Ko-fi username
|
||||
ko_fi: openhasp
|
||||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
||||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
||||
liberapay: # Replace with a single Liberapay username
|
||||
issuehunt: # Replace with a single IssueHunt username
|
||||
otechie: # Replace with a single Otechie username
|
||||
custom: [
|
||||
"https://www.paypal.com/donate/?business=E76SN28JLZCXU",
|
||||
"https://www.buymeacoffee.com/aktdCofU",
|
||||
"https://arduinojson.org/book/",
|
||||
] # Up to 4 links
|
||||
|
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -16,7 +16,7 @@ or join the [#openHASP channel](https://discord.gg/VCWyuhF) on Discord.
|
||||
-->
|
||||
|
||||
### Perform all steps below and tick them with [x]
|
||||
- [ ] Check the related part of the [Documentation](https://haswitchplate.github.io/openHASP-docs/)
|
||||
- [ ] Check the related part of the [Documentation](https://www.openhasp.com/)
|
||||
- [ ] Update openHASP to the latest version
|
||||
- [ ] Reproduce the issue and describe all steps
|
||||
|
||||
|
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for more information:
|
||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
# https://containers.dev/guide/dependabot
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "devcontainers"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: weekly
|
157
.github/workflows/build.yaml
vendored
157
.github/workflows/build.yaml
vendored
@ -1,44 +1,151 @@
|
||||
name: Build branch
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- "**.md"
|
||||
- "**.yml"
|
||||
- "**.yaml"
|
||||
workflow_dispatch:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build_esp32:
|
||||
runs-on: ubuntu-latest
|
||||
#runs-on: ubuntu-24.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
environment:
|
||||
- out: adafruit
|
||||
env: "huzzah32-featherwing-24 -e huzzah32-featherwing-35 -e huzzah32-featherwing-24-v2 -e huzzah32-featherwing-35-v2 -e huzzah32-v2-featherwing-24-v2 -e huzzah32-v2-featherwing-35-v2"
|
||||
- out: az-touch
|
||||
env: "az-touch-mod-esp32_ili9341_4MB -e az-touch-mod-esp32_ili9341_8MB"
|
||||
- env: d1-mini-esp32_ili9341
|
||||
out: d1-mini-esp32
|
||||
- out: d1-r32-espduino32
|
||||
env: "d1-r32-waveshare_ili9486 -e d1-r32-unoshield_ili9341_adc -e d1-r32-unoshield_ili9486_adc"
|
||||
- out: dustinwatts
|
||||
env: "freetouchdeck_4MB -e freetouchdeck_8MB -e esp32-touchdown"
|
||||
- out: elecrow
|
||||
env: "esp32-terminal-rgb_16MB -e esp32-terminal-spi_16MB -e elecrow-s3-8048c050_4MB -e elecrow-s3-8048c070_4MB"
|
||||
- out: globalsecurity
|
||||
env: gs-t3e_16MB
|
||||
- out: guition
|
||||
env: esp32-s3-4848s040_16MB -e guition-jc4827w543c_4MB
|
||||
- out: lanbon
|
||||
env: lanbon_l8 -e lanbon_l9
|
||||
- out: lilygo-ttgo
|
||||
env: "lilygo-lily-pi_st7796 -e lilygo-lily-pi_ili9481 -e ttgo-t7-v1_5_ili9341_4MB -e ttgo-t7-v1_5_ili9341_16MB"
|
||||
- out: lolin
|
||||
env: lolin-d32-pro_ili9341
|
||||
- out: m5stack
|
||||
env: m5stack-core2
|
||||
- out: makerfabs
|
||||
env: "makerfabs-tft35-cap_4MB -e makerfabs-tft35-cap_16MB -e makerfabs-s3-tft35-spi -e makerfabs-s3-tft40-rgb -e makerfabs-s3-tft43-rgb"
|
||||
- out: panlee
|
||||
env: "panlee-zw3d95ce01s-ar-4848_16MB -e panlee-zw3d95ce01s-ur-4848_16MB -e panlee-zw3d95ce01s-tr-4848_16MB"
|
||||
- out: seeed-studios
|
||||
env: "sensecap-indicator-d1_8MB"
|
||||
- out: sunton
|
||||
env: "esp32-2432s028r_4MB -e esp32-2432s028r-ili9342_4MB -e esp32-2432s028r_v2_4MB -e esp32-2432s032c_4MB -e esp32-3248s035c_4MB -e esp32-3248s035r_4MB -e sunton-4827s043c_16MB -e sunton-8048s043c_16MB -e sunton-8048s050c_16MB -e sunton-8048s070c_16MB"
|
||||
- out: waveshare
|
||||
env: "esp32-one_ili9486 -e esp32-one_st7796 -e ws_esp32_s3_touch_lcd_4p3"
|
||||
- out: wireless-tag
|
||||
env: "wt32-sc01_4MB -e wt32-sc01_16MB -e wt-86-32-3zw1 -e wt32-sc01-plus_8MB -e wt32-sc01-plus_16MB"
|
||||
- out: yeacreate
|
||||
env: yeacreate-nscreen32
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "true"
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
- name: Enable ESP platforms from platformio_override-template.ini
|
||||
- name: Install Setuptools
|
||||
run: |
|
||||
sed 's/; user_setups\/esp/user_setups\/esp/g' platformio_override-template.ini > platformio_override.ini
|
||||
pip install --upgrade setuptools
|
||||
- name: Enable ESP32 platforms from platformio_override-template.ini
|
||||
run: |
|
||||
sed 's/; user_setups\/esp32/user_setups\/esp32/g' platformio_override-template.ini > platformio_override.ini
|
||||
- name: List all files in current folder
|
||||
run: |
|
||||
ls -la
|
||||
- name: Cat platformio_override.ini
|
||||
run: |
|
||||
cat platformio_override.ini
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e ${{ matrix.environment.env }}
|
||||
- name: Upload output file
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.environment.out }}
|
||||
path: build_output/firmware/*.*n
|
||||
## Release only:
|
||||
- name: Zip artifact for deployment
|
||||
if: github.ref != 'refs/heads/master'
|
||||
run: |
|
||||
zip ${{ matrix.environment.out }}.zip build_output/firmware/*.bin -r
|
||||
- name: On Release, upload assets to that Release
|
||||
if: github.ref != 'refs/heads/master'
|
||||
uses: AButler/upload-release-assets@v3.0
|
||||
with:
|
||||
files: ${{ matrix.environment.out }}.zip
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
linux_build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: "true"
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.x"
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
- name: Enable Linux platform from platformio_override.ini
|
||||
run: |
|
||||
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||
mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
||||
sed 's/; user_setups\/linux/user_setups\/linux/g' platformio_override-template.ini > platformio_override.ini
|
||||
mkdir -p .pio/libdeps/linux_sdl/paho/src
|
||||
- name: Install SDL2 library
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@ -49,21 +156,13 @@ jobs:
|
||||
- name: Cat platformio_override.ini
|
||||
run: |
|
||||
cat platformio_override.ini
|
||||
- name: Enable Linux platform from platformio_override.ini
|
||||
run: |
|
||||
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||
mkdir -p .pio/libdeps/linux_sdl/paho/src
|
||||
- name: Install SDL2 library
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libsdl2-dev
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e arduitouch-esp32_ili9341 -e esp32-one_st7796 -e makerfabs-tft35-cap -e yeacreate-nscreen32 -e d1-mini-esp32_ili9341 -e esp32-touchdown -e freetouchdeck -e huzzah32-featherwing-24 -e huzzah32-featherwing-35 -e lanbon_l8 -e m5stack-core2 -e wt32-sc01 -e d1-mini-esp8266_ili9341 -e linux_sdl_64bits
|
||||
- name: Upload output file
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: openHASP firmware.zip
|
||||
path: build_output/firmware/*.bin
|
||||
#- name: Create release and upload firmware
|
||||
# run: |
|
||||
# set -x
|
||||
# assets=()
|
||||
# for asset in build_output/firmware/*.bin; do
|
||||
# assets+=("-a" "$asset")
|
||||
# done
|
||||
# tag_name="${GITHUB_REF##*/}"
|
||||
# hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: pio run -e linux_sdl
|
||||
|
74
.github/workflows/build_linux.yaml
vendored
Normal file
74
.github/workflows/build_linux.yaml
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
name: Build Linux (Obsolete)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
environments:
|
||||
- linux_sdl
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'true'
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install --upgrade platformio
|
||||
# - name: Enable ESP platforms from platformio_override-template.ini
|
||||
# run: |
|
||||
# sed 's/; user_setups\/esp/user_setups\/esp/g' platformio_override-template.ini > platformio_override.ini
|
||||
- name: Enable Linux platform from platformio_override.ini
|
||||
run: |
|
||||
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||
mkdir -p .pio/libdeps/linux_sdl/paho/src
|
||||
- name: Install SDL2 library
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libsdl2-dev
|
||||
- name: List all files in current folder
|
||||
run: |
|
||||
ls -la
|
||||
- name: Cat platformio_override.ini
|
||||
run: |
|
||||
cat platformio_override.ini
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e ${{ matrix.environments }}
|
||||
# - name: Upload output file
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
# name: ${{ matrix.environments }}
|
||||
# path: build_output/firmware/*.bin
|
||||
#- name: Create release and upload firmware
|
||||
# run: |
|
||||
# set -x
|
||||
# assets=()
|
||||
# for asset in build_output/firmware/*.bin; do
|
||||
# assets+=("-a" "$asset")
|
||||
# done
|
||||
# tag_name="${GITHUB_REF##*/}"
|
||||
# hub release create "${assets[@]}" -m "$tag_name" "$tag_name"
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
@ -1,8 +1,9 @@
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
# release:
|
||||
# types: [created]
|
||||
workflow_dispatch:
|
||||
|
||||
name: Create Release
|
||||
name: Create Release (Obsolete)
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@ -11,21 +12,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache pip
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Cache PlatformIO
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.platformio
|
||||
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install PlatformIO
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
@ -36,7 +39,7 @@ jobs:
|
||||
- name: Enable Linux platform from platformio_override.ini
|
||||
run: |
|
||||
sed -i 's/; user_setups\/linux/user_setups\/linux/g' platformio_override.ini
|
||||
mkdir -p .pio/libdeps/linux_sdl_64bits/paho/src
|
||||
mkdir -p .pio/libdeps/linux_sdl/paho/src
|
||||
- name: Install SDL2 library
|
||||
run: |
|
||||
sudo apt-get update
|
||||
@ -48,9 +51,27 @@ jobs:
|
||||
run: |
|
||||
cat platformio_override.ini
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e arduitouch-esp32_ili9341 -e esp32-one_st7796 -e makerfabs-tft35-cap -e yeacreate-nscreen32 -e d1-mini-esp32_ili9341 -e esp32-touchdown -e freetouchdeck -e huzzah32-featherwing-24 -e huzzah32-featherwing-35 -e lanbon_l8 -e m5stack-core2 -e wt32-sc01 -e d1-mini-esp8266_ili9341 -e linux_sdl_64bits
|
||||
run: pio run -e lolin-d32-pro_ili9341
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e az-touch-mod-esp32_ili9341_4MB -e az-touch-mod-esp32_ili9341_8MB
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e makerfabs-tft35-cap_4MB -e makerfabs-tft35-cap_16MB
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e yeacreate-nscreen32 -e
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e d1-mini-esp32_ili9341
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e esp32-touchdown -e freetouchdeck_4MB -e freetouchdeck_8MB
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e huzzah32-featherwing-24 -e huzzah32-featherwing-35 -e huzzah32-featherwing-24-v2 -e huzzah32-featherwing-35-v2 -e huzzah32-v2-featherwing-24-v2 -e huzzah32-v2-featherwing-35-v2
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e lanbon_l8
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e wt32-sc01_4MB -e wt32-sc01_16MB
|
||||
- name: Run PlatformIO
|
||||
run: pio run -e m5stack-core2
|
||||
- name: Upload output file
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: openHASP firmware.zip
|
||||
path: build_output/firmware/*.bin
|
||||
|
30
.gitignore
vendored
30
.gitignore
vendored
@ -4,18 +4,38 @@
|
||||
## Project files ######
|
||||
.git
|
||||
.pio
|
||||
bin/*
|
||||
data/*
|
||||
!data/edit.htm
|
||||
!data/edit.htm.gz
|
||||
src/user_setups/active/*
|
||||
!data/en.json
|
||||
!data/main.js
|
||||
!data/openhasp.ttf
|
||||
!data/style.css
|
||||
!data/script.js
|
||||
!data/vars.css
|
||||
!data/cert/
|
||||
!data/cert/x509_crt_bundle.bin
|
||||
!data/pages/
|
||||
!data/pages/*.jsonl
|
||||
!data/static/
|
||||
!data/static/*.gz
|
||||
data/static/edit.htm.gz
|
||||
data/static/en.json.gz
|
||||
data/static/main.js.gz
|
||||
data/static/script.js.gz
|
||||
data/static/style.css.gz
|
||||
data/static/*.js
|
||||
|
||||
include/user_config_override.h
|
||||
src/user_config_override.h
|
||||
user_config_override.h
|
||||
platformio_override.ini
|
||||
user_setups/active/*
|
||||
user_setups/custom/*
|
||||
build_output/*
|
||||
build_output/firmware/*.bin
|
||||
build_output/firmware/*.exe
|
||||
lib/SimpleFTPServer/examples/*
|
||||
src/custom/*
|
||||
!src/custom/README.md
|
||||
!src/custom/bootlogo_template.h
|
||||
@ -23,9 +43,13 @@ src/custom/*
|
||||
!src/custom/my_custom_template.cpp
|
||||
!src/custom/my_custom_fan_template.cpp
|
||||
|
||||
#npm filter
|
||||
node_modules/*
|
||||
package.json
|
||||
package-lock.json
|
||||
|
||||
## Test result files
|
||||
*.xml
|
||||
*.bin
|
||||
|
||||
## Visual Studio Code specific ######
|
||||
!.vscode
|
||||
|
4
.gitmodules
vendored
Normal file
4
.gitmodules
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
[submodule "lib/freetype"]
|
||||
path = lib/freetype
|
||||
url = https://github.com/fvanroie/freetype
|
||||
|
19
.vscode/extensions.json
vendored
19
.vscode/extensions.json
vendored
@ -1,8 +1,11 @@
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"platformio.platformio-ide"
|
||||
]
|
||||
}
|
||||
{
|
||||
// See http://go.microsoft.com/fwlink/?LinkId=827846
|
||||
// for the documentation about the extensions.json format
|
||||
"recommendations": [
|
||||
"ms-vscode.cpptools",
|
||||
"platformio.platformio-ide"
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cpptools-extension-pack"
|
||||
]
|
||||
}
|
||||
|
329
CHANGELOG.md
Normal file
329
CHANGELOG.md
Normal file
@ -0,0 +1,329 @@
|
||||
# openHASP Changelog
|
||||
|
||||
## v0.7.0
|
||||
|
||||
!!! THE PARTITION SCHEME OF THE INTERNAL FLASH HAS CHANGED, CHECK THE DOCS BEFORE UPGRADING !!!
|
||||
|
||||
### Commands
|
||||
- Removed deprecated `dim`, `brightness` and `light` commands, use `backlight` instead
|
||||
|
||||
### Objects
|
||||
<!-- ? Support for State and Part properties -->
|
||||
- `action` and `swipe` can now be set to any command
|
||||
- Set default `line_width` of new `line` objects to 1
|
||||
- Add `qrcode` object (thanks @marsman7)
|
||||
- Allow line and block comments in pages.jsonl
|
||||
- Removed deprecated `txt` property, use `text` instead
|
||||
- Removed deprecated `objid` property, use `obj` instead
|
||||
- HASP theme: Toggle objects now use the secondary color when they are in the toggled state.
|
||||
|
||||
### Fonts
|
||||
- Firmware files include the bitmapped font sizes 12, 16, 24 and 32pt
|
||||
- Use embedded TrueType font for other font sizes (PSram highly recommended)
|
||||
- Add glyphs from Cyrillic, Latin-2, Greek and Viernamese character sets to default fonts
|
||||
- Add 12 new MDI icons
|
||||
|
||||
### Web UI
|
||||
- Update Web UI to petite-vue app
|
||||
- Redesigned the File Editor
|
||||
<!-- - _Selectable dark/light theme?_ -->
|
||||
|
||||
### Services
|
||||
- Change MQTT client from _PubSubClient_ to asynchronic Espressif _esp_mqtt_ client
|
||||
- Make the MQTT topics configurable
|
||||
- MQTT discovery now uses a subtopic of `hasp/discovery`. Discovery requires version 0.7.x of the Custom Component.
|
||||
- Add service start/stop mqtt
|
||||
- Add SimpleFTPServer to easily upload and download files to the plate *(one simultaneous connection only)*
|
||||
- Add service start/stop ftp
|
||||
- Add configuration for NTP servers and timezone
|
||||
- Add support system scripts executed when the idle level is changed
|
||||
- Add support for WireGuard (thanks @perexg)
|
||||
|
||||
### Devices
|
||||
- Add Elecrow ESP32-Terminal 3.5" SPI and RGB
|
||||
- Add GS-T3E Smart Panel
|
||||
- Add Lilygo Ttgo Lily Pi ESP32
|
||||
- Add Makerfabs ESP32-S3 SPI
|
||||
- Add Sunton ESP32-S3 TFT 4.3", 5.0" and 7.0"
|
||||
- Add Sunton ESP32-2432S028R ESP32-3248S035C ESP32-3248S035R
|
||||
- Add support for Wireless-Tag WT32-SC01 Plus and WT32S3-86V
|
||||
- Deprecate support for WT-86-32-3ZW1 with ESP32-S2
|
||||
- Fade backlight on ESP32 devices (thanks @presslab-us)
|
||||
|
||||
## Bug fixes
|
||||
- Fix for first touch not working properly
|
||||
- Add button GPIOs to input discovery message
|
||||
|
||||
### Architecture
|
||||
- Moved to Tasmota Arduino 2.0.11 and ESP-IDF 4.4.5 (thanks @Jason2866)
|
||||
- Add Arduino-GFX display driver
|
||||
- Add support for ESP32-S3 and ESP32-C3 devices
|
||||
- Deprecation of support for ESP32-S2 devices due to lack of sRAM
|
||||
|
||||
Updated libraries to Arduino_GFX v1.4.0, ArduinoJson 6.21.5, ArduinoStreamUtils 1.8.0, AceButton 1.10.1, TFT_eSPI 2.5.43, LovyanGFX 1.1.12 and SimpleFTPServer 2.1.5
|
||||
|
||||
|
||||
## v0.6.3
|
||||
|
||||
### Commands
|
||||
- Additional `idle` parameters now accept `off`, `short` and `long`
|
||||
- Add `sensors` command to trigger the sensors state message
|
||||
- Run `L:/boot.cmd` when the plate is (re)booted if the script exists
|
||||
- You can now use the `pXbY.jsonl` command to update multiple object properties at once (thanks @nagyrobi)
|
||||
|
||||
### Objects
|
||||
- All objects have a custom `tag` property which can contain arbitrary JSON data *(or numbers or text)* (thanks @nagyrobi)
|
||||
- `img.src` now accepts both `http` and `https` urls (thanks @htvekov)
|
||||
- `img.src` now accepts `png` and `binary` image urls, PSram is *highly* recommended
|
||||
- `img.src` now accepts 16-bit BMP files stored in flash
|
||||
|
||||
### Web UI
|
||||
- Updated to modern responsive design *(requires JavaScript)*
|
||||
- Add `/api/info/` and `/api/config/*/` endpoints
|
||||
- Allow for a customizable `vars.css`, `style.css`, `script.js` and `edit.htm`
|
||||
- Display a message when the configuration is changed and a reboot is needed
|
||||
- Add checkbox for backlight inversion to Display settings (thanks @wolffman122)
|
||||
- Add checkbox to toggle ANSI codes #261 (thanks @geiseri)
|
||||
- Allow firmware upgrade/downgrade in AP mode
|
||||
|
||||
### GUI
|
||||
- `antiburn` displays random pixels *aka.* white noise
|
||||
- Hide cursor during `antiburn` and `idle` if the pointer is enabled
|
||||
|
||||
### MQTT
|
||||
- Remember last `page` id of `jsonl` messages. Sending multiple messages now behaves like `jsonl` files (thanks @arovak)
|
||||
|
||||
### Fonts
|
||||
- Use TrueType fonts from flash, PSram is *highly* recommended (thanks to @s-hadinger)
|
||||
- Custom LVGL binary fonts can be read from flash and loaded into memory, PSram is *highly* recommended
|
||||
- Font ID is replaced by `namexx` *(where `xx` is the font size)* but the previous Font IDs still work for backwards compatibility
|
||||
- Added build option for Vietnamese character set (thanks @kydang789)
|
||||
- ⚠️ **Breaking:** Removed defunct .zi font support!
|
||||
|
||||
### Bug fixes
|
||||
- Fixed Lanbon L8 v1.17 PCB screen corruption #316 (thanks @DJBenson)- Fix for screenshots not showing properly in Safari on macOS/iOS (thanks @masto)
|
||||
- Fix bug that would not accept `on` state for setting output GPIOs #275 (thanks @freshnas and @cerietke)
|
||||
- Fix a bug in `dropdownlist` were `close` method performed `open` instead #299 (thanks @htvekov)
|
||||
- Fix `src` bug in `img` objects that could corrupt images sent over http (thanks @htvekov)
|
||||
- Fix screen dimensions in `statusupdate` message, taking into account current orientation #278 (thanks @kquinsland)
|
||||
- Fix for HTTP password that could be overwritten by 8 asterisks when it was not changed in the web UI
|
||||
- Fixed MQTT hostname limit *again*... #304 (thanks @fake-name)
|
||||
- Fixed firmware upgrade from URL #300 (thank @nagyrobi)
|
||||
- Fixed a bug that prevented Wifi from connecting to different BSSID #330 (thanks @Braehead)
|
||||
- Syslog message format fixes and improvements #285 (thanks @geiseri)
|
||||
|
||||
### Custom component
|
||||
- Expose `antiburn` and `page` in the CC (thanks @dgomes)
|
||||
- Expose the device URL in discovery message and CC
|
||||
|
||||
### Architecture
|
||||
- Moved to Tasmota Arduino 2.0.3 with native LittleFS library (thanks @Jason2866) and ESP-IDF 4.4.1 fixes for FragAttacks CVEs (thanks @nagyrobi)
|
||||
- Add support for ESP32-S2 devices
|
||||
- ⚠️ **Breaking:** Removed support for ESP8266!
|
||||
|
||||
Updated libraries to ArduinoJson 6.19.4, ArduinoStreamUtils 1.6.3, AceButton 1.9.2, TFT_eSPI 2.4.61, LovyanGFX 0.4.17 and Adafruit STMPE610 1.1.4
|
||||
|
||||
|
||||
|
||||
## v0.6.2
|
||||
|
||||
### Initial Setup
|
||||
- Add Captive Portal to first time setup (thanks @AndreTeixeira1998)
|
||||
- Create default `pages.jsonl`, `online.cmd` and `offline.cmd` files if they don't exist (thanks @nagyrobi)
|
||||
|
||||
### Objects
|
||||
- Enable `click` by default on `image` object
|
||||
- Add `type` to `spinner` object
|
||||
- Add `zoom`, `angle`, `pivot_x`, `pivot_y` and `antialias` attributes to `image` object
|
||||
- Allow url as `src` of `image` object for raw webimages and from push image service from the CC (thanks @dgomes and @nagyrobi)
|
||||
- Use `L:/file.png` instead of `/littlefs/file.png` for image paths, `/littlefs/` still works for backwards compatibility
|
||||
|
||||
### Objects
|
||||
- Add `antiburn` command to prevent static parts of the screen to create a *ghosting* effect in some LCDs or conditions
|
||||
|
||||
### Devices
|
||||
- Add Analog touch driver for Unoshield displays (thanks @wesleygas)
|
||||
- Add AZ-Touch MOD ESP32 with 2.4" or 2.8"
|
||||
- Add Lilygo®Ttgo Pi ESP32 with TFT 3.5"
|
||||
- Add Waveshare ESP32 One development board with Rpi MHS4001(B) or Waveshare RPi(C) LCD display
|
||||
- Add D1-R32 ESP32 development board with Waveshare ILI9486 Touch Shield
|
||||
|
||||
### Bug fixes
|
||||
- Fix bug that caused a crash when both `btnmatrix` and `msgbox` where used (thanks @AndreTeixeira1998)
|
||||
- Fix L8-HD dimmer brightness initialization after a reboot (thanks @Stupco)
|
||||
- Keep last dimmer value when toggling dimmer state on/off
|
||||
- Fix configurable mqttPort (thanks @Qargh)
|
||||
- Fix opaque background of `spinner` object in HASP theme (thanks @nagyrobi)
|
||||
|
||||
Updated libraries to AceButton 1.9.1 and ArduinoJson 6.18.5
|
||||
|
||||
|
||||
## v0.6.1
|
||||
|
||||
### Commands
|
||||
- Add `run` command to execute script files (`.cmd` or `.jsonl`)
|
||||
- Add `unzip` command for __no-compression__ zip files
|
||||
- Add `service` command to start/stop a service
|
||||
|
||||
### Wifi
|
||||
- Don't reboot the plate anymore after prolonged wifi connection lost
|
||||
- Run `/online.cmd` or `/offline.cmd` script when the wifi status changed
|
||||
|
||||
### Objects
|
||||
- Add new *[line](https://www.openhasp.com/0.6.1/design/objects/#line)* object
|
||||
- Add `val` to *[btnmatrix](https://www.openhasp.com/0.6.1/design/objects/#button-matrix)* when `one_select` is set
|
||||
- Cache up to 20 *[images](https://www.openhasp.com/0.6.1/design/objects/#image)* in PSram when available
|
||||
- Improve precision on the *[linemeter](https://www.openhasp.com/0.6.1/design/objects/#line-meter)* scales
|
||||
- Fix *[dropdown](https://www.openhasp.com/0.6.1/design/objects/#dropdown-list)* redraw bug
|
||||
|
||||
### Devices
|
||||
- Fix [L8-HD dimmer](https://www.openhasp.com/0.6.1/devices/lanbon-l8/) not responding correctly to mqtt after a reboot
|
||||
- Add [M5Stack Core2](https://www.openhasp.com/0.6.1/devices/m5stack-core2/) backlight dimming
|
||||
- Add [Yeacreate Nscreen32](https://www.openhasp.com/0.6.1/devices/yeacreate-nscreen32/)
|
||||
- Add [Makerfabs ESP32 TFT Touch](https://www.openhasp.com/0.6.1/devices/makerfabs-tft-touch/) Capacitive
|
||||
|
||||
### Fonts
|
||||
- [Additional characters](https://www.openhasp.com/0.6.1/design/fonts/#ascii): `²` (squared) and `³` (cubed)
|
||||
- [Additional icons](https://www.openhasp.com/0.6.1/design/fonts/#built-in-icons): recycle-variant and additional weather icons
|
||||
- Use latin1 as default charset on [WT32-SC01](https://www.openhasp.com/0.6.1/devices/wt32-sc01/)
|
||||
- Add [Greek font](https://www.openhasp.com/0.6.1/design/fonts/#greek)
|
||||
|
||||
### Compiling
|
||||
- Allow custom bootlogo
|
||||
- Selectively start http, telnet or console at boot
|
||||
- Updated AceButton to 1.9.0 and ArduinoJson to 6.18.3
|
||||
|
||||
|
||||
## v0.6.0
|
||||
|
||||
### Commands:
|
||||
- Obsolete `dim` and `light` commands, use `backlight` command instead
|
||||
- Add `discovery` command to facilitate HA CC discovery
|
||||
- Add `idle` command to retrieve idle state, replaces `wakeup` command
|
||||
- Updated `moodlight` command with brightness support
|
||||
- Rewrite `outputX` and add `inputX` command
|
||||
|
||||
### Objects:
|
||||
- `lmeter` object renamed to `linemeter`
|
||||
- `align` values are now `left`, `right`, `center` instead of numbers *(numbers can still be used)*
|
||||
- Added `ext_click_h` and `ext_click_v` attributes to extend the clickable area
|
||||
- Added `clear` method to remove only the child objects from an object
|
||||
- New `tabview`, `tab`, `calendar` and `msgbox` objects
|
||||
- Add `img` object with png support *(needs PSram for any sizable images)*
|
||||
- Added missing properties of the `spinner` object
|
||||
|
||||
### Web UI:
|
||||
- Updated GPIO configuration pages
|
||||
- Include a File Editor on ESP32: Create, Edit, Upload, Delete and Apply pages.jsonl (Thanks Cossie)
|
||||
- Cache css, favicon and edit.htm.gz in the browser
|
||||
- New Information page layout, including MQTT message counters for sent, received and failed
|
||||
|
||||
### MCU:
|
||||
- Allow longer wifi ssid and password
|
||||
- Update partition boundaries to use *all* remaining space for lfs filesystem
|
||||
- Speed improvement: keep LVGL functions in fast memory & reduce overhead in main loop
|
||||
- Use ascii characterset for WT32-SC01 due to limited flash size
|
||||
|
||||
### GPIO rewrite:
|
||||
- Better handling of gpios
|
||||
- Support for Lanbon L8-HD dimmer (EU and AU version, thanks to @Stupco)
|
||||
- Add moodlight brightness support
|
||||
|
||||
### Broadcast and Discovery topic (HASP_USE_BROADCAST and HASP_USE_DISCOVERY)
|
||||
- Allow dynamic configuration of HA entities using the [openHASP Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component/releases/) (thanks @dgomes)
|
||||
- Add Manufacturer and Model to statusupdate
|
||||
|
||||
Updated libraries to lvgl 7.11.0, ArduinoJson 6.18.0 and TFT_eSPI 2.3.70
|
||||
|
||||
### Internationalization:
|
||||
- Added French language
|
||||
- Added Portuguese language (thanks @AndreTeixeira1998 and @dgomes)
|
||||
- Added Spanish language (thanks @altersis)
|
||||
|
||||
## v0.5.1
|
||||
|
||||
- Restore broken `config/submodule` topics
|
||||
- Don't show warning on `comment` attribute
|
||||
- Patched a potential memory leak
|
||||
- Added an automatic lv_mem_defrag to free up lvgl memory
|
||||
- Allow selection of fonts via user_config_override
|
||||
- Allow for longer mqtt configuration strings in user_config_override
|
||||
- Allow default HASP_GPIO_TEMPLATE configuration in user_config_override
|
||||
- Add `manufacturer` and `model` to statusupdate
|
||||
- Fixed `enabled` attribute and added `click` attribute
|
||||
|
||||
## v0.5.0
|
||||
|
||||
Name changed to openHASP - https://www.openhasp.com/
|
||||
> When using HomeAssistant also update the [openHASP Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component/releases/tag/0.5.0)
|
||||
|
||||
- Switch built-in icons from FontAwesome to MaterialDesign icons #139
|
||||
- Add built option for other character sets then latin1
|
||||
- Built-in Font sizes dependent on screen size
|
||||
- Add `swipe` property to switch pages
|
||||
- Add `action` property for local page navigation
|
||||
- Add `back`, `prev`, `next` attributes to pages #114
|
||||
- JSON Serialize text in payloads containing text attributes #140
|
||||
- Add az-touch-mod-esp32_ili9341 config and allow for TFT_BACKLIGHT_ON set to LOW #131
|
||||
- Add [FreeTouchDeck](https://www.openhasp.com/0.5/#devices/freetouchdeck/) and [ESP32-Touchdown](https://www.openhasp.com/0.5/#devices/esp32-touchdown/) configs
|
||||
- Add roller `mode` `infinite` attribute
|
||||
- Add btnmatrix `toggle` and `one_check` attributes
|
||||
- Rework all event handlers to reduce update events and prevent race condition #119 *(events have changed!)*
|
||||
- Add ability to style the selected part of roller object
|
||||
- Add `scan_method = WIFI_ALL_CHANNEL_SCAN` for ESP32, improving multi-AP connection
|
||||
- Add warning `objid` property is obsolete, use `obj` instead
|
||||
- Add warning `txt` property is obsolete, use `text` instead
|
||||
- Add dark theme build option for web UI
|
||||
- Update lvgl and tft_espi library version
|
||||
- Update maximum backlight_level from 100 to 255
|
||||
- Set default `HASP_LOG_LEVEL=LOG_LEVEL_TRACE`
|
||||
|
||||
## v0.4.0
|
||||
|
||||
**Note:** The partition scheme has changed and you will need to reflash the device over serial first.
|
||||
|
||||
*All data will be erased, so make sure to backup your pages.jsonl, config.json and fonts.*
|
||||
|
||||
Changes:
|
||||
- Provide all-in-one binary files for ESP32 to flash a device over serial using a single .bin file
|
||||
- Allow long wifi passwords (#71 thanks @nagyrobi)
|
||||
- Wakeup screen on first touch (#80)
|
||||
- Reduce slider events (#88)
|
||||
- Update events to accommodate the [HA Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component) (by @dgomes)
|
||||
- Remove HA auto-discovery in favor of the HA Custom Component
|
||||
- Add `clearpage all` command option
|
||||
- Add local page navigation and transitions
|
||||
- Add [scale properties](https://www.openhasp.com/0.5/#styling/#scale)
|
||||
- Add `config/gpio` command
|
||||
- Allow for timezone setting in user_config_override.h (thanks @arovak)
|
||||
- Start localizations for NL, HU and RO (thanks @nagyrobi)
|
||||
- New prebuild devices:
|
||||
- esp32-touchdown (thanks @joelhaasnoot and @dustinwatts)
|
||||
- huzzah featherwing 2.4" and 3.5" (thanks @arovak)
|
||||
- m5stack-core2
|
||||
- Fix zi font crash bug
|
||||
- Update setting min/max attributes (#103 thanks @arovak)
|
||||
- Native builds for Windows, MacOS and Linux (thanks to @thouters and @dgomes)
|
||||
|
||||
## v0.3.4
|
||||
|
||||
The webserver was not properly started at initial setup, when the device was in AP mode.
|
||||
|
||||
## v0.3.3
|
||||
|
||||
- Change `txt` to `text`. `txt` is now obsoleted.
|
||||
- Initial support for moodlight e.g. Lanbon L8
|
||||
|
||||
## v0.3.2
|
||||
|
||||
- Add Lanbon L8
|
||||
- Add WT32-SC01
|
||||
|
||||
## v0.3.1
|
||||
|
||||
- Fixes wifi connection issue in OOBE
|
||||
- Fixes memory leak in value_str
|
||||
|
||||
## v0.3.0
|
||||
|
||||
First release of compiled .bin files
|
207
CHANGLELOG.md
207
CHANGLELOG.md
@ -1,207 +0,0 @@
|
||||
# openHASP Changelog
|
||||
|
||||
## v0.6.2
|
||||
|
||||
### Initial Setup
|
||||
- Add Captive Portal to first time setup (thanks @AndreTeixeira1998)
|
||||
- Create default `pages.jsonl`, `online.cmd` and `offline.cmd` files if they don't exist (thanks @nagyrobi)
|
||||
|
||||
### Objects
|
||||
- Enable `click` by default on `image` object
|
||||
- Add `type` to `spinner` object
|
||||
- Add `zoom`, `angle`, `pivot_x`, `pivot_y` and `antialias` attributes to `image` object
|
||||
- Allow url as `src` of `image` object for raw webimages and from push image service from the CC (thanks @dgomes and @nagyrobi)
|
||||
- Use `L:/file.png` instead of `/littlefs/file.png` for image paths, `/littlefs/` still works for backwards compatibility
|
||||
|
||||
### Objects
|
||||
- Add `antiburn` command to prevent static parts of the screen to create a *ghosting* effect in some LCDs or conditions
|
||||
|
||||
### Devices
|
||||
- Add Analog touch driver for Unoshield displays (thanks @wesleygas)
|
||||
- Add Arduitouch MOD ESP32 with 2.4" or 2.8"
|
||||
- Add Lilygo®Ttgo Pi ESP32 with TFT 3.5"
|
||||
- Add Waveshare ESP32 One development board with Rpi MHS4001(B) or Waveshare RPi(C) LCD display
|
||||
- Add D1-R32 ESP32 development board with with Waveshare ILI9486 Touch Shield
|
||||
|
||||
### Fonts
|
||||
~~- Add font loader on devices with PSram~~
|
||||
|
||||
### Bug fixes
|
||||
- Fix bug that caused a crash when both `btnmatrix` and `msgbox` where used (thanks @AndreTeixeira1998)
|
||||
- Fix L8-HD dimmer brightness initialization after a reboot (thanks @Stupco)
|
||||
- Keep last dimmer value when toggling dimmer state on/off
|
||||
- Fix configurable mqttPort (thanks @ Qargh)
|
||||
- Fix opaque background of `spinner` object in HASP theme (thanks @ nagyrobi)
|
||||
|
||||
Updated AceButton to 1.9.1 and ArduinoJson to 6.18.5
|
||||
|
||||
|
||||
## v0.6.1
|
||||
|
||||
### Commands
|
||||
- Add `run` command to execute script files (`.cmd` or `.jsonl`)
|
||||
- Add `unzip` command for __no-compression__ zip files
|
||||
- Add `service` command to start/stop a service
|
||||
|
||||
### Wifi
|
||||
- Don't reboot the plate anymore after prolonged wifi connection lost
|
||||
- Run `/online.cmd` or `/offline.cmd` script when the wifi status changed
|
||||
|
||||
### Objects
|
||||
- Add new *[line](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/objects/#line)* object
|
||||
- Add `val` to *[btnmatrix](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/objects/#button-matrix)* when `one_select` is set
|
||||
- Cache up to 20 *[images](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/objects/#image)* in PSram when available
|
||||
- Improve precision on the *[linemeter](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/objects/#line-meter)* scales
|
||||
- Fix *[dropdown](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/objects/#dropdown-list)* redraw bug
|
||||
|
||||
### Devices
|
||||
- Fix [L8-HD dimmer](https://haswitchplate.github.io/openHASP-docs/0.6.1/devices/lanbon-l8/) not responding correctly to mqtt after a reboot
|
||||
- Add [M5Stack Core2](https://haswitchplate.github.io/openHASP-docs/0.6.1/devices/m5stack-core2/) backlight dimming
|
||||
- Add [Yeacreate Nscreen32](https://haswitchplate.github.io/openHASP-docs/0.6.1/devices/yeacreate-nscreen32/)
|
||||
- Add [Makerfabs ESP32 TFT Touch](https://haswitchplate.github.io/openHASP-docs/0.6.1/devices/makerfabs-tft-touch/) Capacitive
|
||||
|
||||
### Fonts
|
||||
- [Additional characters](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/fonts/#ascii): `²` (squared) and `³` (cubed)
|
||||
- [Additional icons](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/fonts/#built-in-icons): recycle-variant and additional weather icons
|
||||
- Use latin1 as default charset on [WT32-SC01](https://haswitchplate.github.io/openHASP-docs/0.6.1/devices/wt32-sc01/)
|
||||
- Add [Greek font](https://haswitchplate.github.io/openHASP-docs/0.6.1/design/fonts/#greek)
|
||||
|
||||
### Compiling
|
||||
- Allow custom bootlogo
|
||||
- Selectively start http, telnet or console at boot
|
||||
- Updated AceButton to 1.9.0 and ArduinoJson to 6.18.3
|
||||
|
||||
|
||||
## v0.6.0
|
||||
|
||||
### Commands:
|
||||
- Obsolete `dim` and `light` commands, use `backlight` command instead
|
||||
- Add `discovery` command to facilitate HA CC discovery
|
||||
- Add `idle` command to retreive idle state, replaces `wakeup` command
|
||||
- Updated `moodlight` command with brightness support
|
||||
- Rewrite `outputX` and add `inputX` command
|
||||
|
||||
### Objects:
|
||||
- `lmeter` object renamed to `linemeter`
|
||||
- `align` values are now `left`, `right`, `center` instead of numbers *(numbers can still be used)*
|
||||
- Added `ext_click_h` and `ext_click_v` attributes to extend the clickable area
|
||||
- Added `clear` method to remove only the child objects from an object
|
||||
- New `tabview`, `tab`, `calendar` and `msgbox` objects
|
||||
- Add `img` object with png support *(needs PSram for any sizable images)*
|
||||
- Added missing properties of the `spinner` object
|
||||
|
||||
### Web UI:
|
||||
- Updated GPIO configuration pages
|
||||
- Include a File Editor on ESP32: Create, Edit, Upload, Delete and Apply pages.jsonl (Thanks Cossie)
|
||||
- Cache css, favicon and edit.htm.gz in the browser
|
||||
- New Information page layout, including MQTT message counters for sent, received and failed
|
||||
|
||||
### MCU:
|
||||
- Allow longer wifi ssid and password
|
||||
- Update partition boundaries to use *all* remaining space for lfs filesystem
|
||||
- Speed improvement: keep LVGL functions in fast memory & reduce overhead in main loop
|
||||
- Use ascii characterset for WT32-SC01 due to limited flash size
|
||||
|
||||
### GPIO rewrite:
|
||||
- Better handling of gpios
|
||||
- Support for Lanbon L8-HD dimmer (EU and AU version, thanks to @Stupco)
|
||||
- Add moodlight brightness support
|
||||
|
||||
### Broadcast and Discovery topic (HASP_USE_BROADCAST and HASP_USE_DISCOVERY)
|
||||
- Allow dynamic configuration of HA entities using the [openHASP Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component/releases/) (thanks @dgomes)
|
||||
- Add Manufacturer and Model to statusupdate
|
||||
|
||||
### Updated lvgl to 7.11.0, ArduinoJson to 6.18.0 and TFT_eSPI to 2.3.70
|
||||
|
||||
### Internationalization:
|
||||
- Added French language
|
||||
- Added Portuguese language (thanks @AndreTeixeira1998 and @dgomes)
|
||||
- Added Spanish language (thanks @altersis)
|
||||
|
||||
## v0.5.1
|
||||
|
||||
- Restore broken `config/submodule` topics
|
||||
- Don't show warning on `comment` attribute
|
||||
- Patched a potential memory leak
|
||||
- Added an automatic lv_mem_defrag to free up lvgl memory
|
||||
- Allow selection of fonts via user_config_override
|
||||
- Allow for longer mqtt configuration strings in user_config_override
|
||||
- Allow default HASP_GPIO_TEMPLATE configuration in user_config_override
|
||||
- Add `manufacturer` and `model` to statusupdate
|
||||
- Fixed `enabled` attribute and added `click` attribute
|
||||
|
||||
## v0.5.0
|
||||
|
||||
Name changed to openHASP - https://haswitchplate.github.io/openHASP-docs/
|
||||
> When using HomeAssistant also update the [openHASP Custom Component](https://github.com/HASwitchPlate/openHASP-custom-component/releases/tag/0.5.0)
|
||||
|
||||
- Switch built-in icons from FontAwesome to MaterialDesign icons #139
|
||||
- Add built option for other character sets then latin1
|
||||
- Built-in Font sizes dependent on screen size
|
||||
- Add `swipe` property to switch pages
|
||||
- Add `action` property for local page navigation
|
||||
- Add `back`, `prev`, `next` attributes to pages #114
|
||||
- JSON Serialize text in payloads containing text attributes #140
|
||||
- Add arduitouch-esp32_ili9341 config and allow for TFT_BACKLIGHT_ON set to LOW #131
|
||||
- Add [FreeTouchDeck](https://haswitchplate.github.io/openHASP-docs/#devices/freetouchdeck/) and [ESP32-Touchdown](https://haswitchplate.github.io/openHASP-docs/#devices/esp32-touchdown/) configs
|
||||
- Add roller `mode` `infinite` attribute
|
||||
- Add btnmatrix `toggle` and `one_check` attributes
|
||||
- Rework all event handlers to reduce update events and prevent race condition #119 *(events have changed!)*
|
||||
- Add ability to style the selected part of roller object
|
||||
- Add `scan_method = WIFI_ALL_CHANNEL_SCAN` for ESP32, improving multi-AP connection
|
||||
- Add warning `objid` property is obsolete, use `obj` instead
|
||||
- Add warning `txt` property is obsolete, use `text` instead
|
||||
- Add dark theme build option for web UI
|
||||
- Update lvgl and tft_espi library version
|
||||
- Update maximum backlight_level from 100 to 255
|
||||
- Set default `HASP_LOG_LEVEL=LOG_LEVEL_TRACE`
|
||||
|
||||
## v0.4.0
|
||||
|
||||
**Note:** The partition scheme has changed and you will need to reflash the device over serial first.
|
||||
|
||||
*All data will be erased, so make sure to backup your pages.jsonl, config.json and fonts.*
|
||||
|
||||
Changes:
|
||||
- Provide all-in-one binary files for ESP32 to flash a device over serial using a single .bin file
|
||||
- Allow long wifi passwords (#71 thanks @nagyrobi)
|
||||
- Wakeup screen on first touch (#80)
|
||||
- Reduce slider events (#88)
|
||||
- Update events to accommodate the [HA Custom Component](https://github.com/dgomes/hasp-lvgl-custom-component) (by @dgomes)
|
||||
- Remove HA auto-discovery in favor of the HA Custom Component
|
||||
- Add `clearpage all` command option
|
||||
- Add local page navigation and transitions
|
||||
- Add [scale properties](https://fvanroie.github.io/hasp-docs/#styling/#scale)
|
||||
- Add `config/gpio` command
|
||||
- Allow for timezone setting in user_config_override.h (thanks @arovak)
|
||||
- Start localizations for NL, HU and RO (thanks @nagyrobi)
|
||||
- New prebuild devices:
|
||||
- esp32-touchdown (thanks @joelhaasnoot and @dustinwatts)
|
||||
- huzzah featherwing 2.4" and 3.5" (thanks @arovak)
|
||||
- m5stack-core2
|
||||
- Fix zi font crash bug
|
||||
- Update setting min/max attributes (#103 thanks @arovak)
|
||||
- Native builds for Windows, MacOS and Linux (thanks to @thouters and @dgomes)
|
||||
|
||||
## v0.3.4
|
||||
|
||||
The webserver was not properly started at initial setup, when the device was in AP mode.
|
||||
|
||||
## v0.3.3
|
||||
|
||||
- Change `txt` to `text`. `txt` is now obsoleted.
|
||||
- Initial support for moodlight e.g. Lanbon L8
|
||||
|
||||
## v0.3.2
|
||||
|
||||
- Add Lanbon L8
|
||||
- Add WT32-SC01
|
||||
|
||||
## v0.3.1
|
||||
|
||||
- Fixes wifi connection issue in OOBE
|
||||
- Fixes memory leak in value_str
|
||||
|
||||
## v0.3.0
|
||||
|
||||
First release of compiled .bin files
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019-2021 Francis Van Roie
|
||||
Copyright (c) 2019-2024 Francis Van Roie
|
||||
Copyright (c) 2018-2019 Allen Derusha allen@derusha.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
|
51
README.md
51
README.md
@ -1,12 +1,12 @@
|
||||
# openHASP firmware
|
||||
|
||||
[](https://github.com/HASwitchPlate/openHASP/actions)
|
||||
[](https://github.com/HASwitchPlate/openHASP/actions)
|
||||
[](https://github.com/HASwitchPlate/openHASP/releases)
|
||||
[](http://github.com/HASwitchPlate/openHASP/issues)
|
||||
[][6]
|
||||
[][3]
|
||||
[](#Contributing)
|
||||
[](https://github.com/HASwitchPlate/openHASP/blob/master/LICENSE)
|
||||
[](https://www.buymeacoffee.com/aktdCofU)
|
||||
[](https://github.com/HASwitchPlate/openHASP#donate)
|
||||
|
||||
Control your home-automation devices from a customizable touchscreen UI connected via MQTT.
|
||||
|
||||
@ -14,49 +14,28 @@ This project is a re-implementation of the popular HASwitchPlate sketch created
|
||||
The [HASPone][1] project uses a Wemos D1 mini and requires a Nextion/TJC HMI display.
|
||||
This rewrite removes the Nextion/TJC hardware requirement by using the [Light and Versatile Graphics Library][2] on the MCU to drive a commodity display.
|
||||
|
||||
openHASP also adds ESP32 and STM32F4 support to take advantage of the additional hardware capabilities.
|
||||
openHASP uses the ESP32 and STM32F4 to take advantage of the hardware capabilities.
|
||||
|
||||
|
||||
## Demo Screens
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
## Features
|
||||
|
||||
| Feature (v0.6.0) | ESP8266 | ESP32 | STM32F4
|
||||
|-------------------------|---------|---------|----------
|
||||
| SPI display | :white_check_mark: yes | :white_check_mark: yes | :white_check_mark: yes
|
||||
| Parallel display | :x: no | :white_check_mark: yes | :white_check_mark: yes
|
||||
| PWM Screen dimming | :white_check_mark: yes | :white_check_mark: yes | :white_check_mark: yes
|
||||
| Maximum Page Count | 4 | 12 | 12
|
||||
| [Object Types / Widgets][7]| 20 | 20 | 20
|
||||
| Dynamic Objects | :white_check_mark: yes | :white_check_mark: yes | :white_check_mark: yes
|
||||
| Theme Support | yes | yes | yes
|
||||
| [Custom .zi V5 font][4] | :white_check_mark: yes (latin1) | :white_check_mark: yes (latin1) | no
|
||||
| MDI Icons | :white_check_mark: yes | :white_check_mark: yes | no
|
||||
| [PNG images][8] | :x: no | :white_check_mark: yes | :white_check_mark: yes
|
||||
| Network | :white_check_mark: Wi-Fi | :white_check_mark: Wi-Fi | :white_check_mark: Ethernet
|
||||

|
||||

|
||||

|
||||
|
||||
|
||||
## Getting Started
|
||||
|
||||
Check out the [documentation](https://haswitchplate.github.io/openHASP-docs/) for how-to's, information and frequently asked questions.
|
||||
Check out the [documentation](https://www.openhasp.com/) for how-to's, information and frequently asked questions.</br>
|
||||
For support using openHASP, please join the [#openHASP channel][3] on Discord.
|
||||
|
||||
Support
|
||||
---------------------------
|
||||
For support using openHASP, please join the [#openHASP channel][6] on Discord.
|
||||
## Donate
|
||||
|
||||
## [Buy me a coffee](https://www.buymeacoffee.com/aktdCofU)
|
||||
|
||||
[](https://www.buymeacoffee.com/aktdCofU)
|
||||
[][4]
|
||||
[](https://ko-fi.com/openhasp)
|
||||
[](https://www.buymeacoffee.com/aktdCofU)
|
||||
|
||||
[1]: https://github.com/HASwitchPlate/HASPone
|
||||
[2]: https://github.com/lvgl/lvgl
|
||||
[3]: https://littlevgl.com/themes
|
||||
[4]: https://github.com/fvanroie/HMI-Font-Pack/releases
|
||||
[5]: https://fontawesome.com/cheatsheet/
|
||||
[6]: https://discord.gg/VCWyuhF
|
||||
[7]: https://haswitchplate.github.io/openHASP-docs/0.6/design/objects#cheatsheet
|
||||
[8]: https://haswitchplate.github.io/openHASP-docs/0.6/design/objects#image
|
||||
[3]: https://www.openhasp.com/discord
|
||||
[4]: https://www.paypal.com/donate/?business=E76SN28JLZCXU¤cy_code=EUR
|
||||
|
35
boards/esp32s2.json
Normal file
35
boards/esp32s2.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s2_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s2",
|
||||
"variant": "esp32s2",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
35
boards/esp32s2_solo1.json
Normal file
35
boards/esp32s2_solo1.json
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s2_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": "-DBOARD_HAS_PSRAM -DCORE32SOLO1",
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qoi",
|
||||
"mcu": "esp32s2",
|
||||
"variant": "esp32s2",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s2.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S2",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 460800
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html",
|
||||
"vendor": "Espressif"
|
||||
}
|
43
boards/esp32s3_flash_16MB.json
Normal file
43
boards/esp32s3_flash_16MB.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld"
|
||||
},
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DARDUINO_ESP32S3_DEV",
|
||||
"-DARDUINO_USB_MODE=1",
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"default_tool": "esp-builtin",
|
||||
"onboard_tools": [
|
||||
"esp-builtin"
|
||||
],
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"arduino",
|
||||
"espidf"
|
||||
],
|
||||
"name": "ESP32-S3-FLASH-16MB",
|
||||
"upload": {
|
||||
"flash_size": "16MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 16777216,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
"url": "null",
|
||||
"vendor": "null"
|
||||
}
|
41
boards/esp32s3_opi_opi.json
Normal file
41
boards/esp32s3_opi_opi.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "opi_opi"
|
||||
},
|
||||
"boot": "opi",
|
||||
"psram_type": "opi",
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
41
boards/esp32s3_opi_qspi.json
Normal file
41
boards/esp32s3_opi_qspi.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "opi_qspi"
|
||||
},
|
||||
"boot": "opi",
|
||||
"psram_type": "qspi",
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
41
boards/esp32s3_qio_opi.json
Normal file
41
boards/esp32s3_qio_opi.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_opi"
|
||||
},
|
||||
"boot": "qio",
|
||||
"psram_type": "opi",
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
41
boards/esp32s3_qio_qspi.json
Normal file
41
boards/esp32s3_qio_qspi.json
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"build": {
|
||||
"arduino": {
|
||||
"ldscript": "esp32s3_out.ld",
|
||||
"memory_type": "qio_qspi"
|
||||
},
|
||||
"boot": "qio",
|
||||
"psram_type": "qspi",
|
||||
"core": "esp32",
|
||||
"extra_flags": [
|
||||
"-DARDUINO_RUNNING_CORE=1",
|
||||
"-DARDUINO_EVENT_RUNNING_CORE=1"
|
||||
],
|
||||
"f_cpu": "240000000L",
|
||||
"f_flash": "80000000L",
|
||||
"flash_mode": "qio",
|
||||
"mcu": "esp32s3",
|
||||
"variant": "esp32s3",
|
||||
"partitions": "esp32_partition_app1856k_spiffs320k.csv"
|
||||
},
|
||||
"connectivity": [
|
||||
"wifi"
|
||||
],
|
||||
"debug": {
|
||||
"openocd_target": "esp32s3.cfg"
|
||||
},
|
||||
"frameworks": [
|
||||
"espidf",
|
||||
"arduino"
|
||||
],
|
||||
"name": "Espressif Generic ESP32-S3 4M Flash, Tasmota 1856k Code/OTA, 320k FS",
|
||||
"upload": {
|
||||
"flash_size": "4MB",
|
||||
"maximum_ram_size": 327680,
|
||||
"maximum_size": 4194304,
|
||||
"require_upload_port": true,
|
||||
"speed": 921600
|
||||
},
|
||||
"url": "https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/hw-reference/esp32s3/",
|
||||
"vendor": "Espressif"
|
||||
}
|
5
crowdin.yml
Normal file
5
crowdin.yml
Normal file
@ -0,0 +1,5 @@
|
||||
files:
|
||||
- source: data/en.json
|
||||
translation: /data/%locale_with_underscore%.%file_extension%
|
||||
- source: /src/lang/en_US.h
|
||||
translation: /%original_path%/%locale_with_underscore%.%file_extension%
|
BIN
data/cert/x509_crt_bundle.bin
Normal file
BIN
data/cert/x509_crt_bundle.bin
Normal file
Binary file not shown.
162
data/da_DK.json
Normal file
162
data/da_DK.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Dansk",
|
||||
"home": {
|
||||
"title": "Hovedmenu",
|
||||
"btn": "Hovedmenu",
|
||||
"nav": "Forside"
|
||||
},
|
||||
"save": "Gem Indstillinger",
|
||||
"user": "Brugernavn",
|
||||
"pass": "Adgangskode",
|
||||
"hasp": {
|
||||
"title": "HASP Design",
|
||||
"btn": "HASP Design",
|
||||
"theme": "UI Tema",
|
||||
"color1": "Primær farve",
|
||||
"color2": "Sekundær farve",
|
||||
"pages": "Start Layout",
|
||||
"font": "Standardfont",
|
||||
"startpage": "Opstarts side",
|
||||
"startdim": "Opstartslysstyrke"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Skærmbillede",
|
||||
"btn": "Skærmbillede",
|
||||
"nav": "Skærmbillede",
|
||||
"prev": "Forrige Side",
|
||||
"next": "Næste Side",
|
||||
"refresh": "Opdater"
|
||||
},
|
||||
"info": {
|
||||
"title": "Information",
|
||||
"btn": "Information",
|
||||
"nav": "Information"
|
||||
},
|
||||
"config": {
|
||||
"title": "Konfiguration",
|
||||
"btn": "Konfiguration",
|
||||
"nav": "Indstillinger"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Firmware Opdatering",
|
||||
"btn": "Firmware Opdatering",
|
||||
"nav": "Firmware",
|
||||
"submit": "Opdater Firmware",
|
||||
"file": "Firmware Fil",
|
||||
"url": "Firmware URL",
|
||||
"redirect": "Følg Omdirigeringer",
|
||||
"never": "Aldrig",
|
||||
"strict": "Streng",
|
||||
"always": "Altid"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Fil Editor",
|
||||
"btn": "Fil Editor",
|
||||
"nav": "Fil Editor"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Gendan fabriksindstillinger",
|
||||
"btn": "Gendan fabriksindstillinger",
|
||||
"warning": "Advarsel",
|
||||
"message": "Denne proces vil nulstille alle indstillinger til standardværdierne. Den interne flash vil blive slettet, og enheden genstartes. Du skal muligvis oprette forbindelse til WiFi AP vist på panelet for at omkonfigurere enheden, før du får adgang til den igen.",
|
||||
"fileloss": "ALLE FILER VIL TABE!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Genstarter...",
|
||||
"btn": "Genstart",
|
||||
"nav": "Genstart",
|
||||
"message": "Enheden er ved at genstarte."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Baseret på det tidligere arbejde fra følgende open source-udviklere:",
|
||||
"copyright": "Ophavsret ",
|
||||
"rights": "Alle rettigheder forbeholdes.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT Licens",
|
||||
"bsd": "Bsd Licens",
|
||||
"freebsd": "FreeBSD Licens",
|
||||
"apache2": "Apache2 Licens"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "WiFi Indstillinger",
|
||||
"btn": "WiFi Indstillinger",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Settings",
|
||||
"btn": "WireGuard Settings",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT Indstillinger",
|
||||
"btn": "MQTT Indstillinger",
|
||||
"name": "Værtsnavn",
|
||||
"group": "Gruppenavn",
|
||||
"host": "Broker",
|
||||
"port": "Port",
|
||||
"node_t": "Node Emne",
|
||||
"group_t": "Gruppe Emne",
|
||||
"broadcast_t": "Broadcast Emne",
|
||||
"hass_t": "HA LWT Emne"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP Indstillinger",
|
||||
"btn": "HTTP Indstillinger"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP Indstillinger",
|
||||
"btn": "FTP Indstillinger",
|
||||
"port": "FTP Port",
|
||||
"pasv": "Passiv Port"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Skærm Indstillinger",
|
||||
"btn": "Skærm Indstillinger",
|
||||
"antiburn": "Antiforbrænding",
|
||||
"calibrate": "Kalibrér"
|
||||
},
|
||||
"gpio": "GPIO Indstillinger",
|
||||
"debug": {
|
||||
"title": "Debug Indstillinger",
|
||||
"btn": "Debug Indstillinger",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Tele Periode",
|
||||
"ansi": "Brug ANSI-koder",
|
||||
"host": "Syslog Server",
|
||||
"port": "Syslog Port",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facilitet"
|
||||
},
|
||||
"time": {
|
||||
"title": "Tids Indstillinger",
|
||||
"btn": "Tids Indstillinger",
|
||||
"region": "Region",
|
||||
"zone": "Tidszone",
|
||||
"tz": "Tidszone",
|
||||
"ntp": "NTP-servere"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Kontinenter ",
|
||||
"af": "Afrika ",
|
||||
"as": "Asien ",
|
||||
"au": "Australien ",
|
||||
"aq": "Antarktis ",
|
||||
"eu": "Europa ",
|
||||
"na": "Nordamerika ",
|
||||
"sa": "Sydamerika ",
|
||||
"islands": "Øer ",
|
||||
"at": "Atlanterhavet ",
|
||||
"in": "Indiske Ocean ",
|
||||
"pa": "Stillehavet "
|
||||
}
|
||||
}
|
||||
}
|
162
data/de_DE.json
Normal file
162
data/de_DE.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Deutsch",
|
||||
"home": {
|
||||
"title": "Hauptmenü",
|
||||
"btn": "Hauptmenü",
|
||||
"nav": "Startseite"
|
||||
},
|
||||
"save": "Einstellungen speichern",
|
||||
"user": "Benutzername",
|
||||
"pass": "Passwort",
|
||||
"hasp": {
|
||||
"title": "HASP-Design",
|
||||
"btn": "HASP-Design",
|
||||
"theme": "UI-Thema",
|
||||
"color1": "Hauptfarbe",
|
||||
"color2": "Sekundärfarbe",
|
||||
"pages": "Start-Layout",
|
||||
"font": "Standardschrift",
|
||||
"startpage": "Startseite",
|
||||
"startdim": "Starthelligkeit"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Bildschirmaufnahme",
|
||||
"btn": "Bildschirmaufnahme",
|
||||
"nav": "Bildschirmaufnahme",
|
||||
"prev": "Vorherige Seite",
|
||||
"next": "Nächste Seite",
|
||||
"refresh": "Aktualisieren"
|
||||
},
|
||||
"info": {
|
||||
"title": "Informationen",
|
||||
"btn": "Informationen",
|
||||
"nav": "Informationen"
|
||||
},
|
||||
"config": {
|
||||
"title": "Konfiguration",
|
||||
"btn": "Konfiguration",
|
||||
"nav": "Konfiguration"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Firmware Update",
|
||||
"btn": "Firmware Update",
|
||||
"nav": "Firmware",
|
||||
"submit": "Firmware aktualisieren",
|
||||
"file": "Firmware-Datei",
|
||||
"url": "Firmware-URL",
|
||||
"redirect": "Umleitungen folgen",
|
||||
"never": "Niemals",
|
||||
"strict": "Strikt",
|
||||
"always": "Immer"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Datei Editor",
|
||||
"btn": "Datei Editor",
|
||||
"nav": "Datei Editor"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Werkseinsetzung",
|
||||
"btn": "Werkseinstellungen zurücksetzen",
|
||||
"warning": "Warnung",
|
||||
"message": "Dieser Prozess setzt alle Einstellungen auf die Standardwerte zurück. Der interne Blitz wird gelöscht und das Gerät wird neu gestartet. Möglicherweise müssen Sie eine Verbindung zu dem WiFi AP auf dem Panel herstellen, um das Gerät neu zu konfigurieren, bevor Sie auf es erneut zugreifen.",
|
||||
"fileloss": "ALLE DATEIEN WERDEN GELÖSCHT!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Neustarten...",
|
||||
"btn": "Neustarten",
|
||||
"nav": "Neustart",
|
||||
"message": "Das Gerät wird neu gestartet."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Basierend auf der bisherigen Arbeit der folgenden Open-Source-Entwickler:",
|
||||
"copyright": "Urheberrechte ",
|
||||
"rights": "Alle Rechte vorbehalten.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT-Lizenz",
|
||||
"bsd": "BSD-Lizenz",
|
||||
"freebsd": "FreeBSD-Lizenz",
|
||||
"apache2": "Apache2-Lizenz"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "WiFi-Einstellungen",
|
||||
"btn": "WiFi-Einstellungen",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Einstellungen",
|
||||
"btn": "WireGuard Einstellungen",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Privater Schlüssel",
|
||||
"host": "Entfernte IP",
|
||||
"port": "Entfernter Port",
|
||||
"pubkey": "Öffentlicher Remote-Schlüssel"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT-Einstellungen",
|
||||
"btn": "MQTT-Einstellungen",
|
||||
"name": "Hostname",
|
||||
"group": "Gruppenname",
|
||||
"host": "Broker",
|
||||
"port": "Port",
|
||||
"node_t": "Knoten-Thema",
|
||||
"group_t": "Gruppen-Thema",
|
||||
"broadcast_t": "Broadcast-Thema",
|
||||
"hass_t": "HA LWT-Thema"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP-Einstellungen",
|
||||
"btn": "HTTP-Einstellungen"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP-Einstellungen",
|
||||
"btn": "FTP-Einstellungen",
|
||||
"port": "FTP-Port",
|
||||
"pasv": "Passiver Port"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Bildschirmeinstellungen",
|
||||
"btn": "Bildschirmeinstellungen",
|
||||
"antiburn": "Anti-Burn",
|
||||
"calibrate": "Kalibrieren"
|
||||
},
|
||||
"gpio": "GPIO-Einstellungen",
|
||||
"debug": {
|
||||
"title": "Debug-Einstellungen",
|
||||
"btn": "Debug-Einstellungen",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Tele-Periode",
|
||||
"ansi": "ANSI-Codes verwenden",
|
||||
"host": "Syslog-Server",
|
||||
"port": "Syslog-Port",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Zeit Einstellungen",
|
||||
"btn": "Zeit Einstellungen",
|
||||
"region": "Region",
|
||||
"zone": "Zeitzone",
|
||||
"tz": "Zeitzone",
|
||||
"ntp": "NTP-Server"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Kontinenten ",
|
||||
"af": "Afrika ",
|
||||
"as": "Asien ",
|
||||
"au": "Australien ",
|
||||
"aq": "Antarctica ",
|
||||
"eu": "Europa ",
|
||||
"na": "Nordamerika ",
|
||||
"sa": "Südamerika ",
|
||||
"islands": "Inseln ",
|
||||
"at": "Atlantischer Ozean ",
|
||||
"in": "Indischer Ozean ",
|
||||
"pa": "Pazifischer Ozean "
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
BIN
data/edit.htm.gz
BIN
data/edit.htm.gz
Binary file not shown.
1
data/en.json
Normal file
1
data/en.json
Normal file
@ -0,0 +1 @@
|
||||
{"en":{"language":"English","home":{"title":"Main Menu","btn":"Main Menu","nav":"Home"},"save":"Save Settings","user":"Username","pass":"Password","hasp":{"title":"HASP Design","btn":"HASP Design","theme":"UI Theme","color1":"Primary color","color2":"Secondary color","pages":"Start Layout","font":"Default Font","startpage":"Startup Page","startdim":"Startup Dim"},"screenshot":{"title":"Screenshot","btn":"Screenshot","nav":"Screenshot","prev":"Prev Page","next":"Next Page","refresh":"Refresh"},"info":{"title":"Information","btn":"Information","nav":"Information"},"config":{"title":"Configuration","btn":"Configuration","nav":"Settings"},"ota":{"title":"Firmware Update","btn":"Firmware Update","nav":"Firmware","submit":"Update Firmware","file":"Firmware File","url":"Firmware URL","redirect":"Follow Redirects","never":"Never","strict":"Strict","always":"Always"},"editor":{"title":"File Editor","btn":"File Editor","nav":"File Editor"},"reset":{"title":"Factory Reset","btn":"Factory Reset","warning":"Warning","message":"This process will reset all settings to the default values. The internal flash will be erased and the device is restarted. You may need to connect to the WiFi AP displayed on the panel to reconfigure the device before accessing it again.","fileloss":"ALL FILES WILL BE LOST!"},"reboot":{"title":"Rebooting...","btn":"Restart","nav":"Reboot","message":"The device is rebooting."},"about":{"credits":"Based on the previous work of the following open source developers:","copyright":"Copyright ","rights":"All rights reserved.","clause1":"Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:","clause2":"The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.","clause3":"THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","mit":"MIT License","bsd":"BSD License","freebsd":"FreeBSD License","apache2":"Apache2 License"},"wifi":{"title":"Wifi Settings","btn":"Wifi Settings","ssid":"SSID"},"wg":{"title":"WireGuard Settings","btn":"WireGuard Settings","vpnip":"VPN IP","privkey":"Private Key","host":"Remote IP","port":"Remote Port","pubkey":"Remote Public Key"},"mqtt":{"title":"MQTT Settings","btn":"MQTT Settings","name":"Hostname","group":"Groupname","host":"Broker","port":"Port","node_t":"Node Topic","group_t":"Group Topic","broadcast_t":"Broadcast Topic","hass_t":"HA LWT Topic"},"http":{"title":"HTTP Settings","btn":"HTTP Settings"},"ftp":{"title":"FTP Settings","btn":"FTP Settings","port":"FTP Port","pasv":"Passive Port"},"gui":{"title":"Display Settings","btn":"Display Settings","antiburn":"Antiburn","calibrate":"Calibrate"},"gpio":"GPIO Settings","debug":{"title":"Debug Settings","btn":"Debug Settings","baud":"Baudrate","tele":"Tele Period","ansi":"Use ANSI codes","host":"Syslog Server","port":"Syslog Port","ietf":"IETF (RFC 5424)","bsd":"BSD (RFC 3164)","log":"Facility"},"time":{"title":"Time Settings","btn":"Time Settings","region":"Region","zone":"Timezone","tz":"Timezone","ntp":"NTP Servers"},"region":{"etc":"Etcetera ","continents":"Continents ","af":"Africa ","as":"Asia ","au":"Australia ","aq":"Antarctica ","eu":"Europe ","na":"North America ","sa":"South America ","islands":"Islands ","at":"Atlantic Ocean ","in":"Indian Ocean ","pa":"Pacific Ocean "}}}
|
162
data/es_ES.json
Normal file
162
data/es_ES.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Español",
|
||||
"home": {
|
||||
"title": "Menu Principal",
|
||||
"btn": "Menu Principal",
|
||||
"nav": "Inicio"
|
||||
},
|
||||
"save": "Guardar Configuración",
|
||||
"user": "Usuario",
|
||||
"pass": "Contraseña",
|
||||
"hasp": {
|
||||
"title": "Diseño de HASP",
|
||||
"btn": "Diseño de HASP",
|
||||
"theme": "Tema de IU",
|
||||
"color1": "Color Primario",
|
||||
"color2": "Color Secundario",
|
||||
"pages": "Diseño Inicial",
|
||||
"font": "Fuente por Defecto",
|
||||
"startpage": "Página de Inicio",
|
||||
"startdim": "Brillo Inicial"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Captura de Pantalla",
|
||||
"btn": "Captura de Pantalla",
|
||||
"nav": "Captura de Pantalla",
|
||||
"prev": "Prev Página",
|
||||
"next": "Siguiente Página",
|
||||
"refresh": "Actualizar"
|
||||
},
|
||||
"info": {
|
||||
"title": "Información",
|
||||
"btn": "Información",
|
||||
"nav": "Información"
|
||||
},
|
||||
"config": {
|
||||
"title": "Configuración",
|
||||
"btn": "Configuración",
|
||||
"nav": "Configuraciones"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Actualización de Firmware",
|
||||
"btn": "Actualización de Firmware",
|
||||
"nav": "Firmware",
|
||||
"submit": "Actualizar Firmware",
|
||||
"file": "Archivo Firmware",
|
||||
"url": "URL del Firmware",
|
||||
"redirect": "Sigue Redirecciones",
|
||||
"never": "Nunca",
|
||||
"strict": "Estricto",
|
||||
"always": "Siempre"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Editor de Archivos",
|
||||
"btn": "Editor de Archivos",
|
||||
"nav": "Editor de Archivos"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Reconfiguración de Fábrica",
|
||||
"btn": "Restaurar conf de Fábrica",
|
||||
"warning": "Aviso",
|
||||
"message": "Este proceso restablecerá todos los ajustes a los valores predeterminados. El flash interno se borrará y el dispositivo se reiniciará. Es posible que necesite conectarse al AP WiFi mostrado en el panel para reconfigurar el dispositivo antes de volver a acceder a él.",
|
||||
"fileloss": "¡TODOS LOS ARCHIVOS SERÁN PERDIDOS!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Reiniciando...",
|
||||
"btn": "Reiniciar",
|
||||
"nav": "Reiniciar",
|
||||
"message": "El dispositivo se está reiniciando."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Basado en el trabajo anterior de los siguientes desarrolladores de código abierto:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "Todos los derechos reservados.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Licencia MIT",
|
||||
"bsd": "Licencia BSD",
|
||||
"freebsd": "Licencia FreeBSD",
|
||||
"apache2": "Licencia Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Ajustes WiFi",
|
||||
"btn": "Ajustes WiFi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "Ajustes de WireGuard",
|
||||
"btn": "Ajustes de WireGuard",
|
||||
"vpnip": "IP VPN",
|
||||
"privkey": "Clave Privada",
|
||||
"host": "IP Remota",
|
||||
"port": "Puerto Remoto",
|
||||
"pubkey": "Clave Pública Remota"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Ajustes MQTT",
|
||||
"btn": "Ajustes MQTT",
|
||||
"name": "Nombre del Host",
|
||||
"group": "Nombre del Grupo",
|
||||
"host": "Broker",
|
||||
"port": "Puerto",
|
||||
"node_t": "Tema del Nodo",
|
||||
"group_t": "Tema del Grupo",
|
||||
"broadcast_t": "Tema de Broadcast",
|
||||
"hass_t": "Tema HA LWT"
|
||||
},
|
||||
"http": {
|
||||
"title": "Ajustes HTTP",
|
||||
"btn": "Ajustes HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Ajustes FTP",
|
||||
"btn": "Ajustes FTP",
|
||||
"port": "Puerto FTP",
|
||||
"pasv": "Puerto Pasivo"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Ajustes de Pantalla",
|
||||
"btn": "Ajustes de Pantalla",
|
||||
"antiburn": "Anti-quemaduras",
|
||||
"calibrate": "Calibrar"
|
||||
},
|
||||
"gpio": "Ajustes GPIO",
|
||||
"debug": {
|
||||
"title": "Ajustes de Depuración",
|
||||
"btn": "Ajustes de Depuración",
|
||||
"baud": "Tasa Baudios",
|
||||
"tele": "Periodo de Tele",
|
||||
"ansi": "Usar códigos ANSI",
|
||||
"host": "Servidor Syslog",
|
||||
"port": "Puerto Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Ajustes de Tiempo",
|
||||
"btn": "Ajustes de Tiempo",
|
||||
"region": "Región",
|
||||
"zone": "Zona Horaria",
|
||||
"tz": "Zona Horaria",
|
||||
"ntp": "Servidor NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continentes ",
|
||||
"af": "Africa ",
|
||||
"as": "Asia ",
|
||||
"au": "Australia ",
|
||||
"aq": "Antártida ",
|
||||
"eu": "Europa ",
|
||||
"na": "América del Norte ",
|
||||
"sa": "América del Sur ",
|
||||
"islands": "Islas ",
|
||||
"at": "Océano Atlántico ",
|
||||
"in": "Océano Índico ",
|
||||
"pa": "Océano Pacífico "
|
||||
}
|
||||
}
|
||||
}
|
162
data/fr_FR.json
Normal file
162
data/fr_FR.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Français",
|
||||
"home": {
|
||||
"title": "Menu Principal",
|
||||
"btn": "Menu Principal",
|
||||
"nav": "Page d'accueil"
|
||||
},
|
||||
"save": "Enregistrer les Paramètres",
|
||||
"user": "Nom d'utilisateur",
|
||||
"pass": "Mot de Passe",
|
||||
"hasp": {
|
||||
"title": "Design HASP",
|
||||
"btn": "Design HASP",
|
||||
"theme": "Thème UI",
|
||||
"color1": "Couleur Primaire",
|
||||
"color2": "Couleur Secondaire",
|
||||
"pages": "Mise en page",
|
||||
"font": "Police par défaut",
|
||||
"startpage": "Page de départ",
|
||||
"startdim": "Luminosité"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Capture d'écran",
|
||||
"btn": "Capture d'écran",
|
||||
"nav": "Capture d'écran",
|
||||
"prev": "Page Précédente",
|
||||
"next": "Page Suivante",
|
||||
"refresh": "Actualiser"
|
||||
},
|
||||
"info": {
|
||||
"title": "Information",
|
||||
"btn": "Information",
|
||||
"nav": "Information"
|
||||
},
|
||||
"config": {
|
||||
"title": "Configuration",
|
||||
"btn": "Configuration",
|
||||
"nav": "Paramètres"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Mise à jour du micrologiciel",
|
||||
"btn": "Mise à jour du micrologiciel",
|
||||
"nav": "Micrologiciel",
|
||||
"submit": "Mettre à jour le firmware",
|
||||
"file": "Fichier du Firmware",
|
||||
"url": "URL du Firmware",
|
||||
"redirect": "Suivre les redirections",
|
||||
"never": "Jamais",
|
||||
"strict": "Stricte",
|
||||
"always": "Toujours"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Éditeur de fichiers",
|
||||
"btn": "Éditeur de fichiers",
|
||||
"nav": "Éditeur de fichiers"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Paramètres d'usine",
|
||||
"btn": "Retour aux paramètres d'usine",
|
||||
"warning": "Attention",
|
||||
"message": "Ce processus va réinitialiser tous les paramètres aux valeurs par défaut. Le flash interne sera effacé et l'appareil sera redémarré. Il se peut que vous deviez vous connecter à l'AP WiFi affiché sur le panneau pour reconfigurer l'appareil avant d'y accéder.",
|
||||
"fileloss": "TOUS LES FICHIERS SERONT PERDUS !"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Redémarrage en cours...",
|
||||
"btn": "Redémarrer",
|
||||
"nav": "Redémarrer",
|
||||
"message": "L'appareil est en cours de redémarrage."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Basé sur le travail précédent des développeurs Open Source suivants :",
|
||||
"copyright": "Droits d’auteur ",
|
||||
"rights": "Tous les droits sont réservés.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Licence MIT",
|
||||
"bsd": "Licence BSD",
|
||||
"freebsd": "Licence FreeBSD",
|
||||
"apache2": "Licence Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Paramètres WiFi",
|
||||
"btn": "Paramètres WiFi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "Paramètres WireGuard",
|
||||
"btn": "Paramètres WireGuard",
|
||||
"vpnip": "IP du VPN",
|
||||
"privkey": "Clé Privée",
|
||||
"host": "Adresse IP distante",
|
||||
"port": "Port Distant",
|
||||
"pubkey": "Clé publique distante"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Paramètres MQTT",
|
||||
"btn": "Paramètres MQTT",
|
||||
"name": "Nom d'hôte",
|
||||
"group": "Groupe",
|
||||
"host": "Broker",
|
||||
"port": "Port",
|
||||
"node_t": "Sujet du Node",
|
||||
"group_t": "Sujet de Groupe",
|
||||
"broadcast_t": "Sujet Broadcast",
|
||||
"hass_t": "Sujet HA LWT"
|
||||
},
|
||||
"http": {
|
||||
"title": "Paramètres HTTP",
|
||||
"btn": "Paramètres HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Paramètres FTP",
|
||||
"btn": "Paramètres FTP",
|
||||
"port": "Port FTP",
|
||||
"pasv": "Port Passif"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Paramètres d'affichage",
|
||||
"btn": "Paramètres d'affichage",
|
||||
"antiburn": "Anti-brûlure",
|
||||
"calibrate": "Calibrer"
|
||||
},
|
||||
"gpio": "Paramètres GPIO",
|
||||
"debug": {
|
||||
"title": "Paramètres de Débogage",
|
||||
"btn": "Paramètres de Débogage",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Période de Tele",
|
||||
"ansi": "Utiliser les codes ANSI",
|
||||
"host": "Serveur Syslog",
|
||||
"port": "Port Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Paramètres de l'heure",
|
||||
"btn": "Paramètres de l'heure",
|
||||
"region": "Région",
|
||||
"zone": "Fuseau horaire",
|
||||
"tz": "Fuseau horaire",
|
||||
"ntp": "Serveurs NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continents ",
|
||||
"af": "L'Afrique ",
|
||||
"as": "L'Asie ",
|
||||
"au": "L'Australie ",
|
||||
"aq": "Antarctique ",
|
||||
"eu": "L’Europe ",
|
||||
"na": "L'Amérique du Nord ",
|
||||
"sa": "L'Amérique du Sud ",
|
||||
"islands": "Îles ",
|
||||
"at": "L'océan Atlantique ",
|
||||
"in": "L'océan Indien ",
|
||||
"pa": "L'océan Pacifique "
|
||||
}
|
||||
}
|
||||
}
|
162
data/hu_HU.json
Normal file
162
data/hu_HU.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Magyar",
|
||||
"home": {
|
||||
"title": "Főmenü",
|
||||
"btn": "Főmenü",
|
||||
"nav": "Főoldal"
|
||||
},
|
||||
"save": "Beállítások mentése",
|
||||
"user": "Felhasználónév",
|
||||
"pass": "Jelszó",
|
||||
"hasp": {
|
||||
"title": "Képernyő dizájn",
|
||||
"btn": "Képernyő dizájn",
|
||||
"theme": "UI téma",
|
||||
"color1": "Elsődleges szín",
|
||||
"color2": "Másodlagos szín",
|
||||
"pages": "Betöltendő oldalak",
|
||||
"font": "Alapértelmezett font",
|
||||
"startpage": "Kezdő oldal",
|
||||
"startdim": "Kezdeti fényerő"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Képernyőkép",
|
||||
"btn": "Képernyőkép",
|
||||
"nav": "Képernyőkép",
|
||||
"prev": "Előző oldal",
|
||||
"next": "Következő oldal",
|
||||
"refresh": "Frissítés"
|
||||
},
|
||||
"info": {
|
||||
"title": "Információk",
|
||||
"btn": "Információk",
|
||||
"nav": "Információk"
|
||||
},
|
||||
"config": {
|
||||
"title": "Beállítások",
|
||||
"btn": "Beállítások",
|
||||
"nav": "Beállítások"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Firmware frissítés",
|
||||
"btn": "Firmware frissítés",
|
||||
"nav": "Firmware",
|
||||
"submit": "Firmware frissítése",
|
||||
"file": "Firmware fájl",
|
||||
"url": "Firmware URL",
|
||||
"redirect": "Átirányítások",
|
||||
"never": "Soha",
|
||||
"strict": "Szigorú",
|
||||
"always": "Mindig"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Fájlkezelő",
|
||||
"btn": "Fájlkezelő",
|
||||
"nav": "Fájlkezelő"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Gyári beállítások visszaállítása",
|
||||
"btn": "Gyári beállítások visszaállítása",
|
||||
"warning": "Képernyőkép",
|
||||
"message": "Ez a folyamat az összes beállítást visszaállítja az alapértelmezett értékekre. A belső memória törlődik, majd a készülék újraindul. Előfordulhat, hogy csatlakoznia kell a panelen megjelenő WiFi hozzáférési ponthoz az eszköz újrakonfigurálásához, mielőtt ismét hozzá tudna férni.",
|
||||
"fileloss": "AZ ÖSSZES FÁJL TÖRLŐDIK!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Újraindítás...",
|
||||
"btn": "Újraindítás",
|
||||
"nav": "Újraindítás",
|
||||
"message": "Az eszköz újraindul."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Az alábbi nyílt forráskódú fejlesztők korábbi munkája alapján:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "Minden jog fenntartva.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT licenc",
|
||||
"bsd": "BSD licenc",
|
||||
"freebsd": "FreeBSD licenc",
|
||||
"apache2": "Apache2 licenc"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "WiFi beállítások",
|
||||
"btn": "WiFi beállítások",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Settings",
|
||||
"btn": "WireGuard Settings",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT beállítások",
|
||||
"btn": "MQTT beállítások",
|
||||
"name": "Név",
|
||||
"group": "Csoport",
|
||||
"host": "Szerver",
|
||||
"port": "Port",
|
||||
"node_t": "Eszköz topik",
|
||||
"group_t": "Csoport topik",
|
||||
"broadcast_t": "Mindenki topik",
|
||||
"hass_t": "HA LWT topik"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP beállítások",
|
||||
"btn": "HTTP beállítások"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP beállítások",
|
||||
"btn": "FTP beállítások",
|
||||
"port": "FTP Port",
|
||||
"pasv": "Passzív Port"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Képernyő beállítások",
|
||||
"btn": "Képernyő beállítások",
|
||||
"antiburn": "Beégésvédelem futtatása",
|
||||
"calibrate": "Kalibrálás"
|
||||
},
|
||||
"gpio": "GPIO beállítások",
|
||||
"debug": {
|
||||
"title": "Hibakeresési beállítások",
|
||||
"btn": "Hibakeresési beállítások",
|
||||
"baud": "Baud ráta",
|
||||
"tele": "Tele- periódus",
|
||||
"ansi": "ANSI kódolás",
|
||||
"host": "Syslog szerver",
|
||||
"port": "Syslog port",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Idő beállítások",
|
||||
"btn": "Idő beállítások",
|
||||
"region": "Régió",
|
||||
"zone": "Időzóna",
|
||||
"tz": "Időzóna",
|
||||
"ntp": "NTP szerverek"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Kontinensek ",
|
||||
"af": "Afrika ",
|
||||
"as": "Ázsia ",
|
||||
"au": "Ausztrália ",
|
||||
"aq": "Antarktika ",
|
||||
"eu": "Európa ",
|
||||
"na": "Észak-Amerika ",
|
||||
"sa": "Dél-Amerika ",
|
||||
"islands": "Szigetek ",
|
||||
"at": "Atlanti-óceán ",
|
||||
"in": "Indiai-óceán ",
|
||||
"pa": "Csendes-óceán "
|
||||
}
|
||||
}
|
||||
}
|
1
data/main.js
Normal file
1
data/main.js
Normal file
File diff suppressed because one or more lines are too long
162
data/nl_NL.json
Normal file
162
data/nl_NL.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Nederlands",
|
||||
"home": {
|
||||
"title": "Hoofdmenu",
|
||||
"btn": "Hoofdmenu",
|
||||
"nav": "Hoofdpagina"
|
||||
},
|
||||
"save": "Instellingen Opslaan",
|
||||
"user": "Gebruikersnaam",
|
||||
"pass": "Wachtwoord",
|
||||
"hasp": {
|
||||
"title": "HASP Design",
|
||||
"btn": "HASP Design",
|
||||
"theme": "UI Thema",
|
||||
"color1": "Primaire Kleur",
|
||||
"color2": "Secundaire Kleur",
|
||||
"pages": "Start Lay-out",
|
||||
"font": "Standaard Lettertype",
|
||||
"startpage": "Startpagina",
|
||||
"startdim": "Start Helderheid"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Schermafdruk",
|
||||
"btn": "Schermafdruk",
|
||||
"nav": "Schermafdruk",
|
||||
"prev": "Vorige Pagina",
|
||||
"next": "Volgende Pagina",
|
||||
"refresh": "Vernieuwen"
|
||||
},
|
||||
"info": {
|
||||
"title": "Informatie",
|
||||
"btn": "Informatie",
|
||||
"nav": "Informatie"
|
||||
},
|
||||
"config": {
|
||||
"title": "Instellingen",
|
||||
"btn": "Instellingen",
|
||||
"nav": "Instellingen"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Firmware Bijwerken",
|
||||
"btn": "Firmware Bijwerken",
|
||||
"nav": "Firmware",
|
||||
"submit": "Firmware Bijwerken",
|
||||
"file": "Firmware Bestand",
|
||||
"url": "Firmware URL",
|
||||
"redirect": "Volg Redirects",
|
||||
"never": "Nooit",
|
||||
"strict": "Strikt",
|
||||
"always": "Altijd"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Bestandseditor",
|
||||
"btn": "Bestandseditor",
|
||||
"nav": "Bestandseditor"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Fabrieksinstellingen",
|
||||
"btn": "Fabrieksinstellingen",
|
||||
"warning": "Waarschuwing",
|
||||
"message": "Dit proces zal alle instellingen terugzetten naar de standaardwaarden. De interne flash zal worden gewist en het apparaat wordt opnieuw gestart. U moet mogelijk verbinding maken met het Wifi AP die wordt weergegeven op het paneel om het apparaat opnieuw te configureren voordat u weer toegang krijgt.",
|
||||
"fileloss": "ALLE BESTANDEN WORDEN VERWIJDERD!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Herstarten...",
|
||||
"btn": "Herstarten",
|
||||
"nav": "Herstart",
|
||||
"message": "Het apparaat wordt herstart."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Gebaseerd op het eerdere werk van de volgende Open Source ontwikkelaars:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "Alle rechten voorbehouden.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT Licentie",
|
||||
"bsd": "BSD Licentie",
|
||||
"freebsd": "FreeBSD Licentie",
|
||||
"apache2": "Apache2 Licentie"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Wifi Instellingen",
|
||||
"btn": "Wifi Instellingen",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Instellingen",
|
||||
"btn": "WireGuard Instellingen",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Sleutel",
|
||||
"host": "Extern IP",
|
||||
"port": "Externe Poort",
|
||||
"pubkey": "Externe Openbare Sleutel"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT Instellingen",
|
||||
"btn": "MQTT Instellingen",
|
||||
"name": "Hostnaam",
|
||||
"group": "Groepsnaam",
|
||||
"host": "Broker",
|
||||
"port": "Poort",
|
||||
"node_t": "Node Onderwerp",
|
||||
"group_t": "Groep Onderwerp",
|
||||
"broadcast_t": "Broadcast Onderwerp",
|
||||
"hass_t": "HA LWT Onderwerp"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP Instellingen",
|
||||
"btn": "HTTP Instellingen"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP Instellingen",
|
||||
"btn": "FTP Instellingen",
|
||||
"port": "FTP Poort",
|
||||
"pasv": "Passieve Poort"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Scherminstellingen",
|
||||
"btn": "Scherminstellingen",
|
||||
"antiburn": "Inbranden Voorkomen",
|
||||
"calibrate": "Kalibreer"
|
||||
},
|
||||
"gpio": "GPIO Instellingen",
|
||||
"debug": {
|
||||
"title": "Debug Instellingen",
|
||||
"btn": "Debug Instellingen",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Tele Periode",
|
||||
"ansi": "Gebruik ANSI codes",
|
||||
"host": "Syslog Server",
|
||||
"port": "Syslog Poort",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Faciliteit"
|
||||
},
|
||||
"time": {
|
||||
"title": "Tijdsinstellingen",
|
||||
"btn": "Tijdsinstellingen",
|
||||
"region": "Regio",
|
||||
"zone": "Tijdzone",
|
||||
"tz": "Tijdzone",
|
||||
"ntp": "NTP Servers"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continenten ",
|
||||
"af": "Afrika ",
|
||||
"as": "Azië ",
|
||||
"au": "Australië ",
|
||||
"aq": "Antarctica ",
|
||||
"eu": "Europa ",
|
||||
"na": "Noord-Amerika ",
|
||||
"sa": "Zuid-Amerika ",
|
||||
"islands": "Eilanden ",
|
||||
"at": "Atlantische Oceaan ",
|
||||
"in": "Indische Oceaan ",
|
||||
"pa": "Stille Oceaan "
|
||||
}
|
||||
}
|
||||
}
|
BIN
data/openhasp.ttf
Normal file
BIN
data/openhasp.ttf
Normal file
Binary file not shown.
73
data/pages/lanbon_l8-hs.jsonl
Normal file
73
data/pages/lanbon_l8-hs.jsonl
Normal file
@ -0,0 +1,73 @@
|
||||
{"page":1,"comment":"Connected Relay Buttons"}
|
||||
{"id":1,"obj":"switch","x":30,"y":40,"w":180,"h":75,"radius":40,"radius20":40,"groupid":1}
|
||||
{"id":2,"obj":"switch","x":30,"y":122,"w":180,"h":75,"radius":40,"radius20":40,"groupid":2}
|
||||
{"id":3,"obj":"switch","x":30,"y":205,"w":180,"h":75,"radius":40,"radius20":40,"groupid":3}
|
||||
|
||||
{"page":2,"comment":"WLED Control Panel"}
|
||||
{"id":103,"obj":"switch","x":12,"y":29,"w":60,"h":20,"radius":15}
|
||||
{"id":104,"obj":"label","x":10,"y":5,"w":180,"h":32,"text":"Night Light","text_color":"#FFFFFF"}
|
||||
{"id":105,"obj":"label","x":5,"y":57,"w":180,"h":32,"text":"Brightness","text_color":"#FFFFFF"}
|
||||
{"id":106,"obj":"slider","x":34,"y":82,"w":14,"h":90,"min":0,"max":255}
|
||||
{"id":107,"obj":"cpicker","x":85,"y":10,"w":150,"h":150}
|
||||
{"id":108,"obj":"dropdown","x":10,"y":200,"w":115,"h":30,"options":""}
|
||||
{"id":110,"obj":"btn","x":10,"y":255,"w":115,"h":30}
|
||||
{"id":111,"obj":"label","x":15,"y":180,"w":180,"h":32,"text":"Preset","text_color":"#FFFFFF"}
|
||||
{"id":112,"obj":"label","x":15,"y":260,"w":180,"h":32,"text":"","text_color":"#FFFFFF"}
|
||||
{"id":113,"obj":"label","x":160,"y":180,"w":180,"h":32,"text":"Intensity","text_color":"#FFFFFF"}
|
||||
{"id":114,"obj":"label","x":160,"y":233,"w":180,"h":32,"text":"Speed","text_color":"#FFFFFF"}
|
||||
{"id":115,"obj":"slider","x":145,"y":205,"w":90,"h":14,"min":0,"max":255}
|
||||
{"id":116,"obj":"slider","x":145,"y":260,"w":90,"h":14,"min":0,"max":255}
|
||||
{"id":117,"obj":"label","x":15,"y":233,"w":180,"h":32,"text":"Random Effect","text_color":"#FFFFFF"}
|
||||
|
||||
{"page":3,"comment":"Media Player"}
|
||||
{"id":10,"obj":"obj","x":5,"y":35,"w":230,"h":250,"click":0,"bg_opa":0,"shadow_opa":140,"shadow_color":"black","shadow_width":20,"shadow_spread":0}
|
||||
{"id":13,"obj":"label","x":0,"y":5,"w":117,"h":30,"text":"-","mode":"scroll","align":1}
|
||||
{"id":12,"obj":"label","x":120,"y":5,"w":120,"h":30,"text":"-","mode":"scroll","align":1}
|
||||
{"id":14,"obj":"bar","x":8,"y":278,"w":200,"h":5,"min":0,"max":100,"border_opa":0,"pad_top":0,"pad_bottom":0,"pad_left":0,"pad_right":0}
|
||||
{"id":21,"obj":"obj","x":8,"y":35,"w":200,"h":200,"radius":6,"clip_corner":1,"hidden":1}
|
||||
{"id":22,"obj":"img","x":0,"y":0,"w":200,"h":200,"parentid":21,"src":"","auto_size":1}
|
||||
{"id":17,"obj":"btn","x":8,"y":226,"w":50,"h":50,"toggle":false,"text":"\uE4AE","text_font":32}
|
||||
{"id":18,"obj":"btn","x":66,"y":226,"w":83,"h":50,"toggle":false,"text":"\uE40A","text_font":32}
|
||||
{"id":19,"obj":"btn","x":157,"y":226,"w":51,"h":50,"toggle":false,"text":"\uE4AD","text_font":32}
|
||||
{"id":20,"obj":"slider","x":212,"y":38,"w":20,"h":244,"min":0,"max":100,"val":85}
|
||||
|
||||
{"page":4,"comment":"Thermostat"}
|
||||
{"id":1,"obj":"label","x":5,"y":5,"w":230,"h":25,"text":"Master Bedroom","align":"center"}
|
||||
{"id":10,"obj":"obj","x":5,"y":35,"w":230,"h":250,"click":0}
|
||||
{"id":20,"obj":"arc","x":5,"y":37,"w":230,"h":230,"min":170,"max":300,"val":250,"border_side":0,"type":0,"rotation":0,"start_angle":135,"end_angle":45,"adjustable":"true","line_width":21,"line_width10":21,"line_color10":"#34bdeb","bg_opa":0,"pad_top20":5,"pad_bottom20":5,"pad_left20":5,"pad_right20":5,"pad_top":5,"pad_bottom":5,"pad_left":5,"pad_right":5}
|
||||
{"id":21,"obj":"gauge","x":28,"y":28,"w":175,"h":175,"parentid":20,"min":170,"max":300,"val":224,"format":1,"critical_value":301,"label_count":14,"line_count":27,"border_width":0,"pad_top":2,"pad_bottom":2,"pad_left":2,"pad_right":2,"value_str":"°C","value_ofs_y":55,"value_font":16,"bg_opa":0,"line_width10":3,"line_rounded10":1,"line_color":"#348feb","line_color60":"#348feb","scale_grad_color":"#eb4934","scale_grad_color60":"#eb4934","scale_end_color60":"#eb4934"}
|
||||
{"id":22,"obj":"obj","x":85,"y":85,"w":60,"h":60,"parentid":20,"click":0,"radius":30,"border_width":2,"border_opa":200}
|
||||
{"id":23,"obj":"label","x":80,"y":100,"w":70,"h":30,"parentid":20,"text":"22.4","text_font":24,"align":"center"}
|
||||
{"id":24,"obj":"obj","x":145,"y":245,"w":60,"h":30,"click":0,"radius":5}
|
||||
{"id":25,"obj":"label","x":145,"y":245,"w":60,"h":30,"text":"25","text_font":24,"align":"center"}
|
||||
{"id":26,"obj":"label","x":90,"y":220,"w":60,"h":30,"text":"#909090 \u2022# #000000 \u2022# #909090 \u2022#","text_font":24,"align":"center","text_color":"grey","border_width":0}
|
||||
{"id":30,"obj":"tabview","x":0,"y":235,"w":240,"h":80,"btn_pos":0,"bg_opa":0,"border_width":0,"radius":0}
|
||||
{"id":31,"obj":"tab","parentid":30}
|
||||
{"id":32,"obj":"tab","parentid":30}
|
||||
{"id":33,"obj":"tab","parentid":30}
|
||||
{"id":41,"obj":"switch","x":35,"y":10,"w":60,"h":30,"parentid":31,"radius":25,"radius20":25}
|
||||
{"id":42,"obj":"dropdown","x":15,"y":10,"w":110,"h":30,"parentid":32,"options":"fan_modes","direction":"1","radius":5}
|
||||
{"id":43,"obj":"dropdown","x":15,"y":10,"w":110,"h":30,"parentid":33,"options":"hvac_modes","direction":"1","radius":5}
|
||||
|
||||
{"page":5,"comment":"Backlight"}
|
||||
{"id":1,"obj":"label","x":5,"y":5,"w":230,"h":25,"text":"Backlight","align":"center"}
|
||||
{"id":10,"obj":"btn","x":20,"y":40,"w":90,"h":75,"text":"10%","action":{"up":"backlight {'state':'on','brightness':26}"}}
|
||||
{"id":11,"obj":"btn","x":130,"y":40,"w":90,"h":75,"text":"40%","action":{"up":"backlight {'state':'on','brightness':103}"}}
|
||||
{"id":12,"obj":"btn","x":20,"y":122,"w":90,"h":75,"text":"70%","action":{"up":"backlight {'state':'on','brightness':179}"}}
|
||||
{"id":13,"obj":"btn","x":130,"y":122,"w":90,"h":75,"text":"100%","action":{"up":"backlight {'state':'on','brightness':255}"}}
|
||||
{"id":14,"obj":"btn","x":20,"y":205,"w":200,"h":75,"text":"Off","action":{"up":"backlight {'state':'off'}"}}
|
||||
|
||||
{"page":6,"comment":"Moodlight"}
|
||||
{"id":1,"obj":"label","x":5,"y":5,"w":230,"h":25,"text":"Moodlight","align":"center"}
|
||||
{"id":10,"obj":"btn","x":20,"y":40,"w":90,"h":75,"text":"Red","action":{"up":"moodlight {'state':'on','brightness':255,'color':'red'}","hold":"moodlight {'state':'on','brightness':255,'color':'maroon'}"}}
|
||||
{"id":11,"obj":"btn","x":20,"y":122,"w":90,"h":75,"text":"Green","action":{"up":"moodlight {'state':'on','brightness':255,'color':'green'}","hold":"moodlight {'state':'on','brightness':255,'color':'lime'}"}}
|
||||
{"id":12,"obj":"btn","x":20,"y":205,"w":90,"h":75,"text":"Blue","action":{"up":"moodlight {'state':'on','brightness':255,'color':'blue'}","hold":"moodlight {'state':'on','brightness':255,'color':'cyan'}"}}
|
||||
{"id":13,"obj":"btn","x":130,"y":40,"w":90,"h":75,"text":"Yellow","action":{"up":"moodlight {'state':'on','brightness':255,'color':'yellow'}","hold":"moodlight {'state':'on','brightness':255,'color':'orange'}"}}
|
||||
{"id":14,"obj":"btn","x":130,"y":122,"w":90,"h":75,"text":"Purple","action":{"up":"moodlight {'state':'on','brightness':255,'color':'purple'}","hold":"moodlight {'state':'on','brightness':255,'color':'magenta'}"}}
|
||||
{"id":15,"obj":"btn","x":130,"y":205,"w":90,"h":75,"text":"Off","action":{"up":"moodlight {'state':'off'}","hold":"moodlight {'state':'on','brightness':255,'color':'white'}"}}
|
||||
|
||||
{"page":0,"comment":"Page Navigation"}
|
||||
{"id":1,"obj":"btn","action":"prev","x":0,"y":290,"w":79,"h":32,"bg_color":"#2C3E50","text":"\uE141","text_color":"#FFFFFF","radius":0,"border_side":0,"text_font":28}
|
||||
{"id":2,"obj":"btn","action":"p1","x":80,"y":290,"w":80,"h":32,"bg_color":"#2C3E50","text":"\uE2DC","text_color":"#FFFFFF","radius":0,"border_side":0,"text_font":22}
|
||||
{"id":3,"obj":"btn","action":"next","x":161,"y":290,"w":79,"h":32,"bg_color":"#2C3E50","text":"\uE142","text_color":"#FFFFFF","radius":0,"border_side":0,"text_font":28}
|
||||
{"id":6,"obj":"obj","swipe":1,"x":0,"y":0,"h":30,"w":240,"opacity":0,"comment":"swipe-area-at-top"}
|
1
data/pages/pages.jsonl
Normal file
1
data/pages/pages.jsonl
Normal file
@ -0,0 +1 @@
|
||||
{"page":1,"id":10,"w":240,"obj":"label","text":"%hostname%"}
|
162
data/pt_BR.json
Normal file
162
data/pt_BR.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Portuguese-Brazil",
|
||||
"home": {
|
||||
"title": "Menu Principal",
|
||||
"btn": "Menu Principal",
|
||||
"nav": "Início"
|
||||
},
|
||||
"save": "Guardar Configuração",
|
||||
"user": "Usuário",
|
||||
"pass": "Senha",
|
||||
"hasp": {
|
||||
"title": "Design do HASP",
|
||||
"btn": "Design do HASP",
|
||||
"theme": "Tema da IU",
|
||||
"color1": "Cor principal",
|
||||
"color2": "Cor secundária",
|
||||
"pages": "Layout inicial",
|
||||
"font": "Fonte padrão",
|
||||
"startpage": "Startup Page",
|
||||
"startdim": "Startup Dim"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Screenshot",
|
||||
"btn": "Screenshot",
|
||||
"nav": "Screenshot",
|
||||
"prev": "Página Anterior",
|
||||
"next": "Página Seguinte",
|
||||
"refresh": "Atualizar"
|
||||
},
|
||||
"info": {
|
||||
"title": "Informação",
|
||||
"btn": "Informação",
|
||||
"nav": "Informação"
|
||||
},
|
||||
"config": {
|
||||
"title": "Configuração",
|
||||
"btn": "Configuração",
|
||||
"nav": "Configuração"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Atualização do firmware",
|
||||
"btn": "Atualização do firmware",
|
||||
"nav": "Firmware",
|
||||
"submit": "Atualizar o firmware",
|
||||
"file": "Arquivo de Firmware",
|
||||
"url": "URL de Firmware",
|
||||
"redirect": "Seguir redirecionamentos",
|
||||
"never": "Nunca",
|
||||
"strict": "Estrito",
|
||||
"always": "Sempre"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Editor de ficheiros",
|
||||
"btn": "Editor de ficheiros",
|
||||
"nav": "Editor de ficheiros"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Repor configuração de fábrica",
|
||||
"btn": "Repor configuração de fábrica",
|
||||
"warning": "Aviso",
|
||||
"message": "Este processo irá redefinir todas as configurações para os valores padrão. O flash interno será apagado e o dispositivo será reiniciado. Talvez seja necessário conectar-se ao WiFi AP exibido no painel para reconfigurar o dispositivo antes de acessá-lo novamente.",
|
||||
"fileloss": "TODOS OS ARQUIVOS SERÃO PERDIDOS!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Reiniciando...",
|
||||
"btn": "Reiniciar",
|
||||
"nav": "Reiniciar",
|
||||
"message": "Este dispositivo está reiniciando."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Com base no trabalho anterior dos seguintes desenvolvedores de código aberto:",
|
||||
"copyright": "Direitos autorais ",
|
||||
"rights": "Todos os direitos reservados.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Licença MIT",
|
||||
"bsd": "Licença BSD",
|
||||
"freebsd": "Licença FreeBSD",
|
||||
"apache2": "Licença Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Configurar Wifi",
|
||||
"btn": "Configurar Wifi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Settings",
|
||||
"btn": "WireGuard Settings",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Configurar MQTT",
|
||||
"btn": "Configurar MQTT",
|
||||
"name": "Nome do host",
|
||||
"group": "Nome do Grupo",
|
||||
"host": "Broker",
|
||||
"port": "Porta",
|
||||
"node_t": "Tópico do Node",
|
||||
"group_t": "Tópico do Grupo",
|
||||
"broadcast_t": "Tópico do Broadcast",
|
||||
"hass_t": "Tópico HA LWT"
|
||||
},
|
||||
"http": {
|
||||
"title": "Configurar HTTP",
|
||||
"btn": "Configurar HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Configurar FTP",
|
||||
"btn": "Configurar FTP",
|
||||
"port": "Porta FTP",
|
||||
"pasv": "Porta Passiva"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Configurar Tela",
|
||||
"btn": "Configurar Tela",
|
||||
"antiburn": "Anti-queimadura",
|
||||
"calibrate": "Calibrar"
|
||||
},
|
||||
"gpio": "Configurar GPIO",
|
||||
"debug": {
|
||||
"title": "Configurar debug",
|
||||
"btn": "Configurar debug",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Período Tele",
|
||||
"ansi": "Usar códigos ANSI",
|
||||
"host": "Servidor Syslog",
|
||||
"port": "Porta Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Configurar hora",
|
||||
"btn": "Configurar hora",
|
||||
"region": "Região",
|
||||
"zone": "Fuso horário",
|
||||
"tz": "Fuso horário",
|
||||
"ntp": "Servidores NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continentes ",
|
||||
"af": "África ",
|
||||
"as": "Ásia ",
|
||||
"au": "Austrália ",
|
||||
"aq": "Antarctica ",
|
||||
"eu": "Europa ",
|
||||
"na": "América do Norte ",
|
||||
"sa": "América do Sul ",
|
||||
"islands": "Ilhas ",
|
||||
"at": "Oceano Atlântico ",
|
||||
"in": "Oceano Índico ",
|
||||
"pa": "Oceano Pacífico "
|
||||
}
|
||||
}
|
||||
}
|
162
data/pt_PT.json
Normal file
162
data/pt_PT.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Português",
|
||||
"home": {
|
||||
"title": "Menu Principal",
|
||||
"btn": "Menu Principal",
|
||||
"nav": "Início"
|
||||
},
|
||||
"save": "Guardar Configuração",
|
||||
"user": "Utilizador",
|
||||
"pass": "Palavra-passe",
|
||||
"hasp": {
|
||||
"title": "Design do HASP",
|
||||
"btn": "Design do HASP",
|
||||
"theme": "Tema da IU",
|
||||
"color1": "Cor Principal",
|
||||
"color2": "Cor secundária",
|
||||
"pages": "Layout inicial",
|
||||
"font": "Fonte padrão",
|
||||
"startpage": "Startup Page",
|
||||
"startdim": "Startup Dim"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Screenshot",
|
||||
"btn": "Screenshot",
|
||||
"nav": "Screenshot",
|
||||
"prev": "Página Anterior",
|
||||
"next": "Página Seguinte",
|
||||
"refresh": "Atualizar"
|
||||
},
|
||||
"info": {
|
||||
"title": "Informação",
|
||||
"btn": "Informação",
|
||||
"nav": "Informação"
|
||||
},
|
||||
"config": {
|
||||
"title": "Configuração",
|
||||
"btn": "Configuração",
|
||||
"nav": "Configuração"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Atualização do firmware",
|
||||
"btn": "Atualização do firmware",
|
||||
"nav": "Firmware",
|
||||
"submit": "Atualizar o firmware",
|
||||
"file": "Arquivo de Firmware",
|
||||
"url": "URL do Firmware",
|
||||
"redirect": "Seguir Redirecionamentos",
|
||||
"never": "Nunca",
|
||||
"strict": "Estrito",
|
||||
"always": "Sempre"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Editor de ficheiros",
|
||||
"btn": "Editor de ficheiros",
|
||||
"nav": "Editor de ficheiros"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Repor configuração de fábrica",
|
||||
"btn": "Repor configuração de fábrica",
|
||||
"warning": "Aviso",
|
||||
"message": "Este processo irá redefinir todas as configurações para os valores padrão. O flash interno será apagado e o dispositivo será reiniciado. Talvez seja necessário conectar-se ao WiFi AP exibido no painel para reconfigurar o dispositivo antes de acessá-lo novamente.",
|
||||
"fileloss": "TODOS OS ARQUIVOS SERÃO PERDIDOS!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Reiniciando...",
|
||||
"btn": "Reiniciar",
|
||||
"nav": "Reiniciar",
|
||||
"message": "O dispositivo está reiniciando."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Baseado no trabalho anterior dos seguintes desenvolvedores de código aberto:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "Todos os direitos reservados.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Licença MIT",
|
||||
"bsd": "Licença BSD",
|
||||
"freebsd": "Licença FreeBSD",
|
||||
"apache2": "Licença Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Configurar Wifi",
|
||||
"btn": "Configurar Wifi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Settings",
|
||||
"btn": "WireGuard Settings",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Configurar MQTT",
|
||||
"btn": "Configurar MQTT",
|
||||
"name": "Nome do host",
|
||||
"group": "Nome do Grupo",
|
||||
"host": "Broker",
|
||||
"port": "Porta",
|
||||
"node_t": "Tópico do Node",
|
||||
"group_t": "Tópico de Grupo",
|
||||
"broadcast_t": "Tópico do Broadcast",
|
||||
"hass_t": "Tópico HA LWT"
|
||||
},
|
||||
"http": {
|
||||
"title": "Configurar HTTP",
|
||||
"btn": "Configurar HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Configurar FTP",
|
||||
"btn": "Configurar FTP",
|
||||
"port": "Porta de FTP",
|
||||
"pasv": "Porta Passiva"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Configurar tela",
|
||||
"btn": "Configurar tela",
|
||||
"antiburn": "Anti-queimaduras",
|
||||
"calibrate": "Calibrar"
|
||||
},
|
||||
"gpio": "Configurar MQTT",
|
||||
"debug": {
|
||||
"title": "Configurar debug",
|
||||
"btn": "Configurar debug",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Período Tele",
|
||||
"ansi": "Usar códigos ANSI",
|
||||
"host": "Servidor Syslog",
|
||||
"port": "Porta Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "Configurar Hora",
|
||||
"btn": "Configurar Hora",
|
||||
"region": "Região",
|
||||
"zone": "Fuso horário",
|
||||
"tz": "Fuso horário",
|
||||
"ntp": "Servidores NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continentes ",
|
||||
"af": "África ",
|
||||
"as": "Ásia ",
|
||||
"au": "Austrália ",
|
||||
"aq": "Antarctica ",
|
||||
"eu": "Europa ",
|
||||
"na": "América do Norte ",
|
||||
"sa": "América do Sul ",
|
||||
"islands": "Ilhas ",
|
||||
"at": "Oceano Atlântico ",
|
||||
"in": "Oceano Índico ",
|
||||
"pa": "Oceano Pacífico "
|
||||
}
|
||||
}
|
||||
}
|
162
data/ro_RO.json
Normal file
162
data/ro_RO.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Română",
|
||||
"home": {
|
||||
"title": "Meniu principal",
|
||||
"btn": "Meniu principal",
|
||||
"nav": "Acasă"
|
||||
},
|
||||
"save": "Salvarea setărilor",
|
||||
"user": "Nume utilizator",
|
||||
"pass": "Parola",
|
||||
"hasp": {
|
||||
"title": "Desenul ecranului",
|
||||
"btn": "Desenul ecranului",
|
||||
"theme": "Tema UI",
|
||||
"color1": "Culoare primară",
|
||||
"color2": "Culoare secundară",
|
||||
"pages": "Layout inițial",
|
||||
"font": "Font implicit",
|
||||
"startpage": "Pagină inițială",
|
||||
"startdim": "Luminozitatea"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Captură de ecran",
|
||||
"btn": "Captură de ecran",
|
||||
"nav": "Captură de ecran",
|
||||
"prev": "Pagina anterioară",
|
||||
"next": "Pagina următoare",
|
||||
"refresh": "Reîmprospătare"
|
||||
},
|
||||
"info": {
|
||||
"title": "Informații",
|
||||
"btn": "Informații",
|
||||
"nav": "Informații"
|
||||
},
|
||||
"config": {
|
||||
"title": "Setări",
|
||||
"btn": "Setări",
|
||||
"nav": "Setări"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Actualizare Firmware",
|
||||
"btn": "Actualizare Firmware",
|
||||
"nav": "Firmware",
|
||||
"submit": "Actualizarea firmware-ului",
|
||||
"file": "Fișier firmware",
|
||||
"url": "URL firmware",
|
||||
"redirect": "Redirecționări",
|
||||
"never": "Niciodată",
|
||||
"strict": "Strict",
|
||||
"always": "Mereu"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Browser de fișiere",
|
||||
"btn": "Browser de fișiere",
|
||||
"nav": "Browser de fișiere"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Resetare la parametri de fabrică",
|
||||
"btn": "Resetare la parametri de fabrică",
|
||||
"warning": "Avertizare",
|
||||
"message": "Acest proces va reseta toate setările la valorile implicite. Flash intern va fi șters și dispozitivul este repornit. Este posibil să fie necesar să vă conectați la WiFi AP afișat pe panou pentru a reconfigura dispozitivul înainte de a-l accesa din nou.",
|
||||
"fileloss": "TOATE FIȘIERELE VOR FI PIERDE!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Repornire...",
|
||||
"btn": "Repornire",
|
||||
"nav": "Repornire",
|
||||
"message": "Dispozitivul se repornire."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Pe baza lucrărilor anterioare ale următorilor dezvoltatori open source:",
|
||||
"copyright": "Drepturi de autor ",
|
||||
"rights": "Toate drepturile rezervate.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Licență MIT",
|
||||
"bsd": "Licență BSD",
|
||||
"freebsd": "Licență FreeBSD",
|
||||
"apache2": "Licență Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Setări WiFi",
|
||||
"btn": "Setări WiFi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard Settings",
|
||||
"btn": "WireGuard Settings",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Setări MQTT",
|
||||
"btn": "Setări MQTT",
|
||||
"name": "Nume gazdă",
|
||||
"group": "Nume grup",
|
||||
"host": "Broker",
|
||||
"port": "Poartă",
|
||||
"node_t": "Subiect nod",
|
||||
"group_t": "Subiect Grup",
|
||||
"broadcast_t": "Subiect difuzare",
|
||||
"hass_t": "Subiect HA LWT"
|
||||
},
|
||||
"http": {
|
||||
"title": "Setări HTTP",
|
||||
"btn": "Setări HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Setări FTP",
|
||||
"btn": "Setări FTP",
|
||||
"port": "Port FTP",
|
||||
"pasv": "Port Pasiv"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Setări ecran",
|
||||
"btn": "Setări ecran",
|
||||
"antiburn": "Anti-arsuri",
|
||||
"calibrate": "Calibrare"
|
||||
},
|
||||
"gpio": "Setări GPIO",
|
||||
"debug": {
|
||||
"title": "Setări Depanare",
|
||||
"btn": "Setări Depanare",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Perioada Tele",
|
||||
"ansi": "Utilizează codurile ANSI",
|
||||
"host": "Server Syslog",
|
||||
"port": "Poartă Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facilitate"
|
||||
},
|
||||
"time": {
|
||||
"title": "Setări de timp",
|
||||
"btn": "Setări de timp",
|
||||
"region": "Regiune",
|
||||
"zone": "Fus orar",
|
||||
"tz": "Fus orar",
|
||||
"ntp": "Servere NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Continente ",
|
||||
"af": "Africa ",
|
||||
"as": "Asia ",
|
||||
"au": "Australia ",
|
||||
"aq": "Antarctica ",
|
||||
"eu": "Europa ",
|
||||
"na": "America de Nord ",
|
||||
"sa": "America de Sud ",
|
||||
"islands": "Insulele ",
|
||||
"at": "Oceanul Atlantic ",
|
||||
"in": "Oceanul Indian ",
|
||||
"pa": "Oceanul Pacific "
|
||||
}
|
||||
}
|
||||
}
|
162
data/ru_RU.json
Normal file
162
data/ru_RU.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Русский",
|
||||
"home": {
|
||||
"title": "Главное меню",
|
||||
"btn": "Главное меню",
|
||||
"nav": "Домой"
|
||||
},
|
||||
"save": "Сохранить настройки",
|
||||
"user": "Имя пользователя",
|
||||
"pass": "Пароль",
|
||||
"hasp": {
|
||||
"title": "Оформление",
|
||||
"btn": "Настройка оформления",
|
||||
"theme": "Тема интерфейса",
|
||||
"color1": "Основной цвет",
|
||||
"color2": "Вторичный цвет",
|
||||
"pages": "Начальный макет",
|
||||
"font": "Шрифт по умолчанию",
|
||||
"startpage": "Стартовая страница",
|
||||
"startdim": "Ярокость при запуске"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Скриншот",
|
||||
"btn": "Скриншот",
|
||||
"nav": "Скиншот",
|
||||
"prev": "Предыдущая страница",
|
||||
"next": "Следующая страница",
|
||||
"refresh": "Обновить"
|
||||
},
|
||||
"info": {
|
||||
"title": "Информация",
|
||||
"btn": "Информация",
|
||||
"nav": "Информация"
|
||||
},
|
||||
"config": {
|
||||
"title": "Настройки",
|
||||
"btn": "Настройки",
|
||||
"nav": "Настройки"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Обновление прошивки",
|
||||
"btn": "Обновление прошивки",
|
||||
"nav": "Прошивка",
|
||||
"submit": "Обновление прошивки",
|
||||
"file": "Файл прошивки",
|
||||
"url": "URL прошивки",
|
||||
"redirect": "Разрешить редиректы",
|
||||
"never": "Никогда",
|
||||
"strict": "Строго",
|
||||
"always": "Всегда"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Редактор файлов",
|
||||
"btn": "Редактор файлов",
|
||||
"nav": "Редактор файлов"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Сброс на заводские настройки",
|
||||
"btn": "Сброс на заводские настройки",
|
||||
"warning": "Предупреждение",
|
||||
"message": "Этот процесс вернет все настройки к значениям по умолчанию. Внутренняя флэш-память будет очищена и устройство перезапустится. Возможно, вам придется подключиться к точке доступа Wi-Fi, отображаемой на панели, чтобы перенастроить устройство перед повторным доступом к нему.",
|
||||
"fileloss": "ВСЕ ФАЙЛЫ БУДУТ ПОТЕРЯНЫ!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Перезагрузка...",
|
||||
"btn": "Перезагрузка",
|
||||
"nav": "Перезагрузка",
|
||||
"message": "Устройство перезагружается."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Based on the previous work of the following open source developers:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "All rights reserved.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "Лицензия MIT",
|
||||
"bsd": "Лицезия BSD",
|
||||
"freebsd": "Лицензия FreeBSD",
|
||||
"apache2": "Лицензия Apache2"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Настройка WiFi",
|
||||
"btn": "Настройка WiFi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "Настройки WireGuard",
|
||||
"btn": "Настройки WireGuard",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "Private Key",
|
||||
"host": "Remote IP",
|
||||
"port": "Remote Port",
|
||||
"pubkey": "Remote Public Key"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "Настройки MQTT",
|
||||
"btn": "Настройки MQTT",
|
||||
"name": "Имя хоста",
|
||||
"group": "Имя группы",
|
||||
"host": "Брокер",
|
||||
"port": "Порт",
|
||||
"node_t": "Node Topic",
|
||||
"group_t": "Group Topic",
|
||||
"broadcast_t": "Broadcast Topic",
|
||||
"hass_t": "HA LWT Topic"
|
||||
},
|
||||
"http": {
|
||||
"title": "Настройки HTTP",
|
||||
"btn": "Настройки HTTP"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "Настройки FTP",
|
||||
"btn": "Настройкаи FTP",
|
||||
"port": "FTP порт",
|
||||
"pasv": "Пароль"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Настройки экрана",
|
||||
"btn": "Настройки экрана",
|
||||
"antiburn": "Прдеотвращение выгорания",
|
||||
"calibrate": "Калибровка"
|
||||
},
|
||||
"gpio": "Настройки GPIO",
|
||||
"debug": {
|
||||
"title": "Настройки отладки",
|
||||
"btn": "Настройки отладки",
|
||||
"baud": "Baudrate",
|
||||
"tele": "Tele период",
|
||||
"ansi": "Использовать кодировку ANSI",
|
||||
"host": "Сервер Syslog",
|
||||
"port": "Порт Syslog",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Объект"
|
||||
},
|
||||
"time": {
|
||||
"title": "Настройки времени",
|
||||
"btn": "Настройки времени",
|
||||
"region": "Регион",
|
||||
"zone": "Часовой пояс",
|
||||
"tz": "Часовой пояс",
|
||||
"ntp": "Сервер NTP"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Прочие ",
|
||||
"continents": "Континент ",
|
||||
"af": "Африка ",
|
||||
"as": "Азия ",
|
||||
"au": "Австралия ",
|
||||
"aq": "Антарктика ",
|
||||
"eu": "Европа ",
|
||||
"na": "Северная Америка ",
|
||||
"sa": "Южна Америка ",
|
||||
"islands": "Острова ",
|
||||
"at": "Атлантический океан ",
|
||||
"in": "Индийский океан ",
|
||||
"pa": "Тихий океан "
|
||||
}
|
||||
}
|
||||
}
|
1
data/script.js
Normal file
1
data/script.js
Normal file
File diff suppressed because one or more lines are too long
BIN
data/static/ace.1.9.6.min.js.gz
Normal file
BIN
data/static/ace.1.9.6.min.js.gz
Normal file
Binary file not shown.
BIN
data/static/hasp.htm.gz
Normal file
BIN
data/static/hasp.htm.gz
Normal file
Binary file not shown.
BIN
data/static/logo.svg.gz
Normal file
BIN
data/static/logo.svg.gz
Normal file
Binary file not shown.
BIN
data/static/petite-vue-i18n-lite.1.0.2.min.js.gz
Normal file
BIN
data/static/petite-vue-i18n-lite.1.0.2.min.js.gz
Normal file
Binary file not shown.
BIN
data/static/petite-vue.es.0.4.1.min.js.gz
Normal file
BIN
data/static/petite-vue.es.0.4.1.min.js.gz
Normal file
Binary file not shown.
BIN
data/static/petite-vue.hasp.js.gz
Normal file
BIN
data/static/petite-vue.hasp.js.gz
Normal file
Binary file not shown.
607
data/style.css
Normal file
607
data/style.css
Normal file
@ -0,0 +1,607 @@
|
||||
/* Icons SVG files */
|
||||
:root {
|
||||
--info: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-information-outline" viewBox="0 0 24 24"><path d="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" /></svg>');
|
||||
--home: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-home-outline" viewBox="0 0 24 24"><path d="M12 5.69L17 10.19V18H15V12H9V18H7V10.19L12 5.69M12 3L2 12H5V20H11V14H13V20H19V12H22" /></svg>');
|
||||
--shot: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-camera-outline" viewBox="0 0 24 24"><path d="M20,4H16.83L15,2H9L7.17,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6A2,2 0 0,0 20,4M20,18H4V6H8.05L9.88,4H14.12L15.95,6H20V18M12,7A5,5 0 0,0 7,12A5,5 0 0,0 12,17A5,5 0 0,0 17,12A5,5 0 0,0 12,7M12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15Z" /></svg>');
|
||||
--ota: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cpu-32-bit" viewBox="0 0 24 24"><path d="M9,3V5H7A2,2 0 0,0 5,7V9H3V11H5V13H3V15H5V17A2,2 0 0,0 7,19H9V21H11V19H13V21H15V19H17A2,2 0 0,0 19,17V15H21V13H19V11H21V9H19V7A2,2 0 0,0 17,5H15V3H13V5H11V3M7,9H10.5A1,1 0 0,1 11.5,10V14A1,1 0 0,1 10.5,15H7V13.5H10V12.75H8.5V11.25H10V10.5H7M12.5,9H16A1,1 0 0,1 17,10V11.75A1,1 0 0,1 16,12.75H14V13.5H17V15H12.5V12.25A1,1 0 0,1 13.5,11.25H15.5V10.5H12.5" /></svg>');
|
||||
--browse: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-edit-outline" viewBox="0 0 24 24"><path d="M10 20H6V4H13V9H18V12.1L20 10.1V8L14 2H6C4.9 2 4 2.9 4 4V20C4 21.1 4.9 22 6 22H10V20M20.2 13C20.3 13 20.5 13.1 20.6 13.2L21.9 14.5C22.1 14.7 22.1 15.1 21.9 15.3L20.9 16.3L18.8 14.2L19.8 13.2C19.9 13.1 20 13 20.2 13M20.2 16.9L14.1 23H12V20.9L18.1 14.8L20.2 16.9Z" /></svg>');
|
||||
--cog: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-cog-outline" viewBox="0 0 24 24"><path d="M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8M12,10A2,2 0 0,0 10,12A2,2 0 0,0 12,14A2,2 0 0,0 14,12A2,2 0 0,0 12,10M10,22C9.75,22 9.54,21.82 9.5,21.58L9.13,18.93C8.5,18.68 7.96,18.34 7.44,17.94L4.95,18.95C4.73,19.03 4.46,18.95 4.34,18.73L2.34,15.27C2.21,15.05 2.27,14.78 2.46,14.63L4.57,12.97L4.5,12L4.57,11L2.46,9.37C2.27,9.22 2.21,8.95 2.34,8.73L4.34,5.27C4.46,5.05 4.73,4.96 4.95,5.05L7.44,6.05C7.96,5.66 8.5,5.32 9.13,5.07L9.5,2.42C9.54,2.18 9.75,2 10,2H14C14.25,2 14.46,2.18 14.5,2.42L14.87,5.07C15.5,5.32 16.04,5.66 16.56,6.05L19.05,5.05C19.27,4.96 19.54,5.05 19.66,5.27L21.66,8.73C21.79,8.95 21.73,9.22 21.54,9.37L19.43,11L19.5,12L19.43,13L21.54,14.63C21.73,14.78 21.79,15.05 21.66,15.27L19.66,18.73C19.54,18.95 19.27,19.04 19.05,18.95L16.56,17.95C16.04,18.34 15.5,18.68 14.87,18.93L14.5,21.58C14.46,21.82 14.25,22 14,22H10M11.25,4L10.88,6.61C9.68,6.86 8.62,7.5 7.85,8.39L5.44,7.35L4.69,8.65L6.8,10.2C6.4,11.37 6.4,12.64 6.8,13.8L4.68,15.36L5.43,16.66L7.86,15.62C8.63,16.5 9.68,17.14 10.87,17.38L11.24,20H12.76L13.13,17.39C14.32,17.14 15.37,16.5 16.14,15.62L18.57,16.66L19.32,15.36L17.2,13.81C17.6,12.64 17.6,11.37 17.2,10.2L19.31,8.65L18.56,7.35L16.15,8.39C15.38,7.5 14.32,6.86 13.12,6.62L12.75,4H11.25Z" /></svg>');
|
||||
--star: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -6 16 16"><line y1="-3" y2="3" stroke="red" transform="rotate(15)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(75)"></line><line y1="-3" y2="3" stroke="red" transform="rotate(-45)"></line></svg>');
|
||||
--trash: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-trash-can-outline" width="24" height="24" viewBox="0 0 24 24"><path d="M9,3V4H4V6H5V19A2,2 0 0,0 7,21H17A2,2 0 0,0 19,19V6H20V4H15V3H9M7,6H17V19H7V6M9,8V17H11V8H9M13,8V17H15V8H13Z" /></svg>');
|
||||
--download: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-download" width="24" height="24" viewBox="0 0 24 24"><path d="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z" /></svg>');
|
||||
--upload: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-upload-outline" viewBox="0 0 24 24"><path d="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M12,12L16,16H13.5V19H10.5V16H8L12,12Z" /></svg>');
|
||||
--flash: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-chip" viewBox="0 0 24 24"><path d="M6,4H18V5H21V7H18V9H21V11H18V13H21V15H18V17H21V19H18V20H6V19H3V17H6V15H3V13H6V11H3V9H6V7H3V5H6V4M11,15V18H12V15H11M13,15V18H14V15H13M15,15V18H16V15H15Z" /></svg>');
|
||||
--file: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-outline" viewBox="0 0 24 24"><path d="M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" /></svg>');
|
||||
--dir: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-outline" viewBox="0 0 24 24"><path d="M20,18H4V8H20M20,6H12L10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6Z" /></svg>');
|
||||
--diropen: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder-open-outline" viewBox="0 0 24 24"><path d="M6.1,10L4,18V8H21A2,2 0 0,0 19,6H12L10,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H19C19.9,20 20.7,19.4 20.9,18.5L23.2,10H6.1M19,18H6L7.6,12H20.6L19,18Z" /></svg>');
|
||||
--html: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-code-tags" viewBox="0 0 24 24"><path d="M14.6,16.6L19.2,12L14.6,7.4L16,6L22,12L16,18L14.6,16.6M9.4,16.6L4.8,12L9.4,7.4L8,6L2,12L8,18L9.4,16.6Z" /></svg>');
|
||||
--image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-image-outline" viewBox="0 0 24 24"><path d="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M17,13V19H7L12,14L14,16M10,10.5A1.5,1.5 0 0,1 8.5,12A1.5,1.5 0 0,1 7,10.5A1.5,1.5 0 0,1 8.5,9A1.5,1.5 0 0,1 10,10.5Z" /></svg>');
|
||||
--zip: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-cabinet" viewBox="0 0 24 24"><path d="M14,8H10V6H14V8M20,4V20C20,21.11 19.11,22 18,22H6C4.89,22 4,21.11 4,20V4A2,2 0 0,1 6,2H18C19.11,2 20,2.9 20,4M18,13H6V20H18V13M18,4H6V11H18V4M14,15H10V17H14V15Z" /></svg>');
|
||||
--cmd: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-application-outline" viewBox="0 0 24 24"><path d="M21 2H3C1.9 2 1 2.9 1 4V20C1 21.1 1.9 22 3 22H21C22.1 22 23 21.1 23 20V4C23 2.9 22.1 2 21 2M21 20H3V6H21V20Z" /></svg>');
|
||||
--css: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-script-outline" viewBox="0 0 24 24"><path d="M15,20A1,1 0 0,0 16,19V4H8A1,1 0 0,0 7,5V16H5V5A3,3 0 0,1 8,2H19A3,3 0 0,1 22,5V6H20V5A1,1 0 0,0 19,4A1,1 0 0,0 18,5V9L18,19A3,3 0 0,1 15,22H5A3,3 0 0,1 2,19V18H13A2,2 0 0,0 15,20Z" /></svg>');
|
||||
--ttf: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-format-text" viewBox="0 0 24 24"><path d="M18.5,4L19.66,8.35L18.7,8.61C18.25,7.74 17.79,6.87 17.26,6.43C16.73,6 16.11,6 15.5,6H13V16.5C13,17 13,17.5 13.33,17.75C13.67,18 14.33,18 15,18V19H9V18C9.67,18 10.33,18 10.67,17.75C11,17.5 11,17 11,16.5V6H8.5C7.89,6 7.27,6 6.74,6.43C6.21,6.87 5.75,7.74 5.3,8.61L4.34,8.35L5.5,4H18.5Z" /></svg>');
|
||||
--eye: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-eye-outline" viewBox="0 0 24 24"><path d="M12,9A3,3 0 0,1 15,12A3,3 0 0,1 12,15A3,3 0 0,1 9,12A3,3 0 0,1 12,9M12,4.5C17,4.5 21.27,7.61 23,12C21.27,16.39 17,19.5 12,19.5C7,19.5 2.73,16.39 1,12C2.73,7.61 7,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C15.76,17.5 19.17,15.36 20.82,12C19.17,8.64 15.76,6.5 12,6.5C8.24,6.5 4.83,8.64 3.18,12Z" /></svg>');
|
||||
--json: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-code-braces" viewBox="0 0 24 24"><path d="M8,3A2,2 0 0,0 6,5V9A2,2 0 0,1 4,11H3V13H4A2,2 0 0,1 6,15V19A2,2 0 0,0 8,21H10V19H8V14A2,2 0 0,0 6,12A2,2 0 0,0 8,10V5H10V3M16,3A2,2 0 0,1 18,5V9A2,2 0 0,0 20,11H21V13H20A2,2 0 0,0 18,15V19A2,2 0 0,1 16,21H14V19H16V14A2,2 0 0,1 18,12A2,2 0 0,1 16,10V5H14V3H16Z" /></svg>');
|
||||
--audio: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" id="mdi-file-music-outline" viewBox="0 0 24 24"><path d="M14,2L20,8V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V4A2,2 0 0,1 6,2H14M18,20V9H13V4H6V20H18M13,10V12H11V17A2,2 0 0,1 9,19A2,2 0 0,1 7,17A2,2 0 0,1 9,15C9.4,15 9.7,15.1 10,15.3V10H13Z" /></svg>');
|
||||
}
|
||||
|
||||
.fn:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.fi {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 1.1rem;
|
||||
height: 1.25rem;
|
||||
mask-size: auto;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
-webkit-mask-size: auto;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
background-color: var(--txt);
|
||||
}
|
||||
.fa {
|
||||
display: block;
|
||||
text-indent: -9999px;
|
||||
width: clamp(2rem, 7.5vw, 5rem);
|
||||
height: 2rem;
|
||||
mask-size: auto;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
-webkit-mask-size: auto;
|
||||
-webkit-mask-repeat: no-repeat;
|
||||
-webkit-mask-position: center;
|
||||
background-color: var(--clr-primary-400);
|
||||
transition: 0.5s;
|
||||
padding: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
.fa-browse { mask-image: var(--browse); -webkit-mask-image: var(--browse)}
|
||||
.fa-cog { mask-image: var(--cog); -webkit-mask-image: var(--cog)}
|
||||
.fa-download{ mask-image: var(--download); -webkit-mask-image: var(--download)}
|
||||
.fa-upload { mask-image: var(--upload); -webkit-mask-image: var(--upload)}
|
||||
.fa-home { mask-image: var(--home); -webkit-mask-image: var(--home)}
|
||||
.fa-info { mask-image: var(--info); -webkit-mask-image: var(--info)}
|
||||
.fa-ota { mask-image: var(--ota); -webkit-mask-image: var(--ota)}
|
||||
.fa-shot { mask-image: var(--shot); -webkit-mask-image: var(--shot)}
|
||||
.fa-star { mask-image: var(--star); -webkit-mask-image: var(--star)}
|
||||
.fa-trash { mask-image: var(--trash); -webkit-mask-image: var(--trask)}
|
||||
.fa-flash { mask-image: var(--flash); -webkit-mask-image: var(--flash)}
|
||||
.fa-file { mask-image: var(--file); -webkit-mask-image: var(--file)}
|
||||
.fa-dir { mask-image: var(--dir); -webkit-mask-image: var(--dir)}
|
||||
.fa-diropen { mask-image: var(--diropen); -webkit-mask-image: var(--diropen)}
|
||||
.fa-eye { mask-image: var(--eye); -webkit-mask-image: var(--eye)}
|
||||
.fa-zip { mask-image: var(--zip); -webkit-mask-image: var(--zip)}
|
||||
.fa-css { mask-image: var(--css); -webkit-mask-image: var(--css)}
|
||||
.fa-cmd { mask-image: var(--cmd); -webkit-mask-image: var(--cmd)}
|
||||
.fa-json { mask-image: var(--json); -webkit-mask-image: var(--json)}
|
||||
.fa-jsonl { mask-image: var(--json); -webkit-mask-image: var(--json)}
|
||||
.fa-image { mask-image: var(--image); -webkit-mask-image: var(--image)}
|
||||
.fa-audio { mask-image: var(--audio); -webkit-mask-image: var(--audio)}
|
||||
.fa-html { mask-image: var(--html); -webkit-mask-image: var(--html)}
|
||||
.fa-ttf { mask-image: var(--ttf); -webkit-mask-image: var(--ttf)}
|
||||
|
||||
.nav-list {
|
||||
font-size: var(--fs-nav);
|
||||
padding: 0;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
gap: clamp(1.5rem, 10vw, var(--size-500));
|
||||
width: clamp(275px, 80vw, 600px);
|
||||
}
|
||||
.nav-list a {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
text-decoration: none;
|
||||
color: var(--clr-primary-400);
|
||||
}
|
||||
.nav-list a:hover,
|
||||
.nav-list a:focus-visible {
|
||||
color: var(--clr-accent-400);
|
||||
}
|
||||
.nav-list a .text {
|
||||
position: absolute;
|
||||
letter-spacing: -0.05rem;
|
||||
font-size: var(--fs-500);
|
||||
font-weight: var(--fw-semi-bold);
|
||||
white-space: nowrap;
|
||||
opacity: 0;
|
||||
transition: 0.5s;
|
||||
transform: translateY(0.5rem);
|
||||
}
|
||||
.nav-list a:hover .text,
|
||||
.nav-list a:focus-visible .text {
|
||||
opacity: 1;
|
||||
transform: translateY(1rem);
|
||||
}
|
||||
.nav-list a:hover .fa,
|
||||
.nav-list a:focus-visible .fa {
|
||||
background-color: var(--clr-accent-400);
|
||||
transform: translateY(-0.5rem);
|
||||
}
|
||||
|
||||
/* Box sizing rules */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Set default margin */
|
||||
* {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
p {
|
||||
margin: 1em 0px;
|
||||
}
|
||||
|
||||
/* Main Style */
|
||||
body {
|
||||
font-family: 'Inter', sans-serif;
|
||||
line-height: 1.5;
|
||||
height: 100%;
|
||||
background: var(--bg);
|
||||
color: var(--txt)
|
||||
}
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
a[href],
|
||||
input[type='submit'],
|
||||
label[for],
|
||||
select,
|
||||
button,
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Message Fields */
|
||||
.error,
|
||||
.info,
|
||||
.success,
|
||||
.validation,
|
||||
.warning {
|
||||
border: 1px solid;
|
||||
margin: 1rem auto;
|
||||
padding: 2rem 1rem 1rem 3rem;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px center;
|
||||
max-width: 500px
|
||||
}
|
||||
.info { color: #00529B; background-color: #BDE5F8 }
|
||||
.success{ color: #4F8A10; background-color: #DFF2BF }
|
||||
.warning{ color: #9F6000; background-color: #FEEFB3 }
|
||||
.error { color: #D8000C; background-color: #FFD2D2 }
|
||||
|
||||
.left { float: left }
|
||||
.right { float: right }
|
||||
.bold { font-weight: bold }
|
||||
|
||||
/* Main Page */
|
||||
#doc {
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
/* display: inline-block;
|
||||
display: table; */
|
||||
color: var(--txt);
|
||||
width: 80%;
|
||||
min-width: 300px;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
#doc>a,
|
||||
.dist>a,
|
||||
#doc button,
|
||||
#doc input[type=submit] {
|
||||
/* padding: 12px; */
|
||||
height: 3rem;
|
||||
border: 1px solid var(--btnbrd);
|
||||
border-radius: .6rem;
|
||||
background-color: var(--btnbg);
|
||||
color: var(--btnfg);
|
||||
font-size: 1rem;
|
||||
width: 100%;
|
||||
margin: 12px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
#doc>a:hover,
|
||||
.dist>a:hover,
|
||||
#doc button:hover,
|
||||
#doc input[type=submit]:hover {
|
||||
background-color: var(--btnbghi)
|
||||
}
|
||||
|
||||
#doc input:not([type=file]) {
|
||||
background-color: var(--fldbg);
|
||||
color: var(--fldfg)
|
||||
}
|
||||
#doc input[type=checkbox],
|
||||
#doc input[type=radio] {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
margin: 0.25rem
|
||||
}
|
||||
#doc input[type=color] {
|
||||
width: 30%;
|
||||
padding: 5px
|
||||
}
|
||||
#doc input:invalid {
|
||||
border: 1px solid var(--fldred)
|
||||
}
|
||||
#doc select {
|
||||
background-color: var(--fldbg);
|
||||
color: var(--fldfg)
|
||||
}
|
||||
|
||||
.c {
|
||||
text-align: center
|
||||
}
|
||||
|
||||
#doc>a.red,
|
||||
#doc button.red {
|
||||
background-color: var(--btnred)
|
||||
}
|
||||
|
||||
#doc>a.red:focus,
|
||||
#doc>a.red:hover,
|
||||
#doc button.red:focus,
|
||||
#doc button.red:hover {
|
||||
background-color: var(--btnredhi)
|
||||
}
|
||||
|
||||
#doc td {
|
||||
padding-bottom: 0;
|
||||
padding-top: 0
|
||||
}
|
||||
#doc th {
|
||||
padding-top: .5rem
|
||||
}
|
||||
|
||||
#doc input,
|
||||
#doc select,
|
||||
#doc textarea {
|
||||
width: 100%;
|
||||
padding: 1rem;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: .6rem;
|
||||
resize: vertical
|
||||
}
|
||||
#doc select {
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right .8rem center;
|
||||
background-size: 1rem
|
||||
}
|
||||
|
||||
#doc label {
|
||||
padding-right: 18px;
|
||||
padding-left: .25rem;
|
||||
display: inline-block
|
||||
}
|
||||
|
||||
#bmp {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.required {
|
||||
background-image: var(--star);
|
||||
background-position: right;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 1.5rem 1.5rem;
|
||||
}
|
||||
|
||||
.icon {
|
||||
background-size: 1.25rem 1.25rem;
|
||||
background-position: left;
|
||||
background-repeat: no-repeat;
|
||||
width: 1.5rem;
|
||||
display: inline-block;
|
||||
text-decoration: none
|
||||
}
|
||||
|
||||
.icon:before{content: "\0000a0"}
|
||||
.edit{background-image: var(--browse)}
|
||||
.trash{background-image: var(--trash)}
|
||||
|
||||
/* Forms */
|
||||
.container {
|
||||
background-color: var(--grpbg);
|
||||
color: var(--grpfg);
|
||||
border-radius: .6rem;
|
||||
padding: 10px;
|
||||
margin: 20px 0
|
||||
}
|
||||
|
||||
.dist {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
margin: 1rem 0
|
||||
}
|
||||
|
||||
.dist>a {
|
||||
flex-grow: 1;
|
||||
margin: 0 6px
|
||||
}
|
||||
|
||||
.dist>a:first-child {
|
||||
margin-left: 0
|
||||
}
|
||||
|
||||
.dist>a:last-child {
|
||||
margin-right: 0
|
||||
}
|
||||
|
||||
.row:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both
|
||||
}
|
||||
|
||||
.row {
|
||||
/* font-size: .833rem; */
|
||||
margin: 5px
|
||||
}
|
||||
|
||||
.gap,
|
||||
.row:last-of-type {
|
||||
margin-bottom: 1rem
|
||||
}
|
||||
|
||||
.col-25 {
|
||||
/* float: left;
|
||||
width: 25%; */
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* .col-75 {
|
||||
float: left;
|
||||
width: 75%
|
||||
} */
|
||||
|
||||
#doc label,
|
||||
#doc legend {
|
||||
padding: 5px 18px 5px 0;
|
||||
}
|
||||
#doc fieldset {
|
||||
display: contents
|
||||
}
|
||||
[v-cloak] > * { display:none }
|
||||
/* [v-cloak]::before { content: "Loading…"; margin: auto; } */
|
||||
|
||||
|
||||
@media screen and (min-width:800px) {
|
||||
.row {
|
||||
display:flex;
|
||||
align-items:center
|
||||
}
|
||||
.col-25,
|
||||
.col-75
|
||||
{
|
||||
float: left;
|
||||
width: 75%;
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.col-25 {
|
||||
width: 25%;
|
||||
text-align: right
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
@media screen and (max-width:800px) {
|
||||
|
||||
// #doc input[type=submit],
|
||||
.col-25,
|
||||
.col-75
|
||||
{
|
||||
width: 100%;
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.col-25 {
|
||||
text-align: left
|
||||
}
|
||||
|
||||
#doc label {
|
||||
padding: 5px 18px 5px 0
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/* ********** Page Footer ********** */
|
||||
.foot {
|
||||
background-color: transparent !important;
|
||||
all: revert;
|
||||
float: right;
|
||||
margin: 0;
|
||||
font-size: .6rem
|
||||
}
|
||||
a.foot:link,
|
||||
a.foot:visited {
|
||||
color: var(--footfg)
|
||||
}
|
||||
.clear {
|
||||
clear: both
|
||||
}
|
||||
|
||||
/* ********** File Editor ********** */
|
||||
.container__editor {
|
||||
/* display: none; */
|
||||
display: flex;
|
||||
|
||||
/* Misc */
|
||||
border: 0;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
background-color: var(--bg);
|
||||
}
|
||||
.container__left {
|
||||
/* Initially, the left takes 3/4 width */
|
||||
width: 10rem;
|
||||
min-width: 6rem;
|
||||
max-width: 20rem;
|
||||
|
||||
/* Misc */
|
||||
/* align-items: center; */
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
overflow-x: clip;
|
||||
overflow-y: scroll;
|
||||
background-color: var(--treebg);
|
||||
|
||||
/* Popout */
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: clamp(10rem, 15vw, 80rem);
|
||||
z-index: 10;
|
||||
/* position: absolute; */
|
||||
/* visibility: hidden; */
|
||||
}
|
||||
.resizer {
|
||||
background-color: #d5dbe2;
|
||||
cursor: ew-resize;
|
||||
height: 100%;
|
||||
width: 5px;
|
||||
}
|
||||
.container__right {
|
||||
/* Take the remaining width */
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
|
||||
/* Misc */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
background-color: #888;
|
||||
}
|
||||
.toolbar {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
color: var(--btnfg);
|
||||
background-color: var(--toolbg)
|
||||
}
|
||||
.container__bottom {
|
||||
/* Take the remaining width */
|
||||
flex: 1;
|
||||
|
||||
/* Misc */
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
/* background-color: bisque; */
|
||||
}
|
||||
#sizeList {
|
||||
width: 4rem;
|
||||
}
|
||||
#ctx {
|
||||
display: none;
|
||||
top: 10px;
|
||||
left: 50px;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
z-index: 10;
|
||||
padding: 0.75rem;
|
||||
border-radius: 0.5rem;
|
||||
box-shadow: 0 0.5rem 0.75rem rgba(0,0,0,0.25);
|
||||
}
|
||||
#ctx > ul {
|
||||
padding-left: 0px;
|
||||
}
|
||||
#ctx > ul > li {
|
||||
white-space: nowrap
|
||||
}
|
||||
#ctx > ul > li:hover {
|
||||
background: #ccc;
|
||||
}
|
||||
#fontsize, #page {
|
||||
width: 3rem
|
||||
}
|
||||
#preview {
|
||||
padding: 0.3rem;
|
||||
overflow: scroll;
|
||||
}
|
||||
#preview > img {
|
||||
max-width:100%;
|
||||
max-height:100%;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
display: block
|
||||
}
|
||||
#download-frame,
|
||||
#preview {
|
||||
display:none;
|
||||
}
|
||||
#tree {
|
||||
width: 100%;
|
||||
line-height: 1.3rem;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.download{background-image: var(--download)}
|
||||
.upload{background-image: var(--upload)}
|
||||
.eye{background-image: var(--eye)}
|
||||
.flash{background-image: var(--flash)}
|
||||
.file{background-image: var(--file)}
|
||||
.zip{background-image: var(--zip)}
|
||||
.css{background-image: var(--css)}
|
||||
.cmd{background-image: var(--cmd)}
|
||||
.json{background-image: var(--json)}
|
||||
.jsonl{background-image: var(--json)}
|
||||
.image{background-image: var(--image)}
|
||||
.audio{background-image: var(--audio)}
|
||||
.html{background-image: var(--html)}
|
||||
.dir{background-image: var(--dir)}
|
||||
.diropen{background-image: var(--diropen)}
|
||||
|
||||
|
||||
#toast {
|
||||
position: fixed;
|
||||
bottom: 1rem;
|
||||
right: 1.5rem;
|
||||
display: grid;
|
||||
align-items: end;
|
||||
align-content: end;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.toast {
|
||||
font-size: 1rem;
|
||||
margin: 0;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
padding: 0.5em 1em;
|
||||
background-color: lightblue;
|
||||
animation: toastIt 3000ms cubic-bezier(0.785, 0.135, 0.15, 0.86) forwards;
|
||||
}
|
||||
|
||||
@keyframes toastIt {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(150%);
|
||||
opacity: 0;
|
||||
}
|
||||
10%,
|
||||
90% {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
162
data/sv_SE.json
Normal file
162
data/sv_SE.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "Svenska",
|
||||
"home": {
|
||||
"title": "Huvudmeny",
|
||||
"btn": "Huvudmeny",
|
||||
"nav": "Hem"
|
||||
},
|
||||
"save": "Spara Inställningar",
|
||||
"user": "Användarnamn",
|
||||
"pass": "Lösenord",
|
||||
"hasp": {
|
||||
"title": "HASP Design",
|
||||
"btn": "HASP Design",
|
||||
"theme": "UI Tema",
|
||||
"color1": "Primärfärg",
|
||||
"color2": "Sekundärfärg",
|
||||
"pages": "Starta Layout",
|
||||
"font": "Standardtypsnitt",
|
||||
"startpage": "Startsida",
|
||||
"startdim": "Startljusstyrka"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "Skärmbild",
|
||||
"btn": "Skärmbild",
|
||||
"nav": "Skärmbild",
|
||||
"prev": "Föregående Sida",
|
||||
"next": "Nästa Sida",
|
||||
"refresh": "Uppdatera"
|
||||
},
|
||||
"info": {
|
||||
"title": "Information",
|
||||
"btn": "Information",
|
||||
"nav": "Information"
|
||||
},
|
||||
"config": {
|
||||
"title": "Inställningar",
|
||||
"btn": "Konfiguration",
|
||||
"nav": "Inställningar"
|
||||
},
|
||||
"ota": {
|
||||
"title": "Firmware-uppdatering",
|
||||
"btn": "Firmware-uppdatering",
|
||||
"nav": "Firmware",
|
||||
"submit": "Uppdatera Firmware",
|
||||
"file": "Firmware-fil",
|
||||
"url": "Firmware URL",
|
||||
"redirect": "Följ omdirigeringar",
|
||||
"never": "Aldrig",
|
||||
"strict": "Strikt",
|
||||
"always": "Alltid"
|
||||
},
|
||||
"editor": {
|
||||
"title": "Filredigerare",
|
||||
"btn": "Filredigerare",
|
||||
"nav": "Filredigerare"
|
||||
},
|
||||
"reset": {
|
||||
"title": "Fabriksåterställning",
|
||||
"btn": "Fabriksåterställning",
|
||||
"warning": "Varning",
|
||||
"message": "Denna process kommer att återställa alla inställningar till standardvärden. Det interna minnet kommer att raderas och enheten startas om. Du kan behöva ansluta till WiFi AP som visas på panelen för att konfigurera om enheten innan du öppnar den igen.",
|
||||
"fileloss": "ALLA FILLER KOMMER ATT FÖRLORAS!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "Startar om...",
|
||||
"btn": "Omstart",
|
||||
"nav": "Omstart",
|
||||
"message": "Enheten startar om."
|
||||
},
|
||||
"about": {
|
||||
"credits": "Baserat på det tidigare arbetet av följande utvecklare av öppen källkod:",
|
||||
"copyright": "Copyright ",
|
||||
"rights": "Alla rättigheter förbehållna.",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT Licens",
|
||||
"bsd": "BSD Licens",
|
||||
"freebsd": "FreeBSD Licens",
|
||||
"apache2": "Apache2 Licens"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Inställningar för WiFi",
|
||||
"btn": "Inställningar för WiFi",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "Inställningar för WireGuard",
|
||||
"btn": "Inställningar för WireGuard",
|
||||
"vpnip": "VPN IP-adress",
|
||||
"privkey": "Privat nyckel",
|
||||
"host": "Fjärr-IP",
|
||||
"port": "Fjärrport",
|
||||
"pubkey": "Publik fjärrnyckel"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT Inställningar",
|
||||
"btn": "MQTT Inställningar",
|
||||
"name": "Servernamn",
|
||||
"group": "Gruppnamn",
|
||||
"host": "Broker",
|
||||
"port": "Port",
|
||||
"node_t": "Nod topic",
|
||||
"group_t": "Grupp topic",
|
||||
"broadcast_t": "Broadcast topic",
|
||||
"hass_t": "HA LWT topic"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP Inställningar",
|
||||
"btn": "HTTP Inställningar"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP Inställningar",
|
||||
"btn": "FTP Inställningar",
|
||||
"port": "FTP Port",
|
||||
"pasv": "Passiv port"
|
||||
},
|
||||
"gui": {
|
||||
"title": "Bildskärmsinställningar",
|
||||
"btn": "Bildskärmsinställningar",
|
||||
"antiburn": "Antiburn",
|
||||
"calibrate": "Kalibrera"
|
||||
},
|
||||
"gpio": "GPIO Inställningar",
|
||||
"debug": {
|
||||
"title": "Debug Inställningar",
|
||||
"btn": "Debug Inställningar",
|
||||
"baud": "Datahastighet",
|
||||
"tele": "Telemetri period",
|
||||
"ansi": "Använd ANSI-kod",
|
||||
"host": "Syslog server",
|
||||
"port": "Syslog port",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facilitet"
|
||||
},
|
||||
"time": {
|
||||
"title": "Tidsinställningar",
|
||||
"btn": "Tidsinställningar",
|
||||
"region": "Region",
|
||||
"zone": "Tidszon",
|
||||
"tz": "Tidszon",
|
||||
"ntp": "NTP-servrar"
|
||||
},
|
||||
"region": {
|
||||
"etc": "Etcetera ",
|
||||
"continents": "Kontinenter ",
|
||||
"af": "Afrika ",
|
||||
"as": "Asien ",
|
||||
"au": "Australien ",
|
||||
"aq": "Antarktis",
|
||||
"eu": "Europa ",
|
||||
"na": "Nordamerika ",
|
||||
"sa": "Sydamerika ",
|
||||
"islands": "Öar ",
|
||||
"at": "Atlanten ",
|
||||
"in": "Indiska oceanen ",
|
||||
"pa": "Stilla havet "
|
||||
}
|
||||
}
|
||||
}
|
13
data/vars.css
Normal file
13
data/vars.css
Normal file
@ -0,0 +1,13 @@
|
||||
:root {
|
||||
--txt: #000;
|
||||
--bg: #fff;
|
||||
--btnfg: #fff;
|
||||
--btnbg: #1fa3ec;
|
||||
--btnbghi: #0083cc;
|
||||
--grpbg: #f2f2f2;
|
||||
--fldbg: #fff;
|
||||
--fldfg: #000;
|
||||
--btnred: #f00;
|
||||
--btnredhi: #b00;
|
||||
--btnbrd: transparent;
|
||||
}
|
162
data/zh_CN.json
Normal file
162
data/zh_CN.json
Normal file
@ -0,0 +1,162 @@
|
||||
{
|
||||
"en": {
|
||||
"language": "中文(简体)",
|
||||
"home": {
|
||||
"title": "主菜单",
|
||||
"btn": "主菜单",
|
||||
"nav": "首页"
|
||||
},
|
||||
"save": "保存设置",
|
||||
"user": "用户名",
|
||||
"pass": "密码",
|
||||
"hasp": {
|
||||
"title": "HASP 设计",
|
||||
"btn": "HASP 设计",
|
||||
"theme": "界面主题",
|
||||
"color1": "主颜色",
|
||||
"color2": "副颜色",
|
||||
"pages": "开始布局",
|
||||
"font": "默认字体",
|
||||
"startpage": "开机页面",
|
||||
"startdim": "开机亮度"
|
||||
},
|
||||
"screenshot": {
|
||||
"title": "截屏",
|
||||
"btn": "截屏",
|
||||
"nav": "截屏",
|
||||
"prev": "上一页",
|
||||
"next": "下一页",
|
||||
"refresh": "刷新页面"
|
||||
},
|
||||
"info": {
|
||||
"title": "信息",
|
||||
"btn": "信息",
|
||||
"nav": "信息"
|
||||
},
|
||||
"config": {
|
||||
"title": "配置",
|
||||
"btn": "配置",
|
||||
"nav": "配置"
|
||||
},
|
||||
"ota": {
|
||||
"title": "固件更新",
|
||||
"btn": "固件更新",
|
||||
"nav": "固件",
|
||||
"submit": "更新固件",
|
||||
"file": "固件文件",
|
||||
"url": "固件网址",
|
||||
"redirect": "跟随重定向",
|
||||
"never": "从不",
|
||||
"strict": "严格",
|
||||
"always": "总是"
|
||||
},
|
||||
"editor": {
|
||||
"title": "文件编辑器",
|
||||
"btn": "文件编辑器",
|
||||
"nav": "文件编辑器"
|
||||
},
|
||||
"reset": {
|
||||
"title": "出厂重置",
|
||||
"btn": "出厂重置",
|
||||
"warning": "警告",
|
||||
"message": "此过程会将所有设置重置为默认值。 内部闪存将被擦除,设备将重新启动。 您可能需要连接到面板上显示的 WiFi AP 以重新配置设备,然后才能再次访问它。",
|
||||
"fileloss": "所有文件都会被删除!"
|
||||
},
|
||||
"reboot": {
|
||||
"title": "重启中...",
|
||||
"btn": "重启",
|
||||
"nav": "重启",
|
||||
"message": "设备正在重启。"
|
||||
},
|
||||
"about": {
|
||||
"credits": "基于以下开源开发者的先前工作:",
|
||||
"copyright": "版权 ",
|
||||
"rights": "版权所有。",
|
||||
"clause1": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:",
|
||||
"clause2": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
|
||||
"clause3": "THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
|
||||
"mit": "MIT 许可证",
|
||||
"bsd": "BSD 许可证",
|
||||
"freebsd": "FreeBSD 许可证",
|
||||
"apache2": "Apache2 许可证"
|
||||
},
|
||||
"wifi": {
|
||||
"title": "Wifi 设置",
|
||||
"btn": "Wifi 设置",
|
||||
"ssid": "SSID"
|
||||
},
|
||||
"wg": {
|
||||
"title": "WireGuard 设置",
|
||||
"btn": "WireGuard 设置",
|
||||
"vpnip": "VPN IP",
|
||||
"privkey": "专用密钥",
|
||||
"host": "远程IP",
|
||||
"port": "删除",
|
||||
"pubkey": "远程公钥"
|
||||
},
|
||||
"mqtt": {
|
||||
"title": "MQTT 设置",
|
||||
"btn": "MQTT 设置",
|
||||
"name": "主机名",
|
||||
"group": "组名",
|
||||
"host": "MQTT 经纪人",
|
||||
"port": "端口",
|
||||
"node_t": "设备主题",
|
||||
"group_t": "群组主题",
|
||||
"broadcast_t": "广播主题",
|
||||
"hass_t": "HA LWT 主题"
|
||||
},
|
||||
"http": {
|
||||
"title": "HTTP 设置",
|
||||
"btn": "HTTP 设置"
|
||||
},
|
||||
"ftp": {
|
||||
"title": "FTP设置",
|
||||
"btn": "FTP设置",
|
||||
"port": "FTP 端口",
|
||||
"pasv": "被动端口"
|
||||
},
|
||||
"gui": {
|
||||
"title": "屏幕设置",
|
||||
"btn": "屏幕设置",
|
||||
"antiburn": "防烧",
|
||||
"calibrate": "校准"
|
||||
},
|
||||
"gpio": "GPIO 设置",
|
||||
"debug": {
|
||||
"title": "调试设置",
|
||||
"btn": "调试设置",
|
||||
"baud": "波特率",
|
||||
"tele": "远程时期",
|
||||
"ansi": "使用 ANSI 代码",
|
||||
"host": "Syslog 服务器",
|
||||
"port": "Syslog端口",
|
||||
"ietf": "IETF (RFC 5424)",
|
||||
"bsd": "BSD (RFC 3164)",
|
||||
"log": "Facility"
|
||||
},
|
||||
"time": {
|
||||
"title": "时间设置",
|
||||
"btn": "时间设置",
|
||||
"region": "区域",
|
||||
"zone": "时区",
|
||||
"tz": "时区",
|
||||
"ntp": "NTP 服务器"
|
||||
},
|
||||
"region": {
|
||||
"etc": "等等 ",
|
||||
"continents": "大洲数 ",
|
||||
"af": "非洲 ",
|
||||
"as": "亚洲 ",
|
||||
"au": "澳大利亚 ",
|
||||
"aq": "南极洲 ",
|
||||
"eu": "欧洲 ",
|
||||
"na": "北美洲 ",
|
||||
"sa": "南美洲 ",
|
||||
"islands": "群岛 ",
|
||||
"at": "大西洋 ",
|
||||
"in": "印度洋 ",
|
||||
"pa": "太平洋 "
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
#if USE_MONITOR
|
||||
#include <unistd.h>
|
||||
#define SDL_MAIN_HANDLED /*To fix SDL's "undefined reference to WinMain" issue*/
|
||||
#include <SDL2/SDL.h>
|
||||
@ -53,3 +54,4 @@ void hal_loop(void)
|
||||
// lv_task_handler();
|
||||
// }
|
||||
}
|
||||
#endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "stm32f4xx.h"
|
||||
//#include "stm32f429i_discovery.h"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
/* This file is used during the build of the paho library */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef WIFISPI_H
|
||||
|
183
include/ftstdlib.h
Normal file
183
include/ftstdlib.h
Normal file
@ -0,0 +1,183 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* ftstdlib.h
|
||||
*
|
||||
* ANSI-specific library and header configuration file (specification
|
||||
* only).
|
||||
*
|
||||
* Copyright (C) 2002-2020 by
|
||||
* David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||
*
|
||||
* This file is part of the FreeType project, and may only be used,
|
||||
* modified, and distributed under the terms of the FreeType project
|
||||
* license, LICENSE.TXT. By continuing to use, modify, or distribute
|
||||
* this file you indicate that you have read the license and
|
||||
* understand and accept it fully.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* This file is used to group all `#includes` to the ANSI~C library that
|
||||
* FreeType normally requires. It also defines macros to rename the
|
||||
* standard functions within the FreeType source code.
|
||||
*
|
||||
* Load a file which defines `FTSTDLIB_H_` before this one to override it.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#ifndef FTSTDLIB_H_
|
||||
#define FTSTDLIB_H_
|
||||
|
||||
|
||||
#include <stddef.h>
|
||||
#include "hasp_mem.h"
|
||||
|
||||
typedef void hasp_FILE;
|
||||
|
||||
extern hasp_FILE * lv_ft_fopen(const char * filename, const char * mode );
|
||||
extern int lv_ft_fclose(hasp_FILE * stream);
|
||||
extern size_t lv_ft_fread(void * ptr, size_t size, size_t count, hasp_FILE * stream);
|
||||
extern int lv_ft_fseek(hasp_FILE * stream, long int offset, int origin );
|
||||
extern int lv_ft_ftell(hasp_FILE * stream);
|
||||
|
||||
#define ft_ptrdiff_t ptrdiff_t
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* integer limits
|
||||
*
|
||||
* `UINT_MAX` and `ULONG_MAX` are used to automatically compute the size of
|
||||
* `int` and `long` in bytes at compile-time. So far, this works for all
|
||||
* platforms the library has been tested on.
|
||||
*
|
||||
* Note that on the extremely rare platforms that do not provide integer
|
||||
* types that are _exactly_ 16 and 32~bits wide (e.g., some old Crays where
|
||||
* `int` is 36~bits), we do not make any guarantee about the correct
|
||||
* behaviour of FreeType~2 with all fonts.
|
||||
*
|
||||
* In these cases, `ftconfig.h` will refuse to compile anyway with a
|
||||
* message like 'couldn't find 32-bit type' or something similar.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#define FT_CHAR_BIT CHAR_BIT
|
||||
#define FT_USHORT_MAX USHRT_MAX
|
||||
#define FT_INT_MAX INT_MAX
|
||||
#define FT_INT_MIN INT_MIN
|
||||
#define FT_UINT_MAX UINT_MAX
|
||||
#define FT_LONG_MIN LONG_MIN
|
||||
#define FT_LONG_MAX LONG_MAX
|
||||
#define FT_ULONG_MAX ULONG_MAX
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* character and string processing
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#define ft_memchr memchr
|
||||
#define ft_memcmp memcmp
|
||||
#define ft_memcpy memcpy
|
||||
#define ft_memmove memmove
|
||||
#define ft_memset memset
|
||||
#define ft_strcat strcat
|
||||
#define ft_strcmp strcmp
|
||||
#define ft_strcpy strcpy
|
||||
#define ft_strlen strlen
|
||||
#define ft_strncmp strncmp
|
||||
#define ft_strncpy strncpy
|
||||
#define ft_strrchr strrchr
|
||||
#define ft_strstr strstr
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* file handling
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define FT_FILE hasp_FILE
|
||||
#define ft_fclose lv_ft_fclose
|
||||
#define ft_fopen lv_ft_fopen
|
||||
#define ft_fread lv_ft_fread
|
||||
#define ft_fseek lv_ft_fseek
|
||||
#define ft_ftell lv_ft_ftell
|
||||
#define ft_sprintf sprintf
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* sorting
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#define ft_qsort qsort
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* memory allocation
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define ft_scalloc hasp_calloc
|
||||
#define ft_sfree hasp_free
|
||||
#define ft_smalloc hasp_malloc
|
||||
#define ft_srealloc hasp_realloc
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* miscellaneous
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#define ft_strtol strtol
|
||||
#define ft_getenv getenv
|
||||
|
||||
|
||||
/**************************************************************************
|
||||
*
|
||||
* execution control
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
|
||||
/* `jmp_buf` is defined as a macro */
|
||||
/* on certain platforms */
|
||||
|
||||
#define ft_longjmp longjmp
|
||||
#define ft_setjmp( b ) setjmp( *(ft_jmp_buf*) &(b) ) /* same thing here */
|
||||
|
||||
|
||||
/* The following is only used for debugging purposes, i.e., if */
|
||||
/* `FT_DEBUG_LEVEL_ERROR` or `FT_DEBUG_LEVEL_TRACE` are defined. */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
#endif /* FTSTDLIB_H_ */
|
||||
|
||||
|
||||
/* END */
|
@ -1,9 +1,13 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef HASP_CONF_H
|
||||
#define HASP_CONF_H
|
||||
|
||||
#if HASP_TARGET_ARDUINO
|
||||
#include "Arduino.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_CONFIG_OVERRIDE
|
||||
#include "user_config_override.h"
|
||||
#endif
|
||||
@ -11,6 +15,17 @@
|
||||
// language specific defines
|
||||
#include "lang/lang.h"
|
||||
|
||||
// Lengths
|
||||
#ifndef MAX_PASSWORD_LENGTH
|
||||
#define MAX_PASSWORD_LENGTH 64
|
||||
#endif
|
||||
#ifndef MAX_USERNAME_LENGTH
|
||||
#define MAX_USERNAME_LENGTH 32
|
||||
#endif
|
||||
#ifndef MAX_HOSTNAME_LENGTH
|
||||
#define MAX_HOSTNAME_LENGTH 128
|
||||
#endif
|
||||
|
||||
// TFT defines
|
||||
#ifndef TFT_BACKLIGHT_ON
|
||||
#define TFT_BACKLIGHT_ON HIGH
|
||||
@ -22,6 +37,11 @@
|
||||
|
||||
#define HASP_USE_APP 1
|
||||
|
||||
/* Validate that build target was specified */
|
||||
#if HASP_TARGET_ARDUINO + HASP_TARGET_PC != 1
|
||||
#error "Build target invalid! Set *one* of: HASP_TARGET_ARDUINO, HASP_TARGET_PC"
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_DEBUG
|
||||
#define HASP_USE_DEBUG 1
|
||||
#endif
|
||||
@ -42,14 +62,26 @@
|
||||
#define HASP_HAS_NETWORK \
|
||||
(ARDUINO_ARCH_ESP32 > 0 || ARDUINO_ARCH_ESP8266 > 0 || HASP_USE_ETHERNET > 0 || HASP_USE_WIFI > 0)
|
||||
|
||||
#ifndef HASP_USE_OTA
|
||||
#define HASP_USE_OTA 0 //(HASP_HAS_NETWORK)
|
||||
#ifndef HASP_USE_ARDUINOOTA
|
||||
#define HASP_USE_ARDUINOOTA 0 //(HASP_HAS_NETWORK)
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_HTTP_UPDATE
|
||||
#define HASP_USE_HTTP_UPDATE (HASP_HAS_NETWORK) // Adds 10kB
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_MQTT
|
||||
#define HASP_USE_MQTT (HASP_HAS_NETWORK)
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_MQTT_ASYNC
|
||||
#define HASP_USE_MQTT_ASYNC (HASP_TARGET_PC)
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_WIREGUARD
|
||||
#define HASP_USE_WIREGUARD 0
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_BROADCAST
|
||||
#define HASP_USE_BROADCAST 1
|
||||
#endif
|
||||
@ -74,6 +106,10 @@
|
||||
#define HASP_START_HTTP 1
|
||||
#endif
|
||||
|
||||
#ifndef HASP_START_FTP
|
||||
#define HASP_START_FTP 1
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_MDNS
|
||||
#define HASP_USE_MDNS (HASP_HAS_NETWORK)
|
||||
#endif
|
||||
@ -82,6 +118,10 @@
|
||||
#define HASP_USE_SYSLOG (HASP_HAS_NETWORK)
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_FTP
|
||||
#define HASP_USE_FTP 0
|
||||
#endif
|
||||
|
||||
#ifndef HASP_USE_TELNET
|
||||
#define HASP_USE_TELNET 0
|
||||
#endif
|
||||
@ -163,13 +203,53 @@
|
||||
|
||||
#define HASP_OBJECT_NOTATION "p%ub%u"
|
||||
|
||||
#ifndef HASP_ATTRIBUTE_FAST_MEM
|
||||
#define HASP_ATTRIBUTE_FAST_MEM
|
||||
#endif
|
||||
|
||||
#ifndef IRAM_ATTR
|
||||
#define IRAM_ATTR
|
||||
#endif
|
||||
|
||||
#if !defined(FPSTR)
|
||||
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper*>(pstr_pointer))
|
||||
#endif
|
||||
|
||||
#if !defined(PGM_P)
|
||||
#define PGM_P const char*
|
||||
#endif
|
||||
|
||||
/* Workarounds for PC build */
|
||||
#if HASP_TARGET_PC
|
||||
#ifndef __FlashStringHelper
|
||||
typedef char __FlashStringHelper;
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && !defined(String)
|
||||
#include <iostream>
|
||||
using String = std::string;
|
||||
#endif
|
||||
|
||||
#ifndef F
|
||||
#define F(x) (x)
|
||||
#endif
|
||||
|
||||
#ifndef PSTR
|
||||
#define PSTR(x) x
|
||||
#endif
|
||||
|
||||
#ifndef PROGMEM
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Includes */
|
||||
#ifdef WINDOWS
|
||||
#include "winsock2.h"
|
||||
#include "Windows.h"
|
||||
#elif defined(POSIX)
|
||||
#else
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#endif
|
||||
|
||||
#if HASP_USE_SPIFFS > 0
|
||||
@ -192,7 +272,7 @@
|
||||
|
||||
#if HASP_USE_SPIFFS > 0 || HASP_USE_LITTLEFS > 0
|
||||
#if defined(ARDUINO_ARCH_ESP32) || defined(ARDUINO_ARCH_ESP8266)
|
||||
#include "lv_zifont.h"
|
||||
// #include "lv_zifont.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -209,10 +289,19 @@ static WiFiSpiClass WiFi;
|
||||
#endif
|
||||
#endif // HASP_USE_WIFI
|
||||
|
||||
#if HASP_USE_WIREGUARD > 0
|
||||
#include "sys/net/hasp_wireguard.h"
|
||||
#endif
|
||||
|
||||
#if HASP_USE_ETHERNET > 0
|
||||
#if defined(ARDUINO_ARCH_ESP32)
|
||||
#include <ETH.h>
|
||||
#include "sys/net/hasp_ethernet_esp32.h"
|
||||
#if HASP_USE_ETHSPI > 0
|
||||
#include <ETHSPI.h>
|
||||
#warning Using ESP32 Ethernet SPI W5500
|
||||
#define HASP_ETHERNET ETHSPI
|
||||
|
||||
#else
|
||||
#define ETH_ADDR 0
|
||||
#define ETH_POWER_PIN -1
|
||||
#define ETH_MDC_PIN 23
|
||||
@ -220,9 +309,10 @@ static WiFiSpiClass WiFi;
|
||||
#define NRST 5
|
||||
#define ETH_TYPE ETH_PHY_LAN8720
|
||||
#define ETH_CLKMODE ETH_CLOCK_GPIO17_OUT
|
||||
|
||||
#include "sys/net/hasp_ethernet_esp32.h"
|
||||
#include <ETH.h>
|
||||
#warning Using ESP32 Ethernet LAN8720
|
||||
#define HASP_ETHERNET ETH
|
||||
#endif // HASP_USE_ETHSPI
|
||||
|
||||
#else
|
||||
#if USE_BUILTIN_ETHERNET > 0
|
||||
@ -244,10 +334,11 @@ static WiFiSpiClass WiFi;
|
||||
#if HASP_USE_MQTT > 0
|
||||
#include "mqtt/hasp_mqtt.h"
|
||||
|
||||
#if defined(WINDOWS) || defined(POSIX)
|
||||
#define USE_PAHO
|
||||
#if HASP_TARGET_PC
|
||||
#define HASP_USE_PAHO
|
||||
#else
|
||||
#define USE_PUBSUBCLIENT
|
||||
#define HASP_USE_ESP_MQTT
|
||||
//#define HASP_USE_PUBSUBCLIENT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -268,6 +359,10 @@ static WiFiSpiClass WiFi;
|
||||
#include "sys/svc/hasp_console.h"
|
||||
#endif
|
||||
|
||||
#if HASP_USE_FTP > 0
|
||||
#include "sys/svc/hasp_ftp.h"
|
||||
#endif
|
||||
|
||||
#if HASP_USE_TELNET > 0
|
||||
#include "sys/svc/hasp_telnet.h"
|
||||
#endif
|
||||
@ -276,7 +371,7 @@ static WiFiSpiClass WiFi;
|
||||
#include "sys/svc/hasp_mdns.h"
|
||||
#endif
|
||||
|
||||
#if HASP_USE_OTA > 0
|
||||
#if HASP_USE_ARDUINOOTA > 0 || HASP_USE_HTTP_UPDATE > 0
|
||||
#include "sys/svc/hasp_ota.h"
|
||||
#endif
|
||||
|
||||
@ -284,52 +379,27 @@ static WiFiSpiClass WiFi;
|
||||
#include "sys/svc/hasp_slave.h"
|
||||
#endif
|
||||
|
||||
#ifndef HASP_ATTRIBUTE_FAST_MEM
|
||||
#define HASP_ATTRIBUTE_FAST_MEM
|
||||
#endif
|
||||
|
||||
#ifndef IRAM_ATTR
|
||||
#define IRAM_ATTR
|
||||
#endif
|
||||
|
||||
#ifndef FPSTR
|
||||
#define FPSTR(pstr_pointer) (reinterpret_cast<const __FlashStringHelper*>(pstr_pointer))
|
||||
#endif
|
||||
|
||||
#ifndef PGM_P
|
||||
#define PGM_P const char*
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(POSIX)
|
||||
#ifndef __FlashStringHelper
|
||||
#define __FlashStringHelper char
|
||||
#endif
|
||||
|
||||
#ifndef F
|
||||
#define F(x) (x)
|
||||
#endif
|
||||
|
||||
#ifndef PSTR
|
||||
#define PSTR(x) x
|
||||
#endif
|
||||
|
||||
#ifndef PROGMEM
|
||||
#define PROGMEM
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS)
|
||||
#include <Windows.h>
|
||||
#define delay Sleep
|
||||
#endif
|
||||
|
||||
#if defined(POSIX)
|
||||
#ifdef USE_MONITOR
|
||||
#define delay SDL_Delay
|
||||
#else
|
||||
#define delay msleep
|
||||
#endif
|
||||
#if defined(WINDOWS) || defined(POSIX)
|
||||
#endif
|
||||
|
||||
#if HASP_TARGET_PC
|
||||
#include <string.h>
|
||||
#include <strings.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if USE_MONITOR
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
|
||||
#define snprintf_P snprintf
|
||||
#define memcpy_P memcpy
|
||||
@ -338,7 +408,13 @@ static WiFiSpiClass WiFi;
|
||||
#define strcpy_P strcpy
|
||||
#define strstr_P strstr
|
||||
#define halRestartMcu()
|
||||
#if USE_MONITOR
|
||||
#define millis SDL_GetTicks
|
||||
#elif defined(WINDOWS)
|
||||
#define millis Win32Millis
|
||||
#elif defined(POSIX)
|
||||
#define millis PosixMillis
|
||||
#endif
|
||||
|
||||
#define DEC 10
|
||||
#define HEX 16
|
||||
|
@ -1,10 +1,26 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef HASP_MACRO_H
|
||||
#define HASP_MACRO_H
|
||||
|
||||
#if defined(WINDOWS) || defined(POSIX)
|
||||
#ifdef ARDUINO
|
||||
#include "ArduinoLog.h"
|
||||
#endif
|
||||
|
||||
#ifdef USE_CONFIG_OVERRIDE
|
||||
#include "user_config_override.h"
|
||||
#endif
|
||||
|
||||
#if HASP_TARGET_PC
|
||||
#define HASP_RANDOM(x) rand() % x
|
||||
#elif HASP_TARGET_ARDUINO
|
||||
#define HASP_RANDOM(x) random(x)
|
||||
#else
|
||||
#define HASP_RANDOM(x) random() % x
|
||||
#endif
|
||||
|
||||
#if HASP_TARGET_PC
|
||||
#define LOG_OUTPUT(x, ...) printf(__VA_ARGS__)
|
||||
#else
|
||||
|
||||
|
@ -1,25 +1,31 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef HASP_PNG_H
|
||||
#define HASP_PNG_H
|
||||
#ifndef HASP_MEM_H
|
||||
#define HASP_MEM_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
void* lodepng_calloc(size_t num, size_t size);
|
||||
void* lodepng_malloc(size_t size);
|
||||
void* lodepng_realloc(void* ptr, size_t new_size);
|
||||
void lodepng_free(void* ptr);
|
||||
#endif // LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
|
||||
bool hasp_use_psram();
|
||||
void* hasp_calloc(size_t num, size_t size);
|
||||
void* hasp_malloc(size_t size);
|
||||
void* hasp_realloc(void* ptr, size_t new_size);
|
||||
void hasp_free(void* ptr);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
|
||||
#endif // HASP_PNG_H
|
||||
#endif // HASP_MEM_H
|
@ -59,7 +59,7 @@
|
||||
|
||||
/* Default display refresh period.
|
||||
* Can be changed in the display driver (`lv_disp_drv_t`).*/
|
||||
#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
|
||||
#define LV_DISP_DEF_REFR_PERIOD 50 /*[ms]*/
|
||||
|
||||
/* Dot Per Inch: used to initialize default sizes.
|
||||
* E.g. a button with width = LV_DPI / 2 -> half inch wide
|
||||
@ -76,19 +76,32 @@ typedef int16_t lv_coord_t;
|
||||
/* LittelvGL's internal memory manager's settings.
|
||||
* The graphical objects and other related data are stored here. */
|
||||
|
||||
//#define LV_FS_SEEK(x, y) lv_fs_seek(x, y, LV_FS_SEEK_SET)
|
||||
#define LV_FS_SEEK(x, y) lv_fs_seek(x, y)
|
||||
#define _lv_img_decoder_t _lv_img_decoder
|
||||
|
||||
#ifndef LV_MEM_CUSTOM
|
||||
/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
|
||||
#define LV_MEM_CUSTOM 0
|
||||
#endif
|
||||
#if LV_MEM_CUSTOM == 0
|
||||
/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
|
||||
|
||||
#ifndef LV_MEM_SIZE
|
||||
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
# define LV_MEM_SIZE (10 * 1024U) // Minimum 10 Kb
|
||||
# define LV_MEM_SIZE (12 * 1024U) // Minimum 12 Kb
|
||||
#elif defined(ESP32S2) && defined(BOARD_HAS_PSRAM)
|
||||
# define LV_MEM_SIZE (48 * 1024U) // 48Kb on ESP32-S2 with PSram
|
||||
#elif defined(ESP32S2)
|
||||
# define LV_MEM_SIZE (32 * 1024U) // 32Kb on ESP32-S2
|
||||
#elif defined(ARDUINO_ARCH_ESP32) && defined(BOARD_HAS_PSRAM)
|
||||
# define LV_MEM_SIZE (64 * 1024U) // 64Kb on ESP32 with PSram
|
||||
#elif defined(ARDUINO_ARCH_ESP32)
|
||||
# define LV_MEM_SIZE (48 * 1024U) // 48Kb on ESP32
|
||||
#else
|
||||
# define LV_MEM_SIZE (20 * 1024U) // 20Kb is much better
|
||||
#endif
|
||||
# define LV_MEM_SIZE (256 * 1024U) // native app
|
||||
#endif
|
||||
#endif // LV_MEM_SIZE
|
||||
|
||||
/* Complier prefix for a big array declaration */
|
||||
# define LV_MEM_ATTR
|
||||
@ -102,11 +115,25 @@ typedef int16_t lv_coord_t;
|
||||
/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
|
||||
# define LV_MEM_AUTO_DEFRAG 1
|
||||
#else /*LV_MEM_CUSTOM*/
|
||||
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
||||
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
|
||||
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
|
||||
#define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
||||
#define LV_MEM_CUSTOM_ALLOC hasp_malloc /*Wrapper to malloc*/
|
||||
#define LV_MEM_CUSTOM_FREE hasp_free /*Wrapper to free*/
|
||||
#endif /*LV_MEM_CUSTOM*/
|
||||
|
||||
#ifndef LV_VDB_SIZE
|
||||
#if defined(ARDUINO_ARCH_ESP8266)
|
||||
# define LV_VDB_SIZE (8 * 1024U) // Minimum 8 Kb
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
# define LV_VDB_SIZE (16 * 1024U) // 16kB draw buffer
|
||||
#elif defined(CONFIG_IDF_TARGET_ESP32S3)
|
||||
# define LV_VDB_SIZE (48 * 1024U) // 16kB draw buffer
|
||||
#elif defined(ARDUINO_ARCH_ESP32)
|
||||
# define LV_VDB_SIZE (32 * 1024U) // 32kB draw buffer
|
||||
#else
|
||||
# define LV_VDB_SIZE (128 * 1024U) // native app
|
||||
#endif
|
||||
#endif // LV_VDB_SIZE
|
||||
|
||||
/* Garbage Collector settings
|
||||
* Used if lvgl is binded to higher level language and the memory is managed by that language */
|
||||
#define LV_ENABLE_GC 0
|
||||
@ -184,10 +211,13 @@ typedef void* lv_group_user_data_t;
|
||||
#define LV_USE_FILESYSTEM 1
|
||||
#if LV_USE_FILESYSTEM
|
||||
/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
|
||||
typedef void* lv_fs_drv_user_data_t;
|
||||
typedef const char* lv_fs_drv_user_data_t;
|
||||
|
||||
/*File system interface*/
|
||||
#ifndef LV_USE_FS_IF
|
||||
#define LV_USE_FS_IF !defined(STM32)
|
||||
#endif
|
||||
|
||||
#if LV_USE_FS_IF
|
||||
# define LV_FS_IF_FATFS '\0'
|
||||
#if defined(STM32F4xx) // || defined(ARDUINO_ARCH_ESP8266)
|
||||
@ -199,6 +229,9 @@ typedef void* lv_fs_drv_user_data_t;
|
||||
//# define LV_FS_IF_SPIFFS '\0' // no internal esp Flash
|
||||
#endif
|
||||
#endif /*LV_USE_FS_IF*/
|
||||
#if HASP_TARGET_ARDUINO && !defined(LV_FS_PC_PATH)
|
||||
#define LV_FS_PC_PATH "/littlefs"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -225,7 +258,7 @@ typedef void* lv_fs_drv_user_data_t;
|
||||
#define LV_IMG_CACHE_DEF_SIZE 1
|
||||
#endif
|
||||
#ifndef LV_IMG_CACHE_DEF_SIZE_PSRAM
|
||||
#define LV_IMG_CACHE_DEF_SIZE_PSRAM 20 // special openHASP setting when PSRAM is used
|
||||
#define LV_IMG_CACHE_DEF_SIZE_PSRAM 12 // special openHASP setting when PSRAM is used
|
||||
#endif
|
||||
|
||||
/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
|
||||
@ -347,74 +380,252 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in
|
||||
/*==================
|
||||
* FONT USAGE
|
||||
*===================*/
|
||||
// #if 1 || HASP_USE_FREETYPE<=0
|
||||
// #if TFT_HEIGHT>=480 && TFT_WIDTH>=480
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_24_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_24_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_32_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_32_LATIN1 1
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_48_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_64_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_64_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
#if TFT_WIDTH>=320 || TFT_WIDTH>=480
|
||||
// #ifndef HASP_FONT_1
|
||||
// #define HASP_FONT_1 robotocondensed_regular_24_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_2
|
||||
// #define HASP_FONT_2 robotocondensed_regular_32_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_3
|
||||
// #define HASP_FONT_3 robotocondensed_regular_48_latin1 /* 10% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_4
|
||||
// #define HASP_FONT_4 robotocondensed_regular_64_latin1 /* 10% Height */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_5
|
||||
// #define HASP_FONT_5 robotocondensed_regular_16_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_SIZE_1
|
||||
// #define HASP_FONT_SIZE_1 24
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_2
|
||||
// #define HASP_FONT_SIZE_2 32
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_SIZE_3
|
||||
// #define HASP_FONT_SIZE_3 48
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_4
|
||||
// #define HASP_FONT_SIZE_4 64
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_5
|
||||
// #define HASP_FONT_SIZE_5 16
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #elif TFT_HEIGHT>=320 && TFT_WIDTH>=320
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_24_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_24_LATIN1 1
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_32_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_32_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_48_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_12_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_12_LATIN1 1
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_1
|
||||
// #define HASP_FONT_1 robotocondensed_regular_16_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_2
|
||||
// #define HASP_FONT_2 robotocondensed_regular_24_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_3
|
||||
// #define HASP_FONT_3 robotocondensed_regular_32_latin1 /* 10% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_4
|
||||
// #define HASP_FONT_4 robotocondensed_regular_48_latin1 /* 10% Height */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_5
|
||||
// #define HASP_FONT_5 robotocondensed_regular_12_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_SIZE_1
|
||||
// #define HASP_FONT_SIZE_1 16
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_2
|
||||
// #define HASP_FONT_SIZE_2 24
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_SIZE_3
|
||||
// #define HASP_FONT_SIZE_3 32
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_4
|
||||
// #define HASP_FONT_SIZE_4 48
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_5
|
||||
// #define HASP_FONT_SIZE_5 12
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #elif TFT_HEIGHT>=272 && TFT_WIDTH>=272
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_14_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_14_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_18_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_18_LATIN1 1
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_28_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_28_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_36_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_36_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_48_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_1
|
||||
// #define HASP_FONT_1 robotocondensed_regular_14_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_2
|
||||
// #define HASP_FONT_2 robotocondensed_regular_18_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_3
|
||||
// #define HASP_FONT_3 robotocondensed_regular_28_latin1 /* 10% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_4
|
||||
// #define HASP_FONT_4 robotocondensed_regular_36_latin1 /* 10% Height */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_5
|
||||
// #define HASP_FONT_5 robotocondensed_regular_48_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_SIZE_1
|
||||
// #define HASP_FONT_SIZE_1 14
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_2
|
||||
// #define HASP_FONT_SIZE_2 18
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_SIZE_3
|
||||
// #define HASP_FONT_SIZE_3 28
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_4
|
||||
// #define HASP_FONT_SIZE_4 36
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_5
|
||||
// #define HASP_FONT_SIZE_5 48
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #else // smaller than 272
|
||||
|
||||
// #ifndef HASP_FONT_1
|
||||
// #define HASP_FONT_1 robotocondensed_regular_12_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_2
|
||||
// #define HASP_FONT_2 robotocondensed_regular_16_latin1 /* 5% Width */
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_3
|
||||
// #define HASP_FONT_3 robotocondensed_regular_24_latin1 /* 10% Width */
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_4
|
||||
// #define HASP_FONT_4 robotocondensed_regular_32_latin1 /* 10% Height */
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_12_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_12_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_24_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_24_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_32_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_32_LATIN1 1
|
||||
// #endif
|
||||
// #ifndef ROBOTOCONDENSED_REGULAR_48_LATIN1
|
||||
// #define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #ifndef HASP_FONT_SIZE_1
|
||||
// #define HASP_FONT_SIZE_1 12
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_2
|
||||
// #define HASP_FONT_SIZE_2 16
|
||||
// #endif
|
||||
// #if HASP_USE_FREETYPE<=0
|
||||
// #ifndef HASP_FONT_SIZE_3
|
||||
// #define HASP_FONT_SIZE_3 24
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_4
|
||||
// #define HASP_FONT_SIZE_4 32
|
||||
// #endif
|
||||
// #ifndef HASP_FONT_SIZE_5
|
||||
// #define HASP_FONT_SIZE_5 48
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
// #endif
|
||||
// #endif
|
||||
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_12_ALL
|
||||
#define ROBOTOCONDENSED_REGULAR_12_ALL 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_16_ALL
|
||||
#define ROBOTOCONDENSED_REGULAR_16_ALL 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_24_ALL
|
||||
#define ROBOTOCONDENSED_REGULAR_24_ALL 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_32_ALL
|
||||
#define ROBOTOCONDENSED_REGULAR_32_ALL 1
|
||||
#endif
|
||||
|
||||
#ifndef HASP_FONT_1
|
||||
#define HASP_FONT_1 robotocondensed_regular_16_latin1 /* 5% Width */
|
||||
#define HASP_FONT_1 robotocondensed_regular_12_all
|
||||
#endif
|
||||
#ifndef HASP_FONT_2
|
||||
#define HASP_FONT_2 robotocondensed_regular_24_latin1 /* 5% Width */
|
||||
#define HASP_FONT_2 robotocondensed_regular_16_all
|
||||
#endif
|
||||
#ifndef HASP_FONT_3
|
||||
#define HASP_FONT_3 robotocondensed_regular_32_latin1 /* 10% Width */
|
||||
#define HASP_FONT_3 robotocondensed_regular_24_all
|
||||
#endif
|
||||
#ifndef HASP_FONT_4
|
||||
#define HASP_FONT_4 robotocondensed_regular_48_latin1 /* 10% Height */
|
||||
#endif
|
||||
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_24_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_24_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_32_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_32_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_48_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
#endif
|
||||
|
||||
#ifndef HASP_FONT_SIZE_1
|
||||
#define HASP_FONT_SIZE_1 16
|
||||
#endif
|
||||
#ifndef HASP_FONT_SIZE_2
|
||||
#define HASP_FONT_SIZE_2 24
|
||||
#endif
|
||||
#ifndef HASP_FONT_SIZE_3
|
||||
#define HASP_FONT_SIZE_3 32
|
||||
#endif
|
||||
#ifndef HASP_FONT_SIZE_4
|
||||
#define HASP_FONT_SIZE_4 48
|
||||
#endif
|
||||
|
||||
#else // not 320x480
|
||||
|
||||
#ifndef HASP_FONT_1
|
||||
#define HASP_FONT_1 robotocondensed_regular_12_latin1 /* 5% Width */
|
||||
#endif
|
||||
#ifndef HASP_FONT_2
|
||||
#define HASP_FONT_2 robotocondensed_regular_16_latin1 /* 5% Width */
|
||||
#endif
|
||||
#ifndef HASP_FONT_3
|
||||
#define HASP_FONT_3 robotocondensed_regular_24_latin1 /* 10% Width */
|
||||
#endif
|
||||
#ifndef HASP_FONT_4
|
||||
#define HASP_FONT_4 robotocondensed_regular_32_latin1 /* 10% Height */
|
||||
#endif
|
||||
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_12_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_12_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_16_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_16_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_24_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_24_LATIN1 1
|
||||
#endif
|
||||
#ifndef ROBOTOCONDENSED_REGULAR_32_LATIN1
|
||||
#define ROBOTOCONDENSED_REGULAR_32_LATIN1 1
|
||||
#define HASP_FONT_4 robotocondensed_regular_32_all
|
||||
#endif
|
||||
|
||||
#ifndef HASP_FONT_SIZE_1
|
||||
@ -430,8 +641,6 @@ typedef void* lv_indev_drv_user_data_t; /*Type of user data in the in
|
||||
#define HASP_FONT_SIZE_4 32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
|
||||
* The symbols are available via `LV_SYMBOL_...` defines
|
||||
* More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
|
||||
@ -517,34 +726,16 @@ typedef void* lv_font_user_data_t;
|
||||
// #define HASP_FONT_1_base FONT_CONCAT(HASP_FONT_1_size, _)
|
||||
// #define HASP_FONT_1 FONT_CONCAT(HASP_FONT_1_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_2_size FONT_CONCAT(HASP_FONTNAME, 16)
|
||||
// #define HASP_FONT_2_base FONT_CONCAT(HASP_FONT_2_size, _)
|
||||
// #define HASP_FONT_2 FONT_CONCAT(HASP_FONT_2_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_3_size FONT_CONCAT(HASP_FONTNAME, 22)
|
||||
// #define HASP_FONT_3_base FONT_CONCAT(HASP_FONT_3_size, _)
|
||||
// #define HASP_FONT_3 FONT_CONCAT(HASP_FONT_3_base, HASP_CHARACTER_SET)
|
||||
|
||||
// /* Concatenate the fontname macros */
|
||||
// #define HASP_FONT_4_size FONT_CONCAT(HASP_FONTNAME, 28)
|
||||
// #define HASP_FONT_4_base FONT_CONCAT(HASP_FONT_4_size, _)
|
||||
// #define HASP_FONT_4 FONT_CONCAT(HASP_FONT_4_base, HASP_CHARACTER_SET)
|
||||
|
||||
/*Always set a default font from the built-in fonts*/
|
||||
#if LV_HIGH_RESOURCE_MCU>0
|
||||
#if 0 && HASP_USE_FREETYPE<=0 // LV_HIGH_RESOURCE_MCU>0
|
||||
// #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(lv_font_montserrat_16);
|
||||
|
||||
// #define LV_FONT_CUSTOM_12 LV_FONT_DECLARE(robotocondensed_regular_12)
|
||||
// #define LV_FONT_CUSTOM_16 LV_FONT_DECLARE(robotocondensed_regular_16)
|
||||
// #define LV_FONT_CUSTOM_22 LV_FONT_DECLARE(robotocondensed_regular_22)
|
||||
// #define LV_FONT_CUSTOM_28 LV_FONT_DECLARE(robotocondensed_regular_28)
|
||||
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(HASP_FONT_1) \
|
||||
LV_FONT_DECLARE(HASP_FONT_2) \
|
||||
LV_FONT_DECLARE(HASP_FONT_3) \
|
||||
LV_FONT_DECLARE(HASP_FONT_4) \
|
||||
LV_FONT_DECLARE(HASP_FONT_5) \
|
||||
|
||||
#ifndef LV_FONT_DEFAULT
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_2 //&lv_font_montserrat_16
|
||||
@ -552,10 +743,32 @@ typedef void* lv_font_user_data_t;
|
||||
|
||||
#else
|
||||
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(unscii_8_icon);
|
||||
//#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(unscii_8_icon);
|
||||
#define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(HASP_FONT_1) \
|
||||
LV_FONT_DECLARE(HASP_FONT_2) \
|
||||
LV_FONT_DECLARE(HASP_FONT_3) \
|
||||
LV_FONT_DECLARE(HASP_FONT_4) \
|
||||
|
||||
#ifndef LV_FONT_DEFAULT
|
||||
#define LV_FONT_DEFAULT &unscii_8_icon //&lv_font_unscii_8
|
||||
#if TFT_HEIGHT >= 480 && TFT_WIDTH >= 480
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_4
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_3
|
||||
#elif TFT_HEIGHT >= 320 && TFT_WIDTH >= 320
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_3
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_2
|
||||
#else // smaller than 320
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_2
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_1
|
||||
#endif
|
||||
#endif // LV_FONT_DEFAULT
|
||||
|
||||
#ifndef LV_THEME_DEFAULT_FONT_SMALL
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL LV_FONT_DEFAULT
|
||||
#endif
|
||||
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL LV_FONT_DEFAULT
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE LV_FONT_DEFAULT
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE LV_FONT_DEFAULT
|
||||
|
||||
#endif // LV_HIGH_RESOURCE_MCU
|
||||
|
||||
@ -570,17 +783,17 @@ typedef void* lv_font_user_data_t;
|
||||
#define LV_THEME_DEFAULT_COLOR_PRIMARY LV_COLOR_RED
|
||||
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLUE
|
||||
#define LV_THEME_DEFAULT_FLAG 0 //LV_THEME_MATERIAL_FLAG_NONE
|
||||
#if LV_HIGH_RESOURCE_MCU
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_1 //&lv_font_montserrat_12
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL &HASP_FONT_2 //&lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE &HASP_FONT_3 //&lv_font_montserrat_22
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE &HASP_FONT_4 //&lv_font_montserrat_22 //&lv_font_montserrat_28_compressed
|
||||
#else
|
||||
#define LV_THEME_DEFAULT_FONT_SMALL LV_FONT_DEFAULT // &lv_font_montserrat_12
|
||||
#define LV_THEME_DEFAULT_FONT_NORMAL LV_FONT_DEFAULT // &lv_font_montserrat_16
|
||||
#define LV_THEME_DEFAULT_FONT_SUBTITLE LV_FONT_DEFAULT // &lv_font_montserrat_22
|
||||
#define LV_THEME_DEFAULT_FONT_TITLE LV_FONT_DEFAULT // &lv_font_montserrat_28_compressed
|
||||
#endif
|
||||
// #if HASP_USE_FREETYPE<=0 //LV_HIGH_RESOURCE_MCU
|
||||
// #define LV_THEME_DEFAULT_FONT_SMALL &HASP_FONT_1 //&lv_font_montserrat_12
|
||||
// #define LV_THEME_DEFAULT_FONT_NORMAL &HASP_FONT_2 //&lv_font_montserrat_16
|
||||
// #define LV_THEME_DEFAULT_FONT_SUBTITLE &HASP_FONT_2 //&lv_font_montserrat_22
|
||||
// #define LV_THEME_DEFAULT_FONT_TITLE &HASP_FONT_2 //&lv_font_montserrat_22 //&lv_font_montserrat_28_compressed
|
||||
// #else
|
||||
// #define LV_THEME_DEFAULT_FONT_SMALL LV_FONT_DEFAULT // &lv_font_montserrat_12
|
||||
// #define LV_THEME_DEFAULT_FONT_NORMAL LV_FONT_DEFAULT // &lv_font_montserrat_16
|
||||
// #define LV_THEME_DEFAULT_FONT_SUBTITLE LV_FONT_DEFAULT // &lv_font_montserrat_22
|
||||
// #define LV_THEME_DEFAULT_FONT_TITLE LV_FONT_DEFAULT // &lv_font_montserrat_28_compressed
|
||||
// #endif
|
||||
|
||||
#define LV_USE_THEME_EMPTY 0
|
||||
#define LV_USE_THEME_MONO 1
|
||||
@ -645,11 +858,13 @@ typedef void* lv_font_user_data_t;
|
||||
/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
|
||||
typedef struct {
|
||||
uint8_t id:8;
|
||||
uint8_t objid:8;
|
||||
uint8_t transitionid:4;
|
||||
uint8_t actionid:4;
|
||||
uint8_t objid:6;
|
||||
//uint8_t transitionid:4;
|
||||
//uint8_t actionid:4;
|
||||
uint8_t groupid:4;
|
||||
uint8_t swipeid:4;
|
||||
// uint8_t swipeid:4;
|
||||
void* ext;
|
||||
// char* action;
|
||||
} lv_obj_user_data_t;
|
||||
|
||||
/*1: enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
|
||||
|
@ -86,8 +86,10 @@ typedef int16_t lv_coord_t;
|
||||
/* LittelvGL's internal memory manager's settings.
|
||||
* The graphical objects and other related data are stored here. */
|
||||
|
||||
#ifndef LV_MEM_CUSTOM
|
||||
/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
|
||||
#define LV_MEM_CUSTOM 0
|
||||
#endif
|
||||
#if LV_MEM_CUSTOM == 0
|
||||
/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
|
||||
//# define LV_MEM_SIZE (32U * 1024U)
|
||||
@ -103,8 +105,8 @@ typedef int16_t lv_coord_t;
|
||||
# define LV_MEM_AUTO_DEFRAG 1
|
||||
#else /*LV_MEM_CUSTOM*/
|
||||
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
|
||||
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
|
||||
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
|
||||
# define LV_MEM_CUSTOM_ALLOC hasp_malloc /*Wrapper to malloc*/
|
||||
# define LV_MEM_CUSTOM_FREE hasp_free /*Wrapper to free*/
|
||||
#endif /*LV_MEM_CUSTOM*/
|
||||
|
||||
/* Use the standard memcpy and memset instead of LVGL's own functions.
|
||||
|
@ -125,7 +125,11 @@
|
||||
#define USE_WINDOWS 0
|
||||
#endif
|
||||
|
||||
#if USE_WINDOWS
|
||||
#ifndef USE_WIN32DRV
|
||||
#define USE_WINDOWS 0
|
||||
#endif
|
||||
|
||||
#if USE_WINDOWS || USE_WIN32DRV
|
||||
#define WINDOW_HOR_RES 480
|
||||
#define WINDOW_VER_RES 320
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef LV_SYMBOL_MDI_DEF_H
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
/* Include the normal default core configuration */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* MIT License - Copyright (c) 2019-2021 Francis Van Roie
|
||||
/* MIT License - Copyright (c) 2019-2024 Francis Van Roie
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
/***************************************************
|
||||
@ -18,15 +18,21 @@
|
||||
WiFi Settings
|
||||
**************************************************/
|
||||
#define WIFI_SSID ""
|
||||
#define WIFI_PASSW ""
|
||||
#define WIFI_PASSWORD ""
|
||||
|
||||
/***************************************************
|
||||
MQTT Settings
|
||||
Http Server Settings
|
||||
**************************************************/
|
||||
#define MQTT_HOST ""
|
||||
#define HTTP_USERNAME ""
|
||||
#define HTTP_PASSWORD ""
|
||||
|
||||
/***************************************************
|
||||
MQTT Client Settings
|
||||
**************************************************/
|
||||
#define MQTT_HOSTNAME ""
|
||||
#define MQTT_PORT 1883
|
||||
#define MQTT_USER ""
|
||||
#define MQTT_PASSW ""
|
||||
#define MQTT_USERNAME ""
|
||||
#define MQTT_PASSWORD ""
|
||||
#define MQTT_PREFIX "hasp"
|
||||
#define MQTT_NODENAME "plate01"
|
||||
#define MQTT_GROUPNAME "plates"
|
||||
@ -35,17 +41,17 @@
|
||||
#define MQTT_STATEPERIOD 300000
|
||||
|
||||
/***************************************************
|
||||
* Server Settings
|
||||
* OTA Settings
|
||||
**************************************************/
|
||||
#define OTA_HOSTNAME ""
|
||||
#define OTA_SERVER ""
|
||||
#define OTA_PORT 80
|
||||
//#define HASP_USE_ARDUINOOTA 1 // Enable the Arduino OTA service
|
||||
#define ARDUINOOTA_PORT 3232
|
||||
#define ARDUINOOTA_PASSWORD ""
|
||||
#define OTA_URL ""
|
||||
#define OTA_PASSWORD ""
|
||||
|
||||
/***************************************************
|
||||
* Syslog Settings
|
||||
**************************************************/
|
||||
#define HASP_USE_SYSLOG 0
|
||||
#define SYSLOG_SERVER ""
|
||||
#define SYSLOG_PORT 514
|
||||
#define APP_NAME "HASP"
|
||||
@ -53,6 +59,9 @@
|
||||
/***************************************************
|
||||
* Timezone Settings
|
||||
**************************************************/
|
||||
#define NTPSERVER1 "pool.ntp.org"
|
||||
#define NTPSERVER2 "time.nist.gov"
|
||||
#define NTPSERVER3 "time.google.com"
|
||||
#define MYTZ \
|
||||
"CET-1CEST,M3.5.0,M10.5.0/3" // A full list with possible timezones can be found here
|
||||
// https://gist.github.com/alwynallan/24d96091655391107939
|
||||
@ -68,19 +77,25 @@
|
||||
// #define HASP_LANGUAGE pt_BR // Brazilian Portuguese
|
||||
// #define HASP_LANGUAGE pt_PT // Portuguese
|
||||
// #define HASP_LANGUAGE ro_RO // Romanian
|
||||
// #define HASP_LANGUAGE de_DE // German
|
||||
|
||||
/***************************************************
|
||||
* Web interface coloring
|
||||
**************************************************/
|
||||
// Light theme (default)
|
||||
#define D_HTTP_COLOR_TEXT "#000" // Global text color - Black
|
||||
#define D_HTTP_COLOR_BACKGROUND "#fff" // Global background color - White
|
||||
#define D_HTTP_COLOR_INPUT_TEXT "#000" // Input text color - Black
|
||||
#define D_HTTP_COLOR_INPUT "#fff" // Input background color - White
|
||||
#define D_HTTP_COLOR_INPUT_WARNING "#f00" // Input warning border color - Red
|
||||
#define D_HTTP_COLOR_BUTTON_TEXT "#fff" // Button text color - White
|
||||
#define D_HTTP_COLOR_BUTTON "#1fa3ec" // Button color - Vivid blue
|
||||
#define D_HTTP_COLOR_BUTTON_RESET "#f00" // Restart/Reset button color - red
|
||||
#define D_HTTP_COLOR_TEXT "#000" // Global text color - Black
|
||||
#define D_HTTP_COLOR_BACKGROUND "#fff" // Global background color - White
|
||||
#define D_HTTP_COLOR_INPUT_TEXT "#000" // Input text color - Black
|
||||
#define D_HTTP_COLOR_INPUT "#fff" // Input background color - White
|
||||
#define D_HTTP_COLOR_INPUT_WARNING "#f00" // Input warning border color - Red
|
||||
#define D_HTTP_COLOR_BUTTON_TEXT "#fff" // Button text color - White
|
||||
#define D_HTTP_COLOR_BUTTON "#1fa3ec" // Button color - Vivid blue
|
||||
#define D_HTTP_COLOR_BUTTON_HOVER "#0083cc" // Button color - Olympic blue
|
||||
#define D_HTTP_COLOR_BUTTON_RESET "#f00" // Restart/Reset button color - red
|
||||
#define D_HTTP_COLOR_BUTTON_RESET_HOVER "#b00" // Restart/Reset button color - Dark red
|
||||
#define D_HTTP_COLOR_GROUP "#f3f3f3" // Group container background color
|
||||
#define D_HTTP_COLOR_GROUP_TEXT "#000" // Group container text color - black
|
||||
#define D_HTTP_COLOR_FOOTER_TEXT "#0083cc" // Footer text color - Olympic blue
|
||||
|
||||
/*
|
||||
// Dark theme
|
||||
@ -91,7 +106,12 @@
|
||||
#define D_HTTP_COLOR_INPUT_WARNING "#ff5661" // Warning text color - Brick Red
|
||||
#define D_HTTP_COLOR_BUTTON_TEXT "#faffff" // Button text color - Very pale (mostly white) cyan
|
||||
#define D_HTTP_COLOR_BUTTON "#1fa3ec" // Button color - Vivid blue
|
||||
#define D_HTTP_COLOR_BUTTON_HOVER "#0083cc" // Button color - Olympic Blue
|
||||
#define D_HTTP_COLOR_BUTTON_RESET "#d43535" // Restart/Reset/Delete button color - Strong red
|
||||
#define D_HTTP_COLOR_BUTTON_RESET_HOVER "#b00" // Restart/Reset button color - Dark red
|
||||
#define D_HTTP_COLOR_GROUP "#444" // Group container background color - Dark gray
|
||||
#define D_HTTP_COLOR_GROUP_TEXT "#fff" // Group container text color - white
|
||||
#define D_HTTP_COLOR_FOOTER_TEXT "#1fa3ec" // Footer text color - Vivid blue
|
||||
*/
|
||||
|
||||
/***************************************************
|
||||
@ -101,18 +121,21 @@
|
||||
// #define HASP_FONT_2 robotocondensed_regular_22_latin1
|
||||
// #define HASP_FONT_3 robotocondensed_regular_40_latin1
|
||||
// #define HASP_FONT_4 robotocondensed_regular_48_latin1
|
||||
// #define HASP_FONT_5 robotocondensed_regular_12_latin1
|
||||
|
||||
// #define ROBOTOCONDENSED_REGULAR_16_LATIN1 1 // Enable the selected fonts
|
||||
// #define ROBOTOCONDENSED_REGULAR_22_LATIN1 1
|
||||
// #define ROBOTOCONDENSED_REGULAR_40_LATIN1 1
|
||||
// #define ROBOTOCONDENSED_REGULAR_48_LATIN1 1
|
||||
// #define ROBOTOCONDENSED_REGULAR_12_LATIN1 1
|
||||
|
||||
// #define HASP_FONT_SIZE_1 16 // Define used font sizes
|
||||
// #define HASP_FONT_SIZE_2 22
|
||||
// #define HASP_FONT_SIZE_3 40
|
||||
// #define HASP_FONT_SIZE_4 48
|
||||
// #define HASP_FONT_SIZE_5 12
|
||||
|
||||
#define LV_FONT_DEFAULT &HASP_FONT_1
|
||||
// #define LV_FONT_DEFAULT &HASP_FONT_1
|
||||
|
||||
/***************************************************
|
||||
* GPIO Settings
|
||||
@ -123,10 +146,16 @@
|
||||
/***************************************************
|
||||
* Other Settings
|
||||
**************************************************/
|
||||
//#define HASP_USE_MDNS 0 // Disable MDNS
|
||||
//#define HASP_USE_CUSTOM 1 // Enable compilation of custom code from /src/custom
|
||||
//#define HASP_USE_HA // Enable Home Assistant auto-discovery
|
||||
//#define HASP_START_CONSOLE 0 // Disable starting of serial console at boot
|
||||
//#define HASP_START_TELNET 0 // Disable starting of telnet service at boot
|
||||
//#define HASP_START_HTTP 0 // Disable starting of web interface at boot
|
||||
//#define HASP_START_FTP 0 // Disable starting of ftp server at boot
|
||||
//#define LV_MEM_SIZE (64 * 1024U) // 64KiB of lvgl memory (default 48)
|
||||
//#define LV_VDB_SIZE (32 * 1024U) // 32KiB of lvgl draw buffer (default 32)
|
||||
//#define HASP_DEBUG_OBJ_TREE // Output all objects to the log on page changes
|
||||
//#define HASP_LOG_LEVEL LOG_LEVEL_VERBOSE // LOG_LEVEL_* can be DEBUG, VERBOSE, TRACE, INFO, WARNING, ERROR, CRITICAL, ALERT, FATAL, SILENT
|
||||
//#define HASP_LOG_TASKS // Also log the Taskname and watermark of ESP32 tasks
|
||||
|
||||
#endif
|
||||
#endif // HASP_USER_CONFIG_OVERRIDE_H
|
||||
|
@ -17,7 +17,7 @@ Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
#if defined(ARDUINO) && ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#include <Arduino.h>
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
125
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGBPanel_mod.cpp
Normal file
125
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGBPanel_mod.cpp
Normal file
@ -0,0 +1,125 @@
|
||||
#include "Arduino_RGBPanel_mod.h"
|
||||
|
||||
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
||||
|
||||
Arduino_RGBPanel_Mod::Arduino_RGBPanel_Mod(
|
||||
int8_t de, int8_t vsync, int8_t hsync, int8_t pclk,
|
||||
int8_t r0, int8_t r1, int8_t r2, int8_t r3, int8_t r4,
|
||||
int8_t g0, int8_t g1, int8_t g2, int8_t g3, int8_t g4, int8_t g5,
|
||||
int8_t b0, int8_t b1, int8_t b2, int8_t b3, int8_t b4,
|
||||
uint16_t hsync_polarity, uint16_t hsync_front_porch, uint16_t hsync_pulse_width, uint16_t hsync_back_porch,
|
||||
uint16_t vsync_polarity, uint16_t vsync_front_porch, uint16_t vsync_pulse_width, uint16_t vsync_back_porch,
|
||||
uint16_t pclk_active_neg, int32_t prefer_speed, bool useBigEndian)
|
||||
: _de(de), _vsync(vsync), _hsync(hsync), _pclk(pclk),
|
||||
_r0(r0), _r1(r1), _r2(r2), _r3(r3), _r4(r4),
|
||||
_g0(g0), _g1(g1), _g2(g2), _g3(g3), _g4(g4), _g5(g5),
|
||||
_b0(b0), _b1(b1), _b2(b2), _b3(b3), _b4(b4),
|
||||
_hsync_polarity(hsync_polarity), _hsync_front_porch(hsync_front_porch), _hsync_pulse_width(hsync_pulse_width), _hsync_back_porch(hsync_back_porch),
|
||||
_vsync_polarity(vsync_polarity), _vsync_front_porch(vsync_front_porch), _vsync_pulse_width(vsync_pulse_width), _vsync_back_porch(vsync_back_porch),
|
||||
_pclk_active_neg(pclk_active_neg), _prefer_speed(prefer_speed), _useBigEndian(useBigEndian)
|
||||
{
|
||||
}
|
||||
|
||||
void Arduino_RGBPanel_Mod::begin(int32_t speed)
|
||||
{
|
||||
if (speed == GFX_NOT_DEFINED)
|
||||
{
|
||||
#ifdef CONFIG_SPIRAM_MODE_QUAD
|
||||
_speed = 6000000L;
|
||||
#else
|
||||
_speed = 12000000L;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
_speed = speed;
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t *Arduino_RGBPanel_Mod::getFrameBuffer(int16_t w, int16_t h)
|
||||
{
|
||||
esp_lcd_rgb_panel_config_t *_panel_config = (esp_lcd_rgb_panel_config_t *)heap_caps_calloc(1, sizeof(esp_lcd_rgb_panel_config_t), MALLOC_CAP_DMA | MALLOC_CAP_INTERNAL);
|
||||
|
||||
_panel_config->clk_src = LCD_CLK_SRC_PLL160M;
|
||||
|
||||
_panel_config->timings.pclk_hz = (_prefer_speed == GFX_NOT_DEFINED) ? _speed : _prefer_speed;
|
||||
_panel_config->timings.h_res = w;
|
||||
_panel_config->timings.v_res = h;
|
||||
// The following parameters should refer to LCD spec
|
||||
_panel_config->timings.hsync_pulse_width = _hsync_pulse_width;
|
||||
_panel_config->timings.hsync_back_porch = _hsync_back_porch;
|
||||
_panel_config->timings.hsync_front_porch = _hsync_front_porch;
|
||||
_panel_config->timings.vsync_pulse_width = _vsync_pulse_width;
|
||||
_panel_config->timings.vsync_back_porch = _vsync_back_porch;
|
||||
_panel_config->timings.vsync_front_porch = _vsync_front_porch;
|
||||
_panel_config->timings.flags.hsync_idle_low = (_hsync_polarity == 0) ? 1 : 0;
|
||||
_panel_config->timings.flags.vsync_idle_low = (_vsync_polarity == 0) ? 1 : 0;
|
||||
_panel_config->timings.flags.de_idle_high = 0;
|
||||
_panel_config->timings.flags.pclk_active_neg = _pclk_active_neg;
|
||||
_panel_config->timings.flags.pclk_idle_high = 0;
|
||||
|
||||
_panel_config->data_width = 16; // RGB565 in parallel mode, thus 16bit in width
|
||||
_panel_config->sram_trans_align = 8;
|
||||
_panel_config->psram_trans_align = 64;
|
||||
_panel_config->hsync_gpio_num = _hsync;
|
||||
_panel_config->vsync_gpio_num = _vsync;
|
||||
_panel_config->de_gpio_num = _de;
|
||||
_panel_config->pclk_gpio_num = _pclk;
|
||||
|
||||
if (_useBigEndian)
|
||||
{
|
||||
_panel_config->data_gpio_nums[0] = _g3;
|
||||
_panel_config->data_gpio_nums[1] = _g4;
|
||||
_panel_config->data_gpio_nums[2] = _g5;
|
||||
_panel_config->data_gpio_nums[3] = _r0;
|
||||
_panel_config->data_gpio_nums[4] = _r1;
|
||||
_panel_config->data_gpio_nums[5] = _r2;
|
||||
_panel_config->data_gpio_nums[6] = _r3;
|
||||
_panel_config->data_gpio_nums[7] = _r4;
|
||||
_panel_config->data_gpio_nums[8] = _b0;
|
||||
_panel_config->data_gpio_nums[9] = _b1;
|
||||
_panel_config->data_gpio_nums[10] = _b2;
|
||||
_panel_config->data_gpio_nums[11] = _b3;
|
||||
_panel_config->data_gpio_nums[12] = _b4;
|
||||
_panel_config->data_gpio_nums[13] = _g0;
|
||||
_panel_config->data_gpio_nums[14] = _g1;
|
||||
_panel_config->data_gpio_nums[15] = _g2;
|
||||
}
|
||||
else
|
||||
{
|
||||
_panel_config->data_gpio_nums[0] = _b0;
|
||||
_panel_config->data_gpio_nums[1] = _b1;
|
||||
_panel_config->data_gpio_nums[2] = _b2;
|
||||
_panel_config->data_gpio_nums[3] = _b3;
|
||||
_panel_config->data_gpio_nums[4] = _b4;
|
||||
_panel_config->data_gpio_nums[5] = _g0;
|
||||
_panel_config->data_gpio_nums[6] = _g1;
|
||||
_panel_config->data_gpio_nums[7] = _g2;
|
||||
_panel_config->data_gpio_nums[8] = _g3;
|
||||
_panel_config->data_gpio_nums[9] = _g4;
|
||||
_panel_config->data_gpio_nums[10] = _g5;
|
||||
_panel_config->data_gpio_nums[11] = _r0;
|
||||
_panel_config->data_gpio_nums[12] = _r1;
|
||||
_panel_config->data_gpio_nums[13] = _r2;
|
||||
_panel_config->data_gpio_nums[14] = _r3;
|
||||
_panel_config->data_gpio_nums[15] = _r4;
|
||||
}
|
||||
|
||||
_panel_config->disp_gpio_num = GPIO_NUM_NC;
|
||||
|
||||
_panel_config->flags.disp_active_low = 0;
|
||||
_panel_config->flags.relax_on_idle = 0;
|
||||
_panel_config->flags.fb_in_psram = 1; // allocate frame buffer in PSRAM
|
||||
|
||||
ESP_ERROR_CHECK(esp_lcd_new_rgb_panel(_panel_config, &_panel_handle));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_reset(_panel_handle));
|
||||
ESP_ERROR_CHECK(esp_lcd_panel_init(_panel_handle));
|
||||
|
||||
uint16_t color = random(0xffff);
|
||||
ESP_ERROR_CHECK(_panel_handle->draw_bitmap(_panel_handle, 0, 0, 1, 1, &color));
|
||||
|
||||
_rgb_panel = __containerof(_panel_handle, esp_rgb_panel_t, base);
|
||||
|
||||
return (uint16_t *)_rgb_panel->fb;
|
||||
}
|
||||
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
102
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGBPanel_mod.h
Normal file
102
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGBPanel_mod.h
Normal file
@ -0,0 +1,102 @@
|
||||
#ifdef HASP_USE_ARDUINOGFX
|
||||
#include "Arduino.h"
|
||||
#include "Arduino_DataBus.h"
|
||||
#endif
|
||||
|
||||
#if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
||||
|
||||
#include "databus/Arduino_ESP32RGBPanel.h" // struct esp_rgb_panel_t
|
||||
|
||||
#ifndef _ARDUINO_RGBPANEL_MOD_H_
|
||||
#define _ARDUINO_RGBPANEL_MOD_H_
|
||||
|
||||
#include "esp_lcd_panel_io.h"
|
||||
#include "esp_lcd_panel_rgb.h"
|
||||
#include "esp_lcd_panel_vendor.h"
|
||||
#include "esp_lcd_panel_ops.h"
|
||||
#include "esp_lcd_panel_interface.h"
|
||||
#include "esp_private/gdma.h"
|
||||
#include "esp_pm.h"
|
||||
#include "hal/dma_types.h"
|
||||
|
||||
#include "hal/lcd_hal.h"
|
||||
#include "hal/lcd_ll.h"
|
||||
|
||||
#include "esp32s3/rom/cache.h"
|
||||
// This function is located in ROM (also see esp_rom/${target}/ld/${target}.rom.ld)
|
||||
extern int Cache_WriteBack_Addr(uint32_t addr, uint32_t size);
|
||||
|
||||
// extract from esp-idf esp_lcd_rgb_panel.c
|
||||
/*struct esp_rgb_panel_t
|
||||
{
|
||||
esp_lcd_panel_t base; // Base class of generic lcd panel
|
||||
int panel_id; // LCD panel ID
|
||||
lcd_hal_context_t hal; // Hal layer object
|
||||
size_t data_width; // Number of data lines (e.g. for RGB565, the data width is 16)
|
||||
size_t sram_trans_align; // Alignment for framebuffer that allocated in SRAM
|
||||
size_t psram_trans_align; // Alignment for framebuffer that allocated in PSRAM
|
||||
int disp_gpio_num; // Display control GPIO, which is used to perform action like "disp_off"
|
||||
intr_handle_t intr; // LCD peripheral interrupt handle
|
||||
esp_pm_lock_handle_t pm_lock; // Power management lock
|
||||
size_t num_dma_nodes; // Number of DMA descriptors that used to carry the frame buffer
|
||||
uint8_t *fb; // Frame buffer
|
||||
size_t fb_size; // Size of frame buffer
|
||||
int data_gpio_nums[SOC_LCD_RGB_DATA_WIDTH]; // GPIOs used for data lines, we keep these GPIOs for action like "invert_color"
|
||||
size_t resolution_hz; // Peripheral clock resolution
|
||||
esp_lcd_rgb_timing_t timings; // RGB timing parameters (e.g. pclk, sync pulse, porch width)
|
||||
gdma_channel_handle_t dma_chan; // DMA channel handle
|
||||
esp_lcd_rgb_panel_frame_trans_done_cb_t on_frame_trans_done; // Callback, invoked after frame trans done
|
||||
void *user_ctx; // Reserved user's data of callback functions
|
||||
int x_gap; // Extra gap in x coordinate, it's used when calculate the flush window
|
||||
int y_gap; // Extra gap in y coordinate, it's used when calculate the flush window
|
||||
struct
|
||||
{
|
||||
unsigned int disp_en_level : 1; // The level which can turn on the screen by `disp_gpio_num`
|
||||
unsigned int stream_mode : 1; // If set, the LCD transfers data continuously, otherwise, it stops refreshing the LCD when transaction done
|
||||
unsigned int fb_in_psram : 1; // Whether the frame buffer is in PSRAM
|
||||
} flags;
|
||||
dma_descriptor_t dma_nodes[]; // DMA descriptor pool of size `num_dma_nodes`
|
||||
};*/
|
||||
|
||||
class Arduino_RGBPanel_Mod
|
||||
{
|
||||
public:
|
||||
Arduino_RGBPanel_Mod(
|
||||
int8_t de, int8_t vsync, int8_t hsync, int8_t pclk,
|
||||
int8_t r0, int8_t r1, int8_t r2, int8_t r3, int8_t r4,
|
||||
int8_t g0, int8_t g1, int8_t g2, int8_t g3, int8_t g4, int8_t g5,
|
||||
int8_t b0, int8_t b1, int8_t b2, int8_t b3, int8_t b4,
|
||||
uint16_t hsync_polarity, uint16_t hsync_front_porch, uint16_t hsync_pulse_width, uint16_t hsync_back_porch,
|
||||
uint16_t vsync_polarity, uint16_t vsync_front_porch, uint16_t vsync_pulse_width, uint16_t vsync_back_porch,
|
||||
uint16_t pclk_active_neg = 0, int32_t prefer_speed = GFX_NOT_DEFINED, bool useBigEndian = false);
|
||||
|
||||
void begin(int32_t speed = GFX_NOT_DEFINED);
|
||||
|
||||
uint16_t *getFrameBuffer(int16_t w, int16_t h);
|
||||
esp_lcd_panel_handle_t _panel_handle = NULL;
|
||||
|
||||
protected:
|
||||
private:
|
||||
int32_t _speed;
|
||||
int8_t _de, _vsync, _hsync, _pclk;
|
||||
int8_t _r0, _r1, _r2, _r3, _r4;
|
||||
int8_t _g0, _g1, _g2, _g3, _g4, _g5;
|
||||
int8_t _b0, _b1, _b2, _b3, _b4;
|
||||
uint16_t _hsync_polarity;
|
||||
uint16_t _hsync_front_porch;
|
||||
uint16_t _hsync_pulse_width;
|
||||
uint16_t _hsync_back_porch;
|
||||
uint16_t _vsync_polarity;
|
||||
uint16_t _vsync_front_porch;
|
||||
uint16_t _vsync_pulse_width;
|
||||
uint16_t _vsync_back_porch;
|
||||
uint16_t _pclk_active_neg;
|
||||
int32_t _prefer_speed;
|
||||
bool _useBigEndian;
|
||||
|
||||
esp_rgb_panel_t *_rgb_panel;
|
||||
};
|
||||
|
||||
#endif // _ARDUINO_ESP32RGBPANEL_H_
|
||||
|
||||
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
290
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGB_Display_mod.cpp
Normal file
290
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGB_Display_mod.cpp
Normal file
@ -0,0 +1,290 @@
|
||||
#include "Arduino_RGB_Display_mod.h"
|
||||
|
||||
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32S3) && defined(HASP_USE_ARDUINOGFX)
|
||||
|
||||
#include "Arduino_GFX.h"
|
||||
#include "Arduino_DataBus.h"
|
||||
#include "Arduino_RGB_Display_mod.h"
|
||||
|
||||
Arduino_RGB_Display_Mod::Arduino_RGB_Display_Mod(int16_t w, int16_t h, Arduino_RGBPanel_Mod* rgbpanel, uint8_t r,
|
||||
bool auto_flush, Arduino_DataBus* bus, int8_t rst,
|
||||
const uint8_t* init_operations, size_t init_operations_len)
|
||||
: Arduino_GFX(w, h), _rgbpanel(rgbpanel), _auto_flush(auto_flush), _bus(bus), _rst(rst),
|
||||
_init_operations(init_operations), _init_operations_len(init_operations_len)
|
||||
{
|
||||
_framebuffer_size = w * h * 2;
|
||||
_rotation = r;
|
||||
}
|
||||
|
||||
bool Arduino_RGB_Display_Mod::begin(int32_t speed)
|
||||
{
|
||||
_rgbpanel->begin(speed);
|
||||
|
||||
if(_bus) {
|
||||
_bus->begin();
|
||||
}
|
||||
|
||||
if(_rst != GFX_NOT_DEFINED) {
|
||||
pinMode(_rst, OUTPUT);
|
||||
digitalWrite(_rst, HIGH);
|
||||
delay(100);
|
||||
digitalWrite(_rst, LOW);
|
||||
delay(120);
|
||||
digitalWrite(_rst, HIGH);
|
||||
delay(120);
|
||||
} else {
|
||||
if(_bus) {
|
||||
// Software Rest
|
||||
_bus->sendCommand(0x01);
|
||||
delay(120);
|
||||
}
|
||||
}
|
||||
|
||||
if(_bus) {
|
||||
if(_init_operations_len > 0) {
|
||||
_bus->batchOperation((uint8_t*)_init_operations, _init_operations_len);
|
||||
}
|
||||
}
|
||||
|
||||
_framebuffer = _rgbpanel->getFrameBuffer(WIDTH, HEIGHT);
|
||||
|
||||
if(!_framebuffer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::writePixelPreclipped(int16_t x, int16_t y, uint16_t color)
|
||||
{
|
||||
uint16_t* fb = _framebuffer;
|
||||
fb += (int32_t)y * _width;
|
||||
fb += x;
|
||||
*fb = color;
|
||||
if(_auto_flush) {
|
||||
Cache_WriteBack_Addr((uint32_t)fb, 2);
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
|
||||
{
|
||||
if(_ordered_in_range(x, 0, _max_x) && h) { // X on screen, nonzero height
|
||||
if(h < 0) { // If negative height...
|
||||
y += h + 1; // Move Y to top edge
|
||||
h = -h; // Use positive height
|
||||
}
|
||||
if(y <= _max_y) { // Not off bottom
|
||||
int16_t y2 = y + h - 1;
|
||||
if(y2 >= 0) { // Not off top
|
||||
// Line partly or fully overlaps screen
|
||||
if(y < 0) {
|
||||
y = 0;
|
||||
h = y2 + 1;
|
||||
} // Clip top
|
||||
if(y2 > _max_y) {
|
||||
h = _max_y - y + 1;
|
||||
} // Clip bottom
|
||||
|
||||
uint16_t* fb = _framebuffer + ((int32_t)y * _width) + x;
|
||||
if(_auto_flush) {
|
||||
while(h--) {
|
||||
*fb = color;
|
||||
Cache_WriteBack_Addr((uint32_t)fb, 2);
|
||||
fb += _width;
|
||||
}
|
||||
} else {
|
||||
while(h--) {
|
||||
*fb = color;
|
||||
fb += _width;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
|
||||
{
|
||||
if(_ordered_in_range(y, 0, _max_y) && w) { // Y on screen, nonzero width
|
||||
if(w < 0) { // If negative width...
|
||||
x += w + 1; // Move X to left edge
|
||||
w = -w; // Use positive width
|
||||
}
|
||||
if(x <= _max_x) { // Not off right
|
||||
int16_t x2 = x + w - 1;
|
||||
if(x2 >= 0) { // Not off left
|
||||
// Line partly or fully overlaps screen
|
||||
if(x < 0) {
|
||||
x = 0;
|
||||
w = x2 + 1;
|
||||
} // Clip left
|
||||
if(x2 > _max_x) {
|
||||
w = _max_x - x + 1;
|
||||
} // Clip right
|
||||
|
||||
uint16_t* fb = _framebuffer + ((int32_t)y * _width) + x;
|
||||
uint32_t cachePos = (uint32_t)fb;
|
||||
int16_t writeSize = w * 2;
|
||||
while(w--) {
|
||||
*(fb++) = color;
|
||||
}
|
||||
if(_auto_flush) {
|
||||
Cache_WriteBack_Addr(cachePos, writeSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::writeFillRectPreclipped(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
|
||||
{
|
||||
uint16_t* row = _framebuffer;
|
||||
row += y * _width;
|
||||
uint32_t cachePos = (uint32_t)row;
|
||||
row += x;
|
||||
for(int j = 0; j < h; j++) {
|
||||
for(int i = 0; i < w; i++) {
|
||||
row[i] = color;
|
||||
}
|
||||
row += _width;
|
||||
}
|
||||
if(_auto_flush) {
|
||||
Cache_WriteBack_Addr(cachePos, _width * h * 2);
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::setRotation(uint8_t r)
|
||||
{
|
||||
esp_err_t err = esp_lcd_panel_swap_xy(_rgbpanel->_panel_handle, r & 1);
|
||||
err = esp_lcd_panel_mirror(_rgbpanel->_panel_handle, r & 4, r & 2);
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::invertDisplay(bool i)
|
||||
{
|
||||
esp_err_t err = esp_lcd_panel_invert_color(_rgbpanel->_panel_handle, i);
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::draw16bitRGBBitmap(int16_t x, int16_t y, uint16_t* bitmap, int16_t w, int16_t h)
|
||||
{
|
||||
esp_err_t err = esp_lcd_panel_draw_bitmap(_rgbpanel->_panel_handle, x, y, x + w, y + h, bitmap);
|
||||
return;
|
||||
|
||||
if(((x + w - 1) < 0) || // Outside left
|
||||
((y + h - 1) < 0) || // Outside top
|
||||
(x > _max_x) || // Outside right
|
||||
(y > _max_y) // Outside bottom
|
||||
) {
|
||||
return;
|
||||
} else {
|
||||
int16_t xskip = 0;
|
||||
if((y + h - 1) > _max_y) {
|
||||
h -= (y + h - 1) - _max_y;
|
||||
}
|
||||
if(y < 0) {
|
||||
bitmap -= y * w;
|
||||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
if((x + w - 1) > _max_x) {
|
||||
xskip = (x + w - 1) - _max_x;
|
||||
w -= xskip;
|
||||
}
|
||||
if(x < 0) {
|
||||
bitmap -= x;
|
||||
xskip -= x;
|
||||
w += x;
|
||||
x = 0;
|
||||
}
|
||||
uint16_t* row = _framebuffer;
|
||||
row += y * _width;
|
||||
uint32_t cachePos = (uint32_t)row;
|
||||
row += x;
|
||||
if(((_width & 1) == 0) && ((xskip & 1) == 0) && ((w & 1) == 0)) {
|
||||
uint32_t* row2 = (uint32_t*)row;
|
||||
uint32_t* bitmap2 = (uint32_t*)bitmap;
|
||||
int16_t _width2 = _width >> 1;
|
||||
int16_t xskip2 = xskip >> 1;
|
||||
int16_t w2 = w >> 1;
|
||||
|
||||
for(int16_t j = 0; j < h; j++) {
|
||||
for(int16_t i = 0; i < w2; i++) {
|
||||
row2[i] = *bitmap2++;
|
||||
}
|
||||
bitmap2 += xskip2;
|
||||
row2 += _width2;
|
||||
}
|
||||
} else {
|
||||
for(int j = 0; j < h; j++) {
|
||||
for(int i = 0; i < w; i++) {
|
||||
row[i] = *bitmap++;
|
||||
}
|
||||
bitmap += xskip;
|
||||
row += _width;
|
||||
}
|
||||
}
|
||||
if(_auto_flush) {
|
||||
Cache_WriteBack_Addr(cachePos, _width * h * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::draw16bitBeRGBBitmap(int16_t x, int16_t y, uint16_t* bitmap, int16_t w, int16_t h)
|
||||
{
|
||||
if(((x + w - 1) < 0) || // Outside left
|
||||
((y + h - 1) < 0) || // Outside top
|
||||
(x > _max_x) || // Outside right
|
||||
(y > _max_y) // Outside bottom
|
||||
) {
|
||||
return;
|
||||
} else {
|
||||
int16_t xskip = 0;
|
||||
if((y + h - 1) > _max_y) {
|
||||
h -= (y + h - 1) - _max_y;
|
||||
}
|
||||
if(y < 0) {
|
||||
bitmap -= y * w;
|
||||
h += y;
|
||||
y = 0;
|
||||
}
|
||||
if((x + w - 1) > _max_x) {
|
||||
xskip = (x + w - 1) - _max_x;
|
||||
w -= xskip;
|
||||
}
|
||||
if(x < 0) {
|
||||
bitmap -= x;
|
||||
xskip -= x;
|
||||
w += x;
|
||||
x = 0;
|
||||
}
|
||||
uint16_t* row = _framebuffer;
|
||||
row += y * _width;
|
||||
uint32_t cachePos = (uint32_t)row;
|
||||
row += x;
|
||||
uint16_t color;
|
||||
for(int j = 0; j < h; j++) {
|
||||
for(int i = 0; i < w; i++) {
|
||||
color = *bitmap++;
|
||||
MSB_16_SET(row[i], color);
|
||||
}
|
||||
bitmap += xskip;
|
||||
row += _width;
|
||||
}
|
||||
if(_auto_flush) {
|
||||
Cache_WriteBack_Addr(cachePos, _width * h * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Arduino_RGB_Display_Mod::flush(void)
|
||||
{
|
||||
if(!_auto_flush) {
|
||||
Cache_WriteBack_Addr((uint32_t)_framebuffer, _framebuffer_size);
|
||||
}
|
||||
}
|
||||
|
||||
uint16_t* Arduino_RGB_Display_Mod::getFramebuffer()
|
||||
{
|
||||
return _framebuffer;
|
||||
}
|
||||
|
||||
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
434
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGB_Display_mod.h
Normal file
434
lib/Arduino_RPi_DPI_RGBPanel_mod/Arduino_RGB_Display_mod.h
Normal file
@ -0,0 +1,434 @@
|
||||
#ifdef HASP_USE_ARDUINOGFX
|
||||
#include "Arduino.h"
|
||||
#include "Arduino_DataBus.h"
|
||||
#endif
|
||||
|
||||
#if defined(ESP32) && defined(CONFIG_IDF_TARGET_ESP32S3) && defined(HASP_USE_ARDUINOGFX)
|
||||
|
||||
#ifndef _ARDUINO_RGB_DISPLAY_MOD_H_
|
||||
#define _ARDUINO_RGB_DISPLAY_MOD_H_
|
||||
|
||||
#include "Arduino_GFX.h"
|
||||
#include "Arduino_RGBPanel_mod.h"
|
||||
|
||||
static const uint8_t st7701_4848S040_init_operations[] = {
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x10,
|
||||
|
||||
WRITE_C8_D16, 0xC0, 0x3B, 0x00,
|
||||
WRITE_C8_D16, 0xC1, 0x0D, 0x02,
|
||||
WRITE_C8_D16, 0xC2, 0x31, 0x05,
|
||||
WRITE_C8_D8, 0xCD, 0x00,//0x08
|
||||
|
||||
WRITE_COMMAND_8, 0xB0, // Positive Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x11, 0x18, 0x0E,
|
||||
0x11, 0x06, 0x07, 0x08,
|
||||
0x07, 0x22, 0x04, 0x12,
|
||||
0x0F, 0xAA, 0x31, 0x18,
|
||||
|
||||
WRITE_COMMAND_8, 0xB1, // Negative Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x11, 0x19, 0x0E,
|
||||
0x12, 0x07, 0x08, 0x08,
|
||||
0x08, 0x22, 0x04, 0x11,
|
||||
0x11, 0xA9, 0x32, 0x18,
|
||||
|
||||
// PAGE1
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x11,
|
||||
|
||||
WRITE_C8_D8, 0xB0, 0x60, // Vop=4.7375v
|
||||
WRITE_C8_D8, 0xB1, 0x32, // VCOM=32
|
||||
WRITE_C8_D8, 0xB2, 0x07, // VGH=15v
|
||||
WRITE_C8_D8, 0xB3, 0x80,
|
||||
WRITE_C8_D8, 0xB5, 0x49, // VGL=-10.17v
|
||||
WRITE_C8_D8, 0xB7, 0x85,
|
||||
WRITE_C8_D8, 0xB8, 0x21, // AVDD=6.6 & AVCL=-4.6
|
||||
WRITE_C8_D8, 0xC1, 0x78,
|
||||
WRITE_C8_D8, 0xC2, 0x78,
|
||||
|
||||
WRITE_COMMAND_8, 0xE0,
|
||||
WRITE_BYTES, 3, 0x00, 0x1B, 0x02,
|
||||
|
||||
WRITE_COMMAND_8, 0xE1,
|
||||
WRITE_BYTES, 11,
|
||||
0x08, 0xA0, 0x00, 0x00,
|
||||
0x07, 0xA0, 0x00, 0x00,
|
||||
0x00, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE2,
|
||||
WRITE_BYTES, 12,
|
||||
0x11, 0x11, 0x44, 0x44,
|
||||
0xED, 0xA0, 0x00, 0x00,
|
||||
0xEC, 0xA0, 0x00, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0xE3,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE4, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE5,
|
||||
WRITE_BYTES, 16,
|
||||
0x0A, 0xE9, 0xD8, 0xA0,
|
||||
0x0C, 0xEB, 0xD8, 0xA0,
|
||||
0x0E, 0xED, 0xD8, 0xA0,
|
||||
0x10, 0xEF, 0xD8, 0xA0,
|
||||
|
||||
WRITE_COMMAND_8, 0xE6,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE7, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE8,
|
||||
WRITE_BYTES, 16,
|
||||
0x09, 0xE8, 0xD8, 0xA0,
|
||||
0x0B, 0xEA, 0xD8, 0xA0,
|
||||
0x0D, 0xEC, 0xD8, 0xA0,
|
||||
0x0F, 0xEE, 0xD8, 0xA0,
|
||||
|
||||
WRITE_COMMAND_8, 0xEB,
|
||||
WRITE_BYTES, 7,
|
||||
0x02, 0x00, 0xE4, 0xE4,
|
||||
0x88, 0x00, 0x40,
|
||||
|
||||
WRITE_C8_D16, 0xEC, 0x3C, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0xED,
|
||||
WRITE_BYTES, 16,
|
||||
0xAB, 0x89, 0x76, 0x54,
|
||||
0x02, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0x20,
|
||||
0x45, 0x67, 0x98, 0xBA,
|
||||
|
||||
//-----------VAP & VAN---------------
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13,
|
||||
|
||||
WRITE_C8_D8, 0xE5, 0xE4,
|
||||
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0x21, // 0x20 normal, 0x21 IPS
|
||||
WRITE_C8_D8, 0x3A, 0x60, // 0x70 RGB888, 0x60 RGB666, 0x50 RGB565
|
||||
|
||||
//WRITE_COMMAND_8, 0x21,0X00,
|
||||
//END_WRITE,
|
||||
|
||||
WRITE_COMMAND_8, 0x11, // Sleep Out
|
||||
END_WRITE,
|
||||
|
||||
DELAY, 120,
|
||||
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0x29, // Display On
|
||||
END_WRITE,
|
||||
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0x20, // Invert display
|
||||
END_WRITE
|
||||
};
|
||||
|
||||
static const uint8_t st7701_sensecap_indicator_init_operations[] = {
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x10,
|
||||
|
||||
WRITE_C8_D16, 0xC0, 0x3B, 0x00,
|
||||
WRITE_C8_D16, 0xC1, 0x0D, 0x02,
|
||||
WRITE_C8_D16, 0xC2, 0x31, 0x05,
|
||||
WRITE_C8_D8, 0xC7, 0x04,
|
||||
WRITE_C8_D8, 0xCD, 0x08,
|
||||
|
||||
WRITE_COMMAND_8, 0xB0, // Positive Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x11, 0x18, 0x0E,
|
||||
0x11, 0x06, 0x07, 0x08,
|
||||
0x07, 0x22, 0x04, 0x12,
|
||||
0x0F, 0xAA, 0x31, 0x18,
|
||||
|
||||
END_WRITE,
|
||||
BEGIN_WRITE,
|
||||
|
||||
WRITE_COMMAND_8, 0xB1, // Negative Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x11, 0x19, 0x0E,
|
||||
0x12, 0x07, 0x08, 0x08,
|
||||
0x08, 0x22, 0x04, 0x11,
|
||||
0x11, 0xA9, 0x32, 0x18,
|
||||
|
||||
// PAGE1
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x11,
|
||||
|
||||
WRITE_C8_D8, 0xB0, 0x60, // Vop=4.7375v
|
||||
WRITE_C8_D8, 0xB1, 0x32, // VCOM=32
|
||||
WRITE_C8_D8, 0xB2, 0x07, // VGH=15v
|
||||
WRITE_C8_D8, 0xB3, 0x80,
|
||||
WRITE_C8_D8, 0xB5, 0x49, // VGL=-10.17v
|
||||
WRITE_C8_D8, 0xB7, 0x85,
|
||||
WRITE_C8_D8, 0xB8, 0x21, // AVDD=6.6 & AVCL=-4.6
|
||||
WRITE_C8_D8, 0xC1, 0x78,
|
||||
WRITE_C8_D8, 0xC2, 0x78,
|
||||
|
||||
END_WRITE,
|
||||
DELAY, 20,
|
||||
BEGIN_WRITE,
|
||||
|
||||
WRITE_COMMAND_8, 0xE0,
|
||||
WRITE_BYTES, 3, 0x00, 0x1B, 0x02,
|
||||
|
||||
WRITE_COMMAND_8, 0xE1,
|
||||
WRITE_BYTES, 11,
|
||||
0x08, 0xA0, 0x00, 0x00,
|
||||
0x07, 0xA0, 0x00, 0x00,
|
||||
0x00, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE2,
|
||||
WRITE_BYTES, 12,
|
||||
0x11, 0x11, 0x44, 0x44,
|
||||
0xED, 0xA0, 0x00, 0x00,
|
||||
0xEC, 0xA0, 0x00, 0x00,
|
||||
|
||||
END_WRITE,
|
||||
BEGIN_WRITE,
|
||||
|
||||
WRITE_COMMAND_8, 0xE3,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE4, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE5,
|
||||
WRITE_BYTES, 16,
|
||||
0x0A, 0xE9, 0xD8, 0xA0,
|
||||
0x0C, 0xEB, 0xD8, 0xA0,
|
||||
0x0E, 0xED, 0xD8, 0xA0,
|
||||
0x10, 0xEF, 0xD8, 0xA0,
|
||||
|
||||
WRITE_COMMAND_8, 0xE6,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE7, 0x44, 0x44,
|
||||
|
||||
END_WRITE,
|
||||
BEGIN_WRITE,
|
||||
|
||||
WRITE_COMMAND_8, 0xE8,
|
||||
WRITE_BYTES, 16,
|
||||
0x09, 0xE8, 0xD8, 0xA0,
|
||||
0x0B, 0xEA, 0xD8, 0xA0,
|
||||
0x0D, 0xEC, 0xD8, 0xA0,
|
||||
0x0F, 0xEE, 0xD8, 0xA0,
|
||||
|
||||
WRITE_COMMAND_8, 0xEB,
|
||||
WRITE_BYTES, 7,
|
||||
0x02, 0x00, 0xE4, 0xE4,
|
||||
0x88, 0x00, 0x40,
|
||||
|
||||
WRITE_C8_D16, 0xEC, 0x3C, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0xED,
|
||||
WRITE_BYTES, 16,
|
||||
0xAB, 0x89, 0x76, 0x54,
|
||||
0x02, 0xFF, 0xFF, 0xFF,
|
||||
0xFF, 0xFF, 0xFF, 0x20,
|
||||
0x45, 0x67, 0x98, 0xBA,
|
||||
|
||||
WRITE_C8_D8, 0x36, 0x10,
|
||||
|
||||
END_WRITE,
|
||||
BEGIN_WRITE,
|
||||
|
||||
//-----------VAP & VAN---------------
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13,
|
||||
|
||||
WRITE_C8_D8, 0xE5, 0xE4,
|
||||
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0x21, // 0x20 normal, 0x21 IPS
|
||||
WRITE_C8_D8, 0x3A, 0x60, // 0x70 RGB888, 0x60 RGB666, 0x50 RGB565
|
||||
|
||||
WRITE_COMMAND_8, 0x11, // Sleep Out
|
||||
END_WRITE,
|
||||
|
||||
DELAY, 120,
|
||||
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0x29, // Display On
|
||||
END_WRITE,
|
||||
|
||||
DELAY, 120,
|
||||
};
|
||||
|
||||
static const uint8_t st7701_t_panel_init_operations[] = {
|
||||
|
||||
BEGIN_WRITE,
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x13,
|
||||
|
||||
WRITE_C8_D8, 0xEF, 0x08,
|
||||
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x10,
|
||||
|
||||
WRITE_C8_D16, 0xC0, 0x3B, 0x00,
|
||||
WRITE_C8_D16, 0xC1, 0x0B, 0x02,
|
||||
|
||||
WRITE_COMMAND_8, 0xC2,
|
||||
WRITE_BYTES, 3, 0x30, 0x02, 0x37,
|
||||
|
||||
WRITE_C8_D8, 0xCC, 0x10,
|
||||
|
||||
WRITE_COMMAND_8, 0xB0, // Positive Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x0F, 0x16, 0x0E,
|
||||
0x11, 0x07, 0x09, 0x09,
|
||||
0x08, 0x23, 0x05, 0x11,
|
||||
0x0F, 0x28, 0x2D, 0x18,
|
||||
|
||||
WRITE_COMMAND_8, 0xB1, // Negative Voltage Gamma Control
|
||||
WRITE_BYTES, 16,
|
||||
0x00, 0x0F, 0x16, 0x0E,
|
||||
0x11, 0x07, 0x09, 0x08,
|
||||
0x09, 0x23, 0x05, 0x11,
|
||||
0x0F, 0x28, 0x2D, 0x18,
|
||||
|
||||
WRITE_COMMAND_8, 0xFF,
|
||||
WRITE_BYTES, 5, 0x77, 0x01, 0x00, 0x00, 0x11,
|
||||
|
||||
WRITE_C8_D8, 0xB0, 0x4D,
|
||||
WRITE_C8_D8, 0xB1, 0x33,
|
||||
WRITE_C8_D8, 0xB2, 0x87,
|
||||
WRITE_C8_D8, 0xB5, 0x4B,
|
||||
WRITE_C8_D8, 0xB7, 0x8C,
|
||||
WRITE_C8_D8, 0xB8, 0x20,
|
||||
WRITE_C8_D8, 0xC1, 0x78,
|
||||
WRITE_C8_D8, 0xC2, 0x78,
|
||||
WRITE_C8_D8, 0xD0, 0x88,
|
||||
|
||||
WRITE_COMMAND_8, 0xE0,
|
||||
WRITE_BYTES, 3, 0x00, 0x00, 0x02,
|
||||
|
||||
WRITE_COMMAND_8, 0xE1,
|
||||
WRITE_BYTES, 11,
|
||||
0x02, 0xF0, 0x00, 0x00,
|
||||
0x03, 0xF0, 0x00, 0x00,
|
||||
0x00, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE2,
|
||||
WRITE_BYTES, 12,
|
||||
0x10, 0x10, 0x40, 0x40,
|
||||
0xF2, 0xF0, 0x00, 0x00,
|
||||
0xF2, 0xF0, 0x00, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0xE3,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE4, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE5,
|
||||
WRITE_BYTES, 16,
|
||||
0x07, 0xEF, 0xF0, 0xF0,
|
||||
0x09, 0xF1, 0xF0, 0xF0,
|
||||
0x03, 0xF3, 0xF0, 0xF0,
|
||||
0x05, 0xED, 0xF0, 0xF0,
|
||||
|
||||
WRITE_COMMAND_8, 0xE6,
|
||||
WRITE_BYTES, 4, 0x00, 0x00, 0x11, 0x11,
|
||||
|
||||
WRITE_C8_D16, 0xE7, 0x44, 0x44,
|
||||
|
||||
WRITE_COMMAND_8, 0xE8,
|
||||
WRITE_BYTES, 16,
|
||||
0x08, 0xF0, 0xF0, 0xF0,
|
||||
0x0A, 0xF2, 0xF0, 0xF0,
|
||||
0x04, 0xF4, 0xF0, 0xF0,
|
||||
0x06, 0xEE, 0xF0, 0xF0,
|
||||
|
||||
WRITE_COMMAND_8, 0xEB,
|
||||
WRITE_BYTES, 7,
|
||||
0x00, 0x00, 0xE4, 0xE4,
|
||||
0x44, 0x88, 0x40,
|
||||
|
||||
WRITE_C8_D16, 0xEC, 0x78, 0x00,
|
||||
|
||||
WRITE_COMMAND_8, 0xED,
|
||||
WRITE_BYTES, 16,
|
||||
0x20, 0xF9, 0x87, 0x76,
|
||||
0x65, 0x54, 0x4F, 0xFF,
|
||||
0xFF, 0xF4, 0x45, 0x56,
|
||||
0x67, 0x78, 0x9F, 0x02,
|
||||
|
||||
WRITE_COMMAND_8, 0xEF,
|
||||
WRITE_BYTES, 6,
|
||||
0x10, 0x0D, 0x04, 0x08,
|
||||
0x3F, 0x1F,
|
||||
|
||||
// WRITE_C8_D8, 0xCD, 0x05,//Test
|
||||
|
||||
WRITE_C8_D8, 0x3A, 0x55,
|
||||
|
||||
WRITE_C8_D8, 0x36, 0x08,
|
||||
|
||||
WRITE_COMMAND_8, 0x11,
|
||||
|
||||
// WRITE_COMMAND_8, 0xFF,//Test
|
||||
// WRITE_BYTES, 5,
|
||||
// 0x77, 0x01, 0x00, 0x00,
|
||||
// 0x12,
|
||||
|
||||
// WRITE_C8_D8, 0xD1, 0x81,//Test
|
||||
// WRITE_C8_D8, 0xD2, 0x08,//Test
|
||||
|
||||
WRITE_COMMAND_8, 0x29, // Display On
|
||||
|
||||
// WRITE_C8_D8, 0x35, 0x00,//Test
|
||||
// WRITE_C8_D8, 0xCE, 0x04,//Test
|
||||
|
||||
// WRITE_COMMAND_8, 0xF2,//Test
|
||||
// WRITE_BYTES, 4,
|
||||
// 0xF0, 0xA3, 0xA3, 0x71,
|
||||
|
||||
END_WRITE};
|
||||
|
||||
class Arduino_RGB_Display_Mod : public Arduino_GFX{
|
||||
public:
|
||||
Arduino_RGB_Display_Mod(
|
||||
int16_t w, int16_t h, Arduino_RGBPanel_Mod *rgbpanel, uint8_t r = 0, bool auto_flush = true,
|
||||
Arduino_DataBus *bus = NULL, int8_t rst = GFX_NOT_DEFINED, const uint8_t *init_operations = NULL, size_t init_operations_len = GFX_NOT_DEFINED);
|
||||
|
||||
bool begin(int32_t speed = GFX_NOT_DEFINED) override;
|
||||
void writePixelPreclipped(int16_t x, int16_t y, uint16_t color) override;
|
||||
void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color) override;
|
||||
void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color) override;
|
||||
void writeFillRectPreclipped(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color) override;
|
||||
void draw16bitRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h) override;
|
||||
void draw16bitBeRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h) override;
|
||||
void flush(void) override;
|
||||
|
||||
void setRotation(uint8_t r);
|
||||
void invertDisplay(bool i);
|
||||
|
||||
uint16_t *getFramebuffer();
|
||||
Arduino_DataBus *_bus;
|
||||
Arduino_RGBPanel_Mod *_rgbpanel;
|
||||
|
||||
protected:
|
||||
uint16_t *_framebuffer;
|
||||
size_t _framebuffer_size;
|
||||
bool _auto_flush;
|
||||
int8_t _rst;
|
||||
const uint8_t *_init_operations;
|
||||
size_t _init_operations_len;
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
#endif // _ARDUINO_RGB_DISPLAY_H_
|
||||
|
||||
#endif // #if defined(ESP32) && (CONFIG_IDF_TARGET_ESP32S3)
|
343
lib/ETHSPI/ETHSPI.cpp
Normal file
343
lib/ETHSPI/ETHSPI.cpp
Normal file
@ -0,0 +1,343 @@
|
||||
/* MIT License - Copyright (c) 2022 Ben Suffolk, ben@vanilla.net
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#if defined(HASP_USE_ETHSPI)
|
||||
|
||||
#include "ETHSPI.h"
|
||||
#include "esp_netif.h"
|
||||
#include "esp_eth.h"
|
||||
#include "esp_eth_mac.h"
|
||||
#include "esp_event.h"
|
||||
#include "esp_log.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "lwip/err.h"
|
||||
#include "lwip/dns.h"
|
||||
extern void tcpipInit();
|
||||
|
||||
ETHSPIClass::ETHSPIClass()
|
||||
:initialized(false)
|
||||
,staticIP(false)
|
||||
,eth_handle(NULL)
|
||||
,eth_netif_spi(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
ETHSPIClass::~ETHSPIClass()
|
||||
{}
|
||||
|
||||
|
||||
bool ETHSPIClass::begin(int mosi_io, int miso_io, int sclk_io, int cs_io, int int_io, spi_host_device_t spi_host)
|
||||
{
|
||||
if(initialized) {
|
||||
return true;
|
||||
}
|
||||
|
||||
tcpipInit();
|
||||
|
||||
// Create instance(s) of esp-netif for SPI Ethernet(s)
|
||||
esp_netif_inherent_config_t esp_netif_config = ESP_NETIF_INHERENT_DEFAULT_ETH();
|
||||
esp_netif_config.if_desc = "eth0";
|
||||
esp_netif_config.route_prio = 30;
|
||||
|
||||
esp_netif_config_t cfg_spi = {
|
||||
.base = &esp_netif_config,
|
||||
.stack = ESP_NETIF_NETSTACK_DEFAULT_ETH
|
||||
};
|
||||
|
||||
eth_netif_spi = esp_netif_new(&cfg_spi);
|
||||
|
||||
|
||||
// Init MAC and PHY configs to default
|
||||
eth_mac_config_t mac_config_spi = ETH_MAC_DEFAULT_CONFIG();
|
||||
eth_phy_config_t phy_config_spi = ETH_PHY_DEFAULT_CONFIG();
|
||||
|
||||
// Install GPIO ISR handler to be able to service SPI Eth modlues interrupts
|
||||
gpio_install_isr_service(0);
|
||||
|
||||
// Init SPI bus
|
||||
spi_device_handle_t spi_handle = NULL;
|
||||
spi_bus_config_t buscfg = {
|
||||
.mosi_io_num = mosi_io,
|
||||
.miso_io_num = miso_io,
|
||||
.sclk_io_num = sclk_io,
|
||||
.quadwp_io_num = -1,
|
||||
.quadhd_io_num = -1,
|
||||
};
|
||||
|
||||
if(spi_bus_initialize(ETHSPI_HOST, &buscfg, SPI_DMA_CH_AUTO) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Configure SPI interface and Ethernet driver for specific SPI module
|
||||
esp_eth_mac_t *mac_spi;
|
||||
esp_eth_phy_t *phy_spi;
|
||||
|
||||
spi_device_interface_config_t devcfg = {
|
||||
.command_bits = 16, // Actually it's the address phase in W5500 SPI frame
|
||||
.address_bits = 8, // Actually it's the control phase in W5500 SPI frame
|
||||
.mode = 0,
|
||||
.clock_speed_hz = ETHSPI_CLOCK_MHZ * 1000 * 1000,
|
||||
.queue_size = 20
|
||||
};
|
||||
|
||||
// Set SPI module Chip Select GPIO
|
||||
devcfg.spics_io_num = cs_io;
|
||||
|
||||
if(spi_bus_add_device(spi_host, &devcfg, &spi_handle) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// w5500 ethernet driver is based on spi driver
|
||||
eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle);
|
||||
|
||||
// Set remaining GPIO numbers and configuration used by the SPI module
|
||||
w5500_config.int_gpio_num = int_io;
|
||||
phy_config_spi.phy_addr = 1;
|
||||
phy_config_spi.reset_gpio_num = -1;
|
||||
|
||||
mac_spi = esp_eth_mac_new_w5500(&w5500_config, &mac_config_spi);
|
||||
phy_spi = esp_eth_phy_new_w5500(&phy_config_spi);
|
||||
|
||||
esp_eth_config_t eth_config_spi = ETH_DEFAULT_CONFIG(mac_spi, phy_spi);
|
||||
|
||||
if(esp_eth_driver_install(ð_config_spi, ð_handle) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// W5500 Does not have a mac address on the module. So get the enternet mac address from ESP fuse
|
||||
uint8_t mac[6];
|
||||
esp_read_mac(mac, ESP_MAC_ETH);
|
||||
if(esp_eth_ioctl(eth_handle, ETH_CMD_S_MAC_ADDR, mac) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// attach Ethernet driver to TCP/IP stack
|
||||
if(esp_netif_attach(eth_netif_spi, esp_eth_new_netif_glue(eth_handle)) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(esp_eth_start(eth_handle) != ESP_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
initialized = true;
|
||||
|
||||
return initialized;
|
||||
}
|
||||
|
||||
|
||||
bool ETHSPIClass::config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1, IPAddress dns2)
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(local_ip != (uint32_t)0x00000000 && local_ip != INADDR_NONE) {
|
||||
ip_info.ip.addr = static_cast<uint32_t>(local_ip);
|
||||
ip_info.gw.addr = static_cast<uint32_t>(gateway);
|
||||
ip_info.netmask.addr = static_cast<uint32_t>(subnet);
|
||||
} else {
|
||||
ip_info.ip.addr = 0;
|
||||
ip_info.gw.addr = 0;
|
||||
ip_info.netmask.addr = 0;
|
||||
}
|
||||
|
||||
// Stop DHCP client
|
||||
esp_netif_dhcp_status_t status;
|
||||
if(esp_netif_dhcpc_get_status(eth_netif_spi, &status) != ESP_OK) {
|
||||
log_e("could not get DHCP status");
|
||||
return false;
|
||||
}
|
||||
|
||||
if(status == ESP_NETIF_DHCP_STARTED && esp_netif_dhcpc_stop(eth_netif_spi) != ESP_OK) {
|
||||
log_e("DHCP could not be stopped");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Set IP Details
|
||||
if(esp_netif_set_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
log_e("Unable to set IP address");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// Start DHCP client is required
|
||||
if(ip_info.ip.addr){
|
||||
staticIP = true;
|
||||
} else {
|
||||
|
||||
if(esp_netif_dhcpc_start(eth_netif_spi) != ESP_OK) {
|
||||
log_e("DHCP could not be started");
|
||||
return false;
|
||||
}
|
||||
|
||||
staticIP = false;
|
||||
}
|
||||
|
||||
|
||||
// Set primary DNS
|
||||
if(dns1 != (uint32_t)0x00000000 && dns1 != INADDR_NONE) {
|
||||
|
||||
esp_netif_dns_info_t dns_info;
|
||||
dns_info.ip.u_addr.ip4.addr = static_cast<uint32_t>(dns1);
|
||||
|
||||
if(esp_netif_set_dns_info(eth_netif_spi, ESP_NETIF_DNS_MAIN, &dns_info) != ESP_OK) {
|
||||
log_e("Unable to set DNS");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Set secondary DNS
|
||||
if(dns2 != (uint32_t)0x00000000 && dns2 != INADDR_NONE) {
|
||||
|
||||
esp_netif_dns_info_t dns_info;
|
||||
dns_info.ip.u_addr.ip4.addr = static_cast<uint32_t>(dns2);
|
||||
|
||||
if(esp_netif_set_dns_info(eth_netif_spi, ESP_NETIF_DNS_FALLBACK, &dns_info) != ESP_OK) {
|
||||
log_e("Unable to set DNS");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::localIP()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return IPAddress(ip_info.ip.addr);
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::subnetMask()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return IPAddress(ip_info.netmask.addr);
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::gatewayIP()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return IPAddress(ip_info.gw.addr);
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::dnsIP(esp_netif_dns_type_t dns_type)
|
||||
{
|
||||
esp_netif_dns_info_t dns_info;
|
||||
|
||||
if(esp_netif_get_dns_info(eth_netif_spi, dns_type, &dns_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return IPAddress(dns_info.ip.u_addr.ip4.addr);
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::broadcastIP()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return WiFiGenericClass::calculateBroadcast(IPAddress(ip_info.gw.addr), IPAddress(ip_info.netmask.addr));
|
||||
}
|
||||
|
||||
IPAddress ETHSPIClass::networkID()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return WiFiGenericClass::calculateNetworkID(IPAddress(ip_info.gw.addr), IPAddress(ip_info.netmask.addr));
|
||||
}
|
||||
|
||||
uint8_t ETHSPIClass::subnetCIDR()
|
||||
{
|
||||
esp_netif_ip_info_t ip_info;
|
||||
|
||||
if(esp_netif_get_ip_info(eth_netif_spi, &ip_info) != ESP_OK) {
|
||||
return IPAddress();
|
||||
}
|
||||
|
||||
return WiFiGenericClass::calculateSubnetCIDR(IPAddress(ip_info.netmask.addr));
|
||||
}
|
||||
|
||||
const char * ETHSPIClass::getHostname()
|
||||
{
|
||||
const char *hostname;
|
||||
|
||||
if(esp_netif_get_hostname(eth_netif_spi, &hostname) != ESP_OK) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return hostname;
|
||||
}
|
||||
|
||||
bool ETHSPIClass::setHostname(const char *hostname)
|
||||
{
|
||||
return(esp_netif_set_hostname(eth_netif_spi, hostname) == ESP_OK);
|
||||
}
|
||||
|
||||
bool ETHSPIClass::fullDuplex()
|
||||
{
|
||||
eth_duplex_t duplex;
|
||||
|
||||
esp_eth_ioctl(eth_handle, ETH_CMD_G_DUPLEX_MODE, &duplex);
|
||||
return (duplex == ETH_DUPLEX_FULL);
|
||||
}
|
||||
|
||||
bool ETHSPIClass::linkUp()
|
||||
{
|
||||
return esp_netif_is_netif_up(eth_netif_spi);
|
||||
}
|
||||
|
||||
|
||||
uint8_t ETHSPIClass::linkSpeed()
|
||||
{
|
||||
eth_speed_t link_speed;
|
||||
esp_eth_ioctl(eth_handle, ETH_CMD_G_SPEED, &link_speed);
|
||||
return (link_speed == ETH_SPEED_10M)?10:100;
|
||||
}
|
||||
|
||||
|
||||
uint8_t * ETHSPIClass::macAddress(uint8_t* mac)
|
||||
{
|
||||
if(!mac) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
esp_eth_ioctl(eth_handle, ETH_CMD_G_MAC_ADDR, mac);
|
||||
|
||||
return mac;
|
||||
}
|
||||
|
||||
String ETHSPIClass::macAddress(void)
|
||||
{
|
||||
uint8_t mac[6];
|
||||
char macStr[18];
|
||||
|
||||
macAddress(mac);
|
||||
|
||||
sprintf(macStr, "%02X:%02X:%02X:%02X:%02X:%02X", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]);
|
||||
return String(macStr);
|
||||
}
|
||||
|
||||
ETHSPIClass ETHSPI;
|
||||
|
||||
#endif
|
80
lib/ETHSPI/ETHSPI.h
Normal file
80
lib/ETHSPI/ETHSPI.h
Normal file
@ -0,0 +1,80 @@
|
||||
/* MIT License - Copyright (c) 2022 Ben Suffolk, ben@vanilla.net
|
||||
For full license information read the LICENSE file in the project folder */
|
||||
|
||||
#ifndef _ETHSPI_H_
|
||||
#define _ETHSPI_H_
|
||||
|
||||
#include "WiFi.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_eth.h"
|
||||
#include "driver/spi_master.h"
|
||||
|
||||
#ifndef ETHSPI_HOST
|
||||
#define ETHSPI_HOST SPI2_HOST
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_CLOCK_MHZ
|
||||
#define ETHSPI_CLOCK_MHZ 12
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_INT_GPIO
|
||||
#define ETHSPI_INT_GPIO 4
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_MOSI_GPIO
|
||||
#define ETHSPI_MOSI_GPIO 13
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_MISO_GPIO
|
||||
#define ETHSPI_MISO_GPIO 12
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_SCLK_GPIO
|
||||
#define ETHSPI_SCLK_GPIO 14
|
||||
#endif
|
||||
|
||||
#ifndef ETHSPI_CS_GPIO
|
||||
#define ETHSPI_CS_GPIO 15
|
||||
#endif
|
||||
|
||||
class ETHSPIClass {
|
||||
private:
|
||||
bool initialized;
|
||||
bool staticIP;
|
||||
esp_eth_handle_t eth_handle;
|
||||
esp_netif_t *eth_netif_spi;
|
||||
|
||||
public:
|
||||
ETHSPIClass();
|
||||
~ETHSPIClass();
|
||||
|
||||
bool begin(int mosi_io = ETHSPI_MOSI_GPIO, int miso_io = ETHSPI_MISO_GPIO, int sclk_io = ETHSPI_SCLK_GPIO, int cs_io = ETHSPI_CS_GPIO, int int_io = ETHSPI_INT_GPIO, spi_host_device_t spi_host = ETHSPI_HOST);
|
||||
|
||||
bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000);
|
||||
|
||||
const char * getHostname();
|
||||
bool setHostname(const char * hostname);
|
||||
|
||||
bool fullDuplex();
|
||||
bool linkUp();
|
||||
uint8_t linkSpeed();
|
||||
|
||||
IPAddress localIP();
|
||||
IPAddress subnetMask();
|
||||
IPAddress gatewayIP();
|
||||
IPAddress dnsIP(esp_netif_dns_type_t dns_type = ESP_NETIF_DNS_MAIN);
|
||||
|
||||
IPAddress broadcastIP();
|
||||
IPAddress networkID();
|
||||
uint8_t subnetCIDR();
|
||||
|
||||
uint8_t * macAddress(uint8_t* mac);
|
||||
String macAddress();
|
||||
|
||||
friend class WiFiClient;
|
||||
friend class WiFiServer;
|
||||
};
|
||||
|
||||
extern ETHSPIClass ETHSPI;
|
||||
|
||||
#endif /* _ETH_H_ */
|
695
lib/ETHSPI/esp_eth_mac_w5500.c
Normal file
695
lib/ETHSPI/esp_eth_mac_w5500.c
Normal file
@ -0,0 +1,695 @@
|
||||
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#if defined(HASP_USE_ETHSPI)
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/spi_master.h"
|
||||
#include "esp_attr.h"
|
||||
#include "esp_log.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_eth.h"
|
||||
#include "esp_system.h"
|
||||
#include "esp_intr_alloc.h"
|
||||
#include "esp_heap_caps.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/semphr.h"
|
||||
#include "hal/cpu_hal.h"
|
||||
#include "w5500.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
static const char *TAG = "w5500.mac";
|
||||
|
||||
#define W5500_SPI_LOCK_TIMEOUT_MS (50)
|
||||
#define W5500_TX_MEM_SIZE (0x4000)
|
||||
#define W5500_RX_MEM_SIZE (0x4000)
|
||||
|
||||
typedef struct {
|
||||
esp_eth_mac_t parent;
|
||||
esp_eth_mediator_t *eth;
|
||||
spi_device_handle_t spi_hdl;
|
||||
SemaphoreHandle_t spi_lock;
|
||||
TaskHandle_t rx_task_hdl;
|
||||
uint32_t sw_reset_timeout_ms;
|
||||
int int_gpio_num;
|
||||
uint8_t addr[6];
|
||||
bool packets_remain;
|
||||
} emac_w5500_t;
|
||||
|
||||
static inline bool w5500_lock(emac_w5500_t *emac)
|
||||
{
|
||||
return xSemaphoreTake(emac->spi_lock, pdMS_TO_TICKS(W5500_SPI_LOCK_TIMEOUT_MS)) == pdTRUE;
|
||||
}
|
||||
|
||||
static inline bool w5500_unlock(emac_w5500_t *emac)
|
||||
{
|
||||
return xSemaphoreGive(emac->spi_lock) == pdTRUE;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_write(emac_w5500_t *emac, uint32_t address, const void *value, uint32_t len)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
|
||||
spi_transaction_t trans = {
|
||||
.cmd = (address >> W5500_ADDR_OFFSET),
|
||||
.addr = ((address & 0xFFFF) | (W5500_ACCESS_MODE_WRITE << W5500_RWB_OFFSET) | W5500_SPI_OP_MODE_VDM),
|
||||
.length = 8 * len,
|
||||
.tx_buffer = value
|
||||
};
|
||||
if (w5500_lock(emac)) {
|
||||
if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "%s(%d): spi transmit failed", __FUNCTION__, __LINE__);
|
||||
ret = ESP_FAIL;
|
||||
}
|
||||
w5500_unlock(emac);
|
||||
} else {
|
||||
ret = ESP_ERR_TIMEOUT;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_read(emac_w5500_t *emac, uint32_t address, void *value, uint32_t len)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
|
||||
spi_transaction_t trans = {
|
||||
.flags = len <= 4 ? SPI_TRANS_USE_RXDATA : 0, // use direct reads for registers to prevent overwrites by 4-byte boundary writes
|
||||
.cmd = (address >> W5500_ADDR_OFFSET),
|
||||
.addr = ((address & 0xFFFF) | (W5500_ACCESS_MODE_READ << W5500_RWB_OFFSET) | W5500_SPI_OP_MODE_VDM),
|
||||
.length = 8 * len,
|
||||
.rx_buffer = value
|
||||
};
|
||||
if (w5500_lock(emac)) {
|
||||
if (spi_device_polling_transmit(emac->spi_hdl, &trans) != ESP_OK) {
|
||||
ESP_LOGE(TAG, "%s(%d): spi transmit failed", __FUNCTION__, __LINE__);
|
||||
ret = ESP_FAIL;
|
||||
}
|
||||
w5500_unlock(emac);
|
||||
} else {
|
||||
ret = ESP_ERR_TIMEOUT;
|
||||
}
|
||||
if ((trans.flags&SPI_TRANS_USE_RXDATA) && len <= 4) {
|
||||
memcpy(value, trans.rx_data, len); // copy register values to output
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_send_command(emac_w5500_t *emac, uint8_t command, uint32_t timeout_ms)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_CR(0), &command, sizeof(command)), err, TAG, "write SCR failed");
|
||||
// after W5500 accepts the command, the command register will be cleared automatically
|
||||
uint32_t to = 0;
|
||||
for (to = 0; to < timeout_ms / 10; to++) {
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_CR(0), &command, sizeof(command)), err, TAG, "read SCR failed");
|
||||
if (!command) {
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
ESP_GOTO_ON_FALSE(to < timeout_ms / 10, ESP_ERR_TIMEOUT, err, TAG, "send command timeout");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_get_tx_free_size(emac_w5500_t *emac, uint16_t *size)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint16_t free0, free1 = 0;
|
||||
// read TX_FSR register more than once, until we get the same value
|
||||
// this is a trick because we might be interrupted between reading the high/low part of the TX_FSR register (16 bits in length)
|
||||
do {
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_TX_FSR(0), &free0, sizeof(free0)), err, TAG, "read TX FSR failed");
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_TX_FSR(0), &free1, sizeof(free1)), err, TAG, "read TX FSR failed");
|
||||
} while (free0 != free1);
|
||||
|
||||
*size = __builtin_bswap16(free0);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_get_rx_received_size(emac_w5500_t *emac, uint16_t *size)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint16_t received0, received1 = 0;
|
||||
do {
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_RX_RSR(0), &received0, sizeof(received0)), err, TAG, "read RX RSR failed");
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_RX_RSR(0), &received1, sizeof(received1)), err, TAG, "read RX RSR failed");
|
||||
} while (received0 != received1);
|
||||
*size = __builtin_bswap16(received0);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_write_buffer(emac_w5500_t *emac, const void *buffer, uint32_t len, uint16_t offset)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint32_t remain = len;
|
||||
const uint8_t *buf = buffer;
|
||||
offset %= W5500_TX_MEM_SIZE;
|
||||
if (offset + len > W5500_TX_MEM_SIZE) {
|
||||
remain = (offset + len) % W5500_TX_MEM_SIZE;
|
||||
len = W5500_TX_MEM_SIZE - offset;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_MEM_SOCK_TX(0, offset), buf, len), err, TAG, "write TX buffer failed");
|
||||
offset += len;
|
||||
buf += len;
|
||||
}
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_MEM_SOCK_TX(0, offset), buf, remain), err, TAG, "write TX buffer failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_read_buffer(emac_w5500_t *emac, void *buffer, uint32_t len, uint16_t offset)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint32_t remain = len;
|
||||
uint8_t *buf = buffer;
|
||||
offset %= W5500_RX_MEM_SIZE;
|
||||
if (offset + len > W5500_RX_MEM_SIZE) {
|
||||
remain = (offset + len) % W5500_RX_MEM_SIZE;
|
||||
len = W5500_RX_MEM_SIZE - offset;
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_MEM_SOCK_RX(0, offset), buf, len), err, TAG, "read RX buffer failed");
|
||||
offset += len;
|
||||
buf += len;
|
||||
}
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_MEM_SOCK_RX(0, offset), buf, remain), err, TAG, "read RX buffer failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_set_mac_addr(emac_w5500_t *emac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_MAC, emac->addr, 6), err, TAG, "write MAC address register failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_reset(emac_w5500_t *emac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
/* software reset */
|
||||
uint8_t mr = W5500_MR_RST; // Set RST bit (auto clear)
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_MR, &mr, sizeof(mr)), err, TAG, "write MR failed");
|
||||
uint32_t to = 0;
|
||||
for (to = 0; to < emac->sw_reset_timeout_ms / 10; to++) {
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_MR, &mr, sizeof(mr)), err, TAG, "read MR failed");
|
||||
if (!(mr & W5500_MR_RST)) {
|
||||
break;
|
||||
}
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
}
|
||||
ESP_GOTO_ON_FALSE(to < emac->sw_reset_timeout_ms / 10, ESP_ERR_TIMEOUT, err, TAG, "reset timeout");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_verify_id(emac_w5500_t *emac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint8_t version = 0;
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_VERSIONR, &version, sizeof(version)), err, TAG, "read VERSIONR failed");
|
||||
// W5500 doesn't have chip ID, we just print the version number instead
|
||||
ESP_LOGI(TAG, "version=%x", version);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_setup_default(emac_w5500_t *emac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
uint8_t reg_value = 16;
|
||||
|
||||
// Only SOCK0 can be used as MAC RAW mode, so we give the whole buffer (16KB TX and 16KB RX) to SOCK0
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_RXBUF_SIZE(0), ®_value, sizeof(reg_value)), err, TAG, "set rx buffer size failed");
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_TXBUF_SIZE(0), ®_value, sizeof(reg_value)), err, TAG, "set tx buffer size failed");
|
||||
reg_value = 0;
|
||||
for (int i = 1; i < 8; i++) {
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_RXBUF_SIZE(i), ®_value, sizeof(reg_value)), err, TAG, "set rx buffer size failed");
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_TXBUF_SIZE(i), ®_value, sizeof(reg_value)), err, TAG, "set tx buffer size failed");
|
||||
}
|
||||
|
||||
/* Enable ping block, disable PPPoE, WOL */
|
||||
reg_value = W5500_MR_PB;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_MR, ®_value, sizeof(reg_value)), err, TAG, "write MR failed");
|
||||
/* Disable interrupt for all sockets by default */
|
||||
reg_value = 0;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SIMR, ®_value, sizeof(reg_value)), err, TAG, "write SIMR failed");
|
||||
/* Enable MAC RAW mode for SOCK0, enable MAC filter, no blocking broadcast and multicast */
|
||||
reg_value = W5500_SMR_MAC_RAW | W5500_SMR_MAC_FILTER;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_MR(0), ®_value, sizeof(reg_value)), err, TAG, "write SMR failed");
|
||||
/* Enable receive event for SOCK0 */
|
||||
reg_value = W5500_SIR_RECV;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_IMR(0), ®_value, sizeof(reg_value)), err, TAG, "write SOCK0 IMR failed");
|
||||
/* Set the interrupt re-assert level to maximum (~1.5ms) to lower the chances of missing it */
|
||||
uint16_t int_level = __builtin_bswap16(0xFFFF);
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_INTLEVEL, &int_level, sizeof(int_level)), err, TAG, "write INTLEVEL failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_start(esp_eth_mac_t *mac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
uint8_t reg_value = 0;
|
||||
/* open SOCK0 */
|
||||
ESP_GOTO_ON_ERROR(w5500_send_command(emac, W5500_SCR_OPEN, 100), err, TAG, "issue OPEN command failed");
|
||||
/* enable interrupt for SOCK0 */
|
||||
reg_value = W5500_SIMR_SOCK0;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SIMR, ®_value, sizeof(reg_value)), err, TAG, "write SIMR failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_stop(esp_eth_mac_t *mac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
uint8_t reg_value = 0;
|
||||
/* disable interrupt */
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SIMR, ®_value, sizeof(reg_value)), err, TAG, "write SIMR failed");
|
||||
/* close SOCK0 */
|
||||
ESP_GOTO_ON_ERROR(w5500_send_command(emac, W5500_SCR_CLOSE, 100), err, TAG, "issue CLOSE command failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
IRAM_ATTR static void w5500_isr_handler(void *arg)
|
||||
{
|
||||
emac_w5500_t *emac = (emac_w5500_t *)arg;
|
||||
BaseType_t high_task_wakeup = pdFALSE;
|
||||
/* notify w5500 task */
|
||||
vTaskNotifyGiveFromISR(emac->rx_task_hdl, &high_task_wakeup);
|
||||
if (high_task_wakeup != pdFALSE) {
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
}
|
||||
|
||||
static void emac_w5500_task(void *arg)
|
||||
{
|
||||
emac_w5500_t *emac = (emac_w5500_t *)arg;
|
||||
uint8_t status = 0;
|
||||
uint8_t *buffer = NULL;
|
||||
uint32_t length = 0;
|
||||
while (1) {
|
||||
// check if the task receives any notification
|
||||
if (ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(1000)) == 0 && // if no notification ...
|
||||
gpio_get_level(emac->int_gpio_num) != 0) { // ...and no interrupt asserted
|
||||
continue; // -> just continue to check again
|
||||
}
|
||||
|
||||
/* read interrupt status */
|
||||
w5500_read(emac, W5500_REG_SOCK_IR(0), &status, sizeof(status));
|
||||
/* packet received */
|
||||
if (status & W5500_SIR_RECV) {
|
||||
status = W5500_SIR_RECV;
|
||||
// clear interrupt status
|
||||
w5500_write(emac, W5500_REG_SOCK_IR(0), &status, sizeof(status));
|
||||
do {
|
||||
length = ETH_MAX_PACKET_SIZE;
|
||||
buffer = heap_caps_malloc(length, MALLOC_CAP_DMA);
|
||||
if (!buffer) {
|
||||
ESP_LOGE(TAG, "no mem for receive buffer");
|
||||
break;
|
||||
} else if (emac->parent.receive(&emac->parent, buffer, &length) == ESP_OK) {
|
||||
/* pass the buffer to stack (e.g. TCP/IP layer) */
|
||||
if (length) {
|
||||
emac->eth->stack_input(emac->eth, buffer, length);
|
||||
} else {
|
||||
free(buffer);
|
||||
}
|
||||
} else {
|
||||
free(buffer);
|
||||
}
|
||||
} while (emac->packets_remain);
|
||||
}
|
||||
}
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_mediator(esp_eth_mac_t *mac, esp_eth_mediator_t *eth)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(eth, ESP_ERR_INVALID_ARG, err, TAG, "can't set mac's mediator to null");
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
emac->eth = eth;
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_write_phy_reg(esp_eth_mac_t *mac, uint32_t phy_addr, uint32_t phy_reg, uint32_t reg_value)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
// PHY register and MAC registers are mixed together in W5500
|
||||
// The only PHY register is PHYCFGR
|
||||
ESP_GOTO_ON_FALSE(phy_reg == W5500_REG_PHYCFGR, ESP_FAIL, err, TAG, "wrong PHY register");
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_PHYCFGR, ®_value, sizeof(uint8_t)), err, TAG, "write PHY register failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_read_phy_reg(esp_eth_mac_t *mac, uint32_t phy_addr, uint32_t phy_reg, uint32_t *reg_value)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(reg_value, ESP_ERR_INVALID_ARG, err, TAG, "can't set reg_value to null");
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
// PHY register and MAC registers are mixed together in W5500
|
||||
// The only PHY register is PHYCFGR
|
||||
ESP_GOTO_ON_FALSE(phy_reg == W5500_REG_PHYCFGR, ESP_FAIL, err, TAG, "wrong PHY register");
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_PHYCFGR, reg_value, sizeof(uint8_t)), err, TAG, "read PHY register failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_addr(esp_eth_mac_t *mac, uint8_t *addr)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(addr, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
memcpy(emac->addr, addr, 6);
|
||||
ESP_GOTO_ON_ERROR(w5500_set_mac_addr(emac), err, TAG, "set mac address failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_get_addr(esp_eth_mac_t *mac, uint8_t *addr)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(addr, ESP_ERR_INVALID_ARG, err, TAG, "invalid argument");
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
memcpy(addr, emac->addr, 6);
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_link(esp_eth_mac_t *mac, eth_link_t link)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
switch (link) {
|
||||
case ETH_LINK_UP:
|
||||
ESP_LOGD(TAG, "link is up");
|
||||
ESP_GOTO_ON_ERROR(mac->start(mac), err, TAG, "w5500 start failed");
|
||||
break;
|
||||
case ETH_LINK_DOWN:
|
||||
ESP_LOGD(TAG, "link is down");
|
||||
ESP_GOTO_ON_ERROR(mac->stop(mac), err, TAG, "w5500 stop failed");
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, err, TAG, "unknown link status");
|
||||
break;
|
||||
}
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_speed(esp_eth_mac_t *mac, eth_speed_t speed)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
switch (speed) {
|
||||
case ETH_SPEED_10M:
|
||||
ESP_LOGD(TAG, "working in 10Mbps");
|
||||
break;
|
||||
case ETH_SPEED_100M:
|
||||
ESP_LOGD(TAG, "working in 100Mbps");
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, err, TAG, "unknown speed");
|
||||
break;
|
||||
}
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_duplex(esp_eth_mac_t *mac, eth_duplex_t duplex)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
switch (duplex) {
|
||||
case ETH_DUPLEX_HALF:
|
||||
ESP_LOGD(TAG, "working in half duplex");
|
||||
break;
|
||||
case ETH_DUPLEX_FULL:
|
||||
ESP_LOGD(TAG, "working in full duplex");
|
||||
break;
|
||||
default:
|
||||
ESP_GOTO_ON_FALSE(false, ESP_ERR_INVALID_ARG, err, TAG, "unknown duplex");
|
||||
break;
|
||||
}
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_promiscuous(esp_eth_mac_t *mac, bool enable)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
uint8_t smr = 0;
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_MR(0), &smr, sizeof(smr)), err, TAG, "read SMR failed");
|
||||
if (enable) {
|
||||
smr &= ~W5500_SMR_MAC_FILTER;
|
||||
} else {
|
||||
smr |= W5500_SMR_MAC_FILTER;
|
||||
}
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_MR(0), &smr, sizeof(smr)), err, TAG, "write SMR failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_enable_flow_ctrl(esp_eth_mac_t *mac, bool enable)
|
||||
{
|
||||
/* w5500 doesn't support flow control function, so accept any value */
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_set_peer_pause_ability(esp_eth_mac_t *mac, uint32_t ability)
|
||||
{
|
||||
/* w5500 doesn't suppport PAUSE function, so accept any value */
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static inline bool is_w5500_sane_for_rxtx(emac_w5500_t *emac)
|
||||
{
|
||||
uint8_t phycfg;
|
||||
/* phy is ok for rx and tx operations if bits RST and LNK are set (no link down, no reset) */
|
||||
if (w5500_read(emac, W5500_REG_PHYCFGR, &phycfg, 1) == ESP_OK && (phycfg & 0x8001)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_transmit(esp_eth_mac_t *mac, uint8_t *buf, uint32_t length)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
uint16_t offset = 0;
|
||||
|
||||
// check if there're free memory to store this packet
|
||||
uint16_t free_size = 0;
|
||||
ESP_GOTO_ON_ERROR(w5500_get_tx_free_size(emac, &free_size), err, TAG, "get free size failed");
|
||||
ESP_GOTO_ON_FALSE(length <= free_size, ESP_ERR_NO_MEM, err, TAG, "free size (%d) < send length (%d)", length, free_size);
|
||||
// get current write pointer
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_TX_WR(0), &offset, sizeof(offset)), err, TAG, "read TX WR failed");
|
||||
offset = __builtin_bswap16(offset);
|
||||
// copy data to tx memory
|
||||
ESP_GOTO_ON_ERROR(w5500_write_buffer(emac, buf, length, offset), err, TAG, "write frame failed");
|
||||
// update write pointer
|
||||
offset += length;
|
||||
offset = __builtin_bswap16(offset);
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_TX_WR(0), &offset, sizeof(offset)), err, TAG, "write TX WR failed");
|
||||
// issue SEND command
|
||||
ESP_GOTO_ON_ERROR(w5500_send_command(emac, W5500_SCR_SEND, 100), err, TAG, "issue SEND command failed");
|
||||
|
||||
// pooling the TX done event
|
||||
int retry = 0;
|
||||
uint8_t status = 0;
|
||||
while (!(status & W5500_SIR_SEND)) {
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_IR(0), &status, sizeof(status)), err, TAG, "read SOCK0 IR failed");
|
||||
if ((retry++ > 3 && !is_w5500_sane_for_rxtx(emac)) || retry > 10) {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
}
|
||||
// clear the event bit
|
||||
status = W5500_SIR_SEND;
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_IR(0), &status, sizeof(status)), err, TAG, "write SOCK0 IR failed");
|
||||
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_receive(esp_eth_mac_t *mac, uint8_t *buf, uint32_t *length)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
uint16_t offset = 0;
|
||||
uint16_t rx_len = 0;
|
||||
uint16_t remain_bytes = 0;
|
||||
emac->packets_remain = false;
|
||||
|
||||
w5500_get_rx_received_size(emac, &remain_bytes);
|
||||
if (remain_bytes) {
|
||||
// get current read pointer
|
||||
ESP_GOTO_ON_ERROR(w5500_read(emac, W5500_REG_SOCK_RX_RD(0), &offset, sizeof(offset)), err, TAG, "read RX RD failed");
|
||||
offset = __builtin_bswap16(offset);
|
||||
// read head first
|
||||
ESP_GOTO_ON_ERROR(w5500_read_buffer(emac, &rx_len, sizeof(rx_len), offset), err, TAG, "read frame header failed");
|
||||
rx_len = __builtin_bswap16(rx_len) - 2; // data size includes 2 bytes of header
|
||||
offset += 2;
|
||||
// read the payload
|
||||
ESP_GOTO_ON_ERROR(w5500_read_buffer(emac, buf, rx_len, offset), err, TAG, "read payload failed, len=%d, offset=%d", rx_len, offset);
|
||||
offset += rx_len;
|
||||
// update read pointer
|
||||
offset = __builtin_bswap16(offset);
|
||||
ESP_GOTO_ON_ERROR(w5500_write(emac, W5500_REG_SOCK_RX_RD(0), &offset, sizeof(offset)), err, TAG, "write RX RD failed");
|
||||
/* issue RECV command */
|
||||
ESP_GOTO_ON_ERROR(w5500_send_command(emac, W5500_SCR_RECV, 100), err, TAG, "issue RECV command failed");
|
||||
// check if there're more data need to process
|
||||
remain_bytes -= rx_len + 2;
|
||||
emac->packets_remain = remain_bytes > 0;
|
||||
}
|
||||
|
||||
*length = rx_len;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_init(esp_eth_mac_t *mac)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
esp_eth_mediator_t *eth = emac->eth;
|
||||
esp_rom_gpio_pad_select_gpio(emac->int_gpio_num);
|
||||
gpio_set_direction(emac->int_gpio_num, GPIO_MODE_INPUT);
|
||||
gpio_set_pull_mode(emac->int_gpio_num, GPIO_PULLUP_ONLY);
|
||||
gpio_set_intr_type(emac->int_gpio_num, GPIO_INTR_NEGEDGE); // active low
|
||||
gpio_intr_enable(emac->int_gpio_num);
|
||||
gpio_isr_handler_add(emac->int_gpio_num, w5500_isr_handler, emac);
|
||||
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_LLINIT, NULL), err, TAG, "lowlevel init failed");
|
||||
/* reset w5500 */
|
||||
ESP_GOTO_ON_ERROR(w5500_reset(emac), err, TAG, "reset w5500 failed");
|
||||
/* verify chip id */
|
||||
ESP_GOTO_ON_ERROR(w5500_verify_id(emac), err, TAG, "vefiry chip ID failed");
|
||||
/* default setup of internal registers */
|
||||
ESP_GOTO_ON_ERROR(w5500_setup_default(emac), err, TAG, "w5500 default setup failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
gpio_isr_handler_remove(emac->int_gpio_num);
|
||||
gpio_reset_pin(emac->int_gpio_num);
|
||||
eth->on_state_changed(eth, ETH_STATE_DEINIT, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_deinit(esp_eth_mac_t *mac)
|
||||
{
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
esp_eth_mediator_t *eth = emac->eth;
|
||||
mac->stop(mac);
|
||||
gpio_isr_handler_remove(emac->int_gpio_num);
|
||||
gpio_reset_pin(emac->int_gpio_num);
|
||||
eth->on_state_changed(eth, ETH_STATE_DEINIT, NULL);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t emac_w5500_del(esp_eth_mac_t *mac)
|
||||
{
|
||||
emac_w5500_t *emac = __containerof(mac, emac_w5500_t, parent);
|
||||
vTaskDelete(emac->rx_task_hdl);
|
||||
vSemaphoreDelete(emac->spi_lock);
|
||||
free(emac);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
esp_eth_mac_t *esp_eth_mac_new_w5500(const eth_w5500_config_t *w5500_config, const eth_mac_config_t *mac_config)
|
||||
{
|
||||
esp_eth_mac_t *ret = NULL;
|
||||
emac_w5500_t *emac = NULL;
|
||||
ESP_GOTO_ON_FALSE(w5500_config && mac_config, NULL, err, TAG, "invalid argument");
|
||||
emac = calloc(1, sizeof(emac_w5500_t));
|
||||
ESP_GOTO_ON_FALSE(emac, NULL, err, TAG, "no mem for MAC instance");
|
||||
/* w5500 driver is interrupt driven */
|
||||
ESP_GOTO_ON_FALSE(w5500_config->int_gpio_num >= 0, NULL, err, TAG, "invalid interrupt gpio number");
|
||||
/* bind methods and attributes */
|
||||
emac->sw_reset_timeout_ms = mac_config->sw_reset_timeout_ms;
|
||||
emac->int_gpio_num = w5500_config->int_gpio_num;
|
||||
emac->spi_hdl = w5500_config->spi_hdl;
|
||||
emac->parent.set_mediator = emac_w5500_set_mediator;
|
||||
emac->parent.init = emac_w5500_init;
|
||||
emac->parent.deinit = emac_w5500_deinit;
|
||||
emac->parent.start = emac_w5500_start;
|
||||
emac->parent.stop = emac_w5500_stop;
|
||||
emac->parent.del = emac_w5500_del;
|
||||
emac->parent.write_phy_reg = emac_w5500_write_phy_reg;
|
||||
emac->parent.read_phy_reg = emac_w5500_read_phy_reg;
|
||||
emac->parent.set_addr = emac_w5500_set_addr;
|
||||
emac->parent.get_addr = emac_w5500_get_addr;
|
||||
emac->parent.set_speed = emac_w5500_set_speed;
|
||||
emac->parent.set_duplex = emac_w5500_set_duplex;
|
||||
emac->parent.set_link = emac_w5500_set_link;
|
||||
emac->parent.set_promiscuous = emac_w5500_set_promiscuous;
|
||||
emac->parent.set_peer_pause_ability = emac_w5500_set_peer_pause_ability;
|
||||
emac->parent.enable_flow_ctrl = emac_w5500_enable_flow_ctrl;
|
||||
emac->parent.transmit = emac_w5500_transmit;
|
||||
emac->parent.receive = emac_w5500_receive;
|
||||
/* create mutex */
|
||||
emac->spi_lock = xSemaphoreCreateMutex();
|
||||
ESP_GOTO_ON_FALSE(emac->spi_lock, NULL, err, TAG, "create lock failed");
|
||||
/* create w5500 task */
|
||||
BaseType_t core_num = tskNO_AFFINITY;
|
||||
if (mac_config->flags & ETH_MAC_FLAG_PIN_TO_CORE) {
|
||||
core_num = cpu_hal_get_core_id();
|
||||
}
|
||||
BaseType_t xReturned = xTaskCreatePinnedToCore(emac_w5500_task, "w5500_tsk", mac_config->rx_task_stack_size, emac,
|
||||
mac_config->rx_task_prio, &emac->rx_task_hdl, core_num);
|
||||
ESP_GOTO_ON_FALSE(xReturned == pdPASS, NULL, err, TAG, "create w5500 task failed");
|
||||
return &(emac->parent);
|
||||
|
||||
err:
|
||||
if (emac) {
|
||||
if (emac->rx_task_hdl) {
|
||||
vTaskDelete(emac->rx_task_hdl);
|
||||
}
|
||||
if (emac->spi_lock) {
|
||||
vSemaphoreDelete(emac->spi_lock);
|
||||
}
|
||||
free(emac);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
255
lib/ETHSPI/esp_eth_phy_w5500.c
Normal file
255
lib/ETHSPI/esp_eth_phy_w5500.c
Normal file
@ -0,0 +1,255 @@
|
||||
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include "esp_log.h"
|
||||
#include "esp_check.h"
|
||||
#include "esp_eth.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "w5500.h"
|
||||
|
||||
static const char *TAG = "w5500.phy";
|
||||
|
||||
/***************Vendor Specific Register***************/
|
||||
/**
|
||||
* @brief PHYCFGR(PHY Configuration Register)
|
||||
*
|
||||
*/
|
||||
typedef union {
|
||||
struct {
|
||||
uint8_t link: 1; /*!< Link status */
|
||||
uint8_t speed: 1; /*!< Speed status */
|
||||
uint8_t duplex: 1; /*!< Duplex status */
|
||||
uint8_t opmode: 3; /*!< Operation mode */
|
||||
uint8_t opsel: 1; /*!< Operation select */
|
||||
uint8_t reset: 1; /*!< Reset, when this bit is '0', PHY will get reset */
|
||||
};
|
||||
uint8_t val;
|
||||
} phycfg_reg_t;
|
||||
|
||||
|
||||
typedef struct {
|
||||
esp_eth_phy_t parent;
|
||||
esp_eth_mediator_t *eth;
|
||||
int addr;
|
||||
uint32_t reset_timeout_ms;
|
||||
uint32_t autonego_timeout_ms;
|
||||
eth_link_t link_status;
|
||||
int reset_gpio_num;
|
||||
} phy_w5500_t;
|
||||
|
||||
static esp_err_t w5500_update_link_duplex_speed(phy_w5500_t *w5500)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
esp_eth_mediator_t *eth = w5500->eth;
|
||||
eth_speed_t speed = ETH_SPEED_10M;
|
||||
eth_duplex_t duplex = ETH_DUPLEX_HALF;
|
||||
phycfg_reg_t phycfg;
|
||||
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, w5500->addr, W5500_REG_PHYCFGR, (uint32_t *) & (phycfg.val)), err, TAG, "read PHYCFG failed");
|
||||
eth_link_t link = phycfg.link ? ETH_LINK_UP : ETH_LINK_DOWN;
|
||||
/* check if link status changed */
|
||||
if (w5500->link_status != link) {
|
||||
/* when link up, read negotiation result */
|
||||
if (link == ETH_LINK_UP) {
|
||||
if (phycfg.speed) {
|
||||
speed = ETH_SPEED_100M;
|
||||
} else {
|
||||
speed = ETH_SPEED_10M;
|
||||
}
|
||||
if (phycfg.duplex) {
|
||||
duplex = ETH_DUPLEX_FULL;
|
||||
} else {
|
||||
duplex = ETH_DUPLEX_HALF;
|
||||
}
|
||||
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_SPEED, (void *)speed), err, TAG, "change speed failed");
|
||||
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_DUPLEX, (void *)duplex), err, TAG, "change duplex failed");
|
||||
}
|
||||
ESP_GOTO_ON_ERROR(eth->on_state_changed(eth, ETH_STATE_LINK, (void *)link), err, TAG, "change link failed");
|
||||
w5500->link_status = link;
|
||||
}
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_set_mediator(esp_eth_phy_t *phy, esp_eth_mediator_t *eth)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(eth, ESP_ERR_INVALID_ARG, err, TAG, "can't set mediator to null");
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
w5500->eth = eth;
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_get_link(esp_eth_phy_t *phy)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
/* Updata information about link, speed, duplex */
|
||||
ESP_GOTO_ON_ERROR(w5500_update_link_duplex_speed(w5500), err, TAG, "update link duplex speed failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_reset(esp_eth_phy_t *phy)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
w5500->link_status = ETH_LINK_DOWN;
|
||||
esp_eth_mediator_t *eth = w5500->eth;
|
||||
phycfg_reg_t phycfg;
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, w5500->addr, W5500_REG_PHYCFGR, (uint32_t *) & (phycfg.val)), err, TAG, "read PHYCFG failed");
|
||||
phycfg.reset = 0; // set to '0' will reset internal PHY
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_write(eth, w5500->addr, W5500_REG_PHYCFGR, phycfg.val), err, TAG, "write PHYCFG failed");
|
||||
vTaskDelay(pdMS_TO_TICKS(10));
|
||||
phycfg.reset = 1; // set to '1' after reset
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_write(eth, w5500->addr, W5500_REG_PHYCFGR, phycfg.val), err, TAG, "write PHYCFG failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_reset_hw(esp_eth_phy_t *phy)
|
||||
{
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
// set reset_gpio_num to a negative value can skip hardware reset phy chip
|
||||
if (w5500->reset_gpio_num >= 0) {
|
||||
esp_rom_gpio_pad_select_gpio(w5500->reset_gpio_num);
|
||||
gpio_set_direction(w5500->reset_gpio_num, GPIO_MODE_OUTPUT);
|
||||
gpio_set_level(w5500->reset_gpio_num, 0);
|
||||
esp_rom_delay_us(100); // insert min input assert time
|
||||
gpio_set_level(w5500->reset_gpio_num, 1);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_negotiate(esp_eth_phy_t *phy)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
esp_eth_mediator_t *eth = w5500->eth;
|
||||
/* in case any link status has changed, let's assume we're in link down status */
|
||||
w5500->link_status = ETH_LINK_DOWN;
|
||||
phycfg_reg_t phycfg;
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_read(eth, w5500->addr, W5500_REG_PHYCFGR, (uint32_t *) & (phycfg.val)), err, TAG, "read PHYCFG failed");
|
||||
phycfg.opsel = 1; // PHY working mode configured by register
|
||||
phycfg.opmode = 7; // all capable, auto-negotiation enabled
|
||||
ESP_GOTO_ON_ERROR(eth->phy_reg_write(eth, w5500->addr, W5500_REG_PHYCFGR, phycfg.val), err, TAG, "write PHYCFG failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_pwrctl(esp_eth_phy_t *phy, bool enable)
|
||||
{
|
||||
// power control is not supported for W5500 internal PHY
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_set_addr(esp_eth_phy_t *phy, uint32_t addr)
|
||||
{
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
w5500->addr = addr;
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_get_addr(esp_eth_phy_t *phy, uint32_t *addr)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
ESP_GOTO_ON_FALSE(addr, ESP_ERR_INVALID_ARG, err, TAG, "addr can't be null");
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
*addr = w5500->addr;
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_del(esp_eth_phy_t *phy)
|
||||
{
|
||||
phy_w5500_t *w5500 = __containerof(phy, phy_w5500_t, parent);
|
||||
free(w5500);
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_advertise_pause_ability(esp_eth_phy_t *phy, uint32_t ability)
|
||||
{
|
||||
// pause ability advertisement is not supported for W5500 internal PHY
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_loopback(esp_eth_phy_t *phy, bool enable)
|
||||
{
|
||||
// Loopback is not supported for W5500 internal PHY
|
||||
return ESP_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_init(esp_eth_phy_t *phy)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
/* Power on Ethernet PHY */
|
||||
ESP_GOTO_ON_ERROR(w5500_pwrctl(phy, true), err, TAG, "power control failed");
|
||||
/* Reset Ethernet PHY */
|
||||
ESP_GOTO_ON_ERROR(w5500_reset(phy), err, TAG, "reset failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static esp_err_t w5500_deinit(esp_eth_phy_t *phy)
|
||||
{
|
||||
esp_err_t ret = ESP_OK;
|
||||
/* Power off Ethernet PHY */
|
||||
ESP_GOTO_ON_ERROR(w5500_pwrctl(phy, false), err, TAG, "power control failed");
|
||||
return ESP_OK;
|
||||
err:
|
||||
return ret;
|
||||
}
|
||||
|
||||
esp_eth_phy_t *esp_eth_phy_new_w5500(const eth_phy_config_t *config)
|
||||
{
|
||||
esp_eth_phy_t *ret = NULL;
|
||||
ESP_GOTO_ON_FALSE(config, NULL, err, TAG, "invalid arguments");
|
||||
phy_w5500_t *w5500 = calloc(1, sizeof(phy_w5500_t));
|
||||
ESP_GOTO_ON_FALSE(w5500, NULL, err, TAG, "no mem for PHY instance");
|
||||
w5500->addr = config->phy_addr;
|
||||
w5500->reset_timeout_ms = config->reset_timeout_ms;
|
||||
w5500->reset_gpio_num = config->reset_gpio_num;
|
||||
w5500->link_status = ETH_LINK_DOWN;
|
||||
w5500->autonego_timeout_ms = config->autonego_timeout_ms;
|
||||
w5500->parent.reset = w5500_reset;
|
||||
w5500->parent.reset_hw = w5500_reset_hw;
|
||||
w5500->parent.init = w5500_init;
|
||||
w5500->parent.deinit = w5500_deinit;
|
||||
w5500->parent.set_mediator = w5500_set_mediator;
|
||||
w5500->parent.negotiate = w5500_negotiate;
|
||||
w5500->parent.get_link = w5500_get_link;
|
||||
w5500->parent.pwrctl = w5500_pwrctl;
|
||||
w5500->parent.get_addr = w5500_get_addr;
|
||||
w5500->parent.set_addr = w5500_set_addr;
|
||||
w5500->parent.advertise_pause_ability = w5500_advertise_pause_ability;
|
||||
w5500->parent.loopback = w5500_loopback;
|
||||
w5500->parent.del = w5500_del;
|
||||
return &(w5500->parent);
|
||||
err:
|
||||
return ret;
|
||||
}
|
77
lib/ETHSPI/w5500.h
Normal file
77
lib/ETHSPI/w5500.h
Normal file
@ -0,0 +1,77 @@
|
||||
// Copyright 2020 Espressif Systems (Shanghai) PTE LTD
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#define W5500_ADDR_OFFSET (16) // Address length
|
||||
#define W5500_BSB_OFFSET (3) // Block Select Bits offset
|
||||
#define W5500_RWB_OFFSET (2) // Read Write Bits offset
|
||||
|
||||
#define W5500_BSB_COM_REG (0x00) // Common Register
|
||||
#define W5500_BSB_SOCK_REG(s) ((s)*4+1) // Socket Register
|
||||
#define W5500_BSB_SOCK_TX_BUF(s) ((s)*4+2) // Socket TX Buffer
|
||||
#define W5500_BSB_SOCK_RX_BUF(s) ((s)*4+3) // Socket RX Buffer
|
||||
|
||||
#define W5500_ACCESS_MODE_READ (0) // Read Mode
|
||||
#define W5500_ACCESS_MODE_WRITE (1) // Write Mode
|
||||
|
||||
#define W5500_SPI_OP_MODE_VDM (0x00) // Variable Data Length Mode (SPI frame is controlled by CS line)
|
||||
#define W5500_SPI_OP_MODE_FDM_1 (0x01) // Fixed Data Length Mode, 1 Byte Length
|
||||
#define W5500_SPI_OP_MODE_FDM_2 (0x02) // Fixed Data Length Mode, 2 Bytes Length
|
||||
#define W5500_SPI_OP_MODE_FDM_4 (0x03) // Fixed Data Length Mode, 4 Bytes Length
|
||||
|
||||
#define W5500_MAKE_MAP(offset, bsb) ((offset) << W5500_ADDR_OFFSET | (bsb) << W5500_BSB_OFFSET)
|
||||
|
||||
#define W5500_REG_MR W5500_MAKE_MAP(0x0000, W5500_BSB_COM_REG) // Mode
|
||||
#define W5500_REG_MAC W5500_MAKE_MAP(0x0009, W5500_BSB_COM_REG) // MAC Address
|
||||
#define W5500_REG_INTLEVEL W5500_MAKE_MAP(0x0013, W5500_BSB_COM_REG) // Interrupt Level Timeout
|
||||
#define W5500_REG_IR W5500_MAKE_MAP(0x0015, W5500_BSB_COM_REG) // Interrupt
|
||||
#define W5500_REG_IMR W5500_MAKE_MAP(0x0016, W5500_BSB_COM_REG) // Interrupt Mask
|
||||
#define W5500_REG_SIR W5500_MAKE_MAP(0x0017, W5500_BSB_COM_REG) // Socket Interrupt
|
||||
#define W5500_REG_SIMR W5500_MAKE_MAP(0x0018, W5500_BSB_COM_REG) // Socket Interrupt Mask
|
||||
#define W5500_REG_RTR W5500_MAKE_MAP(0x0019, W5500_BSB_COM_REG) // Retry Time
|
||||
#define W5500_REG_RCR W5500_MAKE_MAP(0x001B, W5500_BSB_COM_REG) // Retry Count
|
||||
#define W5500_REG_PHYCFGR W5500_MAKE_MAP(0x002E, W5500_BSB_COM_REG) // PHY Configuration
|
||||
#define W5500_REG_VERSIONR W5500_MAKE_MAP(0x0039, W5500_BSB_COM_REG) // Chip version
|
||||
|
||||
#define W5500_REG_SOCK_MR(s) W5500_MAKE_MAP(0x0000, W5500_BSB_SOCK_REG(s)) // Socket Mode
|
||||
#define W5500_REG_SOCK_CR(s) W5500_MAKE_MAP(0x0001, W5500_BSB_SOCK_REG(s)) // Socket Command
|
||||
#define W5500_REG_SOCK_IR(s) W5500_MAKE_MAP(0x0002, W5500_BSB_SOCK_REG(s)) // Socket Interrupt
|
||||
#define W5500_REG_SOCK_SR(s) W5500_MAKE_MAP(0x0004, W5500_BSB_SOCK_REG(s)) // Socket Status
|
||||
#define W5500_REG_SOCK_RXBUF_SIZE(s) W5500_MAKE_MAP(0x001E, W5500_BSB_SOCK_REG(s)) // Socket Receive Buffer Size
|
||||
#define W5500_REG_SOCK_TXBUF_SIZE(s) W5500_MAKE_MAP(0x001F, W5500_BSB_SOCK_REG(s)) // Socket Transmit Buffer Size
|
||||
#define W5500_REG_SOCK_TX_FSR(s) W5500_MAKE_MAP(0x0020, W5500_BSB_SOCK_REG(s)) // Socket TX Free Size
|
||||
#define W5500_REG_SOCK_TX_RD(s) W5500_MAKE_MAP(0x0022, W5500_BSB_SOCK_REG(s)) // Socket TX Read Pointer
|
||||
#define W5500_REG_SOCK_TX_WR(s) W5500_MAKE_MAP(0x0024, W5500_BSB_SOCK_REG(s)) // Socket TX Write Pointer
|
||||
#define W5500_REG_SOCK_RX_RSR(s) W5500_MAKE_MAP(0x0026, W5500_BSB_SOCK_REG(s)) // Socket RX Received Size
|
||||
#define W5500_REG_SOCK_RX_RD(s) W5500_MAKE_MAP(0x0028, W5500_BSB_SOCK_REG(s)) // Socket RX Read Pointer
|
||||
#define W5500_REG_SOCK_RX_WR(s) W5500_MAKE_MAP(0x002A, W5500_BSB_SOCK_REG(s)) // Socket RX Write Pointer
|
||||
#define W5500_REG_SOCK_IMR(s) W5500_MAKE_MAP(0x002C, W5500_BSB_SOCK_REG(s)) // Socket Interrupt Mask
|
||||
|
||||
#define W5500_MEM_SOCK_TX(s,addr) W5500_MAKE_MAP(addr, W5500_BSB_SOCK_TX_BUF(s)) // Socket TX buffer address
|
||||
#define W5500_MEM_SOCK_RX(s,addr) W5500_MAKE_MAP(addr, W5500_BSB_SOCK_RX_BUF(s)) // Socket RX buffer address
|
||||
|
||||
#define W5500_MR_RST (1<<7) // Software reset
|
||||
#define W5500_MR_PB (1<<4) // Ping block (block the response to a ping request)
|
||||
|
||||
#define W5500_SIMR_SOCK0 (1<<0) // Socket 0 interrupt
|
||||
|
||||
#define W5500_SMR_MAC_RAW (1<<2) // MAC RAW mode
|
||||
#define W5500_SMR_MAC_FILTER (1<<7) // MAC filter
|
||||
|
||||
#define W5500_SCR_OPEN (0x01) // Open command
|
||||
#define W5500_SCR_CLOSE (0x10) // Close command
|
||||
#define W5500_SCR_SEND (0x20) // Send command
|
||||
#define W5500_SCR_RECV (0x40) // Recv command
|
||||
|
||||
#define W5500_SIR_RECV (1<<2) // Receive done
|
||||
#define W5500_SIR_SEND (1<<4) // Send done
|
38
lib/FT6336U/.gitignore
vendored
Normal file
38
lib/FT6336U/.gitignore
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
# Prerequisites
|
||||
*.d
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
|
||||
# VS Code Setting
|
||||
.vscode/
|
||||
|
||||
# Build Folder
|
||||
build/
|
21
lib/FT6336U/LICENSE
Normal file
21
lib/FT6336U/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 aselectroworks
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
5
lib/FT6336U/README.md
Normal file
5
lib/FT6336U/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# FT6336U Library
|
||||
FocalTech FT6336U (Self-Capacitive Touch Panel Controller) library for Arduino.
|
||||
|
||||
## License
|
||||
This code is released under the MIT License. Please see [LICENSE](https://github.com/aselectroworks/Arduino-FT6336U/blob/master/LICENSE) for the full text.
|
40
lib/FT6336U/examples/ReadTouchParam/ReadTouchParam.ino
Normal file
40
lib/FT6336U/examples/ReadTouchParam/ReadTouchParam.ino
Normal file
@ -0,0 +1,40 @@
|
||||
#include "FT6336U.h"
|
||||
|
||||
#define I2C_SDA 22
|
||||
#define I2C_SCL 23
|
||||
#define RST_N_PIN 21
|
||||
#define INT_N_PIN 34
|
||||
|
||||
FT6336U ft6336u(I2C_SDA, I2C_SCL, RST_N_PIN, INT_N_PIN);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
ft6336u.begin();
|
||||
|
||||
Serial.print("FT6336U Firmware Version: ");
|
||||
Serial.println(ft6336u.read_firmware_id());
|
||||
Serial.print("FT6336U Device Mode: ");
|
||||
Serial.println(ft6336u.read_device_mode());
|
||||
}
|
||||
|
||||
void loop() {
|
||||
if(digitalRead(INT_N_PIN) != -1) {
|
||||
Serial.print("FT6336U TD Status: ");
|
||||
Serial.println(ft6336u.read_td_status());
|
||||
Serial.print("FT6336U Touch Event/ID 1: (");
|
||||
Serial.print(ft6336u.read_touch1_event()); Serial.print(" / "); Serial.print(ft6336u.read_touch1_id()); Serial.println(")");
|
||||
Serial.print("FT6336U Touch Position 1: (");
|
||||
Serial.print(ft6336u.read_touch1_x()); Serial.print(" , "); Serial.print(ft6336u.read_touch1_y()); Serial.println(")");
|
||||
Serial.print("FT6336U Touch Weight/MISC 1: (");
|
||||
Serial.print(ft6336u.read_touch1_weight()); Serial.print(" / "); Serial.print(ft6336u.read_touch1_misc()); Serial.println(")");
|
||||
Serial.print("FT6336U Touch Event/ID 2: (");
|
||||
Serial.print(ft6336u.read_touch2_event()); Serial.print(" / "); Serial.print(ft6336u.read_touch2_id()); Serial.println(")");
|
||||
Serial.print("FT6336U Touch Position 2: (");
|
||||
Serial.print(ft6336u.read_touch2_x()); Serial.print(" , "); Serial.print(ft6336u.read_touch2_y()); Serial.println(")");
|
||||
Serial.print("FT6336U Touch Weight/MISC 2: (");
|
||||
Serial.print(ft6336u.read_touch2_weight()); Serial.print(" / "); Serial.print(ft6336u.read_touch2_misc()); Serial.println(")");
|
||||
}
|
||||
|
||||
}
|
||||
|
57
lib/FT6336U/examples/ScanMultiTouch/ScanMultiTouch.ino
Normal file
57
lib/FT6336U/examples/ScanMultiTouch/ScanMultiTouch.ino
Normal file
@ -0,0 +1,57 @@
|
||||
#include "FT6336U.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#define I2C_SDA 22
|
||||
#define I2C_SCL 23
|
||||
#define RST_N_PIN 21
|
||||
#define INT_N_PIN 34
|
||||
|
||||
FT6336U ft6336u(I2C_SDA, I2C_SCL, RST_N_PIN, INT_N_PIN);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
ft6336u.begin();
|
||||
|
||||
// ft6336u.write_device_mode(factory_mode);
|
||||
Serial.print("FT6336U Device Mode: ");
|
||||
Serial.println(ft6336u.read_device_mode());
|
||||
Serial.print("FT6336U Threshold: 0x");
|
||||
Serial.println(ft6336u.read_touch_threshold(), HEX);
|
||||
Serial.print("FT6336U Filter Coefficient: 0x");
|
||||
Serial.println(ft6336u.read_filter_coefficient(), HEX);
|
||||
Serial.print("FT6336U Control Mode: 0x");
|
||||
Serial.println(ft6336u.read_ctrl_mode(), HEX);
|
||||
Serial.print("FT6336U Time Period for enter to Monitor Mode: 0x");
|
||||
Serial.println(ft6336u.read_time_period_enter_monitor(), HEX);
|
||||
Serial.print("FT6336U Active Rate: 0x");
|
||||
Serial.println(ft6336u.read_active_rate(), HEX);
|
||||
Serial.print("FT6336U Monitor Rate: 0x");
|
||||
Serial.println(ft6336u.read_monitor_rate(), HEX);
|
||||
|
||||
Serial.print("FT6336U LIB Ver: 0x");
|
||||
Serial.println(ft6336u.read_library_version(), HEX);
|
||||
Serial.print("FT6336U Chip ID: 0x");
|
||||
Serial.println(ft6336u.read_chip_id(), HEX);
|
||||
Serial.print("FT6336U G Mode: 0x");
|
||||
Serial.println(ft6336u.read_g_mode(), HEX);
|
||||
Serial.print("FT6336U POWER Mode: 0x");
|
||||
Serial.println(ft6336u.read_pwrmode(), HEX);
|
||||
Serial.print("FT6336U Firm ID: 0x");
|
||||
Serial.println(ft6336u.read_firmware_id(), HEX);
|
||||
Serial.print("FT6336U Focal Tehc ID: 0x");
|
||||
Serial.println(ft6336u.read_focaltech_id(), HEX);
|
||||
Serial.print("FT6336U Release Code ID: 0x");
|
||||
Serial.println(ft6336u.read_release_code_id(), HEX);
|
||||
Serial.print("FT6336U State: 0x");
|
||||
Serial.println(ft6336u.read_state(), HEX);
|
||||
|
||||
}
|
||||
|
||||
FT6336U_TouchPointType tp;
|
||||
void loop() {
|
||||
tp = ft6336u.scan();
|
||||
char tempString[128];
|
||||
sprintf(tempString, "FT6336U TD Count %d / TD1 (%d, %4d, %4d) / TD2 (%d, %4d, %4d)\r", tp.touch_count, tp.tp[0].status, tp.tp[0].x, tp.tp[0].y, tp.tp[1].status, tp.tp[1].x, tp.tp[1].y);
|
||||
Serial.print(tempString);
|
||||
}
|
10
lib/FT6336U/library.properties
Normal file
10
lib/FT6336U/library.properties
Normal file
@ -0,0 +1,10 @@
|
||||
name=FT6336U CTP Controller
|
||||
version=1.0.2
|
||||
author=Atsushi Sasaki
|
||||
maintainer=Atsushi Sasaki
|
||||
sentence=Arduino FT6336U CTP Controller library
|
||||
paragraph=Arduino FT6336U CTP Controller library
|
||||
category=Sensors
|
||||
url=
|
||||
architectures=*
|
||||
includes=FT6336U.h
|
271
lib/FT6336U/src/FT6336U.cpp
Normal file
271
lib/FT6336U/src/FT6336U.cpp
Normal file
@ -0,0 +1,271 @@
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
@file FT6336U.cpp
|
||||
Author: Atsushi Sasaki (https://github.com/aselectroworks)
|
||||
License: MIT (see LICENSE)
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#include "FT6336U.h"
|
||||
|
||||
#include <Wire.h>
|
||||
|
||||
FT6336U::FT6336U(uint8_t rst_n, uint8_t int_n)
|
||||
: rst_n(rst_n), int_n(int_n) {
|
||||
}
|
||||
#if defined(ESP32) || defined(ESP8266)
|
||||
FT6336U::FT6336U(int8_t sda, int8_t scl, uint8_t rst_n, uint8_t int_n)
|
||||
: sda(sda), scl(scl), rst_n(rst_n), int_n(int_n) {
|
||||
}
|
||||
#endif
|
||||
FT6336U::~FT6336U() {
|
||||
}
|
||||
|
||||
|
||||
void FT6336U::begin(void) {
|
||||
// Initialize I2C
|
||||
#if defined(ESP32) || defined(ESP8266)
|
||||
if(sda != -1 && scl != -1) {
|
||||
Wire.begin(sda, scl);
|
||||
}
|
||||
else {
|
||||
Wire.begin();
|
||||
}
|
||||
#else
|
||||
Wire.begin();
|
||||
#endif
|
||||
// Int Pin Configuration
|
||||
pinMode(int_n, INPUT);
|
||||
// Reset Pin Configuration
|
||||
pinMode(rst_n, OUTPUT);
|
||||
digitalWrite(rst_n, LOW);
|
||||
delay(10);
|
||||
digitalWrite(rst_n, HIGH);
|
||||
delay(500);
|
||||
}
|
||||
uint8_t FT6336U::read_device_mode(void) {
|
||||
return (readByte(FT6336U_ADDR_DEVICE_MODE) & 0x70) >> 4;
|
||||
}
|
||||
void FT6336U::write_device_mode(DEVICE_MODE_Enum mode) {
|
||||
writeByte(FT6336U_ADDR_DEVICE_MODE, (mode & 0x07) << 4);
|
||||
}
|
||||
uint8_t FT6336U::read_gesture_id(void) {
|
||||
return readByte(FT6336U_ADDR_GESTURE_ID);
|
||||
}
|
||||
uint8_t FT6336U::read_td_status(void) {
|
||||
return readByte(FT6336U_ADDR_TD_STATUS);
|
||||
}
|
||||
uint8_t FT6336U::read_touch_number(void) {
|
||||
return readByte(FT6336U_ADDR_TD_STATUS) & 0x0F;
|
||||
}
|
||||
// Touch 1 functions
|
||||
uint16_t FT6336U::read_touch1_x(void) {
|
||||
uint8_t read_buf[2];
|
||||
read_buf[0] = readByte(FT6336U_ADDR_TOUCH1_X);
|
||||
read_buf[1] = readByte(FT6336U_ADDR_TOUCH1_X + 1);
|
||||
return ((read_buf[0] & 0x0f) << 8) | read_buf[1];
|
||||
}
|
||||
uint16_t FT6336U::read_touch1_y(void) {
|
||||
uint8_t read_buf[2];
|
||||
read_buf[0] = readByte(FT6336U_ADDR_TOUCH1_Y);
|
||||
read_buf[1] = readByte(FT6336U_ADDR_TOUCH1_Y + 1);
|
||||
return ((read_buf[0] & 0x0f) << 8) | read_buf[1];
|
||||
}
|
||||
uint8_t FT6336U::read_touch1_event(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH1_EVENT) >> 6;
|
||||
}
|
||||
uint8_t FT6336U::read_touch1_id(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH1_ID) >> 4;
|
||||
}
|
||||
uint8_t FT6336U::read_touch1_weight(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH1_WEIGHT);
|
||||
}
|
||||
uint8_t FT6336U::read_touch1_misc(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH1_MISC) >> 4;
|
||||
}
|
||||
// Touch 2 functions
|
||||
uint16_t FT6336U::read_touch2_x(void) {
|
||||
uint8_t read_buf[2];
|
||||
read_buf[0] = readByte(FT6336U_ADDR_TOUCH2_X);
|
||||
read_buf[1] = readByte(FT6336U_ADDR_TOUCH2_X + 1);
|
||||
return ((read_buf[0] & 0x0f) << 8) | read_buf[1];
|
||||
}
|
||||
uint16_t FT6336U::read_touch2_y(void) {
|
||||
uint8_t read_buf[2];
|
||||
read_buf[0] = readByte(FT6336U_ADDR_TOUCH2_Y);
|
||||
read_buf[1] = readByte(FT6336U_ADDR_TOUCH2_Y + 1);
|
||||
return ((read_buf[0] & 0x0f) << 8) | read_buf[1];
|
||||
}
|
||||
uint8_t FT6336U::read_touch2_event(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH2_EVENT) >> 6;
|
||||
}
|
||||
uint8_t FT6336U::read_touch2_id(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH2_ID) >> 4;
|
||||
}
|
||||
uint8_t FT6336U::read_touch2_weight(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH2_WEIGHT);
|
||||
}
|
||||
uint8_t FT6336U::read_touch2_misc(void) {
|
||||
return readByte(FT6336U_ADDR_TOUCH2_MISC) >> 4;
|
||||
}
|
||||
|
||||
// Mode Parameter Register
|
||||
uint8_t FT6336U::read_touch_threshold(void) {
|
||||
return readByte(FT6336U_ADDR_THRESHOLD);
|
||||
}
|
||||
uint8_t FT6336U::read_filter_coefficient(void) {
|
||||
return readByte(FT6336U_ADDR_FILTER_COE);
|
||||
}
|
||||
uint8_t FT6336U::read_ctrl_mode(void) {
|
||||
return readByte(FT6336U_ADDR_CTRL);
|
||||
}
|
||||
void FT6336U::write_ctrl_mode(CTRL_MODE_Enum mode) {
|
||||
writeByte(FT6336U_ADDR_CTRL, mode);
|
||||
}
|
||||
uint8_t FT6336U::read_time_period_enter_monitor(void) {
|
||||
return readByte(FT6336U_ADDR_TIME_ENTER_MONITOR);
|
||||
}
|
||||
uint8_t FT6336U::read_active_rate(void) {
|
||||
return readByte(FT6336U_ADDR_ACTIVE_MODE_RATE);
|
||||
}
|
||||
uint8_t FT6336U::read_monitor_rate(void) {
|
||||
return readByte(FT6336U_ADDR_MONITOR_MODE_RATE);
|
||||
}
|
||||
|
||||
// Gesture Parameters
|
||||
uint8_t FT6336U::read_radian_value(void) {
|
||||
return readByte(FT6336U_ADDR_RADIAN_VALUE);
|
||||
}
|
||||
void FT6336U::write_radian_value(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_RADIAN_VALUE, val);
|
||||
}
|
||||
uint8_t FT6336U::read_offset_left_right(void) {
|
||||
return readByte(FT6336U_ADDR_OFFSET_LEFT_RIGHT);
|
||||
}
|
||||
void FT6336U::write_offset_left_right(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_OFFSET_LEFT_RIGHT, val);
|
||||
}
|
||||
uint8_t FT6336U::read_offset_up_down(void) {
|
||||
return readByte(FT6336U_ADDR_OFFSET_UP_DOWN);
|
||||
}
|
||||
void FT6336U::write_offset_up_down(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_OFFSET_UP_DOWN, val);
|
||||
}
|
||||
uint8_t FT6336U::read_distance_left_right(void) {
|
||||
return readByte(FT6336U_ADDR_DISTANCE_LEFT_RIGHT);
|
||||
}
|
||||
void FT6336U::write_distance_left_right(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_DISTANCE_LEFT_RIGHT, val);
|
||||
}
|
||||
uint8_t FT6336U::read_distance_up_down(void) {
|
||||
return readByte(FT6336U_ADDR_DISTANCE_UP_DOWN);
|
||||
}
|
||||
void FT6336U::write_distance_up_down(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_DISTANCE_UP_DOWN, val);
|
||||
}
|
||||
uint8_t FT6336U::read_distance_zoom(void) {
|
||||
return readByte(FT6336U_ADDR_DISTANCE_ZOOM);
|
||||
}
|
||||
void FT6336U::write_distance_zoom(uint8_t val) {
|
||||
writeByte(FT6336U_ADDR_DISTANCE_ZOOM, val);
|
||||
}
|
||||
|
||||
|
||||
// System Information
|
||||
uint16_t FT6336U::read_library_version(void) {
|
||||
uint8_t read_buf[2];
|
||||
read_buf[0] = readByte(FT6336U_ADDR_LIBRARY_VERSION_H);
|
||||
read_buf[1] = readByte(FT6336U_ADDR_LIBRARY_VERSION_L);
|
||||
return ((read_buf[0] & 0x0f) << 8) | read_buf[1];
|
||||
}
|
||||
uint8_t FT6336U::read_chip_id(void) {
|
||||
return readByte(FT6336U_ADDR_CHIP_ID);
|
||||
}
|
||||
uint8_t FT6336U::read_g_mode(void) {
|
||||
return readByte(FT6336U_ADDR_G_MODE);
|
||||
}
|
||||
void FT6336U::write_g_mode(G_MODE_Enum mode){
|
||||
writeByte(FT6336U_ADDR_G_MODE, mode);
|
||||
}
|
||||
uint8_t FT6336U::read_pwrmode(void) {
|
||||
return readByte(FT6336U_ADDR_POWER_MODE);
|
||||
}
|
||||
uint8_t FT6336U::read_firmware_id(void) {
|
||||
return readByte(FT6336U_ADDR_FIRMARE_ID);
|
||||
}
|
||||
uint8_t FT6336U::read_focaltech_id(void) {
|
||||
return readByte(FT6336U_ADDR_FOCALTECH_ID);
|
||||
}
|
||||
uint8_t FT6336U::read_release_code_id(void) {
|
||||
return readByte(FT6336U_ADDR_RELEASE_CODE_ID);
|
||||
}
|
||||
uint8_t FT6336U::read_state(void) {
|
||||
return readByte(FT6336U_ADDR_STATE);
|
||||
}
|
||||
|
||||
|
||||
//coordinate diagram(FPC downwards)
|
||||
////y ////////////////////264x176
|
||||
//
|
||||
//
|
||||
//x
|
||||
//
|
||||
//
|
||||
FT6336U_TouchPointType FT6336U::scan(void){
|
||||
touchPoint.touch_count = read_td_status();
|
||||
|
||||
if(touchPoint.touch_count == 0) {
|
||||
touchPoint.tp[0].status = release;
|
||||
touchPoint.tp[1].status = release;
|
||||
}
|
||||
else if(touchPoint.touch_count == 1) {
|
||||
uint8_t id1 = read_touch1_id(); // id1 = 0 or 1
|
||||
touchPoint.tp[id1].status = (touchPoint.tp[id1].status == release) ? touch : stream;
|
||||
touchPoint.tp[id1].x = read_touch1_x();
|
||||
touchPoint.tp[id1].y = read_touch1_y();
|
||||
touchPoint.tp[~id1 & 0x01].status = release;
|
||||
}
|
||||
else {
|
||||
uint8_t id1 = read_touch1_id(); // id1 = 0 or 1
|
||||
touchPoint.tp[id1].status = (touchPoint.tp[id1].status == release) ? touch : stream;
|
||||
touchPoint.tp[id1].x = read_touch1_x();
|
||||
touchPoint.tp[id1].y = read_touch1_y();
|
||||
uint8_t id2 = read_touch2_id(); // id2 = 0 or 1(~id1 & 0x01)
|
||||
touchPoint.tp[id2].status = (touchPoint.tp[id2].status == release) ? touch : stream;
|
||||
touchPoint.tp[id2].x = read_touch2_x();
|
||||
touchPoint.tp[id2].y = read_touch2_y();
|
||||
}
|
||||
|
||||
return touchPoint;
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Private Function
|
||||
uint8_t FT6336U::readByte(uint8_t addr) {
|
||||
uint8_t rdData = 0;
|
||||
uint8_t rdDataCount;
|
||||
do {
|
||||
Wire.beginTransmission(I2C_ADDR_FT6336U);
|
||||
Wire.write(addr);
|
||||
Wire.endTransmission(false); // Restart
|
||||
delay(10);
|
||||
rdDataCount = Wire.requestFrom(I2C_ADDR_FT6336U, 1);
|
||||
} while(rdDataCount == 0);
|
||||
while(Wire.available()) {
|
||||
rdData = Wire.read();
|
||||
}
|
||||
return rdData;
|
||||
|
||||
}
|
||||
void FT6336U::writeByte(uint8_t addr, uint8_t data) {
|
||||
DEBUG_PRINTLN("")
|
||||
DEBUG_PRINT("writeI2C reg 0x")
|
||||
DEBUG_PRINT(addr, HEX)
|
||||
DEBUG_PRINT(" -> 0x") DEBUG_PRINTLN(data, HEX)
|
||||
|
||||
Wire.beginTransmission(I2C_ADDR_FT6336U);
|
||||
Wire.write(addr);
|
||||
Wire.write(data);
|
||||
Wire.endTransmission();
|
||||
}
|
201
lib/FT6336U/src/FT6336U.h
Normal file
201
lib/FT6336U/src/FT6336U.h
Normal file
@ -0,0 +1,201 @@
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
@file FT6336U.h
|
||||
Author: Atsushi Sasaki(https://github.com/aselectroworks)
|
||||
License: MIT (see LICENSE)
|
||||
*/
|
||||
/**************************************************************************/
|
||||
|
||||
#ifndef _FT6336U_H
|
||||
#define _FT6336U_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <Arduino.h>
|
||||
|
||||
#define I2C_ADDR_FT6336U 0x48
|
||||
|
||||
// Touch Parameter
|
||||
#define FT6336U_PRES_DOWN 0x2
|
||||
#define FT6336U_COORD_UD 0x1
|
||||
|
||||
// Registers
|
||||
#define FT6336U_ADDR_DEVICE_MODE 0x00
|
||||
typedef enum {
|
||||
working_mode = 0b000,
|
||||
factory_mode = 0b100,
|
||||
} DEVICE_MODE_Enum;
|
||||
#define FT6336U_ADDR_GESTURE_ID 0x01
|
||||
#define FT6336U_ADDR_TD_STATUS 0x02
|
||||
|
||||
#define FT6336U_ADDR_TOUCH1_EVENT 0x03
|
||||
#define FT6336U_ADDR_TOUCH1_ID 0x05
|
||||
#define FT6336U_ADDR_TOUCH1_X 0x03
|
||||
#define FT6336U_ADDR_TOUCH1_Y 0x05
|
||||
#define FT6336U_ADDR_TOUCH1_WEIGHT 0x07
|
||||
#define FT6336U_ADDR_TOUCH1_MISC 0x08
|
||||
|
||||
#define FT6336U_ADDR_TOUCH2_EVENT 0x09
|
||||
#define FT6336U_ADDR_TOUCH2_ID 0x0B
|
||||
#define FT6336U_ADDR_TOUCH2_X 0x09
|
||||
#define FT6336U_ADDR_TOUCH2_Y 0x0B
|
||||
#define FT6336U_ADDR_TOUCH2_WEIGHT 0x0D
|
||||
#define FT6336U_ADDR_TOUCH2_MISC 0x0E
|
||||
|
||||
#define FT6336U_ADDR_THRESHOLD 0x80
|
||||
#define FT6336U_ADDR_FILTER_COE 0x85
|
||||
#define FT6336U_ADDR_CTRL 0x86
|
||||
typedef enum {
|
||||
keep_active_mode = 0,
|
||||
switch_to_monitor_mode = 1,
|
||||
} CTRL_MODE_Enum;
|
||||
#define FT6336U_ADDR_TIME_ENTER_MONITOR 0x87
|
||||
#define FT6336U_ADDR_ACTIVE_MODE_RATE 0x88
|
||||
#define FT6336U_ADDR_MONITOR_MODE_RATE 0x89
|
||||
|
||||
#define FT6336U_ADDR_RADIAN_VALUE 0x91
|
||||
#define FT6336U_ADDR_OFFSET_LEFT_RIGHT 0x92
|
||||
#define FT6336U_ADDR_OFFSET_UP_DOWN 0x93
|
||||
#define FT6336U_ADDR_DISTANCE_LEFT_RIGHT 0x94
|
||||
#define FT6336U_ADDR_DISTANCE_UP_DOWN 0x95
|
||||
#define FT6336U_ADDR_DISTANCE_ZOOM 0x96
|
||||
|
||||
#define FT6336U_ADDR_LIBRARY_VERSION_H 0xA1
|
||||
#define FT6336U_ADDR_LIBRARY_VERSION_L 0xA2
|
||||
#define FT6336U_ADDR_CHIP_ID 0xA3
|
||||
#define FT6336U_ADDR_G_MODE 0xA4
|
||||
typedef enum {
|
||||
pollingMode = 0,
|
||||
triggerMode = 1,
|
||||
} G_MODE_Enum;
|
||||
#define FT6336U_ADDR_POWER_MODE 0xA5
|
||||
#define FT6336U_ADDR_FIRMARE_ID 0xA6
|
||||
#define FT6336U_ADDR_FOCALTECH_ID 0xA8
|
||||
#define FT6336U_ADDR_RELEASE_CODE_ID 0xAF
|
||||
#define FT6336U_ADDR_STATE 0xBC
|
||||
|
||||
// Function Specific Type
|
||||
typedef enum {
|
||||
touch = 0,
|
||||
stream,
|
||||
release,
|
||||
} TouchStatusEnum;
|
||||
typedef struct {
|
||||
TouchStatusEnum status;
|
||||
uint16_t x;
|
||||
uint16_t y;
|
||||
} TouchPointType;
|
||||
typedef struct {
|
||||
uint8_t touch_count;
|
||||
TouchPointType tp[2];
|
||||
} FT6336U_TouchPointType;
|
||||
|
||||
|
||||
// Uncomment to enable debug messages
|
||||
//#define FT6336U_DEBUG
|
||||
|
||||
// Define where debug output will be printed
|
||||
#define DEBUG_PRINTER Serial
|
||||
|
||||
// Setup debug printing macros
|
||||
#ifdef FT6336U_DEBUG
|
||||
#define DEBUG_PRINT(...) \
|
||||
{ \
|
||||
DEBUG_PRINTER.print(__VA_ARGS__); \
|
||||
}
|
||||
#define DEBUG_PRINTLN(...) \
|
||||
{ \
|
||||
DEBUG_PRINTER.println(__VA_ARGS__); \
|
||||
}
|
||||
#else
|
||||
#define DEBUG_PRINT(...) \
|
||||
{ \
|
||||
}
|
||||
#define DEBUG_PRINTLN(...) \
|
||||
{ \
|
||||
}
|
||||
#endif
|
||||
|
||||
/**************************************************************************/
|
||||
/*!
|
||||
@brief FT6336U I2C CTP controller driver
|
||||
*/
|
||||
/**************************************************************************/
|
||||
class FT6336U
|
||||
{
|
||||
public:
|
||||
FT6336U(uint8_t rst_n, uint8_t int_n);
|
||||
#if defined(ESP32) || defined(ESP8266)
|
||||
FT6336U(int8_t sda, int8_t scl, uint8_t rst_n, uint8_t int_n);
|
||||
#endif
|
||||
virtual ~FT6336U();
|
||||
|
||||
void begin(void);
|
||||
|
||||
uint8_t read_device_mode(void);
|
||||
void write_device_mode(DEVICE_MODE_Enum);
|
||||
uint8_t read_gesture_id(void);
|
||||
uint8_t read_td_status(void);
|
||||
uint8_t read_touch_number(void);
|
||||
uint16_t read_touch1_x(void);
|
||||
uint16_t read_touch1_y(void);
|
||||
uint8_t read_touch1_event(void);
|
||||
uint8_t read_touch1_id(void);
|
||||
uint8_t read_touch1_weight(void);
|
||||
uint8_t read_touch1_misc(void);
|
||||
uint16_t read_touch2_x(void);
|
||||
uint16_t read_touch2_y(void);
|
||||
uint8_t read_touch2_event(void);
|
||||
uint8_t read_touch2_id(void);
|
||||
uint8_t read_touch2_weight(void);
|
||||
uint8_t read_touch2_misc(void);
|
||||
|
||||
// Mode Parameter Register
|
||||
uint8_t read_touch_threshold(void);
|
||||
uint8_t read_filter_coefficient(void);
|
||||
uint8_t read_ctrl_mode(void);
|
||||
void write_ctrl_mode(CTRL_MODE_Enum mode);
|
||||
uint8_t read_time_period_enter_monitor(void);
|
||||
uint8_t read_active_rate(void);
|
||||
uint8_t read_monitor_rate(void);
|
||||
|
||||
// Gestrue Parameter Register
|
||||
uint8_t read_radian_value(void);
|
||||
void write_radian_value(uint8_t val);
|
||||
uint8_t read_offset_left_right(void);
|
||||
void write_offset_left_right(uint8_t val);
|
||||
uint8_t read_offset_up_down(void);
|
||||
void write_offset_up_down(uint8_t val);
|
||||
uint8_t read_distance_left_right(void);
|
||||
void write_distance_left_right(uint8_t val);
|
||||
uint8_t read_distance_up_down(void);
|
||||
void write_distance_up_down(uint8_t val);
|
||||
uint8_t read_distance_zoom(void);
|
||||
void write_distance_zoom(uint8_t val);
|
||||
|
||||
// System Information
|
||||
uint16_t read_library_version(void);
|
||||
uint8_t read_chip_id(void);
|
||||
uint8_t read_g_mode(void);
|
||||
void write_g_mode(G_MODE_Enum mode);
|
||||
uint8_t read_pwrmode(void);
|
||||
uint8_t read_firmware_id(void);
|
||||
uint8_t read_focaltech_id(void);
|
||||
uint8_t read_release_code_id(void);
|
||||
uint8_t read_state(void);
|
||||
|
||||
// Scan Function
|
||||
FT6336U_TouchPointType scan(void);
|
||||
|
||||
private:
|
||||
int8_t sda = -1;
|
||||
int8_t scl = -1;
|
||||
uint8_t rst_n = -1;
|
||||
uint8_t int_n = -1;
|
||||
|
||||
uint8_t readByte(uint8_t addr);
|
||||
void writeByte(uint8_t addr, uint8_t data);
|
||||
|
||||
FT6336U_TouchPointType touchPoint;
|
||||
};
|
||||
#endif
|
11
lib/SimpleFTPServer/.project
Normal file
11
lib/SimpleFTPServer/.project
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>SimpleFTPServer</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
</natures>
|
||||
</projectDescription>
|
2358
lib/SimpleFTPServer/FtpServer.cpp
Normal file
2358
lib/SimpleFTPServer/FtpServer.cpp
Normal file
File diff suppressed because it is too large
Load Diff
747
lib/SimpleFTPServer/FtpServer.h
Normal file
747
lib/SimpleFTPServer/FtpServer.h
Normal file
@ -0,0 +1,747 @@
|
||||
/*
|
||||
* FtpServer Arduino, esp8266 and esp32 library for Ftp Server
|
||||
* Derived form Jean-Michel Gallego version
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
*
|
||||
* https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** **
|
||||
** DEFINITIONS FOR FTP SERVER **
|
||||
** **
|
||||
*******************************************************************************/
|
||||
|
||||
#include <FtpServerKey.h>
|
||||
|
||||
#ifndef FTP_SERVER_H
|
||||
#define FTP_SERVER_H
|
||||
|
||||
#define FTP_SERVER_VERSION "2.1.5 (2023-01-13)"
|
||||
|
||||
#include "ArduinoLog.h"
|
||||
|
||||
#if ARDUINO >= 100
|
||||
#include "Arduino.h"
|
||||
#else
|
||||
#include "WProgram.h"
|
||||
#endif
|
||||
|
||||
//
|
||||
//#if(NETWORK_ESP8266_SD == DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266)
|
||||
// #define ESP8266_GT_2_4_2_SD_STORAGE_SELECTED
|
||||
// #define DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266 NETWORK_ESP8266
|
||||
//#endif
|
||||
|
||||
#if !defined(FTP_SERVER_NETWORK_TYPE)
|
||||
// select Network type based
|
||||
#if defined(ESP8266) || defined(ESP31B)
|
||||
#if(NETWORK_ESP8266_242 == DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266)
|
||||
#define ARDUINO_ESP8266_RELEASE_2_4_2
|
||||
|
||||
#define FTP_SERVER_NETWORK_TYPE_SELECTED NETWORK_ESP8266_242
|
||||
|
||||
#define FTP_SERVER_NETWORK_TYPE NETWORK_ESP8266
|
||||
#else
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266
|
||||
#endif
|
||||
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_ESP8266
|
||||
#elif defined(ESP32)
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_ESP32
|
||||
#elif defined(ARDUINO_ARCH_STM32)
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_STM32
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_STM32
|
||||
#elif defined(ARDUINO_ARCH_RP2040)
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_RP2040
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_RP2040
|
||||
#elif defined(ARDUINO_ARCH_SAMD)
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_SAMD
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_SAMD
|
||||
#else
|
||||
#define FTP_SERVER_NETWORK_TYPE DEFAULT_FTP_SERVER_NETWORK_TYPE_ARDUINO
|
||||
#define STORAGE_TYPE DEFAULT_STORAGE_TYPE_ARDUINO
|
||||
// #define STORAGE_SD_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef FTP_SERVER_NETWORK_TYPE_SELECTED
|
||||
#define FTP_SERVER_NETWORK_TYPE_SELECTED FTP_SERVER_NETWORK_TYPE
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(ESP8266) || defined(ESP31B)
|
||||
#ifndef STORAGE_SD_FORCE_DISABLE
|
||||
#define STORAGE_SD_ENABLED
|
||||
#endif
|
||||
#ifndef STORAGE_SPIFFS_FORCE_DISABLE
|
||||
#define STORAGE_SPIFFS_ENABLED
|
||||
#endif
|
||||
#elif defined(ESP32)
|
||||
#ifndef STORAGE_SD_FORCE_DISABLE
|
||||
#define STORAGE_SD_ENABLED
|
||||
#endif
|
||||
#ifndef STORAGE_SPIFFS_FORCE_DISABLE
|
||||
#define STORAGE_SPIFFS_ENABLED
|
||||
#endif
|
||||
#else
|
||||
#ifndef STORAGE_SD_FORCE_DISABLE
|
||||
#define STORAGE_SD_ENABLED
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// Includes and defined based on Network Type
|
||||
#if(FTP_SERVER_NETWORK_TYPE == NETWORK_ESP8266_ASYNC)
|
||||
|
||||
// Note:
|
||||
// No SSL/WSS support for client in Async mode
|
||||
// TLS lib need a sync interface!
|
||||
|
||||
#if defined(ESP8266)
|
||||
#include <ESP8266WiFi.h>
|
||||
//#include <WiFiClientSecure.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiClientSecure
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
|
||||
#elif defined(ESP32)
|
||||
#include <WiFi.h>
|
||||
//#include <WiFiClientSecure.h>
|
||||
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiClientSecure
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#elif defined(ESP31B)
|
||||
#include <ESP31BWiFi.h>
|
||||
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiClientSecure
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#else
|
||||
#error "network type ESP8266 ASYNC only possible on the ESP mcu!"
|
||||
#endif
|
||||
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_ESP8266 || FTP_SERVER_NETWORK_TYPE == NETWORK_ESP8266_242)
|
||||
|
||||
#if !defined(ESP8266) && !defined(ESP31B)
|
||||
#error "network type ESP8266 only possible on the ESP mcu!"
|
||||
#endif
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <ESP8266WiFi.h>
|
||||
#else
|
||||
#include <ESP31BWiFi.h>
|
||||
#endif
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiClientSecure
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#define NET_CLASS WiFi
|
||||
// #define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_W5100 || FTP_SERVER_NETWORK_TYPE == NETWORK_ETHERNET_ENC)
|
||||
|
||||
#include <Ethernet.h>
|
||||
#include <SPI.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS EthernetClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS EthernetServer
|
||||
#define NET_CLASS Ethernet
|
||||
|
||||
// #if defined(ESP8266) || defined(ESP32)
|
||||
// #define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
|
||||
// #else
|
||||
// #define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
// #endif
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_ENC28J60 || FTP_SERVER_NETWORK_TYPE == NETWORK_UIPETHERNET)
|
||||
|
||||
#include <UIPEthernet.h>
|
||||
|
||||
#define FTP_CLIENT_NETWORK_CLASS UIPClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS UIPServer
|
||||
#define NET_CLASS Ethernet
|
||||
// #if define(ESP8266) || define(ESP32)
|
||||
// #define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
|
||||
// #else
|
||||
// #define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
// #endif
|
||||
#elif(EMAIL_NETWORK_TYPE == NETWORK_ETHERNET_LARGE)
|
||||
|
||||
#include <EthernetLarge.h>
|
||||
#include <SPI.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS EthernetClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS EthernetServer
|
||||
#define NET_CLASS Ethernet
|
||||
|
||||
#elif(EMAIL_NETWORK_TYPE == NETWORK_ETHERNET_STM)
|
||||
|
||||
#include <Ethernet_STM.h>
|
||||
#include <SPI.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS EthernetClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS EthernetServer
|
||||
#define NET_CLASS Ethernet
|
||||
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_ESP32)
|
||||
|
||||
#include <WiFi.h>
|
||||
//#include <WiFiClientSecure.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiClientSecure
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#define NET_CLASS WiFi
|
||||
// #define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_ESP32_ETH)
|
||||
|
||||
#include <ETH.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#define NET_CLASS Ethernet
|
||||
// #define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_WiFiNINA)
|
||||
|
||||
#include <WiFiNINA.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiSSLClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#define NET_CLASS WiFi
|
||||
// #define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
#elif(FTP_SERVER_NETWORK_TYPE == NETWORK_SEEED_RTL8720DN)
|
||||
|
||||
#include <rpcWiFi.h>
|
||||
#define FTP_CLIENT_NETWORK_CLASS WiFiClient
|
||||
//#define FTP_CLIENT_NETWORK_SSL_CLASS WiFiSSLClient
|
||||
#define FTP_SERVER_NETWORK_SERVER_CLASS WiFiServer
|
||||
#define NET_CLASS WiFi
|
||||
// #define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
// #define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
#else
|
||||
#error "no network type selected!"
|
||||
#endif
|
||||
|
||||
#if defined(ESP8266) || defined(ESP32) || defined(ARDUINO_ARCH_RP2040)
|
||||
#define CommandIs( a ) (command != NULL && ! strcmp_P( command, PSTR( a )))
|
||||
#define ParameterIs( a ) ( parameter != NULL && ! strcmp_P( parameter, PSTR( a )))
|
||||
#else
|
||||
#define CommandIs( a ) ( ! strcmp_PF( command, PSTR( a )))
|
||||
#define ParameterIs( a ) ( ! strcmp_PF( parameter, PSTR( a )))
|
||||
#endif
|
||||
|
||||
#if(STORAGE_TYPE == STORAGE_SPIFFS)
|
||||
#if defined(ESP32)
|
||||
// #define FS_NO_GLOBALS
|
||||
#include <SPIFFS.h>
|
||||
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
#else
|
||||
#ifdef ARDUINO_ESP8266_RELEASE_2_4_2
|
||||
#define FS_NO_GLOBALS
|
||||
#include "FS.h"
|
||||
#define FTP_FILE fs::File
|
||||
#define FTP_DIR fs::Dir
|
||||
#else
|
||||
#include "FS.h"
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR Dir
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#if ESP8266
|
||||
#define FTP_FILE_READ "r"
|
||||
#define FTP_FILE_READ_ONLY "r"
|
||||
#define FTP_FILE_READ_WRITE "w+"
|
||||
#define FTP_FILE_WRITE_APPEND "a+"
|
||||
#define FTP_FILE_WRITE_CREATE "w+"
|
||||
#else
|
||||
#define FTP_FILE_READ "r"
|
||||
#define FTP_FILE_READ_ONLY "r"
|
||||
#define FTP_FILE_READ_WRITE "w"
|
||||
#define FTP_FILE_WRITE_APPEND "a"
|
||||
#define FTP_FILE_WRITE_CREATE "w"
|
||||
#endif
|
||||
|
||||
#define STORAGE_MANAGER SPIFFS
|
||||
|
||||
#define FILENAME_LENGTH 32
|
||||
#elif(STORAGE_TYPE == STORAGE_FFAT)
|
||||
#include "FS.h"
|
||||
#include "FFat.h"
|
||||
|
||||
#define STORAGE_MANAGER FFat
|
||||
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
|
||||
#define FTP_FILE_READ "r"
|
||||
#define FTP_FILE_READ_ONLY "r"
|
||||
#define FTP_FILE_READ_WRITE "w"
|
||||
#define FTP_FILE_WRITE_APPEND "a"
|
||||
#define FTP_FILE_WRITE_CREATE "w"
|
||||
|
||||
#define FILENAME_LENGTH 255
|
||||
#elif(STORAGE_TYPE == STORAGE_LITTLEFS)
|
||||
#if ESP8266 || ARDUINO_ARCH_RP2040
|
||||
#include "LittleFS.h"
|
||||
#define STORAGE_MANAGER LittleFS
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR Dir
|
||||
|
||||
#define FTP_FILE_READ "r"
|
||||
#define FTP_FILE_READ_ONLY "r"
|
||||
#define FTP_FILE_READ_WRITE "w+"
|
||||
#define FTP_FILE_WRITE_APPEND "a+"
|
||||
#define FTP_FILE_WRITE_CREATE "w+"
|
||||
#else
|
||||
#ifdef ESP32
|
||||
#if ESP_ARDUINO_VERSION_MAJOR >= 2
|
||||
#include "FS.h"
|
||||
#include "LittleFS.h"
|
||||
#define STORAGE_MANAGER LittleFS
|
||||
#else
|
||||
#include "LITTLEFS.h"
|
||||
#define STORAGE_MANAGER LITTLEFS
|
||||
#endif
|
||||
#else
|
||||
#include "LittleFS.h"
|
||||
#define STORAGE_MANAGER LittleFS
|
||||
#endif
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
|
||||
#define FTP_FILE_READ "r"
|
||||
#define FTP_FILE_READ_ONLY "r"
|
||||
#define FTP_FILE_READ_WRITE "w"
|
||||
#define FTP_FILE_WRITE_APPEND "a"
|
||||
#define FTP_FILE_WRITE_CREATE "w"
|
||||
#endif
|
||||
#define FILENAME_LENGTH 128
|
||||
#elif(STORAGE_TYPE == STORAGE_SD)
|
||||
#include <SPI.h>
|
||||
#include <SD.h>
|
||||
|
||||
#define STORAGE_MANAGER SD
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
|
||||
#define FTP_FILE_READ FILE_READ
|
||||
#define FTP_FILE_READ_ONLY FILE_READ
|
||||
#ifdef ESP32
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_APPEND
|
||||
#else
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_WRITE
|
||||
#endif
|
||||
#define FTP_FILE_WRITE_CREATE FILE_WRITE
|
||||
|
||||
#define FILENAME_LENGTH 255
|
||||
#elif(STORAGE_TYPE == STORAGE_SD_MMC)
|
||||
#include <SPI.h>
|
||||
#include <SD_MMC.h>
|
||||
|
||||
#define STORAGE_MANAGER SD_MMC
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
|
||||
#define FTP_FILE_READ FILE_READ
|
||||
#define FTP_FILE_READ_ONLY FILE_READ
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#ifdef ESP32
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_APPEND
|
||||
#else
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_WRITE
|
||||
#endif
|
||||
#define FTP_FILE_WRITE_CREATE FILE_WRITE
|
||||
|
||||
#define FILENAME_LENGTH 255
|
||||
#elif(STORAGE_TYPE == STORAGE_SEEED_SD)
|
||||
#include <Seeed_FS.h>
|
||||
#define STORAGE_MANAGER SD
|
||||
|
||||
#include "SD/Seeed_SD.h"
|
||||
|
||||
|
||||
|
||||
// #define STORAGE_MANAGER SPIFLASH
|
||||
// #include "SFUD/Seeed_SFUD.h"
|
||||
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
|
||||
#define FTP_FILE_READ FILE_READ
|
||||
#define FTP_FILE_READ_ONLY FILE_READ
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_APPEND
|
||||
#define FTP_FILE_WRITE_CREATE FILE_WRITE
|
||||
|
||||
#define FILENAME_LENGTH 255
|
||||
|
||||
#elif (STORAGE_TYPE == STORAGE_SDFAT1)
|
||||
#include <SdFat.h>
|
||||
#include <sdios.h>
|
||||
|
||||
#define STORAGE_MANAGER sd
|
||||
#define FTP_FILE SdFile
|
||||
#define FTP_DIR SdFile
|
||||
extern SdFat STORAGE_MANAGER;
|
||||
|
||||
#define FTP_FILE_READ O_READ
|
||||
#define FTP_FILE_READ_ONLY O_RDONLY
|
||||
#define FTP_FILE_READ_WRITE O_RDWR
|
||||
#define FTP_FILE_WRITE_APPEND O_WRITE | O_APPEND
|
||||
#define FTP_FILE_WRITE_CREATE O_WRITE | O_CREAT
|
||||
#define FILENAME_LENGTH 255
|
||||
|
||||
#elif (STORAGE_TYPE == STORAGE_SDFAT2)
|
||||
#include <SdFat.h>
|
||||
#include <sdios.h>
|
||||
|
||||
#define STORAGE_MANAGER sd
|
||||
#define FTP_FILE FsFile
|
||||
#define FTP_DIR FsFile
|
||||
extern SdFat STORAGE_MANAGER;
|
||||
|
||||
#define FTP_FILE_READ O_READ
|
||||
#define FTP_FILE_READ_ONLY O_RDONLY
|
||||
#define FTP_FILE_READ_WRITE O_RDWR
|
||||
#define FTP_FILE_WRITE_APPEND O_WRITE | O_APPEND
|
||||
#define FTP_FILE_WRITE_CREATE O_WRITE | O_CREAT
|
||||
#define FILENAME_LENGTH 255
|
||||
#elif (STORAGE_TYPE == STORAGE_SPIFM)
|
||||
#include <SdFat.h>
|
||||
#include <Adafruit_SPIFlash.h>
|
||||
#include <sdios.h>
|
||||
|
||||
#define STORAGE_MANAGER fatfs
|
||||
#define FTP_FILE File
|
||||
#define FTP_DIR File
|
||||
extern FatFileSystem STORAGE_MANAGER;
|
||||
extern Adafruit_SPIFlash flash;
|
||||
#define FTP_FILE_READ FILE_READ
|
||||
#define FTP_FILE_READ_ONLY FILE_READ
|
||||
#define FTP_FILE_READ_WRITE FILE_WRITE
|
||||
#define FTP_FILE_WRITE_APPEND FILE_WRITE
|
||||
#define FTP_FILE_WRITE_CREATE FILE_WRITE
|
||||
#define FILENAME_LENGTH 255
|
||||
#elif (STORAGE_TYPE == STORAGE_FATFS)
|
||||
#include <FatFs.h>
|
||||
#include <sdios.h>
|
||||
|
||||
#define STORAGE_MANAGER sdff
|
||||
#define FTP_FILE FileFs
|
||||
#define FTP_DIR DirFs
|
||||
extern FatFsClass STORAGE_MANAGER;
|
||||
#define O_READ FA_READ
|
||||
#define O_WRITE FA_WRITE
|
||||
#define O_RDWR FA_READ | FA_WRITE
|
||||
#define O_CREAT FA_CREATE_ALWAYS
|
||||
#define O_APPEND FA_OPEN_APPEND
|
||||
|
||||
#define FTP_FILE_READ O_READ
|
||||
#define FTP_FILE_READ_ONLY O_RDONLY
|
||||
#define FTP_FILE_READ_WRITE O_RDWR
|
||||
#define FTP_FILE_WRITE_APPEND O_WRITE | O_APPEND
|
||||
#define FTP_FILE_WRITE_CREATE O_WRITE | O_CREAT
|
||||
#define FILENAME_LENGTH 255
|
||||
#endif
|
||||
|
||||
//#ifdef FTP_CLIENT_NETWORK_SSL_CLASS
|
||||
//#define FTP_CLIENT_NETWORK_CLASS FTP_CLIENT_NETWORK_SSL_CLASS
|
||||
//#endif
|
||||
|
||||
#define OPEN_CLOSE_SPIFFS
|
||||
#define OPEN_CLOSE_SD
|
||||
|
||||
// Setup debug printing macros.
|
||||
#ifdef FTP_SERVER_DEBUG
|
||||
// #define DEBUG_PRINT(...) { DEBUG_PRINTER.print(__VA_ARGS__); }
|
||||
// #define DEBUG_PRINTLN(...) { DEBUG_PRINTER.println(__VA_ARGS__); }
|
||||
#define DEBUG_PRINT(...) { Log.verbose(68 /* FTP_TAG */, __VA_ARGS__); }
|
||||
#define DEBUG_PRINTLN(...) { Log.verbose(68 /* FTP_TAG */, __VA_ARGS__); }
|
||||
#else
|
||||
#define DEBUG_PRINT(...) {}
|
||||
#define DEBUG_PRINTLN(...) {}
|
||||
#endif
|
||||
|
||||
#define FTP_CMD_PORT 21 // Command port on wich server is listening
|
||||
#define FTP_DATA_PORT_DFLT 20 // Default data port in active mode
|
||||
#define FTP_DATA_PORT_PASV 50009 // Data port in passive mode
|
||||
|
||||
#define FF_MAX_LFN 255 // max size of a long file name
|
||||
#define FTP_CMD_SIZE FF_MAX_LFN+8 // max size of a command
|
||||
#define FTP_CWD_SIZE FF_MAX_LFN+8 // max size of a directory name
|
||||
#define FTP_FIL_SIZE FF_MAX_LFN // max size of a file name
|
||||
#define FTP_CRED_SIZE 255 // max size of username and password
|
||||
#define FTP_NULLIP() IPAddress(0,0,0,0)
|
||||
|
||||
enum ftpCmd { FTP_Stop = 0, // In this stage, stop any connection
|
||||
FTP_Init, // initialize some variables
|
||||
FTP_Client, // wait for client connection
|
||||
FTP_User, // wait for user name
|
||||
FTP_Pass, // wait for user password
|
||||
FTP_Cmd }; // answers to commands
|
||||
|
||||
enum ftpTransfer { FTP_Close = 0, // In this stage, close data channel
|
||||
FTP_Retrieve, // retrieve file
|
||||
FTP_Store, // store file
|
||||
FTP_List, // list of files
|
||||
FTP_Nlst, // list of name of files
|
||||
FTP_Mlsd }; // listing for machine processing
|
||||
|
||||
enum ftpDataConn { FTP_NoConn = 0,// No data connexion
|
||||
FTP_Pasive, // Pasive type
|
||||
FTP_Active }; // Active type
|
||||
|
||||
enum FtpOperation {
|
||||
FTP_CONNECT,
|
||||
FTP_DISCONNECT,
|
||||
FTP_FREE_SPACE_CHANGE
|
||||
};
|
||||
|
||||
enum FtpTransferOperation {
|
||||
FTP_UPLOAD_START = 0,
|
||||
FTP_UPLOAD = 1,
|
||||
|
||||
FTP_DOWNLOAD_START = 2,
|
||||
FTP_DOWNLOAD = 3,
|
||||
|
||||
|
||||
FTP_TRANSFER_STOP = 4,
|
||||
FTP_DOWNLOAD_STOP = 4,
|
||||
FTP_UPLOAD_STOP = 4,
|
||||
|
||||
FTP_TRANSFER_ERROR = 5,
|
||||
FTP_DOWNLOAD_ERROR = 5,
|
||||
FTP_UPLOAD_ERROR = 5
|
||||
};
|
||||
|
||||
class FtpServer
|
||||
{
|
||||
public:
|
||||
FtpServer( uint16_t _cmdPort = FTP_CMD_PORT, uint16_t _pasvPort = FTP_DATA_PORT_PASV );
|
||||
|
||||
void begin( const char * _user, const char * _pass, const char * welcomeMessage = "Welcome to Simply FTP server" );
|
||||
void begin( const char * welcomeMessage = "Welcome to Simply FTP server" );
|
||||
|
||||
void end();
|
||||
void setLocalIp(IPAddress localIp);
|
||||
void credentials( const char * _user, const char * _pass );
|
||||
uint8_t handleFTP();
|
||||
|
||||
void setCallback(void (*_callbackParam)(FtpOperation ftpOperation, unsigned int freeSpace, unsigned int totalSpace) )
|
||||
{
|
||||
_callback = _callbackParam;
|
||||
}
|
||||
|
||||
void setTransferCallback(void (*_transferCallbackParam)(FtpTransferOperation ftpOperation, const char* name, unsigned int transferredSize) )
|
||||
{
|
||||
_transferCallback = _transferCallbackParam;
|
||||
}
|
||||
|
||||
private:
|
||||
void (*_callback)(FtpOperation ftpOperation, unsigned int freeSpace, unsigned int totalSpace){};
|
||||
void (*_transferCallback)(FtpTransferOperation ftpOperation, const char* name, unsigned int transferredSize){};
|
||||
|
||||
void iniVariables();
|
||||
void clientConnected();
|
||||
void disconnectClient();
|
||||
bool processCommand();
|
||||
bool haveParameter();
|
||||
int dataConnect( bool out150 = true );
|
||||
bool dataConnected();
|
||||
bool doRetrieve();
|
||||
bool doStore();
|
||||
bool doList();
|
||||
bool doMlsd();
|
||||
void closeTransfer();
|
||||
void abortTransfer();
|
||||
bool makePath( char * fullName, char * param = NULL );
|
||||
bool makeExistsPath( char * path, char * param = NULL );
|
||||
bool openDir( FTP_DIR * pdir );
|
||||
bool isDir( char * path );
|
||||
uint8_t getDateTime( char * dt, uint16_t * pyear, uint8_t * pmonth, uint8_t * pday,
|
||||
uint8_t * phour, uint8_t * pminute, uint8_t * second );
|
||||
char * makeDateTimeStr( char * tstr, uint16_t date, uint16_t time );
|
||||
bool timeStamp( char * path, uint16_t year, uint8_t month, uint8_t day,
|
||||
uint8_t hour, uint8_t minute, uint8_t second );
|
||||
bool getFileModTime( char * path, uint16_t * pdate, uint16_t * ptime );
|
||||
#if STORAGE_TYPE != STORAGE_FATFS
|
||||
bool getFileModTime( uint16_t * pdate, uint16_t * ptime );
|
||||
#endif
|
||||
int8_t readChar();
|
||||
|
||||
const char* getFileName(FTP_FILE *file){
|
||||
#if STORAGE_TYPE <= STORAGE_SDFAT2
|
||||
int max_characters = 100;
|
||||
char f_name[max_characters];
|
||||
file->getName(f_name, max_characters);
|
||||
String filename = String(f_name);
|
||||
return filename.c_str();
|
||||
#elif STORAGE_TYPE == STORAGE_FATFS
|
||||
return file->fileName();
|
||||
#else
|
||||
return file->name();
|
||||
#endif
|
||||
}
|
||||
bool exists( const char * path ) {
|
||||
#if STORAGE_TYPE == STORAGE_SPIFFS || (STORAGE_TYPE == STORAGE_SD && FTP_SERVER_NETWORK_TYPE == NETWORK_ESP8266_242)
|
||||
if (strcmp(path, "/") == 0) return true;
|
||||
#endif
|
||||
#if STORAGE_TYPE == STORAGE_FFAT || (STORAGE_TYPE == STORAGE_LITTLEFS && defined(ESP32))
|
||||
FTP_DIR f = STORAGE_MANAGER.open(path, "r");
|
||||
return (f == true);
|
||||
#else
|
||||
return STORAGE_MANAGER.exists( path );
|
||||
#endif
|
||||
};
|
||||
bool remove( const char * path ) { return STORAGE_MANAGER.remove( path ); };
|
||||
#if STORAGE_TYPE == STORAGE_SPIFFS
|
||||
bool makeDir( const char * path ) { return false; };
|
||||
bool removeDir( const char * path ) { return false; };
|
||||
#else
|
||||
bool makeDir( const char * path ) { return STORAGE_MANAGER.mkdir( path ); };
|
||||
bool removeDir( const char * path ) { return STORAGE_MANAGER.rmdir( path ); };
|
||||
#endif
|
||||
|
||||
#if STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC
|
||||
bool rename( const char * path, const char * newpath );
|
||||
#else
|
||||
bool rename( const char * path, const char * newpath ) { return STORAGE_MANAGER.rename( path, newpath ); };
|
||||
#endif
|
||||
#if (STORAGE_TYPE == STORAGE_SEEED_SD)
|
||||
bool openFile( char path[ FTP_CWD_SIZE ], int readTypeInt );
|
||||
#elif (STORAGE_TYPE == STORAGE_SD && defined(ESP8266))// FTP_SERVER_NETWORK_TYPE_SELECTED == NETWORK_ESP8266_242)
|
||||
bool openFile( char path[ FTP_CWD_SIZE ], int readTypeInt );
|
||||
#elif (STORAGE_TYPE == STORAGE_SPIFFS || STORAGE_TYPE == STORAGE_LITTLEFS || STORAGE_TYPE == STORAGE_FFAT )
|
||||
bool openFile( const char * path, const char * readType );
|
||||
// bool openFile( char path[ FTP_CWD_SIZE ], int readTypeInt );
|
||||
#elif STORAGE_TYPE <= STORAGE_SDFAT2 || STORAGE_TYPE == STORAGE_SPIFM || (STORAGE_TYPE == STORAGE_SD && ARDUINO_ARCH_SAMD)
|
||||
bool openFile( char path[ FTP_CWD_SIZE ], int readTypeInt );
|
||||
#else
|
||||
bool openFile( char path[ FTP_CWD_SIZE ], const char * readType );
|
||||
bool openFile( const char * path, const char * readType );
|
||||
// bool openFile( char path[ FTP_CWD_SIZE ], int readTypeInt );
|
||||
#endif
|
||||
// bool openFile( char path[ FTP_CWD_SIZE ], const char * readType );
|
||||
// bool openFile( const char * path, const char * readType );
|
||||
uint32_t fileSize( FTP_FILE file );
|
||||
|
||||
#if STORAGE_TYPE == STORAGE_SPIFFS || STORAGE_TYPE == STORAGE_LITTLEFS
|
||||
#if ESP8266 || ARDUINO_ARCH_RP2040
|
||||
uint32_t capacity() {
|
||||
FSInfo fi;
|
||||
STORAGE_MANAGER.info(fi);
|
||||
|
||||
return fi.totalBytes >> 1;
|
||||
};
|
||||
uint32_t free() {
|
||||
FSInfo fi;
|
||||
STORAGE_MANAGER.info(fi);
|
||||
|
||||
return (fi.totalBytes - fi.usedBytes) >> 1;
|
||||
};
|
||||
#else
|
||||
uint32_t capacity() {
|
||||
return STORAGE_MANAGER.totalBytes() >> 1;
|
||||
};
|
||||
uint32_t free() {
|
||||
return (STORAGE_MANAGER.totalBytes() -
|
||||
STORAGE_MANAGER.usedBytes()) >> 1;
|
||||
};
|
||||
#endif
|
||||
#elif STORAGE_TYPE == STORAGE_SD || STORAGE_TYPE == STORAGE_SD_MMC
|
||||
uint32_t capacity() { return true; };
|
||||
uint32_t free() { return true; };
|
||||
#elif STORAGE_TYPE == STORAGE_SEEED_SD
|
||||
uint32_t capacity() {
|
||||
return STORAGE_MANAGER.totalBytes() >> 1;
|
||||
};
|
||||
uint32_t free() {
|
||||
return (STORAGE_MANAGER.totalBytes() -
|
||||
STORAGE_MANAGER.usedBytes()) >> 1;
|
||||
};
|
||||
#elif STORAGE_TYPE == STORAGE_SDFAT1
|
||||
uint32_t capacity() { return STORAGE_MANAGER.card()->cardSize() >> 1; };
|
||||
uint32_t free() { return STORAGE_MANAGER.vol()->freeClusterCount() *
|
||||
STORAGE_MANAGER.vol()->sectorsPerCluster() >> 1; };
|
||||
#elif STORAGE_TYPE == STORAGE_SDFAT2
|
||||
uint32_t capacity() { return STORAGE_MANAGER.card()->sectorCount() >> 1; };
|
||||
uint32_t free() { return STORAGE_MANAGER.vol()->freeClusterCount() *
|
||||
STORAGE_MANAGER.vol()->sectorsPerCluster() >> 1; };
|
||||
#elif STORAGE_TYPE == STORAGE_SPIFM
|
||||
uint32_t capacity() { return flash.size() >> 10; };
|
||||
uint32_t free() { return 0; }; // TODO //
|
||||
#elif STORAGE_TYPE == STORAGE_FATFS
|
||||
uint32_t capacity() { return STORAGE_MANAGER.capacity(); };
|
||||
uint32_t free() { return STORAGE_MANAGER.free(); };
|
||||
#elif STORAGE_TYPE == STORAGE_FFAT
|
||||
uint32_t capacity() { return STORAGE_MANAGER.totalBytes(); };
|
||||
uint32_t free() { return STORAGE_MANAGER.freeBytes(); };
|
||||
#endif
|
||||
bool legalChar( char c ) // Return true if char c is allowed in a long file name
|
||||
{
|
||||
if( c == '"' || c == '*' || c == '?' || c == ':' ||
|
||||
c == '<' || c == '>' || c == '|' )
|
||||
return false;
|
||||
#if STORAGE_TYPE == STORAGE_FATFS
|
||||
return 0x1f < c && c < 0xff;
|
||||
#else
|
||||
return 0x1f < c && c < 0x7f;
|
||||
#endif
|
||||
}
|
||||
|
||||
IPAddress localIp; // IP address of server as seen by clients
|
||||
IPAddress dataIp; // IP address of client for data
|
||||
FTP_SERVER_NETWORK_SERVER_CLASS ftpServer;
|
||||
FTP_SERVER_NETWORK_SERVER_CLASS dataServer;
|
||||
|
||||
|
||||
FTP_CLIENT_NETWORK_CLASS client;
|
||||
FTP_CLIENT_NETWORK_CLASS data;
|
||||
|
||||
FTP_FILE file;
|
||||
FTP_DIR dir;
|
||||
|
||||
ftpCmd cmdStage; // stage of ftp command connexion
|
||||
ftpTransfer transferStage; // stage of data connexion
|
||||
ftpDataConn dataConn; // type of data connexion
|
||||
|
||||
bool anonymousConnection = false;
|
||||
|
||||
uint8_t __attribute__((aligned(4))) // need to be aligned to 32bit for Esp8266 SPIClass::transferBytes()
|
||||
buf[ FTP_BUF_SIZE ]; // data buffer for transfers
|
||||
char cmdLine[ FTP_CMD_SIZE ]; // where to store incoming char from client
|
||||
char cwdName[ FTP_CWD_SIZE ]; // name of current directory
|
||||
char rnfrName[ FTP_CWD_SIZE ]; // name of file for RNFR command
|
||||
const char * user; // user name
|
||||
const char * pass; // password
|
||||
char command[ 5 ]; // command sent by client
|
||||
bool rnfrCmd; // previous command was RNFR
|
||||
char * parameter; // point to begin of parameters sent by client
|
||||
const char * welcomeMessage;
|
||||
uint16_t cmdPort,
|
||||
pasvPort,
|
||||
dataPort;
|
||||
uint16_t iCL; // pointer to cmdLine next incoming char
|
||||
uint16_t nbMatch;
|
||||
|
||||
uint32_t millisDelay, //
|
||||
millisEndConnection, //
|
||||
millisBeginTrans, // store time of beginning of a transaction
|
||||
bytesTransfered; //
|
||||
};
|
||||
|
||||
#endif // FTP_SERVER_H
|
106
lib/SimpleFTPServer/FtpServerKey.h
Normal file
106
lib/SimpleFTPServer/FtpServerKey.h
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* FtpServer Arduino, esp8266 and esp32 library for Ftp Server
|
||||
* Derived form Jean-Michel Gallego version
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
*
|
||||
* https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32
|
||||
*
|
||||
*/
|
||||
|
||||
/*******************************************************************************
|
||||
** **
|
||||
** SETTINGS FOR FTP SERVER **
|
||||
** **
|
||||
*******************************************************************************/
|
||||
|
||||
#ifndef FTP_SERVER_CONFIG_H
|
||||
#define FTP_SERVER_CONFIG_H
|
||||
|
||||
// Uncomment to enable printing out nice debug messages.
|
||||
// #define FTP_SERVER_DEBUG
|
||||
|
||||
// Define where debug output will be printed.
|
||||
#define DEBUG_PRINTER Serial
|
||||
|
||||
#define STORAGE_SDFAT1 1 // Library SdFat version 1.4.x
|
||||
#define STORAGE_SDFAT2 2 // Library SdFat version >= 2.0.2
|
||||
#define STORAGE_SPIFM 3 // Libraries Adafruit_SPIFlash and SdFat-Adafruit-Fork
|
||||
#define STORAGE_FATFS 4 // Library FatFs
|
||||
#define STORAGE_SD 5 // Standard SD library (suitable for Arduino esp8266 and esp32
|
||||
#define STORAGE_SPIFFS 6 // SPIFFS
|
||||
#define STORAGE_LITTLEFS 7 // LITTLEFS
|
||||
#define STORAGE_SEEED_SD 8 // Seeed_SD library
|
||||
#define STORAGE_FFAT 9 // ESP32 FFAT
|
||||
#define STORAGE_SD_MMC 10 // SD_MMC library
|
||||
|
||||
#define NETWORK_ESP8266_ASYNC (1)
|
||||
#define NETWORK_ESP8266 (2) // Standard ESP8266WiFi
|
||||
#define NETWORK_ESP8266_242 (3) // ESP8266WiFi before 2.4.2 core
|
||||
#define NETWORK_W5100 (4) // Standard Arduino Ethernet library
|
||||
#define NETWORK_ENC28J60 (5) // UIPEthernet library
|
||||
#define NETWORK_ESP32 (6) // Standard WiFi library
|
||||
#define NETWORK_RP2040_WIFI (6) // Raspberry Pi Pico W standard WiFi library
|
||||
#define NETWORK_ESP32_ETH (7) // Standard ETH library
|
||||
#define NETWORK_WiFiNINA (8) // Standard WiFiNINA library
|
||||
#define NETWORK_SEEED_RTL8720DN (9) // Standard SEED WiFi library
|
||||
#define NETWORK_ETHERNET_LARGE (10)
|
||||
#define NETWORK_ETHERNET_ENC (11) // EthernetENC library (evolution of UIPEthernet
|
||||
#define NETWORK_ETHERNET_STM (12)
|
||||
#define NETWORK_UIPETHERNET (13) // UIPEthernet library same of NETWORK_ENC28J60
|
||||
|
||||
// esp8266 configuration
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP8266 NETWORK_ESP8266
|
||||
#define DEFAULT_STORAGE_TYPE_ESP8266 STORAGE_LITTLEFS
|
||||
#endif
|
||||
// esp32 configuration
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_ESP32 NETWORK_ESP32
|
||||
#define DEFAULT_STORAGE_TYPE_ESP32 STORAGE_FFAT
|
||||
#endif
|
||||
// Standard AVR Arduino configuration
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ARDUINO
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_ARDUINO NETWORK_W5100
|
||||
#define DEFAULT_STORAGE_TYPE_ARDUINO STORAGE_SD
|
||||
#endif
|
||||
// STM32 configuration
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_STM32
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_STM32 NETWORK_W5100
|
||||
#define DEFAULT_STORAGE_TYPE_STM32 STORAGE_SDFAT2
|
||||
#endif
|
||||
// Raspberry Pi Pico (rp2040) configuration
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_RP2040
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_RP2040 NETWORK_RP2040_WIFI
|
||||
#define DEFAULT_STORAGE_TYPE_RP2040 STORAGE_LITTLEFS
|
||||
#endif
|
||||
|
||||
// Arduino SAMD21 like Arduino MKR Nano 33 IoT or Wio Terminal
|
||||
#ifndef DEFAULT_FTP_SERVER_NETWORK_TYPE_ARDUINO_SAMD
|
||||
// Wio Terminal
|
||||
// #define DEFAULT_FTP_SERVER_NETWORK_TYPE_SAMD NETWORK_SEEED_RTL8720DN
|
||||
// #define DEFAULT_STORAGE_TYPE_SAMD STORAGE_SEEED_SD
|
||||
|
||||
// Arduino SAMD
|
||||
#define DEFAULT_FTP_SERVER_NETWORK_TYPE_SAMD NETWORK_WiFiNINA
|
||||
#define DEFAULT_STORAGE_TYPE_SAMD STORAGE_SD
|
||||
#endif
|
||||
|
||||
#define UTF8_SUPPORT
|
||||
|
||||
//#define SD_CS_PIN 4
|
||||
// Disconnect client after 5 minutes of inactivity (expressed in seconds)
|
||||
#define FTP_TIME_OUT 5 * 60
|
||||
|
||||
|
||||
// Wait for authentication for 10 seconds (expressed in seconds)
|
||||
#define FTP_AUTH_TIME_OUT 10
|
||||
|
||||
|
||||
// Size of file buffer for read/write
|
||||
// Transfer speed depends of this value
|
||||
// Best value depends on many factors: SD card, client side OS, ...
|
||||
// But it can be reduced to 512 if memory usage is critical.
|
||||
#define FTP_BUF_SIZE 1024 //2048 //1024 // 512
|
||||
|
||||
#endif // FTP_SERVER_CONFIG_H
|
24
lib/SimpleFTPServer/LICENSE.md
Normal file
24
lib/SimpleFTPServer/LICENSE.md
Normal file
@ -0,0 +1,24 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2017 Renzo Mischianti www.mischianti.org All right reserved.
|
||||
|
||||
You may copy, alter and reuse this code in any way you like, but please leave
|
||||
reference to www.mischianti.org in your comments if you redistribute this code.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
107
lib/SimpleFTPServer/README.md
Normal file
107
lib/SimpleFTPServer/README.md
Normal file
@ -0,0 +1,107 @@
|
||||
# SimpleFTPServer
|
||||
|
||||
[Instruction on FTP server on esp8266 and esp32](https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32)
|
||||
[Simple FTP Server library now with support for Wio Terminal and SD](https://www.mischianti.org/2021/07/01/simple-ftp-server-library-now-with-support-for-wio-terminal-and-sd/)
|
||||
|
||||
#### Simple FTP Server for
|
||||
- Raspberry Pi Pico W (Flash: LittleFS) (To test SD and SdFat)
|
||||
- esp8266 (Flash: SPIFFs, LittleFS. SD: SD, SdFat 2)
|
||||
- esp32 (SPIFFS, LITTLEFS, FFAT, SD: SD, SdFat)
|
||||
- stm32 (SdFat, SPI flash)
|
||||
- Arduino (SD with 8.3 file format, SD: SD, SdFat 2)
|
||||
- Wio Terminal (SdFat 2, Seed SD, and native FAT)
|
||||
|
||||
#### Changelog
|
||||
- 2022-01-13 2.1.5 Fix SPIFM external SPI Flash date management (add SPIFM esp32 example)
|
||||
- 2022-09-21 2.1.4 Add support for Raspberry Pi Pico W and rp2040 boards, Fix SD card config
|
||||
- 2022-09-20 2.1.3 Soft AP IP management, more disconnect event and SD_MCC
|
||||
- 2022-05-21 2.1.2 Fix SD path (#19)
|
||||
- 2022-05-21 2.1.1 Minor fix
|
||||
- 2022-03-30 2.1.0 Add UTF8 support and enabled It by default (Thanks to @plaber)
|
||||
- 2022-03-30 2.0.0 Complete support for STM32 with SD and SPI Flash minor bux fix and HELP command support
|
||||
- 2022-03-17 1.3.0 Fix enc28j60 and w5500 support and restructuring for local settings
|
||||
- 2022-02-25 1.2.1 Fix anonymous user begin and fix SPIFFS wrong display
|
||||
- 2022-02-22 1.2.0 Add anonymous user and implement correct RFC (#9 now work correctly with File Explorer)
|
||||
- 2022-02-01 1.1.1 Add workaround to start FTP server before connection, add end and setLocalIP method.
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>When I develop a new solution I'd like to divide the application in layer, and so I'd like focus my attention in only one aspect at time. </p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p> In detail I separate the REST layer (written inside the microcontroller) and the Front-End (written in Angular, React/Redux or vanilla JS), so I'd like to upload new web interface directly to the microcontroller via FTP. </p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
<!-- wp:image {"align":"center","id":2155} -->
|
||||
<div class="wp-block-image"><figure class="aligncenter"><img width="450px" src="https://www.mischianti.org/wp-content/uploads/2019/06/FTPTransferEsp8266-1024x662.jpg" alt="" class="wp-image-2155"/><figcaption></figcaption></figure></div>
|
||||
<!-- /wp:image -->
|
||||
|
||||
<!-- wp:paragraph -->
|
||||
<p>For static information (Web pages for examples), that not change frequently, esp8266 or esp32 have internal SPIFFS (SPI Flash File System) and you can upload data via Arduino IDE as explained in the article "<a href="https://www.mischianti.org/2019/08/30/wemos-d1-mini-esp8266-integrated-spiffs-filesistem-part-2/">WeMos D1 mini (esp8266), integrated SPIFFS Filesystem</a>" for esp8266 or "<a rel="noreferrer noopener" href="https://www.mischianti.org/2020/06/04/esp32-integrated-spiffs-filesystem-part-2/" target="_blank">ESP32: integrated SPIFFS FileSystem</a>" for esp32 or with LittleFS "<a href="https://www.mischianti.org/2020/06/22/wemos-d1-mini-esp8266-integrated-littlefs-filesystem-part-5/">WeMos D1 mini (esp8266), integrated LittleFS Filesystem</a>" but for fast operation and future support It's usefully use FTP.</p>
|
||||
<!-- /wp:paragraph -->
|
||||
|
||||
|
||||
|
||||
```cpp
|
||||
/*
|
||||
* FtpServer esp8266 and esp32 with SPIFFS
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
*
|
||||
* https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef ESP8266
|
||||
#include <ESP8266WiFi.h>
|
||||
#elif defined ESP32
|
||||
#include <WiFi.h>
|
||||
#include "SPIFFS.h"
|
||||
#endif
|
||||
|
||||
#include <SimpleFTPServer.h>
|
||||
|
||||
const char* ssid = "YOUR_SSID";
|
||||
const char* password = "YOUR_PASS";
|
||||
|
||||
|
||||
FtpServer ftpSrv; //set #define FTP_DEBUG in ESP8266FtpServer.h to see ftp verbose on serial
|
||||
|
||||
|
||||
void setup(void){
|
||||
Serial.begin(115200);
|
||||
WiFi.begin(ssid, password);
|
||||
Serial.println("");
|
||||
|
||||
// Wait for connection
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
delay(500);
|
||||
Serial.print(".");
|
||||
}
|
||||
Serial.println("");
|
||||
Serial.print("Connected to ");
|
||||
Serial.println(ssid);
|
||||
Serial.print("IP address: ");
|
||||
Serial.println(WiFi.localIP());
|
||||
|
||||
|
||||
/////FTP Setup, ensure SPIFFS is started before ftp; /////////
|
||||
|
||||
/////FTP Setup, ensure SPIFFS is started before ftp; /////////
|
||||
#ifdef ESP32 //esp32 we send true to format spiffs if cannot mount
|
||||
if (SPIFFS.begin(true)) {
|
||||
#elif defined ESP8266
|
||||
if (SPIFFS.begin()) {
|
||||
#endif
|
||||
Serial.println("SPIFFS opened!");
|
||||
ftpSrv.begin("esp8266","esp8266"); //username, password for ftp. set ports in ESP8266FtpServer.h (default 21, 50009 for PASV)
|
||||
}
|
||||
}
|
||||
void loop(void){
|
||||
ftpSrv.handleFTP(); //make sure in loop you call handleFTP()!!
|
||||
// server.handleClient(); //example if running a webserver you still need to call .handleClient();
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
https://downloads.arduino.cc/libraries/logs/github.com/xreef/SimpleFTPServer/
|
18
lib/SimpleFTPServer/SimpleFTPServer.h
Normal file
18
lib/SimpleFTPServer/SimpleFTPServer.h
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* FtpServer Arduino, esp8266 and esp32 library for Ftp Server
|
||||
* Derived form https://github.com/nailbuster/esp8266FTPServer
|
||||
*
|
||||
* AUTHOR: Renzo Mischianti
|
||||
*
|
||||
* https://www.mischianti.org/2020/02/08/ftp-server-on-esp8266-and-esp32
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef SIMPLE_FTP_SERVER_H
|
||||
#define SIMPLE_FTP_SERVER_H
|
||||
|
||||
#include <FtpServer.h>
|
||||
|
||||
#endif
|
||||
|
||||
#pragma once
|
17
lib/SimpleFTPServer/keywords.txt
Normal file
17
lib/SimpleFTPServer/keywords.txt
Normal file
@ -0,0 +1,17 @@
|
||||
#######################################
|
||||
# Datatypes (KEYWORD1)
|
||||
#######################################
|
||||
|
||||
SimpleFtpServer KEYWORD1
|
||||
|
||||
#######################################
|
||||
# Methods and Functions (KEYWORD2)
|
||||
#######################################
|
||||
|
||||
begin KEYWORD2
|
||||
end KEYWORD2
|
||||
setLocalIp KEYWORD2
|
||||
credentials KEYWORD2
|
||||
setCallback KEYWORD2
|
||||
setTransferCallback KEYWORD2
|
||||
handleFTP KEYWORD2
|
21
lib/SimpleFTPServer/library.json
Normal file
21
lib/SimpleFTPServer/library.json
Normal file
@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "SimpleFTPServer",
|
||||
"description": "Simple FTP Server for using esp8266, esp32, STM32, Arduino",
|
||||
"keywords": "arduino, esp8266, esp32, stm32, rp2040, Raspberry Pi, ftp, FtpServer, spiffs, Fat, LittleFS, Ethernet, WiFi, WiFiNINA",
|
||||
"homepage": "https://www.mischianti.org/category/my-libraries/simple-ftp-server/",
|
||||
"authors":
|
||||
{
|
||||
"name": "Renzo Mischianti",
|
||||
"email": "renzo.mischianti@gmail.com",
|
||||
"url": "https://www.mischianti.org"
|
||||
},
|
||||
"repository":
|
||||
{
|
||||
"type": "git",
|
||||
"url": "https://github.com/xreef/SimpleFTPServer"
|
||||
},
|
||||
"url": "https://www.mischianti.org",
|
||||
"frameworks": "Arduino",
|
||||
"version": "2.1.5",
|
||||
"platforms": "*"
|
||||
}
|
11
lib/SimpleFTPServer/library.properties
Normal file
11
lib/SimpleFTPServer/library.properties
Normal file
@ -0,0 +1,11 @@
|
||||
name=SimpleFTPServer
|
||||
version=2.1.5
|
||||
author=Renzo Mischianti <renzo.mischianti@gmail.com>
|
||||
maintainer=Renzo Mischianti <renzo.mischianti@gmail.com>
|
||||
sentence=Simple FTP server for esp8266, esp32, STM32, Raspberry Pi Pico and Arduino
|
||||
paragraph=Simple FTP server for Raspberry Pi Pico W (LittleFS), esp8266 (SPIFFS and LittleFS or SD, SdFat 2.x), esp32 (SPIFFS, LittleFS and FFAT or SD, SdFat 2.x) and Arduino (SdFat, SD basic lib with 8.3 file format), Wio Terminal (Seed_SD, SdFat 2.x), Arduino MKR (SdFat 2), STM32 (Flash >64K SdFat 2.x and SPI Flash). Support w5500, w5100 and enc28j60. With internal callback to chck the phase of communication.
|
||||
category=Communication
|
||||
url=https://www.mischianti.org/category/my-libraries/simple-ftp-server/
|
||||
repository=https://github.com/xreef/SimpleFTPServer.git
|
||||
architectures=*
|
||||
includes=SimpleFTPServer.h
|
46
lib/TouchScreen/.github/ISSUE_TEMPLATE.md
vendored
46
lib/TouchScreen/.github/ISSUE_TEMPLATE.md
vendored
@ -1,46 +0,0 @@
|
||||
Thank you for opening an issue on an Adafruit Arduino library repository. To
|
||||
improve the speed of resolution please review the following guidelines and
|
||||
common troubleshooting steps below before creating the issue:
|
||||
|
||||
- **Do not use GitHub issues for troubleshooting projects and issues.** Instead use
|
||||
the forums at http://forums.adafruit.com to ask questions and troubleshoot why
|
||||
something isn't working as expected. In many cases the problem is a common issue
|
||||
that you will more quickly receive help from the forum community. GitHub issues
|
||||
are meant for known defects in the code. If you don't know if there is a defect
|
||||
in the code then start with troubleshooting on the forum first.
|
||||
|
||||
- **If following a tutorial or guide be sure you didn't miss a step.** Carefully
|
||||
check all of the steps and commands to run have been followed. Consult the
|
||||
forum if you're unsure or have questions about steps in a guide/tutorial.
|
||||
|
||||
- **For Arduino projects check these very common issues to ensure they don't apply**:
|
||||
|
||||
- For uploading sketches or communicating with the board make sure you're using
|
||||
a **USB data cable** and **not** a **USB charge-only cable**. It is sometimes
|
||||
very hard to tell the difference between a data and charge cable! Try using the
|
||||
cable with other devices or swapping to another cable to confirm it is not
|
||||
the problem.
|
||||
|
||||
- **Be sure you are supplying adequate power to the board.** Check the specs of
|
||||
your board and plug in an external power supply. In many cases just
|
||||
plugging a board into your computer is not enough to power it and other
|
||||
peripherals.
|
||||
|
||||
- **Double check all soldering joints and connections.** Flakey connections
|
||||
cause many mysterious problems. See the [guide to excellent soldering](https://learn.adafruit.com/adafruit-guide-excellent-soldering/tools) for examples of good solder joints.
|
||||
|
||||
- **Ensure you are using an official Arduino or Adafruit board.** We can't
|
||||
guarantee a clone board will have the same functionality and work as expected
|
||||
with this code and don't support them.
|
||||
|
||||
If you're sure this issue is a defect in the code and checked the steps above
|
||||
please fill in the following fields to provide enough troubleshooting information.
|
||||
You may delete the guideline and text above to just leave the following details:
|
||||
|
||||
- Arduino board: **INSERT ARDUINO BOARD NAME/TYPE HERE**
|
||||
|
||||
- Arduino IDE version (found in Arduino -> About Arduino menu): **INSERT ARDUINO
|
||||
VERSION HERE**
|
||||
|
||||
- List the steps to reproduce the problem below (if possible attach a sketch or
|
||||
copy the sketch code in too): **LIST REPRO STEPS BELOW**
|
26
lib/TouchScreen/.github/PULL_REQUEST_TEMPLATE.md
vendored
26
lib/TouchScreen/.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,26 +0,0 @@
|
||||
Thank you for creating a pull request to contribute to Adafruit's GitHub code!
|
||||
Before you open the request please review the following guidelines and tips to
|
||||
help it be more easily integrated:
|
||||
|
||||
- **Describe the scope of your change--i.e. what the change does and what parts
|
||||
of the code were modified.** This will help us understand any risks of integrating
|
||||
the code.
|
||||
|
||||
- **Describe any known limitations with your change.** For example if the change
|
||||
doesn't apply to a supported platform of the library please mention it.
|
||||
|
||||
- **Please run any tests or examples that can exercise your modified code.** We
|
||||
strive to not break users of the code and running tests/examples helps with this
|
||||
process.
|
||||
|
||||
Thank you again for contributing! We will try to test and integrate the change
|
||||
as soon as we can, but be aware we have many GitHub repositories to manage and
|
||||
can't immediately respond to every request. There is no need to bump or check in
|
||||
on a pull request (it will clutter the discussion of the request).
|
||||
|
||||
Also don't be worried if the request is closed or not integrated--sometimes the
|
||||
priorities of Adafruit's GitHub code (education, ease of use) might not match the
|
||||
priorities of the pull request. Don't fret, the open source community thrives on
|
||||
forks and GitHub makes it easy to keep your changes in a forked repo.
|
||||
|
||||
After reviewing the guidelines above you can delete this text from the pull request.
|
@ -1,52 +0,0 @@
|
||||
# Adafruit TouchScreen with mod for ESP32 UNO
|
||||
|
||||
This is the 4-wire resistive touch screen firmware for Arduino. Works with all Arduinos and Teensy
|
||||
|
||||
|
||||
To install, click DOWNLOAD SOURCE in the top right corner, and rename the uncompressed folder "TouchScreen". See our tutorial at http://www.ladyada.net/library/arduino/libraries.html on Arduino Library installation
|
||||
|
||||
Added modification to allow the 4-wire resistive touchscreen of MCU Friend LCDs with parallel data interfaces to be used with ESP32 UNO style boards whilst WiFi is enabled. Tested on a red board MCU Friend with default touchscreen wiring.
|
||||
|
||||
|
||||
## Reason for Modification
|
||||
|
||||
ESP32 WiFi removes access to ADC2 channel so pins 4 and 15 attached to the touchscreen no longer have analog input capability. Pin 15 already shares a connection with analog pin 35, so an additional connection is made between pin 4 and analog pin 39. Pins 35 and 39 now provide the analog input. Pins 35 and 39 are input only so always present a high impedance to avoid the risk of two outputs shorting.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
An extra wiring mod is needed in addition to those shown in the [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) instructions, but do not affect the software functionality or configuration.
|
||||
|
||||
Wiring for ESP UNO type board, with extra wire shown in green:
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
## Installing
|
||||
|
||||
Download and install the library using your IDE, eg Arduino.
|
||||
The modification uses conditional compilation. To enable the changes, modify TouchScreen.h to uncomment #define ESP32_WIFI_TOUCH
|
||||
|
||||
```
|
||||
// ESP32 specific
|
||||
//#define ESP32_WIFI_TOUCH // uncomment to use parallel MCU Friend LCD touchscreen with ESP32 UNO Wifi
|
||||
#ifdef ESP32
|
||||
#define ADC_MAX 4095 // maximum value for ESP32 ADC (default 11db, 12 bits)
|
||||
#define aXM 35 // analog input pin connected to LCD_RS
|
||||
#define aYP 39 // analog input pin connected to LCD_WR
|
||||
#else
|
||||
#define ADC_MAX 1023 // Arduino
|
||||
#endif
|
||||
#define NOISE_LEVEL 4 // Allow small amount of measurement noise
|
||||
```
|
||||
|
||||
|
||||
## Using
|
||||
|
||||
No changes are required to existing sketches, just recompilation.
|
||||
|
||||
Compatible with both [TFT_eSPI](https://github.com/Bodmer/TFT_eSPI) and [MCUFRIEND_kbv](https://github.com/prenticedavid/MCUFRIEND_kbv/) libraries
|
||||
|
||||
Touchscreen needs to be calibrated before use, either manually using included [ESP32testTouch](examples/ESP32testTouch) or eg [TouchScreen_Calibr_native](https://github.com/prenticedavid/MCUFRIEND_kbv/tree/master/examples/TouchScreen_Calibr_native)
|
||||
|
||||

|
@ -1,4 +0,0 @@
|
||||
This is the 4-wire resistive touch screen firmware for Arduino. Works with all Arduinos and Teensy
|
||||
|
||||
|
||||
To install, click DOWNLOAD SOURCE in the top right corner, and rename the uncompressed folder "TouchScreen". See our tutorial at http://www.ladyada.net/library/arduino/libraries.html on Arduino Library installation
|
@ -1,292 +0,0 @@
|
||||
// Touch screen library with X Y and Z (pressure) readings as well
|
||||
// as oversampling to avoid 'bouncing'
|
||||
// (c) ladyada / adafruit
|
||||
// Code under MIT License
|
||||
// Code under MIT License
|
||||
|
||||
#include "Arduino.h"
|
||||
#include "pins_arduino.h"
|
||||
|
||||
#ifdef __AVR
|
||||
#include <avr/pgmspace.h>
|
||||
#elif defined(ESP8266)
|
||||
#include <pgmspace.h>
|
||||
#endif
|
||||
#include "TouchScreen.h"
|
||||
|
||||
// increase or decrease the touchscreen oversampling. This is a little different than you make think:
|
||||
// 1 is no oversampling, whatever data we get is immediately returned
|
||||
// 2 is double-sampling and we only return valid data if both points are the same
|
||||
// 3+ uses insert sort to get the median value.
|
||||
// We found 2 is precise yet not too slow so we suggest sticking with it!
|
||||
|
||||
#define NUMSAMPLES 2
|
||||
|
||||
TSPoint::TSPoint(void)
|
||||
{
|
||||
x = y = 0;
|
||||
}
|
||||
|
||||
TSPoint::TSPoint(int16_t x0, int16_t y0, int16_t z0)
|
||||
{
|
||||
x = x0;
|
||||
y = y0;
|
||||
z = z0;
|
||||
}
|
||||
|
||||
bool TSPoint::operator==(TSPoint p1)
|
||||
{
|
||||
return ((p1.x == x) && (p1.y == y) && (p1.z == z));
|
||||
}
|
||||
|
||||
bool TSPoint::operator!=(TSPoint p1)
|
||||
{
|
||||
return ((p1.x != x) || (p1.y != y) || (p1.z != z));
|
||||
}
|
||||
|
||||
#if(NUMSAMPLES > 2)
|
||||
static void insert_sort(int array[], uint8_t size)
|
||||
{
|
||||
uint8_t j;
|
||||
int save;
|
||||
|
||||
for(int i = 1; i < size; i++) {
|
||||
save = array[i];
|
||||
for(j = i; j >= 1 && save < array[j - 1]; j--) array[j] = array[j - 1];
|
||||
array[j] = save;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
TSPoint TouchScreen::getPoint(void)
|
||||
{
|
||||
int x, y, z;
|
||||
int samples[NUMSAMPLES];
|
||||
uint8_t i, valid;
|
||||
|
||||
valid = 1;
|
||||
|
||||
pinMode(_yp, INPUT);
|
||||
pinMode(_ym, INPUT);
|
||||
pinMode(_xp, OUTPUT);
|
||||
pinMode(_xm, OUTPUT);
|
||||
|
||||
#if defined(USE_FAST_PINIO)
|
||||
*xp_port |= xp_pin;
|
||||
*xm_port &= ~xm_pin;
|
||||
#else
|
||||
digitalWrite(_xp, HIGH);
|
||||
digitalWrite(_xm, LOW);
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
delayMicroseconds(20); // Fast ARM chips need to allow voltages to settle
|
||||
#endif
|
||||
|
||||
for(i = 0; i < NUMSAMPLES; i++) {
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
samples[i] = analogRead(aYP);
|
||||
#else
|
||||
samples[i] = analogRead(_yp);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NUMSAMPLES > 2
|
||||
insert_sort(samples, NUMSAMPLES);
|
||||
#endif
|
||||
#if NUMSAMPLES == 2
|
||||
// Allow small amount of measurement noise, because capacitive
|
||||
// coupling to a TFT display's signals can induce some noise.
|
||||
if(samples[0] - samples[1] < -NOISE_LEVEL || samples[0] - samples[1] > NOISE_LEVEL) {
|
||||
valid = 0;
|
||||
} else {
|
||||
samples[1] = (samples[0] + samples[1]) >> 1; // average 2 samples
|
||||
}
|
||||
#endif
|
||||
|
||||
x = (ADC_MAX - samples[NUMSAMPLES / 2]);
|
||||
|
||||
pinMode(_xp, INPUT);
|
||||
pinMode(_xm, INPUT);
|
||||
pinMode(_yp, OUTPUT);
|
||||
pinMode(_ym, OUTPUT);
|
||||
|
||||
#if defined(USE_FAST_PINIO)
|
||||
*ym_port &= ~ym_pin;
|
||||
*yp_port |= yp_pin;
|
||||
#else
|
||||
digitalWrite(_ym, LOW);
|
||||
digitalWrite(_yp, HIGH);
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
delayMicroseconds(20); // Fast ARM chips need to allow voltages to settle
|
||||
#endif
|
||||
|
||||
for(i = 0; i < NUMSAMPLES; i++) {
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
samples[i] = analogRead(aXM);
|
||||
#else
|
||||
samples[i] = analogRead(_xm);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NUMSAMPLES > 2
|
||||
insert_sort(samples, NUMSAMPLES);
|
||||
#endif
|
||||
#if NUMSAMPLES == 2
|
||||
// Allow small amount of measurement noise, because capacitive
|
||||
// coupling to a TFT display's signals can induce some noise.
|
||||
if(samples[0] - samples[1] < -NOISE_LEVEL || samples[0] - samples[1] > NOISE_LEVEL) {
|
||||
valid = 0;
|
||||
} else {
|
||||
samples[1] = (samples[0] + samples[1]) >> 1; // average 2 samples
|
||||
}
|
||||
#endif
|
||||
|
||||
y = (ADC_MAX - samples[NUMSAMPLES / 2]);
|
||||
|
||||
// Set X+ to ground
|
||||
// Set Y- to VCC
|
||||
// Hi-Z X- and Y+
|
||||
pinMode(_xp, OUTPUT);
|
||||
pinMode(_yp, INPUT);
|
||||
|
||||
#if defined(USE_FAST_PINIO)
|
||||
*xp_port &= ~xp_pin;
|
||||
*ym_port |= ym_pin;
|
||||
#else
|
||||
digitalWrite(_xp, LOW);
|
||||
digitalWrite(_ym, HIGH);
|
||||
#endif
|
||||
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
int z1 = analogRead(aXM);
|
||||
int z2 = analogRead(aYP);
|
||||
#else
|
||||
int z1 = analogRead(_xm);
|
||||
int z2 = analogRead(_yp);
|
||||
#endif
|
||||
|
||||
if(_rxplate != 0) {
|
||||
// now read the x
|
||||
float rtouch;
|
||||
rtouch = z2;
|
||||
rtouch /= z1;
|
||||
rtouch -= 1;
|
||||
rtouch *= x;
|
||||
rtouch *= _rxplate;
|
||||
rtouch /= ADC_MAX + 1;
|
||||
|
||||
z = rtouch;
|
||||
} else {
|
||||
z = (ADC_MAX - (z2 - z1));
|
||||
}
|
||||
|
||||
if(!valid) {
|
||||
z = 0;
|
||||
}
|
||||
|
||||
return TSPoint(x, y, z);
|
||||
}
|
||||
|
||||
TouchScreen::TouchScreen(uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym, uint16_t rxplate = 0)
|
||||
{
|
||||
_yp = yp;
|
||||
_xm = xm;
|
||||
_ym = ym;
|
||||
_xp = xp;
|
||||
_rxplate = rxplate;
|
||||
|
||||
#if defined(USE_FAST_PINIO)
|
||||
xp_port = portOutputRegister(digitalPinToPort(_xp));
|
||||
yp_port = portOutputRegister(digitalPinToPort(_yp));
|
||||
xm_port = portOutputRegister(digitalPinToPort(_xm));
|
||||
ym_port = portOutputRegister(digitalPinToPort(_ym));
|
||||
|
||||
xp_pin = digitalPinToBitMask(_xp);
|
||||
yp_pin = digitalPinToBitMask(_yp);
|
||||
xm_pin = digitalPinToBitMask(_xm);
|
||||
ym_pin = digitalPinToBitMask(_ym);
|
||||
#endif
|
||||
|
||||
pressureThreshhold = 10;
|
||||
}
|
||||
|
||||
int TouchScreen::readTouchX(void)
|
||||
{
|
||||
pinMode(_yp, INPUT);
|
||||
pinMode(_ym, INPUT);
|
||||
digitalWrite(_yp, LOW);
|
||||
digitalWrite(_ym, LOW);
|
||||
|
||||
pinMode(_xp, OUTPUT);
|
||||
digitalWrite(_xp, HIGH);
|
||||
pinMode(_xm, OUTPUT);
|
||||
digitalWrite(_xm, LOW);
|
||||
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
return (ADC_MAX - analogRead(aYP));
|
||||
#else
|
||||
return (ADC_MAX - analogRead(_yp));
|
||||
#endif
|
||||
}
|
||||
|
||||
int TouchScreen::readTouchY(void)
|
||||
{
|
||||
pinMode(_xp, INPUT);
|
||||
pinMode(_xm, INPUT);
|
||||
digitalWrite(_xp, LOW);
|
||||
digitalWrite(_xm, LOW);
|
||||
|
||||
pinMode(_yp, OUTPUT);
|
||||
digitalWrite(_yp, HIGH);
|
||||
pinMode(_ym, OUTPUT);
|
||||
digitalWrite(_ym, LOW);
|
||||
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
return (ADC_MAX - analogRead(aXM));
|
||||
#else
|
||||
return (ADC_MAX - analogRead(_xm));
|
||||
#endif
|
||||
}
|
||||
|
||||
uint16_t TouchScreen::pressure(void)
|
||||
{
|
||||
// Set X+ to ground
|
||||
pinMode(_xp, OUTPUT);
|
||||
digitalWrite(_xp, LOW);
|
||||
|
||||
// Set Y- to VCC
|
||||
pinMode(_ym, OUTPUT);
|
||||
digitalWrite(_ym, HIGH);
|
||||
|
||||
// Hi-Z X- and Y+
|
||||
digitalWrite(_xm, LOW);
|
||||
pinMode(_xm, INPUT);
|
||||
digitalWrite(_yp, LOW);
|
||||
pinMode(_yp, INPUT);
|
||||
|
||||
#if defined(ESP32_WIFI_TOUCH) && defined(ESP32)
|
||||
int z1 = analogRead(aXM);
|
||||
int z2 = analogRead(aYP);
|
||||
#else
|
||||
int z1 = analogRead(_xm);
|
||||
int z2 = analogRead(_yp);
|
||||
#endif
|
||||
|
||||
if(_rxplate != 0) {
|
||||
// now read the x
|
||||
float rtouch;
|
||||
rtouch = z2;
|
||||
rtouch /= z1;
|
||||
rtouch -= 1;
|
||||
rtouch *= readTouchX();
|
||||
rtouch *= _rxplate;
|
||||
rtouch /= ADC_MAX + 1;
|
||||
|
||||
return rtouch;
|
||||
} else {
|
||||
return (ADC_MAX - (z2 - z1));
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
// Touch screen library with X Y and Z (pressure) readings as well
|
||||
// as oversampling to avoid 'bouncing'
|
||||
// (c) ladyada / adafruit
|
||||
// Code under MIT License
|
||||
|
||||
#ifndef _ADAFRUIT_TOUCHSCREEN_H_
|
||||
#define _ADAFRUIT_TOUCHSCREEN_H_
|
||||
#include <stdint.h>
|
||||
|
||||
// ESP32 specific
|
||||
#define ESP32_WIFI_TOUCH // uncomment to use parallel MCU Friend LCD touchscreen with ESP32 UNO Wifi
|
||||
#ifdef ESP32
|
||||
#define ADC_MAX 4095 // maximum value for ESP32 ADC (default 11db, 12 bits)
|
||||
#define aXM 35 // analog input pin connected to LCD_RS
|
||||
#define aYP 39 // analog input pin connected to LCD_WR
|
||||
#else
|
||||
#define ADC_MAX 1023 // Arduino
|
||||
#endif
|
||||
#define NOISE_LEVEL 4 // Allow small amount of measurement noise
|
||||
|
||||
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega32U4__) || defined(TEENSYDUINO) || defined(__AVR_ATmega2560__)
|
||||
typedef volatile uint8_t RwReg;
|
||||
#endif
|
||||
#if defined(ARDUINO_STM32_FEATHER)
|
||||
typedef volatile uint32 RwReg;
|
||||
#endif
|
||||
#if defined(ARDUINO_FEATHER52) || defined(ESP32) || defined(ESP8266)
|
||||
typedef volatile uint32_t RwReg;
|
||||
#endif
|
||||
#if defined(STM32F4)
|
||||
typedef volatile uint32_t RwReg;
|
||||
#endif
|
||||
|
||||
#if defined(__AVR__) || defined(TEENSYDUINO) || defined(ARDUINO_ARCH_SAMD)
|
||||
#define USE_FAST_PINIO
|
||||
#endif
|
||||
|
||||
class TSPoint {
|
||||
public:
|
||||
TSPoint(void);
|
||||
TSPoint(int16_t x, int16_t y, int16_t z);
|
||||
|
||||
bool operator==(TSPoint);
|
||||
bool operator!=(TSPoint);
|
||||
|
||||
int16_t x, y, z;
|
||||
};
|
||||
|
||||
class TouchScreen {
|
||||
public:
|
||||
TouchScreen(uint8_t xp, uint8_t yp, uint8_t xm, uint8_t ym, uint16_t rx);
|
||||
|
||||
bool isTouching(void);
|
||||
uint16_t pressure(void);
|
||||
int readTouchY();
|
||||
int readTouchX();
|
||||
TSPoint getPoint();
|
||||
int16_t pressureThreshhold;
|
||||
|
||||
private:
|
||||
uint8_t _yp, _ym, _xm, _xp;
|
||||
uint16_t _rxplate;
|
||||
|
||||
volatile RwReg *xp_port, *yp_port, *xm_port, *ym_port;
|
||||
RwReg xp_pin, xm_pin, yp_pin, ym_pin;
|
||||
};
|
||||
|
||||
#endif
|
@ -1,126 +0,0 @@
|
||||
/*
|
||||
Test MCU Friend parallel display and resistive touchscreen by drawing touch points
|
||||
on screen, use something pointed for more accuracy
|
||||
|
||||
Need this modified Touchscreen library and one of:
|
||||
- TFT_eSPI much faster for ESP32, must select correct display driver
|
||||
- MCUFRIEND_kbv more display driver support, auto detects display driver
|
||||
*/
|
||||
|
||||
#define TFT_eSPIlib // comment out to use MCUFRIEND_kbv
|
||||
|
||||
#ifdef TFT_eSPIlib
|
||||
#include <TFT_eSPI.h>
|
||||
TFT_eSPI tft = TFT_eSPI();
|
||||
#else
|
||||
#include <MCUFRIEND_kbv.h>
|
||||
MCUFRIEND_kbv tft;
|
||||
#endif
|
||||
|
||||
#include <TouchScreen.h>
|
||||
|
||||
// adjust pressure sensitivity - note works 'backwards'
|
||||
#define MINPRESSURE 200
|
||||
#define MAXPRESSURE 1000
|
||||
|
||||
// some colours to play with
|
||||
#define BLACK 0x0000
|
||||
#define BLUE 0x001F
|
||||
#define RED 0xF800
|
||||
#define GREEN 0x07E0
|
||||
#define CYAN 0x07FF
|
||||
#define MAGENTA 0xF81F
|
||||
#define YELLOW 0xFFE0
|
||||
#define WHITE 0xFFFF
|
||||
|
||||
// Either run TouchScreen_Calibr_native.ino and apply results to the arrays below
|
||||
// or just use trial and error from drawing on screen
|
||||
// ESP32 coordinates at default 12 bit resolution have range 0 - 4095
|
||||
// however the ADC cannot read voltages below 150mv and tops out around 3.15V
|
||||
// so the actual coordinates will not be at the extremes
|
||||
// each library and driver may have different coordination and rotation sequence
|
||||
const int coords[] = {3800, 500, 300, 3800}; // portrait - left, right, top, bottom
|
||||
|
||||
const int rotation = 0; // in rotation order - portrait, landscape, etc
|
||||
|
||||
const int XP = 27, XM = 15, YP = 4, YM = 14; // default ESP32 Uno touchscreen pins
|
||||
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
#ifdef TFT_eSPIlib
|
||||
Serial.println("TFT_eSPI library");
|
||||
tft.begin();
|
||||
#else
|
||||
Serial.println("MCUFRIEND_kbv library");
|
||||
idDisplay();
|
||||
#endif
|
||||
// screen orientation and background
|
||||
String orientation;
|
||||
switch (rotation) {
|
||||
case 0:
|
||||
orientation = "Portrait";
|
||||
break;
|
||||
case 1:
|
||||
orientation = "Landscape";
|
||||
break;
|
||||
case 2:
|
||||
orientation = "Portrait Inverted";
|
||||
break;
|
||||
case 3:
|
||||
orientation = "Landscape Inverted";
|
||||
break;
|
||||
}
|
||||
Serial.println(orientation);
|
||||
tft.setRotation(rotation);
|
||||
tft.fillScreen(BLACK);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// display touched point with colored dot
|
||||
uint16_t pixel_x, pixel_y;
|
||||
boolean pressed = Touch_getXY(&pixel_x, &pixel_y, true);
|
||||
}
|
||||
|
||||
boolean Touch_getXY(uint16_t *x, uint16_t *y, boolean showTouch) {
|
||||
TSPoint p = ts.getPoint();
|
||||
pinMode(YP, OUTPUT); //restore shared pins
|
||||
pinMode(XM, OUTPUT);
|
||||
digitalWrite(YP, HIGH); //because TFT control pins
|
||||
digitalWrite(XM, HIGH);
|
||||
bool pressed = (p.z > MINPRESSURE && p.z < MAXPRESSURE);
|
||||
if (pressed) {
|
||||
switch (rotation) {
|
||||
case 0: // portrait
|
||||
*x = map(p.x, coords[0], coords[1], 0, tft.width());
|
||||
*y = map(p.y, coords[2], coords[3], 0, tft.height());
|
||||
break;
|
||||
case 1: // landscape
|
||||
*x = map(p.y, coords[1], coords[0], 0, tft.width());
|
||||
*y = map(p.x, coords[2], coords[3], 0, tft.height());
|
||||
break;
|
||||
case 2: // portrait inverted
|
||||
*x = map(p.x, coords[1], coords[0], 0, tft.width());
|
||||
*y = map(p.y, coords[3], coords[2], 0, tft.height());
|
||||
break;
|
||||
case 3: // landscape inverted
|
||||
*x = map(p.y, coords[0], coords[1], 0, tft.width());
|
||||
*y = map(p.x, coords[3], coords[2], 0, tft.height());
|
||||
break;
|
||||
}
|
||||
if (showTouch) tft.fillCircle(*x, *y, 2, YELLOW);
|
||||
}
|
||||
return pressed;
|
||||
}
|
||||
|
||||
#ifndef TFT_eSPIlib
|
||||
void idDisplay() {
|
||||
// MCUFRIEND_kbv library only
|
||||
uint16_t ID = tft.readID();
|
||||
Serial.print("TFT ID = 0x");
|
||||
Serial.println(ID, HEX);
|
||||
if (ID == 0xD3D3) ID = 0x9486; // write-only shield
|
||||
tft.begin(ID);
|
||||
}
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user