mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Compare commits
137 Commits
v2.0-alpha
...
v2.05.01
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f716578138 | ||
|
|
8ddfa0e275 | ||
|
|
9127802acc | ||
|
|
2494522e85 | ||
|
|
3d1d47acee | ||
|
|
e598d1cbbb | ||
|
|
20d1874aee | ||
|
|
030a714ff2 | ||
|
|
67066f218f | ||
|
|
50fe2bcff1 | ||
|
|
a576f44ba2 | ||
|
|
74de59c235 | ||
|
|
fc669dc274 | ||
|
|
b0b512030f | ||
|
|
48cc1ff8cc | ||
|
|
c9a56392a0 | ||
|
|
b6b207568c | ||
|
|
8bf65351ea | ||
|
|
215fe8e9e8 | ||
|
|
4718efe79b | ||
|
|
771f0a1b9e | ||
|
|
1fef2fb53a | ||
|
|
bf1fa74d72 | ||
|
|
1ae8b2f216 | ||
|
|
98ed6be197 | ||
|
|
19240f2ae5 | ||
|
|
dd2fdbcb8e | ||
|
|
42db57da25 | ||
|
|
b6351f9696 | ||
|
|
bf7f1f5062 | ||
|
|
6500eb5eed | ||
|
|
311d5182eb | ||
|
|
88ea45d8c8 | ||
|
|
576575d7ba | ||
|
|
7c1937b412 | ||
|
|
f599624b6f | ||
|
|
cc09157106 | ||
|
|
586267f586 | ||
|
|
f2f20111b6 | ||
|
|
58061e3c26 | ||
|
|
f04cca8677 | ||
|
|
79477685bd | ||
|
|
a062317e7a | ||
|
|
2928e4d39c | ||
|
|
c9cfe965ef | ||
|
|
080ca31890 | ||
|
|
e94bcfc2b8 | ||
|
|
8eadb98496 | ||
|
|
fe5ee91104 | ||
|
|
762236b485 | ||
|
|
c4230d79bf | ||
|
|
03b2bede4d | ||
|
|
37d5cf1e70 | ||
|
|
85869d507e | ||
|
|
6c34675083 | ||
|
|
b4235bea75 | ||
|
|
ecf6e8aeb4 | ||
|
|
174380bcb0 | ||
|
|
96ab173c4b | ||
|
|
fb6981dbe3 | ||
|
|
30be520692 | ||
|
|
ebab60c79b | ||
|
|
bf445e9b26 | ||
|
|
8f6a65825d | ||
|
|
0d2bfb9a29 | ||
|
|
fcfa44a949 | ||
|
|
17c0d15a8b | ||
|
|
719953a2bf | ||
|
|
33edf6ba76 | ||
|
|
fbd730760b | ||
|
|
b46c17078b | ||
|
|
a30569eda2 | ||
|
|
677b278478 | ||
|
|
57949a7937 | ||
|
|
f14ea321a7 | ||
|
|
aef8f5f5bb | ||
|
|
3ce0cc0d99 | ||
|
|
5e30152f40 | ||
|
|
5b0eb3fb0d | ||
|
|
f26da12948 | ||
|
|
b47098e9c2 | ||
|
|
653c71ba2d | ||
|
|
715be0b0b6 | ||
|
|
93869b979e | ||
|
|
2281dbd5ad | ||
|
|
7ba3818cdb | ||
|
|
84305ce0a9 | ||
|
|
b01525272a | ||
|
|
a787a2bb6c | ||
|
|
9166723b29 | ||
|
|
fe1b50f658 | ||
|
|
beb6b59889 | ||
|
|
c0614e7bd6 | ||
|
|
db17385947 | ||
|
|
90c0bf9683 | ||
|
|
1bc62adc6c | ||
|
|
d9b65701c8 | ||
|
|
f01a2d3505 | ||
|
|
549c5aa6b9 | ||
|
|
538a741912 | ||
|
|
4c0ba72542 | ||
|
|
b2f97933fd | ||
|
|
c618cd0665 | ||
|
|
9f581cb28e | ||
|
|
bc7558bdd9 | ||
|
|
2d90f218dc | ||
|
|
662b39cbd4 | ||
|
|
39295c9705 | ||
|
|
87c2ed4f53 | ||
|
|
3c2e8765f2 | ||
|
|
5b4ed06013 | ||
|
|
c5c89a516e | ||
|
|
9d536c4d25 | ||
|
|
c68dee6ff3 | ||
|
|
121feef977 | ||
|
|
17e7d92463 | ||
|
|
b0e20b9e2f | ||
|
|
0f4ceb131c | ||
|
|
1447b1cad8 | ||
|
|
d03443e783 | ||
|
|
40516cd5b1 | ||
|
|
21b766bf96 | ||
|
|
b6c193309d | ||
|
|
53399f5866 | ||
|
|
d0aaea8d6f | ||
|
|
d0f56ae4ff | ||
|
|
dfa4c6e65b | ||
|
|
ed2f0db7f0 | ||
|
|
7cc0fd7c84 | ||
|
|
afa8257bce | ||
|
|
d7a9e1a9ea | ||
|
|
1bcdf42315 | ||
|
|
43b6d37bc6 | ||
|
|
bcf78dff4c | ||
|
|
0e7e304f4e | ||
|
|
0aae546dc9 | ||
|
|
2bf06caa09 |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -42,3 +42,5 @@ Logo GUI/TS100 Logo Editor/TS100 Logo Editor/obj/
|
||||
Logo GUI/TS100 Logo Editor/TS100 Logo Editor/bin/
|
||||
workspace/ts100/ts100.xml
|
||||
workspace/ts100_old/*
|
||||
*.cache
|
||||
workspace/TS100/.settings/language.settings.xml
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace TS100_Logo_Editor
|
||||
data[i] = data[i + 1];
|
||||
data[i + 1] = temp;
|
||||
}
|
||||
string outputHexFile = IntelHex.IntelHex.encode(data, 0x0800B800, 16, true, true);//16 bytes is the only format the DFU seems to support //0x0800B800
|
||||
string outputHexFile = IntelHex.IntelHex.encode(data, 0x0800F800, 16, true, true);//16 bytes is the only format the DFU seems to support //0x0800F800
|
||||
//^ This string now just needs to be written out to a text file :)
|
||||
SaveFileDialog dlg = new SaveFileDialog();
|
||||
dlg.Title = "Save DFU File";
|
||||
|
||||
258
Bootup Logo/Logos/001_TS100.hex
Normal file
258
Bootup Logo/Logos/001_TS100.hex
Normal file
@@ -0,0 +1,258 @@
|
||||
:020000040800F2
|
||||
:10F8000055AA0DF080002A54821580818080808066
|
||||
:10F8100080808080808080808080808000000000E8
|
||||
:10F82000000000004080402020C020201010080868
|
||||
:10F8300008080C080C0C0C0C080808080C0C0C0C24
|
||||
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
|
||||
:10F850008808284808E828C828A80CCC28CC28A85C
|
||||
:10F8600008C800F80200050208050808080808088A
|
||||
:10F8700008080A080A090A090A0908090505050508
|
||||
:10F880000505050510081020201F4040404020407D
|
||||
:10F890002020202020202020202020202020202068
|
||||
:10F8A00020202F202F28202025202A2A2A2A2728F6
|
||||
:10F8B0002120282F202F2827282B20272827282BD6
|
||||
:10F8C0002027001F000000000000000000000000D2
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000055AA0DF080002A54821580818080808066
|
||||
:10F8100080808080808080808080808000000000E8
|
||||
:10F82000000000004080402020C020201010080868
|
||||
:10F8300008080C080C0C0C0C080808080C0C0C0C24
|
||||
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
|
||||
:10F850008808284808E828C828A80CCC28CC28A85C
|
||||
:10F8600008C800F80200050208050808080808088A
|
||||
:10F8700008080A080A090A090A0908090505050508
|
||||
:10F880000505050510081020201F4040404020407D
|
||||
:10F890002020202020202020202020202020202068
|
||||
:10F8A00020202F202F28202025202A2A2A2A2728F6
|
||||
:10F8B0002120282F202F2827282B20272827282BD6
|
||||
:10F8C0002027001F000000000000000000000000D2
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000055AA0DF080002A54821580818080808066
|
||||
:10F8100080808080808080808080808000000000E8
|
||||
:10F82000000000004080402020C020201010080868
|
||||
:10F8300008080C080C0C0C0C080808080C0C0C0C24
|
||||
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
|
||||
:10F850008808284808E828C828A80CCC28CC28A85C
|
||||
:10F8600008C800F80200050208050808080808088A
|
||||
:10F8700008080A080A090A090A0908090505050508
|
||||
:10F880000505050510081020201F4040404020407D
|
||||
:10F890002020202020202020202020202020202068
|
||||
:10F8A00020202F202F28202025202A2A2A2A2728F6
|
||||
:10F8B0002120282F202F2827282B20272827282BD6
|
||||
:10F8C0002027001F000000000000000000000000D2
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000055AA0DF080002A54821580818080808066
|
||||
:10F8100080808080808080808080808000000000E8
|
||||
:10F82000000000004080402020C020201010080868
|
||||
:10F8300008080C080C0C0C0C080808080C0C0C0C24
|
||||
:10F84000E80CA8A8A828E8A8C808A828A8A848A834
|
||||
:10F850008808284808E828C828A80CCC28CC28A85C
|
||||
:10F8600008C800F80200050208050808080808088A
|
||||
:10F8700008080A080A090A090A0908090505050508
|
||||
:10F880000505050510081020201F4040404020407D
|
||||
:10F890002020202020202020202020202020202068
|
||||
:10F8A00020202F202F28202025202A2A2A2A2728F6
|
||||
:10F8B0002120282F202F2827282B20272827282BD6
|
||||
:10F8C0002027001F000000000000000000000000D2
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:00000001FF
|
||||
BIN
Bootup Logo/Logos/001_TS100.png
Normal file
BIN
Bootup Logo/Logos/001_TS100.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 408 B |
258
Bootup Logo/Logos/_clear_logo.hex
Normal file
258
Bootup Logo/Logos/_clear_logo.hex
Normal file
@@ -0,0 +1,258 @@
|
||||
:020000040800F2
|
||||
:10F8000000000000000000000000000000000000F8
|
||||
:10F8100000000000000000000000000000000000E8
|
||||
:10F8200000000000000000000000000000000000D8
|
||||
:10F8300000000000000000000000000000000000C8
|
||||
:10F8400000000000000000000000000000000000B8
|
||||
:10F8500000000000000000000000000000000000A8
|
||||
:10F860000000000000000000000000000000000098
|
||||
:10F870000000000000000000000000000000000088
|
||||
:10F880000000000000000000000000000000000078
|
||||
:10F890000000000000000000000000000000000068
|
||||
:10F8A0000000000000000000000000000000000058
|
||||
:10F8B0000000000000000000000000000000000048
|
||||
:10F8C0000000000000000000000000000000000038
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000000000000000000000000000000000000F8
|
||||
:10F8100000000000000000000000000000000000E8
|
||||
:10F8200000000000000000000000000000000000D8
|
||||
:10F8300000000000000000000000000000000000C8
|
||||
:10F8400000000000000000000000000000000000B8
|
||||
:10F8500000000000000000000000000000000000A8
|
||||
:10F860000000000000000000000000000000000098
|
||||
:10F870000000000000000000000000000000000088
|
||||
:10F880000000000000000000000000000000000078
|
||||
:10F890000000000000000000000000000000000068
|
||||
:10F8A0000000000000000000000000000000000058
|
||||
:10F8B0000000000000000000000000000000000048
|
||||
:10F8C0000000000000000000000000000000000038
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000000000000000000000000000000000000F8
|
||||
:10F8100000000000000000000000000000000000E8
|
||||
:10F8200000000000000000000000000000000000D8
|
||||
:10F8300000000000000000000000000000000000C8
|
||||
:10F8400000000000000000000000000000000000B8
|
||||
:10F8500000000000000000000000000000000000A8
|
||||
:10F860000000000000000000000000000000000098
|
||||
:10F870000000000000000000000000000000000088
|
||||
:10F880000000000000000000000000000000000078
|
||||
:10F890000000000000000000000000000000000068
|
||||
:10F8A0000000000000000000000000000000000058
|
||||
:10F8B0000000000000000000000000000000000048
|
||||
:10F8C0000000000000000000000000000000000038
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:10F8000000000000000000000000000000000000F8
|
||||
:10F8100000000000000000000000000000000000E8
|
||||
:10F8200000000000000000000000000000000000D8
|
||||
:10F8300000000000000000000000000000000000C8
|
||||
:10F8400000000000000000000000000000000000B8
|
||||
:10F8500000000000000000000000000000000000A8
|
||||
:10F860000000000000000000000000000000000098
|
||||
:10F870000000000000000000000000000000000088
|
||||
:10F880000000000000000000000000000000000078
|
||||
:10F890000000000000000000000000000000000068
|
||||
:10F8A0000000000000000000000000000000000058
|
||||
:10F8B0000000000000000000000000000000000048
|
||||
:10F8C0000000000000000000000000000000000038
|
||||
:10F8D0000000000000000000000000000000000028
|
||||
:10F8E0000000000000000000000000000000000018
|
||||
:10F8F0000000000000000000000000000000000008
|
||||
:10F9000000000000000000000000000000000000F7
|
||||
:10F9100000000000000000000000000000000000E7
|
||||
:10F9200000000000000000000000000000000000D7
|
||||
:10F9300000000000000000000000000000000000C7
|
||||
:10F9400000000000000000000000000000000000B7
|
||||
:10F9500000000000000000000000000000000000A7
|
||||
:10F960000000000000000000000000000000000097
|
||||
:10F970000000000000000000000000000000000087
|
||||
:10F980000000000000000000000000000000000077
|
||||
:10F990000000000000000000000000000000000067
|
||||
:10F9A0000000000000000000000000000000000057
|
||||
:10F9B0000000000000000000000000000000000047
|
||||
:10F9C0000000000000000000000000000000000037
|
||||
:10F9D0000000000000000000000000000000000027
|
||||
:10F9E0000000000000000000000000000000000017
|
||||
:10F9F0000000000000000000000000000000000007
|
||||
:10FA000000000000000000000000000000000000F6
|
||||
:10FA100000000000000000000000000000000000E6
|
||||
:10FA200000000000000000000000000000000000D6
|
||||
:10FA300000000000000000000000000000000000C6
|
||||
:10FA400000000000000000000000000000000000B6
|
||||
:10FA500000000000000000000000000000000000A6
|
||||
:10FA60000000000000000000000000000000000096
|
||||
:10FA70000000000000000000000000000000000086
|
||||
:10FA80000000000000000000000000000000000076
|
||||
:10FA90000000000000000000000000000000000066
|
||||
:10FAA0000000000000000000000000000000000056
|
||||
:10FAB0000000000000000000000000000000000046
|
||||
:10FAC0000000000000000000000000000000000036
|
||||
:10FAD0000000000000000000000000000000000026
|
||||
:10FAE0000000000000000000000000000000000016
|
||||
:10FAF0000000000000000000000000000000000006
|
||||
:10FB000000000000000000000000000000000000F5
|
||||
:10FB100000000000000000000000000000000000E5
|
||||
:10FB200000000000000000000000000000000000D5
|
||||
:10FB300000000000000000000000000000000000C5
|
||||
:10FB400000000000000000000000000000000000B5
|
||||
:10FB500000000000000000000000000000000000A5
|
||||
:10FB60000000000000000000000000000000000095
|
||||
:10FB70000000000000000000000000000000000085
|
||||
:10FB80000000000000000000000000000000000075
|
||||
:10FB90000000000000000000000000000000000065
|
||||
:10FBA0000000000000000000000000000000000055
|
||||
:10FBB0000000000000000000000000000000000045
|
||||
:10FBC0000000000000000000000000000000000035
|
||||
:10FBD0000000000000000000000000000000000025
|
||||
:10FBE0000000000000000000000000000000000015
|
||||
:10FBF0000000000000000000000000000000000005
|
||||
:00000001FF
|
||||
@@ -1,24 +1,23 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
VERSION_STRING = '0.01'
|
||||
|
||||
|
||||
# coding=utf-8
|
||||
from __future__ import division
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
try:
|
||||
import PIL, PIL.Image, PIL.ImageOps
|
||||
except ImportError,error:
|
||||
raise ImportError, "%s: %s requres Python Imaging Library (PIL). " \
|
||||
"Install with `pip` or OS-specific package " \
|
||||
"management tool." \
|
||||
% (error, sys.argv[0])
|
||||
|
||||
from PIL import Image, ImageOps
|
||||
except ImportError as error:
|
||||
raise ImportError("{}: {} requres Python Imaging Library (PIL). "
|
||||
"Install with `pip` or OS-specific package "
|
||||
"management tool."
|
||||
.format(error, sys.argv[0]))
|
||||
|
||||
VERSION_STRING = '0.01'
|
||||
|
||||
LCD_WIDTH = 96
|
||||
LCD_HEIGHT = 16
|
||||
LCD_NUM_BYTES = LCD_WIDTH * LCD_HEIGHT / 8
|
||||
LCD_NUM_BYTES = LCD_WIDTH * LCD_HEIGHT // 8
|
||||
LCD_PADDED_SIZE = 1024
|
||||
|
||||
INTELHEX_DATA_RECORD = 0x00
|
||||
@@ -28,40 +27,36 @@ INTELHEX_BYTES_PER_LINE = 16
|
||||
INTELHEX_MINIMUM_SIZE = 4096
|
||||
|
||||
|
||||
|
||||
def split16(word):
|
||||
'''return high and low byte of 16-bit word value as tuple'''
|
||||
return ((word >> 8) & 0xff, word & 0xff)
|
||||
|
||||
"""return high and low byte of 16-bit word value as tuple"""
|
||||
return (word >> 8) & 0xff, word & 0xff
|
||||
|
||||
|
||||
def intel_hex_line(file, record_type, offset, data):
|
||||
'''write a line of data in Intel hex format'''
|
||||
"""write a line of data in Intel hex format"""
|
||||
# length, address offset, record type
|
||||
record_length = len(data)
|
||||
file.write(':%02X%04X%02X' % (record_length, offset, record_type))
|
||||
file.write(':{:02X}{:04X}{:02X}'.format(record_length, offset, record_type))
|
||||
|
||||
# data
|
||||
map(lambda byte: file.write("%02X" % byte), data)
|
||||
map(lambda byte: file.write("{:02X}".format(byte)), data)
|
||||
|
||||
# compute and write checksum (with DOS line ending for compatibility/safety)
|
||||
file.write( "%02X\r\n"
|
||||
% ( ( ( sum(data, # sum data ...
|
||||
record_length # ... and other ...
|
||||
+ sum(split16(offset)) # ... fields ...
|
||||
+ record_type) # ... on line
|
||||
& 0xff) # low 8 bits
|
||||
^ 0xff) # two's ...
|
||||
+ 1)) # ... complement
|
||||
file.write("{:02X}\r\n"
|
||||
.format(((sum(data, # sum data ...
|
||||
record_length # ... and other ...
|
||||
+ sum(split16(offset)) # ... fields ...
|
||||
+ record_type) # ... on line
|
||||
& 0xff) # low 8 bits
|
||||
^ 0xff) # two's ...
|
||||
+ 1)) # ... complement
|
||||
|
||||
|
||||
|
||||
def intel_hex(file, bytes, start_address = 0x0):
|
||||
'''write block of data in Intel hex format'''
|
||||
if len(bytes) % INTELHEX_BYTES_PER_LINE != 0:
|
||||
raise ValueError, \
|
||||
"Program error: Size of LCD data is not evenly divisible by %s" \
|
||||
% INTELHEX_BYTES_PER_LINE
|
||||
def intel_hex(file, bytes_, start_address=0x0):
|
||||
"""write block of data in Intel hex format"""
|
||||
if len(bytes_) % INTELHEX_BYTES_PER_LINE != 0:
|
||||
raise ValueError("Program error: Size of LCD data is not evenly divisible by {}"
|
||||
.format(INTELHEX_BYTES_PER_LINE))
|
||||
|
||||
address_lo = start_address & 0xffff
|
||||
address_hi = (start_address >> 16) & 0xffff
|
||||
@@ -74,11 +69,11 @@ def intel_hex(file, bytes, start_address = 0x0):
|
||||
size_written = 0
|
||||
while size_written < INTELHEX_MINIMUM_SIZE:
|
||||
offset = address_lo
|
||||
for line_start in range(0, len(bytes), INTELHEX_BYTES_PER_LINE):
|
||||
for line_start in range(0, len(bytes_), INTELHEX_BYTES_PER_LINE):
|
||||
intel_hex_line(file,
|
||||
INTELHEX_DATA_RECORD,
|
||||
offset,
|
||||
bytes[line_start:line_start+INTELHEX_BYTES_PER_LINE])
|
||||
bytes_[line_start:line_start + INTELHEX_BYTES_PER_LINE])
|
||||
size_written += INTELHEX_BYTES_PER_LINE
|
||||
if size_written >= INTELHEX_MINIMUM_SIZE:
|
||||
break
|
||||
@@ -87,14 +82,13 @@ def intel_hex(file, bytes, start_address = 0x0):
|
||||
intel_hex_line(file, INTELHEX_END_OF_FILE_RECORD, 0, ())
|
||||
|
||||
|
||||
|
||||
def img2hex(input_filename,
|
||||
output_file,
|
||||
preview_filename=None,
|
||||
threshold=128,
|
||||
dither=False,
|
||||
negative=False):
|
||||
'''
|
||||
"""
|
||||
Convert 'input_filename' image file into Intel hex format with data
|
||||
formatted for display on TS100 LCD and file object.
|
||||
Input image is converted from color or grayscale to black-and-white,
|
||||
@@ -107,13 +101,12 @@ def img2hex(input_filename,
|
||||
dithering algorithm used.
|
||||
Optional `negative' inverts black/white regardless of input image type
|
||||
or other options.
|
||||
'''
|
||||
"""
|
||||
|
||||
try:
|
||||
image = PIL.Image.open(input_filename)
|
||||
except BaseException,error:
|
||||
raise IOError, \
|
||||
"error reading image file \"%s\": %s" % (input_filename, error)
|
||||
image = Image.open(input_filename)
|
||||
except BaseException as e:
|
||||
raise IOError("error reading image file \"{}\": {}".format(input_filename, e))
|
||||
|
||||
# convert to luminance
|
||||
# do even if already black/white because PIL can't invert 1-bit so
|
||||
@@ -124,10 +117,10 @@ def img2hex(input_filename,
|
||||
image = image.convert('L')
|
||||
|
||||
if image.size != (LCD_WIDTH, LCD_HEIGHT):
|
||||
image = image.resize((LCD_WIDTH, LCD_HEIGHT), PIL.Image.BICUBIC)
|
||||
image = image.resize((LCD_WIDTH, LCD_HEIGHT), Image.BICUBIC)
|
||||
|
||||
if negative:
|
||||
image = PIL.ImageOps.invert(image)
|
||||
image = ImageOps.invert(image)
|
||||
threshold = 255 - threshold # have to invert threshold
|
||||
|
||||
if dither:
|
||||
@@ -135,7 +128,8 @@ def img2hex(input_filename,
|
||||
else:
|
||||
image = image.point(lambda pixel: 0 if pixel < threshold else 1, '1')
|
||||
|
||||
if preview_filename: image.save(preview_filename)
|
||||
if preview_filename:
|
||||
image.save(preview_filename)
|
||||
|
||||
''' DEBUG
|
||||
for row in range(LCD_HEIGHT):
|
||||
@@ -155,7 +149,7 @@ def img2hex(input_filename,
|
||||
data[3] = 0xF0
|
||||
|
||||
# convert to TS100 LCD format
|
||||
for ndx in range(LCD_WIDTH * 16 / 8):
|
||||
for ndx in range(LCD_WIDTH * 16 // 8):
|
||||
bottom_half_offset = 0 if ndx < LCD_WIDTH else 8
|
||||
byte = 0
|
||||
for y in range(8):
|
||||
@@ -164,8 +158,7 @@ def img2hex(input_filename,
|
||||
# store in endian-reversed byte order
|
||||
data[4 + ndx + (1 if ndx % 2 == 0 else -1)] = byte
|
||||
|
||||
intel_hex(output_file, data, 0x0800B800)
|
||||
|
||||
intel_hex(output_file, data, 0x0800F800)
|
||||
|
||||
|
||||
def parse_commandline():
|
||||
@@ -175,10 +168,8 @@ def parse_commandline():
|
||||
"at startup")
|
||||
|
||||
def zero_to_255(text):
|
||||
try:
|
||||
value = int(text)
|
||||
assert(value >= 0 and value <= 255)
|
||||
except:
|
||||
value = int(text)
|
||||
if not 0 <= value <= 255:
|
||||
raise argparse.ArgumentTypeError("must be integer from 0 to 255 ")
|
||||
return value
|
||||
|
||||
@@ -215,37 +206,36 @@ def parse_commandline():
|
||||
|
||||
parser.add_argument('-v', '--version',
|
||||
action='version',
|
||||
version="%(prog)s version " + VERSION_STRING,
|
||||
version="%(prog)s version " + VERSION_STRING,
|
||||
help="print version info")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import argparse
|
||||
args = parse_commandline()
|
||||
|
||||
if os.path.exists(args.output_filename) and not args.force:
|
||||
sys.stderr.write( "Won't overwrite existing file \"%s\" (use --force "
|
||||
"option to override)\n"
|
||||
% args.output_filename)
|
||||
sys.stderr.write("Won't overwrite existing file \"{}\" (use --force "
|
||||
"option to override)\n"
|
||||
.format(args.output_filename))
|
||||
sys.exit(1)
|
||||
|
||||
if args.preview and os.path.exists(args.preview) and not args.force:
|
||||
sys.stderr.write( "Won't overwrite existing file \"%s\" (use --force "
|
||||
"option to override)\n"
|
||||
% args.preview)
|
||||
sys.stderr.write("Won't overwrite existing file \"{}\" (use --force "
|
||||
"option to override)\n"
|
||||
.format(args.preview))
|
||||
sys.exit(1)
|
||||
|
||||
try:
|
||||
with open(args.output_filename, 'w') as output_file:
|
||||
with open(args.output_filename, 'w') as output:
|
||||
img2hex(args.input_filename,
|
||||
output_file,
|
||||
output,
|
||||
args.preview,
|
||||
args.threshold,
|
||||
args.dither,
|
||||
args.negative)
|
||||
except BaseException,error:
|
||||
sys.stderr.write("Error converting file: %s\n" % error)
|
||||
except BaseException as error:
|
||||
sys.stderr.write("Error converting file: {}\n".format(error))
|
||||
sys.exit(1)
|
||||
|
||||
BIN
Development Resources/Images/Calibration.jpg
Normal file
BIN
Development Resources/Images/Calibration.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 687 B |
BIN
Development Resources/Images/Settings.jpg
Normal file
BIN
Development Resources/Images/Settings.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 704 B |
BIN
Development Resources/Images/Sleep.jpg
Normal file
BIN
Development Resources/Images/Sleep.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 736 B |
BIN
Development Resources/Images/Soldering.jpg
Normal file
BIN
Development Resources/Images/Soldering.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 713 B |
BIN
Development Resources/Images/UI.jpg
Normal file
BIN
Development Resources/Images/UI.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 722 B |
@@ -34,36 +34,36 @@ ADC1.SamplingTime-4\#ChannelInjectedConversion=ADC_SAMPLETIME_239CYCLES_5
|
||||
ADC1.SamplingTime-5\#ChannelInjectedConversion=ADC_SAMPLETIME_71CYCLES_5
|
||||
ADC1.ScanConvMode=ADC_SCAN_ENABLE
|
||||
ADC1.master=1
|
||||
Dma.ADC1.2.Direction=DMA_PERIPH_TO_MEMORY
|
||||
Dma.ADC1.2.Instance=DMA1_Channel1
|
||||
Dma.ADC1.2.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
|
||||
Dma.ADC1.2.MemInc=DMA_MINC_ENABLE
|
||||
Dma.ADC1.2.Mode=DMA_CIRCULAR
|
||||
Dma.ADC1.2.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
|
||||
Dma.ADC1.2.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.ADC1.2.Priority=DMA_PRIORITY_VERY_HIGH
|
||||
Dma.ADC1.2.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.I2C1_RX.0.Direction=DMA_PERIPH_TO_MEMORY
|
||||
Dma.I2C1_RX.0.Instance=DMA1_Channel7
|
||||
Dma.I2C1_RX.0.MemDataAlignment=DMA_MDATAALIGN_BYTE
|
||||
Dma.I2C1_RX.0.MemInc=DMA_MINC_ENABLE
|
||||
Dma.I2C1_RX.0.Mode=DMA_NORMAL
|
||||
Dma.I2C1_RX.0.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
|
||||
Dma.I2C1_RX.0.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.I2C1_RX.0.Priority=DMA_PRIORITY_LOW
|
||||
Dma.I2C1_RX.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.I2C1_TX.1.Direction=DMA_MEMORY_TO_PERIPH
|
||||
Dma.I2C1_TX.1.Instance=DMA1_Channel6
|
||||
Dma.I2C1_TX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
|
||||
Dma.I2C1_TX.1.MemInc=DMA_MINC_ENABLE
|
||||
Dma.I2C1_TX.1.Mode=DMA_NORMAL
|
||||
Dma.I2C1_TX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
|
||||
Dma.I2C1_TX.1.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.I2C1_TX.1.Priority=DMA_PRIORITY_LOW
|
||||
Dma.I2C1_TX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.Request0=I2C1_RX
|
||||
Dma.Request1=I2C1_TX
|
||||
Dma.Request2=ADC1
|
||||
Dma.ADC1.0.Direction=DMA_PERIPH_TO_MEMORY
|
||||
Dma.ADC1.0.Instance=DMA1_Channel1
|
||||
Dma.ADC1.0.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
|
||||
Dma.ADC1.0.MemInc=DMA_MINC_ENABLE
|
||||
Dma.ADC1.0.Mode=DMA_CIRCULAR
|
||||
Dma.ADC1.0.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
|
||||
Dma.ADC1.0.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.ADC1.0.Priority=DMA_PRIORITY_VERY_HIGH
|
||||
Dma.ADC1.0.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.I2C1_RX.1.Direction=DMA_PERIPH_TO_MEMORY
|
||||
Dma.I2C1_RX.1.Instance=DMA1_Channel7
|
||||
Dma.I2C1_RX.1.MemDataAlignment=DMA_MDATAALIGN_BYTE
|
||||
Dma.I2C1_RX.1.MemInc=DMA_MINC_ENABLE
|
||||
Dma.I2C1_RX.1.Mode=DMA_NORMAL
|
||||
Dma.I2C1_RX.1.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
|
||||
Dma.I2C1_RX.1.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.I2C1_RX.1.Priority=DMA_PRIORITY_MEDIUM
|
||||
Dma.I2C1_RX.1.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.I2C1_TX.2.Direction=DMA_MEMORY_TO_PERIPH
|
||||
Dma.I2C1_TX.2.Instance=DMA1_Channel6
|
||||
Dma.I2C1_TX.2.MemDataAlignment=DMA_MDATAALIGN_BYTE
|
||||
Dma.I2C1_TX.2.MemInc=DMA_MINC_ENABLE
|
||||
Dma.I2C1_TX.2.Mode=DMA_NORMAL
|
||||
Dma.I2C1_TX.2.PeriphDataAlignment=DMA_PDATAALIGN_BYTE
|
||||
Dma.I2C1_TX.2.PeriphInc=DMA_PINC_DISABLE
|
||||
Dma.I2C1_TX.2.Priority=DMA_PRIORITY_MEDIUM
|
||||
Dma.I2C1_TX.2.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority
|
||||
Dma.Request0=ADC1
|
||||
Dma.Request1=I2C1_RX
|
||||
Dma.Request2=I2C1_TX
|
||||
Dma.RequestsNb=3
|
||||
FREERTOS.FootprintOK=true
|
||||
FREERTOS.INCLUDE_vTaskDelete=0
|
||||
@@ -74,8 +74,9 @@ FREERTOS.configMINIMAL_STACK_SIZE=256
|
||||
FREERTOS.configTICK_RATE_HZ=100
|
||||
FREERTOS.configTOTAL_HEAP_SIZE=10240
|
||||
File.Version=6
|
||||
I2C1.DutyCycle=I2C_DUTYCYCLE_2
|
||||
I2C1.I2C_Mode=I2C_Fast
|
||||
I2C1.IPParameters=I2C_Mode
|
||||
I2C1.IPParameters=I2C_Mode,DutyCycle
|
||||
IWDG.IPParameters=Prescaler
|
||||
IWDG.Prescaler=IWDG_PRESCALER_256
|
||||
KeepUserPlacement=false
|
||||
@@ -88,8 +89,9 @@ Mcu.IP4=IWDG
|
||||
Mcu.IP5=NVIC
|
||||
Mcu.IP6=RCC
|
||||
Mcu.IP7=SYS
|
||||
Mcu.IP8=TIM3
|
||||
Mcu.IPNb=9
|
||||
Mcu.IP8=TIM2
|
||||
Mcu.IP9=TIM3
|
||||
Mcu.IPNb=10
|
||||
Mcu.Name=STM32F103T(8-B)Ux
|
||||
Mcu.Package=VFQFPN36
|
||||
Mcu.Pin0=PA6
|
||||
@@ -100,9 +102,12 @@ Mcu.Pin12=PB7
|
||||
Mcu.Pin13=VP_FREERTOS_VS_ENABLE
|
||||
Mcu.Pin14=VP_IWDG_VS_IWDG
|
||||
Mcu.Pin15=VP_SYS_VS_tim1
|
||||
Mcu.Pin16=VP_TIM3_VS_ClockSourceINT
|
||||
Mcu.Pin17=VP_TIM3_VS_no_output4
|
||||
Mcu.Pin16=VP_TIM2_VS_ClockSourceINT
|
||||
Mcu.Pin17=VP_TIM2_VS_no_output1
|
||||
Mcu.Pin18=VP_TIM2_VS_no_output3
|
||||
Mcu.Pin19=VP_TIM3_VS_ClockSourceINT
|
||||
Mcu.Pin2=PB0
|
||||
Mcu.Pin20=VP_TIM3_VS_no_output4
|
||||
Mcu.Pin3=PB1
|
||||
Mcu.Pin4=PA8
|
||||
Mcu.Pin5=PA9
|
||||
@@ -110,28 +115,31 @@ Mcu.Pin6=PA13
|
||||
Mcu.Pin7=PA14
|
||||
Mcu.Pin8=PB3
|
||||
Mcu.Pin9=PB4
|
||||
Mcu.PinsNb=18
|
||||
Mcu.PinsNb=21
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F103T8Ux
|
||||
MxCube.Version=4.22.0
|
||||
MxDb.Version=DB.4.0.220
|
||||
NVIC.ADC1_2_IRQn=true\:5\:0\:false\:false\:true\:true
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.DMA1_Channel1_IRQn=true\:5\:0\:false\:false\:true\:true
|
||||
NVIC.DMA1_Channel6_IRQn=true\:5\:0\:false\:false\:true\:true
|
||||
NVIC.DMA1_Channel7_IRQn=true\:5\:0\:false\:false\:true\:true
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:true
|
||||
MxCube.Version=4.25.0
|
||||
MxDb.Version=DB.4.0.250
|
||||
NVIC.ADC1_2_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.DMA1_Channel1_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.DMA1_Channel6_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.DMA1_Channel7_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.I2C1_ER_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.I2C1_EV_IRQn=true\:5\:0\:false\:false\:true\:true\:true
|
||||
NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:true\:true
|
||||
NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false
|
||||
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:true
|
||||
NVIC.TIM1_UP_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:true
|
||||
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:true\:true
|
||||
NVIC.TIM1_UP_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
NVIC.TimeBase=TIM1_UP_IRQn
|
||||
NVIC.TimeBaseIP=TIM1
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false
|
||||
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:true
|
||||
PA13.Locked=true
|
||||
PA13.Mode=Serial_Wire
|
||||
PA13.Signal=SYS_JTMS-SWDIO
|
||||
@@ -193,29 +201,30 @@ PCC.Vdd=3.3
|
||||
PinOutPanel.RotationAngle=0
|
||||
ProjectManager.AskForMigrate=true
|
||||
ProjectManager.BackupPrevious=false
|
||||
ProjectManager.CompilerOptimize=2
|
||||
ProjectManager.CompilerOptimize=3
|
||||
ProjectManager.ComputerToolchain=false
|
||||
ProjectManager.CoupleFile=false
|
||||
ProjectManager.CustomerFirmwarePackage=C\:/Users/Ben V. Brown/STM32Cube/Repository/STM32Cube_FW_F1_V1.6.0
|
||||
ProjectManager.CustomerFirmwarePackage=C\:/Users/Ralim/STM32Cube/Repository/STM32Cube_FW_F1_V1.6.1
|
||||
ProjectManager.DefaultFWLocation=true
|
||||
ProjectManager.DeletePrevious=true
|
||||
ProjectManager.DeviceId=STM32F103T8Ux
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.6.0
|
||||
ProjectManager.FirmwarePackage=STM32Cube FW_F1 V1.6.1
|
||||
ProjectManager.FreePins=true
|
||||
ProjectManager.HalAssertFull=false
|
||||
ProjectManager.HeapSize=0x200
|
||||
ProjectManager.KeepUserCode=true
|
||||
ProjectManager.LastFirmware=true
|
||||
ProjectManager.LibraryCopy=1
|
||||
ProjectManager.MainLocation=Src
|
||||
ProjectManager.PreviousToolchain=SW4STM32
|
||||
ProjectManager.ProjectBuild=false
|
||||
ProjectManager.ProjectFileName=TS100.ioc
|
||||
ProjectManager.ProjectName=TS100
|
||||
ProjectManager.StackSize=0x400
|
||||
ProjectManager.TargetToolchain=SW4STM32
|
||||
ProjectManager.ToolChainLocation=C\:\\Users\\Ralim\\Repo\\ts100\\TS100
|
||||
ProjectManager.ToolChainLocation=
|
||||
ProjectManager.UnderRoot=false
|
||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL,2-MX_DMA_Init-DMA-false-HAL,3-MX_I2C1_Init-I2C1-false-HAL,4-MX_ADC1_Init-ADC1-false-HAL,5-SystemClock_Config-RCC-false-HAL,6-MX_TIM3_Init-TIM3-false-HAL,7-MX_IWDG_Init-IWDG-false-HAL
|
||||
ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_ADC1_Init-ADC1-false-HAL-true,5-SystemClock_Config-RCC-false-HAL-true,6-MX_TIM3_Init-TIM3-false-HAL-true,7-MX_IWDG_Init-IWDG-false-HAL-true,8-MX_TIM2_Init-TIM2-false-HAL-true
|
||||
RCC.ADCFreqValue=8000000
|
||||
RCC.ADCPresc=RCC_ADCPCLK2_DIV8
|
||||
RCC.AHBFreq_Value=64000000
|
||||
@@ -252,6 +261,9 @@ SH.GPXTI5.0=GPIO_EXTI5
|
||||
SH.GPXTI5.ConfNb=1
|
||||
SH.S_TIM3_CH1.0=TIM3_CH1,PWM Generation1 CH1
|
||||
SH.S_TIM3_CH1.ConfNb=1
|
||||
TIM2.Channel-PWM\ Generation1\ No\ Output=TIM_CHANNEL_1
|
||||
TIM2.Channel-PWM\ Generation3\ No\ Output=TIM_CHANNEL_3
|
||||
TIM2.IPParameters=Channel-PWM Generation1 No Output,Channel-PWM Generation3 No Output
|
||||
TIM3.Channel-Output\ Compare4\ No\ Output=TIM_CHANNEL_4
|
||||
TIM3.Channel-PWM\ Generation1\ CH1=TIM_CHANNEL_1
|
||||
TIM3.ClockDivision=TIM_CLOCKDIVISION_DIV4
|
||||
@@ -267,6 +279,12 @@ VP_IWDG_VS_IWDG.Mode=IWDG_Activate
|
||||
VP_IWDG_VS_IWDG.Signal=IWDG_VS_IWDG
|
||||
VP_SYS_VS_tim1.Mode=TIM1
|
||||
VP_SYS_VS_tim1.Signal=SYS_VS_tim1
|
||||
VP_TIM2_VS_ClockSourceINT.Mode=Internal
|
||||
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
|
||||
VP_TIM2_VS_no_output1.Mode=PWM Generation1 No Output
|
||||
VP_TIM2_VS_no_output1.Signal=TIM2_VS_no_output1
|
||||
VP_TIM2_VS_no_output3.Mode=PWM Generation3 No Output
|
||||
VP_TIM2_VS_no_output3.Signal=TIM2_VS_no_output3
|
||||
VP_TIM3_VS_ClockSourceINT.Mode=Internal
|
||||
VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT
|
||||
VP_TIM3_VS_no_output4.Mode=Output Compare4 No Output
|
||||
|
||||
46
ISSUE_TEMPLATE.md
Normal file
46
ISSUE_TEMPLATE.md
Normal file
@@ -0,0 +1,46 @@
|
||||
Please edit this template and fill out all the information you can (where relevant). Failure to provide essential information can delay the response you receive.
|
||||
|
||||
|
||||
* **I'm submitting a ...**
|
||||
- [ ] Bug report
|
||||
- [ ] Feature request
|
||||
- [ ] Translation
|
||||
|
||||
|
||||
* **Do you want to request a *feature* or report a *bug*?**
|
||||
|
||||
|
||||
|
||||
* **What is the current behavior?**
|
||||
|
||||
|
||||
* **What is the expected behavior?**
|
||||
|
||||
|
||||
* **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem**
|
||||
|
||||
***Steps to reproduce:***
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
***Video of problem if hard to reproduce***
|
||||
|
||||
* **What is the motivation / use case for changing the behavior?**
|
||||
|
||||
|
||||
|
||||
* **What are you running:**
|
||||
|
||||
On the idle screen, you can hold the settings button and it will show you the firmware version.
|
||||
|
||||
- Firmware Version: 2.x
|
||||
- PCB Version: (1/2)
|
||||
- Power Supply (Voltage and Current Rating) :
|
||||
|
||||
|
||||
* **Other information**
|
||||
|
||||
If submitting graphics to go on the iron, please use BMP or PNG files over JPG.
|
||||
|
||||
674
LICENSE
Normal file
674
LICENSE
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
29
PULL_REQUEST_TEMPLATE.md
Normal file
29
PULL_REQUEST_TEMPLATE.md
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
Please try and fill out this template where possible, not all fields are required and can be removed.
|
||||
|
||||
* **Please check if the PR fulfills these requirements**
|
||||
- [ ] The commit message make sense
|
||||
- [ ] The changes have been tested locally
|
||||
- [ ] New features have been documented in the Wiki
|
||||
- [ ] I'm willing to maintain this in the future (Totally Optional)
|
||||
|
||||
|
||||
* **What kind of change does this PR introduce?**
|
||||
(Bug fix, feature, docs update, ...)
|
||||
|
||||
|
||||
|
||||
* **What is the current behavior?**
|
||||
(You can also link to an open issue here)
|
||||
|
||||
|
||||
|
||||
* **What is the new behavior (if this is a feature change)?**
|
||||
|
||||
|
||||
|
||||
* **Does this PR introduce a breaking change?**
|
||||
(What changes might users need to make in their application due to this PR?)
|
||||
|
||||
|
||||
* **Other information**:
|
||||
73
README.md
73
README.md
@@ -1,19 +1,12 @@
|
||||
# Version 2 development branch
|
||||
|
||||
This firmware is not complete, it is missing some features such as :
|
||||
|
||||
* Russian font has issues atm
|
||||
* Soldering detailed view coming
|
||||
While it most likely will work, It is not meant for production use *just* yet!
|
||||
|
||||
|
||||
# TS100
|
||||
|
||||
This is a complete rewrite of the open source software for the ts100 soldering iron.
|
||||
The version two fork of this code has no shared code with the original firmware from Miniware (E-design) group.
|
||||
This project is concidered feature complete for use as a soldering iron, *so please suggest any feature improvements you would like!*
|
||||
|
||||
A short(ish) video that goes through every single menu option in the firmware is available [over here](https://www.youtube.com/watch?v=WlnpboYfxNk).
|
||||
This video was created on an earlier 1.x version of the firmware, so alot has changed and a new video will be coming soon for the 2.x fork.
|
||||
This project is considered feature complete for use as a soldering iron, *so please suggest any feature improvements you would like!*
|
||||
|
||||
A short(ish) video that goes through every single menu option in the firmware is available [over here](https://www.youtube.com/watch?v=WlnpboYfxNk).
|
||||
This video was created on an earlier 1.x version of the firmware, so alot has changed but should be fairly intuitive as the menu has vastly improved.
|
||||
|
||||
*This firmware does **NOT** support the usb port while running for changing settings. This is done through the onscreen menu only. Logos are edited using the tool or python script and uploaded in DFU mode.*
|
||||
|
||||
@@ -21,6 +14,7 @@ This video was created on an earlier 1.x version of the firmware, so alot has ch
|
||||
Please calibrate your irons voltage reading when you are using a lithium battery after any firmware upgrades.*
|
||||
|
||||
## Features
|
||||
|
||||
* PID iron temperature control
|
||||
* Automatic sleep with selectable sensitivity
|
||||
* Motion wake support
|
||||
@@ -35,10 +29,11 @@ Please calibrate your irons voltage reading when you are using a lithium battery
|
||||
* Battery charge level indicatior if power source set to a lipo cell count.
|
||||
* Custom bootup logo support
|
||||
* Automatic LCD rotation based on orientation
|
||||
* Supports both the version 1 and version 2 hardware
|
||||
|
||||
## Upgrading your ts100 iron
|
||||
|
||||
This is completely safe, if it goes wrong just put the .hex file from the official website onto the unit and your back to the old firmware. Downloads for the hex files to flash are available on the [releases page.](https://github.com/Ralim/ts100/releases) The file you want is called *ts100.hex* unless you want the translations, they are ts100_*language short name*.hex.
|
||||
This is completely safe, if it goes wrong just put the .hex file from the official website onto the unit and your back to the old firmware. Downloads for the hex files to flash are available on the [releases page.](https://github.com/Ralim/ts100/releases) The file you want is called *ts100_EN.hex* unless you want the translations, they are ts100_*language short name*.hex.
|
||||
|
||||
Officially the bootloader on the iron only works under windows. However, users have reported that it does work under Mac, and can be made to work under Linux *sometimes*. Details over on the [wiki page](https://github.com/Ralim/ts100/wiki/Upgrading-Firmware).
|
||||
|
||||
@@ -64,13 +59,15 @@ There are further instructions on the [wiki](https://github.com/Ralim/ts100/wiki
|
||||
|
||||
This new firmware uses a new menu system to allow access to the settings on the device.
|
||||
When on the main screen, the unit shows prompts for the two most common operations.
|
||||
|
||||
* Pressing the button near the tip enters soldering mode
|
||||
* Pressing the button near the USB enters the settings menu.
|
||||
* Holding the button near the tip will enter soldering temperature adjust mode (This is the same as the one in the soldering menu, just to let you edit before heating up).
|
||||
* Holding the button near the USB end will show the firmware version details.
|
||||
|
||||
## Soldering mode
|
||||
|
||||
In this mode the iron works as you would expect, pressing either button will take you to a temperature change screen.
|
||||
In this mode the iron works as you would expect, pressing either button will take you to a temperature change screen.
|
||||
Use each button to go up and down in temperature. Pressing both buttons will exit you from the temperature menu (or wait 3 seconds and it will time out).
|
||||
Pressing both buttons or holding the button near the USB will exit the soldering mode.
|
||||
Holding the button at the front of the iron will enter boost mode (if enabled).
|
||||
@@ -78,29 +75,18 @@ Holding the button at the front of the iron will enter boost mode (if enabled).
|
||||
## Settings Menu
|
||||
|
||||
This menu allows you to cycle through all the options and set their values.
|
||||
The button near the tip cycles through the options, and the one near the usb changes the selected option.
|
||||
Note that settings are not saved until you exit the menu, and some settings such as screen flip do not apply until a power cycle is applied.
|
||||
If you leave the unit alone (ie don't press any buttons) on a setting, after 3 seconds the screen will scroll a longer version of the name
|
||||
The button near the USB cycles through the options, and the one near the tip changes the selected option.
|
||||
Note that settings are not saved until you exit the menu.
|
||||
If you leave the unit alone (ie don't press any buttons) on a setting, after 3 seconds the screen will scroll a rough description of the setting.
|
||||
|
||||
* PWRSC -> Power source, select a cell count if using a LiPo, or DC to disable the shutdown. (Sets it to minimum of 10V).
|
||||
* STMP -> The temperature the unit drops to in sleep mode
|
||||
* SLTME -> Sleep time, how long it takes before the unit goes to sleep
|
||||
* SHTME -> Shutdown Time, how long the unit will wait after movement before shutting down completely
|
||||
* MSENSE -> Motion Sensitivity,0*9,0 means motion sensing is turned off, 9 is most sensitive, 1 is least sensitive (ie takes more movement to trigger)
|
||||
* ADVDSP -> Enable the advanced display (shows more details)
|
||||
* DSPROT -> Display rotation mode, Automatic, Left handed or Right handed
|
||||
* BOOST -> Enable boost mode
|
||||
* BTMP -> Set the temperature for the boost mode
|
||||
* ASART -> Automatically start the unit when power is applied (i.e. the unit will go straight into soldering mode)
|
||||
* CLBLNK -> Blink the screen as an alert when cooling down
|
||||
* TMP CAL -> Use to calibrate offset on the tip temperature
|
||||
* RESET -> Use to force a complete reset on exit of the settings menu
|
||||
* TMPUNIT -> Temperature unit, C or F
|
||||
The menu is arranged so that the most often used settings are first.
|
||||
With submenu's being selected to enter using the front button (as if you were going to change the setting).
|
||||
Scrolling through the submenu will return you back to its entry location after you scroll through all of the options.
|
||||
|
||||
### Calibrating input voltage
|
||||
|
||||
Due to the tolerance on the resistors used for the input voltage divider, some irons can be up to 0.6V out on the voltage measurement.
|
||||
Please calibrate your iron if you have any issues with the cutoff voltage.
|
||||
Please calibrate your iron if you have any issues with the cutoff voltage.
|
||||
Note that cutoff messages can also be triggered by using a power supply that is too weak and fails under the load of the iron.
|
||||
This is more critical than before with the new cell count based cutout voltage.
|
||||
|
||||
@@ -108,19 +94,11 @@ To calibrate your Iron:
|
||||
|
||||
1. Measure the input voltage with a multimeter and note it down.
|
||||
2. Connect the input to your iron.
|
||||
3. On the home screen (showing iron symbol), press both buttons simultainiously.
|
||||
4. The iron will now show the tip temperature.
|
||||
5. Press the button near the soldering iron tip.
|
||||
6. The screen will display the measured input voltage.
|
||||
7. If this is the same as what you measured before skip to step 13
|
||||
8. Otherwise, press the button near the USB end of the iron
|
||||
9. The voltage will now slowly blink.
|
||||
10. Use the buttons to adjust the reading up and down until it reads as close as possible to the voltage you measured earlier.
|
||||
11. When it is reading as close as possible, press both buttons at once.
|
||||
12. The screen will go back to just showing the input voltage.
|
||||
13. Press the button near the tip of the iron to exit back to the live temperature display.
|
||||
14. Press both buttons at once to exit back to the idle screen.
|
||||
15. You're done. Enjoy your iron.
|
||||
3. Enter the settings menu
|
||||
4. Under the advanced submenu
|
||||
5. Select the calibrate voltage option
|
||||
6. Use the front and back buttons to adjust the displayed voltage to minimise the error to your origional measurement
|
||||
7. Hold both buttons to save and exit to the menu
|
||||
|
||||
### Calibrating tip offset
|
||||
|
||||
@@ -129,13 +107,13 @@ Some tips will have an offset on their readings, to calibrate this out perform t
|
||||
1. Connect power to your iron
|
||||
2. Make sure the tip is at room temperature (ie. wait for a fair while after using the iron before calibration)
|
||||
3. Enter the settings menu
|
||||
4. Scroll down to *TMP CAL*
|
||||
4. Scroll down to the advanced menu, and then the temperature calibration
|
||||
5. Press the button to change the option (tip button)
|
||||
6. The display will start to scroll a warning message to check that the tip is at ambient temperature!
|
||||
7. Press the button near the tip of the iron to confirm.
|
||||
8. The display will go to "...." for a short period of time as the unit measures the tip temperature and the handle temperature and compares them
|
||||
9. The display will then go back to *TMP CAL*
|
||||
10. Calibration is done, just exit the settings menu as normal
|
||||
10. Calibration is done, just exit the settings menu as normal
|
||||
11. You're done. Enjoy your iron.
|
||||
|
||||
### Boost mode
|
||||
@@ -144,7 +122,6 @@ This allows you to change the front key (one near the tip) to become a boost but
|
||||
|
||||
The boost temperature is set in the settings menu.
|
||||
|
||||
|
||||
## Thanks
|
||||
|
||||
If you love this firmware and want to continue my caffine addiction, you can do so here (or email me for other options) : https://paypal.me/RalimTek
|
||||
|
||||
BIN
workspace/TS100/..cproject.swp
Normal file
BIN
workspace/TS100/..cproject.swp
Normal file
Binary file not shown.
@@ -22,7 +22,7 @@
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.317155453" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/TS100}/Debug" id="fr.ac6.managedbuild.builder.gnu.cross.910934658" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.319926124" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1178790692" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.debug" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1178790692" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.1214895662" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1766485383" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
@@ -44,11 +44,12 @@
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.dialect.std.565083189" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata.338139343" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.176392389" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.893418158" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1941847243" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1283353237" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.debug" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1283353237" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.size" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.224874042" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.max" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.1749257477" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
@@ -70,6 +71,7 @@
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.1681974405" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
|
||||
<option id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata.1463726438" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.fdata" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.149685854" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.1092052043" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
|
||||
</tool>
|
||||
@@ -108,112 +110,6 @@
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactExtension="elf" artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573" name="Release" parent="fr.ac6.managedbuild.config.gnu.cross.exe.release" postannouncebuildStep="Generating binary and Printing size information:" postbuildStep="arm-none-eabi-objcopy -O binary "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.bin"; arm-none-eabi-size -B "${BuildArtifactFileName}" ;arm-none-eabi-objcopy -O ihex "${BuildArtifactFileBaseName}.elf" "${BuildArtifactFileBaseName}.hex"">
|
||||
<folderInfo id="fr.ac6.managedbuild.config.gnu.cross.exe.release.723264573." name="/" resourcePath="">
|
||||
<toolChain id="fr.ac6.managedbuild.toolchain.gnu.cross.exe.release.1456567544" name="Ac6 STM32 MCU GCC" superClass="fr.ac6.managedbuild.toolchain.gnu.cross.exe.release">
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.mcu.67332574" name="Mcu" superClass="fr.ac6.managedbuild.option.gnu.cross.mcu" value="STM32F103T8Ux" valueType="string"/>
|
||||
<option id="fr.ac6.managedbuild.option.gnu.cross.board.1570943989" name="Board" superClass="fr.ac6.managedbuild.option.gnu.cross.board" value="ts100" valueType="string"/>
|
||||
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="fr.ac6.managedbuild.targetPlatform.gnu.cross.793444160" isAbstract="false" osList="all" superClass="fr.ac6.managedbuild.targetPlatform.gnu.cross"/>
|
||||
<builder buildPath="${workspace_loc:/TS100}/Release" id="fr.ac6.managedbuild.builder.gnu.cross.548236022" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="fr.ac6.managedbuild.builder.gnu.cross"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.1363306495" name="MCU GCC Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level.1100266163" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.c.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.c.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.debugging.level.2139237845" name="Debug Level" superClass="gnu.c.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.c.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.c.compiler.option.include.paths.1770182855" name="Include paths (-I)" superClass="gnu.c.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.preprocessor.def.symbols.1423042308" name="Defined symbols (-D)" superClass="gnu.c.compiler.option.preprocessor.def.symbols" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
|
||||
<listOptionValue builtIn="false" value="STM32F1"/>
|
||||
<listOptionValue builtIn="false" value="STM32"/>
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.c.compiler.option.dialect.std.356859384" name="Language standard" superClass="gnu.c.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.c.compiler.dialect.default" valueType="enumerated"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c.747173367" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.c"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s.1210653460" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.compiler.input.s"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.1414722294" name="MCU G++ Compiler" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler">
|
||||
<option id="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level.1489744363" name="Optimization Level" superClass="fr.ac6.managedbuild.gnu.cpp.compiler.option.optimization.level" useByScannerDiscovery="false" value="fr.ac6.managedbuild.gnu.cpp.optimization.level.more" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.debugging.level.641509376" name="Debug Level" superClass="gnu.cpp.compiler.option.debugging.level" useByScannerDiscovery="false" value="gnu.cpp.compiler.debugging.level.none" valueType="enumerated"/>
|
||||
<option id="gnu.cpp.compiler.option.include.paths.105977434" name="Include paths (-I)" superClass="gnu.cpp.compiler.option.include.paths" useByScannerDiscovery="false" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.preprocessor.def.158062035" name="Defined symbols (-D)" superClass="gnu.cpp.compiler.option.preprocessor.def" useByScannerDiscovery="false" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="STM32F103T8Ux"/>
|
||||
<listOptionValue builtIn="false" value="STM32F1"/>
|
||||
<listOptionValue builtIn="false" value="STM32"/>
|
||||
<listOptionValue builtIn="false" value="USE_HAL_DRIVER"/>
|
||||
<listOptionValue builtIn="false" value="STM32F103xB"/>
|
||||
<listOptionValue builtIn="false" value="USE_RTOS_SYSTICK"/>
|
||||
</option>
|
||||
<option id="gnu.cpp.compiler.option.dialect.std.2101054556" name="Language standard" superClass="gnu.cpp.compiler.option.dialect.std" useByScannerDiscovery="true" value="gnu.cpp.compiler.dialect.default" valueType="enumerated"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp.688034595" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.cpp"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s.6473827" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.compiler.input.s"/>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.c.linker.1409185098" name="MCU GCC Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.c.linker"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker.162825548" name="MCU G++ Linker" superClass="fr.ac6.managedbuild.tool.gnu.cross.cpp.linker">
|
||||
<option id="gnu.cpp.link.option.strip.459660118" name="Omit all symbol information (-s)" superClass="gnu.cpp.link.option.strip" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.cpp.linker.input.1735005640" superClass="cdt.managedbuild.tool.gnu.cpp.linker.input">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.archiver.907512577" name="MCU GCC Archiver" superClass="fr.ac6.managedbuild.tool.gnu.archiver"/>
|
||||
<tool id="fr.ac6.managedbuild.tool.gnu.cross.assembler.1906472572" name="MCU GCC Assembler" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler">
|
||||
<option id="gnu.both.asm.option.include.paths.1277819409" name="Include paths (-I)" superClass="gnu.both.asm.option.include.paths" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/core""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/CMSIS/device""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc/Legacy""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/HAL_Driver/Inc""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/include""/>
|
||||
<listOptionValue builtIn="false" value=""${ProjDirPath}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3""/>
|
||||
</option>
|
||||
<inputType id="cdt.managedbuild.tool.gnu.assembler.input.1588000933" superClass="cdt.managedbuild.tool.gnu.assembler.input"/>
|
||||
<inputType id="fr.ac6.managedbuild.tool.gnu.cross.assembler.input.1118741214" superClass="fr.ac6.managedbuild.tool.gnu.cross.assembler.input"/>
|
||||
</tool>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry excluding="Src/stm32f1xx_hal_timebase_tim_template.c|Src/stm32f1xx_hal_timebase_rtc_wakeup_template.c|Src/stm32f1xx_hal_timebase_rtc_alarm_template.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="HAL_Driver"/>
|
||||
<entry excluding="Third_Party/FreeRTOS/Source/portable/MemMang/heap_1.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_2.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_3.c|Third_Party/FreeRTOS/Source/portable/MemMang/heap_5.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="Middlewares"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="inc"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="src"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name="startup"/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="TS100.fr.ac6.managedbuild.target.gnu.cross.exe.1768512215" name="Executable" projectType="fr.ac6.managedbuild.target.gnu.cross.exe"/>
|
||||
5
workspace/TS100/.gitignore
vendored
Normal file
5
workspace/TS100/.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
/Debug/
|
||||
/Release/
|
||||
/Hexfile/
|
||||
/Objects/
|
||||
|
||||
15
workspace/TS100/.settings/language.settings.xml
Normal file
15
workspace/TS100/.settings/language.settings.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project>
|
||||
<configuration id="fr.ac6.managedbuild.config.gnu.cross.exe.debug.1352500998" name="Debug">
|
||||
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
|
||||
<provider class="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" console="false" env-hash="-283880394950776525" id="fr.ac6.mcu.ide.build.CrossBuiltinSpecsDetector" keep-relative-paths="false" name="Ac6 SW4 STM32 MCU Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
</extension>
|
||||
</configuration>
|
||||
</project>
|
||||
66
workspace/TS100/.vscode/c_cpp_properties.json
vendored
Normal file
66
workspace/TS100/.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"defines": ["STM32F103T8Ux","STM32F1","STM32","USE_HAL_DRIVER","STM32F103xB","USE_RTOS_SYSTICK"],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"/usr/include",
|
||||
"/usr/local/include",
|
||||
"${workspaceFolder}"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"macFrameworkPath": [
|
||||
"/System/Library/Frameworks",
|
||||
"/Library/Frameworks"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "STM32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}",
|
||||
"/usr/include/c++/5",
|
||||
"/usr/include/x86_64-linux-gnu/c++/5",
|
||||
"/usr/include/c++/5/backward",
|
||||
"/usr/lib/llvm-5.0/lib/clang/5.0.0/include",
|
||||
"/usr/local/include",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"/usr/include",
|
||||
"${workspaceFolder}/inc",
|
||||
"${workspaceFolder}/HAL_Driver/Inc",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS",
|
||||
"${workspaceFolder}/CMSIS/device",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/include",
|
||||
"${workspaceFolder}/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3"
|
||||
],
|
||||
"defines": [],
|
||||
"intelliSenseMode": "clang-x64",
|
||||
"browse": {
|
||||
"path": [
|
||||
"${workspaceFolder}",
|
||||
"/usr/include/c++/5",
|
||||
"/usr/include/x86_64-linux-gnu/c++/5",
|
||||
"/usr/include/c++/5/backward",
|
||||
"/usr/lib/llvm-5.0/lib/clang/5.0.0/include",
|
||||
"/usr/local/include",
|
||||
"/usr/include/x86_64-linux-gnu",
|
||||
"/usr/include"
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
},
|
||||
"compilerPath": "/usr/bin/clang++-5.0",
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
}
|
||||
],
|
||||
"version": 3
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -3467,48 +3467,7 @@ void HAL_I2C_EV_IRQHandler(I2C_HandleTypeDef *hi2c)
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Slave mode selected */
|
||||
else
|
||||
{
|
||||
/* ADDR set --------------------------------------------------------------*/
|
||||
if(((sr1itflags & I2C_FLAG_ADDR) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
|
||||
{
|
||||
I2C_Slave_ADDR(hi2c);
|
||||
}
|
||||
/* STOPF set --------------------------------------------------------------*/
|
||||
else if(((sr1itflags & I2C_FLAG_STOPF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
|
||||
{
|
||||
I2C_Slave_STOPF(hi2c);
|
||||
}
|
||||
/* I2C in mode Transmitter -----------------------------------------------*/
|
||||
else if((sr2itflags & I2C_FLAG_TRA) != RESET)
|
||||
{
|
||||
/* TXE set and BTF reset -----------------------------------------------*/
|
||||
if(((sr1itflags & I2C_FLAG_TXE) != RESET) && ((itsources & I2C_IT_BUF) != RESET) && ((sr1itflags & I2C_FLAG_BTF) == RESET))
|
||||
{
|
||||
I2C_SlaveTransmit_TXE(hi2c);
|
||||
}
|
||||
/* BTF set -------------------------------------------------------------*/
|
||||
else if(((sr1itflags & I2C_FLAG_BTF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
|
||||
{
|
||||
I2C_SlaveTransmit_BTF(hi2c);
|
||||
}
|
||||
}
|
||||
/* I2C in mode Receiver --------------------------------------------------*/
|
||||
else
|
||||
{
|
||||
/* RXNE set and BTF reset ----------------------------------------------*/
|
||||
if(((sr1itflags & I2C_FLAG_RXNE) != RESET) && ((itsources & I2C_IT_BUF) != RESET) && ((sr1itflags & I2C_FLAG_BTF) == RESET))
|
||||
{
|
||||
I2C_SlaveReceive_RXNE(hi2c);
|
||||
}
|
||||
/* BTF set -------------------------------------------------------------*/
|
||||
else if(((sr1itflags & I2C_FLAG_BTF) != RESET) && ((itsources & I2C_IT_EVT) != RESET))
|
||||
{
|
||||
I2C_SlaveReceive_BTF(hi2c);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4280,7 +4280,7 @@ uint32_t HAL_TIM_ReadCapturedValue(TIM_HandleTypeDef *htim, uint32_t Channel)
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Period elapsed callback in non blocking mode
|
||||
* @brief Period elapsed callback in non blocking mode
|
||||
* @param htim : TIM handle
|
||||
* @retval None
|
||||
*/
|
||||
|
||||
@@ -1,307 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f1xx_hal_timebase_rtc_alarm_template.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.1.1
|
||||
* @date 12-May-2017
|
||||
* @brief HAL time base based on the hardware RTC_ALARM.
|
||||
*
|
||||
* This file override the native HAL time base functions (defined as weak)
|
||||
* to use the RTC ALARM for time base generation:
|
||||
* + Intializes the RTC peripheral to increment the seconds registers each 1ms
|
||||
* + The alarm is configured to assert an interrupt when the RTC reaches 1ms
|
||||
* + HAL_IncTick is called at each Alarm event and the time is reset to 00:00:00
|
||||
* + HSE (default), LSE or LSI can be selected as RTC clock source
|
||||
@verbatim
|
||||
==============================================================================
|
||||
##### How to use this driver #####
|
||||
==============================================================================
|
||||
[..]
|
||||
This file must be copied to the application folder and modified as follows:
|
||||
(#) Rename it to 'stm32f1xx_hal_timebase_rtc_alarm.c'
|
||||
(#) Add this file and the RTC HAL drivers to your project and uncomment
|
||||
HAL_RTC_MODULE_ENABLED define in stm32f1xx_hal_conf.h
|
||||
|
||||
[..]
|
||||
(@) HAL RTC alarm and HAL RTC wakeup drivers can<61>t be used with low power modes:
|
||||
The wake up capability of the RTC may be intrusive in case of prior low power mode
|
||||
configuration requiring different wake up sources.
|
||||
Application/Example behavior is no more guaranteed
|
||||
(@) The stm32f1xx_hal_timebase_tim use is recommended for the Applications/Examples
|
||||
requiring low power modes
|
||||
|
||||
@endverbatim
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
/** @addtogroup STM32F1xx_HAL_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup HAL_TimeBase_RTC_Alarm_Template HAL TimeBase RTC Alarm Template
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
|
||||
/* Uncomment the line below to select the appropriate RTC Clock source for your application:
|
||||
+ RTC_CLOCK_SOURCE_HSE: can be selected for applications requiring timing precision.
|
||||
+ RTC_CLOCK_SOURCE_LSE: can be selected for applications with low constraint on timing
|
||||
precision.
|
||||
+ RTC_CLOCK_SOURCE_LSI: can be selected for applications with low constraint on timing
|
||||
precision.
|
||||
*/
|
||||
#define RTC_CLOCK_SOURCE_HSE
|
||||
/* #define RTC_CLOCK_SOURCE_LSE */
|
||||
/* #define RTC_CLOCK_SOURCE_LSI */
|
||||
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
RTC_HandleTypeDef hRTC_Handle;
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
void RTC_Alarm_IRQHandler(void);
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief This function configures the RTC_ALARMA as a time base source.
|
||||
* The time source is configured to have 1ms time base with a dedicated
|
||||
* Tick interrupt priority.
|
||||
* @note This function is called automatically at the beginning of program after
|
||||
* reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
|
||||
* @param TickPriority: Tick interrupt priority.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
|
||||
{
|
||||
__IO uint32_t counter = 0U;
|
||||
|
||||
RCC_OscInitTypeDef RCC_OscInitStruct;
|
||||
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
|
||||
|
||||
#ifdef RTC_CLOCK_SOURCE_LSE
|
||||
/* Configue LSE as RTC clock soucre */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSE;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
|
||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
|
||||
#elif defined (RTC_CLOCK_SOURCE_LSI)
|
||||
/* Configue LSI as RTC clock soucre */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_LSI;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
|
||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
|
||||
#elif defined (RTC_CLOCK_SOURCE_HSE)
|
||||
/* Configue HSE as RTC clock soucre */
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
|
||||
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
|
||||
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_HSE_DIV128;
|
||||
#else
|
||||
#error Please select the RTC Clock source
|
||||
#endif /* RTC_CLOCK_SOURCE_LSE */
|
||||
|
||||
if(HAL_RCC_OscConfig(&RCC_OscInitStruct) == HAL_OK)
|
||||
{
|
||||
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
|
||||
if(HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) == HAL_OK)
|
||||
{
|
||||
/* Enable RTC Clock */
|
||||
__HAL_RCC_RTC_ENABLE();
|
||||
|
||||
hRTC_Handle.Instance = RTC;
|
||||
/* Configure RTC time base to 10Khz */
|
||||
hRTC_Handle.Init.AsynchPrediv = (HAL_RCCEx_GetPeriphCLKFreq(RCC_PERIPHCLK_RTC) / 10000) - 1;
|
||||
hRTC_Handle.Init.OutPut = RTC_OUTPUTSOURCE_NONE;
|
||||
HAL_RTC_Init(&hRTC_Handle);
|
||||
|
||||
/* Disable the write protection for RTC registers */
|
||||
__HAL_RTC_WRITEPROTECTION_DISABLE(&hRTC_Handle);
|
||||
|
||||
/* Clear flag alarm A */
|
||||
__HAL_RTC_ALARM_CLEAR_FLAG(&hRTC_Handle, RTC_FLAG_ALRAF);
|
||||
|
||||
counter = 0U;
|
||||
/* Wait till RTC ALRAF flag is set and if Time out is reached exit */
|
||||
while(__HAL_RTC_ALARM_GET_FLAG(&hRTC_Handle, RTC_FLAG_ALRAF) != RESET)
|
||||
{
|
||||
if(counter++ == SystemCoreClock /48U) /* Timeout = ~ 1s */
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Set RTC COUNTER MSB word */
|
||||
hRTC_Handle.Instance->ALRH = 0x00U;
|
||||
/* Set RTC COUNTER LSB word */
|
||||
hRTC_Handle.Instance->ALRL = 0x09U;
|
||||
|
||||
/* RTC Alarm Interrupt Configuration: EXTI configuration */
|
||||
__HAL_RTC_ALARM_EXTI_ENABLE_IT();
|
||||
__HAL_RTC_ALARM_EXTI_ENABLE_RISING_EDGE();
|
||||
|
||||
/* Clear Second and overflow flags */
|
||||
CLEAR_BIT(hRTC_Handle.Instance->CRL, (RTC_FLAG_SEC | RTC_FLAG_OW));
|
||||
|
||||
/* Set RTC COUNTER MSB word */
|
||||
hRTC_Handle.Instance->CNTH = 0x00U;
|
||||
/* Set RTC COUNTER LSB word */
|
||||
hRTC_Handle.Instance->CNTL = 0x00U;
|
||||
|
||||
/* Configure the Alarm interrupt */
|
||||
__HAL_RTC_ALARM_ENABLE_IT(&hRTC_Handle, RTC_IT_ALRA);
|
||||
|
||||
/* Enable the write protection for RTC registers */
|
||||
__HAL_RTC_WRITEPROTECTION_ENABLE(&hRTC_Handle);
|
||||
|
||||
/* Wait till RTC is in INIT state and if Time out is reached exit */
|
||||
counter = 0U;
|
||||
while((hRTC_Handle.Instance->CRL & RTC_CRL_RTOFF) == (uint32_t)RESET)
|
||||
{
|
||||
if(counter++ == SystemCoreClock /48U) /* Timeout = ~ 1s */
|
||||
{
|
||||
return HAL_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
HAL_NVIC_SetPriority(RTC_Alarm_IRQn, TickPriority, 0U);
|
||||
HAL_NVIC_EnableIRQ(RTC_Alarm_IRQn);
|
||||
return HAL_OK;
|
||||
}
|
||||
}
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Suspend Tick increment.
|
||||
* @note Disable the tick increment by disabling RTC ALARM interrupt.
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_SuspendTick(void)
|
||||
{
|
||||
/* Disable RTC ALARM update Interrupt */
|
||||
__HAL_RTC_ALARM_DISABLE_IT(&hRTC_Handle, RTC_IT_ALRA);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resume Tick increment.
|
||||
* @note Enable the tick increment by Enabling RTC ALARM interrupt.
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_ResumeTick(void)
|
||||
{
|
||||
__IO uint32_t counter = 0U;
|
||||
|
||||
/* Disable the write protection for RTC registers */
|
||||
__HAL_RTC_WRITEPROTECTION_DISABLE(&hRTC_Handle);
|
||||
|
||||
/* Set RTC COUNTER MSB word */
|
||||
hRTC_Handle.Instance->CNTH = 0x00U;
|
||||
/* Set RTC COUNTER LSB word */
|
||||
hRTC_Handle.Instance->CNTL = 0x00U;
|
||||
|
||||
/* Clear Second and overflow flags */
|
||||
CLEAR_BIT(hRTC_Handle.Instance->CRL, (RTC_FLAG_SEC | RTC_FLAG_OW | RTC_FLAG_ALRAF));
|
||||
|
||||
/* Enable RTC ALARM Update interrupt */
|
||||
__HAL_RTC_ALARM_ENABLE_IT(&hRTC_Handle, RTC_IT_ALRA);
|
||||
|
||||
/* Enable the write protection for RTC registers */
|
||||
__HAL_RTC_WRITEPROTECTION_ENABLE(&hRTC_Handle);
|
||||
|
||||
/* Wait till RTC is in INIT state and if Time out is reached exit */
|
||||
while((hRTC_Handle.Instance->CRL & RTC_CRL_RTOFF) == (uint32_t)RESET)
|
||||
{
|
||||
if(counter++ == SystemCoreClock /48U) /* Timeout = ~ 1s */
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ALARM A Event Callback in non blocking mode
|
||||
* @note This function is called when RTC_ALARM interrupt took place, inside
|
||||
* RTC_ALARM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
|
||||
* a global variable "uwTick" used as application time base.
|
||||
* @param hrtc : RTC handle
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_RTC_AlarmAEventCallback(RTC_HandleTypeDef *hrtc)
|
||||
{
|
||||
__IO uint32_t counter = 0U;
|
||||
|
||||
HAL_IncTick();
|
||||
|
||||
__HAL_RTC_WRITEPROTECTION_DISABLE(hrtc);
|
||||
|
||||
/* Set RTC COUNTER MSB word */
|
||||
WRITE_REG(hrtc->Instance->CNTH, 0x00U);
|
||||
/* Set RTC COUNTER LSB word */
|
||||
WRITE_REG(hrtc->Instance->CNTL, 0x00U);
|
||||
|
||||
/* Clear Second and overflow flags */
|
||||
CLEAR_BIT(hrtc->Instance->CRL, (RTC_FLAG_SEC | RTC_FLAG_OW));
|
||||
|
||||
/* Enable the write protection for RTC registers */
|
||||
__HAL_RTC_WRITEPROTECTION_ENABLE(hrtc);
|
||||
|
||||
/* Wait till RTC is in INIT state and if Time out is reached exit */
|
||||
while((hrtc->Instance->CRL & RTC_CRL_RTOFF) == (uint32_t)RESET)
|
||||
{
|
||||
if(counter++ == SystemCoreClock /48U) /* Timeout = ~ 1s */
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles RTC ALARM interrupt request.
|
||||
* @retval None
|
||||
*/
|
||||
void RTC_Alarm_IRQHandler(void)
|
||||
{
|
||||
HAL_RTC_AlarmIRQHandler(&hRTC_Handle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
@@ -1,184 +0,0 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
* @file stm32f1xx_hal_timebase_tim_template.c
|
||||
* @author MCD Application Team
|
||||
* @version V1.1.1
|
||||
* @date 12-May-2017
|
||||
* @brief HAL time base based on the hardware TIM Template.
|
||||
*
|
||||
* This file overrides the native HAL time base functions (defined as weak)
|
||||
* the TIM time base:
|
||||
* + Intializes the TIM peripheral generate a Period elapsed Event each 1ms
|
||||
* + HAL_IncTick is called inside HAL_TIM_PeriodElapsedCallback ie each 1ms
|
||||
*
|
||||
******************************************************************************
|
||||
* @attention
|
||||
*
|
||||
* <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification,
|
||||
* are permitted provided that the following conditions are met:
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of STMicroelectronics nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes ------------------------------------------------------------------*/
|
||||
#include "stm32f1xx_hal.h"
|
||||
|
||||
/** @addtogroup STM32F1xx_HAL_Driver
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup HAL_TimeBase_TIM
|
||||
* @{
|
||||
*/
|
||||
|
||||
/* Private typedef -----------------------------------------------------------*/
|
||||
/* Private define ------------------------------------------------------------*/
|
||||
/* Private macro -------------------------------------------------------------*/
|
||||
/* Private variables ---------------------------------------------------------*/
|
||||
TIM_HandleTypeDef TimHandle;
|
||||
/* Private function prototypes -----------------------------------------------*/
|
||||
void TIM2_IRQHandler(void);
|
||||
/* Private functions ---------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* @brief This function configures the TIM2 as a time base source.
|
||||
* The time source is configured to have 1ms time base with a dedicated
|
||||
* Tick interrupt priority.
|
||||
* @note This function is called automatically at the beginning of program after
|
||||
* reset by HAL_Init() or at any time when clock is configured, by HAL_RCC_ClockConfig().
|
||||
* @param TickPriority: Tick interrupt priority.
|
||||
* @retval HAL status
|
||||
*/
|
||||
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority)
|
||||
{
|
||||
RCC_ClkInitTypeDef clkconfig;
|
||||
uint32_t uwTimclock, uwAPB1Prescaler = 0U;
|
||||
uint32_t uwPrescalerValue = 0U;
|
||||
uint32_t pFLatency;
|
||||
|
||||
/*Configure the TIM2 IRQ priority */
|
||||
HAL_NVIC_SetPriority(TIM2_IRQn, TickPriority ,0U);
|
||||
|
||||
/* Enable the TIM2 global Interrupt */
|
||||
HAL_NVIC_EnableIRQ(TIM2_IRQn);
|
||||
|
||||
/* Enable TIM2 clock */
|
||||
__HAL_RCC_TIM2_CLK_ENABLE();
|
||||
|
||||
/* Get clock configuration */
|
||||
HAL_RCC_GetClockConfig(&clkconfig, &pFLatency);
|
||||
|
||||
/* Get APB1 prescaler */
|
||||
uwAPB1Prescaler = clkconfig.APB1CLKDivider;
|
||||
|
||||
/* Compute TIM2 clock */
|
||||
if (uwAPB1Prescaler == RCC_HCLK_DIV1)
|
||||
{
|
||||
uwTimclock = HAL_RCC_GetPCLK1Freq();
|
||||
}
|
||||
else
|
||||
{
|
||||
uwTimclock = 2*HAL_RCC_GetPCLK1Freq();
|
||||
}
|
||||
|
||||
/* Compute the prescaler value to have TIM2 counter clock equal to 1MHz */
|
||||
uwPrescalerValue = (uint32_t) ((uwTimclock / 1000000U) - 1U);
|
||||
|
||||
/* Initialize TIM2 */
|
||||
TimHandle.Instance = TIM2;
|
||||
|
||||
/* Initialize TIMx peripheral as follow:
|
||||
+ Period = [(TIM2CLK/1000) - 1]. to have a (1/1000) s time base.
|
||||
+ Prescaler = (uwTimclock/1000000 - 1) to have a 1MHz counter clock.
|
||||
+ ClockDivision = 0
|
||||
+ Counter direction = Up
|
||||
*/
|
||||
TimHandle.Init.Period = (1000000U / 1000U) - 1U;
|
||||
TimHandle.Init.Prescaler = uwPrescalerValue;
|
||||
TimHandle.Init.ClockDivision = 0U;
|
||||
TimHandle.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
TimHandle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
if(HAL_TIM_Base_Init(&TimHandle) == HAL_OK)
|
||||
{
|
||||
/* Start the TIM time Base generation in interrupt mode */
|
||||
return HAL_TIM_Base_Start_IT(&TimHandle);
|
||||
}
|
||||
|
||||
/* Return function status */
|
||||
return HAL_ERROR;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Suspend Tick increment.
|
||||
* @note Disable the tick increment by disabling TIM2 update interrupt.
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_SuspendTick(void)
|
||||
{
|
||||
/* Disable TIM2 update Interrupt */
|
||||
__HAL_TIM_DISABLE_IT(&TimHandle, TIM_IT_UPDATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Resume Tick increment.
|
||||
* @note Enable the tick increment by Enabling TIM2 update interrupt.
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_ResumeTick(void)
|
||||
{
|
||||
/* Enable TIM2 Update interrupt */
|
||||
__HAL_TIM_ENABLE_IT(&TimHandle, TIM_IT_UPDATE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Period elapsed callback in non blocking mode
|
||||
* @note This function is called when TIM2 interrupt took place, inside
|
||||
* HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment
|
||||
* a global variable "uwTick" used as application time base.
|
||||
* @param htim : TIM handle
|
||||
* @retval None
|
||||
*/
|
||||
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
|
||||
{
|
||||
HAL_IncTick();
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief This function handles TIM interrupt request.
|
||||
* @retval None
|
||||
*/
|
||||
void TIM2_IRQHandler(void)
|
||||
{
|
||||
HAL_TIM_IRQHandler(&TimHandle);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
||||
229
workspace/TS100/Makefile
Normal file
229
workspace/TS100/Makefile
Normal file
@@ -0,0 +1,229 @@
|
||||
|
||||
OUTPUT_EXE=TS100_$(lang)
|
||||
ifndef lang
|
||||
lang:= EN
|
||||
endif
|
||||
|
||||
# Discover the source files to build
|
||||
SOURCE := $(shell find . -type f -name '*.c')
|
||||
SOURCE_CPP := $(shell find . -type f -name '*.cpp')
|
||||
SOURCES := $(shell find . -type f -name '*.c*')
|
||||
S_SRCS := $(shell find . -type f -name '*.s')
|
||||
|
||||
APP_INC_DIR = ./inc
|
||||
CMSIS_DEVICE_INC_DIR = ./CMSIS/device
|
||||
CMSIS_CORE_INC_DIR = ./CMSIS/core
|
||||
HAL_INC_DIR = ./HAL_Driver/Inc
|
||||
FRTOS_CMIS_INC_DIR = ./Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS
|
||||
FRTOS_INC_DIR = ./Middlewares/Third_Party/FreeRTOS/Source/include
|
||||
FRTOS_GCC_INC_DIR = ./Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM3
|
||||
|
||||
INCLUDES = -I$(APP_INC_DIR) \
|
||||
-I$(CMSIS_DEVICE_INC_DIR)\
|
||||
-I$(CMSIS_CORE_INC_DIR) \
|
||||
-I$(HAL_INC_DIR) \
|
||||
-I$(FRTOS_CMIS_INC_DIR) \
|
||||
-I$(FRTOS_INC_DIR) \
|
||||
-I$(FRTOS_GCC_INC_DIR)
|
||||
# output folder
|
||||
HEXFILE_DIR=Hexfile
|
||||
|
||||
# temporary objects folder
|
||||
OUTPUT_DIR=Objects
|
||||
|
||||
# code optimisation ------------------------------------------------------------
|
||||
OPTIM=-Os -flto -finline-small-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections
|
||||
|
||||
|
||||
# global defines ---------------------------------------------------------------
|
||||
GLOBAL_DEFINES += -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D LANG_$(lang) -D LANG
|
||||
|
||||
# Enable debug code generation
|
||||
DEBUG=-g
|
||||
# Without debug code
|
||||
#DEBUG=
|
||||
|
||||
|
||||
# libs -------------------------------------------------------------------------
|
||||
LIBS=
|
||||
|
||||
# linker script ----------------------------------------------------------------
|
||||
LDSCRIPT=LinkerScript.ld
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
COMPILER=gcc
|
||||
# programs ---------------------------------------------------------------------
|
||||
CC=arm-none-eabi-gcc
|
||||
CPP=arm-none-eabi-g++
|
||||
AS=arm-none-eabi-as
|
||||
GCOV=arm-none-eabi-gcov
|
||||
OBJCOPY=arm-none-eabi-objcopy
|
||||
OBJDUMP=arm-none-eabi-objdump
|
||||
SIZE=arm-none-eabi-size
|
||||
SREC=srec_cat
|
||||
SREC_INFO=srec_info
|
||||
|
||||
|
||||
|
||||
|
||||
# linker flags -----------------------------------------------------------------
|
||||
LINKER_FLAGS=-Wl,--gc-sections \
|
||||
-o$(OUT_HEXFILE).elf \
|
||||
-Wl,-Map=$(OUT_HEXFILE).map \
|
||||
-mcpu=cortex-m3 \
|
||||
-mthumb \
|
||||
-mfloat-abi=soft \
|
||||
-lm -Os -flto -Wl,--undefined=vTaskSwitchContext
|
||||
|
||||
# compiler flags ---------------------------------------------------------------
|
||||
CPUFLAGS=-D GCC_ARMCM3 \
|
||||
-D ARM_MATH_CM3 \
|
||||
-D STM32F10X_MD \
|
||||
-mthumb \
|
||||
-mcpu=cortex-m3 \
|
||||
-mfloat-abi=soft
|
||||
|
||||
|
||||
|
||||
CHECKOPTIONS= -Wall \
|
||||
-Wextra \
|
||||
-Wunused \
|
||||
-Wcomment \
|
||||
-Wtrigraphs \
|
||||
-Wuninitialized \
|
||||
-Wmissing-braces \
|
||||
-Wfloat-equal \
|
||||
-Wunreachable-code \
|
||||
-Wswitch-default \
|
||||
-Wreturn-type \
|
||||
-Wundef \
|
||||
-Wparentheses \
|
||||
-Wnonnull \
|
||||
-Winit-self \
|
||||
-Wmissing-include-dirs \
|
||||
-Wsequence-point \
|
||||
-Wswitch \
|
||||
-Wformat \
|
||||
-Wsign-compare \
|
||||
-Waddress \
|
||||
-Waggregate-return \
|
||||
-Wmissing-field-initializers \
|
||||
-Winline \
|
||||
-Wshadow \
|
||||
-Wno-unused-parameter \
|
||||
-Wdouble-promotion
|
||||
|
||||
|
||||
CHECKOPTIONS_C= -Wbad-function-cast
|
||||
|
||||
|
||||
CXXFLAGS=$(CPUFLAGS) \
|
||||
$(DEBUG) \
|
||||
$(INCLUDES) \
|
||||
$(GLOBAL_DEFINES) \
|
||||
-D${COMPILER} \
|
||||
-MMD \
|
||||
$(CHECKOPTIONS) \
|
||||
-std=c++11 \
|
||||
$(OPTIM) \
|
||||
-fno-common \
|
||||
-ffreestanding \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fno-non-call-exceptions \
|
||||
-fno-use-cxa-atexit \
|
||||
-fno-strict-aliasing \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-fno-threadsafe-statics \
|
||||
-T$(LDSCRIPT)
|
||||
|
||||
|
||||
CFLAGS=$(CPUFLAGS) \
|
||||
$(DEBUG) \
|
||||
$(INCLUDES) \
|
||||
$(CHECKOPTIONS_C) \
|
||||
$(GLOBAL_DEFINES) \
|
||||
-D${COMPILER} \
|
||||
-MMD \
|
||||
-std=gnu99 \
|
||||
$(OPTIM) \
|
||||
-fno-common \
|
||||
-ffreestanding \
|
||||
-T$(LDSCRIPT) \
|
||||
-c
|
||||
|
||||
|
||||
AFLAGS=$(CPUFLAGS) \
|
||||
$(DEBUG) \
|
||||
$(INCLUDES)
|
||||
|
||||
|
||||
ifeq (${COMPILER}, gcc)
|
||||
AFLAGS += -ffunction-sections -fdata-sections
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
endif
|
||||
|
||||
|
||||
|
||||
OBJS = $(SOURCE:.c=.o)
|
||||
OBJS_CPP = $(SOURCE_CPP:.cpp=.o)
|
||||
OBJS_S = $(S_SRCS:.s=.o)
|
||||
|
||||
|
||||
|
||||
OUT_OBJS=$(addprefix $(OUTPUT_DIR)/,$(OBJS))
|
||||
OUT_OBJS_CPP=$(addprefix $(OUTPUT_DIR)/,$(OBJS_CPP))
|
||||
OUT_OBJS_S=$(addprefix $(OUTPUT_DIR)/,$(OBJS_S))
|
||||
OUT_HEXFILE=$(addprefix $(HEXFILE_DIR)/,$(OUTPUT_EXE))
|
||||
|
||||
all: $(OUT_HEXFILE).hex $(OUT_HEXFILE).bin
|
||||
|
||||
#
|
||||
# The rule to create the target directory
|
||||
#
|
||||
|
||||
# Create hexfile
|
||||
%.hex : %.elf
|
||||
$(SIZE) $^
|
||||
$(OBJCOPY) $^ -O ihex $@
|
||||
|
||||
%.bin : %.elf
|
||||
$(SIZE) $^
|
||||
$(OBJCOPY) $^ -O binary $@
|
||||
|
||||
$(OUT_HEXFILE).elf : $(OUT_OBJS) $(OUT_OBJS_CPP) $(OUT_OBJS_S) Makefile $(LDSCRIPT)
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Linking $(OUTPUT_EXE).elf
|
||||
@$(CPP) $(CXXFLAGS) $(OUT_OBJS_S) $(OUT_OBJS) $(OUT_OBJS_CPP) $(LIBS) $(LINKER_FLAGS)
|
||||
|
||||
$(OUT_OBJS): $(OUTPUT_DIR)/%.o : %.c Makefile
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Compiling ${<}
|
||||
# @echo $(CFLAGS)
|
||||
@$(CC) -c $(CFLAGS) $< -o $@
|
||||
@$(OBJDUMP) -d -S $@ > $@.lst
|
||||
|
||||
$(OUT_OBJS_CPP): $(OUTPUT_DIR)/%.o : %.cpp Makefile
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo Compiling ${<}
|
||||
@$(CPP) -c $(CXXFLAGS) $< -o $@
|
||||
@$(OBJDUMP) -d -S $@ > $@.lst
|
||||
|
||||
$(OUT_OBJS_S): $(OUTPUT_DIR)/%.o: %.s Makefile
|
||||
@test -d $(@D) || mkdir -p $(@D)
|
||||
@echo 'Building file: $<'
|
||||
@echo 'Invoking: MCU GCC Assembler'
|
||||
@$(AS) -mcpu=cortex-m3 -mthumb -mfloat-abi=soft $(INCLUDES) -g $< -o $@
|
||||
@echo 'Finished building: $<'
|
||||
@echo ' '
|
||||
|
||||
|
||||
clean :
|
||||
rm -Rf $(OUTPUT_DIR)
|
||||
rm -Rf $(HEXFILE_DIR)
|
||||
|
||||
# pull in dependency info for *existing* .o files
|
||||
-include $(OUT_OBJS:.o=.d)
|
||||
-include $(OUT_OBJS_CPP:.o=.d)
|
||||
|
||||
@@ -1,188 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* The simplest possible implementation of pvPortMalloc(). Note that this
|
||||
* implementation does NOT allow allocated memory to be freed again.
|
||||
*
|
||||
* See heap_2.c, heap_3.c and heap_4.c for alternative implementations, and the
|
||||
* memory management pages of http://www.FreeRTOS.org for more information.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
|
||||
all the API functions to use the MPU wrappers. That should only be done when
|
||||
task.h is included from an application file. */
|
||||
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
|
||||
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
|
||||
#endif
|
||||
|
||||
/* A few bytes might be lost to byte aligning the heap start address. */
|
||||
#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
|
||||
|
||||
/* Allocate the memory for the heap. */
|
||||
/* Allocate the memory for the heap. */
|
||||
#if( configAPPLICATION_ALLOCATED_HEAP == 1 )
|
||||
/* The application writer has already defined the array used for the RTOS
|
||||
heap - probably so it can be placed in a special segment or address. */
|
||||
extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||
#else
|
||||
static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||
#endif /* configAPPLICATION_ALLOCATED_HEAP */
|
||||
|
||||
static size_t xNextFreeByte = ( size_t ) 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void *pvPortMalloc( size_t xWantedSize )
|
||||
{
|
||||
void *pvReturn = NULL;
|
||||
static uint8_t *pucAlignedHeap = NULL;
|
||||
|
||||
/* Ensure that blocks are always aligned to the required number of bytes. */
|
||||
#if( portBYTE_ALIGNMENT != 1 )
|
||||
{
|
||||
if( xWantedSize & portBYTE_ALIGNMENT_MASK )
|
||||
{
|
||||
/* Byte alignment required. */
|
||||
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
if( pucAlignedHeap == NULL )
|
||||
{
|
||||
/* Ensure the heap starts on a correctly aligned boundary. */
|
||||
pucAlignedHeap = ( uint8_t * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||
}
|
||||
|
||||
/* Check there is enough room left for the allocation. */
|
||||
if( ( ( xNextFreeByte + xWantedSize ) < configADJUSTED_HEAP_SIZE ) &&
|
||||
( ( xNextFreeByte + xWantedSize ) > xNextFreeByte ) )/* Check for overflow. */
|
||||
{
|
||||
/* Return the next free byte then increment the index past this
|
||||
block. */
|
||||
pvReturn = pucAlignedHeap + xNextFreeByte;
|
||||
xNextFreeByte += xWantedSize;
|
||||
}
|
||||
|
||||
traceMALLOC( pvReturn, xWantedSize );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
|
||||
{
|
||||
if( pvReturn == NULL )
|
||||
{
|
||||
extern void vApplicationMallocFailedHook( void );
|
||||
vApplicationMallocFailedHook();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortFree( void *pv )
|
||||
{
|
||||
/* Memory cannot be freed using this scheme. See heap_2.c, heap_3.c and
|
||||
heap_4.c for alternative implementations, and the memory management pages of
|
||||
http://www.FreeRTOS.org for more information. */
|
||||
( void ) pv;
|
||||
|
||||
/* Force an assert as it is invalid to call this function. */
|
||||
configASSERT( pv == NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortInitialiseBlocks( void )
|
||||
{
|
||||
/* Only required when static memory is not cleared. */
|
||||
xNextFreeByte = ( size_t ) 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
size_t xPortGetFreeHeapSize( void )
|
||||
{
|
||||
return ( configADJUSTED_HEAP_SIZE - xNextFreeByte );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,314 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* A sample implementation of pvPortMalloc() and vPortFree() that permits
|
||||
* allocated blocks to be freed, but does not combine adjacent free blocks
|
||||
* into a single larger block (and so will fragment memory). See heap_4.c for
|
||||
* an equivalent that does combine adjacent blocks into single larger blocks.
|
||||
*
|
||||
* See heap_1.c, heap_3.c and heap_4.c for alternative implementations, and the
|
||||
* memory management pages of http://www.FreeRTOS.org for more information.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
|
||||
all the API functions to use the MPU wrappers. That should only be done when
|
||||
task.h is included from an application file. */
|
||||
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
|
||||
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
|
||||
#endif
|
||||
|
||||
/* A few bytes might be lost to byte aligning the heap start address. */
|
||||
#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
|
||||
|
||||
/*
|
||||
* Initialises the heap structures before their first use.
|
||||
*/
|
||||
static void prvHeapInit( void );
|
||||
|
||||
/* Allocate the memory for the heap. */
|
||||
#if( configAPPLICATION_ALLOCATED_HEAP == 1 )
|
||||
/* The application writer has already defined the array used for the RTOS
|
||||
heap - probably so it can be placed in a special segment or address. */
|
||||
extern uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||
#else
|
||||
static uint8_t ucHeap[ configTOTAL_HEAP_SIZE ];
|
||||
#endif /* configAPPLICATION_ALLOCATED_HEAP */
|
||||
|
||||
|
||||
/* Define the linked list structure. This is used to link free blocks in order
|
||||
of their size. */
|
||||
typedef struct A_BLOCK_LINK
|
||||
{
|
||||
struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */
|
||||
size_t xBlockSize; /*<< The size of the free block. */
|
||||
} BlockLink_t;
|
||||
|
||||
|
||||
static const uint16_t heapSTRUCT_SIZE = ( ( sizeof ( BlockLink_t ) + ( portBYTE_ALIGNMENT - 1 ) ) & ~portBYTE_ALIGNMENT_MASK );
|
||||
#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( heapSTRUCT_SIZE * 2 ) )
|
||||
|
||||
/* Create a couple of list links to mark the start and end of the list. */
|
||||
static BlockLink_t xStart, xEnd;
|
||||
|
||||
/* Keeps track of the number of free bytes remaining, but says nothing about
|
||||
fragmentation. */
|
||||
static size_t xFreeBytesRemaining = configADJUSTED_HEAP_SIZE;
|
||||
|
||||
/* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */
|
||||
|
||||
/*
|
||||
* Insert a block into the list of free blocks - which is ordered by size of
|
||||
* the block. Small blocks at the start of the list and large blocks at the end
|
||||
* of the list.
|
||||
*/
|
||||
#define prvInsertBlockIntoFreeList( pxBlockToInsert ) \
|
||||
{ \
|
||||
BlockLink_t *pxIterator; \
|
||||
size_t xBlockSize; \
|
||||
\
|
||||
xBlockSize = pxBlockToInsert->xBlockSize; \
|
||||
\
|
||||
/* Iterate through the list until a block is found that has a larger size */ \
|
||||
/* than the block we are inserting. */ \
|
||||
for( pxIterator = &xStart; pxIterator->pxNextFreeBlock->xBlockSize < xBlockSize; pxIterator = pxIterator->pxNextFreeBlock ) \
|
||||
{ \
|
||||
/* There is nothing to do here - just iterate to the correct position. */ \
|
||||
} \
|
||||
\
|
||||
/* Update the list to include the block being inserted in the correct */ \
|
||||
/* position. */ \
|
||||
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; \
|
||||
pxIterator->pxNextFreeBlock = pxBlockToInsert; \
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void *pvPortMalloc( size_t xWantedSize )
|
||||
{
|
||||
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
|
||||
static BaseType_t xHeapHasBeenInitialised = pdFALSE;
|
||||
void *pvReturn = NULL;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
/* If this is the first call to malloc then the heap will require
|
||||
initialisation to setup the list of free blocks. */
|
||||
if( xHeapHasBeenInitialised == pdFALSE )
|
||||
{
|
||||
prvHeapInit();
|
||||
xHeapHasBeenInitialised = pdTRUE;
|
||||
}
|
||||
|
||||
/* The wanted size is increased so it can contain a BlockLink_t
|
||||
structure in addition to the requested amount of bytes. */
|
||||
if( xWantedSize > 0 )
|
||||
{
|
||||
xWantedSize += heapSTRUCT_SIZE;
|
||||
|
||||
/* Ensure that blocks are always aligned to the required number of bytes. */
|
||||
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0 )
|
||||
{
|
||||
/* Byte alignment required. */
|
||||
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
|
||||
}
|
||||
}
|
||||
|
||||
if( ( xWantedSize > 0 ) && ( xWantedSize < configADJUSTED_HEAP_SIZE ) )
|
||||
{
|
||||
/* Blocks are stored in byte order - traverse the list from the start
|
||||
(smallest) block until one of adequate size is found. */
|
||||
pxPreviousBlock = &xStart;
|
||||
pxBlock = xStart.pxNextFreeBlock;
|
||||
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
|
||||
{
|
||||
pxPreviousBlock = pxBlock;
|
||||
pxBlock = pxBlock->pxNextFreeBlock;
|
||||
}
|
||||
|
||||
/* If we found the end marker then a block of adequate size was not found. */
|
||||
if( pxBlock != &xEnd )
|
||||
{
|
||||
/* Return the memory space - jumping over the BlockLink_t structure
|
||||
at its start. */
|
||||
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + heapSTRUCT_SIZE );
|
||||
|
||||
/* This block is being returned for use so must be taken out of the
|
||||
list of free blocks. */
|
||||
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
|
||||
|
||||
/* If the block is larger than required it can be split into two. */
|
||||
if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
|
||||
{
|
||||
/* This block is to be split into two. Create a new block
|
||||
following the number of bytes requested. The void cast is
|
||||
used to prevent byte alignment warnings from the compiler. */
|
||||
pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
|
||||
|
||||
/* Calculate the sizes of two blocks split from the single
|
||||
block. */
|
||||
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
|
||||
pxBlock->xBlockSize = xWantedSize;
|
||||
|
||||
/* Insert the new block into the list of free blocks. */
|
||||
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
|
||||
}
|
||||
|
||||
xFreeBytesRemaining -= pxBlock->xBlockSize;
|
||||
}
|
||||
}
|
||||
|
||||
traceMALLOC( pvReturn, xWantedSize );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
|
||||
{
|
||||
if( pvReturn == NULL )
|
||||
{
|
||||
extern void vApplicationMallocFailedHook( void );
|
||||
vApplicationMallocFailedHook();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortFree( void *pv )
|
||||
{
|
||||
uint8_t *puc = ( uint8_t * ) pv;
|
||||
BlockLink_t *pxLink;
|
||||
|
||||
if( pv != NULL )
|
||||
{
|
||||
/* The memory being freed will have an BlockLink_t structure immediately
|
||||
before it. */
|
||||
puc -= heapSTRUCT_SIZE;
|
||||
|
||||
/* This unexpected casting is to keep some compilers from issuing
|
||||
byte alignment warnings. */
|
||||
pxLink = ( void * ) puc;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
/* Add this block to the list of free blocks. */
|
||||
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
|
||||
xFreeBytesRemaining += pxLink->xBlockSize;
|
||||
traceFREE( pv, pxLink->xBlockSize );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
size_t xPortGetFreeHeapSize( void )
|
||||
{
|
||||
return xFreeBytesRemaining;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortInitialiseBlocks( void )
|
||||
{
|
||||
/* This just exists to keep the linker quiet. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvHeapInit( void )
|
||||
{
|
||||
BlockLink_t *pxFirstFreeBlock;
|
||||
uint8_t *pucAlignedHeap;
|
||||
|
||||
/* Ensure the heap starts on a correctly aligned boundary. */
|
||||
pucAlignedHeap = ( uint8_t * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) );
|
||||
|
||||
/* xStart is used to hold a pointer to the first item in the list of free
|
||||
blocks. The void cast is used to prevent compiler warnings. */
|
||||
xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap;
|
||||
xStart.xBlockSize = ( size_t ) 0;
|
||||
|
||||
/* xEnd is used to mark the end of the list of free blocks. */
|
||||
xEnd.xBlockSize = configADJUSTED_HEAP_SIZE;
|
||||
xEnd.pxNextFreeBlock = NULL;
|
||||
|
||||
/* To start with there is a single free block that is sized to take up the
|
||||
entire heap space. */
|
||||
pxFirstFreeBlock = ( void * ) pucAlignedHeap;
|
||||
pxFirstFreeBlock->xBlockSize = configADJUSTED_HEAP_SIZE;
|
||||
pxFirstFreeBlock->pxNextFreeBlock = &xEnd;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
@@ -1,139 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Implementation of pvPortMalloc() and vPortFree() that relies on the
|
||||
* compilers own malloc() and free() implementations.
|
||||
*
|
||||
* This file can only be used if the linker is configured to to generate
|
||||
* a heap memory area.
|
||||
*
|
||||
* See heap_1.c, heap_2.c and heap_4.c for alternative implementations, and the
|
||||
* memory management pages of http://www.FreeRTOS.org for more information.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
|
||||
all the API functions to use the MPU wrappers. That should only be done when
|
||||
task.h is included from an application file. */
|
||||
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
|
||||
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void *pvPortMalloc( size_t xWantedSize )
|
||||
{
|
||||
void *pvReturn;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
pvReturn = malloc( xWantedSize );
|
||||
traceMALLOC( pvReturn, xWantedSize );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
|
||||
{
|
||||
if( pvReturn == NULL )
|
||||
{
|
||||
extern void vApplicationMallocFailedHook( void );
|
||||
vApplicationMallocFailedHook();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortFree( void *pv )
|
||||
{
|
||||
if( pv )
|
||||
{
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
free( pv );
|
||||
traceFREE( pv, 0 );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,527 +0,0 @@
|
||||
/*
|
||||
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
|
||||
All rights reserved
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>>> AND MODIFIED BY <<<< the FreeRTOS exception.
|
||||
|
||||
***************************************************************************
|
||||
>>! NOTE: The modification to the GPL is included to allow you to !<<
|
||||
>>! distribute a combined work that includes FreeRTOS without being !<<
|
||||
>>! obliged to provide the source code for proprietary components !<<
|
||||
>>! outside of the FreeRTOS kernel. !<<
|
||||
***************************************************************************
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available on the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that is more than just the market leader, it *
|
||||
* is the industry's de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly while simultaneously helping *
|
||||
* to support the FreeRTOS project by purchasing a FreeRTOS *
|
||||
* tutorial book, reference manual, or both: *
|
||||
* http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading
|
||||
the FAQ page "My application does not run, what could be wrong?". Have you
|
||||
defined configASSERT()?
|
||||
|
||||
http://www.FreeRTOS.org/support - In return for receiving this top quality
|
||||
embedded software for free we request you assist our global community by
|
||||
participating in the support forum.
|
||||
|
||||
http://www.FreeRTOS.org/training - Investing in training allows your team to
|
||||
be as productive as possible as early as possible. Now you can receive
|
||||
FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers
|
||||
Ltd, and the world's leading authority on the world's leading RTOS.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.
|
||||
Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High
|
||||
Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and commercial middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
/*
|
||||
* A sample implementation of pvPortMalloc() that allows the heap to be defined
|
||||
* across multiple non-contigous blocks and combines (coalescences) adjacent
|
||||
* memory blocks as they are freed.
|
||||
*
|
||||
* See heap_1.c, heap_2.c, heap_3.c and heap_4.c for alternative
|
||||
* implementations, and the memory management pages of http://www.FreeRTOS.org
|
||||
* for more information.
|
||||
*
|
||||
* Usage notes:
|
||||
*
|
||||
* vPortDefineHeapRegions() ***must*** be called before pvPortMalloc().
|
||||
* pvPortMalloc() will be called if any task objects (tasks, queues, event
|
||||
* groups, etc.) are created, therefore vPortDefineHeapRegions() ***must*** be
|
||||
* called before any other objects are defined.
|
||||
*
|
||||
* vPortDefineHeapRegions() takes a single parameter. The parameter is an array
|
||||
* of HeapRegion_t structures. HeapRegion_t is defined in portable.h as
|
||||
*
|
||||
* typedef struct HeapRegion
|
||||
* {
|
||||
* uint8_t *pucStartAddress; << Start address of a block of memory that will be part of the heap.
|
||||
* size_t xSizeInBytes; << Size of the block of memory.
|
||||
* } HeapRegion_t;
|
||||
*
|
||||
* The array is terminated using a NULL zero sized region definition, and the
|
||||
* memory regions defined in the array ***must*** appear in address order from
|
||||
* low address to high address. So the following is a valid example of how
|
||||
* to use the function.
|
||||
*
|
||||
* HeapRegion_t xHeapRegions[] =
|
||||
* {
|
||||
* { ( uint8_t * ) 0x80000000UL, 0x10000 }, << Defines a block of 0x10000 bytes starting at address 0x80000000
|
||||
* { ( uint8_t * ) 0x90000000UL, 0xa0000 }, << Defines a block of 0xa0000 bytes starting at address of 0x90000000
|
||||
* { NULL, 0 } << Terminates the array.
|
||||
* };
|
||||
*
|
||||
* vPortDefineHeapRegions( xHeapRegions ); << Pass the array into vPortDefineHeapRegions().
|
||||
*
|
||||
* Note 0x80000000 is the lower address so appears in the array first.
|
||||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
|
||||
all the API functions to use the MPU wrappers. That should only be done when
|
||||
task.h is included from an application file. */
|
||||
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
|
||||
|
||||
#if( configSUPPORT_DYNAMIC_ALLOCATION == 0 )
|
||||
#error This file must not be used if configSUPPORT_DYNAMIC_ALLOCATION is 0
|
||||
#endif
|
||||
|
||||
/* Block sizes must not get too small. */
|
||||
#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( xHeapStructSize << 1 ) )
|
||||
|
||||
/* Assumes 8bit bytes! */
|
||||
#define heapBITS_PER_BYTE ( ( size_t ) 8 )
|
||||
|
||||
/* Define the linked list structure. This is used to link free blocks in order
|
||||
of their memory address. */
|
||||
typedef struct A_BLOCK_LINK
|
||||
{
|
||||
struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */
|
||||
size_t xBlockSize; /*<< The size of the free block. */
|
||||
} BlockLink_t;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Inserts a block of memory that is being freed into the correct position in
|
||||
* the list of free memory blocks. The block being freed will be merged with
|
||||
* the block in front it and/or the block behind it if the memory blocks are
|
||||
* adjacent to each other.
|
||||
*/
|
||||
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* The size of the structure placed at the beginning of each allocated memory
|
||||
block must by correctly byte aligned. */
|
||||
static const size_t xHeapStructSize = ( sizeof( BlockLink_t ) + ( ( size_t ) ( portBYTE_ALIGNMENT - 1 ) ) ) & ~( ( size_t ) portBYTE_ALIGNMENT_MASK );
|
||||
|
||||
/* Create a couple of list links to mark the start and end of the list. */
|
||||
static BlockLink_t xStart, *pxEnd = NULL;
|
||||
|
||||
/* Keeps track of the number of free bytes remaining, but says nothing about
|
||||
fragmentation. */
|
||||
static size_t xFreeBytesRemaining = 0U;
|
||||
static size_t xMinimumEverFreeBytesRemaining = 0U;
|
||||
|
||||
/* Gets set to the top bit of an size_t type. When this bit in the xBlockSize
|
||||
member of an BlockLink_t structure is set then the block belongs to the
|
||||
application. When the bit is free the block is still part of the free heap
|
||||
space. */
|
||||
static size_t xBlockAllocatedBit = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void *pvPortMalloc( size_t xWantedSize )
|
||||
{
|
||||
BlockLink_t *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
|
||||
void *pvReturn = NULL;
|
||||
|
||||
/* The heap must be initialised before the first call to
|
||||
prvPortMalloc(). */
|
||||
configASSERT( pxEnd );
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
/* Check the requested block size is not so large that the top bit is
|
||||
set. The top bit of the block size member of the BlockLink_t structure
|
||||
is used to determine who owns the block - the application or the
|
||||
kernel, so it must be free. */
|
||||
if( ( xWantedSize & xBlockAllocatedBit ) == 0 )
|
||||
{
|
||||
/* The wanted size is increased so it can contain a BlockLink_t
|
||||
structure in addition to the requested amount of bytes. */
|
||||
if( xWantedSize > 0 )
|
||||
{
|
||||
xWantedSize += xHeapStructSize;
|
||||
|
||||
/* Ensure that blocks are always aligned to the required number
|
||||
of bytes. */
|
||||
if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 )
|
||||
{
|
||||
/* Byte alignment required. */
|
||||
xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) )
|
||||
{
|
||||
/* Traverse the list from the start (lowest address) block until
|
||||
one of adequate size is found. */
|
||||
pxPreviousBlock = &xStart;
|
||||
pxBlock = xStart.pxNextFreeBlock;
|
||||
while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
|
||||
{
|
||||
pxPreviousBlock = pxBlock;
|
||||
pxBlock = pxBlock->pxNextFreeBlock;
|
||||
}
|
||||
|
||||
/* If the end marker was reached then a block of adequate size
|
||||
was not found. */
|
||||
if( pxBlock != pxEnd )
|
||||
{
|
||||
/* Return the memory space pointed to - jumping over the
|
||||
BlockLink_t structure at its start. */
|
||||
pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize );
|
||||
|
||||
/* This block is being returned for use so must be taken out
|
||||
of the list of free blocks. */
|
||||
pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
|
||||
|
||||
/* If the block is larger than required it can be split into
|
||||
two. */
|
||||
if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
|
||||
{
|
||||
/* This block is to be split into two. Create a new
|
||||
block following the number of bytes requested. The void
|
||||
cast is used to prevent byte alignment warnings from the
|
||||
compiler. */
|
||||
pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize );
|
||||
|
||||
/* Calculate the sizes of two blocks split from the
|
||||
single block. */
|
||||
pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
|
||||
pxBlock->xBlockSize = xWantedSize;
|
||||
|
||||
/* Insert the new block into the list of free blocks. */
|
||||
prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
xFreeBytesRemaining -= pxBlock->xBlockSize;
|
||||
|
||||
if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining )
|
||||
{
|
||||
xMinimumEverFreeBytesRemaining = xFreeBytesRemaining;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
/* The block is being returned - it is allocated and owned
|
||||
by the application and has no "next" block. */
|
||||
pxBlock->xBlockSize |= xBlockAllocatedBit;
|
||||
pxBlock->pxNextFreeBlock = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
traceMALLOC( pvReturn, xWantedSize );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
|
||||
#if( configUSE_MALLOC_FAILED_HOOK == 1 )
|
||||
{
|
||||
if( pvReturn == NULL )
|
||||
{
|
||||
extern void vApplicationMallocFailedHook( void );
|
||||
vApplicationMallocFailedHook();
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return pvReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortFree( void *pv )
|
||||
{
|
||||
uint8_t *puc = ( uint8_t * ) pv;
|
||||
BlockLink_t *pxLink;
|
||||
|
||||
if( pv != NULL )
|
||||
{
|
||||
/* The memory being freed will have an BlockLink_t structure immediately
|
||||
before it. */
|
||||
puc -= xHeapStructSize;
|
||||
|
||||
/* This casting is to keep the compiler from issuing warnings. */
|
||||
pxLink = ( void * ) puc;
|
||||
|
||||
/* Check the block is actually allocated. */
|
||||
configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 );
|
||||
configASSERT( pxLink->pxNextFreeBlock == NULL );
|
||||
|
||||
if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 )
|
||||
{
|
||||
if( pxLink->pxNextFreeBlock == NULL )
|
||||
{
|
||||
/* The block is being returned to the heap - it is no longer
|
||||
allocated. */
|
||||
pxLink->xBlockSize &= ~xBlockAllocatedBit;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
/* Add this block to the list of free blocks. */
|
||||
xFreeBytesRemaining += pxLink->xBlockSize;
|
||||
traceFREE( pv, pxLink->xBlockSize );
|
||||
prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) );
|
||||
}
|
||||
( void ) xTaskResumeAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
size_t xPortGetFreeHeapSize( void )
|
||||
{
|
||||
return xFreeBytesRemaining;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
size_t xPortGetMinimumEverFreeHeapSize( void )
|
||||
{
|
||||
return xMinimumEverFreeBytesRemaining;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvInsertBlockIntoFreeList( BlockLink_t *pxBlockToInsert )
|
||||
{
|
||||
BlockLink_t *pxIterator;
|
||||
uint8_t *puc;
|
||||
|
||||
/* Iterate through the list until a block is found that has a higher address
|
||||
than the block being inserted. */
|
||||
for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
|
||||
{
|
||||
/* Nothing to do here, just iterate to the right position. */
|
||||
}
|
||||
|
||||
/* Do the block being inserted, and the block it is being inserted after
|
||||
make a contiguous block of memory? */
|
||||
puc = ( uint8_t * ) pxIterator;
|
||||
if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert )
|
||||
{
|
||||
pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
|
||||
pxBlockToInsert = pxIterator;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
|
||||
/* Do the block being inserted, and the block it is being inserted before
|
||||
make a contiguous block of memory? */
|
||||
puc = ( uint8_t * ) pxBlockToInsert;
|
||||
if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock )
|
||||
{
|
||||
if( pxIterator->pxNextFreeBlock != pxEnd )
|
||||
{
|
||||
/* Form one big block from the two blocks. */
|
||||
pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
|
||||
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
|
||||
}
|
||||
else
|
||||
{
|
||||
pxBlockToInsert->pxNextFreeBlock = pxEnd;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
|
||||
}
|
||||
|
||||
/* If the block being inserted plugged a gab, so was merged with the block
|
||||
before and the block after, then it's pxNextFreeBlock pointer will have
|
||||
already been set, and should not be set here as that would make it point
|
||||
to itself. */
|
||||
if( pxIterator != pxBlockToInsert )
|
||||
{
|
||||
pxIterator->pxNextFreeBlock = pxBlockToInsert;
|
||||
}
|
||||
else
|
||||
{
|
||||
mtCOVERAGE_TEST_MARKER();
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions )
|
||||
{
|
||||
BlockLink_t *pxFirstFreeBlockInRegion = NULL, *pxPreviousFreeBlock;
|
||||
size_t xAlignedHeap;
|
||||
size_t xTotalRegionSize, xTotalHeapSize = 0;
|
||||
BaseType_t xDefinedRegions = 0;
|
||||
size_t xAddress;
|
||||
const HeapRegion_t *pxHeapRegion;
|
||||
|
||||
/* Can only call once! */
|
||||
configASSERT( pxEnd == NULL );
|
||||
|
||||
pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] );
|
||||
|
||||
while( pxHeapRegion->xSizeInBytes > 0 )
|
||||
{
|
||||
xTotalRegionSize = pxHeapRegion->xSizeInBytes;
|
||||
|
||||
/* Ensure the heap region starts on a correctly aligned boundary. */
|
||||
xAddress = ( size_t ) pxHeapRegion->pucStartAddress;
|
||||
if( ( xAddress & portBYTE_ALIGNMENT_MASK ) != 0 )
|
||||
{
|
||||
xAddress += ( portBYTE_ALIGNMENT - 1 );
|
||||
xAddress &= ~portBYTE_ALIGNMENT_MASK;
|
||||
|
||||
/* Adjust the size for the bytes lost to alignment. */
|
||||
xTotalRegionSize -= xAddress - ( size_t ) pxHeapRegion->pucStartAddress;
|
||||
}
|
||||
|
||||
xAlignedHeap = xAddress;
|
||||
|
||||
/* Set xStart if it has not already been set. */
|
||||
if( xDefinedRegions == 0 )
|
||||
{
|
||||
/* xStart is used to hold a pointer to the first item in the list of
|
||||
free blocks. The void cast is used to prevent compiler warnings. */
|
||||
xStart.pxNextFreeBlock = ( BlockLink_t * ) xAlignedHeap;
|
||||
xStart.xBlockSize = ( size_t ) 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Should only get here if one region has already been added to the
|
||||
heap. */
|
||||
configASSERT( pxEnd != NULL );
|
||||
|
||||
/* Check blocks are passed in with increasing start addresses. */
|
||||
configASSERT( xAddress > ( size_t ) pxEnd );
|
||||
}
|
||||
|
||||
/* Remember the location of the end marker in the previous region, if
|
||||
any. */
|
||||
pxPreviousFreeBlock = pxEnd;
|
||||
|
||||
/* pxEnd is used to mark the end of the list of free blocks and is
|
||||
inserted at the end of the region space. */
|
||||
xAddress = xAlignedHeap + xTotalRegionSize;
|
||||
xAddress -= xHeapStructSize;
|
||||
xAddress &= ~portBYTE_ALIGNMENT_MASK;
|
||||
pxEnd = ( BlockLink_t * ) xAddress;
|
||||
pxEnd->xBlockSize = 0;
|
||||
pxEnd->pxNextFreeBlock = NULL;
|
||||
|
||||
/* To start with there is a single free block in this region that is
|
||||
sized to take up the entire heap region minus the space taken by the
|
||||
free block structure. */
|
||||
pxFirstFreeBlockInRegion = ( BlockLink_t * ) xAlignedHeap;
|
||||
pxFirstFreeBlockInRegion->xBlockSize = xAddress - ( size_t ) pxFirstFreeBlockInRegion;
|
||||
pxFirstFreeBlockInRegion->pxNextFreeBlock = pxEnd;
|
||||
|
||||
/* If this is not the first region that makes up the entire heap space
|
||||
then link the previous region to this region. */
|
||||
if( pxPreviousFreeBlock != NULL )
|
||||
{
|
||||
pxPreviousFreeBlock->pxNextFreeBlock = pxFirstFreeBlockInRegion;
|
||||
}
|
||||
|
||||
xTotalHeapSize += pxFirstFreeBlockInRegion->xBlockSize;
|
||||
|
||||
/* Move onto the next HeapRegion_t structure. */
|
||||
xDefinedRegions++;
|
||||
pxHeapRegion = &( pxHeapRegions[ xDefinedRegions ] );
|
||||
}
|
||||
|
||||
xMinimumEverFreeBytesRemaining = xTotalHeapSize;
|
||||
xFreeBytesRemaining = xTotalHeapSize;
|
||||
|
||||
/* Check something was actually defined before it is accessed. */
|
||||
configASSERT( xTotalHeapSize );
|
||||
|
||||
/* Work out the position of the top bit in a size_t variable. */
|
||||
xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 );
|
||||
}
|
||||
|
||||
27
workspace/TS100/TS100.cfg
Normal file
27
workspace/TS100/TS100.cfg
Normal file
@@ -0,0 +1,27 @@
|
||||
# This is an ts100 board with a single STM32F103T8Ux chip
|
||||
#
|
||||
# Generated by System Workbench for STM32
|
||||
# Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
|
||||
|
||||
source [find interface/stlink.cfg]
|
||||
|
||||
set WORKAREASIZE 0x5000
|
||||
|
||||
transport select "hla_swd"
|
||||
|
||||
set CHIPNAME STM32F103T8Ux
|
||||
|
||||
# Enable debug when in low power modes
|
||||
set ENABLE_LOW_POWER 1
|
||||
|
||||
# Stop Watchdog counters when halt
|
||||
set STOP_WATCHDOG 1
|
||||
|
||||
# STlink Debug clock frequency
|
||||
set CLOCK_FREQ 950
|
||||
|
||||
# use software system reset
|
||||
reset_config none
|
||||
set CONNECT_UNDER_RESET 0
|
||||
|
||||
source [find target/stm32f1x.cfg]
|
||||
39
workspace/TS100/build.sh
Executable file
39
workspace/TS100/build.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
make clean
|
||||
make -j16 lang=EN
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=CS_CZ
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=DE
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=DK
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=ES
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=FR
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=HR
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=IT
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=PL
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=RU
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=FI
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=TR
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=BG
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=SK
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=HUN
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=BR
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=LT
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=UA
|
||||
rm -rf Objects/src
|
||||
make -j16 lang=SR
|
||||
rm -rf Objects/src
|
||||
39
workspace/TS100/inc/FRToSI2C.hpp
Normal file
39
workspace/TS100/inc/FRToSI2C.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* FRToSI2C.hpp
|
||||
*
|
||||
* Created on: 14Apr.,2018
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef FRTOSI2C_HPP_
|
||||
#define FRTOSI2C_HPP_
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "cmsis_os.h"
|
||||
|
||||
class FRToSI2C {
|
||||
public:
|
||||
|
||||
FRToSI2C(I2C_HandleTypeDef *i2chandle) : i2c(i2chandle),
|
||||
I2CSemaphore(nullptr) {
|
||||
}
|
||||
|
||||
void FRToSInit() {
|
||||
I2CSemaphore = xSemaphoreCreateBinary();
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
}
|
||||
|
||||
void CpltCallback(); //Normal Tx Callback
|
||||
|
||||
void Mem_Read(uint16_t DevAddress, uint16_t MemAddress, uint16_t MemAddSize,
|
||||
uint8_t *pData, uint16_t Size);
|
||||
void Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t *pData, uint16_t Size);
|
||||
|
||||
void Transmit(uint16_t DevAddress, uint8_t *pData, uint16_t Size);
|
||||
|
||||
private:
|
||||
I2C_HandleTypeDef *i2c;
|
||||
SemaphoreHandle_t I2CSemaphore;
|
||||
};
|
||||
|
||||
#endif /* FRTOSI2C_HPP_ */
|
||||
1081
workspace/TS100/inc/Font.h
Normal file
1081
workspace/TS100/inc/Font.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -101,12 +101,14 @@
|
||||
#define configTICK_RATE_HZ ((TickType_t)100)
|
||||
#define configMAX_PRIORITIES ( 4 )
|
||||
#define configMINIMAL_STACK_SIZE ((uint16_t)256)
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)10240)
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)10240) /*Currently use about 9000*/
|
||||
#define configMAX_TASK_NAME_LEN ( 48 )
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 8
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
@@ -122,6 +124,7 @@ to exclude the API function. */
|
||||
#define INCLUDE_vTaskDelayUntil 0
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
#define INCLUDE_xTaskGetSchedulerState 1
|
||||
#define INCLUDE_uxTaskGetStackHighWaterMark 1
|
||||
|
||||
/* Cortex-M specific definitions. */
|
||||
#ifdef __NVIC_PRIO_BITS
|
||||
|
||||
28
workspace/TS100/inc/LIS2DH12.hpp
Normal file
28
workspace/TS100/inc/LIS2DH12.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* LIS2DH12.hpp
|
||||
*
|
||||
* Created on: 27Feb.,2018
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef LIS2DH12_HPP_
|
||||
#define LIS2DH12_HPP_
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "FRToSI2C.hpp"
|
||||
#include "LIS2DH12_defines.hpp"
|
||||
#include "hardware.h"
|
||||
|
||||
class LIS2DH12 {
|
||||
public:
|
||||
LIS2DH12(FRToSI2C* i2cHandle) : i2c(i2cHandle) {}
|
||||
void initalize();
|
||||
Orientation getOrientation() { return static_cast<Orientation>((I2C_RegisterRead(LIS_INT2_SRC) >> 2) - 1); }
|
||||
void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
|
||||
|
||||
private:
|
||||
void I2C_RegisterWrite(uint8_t reg, uint8_t data);
|
||||
uint8_t I2C_RegisterRead(uint8_t reg);
|
||||
FRToSI2C* i2c;
|
||||
};
|
||||
|
||||
#endif /* LIS2DH12_HPP_ */
|
||||
28
workspace/TS100/inc/LIS2DH12_defines.hpp
Normal file
28
workspace/TS100/inc/LIS2DH12_defines.hpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* LIS2DH12_defines.hpp
|
||||
*
|
||||
* Created on: 27Feb.,2018
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#ifndef LIS2DH12_DEFINES_HPP_
|
||||
#define LIS2DH12_DEFINES_HPP_
|
||||
|
||||
|
||||
#define LIS2DH_I2C_ADDRESS (25<<1)
|
||||
|
||||
#define LIS_CTRL_REG1 0x20|0x80
|
||||
#define LIS_CTRL_REG2 0x21|0x80
|
||||
#define LIS_CTRL_REG3 0x22|0x80
|
||||
#define LIS_CTRL_REG4 0x23|0x80
|
||||
#define LIS_CTRL_REG5 0x24|0x80
|
||||
#define LIS_CTRL_REG6 0x25|0x80
|
||||
#define LIS_INT1_CFG 0xB0|0x80
|
||||
#define LIS_INT2_CFG 0xB4|0x80
|
||||
#define LIS_INT1_DURATION 0x33|0x80
|
||||
#define LIS_INT1_THS 0x32|0x80
|
||||
#define LIS_INT1_SRC 0x31|0x80
|
||||
#define LIS_INT2_DURATION 0x37|0x80
|
||||
#define LIS_INT2_THS 0x36|0x80
|
||||
#define LIS_INT2_SRC 0x35|0x80
|
||||
#endif /* LIS2DH12_DEFINES_HPP_ */
|
||||
@@ -9,21 +9,23 @@
|
||||
#define MMA8652FC_HPP_
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include "MMA8652FC_defines.h"
|
||||
#include "FRToSI2C.hpp"
|
||||
#include "hardware.h"
|
||||
|
||||
class MMA8652FC {
|
||||
|
||||
public:
|
||||
|
||||
MMA8652FC(I2C_HandleTypeDef* i2cHandle);
|
||||
MMA8652FC(FRToSI2C* i2cHandle) : i2c(i2cHandle) {}
|
||||
void initalize(); // Initalize the system
|
||||
bool getOrientation();// Reads the I2C register and returns the orientation (true == left)
|
||||
Orientation getOrientation();// Reads the I2C register and returns the orientation (true == left)
|
||||
void getAxisReadings(int16_t *x, int16_t *y, int16_t *z);
|
||||
|
||||
private:
|
||||
void setSensitivity(uint8_t threshold, uint8_t filterTime); // Sets the sensitivity of the unit
|
||||
|
||||
void I2C_RegisterWrite(uint8_t reg, uint8_t data);
|
||||
uint8_t I2C_RegisterRead(uint8_t reg);
|
||||
I2C_HandleTypeDef* i2c;
|
||||
FRToSI2C* i2c;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include <hardware.h>
|
||||
#include "stm32f1xx_hal.h"
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "FRToSI2C.hpp"
|
||||
#include "Font.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -20,42 +22,83 @@ extern "C" {
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#define DEVICEADDR_OLED (0x3c<<1)
|
||||
#define DEVICEADDR_OLED (0x3c<<1)
|
||||
#define OLED_WIDTH 96
|
||||
#define FRAMEBUFFER_START 17
|
||||
|
||||
|
||||
class OLED {
|
||||
public:
|
||||
OLED(I2C_HandleTypeDef* i2cHandle); // Initialize Driver and store I2C pointer
|
||||
void initialize(); // Startup the I2C coms (brings screen out of reset etc)
|
||||
void refresh(); // Draw the buffer out to the LCD using the DMA Channel
|
||||
void drawChar(char c, char preCursorCommand = '\0'); // Draw a character to a specific location
|
||||
void displayOnOff(bool on); // Turn the screen on or not
|
||||
OLED(FRToSI2C* i2cHandle); // Initialize Driver and store I2C pointer
|
||||
void initialize(); // Startup the I2C coms (brings screen out of reset etc)
|
||||
|
||||
// Draw the buffer out to the LCD using the DMA Channel
|
||||
void refresh() {
|
||||
i2c->Transmit( DEVICEADDR_OLED, screenBuffer, FRAMEBUFFER_START + (OLED_WIDTH * 2));
|
||||
//DMA tx time is ~ 20mS Ensure after calling this you delay for at least 25ms
|
||||
//or we need to goto double buffering
|
||||
}
|
||||
|
||||
void drawChar(char c, char preCursorCommand = '\0'); // Draw a character to a specific location
|
||||
// Turn the screen on or not
|
||||
void displayOnOff(bool on) {
|
||||
displayOnOffState = on;
|
||||
screenBuffer[1] = on ? 0xAF : 0xAE;
|
||||
}
|
||||
void setRotation(bool leftHanded); // Set the rotation for the screen
|
||||
bool getRotation(); // Get the current rotation of the LCD
|
||||
void print(const char* string); // Draw a string to the current location, with current font
|
||||
void setCursor(int16_t x, int16_t y); // Set the cursor location
|
||||
void setFont(uint8_t fontNumber); // (Future) Set the font that is being used
|
||||
void drawImage(const uint8_t* buffer, uint8_t x, uint8_t width);
|
||||
// Get the current rotation of the LCD
|
||||
bool getRotation() const {
|
||||
return inLeftHandedMode;
|
||||
}
|
||||
void print(const char* string); // Draw a string to the current location, with current font
|
||||
// Set the cursor location by pixels
|
||||
void setCursor(int16_t x, int16_t y) {
|
||||
cursor_x = x;
|
||||
cursor_y = y;
|
||||
}
|
||||
//Set cursor location by chars in current font
|
||||
void setCharCursor(int16_t x, int16_t y) {
|
||||
cursor_x = x * fontWidth;
|
||||
cursor_y = y * fontHeight;
|
||||
}
|
||||
void setFont(uint8_t fontNumber); // (Future) Set the font that is being used
|
||||
void drawImage(const uint8_t* buffer, uint8_t x, uint8_t width) {
|
||||
drawArea(x, 0, width, 16, buffer);
|
||||
}
|
||||
// Draws an image to the buffer, at x offset from top to bottom (fixed height renders)
|
||||
void printNumber(uint16_t number, uint8_t places);
|
||||
// Draws a number at the current cursor location
|
||||
void clearScreen(); // Clears the buffer
|
||||
void drawBattery(uint8_t state); // Draws the battery level symbol
|
||||
void drawSymbol(uint8_t symbolID); //Used for drawing symbols of a predictable width
|
||||
void drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t* ptr);
|
||||
// Clears the buffer
|
||||
void clearScreen() {
|
||||
memset(&screenBuffer[FRAMEBUFFER_START], 0, OLED_WIDTH * 2);
|
||||
}
|
||||
// Draws the battery level symbol
|
||||
void drawBattery(uint8_t state) {
|
||||
drawSymbol(3 + (state > 10 ? 10 : state));
|
||||
}
|
||||
// Draws a checkbox
|
||||
void drawCheckbox(bool state) {
|
||||
drawSymbol((state) ? 16 : 17);
|
||||
}
|
||||
void drawSymbol(uint8_t symbolID);//Used for drawing symbols of a predictable width
|
||||
void drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t* ptr); //Draw an area, but y must be aligned on 0/8 offset
|
||||
void fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t value); //Fill an area, but y must be aligned on 0/8 offset
|
||||
void drawFilledRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1,bool clear);
|
||||
void drawHeatSymbol(uint8_t state);
|
||||
private:
|
||||
|
||||
//Draw a buffer to the screen buffer
|
||||
|
||||
I2C_HandleTypeDef* i2c; //i2c Pointer
|
||||
const uint8_t* currentFont; // Pointer to the current font used for rendering to the buffer
|
||||
uint8_t screenBuffer[12 + 96 + 96 + 10]; // The data buffer
|
||||
uint8_t* firstStripPtr; // Pointers to the strips to allow for buffer having extra content
|
||||
FRToSI2C* i2c; //i2c Pointer
|
||||
const uint8_t* currentFont; // Pointer to the current font used for rendering to the buffer
|
||||
uint8_t* firstStripPtr; // Pointers to the strips to allow for buffer having extra content
|
||||
uint8_t* secondStripPtr; //Pointers to the strips
|
||||
bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)
|
||||
bool inLeftHandedMode; // Whether the screen is in left or not (used for offsets in GRAM)
|
||||
bool displayOnOffState; // If the display is on or not
|
||||
uint8_t fontWidth, fontHeight;
|
||||
int16_t cursor_x, cursor_y;
|
||||
uint8_t displayOffset;
|
||||
uint8_t screenBuffer[16 + (OLED_WIDTH * 2) + 10]; // The data buffer
|
||||
};
|
||||
|
||||
#endif /* OLED_HPP_ */
|
||||
|
||||
@@ -11,33 +11,37 @@
|
||||
#define SETTINGS_H_
|
||||
#include <stdint.h>
|
||||
#include "stm32f1xx_hal.h"
|
||||
#define SETTINGSVERSION 0x11 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
#define SETTINGSVERSION 0x14 /*Change this if you change the struct below to prevent people getting out of sync*/
|
||||
|
||||
/*
|
||||
* This struct must be a multiple of 2 bytes as it is saved / restored from flash in uint16_t chunks
|
||||
*/
|
||||
typedef struct {
|
||||
uint16_t SolderingTemp; //current set point for the iron
|
||||
uint16_t SleepTemp; //temp to drop to in sleep
|
||||
uint8_t SleepTime; //minutes timeout to sleep
|
||||
uint8_t cutoutSetting; // The voltage we cut out at for under voltage
|
||||
uint8_t OrientationMode:2; //If true we want to invert the display for lefties
|
||||
uint8_t sensitivity :4; //Sensitivity of accelerometer (5 bits)
|
||||
uint8_t autoStartMode :2; //Should the unit automatically jump straight into soldering mode when power is applied
|
||||
uint8_t ShutdownTime; //Time until unit shuts down if left alone
|
||||
uint8_t boostModeEnabled :1; //Boost mode swaps BUT_A in soldering mode to temporary soldering temp over-ride
|
||||
uint8_t coolingTempBlink :1; //Should the temperature blink on the cool down screen until its <50C
|
||||
uint16_t SolderingTemp; //current set point for the iron
|
||||
uint16_t SleepTemp; //temp to drop to in sleep
|
||||
uint8_t SleepTime; //minutes timeout to sleep
|
||||
uint8_t cutoutSetting; // The voltage we cut out at for under voltage
|
||||
uint8_t OrientationMode:2; //If true we want to invert the display for lefties
|
||||
uint8_t sensitivity :4; //Sensitivity of accelerometer (5 bits)
|
||||
uint8_t autoStartMode :2; //Should the unit automatically jump straight into soldering mode when power is applied
|
||||
uint8_t ShutdownTime; //Time until unit shuts down if left alone
|
||||
uint8_t boostModeEnabled :1; //Boost mode swaps BUT_A in soldering mode to temporary soldering temp over-ride
|
||||
uint8_t coolingTempBlink :1; //Should the temperature blink on the cool down screen until its <50C
|
||||
uint8_t detailedIDLE :1; //Detailed idle screen
|
||||
uint8_t detailedSoldering :1; //Detailed soldering screens
|
||||
uint8_t temperatureInF; //Should the temp be in F or C (true is F)
|
||||
uint16_t voltageDiv; //Voltage divisor factor
|
||||
uint16_t BoostTemp; //Boost mode set point for the iron
|
||||
int16_t CalibrationOffset; //This stores the temperature offset for this tip in the iron.
|
||||
uint8_t version; //Used to track if a reset is needed on firmware upgrade
|
||||
uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off
|
||||
uint8_t temperatureInF; //Should the temp be in F or C (true is F)
|
||||
uint8_t descriptionScrollSpeed:1; // Description scroll speed
|
||||
uint16_t voltageDiv; //Voltage divisor factor
|
||||
uint16_t BoostTemp; //Boost mode set point for the iron
|
||||
int16_t CalibrationOffset; //This stores the temperature offset for this tip in the iron.
|
||||
uint8_t PID_P; //PID P Term
|
||||
uint8_t PID_I; //PID I Term
|
||||
uint8_t PID_D; //PID D Term
|
||||
uint8_t version; //Used to track if a reset is needed on firmware upgrade
|
||||
uint32_t padding; //This is here for in case we are not an even divisor so that nothing gets cut off
|
||||
} systemSettingsType;
|
||||
|
||||
extern systemSettingsType systemSettings;
|
||||
extern volatile systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings();
|
||||
void restoreSettings();
|
||||
|
||||
@@ -17,9 +17,9 @@ extern "C" {
|
||||
extern ADC_HandleTypeDef hadc1;
|
||||
extern DMA_HandleTypeDef hdma_adc1;
|
||||
|
||||
extern I2C_HandleTypeDef hi2c1;
|
||||
extern DMA_HandleTypeDef hdma_i2c1_rx;
|
||||
extern DMA_HandleTypeDef hdma_i2c1_tx;
|
||||
extern I2C_HandleTypeDef hi2c1;
|
||||
|
||||
extern IWDG_HandleTypeDef hiwdg;
|
||||
|
||||
|
||||
@@ -8,14 +8,38 @@
|
||||
#ifndef TRANSLATION_H_
|
||||
#define TRANSLATION_H_
|
||||
|
||||
extern const char* SettingsLongNames[16];
|
||||
extern const char* SettingsShortNames[16];
|
||||
enum ShortNameType {
|
||||
SHORT_NAME_SINGLE_LINE = 1, SHORT_NAME_DOUBLE_LINE = 2,
|
||||
};
|
||||
|
||||
/*
|
||||
* When SettingsShortNameType is SHORT_NAME_SINGLE_LINE
|
||||
* use SettingsShortNames as SettingsShortNames[16][1].. second column undefined
|
||||
*/
|
||||
extern const enum ShortNameType SettingsShortNameType;
|
||||
extern const char* SettingsShortNames[17][2];
|
||||
extern const char* SettingsDescriptions[17];
|
||||
extern const char* SettingsMenuEntries[4];
|
||||
extern const char* SettingsMenuEntriesDescriptions[4];
|
||||
|
||||
extern const char* SettingsCalibrationWarning;
|
||||
extern const char* SettingsResetWarning;
|
||||
extern const char* UVLOWarningString;
|
||||
extern const char* UndervoltageString;
|
||||
extern const char* InputVoltageString;
|
||||
extern const char* WarningTipTempString;
|
||||
extern const char* BadTipString;
|
||||
|
||||
extern const char* SleepingSimpleString;
|
||||
extern const char* SleepingAdvancedString;
|
||||
extern const char* WarningSimpleString;
|
||||
extern const char* WarningAdvancedString;
|
||||
extern const char* SleepingTipAdvancedString;
|
||||
extern const char* IdleTipString;
|
||||
extern const char* IdleSetString;
|
||||
extern const char* TipDisconnectedString;
|
||||
extern const char* SolderingAdvancedPowerPrompt;
|
||||
extern const char* OffString;
|
||||
|
||||
extern const char SettingTrueChar;
|
||||
extern const char SettingFalseChar;
|
||||
@@ -23,17 +47,9 @@ extern const char SettingRightChar;
|
||||
extern const char SettingLeftChar;
|
||||
extern const char SettingAutoChar;
|
||||
|
||||
#define LANG_EN
|
||||
#define LANG
|
||||
extern const char SettingFastChar;
|
||||
extern const char SettingSlowChar;
|
||||
|
||||
#ifndef LANG
|
||||
#define LANG_EN
|
||||
#define LANG
|
||||
#endif
|
||||
|
||||
#ifndef LANG
|
||||
#error NO LANGUAGE DEFINED
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* TRANSLATION_H_ */
|
||||
|
||||
@@ -5,17 +5,21 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
#ifndef GUI_H_
|
||||
#define GUI_H_
|
||||
#ifndef GUI_HPP_
|
||||
#define GUI_HPP_
|
||||
#include "Translation.h"
|
||||
#include "Settings.h"
|
||||
#include "hardware.h"
|
||||
|
||||
#define PRESS_ACCEL_STEP 3
|
||||
#define PRESS_ACCEL_INTERVAL_MIN 10
|
||||
#define PRESS_ACCEL_INTERVAL_MAX 30
|
||||
|
||||
|
||||
//GUI holds the menu structure and all its methods for the menu itself
|
||||
|
||||
#include "main.hpp"
|
||||
#include "Settings.h"
|
||||
#include "Translation.h"
|
||||
//Declarations for all the methods for the settings menu (at end of this file)
|
||||
|
||||
|
||||
//Wrapper for holding a function pointer
|
||||
typedef struct state_func_t {
|
||||
void (*func)(void);
|
||||
@@ -28,6 +32,7 @@ typedef struct {
|
||||
const state_func draw;
|
||||
} menuitem;
|
||||
|
||||
extern bool settingsResetRequest;
|
||||
extern const menuitem settingsMenu[];
|
||||
#endif /* GUI_H_ */
|
||||
void enterSettingsMenu();
|
||||
extern const menuitem rootSettingsMenu[];
|
||||
|
||||
#endif /* GUI_HPP_ */
|
||||
@@ -13,6 +13,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum Orientation {
|
||||
ORIENTATION_LEFT_HAND = 0,
|
||||
ORIENTATION_RIGHT_HAND = 1,
|
||||
ORIENTATION_FLAT = 3
|
||||
};
|
||||
|
||||
#define KEY_B_Pin GPIO_PIN_6
|
||||
#define KEY_B_GPIO_Port GPIOA
|
||||
#define TMP36_INPUT_Pin GPIO_PIN_7
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#ifndef __MAIN_H
|
||||
#define __MAIN_H
|
||||
|
||||
#include <MMA8652FC.hpp>
|
||||
#include "Setup.h"
|
||||
#include "OLED.hpp"
|
||||
|
||||
extern OLED lcd;
|
||||
extern MMA8652FC accel;
|
||||
extern uint8_t PCBVersion;
|
||||
enum ButtonState {
|
||||
BUTTON_NONE = 0, /* No buttons pressed / < filter time*/
|
||||
BUTTON_F_SHORT = 1, /* User has pressed the front button*/
|
||||
@@ -20,6 +22,23 @@ enum ButtonState {
|
||||
* holding means it has gone low, and been low for longer than filter time
|
||||
*/
|
||||
};
|
||||
ButtonState getButtonState();
|
||||
|
||||
ButtonState getButtonState();
|
||||
void waitForButtonPressOrTimeout(uint32_t timeout);
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void HAL_ADCEx_InjectedConvCpltCallback(ADC_HandleTypeDef* hadc);
|
||||
void HAL_I2C_ErrorCallback(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_AbortCpltCallback(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MasterTxCpltCallback(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MasterRxCpltCallback(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MemTxCpltCallback(I2C_HandleTypeDef *hi2c);
|
||||
void HAL_I2C_MemRxCpltCallback(I2C_HandleTypeDef *hi2c);
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* __MAIN_H */
|
||||
|
||||
88
workspace/TS100/src/FRToSI2C.cpp
Normal file
88
workspace/TS100/src/FRToSI2C.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* FRToSI2C.cpp
|
||||
*
|
||||
* Created on: 14Apr.,2018
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#include "FRToSI2C.hpp"
|
||||
|
||||
void FRToSI2C::CpltCallback() {
|
||||
BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
i2c->State = HAL_I2C_STATE_READY;//Force state reset
|
||||
if (I2CSemaphore) {
|
||||
xSemaphoreGiveFromISR(I2CSemaphore, &xHigherPriorityTaskWoken);
|
||||
portYIELD_FROM_ISR(xHigherPriorityTaskWoken);
|
||||
}
|
||||
}
|
||||
|
||||
void FRToSI2C::Mem_Read(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
|
||||
if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED
|
||||
|| I2CSemaphore == NULL) {
|
||||
//no RToS, run blocking code
|
||||
HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
|
||||
5000);
|
||||
} else {
|
||||
//RToS is active, run threading
|
||||
//Get the mutex so we can use the I2C port
|
||||
//Wait up to 1 second for the mutex
|
||||
if ( xSemaphoreTake( I2CSemaphore, ( TickType_t ) 5000 ) == pdTRUE) {
|
||||
if (HAL_I2C_Mem_Read(i2c, DevAddress, MemAddress, MemAddSize, pData,
|
||||
Size, 5000) != HAL_OK) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
} else {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void FRToSI2C::Mem_Write(uint16_t DevAddress, uint16_t MemAddress,
|
||||
uint16_t MemAddSize, uint8_t* pData, uint16_t Size) {
|
||||
if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED
|
||||
|| I2CSemaphore == NULL) {
|
||||
//no RToS, run blocking code
|
||||
HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize, pData, Size,
|
||||
5000);
|
||||
} else {
|
||||
//RToS is active, run threading
|
||||
//Get the mutex so we can use the I2C port
|
||||
//Wait up to 1 second for the mutex
|
||||
if ( xSemaphoreTake( I2CSemaphore, ( TickType_t ) 5000 ) == pdTRUE) {
|
||||
if (HAL_I2C_Mem_Write(i2c, DevAddress, MemAddress, MemAddSize,
|
||||
pData, Size, 5000) != HAL_OK) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
xSemaphoreGive(I2CSemaphore);
|
||||
|
||||
} else {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FRToSI2C::Transmit(uint16_t DevAddress, uint8_t* pData, uint16_t Size) {
|
||||
if (xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED
|
||||
|| I2CSemaphore == NULL) {
|
||||
//no RToS, run blocking code
|
||||
HAL_I2C_Master_Transmit(i2c, DevAddress, pData, Size, 5000);
|
||||
} else {
|
||||
//RToS is active, run threading
|
||||
//Get the mutex so we can use the I2C port
|
||||
//Wait up to 1 second for the mutex
|
||||
if ( xSemaphoreTake( I2CSemaphore, ( TickType_t ) 5000 ) == pdTRUE) {
|
||||
if (HAL_I2C_Master_Transmit_DMA(i2c, DevAddress, pData, Size)
|
||||
!= HAL_OK) {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
//xSemaphoreGive(I2CSemaphore);
|
||||
} else {
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
57
workspace/TS100/src/LIS2DH12.cpp
Normal file
57
workspace/TS100/src/LIS2DH12.cpp
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* LIS2DH12.cpp
|
||||
*
|
||||
* Created on: 27Feb.,2018
|
||||
* Author: Ralim
|
||||
*/
|
||||
|
||||
#include <LIS2DH12.hpp>
|
||||
#include "cmsis_os.h"
|
||||
|
||||
typedef struct {
|
||||
const uint8_t reg;
|
||||
const uint8_t value;
|
||||
} LIS_REG;
|
||||
|
||||
static const LIS_REG i2c_registers[] = {
|
||||
{LIS_CTRL_REG1, 0x17}, // 25Hz
|
||||
{LIS_CTRL_REG2, 0b00001000}, // Highpass filter off
|
||||
{LIS_CTRL_REG3, 0b01100000}, // Setup interrupt pins
|
||||
{LIS_CTRL_REG4, 0b00001000}, // Block update mode off, HR on
|
||||
{LIS_CTRL_REG5, 0b00000010},
|
||||
{LIS_CTRL_REG6, 0b01100010},
|
||||
//Basically setup the unit to run, and enable 4D orientation detection
|
||||
{LIS_INT2_CFG, 0b01111110}, //setup for movement detection
|
||||
{LIS_INT2_THS, 0x28},
|
||||
{LIS_INT2_DURATION, 64},
|
||||
{LIS_INT1_CFG, 0b01111110},
|
||||
{LIS_INT1_THS, 0x28},
|
||||
{LIS_INT1_DURATION, 64}
|
||||
};
|
||||
|
||||
void LIS2DH12::initalize() {
|
||||
for (size_t index = 0; index < (sizeof(i2c_registers) / sizeof(i2c_registers[0])); index++) {
|
||||
I2C_RegisterWrite(i2c_registers[index].reg, i2c_registers[index].value);
|
||||
}
|
||||
}
|
||||
|
||||
void LIS2DH12::getAxisReadings(int16_t* x, int16_t* y, int16_t* z) {
|
||||
uint8_t tempArr[6];
|
||||
i2c->Mem_Read(LIS2DH_I2C_ADDRESS, 0xA8, I2C_MEMADD_SIZE_8BIT,
|
||||
(uint8_t*) tempArr, 6);
|
||||
|
||||
(*x) = ((uint16_t) (tempArr[1] << 8 | tempArr[0]));
|
||||
(*y) = ((uint16_t) (tempArr[3] << 8 | tempArr[2]));
|
||||
(*z) = ((uint16_t) (tempArr[5] << 8 | tempArr[4]));
|
||||
}
|
||||
|
||||
void LIS2DH12::I2C_RegisterWrite(uint8_t reg, uint8_t data) {
|
||||
i2c->Mem_Write(LIS2DH_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, &data, 1);
|
||||
|
||||
}
|
||||
|
||||
uint8_t LIS2DH12::I2C_RegisterRead(uint8_t reg) {
|
||||
uint8_t tx_data[1];
|
||||
i2c->Mem_Read( LIS2DH_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, tx_data, 1);
|
||||
return tx_data[0];
|
||||
}
|
||||
@@ -8,72 +8,72 @@
|
||||
#include <MMA8652FC.hpp>
|
||||
#include "cmsis_os.h"
|
||||
|
||||
MMA8652FC::MMA8652FC(I2C_HandleTypeDef* i2cHandle) {
|
||||
i2c = i2cHandle;
|
||||
}
|
||||
typedef struct {
|
||||
const uint8_t reg;
|
||||
const uint8_t val;
|
||||
} MMA_REG;
|
||||
|
||||
static const MMA_REG i2c_registers[] = {
|
||||
{CTRL_REG2, 0}, //Normal mode
|
||||
{CTRL_REG2, 0x40}, // Reset all registers to POR values
|
||||
{FF_MT_CFG_REG, 0x78}, // Enable motion detection for X, Y, Z axis, latch disabled
|
||||
{PL_CFG_REG, 0x40}, //Enable the orientation detection
|
||||
{PL_COUNT_REG, 200}, //200 count debounce
|
||||
{PL_BF_ZCOMP_REG, 0b01000111}, //Set the threshold to 42 degrees
|
||||
{P_L_THS_REG, 0b10011100}, //Up the trip angles
|
||||
{CTRL_REG4, 0x01 | (1 << 4)}, // Enable dataready interrupt & orientation interrupt
|
||||
{CTRL_REG5, 0x01}, // Route data ready interrupts to INT1 ->PB5 ->EXTI5, leaving orientation routed to INT2
|
||||
{CTRL_REG2, 0x12}, //Set maximum resolution oversampling
|
||||
{XYZ_DATA_CFG_REG, (1 << 4)}, //select high pass filtered data
|
||||
{HP_FILTER_CUTOFF_REG, 0x03}, //select high pass filtered data
|
||||
{CTRL_REG1, 0x19} // ODR=12 Hz, Active mode
|
||||
};
|
||||
|
||||
void MMA8652FC::I2C_RegisterWrite(uint8_t reg, uint8_t data) {
|
||||
|
||||
HAL_I2C_Mem_Write(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, &data, 1, 0xFFFF);
|
||||
i2c->Mem_Write( MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, &data, 1);
|
||||
}
|
||||
|
||||
uint8_t MMA8652FC::I2C_RegisterRead(uint8_t reg) {
|
||||
uint8_t tx_data[1];
|
||||
HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, tx_data, 1, 0xFFFF);
|
||||
i2c->Mem_Read( MMA8652FC_I2C_ADDRESS, reg, I2C_MEMADD_SIZE_8BIT, tx_data,
|
||||
1);
|
||||
|
||||
return tx_data[0];
|
||||
}
|
||||
void MMA8652FC::initalize() {
|
||||
size_t index = 0;
|
||||
|
||||
//send all the init commands to the unit
|
||||
I2C_RegisterWrite(CTRL_REG2, 0); //Normal mode
|
||||
I2C_RegisterWrite( CTRL_REG2, 0x40); // Reset all registers to POR values
|
||||
|
||||
I2C_RegisterWrite(i2c_registers[index].reg, i2c_registers[index].val); index++;
|
||||
I2C_RegisterWrite(i2c_registers[index].reg, i2c_registers[index].val); index++;
|
||||
|
||||
HAL_Delay(2); // ~1ms delay
|
||||
I2C_RegisterWrite(FF_MT_CFG_REG, 0x78); // Enable motion detection for X, Y, Z axis, latch disabled
|
||||
|
||||
I2C_RegisterWrite(PL_CFG_REG, 0x40); //Enable the orientation detection
|
||||
I2C_RegisterWrite(PL_COUNT_REG, 200); //200 count debounce
|
||||
I2C_RegisterWrite(PL_BF_ZCOMP_REG, 0b01000111); //Set the threshold to 42 degrees
|
||||
I2C_RegisterWrite(P_L_THS_REG, 0b10011100); //Up the trip angles
|
||||
I2C_RegisterWrite( CTRL_REG4, 0x01 | (1 << 4)); // Enable dataready interrupt & orientation interrupt
|
||||
I2C_RegisterWrite( CTRL_REG5, 0x01); // Route data ready interrupts to INT1 ->PB5 ->EXTI5, leaving orientation routed to INT2
|
||||
I2C_RegisterWrite( CTRL_REG2, 0x12); //Set maximum resolution oversampling
|
||||
I2C_RegisterWrite( XYZ_DATA_CFG_REG, (1 << 4)); //select high pass filtered data
|
||||
I2C_RegisterWrite( HP_FILTER_CUTOFF_REG, 0x03); //select high pass filtered data
|
||||
|
||||
I2C_RegisterWrite( CTRL_REG1, 0x19); // ODR=12 Hz, Active mode
|
||||
|
||||
while (index < (sizeof(i2c_registers) / sizeof(i2c_registers[0]))) {
|
||||
I2C_RegisterWrite(i2c_registers[index].reg, i2c_registers[index].val); index++;
|
||||
}
|
||||
}
|
||||
|
||||
void MMA8652FC::setSensitivity(uint8_t threshold, uint8_t filterTime) {
|
||||
uint8_t sens = 9 * 2 + 17;
|
||||
sens -= 2 * threshold;
|
||||
I2C_RegisterWrite( CTRL_REG1, 0); // sleep mode
|
||||
I2C_RegisterWrite(FF_MT_THS_REG, (sens & 0x7F)); // Set accumulation threshold
|
||||
I2C_RegisterWrite(FF_MT_COUNT_REG, filterTime); // Set debounce threshold
|
||||
I2C_RegisterWrite( CTRL_REG1, 0x31); // ODR=12 Hz, Active mode
|
||||
|
||||
}
|
||||
|
||||
bool MMA8652FC::getOrientation() {
|
||||
//First read the PL_STATUS registertaskENTER_CRITICAL();
|
||||
taskENTER_CRITICAL();
|
||||
Orientation MMA8652FC::getOrientation() {
|
||||
//First read the PL_STATUS register
|
||||
uint8_t plStatus = I2C_RegisterRead(PL_STATUS_REG);
|
||||
taskEXIT_CRITICAL();
|
||||
plStatus >>= 1; //We don't need the up/down bit
|
||||
plStatus &= 0x03; //mask to the two lower bits
|
||||
//0 == left handed
|
||||
//1 == right handed
|
||||
if ((plStatus & 0b10000000) == 0b10000000) {
|
||||
plStatus >>= 1; //We don't need the up/down bit
|
||||
plStatus &= 0x03; //mask to the two lower bits
|
||||
|
||||
return !plStatus;
|
||||
//0 == left handed
|
||||
//1 == right handed
|
||||
|
||||
return static_cast<Orientation>(plStatus);
|
||||
}
|
||||
|
||||
return ORIENTATION_FLAT;
|
||||
}
|
||||
void MMA8652FC::getAxisReadings(int16_t *x, int16_t *y, int16_t *z) {
|
||||
uint8_t tempArr[6];
|
||||
taskENTER_CRITICAL();
|
||||
while (HAL_I2C_Mem_Read(i2c, MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG, I2C_MEMADD_SIZE_8BIT, (uint8_t*) tempArr, 6,
|
||||
0xFFFF) != HAL_OK) {
|
||||
HAL_Delay(5);
|
||||
}
|
||||
taskEXIT_CRITICAL();
|
||||
i2c->Mem_Read( MMA8652FC_I2C_ADDRESS, OUT_X_MSB_REG,I2C_MEMADD_SIZE_8BIT, (uint8_t*) tempArr, 6);
|
||||
|
||||
(*x) = tempArr[0] << 8 | tempArr[1];
|
||||
(*y) = tempArr[2] << 8 | tempArr[3];
|
||||
(*z) = tempArr[4] << 8 | tempArr[5];
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
/*http://www.displayfuture.com/Display/datasheet/controller/SSD1307.pdf*/
|
||||
/*All commands are prefixed with 0x80*/
|
||||
/*Data packets are prefixed with 0x40*/
|
||||
const uint8_t configLength = 50;
|
||||
uint8_t OLED_Setup_Array[] = { /**/
|
||||
0x80, 0xAE,/*Display off*/
|
||||
0x80, 0xD5,/*Set display clock divide ratio / osc freq*/
|
||||
@@ -43,127 +42,122 @@ uint8_t OLED_Setup_Array[] = { /**/
|
||||
};
|
||||
//Setup based on the SSD1307 and modified for the SSD1306
|
||||
|
||||
OLED::OLED(I2C_HandleTypeDef* i2cHandle) {
|
||||
const uint8_t REFRESH_COMMANDS[17] = {
|
||||
0x80, 0xAF,
|
||||
0x80, 0x21,
|
||||
0x80, 0x20,
|
||||
0x80, 0x7F,
|
||||
0x80, 0xC0,
|
||||
0x80, 0x22,
|
||||
0x80, 0x00,
|
||||
0x80, 0x01,
|
||||
0x40
|
||||
};
|
||||
|
||||
OLED::OLED(FRToSI2C* i2cHandle) {
|
||||
i2c = i2cHandle;
|
||||
cursor_x = cursor_y = 0;
|
||||
currentFont = FONT_12;
|
||||
fontWidth = 12;
|
||||
inLeftHandedMode = false;
|
||||
firstStripPtr = &screenBuffer[13];
|
||||
secondStripPtr = &screenBuffer[13 + 96];
|
||||
firstStripPtr = &screenBuffer[FRAMEBUFFER_START];
|
||||
secondStripPtr = &screenBuffer[FRAMEBUFFER_START + OLED_WIDTH];
|
||||
fontHeight = 16;
|
||||
fontWidth = 12;
|
||||
displayOffset = 0;
|
||||
displayOnOffState = true;
|
||||
|
||||
}
|
||||
|
||||
void OLED::initialize() {
|
||||
memcpy(&screenBuffer[0], &REFRESH_COMMANDS[0], sizeof(REFRESH_COMMANDS));
|
||||
|
||||
HAL_Delay(5);
|
||||
HAL_GPIO_WritePin(OLED_RESET_GPIO_Port, OLED_RESET_Pin, GPIO_PIN_SET);
|
||||
HAL_Delay(5);
|
||||
HAL_Delay(10);
|
||||
//Send the setup settings
|
||||
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, (uint8_t*) OLED_Setup_Array, configLength, 0xFFFF);
|
||||
//displayOnOff(true);
|
||||
|
||||
}
|
||||
|
||||
//Write out the buffer to the OLEd & call any rendering objects
|
||||
void OLED::refresh() {
|
||||
screenBuffer[0] = 0x80;
|
||||
screenBuffer[1] = 0x21;
|
||||
screenBuffer[2] = 0x80;
|
||||
screenBuffer[3] = inLeftHandedMode ? 0 : 32; //display is shifted by 32 in left handed mode as driver ram is 128 wide
|
||||
screenBuffer[4] = 0x80;
|
||||
screenBuffer[5] = inLeftHandedMode ? 95 : 0x7F; //End address of the ram segment we are writing to (96 wide)
|
||||
|
||||
screenBuffer[6] = 0x80; //Set pages to rollover after 2
|
||||
screenBuffer[7] = 0x22;
|
||||
screenBuffer[8] = 0x80;
|
||||
screenBuffer[9] = 0x00; //start page 0
|
||||
screenBuffer[10] = 0x80;
|
||||
screenBuffer[11] = 0x01;
|
||||
|
||||
screenBuffer[12] = 0x40; //start of data marker
|
||||
taskENTER_CRITICAL();
|
||||
|
||||
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, screenBuffer, 12 + 96 * 2 + 1, 0xFFFF);
|
||||
taskEXIT_CRITICAL();
|
||||
|
||||
i2c->Transmit( DEVICEADDR_OLED, (uint8_t*) OLED_Setup_Array, sizeof(OLED_Setup_Array));
|
||||
displayOnOff(true);
|
||||
}
|
||||
|
||||
/*
|
||||
* Prints a char to the screen.
|
||||
* UTF font handling is done using the two input chars.
|
||||
* Precursor is the command char that is used to select the table.
|
||||
*/
|
||||
void OLED::drawChar(char c, char PrecursorCommand) {
|
||||
//prints a char to the screen
|
||||
if (c < ' ')
|
||||
if (c == '\n' && cursor_y == 0) {
|
||||
cursor_x = 0;
|
||||
cursor_y = 8;
|
||||
}
|
||||
if (c < ' ') {
|
||||
return;
|
||||
//We are left with
|
||||
uint8_t* charPointer;
|
||||
//Fonts are offset to start at the space char.
|
||||
/*
|
||||
* UTF font handling is done using the two input chars
|
||||
* Precursor is the command char that is used to select the table
|
||||
*
|
||||
*/
|
||||
}
|
||||
uint16_t index = 0;
|
||||
if (PrecursorCommand == 0)
|
||||
if (PrecursorCommand == 0) {
|
||||
//Fonts are offset to start at the space char
|
||||
index = (c - ' ');
|
||||
else {
|
||||
|
||||
} else {
|
||||
//This is for extended range
|
||||
//We decode the precursor command to find the offset
|
||||
//Latin stats at 96
|
||||
//Latin starts at 96
|
||||
c -= 0x80;
|
||||
if (PrecursorCommand == 0xC3)
|
||||
index = (128) + (c);
|
||||
else if (PrecursorCommand == 0xC2)
|
||||
index = (96) + (c);
|
||||
else if (PrecursorCommand == 0xD0)
|
||||
index = (192) + (c);
|
||||
else if (PrecursorCommand == 0xD1)
|
||||
index = (256) + (c);
|
||||
else
|
||||
return;
|
||||
}
|
||||
charPointer = ((uint8_t*) currentFont) + ((fontWidth * (fontHeight / 8)) * index);
|
||||
|
||||
if (cursor_x >= 0 && cursor_x < 96)
|
||||
drawArea(cursor_x, cursor_y, fontWidth, fontHeight, charPointer);
|
||||
switch (PrecursorCommand) {
|
||||
|
||||
case 0xC2:
|
||||
index = (96 - 32) + (c);
|
||||
break; //-32 compensate for chars excluded from font C2 section
|
||||
case 0xC3:
|
||||
index = (128) + (c);
|
||||
break;
|
||||
#if defined(LANG_RU) || defined(LANG_UK) || defined(LANG_SR) || defined(LANG_BG) || defined(LANG_MK)
|
||||
case 0xD0:
|
||||
index = (192) + (c);
|
||||
break;
|
||||
case 0xD1:
|
||||
index = (256) + (c);
|
||||
break;
|
||||
#else
|
||||
case 0xC4:
|
||||
index = (192) + (c);
|
||||
break;
|
||||
case 0xC5:
|
||||
index = (256) + (c);
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
uint8_t* charPointer;
|
||||
charPointer = ((uint8_t*) currentFont)
|
||||
+ ((fontWidth * (fontHeight / 8)) * index);
|
||||
|
||||
drawArea(cursor_x, cursor_y, fontWidth, fontHeight, charPointer);
|
||||
|
||||
cursor_x += fontWidth;
|
||||
}
|
||||
|
||||
void OLED::displayOnOff(bool on) {
|
||||
|
||||
if (on != displayOnOffState) {
|
||||
uint8_t data[6] = { 0x80, 0X8D, 0x80, 0X14, 0x80, 0XAF }; //on
|
||||
if (!on) {
|
||||
data[3] = 0x10;
|
||||
data[5] = 0xAE;
|
||||
}
|
||||
taskENTER_CRITICAL();
|
||||
|
||||
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, data, 6, 0xFFFF);
|
||||
taskEXIT_CRITICAL();
|
||||
displayOnOffState = on;
|
||||
}
|
||||
}
|
||||
|
||||
void OLED::setRotation(bool leftHanded) {
|
||||
if (inLeftHandedMode != leftHanded) {
|
||||
//send command struct again with changes
|
||||
if (leftHanded == 1) {
|
||||
if (inLeftHandedMode == leftHanded) {
|
||||
return;
|
||||
}
|
||||
|
||||
//send command struct again with changes
|
||||
if (leftHanded) {
|
||||
OLED_Setup_Array[11] = 0xC8; //c1?
|
||||
OLED_Setup_Array[19] = 0xA1;
|
||||
} else if (leftHanded == 0) {
|
||||
} else {
|
||||
OLED_Setup_Array[11] = 0xC0;
|
||||
OLED_Setup_Array[19] = 0xA0;
|
||||
}
|
||||
taskENTER_CRITICAL();
|
||||
|
||||
HAL_I2C_Master_Transmit(i2c, DEVICEADDR_OLED, (uint8_t*) OLED_Setup_Array, 50, 0xFFFF);
|
||||
taskEXIT_CRITICAL();
|
||||
i2c->Transmit( DEVICEADDR_OLED, (uint8_t*) OLED_Setup_Array, sizeof(OLED_Setup_Array));
|
||||
inLeftHandedMode = leftHanded;
|
||||
|
||||
screenBuffer[5] = inLeftHandedMode ? 0 : 32; //display is shifted by 32 in left handed mode as driver ram is 128 wide
|
||||
screenBuffer[7] = inLeftHandedMode ? 95 : 0x7F; //End address of the ram segment we are writing to (96 wide)
|
||||
screenBuffer[9] = inLeftHandedMode ? 0xC8 : 0xC0;
|
||||
}
|
||||
}
|
||||
|
||||
//print a string to the current cursor location
|
||||
void OLED::print(const char* str) {
|
||||
@@ -177,15 +171,10 @@ void OLED::print(const char* str) {
|
||||
}
|
||||
}
|
||||
|
||||
void OLED::setCursor(int16_t x, int16_t y) {
|
||||
cursor_x = x;
|
||||
cursor_y = y;
|
||||
}
|
||||
|
||||
void OLED::setFont(uint8_t fontNumber) {
|
||||
if (fontNumber == 1) {
|
||||
//small font
|
||||
currentFont = ASCII6x8;
|
||||
currentFont = FONT_6x8;
|
||||
fontHeight = 8;
|
||||
fontWidth = 6;
|
||||
} else if (fontNumber == 2) {
|
||||
@@ -199,80 +188,150 @@ void OLED::setFont(uint8_t fontNumber) {
|
||||
}
|
||||
}
|
||||
|
||||
void OLED::drawImage(const uint8_t* buffer, uint8_t x, uint8_t width) {
|
||||
drawArea(x, 0, width, 16, buffer);
|
||||
}
|
||||
|
||||
//maximum places is 5
|
||||
void OLED::printNumber(uint16_t number, uint8_t places) {
|
||||
char buffer[6];
|
||||
buffer[5] = 0; //null
|
||||
char buffer[6] = { 0 };
|
||||
|
||||
if (places == 5) {
|
||||
buffer[4] = '0' + number % 10;
|
||||
number /= 10;
|
||||
} else
|
||||
buffer[4] = 0;
|
||||
}
|
||||
|
||||
if (places > 3) {
|
||||
buffer[3] = '0' + number % 10;
|
||||
number /= 10;
|
||||
} else
|
||||
buffer[3] = 0;
|
||||
}
|
||||
|
||||
if (places > 2) {
|
||||
buffer[2] = '0' + number % 10;
|
||||
number /= 10;
|
||||
} else
|
||||
buffer[2] = 0;
|
||||
}
|
||||
|
||||
if (places > 1) {
|
||||
buffer[1] = '0' + number % 10;
|
||||
number /= 10;
|
||||
} else
|
||||
buffer[1] = 0;
|
||||
}
|
||||
|
||||
buffer[0] = '0' + number % 10;
|
||||
number /= 10;
|
||||
print(buffer);
|
||||
}
|
||||
|
||||
void OLED::clearScreen() {
|
||||
memset(firstStripPtr, 0, 96);
|
||||
memset(secondStripPtr, 0, 96);
|
||||
}
|
||||
|
||||
bool OLED::getRotation() {
|
||||
return inLeftHandedMode;
|
||||
}
|
||||
void OLED::drawBattery(uint8_t state) {
|
||||
if (state > 10)
|
||||
state = 10;
|
||||
drawSymbol(3 + state);
|
||||
}
|
||||
void OLED::drawSymbol(uint8_t symbolID) {
|
||||
//draw a symbol to the current cursor location
|
||||
setFont(2);
|
||||
drawChar(' ' + symbolID); // space offset is in all fonts, so we pad it here and remove it later
|
||||
drawChar(' ' + symbolID); // space offset is in all fonts, so we pad it here and remove it later
|
||||
setFont(0);
|
||||
}
|
||||
|
||||
//Draw an area, but y must be aligned on 0/8 offset
|
||||
void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height, const uint8_t* ptr) {
|
||||
void OLED::drawArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
|
||||
const uint8_t* ptr) {
|
||||
// Splat this from x->x+wide in two strides
|
||||
if (x < 0)
|
||||
if (x <= -wide)
|
||||
return; //cutoffleft
|
||||
if ((x + wide) > 96)
|
||||
if (x > 96)
|
||||
return; //cutoff right
|
||||
|
||||
uint8_t visibleStart = 0;
|
||||
uint8_t visibleEnd = wide;
|
||||
|
||||
// trimming to draw partials
|
||||
if (x < 0) {
|
||||
visibleStart -= x; //subtract negative value == add absolute value
|
||||
}
|
||||
if (x + wide > 96) {
|
||||
visibleEnd = 96 - x;
|
||||
}
|
||||
|
||||
if (y == 0) {
|
||||
//Splat first line of data
|
||||
for (uint8_t xx = 0; xx < (wide); xx++) {
|
||||
for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
|
||||
firstStripPtr[xx + x] = ptr[xx];
|
||||
}
|
||||
}
|
||||
if (y == 8 || height == 16) {
|
||||
// Splat the second line
|
||||
for (uint8_t xx = 0; xx < wide; xx++) {
|
||||
for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
|
||||
secondStripPtr[x + xx] = ptr[xx + (height == 16 ? wide : 0)];
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
void OLED::fillArea(int16_t x, int8_t y, uint8_t wide, uint8_t height,
|
||||
const uint8_t value) {
|
||||
// Splat this from x->x+wide in two strides
|
||||
if (x <= -wide)
|
||||
return; //cutoffleft
|
||||
if (x > 96)
|
||||
return; //cutoff right
|
||||
|
||||
uint8_t visibleStart = 0;
|
||||
uint8_t visibleEnd = wide;
|
||||
|
||||
// trimming to draw partials
|
||||
if (x < 0) {
|
||||
visibleStart -= x; //subtract negative value == add absolute value
|
||||
}
|
||||
if (x + wide > 96) {
|
||||
visibleEnd = 96 - x;
|
||||
}
|
||||
|
||||
if (y == 0) {
|
||||
//Splat first line of data
|
||||
for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
|
||||
firstStripPtr[xx + x] = value;
|
||||
}
|
||||
}
|
||||
if (y == 8 || height == 16) {
|
||||
// Splat the second line
|
||||
for (uint8_t xx = visibleStart; xx < visibleEnd; xx++) {
|
||||
secondStripPtr[x + xx] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OLED::drawFilledRect(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1,
|
||||
bool clear) {
|
||||
//Draw this in 3 sections
|
||||
//This is basically a N wide version of vertical line
|
||||
|
||||
//Step 1 : Draw in the top few pixels that are not /8 aligned
|
||||
//LSB is at the top of the screen
|
||||
uint8_t mask = 0xFF;
|
||||
if (y0) {
|
||||
mask = mask << (y0 % 8);
|
||||
for (uint8_t col = x0; col < x1; col++)
|
||||
if (clear)
|
||||
firstStripPtr[(y0 / 8) * 96 + col] &= ~mask;
|
||||
else
|
||||
firstStripPtr[(y0 / 8) * 96 + col] |= mask;
|
||||
}
|
||||
//Next loop down the line the total number of solids
|
||||
if (y0 / 8 != y1 / 8)
|
||||
for (uint8_t col = x0; col < x1; col++)
|
||||
for (uint8_t r = (y0 / 8); r < (y1 / 8); r++) {
|
||||
//This gives us the row index r
|
||||
if (clear)
|
||||
firstStripPtr[(r * 96) + col] = 0;
|
||||
else
|
||||
firstStripPtr[(r * 96) + col] = 0xFF;
|
||||
}
|
||||
|
||||
//Finally draw the tail
|
||||
mask = ~(mask << (y1 % 8));
|
||||
for (uint8_t col = x0; col < x1; col++)
|
||||
if (clear)
|
||||
firstStripPtr[(y1 / 8) * 96 + col] &= ~mask;
|
||||
else
|
||||
firstStripPtr[(y1 / 8) * 96 + col] |= mask;
|
||||
}
|
||||
|
||||
void OLED::drawHeatSymbol(uint8_t state) {
|
||||
//Draw symbol 14
|
||||
//Then draw over it botom 5 pixels always stay. 8 pixels above that are the levels
|
||||
state /= 12; // 0-> 8 range
|
||||
//Then we want to draw down (16-(5+state)
|
||||
uint8_t cursor_x_temp = cursor_x;
|
||||
drawSymbol(14);
|
||||
drawFilledRect(cursor_x_temp, 0, cursor_x_temp + 12, 2 + (8 - state), true);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
#include "Settings.h"
|
||||
#include "Setup.h"
|
||||
#define FLASH_ADDR (0x8000000|0xBC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
|
||||
#define FLASH_ADDR (0x8000000|0xFC00)/*Flash start OR'ed with the maximum amount of flash - 1024 bytes*/
|
||||
#include "string.h"
|
||||
systemSettingsType systemSettings;
|
||||
volatile systemSettingsType systemSettings;
|
||||
|
||||
void saveSettings() {
|
||||
//First we erase the flash
|
||||
@@ -66,12 +66,12 @@ void restoreSettings() {
|
||||
*/
|
||||
uint8_t lookupVoltageLevel(uint8_t level) {
|
||||
if (level == 0)
|
||||
return 100; //10V since iron does not function effectively below this
|
||||
return 90; //9V since iron does not function effectively below this
|
||||
else
|
||||
return (level * 33) + (33 * 2);
|
||||
}
|
||||
void resetSettings() {
|
||||
|
||||
memset((void*)&systemSettings,0,sizeof(systemSettingsType));
|
||||
systemSettings.SleepTemp = 150; //Temperature the iron sleeps at - default 150.0 C
|
||||
systemSettings.SleepTime = 6; //How many seconds/minutes we wait until going to sleep - default 1 min
|
||||
systemSettings.SolderingTemp = 320; //Default soldering temp is 320.0 C
|
||||
@@ -89,6 +89,11 @@ void resetSettings() {
|
||||
systemSettings.coolingTempBlink = 0; //Blink the temperature on the cooling screen when its > 50C
|
||||
systemSettings.CalibrationOffset = 10; //This appears to be quite close for both of my tips, in both of my handles
|
||||
systemSettings.temperatureInF = 0; //default to 0
|
||||
systemSettings.descriptionScrollSpeed=0;//default to slow
|
||||
systemSettings.PID_P =42;
|
||||
systemSettings.PID_I =50;
|
||||
systemSettings.PID_D =15;
|
||||
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ void Setup_HAL() {
|
||||
MX_TIM2_Init();
|
||||
MX_IWDG_Init();
|
||||
|
||||
HAL_ADC_Start_DMA(&hadc1, (uint32_t*) ADCReadings, 64);
|
||||
HAL_ADC_Start_DMA(&hadc1, (uint32_t*) ADCReadings, 64); //start DMA of normal readings
|
||||
HAL_ADCEx_InjectedStart(&hadc1); //enable injected readings
|
||||
}
|
||||
|
||||
@@ -60,27 +60,29 @@ void SystemClock_Config(void) {
|
||||
|
||||
/**Initializes the CPU, AHB and APB busses clocks
|
||||
*/
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI | RCC_OSCILLATORTYPE_LSI;
|
||||
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI
|
||||
| RCC_OSCILLATORTYPE_LSI;
|
||||
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
|
||||
RCC_OscInitStruct.HSICalibrationValue = 16;
|
||||
RCC_OscInitStruct.LSIState = RCC_LSI_ON;
|
||||
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
|
||||
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI_DIV2;
|
||||
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16;
|
||||
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL16; //64MHz
|
||||
HAL_RCC_OscConfig(&RCC_OscInitStruct);
|
||||
|
||||
/**Initializes the CPU, AHB and APB busses clocks
|
||||
*/
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
|
||||
| RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
|
||||
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
|
||||
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV16;
|
||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
|
||||
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV16; //TIM 2,3,4,5,6,7,12,13,14
|
||||
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; //64 mhz to some peripherals and adc
|
||||
|
||||
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2);
|
||||
|
||||
PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_ADC;
|
||||
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV2;
|
||||
PeriphClkInit.AdcClockSelection = RCC_ADCPCLK2_DIV6; //6 or 8 are the only non overclocked options
|
||||
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit);
|
||||
|
||||
/**Configure the Systick interrupt time
|
||||
@@ -100,7 +102,6 @@ static void MX_ADC1_Init(void) {
|
||||
|
||||
ADC_ChannelConfTypeDef sConfig;
|
||||
ADC_InjectionConfTypeDef sConfigInjected;
|
||||
|
||||
/**Common config
|
||||
*/
|
||||
hadc1.Instance = ADC1;
|
||||
@@ -127,29 +128,42 @@ static void MX_ADC1_Init(void) {
|
||||
|
||||
/**Configure Injected Channel
|
||||
*/
|
||||
//F in = 10.66 MHz
|
||||
/*
|
||||
* Injected time is 1 delay clock + (12 adc cycles*4)+4*sampletime =~217 clocks = 0.2ms
|
||||
* Charge time is 0.016 uS ideally
|
||||
* So Sampling time must be >= 0.016uS
|
||||
* 1/10.66MHz is 0.09uS, so 1 CLK is *should* be enough
|
||||
* */
|
||||
sConfigInjected.InjectedChannel = ADC_CHANNEL_8;
|
||||
sConfigInjected.InjectedRank = 1;
|
||||
sConfigInjected.InjectedNbrOfConversion = 4;
|
||||
sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_55CYCLES_5;
|
||||
sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_7CYCLES_5;
|
||||
sConfigInjected.ExternalTrigInjecConv = ADC_EXTERNALTRIGINJECCONV_T2_CC1;
|
||||
sConfigInjected.AutoInjectedConv = DISABLE;
|
||||
sConfigInjected.InjectedDiscontinuousConvMode = DISABLE;
|
||||
sConfigInjected.InjectedOffset = 0;
|
||||
|
||||
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
|
||||
|
||||
sConfigInjected.InjectedSamplingTime = ADC_SAMPLETIME_1CYCLE_5;
|
||||
sConfigInjected.InjectedRank = 2;
|
||||
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
|
||||
sConfigInjected.InjectedRank = 3;
|
||||
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
|
||||
sConfigInjected.InjectedRank = 4;
|
||||
HAL_ADCEx_InjectedConfigChannel(&hadc1, &sConfigInjected);
|
||||
|
||||
SET_BIT(hadc1.Instance->CR1, ( ADC_CR1_JEOCIE )); //Enable end of injected conv irq
|
||||
// Run ADC internal calibration
|
||||
while (HAL_ADCEx_Calibration_Start(&hadc1) != HAL_OK)
|
||||
;
|
||||
}
|
||||
|
||||
/* I2C1 init function */
|
||||
static void MX_I2C1_Init(void) {
|
||||
|
||||
hi2c1.Instance = I2C1;
|
||||
hi2c1.Init.ClockSpeed = 100000;
|
||||
hi2c1.Init.ClockSpeed = 100000; // OLED doesnt handle >100k when its asleep (off).
|
||||
hi2c1.Init.DutyCycle = I2C_DUTYCYCLE_2;
|
||||
hi2c1.Init.OwnAddress1 = 0;
|
||||
hi2c1.Init.AddressingMode = I2C_ADDRESSINGMODE_7BIT;
|
||||
@@ -158,8 +172,6 @@ static void MX_I2C1_Init(void) {
|
||||
hi2c1.Init.GeneralCallMode = I2C_GENERALCALL_DISABLE;
|
||||
hi2c1.Init.NoStretchMode = I2C_NOSTRETCH_DISABLE;
|
||||
HAL_I2C_Init(&hi2c1);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
|
||||
|
||||
}
|
||||
|
||||
@@ -168,7 +180,7 @@ static void MX_IWDG_Init(void) {
|
||||
|
||||
hiwdg.Instance = IWDG;
|
||||
hiwdg.Init.Prescaler = IWDG_PRESCALER_256;
|
||||
hiwdg.Init.Reload = 4095;
|
||||
hiwdg.Init.Reload = 100;
|
||||
HAL_IWDG_Init(&hiwdg);
|
||||
|
||||
}
|
||||
@@ -181,10 +193,10 @@ static void MX_TIM3_Init(void) {
|
||||
TIM_OC_InitTypeDef sConfigOC;
|
||||
|
||||
htim3.Instance = TIM3;
|
||||
htim3.Init.Prescaler = 1;
|
||||
htim3.Init.Prescaler = 2;
|
||||
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim3.Init.Period = 100;
|
||||
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //2mhz
|
||||
htim3.Init.Period = 100; //10 Khz PWM freq
|
||||
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //4mhz before div
|
||||
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
HAL_TIM_Base_Init(&htim3);
|
||||
|
||||
@@ -232,10 +244,10 @@ static void MX_TIM2_Init(void) {
|
||||
|
||||
//Timer 2 is fairly slow as its being used to run the PWM and trigger the ADC in the PWM off time.
|
||||
htim2.Instance = TIM2;
|
||||
htim2.Init.Prescaler = 1500;
|
||||
htim2.Init.Prescaler = 2000; // pwm out is 10k, we want to run our PWM at around 100hz
|
||||
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
|
||||
htim2.Init.Period = 120;
|
||||
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //2mhz
|
||||
htim2.Init.Period = 122;
|
||||
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV4; //4mhz before divide
|
||||
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
|
||||
HAL_TIM_Base_Init(&htim2);
|
||||
|
||||
@@ -250,7 +262,12 @@ static void MX_TIM2_Init(void) {
|
||||
HAL_TIMEx_MasterConfigSynchronization(&htim2, &sMasterConfig);
|
||||
|
||||
sConfigOC.OCMode = TIM_OCMODE_PWM1;
|
||||
sConfigOC.Pulse = 110;
|
||||
sConfigOC.Pulse = 118;
|
||||
/*
|
||||
* It takes 4 milliseconds for output to be stable after PWM turns off.
|
||||
* Assume ADC samples in 0.5ms
|
||||
* We need to set this to 100% + 5.5ms
|
||||
* */
|
||||
sConfigOC.OCPolarity = TIM_OCPOLARITY_HIGH;
|
||||
sConfigOC.OCFastMode = TIM_OCFAST_ENABLE;
|
||||
HAL_TIM_PWM_ConfigChannel(&htim2, &sConfigOC, TIM_CHANNEL_1);
|
||||
@@ -278,13 +295,13 @@ static void MX_DMA_Init(void) {
|
||||
|
||||
/* DMA interrupt init */
|
||||
/* DMA1_Channel1_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 5, 0);
|
||||
HAL_NVIC_SetPriority(DMA1_Channel1_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel1_IRQn);
|
||||
/* DMA1_Channel6_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 5, 0);
|
||||
HAL_NVIC_SetPriority(DMA1_Channel6_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel6_IRQn);
|
||||
/* DMA1_Channel7_IRQn interrupt configuration */
|
||||
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 5, 0);
|
||||
HAL_NVIC_SetPriority(DMA1_Channel7_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(DMA1_Channel7_IRQn);
|
||||
|
||||
}
|
||||
@@ -321,16 +338,21 @@ static void MX_GPIO_Init(void) {
|
||||
|
||||
/*Configure GPIO pins : PA0 PA1 PA2 PA3
|
||||
PA4 PA5 PA10 PA15 */
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_10
|
||||
| GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_15;
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3
|
||||
| GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12
|
||||
| GPIO_PIN_15;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
//Set PA 11 and PA 12 to GND to stop usb detection
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12;
|
||||
|
||||
//Set PA 11 and PA 12 to GND to stop usb detection, 13/14 re-rused for debug
|
||||
GPIO_InitStruct.Pin = GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_14 | GPIO_PIN_13;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_11, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_12, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_13, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_14, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pins : KEY_B_Pin KEY_A_Pin */
|
||||
GPIO_InitStruct.Pin = KEY_B_Pin | KEY_A_Pin;
|
||||
@@ -349,10 +371,11 @@ static void MX_GPIO_Init(void) {
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(OLED_RESET_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : INT_Orientation_Pin INT_Movement_Pin */
|
||||
/* Configure GPIO pins : INT_Orientation_Pin INT_Movement_Pin */
|
||||
/* Not used anymore*/
|
||||
GPIO_InitStruct.Pin = INT_Orientation_Pin | INT_Movement_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP; //Technically the IMU is P-P but safer to pullup (very tiny current cost)
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/*Configure peripheral I/O remapping */
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Translation.c
|
||||
*
|
||||
* Created on: 31Aug.,2017
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
#include "Translation.h"
|
||||
|
||||
#ifdef LANG_EN
|
||||
const char* SettingsLongNames[16] = {
|
||||
/*These are all the help text for all the settings.*/
|
||||
/*No requirements on spacing or length*/
|
||||
"Power source. Sets cutoff voltage. <DC 10V> <S 3.3V per cell>", //Power Source
|
||||
"Sleep Temperature <C>", //Sleep Temp
|
||||
"Sleep Timeout <Minutes>", //Sleep Timeout
|
||||
"Shutdown Timeout <Minutes>", //Shutdown Time
|
||||
"Motion Sensitivity <0.Off 1.least sensitive 9.most sensitive>", //Motion Sensitivity
|
||||
"Temperature Unit <C=Celsius F=Fahrenheit>", //Temp Unit
|
||||
"Display detailed information in a smaller font on the idle screen.", //Detailed Information
|
||||
"Display Orientation <A. Automatic L. Left Handed R. Right Handed>", //Orientation
|
||||
"Enable front key enters boost mode 450C mode when soldering", //Boost enable
|
||||
"Temperature when in \"boost\" mode", //Boost Temp
|
||||
"Automatically starts the iron into soldering on power up. T=Soldering, S= Sleep mode,F=Off", //Auto start
|
||||
"Blink the temperature on the cooling screen while the tip is still hot.", //Cooling Blink
|
||||
"Calibrate tip offset.", //Calibrate Tip
|
||||
"Reset all settings", //Reset Settings
|
||||
"VIN Calibration. Buttons adjust, long press to exit", //VIN Cal
|
||||
"Display detailed information while soldering",//ADV SLD
|
||||
};
|
||||
|
||||
const char* SettingsCalibrationWarning = "Please ensure the tip is at room temperature before continuing!";
|
||||
const char* UVLOWarningString = "LOW VOLT"; //Fixed width 8 chars
|
||||
const char* SleepingSimpleString = "Zzzz"; // Must be <= 4 chars
|
||||
const char* SleepingAdvancedString = "Sleeping..."; // <=17 chars
|
||||
const char* WarningSimpleString = "HOT!"; //Must be <= 4 chars
|
||||
const char* WarningAdvancedString = "WARNING! TIP HOT!";
|
||||
|
||||
const char SettingTrueChar = 'T';
|
||||
const char SettingFalseChar = 'F';
|
||||
const char SettingRightChar = 'R';
|
||||
const char SettingLeftChar = 'L';
|
||||
const char SettingAutoChar = 'A';
|
||||
#endif
|
||||
|
||||
const char* SettingsShortNames[16] = { /**/
|
||||
"PWRSC ", // Power Source (DC or batt)
|
||||
"STMP ", // Sleep Temperature
|
||||
"STME ", // Sleep Timeout
|
||||
"SHTME ", // Shutdown Temperature
|
||||
"MSENSE ", // Motion sensitivity level
|
||||
"TMPUNT ", //Temp in F and C
|
||||
"ADVIDL ", // Advanced idle display mode enable
|
||||
"DSPROT ", // Display rotation mode
|
||||
"BOOST ", // Boost enabled
|
||||
"BTMP ", // Boost temperature
|
||||
"ASTART ", // Automatic Start mode
|
||||
"CLBLNK ", // Cooldown blink
|
||||
"TMP CAL?", // Temperature calibration enter menu
|
||||
"RESET? ", // Settings reset command
|
||||
"CAL VIN?",
|
||||
"ADVSLD ", //advanced soldering screens
|
||||
};
|
||||
1896
workspace/TS100/src/Translation.cpp
Normal file
1896
workspace/TS100/src/Translation.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,14 @@
|
||||
* Author: Ben V. Brown
|
||||
*/
|
||||
|
||||
#include "gui.h"
|
||||
#include "string.h"
|
||||
#include "hardware.h"
|
||||
#include "gui.hpp"
|
||||
#include "main.hpp"
|
||||
#include "cmsis_os.h"
|
||||
#include "Translation.h"
|
||||
|
||||
#include "string.h"
|
||||
extern uint32_t lastButtonTime;
|
||||
void gui_Menu(const menuitem* menu);
|
||||
static void settings_setInputVRange(void);
|
||||
static void settings_displayInputVRange(void);
|
||||
static void settings_setSleepTemp(void);
|
||||
@@ -25,7 +29,17 @@ static void settings_setAdvancedSolderingScreens(void);
|
||||
static void settings_displayAdvancedSolderingScreens(void);
|
||||
static void settings_setAdvancedIDLEScreens(void);
|
||||
static void settings_displayAdvancedIDLEScreens(void);
|
||||
static void settings_setScrollSpeed(void);
|
||||
static void settings_displayScrollSpeed(void);
|
||||
#ifdef PIDSETTINGS
|
||||
|
||||
static void settings_setPIDP(void);
|
||||
static void settings_displayPIDP(void);
|
||||
static void settings_setPIDI(void);
|
||||
static void settings_displayPIDI(void);
|
||||
static void settings_setPIDD(void);
|
||||
static void settings_displayPIDD(void);
|
||||
#endif
|
||||
static void settings_setDisplayRotation(void);
|
||||
static void settings_displayDisplayRotation(void);
|
||||
static void settings_setBoostModeEnabled(void);
|
||||
@@ -43,32 +57,242 @@ static void settings_displayCalibrate(void);
|
||||
static void settings_setCalibrateVIN(void);
|
||||
static void settings_displayCalibrateVIN(void);
|
||||
|
||||
bool settingsResetRequest = false;
|
||||
const menuitem settingsMenu[] = { /*Struct used for all settings options in the settings menu*/
|
||||
{ (const char*) SettingsLongNames[0], { settings_setInputVRange }, { settings_displayInputVRange } },/*Voltage input*/
|
||||
{ (const char*) SettingsLongNames[1], { settings_setSleepTemp }, { settings_displaySleepTemp } }, /*Sleep Temp*/
|
||||
{ (const char*) SettingsLongNames[2], { settings_setSleepTime }, { settings_displaySleepTime } }, /*Sleep Time*/
|
||||
{ (const char*) SettingsLongNames[3], { settings_setShutdownTime }, { settings_displayShutdownTime } }, /*Shutdown Time*/
|
||||
{ (const char*) SettingsLongNames[4], { settings_setSensitivity }, { settings_displaySensitivity } },/* Motion Sensitivity*/
|
||||
{ (const char*) SettingsLongNames[5], { settings_setTempF }, { settings_displayTempF } },/* Motion Sensitivity*/
|
||||
{ (const char*) SettingsLongNames[6], { settings_setAdvancedIDLEScreens }, { settings_displayAdvancedIDLEScreens } },/* Advanced screens*/
|
||||
{ (const char*) SettingsLongNames[15], { settings_setAdvancedSolderingScreens }, { settings_displayAdvancedSolderingScreens } },/* Advanced screens*/
|
||||
{ (const char*) SettingsLongNames[7], { settings_setDisplayRotation }, { settings_displayDisplayRotation } }, /*Display Rotation*/
|
||||
{ (const char*) SettingsLongNames[8], { settings_setBoostModeEnabled }, { settings_displayBoostModeEnabled } }, /*Enable Boost*/
|
||||
{ (const char*) SettingsLongNames[9], { settings_setBoostTemp }, { settings_displayBoostTemp } }, /*Boost Temp*/
|
||||
{ (const char*) SettingsLongNames[10], { settings_setAutomaticStartMode }, { settings_displayAutomaticStartMode } },/*Auto start*/
|
||||
{ (const char*) SettingsLongNames[11], { settings_setCoolingBlinkEnabled }, { settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
||||
{ (const char*) SettingsLongNames[12], { settings_setCalibrate }, { settings_displayCalibrate } }, /*Calibrate tip*/
|
||||
{ (const char*) SettingsLongNames[13], { settings_setResetSettings }, { settings_displayResetSettings } }, /*Resets settings*/
|
||||
{ (const char*) SettingsLongNames[14], { settings_setCalibrateVIN }, { settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
||||
{ NULL, { NULL }, { NULL } } //end of menu marker. DO NOT REMOVE
|
||||
//Menu functions
|
||||
static void settings_displaySolderingMenu(void);
|
||||
static void settings_enterSolderingMenu(void);
|
||||
static void settings_displayPowerMenu(void);
|
||||
static void settings_enterPowerMenu(void);
|
||||
static void settings_displayUIMenu(void);
|
||||
static void settings_enterUIMenu(void);
|
||||
static void settings_displayAdvancedMenu(void);
|
||||
static void settings_enterAdvancedMenu(void);
|
||||
/*
|
||||
* Root Settings Menu
|
||||
*
|
||||
* Power Source
|
||||
* Soldering
|
||||
* Boost Mode Enabled
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
*
|
||||
* Power Saving
|
||||
* Sleep Temp
|
||||
* Sleep Time
|
||||
* Shutdown Time
|
||||
* Motion Sensitivity
|
||||
*
|
||||
* UI
|
||||
* // Language
|
||||
* Scrolling Speed
|
||||
* Temperature Unit
|
||||
* Display orientation
|
||||
* Cooldown blink
|
||||
*
|
||||
* Advanced
|
||||
* Detailed IDLE
|
||||
* Detailed Soldering
|
||||
* Logo Time
|
||||
* Calibrate Temperature
|
||||
* Calibrate Input V
|
||||
* Reset Settings
|
||||
*
|
||||
*/
|
||||
const menuitem rootSettingsMenu[] {
|
||||
/*
|
||||
* Power Source
|
||||
* Soldering Menu
|
||||
* Power Saving Menu
|
||||
* UI Menu
|
||||
* Advanced Menu
|
||||
* Exit
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[0], { settings_setInputVRange }, {
|
||||
settings_displayInputVRange } }, /*Voltage input*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[0], {
|
||||
settings_enterSolderingMenu }, { settings_displaySolderingMenu } }, /*Soldering*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[1], { settings_enterPowerMenu },
|
||||
{ settings_displayPowerMenu } }, /*Sleep Options Menu*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[2], { settings_enterUIMenu }, {
|
||||
settings_displayUIMenu } }, /*UI Menu*/
|
||||
{ (const char*) SettingsMenuEntriesDescriptions[3],
|
||||
{ settings_enterAdvancedMenu }, { settings_displayAdvancedMenu } }, /*Advanced Menu*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
const menuitem solderingMenu[] = {
|
||||
/*
|
||||
* Boost Mode Enabled
|
||||
* Boost Mode Temp
|
||||
* Auto Start
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[8], { settings_setBoostModeEnabled }, {
|
||||
settings_displayBoostModeEnabled } }, /*Enable Boost*/
|
||||
{ (const char*) SettingsDescriptions[9], { settings_setBoostTemp }, {
|
||||
settings_displayBoostTemp } }, /*Boost Temp*/
|
||||
{ (const char*) SettingsDescriptions[10], { settings_setAutomaticStartMode }, {
|
||||
settings_displayAutomaticStartMode } }, /*Auto start*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem UIMenu[] = {
|
||||
/*
|
||||
// Language
|
||||
* Scrolling Speed
|
||||
* Temperature Unit
|
||||
* Display orientation
|
||||
* Cooldown blink
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[5], { settings_setTempF }, {
|
||||
settings_displayTempF } }, /* Temperature units*/
|
||||
{ (const char*) SettingsDescriptions[7], { settings_setDisplayRotation }, {
|
||||
settings_displayDisplayRotation } }, /*Display Rotation*/
|
||||
{ (const char*) SettingsDescriptions[11], { settings_setCoolingBlinkEnabled }, {
|
||||
settings_displayCoolingBlinkEnabled } }, /*Cooling blink warning*/
|
||||
{ (const char*) SettingsDescriptions[16], { settings_setScrollSpeed }, {
|
||||
settings_displayScrollSpeed } }, /*Scroll Speed for descriptions*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem PowerMenu[] = {
|
||||
/*
|
||||
* Sleep Temp
|
||||
* Sleep Time
|
||||
* Shutdown Time
|
||||
* Motion Sensitivity
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[1], { settings_setSleepTemp }, {
|
||||
settings_displaySleepTemp } }, /*Sleep Temp*/
|
||||
{ (const char*) SettingsDescriptions[2], { settings_setSleepTime }, {
|
||||
settings_displaySleepTime } }, /*Sleep Time*/
|
||||
{ (const char*) SettingsDescriptions[3], { settings_setShutdownTime }, {
|
||||
settings_displayShutdownTime } }, /*Shutdown Time*/
|
||||
{ (const char*) SettingsDescriptions[4], { settings_setSensitivity }, {
|
||||
settings_displaySensitivity } }, /* Motion Sensitivity*/
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
const menuitem advancedMenu[] = {
|
||||
|
||||
/*
|
||||
* Detailed IDLE
|
||||
* Detailed Soldering
|
||||
* Logo Time
|
||||
* Calibrate Temperature
|
||||
* Calibrate Input V
|
||||
* Reset Settings
|
||||
*/
|
||||
{ (const char*) SettingsDescriptions[6], { settings_setAdvancedIDLEScreens }, {
|
||||
settings_displayAdvancedIDLEScreens } }, /* Advanced idle screen*/
|
||||
{ (const char*) SettingsDescriptions[15],
|
||||
{ settings_setAdvancedSolderingScreens }, {
|
||||
settings_displayAdvancedSolderingScreens } }, /* Advanced soldering screen*/
|
||||
{ (const char*) SettingsDescriptions[13], { settings_setResetSettings }, {
|
||||
settings_displayResetSettings } }, /*Resets settings*/
|
||||
{ (const char*) SettingsDescriptions[12], { settings_setCalibrate }, {
|
||||
settings_displayCalibrate } }, /*Calibrate tip*/
|
||||
{ (const char*) SettingsDescriptions[14], { settings_setCalibrateVIN }, {
|
||||
settings_displayCalibrateVIN } }, /*Voltage input cal*/
|
||||
#ifdef PIDSETTINGS
|
||||
|
||||
{ (const char*) SettingsDescriptions[17], {settings_setPIDP}, {
|
||||
settings_displayPIDP}}, /*Voltage input cal*/
|
||||
{ (const char*) SettingsDescriptions[18], {settings_setPIDI}, {
|
||||
settings_displayPIDI}}, /*Voltage input cal*/
|
||||
{ (const char*) SettingsDescriptions[19], {settings_setPIDD}, {
|
||||
settings_displayPIDD}}, /*Voltage input cal*/
|
||||
#endif
|
||||
{ NULL, { NULL }, { NULL } } // end of menu marker. DO NOT REMOVE
|
||||
};
|
||||
|
||||
static void printShortDescriptionSingleLine(uint32_t shortDescIndex) {
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
}
|
||||
|
||||
static void printShortDescriptionDoubleLine(uint32_t shortDescIndex) {
|
||||
lcd.setFont(1);
|
||||
lcd.setCharCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][0]);
|
||||
lcd.setCharCursor(0, 1);
|
||||
lcd.print(SettingsShortNames[shortDescIndex][1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints two small lines of short description
|
||||
* and prepares cursor in big font after it.
|
||||
* @param shortDescIndex Index to of short description.
|
||||
* @param cursorCharPosition Custom cursor char position to set after printing
|
||||
* description.
|
||||
*/
|
||||
static void printShortDescription(uint32_t shortDescIndex,
|
||||
uint16_t cursorCharPosition) {
|
||||
// print short description (default single line, explicit double line)
|
||||
if (SettingsShortNameType == SHORT_NAME_DOUBLE_LINE) {
|
||||
printShortDescriptionDoubleLine(shortDescIndex);
|
||||
} else {
|
||||
printShortDescriptionSingleLine(shortDescIndex);
|
||||
}
|
||||
|
||||
// prepare cursor for value
|
||||
lcd.setFont(0);
|
||||
lcd.setCharCursor(cursorCharPosition, 0);
|
||||
}
|
||||
|
||||
static int userConfirmation(const char* message) {
|
||||
uint16_t messageWidth = FONT_12_WIDTH * (strlen(message) + 7);
|
||||
uint32_t messageStart = xTaskGetTickCount();
|
||||
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
int16_t lastOffset = -1;
|
||||
bool lcdRefresh = true;
|
||||
|
||||
for (;;) {
|
||||
|
||||
int16_t messageOffset = ((xTaskGetTickCount() - messageStart)
|
||||
/ (systemSettings.descriptionScrollSpeed == 1 ? 1 : 2));
|
||||
messageOffset %= messageWidth; //Roll around at the end
|
||||
|
||||
if (lastOffset != messageOffset) {
|
||||
lcd.clearScreen();
|
||||
|
||||
//^ Rolling offset based on time
|
||||
lcd.setCursor((OLED_WIDTH - messageOffset), 0);
|
||||
lcd.print(message);
|
||||
lastOffset = messageOffset;
|
||||
lcdRefresh = true;
|
||||
}
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
switch (buttons) {
|
||||
case BUTTON_F_SHORT:
|
||||
//User confirmed
|
||||
return 1;
|
||||
|
||||
case BUTTON_NONE:
|
||||
break;
|
||||
default:
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_B_SHORT:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (lcdRefresh) {
|
||||
lcd.refresh();
|
||||
osDelay(40);
|
||||
lcdRefresh = false;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void settings_setInputVRange(void) {
|
||||
systemSettings.cutoutSetting = (systemSettings.cutoutSetting + 1) % 5;
|
||||
}
|
||||
|
||||
static void settings_displayInputVRange(void) {
|
||||
lcd.print(SettingsShortNames[0]);
|
||||
printShortDescription(0, 6);
|
||||
|
||||
if (systemSettings.cutoutSetting) {
|
||||
lcd.drawChar('0' + 2 + systemSettings.cutoutSetting);
|
||||
lcd.drawChar('S');
|
||||
@@ -78,23 +302,38 @@ static void settings_displayInputVRange(void) {
|
||||
}
|
||||
|
||||
static void settings_setSleepTemp(void) {
|
||||
systemSettings.SleepTemp += 10;
|
||||
if (systemSettings.SleepTemp > 300)
|
||||
systemSettings.SleepTemp = 50;
|
||||
//If in C, 10 deg, if in F 20 deg
|
||||
if (systemSettings.temperatureInF) {
|
||||
systemSettings.SleepTemp += 20;
|
||||
if (systemSettings.SleepTemp > 580)
|
||||
systemSettings.SleepTemp = 120;
|
||||
} else {
|
||||
systemSettings.SleepTemp += 10;
|
||||
if (systemSettings.SleepTemp > 300)
|
||||
systemSettings.SleepTemp = 50;
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displaySleepTemp(void) {
|
||||
lcd.print(SettingsShortNames[1]);
|
||||
printShortDescription(1, 5);
|
||||
lcd.printNumber(systemSettings.SleepTemp, 3);
|
||||
}
|
||||
|
||||
static void settings_setSleepTime(void) {
|
||||
++systemSettings.SleepTime; //Go up 1 minute at a time
|
||||
if (systemSettings.SleepTime >= 16)
|
||||
systemSettings.SleepTime = 1; //can't set time over 10 mins
|
||||
//Remember that ^ is the time of no movement
|
||||
systemSettings.SleepTime++; // Go up 1 minute at a time
|
||||
if (systemSettings.SleepTime >= 16) {
|
||||
systemSettings.SleepTime = 0; // can't set time over 10 mins
|
||||
}
|
||||
// Remember that ^ is the time of no movement
|
||||
if (PCBVersion == 3)
|
||||
systemSettings.SleepTime = 0; //Disable sleep on no accel
|
||||
}
|
||||
|
||||
static void settings_displaySleepTime(void) {
|
||||
lcd.print(SettingsShortNames[2]);
|
||||
if (systemSettings.SleepTime < 6) {
|
||||
printShortDescription(2, 5);
|
||||
if (systemSettings.SleepTime == 0) {
|
||||
lcd.print(OffString);
|
||||
} else if (systemSettings.SleepTime < 6) {
|
||||
lcd.printNumber(systemSettings.SleepTime * 10, 2);
|
||||
lcd.drawChar('S');
|
||||
} else {
|
||||
@@ -102,202 +341,271 @@ static void settings_displaySleepTime(void) {
|
||||
lcd.drawChar('M');
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_setShutdownTime(void) {
|
||||
++systemSettings.ShutdownTime;
|
||||
if (systemSettings.ShutdownTime > 60)
|
||||
systemSettings.ShutdownTime = 0; //wrap to off
|
||||
systemSettings.ShutdownTime++;
|
||||
if (systemSettings.ShutdownTime > 60) {
|
||||
systemSettings.ShutdownTime = 0; // wrap to off
|
||||
}
|
||||
if (PCBVersion == 3)
|
||||
systemSettings.ShutdownTime = 0; //Disable shutdown on no accel
|
||||
}
|
||||
|
||||
static void settings_displayShutdownTime(void) {
|
||||
lcd.print(SettingsShortNames[3]);
|
||||
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
||||
printShortDescription(3, 5);
|
||||
if (systemSettings.ShutdownTime == 0) {
|
||||
lcd.print(OffString);
|
||||
} else {
|
||||
lcd.printNumber(systemSettings.ShutdownTime, 2);
|
||||
lcd.drawChar('M');
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_setTempF(void) {
|
||||
systemSettings.temperatureInF = !systemSettings.temperatureInF;
|
||||
}
|
||||
static void settings_displayTempF(void) {
|
||||
lcd.print(SettingsShortNames[5]);
|
||||
if (systemSettings.temperatureInF) {
|
||||
//Change sleep, boost and soldering temps to the F equiv
|
||||
//C to F == F= ( (C*9) +160)/5
|
||||
systemSettings.BoostTemp = ((systemSettings.BoostTemp * 9) + 160) / 5;
|
||||
systemSettings.SolderingTemp =
|
||||
((systemSettings.SolderingTemp * 9) + 160) / 5;
|
||||
systemSettings.SleepTemp = ((systemSettings.SleepTemp * 9) + 160) / 5;
|
||||
} else {
|
||||
//Change sleep, boost and soldering temps to the C equiv
|
||||
// F->C == C = ((F-32)*5)/9
|
||||
systemSettings.BoostTemp = ((systemSettings.BoostTemp - 32) * 5) / 9;
|
||||
systemSettings.SolderingTemp = ((systemSettings.SolderingTemp - 32) * 5)
|
||||
/ 9;
|
||||
systemSettings.SleepTemp = ((systemSettings.SleepTemp - 32) * 5) / 9;
|
||||
|
||||
if (systemSettings.temperatureInF)
|
||||
lcd.drawChar('F');
|
||||
else
|
||||
lcd.drawChar('C');
|
||||
}
|
||||
// Rescale both to be multiples of 10
|
||||
systemSettings.BoostTemp = systemSettings.BoostTemp / 10;
|
||||
systemSettings.BoostTemp *= 10;
|
||||
systemSettings.SolderingTemp = systemSettings.SolderingTemp / 10;
|
||||
systemSettings.SolderingTemp *= 10;
|
||||
systemSettings.SleepTemp = systemSettings.SleepTemp / 10;
|
||||
systemSettings.SleepTemp *= 10;
|
||||
|
||||
}
|
||||
|
||||
static void settings_displayTempF(void) {
|
||||
printShortDescription(5, 7);
|
||||
|
||||
lcd.drawChar((systemSettings.temperatureInF) ? 'F' : 'C');
|
||||
}
|
||||
|
||||
static void settings_setSensitivity(void) {
|
||||
systemSettings.sensitivity++;
|
||||
systemSettings.sensitivity = systemSettings.sensitivity % 10;
|
||||
}
|
||||
|
||||
static void settings_displaySensitivity(void) {
|
||||
lcd.print(SettingsShortNames[4]);
|
||||
printShortDescription(4, 7);
|
||||
lcd.printNumber(systemSettings.sensitivity, 1);
|
||||
}
|
||||
|
||||
static void settings_setAdvancedSolderingScreens(void) {
|
||||
systemSettings.detailedSoldering = !systemSettings.detailedSoldering;
|
||||
}
|
||||
|
||||
static void settings_displayAdvancedSolderingScreens(void) {
|
||||
lcd.print(SettingsShortNames[15]);
|
||||
if (systemSettings.detailedSoldering)
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
else
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
printShortDescription(15, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.detailedSoldering);
|
||||
}
|
||||
|
||||
static void settings_setAdvancedIDLEScreens(void) {
|
||||
systemSettings.detailedIDLE = !systemSettings.detailedIDLE;
|
||||
}
|
||||
static void settings_displayAdvancedIDLEScreens(void) {
|
||||
lcd.print(SettingsShortNames[6]);
|
||||
if (systemSettings.detailedIDLE)
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
else
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
}
|
||||
|
||||
static void settings_displayAdvancedIDLEScreens(void) {
|
||||
printShortDescription(6, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.detailedIDLE);
|
||||
}
|
||||
static void settings_setScrollSpeed(void) {
|
||||
|
||||
if (systemSettings.descriptionScrollSpeed == 0)
|
||||
systemSettings.descriptionScrollSpeed = 1;
|
||||
else
|
||||
systemSettings.descriptionScrollSpeed = 0;
|
||||
}
|
||||
static void settings_displayScrollSpeed(void) {
|
||||
printShortDescription(16, 7);
|
||||
lcd.drawChar(
|
||||
(systemSettings.descriptionScrollSpeed) ?
|
||||
SettingFastChar : SettingSlowChar);
|
||||
}
|
||||
|
||||
static void settings_setDisplayRotation(void) {
|
||||
systemSettings.OrientationMode++;
|
||||
systemSettings.OrientationMode = systemSettings.OrientationMode % 3;
|
||||
}
|
||||
static void settings_displayDisplayRotation(void) {
|
||||
lcd.print(SettingsShortNames[7]);
|
||||
switch (systemSettings.OrientationMode) {
|
||||
case 0:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
case 1:
|
||||
lcd.drawChar(SettingLeftChar);
|
||||
break;
|
||||
case 2:
|
||||
lcd.drawChar(SettingAutoChar);
|
||||
break;
|
||||
case 0:
|
||||
lcd.setRotation(false);
|
||||
break;
|
||||
case 1:
|
||||
lcd.setRotation(true);
|
||||
break;
|
||||
case 2:
|
||||
//do nothing on auto
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void settings_displayDisplayRotation(void) {
|
||||
printShortDescription(7, 7);
|
||||
|
||||
switch (systemSettings.OrientationMode) {
|
||||
case 0:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
case 1:
|
||||
lcd.drawChar(SettingLeftChar);
|
||||
break;
|
||||
case 2:
|
||||
lcd.drawChar(SettingAutoChar);
|
||||
break;
|
||||
default:
|
||||
lcd.drawChar(SettingRightChar);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_setBoostModeEnabled(void) {
|
||||
systemSettings.boostModeEnabled = !systemSettings.boostModeEnabled;
|
||||
}
|
||||
|
||||
static void settings_displayBoostModeEnabled(void) {
|
||||
lcd.print(SettingsShortNames[8]);
|
||||
if (systemSettings.boostModeEnabled)
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
else
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
printShortDescription(8, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.boostModeEnabled);
|
||||
}
|
||||
|
||||
static void settings_setBoostTemp(void) {
|
||||
systemSettings.BoostTemp += 10; //Go up 10 at a time
|
||||
|
||||
if (systemSettings.temperatureInF) {
|
||||
if (systemSettings.BoostTemp > 850)
|
||||
systemSettings.BoostTemp = 480; //loop back at 250
|
||||
systemSettings.BoostTemp += 20; // Go up 20F at a time
|
||||
if (systemSettings.BoostTemp > 850) {
|
||||
systemSettings.BoostTemp = 480; // loop back at 250
|
||||
}
|
||||
} else {
|
||||
if (systemSettings.BoostTemp > 450)
|
||||
systemSettings.BoostTemp = 250; //loop back at 250
|
||||
systemSettings.BoostTemp += 10; // Go up 10C at a time
|
||||
if (systemSettings.BoostTemp > 450) {
|
||||
systemSettings.BoostTemp = 250; // loop back at 250
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayBoostTemp(void) {
|
||||
lcd.print(SettingsShortNames[9]);
|
||||
printShortDescription(9, 5);
|
||||
lcd.printNumber(systemSettings.BoostTemp, 3);
|
||||
}
|
||||
|
||||
#ifdef PIDSETTINGS
|
||||
static void settings_setPIDP(void) {
|
||||
systemSettings.PID_P++;
|
||||
systemSettings.PID_P %= 100;
|
||||
}
|
||||
static void settings_displayPIDP(void) {
|
||||
printShortDescription(17, 6);
|
||||
lcd.printNumber(systemSettings.PID_P, 2);
|
||||
}
|
||||
static void settings_setPIDI(void) {
|
||||
systemSettings.PID_I++;
|
||||
systemSettings.PID_I %= 100;
|
||||
}
|
||||
static void settings_displayPIDI(void) {
|
||||
printShortDescription(18, 6);
|
||||
lcd.printNumber(systemSettings.PID_I, 2);
|
||||
}
|
||||
static void settings_setPIDD(void) {
|
||||
systemSettings.PID_D++;
|
||||
systemSettings.PID_D %= 100;
|
||||
}
|
||||
static void settings_displayPIDD(void) {
|
||||
printShortDescription(19, 6);
|
||||
lcd.printNumber(systemSettings.PID_D, 2);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void settings_setAutomaticStartMode(void) {
|
||||
systemSettings.autoStartMode++;
|
||||
systemSettings.autoStartMode %= 2;
|
||||
}
|
||||
|
||||
static void settings_displayAutomaticStartMode(void) {
|
||||
lcd.print(SettingsShortNames[10]);
|
||||
switch (systemSettings.autoStartMode) {
|
||||
case 0:
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
break;
|
||||
case 1:
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
break;
|
||||
}
|
||||
printShortDescription(10, 7);
|
||||
lcd.drawCheckbox(systemSettings.autoStartMode);
|
||||
}
|
||||
|
||||
static void settings_setCoolingBlinkEnabled(void) {
|
||||
systemSettings.coolingTempBlink = !systemSettings.coolingTempBlink;
|
||||
}
|
||||
|
||||
static void settings_displayCoolingBlinkEnabled(void) {
|
||||
lcd.print(SettingsShortNames[11]);
|
||||
if (systemSettings.coolingTempBlink)
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
else
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
printShortDescription(11, 7);
|
||||
|
||||
lcd.drawCheckbox(systemSettings.coolingTempBlink);
|
||||
}
|
||||
|
||||
static void settings_setResetSettings(void) {
|
||||
settingsResetRequest = !settingsResetRequest;
|
||||
if (userConfirmation(SettingsResetWarning)) {
|
||||
resetSettings();
|
||||
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print("RESET OK");
|
||||
lcd.refresh();
|
||||
|
||||
waitForButtonPressOrTimeout(200);
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayResetSettings(void) {
|
||||
lcd.print(SettingsShortNames[13]);
|
||||
if (settingsResetRequest)
|
||||
lcd.drawChar(SettingTrueChar);
|
||||
else
|
||||
lcd.drawChar(SettingFalseChar);
|
||||
printShortDescription(13, 7);
|
||||
}
|
||||
|
||||
static void settings_setCalibrate(void) {
|
||||
//Calibrate the offset
|
||||
//We split off here to confirm with the user
|
||||
uint8_t maxOffset = strlen(SettingsCalibrationWarning) + 5;
|
||||
uint32_t descriptionStart = HAL_GetTick();
|
||||
lcd.setFont(0);
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
for (;;) {
|
||||
|
||||
int16_t descriptionOffset = (((HAL_GetTick() - descriptionStart) / 150) % maxOffset);
|
||||
lcd.setCursor(12 * (7 - descriptionOffset), 0);
|
||||
lcd.print(SettingsCalibrationWarning);
|
||||
ButtonState buttons = getButtonState();
|
||||
|
||||
switch (buttons) {
|
||||
case BUTTON_F_SHORT: {
|
||||
//User confirmed
|
||||
//So we now perform the actual calculation
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(".....");
|
||||
lcd.refresh();
|
||||
setCalibrationOffset(0); //turn off the current offset
|
||||
for (uint8_t i = 0; i < 20; i++) {
|
||||
getTipRawTemp(1); //cycle through the filter a fair bit to ensure were stable.
|
||||
osDelay(20);
|
||||
}
|
||||
osDelay(100);
|
||||
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
||||
//We now measure the current reported tip temperature
|
||||
uint16_t handleTempC = getHandleTemperature() / 10;
|
||||
//We now have an error between these that we want to store as the offset
|
||||
rawTempC = rawTempC - handleTempC;
|
||||
systemSettings.CalibrationOffset = rawTempC;
|
||||
setCalibrationOffset(rawTempC); //store the error
|
||||
osDelay(100);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_B_SHORT:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
return;
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
break;
|
||||
}
|
||||
if (userConfirmation(SettingsCalibrationWarning)) {
|
||||
//User confirmed
|
||||
//So we now perform the actual calculation
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(".....");
|
||||
lcd.refresh();
|
||||
osDelay(50);
|
||||
}
|
||||
|
||||
setCalibrationOffset(0); //turn off the current offset
|
||||
for (uint8_t i = 0; i < 20; i++) {
|
||||
getTipRawTemp(1); //cycle through the filter a fair bit to ensure we're stable.
|
||||
osDelay(20);
|
||||
}
|
||||
osDelay(100);
|
||||
|
||||
uint16_t rawTempC = tipMeasurementToC(getTipRawTemp(0));
|
||||
//We now measure the current reported tip temperature
|
||||
uint16_t handleTempC = getHandleTemperature() / 10;
|
||||
//We now have an error between these that we want to store as the offset
|
||||
rawTempC = rawTempC - handleTempC;
|
||||
systemSettings.CalibrationOffset = rawTempC;
|
||||
setCalibrationOffset(rawTempC); //store the error
|
||||
osDelay(100);
|
||||
}
|
||||
}
|
||||
|
||||
static void settings_displayCalibrate(void) {
|
||||
lcd.print(SettingsShortNames[12]);
|
||||
printShortDescription(12, 5);
|
||||
}
|
||||
|
||||
static void settings_setCalibrateVIN(void) {
|
||||
//Jump to the voltage calibration subscreen
|
||||
// Jump to the voltage calibration subscreen
|
||||
lcd.setFont(0);
|
||||
lcd.clearScreen();
|
||||
lcd.setCursor(0, 0);
|
||||
|
||||
for (;;) {
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.printNumber(getInputVoltageX10(systemSettings.voltageDiv) / 10, 2);
|
||||
@@ -307,33 +615,191 @@ static void settings_setCalibrateVIN(void) {
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
switch (buttons) {
|
||||
case BUTTON_F_SHORT:
|
||||
systemSettings.voltageDiv++;
|
||||
break;
|
||||
case BUTTON_B_SHORT:
|
||||
systemSettings.voltageDiv--;
|
||||
break;
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
saveSettings();
|
||||
return;
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
systemSettings.voltageDiv++;
|
||||
break;
|
||||
|
||||
case BUTTON_B_SHORT:
|
||||
systemSettings.voltageDiv--;
|
||||
break;
|
||||
|
||||
case BUTTON_BOTH:
|
||||
case BUTTON_F_LONG:
|
||||
case BUTTON_B_LONG:
|
||||
saveSettings();
|
||||
return;
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
lcd.refresh();
|
||||
osDelay(50);
|
||||
if (systemSettings.voltageDiv < 90)
|
||||
osDelay(40);
|
||||
|
||||
// Cap to sensible values
|
||||
if (systemSettings.voltageDiv < 90) {
|
||||
systemSettings.voltageDiv = 90;
|
||||
else if (systemSettings.voltageDiv > 130)
|
||||
} else if (systemSettings.voltageDiv > 130) {
|
||||
systemSettings.voltageDiv = 130;
|
||||
//Cap to sensible values
|
||||
}
|
||||
}
|
||||
}
|
||||
static void settings_displayCalibrateVIN(void) {
|
||||
lcd.clearScreen();
|
||||
|
||||
static void displayMenu(size_t index) {
|
||||
//Call into the menu
|
||||
lcd.setFont(1);
|
||||
lcd.setCursor(0, 0);
|
||||
lcd.print(SettingsShortNames[14]);
|
||||
//Draw title
|
||||
lcd.print(SettingsMenuEntries[index]);
|
||||
//Draw symbol
|
||||
//16 pixel wide image
|
||||
lcd.drawArea(96 - 16, 0, 16, 16, (&SettingsMenuIcons[(16 * 2) * index]));
|
||||
}
|
||||
|
||||
static void settings_displayCalibrateVIN(void) {
|
||||
printShortDescription(14, 5);
|
||||
}
|
||||
static void settings_displaySolderingMenu(void) {
|
||||
displayMenu(0);
|
||||
}
|
||||
static void settings_enterSolderingMenu(void) {
|
||||
gui_Menu(solderingMenu);
|
||||
}
|
||||
static void settings_displayPowerMenu(void) {
|
||||
displayMenu(1);
|
||||
}
|
||||
static void settings_enterPowerMenu(void) {
|
||||
gui_Menu(PowerMenu);
|
||||
}
|
||||
static void settings_displayUIMenu(void) {
|
||||
displayMenu(2);
|
||||
}
|
||||
static void settings_enterUIMenu(void) {
|
||||
gui_Menu(UIMenu);
|
||||
}
|
||||
static void settings_displayAdvancedMenu(void) {
|
||||
displayMenu(3);
|
||||
}
|
||||
static void settings_enterAdvancedMenu(void) {
|
||||
gui_Menu(advancedMenu);
|
||||
}
|
||||
|
||||
void gui_Menu(const menuitem* menu) {
|
||||
// Draw the settings menu and provide iteration support etc
|
||||
uint8_t currentScreen = 0;
|
||||
uint32_t autoRepeatTimer = 0;
|
||||
uint8_t autoRepeatAcceleration = 0;
|
||||
bool earlyExit = false;
|
||||
uint32_t descriptionStart = 0;
|
||||
int16_t lastOffset = -1;
|
||||
bool lcdRefresh = true;
|
||||
ButtonState lastButtonState = BUTTON_NONE;
|
||||
|
||||
while ((menu[currentScreen].draw.func != NULL) && earlyExit == false) {
|
||||
lcd.setFont(0);
|
||||
lcd.setCursor(0, 0);
|
||||
//If the user has hesitated for >=3 seconds, show the long text
|
||||
//Otherwise "draw" the option
|
||||
if (xTaskGetTickCount() - lastButtonTime < 300) {
|
||||
lcd.clearScreen();
|
||||
menu[currentScreen].draw.func();
|
||||
lastOffset = -1;
|
||||
lcdRefresh = true;
|
||||
} else {
|
||||
// Draw description
|
||||
if (descriptionStart == 0)
|
||||
descriptionStart = xTaskGetTickCount();
|
||||
// lower the value - higher the speed
|
||||
int16_t descriptionWidth = FONT_12_WIDTH
|
||||
* (strlen(menu[currentScreen].description) + 7);
|
||||
int16_t descriptionOffset =
|
||||
((xTaskGetTickCount() - descriptionStart)
|
||||
/ (systemSettings.descriptionScrollSpeed == 1 ?
|
||||
1 : 2));
|
||||
descriptionOffset %= descriptionWidth; //Roll around at the end
|
||||
|
||||
if (lastOffset != descriptionOffset) {
|
||||
lcd.clearScreen();
|
||||
|
||||
//^ Rolling offset based on time
|
||||
lcd.setCursor((OLED_WIDTH - descriptionOffset), 0);
|
||||
lcd.print(menu[currentScreen].description);
|
||||
lastOffset = descriptionOffset;
|
||||
lcdRefresh = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ButtonState buttons = getButtonState();
|
||||
|
||||
if (buttons != lastButtonState) {
|
||||
autoRepeatAcceleration = 0;
|
||||
lastButtonState = buttons;
|
||||
}
|
||||
|
||||
switch (buttons) {
|
||||
case BUTTON_BOTH:
|
||||
earlyExit = true; // will make us exit next loop
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_F_SHORT:
|
||||
// increment
|
||||
if (descriptionStart == 0) {
|
||||
if (menu[currentScreen].incrementHandler.func != NULL)
|
||||
menu[currentScreen].incrementHandler.func();
|
||||
else
|
||||
earlyExit = true;
|
||||
} else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_B_SHORT:
|
||||
if (descriptionStart == 0)
|
||||
currentScreen++;
|
||||
else
|
||||
descriptionStart = 0;
|
||||
break;
|
||||
case BUTTON_F_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer
|
||||
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||
menu[currentScreen].incrementHandler.func();
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
|
||||
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||
}
|
||||
break;
|
||||
case BUTTON_B_LONG:
|
||||
if (xTaskGetTickCount() - autoRepeatTimer
|
||||
+ autoRepeatAcceleration> PRESS_ACCEL_INTERVAL_MAX) {
|
||||
currentScreen++;
|
||||
autoRepeatTimer = xTaskGetTickCount();
|
||||
descriptionStart = 0;
|
||||
|
||||
autoRepeatAcceleration += PRESS_ACCEL_STEP;
|
||||
}
|
||||
break;
|
||||
case BUTTON_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((PRESS_ACCEL_INTERVAL_MAX - autoRepeatAcceleration)
|
||||
< PRESS_ACCEL_INTERVAL_MIN) {
|
||||
autoRepeatAcceleration = PRESS_ACCEL_INTERVAL_MAX
|
||||
- PRESS_ACCEL_INTERVAL_MIN;
|
||||
}
|
||||
|
||||
if (lcdRefresh) {
|
||||
lcd.refresh(); // update the LCD
|
||||
osDelay(40);
|
||||
lcdRefresh = false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void enterSettingsMenu() {
|
||||
gui_Menu(rootSettingsMenu); //Call the root menu
|
||||
saveSettings();
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ uint16_t getHandleTemperature() {
|
||||
// STM32 = 4096 count @ 3.3V input -> But
|
||||
// We oversample by 32/(2^2) = 8 times oversampling
|
||||
// Therefore 32768 is the 3.3V input, so 0.201416015625 mV per count
|
||||
// So we need to subtract an offset of 0.5V to center on 0C (2482 counts)
|
||||
// So we need to subtract an offset of 0.5V to center on 0C (2482*2 counts)
|
||||
//
|
||||
uint16_t result = getADC(0);
|
||||
if (result < 4964)
|
||||
@@ -29,21 +29,25 @@ uint16_t getHandleTemperature() {
|
||||
|
||||
}
|
||||
uint16_t tipMeasurementToC(uint16_t raw) {
|
||||
return ((raw - 532) / 33) + (getHandleTemperature() / 10) - CalibrationTempOffset;
|
||||
return ((raw - 532) / 33) + (getHandleTemperature() / 10)
|
||||
- CalibrationTempOffset;
|
||||
//Surprisingly that appears to be a fairly good linear best fit
|
||||
}
|
||||
uint16_t ctoTipMeasurement(uint16_t temp) {
|
||||
//We need to compensate for cold junction temp
|
||||
return ((temp - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33) + 532;
|
||||
return ((temp - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33)
|
||||
+ 532;
|
||||
}
|
||||
|
||||
uint16_t tipMeasurementToF(uint16_t raw) {
|
||||
return ((((raw - 532) / 33) + (getHandleTemperature() / 10) - CalibrationTempOffset) * 9) / 5 + 32;
|
||||
return ((((raw - 532) / 33) + (getHandleTemperature() / 10)
|
||||
- CalibrationTempOffset) * 9) / 5 + 32;
|
||||
|
||||
}
|
||||
uint16_t ftoTipMeasurement(uint16_t temp) {
|
||||
|
||||
return (((((temp - 32) * 5) / 9) - (getHandleTemperature() / 10) + CalibrationTempOffset) * 33) + 532;
|
||||
return (((((temp - 32) * 5) / 9) - (getHandleTemperature() / 10)
|
||||
+ CalibrationTempOffset) * 33) + 532;
|
||||
}
|
||||
|
||||
uint16_t getTipInstantTemperature() {
|
||||
@@ -56,35 +60,20 @@ uint16_t getTipInstantTemperature() {
|
||||
|
||||
}
|
||||
uint16_t getTipRawTemp(uint8_t instant) {
|
||||
#define filterDepth1 1
|
||||
/*Pre filter used before PID*/
|
||||
#define filterDepth2 32
|
||||
/*Post filter used for UI display*/
|
||||
static uint16_t filterLayer1[filterDepth1];
|
||||
static uint16_t filterLayer2[filterDepth2];
|
||||
static uint8_t index = 0;
|
||||
static uint8_t indexFilter = 0;
|
||||
static int64_t filterFP = 0;
|
||||
const uint8_t filterBeta = 5; //higher values smooth out more, but reduce responsiveness
|
||||
|
||||
if (instant) {
|
||||
if (instant == 1) {
|
||||
uint16_t itemp = getTipInstantTemperature();
|
||||
filterLayer1[index] = itemp;
|
||||
index = (index + 1) % filterDepth1;
|
||||
uint32_t total = 0;
|
||||
for (uint8_t i = 0; i < filterDepth1; i++)
|
||||
total += filterLayer1[i];
|
||||
|
||||
return total / filterDepth1;
|
||||
filterFP = (filterFP << filterBeta) - filterFP;
|
||||
filterFP += (itemp << 9);
|
||||
filterFP = filterFP >> filterBeta;
|
||||
return itemp;
|
||||
} else if (instant == 2) {
|
||||
filterFP = (getTipInstantTemperature() << 9);
|
||||
return filterFP >> 9;
|
||||
} else {
|
||||
uint32_t total = 0;
|
||||
for (uint8_t i = 0; i < filterDepth1; i++)
|
||||
total += filterLayer1[i];
|
||||
filterLayer2[indexFilter] = total / filterDepth1;
|
||||
indexFilter = (indexFilter + 1) % filterDepth2;
|
||||
total = 0;
|
||||
for (uint8_t i = 0; i < filterDepth2; i++)
|
||||
total += filterLayer2[i];
|
||||
|
||||
return total / filterDepth2;
|
||||
return filterFP >> 9;
|
||||
}
|
||||
}
|
||||
uint16_t getInputVoltageX10(uint8_t divisor) {
|
||||
@@ -116,15 +105,10 @@ uint8_t getTipPWM() {
|
||||
return htim2.Instance->CCR4;
|
||||
}
|
||||
void setTipPWM(uint8_t pulse) {
|
||||
PWMSafetyTimer = 100; //This is decremented in the handler for PWM so that the tip pwm is disabled if the PID task is not scheduled often enough.
|
||||
PWMSafetyTimer = 2; //This is decremented in the handler for PWM so that the tip pwm is disabled if the PID task is not scheduled often enough.
|
||||
if (pulse > 100)
|
||||
pulse = 100;
|
||||
if (pulse) {
|
||||
htim2.Instance->CCR4 = pulse;
|
||||
} else {
|
||||
htim2.Instance->CCR4 = 0;
|
||||
}
|
||||
|
||||
htim2.Instance->CCR4 = pulse;
|
||||
}
|
||||
|
||||
//Thse are called by the HAL after the corresponding events from the system timers.
|
||||
@@ -133,8 +117,8 @@ void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) {
|
||||
//Period has elapsed
|
||||
if (htim->Instance == TIM2) {
|
||||
//we want to turn on the output again
|
||||
PWMSafetyTimer--; //We decrement this safety value so that lockups in the scheduler will not cause the PWM to become locked in an active driving state.
|
||||
//While we could assume this could never happened, its a small price for increased safety
|
||||
PWMSafetyTimer--; //We decrement this safety value so that lockups in the scheduler will not cause the PWM to become locked in an active driving state.
|
||||
//While we could assume this could never happen, its a small price for increased safety
|
||||
if (htim2.Instance->CCR4 && PWMSafetyTimer) {
|
||||
htim3.Instance->CCR1 = 50;
|
||||
HAL_TIM_PWM_Start(&htim3, TIM_CHANNEL_1);
|
||||
@@ -153,6 +137,11 @@ void HAL_TIM_PWM_PulseFinishedCallback(TIM_HandleTypeDef *htim) {
|
||||
if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_4) {
|
||||
HAL_TIM_PWM_Stop(&htim3, TIM_CHANNEL_1);
|
||||
htim3.Instance->CCR1 = 0;
|
||||
}
|
||||
|
||||
} /*else if (htim->Channel == HAL_TIM_ACTIVE_CHANNEL_1) {
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_13, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_14, GPIO_PIN_RESET);
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,8 +28,9 @@ void HAL_MspInit(void) {
|
||||
|
||||
/**NOJTAG: JTAG-DP Disabled and SW-DP Enabled
|
||||
*/
|
||||
__HAL_AFIO_REMAP_SWJ_NOJTAG()
|
||||
;
|
||||
//__HAL_AFIO_REMAP_SWJ_NOJTAG()
|
||||
//;
|
||||
__HAL_AFIO_REMAP_SWJ_DISABLE(); /*Disable swd for debug io use*/
|
||||
|
||||
}
|
||||
|
||||
@@ -67,63 +68,63 @@ void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc) {
|
||||
__HAL_LINKDMA(hadc, DMA_Handle, hdma_adc1);
|
||||
|
||||
/* ADC1 interrupt Init */
|
||||
HAL_NVIC_SetPriority(ADC1_2_IRQn, 5, 0);
|
||||
HAL_NVIC_SetPriority(ADC1_2_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(ADC1_2_IRQn);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c) {
|
||||
|
||||
GPIO_InitTypeDef GPIO_InitStruct;
|
||||
if (hi2c->Instance == I2C1) {
|
||||
/**I2C1 GPIO Configuration
|
||||
PB6 ------> I2C1_SCL
|
||||
PB7 ------> I2C1_SDA
|
||||
*/
|
||||
GPIO_InitStruct.Pin = SCL_Pin | SDA_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
/**I2C1 GPIO Configuration
|
||||
PB6 ------> I2C1_SCL
|
||||
PB7 ------> I2C1_SDA
|
||||
*/
|
||||
GPIO_InitStruct.Pin = SCL_Pin | SDA_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
|
||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
|
||||
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
|
||||
|
||||
/* Peripheral clock enable */
|
||||
__HAL_RCC_I2C1_CLK_ENABLE()
|
||||
;
|
||||
/* Peripheral clock enable */
|
||||
__HAL_RCC_I2C1_CLK_ENABLE()
|
||||
;
|
||||
/* I2C1 DMA Init */
|
||||
/* I2C1_RX Init */
|
||||
hdma_i2c1_rx.Instance = DMA1_Channel7;
|
||||
hdma_i2c1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||
hdma_i2c1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||
hdma_i2c1_rx.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_i2c1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||
hdma_i2c1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||
hdma_i2c1_rx.Init.Mode = DMA_NORMAL;
|
||||
hdma_i2c1_rx.Init.Priority = DMA_PRIORITY_MEDIUM;
|
||||
HAL_DMA_Init(&hdma_i2c1_rx);
|
||||
|
||||
/* I2C1 DMA Init */
|
||||
/* I2C1_RX Init */
|
||||
hdma_i2c1_rx.Instance = DMA1_Channel7;
|
||||
hdma_i2c1_rx.Init.Direction = DMA_PERIPH_TO_MEMORY;
|
||||
hdma_i2c1_rx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||
hdma_i2c1_rx.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_i2c1_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||
hdma_i2c1_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||
hdma_i2c1_rx.Init.Mode = DMA_NORMAL;
|
||||
hdma_i2c1_rx.Init.Priority = DMA_PRIORITY_LOW;
|
||||
HAL_DMA_Init(&hdma_i2c1_rx);
|
||||
__HAL_LINKDMA(hi2c, hdmarx, hdma_i2c1_rx);
|
||||
|
||||
__HAL_LINKDMA(hi2c, hdmarx, hdma_i2c1_rx);
|
||||
/* I2C1_TX Init */
|
||||
hdma_i2c1_tx.Instance = DMA1_Channel6;
|
||||
hdma_i2c1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
|
||||
hdma_i2c1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||
hdma_i2c1_tx.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_i2c1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||
hdma_i2c1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||
hdma_i2c1_tx.Init.Mode = DMA_NORMAL;
|
||||
hdma_i2c1_tx.Init.Priority = DMA_PRIORITY_MEDIUM;
|
||||
HAL_DMA_Init(&hdma_i2c1_tx);
|
||||
|
||||
/* I2C1_TX Init */
|
||||
hdma_i2c1_tx.Instance = DMA1_Channel6;
|
||||
hdma_i2c1_tx.Init.Direction = DMA_MEMORY_TO_PERIPH;
|
||||
hdma_i2c1_tx.Init.PeriphInc = DMA_PINC_DISABLE;
|
||||
hdma_i2c1_tx.Init.MemInc = DMA_MINC_ENABLE;
|
||||
hdma_i2c1_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE;
|
||||
hdma_i2c1_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE;
|
||||
hdma_i2c1_tx.Init.Mode = DMA_NORMAL;
|
||||
hdma_i2c1_tx.Init.Priority = DMA_PRIORITY_LOW;
|
||||
HAL_DMA_Init(&hdma_i2c1_tx);
|
||||
__HAL_LINKDMA(hi2c, hdmatx, hdma_i2c1_tx);
|
||||
|
||||
__HAL_LINKDMA(hi2c, hdmatx, hdma_i2c1_tx);
|
||||
|
||||
}
|
||||
/* I2C1 interrupt Init */
|
||||
HAL_NVIC_SetPriority(I2C1_EV_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(I2C1_EV_IRQn);
|
||||
HAL_NVIC_SetPriority(I2C1_ER_IRQn, 15, 0);
|
||||
HAL_NVIC_EnableIRQ(I2C1_ER_IRQn);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base) {
|
||||
if (htim_base->Instance == TIM3) {
|
||||
/* Peripheral clock enable */
|
||||
|
||||
@@ -12,35 +12,27 @@ extern TIM_HandleTypeDef htim1; //used for the systick
|
||||
/******************************************************************************/
|
||||
|
||||
void NMI_Handler(void) {
|
||||
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
//We have the assembly for a breakpoint trigger here to halt the system when a debugger is connected
|
||||
// Hardfault handler, often a screwup in the code
|
||||
void HardFault_Handler(void) {
|
||||
while (1) {
|
||||
asm("bkpt");
|
||||
}
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
// Memory management unit had an error
|
||||
void MemManage_Handler(void) {
|
||||
while (1) {
|
||||
asm("bkpt");
|
||||
}
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
// Prefetcher or busfault occured
|
||||
void BusFault_Handler(void) {
|
||||
while (1) {
|
||||
asm("bkpt");
|
||||
}
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void UsageFault_Handler(void) {
|
||||
while (1) {
|
||||
asm("bkpt");
|
||||
}
|
||||
NVIC_SystemReset();
|
||||
}
|
||||
|
||||
void DebugMon_Handler(void) {
|
||||
@@ -62,17 +54,6 @@ void SysTick_Handler(void) {
|
||||
void DMA1_Channel1_IRQHandler(void) {
|
||||
HAL_DMA_IRQHandler(&hdma_adc1);
|
||||
}
|
||||
|
||||
// DMA used for transmitting I2C packets
|
||||
void DMA1_Channel6_IRQHandler(void) {
|
||||
HAL_DMA_IRQHandler(&hdma_i2c1_tx);
|
||||
}
|
||||
|
||||
//DMA used for receiving I2C packets
|
||||
void DMA1_Channel7_IRQHandler(void) {
|
||||
HAL_DMA_IRQHandler(&hdma_i2c1_rx);
|
||||
}
|
||||
|
||||
//ADC interrupt used for DMA
|
||||
void ADC1_2_IRQHandler(void) {
|
||||
HAL_ADC_IRQHandler(&hadc1);
|
||||
@@ -81,7 +62,6 @@ void ADC1_2_IRQHandler(void) {
|
||||
//Timer 1 has overflowed, used for HAL ticks
|
||||
void TIM1_UP_IRQHandler(void) {
|
||||
HAL_TIM_IRQHandler(&htim1);
|
||||
|
||||
}
|
||||
//Timer 3 is used for the PWM output to the tip
|
||||
void TIM3_IRQHandler(void) {
|
||||
@@ -92,13 +72,18 @@ void TIM3_IRQHandler(void) {
|
||||
void TIM2_IRQHandler(void) {
|
||||
HAL_TIM_IRQHandler(&htim2);
|
||||
}
|
||||
//EXTI 3 is triggered via the accelerometer on orientation change
|
||||
void EXTI3_IRQHandler(void) {
|
||||
|
||||
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_3);
|
||||
void I2C1_EV_IRQHandler(void) {
|
||||
HAL_I2C_EV_IRQHandler(&hi2c1);
|
||||
}
|
||||
void I2C1_ER_IRQHandler(void) {
|
||||
HAL_I2C_ER_IRQHandler(&hi2c1);
|
||||
}
|
||||
//EXTI 5 is triggered via the accelerometer on movement
|
||||
void EXTI9_5_IRQHandler(void) {
|
||||
HAL_GPIO_EXTI_IRQHandler(GPIO_PIN_5);
|
||||
|
||||
void DMA1_Channel6_IRQHandler(void) {
|
||||
HAL_DMA_IRQHandler(&hdma_i2c1_tx);
|
||||
}
|
||||
|
||||
void DMA1_Channel7_IRQHandler(void) {
|
||||
HAL_DMA_IRQHandler(&hdma_i2c1_rx);
|
||||
}
|
||||
|
||||
@@ -1,48 +1,3 @@
|
||||
/**
|
||||
*****************************************************************************
|
||||
**
|
||||
** File : syscalls.c
|
||||
**
|
||||
** Abstract : System Workbench Minimal System calls file
|
||||
**
|
||||
** For more information about which c-functions
|
||||
** need which of these lowlevel functions
|
||||
** please consult the Newlib libc-manual
|
||||
**
|
||||
** Environment : System Workbench for MCU
|
||||
**
|
||||
** Distribution: The file is distributed <20>as is,<2C> without any warranty
|
||||
** of any kind.
|
||||
**
|
||||
*****************************************************************************
|
||||
**
|
||||
** <h2><center>© COPYRIGHT(c) 2014 Ac6</center></h2>
|
||||
**
|
||||
** Redistribution and use in source and binary forms, with or without modification,
|
||||
** are permitted provided that the following conditions are met:
|
||||
** 1. Redistributions of source code must retain the above copyright notice,
|
||||
** this list of conditions and the following disclaimer.
|
||||
** 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
** this list of conditions and the following disclaimer in the documentation
|
||||
** and/or other materials provided with the distribution.
|
||||
** 3. Neither the name of Ac6 nor the names of its contributors
|
||||
** may be used to endorse or promote products derived from this software
|
||||
** without specific prior written permission.
|
||||
**
|
||||
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
**
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
/* Includes */
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
2
workspace/ts100/.gitignore
vendored
2
workspace/ts100/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
/Debug/
|
||||
/Release/
|
||||
@@ -1,545 +0,0 @@
|
||||
/*
|
||||
* Font.h
|
||||
*
|
||||
* Created on: 17 Sep 2016
|
||||
* Author: Ralim
|
||||
*
|
||||
* ... This file contains the font...
|
||||
*/
|
||||
|
||||
#ifndef FONT_H_
|
||||
#define FONT_H_
|
||||
/*
|
||||
* Remember screen is LSB at the top, MSB at the bottom of the strip!
|
||||
*/
|
||||
const uint8_t FONT_12[]={
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//blank
|
||||
0x00,0x00,0x00,0x00,0x7C,0xFF,0xFF,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00,//!
|
||||
0x00,0x00,0x00,0x3C,0x3C,0x00,0x00,0x3C,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//"
|
||||
0x00,0x00,0x10,0x90,0xF0,0x7E,0x1E,0x90,0xF0,0x7E,0x1E,0x10,0x00,0x02,0x1E,0x1F,0x03,0x02,0x1E,0x1F,0x03,0x02,0x00,0x00,//#
|
||||
0x00,0x00,0x78,0xFC,0xCC,0xFF,0xFF,0xCC,0xCC,0x88,0x00,0x00,0x00,0x00,0x04,0x0C,0x0C,0x3F,0x3F,0x0C,0x0F,0x07,0x00,0x00,//$
|
||||
0x00,0x00,0x38,0x38,0x38,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x00,0x30,0x38,0x1C,0x0E,0x07,0x03,0x01,0x38,0x38,0x38,0x00,//%
|
||||
0x00,0x00,0x00,0xB8,0xFC,0xC6,0xE2,0x3E,0x1C,0x00,0x00,0x00,0x00,0x00,0x1F,0x3F,0x31,0x21,0x37,0x1E,0x1C,0x36,0x22,0x00,//&
|
||||
0x00,0x00,0x00,0x00,0x27,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//'
|
||||
0x00,0x00,0x00,0xF0,0xFC,0xFE,0x07,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0F,0x1F,0x38,0x20,0x20,0x00,0x00,0x00,//(
|
||||
0x00,0x00,0x00,0x01,0x01,0x07,0xFE,0xFC,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x38,0x1F,0x0F,0x03,0x00,0x00,0x00,//)
|
||||
0x00,0x00,0x98,0xB8,0xE0,0xF8,0xF8,0xE0,0xB8,0x98,0x00,0x00,0x00,0x00,0x0C,0x0E,0x03,0x0F,0x0F,0x03,0x0E,0x0C,0x00,0x00,// *
|
||||
0x00,0x00,0x80,0x80,0x80,0xF0,0xF0,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0F,0x0F,0x01,0x01,0x01,0x00,0x00,//+
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xB8,0xF8,0x78,0x00,0x00,0x00,0x00,0x00,//,
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,//-
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x00,0x00,0x00,0x00,0x00,//.
|
||||
0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x00,0x18,0x1C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,0x00,0x00,// /
|
||||
|
||||
0x00,0xF8,0xFE,0x06,0x03,0x83,0xC3,0x63,0x33,0x1E,0xFE,0xF8,0x00,0x07,0x1F,0x1E,0x33,0x31,0x30,0x30,0x30,0x18,0x1F,0x07,//0
|
||||
0x00,0x00,0x00,0x0C,0x0C,0x0E,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x3F,0x3F,0x30,0x30,0x30,0x00,//1
|
||||
0x00,0x1C,0x1E,0x07,0x03,0x03,0x83,0xC3,0xE3,0x77,0x3E,0x1C,0x00,0x30,0x38,0x3C,0x3E,0x37,0x33,0x31,0x30,0x30,0x30,0x30,//2
|
||||
0x00,0x0C,0x0E,0x07,0xC3,0xC3,0xC3,0xC3,0xC3,0xE7,0x7E,0x3C,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0E,//3
|
||||
0x00,0xC0,0xE0,0x70,0x38,0x1C,0x0E,0x07,0xFF,0xFF,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x3F,0x3F,0x03,0x03,//4
|
||||
0x00,0x3F,0x7F,0x63,0x63,0x63,0x63,0x63,0x63,0xE3,0xC3,0x83,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,//5
|
||||
0x00,0xC0,0xF0,0xF8,0xDC,0xCE,0xC7,0xC3,0xC3,0xC3,0x80,0x00,0x00,0x0F,0x1F,0x39,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,//6
|
||||
0x00,0x03,0x03,0x03,0x03,0x03,0x03,0xC3,0xF3,0x3F,0x0F,0x03,0x00,0x00,0x00,0x00,0x30,0x3C,0x0F,0x03,0x00,0x00,0x00,0x00,//7
|
||||
0x00,0x00,0xBC,0xFE,0xE7,0xC3,0xC3,0xC3,0xE7,0xFE,0xBC,0x00,0x00,0x0F,0x1F,0x39,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,//8
|
||||
0x00,0x3C,0x7E,0xE7,0xC3,0xC3,0xC3,0xC3,0xC3,0xE7,0xFE,0xFC,0x00,0x00,0x00,0x30,0x30,0x30,0x38,0x1C,0x0E,0x07,0x03,0x00,//9
|
||||
0x00,0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x1C,0x1C,0x00,0x00,0x00,0x00,0x00,//:
|
||||
0x00,0x00,0x00,0x00,0x70,0x70,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x9C,0xFC,0x7C,0x00,0x00,0x00,0x00,0x00,//;
|
||||
0x00,0x00,0xC0,0xE0,0xF0,0x38,0x1C,0x0E,0x07,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0E,0x1C,0x38,0x30,0x00,0x00,//<
|
||||
0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,//=
|
||||
0x00,0x00,0x03,0x07,0x0E,0x1C,0x38,0xF0,0xE0,0xC0,0x00,0x00,0x00,0x00,0x30,0x38,0x1C,0x0E,0x07,0x03,0x01,0x00,0x00,0x00,//>
|
||||
0x00,0x1C,0x1E,0x07,0x03,0x83,0xC3,0xE3,0x77,0x3E,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x00,0x00,0x00,0x00,0x00,//?
|
||||
//V 32
|
||||
0x00,0xF8,0xFE,0x07,0xF3,0xFB,0x1B,0xFB,0xFB,0x07,0xFE,0xF8,0x00,0x0F,0x1F,0x18,0x33,0x37,0x36,0x37,0x37,0x36,0x03,0x01,//@
|
||||
0x00,0x00,0x00,0xE0,0xFC,0x1F,0x1F,0xFC,0xE0,0x00,0x00,0x00,0x00,0x38,0x3F,0x07,0x06,0x06,0x06,0x06,0x07,0x3F,0x38,0x00,//A
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xE7,0xFE,0xBC,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00,//B
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x03,0x07,0x0E,0x0C,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x30,0x38,0x1C,0x0C,0x00,//C
|
||||
0x00,0xFF,0xFF,0x03,0x03,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00,//D
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,//E
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//F
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0xC3,0xC3,0xC3,0xC7,0xC6,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x30,0x30,0x3F,0x3F,0x00,//G
|
||||
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,//H
|
||||
0x00,0x00,0x00,0x03,0x03,0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//I
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x0E,0x1E,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,//J
|
||||
0x00,0xFF,0xFF,0xC0,0xE0,0xF0,0x38,0x1C,0x0E,0x07,0x03,0x00,0x00,0x3F,0x3F,0x00,0x01,0x03,0x07,0x0E,0x1C,0x38,0x30,0x00,//K
|
||||
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,//L
|
||||
0x00,0xFF,0xFF,0x1E,0x78,0xE0,0xE0,0x78,0x1E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x01,0x01,0x00,0x00,0x3F,0x3F,0x00,//M
|
||||
0x00,0xFF,0xFF,0x0E,0x38,0xF0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x03,0x07,0x1C,0x3F,0x3F,0x00,//N
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00,//O
|
||||
//V 48
|
||||
0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0xC7,0xFE,0x7C,0x00,0x00,0x3F,0x3F,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,//P
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x36,0x3E,0x1C,0x3F,0x33,0x00,//Q
|
||||
0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0xC7,0xFE,0x7C,0x00,0x00,0x3F,0x3F,0x01,0x01,0x03,0x07,0x0F,0x1D,0x38,0x30,0x00,//R
|
||||
0x00,0x3C,0x7E,0xE7,0xC3,0xC3,0xC3,0xC3,0xC7,0x8E,0x0C,0x00,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00,//S
|
||||
0x00,0x00,0x03,0x03,0x03,0xFF,0xFF,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,//T
|
||||
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,//U
|
||||
0x00,0x07,0x3F,0xF8,0xC0,0x00,0x00,0xC0,0xF8,0x3F,0x07,0x00,0x00,0x00,0x00,0x01,0x0F,0x3E,0x3E,0x0F,0x01,0x00,0x00,0x00,//V
|
||||
0x00,0xFF,0xFF,0x00,0x00,0x80,0x80,0x00,0x00,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x1C,0x06,0x03,0x03,0x06,0x1C,0x3F,0x3F,0x00,//W
|
||||
0x00,0x03,0x0F,0x1C,0x30,0xE0,0xE0,0x30,0x1C,0x0F,0x03,0x00,0x00,0x30,0x3C,0x0E,0x03,0x01,0x01,0x03,0x0E,0x3C,0x30,0x00,//X
|
||||
0x00,0x03,0x0F,0x3C,0xF0,0xC0,0xC0,0xF0,0x3C,0x0F,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,//Y
|
||||
0x00,0x03,0x03,0x03,0x03,0xC3,0xE3,0x33,0x1F,0x0F,0x03,0x00,0x00,0x30,0x3C,0x3E,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x00,//Z
|
||||
0x00,0x00,0x00,0xFF,0xFF,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x00,0x00,0x00,// [
|
||||
0x00,0x0E,0x1C,0x38,0x70,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0E,0x1C,0x18,// backslash
|
||||
0x00,0x00,0x00,0x03,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x30,0x30,0x3F,0x3F,0x00,0x00,0x00,// ]
|
||||
0x00,0x60,0x70,0x38,0x1C,0x0E,0x07,0x0E,0x1C,0x38,0x70,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,//_
|
||||
//V64
|
||||
0x00,0x00,0x00,0x00,0x00,0x3E,0x7E,0x4E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//`
|
||||
0x00,0x00,0x40,0x60,0x60,0x60,0x60,0x60,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//a
|
||||
0x00,0xFF,0xFF,0xC0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//b
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x30,0x18,0x08,0x00,//c
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0xE0,0xC0,0xFF,0xFF,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x30,0x3F,0x3F,0x00,//d
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x3B,0x33,0x33,0x33,0x33,0x33,0x13,0x01,0x00,//e
|
||||
0x00,0xC0,0xC0,0xFC,0xFE,0xC7,0xC3,0xC3,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//f
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0x00,0x00,0x03,0xC7,0xCE,0xCC,0xCC,0xCC,0xCC,0xE6,0x7F,0x3F,0x00,//g
|
||||
0x00,0xFF,0xFF,0xC0,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,//h
|
||||
0x00,0x00,0x00,0x00,0x60,0xEC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//i
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xEC,0xEC,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xE0,0xC0,0xC0,0xFF,0x7F,0x00,0x00,0x00,//j
|
||||
0x00,0x00,0xFF,0xFF,0x00,0x80,0xC0,0xE0,0x60,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x03,0x07,0x0F,0x1C,0x38,0x30,0x00,0x00,//k
|
||||
0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//l
|
||||
0x00,0xE0,0xC0,0xE0,0xE0,0xC0,0xC0,0xE0,0xE0,0xC0,0x80,0x00,0x00,0x3F,0x3F,0x00,0x00,0x3F,0x3F,0x00,0x00,0x3F,0x3F,0x00,//m
|
||||
0x00,0x00,0xE0,0xE0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,//n
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//o
|
||||
//V80
|
||||
0x00,0xE0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0xFF,0xFF,0x0C,0x18,0x18,0x18,0x18,0x1C,0x0F,0x07,0x00,//p
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0x00,0x00,0x07,0x0F,0x1C,0x18,0x18,0x18,0x18,0x0C,0xFF,0xFF,0x00,//q
|
||||
0x00,0x00,0xE0,0xE0,0xC0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//r
|
||||
0x00,0xC0,0xE0,0x60,0x60,0x60,0x60,0x60,0x40,0x00,0x00,0x00,0x00,0x11,0x33,0x33,0x33,0x33,0x33,0x3F,0x1E,0x00,0x00,0x00,//s
|
||||
0x00,0x60,0x60,0xFE,0xFE,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x3F,0x30,0x30,0x30,0x30,0x00,0x00,0x00,//t
|
||||
0x00,0xE0,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//u
|
||||
0x00,0x60,0xE0,0x80,0x00,0x00,0x00,0x00,0x80,0xE0,0x60,0x00,0x00,0x00,0x01,0x07,0x1E,0x38,0x38,0x1E,0x07,0x01,0x00,0x00,//v
|
||||
0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xE0,0xE0,0x00,0x00,0x07,0x1F,0x38,0x1C,0x0F,0x0F,0x1C,0x38,0x1F,0x07,0x00,//w
|
||||
0x00,0x60,0xE0,0xC0,0x80,0x00,0x80,0xC0,0xE0,0x60,0x00,0x00,0x00,0x30,0x38,0x1D,0x0F,0x07,0x0F,0x1D,0x38,0x30,0x00,0x00,//x
|
||||
0x00,0x00,0x60,0xE0,0x80,0x00,0x00,0x80,0xE0,0x60,0x00,0x00,0x00,0x00,0x00,0x81,0xE7,0x7E,0x1E,0x07,0x01,0x00,0x00,0x00,//y
|
||||
0x00,0x60,0x60,0x60,0x60,0x60,0xE0,0xE0,0x60,0x20,0x00,0x00,0x00,0x30,0x38,0x3C,0x36,0x33,0x31,0x30,0x30,0x30,0x00,0x00,//z
|
||||
0x00,0x00,0x80,0xC0,0xFC,0x7E,0x07,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x01,0x1F,0x3F,0x70,0x60,0x60,0x60,0x00,0x00,//{
|
||||
0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,//|
|
||||
0x00,0x00,0x03,0x03,0x03,0x07,0x7E,0xFC,0xC0,0x80,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x70,0x3F,0x1F,0x01,0x00,0x00,0x00,//}
|
||||
0x00,0x10,0x18,0x0C,0x04,0x0C,0x18,0x10,0x18,0x0C,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~
|
||||
0x00,0x00,0x80,0xC0,0x60,0x30,0x30,0x60,0xC0,0x80,0x00,0x00,0x00,0x0F,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0F,0x0F,0x00,//Up triangle
|
||||
|
||||
/*Start extended Latin range*/
|
||||
//V96
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//A0 (blank)
|
||||
0x00,0x00,0x00,0x00,0x80,0xF3,0xF3,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x3F,0x3F,0x0F,0x00,0x00,0x00,0x00,//A1//161
|
||||
0x00,0x00,0xE0,0xF0,0x38,0xFE,0xFE,0x18,0x38,0x30,0x00,0x00,0x00,0x00,0x03,0x07,0x0E,0x3F,0x3F,0x0C,0x0E,0x06,0x00,0x00,//A2//162
|
||||
0x00,0x00,0x00,0x80,0xF8,0xFC,0x8C,0x8C,0x1C,0x18,0x00,0x00,0x00,0x00,0x18,0x1C,0x1F,0x0B,0x18,0x18,0x18,0x18,0x08,0x00,//A3//163
|
||||
0x00,0xF6,0xFE,0x18,0x0C,0x0C,0x0C,0x0C,0x18,0xFE,0xF6,0x00,0x00,0x1B,0x1F,0x06,0x0C,0x0C,0x0C,0x0C,0x06,0x1F,0x1B,0x00,//A4//164
|
||||
0x00,0x03,0x0F,0x3C,0xF0,0xC0,0xC0,0xF0,0x3C,0x0F,0x03,0x00,0x00,0x00,0x0A,0x0A,0x0A,0x3F,0x3F,0x0A,0x0A,0x0A,0x00,0x00,//A5//165
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//A6 (blank)
|
||||
0x00,0x00,0xDC,0xFE,0x22,0x22,0x22,0x22,0xE6,0xC4,0x00,0x00,0x00,0x00,0x08,0x19,0x11,0x11,0x11,0x11,0x1F,0x0E,0x00,0x00,//A7//167
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//A8 (blank)
|
||||
0x00,0xF0,0xF8,0x1C,0xCC,0xEC,0x2C,0x6C,0x4C,0x1C,0xF8,0xF0,0x00,0x07,0x0F,0x1C,0x19,0x1B,0x1A,0x1B,0x19,0x1C,0x0F,0x07,//A9//169
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//AA (blank)
|
||||
0x00,0x80,0xC0,0x60,0x20,0x00,0x80,0xC0,0x60,0x20,0x00,0x00,0x00,0x00,0x01,0x03,0x02,0x00,0x00,0x01,0x03,0x02,0x00,0x00,//AB//171
|
||||
0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x00,//AC//172
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//AD (blank)
|
||||
0x00,0xF0,0xF8,0x1C,0xEC,0xEC,0xAC,0xEC,0x4C,0x1C,0xF8,0xF0,0x00,0x07,0x0F,0x1C,0x1B,0x1B,0x18,0x1B,0x1B,0x1C,0x0F,0x07,//AE//174
|
||||
0x00,0x00,0x00,0x00,0x00,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//AF//175
|
||||
//V112
|
||||
0x00,0x00,0x00,0x1E,0x3F,0x33,0x33,0x3F,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B0//176
|
||||
0x00,0x00,0x00,0xC0,0xC0,0xF0,0xF0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x1B,0x1B,0x18,0x18,0x00,0x00,0x00,//B1//177
|
||||
0x00,0x00,0x19,0x1D,0x15,0x17,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B2//178
|
||||
0x00,0x00,0x11,0x15,0x15,0x1F,0x0A,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B3//179
|
||||
0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B4//180
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x00,0xFF,0xFF,0x0E,0x0C,0x0C,0x0C,0x06,0x0F,0x0F,0x00,0x00,//B5//181
|
||||
0x00,0x38,0x7C,0xC6,0x82,0xFE,0xFE,0x02,0xFE,0xFE,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x3F,0x3F,0x00,0x00,//B6//182
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B7 (blank)
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B8 (blank)
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//B9 (blank)
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//BA (blank)
|
||||
0x00,0x20,0x60,0xC0,0x80,0x00,0x20,0x60,0xC0,0x80,0x00,0x00,0x00,0x02,0x03,0x01,0x00,0x00,0x02,0x03,0x01,0x00,0x00,0x00,//BB//187
|
||||
0x00,0x48,0x7C,0x7C,0x40,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x06,0x07,0x04,0x1F,0x1F,0x00,//BC//188
|
||||
0x00,0x48,0x7C,0x7C,0x40,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x00,0x19,0x1D,0x17,0x12,0x00,//BD//189
|
||||
0x00,0x44,0x54,0x7C,0x28,0x80,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x06,0x07,0x04,0x1F,0x1F,0x00,//BE//190
|
||||
0x00,0x00,0x00,0x80,0xC0,0xFB,0x7B,0x00,0x00,0x00,0x00,0x00,0x00,0x0E,0x1F,0x3B,0x31,0x30,0x30,0x30,0x38,0x1E,0x0E,0x00,//BF//191
|
||||
//V128
|
||||
0x00,0x00,0x00,0x80,0xE1,0x7B,0x7E,0xE4,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C0//192
|
||||
0x00,0x00,0x00,0x80,0xE4,0x7E,0x7B,0xE1,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C1//193
|
||||
0x00,0x00,0x00,0x84,0xE6,0x7B,0x7B,0xE6,0x84,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C2//194
|
||||
0x00,0x00,0x00,0x82,0xE3,0x79,0x7B,0xE2,0x83,0x01,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C3//195
|
||||
0x00,0x00,0x00,0x83,0xE3,0x78,0x78,0xE3,0x83,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C4//196
|
||||
0x00,0x00,0x00,0x80,0xE2,0x75,0x75,0xE2,0x80,0x00,0x00,0x00,0x00,0x38,0x3E,0x0F,0x0D,0x0C,0x0C,0x0D,0x0F,0x3E,0x38,0x00,//C5//197
|
||||
0x00,0x00,0x80,0xF0,0x7C,0x1F,0xFF,0xFF,0xC3,0xC3,0x03,0x00,0x00,0x3C,0x3F,0x07,0x06,0x06,0x3F,0x3F,0x30,0x30,0x30,0x00,//C6//198
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x03,0x07,0x1E,0x1C,0x00,0x00,0x01,0x07,0xCE,0xDC,0xF8,0xF8,0x18,0x1C,0x0E,0x06,0x00,//C7//199
|
||||
0x00,0xF8,0xF8,0x99,0x9B,0x9E,0x9C,0x98,0x98,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,//C8//200
|
||||
0x00,0xF8,0xF8,0x98,0x98,0x9C,0x9E,0x9B,0x99,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,//C9//201
|
||||
0x00,0xF8,0xF8,0x9C,0x9E,0x9B,0x9B,0x9E,0x9C,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,//CA//202
|
||||
0x00,0xF8,0xF8,0x9B,0x9B,0x98,0x98,0x9B,0x9B,0x18,0x18,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00,//CB//203
|
||||
0x00,0x00,0x00,0x19,0x1B,0xFE,0xFC,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//CC//204
|
||||
0x00,0x00,0x00,0x18,0x18,0xFC,0xFE,0x1B,0x19,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//CD//205
|
||||
0x00,0x00,0x00,0x1C,0x1E,0xFB,0xFB,0x1E,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//CE//206
|
||||
0x00,0x00,0x00,0x1B,0x1B,0xF8,0xF8,0x1B,0x1B,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//CF//207
|
||||
//V144
|
||||
0x00,0xC0,0xFF,0xFF,0xC3,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00,//D0//208
|
||||
0x00,0xF8,0xF8,0x72,0xE3,0xC1,0x83,0x02,0x03,0xF9,0xF8,0x00,0x00,0x3F,0x3F,0x00,0x00,0x01,0x03,0x07,0x0E,0x3F,0x3F,0x00,//D1//209
|
||||
0x00,0xE0,0xF0,0x39,0x1B,0x1E,0x1C,0x18,0x38,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//D2//210
|
||||
0x00,0xE0,0xF0,0x38,0x18,0x1C,0x1E,0x1B,0x39,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//D3//211
|
||||
0x00,0xE0,0xF0,0x3C,0x1E,0x1B,0x1B,0x1E,0x3C,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//D4//212
|
||||
0x00,0xE0,0xF0,0x3A,0x1B,0x19,0x1B,0x1A,0x3B,0xF1,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//D5//213
|
||||
0x00,0xE0,0xF0,0x3B,0x1B,0x18,0x18,0x1B,0x3B,0xF0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//D6//214
|
||||
0x00,0x00,0x10,0x30,0x60,0xC0,0xC0,0x60,0x30,0x10,0x00,0x00,0x00,0x00,0x04,0x06,0x03,0x01,0x01,0x03,0x06,0x04,0x00,0x00,//D7//215
|
||||
0x00,0xF0,0xF8,0x1C,0x0C,0x8C,0xEC,0x7C,0x18,0xFC,0xF4,0x00,0x00,0x2F,0x3F,0x18,0x3E,0x37,0x31,0x30,0x38,0x1F,0x0F,0x00,//D8//216
|
||||
0x00,0xF8,0xF8,0x01,0x03,0x06,0x04,0x00,0x00,0xF8,0xF8,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,//D9//217
|
||||
0x00,0xF8,0xF8,0x00,0x00,0x04,0x06,0x03,0x01,0xF8,0xF8,0x00,0x00,0x07,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x07,0x00,//DA//218
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//DB (blank)
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//DC (blank)
|
||||
0x00,0x08,0x18,0x30,0x60,0xC4,0xC6,0x63,0x31,0x18,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,//DD//221
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//DE (blank)
|
||||
0x00,0x00,0xC0,0xE0,0x30,0x10,0x10,0x30,0xE0,0xC0,0x00,0x00,0x00,0x00,0xFF,0xFF,0x21,0x21,0x21,0x33,0x3F,0x1E,0x00,0x00,//DF//223
|
||||
//V160
|
||||
0x00,0x00,0x40,0x60,0x62,0x66,0x6C,0x68,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E0//224
|
||||
0x00,0x00,0x40,0x60,0x68,0x6C,0x66,0x62,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E1//225
|
||||
0x00,0x00,0x40,0x68,0x6C,0x66,0x66,0x6C,0x68,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E2//226
|
||||
0x00,0x00,0x40,0x68,0x6C,0x64,0x6C,0x68,0x6C,0xE4,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E3//227
|
||||
0x00,0x00,0x40,0x6C,0x6C,0x60,0x60,0x6C,0x6C,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E4//228
|
||||
0x00,0x00,0x40,0x60,0x64,0x6A,0x6A,0x64,0x60,0xE0,0xC0,0x00,0x00,0x1C,0x3E,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00,//E5//229
|
||||
0x00,0x80,0xC0,0x40,0x40,0xC0,0x80,0x40,0x40,0xC0,0x80,0x00,0x00,0x1C,0x3E,0x22,0x22,0x1F,0x3F,0x22,0x22,0x33,0x11,0x00,//E6//230
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0x60,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0xB8,0xB0,0xF0,0xF0,0x30,0x38,0x18,0x08,0x00,//E7//231
|
||||
0x00,0x80,0xC0,0xE0,0x62,0x66,0x6C,0x68,0x60,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,//E8//232
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x68,0x6C,0x66,0x62,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x3B,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,//E9//233
|
||||
0x00,0x80,0xC0,0xE8,0x6C,0x66,0x66,0x6C,0x68,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,//EA//234
|
||||
0x00,0x80,0xC0,0xEC,0x6C,0x60,0x60,0x6C,0x6C,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x33,0x33,0x33,0x33,0x33,0x33,0x13,0x03,0x00,//EB//235
|
||||
0x00,0x00,0x00,0x00,0x62,0xE6,0xEC,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//EC//236
|
||||
0x00,0x00,0x00,0x00,0x68,0xEC,0xE6,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//ED//237
|
||||
0x00,0x00,0x00,0x08,0x6C,0xE6,0xE6,0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//EE//238
|
||||
0x00,0x00,0x00,0x0C,0x6C,0xE0,0xEC,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00,//EF//239
|
||||
//V176
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//F0 (blank)
|
||||
0x00,0x00,0xE0,0xE8,0x6C,0x64,0x6C,0x68,0xEC,0xC4,0x80,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,//F1//241
|
||||
0x00,0x80,0xC0,0xE0,0x62,0x66,0x6C,0x68,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//F2//242
|
||||
0x00,0x80,0xC0,0xE0,0x68,0x6C,0x66,0x62,0xE0,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//F3//243
|
||||
0x00,0x80,0xC0,0xE8,0x6C,0x66,0x66,0x6C,0xE8,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//F4//244
|
||||
0x00,0x80,0xC8,0xEC,0x64,0x6C,0x68,0x6C,0xE4,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//F5//245
|
||||
0x00,0x80,0xC0,0xEC,0x6C,0x60,0x60,0x6C,0xEC,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00,//F6//246
|
||||
0x00,0x00,0x80,0x80,0x80,0xB0,0xB0,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x0D,0x0D,0x01,0x01,0x01,0x00,0x00,//F7//247
|
||||
0x00,0x80,0xC0,0xE0,0x60,0x60,0x60,0xE0,0xC0,0xE0,0xA0,0x00,0x00,0x2F,0x3F,0x18,0x3C,0x36,0x33,0x31,0x38,0x1F,0x0F,0x00,//F8//248
|
||||
0x00,0xE0,0xE0,0x00,0x02,0x06,0x0C,0x08,0x00,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//F9//249
|
||||
0x00,0xE0,0xE0,0x00,0x08,0x0C,0x06,0x02,0x00,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//FA//250
|
||||
0x00,0xE0,0xE0,0x08,0x0C,0x06,0x06,0x0C,0x08,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//FB//251
|
||||
0x00,0xE0,0xE0,0x0C,0x0C,0x00,0x00,0x0C,0x0C,0xE0,0xE0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x18,0x3F,0x3F,0x00,//FC//252
|
||||
0x00,0x00,0x60,0xE0,0x80,0x10,0x18,0x8C,0xE4,0x60,0x00,0x00,0x00,0x00,0x00,0x81,0xE7,0x7E,0x1E,0x07,0x01,0x00,0x00,0x00,//FD//253
|
||||
0x00,0x00,0x03,0xFF,0xFF,0x1B,0x18,0x18,0xF8,0xF0,0x00,0x00,0x00,0x00,0x30,0x3F,0x3F,0x36,0x06,0x06,0x07,0x03,0x00,0x00,//FE//254
|
||||
0x00,0x00,0x60,0xEC,0x8C,0x00,0x00,0x8C,0xEC,0x60,0x00,0x00,0x00,0x00,0x00,0x81,0xE7,0x7E,0x1E,0x07,0x01,0x00,0x00,0x00,//FF//255
|
||||
//V192
|
||||
/* Cyrillic Glyphs */
|
||||
0x00,0xFC,0xFC,0x8D,0x8F,0x8E,0x8C,0x8C,0x8C,0x0C,0x0C,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x31,0x30,0x30,0x00, // Ѐ d0 80
|
||||
0x00,0xFE,0xFE,0xC7,0xC7,0xC6,0xC6,0xC7,0xC7,0x06,0x06,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00, // Ё d0 81
|
||||
0x00,0x03,0xFF,0xFF,0x83,0xC3,0xC3,0xC3,0xC0,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x01,0x00,0x30,0x30,0x39,0x1F,0x0F,0x00, // Ђ d0 82
|
||||
0x00,0xFC,0xFC,0x0C,0x0C,0x0C,0x0E,0x0F,0x0D,0x0C,0x0C,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Ѓ d0 83
|
||||
0x00,0xF8,0xFC,0xCE,0xC7,0xC3,0xC3,0xC3,0x07,0x0E,0x0C,0x00,0x00,0x07,0x0F,0x1C,0x38,0x30,0x30,0x30,0x38,0x1C,0x0C,0x00, // Є d0 84
|
||||
0x00,0x3C,0x7E,0x67,0xE3,0xC3,0xC3,0xC3,0x87,0x8E,0x0C,0x00,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x31,0x39,0x1F,0x0F,0x00, // Ѕ d0 85
|
||||
0x00,0x00,0x00,0x03,0x03,0xFF,0xFF,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00, // І d0 86
|
||||
0x00,0x00,0x00,0x0D,0x0D,0xFC,0xFC,0x0D,0x0D,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00, // Ї d0 87
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0x0E,0x1E,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00, // Ј d0 88
|
||||
0x00,0x00,0xFE,0xFF,0x03,0x03,0xFF,0xFF,0xC0,0xC0,0x80,0x00,0x00,0x30,0x3F,0x1F,0x00,0x00,0x3F,0x3F,0x30,0x39,0x1F,0x0F, // Љ d0 89
|
||||
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xFF,0xFF,0xC0,0xC0,0x80,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x3F,0x3F,0x30,0x39,0x1F,0x0F, // Њ d0 8a
|
||||
0x00,0x03,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xC0,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x01,0x00,0x00,0x00,0x01,0x3F,0x3F,0x00, // Ћ d0 8b
|
||||
0x00,0xFF,0xFF,0xC0,0xE2,0xF3,0x39,0x1C,0x0E,0x07,0x03,0x00,0x00,0x3F,0x3F,0x00,0x01,0x03,0x07,0x0E,0x1C,0x38,0x30,0x00, // Ќ d0 8c
|
||||
0x00,0xFF,0xFF,0x00,0x01,0xC3,0xF2,0x38,0x0E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x1C,0x07,0x03,0x00,0x00,0x00,0x3F,0x3F,0x00, // Ѝ d0 8d
|
||||
0x00,0x07,0x1F,0x7C,0xF1,0xC1,0xC1,0xF1,0x7C,0x1F,0x07,0x00,0x00,0x00,0x30,0x30,0x3C,0x0F,0x07,0x01,0x00,0x00,0x00,0x00, // Ў d0 8e
|
||||
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x1F,0x1F,0x18,0x18,0x78,0x78,0x18,0x18,0x1F,0x1F,0x00, // Џ d0 8f
|
||||
//V208
|
||||
0x00,0x80,0xE0,0x78,0x1E,0x07,0x07,0x1E,0x78,0xE0,0x80,0x00,0x00,0x3F,0x3F,0x06,0x06,0x06,0x06,0x06,0x06,0x3F,0x3F,0x00, // A d0 90
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x83,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00, // Б d0 91
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xE7,0xFE,0xBC,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00, // В d0 92
|
||||
0x00,0xFF,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // Г d0 93
|
||||
0x00,0x00,0xF8,0xFE,0x0F,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0x00,0x70,0x7F,0x1F,0x18,0x18,0x18,0x18,0x1F,0x7F,0x70,0x00, // Д d0 94
|
||||
0x00,0xFF,0xFF,0xC3,0xC3,0xC3,0xC3,0xC3,0xC3,0x03,0x03,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00, // Е d0 95
|
||||
0x00,0x03,0x0F,0xFC,0xE0,0xFF,0xFF,0xE0,0xFC,0x0F,0x03,0x00,0x00,0x38,0x3F,0x07,0x00,0x3F,0x3F,0x00,0x07,0x3F,0x38,0x00, // Ж d0 96
|
||||
0x00,0x0C,0x0E,0x07,0xC3,0xC3,0xC3,0xC3,0xE7,0xFE,0x3C,0x00,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00, // 3 d0 97
|
||||
0x00,0xFF,0xFF,0x00,0x00,0xC0,0xF0,0x38,0x0E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x1C,0x07,0x03,0x00,0x00,0x00,0x3F,0x3F,0x00, // И d0 98
|
||||
0x00,0xFF,0xFF,0x00,0x02,0xC3,0xF1,0x38,0x0E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x1C,0x07,0x03,0x00,0x00,0x00,0x3F,0x3F,0x00, // Й d0 99
|
||||
0x00,0xFF,0xFF,0xC0,0xE0,0xF0,0x38,0x1C,0x0E,0x07,0x03,0x00,0x00,0x3F,0x3F,0x00,0x01,0x03,0x07,0x0E,0x1C,0x38,0x30,0x00, // К d0 9a
|
||||
0x00,0x00,0xF0,0xFC,0x1E,0x07,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0x30,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // Л d0 9b
|
||||
0x00,0xFF,0xFF,0x1E,0x78,0xE0,0xE0,0x78,0x1E,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x01,0x01,0x00,0x00,0x3F,0x3F,0x00, // М d0 9c
|
||||
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // Н d0 9d
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x07,0x0E,0xFC,0xF0,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x38,0x1C,0x0F,0x03,0x00, // О d0 9e
|
||||
0x00,0xFF,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // П d0 9f
|
||||
//V224
|
||||
0x00,0xFF,0xFF,0x83,0x83,0x83,0x83,0x83,0xC7,0xFE,0x7C,0x00,0x00,0x3F,0x3F,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00, // Р d0 a0
|
||||
0x00,0xF0,0xFC,0x0E,0x07,0x03,0x03,0x03,0x07,0x0E,0x0C,0x00,0x00,0x03,0x0F,0x1C,0x38,0x30,0x30,0x30,0x38,0x1C,0x0C,0x00, // С d0 a1
|
||||
0x00,0x03,0x03,0x03,0x03,0xFF,0xFF,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00, // Т d0 a2
|
||||
0x00,0x07,0x1F,0x7C,0xF0,0xC0,0xC0,0xF0,0x7C,0x1F,0x07,0x00,0x00,0x00,0x30,0x30,0x3C,0x0F,0x07,0x01,0x00,0x00,0x00,0x00, // У d0 a3
|
||||
0x00,0xF8,0xFC,0x0E,0x06,0xFF,0xFF,0x06,0x0E,0xFC,0xF8,0x00,0x00,0x03,0x07,0x0E,0x0C,0x3F,0x3F,0x0C,0x0E,0x07,0x03,0x00, // Ф d0 a4
|
||||
0x00,0x03,0x0F,0x3C,0xF0,0xC0,0xC0,0xF0,0x3C,0x0F,0x03,0x00,0x00,0x30,0x3C,0x0F,0x03,0x00,0x00,0x03,0x0F,0x3C,0x30,0x00, // Х d0 a5
|
||||
0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x1F,0x1F,0x18,0x18,0x18,0x18,0x18,0x1F,0x7F,0x78,0x00, // Ц d0 a6
|
||||
0x00,0x7F,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // Ч d0 a7
|
||||
0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0x3F,0x3F,0x30,0x30,0x3F,0x3F,0x30,0x30,0x3F,0x3F,0x00, // Ш d0 a8
|
||||
0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x00,0x00,0x1F,0x1F,0x18,0x18,0x1F,0x1F,0x18,0x18,0x1F,0x7F,0x70, // Щ d0 a9
|
||||
0x03,0x03,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00, // Ъ d0 aa
|
||||
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0xFF,0xFF,0x00,0x3F,0x3F,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00,0x3F,0x3F, // Ы d0 ab
|
||||
0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x80,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x39,0x1F,0x0F,0x00, // Ь d0 ac
|
||||
0x00,0x0C,0x0E,0x07,0xC3,0xC3,0xC3,0xC7,0xCE,0xFC,0xF8,0x00,0x00,0x0C,0x1C,0x38,0x30,0x30,0x30,0x38,0x1C,0x0F,0x07,0x00, // Э d0 ad
|
||||
0x00,0xFF,0xFF,0xC0,0xFC,0xFE,0x07,0x03,0x07,0xFE,0xFC,0x00,0x00,0x3F,0x3F,0x00,0x0F,0x1F,0x38,0x30,0x38,0x1F,0x0F,0x00, // Ю d0 ae
|
||||
0x00,0x7C,0xFE,0xC7,0x83,0x83,0x83,0x83,0x83,0xFF,0xFF,0x00,0x00,0x30,0x38,0x1D,0x0F,0x07,0x03,0x01,0x01,0x3F,0x3F,0x00, // Я d0 af
|
||||
//V240
|
||||
0x00,0x00,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,0x1E,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x3F,0x00, // а d0 b0
|
||||
0x00,0xE0,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x1F,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x1E,0x00, // б d0 b1
|
||||
0x00,0xF0,0xF0,0x30,0x30,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,0x00,0x3F,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x3F,0x1E,0x00, // в d0 b2
|
||||
0x00,0xF0,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // г d0 b3
|
||||
0x00,0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0xF0,0xF0,0x00,0x00,0x00,0x60,0x7F,0x3F,0x30,0x30,0x30,0x30,0x3F,0x7F,0x60,0x00, // д d0 b4
|
||||
0x00,0xE0,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,0x1F,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x00, // е d0 b5
|
||||
0x00,0x30,0xF0,0xC0,0x00,0xF0,0xF0,0x00,0xC0,0xF0,0x30,0x00,0x00,0x30,0x3C,0x0F,0x03,0x3F,0x3F,0x03,0x0F,0x3C,0x30,0x00, // ж d0 b6
|
||||
0x00,0x60,0x70,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,0x18,0x38,0x30,0x33,0x33,0x33,0x33,0x33,0x3F,0x1D,0x00, // з d0 b7
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x1C,0x0E,0x07,0x03,0x01,0x00,0x3F,0x3F,0x00, // и d0 b8
|
||||
0x00,0xF0,0xF0,0x00,0x04,0x08,0x88,0xC4,0xE0,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x1C,0x0E,0x07,0x03,0x01,0x00,0x3F,0x3F,0x00, // й d0 b9
|
||||
0x00,0xF0,0xF0,0x80,0x80,0xC0,0xE0,0x70,0x30,0x10,0x00,0x00,0x00,0x3F,0x3F,0x03,0x03,0x07,0x0E,0x1C,0x38,0x30,0x20,0x00, // к d0 ba
|
||||
0x00,0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0xF0,0xF0,0x00,0x00,0x30,0x3F,0x1F,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // л d0 bb
|
||||
0x00,0xF0,0xF0,0xE0,0xC0,0x80,0x80,0xC0,0xE0,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x00,0x01,0x03,0x03,0x01,0x00,0x3F,0x3F,0x00, // м d0 bc
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x03,0x03,0x03,0x03,0x03,0x03,0x3F,0x3F,0x00, // н d0 bd
|
||||
0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0x70,0xE0,0xC0,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x1F,0x0F,0x00, // о d0 be
|
||||
0x00,0xF0,0xF0,0x30,0x30,0x30,0x30,0x30,0x30,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00, // п d0 bf
|
||||
//V256
|
||||
0x00,0xF0,0xF0,0x30,0x30,0x30,0x30,0x30,0x70,0xE0,0xC0,0x00,0x00,0xFF,0xFF,0x0C,0x0C,0x0C,0x0C,0x0C,0x0E,0x07,0x03,0x00, // р d1 80
|
||||
0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0x70,0x60,0x40,0x00,0x00,0x0F,0x1F,0x38,0x30,0x30,0x30,0x30,0x38,0x18,0x08,0x00, // с d1 81
|
||||
0x00,0x30,0x30,0x30,0x30,0xF0,0xF0,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00, // т d1 82
|
||||
0x00,0x30,0xF0,0xC0,0x00,0x00,0x00,0x00,0xC0,0xF0,0x30,0x00,0x00,0x60,0xE0,0xC3,0xE7,0x7C,0x3C,0x0F,0x03,0x00,0x00,0x00, // у d1 83
|
||||
0x00,0x80,0xC0,0x60,0x60,0xF0,0xF0,0x60,0x60,0xC0,0x80,0x00,0x00,0x0F,0x1F,0x30,0x30,0xFF,0xFF,0x30,0x30,0x1F,0x0F,0x00, // ф d1 84
|
||||
0x00,0x30,0x70,0xC0,0x80,0x00,0x00,0x80,0xC0,0x70,0x30,0x00,0x00,0x30,0x38,0x0C,0x07,0x03,0x03,0x07,0x0C,0x38,0x30,0x00, // х d1 85
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x00,0x3F,0x3F,0x30,0x30,0x30,0x30,0x30,0x3F,0xFF,0xF0,0x00, // ц d1 86
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x01,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x3F,0x3F,0x00, // ч d1 87
|
||||
0x00,0xF0,0xF0,0x00,0x00,0xE0,0xE0,0x00,0x00,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x30,0x30,0x3F,0x3F,0x30,0x30,0x3F,0x3F,0x00, // ш d1 88
|
||||
0x00,0xF0,0xF0,0x00,0x00,0xF0,0xF0,0x00,0x00,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x30,0x30,0x3F,0x3F,0x30,0x30,0x3F,0xFF,0xE0, // щ d1 89
|
||||
0x30,0x30,0xF0,0xF0,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x3B,0x1F,0x0E,0x00, // ъ d1 8a
|
||||
0x00,0xF0,0xF0,0x80,0x80,0x80,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x31,0x31,0x3B,0x1F,0x0E,0x00,0x3F,0x3F,0x00, // ы d1 8b
|
||||
0x00,0xF0,0xF0,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x31,0x31,0x31,0x31,0x31,0x3B,0x1F,0x0E,0x00, // ь d1 8c
|
||||
0x00,0x40,0x60,0x70,0x30,0x30,0x30,0x30,0x70,0xE0,0xC0,0x00,0x00,0x08,0x18,0x38,0x30,0x33,0x33,0x33,0x3B,0x1F,0x0F,0x00, // э d1 8d
|
||||
0x00,0xF0,0xF0,0x00,0xE0,0xF0,0x30,0x30,0x30,0xF0,0xE0,0x00,0x00,0x3F,0x3F,0x03,0x1F,0x3F,0x30,0x30,0x30,0x3F,0x1F,0x00, // ю d1 8e
|
||||
0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0x30,0xF0,0xF0,0x00,0x00,0x21,0x33,0x3B,0x1E,0x0E,0x06,0x06,0x06,0x3F,0x3F,0x00, // я d1 8f
|
||||
//V272
|
||||
0x00,0xE0,0xF0,0x32,0x36,0x36,0x34,0x30,0x30,0xF0,0xE0,0x00,0x00,0x1F,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x00, // ѐ d1 90
|
||||
0x00,0xE0,0xF0,0x34,0x34,0x30,0x30,0x34,0x34,0xF0,0xE0,0x00,0x00,0x1F,0x3F,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x00, // ё d1 91
|
||||
0x00,0x30,0xFC,0xFC,0x30,0xB0,0xB0,0xB0,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x07,0x03,0x01,0x01,0xC1,0xFF,0x3F,0x00, // ђ d1 92
|
||||
0x00,0xF0,0xF0,0x30,0x30,0x34,0x36,0x32,0x30,0x30,0x30,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, // ѓ d1 93
|
||||
0x00,0xC0,0xE0,0x70,0x30,0x30,0x30,0x30,0x70,0x60,0x40,0x00,0x00,0x0F,0x1F,0x3B,0x33,0x33,0x33,0x30,0x38,0x18,0x08,0x00, // є d1 94
|
||||
0x00,0xE0,0xF0,0xB0,0xB0,0x30,0x30,0x30,0x30,0x70,0x60,0x00,0x00,0x18,0x39,0x31,0x33,0x33,0x33,0x37,0x36,0x3E,0x1C,0x00, // ѕ d1 95
|
||||
0x00,0x00,0x00,0x00,0x30,0xF6,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00, // і d1 96
|
||||
0x00,0x00,0x00,0x04,0x34,0xF0,0xF4,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x3F,0x3F,0x30,0x30,0x00,0x00,0x00, // ї d1 97
|
||||
0x00,0x00,0x00,0x00,0x00,0x30,0x30,0xF6,0xF6,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0xE0,0xC0,0xC0,0xFF,0x7F,0x00,0x00,0x00, // ј d1 98
|
||||
0x00,0x00,0xE0,0xF0,0x30,0x30,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x30,0x3F,0x1F,0x00,0x00,0x3F,0x3F,0x33,0x33,0x1E,0x0C, // љ d1 99
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x03,0x03,0x03,0x3F,0x3F,0x33,0x33,0x1E,0x0C, // њ d1 9a
|
||||
0x00,0x30,0xFC,0xFC,0xB0,0xB0,0xB0,0xB0,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x3F,0x01,0x01,0x01,0x01,0x01,0x3F,0x3F,0x00, // ћ d1 9b
|
||||
0x00,0xF0,0xF0,0x80,0x88,0xCC,0xE4,0x70,0x30,0x10,0x00,0x00,0x00,0x3F,0x3F,0x03,0x03,0x07,0x0E,0x1C,0x38,0x30,0x20,0x00, // ќ d1 9c
|
||||
0x00,0xF0,0xF0,0x00,0x06,0x0C,0x88,0xC0,0xE0,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x1C,0x0E,0x07,0x03,0x01,0x00,0x3F,0x3F,0x00, // ѝ d1 9d
|
||||
0x00,0x30,0xF0,0xC0,0x04,0x08,0x08,0x04,0xC0,0xF0,0x30,0x00,0x00,0x60,0xE0,0xC3,0xE7,0x7C,0x3C,0x0F,0x03,0x00,0x00,0x00, // ў d1 9e
|
||||
0x00,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0xF0,0xF0,0x00,0x00,0x3F,0x3F,0x30,0x30,0xF0,0xF0,0x30,0x30,0x3F,0x3F,0x00, // џ d1 9f
|
||||
};
|
||||
|
||||
const uint8_t ExtraFontChars[] = {
|
||||
0x00,0x18,0x24,0x24,0x18,0xC0,0x40,0x40,0x40,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x02,0x02,0x02,0x00,0x00,0x00,// Degrees F
|
||||
0x00,0x18,0x24,0x24,0x18,0x80,0x40,0x20,0x20,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x08,0x10,0x10,0x10,0x00,0x00,// Degrees C
|
||||
0x00,0x00,0x20,0x30,0x38,0xFC,0xFE,0xFC,0x38,0x30,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00,0x00,// UP arrow
|
||||
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x3F,0x00,/*Battery Empty*/
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x50,0x50,0x50,0x50,0x50,0x50,0x40,0x3F,0x00,/*Battery 1*/
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x58,0x58,0x58,0x58,0x58,0x58,0x40,0x3F,0x00,/*Battery 2*/
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5C,0x5C,0x5C,0x5C,0x5C,0x5C,0x40,0x3F,0x00,/*Battery 3*/
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5E,0x5E,0x5E,0x5E,0x5E,0x5E,0x40,0x3F,0x00,/*Battery 4*/
|
||||
0x00,0xF0,0x08,0x0E,0x02,0x02,0x02,0x02,0x0E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 5*/
|
||||
0x00,0xF0,0x08,0x8E,0x82,0x82,0x82,0x82,0x8E,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 6*/
|
||||
0x00,0xF0,0x08,0xCE,0xC2,0xC2,0xC2,0xC2,0xCE,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 7*/
|
||||
0x00,0xF0,0x08,0xEE,0xE2,0xE2,0xE2,0xE2,0xEE,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 8*/
|
||||
0x00,0xF0,0x08,0xEE,0xE2,0xF2,0xF2,0xE2,0xEE,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 9*/
|
||||
0x00,0xF0,0x08,0xEE,0xE2,0xFA,0xFA,0xE2,0xEE,0x08,0xF0,0x00,0x00,0x3F,0x40,0x5F,0x5F,0x5F,0x5F,0x5F,0x5F,0x40,0x3F,0x00,/*Battery 10*/
|
||||
|
||||
0x00,0x00,0x38,0xC4,0x00,0x38,0xC4,0x00,0x38,0xC4,0x00,0x00,0x00,0x38,0x3A,0x39,0x38,0x3A,0x39,0x38,0x3A,0x39,0x10,0x10, // heating
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x10,0x10, // cooling
|
||||
//width = 12
|
||||
//height = 16
|
||||
0x00,0x60,0xE0,0xFE,0xE0,0xE0,0xE0,0xE0,0xFE,0xE0,0x60,0x00,0x00,0x00,0x00,0x01,0x03,0xFF,0xFF,0x03,0x01,0x00,0x00,0x00,
|
||||
|
||||
|
||||
/*
|
||||
0x00,0x00,0x00,0x80,0x80,0xFE,0xFF,0x83,0x87,0x06,0x00,0x00,0x00,0x00,0x30,0x70,0x60,0x7F,0x3F,0x00,0x00,0x00,0x00,0x00,//Function?
|
||||
0x00,0x70,0xFA,0xDB,0xDB,0xDB,0xDB,0xDB,0xDB,0xFF,0xFE,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,//a_
|
||||
0x00,0x3C,0x7E,0xE7,0xC3,0xC3,0xC3,0xC3,0xE7,0x7E,0x3C,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,//0_
|
||||
0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,0x55,0x00,0xAA,0x00,//25% block
|
||||
0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,//50% pipe
|
||||
0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,0xAA,0xFF,0x55,0xFF,//75% block
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,//| pipe
|
||||
0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,//T pipe ,|
|
||||
0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0xFE,0xFE,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,//,| double pipe
|
||||
0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,// || double pipe
|
||||
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0xFE,0xFE,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,//#NAME?//#NAME?
|
||||
0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x07,0x07,0x00,0x00,0x00,0x00,0x00,//,^ double pupe
|
||||
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,//#NAME?//#NAME?
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//,> pipe
|
||||
0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//_|_ pipe
|
||||
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,//,|, pipe
|
||||
0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,//|, pipe
|
||||
0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//#NAME?//#NAME?
|
||||
0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x80,0x80,0x80,0x80,0x80,0x01,0x01,0x01,0x01,0x01,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,//#NAME?//#NAME?
|
||||
0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x07,0x07,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,//,> double pipe
|
||||
0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,//^, double pipe
|
||||
0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,//_|_ double pipe
|
||||
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0xFE,0xFE,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,//,|, double pipe
|
||||
0x00,0x00,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0xFF,0xFF,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,//|, double pipe
|
||||
0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,0x06,//== double pipe
|
||||
0xC0,0xC0,0xFF,0xFF,0x00,0xFF,0xFF,0xC0,0xC0,0xC0,0xC0,0xC0,0x06,0x06,0xFE,0xFE,0x00,0xFE,0xFE,0x06,0x06,0x06,0x06,0x06,//#NAME?//#NAME?
|
||||
0x00,0x00,0x00,0x78,0xFC,0xCC,0x8C,0x0C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x1C,0x3E,0x33,0x33,0x3F,0x1E,0x00,0x00,0x00,//Delta lowercase
|
||||
0x00,0x00,0x00,0x00,0x00,0x7E,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//27 (')
|
||||
0x80,0x80,0x80,0x80,0x80,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,//,^ pipe
|
||||
0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x01,0x01,0x01,0x01,0x01,//| , pipe
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,//solid block
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,//half block bottom
|
||||
0x00,0x00,0x00,0x00,0x00,0xBF,0xBF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x00,0x00,0x00,0x00,//7C (|)
|
||||
0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//top half solid block
|
||||
0x00,0x00,0x0C,0xFC,0xFC,0x6C,0x60,0x60,0xE0,0xC0,0x00,0x00,0x00,0x00,0x30,0x3F,0x3F,0x36,0x06,0x06,0x07,0x03,0x00,0x00,//DE small
|
||||
0x00,0x00,0x03,0xFF,0xFF,0x1B,0x18,0x18,0xF8,0xF0,0x00,0x00,0x00,0x00,0x30,0x3F,0x3F,0x36,0x06,0x06,0x07,0x03,0x00,0x00,//DE large
|
||||
0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//? (,)
|
||||
0x00,0x00,0x00,0xC0,0xC0,0xC0,0xC0,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x06,0x00,0x00,0x00,//=
|
||||
0x00,0x00,0x00,0x40,0x80,0x80,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//sideways comma
|
||||
0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x00,0x00,0x01,0x03,0x01,0x00,0x00,//..
|
||||
0x00,0x00,0x00,0x00,0x00,0x80,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x01,0x00,0x00,0x00,0x00,//.
|
||||
0x00,0x00,0x02,0x1F,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//tiny 1
|
||||
0x00,0x00,0x00,0x00,0xF0,0xF0,0xF0,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x03,0x03,0x03,0x00,0x00,0x00,0x00,//small block
|
||||
*/
|
||||
};
|
||||
|
||||
const uint8_t FontSymbols[] = {
|
||||
|
||||
0x00,0x00,0x00,0xFC,0xF8,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x0F,0x07,0x03,0x01,0x00,0x00,0x00,0x00,//Right block
|
||||
0x00,0x00,0x00,0x80,0xC0,0xE0,0xF0,0xF8,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x0F,0x1F,0x00,0x00,0x00,//left block
|
||||
0x00,0x00,0x00,0x10,0x18,0x1C,0xFE,0x1C,0x18,0x10,0x00,0x00,0x00,0x00,0x00,0x04,0x0C,0x1C,0x3F,0x1C,0x0C,0x04,0x00,0x00,//UD arrow
|
||||
0x00,0x00,0x00,0xFE,0xFE,0x00,0x00,0xFE,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x37,0x37,0x00,0x00,0x37,0x37,0x00,0x00,0x00,//!!
|
||||
0x00,0x38,0x7C,0xC6,0x82,0xFE,0xFE,0x02,0xFE,0xFE,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x3F,0x00,0x3F,0x3F,0x00,0x00,//paragraph
|
||||
0x00,0x00,0xDC,0xFE,0x22,0x22,0x22,0x22,0xE6,0xC4,0x00,0x00,0x00,0x00,0x08,0x19,0x11,0x11,0x11,0x11,0x1F,0x0E,0x00,0x00,//section
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x38,0x00,//cursor
|
||||
0x00,0x00,0x00,0x08,0x0C,0x0E,0xFF,0x0E,0x0C,0x08,0x00,0x00,0x00,0x00,0x00,0x44,0x4C,0x5C,0x7F,0x5C,0x4C,0x44,0x00,0x00,//UD arrow
|
||||
0x00,0x00,0x00,0x10,0x18,0x1C,0xFE,0x1C,0x18,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,//UP arrow
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x0C,0x1C,0x3F,0x1C,0x0C,0x04,0x00,0x00,//Down arrow
|
||||
0x00,0x00,0x80,0x80,0x80,0x80,0x80,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x03,0x01,0x00,0x00,//right arrow
|
||||
0x00,0x00,0x80,0xC0,0xE0,0xF0,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x00,0x00,0x00,0x00,0x00,0x00,//left arrow
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x20,0x00,
|
||||
0x00,0x80,0xC0,0xE0,0xF0,0x80,0x80,0x80,0xF0,0xE0,0xC0,0x80,0x00,0x00,0x01,0x03,0x07,0x00,0x00,0x00,0x07,0x03,0x01,0x00,//LR arrow
|
||||
0x00,0x00,0x00,0x00,0x80,0xC0,0xE0,0xC0,0x80,0x00,0x00,0x00,0x00,0x04,0x06,0x07,0x07,0x07,0x07,0x07,0x07,0x07,0x06,0x04,//UP block
|
||||
0x00,0x20,0x60,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0xE0,0x60,0x20,0x00,0x00,0x00,0x00,0x01,0x03,0x07,0x03,0x01,0x00,0x00,0x00,//Down block
|
||||
};
|
||||
const uint8_t WarningBlock24[] = {
|
||||
//width = 24
|
||||
//height = 16
|
||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0x0C,0x02,0xF1,0xF1,0xF1,0x02,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||
0x00,0x00,0x00,0xC0,0xB0,0x8C,0x83,0x80,0x80,0x80,0x80,0xB3,0xB3,0xB3,0x80,0x80,0x80,0x80,0x83,0x8C,0xB0,0xC0,0x00,0x00,
|
||||
};
|
||||
const uint8_t idleScreenBG[] = {
|
||||
|
||||
//width = 84
|
||||
//height = 16
|
||||
0x00,0xE0,0x18,0x04,0x02,0x02,0x01,0x41,0x61,0x61,0x61,0xE1,0xC1,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
|
||||
0x81,0x81,0x81,0x81,0xC1,0xE1,0x61,0x61,0x61,0x41,0x01,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,0x00,0xE0,0x18,0x04,0x02,0x02,
|
||||
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
|
||||
0x99,0x65,0x01,0x01,0x81,0x41,0x01,0x02,0x02,0x04,0x18,0xE0,
|
||||
0x00,0x07,0x18,0x20,0x40,0x40,0x80,0x82,0x86,0x86,0x86,0x87,0x83,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,
|
||||
0x81,0x81,0x81,0x81,0x83,0x87,0x86,0x86,0x86,0x82,0x80,0x80,0x40,0x40,0x20,0x18,0x07,0x00,0x00,0x07,0x18,0x20,0x40,0x40,
|
||||
0x80,0x82,0x87,0x85,0x85,0x85,0x85,0x87,0x87,0x85,0x87,0x85,0x87,0x87,0x82,0x82,0x82,0x80,0x82,0x80,0x82,0x82,0x82,0x92,
|
||||
0x8A,0x84,0x82,0x81,0x80,0x80,0x80,0x40,0x40,0x20,0x18,0x07,
|
||||
};
|
||||
|
||||
const uint8_t idleScreenBGF[] = {
|
||||
//width = 84
|
||||
//height = 16
|
||||
0xE0,0x18,0x04,0x02,0x02,0x01,0x41,0x81,0x01,0x01,0x65,0x99,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,
|
||||
0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,0x00,0xE0,0x18,0x04,0x02,0x02,
|
||||
0x01,0x01,0x41,0x61,0x61,0x61,0xE1,0xC1,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0xC1,
|
||||
0xE1,0x61,0x61,0x61,0x41,0x01,0x02,0x02,0x04,0x18,0xE0,0x00,
|
||||
0x07,0x18,0x20,0x40,0x40,0x80,0x80,0x80,0x81,0x82,0x84,0x8A,0x92,0x82,0x82,0x82,0x80,0x82,0x80,0x82,0x82,0x82,0x87,0x87,
|
||||
0x85,0x87,0x85,0x87,0x87,0x85,0x85,0x85,0x85,0x87,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00,0x00,0x07,0x18,0x20,0x40,0x40,
|
||||
0x80,0x80,0x82,0x86,0x86,0x86,0x87,0x83,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x83,
|
||||
0x87,0x86,0x86,0x86,0x82,0x80,0x40,0x40,0x20,0x18,0x07,0x00,
|
||||
|
||||
};
|
||||
|
||||
|
||||
const unsigned char ASCII6x8[] = {
|
||||
//1*8*6 һ<><D2BB>
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // sp
|
||||
0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, // !
|
||||
0x00, 0x00, 0x07, 0x00, 0x07, 0x00, // "
|
||||
0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14, // #
|
||||
0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12, // $
|
||||
0x00, 0x62, 0x64, 0x08, 0x13, 0x23, // %
|
||||
0x00, 0x36, 0x49, 0x55, 0x22, 0x50, // &
|
||||
0x00, 0x00, 0x05, 0x03, 0x00, 0x00, // '
|
||||
0x00, 0x00, 0x1c, 0x22, 0x41, 0x00, // (
|
||||
0x00, 0x00, 0x41, 0x22, 0x1c, 0x00, // )
|
||||
0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, // *
|
||||
0x00, 0x08, 0x08, 0x3E, 0x08, 0x08, // +
|
||||
0x00, 0x00, 0x00, 0xA0, 0x60, 0x00, // ,
|
||||
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, // -
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00, // .
|
||||
0x00, 0x20, 0x10, 0x08, 0x04, 0x02, // /
|
||||
0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E, // 0
|
||||
0x00, 0x00, 0x42, 0x7F, 0x40, 0x00, // 1
|
||||
0x00, 0x42, 0x61, 0x51, 0x49, 0x46, // 2
|
||||
0x00, 0x21, 0x41, 0x45, 0x4B, 0x31, // 3
|
||||
0x00, 0x18, 0x14, 0x12, 0x7F, 0x10, // 4
|
||||
0x00, 0x27, 0x45, 0x45, 0x45, 0x39, // 5
|
||||
0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30, // 6
|
||||
0x00, 0x01, 0x71, 0x09, 0x05, 0x03, // 7
|
||||
0x00, 0x36, 0x49, 0x49, 0x49, 0x36, // 8
|
||||
0x00, 0x06, 0x49, 0x49, 0x29, 0x1E, // 9
|
||||
0x00, 0x00, 0x36, 0x36, 0x00, 0x00, // :
|
||||
0x00, 0x00, 0x56, 0x36, 0x00, 0x00, // ;
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00, // <
|
||||
0x00, 0x14, 0x14, 0x14, 0x14, 0x14, // =
|
||||
0x00, 0x00, 0x41, 0x22, 0x14, 0x08, // >
|
||||
0x00, 0x02, 0x01, 0x51, 0x09, 0x06, // ?
|
||||
0x00, 0x32, 0x49, 0x59, 0x51, 0x3E, // @
|
||||
0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C, // A
|
||||
0x00, 0x7F, 0x49, 0x49, 0x49, 0x36, // B
|
||||
0x00, 0x3E, 0x41, 0x41, 0x41, 0x22, // C
|
||||
0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C, // D
|
||||
0x00, 0x7F, 0x49, 0x49, 0x49, 0x41, // E
|
||||
0x00, 0x7F, 0x09, 0x09, 0x09, 0x01, // F
|
||||
0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A, // G
|
||||
0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F, // H
|
||||
0x00, 0x00, 0x41, 0x7F, 0x41, 0x00, // I
|
||||
0x00, 0x20, 0x40, 0x41, 0x3F, 0x01, // J
|
||||
0x00, 0x7F, 0x08, 0x14, 0x22, 0x41, // K
|
||||
0x00, 0x7F, 0x40, 0x40, 0x40, 0x40, // L
|
||||
0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F, // M
|
||||
0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F, // N
|
||||
0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E, // O
|
||||
0x00, 0x7F, 0x09, 0x09, 0x09, 0x06, // P
|
||||
0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E, // Q
|
||||
0x00, 0x7F, 0x09, 0x19, 0x29, 0x46, // R
|
||||
0x00, 0x46, 0x49, 0x49, 0x49, 0x31, // S
|
||||
0x00, 0x01, 0x01, 0x7F, 0x01, 0x01, // T
|
||||
0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F, // U
|
||||
0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F, // V
|
||||
0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F, // W
|
||||
0x00, 0x63, 0x14, 0x08, 0x14, 0x63, // X
|
||||
0x00, 0x07, 0x08, 0x70, 0x08, 0x07, // Y
|
||||
0x00, 0x61, 0x51, 0x49, 0x45, 0x43, // Z
|
||||
0x00, 0x00, 0x7F, 0x41, 0x41, 0x00, // [
|
||||
0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55, // '\'
|
||||
0x00, 0x00, 0x41, 0x41, 0x7F, 0x00, // ]
|
||||
0x00, 0x04, 0x02, 0x01, 0x02, 0x04, // ^
|
||||
0x00, 0x40, 0x40, 0x40, 0x40, 0x40, // _
|
||||
0x00, 0x00, 0x01, 0x02, 0x04, 0x00, // '
|
||||
0x00, 0x20, 0x54, 0x54, 0x54, 0x78, // a
|
||||
0x00, 0x7F, 0x48, 0x44, 0x44, 0x38, // b
|
||||
0x00, 0x38, 0x44, 0x44, 0x44, 0x20, // c
|
||||
0x00, 0x38, 0x44, 0x44, 0x48, 0x7F, // d
|
||||
0x00, 0x38, 0x54, 0x54, 0x54, 0x18, // e
|
||||
0x00, 0x08, 0x7E, 0x09, 0x01, 0x02, // f
|
||||
0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C, // g
|
||||
0x00, 0x7F, 0x08, 0x04, 0x04, 0x78, // h
|
||||
0x00, 0x00, 0x44, 0x7D, 0x40, 0x00, // i
|
||||
0x00, 0x40, 0x80, 0x84, 0x7D, 0x00, // j
|
||||
0x00, 0x7F, 0x10, 0x28, 0x44, 0x00, // k
|
||||
0x00, 0x00, 0x41, 0x7F, 0x40, 0x00, // l
|
||||
0x00, 0x7C, 0x04, 0x18, 0x04, 0x78, // m
|
||||
0x00, 0x7C, 0x08, 0x04, 0x04, 0x78, // n
|
||||
0x00, 0x38, 0x44, 0x44, 0x44, 0x38, // o
|
||||
0x00, 0xFC, 0x24, 0x24, 0x24, 0x18, // p
|
||||
0x00, 0x18, 0x24, 0x24, 0x18, 0xFC, // q
|
||||
0x00, 0x7C, 0x08, 0x04, 0x04, 0x08, // r
|
||||
0x00, 0x48, 0x54, 0x54, 0x54, 0x20, // s
|
||||
0x00, 0x04, 0x3F, 0x44, 0x40, 0x20, // t
|
||||
0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C, // u
|
||||
0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C, // v
|
||||
0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C, // w
|
||||
0x00, 0x44, 0x28, 0x10, 0x28, 0x44, // x
|
||||
0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C, // y
|
||||
0x00, 0x44, 0x64, 0x54, 0x4C, 0x44, // z
|
||||
};
|
||||
#endif /* FONT_H_ */
|
||||
Reference in New Issue
Block a user